diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/pem/Makefile.ssl | 87 | ||||
| -rw-r--r-- | src/lib/libcrypto/pem/pem.h | 22 | ||||
| -rw-r--r-- | src/lib/libcrypto/pem/pem2.h | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/pem/pem_info.c | 12 | ||||
| -rw-r--r-- | src/lib/libcrypto/pem/pem_lib.c | 26 | ||||
| -rw-r--r-- | src/lib/libcrypto/pem/pem_seal.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/pem/pem_sign.c | 4 | 
7 files changed, 97 insertions, 70 deletions
| diff --git a/src/lib/libcrypto/pem/Makefile.ssl b/src/lib/libcrypto/pem/Makefile.ssl index b95b2b615a..97af8255a3 100644 --- a/src/lib/libcrypto/pem/Makefile.ssl +++ b/src/lib/libcrypto/pem/Makefile.ssl | |||
| @@ -86,25 +86,29 @@ pem_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 86 | pem_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 86 | pem_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 87 | pem_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 87 | pem_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 88 | pem_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 88 | pem_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 89 | pem_all.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 89 | pem_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 90 | pem_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 90 | pem_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 91 | pem_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 91 | pem_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 92 | pem_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 92 | pem_all.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 93 | pem_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 
| 93 | pem_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 94 | pem_all.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | 
| 94 | pem_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 95 | pem_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 
| 95 | pem_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 96 | pem_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 96 | pem_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 97 | pem_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 97 | pem_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 98 | pem_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 99 | pem_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 98 | pem_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 100 | pem_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 99 | pem_all.o: ../cryptlib.h | 101 | pem_all.o: ../cryptlib.h | 
| 100 | pem_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 102 | pem_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 101 | pem_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 103 | pem_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 102 | pem_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | 104 | pem_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| 103 | pem_err.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 105 | pem_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 
| 104 | pem_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 106 | pem_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 105 | pem_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 107 | pem_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 
| 106 | pem_err.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 108 | pem_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 
| 107 | pem_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 109 | pem_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 
| 110 | pem_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 111 | pem_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 108 | pem_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 112 | pem_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 
| 109 | pem_err.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 113 | pem_err.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 
| 110 | pem_err.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 114 | pem_err.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 
| @@ -112,7 +116,8 @@ pem_err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | |||
| 112 | pem_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 116 | pem_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 
| 113 | pem_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 117 | pem_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 
| 114 | pem_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 118 | pem_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 
| 115 | pem_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 119 | pem_err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 
| 120 | pem_err.o: ../../include/openssl/x509_vfy.h | ||
| 116 | pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 121 | pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 117 | pem_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 122 | pem_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 118 | pem_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 123 | pem_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| @@ -120,17 +125,19 @@ pem_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 120 | pem_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 125 | pem_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 121 | pem_info.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 126 | pem_info.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 122 | pem_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 127 | pem_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 123 | pem_info.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 128 | pem_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 129 | pem_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 124 | pem_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 130 | pem_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 125 | pem_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 131 | pem_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 132 | pem_info.o: ../../include/openssl/opensslconf.h | ||
| 126 | pem_info.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 133 | pem_info.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 
| 127 | pem_info.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 134 | pem_info.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 
| 128 | pem_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 135 | pem_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 
| 129 | pem_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 136 | pem_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 
| 130 | pem_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 137 | pem_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 
| 131 | pem_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 138 | pem_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 
| 132 | pem_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 139 | pem_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 
| 133 | pem_info.o: ../cryptlib.h | 140 | pem_info.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 
| 134 | pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 141 | pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 135 | pem_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 142 | pem_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 136 | pem_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 143 | pem_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| @@ -138,16 +145,18 @@ pem_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 138 | pem_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 145 | pem_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 139 | pem_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 146 | pem_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 140 | pem_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 147 | pem_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 141 | pem_lib.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 148 | pem_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 149 | pem_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 142 | pem_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 150 | pem_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 143 | pem_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 151 | pem_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 144 | pem_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 152 | pem_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 
| 145 | pem_lib.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h | 153 | pem_lib.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | 
| 146 | pem_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | 154 | pem_lib.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | 
| 147 | pem_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 155 | pem_lib.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 
| 148 | pem_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 156 | pem_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 149 | pem_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 157 | pem_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 150 | pem_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 158 | pem_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 159 | pem_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 151 | pem_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 160 | pem_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 152 | pem_lib.o: ../cryptlib.h | 161 | pem_lib.o: ../cryptlib.h | 
| 153 | pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 162 | pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| @@ -157,17 +166,20 @@ pem_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 157 | pem_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 166 | pem_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 158 | pem_seal.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 167 | pem_seal.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 159 | pem_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 168 | pem_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 160 | pem_seal.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 169 | pem_seal.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 170 | pem_seal.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 161 | pem_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 171 | pem_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 162 | pem_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 172 | pem_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 173 | pem_seal.o: ../../include/openssl/opensslconf.h | ||
| 163 | pem_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 174 | pem_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 
| 164 | pem_seal.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 175 | pem_seal.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 
| 165 | pem_seal.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 176 | pem_seal.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 
| 166 | pem_seal.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 177 | pem_seal.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 167 | pem_seal.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 178 | pem_seal.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 168 | pem_seal.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 179 | pem_seal.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 169 | pem_seal.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 180 | pem_seal.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 170 | pem_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 181 | pem_seal.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 182 | pem_seal.o: ../cryptlib.h | ||
| 171 | pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 183 | pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 
| 172 | pem_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 184 | pem_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 
| 173 | pem_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 185 | pem_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 
| @@ -175,14 +187,17 @@ pem_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 175 | pem_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 187 | pem_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 
| 176 | pem_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 188 | pem_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 
| 177 | pem_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 189 | pem_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 
| 178 | pem_sign.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 190 | pem_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 
| 191 | pem_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 179 | pem_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 192 | pem_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 
| 180 | pem_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 193 | pem_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 
| 194 | pem_sign.o: ../../include/openssl/opensslconf.h | ||
| 181 | pem_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 195 | pem_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 
| 182 | pem_sign.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 196 | pem_sign.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 
| 183 | pem_sign.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 197 | pem_sign.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 
| 184 | pem_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 198 | pem_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 
| 185 | pem_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 199 | pem_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 
| 186 | pem_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 200 | pem_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 
| 187 | pem_sign.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 201 | pem_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 
| 188 | pem_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 202 | pem_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 
| 203 | pem_sign.o: ../cryptlib.h | ||
| diff --git a/src/lib/libcrypto/pem/pem.h b/src/lib/libcrypto/pem/pem.h index e4bae0b4aa..6d3c446577 100644 --- a/src/lib/libcrypto/pem/pem.h +++ b/src/lib/libcrypto/pem/pem.h | |||
| @@ -59,14 +59,20 @@ | |||
| 59 | #ifndef HEADER_PEM_H | 59 | #ifndef HEADER_PEM_H | 
| 60 | #define HEADER_PEM_H | 60 | #define HEADER_PEM_H | 
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | 62 | #ifndef NO_BIO | 
| 63 | extern "C" { | 63 | #include <openssl/bio.h> | 
| 64 | #endif | ||
| 65 | #ifndef NO_STACK | ||
| 66 | #include <openssl/stack.h> | ||
| 64 | #endif | 67 | #endif | 
| 65 | |||
| 66 | #include <openssl/evp.h> | 68 | #include <openssl/evp.h> | 
| 67 | #include <openssl/x509.h> | 69 | #include <openssl/x509.h> | 
| 68 | #include <openssl/pem2.h> | 70 | #include <openssl/pem2.h> | 
| 69 | 71 | ||
| 72 | #ifdef __cplusplus | ||
| 73 | extern "C" { | ||
| 74 | #endif | ||
| 75 | |||
| 70 | #define PEM_BUFSIZE 1024 | 76 | #define PEM_BUFSIZE 1024 | 
| 71 | 77 | ||
| 72 | #define PEM_OBJ_UNDEF 0 | 78 | #define PEM_OBJ_UNDEF 0 | 
| @@ -165,7 +171,7 @@ typedef struct pem_ctx_st | |||
| 165 | int num_recipient; | 171 | int num_recipient; | 
| 166 | PEM_USER **recipient; | 172 | PEM_USER **recipient; | 
| 167 | 173 | ||
| 168 | #ifdef HEADER_STACK_H | 174 | #ifndef NO_STACK | 
| 169 | STACK *x509_chain; /* certificate chain */ | 175 | STACK *x509_chain; /* certificate chain */ | 
| 170 | #else | 176 | #else | 
| 171 | char *x509_chain; /* certificate chain */ | 177 | char *x509_chain; /* certificate chain */ | 
| @@ -289,7 +295,7 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ | |||
| 289 | 295 | ||
| 290 | #endif | 296 | #endif | 
| 291 | 297 | ||
| 292 | #ifdef HEADER_BIO_H | 298 | #ifndef NO_BIO | 
| 293 | #define DECLARE_PEM_read_bio(name, type) \ | 299 | #define DECLARE_PEM_read_bio(name, type) \ | 
| 294 | type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); | 300 | type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); | 
| 295 | 301 | ||
| @@ -477,7 +483,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); | |||
| 477 | int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len, | 483 | int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len, | 
| 478 | pem_password_cb *callback,void *u); | 484 | pem_password_cb *callback,void *u); | 
| 479 | 485 | ||
| 480 | #ifdef HEADER_BIO_H | 486 | #ifndef NO_BIO | 
| 481 | int PEM_read_bio(BIO *bp, char **name, char **header, | 487 | int PEM_read_bio(BIO *bp, char **name, char **header, | 
| 482 | unsigned char **data,long *len); | 488 | unsigned char **data,long *len); | 
| 483 | int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data, | 489 | int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data, | 
| @@ -525,9 +531,7 @@ void PEM_dek_info(char *buf, const char *type, int len, char *str); | |||
| 525 | 531 | ||
| 526 | #ifndef SSLEAY_MACROS | 532 | #ifndef SSLEAY_MACROS | 
| 527 | 533 | ||
| 528 | #ifdef VMS | 534 | #include <openssl/symhacks.h> | 
| 529 | #include <openssl/vms_idhacks.h> | ||
| 530 | #endif | ||
| 531 | 535 | ||
| 532 | DECLARE_PEM_rw(X509, X509) | 536 | DECLARE_PEM_rw(X509, X509) | 
| 533 | 537 | ||
| diff --git a/src/lib/libcrypto/pem/pem2.h b/src/lib/libcrypto/pem/pem2.h index 4a016aacd2..4e484bcd82 100644 --- a/src/lib/libcrypto/pem/pem2.h +++ b/src/lib/libcrypto/pem/pem2.h | |||
| @@ -57,4 +57,12 @@ | |||
| 57 | * Ben 30 Jan 1999. | 57 | * Ben 30 Jan 1999. | 
| 58 | */ | 58 | */ | 
| 59 | 59 | ||
| 60 | #ifdef __cplusplus | ||
| 61 | extern "C" { | ||
| 62 | #endif | ||
| 63 | |||
| 60 | void ERR_load_PEM_strings(void); | 64 | void ERR_load_PEM_strings(void); | 
| 65 | |||
| 66 | #ifdef __cplusplus | ||
| 67 | } | ||
| 68 | #endif | ||
| diff --git a/src/lib/libcrypto/pem/pem_info.c b/src/lib/libcrypto/pem/pem_info.c index b65239a920..1c5c6dea00 100644 --- a/src/lib/libcrypto/pem/pem_info.c +++ b/src/lib/libcrypto/pem/pem_info.c | |||
| @@ -237,9 +237,9 @@ start: | |||
| 237 | else { | 237 | else { | 
| 238 | /* unknown */ | 238 | /* unknown */ | 
| 239 | } | 239 | } | 
| 240 | if (name != NULL) Free(name); | 240 | if (name != NULL) OPENSSL_free(name); | 
| 241 | if (header != NULL) Free(header); | 241 | if (header != NULL) OPENSSL_free(header); | 
| 242 | if (data != NULL) Free(data); | 242 | if (data != NULL) OPENSSL_free(data); | 
| 243 | name=NULL; | 243 | name=NULL; | 
| 244 | header=NULL; | 244 | header=NULL; | 
| 245 | data=NULL; | 245 | data=NULL; | 
| @@ -268,9 +268,9 @@ err: | |||
| 268 | ret=NULL; | 268 | ret=NULL; | 
| 269 | } | 269 | } | 
| 270 | 270 | ||
| 271 | if (name != NULL) Free(name); | 271 | if (name != NULL) OPENSSL_free(name); | 
| 272 | if (header != NULL) Free(header); | 272 | if (header != NULL) OPENSSL_free(header); | 
| 273 | if (data != NULL) Free(data); | 273 | if (data != NULL) OPENSSL_free(data); | 
| 274 | return(ret); | 274 | return(ret); | 
| 275 | } | 275 | } | 
| 276 | 276 | ||
| diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c index b5e0a650f8..a17c3ed57f 100644 --- a/src/lib/libcrypto/pem/pem_lib.c +++ b/src/lib/libcrypto/pem/pem_lib.c | |||
| @@ -242,9 +242,9 @@ char *PEM_ASN1_read_bio(char *(*d2i)(), const char *name, BIO *bp, char **x, | |||
| 242 | return(NULL); | 242 | return(NULL); | 
| 243 | } | 243 | } | 
| 244 | if(check_pem(nm, name)) break; | 244 | if(check_pem(nm, name)) break; | 
| 245 | Free(nm); | 245 | OPENSSL_free(nm); | 
| 246 | Free(header); | 246 | OPENSSL_free(header); | 
| 247 | Free(data); | 247 | OPENSSL_free(data); | 
| 248 | } | 248 | } | 
| 249 | if (!PEM_get_EVP_CIPHER_INFO(header,&cipher)) goto err; | 249 | if (!PEM_get_EVP_CIPHER_INFO(header,&cipher)) goto err; | 
| 250 | if (!PEM_do_header(&cipher,data,&len,cb,u)) goto err; | 250 | if (!PEM_do_header(&cipher,data,&len,cb,u)) goto err; | 
| @@ -289,9 +289,9 @@ p8err: | |||
| 289 | if (ret == NULL) | 289 | if (ret == NULL) | 
| 290 | PEMerr(PEM_F_PEM_ASN1_READ_BIO,ERR_R_ASN1_LIB); | 290 | PEMerr(PEM_F_PEM_ASN1_READ_BIO,ERR_R_ASN1_LIB); | 
| 291 | err: | 291 | err: | 
| 292 | Free(nm); | 292 | OPENSSL_free(nm); | 
| 293 | Free(header); | 293 | OPENSSL_free(header); | 
| 294 | Free(data); | 294 | OPENSSL_free(data); | 
| 295 | return(ret); | 295 | return(ret); | 
| 296 | } | 296 | } | 
| 297 | 297 | ||
| @@ -344,7 +344,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x, | |||
| 344 | goto err; | 344 | goto err; | 
| 345 | } | 345 | } | 
| 346 | /* dzise + 8 bytes are needed */ | 346 | /* dzise + 8 bytes are needed */ | 
| 347 | data=(unsigned char *)Malloc((unsigned int)dsize+20); | 347 | data=(unsigned char *)OPENSSL_malloc((unsigned int)dsize+20); | 
| 348 | if (data == NULL) | 348 | if (data == NULL) | 
| 349 | { | 349 | { | 
| 350 | PEMerr(PEM_F_PEM_ASN1_WRITE_BIO,ERR_R_MALLOC_FAILURE); | 350 | PEMerr(PEM_F_PEM_ASN1_WRITE_BIO,ERR_R_MALLOC_FAILURE); | 
| @@ -405,7 +405,7 @@ err: | |||
| 405 | memset((char *)&ctx,0,sizeof(ctx)); | 405 | memset((char *)&ctx,0,sizeof(ctx)); | 
| 406 | memset(buf,0,PEM_BUFSIZE); | 406 | memset(buf,0,PEM_BUFSIZE); | 
| 407 | memset(data,0,(unsigned int)dsize); | 407 | memset(data,0,(unsigned int)dsize); | 
| 408 | Free(data); | 408 | OPENSSL_free(data); | 
| 409 | return(ret); | 409 | return(ret); | 
| 410 | } | 410 | } | 
| 411 | 411 | ||
| @@ -583,7 +583,7 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data, | |||
| 583 | goto err; | 583 | goto err; | 
| 584 | } | 584 | } | 
| 585 | 585 | ||
| 586 | buf=(unsigned char *)Malloc(PEM_BUFSIZE*8); | 586 | buf=(unsigned char *)OPENSSL_malloc(PEM_BUFSIZE*8); | 
| 587 | if (buf == NULL) | 587 | if (buf == NULL) | 
| 588 | { | 588 | { | 
| 589 | reason=ERR_R_MALLOC_FAILURE; | 589 | reason=ERR_R_MALLOC_FAILURE; | 
| @@ -603,7 +603,7 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data, | |||
| 603 | } | 603 | } | 
| 604 | EVP_EncodeFinal(&ctx,buf,&outl); | 604 | EVP_EncodeFinal(&ctx,buf,&outl); | 
| 605 | if ((outl > 0) && (BIO_write(bp,(char *)buf,outl) != outl)) goto err; | 605 | if ((outl > 0) && (BIO_write(bp,(char *)buf,outl) != outl)) goto err; | 
| 606 | Free(buf); | 606 | OPENSSL_free(buf); | 
| 607 | if ( (BIO_write(bp,"-----END ",9) != 9) || | 607 | if ( (BIO_write(bp,"-----END ",9) != 9) || | 
| 608 | (BIO_write(bp,name,nlen) != nlen) || | 608 | (BIO_write(bp,name,nlen) != nlen) || | 
| 609 | (BIO_write(bp,"-----\n",6) != 6)) | 609 | (BIO_write(bp,"-----\n",6) != 6)) | 
| @@ -784,9 +784,9 @@ int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data, | |||
| 784 | *header=headerB->data; | 784 | *header=headerB->data; | 
| 785 | *data=(unsigned char *)dataB->data; | 785 | *data=(unsigned char *)dataB->data; | 
| 786 | *len=bl; | 786 | *len=bl; | 
| 787 | Free(nameB); | 787 | OPENSSL_free(nameB); | 
| 788 | Free(headerB); | 788 | OPENSSL_free(headerB); | 
| 789 | Free(dataB); | 789 | OPENSSL_free(dataB); | 
| 790 | return(1); | 790 | return(1); | 
| 791 | err: | 791 | err: | 
| 792 | BUF_MEM_free(nameB); | 792 | BUF_MEM_free(nameB); | 
| diff --git a/src/lib/libcrypto/pem/pem_seal.c b/src/lib/libcrypto/pem/pem_seal.c index 126e29d375..2a6c513348 100644 --- a/src/lib/libcrypto/pem/pem_seal.c +++ b/src/lib/libcrypto/pem/pem_seal.c | |||
| @@ -84,7 +84,7 @@ int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type, | |||
| 84 | j=RSA_size(pubk[i]->pkey.rsa); | 84 | j=RSA_size(pubk[i]->pkey.rsa); | 
| 85 | if (j > max) max=j; | 85 | if (j > max) max=j; | 
| 86 | } | 86 | } | 
| 87 | s=(char *)Malloc(max*2); | 87 | s=(char *)OPENSSL_malloc(max*2); | 
| 88 | if (s == NULL) | 88 | if (s == NULL) | 
| 89 | { | 89 | { | 
| 90 | PEMerr(PEM_F_PEM_SEALINIT,ERR_R_MALLOC_FAILURE); | 90 | PEMerr(PEM_F_PEM_SEALINIT,ERR_R_MALLOC_FAILURE); | 
| @@ -108,7 +108,7 @@ int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type, | |||
| 108 | 108 | ||
| 109 | ret=npubk; | 109 | ret=npubk; | 
| 110 | err: | 110 | err: | 
| 111 | if (s != NULL) Free(s); | 111 | if (s != NULL) OPENSSL_free(s); | 
| 112 | memset(key,0,EVP_MAX_KEY_LENGTH); | 112 | memset(key,0,EVP_MAX_KEY_LENGTH); | 
| 113 | return(ret); | 113 | return(ret); | 
| 114 | } | 114 | } | 
| @@ -151,7 +151,7 @@ int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl, | |||
| 151 | } | 151 | } | 
| 152 | i=RSA_size(priv->pkey.rsa); | 152 | i=RSA_size(priv->pkey.rsa); | 
| 153 | if (i < 100) i=100; | 153 | if (i < 100) i=100; | 
| 154 | s=(unsigned char *)Malloc(i*2); | 154 | s=(unsigned char *)OPENSSL_malloc(i*2); | 
| 155 | if (s == NULL) | 155 | if (s == NULL) | 
| 156 | { | 156 | { | 
| 157 | PEMerr(PEM_F_PEM_SEALFINAL,ERR_R_MALLOC_FAILURE); | 157 | PEMerr(PEM_F_PEM_SEALFINAL,ERR_R_MALLOC_FAILURE); | 
| @@ -172,7 +172,7 @@ int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl, | |||
| 172 | err: | 172 | err: | 
| 173 | memset((char *)&(ctx->md),0,sizeof(ctx->md)); | 173 | memset((char *)&(ctx->md),0,sizeof(ctx->md)); | 
| 174 | memset((char *)&(ctx->cipher),0,sizeof(ctx->cipher)); | 174 | memset((char *)&(ctx->cipher),0,sizeof(ctx->cipher)); | 
| 175 | if (s != NULL) Free(s); | 175 | if (s != NULL) OPENSSL_free(s); | 
| 176 | return(ret); | 176 | return(ret); | 
| 177 | } | 177 | } | 
| 178 | #else /* !NO_RSA */ | 178 | #else /* !NO_RSA */ | 
| diff --git a/src/lib/libcrypto/pem/pem_sign.c b/src/lib/libcrypto/pem/pem_sign.c index aabafb702d..42d598dd78 100644 --- a/src/lib/libcrypto/pem/pem_sign.c +++ b/src/lib/libcrypto/pem/pem_sign.c | |||
| @@ -82,7 +82,7 @@ int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, | |||
| 82 | int i,ret=0; | 82 | int i,ret=0; | 
| 83 | unsigned int m_len; | 83 | unsigned int m_len; | 
| 84 | 84 | ||
| 85 | m=(unsigned char *)Malloc(EVP_PKEY_size(pkey)+2); | 85 | m=(unsigned char *)OPENSSL_malloc(EVP_PKEY_size(pkey)+2); | 
| 86 | if (m == NULL) | 86 | if (m == NULL) | 
| 87 | { | 87 | { | 
| 88 | PEMerr(PEM_F_PEM_SIGNFINAL,ERR_R_MALLOC_FAILURE); | 88 | PEMerr(PEM_F_PEM_SIGNFINAL,ERR_R_MALLOC_FAILURE); | 
| @@ -96,7 +96,7 @@ int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, | |||
| 96 | ret=1; | 96 | ret=1; | 
| 97 | err: | 97 | err: | 
| 98 | /* ctx has been zeroed by EVP_SignFinal() */ | 98 | /* ctx has been zeroed by EVP_SignFinal() */ | 
| 99 | if (m != NULL) Free(m); | 99 | if (m != NULL) OPENSSL_free(m); | 
| 100 | return(ret); | 100 | return(ret); | 
| 101 | } | 101 | } | 
| 102 | 102 | ||
