Remove X509_PUBKEY lock.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 23 Mar 2016 21:04:49 +0000 (21:04 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 30 Mar 2016 13:01:45 +0000 (14:01 +0100)
commitd2ec189fdd6d734c21d4067340cc96a0c4ce0595
tree3f8f24f5214d1c4b4a38a20165698163890fca0f
parent703f44e73c18a63a65499fedc57893ae0f413eac
Remove X509_PUBKEY lock.

Cache the decoded public key when an X509_PUBKEY structure is initially
parsed so no locking is required. Ignore any decode errors.

When an application calls X509_PUBKEY_get0() subsequently it will either
get the cached key or the decode operation will be repeated which will
return an appropriate error.

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/x509/x_pubkey.c