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>
1000 B
dev.boringcrypto branch
We have been working inside Google on a fork of Go that uses BoringCrypto (the core of BoringSSL) for various crypto primitives, in furtherance of some work related to FIPS 140-2. We have heard that some external users of Go would be interested in this code as well, so this branch holds the patches to make Go use BoringCrypto.
Unlike typical dev branches, we do not intend any eventual merge of this code into the master branch. Instead we intend to maintain in this branch the latest release plus BoringCrypto patches.
To be clear, we are not making any statements or representations about the suitability of this code in relation to the FIPS 140-2 standard. Interested users will have to evaluate for themselves whether the code is useful for their own purposes.