Use anonymous OIDs in pkinit_crypto_openssl.c
authorGreg Hudson <ghudson@mit.edu>
Tue, 25 Mar 2014 02:42:02 +0000 (22:42 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 25 Mar 2014 21:53:00 +0000 (17:53 -0400)
commit6b9e570a7e98470b806a26c5119e53b2145e2586
treece7511df9a3b000333822339deeda9a25ffde37b
parent8ee1790ba6e3468d7ed53ed46123dc9545a4216f
Use anonymous OIDs in pkinit_crypto_openssl.c

Stop adding OIDs to the global OpenSSL table.  It isn't thread-safe
(even with locking callbacks registered), and calling OBJ_cleanup
could break other uses of OpenSSL.  Instead, use anonymous OIDs
created with OBJ_txt2oid.  Anonymous OIDs need to be managed more
careful to avoid double-freeing, so create a copy before calling
PKCS7_add_signed_attribute, and don't free the result of
pkinit_pkcs7type2oid in cms_contentinfo_create.

ticket: 7889
src/plugins/preauth/pkinit/pkinit_crypto_openssl.c