This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit e8e0a39
Estimate the overhead of an X509 object without sizeof
To unblock optimizations in hopes of reducing the overhead, we're
planning to make X509 opaque in BoringSSL. This aligns with upstream
OpenSSL, which has made most of these structs opaque.
Instead, use an estimate. The sizeof-based estimate was undercounting
the overhead anyway because there are many structures underneath X509,
some of which are already opaque. I just rounded sizeof(X509) +
sizeof(X509_CINF) up.
(Even this is likely still undercounting it because X509 objects are
very malloc-heavy and duplicate large chunks of the certificate. They're
not a very efficient representation and can't be made efficient without
first hiding the structs. In Chrome, we stopped using them altogether
and just retain the byte string, parsing as needed.)
TEST=ci
Change-Id: Icdc729ceba7eadf002bec5e080fc3e0adf7c4b56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209920
Reviewed-by: Alexander Aprelev <[email protected]>
Commit-Queue: Alexander Aprelev <[email protected]>
Auto-Submit: David Benjamin <[email protected]>1 parent cc84bb3 commit e8e0a39
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
157 | | - | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
0 commit comments