diff options
author | Filippo Valsorda <filippo@golang.org> | 2020-02-05 18:24:23 -0500 |
---|---|---|
committer | Filippo Valsorda <filippo@golang.org> | 2020-03-02 20:52:19 +0000 |
commit | 6c64b188a53afec79563cf4ad3c5bc373036d3ae (patch) | |
tree | 2a2af462a551bfffd43214423e512b11a0775a03 /src/crypto/internal/boring/goboringcrypto.h | |
parent | 13355c78ff03607b69ebc8b6da21c09c6b5ffc22 (diff) | |
download | go-6c64b188a53afec79563cf4ad3c5bc373036d3ae.tar.gz go-6c64b188a53afec79563cf4ad3c5bc373036d3ae.zip |
[dev.boringcrypto] crypto/internal/boring: update BoringCrypto module to certificate 3318
Use OPENSSL_malloc for set0 functions as OPENSSL_free now catches us
using the libc malloc and aborts.
While at it, move the runtime.KeepAlive to the location of the key use.
Fixes #30158
Change-Id: I968a98d8974ca5f220e822841beb6c34290eefe9
Reviewed-on: https://go-review.googlesource.com/c/go/+/218000
Reviewed-by: Katie Hockman <katie@golang.org>
Diffstat (limited to 'src/crypto/internal/boring/goboringcrypto.h')
-rw-r--r-- | src/crypto/internal/boring/goboringcrypto.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crypto/internal/boring/goboringcrypto.h b/src/crypto/internal/boring/goboringcrypto.h index f982ce83c2..744496c6ef 100644 --- a/src/crypto/internal/boring/goboringcrypto.h +++ b/src/crypto/internal/boring/goboringcrypto.h @@ -28,6 +28,7 @@ // #include <openssl/crypto.h> int _goboringcrypto_FIPS_mode(void); +void* _goboringcrypto_OPENSSL_malloc(size_t); // #include <openssl/rand.h> int _goboringcrypto_RAND_bytes(uint8_t*, size_t); @@ -180,7 +181,7 @@ int _goboringcrypto_ECDSA_verify(int, const uint8_t*, size_t, const uint8_t*, si // #include <openssl/rsa.h> // Note: order of struct fields here is unchecked. -typedef struct GO_RSA { void *meth; GO_BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp; char data[120]; } GO_RSA; +typedef struct GO_RSA { void *meth; GO_BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp; char data[160]; } GO_RSA; /*unchecked (opaque)*/ typedef struct GO_BN_GENCB { char data[1]; } GO_BN_GENCB; GO_RSA* _goboringcrypto_RSA_new(void); void _goboringcrypto_RSA_free(GO_RSA*); |