Add X509_STORE_load_mem() to load certificates from a memory buffer
authorreyk <reyk@openbsd.org>
Thu, 22 Jan 2015 09:06:39 +0000 (09:06 +0000)
committerreyk <reyk@openbsd.org>
Thu, 22 Jan 2015 09:06:39 +0000 (09:06 +0000)
commite0d5ea162a855489a21c60884ae351f9d9390bab
tree0b56607d58eb3daed21b96d79ef0a4d240c41ce9
parent3334752f746bd3c2eb2b7b10646cdb63bb9cfb02
Add X509_STORE_load_mem() to load certificates from a memory buffer
instead of disk.  OpenSSL didn't provide a built-in API from loading
certificates in a chroot'ed process that doesn't have direct access to
the files.  X509_STORE_load_mem() provides a new backend that will be
used by libssl and libtls to implement such privsep-friendly
functionality.

Adopted for LibreSSL based on older code from relayd (by pyr@ and myself)
With feedback and OK bluhm@
lib/libcrypto/crypto/Makefile
lib/libcrypto/crypto/shlib_version
lib/libcrypto/shlib_version
lib/libcrypto/x509/by_mem.c [new file with mode: 0644]
lib/libcrypto/x509/x509_d2.c
lib/libcrypto/x509/x509_vfy.h
lib/libssl/src/crypto/x509/by_mem.c [new file with mode: 0644]
lib/libssl/src/crypto/x509/x509_d2.c
lib/libssl/src/crypto/x509/x509_vfy.h