diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/pkcs12/Makefile.ssl | 234 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_add.c | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_attr.c | 16 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_bags.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_crt.c | 25 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_decr.c | 18 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_key.c | 38 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_kiss.c | 100 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_lib.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_mac.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_mutl.c | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_npas.c | 37 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_sbag.c | 23 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_utl.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/pkcs12.h | 57 | 
15 files changed, 336 insertions, 239 deletions
| diff --git a/src/lib/libcrypto/pkcs12/Makefile.ssl b/src/lib/libcrypto/pkcs12/Makefile.ssl index 5716f608b6..67869f204f 100644 --- a/src/lib/libcrypto/pkcs12/Makefile.ssl +++ b/src/lib/libcrypto/pkcs12/Makefile.ssl | |||
| @@ -91,15 +91,17 @@ p12_add.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 91 | p12_add.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 91 | p12_add.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 92 | p12_add.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 92 | p12_add.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 93 | p12_add.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 93 | p12_add.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 94 | p12_add.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 94 | p12_add.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 95 | p12_add.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 95 | p12_add.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 96 | p12_add.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 96 | p12_add.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 97 | p12_add.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 97 | p12_add.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 98 | p12_add.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 
| 98 | p12_add.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 99 | p12_add.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | 
| 99 | p12_add.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 100 | p12_add.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 
| 100 | p12_add.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 101 | p12_add.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 
| 101 | p12_add.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 102 | p12_add.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 
| 102 | p12_add.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 103 | p12_add.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 
| 104 | p12_add.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 103 | p12_add.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 105 | p12_add.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 
| 104 | p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 106 | p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 105 | p12_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 107 | p12_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| @@ -108,16 +110,19 @@ p12_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 108 | p12_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 110 | p12_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 109 | p12_attr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 111 | p12_attr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 110 | p12_attr.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 112 | p12_attr.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 111 | p12_attr.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 113 | p12_attr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 114 | p12_attr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 112 | p12_attr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 115 | p12_attr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 113 | p12_attr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 116 | p12_attr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 117 | p12_attr.o: ../../include/openssl/opensslconf.h | ||
| 114 | p12_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 118 | p12_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 115 | p12_attr.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 119 | p12_attr.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 116 | p12_attr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 120 | p12_attr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 117 | p12_attr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 121 | p12_attr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 118 | p12_attr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 122 | p12_attr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 119 | p12_attr.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 123 | p12_attr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 120 | p12_attr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 124 | p12_attr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 125 | p12_attr.o: ../cryptlib.h | ||
| 121 | p12_bags.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 126 | p12_bags.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 
| 122 | p12_bags.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 127 | p12_bags.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 
| 123 | p12_bags.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 128 | p12_bags.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 
| @@ -126,16 +131,18 @@ p12_bags.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 126 | p12_bags.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 131 | p12_bags.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 
| 127 | p12_bags.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 132 | p12_bags.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 
| 128 | p12_bags.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 133 | p12_bags.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 
| 129 | p12_bags.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 134 | p12_bags.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 
| 130 | p12_bags.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 135 | p12_bags.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 
| 131 | p12_bags.o: ../../include/openssl/opensslconf.h | 136 | p12_bags.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 
| 137 | p12_bags.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 132 | p12_bags.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 138 | p12_bags.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 133 | p12_bags.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 139 | p12_bags.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 134 | p12_bags.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 140 | p12_bags.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 135 | p12_bags.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 141 | p12_bags.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 136 | p12_bags.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 142 | p12_bags.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 137 | p12_bags.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 143 | p12_bags.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 138 | p12_bags.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 144 | p12_bags.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 145 | p12_bags.o: ../cryptlib.h | ||
| 139 | p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 146 | p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 140 | p12_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 147 | p12_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 141 | p12_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 148 | p12_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| @@ -143,16 +150,19 @@ p12_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 143 | p12_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 150 | p12_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 144 | p12_crpt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 151 | p12_crpt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 145 | p12_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 152 | p12_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 146 | p12_crpt.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 153 | p12_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 154 | p12_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 147 | p12_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 155 | p12_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 148 | p12_crpt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 156 | p12_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 157 | p12_crpt.o: ../../include/openssl/opensslconf.h | ||
| 149 | p12_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 158 | p12_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 150 | p12_crpt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 159 | p12_crpt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 151 | p12_crpt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 160 | p12_crpt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 152 | p12_crpt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 161 | p12_crpt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 153 | p12_crpt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 162 | p12_crpt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 154 | p12_crpt.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 163 | p12_crpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 155 | p12_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 164 | p12_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 165 | p12_crpt.o: ../cryptlib.h | ||
| 156 | p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 166 | p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 157 | p12_crt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 167 | p12_crt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 158 | p12_crt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 168 | p12_crt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| @@ -160,15 +170,17 @@ p12_crt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 160 | p12_crt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 170 | p12_crt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 161 | p12_crt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 171 | p12_crt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 162 | p12_crt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 172 | p12_crt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 163 | p12_crt.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 173 | p12_crt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 174 | p12_crt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 164 | p12_crt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 175 | p12_crt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 165 | p12_crt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 176 | p12_crt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 166 | p12_crt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 177 | p12_crt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 
| 167 | p12_crt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 178 | p12_crt.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | 
| 168 | p12_crt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 179 | p12_crt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 
| 169 | p12_crt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 180 | p12_crt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 
| 170 | p12_crt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 181 | p12_crt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 
| 171 | p12_crt.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 182 | p12_crt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 
| 183 | p12_crt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 172 | p12_crt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 184 | p12_crt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 
| 173 | p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 185 | p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 174 | p12_decr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 186 | p12_decr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| @@ -177,16 +189,19 @@ p12_decr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 177 | p12_decr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 189 | p12_decr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 178 | p12_decr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 190 | p12_decr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 179 | p12_decr.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 191 | p12_decr.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 180 | p12_decr.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 192 | p12_decr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 193 | p12_decr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 181 | p12_decr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 194 | p12_decr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 182 | p12_decr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 195 | p12_decr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 196 | p12_decr.o: ../../include/openssl/opensslconf.h | ||
| 183 | p12_decr.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 197 | p12_decr.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 184 | p12_decr.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 198 | p12_decr.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 185 | p12_decr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 199 | p12_decr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 186 | p12_decr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 200 | p12_decr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 187 | p12_decr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 201 | p12_decr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 188 | p12_decr.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 202 | p12_decr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 189 | p12_decr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 203 | p12_decr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 204 | p12_decr.o: ../cryptlib.h | ||
| 190 | p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 205 | p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 191 | p12_init.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 206 | p12_init.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 192 | p12_init.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 207 | p12_init.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| @@ -194,16 +209,19 @@ p12_init.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 194 | p12_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 209 | p12_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 195 | p12_init.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 210 | p12_init.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 196 | p12_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 211 | p12_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 197 | p12_init.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 212 | p12_init.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 213 | p12_init.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 198 | p12_init.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 214 | p12_init.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 199 | p12_init.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 215 | p12_init.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 216 | p12_init.o: ../../include/openssl/opensslconf.h | ||
| 200 | p12_init.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 217 | p12_init.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 201 | p12_init.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 218 | p12_init.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 202 | p12_init.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 219 | p12_init.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 203 | p12_init.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 220 | p12_init.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 204 | p12_init.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 221 | p12_init.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 205 | p12_init.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 222 | p12_init.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 206 | p12_init.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 223 | p12_init.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 224 | p12_init.o: ../cryptlib.h | ||
| 207 | p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 225 | p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 208 | p12_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 226 | p12_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 209 | p12_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 227 | p12_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| @@ -211,15 +229,17 @@ p12_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 211 | p12_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 229 | p12_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 212 | p12_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 230 | p12_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 213 | p12_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 231 | p12_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 214 | p12_key.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 232 | p12_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 233 | p12_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 215 | p12_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 234 | p12_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 216 | p12_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 235 | p12_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 217 | p12_key.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 236 | p12_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 
| 218 | p12_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 237 | p12_key.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | 
| 219 | p12_key.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 238 | p12_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 
| 220 | p12_key.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 239 | p12_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 
| 221 | p12_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 240 | p12_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 
| 222 | p12_key.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 241 | p12_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 
| 242 | p12_key.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 223 | p12_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 243 | p12_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 
| 224 | p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 244 | p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 225 | p12_kiss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 245 | p12_kiss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| @@ -228,16 +248,19 @@ p12_kiss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 228 | p12_kiss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 248 | p12_kiss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 229 | p12_kiss.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 249 | p12_kiss.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 230 | p12_kiss.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 250 | p12_kiss.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 231 | p12_kiss.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 251 | p12_kiss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 252 | p12_kiss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 232 | p12_kiss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 253 | p12_kiss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 233 | p12_kiss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 254 | p12_kiss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 255 | p12_kiss.o: ../../include/openssl/opensslconf.h | ||
| 234 | p12_kiss.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 256 | p12_kiss.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 235 | p12_kiss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 257 | p12_kiss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 236 | p12_kiss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 258 | p12_kiss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 237 | p12_kiss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 259 | p12_kiss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 238 | p12_kiss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 260 | p12_kiss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 239 | p12_kiss.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 261 | p12_kiss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 240 | p12_kiss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 262 | p12_kiss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 263 | p12_kiss.o: ../cryptlib.h | ||
| 241 | p12_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 264 | p12_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 
| 242 | p12_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 265 | p12_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 
| 243 | p12_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 266 | p12_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 
| @@ -246,14 +269,16 @@ p12_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 246 | p12_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 269 | p12_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 
| 247 | p12_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 270 | p12_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 
| 248 | p12_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 271 | p12_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 
| 249 | p12_lib.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 272 | p12_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 
| 250 | p12_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 273 | p12_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 
| 251 | p12_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 274 | p12_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 
| 252 | p12_lib.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | 275 | p12_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 
| 253 | p12_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 276 | p12_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 254 | p12_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 277 | p12_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 255 | p12_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 278 | p12_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 256 | p12_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 279 | p12_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 280 | p12_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 281 | p12_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 257 | p12_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 282 | p12_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 258 | p12_lib.o: ../cryptlib.h | 283 | p12_lib.o: ../cryptlib.h | 
| 259 | p12_mac.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 284 | p12_mac.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 
| @@ -264,14 +289,16 @@ p12_mac.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 264 | p12_mac.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 289 | p12_mac.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 
| 265 | p12_mac.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 290 | p12_mac.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 
| 266 | p12_mac.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 291 | p12_mac.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 
| 267 | p12_mac.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 292 | p12_mac.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 
| 268 | p12_mac.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 293 | p12_mac.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 
| 269 | p12_mac.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 294 | p12_mac.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 
| 270 | p12_mac.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | 295 | p12_mac.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 
| 271 | p12_mac.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 296 | p12_mac.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 272 | p12_mac.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 297 | p12_mac.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 273 | p12_mac.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 298 | p12_mac.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 274 | p12_mac.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 299 | p12_mac.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 300 | p12_mac.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 301 | p12_mac.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 275 | p12_mac.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 302 | p12_mac.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 276 | p12_mac.o: ../cryptlib.h | 303 | p12_mac.o: ../cryptlib.h | 
| 277 | p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 304 | p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| @@ -282,25 +309,28 @@ p12_mutl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | |||
| 282 | p12_mutl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 309 | p12_mutl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 283 | p12_mutl.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 310 | p12_mutl.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 284 | p12_mutl.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h | 311 | p12_mutl.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h | 
| 285 | p12_mutl.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 312 | p12_mutl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 
| 286 | p12_mutl.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 313 | p12_mutl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 
| 287 | p12_mutl.o: ../../include/openssl/opensslconf.h | 314 | p12_mutl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 
| 315 | p12_mutl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 288 | p12_mutl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 316 | p12_mutl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 289 | p12_mutl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | 317 | p12_mutl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | 
| 290 | p12_mutl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 318 | p12_mutl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 
| 291 | p12_mutl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 319 | p12_mutl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 
| 292 | p12_mutl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 320 | p12_mutl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 
| 293 | p12_mutl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 321 | p12_mutl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 
| 294 | p12_mutl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 322 | p12_mutl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 
| 295 | p12_mutl.o: ../cryptlib.h | 323 | p12_mutl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 
| 296 | p12_npas.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 324 | p12_npas.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 297 | p12_npas.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 325 | p12_npas.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 298 | p12_npas.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | 326 | p12_npas.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| 299 | p12_npas.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 327 | p12_npas.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 
| 300 | p12_npas.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 328 | p12_npas.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 301 | p12_npas.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 329 | p12_npas.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 
| 302 | p12_npas.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 330 | p12_npas.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 
| 303 | p12_npas.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 331 | p12_npas.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 
| 332 | p12_npas.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 333 | p12_npas.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 304 | p12_npas.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 334 | p12_npas.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 
| 305 | p12_npas.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 335 | p12_npas.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 
| 306 | p12_npas.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h | 336 | p12_npas.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h | 
| @@ -308,8 +338,8 @@ p12_npas.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | |||
| 308 | p12_npas.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 338 | p12_npas.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 309 | p12_npas.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 339 | p12_npas.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 310 | p12_npas.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 340 | p12_npas.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 311 | p12_npas.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 341 | p12_npas.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 312 | p12_npas.o: ../../include/openssl/x509_vfy.h | 342 | p12_npas.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 313 | p12_sbag.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 343 | p12_sbag.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 
| 314 | p12_sbag.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 344 | p12_sbag.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 
| 315 | p12_sbag.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 345 | p12_sbag.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 
| @@ -318,16 +348,18 @@ p12_sbag.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 318 | p12_sbag.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 348 | p12_sbag.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 
| 319 | p12_sbag.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 349 | p12_sbag.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 
| 320 | p12_sbag.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 350 | p12_sbag.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 
| 321 | p12_sbag.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 351 | p12_sbag.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 
| 322 | p12_sbag.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 352 | p12_sbag.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 
| 323 | p12_sbag.o: ../../include/openssl/opensslconf.h | 353 | p12_sbag.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 
| 354 | p12_sbag.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 324 | p12_sbag.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 355 | p12_sbag.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 325 | p12_sbag.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 356 | p12_sbag.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 326 | p12_sbag.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 357 | p12_sbag.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 327 | p12_sbag.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 358 | p12_sbag.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 328 | p12_sbag.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 359 | p12_sbag.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 329 | p12_sbag.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 360 | p12_sbag.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 330 | p12_sbag.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 361 | p12_sbag.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 362 | p12_sbag.o: ../cryptlib.h | ||
| 331 | p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 363 | p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 332 | p12_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 364 | p12_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 333 | p12_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 365 | p12_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| @@ -335,29 +367,33 @@ p12_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 335 | p12_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 367 | p12_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 336 | p12_utl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 368 | p12_utl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 337 | p12_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 369 | p12_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 338 | p12_utl.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 370 | p12_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 371 | p12_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 339 | p12_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 372 | p12_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 340 | p12_utl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 373 | p12_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 341 | p12_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 374 | p12_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 
| 342 | p12_utl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 375 | p12_utl.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | 
| 343 | p12_utl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 376 | p12_utl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 
| 344 | p12_utl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 377 | p12_utl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 
| 345 | p12_utl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 378 | p12_utl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 
| 346 | p12_utl.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 379 | p12_utl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 
| 380 | p12_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 347 | p12_utl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 381 | p12_utl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 
| 348 | pk12err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 382 | pk12err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 349 | pk12err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 383 | pk12err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 350 | pk12err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | 384 | pk12err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| 351 | pk12err.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 385 | pk12err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 
| 352 | pk12err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 386 | pk12err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 353 | pk12err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 387 | pk12err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 
| 354 | pk12err.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 388 | pk12err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 
| 355 | pk12err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 389 | pk12err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 
| 390 | pk12err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 391 | pk12err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 356 | pk12err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 392 | pk12err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 
| 357 | pk12err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 393 | pk12err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 
| 358 | pk12err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 394 | pk12err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 359 | pk12err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 395 | pk12err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 360 | pk12err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 396 | pk12err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 361 | pk12err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 397 | pk12err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 362 | pk12err.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 398 | pk12err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 363 | pk12err.o: ../../include/openssl/x509_vfy.h | 399 | pk12err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_add.c b/src/lib/libcrypto/pkcs12/p12_add.c index d045cbba8d..b563656895 100644 --- a/src/lib/libcrypto/pkcs12/p12_add.c +++ b/src/lib/libcrypto/pkcs12/p12_add.c | |||
| @@ -125,7 +125,7 @@ PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG (int pbe_nid, const char *pass, | |||
| 125 | } | 125 | } | 
| 126 | 126 | ||
| 127 | /* Turn a stack of SAFEBAGS into a PKCS#7 data Contentinfo */ | 127 | /* Turn a stack of SAFEBAGS into a PKCS#7 data Contentinfo */ | 
| 128 | PKCS7 *PKCS12_pack_p7data (STACK *sk) | 128 | PKCS7 *PKCS12_pack_p7data (STACK_OF(PKCS12_SAFEBAG) *sk) | 
| 129 | { | 129 | { | 
| 130 | PKCS7 *p7; | 130 | PKCS7 *p7; | 
| 131 | if (!(p7 = PKCS7_new())) { | 131 | if (!(p7 = PKCS7_new())) { | 
| @@ -138,8 +138,9 @@ PKCS7 *PKCS12_pack_p7data (STACK *sk) | |||
| 138 | return NULL; | 138 | return NULL; | 
| 139 | } | 139 | } | 
| 140 | 140 | ||
| 141 | if (!ASN1_seq_pack(sk, i2d_PKCS12_SAFEBAG, &p7->d.data->data, | 141 | if (!ASN1_seq_pack_PKCS12_SAFEBAG(sk, i2d_PKCS12_SAFEBAG, | 
| 142 | &p7->d.data->length)) { | 142 | &p7->d.data->data, | 
| 143 | &p7->d.data->length)) { | ||
| 143 | PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, PKCS12_R_CANT_PACK_STRUCTURE); | 144 | PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, PKCS12_R_CANT_PACK_STRUCTURE); | 
| 144 | return NULL; | 145 | return NULL; | 
| 145 | } | 146 | } | 
| @@ -149,7 +150,8 @@ PKCS7 *PKCS12_pack_p7data (STACK *sk) | |||
| 149 | /* Turn a stack of SAFEBAGS into a PKCS#7 encrypted data ContentInfo */ | 150 | /* Turn a stack of SAFEBAGS into a PKCS#7 encrypted data ContentInfo */ | 
| 150 | 151 | ||
| 151 | PKCS7 *PKCS12_pack_p7encdata (int pbe_nid, const char *pass, int passlen, | 152 | PKCS7 *PKCS12_pack_p7encdata (int pbe_nid, const char *pass, int passlen, | 
| 152 | unsigned char *salt, int saltlen, int iter, STACK *bags) | 153 | unsigned char *salt, int saltlen, int iter, | 
| 154 | STACK_OF(PKCS12_SAFEBAG) *bags) | ||
| 153 | { | 155 | { | 
| 154 | PKCS7 *p7; | 156 | PKCS7 *p7; | 
| 155 | X509_ALGOR *pbe; | 157 | X509_ALGOR *pbe; | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_attr.c b/src/lib/libcrypto/pkcs12/p12_attr.c index f559351d18..f1a210b5d2 100644 --- a/src/lib/libcrypto/pkcs12/p12_attr.c +++ b/src/lib/libcrypto/pkcs12/p12_attr.c | |||
| @@ -87,13 +87,13 @@ int PKCS12_add_localkeyid (PKCS12_SAFEBAG *bag, unsigned char *name, | |||
| 87 | return 0; | 87 | return 0; | 
| 88 | } | 88 | } | 
| 89 | attrib->object = OBJ_nid2obj(NID_localKeyID); | 89 | attrib->object = OBJ_nid2obj(NID_localKeyID); | 
| 90 | if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) { | 90 | if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) { | 
| 91 | PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE); | 91 | PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE); | 
| 92 | return 0; | 92 | return 0; | 
| 93 | } | 93 | } | 
| 94 | sk_ASN1_TYPE_push (attrib->value.set,keyid); | 94 | sk_ASN1_TYPE_push (attrib->value.set,keyid); | 
| 95 | attrib->set = 1; | 95 | attrib->set = 1; | 
| 96 | if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new (NULL))) { | 96 | if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new_null ())) { | 
| 97 | PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE); | 97 | PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE); | 
| 98 | return 0; | 98 | return 0; | 
| 99 | } | 99 | } | 
| @@ -129,14 +129,14 @@ int PKCS8_add_keyusage (PKCS8_PRIV_KEY_INFO *p8, int usage) | |||
| 129 | return 0; | 129 | return 0; | 
| 130 | } | 130 | } | 
| 131 | attrib->object = OBJ_nid2obj(NID_key_usage); | 131 | attrib->object = OBJ_nid2obj(NID_key_usage); | 
| 132 | if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) { | 132 | if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) { | 
| 133 | PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE); | 133 | PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE); | 
| 134 | return 0; | 134 | return 0; | 
| 135 | } | 135 | } | 
| 136 | sk_ASN1_TYPE_push (attrib->value.set,keyid); | 136 | sk_ASN1_TYPE_push (attrib->value.set,keyid); | 
| 137 | attrib->set = 1; | 137 | attrib->set = 1; | 
| 138 | if (!p8->attributes | 138 | if (!p8->attributes | 
| 139 | && !(p8->attributes = sk_X509_ATTRIBUTE_new (NULL))) { | 139 | && !(p8->attributes = sk_X509_ATTRIBUTE_new_null ())) { | 
| 140 | PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE); | 140 | PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE); | 
| 141 | return 0; | 141 | return 0; | 
| 142 | } | 142 | } | 
| @@ -157,7 +157,7 @@ int PKCS12_add_friendlyname_asc (PKCS12_SAFEBAG *bag, const char *name, | |||
| 157 | return 0; | 157 | return 0; | 
| 158 | } | 158 | } | 
| 159 | ret = PKCS12_add_friendlyname_uni (bag, uniname, unilen); | 159 | ret = PKCS12_add_friendlyname_uni (bag, uniname, unilen); | 
| 160 | Free(uniname); | 160 | OPENSSL_free(uniname); | 
| 161 | return ret; | 161 | return ret; | 
| 162 | } | 162 | } | 
| 163 | 163 | ||
| @@ -181,7 +181,7 @@ int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag, | |||
| 181 | ERR_R_MALLOC_FAILURE); | 181 | ERR_R_MALLOC_FAILURE); | 
| 182 | return 0; | 182 | return 0; | 
| 183 | } | 183 | } | 
| 184 | if (!(bmp->data = Malloc (namelen))) { | 184 | if (!(bmp->data = OPENSSL_malloc (namelen))) { | 
| 185 | PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, | 185 | PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, | 
| 186 | ERR_R_MALLOC_FAILURE); | 186 | ERR_R_MALLOC_FAILURE); | 
| 187 | return 0; | 187 | return 0; | 
| @@ -195,14 +195,14 @@ int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag, | |||
| 195 | return 0; | 195 | return 0; | 
| 196 | } | 196 | } | 
| 197 | attrib->object = OBJ_nid2obj(NID_friendlyName); | 197 | attrib->object = OBJ_nid2obj(NID_friendlyName); | 
| 198 | if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) { | 198 | if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) { | 
| 199 | PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME, | 199 | PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME, | 
| 200 | ERR_R_MALLOC_FAILURE); | 200 | ERR_R_MALLOC_FAILURE); | 
| 201 | return 0; | 201 | return 0; | 
| 202 | } | 202 | } | 
| 203 | sk_ASN1_TYPE_push (attrib->value.set,fname); | 203 | sk_ASN1_TYPE_push (attrib->value.set,fname); | 
| 204 | attrib->set = 1; | 204 | attrib->set = 1; | 
| 205 | if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new (NULL))) { | 205 | if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new_null ())) { | 
| 206 | PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, | 206 | PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, | 
| 207 | ERR_R_MALLOC_FAILURE); | 207 | ERR_R_MALLOC_FAILURE); | 
| 208 | return 0; | 208 | return 0; | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_bags.c b/src/lib/libcrypto/pkcs12/p12_bags.c index c358b06735..56547ef933 100644 --- a/src/lib/libcrypto/pkcs12/p12_bags.c +++ b/src/lib/libcrypto/pkcs12/p12_bags.c | |||
| @@ -188,5 +188,5 @@ void PKCS12_BAGS_free (PKCS12_BAGS *a) | |||
| 188 | } | 188 | } | 
| 189 | 189 | ||
| 190 | ASN1_OBJECT_free (a->type); | 190 | ASN1_OBJECT_free (a->type); | 
| 191 | Free (a); | 191 | OPENSSL_free (a); | 
| 192 | } | 192 | } | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_crt.c b/src/lib/libcrypto/pkcs12/p12_crt.c index ee8aed54c7..a8f7b48882 100644 --- a/src/lib/libcrypto/pkcs12/p12_crt.c +++ b/src/lib/libcrypto/pkcs12/p12_crt.c | |||
| @@ -65,7 +65,8 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, | |||
| 65 | int keytype) | 65 | int keytype) | 
| 66 | { | 66 | { | 
| 67 | PKCS12 *p12; | 67 | PKCS12 *p12; | 
| 68 | STACK *bags, *safes; | 68 | STACK_OF(PKCS12_SAFEBAG) *bags; | 
| 69 | STACK_OF(PKCS7) *safes; | ||
| 69 | PKCS12_SAFEBAG *bag; | 70 | PKCS12_SAFEBAG *bag; | 
| 70 | PKCS8_PRIV_KEY_INFO *p8; | 71 | PKCS8_PRIV_KEY_INFO *p8; | 
| 71 | PKCS7 *authsafe; | 72 | PKCS7 *authsafe; | 
| @@ -85,7 +86,9 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, | |||
| 85 | return NULL; | 86 | return NULL; | 
| 86 | } | 87 | } | 
| 87 | 88 | ||
| 88 | if(!(bags = sk_new (NULL))) { | 89 | if(!X509_check_private_key(cert, pkey)) return NULL; | 
| 90 | |||
| 91 | if(!(bags = sk_PKCS12_SAFEBAG_new_null ())) { | ||
| 89 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 92 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 
| 90 | return NULL; | 93 | return NULL; | 
| 91 | } | 94 | } | 
| @@ -96,7 +99,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, | |||
| 96 | X509_digest(cert, EVP_sha1(), keyid, &keyidlen); | 99 | X509_digest(cert, EVP_sha1(), keyid, &keyidlen); | 
| 97 | if(!PKCS12_add_localkeyid(bag, keyid, keyidlen)) return NULL; | 100 | if(!PKCS12_add_localkeyid(bag, keyid, keyidlen)) return NULL; | 
| 98 | 101 | ||
| 99 | if(!sk_push(bags, (char *)bag)) { | 102 | if(!sk_PKCS12_SAFEBAG_push(bags, bag)) { | 
| 100 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 103 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 
| 101 | return NULL; | 104 | return NULL; | 
| 102 | } | 105 | } | 
| @@ -106,7 +109,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, | |||
| 106 | for(i = 0; i < sk_X509_num(ca); i++) { | 109 | for(i = 0; i < sk_X509_num(ca); i++) { | 
| 107 | tcert = sk_X509_value(ca, i); | 110 | tcert = sk_X509_value(ca, i); | 
| 108 | if(!(bag = M_PKCS12_x5092certbag(tcert))) return NULL; | 111 | if(!(bag = M_PKCS12_x5092certbag(tcert))) return NULL; | 
| 109 | if(!sk_push(bags, (char *)bag)) { | 112 | if(!sk_PKCS12_SAFEBAG_push(bags, bag)) { | 
| 110 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 113 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 
| 111 | return NULL; | 114 | return NULL; | 
| 112 | } | 115 | } | 
| @@ -116,11 +119,12 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, | |||
| 116 | /* Turn certbags into encrypted authsafe */ | 119 | /* Turn certbags into encrypted authsafe */ | 
| 117 | authsafe = PKCS12_pack_p7encdata (nid_cert, pass, -1, NULL, 0, | 120 | authsafe = PKCS12_pack_p7encdata (nid_cert, pass, -1, NULL, 0, | 
| 118 | iter, bags); | 121 | iter, bags); | 
| 119 | sk_pop_free(bags, PKCS12_SAFEBAG_free); | 122 | sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); | 
| 120 | 123 | ||
| 121 | if (!authsafe) return NULL; | 124 | if (!authsafe) return NULL; | 
| 122 | 125 | ||
| 123 | if(!(safes = sk_new (NULL)) || !sk_push(safes, (char *)authsafe)) { | 126 | if(!(safes = sk_PKCS7_new_null ()) | 
| 127 | || !sk_PKCS7_push(safes, authsafe)) { | ||
| 124 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 128 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 
| 125 | return NULL; | 129 | return NULL; | 
| 126 | } | 130 | } | 
| @@ -133,14 +137,15 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, | |||
| 133 | PKCS8_PRIV_KEY_INFO_free(p8); | 137 | PKCS8_PRIV_KEY_INFO_free(p8); | 
| 134 | if (name && !PKCS12_add_friendlyname (bag, name, -1)) return NULL; | 138 | if (name && !PKCS12_add_friendlyname (bag, name, -1)) return NULL; | 
| 135 | if(!PKCS12_add_localkeyid (bag, keyid, keyidlen)) return NULL; | 139 | if(!PKCS12_add_localkeyid (bag, keyid, keyidlen)) return NULL; | 
| 136 | if(!(bags = sk_new(NULL)) || !sk_push (bags, (char *)bag)) { | 140 | if(!(bags = sk_PKCS12_SAFEBAG_new_null()) | 
| 141 | || !sk_PKCS12_SAFEBAG_push (bags, bag)) { | ||
| 137 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 142 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 
| 138 | return NULL; | 143 | return NULL; | 
| 139 | } | 144 | } | 
| 140 | /* Turn it into unencrypted safe bag */ | 145 | /* Turn it into unencrypted safe bag */ | 
| 141 | if(!(authsafe = PKCS12_pack_p7data (bags))) return NULL; | 146 | if(!(authsafe = PKCS12_pack_p7data (bags))) return NULL; | 
| 142 | sk_pop_free(bags, PKCS12_SAFEBAG_free); | 147 | sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); | 
| 143 | if(!sk_push(safes, (char *)authsafe)) { | 148 | if(!sk_PKCS7_push(safes, authsafe)) { | 
| 144 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 149 | PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); | 
| 145 | return NULL; | 150 | return NULL; | 
| 146 | } | 151 | } | 
| @@ -149,7 +154,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, | |||
| 149 | 154 | ||
| 150 | if(!M_PKCS12_pack_authsafes (p12, safes)) return NULL; | 155 | if(!M_PKCS12_pack_authsafes (p12, safes)) return NULL; | 
| 151 | 156 | ||
| 152 | sk_pop_free(safes, PKCS7_free); | 157 | sk_PKCS7_pop_free(safes, PKCS7_free); | 
| 153 | 158 | ||
| 154 | if(!PKCS12_set_mac (p12, pass, -1, NULL, 0, mac_iter, NULL)) | 159 | if(!PKCS12_set_mac (p12, pass, -1, NULL, 0, mac_iter, NULL)) | 
| 155 | return NULL; | 160 | return NULL; | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c index 4be44eac50..8cd7e2f414 100644 --- a/src/lib/libcrypto/pkcs12/p12_decr.c +++ b/src/lib/libcrypto/pkcs12/p12_decr.c | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | 65 | ||
| 66 | 66 | ||
| 67 | /* Encrypt/Decrypt a buffer based on password and algor, result in a | 67 | /* Encrypt/Decrypt a buffer based on password and algor, result in a | 
| 68 | * Malloc'ed buffer | 68 | * OPENSSL_malloc'ed buffer | 
| 69 | */ | 69 | */ | 
| 70 | 70 | ||
| 71 | unsigned char * PKCS12_pbe_crypt (X509_ALGOR *algor, const char *pass, | 71 | unsigned char * PKCS12_pbe_crypt (X509_ALGOR *algor, const char *pass, | 
| @@ -83,7 +83,7 @@ unsigned char * PKCS12_pbe_crypt (X509_ALGOR *algor, const char *pass, | |||
| 83 | return NULL; | 83 | return NULL; | 
| 84 | } | 84 | } | 
| 85 | 85 | ||
| 86 | if(!(out = Malloc (inlen + EVP_CIPHER_CTX_block_size(&ctx)))) { | 86 | if(!(out = OPENSSL_malloc (inlen + EVP_CIPHER_CTX_block_size(&ctx)))) { | 
| 87 | PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,ERR_R_MALLOC_FAILURE); | 87 | PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,ERR_R_MALLOC_FAILURE); | 
| 88 | return NULL; | 88 | return NULL; | 
| 89 | } | 89 | } | 
| @@ -91,7 +91,7 @@ unsigned char * PKCS12_pbe_crypt (X509_ALGOR *algor, const char *pass, | |||
| 91 | EVP_CipherUpdate (&ctx, out, &i, in, inlen); | 91 | EVP_CipherUpdate (&ctx, out, &i, in, inlen); | 
| 92 | outlen = i; | 92 | outlen = i; | 
| 93 | if(!EVP_CipherFinal (&ctx, out + i, &i)) { | 93 | if(!EVP_CipherFinal (&ctx, out + i, &i)) { | 
| 94 | Free (out); | 94 | OPENSSL_free (out); | 
| 95 | PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,PKCS12_R_PKCS12_CIPHERFINAL_ERROR); | 95 | PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,PKCS12_R_PKCS12_CIPHERFINAL_ERROR); | 
| 96 | return NULL; | 96 | return NULL; | 
| 97 | } | 97 | } | 
| @@ -109,7 +109,7 @@ unsigned char * PKCS12_pbe_crypt (X509_ALGOR *algor, const char *pass, | |||
| 109 | */ | 109 | */ | 
| 110 | 110 | ||
| 111 | char * PKCS12_decrypt_d2i (X509_ALGOR *algor, char * (*d2i)(), | 111 | char * PKCS12_decrypt_d2i (X509_ALGOR *algor, char * (*d2i)(), | 
| 112 | void (*free_func)(), const char *pass, int passlen, | 112 | void (*free_func)(void *), const char *pass, int passlen, | 
| 113 | ASN1_OCTET_STRING *oct, int seq) | 113 | ASN1_OCTET_STRING *oct, int seq) | 
| 114 | { | 114 | { | 
| 115 | unsigned char *out, *p; | 115 | unsigned char *out, *p; | 
| @@ -139,7 +139,7 @@ char * PKCS12_decrypt_d2i (X509_ALGOR *algor, char * (*d2i)(), | |||
| 139 | else ret = d2i(NULL, &p, outlen); | 139 | else ret = d2i(NULL, &p, outlen); | 
| 140 | if (seq & 2) memset(out, 0, outlen); | 140 | if (seq & 2) memset(out, 0, outlen); | 
| 141 | if(!ret) PKCS12err(PKCS12_F_PKCS12_DECRYPT_D2I,PKCS12_R_DECODE_ERROR); | 141 | if(!ret) PKCS12err(PKCS12_F_PKCS12_DECRYPT_D2I,PKCS12_R_DECODE_ERROR); | 
| 142 | Free (out); | 142 | OPENSSL_free (out); | 
| 143 | return ret; | 143 | return ret; | 
| 144 | } | 144 | } | 
| 145 | 145 | ||
| @@ -166,7 +166,7 @@ ASN1_OCTET_STRING *PKCS12_i2d_encrypt (X509_ALGOR *algor, int (*i2d)(), | |||
| 166 | PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,PKCS12_R_ENCODE_ERROR); | 166 | PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,PKCS12_R_ENCODE_ERROR); | 
| 167 | return NULL; | 167 | return NULL; | 
| 168 | } | 168 | } | 
| 169 | if (!(in = Malloc (inlen))) { | 169 | if (!(in = OPENSSL_malloc (inlen))) { | 
| 170 | PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,ERR_R_MALLOC_FAILURE); | 170 | PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,ERR_R_MALLOC_FAILURE); | 
| 171 | return NULL; | 171 | return NULL; | 
| 172 | } | 172 | } | 
| @@ -177,9 +177,11 @@ ASN1_OCTET_STRING *PKCS12_i2d_encrypt (X509_ALGOR *algor, int (*i2d)(), | |||
| 177 | if (!PKCS12_pbe_crypt (algor, pass, passlen, in, inlen, &oct->data, | 177 | if (!PKCS12_pbe_crypt (algor, pass, passlen, in, inlen, &oct->data, | 
| 178 | &oct->length, 1)) { | 178 | &oct->length, 1)) { | 
| 179 | PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,PKCS12_R_ENCRYPT_ERROR); | 179 | PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,PKCS12_R_ENCRYPT_ERROR); | 
| 180 | Free(in); | 180 | OPENSSL_free(in); | 
| 181 | return NULL; | 181 | return NULL; | 
| 182 | } | 182 | } | 
| 183 | Free (in); | 183 | OPENSSL_free (in); | 
| 184 | return oct; | 184 | return oct; | 
| 185 | } | 185 | } | 
| 186 | |||
| 187 | IMPLEMENT_PKCS12_STACK_OF(PKCS7) | ||
| diff --git a/src/lib/libcrypto/pkcs12/p12_key.c b/src/lib/libcrypto/pkcs12/p12_key.c index b364671ed2..b042dcf05c 100644 --- a/src/lib/libcrypto/pkcs12/p12_key.c +++ b/src/lib/libcrypto/pkcs12/p12_key.c | |||
| @@ -74,25 +74,30 @@ void h__dump (unsigned char *p, int len); | |||
| 74 | #define min(a,b) ((a) < (b) ? (a) : (b)) | 74 | #define min(a,b) ((a) < (b) ? (a) : (b)) | 
| 75 | #endif | 75 | #endif | 
| 76 | 76 | ||
| 77 | int PKCS12_key_gen_asc (const char *pass, int passlen, unsigned char *salt, | 77 | int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, | 
| 78 | int saltlen, int id, int iter, int n, unsigned char *out, | 78 | int saltlen, int id, int iter, int n, unsigned char *out, | 
| 79 | const EVP_MD *md_type) | 79 | const EVP_MD *md_type) | 
| 80 | { | 80 | { | 
| 81 | int ret; | 81 | int ret; | 
| 82 | unsigned char *unipass; | 82 | unsigned char *unipass; | 
| 83 | int uniplen; | 83 | int uniplen; | 
| 84 | if (!asc2uni (pass, &unipass, &uniplen)) { | 84 | if(!pass) { | 
| 85 | unipass = NULL; | ||
| 86 | uniplen = 0; | ||
| 87 | } else if (!asc2uni(pass, &unipass, &uniplen)) { | ||
| 85 | PKCS12err(PKCS12_F_PKCS12_KEY_GEN_ASC,ERR_R_MALLOC_FAILURE); | 88 | PKCS12err(PKCS12_F_PKCS12_KEY_GEN_ASC,ERR_R_MALLOC_FAILURE); | 
| 86 | return 0; | 89 | return 0; | 
| 87 | } | 90 | } | 
| 88 | ret = PKCS12_key_gen_uni (unipass, uniplen, salt, saltlen, | 91 | ret = PKCS12_key_gen_uni(unipass, uniplen, salt, saltlen, | 
| 89 | id, iter, n, out, md_type); | 92 | id, iter, n, out, md_type); | 
| 90 | memset(unipass, 0, uniplen); /* Clear password from memory */ | 93 | if(unipass) { | 
| 91 | Free(unipass); | 94 | memset(unipass, 0, uniplen); /* Clear password from memory */ | 
| 95 | OPENSSL_free(unipass); | ||
| 96 | } | ||
| 92 | return ret; | 97 | return ret; | 
| 93 | } | 98 | } | 
| 94 | 99 | ||
| 95 | int PKCS12_key_gen_uni (unsigned char *pass, int passlen, unsigned char *salt, | 100 | int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | 
| 96 | int saltlen, int id, int iter, int n, unsigned char *out, | 101 | int saltlen, int id, int iter, int n, unsigned char *out, | 
| 97 | const EVP_MD *md_type) | 102 | const EVP_MD *md_type) | 
| 98 | { | 103 | { | 
| @@ -106,10 +111,12 @@ int PKCS12_key_gen_uni (unsigned char *pass, int passlen, unsigned char *salt, | |||
| 106 | int tmpn = n; | 111 | int tmpn = n; | 
| 107 | #endif | 112 | #endif | 
| 108 | 113 | ||
| 114 | #if 0 | ||
| 109 | if (!pass) { | 115 | if (!pass) { | 
| 110 | PKCS12err(PKCS12_F_PKCS12_KEY_GEN_UNI,ERR_R_PASSED_NULL_PARAMETER); | 116 | PKCS12err(PKCS12_F_PKCS12_KEY_GEN_UNI,ERR_R_PASSED_NULL_PARAMETER); | 
| 111 | return 0; | 117 | return 0; | 
| 112 | } | 118 | } | 
| 119 | #endif | ||
| 113 | 120 | ||
| 114 | #ifdef DEBUG_KEYGEN | 121 | #ifdef DEBUG_KEYGEN | 
| 115 | fprintf(stderr, "KEYGEN DEBUG\n"); | 122 | fprintf(stderr, "KEYGEN DEBUG\n"); | 
| @@ -121,13 +128,14 @@ int PKCS12_key_gen_uni (unsigned char *pass, int passlen, unsigned char *salt, | |||
| 121 | #endif | 128 | #endif | 
| 122 | v = EVP_MD_block_size (md_type); | 129 | v = EVP_MD_block_size (md_type); | 
| 123 | u = EVP_MD_size (md_type); | 130 | u = EVP_MD_size (md_type); | 
| 124 | D = Malloc (v); | 131 | D = OPENSSL_malloc (v); | 
| 125 | Ai = Malloc (u); | 132 | Ai = OPENSSL_malloc (u); | 
| 126 | B = Malloc (v + 1); | 133 | B = OPENSSL_malloc (v + 1); | 
| 127 | Slen = v * ((saltlen+v-1)/v); | 134 | Slen = v * ((saltlen+v-1)/v); | 
| 128 | Plen = v * ((passlen+v-1)/v); | 135 | if(passlen) Plen = v * ((passlen+v-1)/v); | 
| 136 | else Plen = 0; | ||
| 129 | Ilen = Slen + Plen; | 137 | Ilen = Slen + Plen; | 
| 130 | I = Malloc (Ilen); | 138 | I = OPENSSL_malloc (Ilen); | 
| 131 | Ij = BN_new(); | 139 | Ij = BN_new(); | 
| 132 | Bpl1 = BN_new(); | 140 | Bpl1 = BN_new(); | 
| 133 | if (!D || !Ai || !B || !I || !Ij || !Bpl1) { | 141 | if (!D || !Ai || !B || !I || !Ij || !Bpl1) { | 
| @@ -150,10 +158,10 @@ int PKCS12_key_gen_uni (unsigned char *pass, int passlen, unsigned char *salt, | |||
| 150 | } | 158 | } | 
| 151 | memcpy (out, Ai, min (n, u)); | 159 | memcpy (out, Ai, min (n, u)); | 
| 152 | if (u >= n) { | 160 | if (u >= n) { | 
| 153 | Free (Ai); | 161 | OPENSSL_free (Ai); | 
| 154 | Free (B); | 162 | OPENSSL_free (B); | 
| 155 | Free (D); | 163 | OPENSSL_free (D); | 
| 156 | Free (I); | 164 | OPENSSL_free (I); | 
| 157 | BN_free (Ij); | 165 | BN_free (Ij); | 
| 158 | BN_free (Bpl1); | 166 | BN_free (Bpl1); | 
| 159 | #ifdef DEBUG_KEYGEN | 167 | #ifdef DEBUG_KEYGEN | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_kiss.c b/src/lib/libcrypto/pkcs12/p12_kiss.c index ee257ffbad..1fbbd6c99f 100644 --- a/src/lib/libcrypto/pkcs12/p12_kiss.c +++ b/src/lib/libcrypto/pkcs12/p12_kiss.c | |||
| @@ -65,9 +65,10 @@ | |||
| 65 | static int parse_pk12( PKCS12 *p12, const char *pass, int passlen, | 65 | static int parse_pk12( PKCS12 *p12, const char *pass, int passlen, | 
| 66 | EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca); | 66 | EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca); | 
| 67 | 67 | ||
| 68 | static int parse_bags( STACK *bags, const char *pass, int passlen, | 68 | static int parse_bags( STACK_OF(PKCS12_SAFEBAG) *bags, const char *pass, | 
| 69 | EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca, | 69 | int passlen, EVP_PKEY **pkey, X509 **cert, | 
| 70 | ASN1_OCTET_STRING **keyid, char *keymatch); | 70 | STACK_OF(X509) **ca, ASN1_OCTET_STRING **keyid, | 
| 71 | char *keymatch); | ||
| 71 | 72 | ||
| 72 | static int parse_bag( PKCS12_SAFEBAG *bag, const char *pass, int passlen, | 73 | static int parse_bag( PKCS12_SAFEBAG *bag, const char *pass, int passlen, | 
| 73 | EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca, | 74 | EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca, | 
| @@ -85,32 +86,41 @@ int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, | |||
| 85 | 86 | ||
| 86 | /* Check for NULL PKCS12 structure */ | 87 | /* Check for NULL PKCS12 structure */ | 
| 87 | 88 | ||
| 88 | if(!p12) | 89 | if(!p12) { | 
| 89 | { | ||
| 90 | PKCS12err(PKCS12_F_PKCS12_PARSE,PKCS12_R_INVALID_NULL_PKCS12_POINTER); | 90 | PKCS12err(PKCS12_F_PKCS12_PARSE,PKCS12_R_INVALID_NULL_PKCS12_POINTER); | 
| 91 | return 0; | 91 | return 0; | 
| 92 | } | 92 | } | 
| 93 | 93 | ||
| 94 | /* Allocate stack for ca certificates if needed */ | 94 | /* Allocate stack for ca certificates if needed */ | 
| 95 | if ((ca != NULL) && (*ca == NULL)) | 95 | if ((ca != NULL) && (*ca == NULL)) { | 
| 96 | { | 96 | if (!(*ca = sk_X509_new_null())) { | 
| 97 | if (!(*ca = sk_X509_new(NULL))) | ||
| 98 | { | ||
| 99 | PKCS12err(PKCS12_F_PKCS12_PARSE,ERR_R_MALLOC_FAILURE); | 97 | PKCS12err(PKCS12_F_PKCS12_PARSE,ERR_R_MALLOC_FAILURE); | 
| 100 | return 0; | 98 | return 0; | 
| 101 | } | ||
| 102 | } | 99 | } | 
| 100 | } | ||
| 103 | 101 | ||
| 104 | if(pkey) *pkey = NULL; | 102 | if(pkey) *pkey = NULL; | 
| 105 | if(cert) *cert = NULL; | 103 | if(cert) *cert = NULL; | 
| 106 | 104 | ||
| 107 | /* Check the mac */ | 105 | /* Check the mac */ | 
| 108 | 106 | ||
| 109 | if (!PKCS12_verify_mac (p12, pass, -1)) | 107 | /* If password is zero length or NULL then try verifying both cases | 
| 110 | { | 108 | * to determine which password is correct. The reason for this is that | 
| 109 | * under PKCS#12 password based encryption no password and a zero length | ||
| 110 | * password are two different things... | ||
| 111 | */ | ||
| 112 | |||
| 113 | if(!pass || !*pass) { | ||
| 114 | if(PKCS12_verify_mac(p12, NULL, 0)) pass = NULL; | ||
| 115 | else if(PKCS12_verify_mac(p12, "", 0)) pass = ""; | ||
| 116 | else { | ||
| 117 | PKCS12err(PKCS12_F_PKCS12_PARSE,PKCS12_R_MAC_VERIFY_FAILURE); | ||
| 118 | goto err; | ||
| 119 | } | ||
| 120 | } else if (!PKCS12_verify_mac(p12, pass, -1)) { | ||
| 111 | PKCS12err(PKCS12_F_PKCS12_PARSE,PKCS12_R_MAC_VERIFY_FAILURE); | 121 | PKCS12err(PKCS12_F_PKCS12_PARSE,PKCS12_R_MAC_VERIFY_FAILURE); | 
| 112 | goto err; | 122 | goto err; | 
| 113 | } | 123 | } | 
| 114 | 124 | ||
| 115 | if (!parse_pk12 (p12, pass, -1, pkey, cert, ca)) | 125 | if (!parse_pk12 (p12, pass, -1, pkey, cert, ca)) | 
| 116 | { | 126 | { | 
| @@ -122,9 +132,9 @@ int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, | |||
| 122 | 132 | ||
| 123 | err: | 133 | err: | 
| 124 | 134 | ||
| 125 | if (pkey && *pkey) EVP_PKEY_free (*pkey); | 135 | if (pkey && *pkey) EVP_PKEY_free(*pkey); | 
| 126 | if (cert && *cert) X509_free (*cert); | 136 | if (cert && *cert) X509_free(*cert); | 
| 127 | if (ca) sk_X509_pop_free (*ca, X509_free); | 137 | if (ca) sk_X509_pop_free(*ca, X509_free); | 
| 128 | return 0; | 138 | return 0; | 
| 129 | 139 | ||
| 130 | } | 140 | } | 
| @@ -134,45 +144,48 @@ int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, | |||
| 134 | static int parse_pk12 (PKCS12 *p12, const char *pass, int passlen, | 144 | static int parse_pk12 (PKCS12 *p12, const char *pass, int passlen, | 
| 135 | EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca) | 145 | EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca) | 
| 136 | { | 146 | { | 
| 137 | STACK *asafes, *bags; | 147 | STACK_OF(PKCS7) *asafes; | 
| 148 | STACK_OF(PKCS12_SAFEBAG) *bags; | ||
| 138 | int i, bagnid; | 149 | int i, bagnid; | 
| 139 | PKCS7 *p7; | 150 | PKCS7 *p7; | 
| 140 | ASN1_OCTET_STRING *keyid = NULL; | 151 | ASN1_OCTET_STRING *keyid = NULL; | 
| 152 | |||
| 141 | char keymatch = 0; | 153 | char keymatch = 0; | 
| 142 | if (!( asafes = M_PKCS12_unpack_authsafes (p12))) return 0; | 154 | if (!( asafes = M_PKCS12_unpack_authsafes (p12))) return 0; | 
| 143 | for (i = 0; i < sk_num (asafes); i++) { | 155 | for (i = 0; i < sk_PKCS7_num (asafes); i++) { | 
| 144 | p7 = (PKCS7 *) sk_value (asafes, i); | 156 | p7 = sk_PKCS7_value (asafes, i); | 
| 145 | bagnid = OBJ_obj2nid (p7->type); | 157 | bagnid = OBJ_obj2nid (p7->type); | 
| 146 | if (bagnid == NID_pkcs7_data) { | 158 | if (bagnid == NID_pkcs7_data) { | 
| 147 | bags = M_PKCS12_unpack_p7data (p7); | 159 | bags = M_PKCS12_unpack_p7data(p7); | 
| 148 | } else if (bagnid == NID_pkcs7_encrypted) { | 160 | } else if (bagnid == NID_pkcs7_encrypted) { | 
| 149 | bags = M_PKCS12_unpack_p7encdata (p7, pass, passlen); | 161 | bags = M_PKCS12_unpack_p7encdata(p7, pass, passlen); | 
| 150 | } else continue; | 162 | } else continue; | 
| 151 | if (!bags) { | 163 | if (!bags) { | 
| 152 | sk_pop_free (asafes, PKCS7_free); | 164 | sk_PKCS7_pop_free(asafes, PKCS7_free); | 
| 153 | return 0; | 165 | return 0; | 
| 154 | } | 166 | } | 
| 155 | if (!parse_bags(bags, pass, passlen, pkey, cert, ca, | 167 | if (!parse_bags(bags, pass, passlen, pkey, cert, ca, | 
| 156 | &keyid, &keymatch)) { | 168 | &keyid, &keymatch)) { | 
| 157 | sk_pop_free(bags, PKCS12_SAFEBAG_free); | 169 | sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); | 
| 158 | sk_pop_free(asafes, PKCS7_free); | 170 | sk_PKCS7_pop_free(asafes, PKCS7_free); | 
| 159 | return 0; | 171 | return 0; | 
| 160 | } | 172 | } | 
| 161 | sk_pop_free(bags, PKCS12_SAFEBAG_free); | 173 | sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); | 
| 162 | } | 174 | } | 
| 163 | sk_pop_free(asafes, PKCS7_free); | 175 | sk_PKCS7_pop_free(asafes, PKCS7_free); | 
| 164 | if (keyid) M_ASN1_OCTET_STRING_free(keyid); | 176 | if (keyid) M_ASN1_OCTET_STRING_free(keyid); | 
| 165 | return 1; | 177 | return 1; | 
| 166 | } | 178 | } | 
| 167 | 179 | ||
| 168 | 180 | ||
| 169 | static int parse_bags (STACK *bags, const char *pass, int passlen, | 181 | static int parse_bags (STACK_OF(PKCS12_SAFEBAG) *bags, const char *pass, | 
| 170 | EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca, | 182 | int passlen, EVP_PKEY **pkey, X509 **cert, | 
| 171 | ASN1_OCTET_STRING **keyid, char *keymatch) | 183 | STACK_OF(X509) **ca, ASN1_OCTET_STRING **keyid, | 
| 184 | char *keymatch) | ||
| 172 | { | 185 | { | 
| 173 | int i; | 186 | int i; | 
| 174 | for (i = 0; i < sk_num(bags); i++) { | 187 | for (i = 0; i < sk_PKCS12_SAFEBAG_num(bags); i++) { | 
| 175 | if (!parse_bag((PKCS12_SAFEBAG *)sk_value (bags, i), | 188 | if (!parse_bag(sk_PKCS12_SAFEBAG_value (bags, i), | 
| 176 | pass, passlen, pkey, cert, ca, keyid, | 189 | pass, passlen, pkey, cert, ca, keyid, | 
| 177 | keymatch)) return 0; | 190 | keymatch)) return 0; | 
| 178 | } | 191 | } | 
| @@ -190,12 +203,17 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, | |||
| 190 | { | 203 | { | 
| 191 | PKCS8_PRIV_KEY_INFO *p8; | 204 | PKCS8_PRIV_KEY_INFO *p8; | 
| 192 | X509 *x509; | 205 | X509 *x509; | 
| 193 | ASN1_OCTET_STRING *lkey = NULL; | 206 | ASN1_OCTET_STRING *lkey = NULL, *ckid = NULL; | 
| 194 | ASN1_TYPE *attrib; | 207 | ASN1_TYPE *attrib; | 
| 208 | ASN1_BMPSTRING *fname = NULL; | ||
| 195 | 209 | ||
| 210 | if ((attrib = PKCS12_get_attr (bag, NID_friendlyName))) | ||
| 211 | fname = attrib->value.bmpstring; | ||
| 196 | 212 | ||
| 197 | if ((attrib = PKCS12_get_attr (bag, NID_localKeyID))) | 213 | if ((attrib = PKCS12_get_attr (bag, NID_localKeyID))) { | 
| 198 | lkey = attrib->value.octet_string; | 214 | lkey = attrib->value.octet_string; | 
| 215 | ckid = lkey; | ||
| 216 | } | ||
| 199 | 217 | ||
| 200 | /* Check for any local key id matching (if needed) */ | 218 | /* Check for any local key id matching (if needed) */ | 
| 201 | if (lkey && ((*keymatch & MATCH_ALL) != MATCH_ALL)) { | 219 | if (lkey && ((*keymatch & MATCH_ALL) != MATCH_ALL)) { | 
| @@ -231,6 +249,18 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, | |||
| 231 | if (M_PKCS12_cert_bag_type(bag) != NID_x509Certificate ) | 249 | if (M_PKCS12_cert_bag_type(bag) != NID_x509Certificate ) | 
| 232 | return 1; | 250 | return 1; | 
| 233 | if (!(x509 = M_PKCS12_certbag2x509(bag))) return 0; | 251 | if (!(x509 = M_PKCS12_certbag2x509(bag))) return 0; | 
| 252 | if(ckid) X509_keyid_set1(x509, ckid->data, ckid->length); | ||
| 253 | if(fname) { | ||
| 254 | int len; | ||
| 255 | unsigned char *data; | ||
| 256 | len = ASN1_STRING_to_UTF8(&data, fname); | ||
| 257 | if(len > 0) { | ||
| 258 | X509_alias_set1(x509, data, len); | ||
| 259 | OPENSSL_free(data); | ||
| 260 | } | ||
| 261 | } | ||
| 262 | |||
| 263 | |||
| 234 | if (lkey) { | 264 | if (lkey) { | 
| 235 | *keymatch |= MATCH_CERT; | 265 | *keymatch |= MATCH_CERT; | 
| 236 | if (cert) *cert = x509; | 266 | if (cert) *cert = x509; | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_lib.c b/src/lib/libcrypto/pkcs12/p12_lib.c index 7ca9c14908..7d464e3a32 100644 --- a/src/lib/libcrypto/pkcs12/p12_lib.c +++ b/src/lib/libcrypto/pkcs12/p12_lib.c | |||
| @@ -107,5 +107,5 @@ void PKCS12_free (PKCS12 *a) | |||
| 107 | M_ASN1_INTEGER_free(a->version); | 107 | M_ASN1_INTEGER_free(a->version); | 
| 108 | PKCS12_MAC_DATA_free (a->mac); | 108 | PKCS12_MAC_DATA_free (a->mac); | 
| 109 | PKCS7_free (a->authsafes); | 109 | PKCS7_free (a->authsafes); | 
| 110 | Free (a); | 110 | OPENSSL_free (a); | 
| 111 | } | 111 | } | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_mac.c b/src/lib/libcrypto/pkcs12/p12_mac.c index f5ab0d6464..fbd1eca24f 100644 --- a/src/lib/libcrypto/pkcs12/p12_mac.c +++ b/src/lib/libcrypto/pkcs12/p12_mac.c | |||
| @@ -106,5 +106,5 @@ void PKCS12_MAC_DATA_free (PKCS12_MAC_DATA *a) | |||
| 106 | X509_SIG_free (a->dinfo); | 106 | X509_SIG_free (a->dinfo); | 
| 107 | M_ASN1_OCTET_STRING_free(a->salt); | 107 | M_ASN1_OCTET_STRING_free(a->salt); | 
| 108 | M_ASN1_INTEGER_free(a->iter); | 108 | M_ASN1_INTEGER_free(a->iter); | 
| 109 | Free (a); | 109 | OPENSSL_free (a); | 
| 110 | } | 110 | } | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c index 369257ed4c..13d866da51 100644 --- a/src/lib/libcrypto/pkcs12/p12_mutl.c +++ b/src/lib/libcrypto/pkcs12/p12_mutl.c | |||
| @@ -106,10 +106,7 @@ int PKCS12_verify_mac (PKCS12 *p12, const char *pass, int passlen) | |||
| 106 | return 0; | 106 | return 0; | 
| 107 | } | 107 | } | 
| 108 | if ((maclen != (unsigned int)p12->mac->dinfo->digest->length) | 108 | if ((maclen != (unsigned int)p12->mac->dinfo->digest->length) | 
| 109 | || memcmp (mac, p12->mac->dinfo->digest->data, maclen)) { | 109 | || memcmp (mac, p12->mac->dinfo->digest->data, maclen)) return 0; | 
| 110 | PKCS12err(PKCS12_F_VERIFY_MAC,PKCS12_R_MAC_VERIFY_ERROR); | ||
| 111 | return 0; | ||
| 112 | } | ||
| 113 | return 1; | 110 | return 1; | 
| 114 | } | 111 | } | 
| 115 | 112 | ||
| @@ -152,7 +149,7 @@ int PKCS12_setup_mac (PKCS12 *p12, int iter, unsigned char *salt, int saltlen, | |||
| 152 | } | 149 | } | 
| 153 | if (!saltlen) saltlen = PKCS12_SALT_LEN; | 150 | if (!saltlen) saltlen = PKCS12_SALT_LEN; | 
| 154 | p12->mac->salt->length = saltlen; | 151 | p12->mac->salt->length = saltlen; | 
| 155 | if (!(p12->mac->salt->data = Malloc (saltlen))) { | 152 | if (!(p12->mac->salt->data = OPENSSL_malloc (saltlen))) { | 
| 156 | PKCS12err(PKCS12_F_PKCS12_SETUP_MAC, ERR_R_MALLOC_FAILURE); | 153 | PKCS12err(PKCS12_F_PKCS12_SETUP_MAC, ERR_R_MALLOC_FAILURE); | 
| 157 | return 0; | 154 | return 0; | 
| 158 | } | 155 | } | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_npas.c b/src/lib/libcrypto/pkcs12/p12_npas.c index ee71707e2c..84e31a7f21 100644 --- a/src/lib/libcrypto/pkcs12/p12_npas.c +++ b/src/lib/libcrypto/pkcs12/p12_npas.c | |||
| @@ -66,7 +66,8 @@ | |||
| 66 | /* PKCS#12 password change routine */ | 66 | /* PKCS#12 password change routine */ | 
| 67 | 67 | ||
| 68 | static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass); | 68 | static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass); | 
| 69 | static int newpass_bags(STACK *bags, char *oldpass, char *newpass); | 69 | static int newpass_bags(STACK_OF(PKCS12_SAFEBAG) *bags, char *oldpass, | 
| 70 | char *newpass); | ||
| 70 | static int newpass_bag(PKCS12_SAFEBAG *bag, char *oldpass, char *newpass); | 71 | static int newpass_bag(PKCS12_SAFEBAG *bag, char *oldpass, char *newpass); | 
| 71 | static int alg_get(X509_ALGOR *alg, int *pnid, int *piter, int *psaltlen); | 72 | static int alg_get(X509_ALGOR *alg, int *pnid, int *piter, int *psaltlen); | 
| 72 | 73 | ||
| @@ -104,16 +105,18 @@ return 1; | |||
| 104 | 105 | ||
| 105 | static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass) | 106 | static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass) | 
| 106 | { | 107 | { | 
| 107 | STACK *asafes, *newsafes, *bags; | 108 | STACK_OF(PKCS7) *asafes, *newsafes; | 
| 109 | STACK_OF(PKCS12_SAFEBAG) *bags; | ||
| 108 | int i, bagnid, pbe_nid, pbe_iter, pbe_saltlen; | 110 | int i, bagnid, pbe_nid, pbe_iter, pbe_saltlen; | 
| 109 | PKCS7 *p7, *p7new; | 111 | PKCS7 *p7, *p7new; | 
| 110 | ASN1_OCTET_STRING *p12_data_tmp = NULL, *macnew = NULL; | 112 | ASN1_OCTET_STRING *p12_data_tmp = NULL, *macnew = NULL; | 
| 111 | unsigned char mac[EVP_MAX_MD_SIZE]; | 113 | unsigned char mac[EVP_MAX_MD_SIZE]; | 
| 112 | unsigned int maclen; | 114 | unsigned int maclen; | 
| 115 | |||
| 113 | if (!(asafes = M_PKCS12_unpack_authsafes(p12))) return 0; | 116 | if (!(asafes = M_PKCS12_unpack_authsafes(p12))) return 0; | 
| 114 | if(!(newsafes = sk_new(NULL))) return 0; | 117 | if(!(newsafes = sk_PKCS7_new_null())) return 0; | 
| 115 | for (i = 0; i < sk_num (asafes); i++) { | 118 | for (i = 0; i < sk_PKCS7_num (asafes); i++) { | 
| 116 | p7 = (PKCS7 *) sk_value(asafes, i); | 119 | p7 = sk_PKCS7_value(asafes, i); | 
| 117 | bagnid = OBJ_obj2nid(p7->type); | 120 | bagnid = OBJ_obj2nid(p7->type); | 
| 118 | if (bagnid == NID_pkcs7_data) { | 121 | if (bagnid == NID_pkcs7_data) { | 
| 119 | bags = M_PKCS12_unpack_p7data(p7); | 122 | bags = M_PKCS12_unpack_p7data(p7); | 
| @@ -123,26 +126,26 @@ static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass) | |||
| 123 | &pbe_nid, &pbe_iter, &pbe_saltlen); | 126 | &pbe_nid, &pbe_iter, &pbe_saltlen); | 
| 124 | } else continue; | 127 | } else continue; | 
| 125 | if (!bags) { | 128 | if (!bags) { | 
| 126 | sk_pop_free(asafes, PKCS7_free); | 129 | sk_PKCS7_pop_free(asafes, PKCS7_free); | 
| 127 | return 0; | 130 | return 0; | 
| 128 | } | 131 | } | 
| 129 | if (!newpass_bags(bags, oldpass, newpass)) { | 132 | if (!newpass_bags(bags, oldpass, newpass)) { | 
| 130 | sk_pop_free(bags, PKCS12_SAFEBAG_free); | 133 | sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); | 
| 131 | sk_pop_free(asafes, PKCS7_free); | 134 | sk_PKCS7_pop_free(asafes, PKCS7_free); | 
| 132 | return 0; | 135 | return 0; | 
| 133 | } | 136 | } | 
| 134 | /* Repack bag in same form with new password */ | 137 | /* Repack bag in same form with new password */ | 
| 135 | if (bagnid == NID_pkcs7_data) p7new = PKCS12_pack_p7data(bags); | 138 | if (bagnid == NID_pkcs7_data) p7new = PKCS12_pack_p7data(bags); | 
| 136 | else p7new = PKCS12_pack_p7encdata(pbe_nid, newpass, -1, NULL, | 139 | else p7new = PKCS12_pack_p7encdata(pbe_nid, newpass, -1, NULL, | 
| 137 | pbe_saltlen, pbe_iter, bags); | 140 | pbe_saltlen, pbe_iter, bags); | 
| 138 | sk_pop_free(bags, PKCS12_SAFEBAG_free); | 141 | sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); | 
| 139 | if(!p7new) { | 142 | if(!p7new) { | 
| 140 | sk_pop_free(asafes, PKCS7_free); | 143 | sk_PKCS7_pop_free(asafes, PKCS7_free); | 
| 141 | return 0; | 144 | return 0; | 
| 142 | } | 145 | } | 
| 143 | sk_push(newsafes, (char *)p7new); | 146 | sk_PKCS7_push(newsafes, p7new); | 
| 144 | } | 147 | } | 
| 145 | sk_pop_free(asafes, PKCS7_free); | 148 | sk_PKCS7_pop_free(asafes, PKCS7_free); | 
| 146 | 149 | ||
| 147 | /* Repack safe: save old safe in case of error */ | 150 | /* Repack safe: save old safe in case of error */ | 
| 148 | 151 | ||
| @@ -169,12 +172,14 @@ static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass) | |||
| 169 | } | 172 | } | 
| 170 | 173 | ||
| 171 | 174 | ||
| 172 | static int newpass_bags(STACK *bags, char *oldpass, char *newpass) | 175 | static int newpass_bags(STACK_OF(PKCS12_SAFEBAG) *bags, char *oldpass, | 
| 176 | char *newpass) | ||
| 173 | { | 177 | { | 
| 174 | int i; | 178 | int i; | 
| 175 | for (i = 0; i < sk_num(bags); i++) { | 179 | for (i = 0; i < sk_PKCS12_SAFEBAG_num(bags); i++) { | 
| 176 | if (!newpass_bag((PKCS12_SAFEBAG *)sk_value(bags, i), | 180 | if (!newpass_bag(sk_PKCS12_SAFEBAG_value(bags, i), | 
| 177 | oldpass, newpass)) return 0; | 181 | oldpass, newpass)) | 
| 182 | return 0; | ||
| 178 | } | 183 | } | 
| 179 | return 1; | 184 | return 1; | 
| 180 | } | 185 | } | 
| diff --git a/src/lib/libcrypto/pkcs12/p12_sbag.c b/src/lib/libcrypto/pkcs12/p12_sbag.c index 1b3addece1..64ac32ee6f 100644 --- a/src/lib/libcrypto/pkcs12/p12_sbag.c +++ b/src/lib/libcrypto/pkcs12/p12_sbag.c | |||
| @@ -81,8 +81,9 @@ int i2d_PKCS12_SAFEBAG(PKCS12_SAFEBAG *a, unsigned char **pp) | |||
| 81 | break; | 81 | break; | 
| 82 | 82 | ||
| 83 | case NID_safeContentsBag: | 83 | case NID_safeContentsBag: | 
| 84 | M_ASN1_I2D_len_EXP_SEQUENCE_opt (a->value.safes, | 84 | M_ASN1_I2D_len_EXP_SEQUENCE_opt_type | 
| 85 | i2d_PKCS12_SAFEBAG, 0, V_ASN1_SEQUENCE, v); | 85 | (PKCS12_SAFEBAG, a->value.safes, i2d_PKCS12_SAFEBAG, | 
| 86 | 0, V_ASN1_SEQUENCE, v); | ||
| 86 | break; | 87 | break; | 
| 87 | 88 | ||
| 88 | case NID_certBag: | 89 | case NID_certBag: | 
| @@ -117,8 +118,9 @@ int i2d_PKCS12_SAFEBAG(PKCS12_SAFEBAG *a, unsigned char **pp) | |||
| 117 | break; | 118 | break; | 
| 118 | 119 | ||
| 119 | case NID_safeContentsBag: | 120 | case NID_safeContentsBag: | 
| 120 | M_ASN1_I2D_put_EXP_SEQUENCE_opt (a->value.safes, | 121 | M_ASN1_I2D_put_EXP_SEQUENCE_opt_type | 
| 121 | i2d_PKCS12_SAFEBAG, 0, V_ASN1_SEQUENCE, v); | 122 | (PKCS12_SAFEBAG, a->value.safes, i2d_PKCS12_SAFEBAG, | 
| 123 | 0, V_ASN1_SEQUENCE, v); | ||
| 122 | break; | 124 | break; | 
| 123 | 125 | ||
| 124 | case NID_certBag: | 126 | case NID_certBag: | 
| @@ -175,9 +177,10 @@ PKCS12_SAFEBAG *d2i_PKCS12_SAFEBAG(PKCS12_SAFEBAG **a, unsigned char **pp, | |||
| 175 | break; | 177 | break; | 
| 176 | 178 | ||
| 177 | case NID_safeContentsBag: | 179 | case NID_safeContentsBag: | 
| 178 | M_ASN1_D2I_get_EXP_set_opt(ret->value.safes, | 180 | M_ASN1_D2I_get_EXP_set_opt_type | 
| 179 | d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free, | 181 | (PKCS12_SAFEBAG, ret->value.safes, | 
| 180 | 0, V_ASN1_SEQUENCE); | 182 | d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free, 0, | 
| 183 | V_ASN1_SEQUENCE); | ||
| 181 | break; | 184 | break; | 
| 182 | 185 | ||
| 183 | case NID_certBag: | 186 | case NID_certBag: | 
| @@ -223,5 +226,9 @@ void PKCS12_SAFEBAG_free (PKCS12_SAFEBAG *a) | |||
| 223 | 226 | ||
| 224 | ASN1_OBJECT_free (a->type); | 227 | ASN1_OBJECT_free (a->type); | 
| 225 | sk_X509_ATTRIBUTE_pop_free (a->attrib, X509_ATTRIBUTE_free); | 228 | sk_X509_ATTRIBUTE_pop_free (a->attrib, X509_ATTRIBUTE_free); | 
| 226 | Free (a); | 229 | OPENSSL_free (a); | 
| 227 | } | 230 | } | 
| 231 | |||
| 232 | IMPLEMENT_STACK_OF(PKCS12_SAFEBAG) | ||
| 233 | IMPLEMENT_ASN1_SET_OF(PKCS12_SAFEBAG) | ||
| 234 | IMPLEMENT_PKCS12_STACK_OF(PKCS12_SAFEBAG) | ||
| diff --git a/src/lib/libcrypto/pkcs12/p12_utl.c b/src/lib/libcrypto/pkcs12/p12_utl.c index 2adcbc95e1..17f41b4549 100644 --- a/src/lib/libcrypto/pkcs12/p12_utl.c +++ b/src/lib/libcrypto/pkcs12/p12_utl.c | |||
| @@ -67,7 +67,7 @@ unsigned char *asc2uni (const char *asc, unsigned char **uni, int *unilen) | |||
| 67 | int ulen, i; | 67 | int ulen, i; | 
| 68 | unsigned char *unitmp; | 68 | unsigned char *unitmp; | 
| 69 | ulen = strlen(asc)*2 + 2; | 69 | ulen = strlen(asc)*2 + 2; | 
| 70 | if (!(unitmp = Malloc (ulen))) return NULL; | 70 | if (!(unitmp = OPENSSL_malloc (ulen))) return NULL; | 
| 71 | for (i = 0; i < ulen; i+=2) { | 71 | for (i = 0; i < ulen; i+=2) { | 
| 72 | unitmp[i] = 0; | 72 | unitmp[i] = 0; | 
| 73 | unitmp[i + 1] = asc[i>>1]; | 73 | unitmp[i + 1] = asc[i>>1]; | 
| @@ -85,7 +85,7 @@ char *uni2asc (unsigned char *uni, int unilen) | |||
| 85 | /* If no terminating zero allow for one */ | 85 | /* If no terminating zero allow for one */ | 
| 86 | if (uni[unilen - 1]) asclen++; | 86 | if (uni[unilen - 1]) asclen++; | 
| 87 | uni++; | 87 | uni++; | 
| 88 | if (!(asctmp = Malloc (asclen))) return NULL; | 88 | if (!(asctmp = OPENSSL_malloc (asclen))) return NULL; | 
| 89 | for (i = 0; i < unilen; i+=2) asctmp[i>>1] = uni[i]; | 89 | for (i = 0; i < unilen; i+=2) asctmp[i>>1] = uni[i]; | 
| 90 | asctmp[asclen - 1] = 0; | 90 | asctmp[asclen - 1] = 0; | 
| 91 | return asctmp; | 91 | return asctmp; | 
| diff --git a/src/lib/libcrypto/pkcs12/pkcs12.h b/src/lib/libcrypto/pkcs12/pkcs12.h index dad356c00f..502fceff95 100644 --- a/src/lib/libcrypto/pkcs12/pkcs12.h +++ b/src/lib/libcrypto/pkcs12/pkcs12.h | |||
| @@ -59,13 +59,13 @@ | |||
| 59 | #ifndef HEADER_PKCS12_H | 59 | #ifndef HEADER_PKCS12_H | 
| 60 | #define HEADER_PKCS12_H | 60 | #define HEADER_PKCS12_H | 
| 61 | 61 | ||
| 62 | #include <openssl/bio.h> | ||
| 63 | #include <openssl/x509.h> | ||
| 64 | |||
| 62 | #ifdef __cplusplus | 65 | #ifdef __cplusplus | 
| 63 | extern "C" { | 66 | extern "C" { | 
| 64 | #endif | 67 | #endif | 
| 65 | 68 | ||
| 66 | #include <openssl/bio.h> | ||
| 67 | #include <openssl/x509.h> | ||
| 68 | |||
| 69 | #define PKCS12_KEY_ID 1 | 69 | #define PKCS12_KEY_ID 1 | 
| 70 | #define PKCS12_IV_ID 2 | 70 | #define PKCS12_IV_ID 2 | 
| 71 | #define PKCS12_MAC_ID 3 | 71 | #define PKCS12_MAC_ID 3 | 
| @@ -108,19 +108,25 @@ PKCS12_MAC_DATA *mac; | |||
| 108 | PKCS7 *authsafes; | 108 | PKCS7 *authsafes; | 
| 109 | } PKCS12; | 109 | } PKCS12; | 
| 110 | 110 | ||
| 111 | PREDECLARE_STACK_OF(PKCS12_SAFEBAG) | ||
| 112 | |||
| 111 | typedef struct { | 113 | typedef struct { | 
| 112 | ASN1_OBJECT *type; | 114 | ASN1_OBJECT *type; | 
| 113 | union { | 115 | union { | 
| 114 | struct pkcs12_bag_st *bag; /* secret, crl and certbag */ | 116 | struct pkcs12_bag_st *bag; /* secret, crl and certbag */ | 
| 115 | struct pkcs8_priv_key_info_st *keybag; /* keybag */ | 117 | struct pkcs8_priv_key_info_st *keybag; /* keybag */ | 
| 116 | X509_SIG *shkeybag; /* shrouded key bag */ | 118 | X509_SIG *shkeybag; /* shrouded key bag */ | 
| 117 | STACK /* PKCS12_SAFEBAG */ *safes; | 119 | STACK_OF(PKCS12_SAFEBAG) *safes; | 
| 118 | ASN1_TYPE *other; | 120 | ASN1_TYPE *other; | 
| 119 | }value; | 121 | }value; | 
| 120 | STACK_OF(X509_ATTRIBUTE) *attrib; | 122 | STACK_OF(X509_ATTRIBUTE) *attrib; | 
| 121 | ASN1_TYPE *rest; | 123 | ASN1_TYPE *rest; | 
| 122 | } PKCS12_SAFEBAG; | 124 | } PKCS12_SAFEBAG; | 
| 123 | 125 | ||
| 126 | DECLARE_STACK_OF(PKCS12_SAFEBAG) | ||
| 127 | DECLARE_ASN1_SET_OF(PKCS12_SAFEBAG) | ||
| 128 | DECLARE_PKCS12_STACK_OF(PKCS12_SAFEBAG) | ||
| 129 | |||
| 124 | typedef struct pkcs12_bag_st { | 130 | typedef struct pkcs12_bag_st { | 
| 125 | ASN1_OBJECT *type; | 131 | ASN1_OBJECT *type; | 
| 126 | union { | 132 | union { | 
| @@ -140,50 +146,49 @@ union { | |||
| 140 | #define M_PKCS12_crl_bag_type M_PKCS12_cert_bag_type | 146 | #define M_PKCS12_crl_bag_type M_PKCS12_cert_bag_type | 
| 141 | 147 | ||
| 142 | #define M_PKCS12_x5092certbag(x509) \ | 148 | #define M_PKCS12_x5092certbag(x509) \ | 
| 143 | PKCS12_pack_safebag ((char *)(x509), i2d_X509, NID_x509Certificate, NID_certBag) | 149 | PKCS12_pack_safebag((char *)(x509), i2d_X509, NID_x509Certificate, NID_certBag) | 
| 144 | 150 | ||
| 145 | #define M_PKCS12_x509crl2certbag(crl) \ | 151 | #define M_PKCS12_x509crl2certbag(crl) \ | 
| 146 | PKCS12_pack_safebag ((char *)(crl), i2d_X509CRL, NID_x509Crl, NID_crlBag) | 152 | PKCS12_pack_safebag((char *)(crl), i2d_X509CRL, NID_x509Crl, NID_crlBag) | 
| 147 | 153 | ||
| 148 | #define M_PKCS12_certbag2x509(bg) \ | 154 | #define M_PKCS12_certbag2x509(bg) \ | 
| 149 | (X509 *) ASN1_unpack_string ((bg)->value.bag->value.octet, \ | 155 | (X509 *) ASN1_unpack_string((bg)->value.bag->value.octet, \ | 
| 150 | (char *(*)())d2i_X509) | 156 | (char *(*)())d2i_X509) | 
| 151 | 157 | ||
| 152 | #define M_PKCS12_certbag2x509crl(bg) \ | 158 | #define M_PKCS12_certbag2x509crl(bg) \ | 
| 153 | (X509CRL *) ASN1_unpack_string ((bg)->value.bag->value.octet, \ | 159 | (X509CRL *) ASN1_unpack_string((bg)->value.bag->value.octet, \ | 
| 154 | (char *(*)())d2i_X509CRL) | 160 | (char *(*)())d2i_X509CRL) | 
| 155 | 161 | ||
| 156 | /*#define M_PKCS12_pkcs82rsa(p8) \ | 162 | /*#define M_PKCS12_pkcs82rsa(p8) \ | 
| 157 | (RSA *) ASN1_unpack_string ((p8)->pkey, (char *(*)())d2i_RSAPrivateKey)*/ | 163 | (RSA *) ASN1_unpack_string((p8)->pkey, (char *(*)())d2i_RSAPrivateKey)*/ | 
| 158 | 164 | ||
| 159 | #define M_PKCS12_unpack_p7data(p7) \ | 165 | #define M_PKCS12_unpack_p7data(p7) \ | 
| 160 | ASN1_seq_unpack ((p7)->d.data->data, p7->d.data->length, \ | 166 | ASN1_seq_unpack_PKCS12_SAFEBAG((p7)->d.data->data, p7->d.data->length, \ | 
| 161 | (char *(*)())d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free) | 167 | d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free) | 
| 162 | 168 | ||
| 163 | #define M_PKCS12_pack_authsafes(p12, safes) \ | 169 | #define M_PKCS12_pack_authsafes(p12, safes) \ | 
| 164 | ASN1_seq_pack((safes), (int (*)())i2d_PKCS7,\ | 170 | ASN1_seq_pack_PKCS7((safes), i2d_PKCS7,\ | 
| 165 | &(p12)->authsafes->d.data->data, &(p12)->authsafes->d.data->length) | 171 | &(p12)->authsafes->d.data->data, &(p12)->authsafes->d.data->length) | 
| 166 | 172 | ||
| 167 | #define M_PKCS12_unpack_authsafes(p12) \ | 173 | #define M_PKCS12_unpack_authsafes(p12) \ | 
| 168 | ASN1_seq_unpack((p12)->authsafes->d.data->data, \ | 174 | ASN1_seq_unpack_PKCS7((p12)->authsafes->d.data->data, \ | 
| 169 | (p12)->authsafes->d.data->length, (char *(*)())d2i_PKCS7, \ | 175 | (p12)->authsafes->d.data->length, d2i_PKCS7, PKCS7_free) | 
| 170 | PKCS7_free) | ||
| 171 | 176 | ||
| 172 | #define M_PKCS12_unpack_p7encdata(p7, pass, passlen) \ | 177 | #define M_PKCS12_unpack_p7encdata(p7, pass, passlen) \ | 
| 173 | (STACK *) PKCS12_decrypt_d2i ((p7)->d.encrypted->enc_data->algorithm,\ | 178 | PKCS12_decrypt_d2i_PKCS12_SAFEBAG((p7)->d.encrypted->enc_data->algorithm,\ | 
| 174 | (char *(*)())d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free, \ | 179 | d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free, \ | 
| 175 | (pass), (passlen), \ | 180 | (pass), (passlen), \ | 
| 176 | (p7)->d.encrypted->enc_data->enc_data, 3) | 181 | (p7)->d.encrypted->enc_data->enc_data, 3) | 
| 177 | 182 | ||
| 178 | #define M_PKCS12_decrypt_skey(bag, pass, passlen) \ | 183 | #define M_PKCS12_decrypt_skey(bag, pass, passlen) \ | 
| 179 | (PKCS8_PRIV_KEY_INFO *) PKCS12_decrypt_d2i ((bag)->value.shkeybag->algor, \ | 184 | (PKCS8_PRIV_KEY_INFO *) PKCS12_decrypt_d2i((bag)->value.shkeybag->algor, \ | 
| 180 | (char *(*)())d2i_PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_free, \ | 185 | (char *(*)())d2i_PKCS8_PRIV_KEY_INFO, (void (*)(void *))PKCS8_PRIV_KEY_INFO_free, \ | 
| 181 | (pass), (passlen), \ | 186 | (pass), (passlen), \ | 
| 182 | (bag)->value.shkeybag->digest, 2) | 187 | (bag)->value.shkeybag->digest, 2) | 
| 183 | 188 | ||
| 184 | #define M_PKCS8_decrypt(p8, pass, passlen) \ | 189 | #define M_PKCS8_decrypt(p8, pass, passlen) \ | 
| 185 | (PKCS8_PRIV_KEY_INFO *) PKCS12_decrypt_d2i ((p8)->algor, \ | 190 | (PKCS8_PRIV_KEY_INFO *) PKCS12_decrypt_d2i((p8)->algor, \ | 
| 186 | (char *(*)())d2i_PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_free,\ | 191 | (char *(*)())d2i_PKCS8_PRIV_KEY_INFO, (void (*)(void *))PKCS8_PRIV_KEY_INFO_free,\ | 
| 187 | (pass), (passlen), (p8)->digest, 2) | 192 | (pass), (passlen), (p8)->digest, 2) | 
| 188 | 193 | ||
| 189 | #define PKCS12_get_attr(bag, attr_nid) \ | 194 | #define PKCS12_get_attr(bag, attr_nid) \ | 
| @@ -205,10 +210,10 @@ PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG(int pbe_nid, const char *pass, | |||
| 205 | int passlen, unsigned char *salt, | 210 | int passlen, unsigned char *salt, | 
| 206 | int saltlen, int iter, | 211 | int saltlen, int iter, | 
| 207 | PKCS8_PRIV_KEY_INFO *p8); | 212 | PKCS8_PRIV_KEY_INFO *p8); | 
| 208 | PKCS7 *PKCS12_pack_p7data(STACK *sk); | 213 | PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk); | 
| 209 | PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, | 214 | PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, | 
| 210 | unsigned char *salt, int saltlen, int iter, | 215 | unsigned char *salt, int saltlen, int iter, | 
| 211 | STACK *bags); | 216 | STACK_OF(PKCS12_SAFEBAG) *bags); | 
| 212 | int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen); | 217 | int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen); | 
| 213 | int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name, | 218 | int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name, | 
| 214 | int namelen); | 219 | int namelen); | 
| @@ -221,7 +226,7 @@ unsigned char *PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass, | |||
| 221 | int passlen, unsigned char *in, int inlen, | 226 | int passlen, unsigned char *in, int inlen, | 
| 222 | unsigned char **data, int *datalen, int en_de); | 227 | unsigned char **data, int *datalen, int en_de); | 
| 223 | char *PKCS12_decrypt_d2i(X509_ALGOR *algor, char *(*d2i)(), | 228 | char *PKCS12_decrypt_d2i(X509_ALGOR *algor, char *(*d2i)(), | 
| 224 | void (*free_func)(), const char *pass, int passlen, | 229 | void (*free_func)(void *), const char *pass, int passlen, | 
| 225 | ASN1_STRING *oct, int seq); | 230 | ASN1_STRING *oct, int seq); | 
| 226 | ASN1_STRING *PKCS12_i2d_encrypt(X509_ALGOR *algor, int (*i2d)(), | 231 | ASN1_STRING *PKCS12_i2d_encrypt(X509_ALGOR *algor, int (*i2d)(), | 
| 227 | const char *pass, int passlen, char *obj, | 232 | const char *pass, int passlen, char *obj, | 
