Don't use OPENSSL_ARRAY_SIZE with an InplaceVector

I think it actually works fine, but it's kinda silly when we have
capacity() and TryCopyFrom(). But also violating particular invariant is
always a bug in the library, so I think just relying on CopyFrom()'s
(fatal) bounds check is fine.

Change-Id: I40ab59ccd9a508f7a0717294619acd853a521359
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/72127
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
diff --git a/ssl/tls13_enc.cc b/ssl/tls13_enc.cc
index 1e682f1..11ea7b5 100644
--- a/ssl/tls13_enc.cc
+++ b/ssl/tls13_enc.cc
@@ -235,14 +235,6 @@
     }
   }
 
-  if (traffic_secret.size() >
-          OPENSSL_ARRAY_SIZE(ssl->s3->read_traffic_secret) ||
-      traffic_secret.size() >
-          OPENSSL_ARRAY_SIZE(ssl->s3->write_traffic_secret)) {
-    OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
-    return false;
-  }
-
   if (direction == evp_aead_open) {
     if (!ssl->method->set_read_state(ssl, level, std::move(traffic_aead),
                                      secret_for_quic)) {