diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-05-21 00:37:39 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-05-26 13:09:26 +0100 |
commit | 6355d31538fb3d50ba34210e6514cfac1c627243 (patch) | |
tree | b375f4c6110572be6a487c38a10ec36080224656 /include | |
parent | fef034f85ea8b533423d4102cb8f83ef0ac24154 (diff) | |
download | openssl-6355d31538fb3d50ba34210e6514cfac1c627243.tar.gz |
Add function PKCS8_set0_pbe
This adds a new function which will encrypt a private key using PKCS#8
based on an X509_ALGOR structure and reimplements PKCS8_encrypt to use it.
Update pkcs8 utlity to use PKCS8_set0_pbe.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/pkcs12.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/openssl/pkcs12.h b/include/openssl/pkcs12.h index e58e55c58a..ba8b9441a9 100644 --- a/include/openssl/pkcs12.h +++ b/include/openssl/pkcs12.h @@ -182,6 +182,8 @@ PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(PKCS12_SAFEBAG *bag, X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8); +X509_SIG *PKCS8_set0_pbe(const char *pass, int passlen, + PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe); PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG(int pbe_nid, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, @@ -309,6 +311,7 @@ void ERR_load_PKCS12_strings(void); # define PKCS12_F_PKCS12_VERIFY_MAC 126 # define PKCS12_F_PKCS8_ADD_KEYUSAGE 124 # define PKCS12_F_PKCS8_ENCRYPT 125 +# define PKCS12_F_PKCS8_SET0_PBE 132 /* Reason codes. */ # define PKCS12_R_CANT_PACK_STRUCTURE 100 |