diff options
| author | beck <> | 2000-12-15 02:58:47 +0000 |
|---|---|---|
| committer | beck <> | 2000-12-15 02:58:47 +0000 |
| commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
| tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libssl | |
| parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
| download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip | |
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libssl')
661 files changed, 47521 insertions, 15812 deletions
diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c index d73c41adcd..d85555a7e6 100644 --- a/src/lib/libssl/bio_ssl.c +++ b/src/lib/libssl/bio_ssl.c | |||
| @@ -65,13 +65,13 @@ | |||
| 65 | #include <openssl/err.h> | 65 | #include <openssl/err.h> |
| 66 | #include <openssl/ssl.h> | 66 | #include <openssl/ssl.h> |
| 67 | 67 | ||
| 68 | static int ssl_write(BIO *h,char *buf,int num); | 68 | static int ssl_write(BIO *h, const char *buf, int num); |
| 69 | static int ssl_read(BIO *h,char *buf,int size); | 69 | static int ssl_read(BIO *h, char *buf, int size); |
| 70 | static int ssl_puts(BIO *h,char *str); | 70 | static int ssl_puts(BIO *h, const char *str); |
| 71 | static long ssl_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 71 | static long ssl_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 72 | static int ssl_new(BIO *h); | 72 | static int ssl_new(BIO *h); |
| 73 | static int ssl_free(BIO *data); | 73 | static int ssl_free(BIO *data); |
| 74 | static long ssl_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 74 | static long ssl_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); |
| 75 | typedef struct bio_ssl_st | 75 | typedef struct bio_ssl_st |
| 76 | { | 76 | { |
| 77 | SSL *ssl; /* The ssl handle :-) */ | 77 | SSL *ssl; /* The ssl handle :-) */ |
| @@ -105,7 +105,7 @@ static int ssl_new(BIO *bi) | |||
| 105 | { | 105 | { |
| 106 | BIO_SSL *bs; | 106 | BIO_SSL *bs; |
| 107 | 107 | ||
| 108 | bs=(BIO_SSL *)Malloc(sizeof(BIO_SSL)); | 108 | bs=(BIO_SSL *)OPENSSL_malloc(sizeof(BIO_SSL)); |
| 109 | if (bs == NULL) | 109 | if (bs == NULL) |
| 110 | { | 110 | { |
| 111 | BIOerr(BIO_F_SSL_NEW,ERR_R_MALLOC_FAILURE); | 111 | BIOerr(BIO_F_SSL_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -133,7 +133,7 @@ static int ssl_free(BIO *a) | |||
| 133 | a->flags=0; | 133 | a->flags=0; |
| 134 | } | 134 | } |
| 135 | if (a->ptr != NULL) | 135 | if (a->ptr != NULL) |
| 136 | Free(a->ptr); | 136 | OPENSSL_free(a->ptr); |
| 137 | return(1); | 137 | return(1); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| @@ -221,7 +221,7 @@ static int ssl_read(BIO *b, char *out, int outl) | |||
| 221 | return(ret); | 221 | return(ret); |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | static int ssl_write(BIO *b, char *out, int outl) | 224 | static int ssl_write(BIO *b, const char *out, int outl) |
| 225 | { | 225 | { |
| 226 | int ret,r=0; | 226 | int ret,r=0; |
| 227 | int retry_reason=0; | 227 | int retry_reason=0; |
| @@ -289,7 +289,7 @@ static int ssl_write(BIO *b, char *out, int outl) | |||
| 289 | return(ret); | 289 | return(ret); |
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr) | 292 | static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 293 | { | 293 | { |
| 294 | SSL **sslp,*ssl; | 294 | SSL **sslp,*ssl; |
| 295 | BIO_SSL *bs; | 295 | BIO_SSL *bs; |
| @@ -470,7 +470,7 @@ static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 470 | return(ret); | 470 | return(ret); |
| 471 | } | 471 | } |
| 472 | 472 | ||
| 473 | static long ssl_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 473 | static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 474 | { | 474 | { |
| 475 | SSL *ssl; | 475 | SSL *ssl; |
| 476 | BIO_SSL *bs; | 476 | BIO_SSL *bs; |
| @@ -492,7 +492,7 @@ static long ssl_callback_ctrl(BIO *b, int cmd, void (*fp)()) | |||
| 492 | return(ret); | 492 | return(ret); |
| 493 | } | 493 | } |
| 494 | 494 | ||
| 495 | static int ssl_puts(BIO *bp, char *str) | 495 | static int ssl_puts(BIO *bp, const char *str) |
| 496 | { | 496 | { |
| 497 | int n,ret; | 497 | int n,ret; |
| 498 | 498 | ||
diff --git a/src/lib/libssl/crypto/Makefile b/src/lib/libssl/crypto/Makefile index 7a3ddaa2c8..4af52d0245 100644 --- a/src/lib/libssl/crypto/Makefile +++ b/src/lib/libssl/crypto/Makefile | |||
| @@ -94,27 +94,21 @@ SRCS+= stack.c | |||
| 94 | CFLAGS+= -I${LCRYPTO_SRC}/lhash | 94 | CFLAGS+= -I${LCRYPTO_SRC}/lhash |
| 95 | SRCS+= lhash.c lh_stats.c | 95 | SRCS+= lhash.c lh_stats.c |
| 96 | CFLAGS+= -I${LCRYPTO_SRC}/rand | 96 | CFLAGS+= -I${LCRYPTO_SRC}/rand |
| 97 | SRCS+= md_rand.c randfile.c rand_lib.c rand_egd.c rand_err.c | 97 | SRCS+= md_rand.c randfile.c rand_lib.c rand_egd.c rand_err.c rand_win.c |
| 98 | CFLAGS+= -I${LCRYPTO_SRC}/err | 98 | CFLAGS+= -I${LCRYPTO_SRC}/err |
| 99 | SRCS+= err.c err_all.c err_prn.c | 99 | SRCS+= err.c err_all.c err_prn.c |
| 100 | CFLAGS+= -I${LCRYPTO_SRC}/objects | 100 | CFLAGS+= -I${LCRYPTO_SRC}/objects |
| 101 | SRCS+= obj_dat.c obj_lib.c obj_err.c o_names.c | 101 | SRCS+= obj_dat.c obj_lib.c obj_err.c o_names.c |
| 102 | CFLAGS+= -I${LCRYPTO_SRC}/evp | 102 | CFLAGS+= -I${LCRYPTO_SRC}/evp |
| 103 | SRCS+= encode.c digest.c evp_enc.c evp_key.c | 103 | SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c |
| 104 | SRCS+= e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c | 104 | SRCS+= digest.c e_bf.c e_cast.c e_des.c e_des3.c |
| 105 | SRCS+= e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c | 105 | SRCS+= e_null.c e_rc2.c e_rc4.c e_xcbc_d.c encode.c evp_enc.c |
| 106 | SRCS+= e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c | 106 | SRCS+= evp_err.c evp_key.c evp_lib.c evp_pbe.c evp_pkey.c m_dss.c |
| 107 | SRCS+= e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c | 107 | SRCS+= m_dss1.c m_md2.c m_md4.c m_md5.c m_mdc2.c m_null.c m_ripemd.c |
| 108 | SRCS+= e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c | 108 | SRCS+= m_sha.c m_sha1.c names.c p5_crpt.c p5_crpt2.c p_dec.c p_enc.c |
| 109 | SRCS+= e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c | 109 | SRCS+= p_lib.c p_open.c p_seal.c p_sign.c p_verify.c |
| 110 | SRCS+= e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c | 110 | CFLAGS+= -I${LCRYPTO_SRC}/md4 |
| 111 | SRCS+= e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c | 111 | SRCS+= md4_dgst.c md4_one.c |
| 112 | SRCS+= m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c | ||
| 113 | SRCS+= m_dss1.c m_mdc2.c m_ripemd.c p_open.c | ||
| 114 | SRCS+= p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c | ||
| 115 | SRCS+= p_dec.c bio_md.c bio_b64.c bio_enc.c | ||
| 116 | SRCS+= evp_err.c e_null.c c_all.c c_allc.c c_alld.c evp_lib.c | ||
| 117 | SRCS+= bio_ok.c evp_pbe.c evp_pkey.c p5_crpt.c p5_crpt2.c | ||
| 118 | CFLAGS+= -I${LCRYPTO_SRC}/pem | 112 | CFLAGS+= -I${LCRYPTO_SRC}/pem |
| 119 | SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c | 113 | SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c |
| 120 | SRCS+= pem_all.c pem_err.c | 114 | SRCS+= pem_all.c pem_err.c |
| @@ -139,8 +133,7 @@ SRCS+= asn1_err.c a_meth.c a_bytes.c evp_asn1.c | |||
| 139 | SRCS+= a_enum.c a_gentm.c a_time.c a_utf8.c a_vis.c | 133 | SRCS+= a_enum.c a_gentm.c a_time.c a_utf8.c a_vis.c |
| 140 | SRCS+= asn_pack.c f_enum.c nsseq.c p5_pbe.c p5_pbev2.c | 134 | SRCS+= asn_pack.c f_enum.c nsseq.c p5_pbe.c p5_pbev2.c |
| 141 | SRCS+= p8_pkey.c t_crl.c a_meth.c a_null.c a_strnid.c a_mbstr.c | 135 | SRCS+= p8_pkey.c t_crl.c a_meth.c a_null.c a_strnid.c a_mbstr.c |
| 142 | #SRCS+= p8_key.c t_bitst.c t_spki.c t_x509a.c x_x509a.c | 136 | SRCS+= t_bitst.c t_spki.c t_x509a.c x_x509a.c a_strex.c |
| 143 | SRCS+= t_bitst.c t_spki.c t_x509a.c x_x509a.c | ||
| 144 | CFLAGS+= -I${LCRYPTO_SRC}/x509 | 137 | CFLAGS+= -I${LCRYPTO_SRC}/x509 |
| 145 | SRCS+= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c | 138 | SRCS+= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c |
| 146 | SRCS+= x509_obj.c x509_req.c x509_vfy.c x509_set.c | 139 | SRCS+= x509_obj.c x509_req.c x509_vfy.c x509_set.c |
| @@ -153,7 +146,7 @@ SRCS+= v3_crld.c v3_enum.c v3_extku.c v3_genn.c v3_ia5.c v3_int.c | |||
| 153 | SRCS+= v3_lib.c v3_pku.c v3_prn.c v3_skey.c v3_sxnet.c v3_utl.c | 146 | SRCS+= v3_lib.c v3_pku.c v3_prn.c v3_skey.c v3_sxnet.c v3_utl.c |
| 154 | SRCS+= v3err.c v3_info.c v3_purp.c | 147 | SRCS+= v3err.c v3_info.c v3_purp.c |
| 155 | CFLAGS+= -I${LCRYPTO_SRC}/conf | 148 | CFLAGS+= -I${LCRYPTO_SRC}/conf |
| 156 | SRCS+= conf.c conf_err.c | 149 | SRCS+= conf_err.c conf_lib.c conf_def.c conf_api.c cnf_save.c |
| 157 | CFLAGS+= -I${LCRYPTO_SRC}/txt_db | 150 | CFLAGS+= -I${LCRYPTO_SRC}/txt_db |
| 158 | SRCS+= txt_db.c | 151 | SRCS+= txt_db.c |
| 159 | CFLAGS+= -I${LCRYPTO_SRC}/pkcs7 | 152 | CFLAGS+= -I${LCRYPTO_SRC}/pkcs7 |
| @@ -164,14 +157,76 @@ CFLAGS+= -I${LCRYPTO_SRC}/pkcs12 | |||
| 164 | SRCS+= p12_add.c p12_attr.c p12_bags.c p12_crpt.c p12_crt.c | 157 | SRCS+= p12_add.c p12_attr.c p12_bags.c p12_crpt.c p12_crt.c |
| 165 | SRCS+= p12_decr.c p12_init.c p12_key.c p12_kiss.c p12_lib.c p12_mac.c | 158 | SRCS+= p12_decr.c p12_init.c p12_key.c p12_kiss.c p12_lib.c p12_mac.c |
| 166 | SRCS+= p12_mutl.c p12_sbag.c p12_utl.c pk12err.c p12_npas.c | 159 | SRCS+= p12_mutl.c p12_sbag.c p12_utl.c pk12err.c p12_npas.c |
| 160 | CFLAGS+= -I${LCRYPTO_SRC}/engine | ||
| 161 | SRCS+= engine_err.c engine_lib.c engine_list.c engine_openssl.c | ||
| 162 | SRCS+= hw_ncipher.c hw_atalla.c hw_cswift.c | ||
| 167 | 163 | ||
| 168 | HDRS= asn1.h dh.h md5.h rc4.h stack.h asn1_mac.h dsa.h mdc2.h rc5.h \ | 164 | |
| 169 | tls1.h bio.h e_os.h objects.h ripemd.h tmdiff.h blowfish.h \ | 165 | #HDRS= asn1.h dh.h md5.h rc4.h stack.h asn1_mac.h dsa.h mdc2.h rc5.h \ |
| 170 | e_os2.h opensslconf.h rsa.h txt_db.h bn.h ebcdic.h opensslv.h \ | 166 | # tls1.h bio.h e_os.h objects.h ripemd.h tmdiff.h blowfish.h \ |
| 171 | rsaref.h x509.h buffer.h err.h pem.h safestack.h x509_vfy.h \ | 167 | # e_os2.h opensslconf.h rsa.h txt_db.h bn.h ebcdic.h opensslv.h \ |
| 172 | cast.h evp.h pem2.h sha.h x509v3.h comp.h hmac.h pkcs12.h ssl.h \ | 168 | # rsaref.h x509.h buffer.h err.h pem.h safestack.h x509_vfy.h \ |
| 173 | conf.h idea.h pkcs7.h ssl2.h crypto.h lhash.h rand.h ssl23.h \ | 169 | # cast.h evp.h pem2.h sha.h x509v3.h comp.h hmac.h pkcs12.h ssl.h \ |
| 174 | des.h md2.h rc2.h ssl3.h | 170 | # conf.h idea.h pkcs7.h ssl2.h crypto.h lhash.h rand.h ssl23.h \ |
| 171 | # des.h md2.h rc2.h ssl3.h | ||
| 172 | |||
| 173 | HDRS= asn1.h \ | ||
| 174 | asn1_mac.h \ | ||
| 175 | bio.h \ | ||
| 176 | blowfish.h \ | ||
| 177 | bn.h \ | ||
| 178 | buffer.h \ | ||
| 179 | cast.h \ | ||
| 180 | comp.h \ | ||
| 181 | conf.h \ | ||
| 182 | conf_api.h \ | ||
| 183 | crypto.h \ | ||
| 184 | des.h \ | ||
| 185 | dh.h \ | ||
| 186 | dsa.h \ | ||
| 187 | dso.h \ | ||
| 188 | e_os.h \ | ||
| 189 | e_os2.h \ | ||
| 190 | ebcdic.h \ | ||
| 191 | engine.h \ | ||
| 192 | err.h \ | ||
| 193 | evp.h \ | ||
| 194 | hmac.h \ | ||
| 195 | idea.h \ | ||
| 196 | lhash.h \ | ||
| 197 | md2.h \ | ||
| 198 | md4.h \ | ||
| 199 | md5.h \ | ||
| 200 | mdc2.h \ | ||
| 201 | obj_mac.h \ | ||
| 202 | objects.h \ | ||
| 203 | opensslconf.h \ | ||
| 204 | opensslv.h \ | ||
| 205 | pem.h \ | ||
| 206 | pem2.h \ | ||
| 207 | pkcs12.h \ | ||
| 208 | pkcs7.h \ | ||
| 209 | rand.h \ | ||
| 210 | rc2.h \ | ||
| 211 | rc4.h \ | ||
| 212 | rc5.h \ | ||
| 213 | ripemd.h \ | ||
| 214 | rsa.h \ | ||
| 215 | rsaref.h \ | ||
| 216 | safestack.h \ | ||
| 217 | sha.h \ | ||
| 218 | ssl.h \ | ||
| 219 | ssl2.h \ | ||
| 220 | ssl23.h \ | ||
| 221 | ssl3.h \ | ||
| 222 | stack.h \ | ||
| 223 | symhacks.h \ | ||
| 224 | tls1.h \ | ||
| 225 | tmdiff.h \ | ||
| 226 | txt_db.h \ | ||
| 227 | x509.h \ | ||
| 228 | x509_vfy.h \ | ||
| 229 | x509v3.h | ||
| 175 | 230 | ||
| 176 | 231 | ||
| 177 | .PATH: ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 ${LCRYPTO_SRC}/sha ${LCRYPTO_SRC}/mdc2 \ | 232 | .PATH: ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 ${LCRYPTO_SRC}/sha ${LCRYPTO_SRC}/mdc2 \ |
| @@ -183,7 +238,7 @@ HDRS= asn1.h dh.h md5.h rc4.h stack.h asn1_mac.h dsa.h mdc2.h rc5.h \ | |||
| 183 | ${LCRYPTO_SRC}/evp ${LCRYPTO_SRC}/pem ${LCRYPTO_SRC}/asn1 ${LCRYPTO_SRC}/asn1 \ | 238 | ${LCRYPTO_SRC}/evp ${LCRYPTO_SRC}/pem ${LCRYPTO_SRC}/asn1 ${LCRYPTO_SRC}/asn1 \ |
| 184 | ${LCRYPTO_SRC}/x509 ${LCRYPTO_SRC}/conf txt_db/txt_db.c ${LCRYPTO_SRC}/pkcs7 \ | 239 | ${LCRYPTO_SRC}/x509 ${LCRYPTO_SRC}/conf txt_db/txt_db.c ${LCRYPTO_SRC}/pkcs7 \ |
| 185 | ${LCRYPTO_SRC}/x509v3 ${LCRYPTO_SRC}/pkcs12 ${LCRYPTO_SRC}/comp \ | 240 | ${LCRYPTO_SRC}/x509v3 ${LCRYPTO_SRC}/pkcs12 ${LCRYPTO_SRC}/comp \ |
| 186 | ${LCRYPTO_SRC}/txt_db ${LCRYPTO_SRC} | 241 | ${LCRYPTO_SRC}/txt_db ${LCRYPTO_SRC}/md4 ${LCRYPTO_SRC}/engine ${LCRYPTO_SRC} |
| 187 | 242 | ||
| 188 | includes: | 243 | includes: |
| 189 | @test -d ${DESTDIR}/usr/include/ssl || mkdir ${DESTDIR}/usr/include/ssl | 244 | @test -d ${DESTDIR}/usr/include/ssl || mkdir ${DESTDIR}/usr/include/ssl |
diff --git a/src/lib/libssl/crypto/shlib_version b/src/lib/libssl/crypto/shlib_version index c87e1c60d4..c29621c831 100644 --- a/src/lib/libssl/crypto/shlib_version +++ b/src/lib/libssl/crypto/shlib_version | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | major=2 | 1 | major=2 |
| 2 | minor=4 | 2 | minor=5 |
diff --git a/src/lib/libssl/doc/openssl.txt b/src/lib/libssl/doc/openssl.txt index 880eace4da..5da519e7e4 100644 --- a/src/lib/libssl/doc/openssl.txt +++ b/src/lib/libssl/doc/openssl.txt | |||
| @@ -355,6 +355,24 @@ that would not make sense. It does support an additional issuer:copy option | |||
| 355 | that will copy all the subject alternative name values from the issuer | 355 | that will copy all the subject alternative name values from the issuer |
| 356 | certificate (if possible). | 356 | certificate (if possible). |
| 357 | 357 | ||
| 358 | Example: | ||
| 359 | |||
| 360 | issuserAltName = issuer:copy | ||
| 361 | |||
| 362 | Authority Info Access. | ||
| 363 | |||
| 364 | The authority information access extension gives details about how to access | ||
| 365 | certain information relating to the CA. Its syntax is accessOID;location | ||
| 366 | where 'location' has the same syntax as subject alternative name (except | ||
| 367 | that email:copy is not supported). accessOID can be any valid OID but only | ||
| 368 | certain values are meaningful for example OCSP and caIssuers. OCSP gives the | ||
| 369 | location of an OCSP responder: this is used by Netscape PSM and other software. | ||
| 370 | |||
| 371 | Example: | ||
| 372 | |||
| 373 | authorityInfoAccess = OCSP;URI:http://ocsp.my.host/ | ||
| 374 | authorityInfoAccess = caIssuers;URI:http://my.ca/ca.html | ||
| 375 | |||
| 358 | CRL distribution points. | 376 | CRL distribution points. |
| 359 | 377 | ||
| 360 | This is a multi-valued extension that supports all the literal options of | 378 | This is a multi-valued extension that supports all the literal options of |
| @@ -489,6 +507,47 @@ details about the structures returned. The returned structure should be freed | |||
| 489 | after use using the relevant free function, BASIC_CONSTRAINTS_free() for | 507 | after use using the relevant free function, BASIC_CONSTRAINTS_free() for |
| 490 | example. | 508 | example. |
| 491 | 509 | ||
| 510 | void * X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx); | ||
| 511 | void * X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx); | ||
| 512 | void * X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx); | ||
| 513 | void * X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx); | ||
| 514 | |||
| 515 | These functions combine the operations of searching for extensions and | ||
| 516 | parsing them. They search a certificate, a CRL a CRL entry or a stack | ||
| 517 | of extensions respectively for extension whose NID is 'nid' and return | ||
| 518 | the parsed result of NULL if an error occurred. For example: | ||
| 519 | |||
| 520 | BASIC_CONSTRAINTS *bs; | ||
| 521 | bs = X509_get_ext_d2i(cert, NID_basic_constraints, NULL, NULL); | ||
| 522 | |||
| 523 | This will search for the basicConstraints extension and either return | ||
| 524 | it value or NULL. NULL can mean either the extension was not found, it | ||
| 525 | occurred more than once or it could not be parsed. | ||
| 526 | |||
| 527 | If 'idx' is NULL then an extension is only parsed if it occurs precisely | ||
| 528 | once. This is standard behaviour because extensions normally cannot occur | ||
| 529 | more than once. If however more than one extension of the same type can | ||
| 530 | occur it can be used to parse successive extensions for example: | ||
| 531 | |||
| 532 | int i; | ||
| 533 | void *ext; | ||
| 534 | |||
| 535 | i = -1; | ||
| 536 | for(;;) { | ||
| 537 | ext = X509_get_ext_d2i(x, nid, crit, &idx); | ||
| 538 | if(ext == NULL) break; | ||
| 539 | /* Do something with ext */ | ||
| 540 | } | ||
| 541 | |||
| 542 | If 'crit' is not NULL and the extension was found then the int it points to | ||
| 543 | is set to 1 for critical extensions and 0 for non critical. Therefore if the | ||
| 544 | function returns NULL but 'crit' is set to 0 or 1 then the extension was | ||
| 545 | found but it could not be parsed. | ||
| 546 | |||
| 547 | The int pointed to by crit will be set to -1 if the extension was not found | ||
| 548 | and -2 if the extension occurred more than once (this will only happen if | ||
| 549 | idx is NULL). In both cases the function will return NULL. | ||
| 550 | |||
| 492 | 3. Generating extensions. | 551 | 3. Generating extensions. |
| 493 | 552 | ||
| 494 | An extension will typically be generated from a configuration file, or some | 553 | An extension will typically be generated from a configuration file, or some |
diff --git a/src/lib/libssl/doc/standards.txt b/src/lib/libssl/doc/standards.txt new file mode 100644 index 0000000000..61ccc5d7e0 --- /dev/null +++ b/src/lib/libssl/doc/standards.txt | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | Standards related to OpenSSL | ||
| 2 | ============================ | ||
| 3 | |||
| 4 | [Please, this is currently a draft. I made a first try at finding | ||
| 5 | documents that describe parts of what OpenSSL implements. There are | ||
| 6 | big gaps, and I've most certainly done something wrong. Please | ||
| 7 | correct whatever is... Also, this note should be removed when this | ||
| 8 | file is reaching a somewhat correct state. -- Richard Levitte] | ||
| 9 | |||
| 10 | |||
| 11 | All pointers in here will be either URL's or blobs of text borrowed | ||
| 12 | from miscellaneous indexes, like rfc-index.txt (index of RFCs), | ||
| 13 | 1id-index.txt (index of Internet drafts) and the like. | ||
| 14 | |||
| 15 | To find the latest possible RFCs, it's recommended to either browse | ||
| 16 | ftp://ftp.isi.edu/in-notes/ or go to http://www.rfc-editor.org/ and | ||
| 17 | use the search mechanism found there. | ||
| 18 | To find the latest possible Internet drafts, it's recommended to | ||
| 19 | browse ftp://ftp.isi.edu/internet-drafts/. | ||
| 20 | To find the latest possible PKCS, it's recommended to browse | ||
| 21 | http://www.rsasecurity.com/rsalabs/pkcs/. | ||
| 22 | |||
| 23 | |||
| 24 | Implemented: | ||
| 25 | ------------ | ||
| 26 | |||
| 27 | These are documents that describe things that are implemented in OpenSSL. | ||
| 28 | |||
| 29 | 1319 The MD2 Message-Digest Algorithm. B. Kaliski. April 1992. | ||
| 30 | (Format: TXT=25661 bytes) (Status: INFORMATIONAL) | ||
| 31 | |||
| 32 | 1320 The MD4 Message-Digest Algorithm. R. Rivest. April 1992. (Format: | ||
| 33 | TXT=32407 bytes) (Status: INFORMATIONAL) | ||
| 34 | |||
| 35 | 1321 The MD5 Message-Digest Algorithm. R. Rivest. April 1992. (Format: | ||
| 36 | TXT=35222 bytes) (Status: INFORMATIONAL) | ||
| 37 | |||
| 38 | 2246 The TLS Protocol Version 1.0. T. Dierks, C. Allen. January 1999. | ||
| 39 | (Format: TXT=170401 bytes) (Status: PROPOSED STANDARD) | ||
| 40 | |||
| 41 | 2268 A Description of the RC2(r) Encryption Algorithm. R. Rivest. | ||
| 42 | January 1998. (Format: TXT=19048 bytes) (Status: INFORMATIONAL) | ||
| 43 | |||
| 44 | 2314 PKCS 10: Certification Request Syntax Version 1.5. B. Kaliski. | ||
| 45 | March 1998. (Format: TXT=15814 bytes) (Status: INFORMATIONAL) | ||
| 46 | |||
| 47 | 2315 PKCS 7: Cryptographic Message Syntax Version 1.5. B. Kaliski. | ||
| 48 | March 1998. (Format: TXT=69679 bytes) (Status: INFORMATIONAL) | ||
| 49 | |||
| 50 | 2437 PKCS #1: RSA Cryptography Specifications Version 2.0. B. Kaliski, | ||
| 51 | J. Staddon. October 1998. (Format: TXT=73529 bytes) (Obsoletes | ||
| 52 | RFC2313) (Status: INFORMATIONAL) | ||
| 53 | |||
| 54 | 2459 Internet X.509 Public Key Infrastructure Certificate and CRL | ||
| 55 | Profile. R. Housley, W. Ford, W. Polk, D. Solo. January 1999. | ||
| 56 | (Format: TXT=278438 bytes) (Status: PROPOSED STANDARD) | ||
| 57 | |||
| 58 | PKCS#8: Private-Key Information Syntax Standard | ||
| 59 | |||
| 60 | PKCS#12: Personal Information Exchange Syntax Standard, version 1.0. | ||
| 61 | |||
| 62 | |||
| 63 | Related: | ||
| 64 | -------- | ||
| 65 | |||
| 66 | These are documents that are close to OpenSSL, for example the | ||
| 67 | STARTTLS documents. | ||
| 68 | |||
| 69 | 1421 Privacy Enhancement for Internet Electronic Mail: Part I: Message | ||
| 70 | Encryption and Authentication Procedures. J. Linn. February 1993. | ||
| 71 | (Format: TXT=103894 bytes) (Obsoletes RFC1113) (Status: PROPOSED | ||
| 72 | STANDARD) | ||
| 73 | |||
| 74 | 1422 Privacy Enhancement for Internet Electronic Mail: Part II: | ||
| 75 | Certificate-Based Key Management. S. Kent. February 1993. (Format: | ||
| 76 | TXT=86085 bytes) (Obsoletes RFC1114) (Status: PROPOSED STANDARD) | ||
| 77 | |||
| 78 | 1423 Privacy Enhancement for Internet Electronic Mail: Part III: | ||
| 79 | Algorithms, Modes, and Identifiers. D. Balenson. February 1993. | ||
| 80 | (Format: TXT=33277 bytes) (Obsoletes RFC1115) (Status: PROPOSED | ||
| 81 | STANDARD) | ||
| 82 | |||
| 83 | 1424 Privacy Enhancement for Internet Electronic Mail: Part IV: Key | ||
| 84 | Certification and Related Services. B. Kaliski. February 1993. | ||
| 85 | (Format: TXT=17537 bytes) (Status: PROPOSED STANDARD) | ||
| 86 | |||
| 87 | 2487 SMTP Service Extension for Secure SMTP over TLS. P. Hoffman. | ||
| 88 | January 1999. (Format: TXT=15120 bytes) (Status: PROPOSED STANDARD) | ||
| 89 | |||
| 90 | 2585 Internet X.509 Public Key Infrastructure Operational Protocols: | ||
| 91 | FTP and HTTP. R. Housley, P. Hoffman. May 1999. (Format: TXT=14813 | ||
| 92 | bytes) (Status: PROPOSED STANDARD) | ||
| 93 | |||
| 94 | 2595 Using TLS with IMAP, POP3 and ACAP. C. Newman. June 1999. | ||
| 95 | (Format: TXT=32440 bytes) (Status: PROPOSED STANDARD) | ||
| 96 | |||
| 97 | 2712 Addition of Kerberos Cipher Suites to Transport Layer Security | ||
| 98 | (TLS). A. Medvinsky, M. Hur. October 1999. (Format: TXT=13763 bytes) | ||
| 99 | (Status: PROPOSED STANDARD) | ||
| 100 | |||
| 101 | 2817 Upgrading to TLS Within HTTP/1.1. R. Khare, S. Lawrence. May | ||
| 102 | 2000. (Format: TXT=27598 bytes) (Updates RFC2616) (Status: PROPOSED | ||
| 103 | STANDARD) | ||
| 104 | |||
| 105 | 2818 HTTP Over TLS. E. Rescorla. May 2000. (Format: TXT=15170 bytes) | ||
| 106 | (Status: INFORMATIONAL) | ||
| 107 | |||
| 108 | "Securing FTP with TLS", 01/27/2000, <draft-murray-auth-ftp-ssl-05.txt> | ||
| 109 | |||
| 110 | |||
| 111 | To be implemented: | ||
| 112 | ------------------ | ||
| 113 | |||
| 114 | These are documents that describe things that are planed to be | ||
| 115 | implemented in the hopefully short future. | ||
| 116 | |||
| 117 | 2560 X.509 Internet Public Key Infrastructure Online Certificate | ||
| 118 | Status Protocol - OCSP. M. Myers, R. Ankney, A. Malpani, S. Galperin, | ||
| 119 | C. Adams. June 1999. (Format: TXT=43243 bytes) (Status: PROPOSED | ||
| 120 | STANDARD) | ||
| 121 | |||
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c index aaedf6a9bb..5050a13ef2 100644 --- a/src/lib/libssl/s23_clnt.c +++ b/src/lib/libssl/s23_clnt.c | |||
| @@ -366,7 +366,9 @@ static int ssl23_get_server_hello(SSL *s) | |||
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | s->state=SSL2_ST_GET_SERVER_HELLO_A; | 368 | s->state=SSL2_ST_GET_SERVER_HELLO_A; |
| 369 | s->s2->ssl2_rollback=1; | 369 | if (!(s->client_version == SSL2_VERSION)) |
| 370 | /* use special padding (SSL 3.0 draft/RFC 2246, App. E.2) */ | ||
| 371 | s->s2->ssl2_rollback=1; | ||
| 370 | 372 | ||
| 371 | /* setup the 5 bytes we have read so we get them from | 373 | /* setup the 5 bytes we have read so we get them from |
| 372 | * the sslv2 buffer */ | 374 | * the sslv2 buffer */ |
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c index 6a3bbb10b9..050618235f 100644 --- a/src/lib/libssl/s23_srvr.c +++ b/src/lib/libssl/s23_srvr.c | |||
| @@ -297,7 +297,7 @@ int ssl23_get_client_hello(SSL *s) | |||
| 297 | if (n <= 0) return(n); | 297 | if (n <= 0) return(n); |
| 298 | p=s->packet; | 298 | p=s->packet; |
| 299 | 299 | ||
| 300 | if ((buf=Malloc(n)) == NULL) | 300 | if ((buf=OPENSSL_malloc(n)) == NULL) |
| 301 | { | 301 | { |
| 302 | SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,ERR_R_MALLOC_FAILURE); | 302 | SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,ERR_R_MALLOC_FAILURE); |
| 303 | goto err; | 303 | goto err; |
| @@ -348,16 +348,21 @@ int ssl23_get_client_hello(SSL *s) | |||
| 348 | * SSLv3 or tls1 header | 348 | * SSLv3 or tls1 header |
| 349 | */ | 349 | */ |
| 350 | 350 | ||
| 351 | v[0]=p[1]; /* major version */ | 351 | v[0]=p[1]; /* major version (= SSL3_VERSION_MAJOR) */ |
| 352 | /* We must look at client_version inside the Client Hello message | 352 | /* We must look at client_version inside the Client Hello message |
| 353 | * to get the correct minor version: */ | 353 | * to get the correct minor version. |
| 354 | v[1]=p[10]; | 354 | * However if we have only a pathologically small fragment of the |
| 355 | /* However if we have only a pathologically small fragment of the | 355 | * Client Hello message, this would be difficult, we'd have |
| 356 | * Client Hello message, we simply use the version from the | 356 | * to read at least one additional record to find out. |
| 357 | * record header -- this is incorrect but unlikely to fail in | 357 | * This doesn't usually happen in real life, so we just complain |
| 358 | * practice */ | 358 | * for now. |
| 359 | */ | ||
| 359 | if (p[3] == 0 && p[4] < 6) | 360 | if (p[3] == 0 && p[4] < 6) |
| 360 | v[1]=p[2]; | 361 | { |
| 362 | SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_SMALL); | ||
| 363 | goto err; | ||
| 364 | } | ||
| 365 | v[1]=p[10]; /* minor version according to client_version */ | ||
| 361 | if (v[1] >= TLS1_VERSION_MINOR) | 366 | if (v[1] >= TLS1_VERSION_MINOR) |
| 362 | { | 367 | { |
| 363 | if (!(s->options & SSL_OP_NO_TLSv1)) | 368 | if (!(s->options & SSL_OP_NO_TLSv1)) |
| @@ -495,9 +500,12 @@ int ssl23_get_client_hello(SSL *s) | |||
| 495 | 500 | ||
| 496 | s->state=SSL2_ST_GET_CLIENT_HELLO_A; | 501 | s->state=SSL2_ST_GET_CLIENT_HELLO_A; |
| 497 | if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) || | 502 | if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) || |
| 498 | use_sslv2_strong) | 503 | use_sslv2_strong || |
| 504 | (s->options & SSL_OP_NO_TLSv1 && s->options & SSL_OP_NO_SSLv3)) | ||
| 499 | s->s2->ssl2_rollback=0; | 505 | s->s2->ssl2_rollback=0; |
| 500 | else | 506 | else |
| 507 | /* reject SSL 2.0 session if client supports SSL 3.0 or TLS 1.0 | ||
| 508 | * (SSL 3.0 draft/RFC 2246, App. E.2) */ | ||
| 501 | s->s2->ssl2_rollback=1; | 509 | s->s2->ssl2_rollback=1; |
| 502 | 510 | ||
| 503 | /* setup the n bytes we have read so we get them from | 511 | /* setup the n bytes we have read so we get them from |
| @@ -559,10 +567,10 @@ int ssl23_get_client_hello(SSL *s) | |||
| 559 | } | 567 | } |
| 560 | s->init_num=0; | 568 | s->init_num=0; |
| 561 | 569 | ||
| 562 | if (buf != buf_space) Free(buf); | 570 | if (buf != buf_space) OPENSSL_free(buf); |
| 563 | s->first_packet=1; | 571 | s->first_packet=1; |
| 564 | return(SSL_accept(s)); | 572 | return(SSL_accept(s)); |
| 565 | err: | 573 | err: |
| 566 | if (buf != buf_space) Free(buf); | 574 | if (buf != buf_space) OPENSSL_free(buf); |
| 567 | return(-1); | 575 | return(-1); |
| 568 | } | 576 | } |
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c index 03e0c38770..d92c164b0f 100644 --- a/src/lib/libssl/s3_both.c +++ b/src/lib/libssl/s3_both.c | |||
| @@ -567,7 +567,7 @@ int ssl3_setup_buffers(SSL *s) | |||
| 567 | extra=SSL3_RT_MAX_EXTRA; | 567 | extra=SSL3_RT_MAX_EXTRA; |
| 568 | else | 568 | else |
| 569 | extra=0; | 569 | extra=0; |
| 570 | if ((p=Malloc(SSL3_RT_MAX_PACKET_SIZE+extra)) | 570 | if ((p=OPENSSL_malloc(SSL3_RT_MAX_PACKET_SIZE+extra)) |
| 571 | == NULL) | 571 | == NULL) |
| 572 | goto err; | 572 | goto err; |
| 573 | s->s3->rbuf.buf=p; | 573 | s->s3->rbuf.buf=p; |
| @@ -575,7 +575,7 @@ int ssl3_setup_buffers(SSL *s) | |||
| 575 | 575 | ||
| 576 | if (s->s3->wbuf.buf == NULL) | 576 | if (s->s3->wbuf.buf == NULL) |
| 577 | { | 577 | { |
| 578 | if ((p=Malloc(SSL3_RT_MAX_PACKET_SIZE)) | 578 | if ((p=OPENSSL_malloc(SSL3_RT_MAX_PACKET_SIZE)) |
| 579 | == NULL) | 579 | == NULL) |
| 580 | goto err; | 580 | goto err; |
| 581 | s->s3->wbuf.buf=p; | 581 | s->s3->wbuf.buf=p; |
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index 0c8f551f73..62040f9f1d 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
| @@ -69,7 +69,7 @@ static SSL_METHOD *ssl3_get_client_method(int ver); | |||
| 69 | static int ssl3_client_hello(SSL *s); | 69 | static int ssl3_client_hello(SSL *s); |
| 70 | static int ssl3_get_server_hello(SSL *s); | 70 | static int ssl3_get_server_hello(SSL *s); |
| 71 | static int ssl3_get_certificate_request(SSL *s); | 71 | static int ssl3_get_certificate_request(SSL *s); |
| 72 | static int ca_dn_cmp(X509_NAME **a,X509_NAME **b); | 72 | static int ca_dn_cmp(const X509_NAME * const *a,const X509_NAME * const *b); |
| 73 | static int ssl3_get_server_done(SSL *s); | 73 | static int ssl3_get_server_done(SSL *s); |
| 74 | static int ssl3_send_client_verify(SSL *s); | 74 | static int ssl3_send_client_verify(SSL *s); |
| 75 | static int ssl3_send_client_certificate(SSL *s); | 75 | static int ssl3_send_client_certificate(SSL *s); |
| @@ -142,7 +142,12 @@ int ssl3_connect(SSL *s) | |||
| 142 | if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); | 142 | if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); |
| 143 | 143 | ||
| 144 | if ((s->version & 0xff00 ) != 0x0300) | 144 | if ((s->version & 0xff00 ) != 0x0300) |
| 145 | abort(); | 145 | { |
| 146 | SSLerr(SSL_F_SSL3_CONNECT, SSL_R_INTERNAL_ERROR); | ||
| 147 | ret = -1; | ||
| 148 | goto end; | ||
| 149 | } | ||
| 150 | |||
| 146 | /* s->version=SSL3_VERSION; */ | 151 | /* s->version=SSL3_VERSION; */ |
| 147 | s->type=SSL_ST_CONNECT; | 152 | s->type=SSL_ST_CONNECT; |
| 148 | 153 | ||
| @@ -764,6 +769,7 @@ static int ssl3_get_server_certificate(SSL *s) | |||
| 764 | SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); | 769 | SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); |
| 765 | goto f_err; | 770 | goto f_err; |
| 766 | } | 771 | } |
| 772 | ERR_clear_error(); /* but we keep s->verify_result */ | ||
| 767 | 773 | ||
| 768 | sc=ssl_sess_cert_new(); | 774 | sc=ssl_sess_cert_new(); |
| 769 | if (sc == NULL) goto err; | 775 | if (sc == NULL) goto err; |
| @@ -934,10 +940,12 @@ static int ssl3_get_key_exchange(SSL *s) | |||
| 934 | s->session->sess_cert->peer_rsa_tmp=rsa; | 940 | s->session->sess_cert->peer_rsa_tmp=rsa; |
| 935 | rsa=NULL; | 941 | rsa=NULL; |
| 936 | } | 942 | } |
| 937 | else | 943 | #else /* NO_RSA */ |
| 944 | if (0) | ||
| 945 | ; | ||
| 938 | #endif | 946 | #endif |
| 939 | #ifndef NO_DH | 947 | #ifndef NO_DH |
| 940 | if (alg & SSL_kEDH) | 948 | else if (alg & SSL_kEDH) |
| 941 | { | 949 | { |
| 942 | if ((dh=DH_new()) == NULL) | 950 | if ((dh=DH_new()) == NULL) |
| 943 | { | 951 | { |
| @@ -993,10 +1001,12 @@ static int ssl3_get_key_exchange(SSL *s) | |||
| 993 | #ifndef NO_RSA | 1001 | #ifndef NO_RSA |
| 994 | if (alg & SSL_aRSA) | 1002 | if (alg & SSL_aRSA) |
| 995 | pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509); | 1003 | pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509); |
| 996 | else | 1004 | #else |
| 1005 | if (0) | ||
| 1006 | ; | ||
| 997 | #endif | 1007 | #endif |
| 998 | #ifndef NO_DSA | 1008 | #ifndef NO_DSA |
| 999 | if (alg & SSL_aDSS) | 1009 | else if (alg & SSL_aDSS) |
| 1000 | pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_DSA_SIGN].x509); | 1010 | pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_DSA_SIGN].x509); |
| 1001 | #endif | 1011 | #endif |
| 1002 | /* else anonymous DH, so no certificate or pkey. */ | 1012 | /* else anonymous DH, so no certificate or pkey. */ |
| @@ -1010,7 +1020,7 @@ static int ssl3_get_key_exchange(SSL *s) | |||
| 1010 | SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER); | 1020 | SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER); |
| 1011 | goto f_err; | 1021 | goto f_err; |
| 1012 | } | 1022 | } |
| 1013 | #endif | 1023 | #endif /* !NO_DH */ |
| 1014 | if (alg & SSL_aFZA) | 1024 | if (alg & SSL_aFZA) |
| 1015 | { | 1025 | { |
| 1016 | al=SSL_AD_HANDSHAKE_FAILURE; | 1026 | al=SSL_AD_HANDSHAKE_FAILURE; |
| @@ -1274,7 +1284,7 @@ err: | |||
| 1274 | return(ret); | 1284 | return(ret); |
| 1275 | } | 1285 | } |
| 1276 | 1286 | ||
| 1277 | static int ca_dn_cmp(X509_NAME **a, X509_NAME **b) | 1287 | static int ca_dn_cmp(const X509_NAME * const *a, const X509_NAME * const *b) |
| 1278 | { | 1288 | { |
| 1279 | return(X509_NAME_cmp(*a,*b)); | 1289 | return(X509_NAME_cmp(*a,*b)); |
| 1280 | } | 1290 | } |
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 7ada26cbb6..cee2021b6b 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
| @@ -648,7 +648,7 @@ int ssl3_new(SSL *s) | |||
| 648 | { | 648 | { |
| 649 | SSL3_STATE *s3; | 649 | SSL3_STATE *s3; |
| 650 | 650 | ||
| 651 | if ((s3=Malloc(sizeof *s3)) == NULL) goto err; | 651 | if ((s3=OPENSSL_malloc(sizeof *s3)) == NULL) goto err; |
| 652 | memset(s3,0,sizeof *s3); | 652 | memset(s3,0,sizeof *s3); |
| 653 | 653 | ||
| 654 | s->s3=s3; | 654 | s->s3=s3; |
| @@ -666,11 +666,11 @@ void ssl3_free(SSL *s) | |||
| 666 | 666 | ||
| 667 | ssl3_cleanup_key_block(s); | 667 | ssl3_cleanup_key_block(s); |
| 668 | if (s->s3->rbuf.buf != NULL) | 668 | if (s->s3->rbuf.buf != NULL) |
| 669 | Free(s->s3->rbuf.buf); | 669 | OPENSSL_free(s->s3->rbuf.buf); |
| 670 | if (s->s3->wbuf.buf != NULL) | 670 | if (s->s3->wbuf.buf != NULL) |
| 671 | Free(s->s3->wbuf.buf); | 671 | OPENSSL_free(s->s3->wbuf.buf); |
| 672 | if (s->s3->rrec.comp != NULL) | 672 | if (s->s3->rrec.comp != NULL) |
| 673 | Free(s->s3->rrec.comp); | 673 | OPENSSL_free(s->s3->rrec.comp); |
| 674 | #ifndef NO_DH | 674 | #ifndef NO_DH |
| 675 | if (s->s3->tmp.dh != NULL) | 675 | if (s->s3->tmp.dh != NULL) |
| 676 | DH_free(s->s3->tmp.dh); | 676 | DH_free(s->s3->tmp.dh); |
| @@ -678,7 +678,7 @@ void ssl3_free(SSL *s) | |||
| 678 | if (s->s3->tmp.ca_names != NULL) | 678 | if (s->s3->tmp.ca_names != NULL) |
| 679 | sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free); | 679 | sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free); |
| 680 | memset(s->s3,0,sizeof *s->s3); | 680 | memset(s->s3,0,sizeof *s->s3); |
| 681 | Free(s->s3); | 681 | OPENSSL_free(s->s3); |
| 682 | s->s3=NULL; | 682 | s->s3=NULL; |
| 683 | } | 683 | } |
| 684 | 684 | ||
| @@ -692,7 +692,7 @@ void ssl3_clear(SSL *s) | |||
| 692 | 692 | ||
| 693 | if (s->s3->rrec.comp != NULL) | 693 | if (s->s3->rrec.comp != NULL) |
| 694 | { | 694 | { |
| 695 | Free(s->s3->rrec.comp); | 695 | OPENSSL_free(s->s3->rrec.comp); |
| 696 | s->s3->rrec.comp=NULL; | 696 | s->s3->rrec.comp=NULL; |
| 697 | } | 697 | } |
| 698 | #ifndef NO_DH | 698 | #ifndef NO_DH |
| @@ -1041,7 +1041,7 @@ SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p) | |||
| 1041 | cpp=(SSL_CIPHER **)OBJ_bsearch((char *)&cp, | 1041 | cpp=(SSL_CIPHER **)OBJ_bsearch((char *)&cp, |
| 1042 | (char *)sorted, | 1042 | (char *)sorted, |
| 1043 | SSL3_NUM_CIPHERS,sizeof(SSL_CIPHER *), | 1043 | SSL3_NUM_CIPHERS,sizeof(SSL_CIPHER *), |
| 1044 | (int (*)())ssl_cipher_ptr_id_cmp); | 1044 | FP_ICC ssl_cipher_ptr_id_cmp); |
| 1045 | if ((cpp == NULL) || !(*cpp)->valid) | 1045 | if ((cpp == NULL) || !(*cpp)->valid) |
| 1046 | return(NULL); | 1046 | return(NULL); |
| 1047 | else | 1047 | else |
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c index eb965310d9..1414079853 100644 --- a/src/lib/libssl/s3_pkt.c +++ b/src/lib/libssl/s3_pkt.c | |||
| @@ -899,19 +899,21 @@ start: | |||
| 899 | return(-1); | 899 | return(-1); |
| 900 | } | 900 | } |
| 901 | 901 | ||
| 902 | if (s->s3->rbuf.left == 0) /* no read-ahead left? */ | 902 | if (!(s->mode & SSL_MODE_AUTO_RETRY)) |
| 903 | { | 903 | { |
| 904 | BIO *bio; | 904 | if (s->s3->rbuf.left == 0) /* no read-ahead left? */ |
| 905 | /* In the case where we try to read application data | 905 | { |
| 906 | * the first time, but we trigger an SSL handshake, we | 906 | BIO *bio; |
| 907 | * return -1 with the retry option set. I do this | 907 | /* In the case where we try to read application data, |
| 908 | * otherwise renegotiation can cause nasty problems | 908 | * but we trigger an SSL handshake, we return -1 with |
| 909 | * in the blocking world */ /* ? */ | 909 | * the retry option set. Otherwise renegotiation may |
| 910 | s->rwstate=SSL_READING; | 910 | * cause nasty problems in the blocking world */ |
| 911 | bio=SSL_get_rbio(s); | 911 | s->rwstate=SSL_READING; |
| 912 | BIO_clear_retry_flags(bio); | 912 | bio=SSL_get_rbio(s); |
| 913 | BIO_set_retry_read(bio); | 913 | BIO_clear_retry_flags(bio); |
| 914 | return(-1); | 914 | BIO_set_retry_read(bio); |
| 915 | return(-1); | ||
| 916 | } | ||
| 915 | } | 917 | } |
| 916 | } | 918 | } |
| 917 | } | 919 | } |
| @@ -954,7 +956,7 @@ start: | |||
| 954 | s->rwstate=SSL_NOTHING; | 956 | s->rwstate=SSL_NOTHING; |
| 955 | s->s3->fatal_alert = alert_descr; | 957 | s->s3->fatal_alert = alert_descr; |
| 956 | SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr); | 958 | SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr); |
| 957 | sprintf(tmp,"%d",alert_descr); | 959 | BIO_snprintf(tmp,sizeof tmp,"%d",alert_descr); |
| 958 | ERR_add_error_data(2,"SSL alert number ",tmp); | 960 | ERR_add_error_data(2,"SSL alert number ",tmp); |
| 959 | s->shutdown|=SSL_RECEIVED_SHUTDOWN; | 961 | s->shutdown|=SSL_RECEIVED_SHUTDOWN; |
| 960 | SSL_CTX_remove_session(s->ctx,s->session); | 962 | SSL_CTX_remove_session(s->ctx,s->session); |
| @@ -1022,19 +1024,21 @@ start: | |||
| 1022 | return(-1); | 1024 | return(-1); |
| 1023 | } | 1025 | } |
| 1024 | 1026 | ||
| 1025 | if (s->s3->rbuf.left == 0) /* no read-ahead left? */ | 1027 | if (!(s->mode & SSL_MODE_AUTO_RETRY)) |
| 1026 | { | 1028 | { |
| 1027 | BIO *bio; | 1029 | if (s->s3->rbuf.left == 0) /* no read-ahead left? */ |
| 1028 | /* In the case where we try to read application data | 1030 | { |
| 1029 | * the first time, but we trigger an SSL handshake, we | 1031 | BIO *bio; |
| 1030 | * return -1 with the retry option set. I do this | 1032 | /* In the case where we try to read application data, |
| 1031 | * otherwise renegotiation can cause nasty problems | 1033 | * but we trigger an SSL handshake, we return -1 with |
| 1032 | * in the blocking world */ /* ? */ | 1034 | * the retry option set. Otherwise renegotiation may |
| 1033 | s->rwstate=SSL_READING; | 1035 | * cause nasty problems in the blocking world */ |
| 1034 | bio=SSL_get_rbio(s); | 1036 | s->rwstate=SSL_READING; |
| 1035 | BIO_clear_retry_flags(bio); | 1037 | bio=SSL_get_rbio(s); |
| 1036 | BIO_set_retry_read(bio); | 1038 | BIO_clear_retry_flags(bio); |
| 1037 | return(-1); | 1039 | BIO_set_retry_read(bio); |
| 1040 | return(-1); | ||
| 1041 | } | ||
| 1038 | } | 1042 | } |
| 1039 | goto start; | 1043 | goto start; |
| 1040 | } | 1044 | } |
diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c index e23ca20bd3..bb8cfb31e5 100644 --- a/src/lib/libssl/s3_srvr.c +++ b/src/lib/libssl/s3_srvr.c | |||
| @@ -153,7 +153,10 @@ int ssl3_accept(SSL *s) | |||
| 153 | if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); | 153 | if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); |
| 154 | 154 | ||
| 155 | if ((s->version>>8) != 3) | 155 | if ((s->version>>8) != 3) |
| 156 | abort(); | 156 | { |
| 157 | SSLerr(SSL_F_SSL3_ACCEPT, SSL_R_INTERNAL_ERROR); | ||
| 158 | return -1; | ||
| 159 | } | ||
| 157 | s->type=SSL_ST_ACCEPT; | 160 | s->type=SSL_ST_ACCEPT; |
| 158 | 161 | ||
| 159 | if (s->init_buf == NULL) | 162 | if (s->init_buf == NULL) |
| @@ -982,7 +985,7 @@ static int ssl3_send_server_key_exchange(SSL *s) | |||
| 982 | dhp=cert->dh_tmp; | 985 | dhp=cert->dh_tmp; |
| 983 | if ((dhp == NULL) && (s->cert->dh_tmp_cb != NULL)) | 986 | if ((dhp == NULL) && (s->cert->dh_tmp_cb != NULL)) |
| 984 | dhp=s->cert->dh_tmp_cb(s, | 987 | dhp=s->cert->dh_tmp_cb(s, |
| 985 | !SSL_C_IS_EXPORT(s->s3->tmp.new_cipher), | 988 | SSL_C_IS_EXPORT(s->s3->tmp.new_cipher), |
| 986 | SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)); | 989 | SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)); |
| 987 | if (dhp == NULL) | 990 | if (dhp == NULL) |
| 988 | { | 991 | { |
| @@ -1326,11 +1329,22 @@ static int ssl3_get_client_key_exchange(SSL *s) | |||
| 1326 | goto f_err; | 1329 | goto f_err; |
| 1327 | } | 1330 | } |
| 1328 | 1331 | ||
| 1329 | if ((p[0] != (s->client_version>>8)) || (p[1] != (s->client_version & 0xff))) | 1332 | if (!((p[0] == (s->client_version>>8)) && (p[1] == (s->client_version & 0xff)))) |
| 1330 | { | 1333 | { |
| 1331 | al=SSL_AD_DECODE_ERROR; | 1334 | /* The premaster secret must contain the same version number as the |
| 1332 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); | 1335 | * ClientHello to detect version rollback attacks (strangely, the |
| 1333 | goto f_err; | 1336 | * protocol does not offer such protection for DH ciphersuites). |
| 1337 | * However, buggy clients exist that send the negotiated protocol | ||
| 1338 | * version instead if the server does not support the requested | ||
| 1339 | * protocol version. | ||
| 1340 | * If SSL_OP_TLS_ROLLBACK_BUG is set, tolerate such clients. */ | ||
| 1341 | if (!((s->options & SSL_OP_TLS_ROLLBACK_BUG) && | ||
| 1342 | (p[0] == (s->version>>8)) && (p[1] == (s->version & 0xff)))) | ||
| 1343 | { | ||
| 1344 | al=SSL_AD_DECODE_ERROR; | ||
| 1345 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); | ||
| 1346 | goto f_err; | ||
| 1347 | } | ||
| 1334 | } | 1348 | } |
| 1335 | 1349 | ||
| 1336 | s->session->master_key_length= | 1350 | s->session->master_key_length= |
diff --git a/src/lib/libssl/shlib_version b/src/lib/libssl/shlib_version index c87e1c60d4..c29621c831 100644 --- a/src/lib/libssl/shlib_version +++ b/src/lib/libssl/shlib_version | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | major=2 | 1 | major=2 |
| 2 | minor=4 | 2 | minor=5 |
diff --git a/src/lib/libssl/src/CHANGES b/src/lib/libssl/src/CHANGES index bf61913d7b..87853c3b29 100644 --- a/src/lib/libssl/src/CHANGES +++ b/src/lib/libssl/src/CHANGES | |||
| @@ -2,6 +2,811 @@ | |||
| 2 | OpenSSL CHANGES | 2 | OpenSSL CHANGES |
| 3 | _______________ | 3 | _______________ |
| 4 | 4 | ||
| 5 | Changes between 0.9.5a and 0.9.6 [24 Sep 2000] | ||
| 6 | |||
| 7 | *) In ssl23_get_client_hello, generate an error message when faced | ||
| 8 | with an initial SSL 3.0/TLS record that is too small to contain the | ||
| 9 | first two bytes of the ClientHello message, i.e. client_version. | ||
| 10 | (Note that this is a pathologic case that probably has never happened | ||
| 11 | in real life.) The previous approach was to use the version number | ||
| 12 | from the record header as a substitute; but our protocol choice | ||
| 13 | should not depend on that one because it is not authenticated | ||
| 14 | by the Finished messages. | ||
| 15 | [Bodo Moeller] | ||
| 16 | |||
| 17 | *) More robust randomness gathering functions for Windows. | ||
| 18 | [Jeffrey Altman <jaltman@columbia.edu>] | ||
| 19 | |||
| 20 | *) For compatibility reasons if the flag X509_V_FLAG_ISSUER_CHECK is | ||
| 21 | not set then we don't setup the error code for issuer check errors | ||
| 22 | to avoid possibly overwriting other errors which the callback does | ||
| 23 | handle. If an application does set the flag then we assume it knows | ||
| 24 | what it is doing and can handle the new informational codes | ||
| 25 | appropriately. | ||
| 26 | [Steve Henson] | ||
| 27 | |||
| 28 | *) Fix for a nasty bug in ASN1_TYPE handling. ASN1_TYPE is used for | ||
| 29 | a general "ANY" type, as such it should be able to decode anything | ||
| 30 | including tagged types. However it didn't check the class so it would | ||
| 31 | wrongly interpret tagged types in the same way as their universal | ||
| 32 | counterpart and unknown types were just rejected. Changed so that the | ||
| 33 | tagged and unknown types are handled in the same way as a SEQUENCE: | ||
| 34 | that is the encoding is stored intact. There is also a new type | ||
| 35 | "V_ASN1_OTHER" which is used when the class is not universal, in this | ||
| 36 | case we have no idea what the actual type is so we just lump them all | ||
| 37 | together. | ||
| 38 | [Steve Henson] | ||
| 39 | |||
| 40 | *) On VMS, stdout may very well lead to a file that is written to | ||
| 41 | in a record-oriented fashion. That means that every write() will | ||
| 42 | write a separate record, which will be read separately by the | ||
| 43 | programs trying to read from it. This can be very confusing. | ||
| 44 | |||
| 45 | The solution is to put a BIO filter in the way that will buffer | ||
| 46 | text until a linefeed is reached, and then write everything a | ||
| 47 | line at a time, so every record written will be an actual line, | ||
| 48 | not chunks of lines and not (usually doesn't happen, but I've | ||
| 49 | seen it once) several lines in one record. BIO_f_linebuffer() is | ||
| 50 | the answer. | ||
| 51 | |||
| 52 | Currently, it's a VMS-only method, because that's where it has | ||
| 53 | been tested well enough. | ||
| 54 | [Richard Levitte] | ||
| 55 | |||
| 56 | *) Remove 'optimized' squaring variant in BN_mod_mul_montgomery, | ||
| 57 | it can return incorrect results. | ||
| 58 | (Note: The buggy variant was not enabled in OpenSSL 0.9.5a, | ||
| 59 | but it was in 0.9.6-beta[12].) | ||
| 60 | [Bodo Moeller] | ||
| 61 | |||
| 62 | *) Disable the check for content being present when verifying detached | ||
| 63 | signatures in pk7_smime.c. Some versions of Netscape (wrongly) | ||
| 64 | include zero length content when signing messages. | ||
| 65 | [Steve Henson] | ||
| 66 | |||
| 67 | *) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR | ||
| 68 | BIO_ctrl (for BIO pairs). | ||
| 69 | [Bodo Möller] | ||
| 70 | |||
| 71 | *) Add DSO method for VMS. | ||
| 72 | [Richard Levitte] | ||
| 73 | |||
| 74 | *) Bug fix: Montgomery multiplication could produce results with the | ||
| 75 | wrong sign. | ||
| 76 | [Ulf Möller] | ||
| 77 | |||
| 78 | *) Add RPM specification openssl.spec and modify it to build three | ||
| 79 | packages. The default package contains applications, application | ||
| 80 | documentation and run-time libraries. The devel package contains | ||
| 81 | include files, static libraries and function documentation. The | ||
| 82 | doc package contains the contents of the doc directory. The original | ||
| 83 | openssl.spec was provided by Damien Miller <djm@mindrot.org>. | ||
| 84 | [Richard Levitte] | ||
| 85 | |||
| 86 | *) Add a large number of documentation files for many SSL routines. | ||
| 87 | [Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>] | ||
| 88 | |||
| 89 | *) Add a configuration entry for Sony News 4. | ||
| 90 | [NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp>] | ||
| 91 | |||
| 92 | *) Don't set the two most significant bits to one when generating a | ||
| 93 | random number < q in the DSA library. | ||
| 94 | [Ulf Möller] | ||
| 95 | |||
| 96 | *) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default | ||
| 97 | behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if | ||
| 98 | the underlying transport is blocking) if a handshake took place. | ||
| 99 | (The default behaviour is needed by applications such as s_client | ||
| 100 | and s_server that use select() to determine when to use SSL_read; | ||
| 101 | but for applications that know in advance when to expect data, it | ||
| 102 | just makes things more complicated.) | ||
| 103 | [Bodo Moeller] | ||
| 104 | |||
| 105 | *) Add RAND_egd_bytes(), which gives control over the number of bytes read | ||
| 106 | from EGD. | ||
| 107 | [Ben Laurie] | ||
| 108 | |||
| 109 | *) Add a few more EBCDIC conditionals that make `req' and `x509' | ||
| 110 | work better on such systems. | ||
| 111 | [Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>] | ||
| 112 | |||
| 113 | *) Add two demo programs for PKCS12_parse() and PKCS12_create(). | ||
| 114 | Update PKCS12_parse() so it copies the friendlyName and the | ||
| 115 | keyid to the certificates aux info. | ||
| 116 | [Steve Henson] | ||
| 117 | |||
| 118 | *) Fix bug in PKCS7_verify() which caused an infinite loop | ||
| 119 | if there was more than one signature. | ||
| 120 | [Sven Uszpelkat <su@celocom.de>] | ||
| 121 | |||
| 122 | *) Major change in util/mkdef.pl to include extra information | ||
| 123 | about each symbol, as well as presentig variables as well | ||
| 124 | as functions. This change means that there's n more need | ||
| 125 | to rebuild the .num files when some algorithms are excluded. | ||
| 126 | [Richard Levitte] | ||
| 127 | |||
| 128 | *) Allow the verify time to be set by an application, | ||
| 129 | rather than always using the current time. | ||
| 130 | [Steve Henson] | ||
| 131 | |||
| 132 | *) Phase 2 verify code reorganisation. The certificate | ||
| 133 | verify code now looks up an issuer certificate by a | ||
| 134 | number of criteria: subject name, authority key id | ||
| 135 | and key usage. It also verifies self signed certificates | ||
| 136 | by the same criteria. The main comparison function is | ||
| 137 | X509_check_issued() which performs these checks. | ||
| 138 | |||
| 139 | Lot of changes were necessary in order to support this | ||
| 140 | without completely rewriting the lookup code. | ||
| 141 | |||
| 142 | Authority and subject key identifier are now cached. | ||
| 143 | |||
| 144 | The LHASH 'certs' is X509_STORE has now been replaced | ||
| 145 | by a STACK_OF(X509_OBJECT). This is mainly because an | ||
| 146 | LHASH can't store or retrieve multiple objects with | ||
| 147 | the same hash value. | ||
| 148 | |||
| 149 | As a result various functions (which were all internal | ||
| 150 | use only) have changed to handle the new X509_STORE | ||
| 151 | structure. This will break anything that messed round | ||
| 152 | with X509_STORE internally. | ||
| 153 | |||
| 154 | The functions X509_STORE_add_cert() now checks for an | ||
| 155 | exact match, rather than just subject name. | ||
| 156 | |||
| 157 | The X509_STORE API doesn't directly support the retrieval | ||
| 158 | of multiple certificates matching a given criteria, however | ||
| 159 | this can be worked round by performing a lookup first | ||
| 160 | (which will fill the cache with candidate certificates) | ||
| 161 | and then examining the cache for matches. This is probably | ||
| 162 | the best we can do without throwing out X509_LOOKUP | ||
| 163 | entirely (maybe later...). | ||
| 164 | |||
| 165 | The X509_VERIFY_CTX structure has been enhanced considerably. | ||
| 166 | |||
| 167 | All certificate lookup operations now go via a get_issuer() | ||
| 168 | callback. Although this currently uses an X509_STORE it | ||
| 169 | can be replaced by custom lookups. This is a simple way | ||
| 170 | to bypass the X509_STORE hackery necessary to make this | ||
| 171 | work and makes it possible to use more efficient techniques | ||
| 172 | in future. A very simple version which uses a simple | ||
| 173 | STACK for its trusted certificate store is also provided | ||
| 174 | using X509_STORE_CTX_trusted_stack(). | ||
| 175 | |||
| 176 | The verify_cb() and verify() callbacks now have equivalents | ||
| 177 | in the X509_STORE_CTX structure. | ||
| 178 | |||
| 179 | X509_STORE_CTX also has a 'flags' field which can be used | ||
| 180 | to customise the verify behaviour. | ||
| 181 | [Steve Henson] | ||
| 182 | |||
| 183 | *) Add new PKCS#7 signing option PKCS7_NOSMIMECAP which | ||
| 184 | excludes S/MIME capabilities. | ||
| 185 | [Steve Henson] | ||
| 186 | |||
| 187 | *) When a certificate request is read in keep a copy of the | ||
| 188 | original encoding of the signed data and use it when outputing | ||
| 189 | again. Signatures then use the original encoding rather than | ||
| 190 | a decoded, encoded version which may cause problems if the | ||
| 191 | request is improperly encoded. | ||
| 192 | [Steve Henson] | ||
| 193 | |||
| 194 | *) For consistency with other BIO_puts implementations, call | ||
| 195 | buffer_write(b, ...) directly in buffer_puts instead of calling | ||
| 196 | BIO_write(b, ...). | ||
| 197 | |||
| 198 | In BIO_puts, increment b->num_write as in BIO_write. | ||
| 199 | [Peter.Sylvester@EdelWeb.fr] | ||
| 200 | |||
| 201 | *) Fix BN_mul_word for the case where the word is 0. (We have to use | ||
| 202 | BN_zero, we may not return a BIGNUM with an array consisting of | ||
| 203 | words set to zero.) | ||
| 204 | [Bodo Moeller] | ||
| 205 | |||
| 206 | *) Avoid calling abort() from within the library when problems are | ||
| 207 | detected, except if preprocessor symbols have been defined | ||
| 208 | (such as REF_CHECK, BN_DEBUG etc.). | ||
| 209 | [Bodo Moeller] | ||
| 210 | |||
| 211 | *) New openssl application 'rsautl'. This utility can be | ||
| 212 | used for low level RSA operations. DER public key | ||
| 213 | BIO/fp routines also added. | ||
| 214 | [Steve Henson] | ||
| 215 | |||
| 216 | *) New Configure entry and patches for compiling on QNX 4. | ||
| 217 | [Andreas Schneider <andreas@ds3.etech.fh-hamburg.de>] | ||
| 218 | |||
| 219 | *) A demo state-machine implementation was sponsored by | ||
| 220 | Nuron (http://www.nuron.com/) and is now available in | ||
| 221 | demos/state_machine. | ||
| 222 | [Ben Laurie] | ||
| 223 | |||
| 224 | *) New options added to the 'dgst' utility for signature | ||
| 225 | generation and verification. | ||
| 226 | [Steve Henson] | ||
| 227 | |||
| 228 | *) Unrecognized PKCS#7 content types are now handled via a | ||
| 229 | catch all ASN1_TYPE structure. This allows unsupported | ||
| 230 | types to be stored as a "blob" and an application can | ||
| 231 | encode and decode it manually. | ||
| 232 | [Steve Henson] | ||
| 233 | |||
| 234 | *) Fix various signed/unsigned issues to make a_strex.c | ||
| 235 | compile under VC++. | ||
| 236 | [Oscar Jacobsson <oscar.jacobsson@celocom.com>] | ||
| 237 | |||
| 238 | *) ASN1 fixes. i2d_ASN1_OBJECT was not returning the correct | ||
| 239 | length if passed a buffer. ASN1_INTEGER_to_BN failed | ||
| 240 | if passed a NULL BN and its argument was negative. | ||
| 241 | [Steve Henson, pointed out by Sven Heiberg <sven@tartu.cyber.ee>] | ||
| 242 | |||
| 243 | *) Modification to PKCS#7 encoding routines to output definite | ||
| 244 | length encoding. Since currently the whole structures are in | ||
| 245 | memory there's not real point in using indefinite length | ||
| 246 | constructed encoding. However if OpenSSL is compiled with | ||
| 247 | the flag PKCS7_INDEFINITE_ENCODING the old form is used. | ||
| 248 | [Steve Henson] | ||
| 249 | |||
| 250 | *) Added BIO_vprintf() and BIO_vsnprintf(). | ||
| 251 | [Richard Levitte] | ||
| 252 | |||
| 253 | *) Added more prefixes to parse for in the the strings written | ||
| 254 | through a logging bio, to cover all the levels that are available | ||
| 255 | through syslog. The prefixes are now: | ||
| 256 | |||
| 257 | PANIC, EMERG, EMR => LOG_EMERG | ||
| 258 | ALERT, ALR => LOG_ALERT | ||
| 259 | CRIT, CRI => LOG_CRIT | ||
| 260 | ERROR, ERR => LOG_ERR | ||
| 261 | WARNING, WARN, WAR => LOG_WARNING | ||
| 262 | NOTICE, NOTE, NOT => LOG_NOTICE | ||
| 263 | INFO, INF => LOG_INFO | ||
| 264 | DEBUG, DBG => LOG_DEBUG | ||
| 265 | |||
| 266 | and as before, if none of those prefixes are present at the | ||
| 267 | beginning of the string, LOG_ERR is chosen. | ||
| 268 | |||
| 269 | On Win32, the LOG_* levels are mapped according to this: | ||
| 270 | |||
| 271 | LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR => EVENTLOG_ERROR_TYPE | ||
| 272 | LOG_WARNING => EVENTLOG_WARNING_TYPE | ||
| 273 | LOG_NOTICE, LOG_INFO, LOG_DEBUG => EVENTLOG_INFORMATION_TYPE | ||
| 274 | |||
| 275 | [Richard Levitte] | ||
| 276 | |||
| 277 | *) Made it possible to reconfigure with just the configuration | ||
| 278 | argument "reconf" or "reconfigure". The command line arguments | ||
| 279 | are stored in Makefile.ssl in the variable CONFIGURE_ARGS, | ||
| 280 | and are retrieved from there when reconfiguring. | ||
| 281 | [Richard Levitte] | ||
| 282 | |||
| 283 | *) MD4 implemented. | ||
| 284 | [Assar Westerlund <assar@sics.se>, Richard Levitte] | ||
| 285 | |||
| 286 | *) Add the arguments -CAfile and -CApath to the pkcs12 utility. | ||
| 287 | [Richard Levitte] | ||
| 288 | |||
| 289 | *) The obj_dat.pl script was messing up the sorting of object | ||
| 290 | names. The reason was that it compared the quoted version | ||
| 291 | of strings as a result "OCSP" > "OCSP Signing" because | ||
| 292 | " > SPACE. Changed script to store unquoted versions of | ||
| 293 | names and add quotes on output. It was also omitting some | ||
| 294 | names from the lookup table if they were given a default | ||
| 295 | value (that is if SN is missing it is given the same | ||
| 296 | value as LN and vice versa), these are now added on the | ||
| 297 | grounds that if an object has a name we should be able to | ||
| 298 | look it up. Finally added warning output when duplicate | ||
| 299 | short or long names are found. | ||
| 300 | [Steve Henson] | ||
| 301 | |||
| 302 | *) Changes needed for Tandem NSK. | ||
| 303 | [Scott Uroff <scott@xypro.com>] | ||
| 304 | |||
| 305 | *) Fix SSL 2.0 rollback checking: Due to an off-by-one error in | ||
| 306 | RSA_padding_check_SSLv23(), special padding was never detected | ||
| 307 | and thus the SSL 3.0/TLS 1.0 countermeasure against protocol | ||
| 308 | version rollback attacks was not effective. | ||
| 309 | |||
| 310 | In s23_clnt.c, don't use special rollback-attack detection padding | ||
| 311 | (RSA_SSLV23_PADDING) if SSL 2.0 is the only protocol enabled in the | ||
| 312 | client; similarly, in s23_srvr.c, don't do the rollback check if | ||
| 313 | SSL 2.0 is the only protocol enabled in the server. | ||
| 314 | [Bodo Moeller] | ||
| 315 | |||
| 316 | *) Make it possible to get hexdumps of unprintable data with 'openssl | ||
| 317 | asn1parse'. By implication, the functions ASN1_parse_dump() and | ||
| 318 | BIO_dump_indent() are added. | ||
| 319 | [Richard Levitte] | ||
| 320 | |||
| 321 | *) New functions ASN1_STRING_print_ex() and X509_NAME_print_ex() | ||
| 322 | these print out strings and name structures based on various | ||
| 323 | flags including RFC2253 support and proper handling of | ||
| 324 | multibyte characters. Added options to the 'x509' utility | ||
| 325 | to allow the various flags to be set. | ||
| 326 | [Steve Henson] | ||
| 327 | |||
| 328 | *) Various fixes to use ASN1_TIME instead of ASN1_UTCTIME. | ||
| 329 | Also change the functions X509_cmp_current_time() and | ||
| 330 | X509_gmtime_adj() work with an ASN1_TIME structure, | ||
| 331 | this will enable certificates using GeneralizedTime in validity | ||
| 332 | dates to be checked. | ||
| 333 | [Steve Henson] | ||
| 334 | |||
| 335 | *) Make the NEG_PUBKEY_BUG code (which tolerates invalid | ||
| 336 | negative public key encodings) on by default, | ||
| 337 | NO_NEG_PUBKEY_BUG can be set to disable it. | ||
| 338 | [Steve Henson] | ||
| 339 | |||
| 340 | *) New function c2i_ASN1_OBJECT() which acts on ASN1_OBJECT | ||
| 341 | content octets. An i2c_ASN1_OBJECT is unnecessary because | ||
| 342 | the encoding can be trivially obtained from the structure. | ||
| 343 | [Steve Henson] | ||
| 344 | |||
| 345 | *) crypto/err.c locking bugfix: Use write locks (CRYPTO_w_[un]lock), | ||
| 346 | not read locks (CRYPTO_r_[un]lock). | ||
| 347 | [Bodo Moeller] | ||
| 348 | |||
| 349 | *) A first attempt at creating official support for shared | ||
| 350 | libraries through configuration. I've kept it so the | ||
| 351 | default is static libraries only, and the OpenSSL programs | ||
| 352 | are always statically linked for now, but there are | ||
| 353 | preparations for dynamic linking in place. | ||
| 354 | This has been tested on Linux and True64. | ||
| 355 | [Richard Levitte] | ||
| 356 | |||
| 357 | *) Randomness polling function for Win9x, as described in: | ||
| 358 | Peter Gutmann, Software Generation of Practically Strong | ||
| 359 | Random Numbers. | ||
| 360 | [Ulf Möller] | ||
| 361 | |||
| 362 | *) Fix so PRNG is seeded in req if using an already existing | ||
| 363 | DSA key. | ||
| 364 | [Steve Henson] | ||
| 365 | |||
| 366 | *) New options to smime application. -inform and -outform | ||
| 367 | allow alternative formats for the S/MIME message including | ||
| 368 | PEM and DER. The -content option allows the content to be | ||
| 369 | specified separately. This should allow things like Netscape | ||
| 370 | form signing output easier to verify. | ||
| 371 | [Steve Henson] | ||
| 372 | |||
| 373 | *) Fix the ASN1 encoding of tags using the 'long form'. | ||
| 374 | [Steve Henson] | ||
| 375 | |||
| 376 | *) New ASN1 functions, i2c_* and c2i_* for INTEGER and BIT | ||
| 377 | STRING types. These convert content octets to and from the | ||
| 378 | underlying type. The actual tag and length octets are | ||
| 379 | already assumed to have been read in and checked. These | ||
| 380 | are needed because all other string types have virtually | ||
| 381 | identical handling apart from the tag. By having versions | ||
| 382 | of the ASN1 functions that just operate on content octets | ||
| 383 | IMPLICIT tagging can be handled properly. It also allows | ||
| 384 | the ASN1_ENUMERATED code to be cut down because ASN1_ENUMERATED | ||
| 385 | and ASN1_INTEGER are identical apart from the tag. | ||
| 386 | [Steve Henson] | ||
| 387 | |||
| 388 | *) Change the handling of OID objects as follows: | ||
| 389 | |||
| 390 | - New object identifiers are inserted in objects.txt, following | ||
| 391 | the syntax given in objects.README. | ||
| 392 | - objects.pl is used to process obj_mac.num and create a new | ||
| 393 | obj_mac.h. | ||
| 394 | - obj_dat.pl is used to create a new obj_dat.h, using the data in | ||
| 395 | obj_mac.h. | ||
| 396 | |||
| 397 | This is currently kind of a hack, and the perl code in objects.pl | ||
| 398 | isn't very elegant, but it works as I intended. The simplest way | ||
| 399 | to check that it worked correctly is to look in obj_dat.h and | ||
| 400 | check the array nid_objs and make sure the objects haven't moved | ||
| 401 | around (this is important!). Additions are OK, as well as | ||
| 402 | consistent name changes. | ||
| 403 | [Richard Levitte] | ||
| 404 | |||
| 405 | *) Add BSD-style MD5-based passwords to 'openssl passwd' (option '-1'). | ||
| 406 | [Bodo Moeller] | ||
| 407 | |||
| 408 | *) Addition of the command line parameter '-rand file' to 'openssl req'. | ||
| 409 | The given file adds to whatever has already been seeded into the | ||
| 410 | random pool through the RANDFILE configuration file option or | ||
| 411 | environment variable, or the default random state file. | ||
| 412 | [Richard Levitte] | ||
| 413 | |||
| 414 | *) mkstack.pl now sorts each macro group into lexical order. | ||
| 415 | Previously the output order depended on the order the files | ||
| 416 | appeared in the directory, resulting in needless rewriting | ||
| 417 | of safestack.h . | ||
| 418 | [Steve Henson] | ||
| 419 | |||
| 420 | *) Patches to make OpenSSL compile under Win32 again. Mostly | ||
| 421 | work arounds for the VC++ problem that it treats func() as | ||
| 422 | func(void). Also stripped out the parts of mkdef.pl that | ||
| 423 | added extra typesafe functions: these no longer exist. | ||
| 424 | [Steve Henson] | ||
| 425 | |||
| 426 | *) Reorganisation of the stack code. The macros are now all | ||
| 427 | collected in safestack.h . Each macro is defined in terms of | ||
| 428 | a "stack macro" of the form SKM_<name>(type, a, b). The | ||
| 429 | DEBUG_SAFESTACK is now handled in terms of function casts, | ||
| 430 | this has the advantage of retaining type safety without the | ||
| 431 | use of additional functions. If DEBUG_SAFESTACK is not defined | ||
| 432 | then the non typesafe macros are used instead. Also modified the | ||
| 433 | mkstack.pl script to handle the new form. Needs testing to see | ||
| 434 | if which (if any) compilers it chokes and maybe make DEBUG_SAFESTACK | ||
| 435 | the default if no major problems. Similar behaviour for ASN1_SET_OF | ||
| 436 | and PKCS12_STACK_OF. | ||
| 437 | [Steve Henson] | ||
| 438 | |||
| 439 | *) When some versions of IIS use the 'NET' form of private key the | ||
| 440 | key derivation algorithm is different. Normally MD5(password) is | ||
| 441 | used as a 128 bit RC4 key. In the modified case | ||
| 442 | MD5(MD5(password) + "SGCKEYSALT") is used insted. Added some | ||
| 443 | new functions i2d_RSA_NET(), d2i_RSA_NET() etc which are the same | ||
| 444 | as the old Netscape_RSA functions except they have an additional | ||
| 445 | 'sgckey' parameter which uses the modified algorithm. Also added | ||
| 446 | an -sgckey command line option to the rsa utility. Thanks to | ||
| 447 | Adrian Peck <bertie@ncipher.com> for posting details of the modified | ||
| 448 | algorithm to openssl-dev. | ||
| 449 | [Steve Henson] | ||
| 450 | |||
| 451 | *) The evp_local.h macros were using 'c.##kname' which resulted in | ||
| 452 | invalid expansion on some systems (SCO 5.0.5 for example). | ||
| 453 | Corrected to 'c.kname'. | ||
| 454 | [Phillip Porch <root@theporch.com>] | ||
| 455 | |||
| 456 | *) New X509_get1_email() and X509_REQ_get1_email() functions that return | ||
| 457 | a STACK of email addresses from a certificate or request, these look | ||
| 458 | in the subject name and the subject alternative name extensions and | ||
| 459 | omit any duplicate addresses. | ||
| 460 | [Steve Henson] | ||
| 461 | |||
| 462 | *) Re-implement BN_mod_exp2_mont using independent (and larger) windows. | ||
| 463 | This makes DSA verification about 2 % faster. | ||
| 464 | [Bodo Moeller] | ||
| 465 | |||
| 466 | *) Increase maximum window size in BN_mod_exp_... to 6 bits instead of 5 | ||
| 467 | (meaning that now 2^5 values will be precomputed, which is only 4 KB | ||
| 468 | plus overhead for 1024 bit moduli). | ||
| 469 | This makes exponentiations about 0.5 % faster for 1024 bit | ||
| 470 | exponents (as measured by "openssl speed rsa2048"). | ||
| 471 | [Bodo Moeller] | ||
| 472 | |||
| 473 | *) Rename memory handling macros to avoid conflicts with other | ||
| 474 | software: | ||
| 475 | Malloc => OPENSSL_malloc | ||
| 476 | Malloc_locked => OPENSSL_malloc_locked | ||
| 477 | Realloc => OPENSSL_realloc | ||
| 478 | Free => OPENSSL_free | ||
| 479 | [Richard Levitte] | ||
| 480 | |||
| 481 | *) New function BN_mod_exp_mont_word for small bases (roughly 15% | ||
| 482 | faster than BN_mod_exp_mont, i.e. 7% for a full DH exchange). | ||
| 483 | [Bodo Moeller] | ||
| 484 | |||
| 485 | *) CygWin32 support. | ||
| 486 | [John Jarvie <jjarvie@newsguy.com>] | ||
| 487 | |||
| 488 | *) The type-safe stack code has been rejigged. It is now only compiled | ||
| 489 | in when OpenSSL is configured with the DEBUG_SAFESTACK option and | ||
| 490 | by default all type-specific stack functions are "#define"d back to | ||
| 491 | standard stack functions. This results in more streamlined output | ||
| 492 | but retains the type-safety checking possibilities of the original | ||
| 493 | approach. | ||
| 494 | [Geoff Thorpe] | ||
| 495 | |||
| 496 | *) The STACK code has been cleaned up, and certain type declarations | ||
| 497 | that didn't make a lot of sense have been brought in line. This has | ||
| 498 | also involved a cleanup of sorts in safestack.h to more correctly | ||
| 499 | map type-safe stack functions onto their plain stack counterparts. | ||
| 500 | This work has also resulted in a variety of "const"ifications of | ||
| 501 | lots of the code, especially "_cmp" operations which should normally | ||
| 502 | be prototyped with "const" parameters anyway. | ||
| 503 | [Geoff Thorpe] | ||
| 504 | |||
| 505 | *) When generating bytes for the first time in md_rand.c, 'stir the pool' | ||
| 506 | by seeding with STATE_SIZE dummy bytes (with zero entropy count). | ||
| 507 | (The PRNG state consists of two parts, the large pool 'state' and 'md', | ||
| 508 | where all of 'md' is used each time the PRNG is used, but 'state' | ||
| 509 | is used only indexed by a cyclic counter. As entropy may not be | ||
| 510 | well distributed from the beginning, 'md' is important as a | ||
| 511 | chaining variable. However, the output function chains only half | ||
| 512 | of 'md', i.e. 80 bits. ssleay_rand_add, on the other hand, chains | ||
| 513 | all of 'md', and seeding with STATE_SIZE dummy bytes will result | ||
| 514 | in all of 'state' being rewritten, with the new values depending | ||
| 515 | on virtually all of 'md'. This overcomes the 80 bit limitation.) | ||
| 516 | [Bodo Moeller] | ||
| 517 | |||
| 518 | *) In ssl/s2_clnt.c and ssl/s3_clnt.c, call ERR_clear_error() when | ||
| 519 | the handshake is continued after ssl_verify_cert_chain(); | ||
| 520 | otherwise, if SSL_VERIFY_NONE is set, remaining error codes | ||
| 521 | can lead to 'unexplainable' connection aborts later. | ||
| 522 | [Bodo Moeller; problem tracked down by Lutz Jaenicke] | ||
| 523 | |||
| 524 | *) Major EVP API cipher revision. | ||
| 525 | Add hooks for extra EVP features. This allows various cipher | ||
| 526 | parameters to be set in the EVP interface. Support added for variable | ||
| 527 | key length ciphers via the EVP_CIPHER_CTX_set_key_length() function and | ||
| 528 | setting of RC2 and RC5 parameters. | ||
| 529 | |||
| 530 | Modify EVP_OpenInit() and EVP_SealInit() to cope with variable key length | ||
| 531 | ciphers. | ||
| 532 | |||
| 533 | Remove lots of duplicated code from the EVP library. For example *every* | ||
| 534 | cipher init() function handles the 'iv' in the same way according to the | ||
| 535 | cipher mode. They also all do nothing if the 'key' parameter is NULL and | ||
| 536 | for CFB and OFB modes they zero ctx->num. | ||
| 537 | |||
| 538 | New functionality allows removal of S/MIME code RC2 hack. | ||
| 539 | |||
| 540 | Most of the routines have the same form and so can be declared in terms | ||
| 541 | of macros. | ||
| 542 | |||
| 543 | By shifting this to the top level EVP_CipherInit() it can be removed from | ||
| 544 | all individual ciphers. If the cipher wants to handle IVs or keys | ||
| 545 | differently it can set the EVP_CIPH_CUSTOM_IV or EVP_CIPH_ALWAYS_CALL_INIT | ||
| 546 | flags. | ||
| 547 | |||
| 548 | Change lots of functions like EVP_EncryptUpdate() to now return a | ||
| 549 | value: although software versions of the algorithms cannot fail | ||
| 550 | any installed hardware versions can. | ||
| 551 | [Steve Henson] | ||
| 552 | |||
| 553 | *) Implement SSL_OP_TLS_ROLLBACK_BUG: In ssl3_get_client_key_exchange, if | ||
| 554 | this option is set, tolerate broken clients that send the negotiated | ||
| 555 | protocol version number instead of the requested protocol version | ||
| 556 | number. | ||
| 557 | [Bodo Moeller] | ||
| 558 | |||
| 559 | *) Call dh_tmp_cb (set by ..._TMP_DH_CB) with correct 'is_export' flag; | ||
| 560 | i.e. non-zero for export ciphersuites, zero otherwise. | ||
| 561 | Previous versions had this flag inverted, inconsistent with | ||
| 562 | rsa_tmp_cb (..._TMP_RSA_CB). | ||
| 563 | [Bodo Moeller; problem reported by Amit Chopra] | ||
| 564 | |||
| 565 | *) Add missing DSA library text string. Work around for some IIS | ||
| 566 | key files with invalid SEQUENCE encoding. | ||
| 567 | [Steve Henson] | ||
| 568 | |||
| 569 | *) Add a document (doc/standards.txt) that list all kinds of standards | ||
| 570 | and so on that are implemented in OpenSSL. | ||
| 571 | [Richard Levitte] | ||
| 572 | |||
| 573 | *) Enhance c_rehash script. Old version would mishandle certificates | ||
| 574 | with the same subject name hash and wouldn't handle CRLs at all. | ||
| 575 | Added -fingerprint option to crl utility, to support new c_rehash | ||
| 576 | features. | ||
| 577 | [Steve Henson] | ||
| 578 | |||
| 579 | *) Eliminate non-ANSI declarations in crypto.h and stack.h. | ||
| 580 | [Ulf Möller] | ||
| 581 | |||
| 582 | *) Fix for SSL server purpose checking. Server checking was | ||
| 583 | rejecting certificates which had extended key usage present | ||
| 584 | but no ssl client purpose. | ||
| 585 | [Steve Henson, reported by Rene Grosser <grosser@hisolutions.com>] | ||
| 586 | |||
| 587 | *) Make PKCS#12 code work with no password. The PKCS#12 spec | ||
| 588 | is a little unclear about how a blank password is handled. | ||
| 589 | Since the password in encoded as a BMPString with terminating | ||
| 590 | double NULL a zero length password would end up as just the | ||
| 591 | double NULL. However no password at all is different and is | ||
| 592 | handled differently in the PKCS#12 key generation code. NS | ||
| 593 | treats a blank password as zero length. MSIE treats it as no | ||
| 594 | password on export: but it will try both on import. We now do | ||
| 595 | the same: PKCS12_parse() tries zero length and no password if | ||
| 596 | the password is set to "" or NULL (NULL is now a valid password: | ||
| 597 | it wasn't before) as does the pkcs12 application. | ||
| 598 | [Steve Henson] | ||
| 599 | |||
| 600 | *) Bugfixes in apps/x509.c: Avoid a memory leak; and don't use | ||
| 601 | perror when PEM_read_bio_X509_REQ fails, the error message must | ||
| 602 | be obtained from the error queue. | ||
| 603 | [Bodo Moeller] | ||
| 604 | |||
| 605 | *) Avoid 'thread_hash' memory leak in crypto/err/err.c by freeing | ||
| 606 | it in ERR_remove_state if appropriate, and change ERR_get_state | ||
| 607 | accordingly to avoid race conditions (this is necessary because | ||
| 608 | thread_hash is no longer constant once set). | ||
| 609 | [Bodo Moeller] | ||
| 610 | |||
| 611 | *) Bugfix for linux-elf makefile.one. | ||
| 612 | [Ulf Möller] | ||
| 613 | |||
| 614 | *) RSA_get_default_method() will now cause a default | ||
| 615 | RSA_METHOD to be chosen if one doesn't exist already. | ||
| 616 | Previously this was only set during a call to RSA_new() | ||
| 617 | or RSA_new_method(NULL) meaning it was possible for | ||
| 618 | RSA_get_default_method() to return NULL. | ||
| 619 | [Geoff Thorpe] | ||
| 620 | |||
| 621 | *) Added native name translation to the existing DSO code | ||
| 622 | that will convert (if the flag to do so is set) filenames | ||
| 623 | that are sufficiently small and have no path information | ||
| 624 | into a canonical native form. Eg. "blah" converted to | ||
| 625 | "libblah.so" or "blah.dll" etc. | ||
| 626 | [Geoff Thorpe] | ||
| 627 | |||
| 628 | *) New function ERR_error_string_n(e, buf, len) which is like | ||
| 629 | ERR_error_string(e, buf), but writes at most 'len' bytes | ||
| 630 | including the 0 terminator. For ERR_error_string_n, 'buf' | ||
| 631 | may not be NULL. | ||
| 632 | [Damien Miller <djm@mindrot.org>, Bodo Moeller] | ||
| 633 | |||
| 634 | *) CONF library reworked to become more general. A new CONF | ||
| 635 | configuration file reader "class" is implemented as well as a | ||
| 636 | new functions (NCONF_*, for "New CONF") to handle it. The now | ||
| 637 | old CONF_* functions are still there, but are reimplemented to | ||
| 638 | work in terms of the new functions. Also, a set of functions | ||
| 639 | to handle the internal storage of the configuration data is | ||
| 640 | provided to make it easier to write new configuration file | ||
| 641 | reader "classes" (I can definitely see something reading a | ||
| 642 | configuration file in XML format, for example), called _CONF_*, | ||
| 643 | or "the configuration storage API"... | ||
| 644 | |||
| 645 | The new configuration file reading functions are: | ||
| 646 | |||
| 647 | NCONF_new, NCONF_free, NCONF_load, NCONF_load_fp, NCONF_load_bio, | ||
| 648 | NCONF_get_section, NCONF_get_string, NCONF_get_numbre | ||
| 649 | |||
| 650 | NCONF_default, NCONF_WIN32 | ||
| 651 | |||
| 652 | NCONF_dump_fp, NCONF_dump_bio | ||
| 653 | |||
| 654 | NCONF_default and NCONF_WIN32 are method (or "class") choosers, | ||
| 655 | NCONF_new creates a new CONF object. This works in the same way | ||
| 656 | as other interfaces in OpenSSL, like the BIO interface. | ||
| 657 | NCONF_dump_* dump the internal storage of the configuration file, | ||
| 658 | which is useful for debugging. All other functions take the same | ||
| 659 | arguments as the old CONF_* functions wth the exception of the | ||
| 660 | first that must be a `CONF *' instead of a `LHASH *'. | ||
| 661 | |||
| 662 | To make it easer to use the new classes with the old CONF_* functions, | ||
| 663 | the function CONF_set_default_method is provided. | ||
| 664 | [Richard Levitte] | ||
| 665 | |||
| 666 | *) Add '-tls1' option to 'openssl ciphers', which was already | ||
| 667 | mentioned in the documentation but had not been implemented. | ||
| 668 | (This option is not yet really useful because even the additional | ||
| 669 | experimental TLS 1.0 ciphers are currently treated as SSL 3.0 ciphers.) | ||
| 670 | [Bodo Moeller] | ||
| 671 | |||
| 672 | *) Initial DSO code added into libcrypto for letting OpenSSL (and | ||
| 673 | OpenSSL-based applications) load shared libraries and bind to | ||
| 674 | them in a portable way. | ||
| 675 | [Geoff Thorpe, with contributions from Richard Levitte] | ||
| 676 | |||
| 677 | Changes between 0.9.5 and 0.9.5a [1 Apr 2000] | ||
| 678 | |||
| 679 | *) Make sure _lrotl and _lrotr are only used with MSVC. | ||
| 680 | |||
| 681 | *) Use lock CRYPTO_LOCK_RAND correctly in ssleay_rand_status | ||
| 682 | (the default implementation of RAND_status). | ||
| 683 | |||
| 684 | *) Rename openssl x509 option '-crlext', which was added in 0.9.5, | ||
| 685 | to '-clrext' (= clear extensions), as intended and documented. | ||
| 686 | [Bodo Moeller; inconsistency pointed out by Michael Attili | ||
| 687 | <attili@amaxo.com>] | ||
| 688 | |||
| 689 | *) Fix for HMAC. It wasn't zeroing the rest of the block if the key length | ||
| 690 | was larger than the MD block size. | ||
| 691 | [Steve Henson, pointed out by Yost William <YostW@tce.com>] | ||
| 692 | |||
| 693 | *) Modernise PKCS12_parse() so it uses STACK_OF(X509) for its ca argument | ||
| 694 | fix a leak when the ca argument was passed as NULL. Stop X509_PUBKEY_set() | ||
| 695 | using the passed key: if the passed key was a private key the result | ||
| 696 | of X509_print(), for example, would be to print out all the private key | ||
| 697 | components. | ||
| 698 | [Steve Henson] | ||
| 699 | |||
| 700 | *) des_quad_cksum() byte order bug fix. | ||
| 701 | [Ulf Möller, using the problem description in krb4-0.9.7, where | ||
| 702 | the solution is attributed to Derrick J Brashear <shadow@DEMENTIA.ORG>] | ||
| 703 | |||
| 704 | *) Fix so V_ASN1_APP_CHOOSE works again: however its use is strongly | ||
| 705 | discouraged. | ||
| 706 | [Steve Henson, pointed out by Brian Korver <briank@cs.stanford.edu>] | ||
| 707 | |||
| 708 | *) For easily testing in shell scripts whether some command | ||
| 709 | 'openssl XXX' exists, the new pseudo-command 'openssl no-XXX' | ||
| 710 | returns with exit code 0 iff no command of the given name is available. | ||
| 711 | 'no-XXX' is printed in this case, 'XXX' otherwise. In both cases, | ||
| 712 | the output goes to stdout and nothing is printed to stderr. | ||
| 713 | Additional arguments are always ignored. | ||
| 714 | |||
| 715 | Since for each cipher there is a command of the same name, | ||
| 716 | the 'no-cipher' compilation switches can be tested this way. | ||
| 717 | |||
| 718 | ('openssl no-XXX' is not able to detect pseudo-commands such | ||
| 719 | as 'quit', 'list-XXX-commands', or 'no-XXX' itself.) | ||
| 720 | [Bodo Moeller] | ||
| 721 | |||
| 722 | *) Update test suite so that 'make test' succeeds in 'no-rsa' configuration. | ||
| 723 | [Bodo Moeller] | ||
| 724 | |||
| 725 | *) For SSL_[CTX_]set_tmp_dh, don't create a DH key if SSL_OP_SINGLE_DH_USE | ||
| 726 | is set; it will be thrown away anyway because each handshake creates | ||
| 727 | its own key. | ||
| 728 | ssl_cert_dup, which is used by SSL_new, now copies DH keys in addition | ||
| 729 | to parameters -- in previous versions (since OpenSSL 0.9.3) the | ||
| 730 | 'default key' from SSL_CTX_set_tmp_dh would always be lost, meanining | ||
| 731 | you effectivly got SSL_OP_SINGLE_DH_USE when using this macro. | ||
| 732 | [Bodo Moeller] | ||
| 733 | |||
| 734 | *) New s_client option -ign_eof: EOF at stdin is ignored, and | ||
| 735 | 'Q' and 'R' lose their special meanings (quit/renegotiate). | ||
| 736 | This is part of what -quiet does; unlike -quiet, -ign_eof | ||
| 737 | does not suppress any output. | ||
| 738 | [Richard Levitte] | ||
| 739 | |||
| 740 | *) Add compatibility options to the purpose and trust code. The | ||
| 741 | purpose X509_PURPOSE_ANY is "any purpose" which automatically | ||
| 742 | accepts a certificate or CA, this was the previous behaviour, | ||
| 743 | with all the associated security issues. | ||
| 744 | |||
| 745 | X509_TRUST_COMPAT is the old trust behaviour: only and | ||
| 746 | automatically trust self signed roots in certificate store. A | ||
| 747 | new trust setting X509_TRUST_DEFAULT is used to specify that | ||
| 748 | a purpose has no associated trust setting and it should instead | ||
| 749 | use the value in the default purpose. | ||
| 750 | [Steve Henson] | ||
| 751 | |||
| 752 | *) Fix the PKCS#8 DSA private key code so it decodes keys again | ||
| 753 | and fix a memory leak. | ||
| 754 | [Steve Henson] | ||
| 755 | |||
| 756 | *) In util/mkerr.pl (which implements 'make errors'), preserve | ||
| 757 | reason strings from the previous version of the .c file, as | ||
| 758 | the default to have only downcase letters (and digits) in | ||
| 759 | automatically generated reasons codes is not always appropriate. | ||
| 760 | [Bodo Moeller] | ||
| 761 | |||
| 762 | *) In ERR_load_ERR_strings(), build an ERR_LIB_SYS error reason table | ||
| 763 | using strerror. Previously, ERR_reason_error_string() returned | ||
| 764 | library names as reason strings for SYSerr; but SYSerr is a special | ||
| 765 | case where small numbers are errno values, not library numbers. | ||
| 766 | [Bodo Moeller] | ||
| 767 | |||
| 768 | *) Add '-dsaparam' option to 'openssl dhparam' application. This | ||
| 769 | converts DSA parameters into DH parameters. (When creating parameters, | ||
| 770 | DSA_generate_parameters is used.) | ||
| 771 | [Bodo Moeller] | ||
| 772 | |||
| 773 | *) Include 'length' (recommended exponent length) in C code generated | ||
| 774 | by 'openssl dhparam -C'. | ||
| 775 | [Bodo Moeller] | ||
| 776 | |||
| 777 | *) The second argument to set_label in perlasm was already being used | ||
| 778 | so couldn't be used as a "file scope" flag. Moved to third argument | ||
| 779 | which was free. | ||
| 780 | [Steve Henson] | ||
| 781 | |||
| 782 | *) In PEM_ASN1_write_bio and some other functions, use RAND_pseudo_bytes | ||
| 783 | instead of RAND_bytes for encryption IVs and salts. | ||
| 784 | [Bodo Moeller] | ||
| 785 | |||
| 786 | *) Include RAND_status() into RAND_METHOD instead of implementing | ||
| 787 | it only for md_rand.c Otherwise replacing the PRNG by calling | ||
| 788 | RAND_set_rand_method would be impossible. | ||
| 789 | [Bodo Moeller] | ||
| 790 | |||
| 791 | *) Don't let DSA_generate_key() enter an infinite loop if the random | ||
| 792 | number generation fails. | ||
| 793 | [Bodo Moeller] | ||
| 794 | |||
| 795 | *) New 'rand' application for creating pseudo-random output. | ||
| 796 | [Bodo Moeller] | ||
| 797 | |||
| 798 | *) Added configuration support for Linux/IA64 | ||
| 799 | [Rolf Haberrecker <rolf@suse.de>] | ||
| 800 | |||
| 801 | *) Assembler module support for Mingw32. | ||
| 802 | [Ulf Möller] | ||
| 803 | |||
| 804 | *) Shared library support for HPUX (in shlib/). | ||
| 805 | [Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> and Anonymous] | ||
| 806 | |||
| 807 | *) Shared library support for Solaris gcc. | ||
| 808 | [Lutz Behnke <behnke@trustcenter.de>] | ||
| 809 | |||
| 5 | Changes between 0.9.4 and 0.9.5 [28 Feb 2000] | 810 | Changes between 0.9.4 and 0.9.5 [28 Feb 2000] |
| 6 | 811 | ||
| 7 | *) PKCS7_encrypt() was adding text MIME headers twice because they | 812 | *) PKCS7_encrypt() was adding text MIME headers twice because they |
| @@ -510,11 +1315,11 @@ | |||
| 510 | 1315 | ||
| 511 | With these changes, a new set of functions and macros have appeared: | 1316 | With these changes, a new set of functions and macros have appeared: |
| 512 | 1317 | ||
| 513 | CRYPTO_set_mem_debug_functions() [F] | 1318 | CRYPTO_set_mem_debug_functions() [F] |
| 514 | CRYPTO_get_mem_debug_functions() [F] | 1319 | CRYPTO_get_mem_debug_functions() [F] |
| 515 | CRYPTO_dbg_set_options() [F] | 1320 | CRYPTO_dbg_set_options() [F] |
| 516 | CRYPTO_dbg_get_options() [F] | 1321 | CRYPTO_dbg_get_options() [F] |
| 517 | CRYPTO_malloc_debug_init() [M] | 1322 | CRYPTO_malloc_debug_init() [M] |
| 518 | 1323 | ||
| 519 | The memory debug functions are NULL by default, unless the library | 1324 | The memory debug functions are NULL by default, unless the library |
| 520 | is compiled with CRYPTO_MDEBUG or friends is defined. If someone | 1325 | is compiled with CRYPTO_MDEBUG or friends is defined. If someone |
diff --git a/src/lib/libssl/src/Configure b/src/lib/libssl/src/Configure index 2cd716b423..5513b434e2 100644 --- a/src/lib/libssl/src/Configure +++ b/src/lib/libssl/src/Configure | |||
| @@ -10,7 +10,7 @@ use strict; | |||
| 10 | 10 | ||
| 11 | # see INSTALL for instructions. | 11 | # see INSTALL for instructions. |
| 12 | 12 | ||
| 13 | my $usage="Usage: Configure [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [rsaref] [no-threads] [no-asm] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n"; | 13 | my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [rsaref] [no-threads] [no-asm] [no-dso] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n"; |
| 14 | 14 | ||
| 15 | # Options: | 15 | # Options: |
| 16 | # | 16 | # |
| @@ -23,15 +23,30 @@ my $usage="Usage: Configure [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [rsaref] [no | |||
| 23 | # default). This needn't be set in advance, you can | 23 | # default). This needn't be set in advance, you can |
| 24 | # just as well use "make INSTALL_PREFIX=/whatever install". | 24 | # just as well use "make INSTALL_PREFIX=/whatever install". |
| 25 | # | 25 | # |
| 26 | # no-hw-xxx do not compile support for specific crypto hardware. | ||
| 27 | # Generic OpenSSL-style methods relating to this support | ||
| 28 | # are always compiled but return NULL if the hardware | ||
| 29 | # support isn't compiled. | ||
| 30 | # no-hw do not compile support for any crypto hardware. | ||
| 26 | # rsaref use RSAref | 31 | # rsaref use RSAref |
| 27 | # [no-]threads [don't] try to create a library that is suitable for | 32 | # [no-]threads [don't] try to create a library that is suitable for |
| 28 | # multithreaded applications (default is "threads" if we | 33 | # multithreaded applications (default is "threads" if we |
| 29 | # know how to do it) | 34 | # know how to do it) |
| 35 | # [no-]shared [don't] try to create shared libraries when supported. | ||
| 36 | # IT IS NOT RECOMMENDED TO USE "shared"! Since this is a | ||
| 37 | # development branch, the positions of the ENGINE symbols | ||
| 38 | # in the transfer vector are constantly moving, so binary | ||
| 39 | # backward compatibility can't be guaranteed in any way. | ||
| 30 | # no-asm do not use assembler | 40 | # no-asm do not use assembler |
| 41 | # no-dso do not compile in any native shared-library methods. This | ||
| 42 | # will ensure that all methods just return NULL. | ||
| 31 | # 386 generate 80386 code | 43 | # 386 generate 80386 code |
| 32 | # no-<cipher> build without specified algorithm (rsa, idea, rc5, ...) | 44 | # no-<cipher> build without specified algorithm (rsa, idea, rc5, ...) |
| 33 | # -<xxx> +<xxx> compiler options are passed through | 45 | # -<xxx> +<xxx> compiler options are passed through |
| 34 | # | 46 | # |
| 47 | # DEBUG_SAFESTACK use type-safe stacks to enforce type-safety on stack items | ||
| 48 | # provided to stack calls. Generates unique stack functions for | ||
| 49 | # each possible stack type. | ||
| 35 | # DES_PTR use pointer lookup vs arrays in the DES in crypto/des/des_locl.h | 50 | # DES_PTR use pointer lookup vs arrays in the DES in crypto/des/des_locl.h |
| 36 | # DES_RISC1 use different DES_ENCRYPT macro that helps reduce register | 51 | # DES_RISC1 use different DES_ENCRYPT macro that helps reduce register |
| 37 | # dependancies but needs to more registers, good for RISC CPU's | 52 | # dependancies but needs to more registers, good for RISC CPU's |
| @@ -86,25 +101,29 @@ my $x86_bsdi_asm="asm/bn86bsdi.o asm/co86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:as | |||
| 86 | # -DB_ENDIAN slows things down on a sparc for md5, but helps sha1. | 101 | # -DB_ENDIAN slows things down on a sparc for md5, but helps sha1. |
| 87 | # So the md5_locl.h file has an undef B_ENDIAN if sun is defined | 102 | # So the md5_locl.h file has an undef B_ENDIAN if sun is defined |
| 88 | 103 | ||
| 89 | #config-string $cc : $cflags : $unistd : $thread_cflag : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj | 104 | #config-string $cc : $cflags : $unistd : $thread_cflag : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag |
| 90 | 105 | ||
| 91 | my %table=( | 106 | my %table=( |
| 92 | #"b", "$tcc:$tflags::$tlib:$bits1:$tbn_mul::", | 107 | # File 'TABLE' (created by 'make TABLE') contains the data from this list, |
| 93 | #"bl-4c-2c", "$tcc:$tflags::$tlib:${bits1}BN_LLONG RC4_CHAR MD2_CHAR:$tbn_mul::", | 108 | # formatted for better readability. |
| 94 | #"bl-4c-ri", "$tcc:$tflags::$tlib:${bits1}BN_LLONG RC4_CHAR RC4_INDEX:$tbn_mul::", | 109 | |
| 95 | #"b2-is-ri-dp", "$tcc:$tflags::$tlib:${bits2}IDEA_SHORT RC4_INDEX DES_PTR:$tbn_mul::", | 110 | |
| 111 | #"b", "${tcc}:${tflags}::${tlib}:${bits1}:${tbn_mul}::", | ||
| 112 | #"bl-4c-2c", "${tcc}:${tflags}::${tlib}:${bits1}BN_LLONG RC4_CHAR MD2_CHAR:${tbn_mul}::", | ||
| 113 | #"bl-4c-ri", "${tcc}:${tflags}::${tlib}:${bits1}BN_LLONG RC4_CHAR RC4_INDEX:${tbn_mul}::", | ||
| 114 | #"b2-is-ri-dp", "${tcc}:${tflags}::${tlib}:${bits2}IDEA_SHORT RC4_INDEX DES_PTR:${tbn_mul}::", | ||
| 96 | 115 | ||
| 97 | # Our development configs | 116 | # Our development configs |
| 98 | "purify", "purify gcc:-g -DPURIFY -Wall::(unknown):-lsocket -lnsl::::", | 117 | "purify", "purify gcc:-g -DPURIFY -Wall::(unknown):-lsocket -lnsl::::", |
| 99 | "debug", "gcc:-DBN_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown):-lefence::::", | 118 | "debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown):-lefence::::", |
| 100 | "debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::", | 119 | "debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::", |
| 101 | "debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::", | 120 | "debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::", |
| 102 | "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown):::::", | 121 | "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown):::::", |
| 103 | "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 122 | "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", |
| 104 | "debug-bodo", "gcc:-DBIO_PAIR_DEBUG -DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 123 | "debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DBIO_PAIR_DEBUG -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", |
| 105 | "debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 124 | "debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", |
| 106 | "debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 125 | "debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", |
| 107 | "debug-levitte-linux-elf","gcc:-DRL_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:::", | 126 | "debug-levitte-linux-elf","gcc:-DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:-ldl:::::::::::dlfcn", |
| 108 | "dist", "cc:-O::(unknown):::::", | 127 | "dist", "cc:-O::(unknown):::::", |
| 109 | 128 | ||
| 110 | # Basic configs that should work on any (32 and less bit) box | 129 | # Basic configs that should work on any (32 and less bit) box |
| @@ -117,32 +136,32 @@ my %table=( | |||
| 117 | # surrounds it with #APP #NO_APP comment pair which (at least Solaris | 136 | # surrounds it with #APP #NO_APP comment pair which (at least Solaris |
| 118 | # 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic" | 137 | # 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic" |
| 119 | # error message. | 138 | # error message. |
| 120 | "solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DNO_INLINE_ASM::-D_REENTRANT:-lsocket -lnsl:BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_sol_asm", | 139 | "solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DNO_INLINE_ASM::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC", |
| 121 | 140 | ||
| 122 | #### SPARC Solaris with GNU C setups | 141 | #### SPARC Solaris with GNU C setups |
| 123 | "solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", | 142 | "solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC", |
| 124 | "solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o::", | 143 | "solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC", |
| 125 | "solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:", | 144 | "solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC", |
| 126 | # gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8 | 145 | # gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8 |
| 127 | # but keep the assembler modules. | 146 | # but keep the assembler modules. |
| 128 | "solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o:", | 147 | "solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC", |
| 129 | #### | 148 | #### |
| 130 | "debug-solaris-sparcv8-gcc","gcc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o::", | 149 | "debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC", |
| 131 | "debug-solaris-sparcv9-gcc","gcc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o::", | 150 | "debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC", |
| 132 | 151 | ||
| 133 | #### SPARC Solaris with Sun C setups | 152 | #### SPARC Solaris with Sun C setups |
| 134 | # DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests | 153 | # DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests |
| 135 | "solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:::", | 154 | "solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC", |
| 136 | # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2. | 155 | # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2. |
| 137 | # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8 | 156 | # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8 |
| 138 | # SC5.0 note: Compiler common patch 107357-01 or later is required! | 157 | # SC5.0 note: Compiler common patch 107357-01 or later is required! |
| 139 | "solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::", | 158 | "solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC", |
| 140 | "solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o::", | 159 | "solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC", |
| 141 | "solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:", | 160 | "solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC", |
| 142 | "solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:", | 161 | "solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC", |
| 143 | #### | 162 | #### |
| 144 | "debug-solaris-sparcv8-cc","cc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o::", | 163 | "debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC", |
| 145 | "debug-solaris-sparcv9-cc","cc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:", | 164 | "debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC", |
| 146 | 165 | ||
| 147 | #### SPARC Linux setups | 166 | #### SPARC Linux setups |
| 148 | "linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::", | 167 | "linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::", |
| @@ -158,7 +177,7 @@ my %table=( | |||
| 158 | 177 | ||
| 159 | # Sunos configs, assuming sparc for the gcc one. | 178 | # Sunos configs, assuming sparc for the gcc one. |
| 160 | ##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown)::DES_UNROLL:::", | 179 | ##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown)::DES_UNROLL:::", |
| 161 | "sunos-gcc","gcc:-O3 -mv8::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::", | 180 | "sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::", |
| 162 | 181 | ||
| 163 | #### IRIX 5.x configs | 182 | #### IRIX 5.x configs |
| 164 | # -mips2 flag is added by ./config when appropriate. | 183 | # -mips2 flag is added by ./config when appropriate. |
| @@ -168,11 +187,11 @@ my %table=( | |||
| 168 | # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke | 187 | # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke |
| 169 | # './Configure irix-[g]cc' manually. | 188 | # './Configure irix-[g]cc' manually. |
| 170 | # -mips4 flag is added by ./config when appropriate. | 189 | # -mips4 flag is added by ./config when appropriate. |
| 171 | "irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::(unknown)::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:asm/mips3.o::", | 190 | "irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:asm/mips3.o::", |
| 172 | "irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::(unknown)::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:asm/mips3.o::", | 191 | "irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:asm/mips3.o::", |
| 173 | # N64 ABI builds. | 192 | # N64 ABI builds. |
| 174 | "irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::(unknown)::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:asm/mips3.o::", | 193 | "irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:asm/mips3.o::", |
| 175 | "irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::(unknown)::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:asm/mips3.o::", | 194 | "irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:asm/mips3.o::", |
| 176 | 195 | ||
| 177 | #### Unified HP-UX ANSI C configs. | 196 | #### Unified HP-UX ANSI C configs. |
| 178 | # Special notes: | 197 | # Special notes: |
| @@ -202,32 +221,43 @@ my %table=( | |||
| 202 | # crypto/sha/sha_lcl.h. | 221 | # crypto/sha/sha_lcl.h. |
| 203 | # <appro@fy.chalmers.se> | 222 | # <appro@fy.chalmers.se> |
| 204 | # | 223 | # |
| 205 | "hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", | 224 | #!#"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 206 | "hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", | 225 | # Since there is mention of this in shlib/hpux10-cc.sh |
| 207 | "hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:::", | 226 | "hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 227 | "hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", | ||
| 228 | "hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn", | ||
| 229 | |||
| 230 | # More attempts at unified 10.X and 11.X targets for HP C compiler. | ||
| 231 | # | ||
| 232 | # Chris Ruemmler <ruemmler@cup.hp.com> | ||
| 233 | # Kevin Steves <ks@hp.se> | ||
| 234 | "hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl", | ||
| 235 | "hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl", | ||
| 236 | "hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn", | ||
| 237 | "hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl", | ||
| 208 | 238 | ||
| 209 | # HPUX 9.X config. | 239 | # HPUX 9.X config. |
| 210 | # Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or | 240 | # Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or |
| 211 | # egcs. gcc 2.8.1 is also broken. | 241 | # egcs. gcc 2.8.1 is also broken. |
| 212 | 242 | ||
| 213 | "hpux-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown)::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", | 243 | "hpux-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 214 | # If hpux-cc fails (e.g. during "make test"), try the next one; otherwise, | 244 | # If hpux-cc fails (e.g. during "make test"), try the next one; otherwise, |
| 215 | # please report your OS and compiler version to the openssl-bugs@openssl.org | 245 | # please report your OS and compiler version to the openssl-bugs@openssl.org |
| 216 | # mailing list. | 246 | # mailing list. |
| 217 | "hpux-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown)::DES_PTR DES_UNROLL DES_RISC1:::", | 247 | "hpux-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 218 | 248 | ||
| 219 | "hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", | 249 | "hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 220 | # If hpux-gcc fails, try this one: | 250 | # If hpux-gcc fails, try this one: |
| 221 | "hpux-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::DES_PTR DES_UNROLL DES_RISC1:::", | 251 | "hpux-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 222 | 252 | ||
| 223 | # HPUX 10.X config. Supports threads. | 253 | # HPUX 10.X config. Supports threads. |
| 224 | "hpux10-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", | 254 | "hpux10-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 225 | # If hpux10-cc fails, try this one (if still fails, try deleting BN_LLONG): | 255 | # If hpux10-cc fails, try this one (if still fails, try deleting BN_LLONG): |
| 226 | "hpux10-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", | 256 | "hpux10-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 227 | 257 | ||
| 228 | "hpux10-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", | 258 | "hpux10-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 229 | # If hpux10-gcc fails, try this one: | 259 | # If hpux10-gcc fails, try this one: |
| 230 | "hpux10-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::DES_PTR DES_UNROLL DES_RISC1:::", | 260 | "hpux10-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl", |
| 231 | 261 | ||
| 232 | # HPUX 11.X from www.globus.org. | 262 | # HPUX 11.X from www.globus.org. |
| 233 | # Only works on PA-RISC 2.0 cpus, and not optimized. Why? | 263 | # Only works on PA-RISC 2.0 cpus, and not optimized. Why? |
| @@ -235,13 +265,16 @@ my %table=( | |||
| 235 | #"hpux11-64bit-cc","cc:+DA2.0W -g -D_HPUX_SOURCE -Aa -Ae +ESlit::-D_REENTRANT::SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT :::", | 265 | #"hpux11-64bit-cc","cc:+DA2.0W -g -D_HPUX_SOURCE -Aa -Ae +ESlit::-D_REENTRANT::SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT :::", |
| 236 | # Use unified settings above instead. | 266 | # Use unified settings above instead. |
| 237 | 267 | ||
| 268 | #### HP MPE/iX http://jazz.external.hp.com/src/openssl/ | ||
| 269 | "MPE/iX-gcc", "gcc:-D_ENDIAN -DBN_DIV2W -O3 -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB::(unknown):-L/SYSLOG/PUB -lsyslog -lsocket -lcurses:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", | ||
| 270 | |||
| 238 | # Dec Alpha, OSF/1 - the alpha164-cc is the flags for a 21164A with | 271 | # Dec Alpha, OSF/1 - the alpha164-cc is the flags for a 21164A with |
| 239 | # the new compiler | 272 | # the new compiler |
| 240 | # For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version | 273 | # For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version |
| 241 | "alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:asm/alpha.o::", | 274 | "alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:asm/alpha.o:::::::::dlfcn:true64-shared", |
| 242 | "alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o::", | 275 | "alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared", |
| 243 | "alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o::", | 276 | "alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared", |
| 244 | "FreeBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2:::", | 277 | "FreeBSD-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2:::", |
| 245 | 278 | ||
| 246 | #### Alpha Linux with GNU C and Compaq C setups | 279 | #### Alpha Linux with GNU C and Compaq C setups |
| 247 | # Special notes: | 280 | # Special notes: |
| @@ -256,42 +289,51 @@ my %table=( | |||
| 256 | # | 289 | # |
| 257 | # <appro@fy.chalmers.se> | 290 | # <appro@fy.chalmers.se> |
| 258 | # | 291 | # |
| 259 | "linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o::", | 292 | "linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o::", |
| 260 | "linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o::", | 293 | "linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o::", |
| 261 | "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::", | 294 | "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::", |
| 262 | "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::", | 295 | "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::", |
| 263 | 296 | ||
| 264 | # assembler versions -- currently defunct: | 297 | # assembler versions -- currently defunct: |
| 265 | ##"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:asm/alpha.o::", | 298 | ##"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:asm/alpha.o::", |
| 266 | 299 | ||
| 267 | # The intel boxes :-), It would be worth seeing if bsdi-gcc can use the | 300 | # The intel boxes :-), It would be worth seeing if bsdi-gcc can use the |
| 268 | # bn86-elf.o file file since it is hand tweaked assembler. | 301 | # bn86-elf.o file file since it is hand tweaked assembler. |
| 269 | "linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 302 | "linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC", |
| 270 | "debug-linux-elf","gcc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence:BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 303 | "debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", |
| 271 | "linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm", | 304 | "debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", |
| 305 | "linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", | ||
| 272 | "linux-mips", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::", | 306 | "linux-mips", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::", |
| 273 | "linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::", | 307 | "linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::", |
| 308 | "linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::", | ||
| 309 | "linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::SIXTY_FOUR_BIT_LONG::", | ||
| 274 | "NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::", | 310 | "NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::", |
| 275 | "NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::", | 311 | "NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::", |
| 276 | "NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:", | 312 | "NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:", |
| 277 | "FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 313 | "FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", |
| 278 | "FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm", | 314 | "FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", |
| 279 | "bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown)::RSA_LLONG $x86_gcc_des $x86_gcc_opts:$x86_bsdi_asm", | 315 | "bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown)::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}", |
| 280 | "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 316 | "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", |
| 281 | "nextstep", "cc:-O -Wall:<libc.h>:(unknown)::BN_LLONG $x86_gcc_des ${x86_gcc_opts}:::", | 317 | "nextstep", "cc:-O -Wall:<libc.h>:(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", |
| 282 | "nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown)::BN_LLONG $x86_gcc_des ${x86_gcc_opts}:::", | 318 | "nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", |
| 283 | # NCR MP-RAS UNIX ver 02.03.01 | 319 | # NCR MP-RAS UNIX ver 02.03.01 |
| 284 | "ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown):-lsocket -lnsl:$x86_gcc_des ${x86_gcc_opts}:::", | 320 | "ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown):-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::", |
| 321 | |||
| 322 | # QNX 4 | ||
| 323 | "qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown)::${x86_gcc_des} ${x86_gcc_opts}:", | ||
| 324 | |||
| 325 | # Linux on ARM | ||
| 326 | "linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC", | ||
| 285 | 327 | ||
| 286 | # UnixWare 2.0 | 328 | # UnixWare 2.0 |
| 287 | "unixware-2.0","cc:-O -DFILIO_H::(unknown):-lsocket -lnsl:$x86_gcc_des ${x86_gcc_opts}:::", | 329 | "unixware-2.0","cc:-O -DFILIO_H::(unknown):-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::", |
| 288 | "unixware-2.0-pentium","cc:-O -DFILIO_H -Kpentium -Kthread::(unknown):-lsocket -lnsl:MD2_CHAR RC4_INDEX ${x86_gcc_des}::", | 330 | "unixware-2.0-pentium","cc:-O -DFILIO_H -Kpentium -Kthread::(unknown):-lsocket -lnsl:MD2_CHAR RC4_INDEX ${x86_gcc_des}::", |
| 289 | 331 | ||
| 290 | # UnixWare 7 | 332 | # UnixWare 7 |
| 291 | "unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread:-lsocket -lnsl:MD2_CHAR RC4_INDEX ${x86_gcc_des}::", | 333 | "unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread:-lsocket -lnsl:MD2_CHAR RC4_INDEX ${x86_gcc_des}::", |
| 292 | 334 | ||
| 293 | # IBM's AIX. | 335 | # IBM's AIX. |
| 294 | "aix-cc", "cc:-O -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR:::", | 336 | "aix-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown)::BN_LLONG RC4_CHAR:::", |
| 295 | "aix-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR:::", | 337 | "aix-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR:::", |
| 296 | 338 | ||
| 297 | # | 339 | # |
| @@ -320,12 +362,12 @@ my %table=( | |||
| 320 | # DGUX, 88100. | 362 | # DGUX, 88100. |
| 321 | "dgux-R3-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::RC4_INDEX DES_UNROLL:::", | 363 | "dgux-R3-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::RC4_INDEX DES_UNROLL:::", |
| 322 | "dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lnsl -lsocket:RC4_INDEX:RC4_INDEX DES_UNROLL:::", | 364 | "dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lnsl -lsocket:RC4_INDEX:RC4_INDEX DES_UNROLL:::", |
| 323 | "dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown):-lnsl -lsocket:BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", | 365 | "dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown):-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", |
| 324 | 366 | ||
| 325 | # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the | 367 | # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the |
| 326 | # SCO cc. | 368 | # SCO cc. |
| 327 | "sco5-cc", "cc:::(unknown):-lsocket:$x86_gcc_des ${x86_gcc_opts}:::", # des options? | 369 | "sco5-cc", "cc:::(unknown):-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des options? |
| 328 | "sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lsocket:BN_LLONG $x86_gcc_des ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ... | 370 | "sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ... |
| 329 | 371 | ||
| 330 | # Sinix/ReliantUNIX RM400 | 372 | # Sinix/ReliantUNIX RM400 |
| 331 | # NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g */ | 373 | # NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g */ |
| @@ -338,22 +380,24 @@ my %table=( | |||
| 338 | 380 | ||
| 339 | # Windows NT, Microsoft Visual C++ 4.0 | 381 | # Windows NT, Microsoft Visual C++ 4.0 |
| 340 | 382 | ||
| 341 | "VC-NT","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::", | 383 | "VC-NT","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}::::::::::win32", |
| 342 | "VC-WIN32","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::", | 384 | "VC-WIN32","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}::::::::::win32", |
| 343 | "VC-WIN16","cl:::(unknown)::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::", | 385 | "VC-WIN16","cl:::(unknown)::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::", |
| 344 | "VC-W31-16","cl:::(unknown)::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::", | 386 | "VC-W31-16","cl:::(unknown)::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::", |
| 345 | "VC-W31-32","cl:::::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::", | 387 | "VC-W31-32","cl:::::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::", |
| 346 | "VC-MSDOS","cl:::(unknown)::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::", | 388 | "VC-MSDOS","cl:::(unknown)::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::", |
| 347 | 389 | ||
| 348 | # Borland C++ 4.5 | 390 | # Borland C++ 4.5 |
| 349 | "BC-32","bcc32:::::BN_LLONG DES_PTR RC4_INDEX:::", | 391 | "BC-32","bcc32:::::BN_LLONG DES_PTR RC4_INDEX::::::::::win32", |
| 350 | "BC-16","bcc:::(unknown)::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::", | 392 | "BC-16","bcc:::(unknown)::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::", |
| 351 | 393 | ||
| 352 | # CygWin32 | 394 | # Mingw32 |
| 353 | # (Note: the real CFLAGS for Windows builds are defined by util/mk1mf.pl | 395 | # (Note: the real CFLAGS for Windows builds are defined by util/mk1mf.pl |
| 354 | # and its library files in util/pl/*) | 396 | # and its library files in util/pl/*) |
| 355 | "CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG $x86_gcc_des $x86_gcc_opts:", | 397 | "Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", |
| 356 | "Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG $x86_gcc_des $x86_gcc_opts:", | 398 | |
| 399 | # CygWin32 | ||
| 400 | "CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", | ||
| 357 | 401 | ||
| 358 | # Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at> | 402 | # Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at> |
| 359 | "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::", | 403 | "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::", |
| @@ -364,24 +408,29 @@ my %table=( | |||
| 364 | # Some OpenBSD from Bob Beck <beck@obtuse.com> | 408 | # Some OpenBSD from Bob Beck <beck@obtuse.com> |
| 365 | "OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:::", | 409 | "OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:::", |
| 366 | "OpenBSD-vax", "gcc:-DL_ENDIAN -DTERMIOS -O2 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL:::", | 410 | "OpenBSD-vax", "gcc:-DL_ENDIAN -DTERMIOS -O2 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL:::", |
| 367 | "OpenBSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm", | 411 | "OpenBSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn", |
| 368 | "OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL:::", | 412 | "OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL:::", |
| 369 | "OpenBSD-mips","gcc:-O2 -DL_ENDIAN::(unknown):BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR::::", | 413 | "OpenBSD-mips","gcc:-O2 -DL_ENDIAN::(unknown):BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR::::", |
| 370 | 414 | ||
| 371 | ##### MacOS X (a.k.a. Rhapsody) setup | 415 | ##### MacOS X (a.k.a. Rhapsody) setup |
| 372 | "rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", | 416 | "rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", |
| 373 | 417 | ||
| 418 | ##### Sony NEWS-OS 4.x | ||
| 419 | "newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::", | ||
| 420 | |||
| 374 | ); | 421 | ); |
| 375 | 422 | ||
| 376 | my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32 | 423 | my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32 |
| 377 | BC-16 CygWin32 Mingw32); | 424 | BC-16 Mingw32); |
| 378 | 425 | ||
| 379 | my $prefix=""; | 426 | my $prefix=""; |
| 380 | my $openssldir=""; | 427 | my $openssldir=""; |
| 381 | my $install_prefix=""; | 428 | my $install_prefix=""; |
| 382 | my $no_threads=0; | 429 | my $no_threads=0; |
| 430 | my $no_shared=1; | ||
| 383 | my $threads=0; | 431 | my $threads=0; |
| 384 | my $no_asm=0; | 432 | my $no_asm=0; |
| 433 | my $no_dso=0; | ||
| 385 | my @skip=(); | 434 | my @skip=(); |
| 386 | my $Makefile="Makefile.ssl"; | 435 | my $Makefile="Makefile.ssl"; |
| 387 | my $des_locl="crypto/des/des_locl.h"; | 436 | my $des_locl="crypto/des/des_locl.h"; |
| @@ -412,94 +461,161 @@ $perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl") | |||
| 412 | 461 | ||
| 413 | &usage if ($#ARGV < 0); | 462 | &usage if ($#ARGV < 0); |
| 414 | 463 | ||
| 415 | my $flags=""; | 464 | my $flags; |
| 416 | my $depflags=""; | 465 | my $depflags; |
| 417 | my $openssl_algorithm_defines=""; | 466 | my $openssl_algorithm_defines; |
| 418 | my $openssl_thread_defines=""; | 467 | my $openssl_thread_defines; |
| 419 | my $openssl_other_defines=""; | 468 | my $openssl_other_defines; |
| 420 | my $libs=""; | 469 | my $libs; |
| 421 | my $target=""; | 470 | my $target; |
| 422 | my $options=""; | 471 | my $options; |
| 423 | foreach (@ARGV) | 472 | my $symlink; |
| 473 | |||
| 474 | my @argvcopy=@ARGV; | ||
| 475 | my $argvstring=""; | ||
| 476 | my $argv_unprocessed=1; | ||
| 477 | |||
| 478 | while($argv_unprocessed) | ||
| 424 | { | 479 | { |
| 425 | if (/^no-asm$/) | 480 | $flags=""; |
| 426 | { | 481 | $depflags=""; |
| 427 | $no_asm=1; | 482 | $openssl_algorithm_defines=""; |
| 428 | $flags .= "-DNO_ASM "; | 483 | $openssl_thread_defines=""; |
| 429 | $openssl_other_defines .= "#define NO_ASM\n"; | 484 | $openssl_other_defines=""; |
| 430 | } | 485 | $libs=""; |
| 431 | elsif (/^no-threads$/) | 486 | $target=""; |
| 432 | { $no_threads=1; } | 487 | $options=""; |
| 433 | elsif (/^threads$/) | 488 | $symlink=1; |
| 434 | { $threads=1; } | 489 | |
| 435 | elsif (/^no-(.+)$/) | 490 | $argv_unprocessed=0; |
| 491 | $argvstring=join(' ',@argvcopy); | ||
| 492 | |||
| 493 | PROCESS_ARGS: | ||
| 494 | foreach (@argvcopy) | ||
| 436 | { | 495 | { |
| 437 | my $algo=$1; | 496 | s /^-no-/no-/; # some people just can't read the instructions |
| 438 | push @skip,$algo; | 497 | if (/^no-asm$/) |
| 439 | $algo =~ tr/[a-z]/[A-Z]/; | 498 | { |
| 440 | $flags .= "-DNO_$algo "; | 499 | $no_asm=1; |
| 441 | $depflags .= "-DNO_$algo "; | 500 | $flags .= "-DNO_ASM "; |
| 442 | $openssl_algorithm_defines .= "#define NO_$algo\n"; | 501 | $openssl_other_defines .= "#define NO_ASM\n"; |
| 443 | if ($algo eq "DES") | 502 | } |
| 503 | elsif (/^no-hw-(.+)$/) | ||
| 444 | { | 504 | { |
| 445 | push @skip, "mdc2"; | 505 | my $hw=$1; |
| 446 | $options .= " no-mdc2"; | 506 | $hw =~ tr/[a-z]/[A-Z]/; |
| 447 | $flags .= "-DNO_MDC2 "; | 507 | $flags .= "-DNO_HW_$hw "; |
| 448 | $depflags .= "-DNO_MDC2 "; | 508 | $openssl_other_defines .= "#define NO_HW_$hw\n"; |
| 449 | $openssl_algorithm_defines .= "#define NO_MDC2\n"; | ||
| 450 | } | 509 | } |
| 451 | } | 510 | elsif (/^no-hw$/) |
| 452 | elsif (/^386$/) | ||
| 453 | { $processor=386; } | ||
| 454 | elsif (/^rsaref$/) | ||
| 455 | { | ||
| 456 | $libs.= "-lRSAglue -lrsaref "; | ||
| 457 | $flags.= "-DRSAref "; | ||
| 458 | $openssl_other_defines .= "#define RSAref\n"; | ||
| 459 | } | ||
| 460 | elsif (/^[-+]/) | ||
| 461 | { | ||
| 462 | if (/^-[lL](.*)$/) | ||
| 463 | { | 511 | { |
| 464 | $libs.=$_." "; | 512 | $flags .= "-DNO_HW "; |
| 513 | $openssl_other_defines .= "#define NO_HW\n"; | ||
| 465 | } | 514 | } |
| 466 | elsif (/^-[^-]/ or /^\+/) | 515 | elsif (/^no-dso$/) |
| 516 | { $no_dso=1; } | ||
| 517 | elsif (/^no-threads$/) | ||
| 518 | { $no_threads=1; } | ||
| 519 | elsif (/^threads$/) | ||
| 520 | { $threads=1; } | ||
| 521 | elsif (/^no-shared$/) | ||
| 522 | { $no_shared=1; } | ||
| 523 | elsif (/^shared$/) | ||
| 524 | { $no_shared=0; } | ||
| 525 | elsif (/^no-symlinks$/) | ||
| 526 | { $symlink=0; } | ||
| 527 | elsif (/^no-(.+)$/) | ||
| 467 | { | 528 | { |
| 468 | $flags.=$_." "; | 529 | my $algo=$1; |
| 530 | push @skip,$algo; | ||
| 531 | $algo =~ tr/[a-z]/[A-Z]/; | ||
| 532 | $flags .= "-DNO_$algo "; | ||
| 533 | $depflags .= "-DNO_$algo "; | ||
| 534 | $openssl_algorithm_defines .= "#define NO_$algo\n"; | ||
| 535 | if ($algo eq "DES") | ||
| 536 | { | ||
| 537 | push @skip, "mdc2"; | ||
| 538 | $options .= " no-mdc2"; | ||
| 539 | $flags .= "-DNO_MDC2 "; | ||
| 540 | $depflags .= "-DNO_MDC2 "; | ||
| 541 | $openssl_algorithm_defines .= "#define NO_MDC2\n"; | ||
| 542 | } | ||
| 469 | } | 543 | } |
| 470 | elsif (/^--prefix=(.*)$/) | 544 | elsif (/^reconfigure/ || /^reconf/) |
| 471 | { | 545 | { |
| 472 | $prefix=$1; | 546 | if (open(IN,"<$Makefile")) |
| 547 | { | ||
| 548 | while (<IN>) | ||
| 549 | { | ||
| 550 | chop; | ||
| 551 | if (/^CONFIGURE_ARGS=(.*)/) | ||
| 552 | { | ||
| 553 | $argvstring=$1; | ||
| 554 | @argvcopy=split(' ',$argvstring); | ||
| 555 | die "Incorrect data to reconfigure, please do a normal configuration\n" | ||
| 556 | if (grep(/^reconf/,@argvcopy)); | ||
| 557 | print "Reconfiguring with: $argvstring\n"; | ||
| 558 | $argv_unprocessed=1; | ||
| 559 | close(IN); | ||
| 560 | last PROCESS_ARGS; | ||
| 561 | } | ||
| 562 | } | ||
| 563 | close(IN); | ||
| 564 | } | ||
| 565 | die "Insufficient data to reconfigure, please do a normal configuration\n"; | ||
| 473 | } | 566 | } |
| 474 | elsif (/^--openssldir=(.*)$/) | 567 | elsif (/^386$/) |
| 568 | { $processor=386; } | ||
| 569 | elsif (/^rsaref$/) | ||
| 475 | { | 570 | { |
| 476 | $openssldir=$1; | 571 | $libs.= "-lRSAglue -lrsaref "; |
| 572 | $flags.= "-DRSAref "; | ||
| 573 | $openssl_other_defines .= "#define RSAref\n"; | ||
| 477 | } | 574 | } |
| 478 | elsif (/^--install.prefix=(.*)$/) | 575 | elsif (/^[-+]/) |
| 479 | { | 576 | { |
| 480 | $install_prefix=$1; | 577 | if (/^-[lL](.*)$/) |
| 578 | { | ||
| 579 | $libs.=$_." "; | ||
| 580 | } | ||
| 581 | elsif (/^-[^-]/ or /^\+/) | ||
| 582 | { | ||
| 583 | $flags.=$_." "; | ||
| 584 | } | ||
| 585 | elsif (/^--prefix=(.*)$/) | ||
| 586 | { | ||
| 587 | $prefix=$1; | ||
| 588 | } | ||
| 589 | elsif (/^--openssldir=(.*)$/) | ||
| 590 | { | ||
| 591 | $openssldir=$1; | ||
| 592 | } | ||
| 593 | elsif (/^--install.prefix=(.*)$/) | ||
| 594 | { | ||
| 595 | $install_prefix=$1; | ||
| 596 | } | ||
| 597 | else | ||
| 598 | { | ||
| 599 | print STDERR $usage; | ||
| 600 | exit(1); | ||
| 601 | } | ||
| 602 | } | ||
| 603 | elsif ($_ =~ /^([^:]+):(.+)$/) | ||
| 604 | { | ||
| 605 | eval "\$table{\$1} = \"$2\""; # allow $xxx constructs in the string | ||
| 606 | $target=$1; | ||
| 481 | } | 607 | } |
| 482 | else | 608 | else |
| 483 | { | 609 | { |
| 484 | print STDERR $usage; | 610 | die "target already defined - $target\n" if ($target ne ""); |
| 485 | exit(1); | 611 | $target=$_; |
| 612 | } | ||
| 613 | unless ($_ eq $target) { | ||
| 614 | if ($options eq "") { | ||
| 615 | $options = $_; | ||
| 616 | } else { | ||
| 617 | $options .= " ".$_; | ||
| 486 | } | 618 | } |
| 487 | } | ||
| 488 | elsif ($_ =~ /^([^:]+):(.+)$/) | ||
| 489 | { | ||
| 490 | eval "\$table{\$1} = \"$2\""; # allow $xxx constructs in the string | ||
| 491 | $target=$1; | ||
| 492 | } | ||
| 493 | else | ||
| 494 | { | ||
| 495 | die "target already defined - $target\n" if ($target ne ""); | ||
| 496 | $target=$_; | ||
| 497 | } | ||
| 498 | unless ($_ eq $target) { | ||
| 499 | if ($options eq "") { | ||
| 500 | $options = $_; | ||
| 501 | } else { | ||
| 502 | $options .= " ".$_; | ||
| 503 | } | 619 | } |
| 504 | } | 620 | } |
| 505 | } | 621 | } |
| @@ -519,6 +635,8 @@ if ($target eq "LIST") { | |||
| 519 | exit 0; | 635 | exit 0; |
| 520 | } | 636 | } |
| 521 | 637 | ||
| 638 | print "Configuring for $target\n"; | ||
| 639 | |||
| 522 | &usage if (!defined($table{$target})); | 640 | &usage if (!defined($table{$target})); |
| 523 | 641 | ||
| 524 | my $IsWindows=scalar grep /^$target$/,@WinTargets; | 642 | my $IsWindows=scalar grep /^$target$/,@WinTargets; |
| @@ -536,10 +654,39 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//; | |||
| 536 | print "IsWindows=$IsWindows\n"; | 654 | print "IsWindows=$IsWindows\n"; |
| 537 | 655 | ||
| 538 | (my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj, | 656 | (my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj, |
| 539 | $md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj)= | 657 | $md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag)= |
| 540 | split(/\s*:\s*/,$table{$target} . ":" x 20 , -1); | 658 | split(/\s*:\s*/,$table{$target} . ":" x 22 , -1); |
| 541 | $cflags="$flags$cflags" if ($flags ne ""); | 659 | $cflags="$flags$cflags" if ($flags ne ""); |
| 542 | 660 | ||
| 661 | # The DSO code currently always implements all functions so that no | ||
| 662 | # applications will have to worry about that from a compilation point | ||
| 663 | # of view. However, the "method"s may return zero unless that platform | ||
| 664 | # has support compiled in for them. Currently each method is enabled | ||
| 665 | # by a define "DSO_<name>" ... we translate the "dso_scheme" config | ||
| 666 | # string entry into using the following logic; | ||
| 667 | my $dso_cflags; | ||
| 668 | if (!$no_dso && $dso_scheme ne "") | ||
| 669 | { | ||
| 670 | $dso_scheme =~ tr/[a-z]/[A-Z]/; | ||
| 671 | if ($dso_scheme eq "DLFCN") | ||
| 672 | { | ||
| 673 | $dso_cflags = "-DDSO_DLFCN -DHAVE_DLFCN_H"; | ||
| 674 | $openssl_other_defines .= "#define DSO_DLFCN\n"; | ||
| 675 | $openssl_other_defines .= "#define HAVE_DLFCN_H\n"; | ||
| 676 | } | ||
| 677 | elsif ($dso_scheme eq "DLFCN_NO_H") | ||
| 678 | { | ||
| 679 | $dso_cflags = "-DDSO_DLFCN"; | ||
| 680 | $openssl_other_defines .= "#define DSO_DLFCN\n"; | ||
| 681 | } | ||
| 682 | else | ||
| 683 | { | ||
| 684 | $dso_cflags = "-DDSO_$dso_scheme"; | ||
| 685 | $openssl_other_defines .= "#define DSO_$dso_scheme\n"; | ||
| 686 | } | ||
| 687 | $cflags = "$dso_cflags $cflags"; | ||
| 688 | } | ||
| 689 | |||
| 543 | my $thread_cflags; | 690 | my $thread_cflags; |
| 544 | my $thread_defines; | 691 | my $thread_defines; |
| 545 | if ($thread_cflag ne "(unknown)" && !$no_threads) | 692 | if ($thread_cflag ne "(unknown)" && !$no_threads) |
| @@ -582,6 +729,19 @@ if ($threads) | |||
| 582 | $openssl_thread_defines .= $thread_defines; | 729 | $openssl_thread_defines .= $thread_defines; |
| 583 | } | 730 | } |
| 584 | 731 | ||
| 732 | # You will find shlib_mark1 and shlib_mark2 explained in Makefile.org | ||
| 733 | my $shared_mark1 = ""; | ||
| 734 | my $shared_mark2 = ""; | ||
| 735 | if ($shared_cflag ne "") | ||
| 736 | { | ||
| 737 | $cflags = "$shared_cflag $cflags"; | ||
| 738 | if (!$no_shared) | ||
| 739 | { | ||
| 740 | $shared_mark1 = ".shlib-clean."; | ||
| 741 | $shared_mark2 = ".shlib."; | ||
| 742 | } | ||
| 743 | } | ||
| 744 | |||
| 585 | #my ($bn1)=split(/\s+/,$bn_obj); | 745 | #my ($bn1)=split(/\s+/,$bn_obj); |
| 586 | #$bn1 = "" unless defined $bn1; | 746 | #$bn1 = "" unless defined $bn1; |
| 587 | #$bn1=$bn_asm unless ($bn1 =~ /\.o$/); | 747 | #$bn1=$bn_asm unless ($bn1 =~ /\.o$/); |
| @@ -613,13 +773,20 @@ if ($rmd160_obj =~ /\.o$/) | |||
| 613 | my $version = "unknown"; | 773 | my $version = "unknown"; |
| 614 | my $major = "unknown"; | 774 | my $major = "unknown"; |
| 615 | my $minor = "unknown"; | 775 | my $minor = "unknown"; |
| 776 | my $shlib_version_number = "unknown"; | ||
| 777 | my $shlib_version_history = "unknown"; | ||
| 778 | my $shlib_major = "unknown"; | ||
| 779 | my $shlib_minor = "unknown"; | ||
| 616 | 780 | ||
| 617 | open(IN,'<crypto/opensslv.h') || die "unable to read opensslv.h:$!\n"; | 781 | open(IN,'<crypto/opensslv.h') || die "unable to read opensslv.h:$!\n"; |
| 618 | while (<IN>) | 782 | while (<IN>) |
| 619 | { | 783 | { |
| 620 | $version=$1 if /OPENSSL.VERSION.TEXT.*OpenSSL (\S+) /; | 784 | $version=$1 if /OPENSSL.VERSION.TEXT.*OpenSSL (\S+) /; |
| 785 | $shlib_version_number=$1 if /SHLIB_VERSION_NUMBER *"([^"]+)"/; | ||
| 786 | $shlib_version_history=$1 if /SHLIB_VERSION_HISTORY *"([^"]*)"/; | ||
| 621 | } | 787 | } |
| 622 | close(IN); | 788 | close(IN); |
| 789 | if ($shlib_version_history ne "") { $shlib_version_history .= ":"; } | ||
| 623 | 790 | ||
| 624 | if ($version =~ /(^[0-9]*)\.([0-9\.]*)/) | 791 | if ($version =~ /(^[0-9]*)\.([0-9\.]*)/) |
| 625 | { | 792 | { |
| @@ -627,6 +794,12 @@ if ($version =~ /(^[0-9]*)\.([0-9\.]*)/) | |||
| 627 | $minor=$2; | 794 | $minor=$2; |
| 628 | } | 795 | } |
| 629 | 796 | ||
| 797 | if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/) | ||
| 798 | { | ||
| 799 | $shlib_major=$1; | ||
| 800 | $shlib_minor=$2; | ||
| 801 | } | ||
| 802 | |||
| 630 | open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n"; | 803 | open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n"; |
| 631 | open(OUT,">$Makefile") || die "unable to create $Makefile:$!\n"; | 804 | open(OUT,">$Makefile") || die "unable to create $Makefile:$!\n"; |
| 632 | print OUT "### Generated automatically from Makefile.org by Configure.\n\n"; | 805 | print OUT "### Generated automatically from Makefile.org by Configure.\n\n"; |
| @@ -645,11 +818,16 @@ while (<IN>) | |||
| 645 | s/^VERSION=.*/VERSION=$version/; | 818 | s/^VERSION=.*/VERSION=$version/; |
| 646 | s/^MAJOR=.*/MAJOR=$major/; | 819 | s/^MAJOR=.*/MAJOR=$major/; |
| 647 | s/^MINOR=.*/MINOR=$minor/; | 820 | s/^MINOR=.*/MINOR=$minor/; |
| 821 | s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=$shlib_version_number/; | ||
| 822 | s/^SHLIB_VERSION_HISTORY=.*/SHLIB_VERSION_HISTORY=$shlib_version_history/; | ||
| 823 | s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=$shlib_major/; | ||
| 824 | s/^SHLIB_MINOR=.*/SHLIB_MINOR=$shlib_minor/; | ||
| 648 | s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/; | 825 | s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/; |
| 649 | s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/; | 826 | s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/; |
| 650 | s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/; | 827 | s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/; |
| 651 | s/^PLATFORM=.*$/PLATFORM=$target/; | 828 | s/^PLATFORM=.*$/PLATFORM=$target/; |
| 652 | s/^OPTIONS=.*$/OPTIONS=$options/; | 829 | s/^OPTIONS=.*$/OPTIONS=$options/; |
| 830 | s/^CONFIGURE_ARGS=.*$/CONFIGURE_ARGS=$argvstring/; | ||
| 653 | s/^CC=.*$/CC= $cc/; | 831 | s/^CC=.*$/CC= $cc/; |
| 654 | s/^CFLAG=.*$/CFLAG= $cflags/; | 832 | s/^CFLAG=.*$/CFLAG= $cflags/; |
| 655 | s/^DEPFLAG=.*$/DEPFLAG= $depflags/; | 833 | s/^DEPFLAG=.*$/DEPFLAG= $depflags/; |
| @@ -666,6 +844,10 @@ while (<IN>) | |||
| 666 | s/^PROCESSOR=.*/PROCESSOR= $processor/; | 844 | s/^PROCESSOR=.*/PROCESSOR= $processor/; |
| 667 | s/^RANLIB=.*/RANLIB= $ranlib/; | 845 | s/^RANLIB=.*/RANLIB= $ranlib/; |
| 668 | s/^PERL=.*/PERL= $perl/; | 846 | s/^PERL=.*/PERL= $perl/; |
| 847 | s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/; | ||
| 848 | s/^SHLIB_MARK1=.*/SHLIB_MARK1=$shared_mark1/; | ||
| 849 | s/^SHLIB_MARK2=.*/SHLIB_MARK2=$shared_mark2/; | ||
| 850 | s/^LIBS=.*/LIBS=libcrypto\.so\* libssl\.so\*/ if (!$no_shared); | ||
| 669 | print OUT $_."\n"; | 851 | print OUT $_."\n"; |
| 670 | } | 852 | } |
| 671 | close(IN); | 853 | close(IN); |
| @@ -848,16 +1030,18 @@ if($IsWindows) { | |||
| 848 | EOF | 1030 | EOF |
| 849 | close(OUT); | 1031 | close(OUT); |
| 850 | } else { | 1032 | } else { |
| 851 | (system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $?; | 1033 | (system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $? |
| 1034 | if $symlink; | ||
| 852 | ### (system 'make depend') == 0 or exit $? if $depflags ne ""; | 1035 | ### (system 'make depend') == 0 or exit $? if $depflags ne ""; |
| 853 | # Run "make depend" manually if you want to be able to delete | 1036 | # Run "make depend" manually if you want to be able to delete |
| 854 | # the source code files of ciphers you left out. | 1037 | # the source code files of ciphers you left out. |
| 855 | &dofile("tools/c_rehash",$openssldir,'^DIR=', 'DIR=%s',); | ||
| 856 | if ( $perl =~ m@^/@) { | 1038 | if ( $perl =~ m@^/@) { |
| 1039 | &dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";'); | ||
| 857 | &dofile("apps/der_chop",$perl,'^#!/', '#!%s'); | 1040 | &dofile("apps/der_chop",$perl,'^#!/', '#!%s'); |
| 858 | &dofile("apps/CA.pl",$perl,'^#!/', '#!%s'); | 1041 | &dofile("apps/CA.pl",$perl,'^#!/', '#!%s'); |
| 859 | } else { | 1042 | } else { |
| 860 | # No path for Perl known ... | 1043 | # No path for Perl known ... |
| 1044 | &dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";'); | ||
| 861 | &dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s'); | 1045 | &dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s'); |
| 862 | &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s'); | 1046 | &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s'); |
| 863 | } | 1047 | } |
| @@ -866,9 +1050,6 @@ EOF | |||
| 866 | print <<EOF; | 1050 | print <<EOF; |
| 867 | 1051 | ||
| 868 | Configured for $target. | 1052 | Configured for $target. |
| 869 | |||
| 870 | NOTE: OpenSSL header files were moved from <*.h> to <openssl/*.h>; | ||
| 871 | see file INSTALL for hints on coping with compatibility problems. | ||
| 872 | EOF | 1053 | EOF |
| 873 | 1054 | ||
| 874 | print <<\EOF if (!$no_threads && !$threads); | 1055 | print <<\EOF if (!$no_threads && !$threads); |
| @@ -939,12 +1120,11 @@ sub dofile | |||
| 939 | { | 1120 | { |
| 940 | grep(/$k/ && ($_=sprintf($m{$k}."\n",$p)),@a); | 1121 | grep(/$k/ && ($_=sprintf($m{$k}."\n",$p)),@a); |
| 941 | } | 1122 | } |
| 942 | ($ff=$f) =~ s/\..*$//; | 1123 | open(OUT,">$f.new") || die "unable to open $f.new:$!\n"; |
| 943 | open(OUT,">$ff.new") || die "unable to open $f:$!\n"; | ||
| 944 | print OUT @a; | 1124 | print OUT @a; |
| 945 | close(OUT); | 1125 | close(OUT); |
| 946 | rename($f,"$ff.bak") || die "unable to rename $f\n" if -e $f; | 1126 | rename($f,"$f.bak") || die "unable to rename $f\n" if -e $f; |
| 947 | rename("$ff.new",$f) || die "unable to rename $ff.new\n"; | 1127 | rename("$f.new",$f) || die "unable to rename $f.new\n"; |
| 948 | } | 1128 | } |
| 949 | 1129 | ||
| 950 | sub print_table_entry | 1130 | sub print_table_entry |
| @@ -953,8 +1133,9 @@ sub print_table_entry | |||
| 953 | 1133 | ||
| 954 | (my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops, | 1134 | (my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops, |
| 955 | my $bn_obj,my $des_obj,my $bf_obj, | 1135 | my $bn_obj,my $des_obj,my $bf_obj, |
| 956 | $md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj)= | 1136 | my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj, |
| 957 | split(/\s*:\s*/,$table{$target} . ":" x 20 , -1); | 1137 | my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag)= |
| 1138 | split(/\s*:\s*/,$table{$target} . ":" x 22 , -1); | ||
| 958 | 1139 | ||
| 959 | print <<EOF | 1140 | print <<EOF |
| 960 | 1141 | ||
| @@ -974,5 +1155,8 @@ sub print_table_entry | |||
| 974 | \$rc4_obj = $rc4_obj | 1155 | \$rc4_obj = $rc4_obj |
| 975 | \$rmd160_obj = $rmd160_obj | 1156 | \$rmd160_obj = $rmd160_obj |
| 976 | \$rc5_obj = $rc5_obj | 1157 | \$rc5_obj = $rc5_obj |
| 1158 | \$dso_scheme = $dso_scheme | ||
| 1159 | \$shared_target= $shared_target | ||
| 1160 | \$shared_cflag = $shared_cflag | ||
| 977 | EOF | 1161 | EOF |
| 978 | } | 1162 | } |
diff --git a/src/lib/libssl/src/FAQ b/src/lib/libssl/src/FAQ index ab84a3f9e8..29acc8afdf 100644 --- a/src/lib/libssl/src/FAQ +++ b/src/lib/libssl/src/FAQ | |||
| @@ -9,12 +9,30 @@ OpenSSL - Frequently Asked Questions | |||
| 9 | * Why do I get a "PRNG not seeded" error message? | 9 | * Why do I get a "PRNG not seeded" error message? |
| 10 | * Why does the linker complain about undefined symbols? | 10 | * Why does the linker complain about undefined symbols? |
| 11 | * Where can I get a compiled version of OpenSSL? | 11 | * Where can I get a compiled version of OpenSSL? |
| 12 | * I've compiled a program under Windows and it crashes: why? | ||
| 13 | * How do I read or write a DER encoded buffer using the ASN1 functions? | ||
| 14 | * I've tried using <M_some_evil_pkcs12_macro> and I get errors why? | ||
| 15 | * I've called <some function> and it fails, why? | ||
| 16 | * I just get a load of numbers for the error output, what do they mean? | ||
| 17 | * Why do I get errors about unknown algorithms? | ||
| 18 | * How do I create certificates or certificate requests? | ||
| 19 | * Why can't I create certificate requests? | ||
| 20 | * Why does <SSL program> fail with a certificate verify error? | ||
| 21 | * Why can I only use weak ciphers when I connect to a server using OpenSSL? | ||
| 22 | * How can I create DSA certificates? | ||
| 23 | * Why can't I make an SSL connection using a DSA certificate? | ||
| 24 | * How can I remove the passphrase on a private key? | ||
| 25 | * Why can't the OpenSSH configure script detect OpenSSL? | ||
| 26 | * Why does the OpenSSL test fail with "bc: command not found"? | ||
| 27 | * Why does the OpenSSL test fail with "bc: 1 no implemented"? | ||
| 28 | * Why does the OpenSSL compilation fail on Alpha True64 Unix? | ||
| 29 | * Why does the OpenSSL compilation fail with "ar: command not found"? | ||
| 12 | 30 | ||
| 13 | 31 | ||
| 14 | * Which is the current version of OpenSSL? | 32 | * Which is the current version of OpenSSL? |
| 15 | 33 | ||
| 16 | The current version is available from <URL: http://www.openssl.org>. | 34 | The current version is available from <URL: http://www.openssl.org>. |
| 17 | OpenSSL 0.9.5 was released on February 28th, 2000. | 35 | OpenSSL 0.9.6 was released on September 24th, 2000. |
| 18 | 36 | ||
| 19 | In addition to the current stable release, you can also access daily | 37 | In addition to the current stable release, you can also access daily |
| 20 | snapshots of the OpenSSL development version at <URL: | 38 | snapshots of the OpenSSL development version at <URL: |
| @@ -70,18 +88,14 @@ offer legal advice. | |||
| 70 | You can configure OpenSSL so as not to use RC5 and IDEA by using | 88 | You can configure OpenSSL so as not to use RC5 and IDEA by using |
| 71 | ./config no-rc5 no-idea | 89 | ./config no-rc5 no-idea |
| 72 | 90 | ||
| 73 | Until the RSA patent expires, U.S. users may want to use | ||
| 74 | ./config no-rc5 no-idea no-rsa | ||
| 75 | |||
| 76 | Please note that you will *not* be able to communicate with most of | ||
| 77 | the popular web browsers without RSA support. | ||
| 78 | |||
| 79 | 91 | ||
| 80 | * Is OpenSSL thread-safe? | 92 | * Is OpenSSL thread-safe? |
| 81 | 93 | ||
| 82 | Yes. On Windows and many Unix systems, OpenSSL automatically uses the | 94 | Yes (with limitations: an SSL connection may not concurrently be used |
| 83 | multi-threaded versions of the standard libraries. If your platform | 95 | by multiple threads). On Windows and many Unix systems, OpenSSL |
| 84 | is not one of these, consult the INSTALL file. | 96 | automatically uses the multi-threaded versions of the standard |
| 97 | libraries. If your platform is not one of these, consult the INSTALL | ||
| 98 | file. | ||
| 85 | 99 | ||
| 86 | Multi-threaded applications must provide two callback functions to | 100 | Multi-threaded applications must provide two callback functions to |
| 87 | OpenSSL. This is described in the threads(3) manpage. | 101 | OpenSSL. This is described in the threads(3) manpage. |
| @@ -100,8 +114,28 @@ OpenSSL functions that need randomness report an error if the random | |||
| 100 | number generator has not been seeded with at least 128 bits of | 114 | number generator has not been seeded with at least 128 bits of |
| 101 | randomness. If this error occurs, please contact the author of the | 115 | randomness. If this error occurs, please contact the author of the |
| 102 | application you are using. It is likely that it never worked | 116 | application you are using. It is likely that it never worked |
| 103 | correctly. OpenSSL 0.9.5 makes the error visible by refusing to | 117 | correctly. OpenSSL 0.9.5 and later make the error visible by refusing |
| 104 | perform potentially insecure encryption. | 118 | to perform potentially insecure encryption. |
| 119 | |||
| 120 | On systems without /dev/urandom, it is a good idea to use the Entropy | ||
| 121 | Gathering Demon; see the RAND_egd() manpage for details. | ||
| 122 | |||
| 123 | Most components of the openssl command line tool try to use the | ||
| 124 | file $HOME/.rnd (or $RANDFILE, if this environment variable is set) | ||
| 125 | for seeding the PRNG. If this file does not exist or is too short, | ||
| 126 | the "PRNG not seeded" error message may occur. | ||
| 127 | |||
| 128 | [Note to OpenSSL 0.9.5 users: The command "openssl rsa" in version | ||
| 129 | 0.9.5 does not do this and will fail on systems without /dev/urandom | ||
| 130 | when trying to password-encrypt an RSA key! This is a bug in the | ||
| 131 | library; try a later version instead.] | ||
| 132 | |||
| 133 | For Solaris 2.6, Tim Nibbe <tnibbe@sprint.net> and others have suggested | ||
| 134 | installing the SUNski package from Sun patch 105710-01 (Sparc) which | ||
| 135 | adds a /dev/random device and make sure it gets used, usually through | ||
| 136 | $RANDFILE. There are probably similar patches for the other Solaris | ||
| 137 | versions. However, be warned that /dev/random is usually a blocking | ||
| 138 | device, which may have some effects on OpenSSL. | ||
| 105 | 139 | ||
| 106 | 140 | ||
| 107 | * Why does the linker complain about undefined symbols? | 141 | * Why does the linker complain about undefined symbols? |
| @@ -113,7 +147,18 @@ If you used ./Configure instead of ./config, make sure that you | |||
| 113 | selected the right target. File formats may differ slightly between | 147 | selected the right target. File formats may differ slightly between |
| 114 | OS versions (for example sparcv8/sparcv9, or a.out/elf). | 148 | OS versions (for example sparcv8/sparcv9, or a.out/elf). |
| 115 | 149 | ||
| 116 | If that doesn't help, you may want to try using the current snapshot. | 150 | In case you get errors about the following symbols, use the config |
| 151 | option "no-asm", as described in INSTALL: | ||
| 152 | |||
| 153 | BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt, | ||
| 154 | CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt, | ||
| 155 | RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words, | ||
| 156 | bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4, | ||
| 157 | bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3, | ||
| 158 | des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3, | ||
| 159 | des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order | ||
| 160 | |||
| 161 | If none of these helps, you may want to try using the current snapshot. | ||
| 117 | If the problem persists, please submit a bug report. | 162 | If the problem persists, please submit a bug report. |
| 118 | 163 | ||
| 119 | 164 | ||
| @@ -128,3 +173,260 @@ a C compiler, read the "Mingw32" section of INSTALL.W32 for information | |||
| 128 | on how to obtain and install the free GNU C compiler. | 173 | on how to obtain and install the free GNU C compiler. |
| 129 | 174 | ||
| 130 | A number of Linux and *BSD distributions include OpenSSL. | 175 | A number of Linux and *BSD distributions include OpenSSL. |
| 176 | |||
| 177 | |||
| 178 | * I've compiled a program under Windows and it crashes: why? | ||
| 179 | |||
| 180 | This is usually because you've missed the comment in INSTALL.W32. You | ||
| 181 | must link with the multithreaded DLL version of the VC++ runtime library | ||
| 182 | otherwise the conflict will cause a program to crash: typically on the | ||
| 183 | first BIO related read or write operation. | ||
| 184 | |||
| 185 | |||
| 186 | * How do I read or write a DER encoded buffer using the ASN1 functions? | ||
| 187 | |||
| 188 | You have two options. You can either use a memory BIO in conjunction | ||
| 189 | with the i2d_XXX_bio() or d2i_XXX_bio() functions or you can use the | ||
| 190 | i2d_XXX(), d2i_XXX() functions directly. Since these are often the | ||
| 191 | cause of grief here are some code fragments using PKCS7 as an example: | ||
| 192 | |||
| 193 | unsigned char *buf, *p; | ||
| 194 | int len; | ||
| 195 | |||
| 196 | len = i2d_PKCS7(p7, NULL); | ||
| 197 | buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */ | ||
| 198 | p = buf; | ||
| 199 | i2d_PKCS7(p7, &p); | ||
| 200 | |||
| 201 | At this point buf contains the len bytes of the DER encoding of | ||
| 202 | p7. | ||
| 203 | |||
| 204 | The opposite assumes we already have len bytes in buf: | ||
| 205 | |||
| 206 | unsigned char *p; | ||
| 207 | p = buf; | ||
| 208 | p7 = d2i_PKCS7(NULL, &p, len); | ||
| 209 | |||
| 210 | At this point p7 contains a valid PKCS7 structure of NULL if an error | ||
| 211 | occurred. If an error occurred ERR_print_errors(bio) should give more | ||
| 212 | information. | ||
| 213 | |||
| 214 | The reason for the temporary variable 'p' is that the ASN1 functions | ||
| 215 | increment the passed pointer so it is ready to read or write the next | ||
| 216 | structure. This is often a cause of problems: without the temporary | ||
| 217 | variable the buffer pointer is changed to point just after the data | ||
| 218 | that has been read or written. This may well be uninitialized data | ||
| 219 | and attempts to free the buffer will have unpredictable results | ||
| 220 | because it no longer points to the same address. | ||
| 221 | |||
| 222 | |||
| 223 | * I've tried using <M_some_evil_pkcs12_macro> and I get errors why? | ||
| 224 | |||
| 225 | This usually happens when you try compiling something using the PKCS#12 | ||
| 226 | macros with a C++ compiler. There is hardly ever any need to use the | ||
| 227 | PKCS#12 macros in a program, it is much easier to parse and create | ||
| 228 | PKCS#12 files using the PKCS12_parse() and PKCS12_create() functions | ||
| 229 | documented in doc/openssl.txt and with examples in demos/pkcs12. The | ||
| 230 | 'pkcs12' application has to use the macros because it prints out | ||
| 231 | debugging information. | ||
| 232 | |||
| 233 | |||
| 234 | * I've called <some function> and it fails, why? | ||
| 235 | |||
| 236 | Before submitting a report or asking in one of the mailing lists, you | ||
| 237 | should try to determine the cause. In particular, you should call | ||
| 238 | ERR_print_errors() or ERR_print_errors_fp() after the failed call | ||
| 239 | and see if the message helps. Note that the problem may occur earlier | ||
| 240 | than you think -- you should check for errors after every call where | ||
| 241 | it is possible, otherwise the actual problem may be hidden because | ||
| 242 | some OpenSSL functions clear the error state. | ||
| 243 | |||
| 244 | |||
| 245 | * I just get a load of numbers for the error output, what do they mean? | ||
| 246 | |||
| 247 | The actual format is described in the ERR_print_errors() manual page. | ||
| 248 | You should call the function ERR_load_crypto_strings() before hand and | ||
| 249 | the message will be output in text form. If you can't do this (for example | ||
| 250 | it is a pre-compiled binary) you can use the errstr utility on the error | ||
| 251 | code itself (the hex digits after the second colon). | ||
| 252 | |||
| 253 | |||
| 254 | * Why do I get errors about unknown algorithms? | ||
| 255 | |||
| 256 | This can happen under several circumstances such as reading in an | ||
| 257 | encrypted private key or attempting to decrypt a PKCS#12 file. The cause | ||
| 258 | is forgetting to load OpenSSL's table of algorithms with | ||
| 259 | OpenSSL_add_all_algorithms(). See the manual page for more information. | ||
| 260 | |||
| 261 | |||
| 262 | * How do I create certificates or certificate requests? | ||
| 263 | |||
| 264 | Check out the CA.pl(1) manual page. This provides a simple wrapper round | ||
| 265 | the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check | ||
| 266 | out the manual pages for the individual utilities and the certificate | ||
| 267 | extensions documentation (currently in doc/openssl.txt). | ||
| 268 | |||
| 269 | |||
| 270 | * Why can't I create certificate requests? | ||
| 271 | |||
| 272 | You typically get the error: | ||
| 273 | |||
| 274 | unable to find 'distinguished_name' in config | ||
| 275 | problems making Certificate Request | ||
| 276 | |||
| 277 | This is because it can't find the configuration file. Check out the | ||
| 278 | DIAGNOSTICS section of req(1) for more information. | ||
| 279 | |||
| 280 | |||
| 281 | * Why does <SSL program> fail with a certificate verify error? | ||
| 282 | |||
| 283 | This problem is usually indicated by log messages saying something like | ||
| 284 | "unable to get local issuer certificate" or "self signed certificate". | ||
| 285 | When a certificate is verified its root CA must be "trusted" by OpenSSL | ||
| 286 | this typically means that the CA certificate must be placed in a directory | ||
| 287 | or file and the relevant program configured to read it. The OpenSSL program | ||
| 288 | 'verify' behaves in a similar way and issues similar error messages: check | ||
| 289 | the verify(1) program manual page for more information. | ||
| 290 | |||
| 291 | |||
| 292 | * Why can I only use weak ciphers when I connect to a server using OpenSSL? | ||
| 293 | |||
| 294 | This is almost certainly because you are using an old "export grade" browser | ||
| 295 | which only supports weak encryption. Upgrade your browser to support 128 bit | ||
| 296 | ciphers. | ||
| 297 | |||
| 298 | |||
| 299 | * How can I create DSA certificates? | ||
| 300 | |||
| 301 | Check the CA.pl(1) manual page for a DSA certificate example. | ||
| 302 | |||
| 303 | |||
| 304 | * Why can't I make an SSL connection to a server using a DSA certificate? | ||
| 305 | |||
| 306 | Typically you'll see a message saying there are no shared ciphers when | ||
| 307 | the same setup works fine with an RSA certificate. There are two possible | ||
| 308 | causes. The client may not support connections to DSA servers most web | ||
| 309 | browsers (including Netscape and MSIE) only support connections to servers | ||
| 310 | supporting RSA cipher suites. The other cause is that a set of DH parameters | ||
| 311 | has not been supplied to the server. DH parameters can be created with the | ||
| 312 | dhparam(1) command and loaded using the SSL_CTX_set_tmp_dh() for example: | ||
| 313 | check the source to s_server in apps/s_server.c for an example. | ||
| 314 | |||
| 315 | |||
| 316 | * How can I remove the passphrase on a private key? | ||
| 317 | |||
| 318 | Firstly you should be really *really* sure you want to do this. Leaving | ||
| 319 | a private key unencrypted is a major security risk. If you decide that | ||
| 320 | you do have to do this check the EXAMPLES sections of the rsa(1) and | ||
| 321 | dsa(1) manual pages. | ||
| 322 | |||
| 323 | |||
| 324 | * Why can't the OpenSSH configure script detect OpenSSL? | ||
| 325 | |||
| 326 | There is a problem with OpenSSH 1.2.2p1, in that the configure script | ||
| 327 | can't find the installed OpenSSL libraries. The problem is actually | ||
| 328 | a small glitch that is easily solved with the following patch to be | ||
| 329 | applied to the OpenSSH distribution: | ||
| 330 | |||
| 331 | ----- snip:start ----- | ||
| 332 | --- openssh-1.2.2p1/configure.in.orig Thu Mar 23 18:56:58 2000 | ||
| 333 | +++ openssh-1.2.2p1/configure.in Thu Mar 23 18:55:05 2000 | ||
| 334 | @@ -152,10 +152,10 @@ | ||
| 335 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) | ||
| 336 | for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do | ||
| 337 | if test ! -z "$ssldir" ; then | ||
| 338 | - LIBS="$saved_LIBS -L$ssldir" | ||
| 339 | + LIBS="$saved_LIBS -L$ssldir/lib" | ||
| 340 | CFLAGS="$CFLAGS -I$ssldir/include" | ||
| 341 | if test "x$need_dash_r" = "x1" ; then | ||
| 342 | - LIBS="$LIBS -R$ssldir" | ||
| 343 | + LIBS="$LIBS -R$ssldir/lib" | ||
| 344 | fi | ||
| 345 | fi | ||
| 346 | LIBS="$LIBS -lcrypto" | ||
| 347 | --- openssh-1.2.2p1/configure.orig Thu Mar 23 18:55:02 2000 | ||
| 348 | +++ openssh-1.2.2p1/configure Thu Mar 23 18:57:08 2000 | ||
| 349 | @@ -1890,10 +1890,10 @@ | ||
| 350 | echo "configure:1891: checking for OpenSSL/SSLeay directory" >&5 | ||
| 351 | for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do | ||
| 352 | if test ! -z "$ssldir" ; then | ||
| 353 | - LIBS="$saved_LIBS -L$ssldir" | ||
| 354 | + LIBS="$saved_LIBS -L$ssldir/lib" | ||
| 355 | CFLAGS="$CFLAGS -I$ssldir/include" | ||
| 356 | if test "x$need_dash_r" = "x1" ; then | ||
| 357 | - LIBS="$LIBS -R$ssldir" | ||
| 358 | + LIBS="$LIBS -R$ssldir/lib" | ||
| 359 | fi | ||
| 360 | fi | ||
| 361 | LIBS="$LIBS -lcrypto" | ||
| 362 | ----- snip:end ----- | ||
| 363 | |||
| 364 | |||
| 365 | * Why does the OpenSSL test fail with "bc: command not found"? | ||
| 366 | |||
| 367 | You didn't install "bc", the Unix calculator. If you want to run the | ||
| 368 | tests, get GNU bc from ftp://ftp.gnu.org or from your OS distributor. | ||
| 369 | |||
| 370 | |||
| 371 | * Why does the OpenSSL test fail with "bc: 1 no implemented"? | ||
| 372 | |||
| 373 | On some SCO installations or versions, bc has a bug that gets triggered when | ||
| 374 | you run the test suite (using "make test"). The message returned is "bc: | ||
| 375 | 1 not implemented". The best way to deal with this is to find another | ||
| 376 | implementation of bc and compile/install it. For example, GNU bc (see | ||
| 377 | http://www.gnu.org/software/software.html for download instructions) can | ||
| 378 | be safely used. | ||
| 379 | |||
| 380 | |||
| 381 | * Why does the OpenSSL compilation fail on Alpha True64 Unix? | ||
| 382 | |||
| 383 | On some Alpha installations running True64 Unix and Compaq C, the compilation | ||
| 384 | of crypto/sha/sha_dgst.c fails with the message 'Fatal: Insufficient virtual | ||
| 385 | memory to continue compilation.' As far as the tests have shown, this may be | ||
| 386 | a compiler bug. What happens is that it eats up a lot of resident memory | ||
| 387 | to build something, probably a table. The problem is clearly in the | ||
| 388 | optimization code, because if one eliminates optimization completely (-O0), | ||
| 389 | the compilation goes through (and the compiler consumes about 2MB of resident | ||
| 390 | memory instead of 240MB or whatever one's limit is currently). | ||
| 391 | |||
| 392 | There are three options to solve this problem: | ||
| 393 | |||
| 394 | 1. set your current data segment size soft limit higher. Experience shows | ||
| 395 | that about 241000 kbytes seems to be enough on an AlphaServer DS10. You do | ||
| 396 | this with the command 'ulimit -Sd nnnnnn', where 'nnnnnn' is the number of | ||
| 397 | kbytes to set the limit to. | ||
| 398 | |||
| 399 | 2. If you have a hard limit that is lower than what you need and you can't | ||
| 400 | get it changed, you can compile all of OpenSSL with -O0 as optimization | ||
| 401 | level. This is however not a very nice thing to do for those who expect to | ||
| 402 | get the best result from OpenSSL. A bit more complicated solution is the | ||
| 403 | following: | ||
| 404 | |||
| 405 | ----- snip:start ----- | ||
| 406 | make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \ | ||
| 407 | sed -e 's/ -O[0-9] / -O0 /'`" | ||
| 408 | rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'` | ||
| 409 | make | ||
| 410 | ----- snip:end ----- | ||
| 411 | |||
| 412 | This will only compile sha_dgst.c with -O0, the rest with the optimization | ||
| 413 | level chosen by the configuration process. When the above is done, do the | ||
| 414 | test and installation and you're set. | ||
| 415 | |||
| 416 | |||
| 417 | * Why does the OpenSSL compilation fail with "ar: command not found"? | ||
| 418 | |||
| 419 | Getting this message is quite usual on Solaris 2, because Sun has hidden | ||
| 420 | away 'ar' and other development commands in directories that aren't in | ||
| 421 | $PATH by default. One of those directories is '/usr/ccs/bin'. The | ||
| 422 | quickest way to fix this is to do the following (it assumes you use sh | ||
| 423 | or any sh-compatible shell): | ||
| 424 | |||
| 425 | ----- snip:start ----- | ||
| 426 | PATH=${PATH}:/usr/ccs/bin; export PATH | ||
| 427 | ----- snip:end ----- | ||
| 428 | |||
| 429 | and then redo the compilation. What you should really do is make sure | ||
| 430 | '/usr/ccs/bin' is permanently in your $PATH, for example through your | ||
| 431 | '.profile' (again, assuming you use a sh-compatible shell). | ||
| 432 | |||
diff --git a/src/lib/libssl/src/INSTALL b/src/lib/libssl/src/INSTALL index 57a6c808d8..a7854f3d10 100644 --- a/src/lib/libssl/src/INSTALL +++ b/src/lib/libssl/src/INSTALL | |||
| @@ -52,6 +52,15 @@ | |||
| 52 | This will usually require additional system-dependent options! | 52 | This will usually require additional system-dependent options! |
| 53 | See "Note on multi-threading" below. | 53 | See "Note on multi-threading" below. |
| 54 | 54 | ||
| 55 | no-shared Don't try to create shared libraries. | ||
| 56 | |||
| 57 | shared In addition to the usual static libraries, create shared | ||
| 58 | libraries on platforms where it's supported. See "Note on | ||
| 59 | shared libraries" below. THIS IS NOT RECOMMENDED! Since | ||
| 60 | this is a development branch, the positions of the ENGINE | ||
| 61 | symbols in the transfer vector are constantly moving, so | ||
| 62 | binary backward compatibility can't be guaranteed in any way. | ||
| 63 | |||
| 55 | no-asm Do not use assembler code. | 64 | no-asm Do not use assembler code. |
| 56 | 65 | ||
| 57 | 386 Use the 80386 instruction set only (the default x86 code is | 66 | 386 Use the 80386 instruction set only (the default x86 code is |
| @@ -117,9 +126,12 @@ | |||
| 117 | OpenSSL binary ("openssl"). The libraries will be built in the top-level | 126 | OpenSSL binary ("openssl"). The libraries will be built in the top-level |
| 118 | directory, and the binary will be in the "apps" directory. | 127 | directory, and the binary will be in the "apps" directory. |
| 119 | 128 | ||
| 120 | If "make" fails, please report the problem to <openssl-bugs@openssl.org> | 129 | If "make" fails, look at the output. There may be reasons for |
| 121 | (note that your message will be forwarded to a public mailing list). | 130 | the failure that isn't a problem in OpenSSL itself (like missing |
| 122 | Include the output of "make report" in your message. | 131 | standard headers). If it is a problem with OpenSSL itself, please |
| 132 | report the problem to <openssl-bugs@openssl.org> (note that your | ||
| 133 | message will be forwarded to a public mailing list). Include the | ||
| 134 | output of "make report" in your message. | ||
| 123 | 135 | ||
| 124 | [If you encounter assembler error messages, try the "no-asm" | 136 | [If you encounter assembler error messages, try the "no-asm" |
| 125 | configuration option as an immediate fix.] | 137 | configuration option as an immediate fix.] |
| @@ -131,10 +143,13 @@ | |||
| 131 | 143 | ||
| 132 | $ make test | 144 | $ make test |
| 133 | 145 | ||
| 134 | If a test fails, try removing any compiler optimization flags from | 146 | If a test fails, look at the output. There may be reasons for |
| 135 | the CFLAGS line in Makefile.ssl and run "make clean; make". Please | 147 | the failure that isn't a problem in OpenSSL itself (like a missing |
| 136 | send a bug report to <openssl-bugs@openssl.org>, including the | 148 | or malfunctioning bc). If it is a problem with OpenSSL itself, |
| 137 | output of "make report". | 149 | try removing any compiler optimization flags from the CFLAGS line |
| 150 | in Makefile.ssl and run "make clean; make". Please send a bug | ||
| 151 | report to <openssl-bugs@openssl.org>, including the output of | ||
| 152 | "make report". | ||
| 138 | 153 | ||
| 139 | 4. If everything tests ok, install OpenSSL with | 154 | 4. If everything tests ok, install OpenSSL with |
| 140 | 155 | ||
| @@ -252,3 +267,14 @@ | |||
| 252 | you can still use "no-threads" to suppress an annoying warning message | 267 | you can still use "no-threads" to suppress an annoying warning message |
| 253 | from the Configure script.) | 268 | from the Configure script.) |
| 254 | 269 | ||
| 270 | |||
| 271 | Note on shared libraries | ||
| 272 | ------------------------ | ||
| 273 | |||
| 274 | For some systems, the OpenSSL Configure script knows what is needed to | ||
| 275 | build shared libraries for libcrypto and libssl. On these systems, | ||
| 276 | the shared libraries are currently not created by default, but giving | ||
| 277 | the option "shared" will get them created. This method supports Makefile | ||
| 278 | targets for shared library creation, like linux-shared. Those targets | ||
| 279 | can currently be used on their own just as well, but this is expected | ||
| 280 | to change in future versions of OpenSSL. | ||
diff --git a/src/lib/libssl/src/INSTALL.VMS b/src/lib/libssl/src/INSTALL.VMS index 0a25324033..1fe78a41bb 100644 --- a/src/lib/libssl/src/INSTALL.VMS +++ b/src/lib/libssl/src/INSTALL.VMS | |||
| @@ -82,12 +82,17 @@ directory. The syntax is trhe following: | |||
| 82 | RSAREF compile using the RSAREF Library | 82 | RSAREF compile using the RSAREF Library |
| 83 | NORSAREF compile without using RSAREF | 83 | NORSAREF compile without using RSAREF |
| 84 | 84 | ||
| 85 | Note 1: The RSAREF libraries are NOT INCLUDED and you have to | 85 | Note 0: The RASREF library IS NO LONGER NEEDED. The RSA patent |
| 86 | download it from "ftp://ftp.rsa.com/rsaref". You have to | 86 | expires September 20, 2000, and RSA Security chose to make |
| 87 | get the ".tar-Z" file as the ".zip" file doesn't have the | 87 | the algorithm public domain two weeks before that. |
| 88 | directory structure stored. You have to extract the file | 88 | |
| 89 | into the [.RSAREF] directory as that is where the scripts | 89 | Note 1: If you still want to use RSAREF, the library is NOT INCLUDED |
| 90 | will look for the files. | 90 | and you have to download it. RSA Security doesn't carry it |
| 91 | any more, but there are a number of places where you can find | ||
| 92 | it. You have to get the ".tar-Z" file as the ".zip" file | ||
| 93 | doesn't have the directory structure stored. You have to | ||
| 94 | extract the file into the [.RSAREF] directory as that is where | ||
| 95 | the scripts will look for the files. | ||
| 91 | 96 | ||
| 92 | Note 2: I have never done this, so I've no idea if it works or not. | 97 | Note 2: I have never done this, so I've no idea if it works or not. |
| 93 | 98 | ||
| @@ -129,7 +134,7 @@ Currently, the logical names supported are: | |||
| 129 | used. This is good to try if something doesn't work. | 134 | used. This is good to try if something doesn't work. |
| 130 | OPENSSL_NO_'alg' with value YES, the corresponding crypto algorithm | 135 | OPENSSL_NO_'alg' with value YES, the corresponding crypto algorithm |
| 131 | will not be implemented. Supported algorithms to | 136 | will not be implemented. Supported algorithms to |
| 132 | do this with are: RSA, DSA, DH, MD2, MD5, RIPEMD, | 137 | do this with are: RSA, DSA, DH, MD2, MD4, MD5, RIPEMD, |
| 133 | SHA, DES, MDC2, CR2, RC4, RC5, IDEA, BF, CAST, HMAC, | 138 | SHA, DES, MDC2, CR2, RC4, RC5, IDEA, BF, CAST, HMAC, |
| 134 | SSL2. So, for example, having the logical name | 139 | SSL2. So, for example, having the logical name |
| 135 | OPENSSL_NO_RSA with the value YES means that the | 140 | OPENSSL_NO_RSA with the value YES means that the |
diff --git a/src/lib/libssl/src/INSTALL.W32 b/src/lib/libssl/src/INSTALL.W32 index 8c8008b4ad..a98364f50f 100644 --- a/src/lib/libssl/src/INSTALL.W32 +++ b/src/lib/libssl/src/INSTALL.W32 | |||
| @@ -108,8 +108,8 @@ | |||
| 108 | 108 | ||
| 109 | * Compiler installation: | 109 | * Compiler installation: |
| 110 | 110 | ||
| 111 | Mingw32 is available from <ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/ | 111 | Mingw32 is available from <ftp://ftp.xraylith.wisc.edu/pub/khan/ |
| 112 | mingw32/egcs-1.1.2/egcs-1.1.2-mingw32.zip>. GNU make is at | 112 | gnu-win32/mingw32/gcc-2.95.2/gcc-2.95.2-msvcrt.exe>. GNU make is at |
| 113 | <ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32/binaries/ | 113 | <ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32/binaries/ |
| 114 | make-3.76.1.zip>. Install both of them in C:\egcs-1.1.2 and run | 114 | make-3.76.1.zip>. Install both of them in C:\egcs-1.1.2 and run |
| 115 | C:\egcs-1.1.2\mingw32.bat to set the PATH. | 115 | C:\egcs-1.1.2\mingw32.bat to set the PATH. |
| @@ -132,6 +132,81 @@ | |||
| 132 | > cd out | 132 | > cd out |
| 133 | > ..\ms\test | 133 | > ..\ms\test |
| 134 | 134 | ||
| 135 | GNU C (CygWin32) | ||
| 136 | --------------- | ||
| 137 | |||
| 138 | CygWin32 provides a bash shell and GNU tools environment running on | ||
| 139 | NT 4.0, Windows 9x and Windows 2000. Consequently, a make of OpenSSL | ||
| 140 | with CygWin is closer to a GNU bash environment such as Linux rather | ||
| 141 | than other W32 makes that are based on a single makefile approach. | ||
| 142 | CygWin32 implements Posix/Unix calls through cygwin1.dll, and is | ||
| 143 | contrasted to Mingw32 which links dynamically to msvcrt.dll or | ||
| 144 | crtdll.dll. | ||
| 145 | |||
| 146 | To build OpenSSL using CygWin32: | ||
| 147 | |||
| 148 | * Install CygWin32 (see http://sourceware.cygnus.com/cygwin) | ||
| 149 | |||
| 150 | * Install Perl and ensure it is in the path | ||
| 151 | |||
| 152 | * Run the CygWin bash shell | ||
| 153 | |||
| 154 | * $ tar zxvf openssl-x.x.x.tar.gz | ||
| 155 | $ cd openssl-x.x.x | ||
| 156 | $ ./Configure no-threads CygWin32 | ||
| 157 | [...] | ||
| 158 | $ make | ||
| 159 | [...] | ||
| 160 | $ make test | ||
| 161 | $ make install | ||
| 162 | |||
| 163 | This will create a default install in /usr/local/ssl. | ||
| 164 | |||
| 165 | CygWin32 Notes: | ||
| 166 | |||
| 167 | "make test" and normal file operations may fail in directories | ||
| 168 | mounted as text (i.e. mount -t c:\somewhere /home) due to CygWin | ||
| 169 | stripping of carriage returns. To avoid this ensure that a binary | ||
| 170 | mount is used, e.g. mount -b c:\somewhere /home. | ||
| 171 | |||
| 172 | As of version 1.1.1 CygWin32 is relatively unstable in its handling | ||
| 173 | of cr/lf issues. These make procedures succeeded with versions 1.1 and | ||
| 174 | the snapshot 20000524 (Slow!). | ||
| 175 | |||
| 176 | "bc" is not provided in the CygWin32 distribution. This causes a | ||
| 177 | non-fatal error in "make test" but is otherwise harmless. If | ||
| 178 | desired, GNU bc can be built with CygWin32 without change. | ||
| 179 | |||
| 180 | |||
| 181 | Installation | ||
| 182 | ------------ | ||
| 183 | |||
| 184 | There's currently no real installation procedure for Win32. There are, | ||
| 185 | however, some suggestions: | ||
| 186 | |||
| 187 | - do nothing. The include files are found in the inc32/ subdirectory, | ||
| 188 | all binaries are found in out32dll/ or out32/ depending if you built | ||
| 189 | dynamic or static libraries. | ||
| 190 | |||
| 191 | - do as is written in INSTALL.Win32 that comes with modssl: | ||
| 192 | |||
| 193 | $ md c:\openssl | ||
| 194 | $ md c:\openssl\bin | ||
| 195 | $ md c:\openssl\lib | ||
| 196 | $ md c:\openssl\include | ||
| 197 | $ md c:\openssl\include\openssl | ||
| 198 | $ copy /b inc32\* c:\openssl\include\openssl | ||
| 199 | $ copy /b out32dll\ssleay32.lib c:\openssl\lib | ||
| 200 | $ copy /b out32dll\libeay32.lib c:\openssl\lib | ||
| 201 | $ copy /b out32dll\ssleay32.dll c:\openssl\bin | ||
| 202 | $ copy /b out32dll\libeay32.dll c:\openssl\bin | ||
| 203 | $ copy /b out32dll\openssl.exe c:\openssl\bin | ||
| 204 | |||
| 205 | Of course, you can choose another device than c:. C: is used here | ||
| 206 | because that's usually the first (and often only) harddisk device. | ||
| 207 | Note: in the modssl INSTALL.Win32, p: is used rather than c:. | ||
| 208 | |||
| 209 | |||
| 135 | Troubleshooting | 210 | Troubleshooting |
| 136 | --------------- | 211 | --------------- |
| 137 | 212 | ||
diff --git a/src/lib/libssl/src/Makefile.org b/src/lib/libssl/src/Makefile.org index cc02130758..0dd8a4e644 100644 --- a/src/lib/libssl/src/Makefile.org +++ b/src/lib/libssl/src/Makefile.org | |||
| @@ -5,8 +5,15 @@ | |||
| 5 | VERSION= | 5 | VERSION= |
| 6 | MAJOR= | 6 | MAJOR= |
| 7 | MINOR= | 7 | MINOR= |
| 8 | SHLIB_VERSION_NUMBER= | ||
| 9 | SHLIB_VERSION_HISTORY= | ||
| 10 | SHLIB_MAJOR= | ||
| 11 | SHLIB_MINOR= | ||
| 8 | PLATFORM=dist | 12 | PLATFORM=dist |
| 9 | OPTIONS= | 13 | OPTIONS= |
| 14 | CONFIGURE_ARGS= | ||
| 15 | SHLIB_TARGET= | ||
| 16 | |||
| 10 | # INSTALL_PREFIX is for package builders so that they can configure | 17 | # INSTALL_PREFIX is for package builders so that they can configure |
| 11 | # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/. | 18 | # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/. |
| 12 | # Normally it is left empty. | 19 | # Normally it is left empty. |
| @@ -57,7 +64,7 @@ AR=ar r | |||
| 57 | RANLIB= ranlib | 64 | RANLIB= ranlib |
| 58 | PERL= perl | 65 | PERL= perl |
| 59 | TAR= tar | 66 | TAR= tar |
| 60 | TARFLAGS= --norecurse | 67 | TARFLAGS= --no-recursion |
| 61 | 68 | ||
| 62 | # Set BN_ASM to bn_asm.o if you want to use the C version | 69 | # Set BN_ASM to bn_asm.o if you want to use the C version |
| 63 | BN_ASM= bn_asm.o | 70 | BN_ASM= bn_asm.o |
| @@ -144,14 +151,21 @@ RMD160_ASM_OBJ= asm/rm86-out.o | |||
| 144 | #RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD | 151 | #RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD |
| 145 | #RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi | 152 | #RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi |
| 146 | 153 | ||
| 147 | DIRS= crypto ssl rsaref apps test tools | 154 | # To do special treatment, use "directory names" starting with a period. |
| 155 | # When we're prepared to use shared libraries in the programs we link here | ||
| 156 | # we might have SHLIB_MARK1 get the value ".shlib." and SHLIB_MARK2 be empty, | ||
| 157 | # or have that configurable. | ||
| 158 | SHLIB_MARK1=.shlib-clean. | ||
| 159 | SHLIB_MARK2=.shlib. | ||
| 160 | |||
| 161 | DIRS= crypto ssl rsaref $(SHLIB_MARK1) apps test tools $(SHLIB_MARK2) | ||
| 148 | SHLIBDIRS= crypto ssl | 162 | SHLIBDIRS= crypto ssl |
| 149 | 163 | ||
| 150 | # dirs in crypto to build | 164 | # dirs in crypto to build |
| 151 | SDIRS= \ | 165 | SDIRS= \ |
| 152 | md2 md5 sha mdc2 hmac ripemd \ | 166 | md2 md4 md5 sha mdc2 hmac ripemd \ |
| 153 | des rc2 rc4 rc5 idea bf cast \ | 167 | des rc2 rc4 rc5 idea bf cast \ |
| 154 | bn rsa dsa dh \ | 168 | bn rsa dsa dh dso engine \ |
| 155 | buffer bio stack lhash rand err objects \ | 169 | buffer bio stack lhash rand err objects \ |
| 156 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp | 170 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp |
| 157 | 171 | ||
| @@ -167,7 +181,8 @@ TOP= . | |||
| 167 | ONEDIRS=out tmp | 181 | ONEDIRS=out tmp |
| 168 | EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS | 182 | EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS |
| 169 | WDIRS= windows | 183 | WDIRS= windows |
| 170 | LIBS= libcrypto.a libssl.a | 184 | LIBS= libcrypto.a libssl.a |
| 185 | SHARED_LIBS=libcrypto.so libssl.so | ||
| 171 | 186 | ||
| 172 | GENERAL= Makefile | 187 | GENERAL= Makefile |
| 173 | BASENAME= openssl | 188 | BASENAME= openssl |
| @@ -178,37 +193,108 @@ EXHEADER= e_os.h e_os2.h | |||
| 178 | HEADER= e_os.h | 193 | HEADER= e_os.h |
| 179 | 194 | ||
| 180 | all: Makefile.ssl | 195 | all: Makefile.ssl |
| 181 | @for i in $(DIRS) ;\ | 196 | @need_shlib=true; \ |
| 197 | for i in $(DIRS) ;\ | ||
| 182 | do \ | 198 | do \ |
| 183 | (cd $$i && echo "making all in $$i..." && \ | 199 | if [ "$$i" = ".shlib-clean." ]; then \ |
| 184 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ | 200 | if [ "$(SHLIB_TARGET)" != "" ]; then \ |
| 185 | done | 201 | $(MAKE) clean-shared; \ |
| 186 | -@# cd crypto; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps | 202 | fi; \ |
| 187 | -@# cd perl; $(PERL) Makefile.PL; make | 203 | elif [ "$$i" = ".shlib." ]; then \ |
| 204 | if [ "$(SHLIB_TARGET)" != "" ]; then \ | ||
| 205 | $(MAKE) $(SHARED_LIBS); \ | ||
| 206 | fi; \ | ||
| 207 | need_shlib=false; \ | ||
| 208 | else \ | ||
| 209 | (cd $$i && echo "making all in $$i..." && \ | ||
| 210 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ | ||
| 211 | fi; \ | ||
| 212 | done; \ | ||
| 213 | if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \ | ||
| 214 | $(MAKE) $(SHARED_LIBS); \ | ||
| 215 | fi | ||
| 188 | 216 | ||
| 189 | sub_all: | 217 | sub_all: |
| 190 | @for i in $(DIRS) ;\ | 218 | @need_shlib=true; \ |
| 219 | for i in $(DIRS) ;\ | ||
| 191 | do \ | 220 | do \ |
| 192 | (cd $$i && echo "making all in $$i..." && \ | 221 | if [ "$$i" = ".shlib-clean." ]; then \ |
| 193 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ | 222 | if [ "$(SHLIB_TARGET)" != "" ]; then \ |
| 194 | done; | 223 | $(MAKE) clean-shared; \ |
| 224 | fi; \ | ||
| 225 | elif [ "$$i" = ".shlib." ]; then \ | ||
| 226 | if [ "$(SHLIB_TARGET)" != "" ]; then \ | ||
| 227 | $(MAKE) $(SHARED_LIBS); \ | ||
| 228 | fi; \ | ||
| 229 | need_shlib=false; \ | ||
| 230 | else \ | ||
| 231 | (cd $$i && echo "making all in $$i..." && \ | ||
| 232 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ | ||
| 233 | fi; \ | ||
| 234 | done; \ | ||
| 235 | if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \ | ||
| 236 | $(MAKE) $(SHARED_LIBS); \ | ||
| 237 | fi | ||
| 238 | |||
| 239 | libcrypto.so: libcrypto.a | ||
| 240 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ | ||
| 241 | $(MAKE) SHLIBDIRS=crypto $(SHLIB_TARGET); \ | ||
| 242 | else \ | ||
| 243 | echo "There's no support for shared libraries on this platform" >&2; \ | ||
| 244 | fi | ||
| 245 | libssl.so: libcrypto.so libssl.a | ||
| 246 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ | ||
| 247 | $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-L. -lcrypto' $(SHLIB_TARGET); \ | ||
| 248 | else \ | ||
| 249 | echo "There's no support for shared libraries on this platform" >&2; \ | ||
| 250 | fi | ||
| 251 | |||
| 252 | clean-shared: | ||
| 253 | for i in ${SHLIBDIRS}; do \ | ||
| 254 | rm -f lib$$i.so \ | ||
| 255 | lib$$i.so.${SHLIB_MAJOR} \ | ||
| 256 | lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ | ||
| 257 | done | ||
| 195 | 258 | ||
| 196 | linux-shared: | 259 | linux-shared: |
| 197 | for i in ${SHLIBDIRS}; do \ | 260 | libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ |
| 198 | rm -f lib$$i.a lib$$i.so \ | 261 | rm -f lib$$i.so \ |
| 199 | lib$$i.so.${MAJOR} lib$$i.so.${MAJOR}.${MINOR}; \ | 262 | lib$$i.so.${SHLIB_MAJOR} \ |
| 200 | ${MAKE} CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='-fPIC ${CFLAG}' SDIRS='${SDIRS}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' DIRS=$$i clean all || exit 1; \ | 263 | lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ |
| 201 | ( set -x; ${CC} -shared -o lib$$i.so.${MAJOR}.${MINOR} \ | 264 | ( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
| 202 | -Wl,-S,-soname=lib$$i.so.${MAJOR} \ | 265 | -Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \ |
| 203 | -Wl,--whole-archive lib$$i.a \ | 266 | -Wl,--whole-archive lib$$i.a \ |
| 204 | -Wl,--no-whole-archive -lc ) || exit 1; \ | 267 | -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \ |
| 205 | rm -f lib$$i.a; make -C $$i clean || exit 1 ;\ | 268 | libs="$$libs -L. -l$$i"; \ |
| 206 | done; | 269 | ( set -x; \ |
| 207 | @set -x; \ | 270 | ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
| 208 | for i in ${SHLIBDIRS}; do \ | 271 | lib$$i.so.${SHLIB_MAJOR}; \ |
| 209 | ln -s lib$$i.so.${MAJOR}.${MINOR} lib$$i.so.${MAJOR}; \ | 272 | ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so ); \ |
| 210 | ln -s lib$$i.so.${MAJOR} lib$$i.so; \ | 273 | done |
| 211 | done; | 274 | |
| 275 | # This assumes that GNU utilities are *not* used | ||
| 276 | true64-shared: | ||
| 277 | libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ | ||
| 278 | ( set -x; ${CC} -shared -no_archive -o lib$$i.so \ | ||
| 279 | -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \ | ||
| 280 | -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \ | ||
| 281 | libs="$$libs -L. -l$$i"; \ | ||
| 282 | done | ||
| 283 | |||
| 284 | # This assumes that GNU utilities are *not* used | ||
| 285 | solaris-shared: | ||
| 286 | libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ | ||
| 287 | rm -f lib$$i.so \ | ||
| 288 | lib$$i.so.${SHLIB_MAJOR} \ | ||
| 289 | lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ | ||
| 290 | ( set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ | ||
| 291 | -h lib$$i.so.${SHLIB_MAJOR} \ | ||
| 292 | -z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \ | ||
| 293 | libs="$$libs -L. -l$$i"; \ | ||
| 294 | ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ | ||
| 295 | lib$$i.so.${SHLIB_MAJOR}; \ | ||
| 296 | ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so; \ | ||
| 297 | done | ||
| 212 | 298 | ||
| 213 | Makefile.ssl: Makefile.org | 299 | Makefile.ssl: Makefile.org |
| 214 | @echo "Makefile.ssl is older than Makefile.org." | 300 | @echo "Makefile.ssl is older than Makefile.org." |
| @@ -222,9 +308,11 @@ clean: | |||
| 222 | rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c | 308 | rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c |
| 223 | @for i in $(DIRS) ;\ | 309 | @for i in $(DIRS) ;\ |
| 224 | do \ | 310 | do \ |
| 225 | (cd $$i && echo "making clean in $$i..." && \ | 311 | if echo "$$i" | grep -v '^\.'; then \ |
| 226 | $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \ | 312 | (cd $$i && echo "making clean in $$i..." && \ |
| 227 | rm -f $(LIBS); \ | 313 | $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \ |
| 314 | rm -f $(LIBS); \ | ||
| 315 | fi; \ | ||
| 228 | done; | 316 | done; |
| 229 | rm -f *.a *.o speed.* *.map *.so .pure core | 317 | rm -f *.a *.o speed.* *.map *.so .pure core |
| 230 | rm -f $(TARFILE) | 318 | rm -f $(TARFILE) |
| @@ -241,8 +329,10 @@ files: | |||
| 241 | $(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO | 329 | $(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO |
| 242 | @for i in $(DIRS) ;\ | 330 | @for i in $(DIRS) ;\ |
| 243 | do \ | 331 | do \ |
| 244 | (cd $$i && echo "making 'files' in $$i..." && \ | 332 | if echo "$$i" | grep -v '^\.'; then \ |
| 245 | $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \ | 333 | (cd $$i && echo "making 'files' in $$i..." && \ |
| 334 | $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \ | ||
| 335 | fi; \ | ||
| 246 | done; | 336 | done; |
| 247 | 337 | ||
| 248 | links: | 338 | links: |
| @@ -250,21 +340,25 @@ links: | |||
| 250 | @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl | 340 | @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl |
| 251 | @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) | 341 | @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) |
| 252 | @for i in $(DIRS); do \ | 342 | @for i in $(DIRS); do \ |
| 253 | (cd $$i && echo "making links in $$i..." && \ | 343 | if echo "$$i" | grep -v '^\.'; then \ |
| 254 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' links ) || exit 1; \ | 344 | (cd $$i && echo "making links in $$i..." && \ |
| 345 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' links ) || exit 1; \ | ||
| 346 | fi; \ | ||
| 255 | done; | 347 | done; |
| 256 | 348 | ||
| 257 | dclean: | 349 | dclean: |
| 258 | rm -f *.bak | 350 | rm -f *.bak |
| 259 | @for i in $(DIRS) ;\ | 351 | @for i in $(DIRS) ;\ |
| 260 | do \ | 352 | do \ |
| 261 | (cd $$i && echo "making dclean in $$i..." && \ | 353 | if echo "$$i" | grep -v '^\.'; then \ |
| 262 | $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \ | 354 | (cd $$i && echo "making dclean in $$i..." && \ |
| 355 | $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \ | ||
| 356 | fi; \ | ||
| 263 | done; | 357 | done; |
| 264 | 358 | ||
| 265 | rehash: rehash.time | 359 | rehash: rehash.time |
| 266 | rehash.time: certs | 360 | rehash.time: certs |
| 267 | @(OPENSSL="`pwd`/apps/openssl"; export OPENSSL; sh tools/c_rehash certs) | 361 | @(OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs) |
| 268 | touch rehash.time | 362 | touch rehash.time |
| 269 | 363 | ||
| 270 | test: tests | 364 | test: tests |
| @@ -280,41 +374,52 @@ report: | |||
| 280 | depend: | 374 | depend: |
| 281 | @for i in $(DIRS) ;\ | 375 | @for i in $(DIRS) ;\ |
| 282 | do \ | 376 | do \ |
| 283 | (cd $$i && echo "making dependencies $$i..." && \ | 377 | if echo "$$i" | grep -v '^\.'; then \ |
| 284 | $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \ | 378 | (cd $$i && echo "making dependencies $$i..." && \ |
| 379 | $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \ | ||
| 380 | fi; \ | ||
| 285 | done; | 381 | done; |
| 286 | 382 | ||
| 287 | lint: | 383 | lint: |
| 288 | @for i in $(DIRS) ;\ | 384 | @for i in $(DIRS) ;\ |
| 289 | do \ | 385 | do \ |
| 290 | (cd $$i && echo "making lint $$i..." && \ | 386 | if echo "$$i" | grep -v '^\.'; then \ |
| 291 | $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \ | 387 | (cd $$i && echo "making lint $$i..." && \ |
| 388 | $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \ | ||
| 389 | fi; \ | ||
| 292 | done; | 390 | done; |
| 293 | 391 | ||
| 294 | tags: | 392 | tags: |
| 295 | @for i in $(DIRS) ;\ | 393 | @for i in $(DIRS) ;\ |
| 296 | do \ | 394 | do \ |
| 297 | (cd $$i && echo "making tags $$i..." && \ | 395 | if echo "$$i" | grep -v '^\.'; then \ |
| 298 | $(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \ | 396 | (cd $$i && echo "making tags $$i..." && \ |
| 397 | $(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \ | ||
| 398 | fi; \ | ||
| 299 | done; | 399 | done; |
| 300 | 400 | ||
| 301 | errors: | 401 | errors: |
| 302 | perl util/mkerr.pl -recurse -write | 402 | perl util/mkerr.pl -recurse -write |
| 303 | 403 | ||
| 404 | stacks: | ||
| 405 | perl util/mkstack.pl -write | ||
| 406 | |||
| 304 | util/libeay.num:: | 407 | util/libeay.num:: |
| 305 | perl util/mkdef.pl crypto update | 408 | perl util/mkdef.pl crypto update |
| 306 | 409 | ||
| 307 | util/ssleay.num:: | 410 | util/ssleay.num:: |
| 308 | perl util/mkdef.pl ssl update | 411 | perl util/mkdef.pl ssl update |
| 309 | 412 | ||
| 310 | crypto/objects/obj_dat.h: crypto/objects/objects.h crypto/objects/obj_dat.pl | 413 | crypto/objects/obj_dat.h: crypto/objects/obj_mac.h crypto/objects/obj_dat.pl |
| 311 | perl crypto/objects/obj_dat.pl crypto/objects/objects.h crypto/objects/obj_dat.h | 414 | perl crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h |
| 415 | crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt | ||
| 416 | perl crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h | ||
| 312 | 417 | ||
| 313 | TABLE: Configure | 418 | TABLE: Configure |
| 314 | (echo 'Output of `Configure TABLE'"':"; \ | 419 | (echo 'Output of `Configure TABLE'"':"; \ |
| 315 | perl Configure TABLE) > TABLE | 420 | perl Configure TABLE) > TABLE |
| 316 | 421 | ||
| 317 | update: depend errors util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE | 422 | update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE |
| 318 | 423 | ||
| 319 | tar: | 424 | tar: |
| 320 | @$(TAR) $(TARFLAGS) -cvf - \ | 425 | @$(TAR) $(TARFLAGS) -cvf - \ |
| @@ -349,15 +454,19 @@ install: all install_docs | |||
| 349 | done; | 454 | done; |
| 350 | @for i in $(DIRS) ;\ | 455 | @for i in $(DIRS) ;\ |
| 351 | do \ | 456 | do \ |
| 352 | (cd $$i; echo "installing $$i..."; \ | 457 | if echo "$$i" | grep -v '^\.'; then \ |
| 353 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \ | 458 | (cd $$i; echo "installing $$i..."; \ |
| 459 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \ | ||
| 460 | fi; \ | ||
| 354 | done | 461 | done |
| 355 | @for i in $(LIBS) ;\ | 462 | @for i in $(LIBS) ;\ |
| 356 | do \ | 463 | do \ |
| 357 | ( echo installing $$i; \ | 464 | if [ -f "$$i" ]; then \ |
| 358 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ | 465 | ( echo installing $$i; \ |
| 359 | $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ | 466 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ |
| 360 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ | 467 | $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ |
| 468 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ | ||
| 469 | fi \ | ||
| 361 | done | 470 | done |
| 362 | 471 | ||
| 363 | install_docs: | 472 | install_docs: |
diff --git a/src/lib/libssl/src/NEWS b/src/lib/libssl/src/NEWS index a2084af8e6..7cf95cfb0b 100644 --- a/src/lib/libssl/src/NEWS +++ b/src/lib/libssl/src/NEWS | |||
| @@ -5,6 +5,30 @@ | |||
| 5 | This file gives a brief overview of the major changes between each OpenSSL | 5 | This file gives a brief overview of the major changes between each OpenSSL |
| 6 | release. For more details please read the CHANGES file. | 6 | release. For more details please read the CHANGES file. |
| 7 | 7 | ||
| 8 | Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6: | ||
| 9 | |||
| 10 | o Some documentation for BIO and SSL libraries. | ||
| 11 | o Enhanced chain verification using key identifiers. | ||
| 12 | o New sign and verify options to 'dgst' application. | ||
| 13 | o Support for DER and PEM encoded messages in 'smime' application. | ||
| 14 | o New 'rsautl' application, low level RSA utility. | ||
| 15 | o MD4 now included. | ||
| 16 | o Bugfix for SSL rollback padding check. | ||
| 17 | o Support for external crypto devices [1]. | ||
| 18 | o Enhanced EVP interface. | ||
| 19 | |||
| 20 | [1] The support for external crypto devices is currently a separate | ||
| 21 | distribution. See the file README.ENGINE. | ||
| 22 | |||
| 23 | Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a: | ||
| 24 | |||
| 25 | o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8 | ||
| 26 | o Shared library support for HPUX and Solaris-gcc | ||
| 27 | o Support of Linux/IA64 | ||
| 28 | o Assembler support for Mingw32 | ||
| 29 | o New 'rand' application | ||
| 30 | o New way to check for existence of algorithms from scripts | ||
| 31 | |||
| 8 | Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5: | 32 | Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5: |
| 9 | 33 | ||
| 10 | o S/MIME support in new 'smime' command | 34 | o S/MIME support in new 'smime' command |
diff --git a/src/lib/libssl/src/README b/src/lib/libssl/src/README index 7ef77c83c6..e8f20f49a6 100644 --- a/src/lib/libssl/src/README +++ b/src/lib/libssl/src/README | |||
| @@ -98,13 +98,12 @@ | |||
| 98 | country. The file contains some of the patents that we know about or are | 98 | country. The file contains some of the patents that we know about or are |
| 99 | rumoured to exist. This is not a definitive list. | 99 | rumoured to exist. This is not a definitive list. |
| 100 | 100 | ||
| 101 | RSA Data Security holds software patents on the RSA and RC5 algorithms. If | 101 | RSA Security holds software patents on the RC5 algorithm. If you |
| 102 | their ciphers are used used inside the USA (and Japan?), you must contact RSA | 102 | intend to use this cipher, you must contact RSA Security for |
| 103 | Data Security for licensing conditions. Their web page is | 103 | licensing conditions. Their web page is http://www.rsasecurity.com/. |
| 104 | http://www.rsa.com/. | ||
| 105 | 104 | ||
| 106 | RC4 is a trademark of RSA Data Security, so use of this label should perhaps | 105 | RC4 is a trademark of RSA Security, so use of this label should perhaps |
| 107 | only be used with RSA Data Security's permission. | 106 | only be used with RSA Security's permission. |
| 108 | 107 | ||
| 109 | The IDEA algorithm is patented by Ascom in Austria, France, Germany, Italy, | 108 | The IDEA algorithm is patented by Ascom in Austria, France, Germany, Italy, |
| 110 | Japan, Netherlands, Spain, Sweden, Switzerland, UK and the USA. They should | 109 | Japan, Netherlands, Spain, Sweden, Switzerland, UK and the USA. They should |
| @@ -118,9 +117,6 @@ | |||
| 118 | a Win32 platform, read the INSTALL.W32 file. For OpenVMS systems, read | 117 | a Win32 platform, read the INSTALL.W32 file. For OpenVMS systems, read |
| 119 | INSTALL.VMS. | 118 | INSTALL.VMS. |
| 120 | 119 | ||
| 121 | For people in the USA, it is possible to compile OpenSSL to use RSA Inc.'s | ||
| 122 | public key library, RSAREF, by configuring OpenSSL with the option "rsaref". | ||
| 123 | |||
| 124 | Read the documentation in the doc/ directory. It is quite rough, but it | 120 | Read the documentation in the doc/ directory. It is quite rough, but it |
| 125 | lists the functions, you will probably have to look at the code to work out | 121 | lists the functions, you will probably have to look at the code to work out |
| 126 | how to used them. Look at the example programs. | 122 | how to used them. Look at the example programs. |
| @@ -166,6 +162,9 @@ | |||
| 166 | the string "[PATCH]" in the subject. Please be sure to include a | 162 | the string "[PATCH]" in the subject. Please be sure to include a |
| 167 | textual explanation of what your patch does. | 163 | textual explanation of what your patch does. |
| 168 | 164 | ||
| 165 | Note: For legal reasons, contributions from the US can be accepted only | ||
| 166 | if a copy of the patch is sent to crypt@bxa.doc.gov | ||
| 167 | |||
| 169 | The preferred format for changes is "diff -u" output. You might | 168 | The preferred format for changes is "diff -u" output. You might |
| 170 | generate it like this: | 169 | generate it like this: |
| 171 | 170 | ||
| @@ -173,4 +172,4 @@ | |||
| 173 | # [your changes] | 172 | # [your changes] |
| 174 | # ./Configure dist; make clean | 173 | # ./Configure dist; make clean |
| 175 | # cd .. | 174 | # cd .. |
| 176 | # diff -urN openssl-orig openssl-work > mydiffs.patch | 175 | # diff -ur openssl-orig openssl-work > mydiffs.patch |
diff --git a/src/lib/libssl/src/README.ENGINE b/src/lib/libssl/src/README.ENGINE new file mode 100644 index 0000000000..3d88ed152f --- /dev/null +++ b/src/lib/libssl/src/README.ENGINE | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | |||
| 2 | ENGINE | ||
| 3 | ====== | ||
| 4 | |||
| 5 | With OpenSSL 0.9.6, a new component has been added to support external | ||
| 6 | crypto devices, for example accelerator cards. The component is called | ||
| 7 | ENGINE, and has still a pretty experimental status and almost no | ||
| 8 | documentation. It's designed to be faily easily extensible by the | ||
| 9 | calling programs. | ||
| 10 | |||
| 11 | There's currently built-in support for the following crypto devices: | ||
| 12 | |||
| 13 | o CryptoSwift | ||
| 14 | o Compaq Atalla | ||
| 15 | o nCipher CHIL | ||
| 16 | |||
| 17 | A number of things are still needed and are being worked on: | ||
| 18 | |||
| 19 | o An openssl utility command to handle or at least check available | ||
| 20 | engines. | ||
| 21 | o A better way of handling the methods that are handled by the | ||
| 22 | engines. | ||
| 23 | o Documentation! | ||
| 24 | |||
| 25 | What already exists is fairly stable as far as it has been tested, but | ||
| 26 | the test base has been a bit small most of the time. | ||
| 27 | |||
| 28 | Because of this experimental status and what's lacking, the ENGINE | ||
| 29 | component is not yet part of the default OpenSSL distribution. However, | ||
| 30 | we have made a separate kit for those who want to try this out, to be | ||
| 31 | found in the same places as the default OpenSSL distribution, but with | ||
| 32 | "-engine-" being part of the kit file name. For example, version 0.9.6 | ||
| 33 | is distributed in the following two files: | ||
| 34 | |||
| 35 | openssl-0.9.6.tar.gz | ||
| 36 | openssl-engine-0.9.6.tar.gz | ||
| 37 | |||
| 38 | NOTES | ||
| 39 | ===== | ||
| 40 | |||
| 41 | openssl-engine-0.9.6.tar.gz does not depend on openssl-0.9.6.tar, you do | ||
| 42 | not need to download both. | ||
| 43 | |||
| 44 | openssl-engine-0.9.6.tar.gz is usable even if you don't have an external | ||
| 45 | crypto device. The internal OpenSSL functions are contained in the | ||
| 46 | engine "openssl", and will be used by default. | ||
| 47 | |||
| 48 | No external crypto device is chosen unless you say so. You have actively | ||
| 49 | tell the openssl utility commands to use it through a new command line | ||
| 50 | switch called "-engine". And if you want to use the ENGINE library to | ||
| 51 | do something similar, you must also explicitely choose an external crypto | ||
| 52 | device, or the built-in crypto routines will be used, just as in the | ||
| 53 | default OpenSSL distribution. | ||
| 54 | |||
| 55 | |||
| 56 | PROBLEMS | ||
| 57 | ======== | ||
| 58 | |||
| 59 | It seems like the ENGINE part doesn't work too well with Cryptoswift on | ||
| 60 | Win32. A quick test done right before the release showed that trying | ||
| 61 | "openssl speed -engine cswift" generated errors. If the DSO gets enabled, | ||
| 62 | an attempt is made to write at memory address 0x00000002. | ||
| 63 | |||
diff --git a/src/lib/libssl/src/VMS/install.com b/src/lib/libssl/src/VMS/install.com index 1664d769e2..f62635f24d 100644 --- a/src/lib/libssl/src/VMS/install.com +++ b/src/lib/libssl/src/VMS/install.com | |||
| @@ -34,10 +34,8 @@ $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - | |||
| 34 | $ IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN - | 34 | $ IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN - |
| 35 | CREATE/DIR/LOG WRK_SSLROOT:[VMS] | 35 | CREATE/DIR/LOG WRK_SSLROOT:[VMS] |
| 36 | $ | 36 | $ |
| 37 | $ EXHEADER := vms_idhacks.h | 37 | $ IF F$SEARCH("WRK_SSLINCLUDE:vms_idhacks.h") .NES. "" THEN - |
| 38 | $ | 38 | DELETE WRK_SSLINCLUDE:vms_idhacks.h;* |
| 39 | $ COPY 'EXHEADER' WRK_SSLINCLUDE: /LOG | ||
| 40 | $ SET FILE/PROT=WORLD:RE WRK_SSLINCLUDE:'EXHEADER' | ||
| 41 | $ | 39 | $ |
| 42 | $ OPEN/WRITE SF WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM | 40 | $ OPEN/WRITE SF WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM |
| 43 | $ WRITE SYS$OUTPUT "%OPEN-I-CREATED, ",F$SEARCH("WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM")," created." | 41 | $ WRITE SYS$OUTPUT "%OPEN-I-CREATED, ",F$SEARCH("WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM")," created." |
diff --git a/src/lib/libssl/src/VMS/vms_idhacks.h b/src/lib/libssl/src/VMS/vms_idhacks.h index c2010c91e4..e69de29bb2 100644 --- a/src/lib/libssl/src/VMS/vms_idhacks.h +++ b/src/lib/libssl/src/VMS/vms_idhacks.h | |||
| @@ -1,198 +0,0 @@ | |||
| 1 | /* ==================================================================== | ||
| 2 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 3 | * | ||
| 4 | * Redistribution and use in source and binary forms, with or without | ||
| 5 | * modification, are permitted provided that the following conditions | ||
| 6 | * are met: | ||
| 7 | * | ||
| 8 | * 1. Redistributions of source code must retain the above copyright | ||
| 9 | * notice, this list of conditions and the following disclaimer. | ||
| 10 | * | ||
| 11 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer in | ||
| 13 | * the documentation and/or other materials provided with the | ||
| 14 | * distribution. | ||
| 15 | * | ||
| 16 | * 3. All advertising materials mentioning features or use of this | ||
| 17 | * software must display the following acknowledgment: | ||
| 18 | * "This product includes software developed by the OpenSSL Project | ||
| 19 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 20 | * | ||
| 21 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 22 | * endorse or promote products derived from this software without | ||
| 23 | * prior written permission. For written permission, please contact | ||
| 24 | * openssl-core@openssl.org. | ||
| 25 | * | ||
| 26 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 27 | * nor may "OpenSSL" appear in their names without prior written | ||
| 28 | * permission of the OpenSSL Project. | ||
| 29 | * | ||
| 30 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 31 | * acknowledgment: | ||
| 32 | * "This product includes software developed by the OpenSSL Project | ||
| 33 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 34 | * | ||
| 35 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 36 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 37 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 38 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 39 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 40 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 41 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 42 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 43 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 44 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 45 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 46 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 47 | * ==================================================================== | ||
| 48 | * | ||
| 49 | * This product includes cryptographic software written by Eric Young | ||
| 50 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 51 | * Hudson (tjh@cryptsoft.com). | ||
| 52 | * | ||
| 53 | */ | ||
| 54 | |||
| 55 | #ifndef HEADER_VMS_IDHACKS_H | ||
| 56 | #define HEADER_VMS_IDHACKS_H | ||
| 57 | |||
| 58 | #ifdef VMS | ||
| 59 | |||
| 60 | /* Hack a long name in crypto/asn1/a_mbstr.c */ | ||
| 61 | #define ASN1_STRING_set_default_mask_asc ASN1_STRING_set_def_mask_asc | ||
| 62 | /* Hack the names created with DECLARE_STACK_OF(PKCS7_SIGNER_INFO) */ | ||
| 63 | #define sk_PKCS7_SIGNER_INFO_new sk_PKCS7_SIGINF_new | ||
| 64 | #define sk_PKCS7_SIGNER_INFO_new_null sk_PKCS7_SIGINF_new_null | ||
| 65 | #define sk_PKCS7_SIGNER_INFO_free sk_PKCS7_SIGINF_free | ||
| 66 | #define sk_PKCS7_SIGNER_INFO_num sk_PKCS7_SIGINF_num | ||
| 67 | #define sk_PKCS7_SIGNER_INFO_value sk_PKCS7_SIGINF_value | ||
| 68 | #define sk_PKCS7_SIGNER_INFO_set sk_PKCS7_SIGINF_set | ||
| 69 | #define sk_PKCS7_SIGNER_INFO_zero sk_PKCS7_SIGINF_zero | ||
| 70 | #define sk_PKCS7_SIGNER_INFO_push sk_PKCS7_SIGINF_push | ||
| 71 | #define sk_PKCS7_SIGNER_INFO_unshift sk_PKCS7_SIGINF_unshift | ||
| 72 | #define sk_PKCS7_SIGNER_INFO_find sk_PKCS7_SIGINF_find | ||
| 73 | #define sk_PKCS7_SIGNER_INFO_delete sk_PKCS7_SIGINF_delete | ||
| 74 | #define sk_PKCS7_SIGNER_INFO_delete_ptr sk_PKCS7_SIGINF_delete_ptr | ||
| 75 | #define sk_PKCS7_SIGNER_INFO_insert sk_PKCS7_SIGINF_insert | ||
| 76 | #define sk_PKCS7_SIGNER_INFO_set_cmp_func sk_PKCS7_SIGINF_set_cmp_func | ||
| 77 | #define sk_PKCS7_SIGNER_INFO_dup sk_PKCS7_SIGINF_dup | ||
| 78 | #define sk_PKCS7_SIGNER_INFO_pop_free sk_PKCS7_SIGINF_pop_free | ||
| 79 | #define sk_PKCS7_SIGNER_INFO_shift sk_PKCS7_SIGINF_shift | ||
| 80 | #define sk_PKCS7_SIGNER_INFO_pop sk_PKCS7_SIGINF_pop | ||
| 81 | #define sk_PKCS7_SIGNER_INFO_sort sk_PKCS7_SIGINF_sort | ||
| 82 | |||
| 83 | /* Hack the names created with DECLARE_STACK_OF(PKCS7_RECIP_INFO) */ | ||
| 84 | #define sk_PKCS7_RECIP_INFO_new sk_PKCS7_RECINF_new | ||
| 85 | #define sk_PKCS7_RECIP_INFO_new_null sk_PKCS7_RECINF_new_null | ||
| 86 | #define sk_PKCS7_RECIP_INFO_free sk_PKCS7_RECINF_free | ||
| 87 | #define sk_PKCS7_RECIP_INFO_num sk_PKCS7_RECINF_num | ||
| 88 | #define sk_PKCS7_RECIP_INFO_value sk_PKCS7_RECINF_value | ||
| 89 | #define sk_PKCS7_RECIP_INFO_set sk_PKCS7_RECINF_set | ||
| 90 | #define sk_PKCS7_RECIP_INFO_zero sk_PKCS7_RECINF_zero | ||
| 91 | #define sk_PKCS7_RECIP_INFO_push sk_PKCS7_RECINF_push | ||
| 92 | #define sk_PKCS7_RECIP_INFO_unshift sk_PKCS7_RECINF_unshift | ||
| 93 | #define sk_PKCS7_RECIP_INFO_find sk_PKCS7_RECINF_find | ||
| 94 | #define sk_PKCS7_RECIP_INFO_delete sk_PKCS7_RECINF_delete | ||
| 95 | #define sk_PKCS7_RECIP_INFO_delete_ptr sk_PKCS7_RECINF_delete_ptr | ||
| 96 | #define sk_PKCS7_RECIP_INFO_insert sk_PKCS7_RECINF_insert | ||
| 97 | #define sk_PKCS7_RECIP_INFO_set_cmp_func sk_PKCS7_RECINF_set_cmp_func | ||
| 98 | #define sk_PKCS7_RECIP_INFO_dup sk_PKCS7_RECINF_dup | ||
| 99 | #define sk_PKCS7_RECIP_INFO_pop_free sk_PKCS7_RECINF_pop_free | ||
| 100 | #define sk_PKCS7_RECIP_INFO_shift sk_PKCS7_RECINF_shift | ||
| 101 | #define sk_PKCS7_RECIP_INFO_pop sk_PKCS7_RECINF_pop | ||
| 102 | #define sk_PKCS7_RECIP_INFO_sort sk_PKCS7_RECINF_sort | ||
| 103 | |||
| 104 | /* Hack the names created with DECLARE_STACK_OF(ASN1_STRING_TABLE) */ | ||
| 105 | #define sk_ASN1_STRING_TABLE_new sk_ASN1_STRTAB_new | ||
| 106 | #define sk_ASN1_STRING_TABLE_new_null sk_ASN1_STRTAB_new_null | ||
| 107 | #define sk_ASN1_STRING_TABLE_free sk_ASN1_STRTAB_free | ||
| 108 | #define sk_ASN1_STRING_TABLE_num sk_ASN1_STRTAB_num | ||
| 109 | #define sk_ASN1_STRING_TABLE_value sk_ASN1_STRTAB_value | ||
| 110 | #define sk_ASN1_STRING_TABLE_set sk_ASN1_STRTAB_set | ||
| 111 | #define sk_ASN1_STRING_TABLE_zero sk_ASN1_STRTAB_zero | ||
| 112 | #define sk_ASN1_STRING_TABLE_push sk_ASN1_STRTAB_push | ||
| 113 | #define sk_ASN1_STRING_TABLE_unshift sk_ASN1_STRTAB_unshift | ||
| 114 | #define sk_ASN1_STRING_TABLE_find sk_ASN1_STRTAB_find | ||
| 115 | #define sk_ASN1_STRING_TABLE_delete sk_ASN1_STRTAB_delete | ||
| 116 | #define sk_ASN1_STRING_TABLE_delete_ptr sk_ASN1_STRTAB_delete_ptr | ||
| 117 | #define sk_ASN1_STRING_TABLE_insert sk_ASN1_STRTAB_insert | ||
| 118 | #define sk_ASN1_STRING_TABLE_set_cmp_func sk_ASN1_STRTAB_set_cmp_func | ||
| 119 | #define sk_ASN1_STRING_TABLE_dup sk_ASN1_STRTAB_dup | ||
| 120 | #define sk_ASN1_STRING_TABLE_pop_free sk_ASN1_STRTAB_pop_free | ||
| 121 | #define sk_ASN1_STRING_TABLE_shift sk_ASN1_STRTAB_shift | ||
| 122 | #define sk_ASN1_STRING_TABLE_pop sk_ASN1_STRTAB_pop | ||
| 123 | #define sk_ASN1_STRING_TABLE_sort sk_ASN1_STRTAB_sort | ||
| 124 | |||
| 125 | /* Hack the names created with DECLARE_STACK_OF(ACCESS_DESCRIPTION) */ | ||
| 126 | #define sk_ACCESS_DESCRIPTION_new sk_ACC_DESC_new | ||
| 127 | #define sk_ACCESS_DESCRIPTION_new_null sk_ACC_DESC_new_null | ||
| 128 | #define sk_ACCESS_DESCRIPTION_free sk_ACC_DESC_free | ||
| 129 | #define sk_ACCESS_DESCRIPTION_num sk_ACC_DESC_num | ||
| 130 | #define sk_ACCESS_DESCRIPTION_value sk_ACC_DESC_value | ||
| 131 | #define sk_ACCESS_DESCRIPTION_set sk_ACC_DESC_set | ||
| 132 | #define sk_ACCESS_DESCRIPTION_zero sk_ACC_DESC_zero | ||
| 133 | #define sk_ACCESS_DESCRIPTION_push sk_ACC_DESC_push | ||
| 134 | #define sk_ACCESS_DESCRIPTION_unshift sk_ACC_DESC_unshift | ||
| 135 | #define sk_ACCESS_DESCRIPTION_find sk_ACC_DESC_find | ||
| 136 | #define sk_ACCESS_DESCRIPTION_delete sk_ACC_DESC_delete | ||
| 137 | #define sk_ACCESS_DESCRIPTION_delete_ptr sk_ACC_DESC_delete_ptr | ||
| 138 | #define sk_ACCESS_DESCRIPTION_insert sk_ACC_DESC_insert | ||
| 139 | #define sk_ACCESS_DESCRIPTION_set_cmp_func sk_ACC_DESC_set_cmp_func | ||
| 140 | #define sk_ACCESS_DESCRIPTION_dup sk_ACC_DESC_dup | ||
| 141 | #define sk_ACCESS_DESCRIPTION_pop_free sk_ACC_DESC_pop_free | ||
| 142 | #define sk_ACCESS_DESCRIPTION_shift sk_ACC_DESC_shift | ||
| 143 | #define sk_ACCESS_DESCRIPTION_pop sk_ACC_DESC_pop | ||
| 144 | #define sk_ACCESS_DESCRIPTION_sort sk_ACC_DESC_sort | ||
| 145 | |||
| 146 | /* Hack the names created with DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) */ | ||
| 147 | #define sk_CRYPTO_EX_DATA_FUNCS_new sk_CRYPT_EX_DATFNS_new | ||
| 148 | #define sk_CRYPTO_EX_DATA_FUNCS_new_null sk_CRYPT_EX_DATFNS_new_null | ||
| 149 | #define sk_CRYPTO_EX_DATA_FUNCS_free sk_CRYPT_EX_DATFNS_free | ||
| 150 | #define sk_CRYPTO_EX_DATA_FUNCS_num sk_CRYPT_EX_DATFNS_num | ||
| 151 | #define sk_CRYPTO_EX_DATA_FUNCS_value sk_CRYPT_EX_DATFNS_value | ||
| 152 | #define sk_CRYPTO_EX_DATA_FUNCS_set sk_CRYPT_EX_DATFNS_set | ||
| 153 | #define sk_CRYPTO_EX_DATA_FUNCS_zero sk_CRYPT_EX_DATFNS_zero | ||
| 154 | #define sk_CRYPTO_EX_DATA_FUNCS_push sk_CRYPT_EX_DATFNS_push | ||
| 155 | #define sk_CRYPTO_EX_DATA_FUNCS_unshift sk_CRYPT_EX_DATFNS_unshift | ||
| 156 | #define sk_CRYPTO_EX_DATA_FUNCS_find sk_CRYPT_EX_DATFNS_find | ||
| 157 | #define sk_CRYPTO_EX_DATA_FUNCS_delete sk_CRYPT_EX_DATFNS_delete | ||
| 158 | #define sk_CRYPTO_EX_DATA_FUNCS_delete_ptr sk_CRYPT_EX_DATFNS_delete_ptr | ||
| 159 | #define sk_CRYPTO_EX_DATA_FUNCS_insert sk_CRYPT_EX_DATFNS_insert | ||
| 160 | #define sk_CRYPTO_EX_DATA_FUNCS_set_cmp_func sk_CRYPT_EX_DATFNS_set_cmp_func | ||
| 161 | #define sk_CRYPTO_EX_DATA_FUNCS_dup sk_CRYPT_EX_DATFNS_dup | ||
| 162 | #define sk_CRYPTO_EX_DATA_FUNCS_pop_free sk_CRYPT_EX_DATFNS_pop_free | ||
| 163 | #define sk_CRYPTO_EX_DATA_FUNCS_shift sk_CRYPT_EX_DATFNS_shift | ||
| 164 | #define sk_CRYPTO_EX_DATA_FUNCS_pop sk_CRYPT_EX_DATFNS_pop | ||
| 165 | #define sk_CRYPTO_EX_DATA_FUNCS_sort sk_CRYPT_EX_DATFNS_sort | ||
| 166 | |||
| 167 | /* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) */ | ||
| 168 | #define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO i2d_ASN1_SET_OF_PKCS7_SIGINF | ||
| 169 | #define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO d2i_ASN1_SET_OF_PKCS7_SIGINF | ||
| 170 | |||
| 171 | /* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) */ | ||
| 172 | #define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO i2d_ASN1_SET_OF_PKCS7_RECGINF | ||
| 173 | #define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO d2i_ASN1_SET_OF_PKCS7_RECGINF | ||
| 174 | |||
| 175 | /* Hack the names created with DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) */ | ||
| 176 | #define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION i2d_ASN1_SET_OF_ACC_DESC | ||
| 177 | #define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION d2i_ASN1_SET_OF_ACC_DESC | ||
| 178 | |||
| 179 | /* Hack the names created with DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE) */ | ||
| 180 | #define PEM_read_NETSCAPE_CERT_SEQUENCE PEM_read_NS_CERT_SEQUENCE | ||
| 181 | #define PEM_write_NETSCAPE_CERT_SEQUENCE PEM_write_NS_CERT_SEQUENCE | ||
| 182 | #define PEM_read_bio_NETSCAPE_CERT_SEQUENCE PEM_read_bio_NS_CERT_SEQUENCE | ||
| 183 | #define PEM_write_bio_NETSCAPE_CERT_SEQUENCE PEM_write_bio_NS_CERT_SEQUENCE | ||
| 184 | #define PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE PEM_write_cb_bio_NS_CERT_SEQUENCE | ||
| 185 | |||
| 186 | /* Hack the names created with DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO) */ | ||
| 187 | #define PEM_read_PKCS8_PRIV_KEY_INFO PEM_read_P8_PRIV_KEY_INFO | ||
| 188 | #define PEM_write_PKCS8_PRIV_KEY_INFO PEM_write_P8_PRIV_KEY_INFO | ||
| 189 | #define PEM_read_bio_PKCS8_PRIV_KEY_INFO PEM_read_bio_P8_PRIV_KEY_INFO | ||
| 190 | #define PEM_write_bio_PKCS8_PRIV_KEY_INFO PEM_write_bio_P8_PRIV_KEY_INFO | ||
| 191 | #define PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO PEM_wrt_cb_bio_P8_PRIV_KEY_INFO | ||
| 192 | |||
| 193 | /* Hack other PEM names */ | ||
| 194 | #define PEM_write_bio_PKCS8PrivateKey_nid PEM_write_bio_PKCS8PrivKey_nid | ||
| 195 | |||
| 196 | #endif /* defined VMS */ | ||
| 197 | |||
| 198 | #endif /* ! defined HEADER_VMS_IDHACKS_H */ | ||
diff --git a/src/lib/libssl/src/apps/CA.pl b/src/lib/libssl/src/apps/CA.pl index 4eef57e6e3..f1ac7e7726 100644 --- a/src/lib/libssl/src/apps/CA.pl +++ b/src/lib/libssl/src/apps/CA.pl | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | # default openssl.cnf file has setup as per the following | 36 | # default openssl.cnf file has setup as per the following |
| 37 | # demoCA ... where everything is stored | 37 | # demoCA ... where everything is stored |
| 38 | 38 | ||
| 39 | $SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"}; | ||
| 39 | $DAYS="-days 365"; | 40 | $DAYS="-days 365"; |
| 40 | $REQ="openssl req $SSLEAY_CONFIG"; | 41 | $REQ="openssl req $SSLEAY_CONFIG"; |
| 41 | $CA="openssl ca $SSLEAY_CONFIG"; | 42 | $CA="openssl ca $SSLEAY_CONFIG"; |
| @@ -116,6 +117,11 @@ foreach (@ARGV) { | |||
| 116 | "-infiles newreq.pem"); | 117 | "-infiles newreq.pem"); |
| 117 | $RET=$?; | 118 | $RET=$?; |
| 118 | print "Signed certificate is in newcert.pem\n"; | 119 | print "Signed certificate is in newcert.pem\n"; |
| 120 | } elsif (/^(-signCA)$/) { | ||
| 121 | system ("$CA -policy policy_anything -out newcert.pem " . | ||
| 122 | "-extensions v3_ca -infiles newreq.pem"); | ||
| 123 | $RET=$?; | ||
| 124 | print "Signed CA certificate is in newcert.pem\n"; | ||
| 119 | } elsif (/^-signcert$/) { | 125 | } elsif (/^-signcert$/) { |
| 120 | system ("$X509 -x509toreq -in newreq.pem -signkey newreq.pem " . | 126 | system ("$X509 -x509toreq -in newreq.pem -signkey newreq.pem " . |
| 121 | "-out tmp.pem"); | 127 | "-out tmp.pem"); |
diff --git a/src/lib/libssl/src/apps/CA.pl.in b/src/lib/libssl/src/apps/CA.pl.in index 4eef57e6e3..f1ac7e7726 100644 --- a/src/lib/libssl/src/apps/CA.pl.in +++ b/src/lib/libssl/src/apps/CA.pl.in | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | # default openssl.cnf file has setup as per the following | 36 | # default openssl.cnf file has setup as per the following |
| 37 | # demoCA ... where everything is stored | 37 | # demoCA ... where everything is stored |
| 38 | 38 | ||
| 39 | $SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"}; | ||
| 39 | $DAYS="-days 365"; | 40 | $DAYS="-days 365"; |
| 40 | $REQ="openssl req $SSLEAY_CONFIG"; | 41 | $REQ="openssl req $SSLEAY_CONFIG"; |
| 41 | $CA="openssl ca $SSLEAY_CONFIG"; | 42 | $CA="openssl ca $SSLEAY_CONFIG"; |
| @@ -116,6 +117,11 @@ foreach (@ARGV) { | |||
| 116 | "-infiles newreq.pem"); | 117 | "-infiles newreq.pem"); |
| 117 | $RET=$?; | 118 | $RET=$?; |
| 118 | print "Signed certificate is in newcert.pem\n"; | 119 | print "Signed certificate is in newcert.pem\n"; |
| 120 | } elsif (/^(-signCA)$/) { | ||
| 121 | system ("$CA -policy policy_anything -out newcert.pem " . | ||
| 122 | "-extensions v3_ca -infiles newreq.pem"); | ||
| 123 | $RET=$?; | ||
| 124 | print "Signed CA certificate is in newcert.pem\n"; | ||
| 119 | } elsif (/^-signcert$/) { | 125 | } elsif (/^-signcert$/) { |
| 120 | system ("$X509 -x509toreq -in newreq.pem -signkey newreq.pem " . | 126 | system ("$X509 -x509toreq -in newreq.pem -signkey newreq.pem " . |
| 121 | "-out tmp.pem"); | 127 | "-out tmp.pem"); |
diff --git a/src/lib/libssl/src/apps/Makefile.ssl b/src/lib/libssl/src/apps/Makefile.ssl index c7373f74de..e8677cbb2d 100644 --- a/src/lib/libssl/src/apps/Makefile.ssl +++ b/src/lib/libssl/src/apps/Makefile.ssl | |||
| @@ -35,7 +35,7 @@ SCRIPTS=CA.sh CA.pl der_chop | |||
| 35 | EXE= $(PROGRAM) | 35 | EXE= $(PROGRAM) |
| 36 | 36 | ||
| 37 | E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \ | 37 | E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \ |
| 38 | ca crl rsa dsa dsaparam \ | 38 | ca crl rsa rsautl dsa dsaparam \ |
| 39 | x509 genrsa gendsa s_server s_client speed \ | 39 | x509 genrsa gendsa s_server s_client speed \ |
| 40 | s_time version pkcs7 crl2pkcs7 sess_id ciphers nseq pkcs12 \ | 40 | s_time version pkcs7 crl2pkcs7 sess_id ciphers nseq pkcs12 \ |
| 41 | pkcs8 spkac smime rand | 41 | pkcs8 spkac smime rand |
| @@ -51,14 +51,14 @@ RAND_SRC=app_rand.c | |||
| 51 | 51 | ||
| 52 | E_OBJ= verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o \ | 52 | E_OBJ= verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o \ |
| 53 | ca.o pkcs7.o crl2p7.o crl.o \ | 53 | ca.o pkcs7.o crl2p7.o crl.o \ |
| 54 | rsa.o dsa.o dsaparam.o \ | 54 | rsa.o rsautl.o dsa.o dsaparam.o \ |
| 55 | x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o \ | 55 | x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o \ |
| 56 | s_time.o $(A_OBJ) $(S_OBJ) $(RAND_OBJ) version.o sess_id.o \ | 56 | s_time.o $(A_OBJ) $(S_OBJ) $(RAND_OBJ) version.o sess_id.o \ |
| 57 | ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o | 57 | ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o |
| 58 | 58 | ||
| 59 | E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c passwd.c gendh.c errstr.c ca.c \ | 59 | E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c passwd.c gendh.c errstr.c ca.c \ |
| 60 | pkcs7.c crl2p7.c crl.c \ | 60 | pkcs7.c crl2p7.c crl.c \ |
| 61 | rsa.c dsa.c dsaparam.c \ | 61 | rsa.c rsautl.c dsa.c dsaparam.c \ |
| 62 | x509.c genrsa.c gendsa.c s_server.c s_client.c speed.c \ | 62 | x509.c genrsa.c gendsa.c s_server.c s_client.c speed.c \ |
| 63 | s_time.c $(A_SRC) $(S_SRC) $(RAND_SRC) version.c sess_id.c \ | 63 | s_time.c $(A_SRC) $(S_SRC) $(RAND_SRC) version.c sess_id.c \ |
| 64 | ciphers.c nseq.c pkcs12.c pkcs8.c spkac.c smime.c rand.c | 64 | ciphers.c nseq.c pkcs12.c pkcs8.c spkac.c smime.c rand.c |
| @@ -135,7 +135,7 @@ $(DLIBCRYPTO): | |||
| 135 | $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL) | 135 | $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL) |
| 136 | $(RM) $(PROGRAM) | 136 | $(RM) $(PROGRAM) |
| 137 | $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | 137 | $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) |
| 138 | @(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; sh tools/c_rehash certs) | 138 | -(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs) |
| 139 | 139 | ||
| 140 | progs.h: progs.pl | 140 | progs.h: progs.pl |
| 141 | $(PERL) progs.pl $(E_EXE) >progs.h | 141 | $(PERL) progs.pl $(E_EXE) >progs.h |
| @@ -146,90 +146,107 @@ progs.h: progs.pl | |||
| 146 | app_rand.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 146 | app_rand.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 147 | app_rand.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 147 | app_rand.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 148 | app_rand.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 148 | app_rand.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 149 | app_rand.o: ../include/openssl/crypto.h ../include/openssl/des.h | 149 | app_rand.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 150 | app_rand.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 150 | app_rand.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 151 | app_rand.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 151 | app_rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 152 | app_rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 152 | app_rand.o: ../include/openssl/evp.h ../include/openssl/idea.h | 153 | app_rand.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 153 | app_rand.o: ../include/openssl/md2.h ../include/openssl/md5.h | 154 | app_rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 154 | app_rand.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 155 | app_rand.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 155 | app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 156 | app_rand.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 156 | app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | 157 | app_rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 157 | app_rand.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 158 | app_rand.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h |
| 158 | app_rand.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 159 | app_rand.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 159 | app_rand.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 160 | app_rand.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 160 | app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h | 161 | app_rand.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 162 | app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
| 163 | app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 161 | app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 164 | app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 162 | apps.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 165 | apps.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 163 | apps.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 166 | apps.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 164 | apps.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 167 | apps.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 165 | apps.o: ../include/openssl/crypto.h ../include/openssl/des.h | 168 | apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 166 | apps.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 169 | apps.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 170 | apps.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 167 | apps.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 171 | apps.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 168 | apps.o: ../include/openssl/evp.h ../include/openssl/idea.h | 172 | apps.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 169 | apps.o: ../include/openssl/md2.h ../include/openssl/md5.h | 173 | apps.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 170 | apps.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 174 | apps.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 175 | apps.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
| 176 | apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 171 | apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 177 | apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 172 | apps.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 178 | apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 173 | apps.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 179 | apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h |
| 174 | apps.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 180 | apps.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 175 | apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 181 | apps.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 176 | apps.o: ../include/openssl/stack.h ../include/openssl/x509.h | 182 | apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 183 | apps.o: ../include/openssl/sha.h ../include/openssl/stack.h | ||
| 184 | apps.o: ../include/openssl/symhacks.h ../include/openssl/x509.h | ||
| 177 | apps.o: ../include/openssl/x509_vfy.h apps.h | 185 | apps.o: ../include/openssl/x509_vfy.h apps.h |
| 178 | asn1pars.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 186 | asn1pars.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 179 | asn1pars.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 187 | asn1pars.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 180 | asn1pars.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 188 | asn1pars.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 181 | asn1pars.o: ../include/openssl/crypto.h ../include/openssl/des.h | 189 | asn1pars.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 182 | asn1pars.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 190 | asn1pars.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 191 | asn1pars.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 183 | asn1pars.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 192 | asn1pars.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 184 | asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h | 193 | asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 185 | asn1pars.o: ../include/openssl/idea.h ../include/openssl/md2.h | 194 | asn1pars.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 195 | asn1pars.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 186 | asn1pars.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 196 | asn1pars.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 187 | asn1pars.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 197 | asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 188 | asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 198 | asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 189 | asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 199 | asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 190 | asn1pars.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 200 | asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 191 | asn1pars.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 201 | asn1pars.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 192 | asn1pars.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 202 | asn1pars.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 193 | asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h | 203 | asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 204 | asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 194 | asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 205 | asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 195 | ca.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 206 | ca.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 196 | ca.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 207 | ca.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 197 | ca.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 208 | ca.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 198 | ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h | 209 | ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 199 | ca.o: ../include/openssl/des.h ../include/openssl/dh.h ../include/openssl/dsa.h | 210 | ca.o: ../include/openssl/des.h ../include/openssl/dh.h ../include/openssl/dsa.h |
| 200 | ca.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 211 | ca.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 212 | ca.o: ../include/openssl/e_os2.h ../include/openssl/engine.h | ||
| 201 | ca.o: ../include/openssl/err.h ../include/openssl/evp.h | 213 | ca.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 202 | ca.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 214 | ca.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 203 | ca.o: ../include/openssl/md2.h ../include/openssl/md5.h | 215 | ca.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 204 | ca.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 216 | ca.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 217 | ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 205 | ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 218 | ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 206 | ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 219 | ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 207 | ca.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 220 | ca.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 208 | ca.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 221 | ca.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 209 | ca.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 222 | ca.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 210 | ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 223 | ca.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 211 | ca.o: ../include/openssl/stack.h ../include/openssl/txt_db.h | 224 | ca.o: ../include/openssl/sha.h ../include/openssl/stack.h |
| 225 | ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h | ||
| 212 | ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | 226 | ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h |
| 213 | ca.o: ../include/openssl/x509v3.h apps.h | 227 | ca.o: ../include/openssl/x509v3.h apps.h |
| 214 | ciphers.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 228 | ciphers.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 215 | ciphers.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 229 | ciphers.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 216 | ciphers.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 230 | ciphers.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 231 | ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h | ||
| 217 | ciphers.o: ../include/openssl/crypto.h ../include/openssl/des.h | 232 | ciphers.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 218 | ciphers.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 233 | ciphers.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 219 | ciphers.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 234 | ciphers.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 220 | ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h | 235 | ciphers.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 221 | ciphers.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 236 | ciphers.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 222 | ciphers.o: ../include/openssl/md2.h ../include/openssl/md5.h | 237 | ciphers.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 223 | ciphers.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 238 | ciphers.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 224 | ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 239 | ciphers.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 225 | ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 240 | ciphers.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 226 | ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 241 | ciphers.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 227 | ciphers.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 242 | ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 228 | ciphers.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 243 | ciphers.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 229 | ciphers.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 244 | ciphers.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 230 | ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 245 | ciphers.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 231 | ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 246 | ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 232 | ciphers.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 247 | ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 248 | ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | ||
| 249 | ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h | ||
| 233 | ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 250 | ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 234 | crl.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 251 | crl.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 235 | crl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 252 | crl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| @@ -237,113 +254,137 @@ crl.o: ../include/openssl/buffer.h ../include/openssl/cast.h | |||
| 237 | crl.o: ../include/openssl/conf.h ../include/openssl/crypto.h | 254 | crl.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 238 | crl.o: ../include/openssl/des.h ../include/openssl/dh.h | 255 | crl.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 239 | crl.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | 256 | crl.o: ../include/openssl/dsa.h ../include/openssl/e_os.h |
| 240 | crl.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 257 | crl.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 241 | crl.o: ../include/openssl/evp.h ../include/openssl/idea.h | 258 | crl.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 242 | crl.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 259 | crl.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 260 | crl.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 243 | crl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 261 | crl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 244 | crl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 262 | crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 245 | crl.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 263 | crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 246 | crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 264 | crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 247 | crl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 265 | crl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 248 | crl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 266 | crl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 249 | crl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 267 | crl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 250 | crl.o: ../include/openssl/sha.h ../include/openssl/stack.h | 268 | crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 269 | crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 251 | crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | 270 | crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h |
| 252 | crl.o: ../include/openssl/x509v3.h apps.h | 271 | crl.o: ../include/openssl/x509v3.h apps.h |
| 253 | crl2p7.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 272 | crl2p7.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 254 | crl2p7.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 273 | crl2p7.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 255 | crl2p7.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 274 | crl2p7.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 256 | crl2p7.o: ../include/openssl/crypto.h ../include/openssl/des.h | 275 | crl2p7.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 257 | crl2p7.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 276 | crl2p7.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 277 | crl2p7.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 258 | crl2p7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 278 | crl2p7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 259 | crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h | 279 | crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 260 | crl2p7.o: ../include/openssl/idea.h ../include/openssl/md2.h | 280 | crl2p7.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 281 | crl2p7.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 261 | crl2p7.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 282 | crl2p7.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 262 | crl2p7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 283 | crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 263 | crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 284 | crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 264 | crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 285 | crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 265 | crl2p7.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 286 | crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 266 | crl2p7.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 287 | crl2p7.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 267 | crl2p7.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 288 | crl2p7.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 268 | crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h | 289 | crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 290 | crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 269 | crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 291 | crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 270 | dgst.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 292 | dgst.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 271 | dgst.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 293 | dgst.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 272 | dgst.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 294 | dgst.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 273 | dgst.o: ../include/openssl/crypto.h ../include/openssl/des.h | 295 | dgst.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 274 | dgst.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 296 | dgst.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 297 | dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 275 | dgst.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 298 | dgst.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 276 | dgst.o: ../include/openssl/err.h ../include/openssl/evp.h | 299 | dgst.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 277 | dgst.o: ../include/openssl/idea.h ../include/openssl/md2.h | 300 | dgst.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 278 | dgst.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 301 | dgst.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 302 | dgst.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 303 | dgst.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 279 | dgst.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 304 | dgst.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 280 | dgst.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 305 | dgst.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 281 | dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 306 | dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 282 | dgst.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 307 | dgst.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 283 | dgst.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 308 | dgst.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 284 | dgst.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 309 | dgst.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 285 | dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h | 310 | dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 311 | dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 286 | dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 312 | dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 287 | dh.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 313 | dh.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 288 | dh.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 314 | dh.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 289 | dh.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 315 | dh.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 290 | dh.o: ../include/openssl/crypto.h ../include/openssl/des.h | 316 | dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 291 | dh.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 317 | dh.o: ../include/openssl/des.h ../include/openssl/dh.h ../include/openssl/dsa.h |
| 292 | dh.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 318 | dh.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 319 | dh.o: ../include/openssl/e_os2.h ../include/openssl/engine.h | ||
| 293 | dh.o: ../include/openssl/err.h ../include/openssl/evp.h | 320 | dh.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 294 | dh.o: ../include/openssl/idea.h ../include/openssl/md2.h | 321 | dh.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 322 | dh.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 295 | dh.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 323 | dh.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 296 | dh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 324 | dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 297 | dh.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 325 | dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 298 | dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 326 | dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 327 | dh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | ||
| 299 | dh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 328 | dh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 300 | dh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 329 | dh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 301 | dh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 330 | dh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 302 | dh.o: ../include/openssl/sha.h ../include/openssl/stack.h | 331 | dh.o: ../include/openssl/sha.h ../include/openssl/stack.h |
| 303 | dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 332 | dh.o: ../include/openssl/symhacks.h ../include/openssl/x509.h |
| 333 | dh.o: ../include/openssl/x509_vfy.h apps.h | ||
| 304 | dsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 334 | dsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 305 | dsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 335 | dsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 306 | dsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 336 | dsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 307 | dsa.o: ../include/openssl/crypto.h ../include/openssl/des.h | 337 | dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 308 | dsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 338 | dsa.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 339 | dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 309 | dsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 340 | dsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 310 | dsa.o: ../include/openssl/err.h ../include/openssl/evp.h | 341 | dsa.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 311 | dsa.o: ../include/openssl/idea.h ../include/openssl/md2.h | 342 | dsa.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 312 | dsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 343 | dsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 344 | dsa.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 345 | dsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 313 | dsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 346 | dsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 314 | dsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 347 | dsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 315 | dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 348 | dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 316 | dsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 349 | dsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 317 | dsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 350 | dsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 318 | dsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 351 | dsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 319 | dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h | 352 | dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 353 | dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 320 | dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 354 | dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 321 | dsaparam.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 355 | dsaparam.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 322 | dsaparam.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 356 | dsaparam.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 323 | dsaparam.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 357 | dsaparam.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 324 | dsaparam.o: ../include/openssl/crypto.h ../include/openssl/des.h | 358 | dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 325 | dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 359 | dsaparam.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 360 | dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 326 | dsaparam.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 361 | dsaparam.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 327 | dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h | 362 | dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 328 | dsaparam.o: ../include/openssl/idea.h ../include/openssl/md2.h | 363 | dsaparam.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 329 | dsaparam.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 364 | dsaparam.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 365 | dsaparam.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 366 | dsaparam.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 330 | dsaparam.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 367 | dsaparam.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 331 | dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 368 | dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 332 | dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 369 | dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 333 | dsaparam.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 370 | dsaparam.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 334 | dsaparam.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 371 | dsaparam.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 335 | dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 372 | dsaparam.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 336 | dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h | 373 | dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 374 | dsaparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 337 | dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 375 | dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 338 | enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 376 | enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 339 | enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 377 | enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 340 | enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 378 | enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 341 | enc.o: ../include/openssl/crypto.h ../include/openssl/des.h | 379 | enc.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 342 | enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 380 | enc.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 381 | enc.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 343 | enc.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 382 | enc.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 344 | enc.o: ../include/openssl/err.h ../include/openssl/evp.h | 383 | enc.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 345 | enc.o: ../include/openssl/idea.h ../include/openssl/md2.h | 384 | enc.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 346 | enc.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 385 | enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 386 | enc.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 387 | enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 347 | enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 388 | enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 348 | enc.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 389 | enc.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 349 | enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 390 | enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -351,37 +392,43 @@ enc.o: ../include/openssl/rand.h ../include/openssl/rc2.h | |||
| 351 | enc.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 392 | enc.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 352 | enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 393 | enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 353 | enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 394 | enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 354 | enc.o: ../include/openssl/stack.h ../include/openssl/x509.h | 395 | enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 355 | enc.o: ../include/openssl/x509_vfy.h apps.h | 396 | enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 356 | errstr.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 397 | errstr.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 357 | errstr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 398 | errstr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 358 | errstr.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 399 | errstr.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 400 | errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h | ||
| 359 | errstr.o: ../include/openssl/crypto.h ../include/openssl/des.h | 401 | errstr.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 360 | errstr.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 402 | errstr.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 361 | errstr.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 403 | errstr.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 362 | errstr.o: ../include/openssl/err.h ../include/openssl/evp.h | 404 | errstr.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 363 | errstr.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 405 | errstr.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 364 | errstr.o: ../include/openssl/md2.h ../include/openssl/md5.h | 406 | errstr.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 365 | errstr.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 407 | errstr.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 366 | errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 408 | errstr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 367 | errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 409 | errstr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 368 | errstr.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 410 | errstr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 369 | errstr.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 411 | errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 370 | errstr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 412 | errstr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 371 | errstr.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 413 | errstr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 372 | errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 414 | errstr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 373 | errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 415 | errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 374 | errstr.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 416 | errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 417 | errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | ||
| 418 | errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h | ||
| 375 | errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 419 | errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 376 | gendh.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 420 | gendh.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 377 | gendh.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 421 | gendh.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 378 | gendh.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 422 | gendh.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 379 | gendh.o: ../include/openssl/crypto.h ../include/openssl/des.h | 423 | gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 380 | gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 424 | gendh.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 425 | gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 381 | gendh.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 426 | gendh.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 382 | gendh.o: ../include/openssl/err.h ../include/openssl/evp.h | 427 | gendh.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 383 | gendh.o: ../include/openssl/idea.h ../include/openssl/md2.h | 428 | gendh.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 384 | gendh.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 429 | gendh.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 430 | gendh.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 431 | gendh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 385 | gendh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 432 | gendh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 386 | gendh.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 433 | gendh.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 387 | gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 434 | gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -389,69 +436,82 @@ gendh.o: ../include/openssl/rand.h ../include/openssl/rc2.h | |||
| 389 | gendh.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 436 | gendh.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 390 | gendh.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 437 | gendh.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 391 | gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 438 | gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 392 | gendh.o: ../include/openssl/stack.h ../include/openssl/x509.h | 439 | gendh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 393 | gendh.o: ../include/openssl/x509_vfy.h apps.h | 440 | gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 394 | gendsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 441 | gendsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 395 | gendsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 442 | gendsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 396 | gendsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 443 | gendsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 397 | gendsa.o: ../include/openssl/crypto.h ../include/openssl/des.h | 444 | gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 398 | gendsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 445 | gendsa.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 446 | gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 399 | gendsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 447 | gendsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 400 | gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h | 448 | gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 401 | gendsa.o: ../include/openssl/idea.h ../include/openssl/md2.h | 449 | gendsa.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 402 | gendsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 450 | gendsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 451 | gendsa.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 452 | gendsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 403 | gendsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 453 | gendsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 404 | gendsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 454 | gendsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 405 | gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 455 | gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 406 | gendsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 456 | gendsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 407 | gendsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 457 | gendsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 408 | gendsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 458 | gendsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 409 | gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h | 459 | gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 460 | gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 410 | gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 461 | gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 411 | genrsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 462 | genrsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 412 | genrsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 463 | genrsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 413 | genrsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 464 | genrsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 414 | genrsa.o: ../include/openssl/crypto.h ../include/openssl/des.h | 465 | genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 415 | genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 466 | genrsa.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 467 | genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 416 | genrsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 468 | genrsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 417 | genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h | 469 | genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 418 | genrsa.o: ../include/openssl/idea.h ../include/openssl/md2.h | 470 | genrsa.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 419 | genrsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 471 | genrsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 472 | genrsa.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 473 | genrsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 420 | genrsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 474 | genrsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 421 | genrsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 475 | genrsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 422 | genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 476 | genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 423 | genrsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 477 | genrsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 424 | genrsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 478 | genrsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 425 | genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 479 | genrsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 426 | genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h | 480 | genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 481 | genrsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 427 | genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 482 | genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 428 | nseq.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 483 | nseq.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 429 | nseq.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 484 | nseq.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 430 | nseq.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 485 | nseq.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 431 | nseq.o: ../include/openssl/crypto.h ../include/openssl/des.h | 486 | nseq.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 432 | nseq.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 487 | nseq.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 488 | nseq.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 433 | nseq.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 489 | nseq.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 434 | nseq.o: ../include/openssl/err.h ../include/openssl/evp.h | 490 | nseq.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 435 | nseq.o: ../include/openssl/idea.h ../include/openssl/md2.h | 491 | nseq.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 492 | nseq.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 436 | nseq.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 493 | nseq.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 437 | nseq.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 494 | nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 438 | nseq.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 495 | nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 439 | nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 496 | nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 440 | nseq.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 497 | nseq.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 441 | nseq.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 498 | nseq.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 442 | nseq.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 499 | nseq.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 443 | nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h | 500 | nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 501 | nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 444 | nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 502 | nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 445 | openssl.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 503 | openssl.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 446 | openssl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 504 | openssl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 447 | openssl.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 505 | openssl.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 448 | openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h | 506 | openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h |
| 449 | openssl.o: ../include/openssl/des.h ../include/openssl/dh.h | 507 | openssl.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 450 | openssl.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | 508 | openssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 509 | openssl.o: ../include/openssl/e_os.h ../include/openssl/e_os.h | ||
| 451 | openssl.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 510 | openssl.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 452 | openssl.o: ../include/openssl/evp.h ../include/openssl/idea.h | 511 | openssl.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 453 | openssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 512 | openssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 454 | openssl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 513 | openssl.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 514 | openssl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 455 | openssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 515 | openssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 456 | openssl.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 516 | openssl.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 457 | openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 517 | openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -461,306 +521,383 @@ openssl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 461 | openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 521 | openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 462 | openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 522 | openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 463 | openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 523 | openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 464 | openssl.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 524 | openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 465 | openssl.o: ../include/openssl/x509_vfy.h apps.h progs.h s_apps.h | 525 | openssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 526 | openssl.o: progs.h s_apps.h | ||
| 466 | passwd.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 527 | passwd.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 467 | passwd.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 528 | passwd.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 468 | passwd.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 529 | passwd.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 469 | passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h | 530 | passwd.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 470 | passwd.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 531 | passwd.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 532 | passwd.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 471 | passwd.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 533 | passwd.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 472 | passwd.o: ../include/openssl/err.h ../include/openssl/evp.h | 534 | passwd.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 473 | passwd.o: ../include/openssl/idea.h ../include/openssl/md2.h | 535 | passwd.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 536 | passwd.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 474 | passwd.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 537 | passwd.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 475 | passwd.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 538 | passwd.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 476 | passwd.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h | 539 | passwd.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 477 | passwd.o: ../include/openssl/rand.h ../include/openssl/rc2.h | 540 | passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 478 | passwd.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 541 | passwd.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 479 | passwd.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 542 | passwd.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 480 | passwd.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 543 | passwd.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 481 | passwd.o: ../include/openssl/stack.h ../include/openssl/x509.h | 544 | passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h |
| 545 | passwd.o: ../include/openssl/symhacks.h ../include/openssl/x509.h | ||
| 482 | passwd.o: ../include/openssl/x509_vfy.h apps.h | 546 | passwd.o: ../include/openssl/x509_vfy.h apps.h |
| 483 | pkcs12.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 547 | pkcs12.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 484 | pkcs12.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 548 | pkcs12.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 485 | pkcs12.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 549 | pkcs12.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 486 | pkcs12.o: ../include/openssl/crypto.h ../include/openssl/des.h | 550 | pkcs12.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 487 | pkcs12.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 551 | pkcs12.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 552 | pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 488 | pkcs12.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 553 | pkcs12.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 489 | pkcs12.o: ../include/openssl/err.h ../include/openssl/evp.h | 554 | pkcs12.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 490 | pkcs12.o: ../include/openssl/idea.h ../include/openssl/md2.h | 555 | pkcs12.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 491 | pkcs12.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 556 | pkcs12.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 557 | pkcs12.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 558 | pkcs12.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 492 | pkcs12.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 559 | pkcs12.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 493 | pkcs12.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 560 | pkcs12.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 494 | pkcs12.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h | 561 | pkcs12.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h |
| 495 | pkcs12.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 562 | pkcs12.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 496 | pkcs12.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 563 | pkcs12.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 497 | pkcs12.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 564 | pkcs12.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 498 | pkcs12.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 565 | pkcs12.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 499 | pkcs12.o: ../include/openssl/stack.h ../include/openssl/x509.h | 566 | pkcs12.o: ../include/openssl/sha.h ../include/openssl/stack.h |
| 567 | pkcs12.o: ../include/openssl/symhacks.h ../include/openssl/x509.h | ||
| 500 | pkcs12.o: ../include/openssl/x509_vfy.h apps.h | 568 | pkcs12.o: ../include/openssl/x509_vfy.h apps.h |
| 501 | pkcs7.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 569 | pkcs7.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 502 | pkcs7.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 570 | pkcs7.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 503 | pkcs7.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 571 | pkcs7.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 504 | pkcs7.o: ../include/openssl/crypto.h ../include/openssl/des.h | 572 | pkcs7.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 505 | pkcs7.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 573 | pkcs7.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 574 | pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 506 | pkcs7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 575 | pkcs7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 507 | pkcs7.o: ../include/openssl/err.h ../include/openssl/evp.h | 576 | pkcs7.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 508 | pkcs7.o: ../include/openssl/idea.h ../include/openssl/md2.h | 577 | pkcs7.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 509 | pkcs7.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 578 | pkcs7.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 579 | pkcs7.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 580 | pkcs7.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 510 | pkcs7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 581 | pkcs7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 511 | pkcs7.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 582 | pkcs7.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 512 | pkcs7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 583 | pkcs7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 513 | pkcs7.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 584 | pkcs7.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 514 | pkcs7.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 585 | pkcs7.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 515 | pkcs7.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 586 | pkcs7.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 516 | pkcs7.o: ../include/openssl/sha.h ../include/openssl/stack.h | 587 | pkcs7.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 588 | pkcs7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 517 | pkcs7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 589 | pkcs7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 518 | pkcs8.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 590 | pkcs8.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 519 | pkcs8.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 591 | pkcs8.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 520 | pkcs8.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 592 | pkcs8.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 521 | pkcs8.o: ../include/openssl/crypto.h ../include/openssl/des.h | 593 | pkcs8.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 522 | pkcs8.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 594 | pkcs8.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 595 | pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 523 | pkcs8.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 596 | pkcs8.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 524 | pkcs8.o: ../include/openssl/err.h ../include/openssl/evp.h | 597 | pkcs8.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 525 | pkcs8.o: ../include/openssl/idea.h ../include/openssl/md2.h | 598 | pkcs8.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 526 | pkcs8.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 599 | pkcs8.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 600 | pkcs8.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 601 | pkcs8.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 527 | pkcs8.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 602 | pkcs8.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 528 | pkcs8.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 603 | pkcs8.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 529 | pkcs8.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h | 604 | pkcs8.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h |
| 530 | pkcs8.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 605 | pkcs8.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 531 | pkcs8.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 606 | pkcs8.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 532 | pkcs8.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 607 | pkcs8.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 533 | pkcs8.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 608 | pkcs8.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 534 | pkcs8.o: ../include/openssl/stack.h ../include/openssl/x509.h | 609 | pkcs8.o: ../include/openssl/sha.h ../include/openssl/stack.h |
| 610 | pkcs8.o: ../include/openssl/symhacks.h ../include/openssl/x509.h | ||
| 535 | pkcs8.o: ../include/openssl/x509_vfy.h apps.h | 611 | pkcs8.o: ../include/openssl/x509_vfy.h apps.h |
| 536 | rand.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 612 | rand.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 537 | rand.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 613 | rand.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 538 | rand.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 614 | rand.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 539 | rand.o: ../include/openssl/crypto.h ../include/openssl/des.h | 615 | rand.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 540 | rand.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 616 | rand.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 617 | rand.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 541 | rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 618 | rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 542 | rand.o: ../include/openssl/err.h ../include/openssl/evp.h | 619 | rand.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 543 | rand.o: ../include/openssl/idea.h ../include/openssl/md2.h | 620 | rand.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 544 | rand.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 621 | rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 622 | rand.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 623 | rand.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 545 | rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 624 | rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 546 | rand.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h | 625 | rand.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h |
| 547 | rand.o: ../include/openssl/rand.h ../include/openssl/rc2.h | 626 | rand.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 548 | rand.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 627 | rand.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 549 | rand.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 628 | rand.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 550 | rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 629 | rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 551 | rand.o: ../include/openssl/stack.h ../include/openssl/x509.h | 630 | rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 552 | rand.o: ../include/openssl/x509_vfy.h apps.h | 631 | rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 553 | req.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 632 | req.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 554 | req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 633 | req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 555 | req.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 634 | req.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 556 | req.o: ../include/openssl/conf.h ../include/openssl/crypto.h | 635 | req.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 557 | req.o: ../include/openssl/des.h ../include/openssl/dh.h | 636 | req.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 558 | req.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | 637 | req.o: ../include/openssl/dsa.h ../include/openssl/e_os.h |
| 559 | req.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 638 | req.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 639 | req.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
| 560 | req.o: ../include/openssl/evp.h ../include/openssl/idea.h | 640 | req.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 561 | req.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 641 | req.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 562 | req.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 642 | req.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 643 | req.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 563 | req.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 644 | req.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 564 | req.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 645 | req.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 565 | req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 646 | req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 566 | req.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 647 | req.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 567 | req.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 648 | req.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 568 | req.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 649 | req.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 569 | req.o: ../include/openssl/sha.h ../include/openssl/stack.h | 650 | req.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 651 | req.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 570 | req.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | 652 | req.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h |
| 571 | req.o: ../include/openssl/x509v3.h apps.h | 653 | req.o: ../include/openssl/x509v3.h apps.h |
| 572 | rsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 654 | rsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 573 | rsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 655 | rsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 574 | rsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 656 | rsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 575 | rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h | 657 | rsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 576 | rsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 658 | rsa.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 659 | rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 577 | rsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 660 | rsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 578 | rsa.o: ../include/openssl/err.h ../include/openssl/evp.h | 661 | rsa.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 579 | rsa.o: ../include/openssl/idea.h ../include/openssl/md2.h | 662 | rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 580 | rsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 663 | rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 664 | rsa.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 665 | rsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 581 | rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 666 | rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 582 | rsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 667 | rsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 583 | rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 668 | rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 584 | rsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 669 | rsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 585 | rsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 670 | rsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 586 | rsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 671 | rsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 587 | rsa.o: ../include/openssl/sha.h ../include/openssl/stack.h | 672 | rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 673 | rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 588 | rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 674 | rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 675 | rsautl.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
| 676 | rsautl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | ||
| 677 | rsautl.o: ../include/openssl/buffer.h ../include/openssl/cast.h | ||
| 678 | rsautl.o: ../include/openssl/conf.h ../include/openssl/crypto.h | ||
| 679 | rsautl.o: ../include/openssl/des.h ../include/openssl/dh.h | ||
| 680 | rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 681 | rsautl.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | ||
| 682 | rsautl.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
| 683 | rsautl.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
| 684 | rsautl.o: ../include/openssl/lhash.h ../include/openssl/md2.h | ||
| 685 | rsautl.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 686 | rsautl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 687 | rsautl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | ||
| 688 | rsautl.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | ||
| 689 | rsautl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | ||
| 690 | rsautl.o: ../include/openssl/rand.h ../include/openssl/rc2.h | ||
| 691 | rsautl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
| 692 | rsautl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
| 693 | rsautl.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
| 694 | rsautl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 695 | rsautl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | ||
| 589 | s_cb.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 696 | s_cb.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 590 | s_cb.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 697 | s_cb.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 591 | s_cb.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 698 | s_cb.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 699 | s_cb.o: ../include/openssl/comp.h ../include/openssl/conf.h | ||
| 592 | s_cb.o: ../include/openssl/crypto.h ../include/openssl/des.h | 700 | s_cb.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 593 | s_cb.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 701 | s_cb.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 594 | s_cb.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 702 | s_cb.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 595 | s_cb.o: ../include/openssl/err.h ../include/openssl/evp.h | 703 | s_cb.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 596 | s_cb.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 704 | s_cb.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 597 | s_cb.o: ../include/openssl/md2.h ../include/openssl/md5.h | 705 | s_cb.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 598 | s_cb.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 706 | s_cb.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 599 | s_cb.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 707 | s_cb.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 600 | s_cb.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 708 | s_cb.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 601 | s_cb.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 709 | s_cb.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 602 | s_cb.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 710 | s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 603 | s_cb.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 711 | s_cb.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 604 | s_cb.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 712 | s_cb.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 605 | s_cb.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 713 | s_cb.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 606 | s_cb.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 714 | s_cb.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 607 | s_cb.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 715 | s_cb.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 716 | s_cb.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | ||
| 717 | s_cb.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h | ||
| 608 | s_cb.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h s_apps.h | 718 | s_cb.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h s_apps.h |
| 609 | s_client.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 719 | s_client.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 610 | s_client.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 720 | s_client.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 611 | s_client.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 721 | s_client.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 722 | s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h | ||
| 612 | s_client.o: ../include/openssl/crypto.h ../include/openssl/des.h | 723 | s_client.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 613 | s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 724 | s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 614 | s_client.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 725 | s_client.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 726 | s_client.o: ../include/openssl/e_os2.h ../include/openssl/engine.h | ||
| 615 | s_client.o: ../include/openssl/err.h ../include/openssl/evp.h | 727 | s_client.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 616 | s_client.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 728 | s_client.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 617 | s_client.o: ../include/openssl/md2.h ../include/openssl/md5.h | 729 | s_client.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 618 | s_client.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 730 | s_client.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 731 | s_client.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 619 | s_client.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 732 | s_client.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 620 | s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 733 | s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 621 | s_client.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 734 | s_client.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 622 | s_client.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 735 | s_client.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 623 | s_client.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 736 | s_client.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 624 | s_client.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 737 | s_client.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 625 | s_client.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 738 | s_client.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 626 | s_client.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 739 | s_client.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 627 | s_client.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 740 | s_client.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 741 | s_client.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h | ||
| 628 | s_client.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 742 | s_client.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 629 | s_client.o: s_apps.h | 743 | s_client.o: s_apps.h |
| 630 | s_server.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 744 | s_server.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 631 | s_server.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 745 | s_server.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 632 | s_server.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 746 | s_server.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 747 | s_server.o: ../include/openssl/comp.h ../include/openssl/conf.h | ||
| 633 | s_server.o: ../include/openssl/crypto.h ../include/openssl/des.h | 748 | s_server.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 634 | s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 749 | s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 635 | s_server.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 750 | s_server.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 751 | s_server.o: ../include/openssl/e_os2.h ../include/openssl/engine.h | ||
| 636 | s_server.o: ../include/openssl/err.h ../include/openssl/evp.h | 752 | s_server.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 637 | s_server.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 753 | s_server.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 638 | s_server.o: ../include/openssl/md2.h ../include/openssl/md5.h | 754 | s_server.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 639 | s_server.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 755 | s_server.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 756 | s_server.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 640 | s_server.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 757 | s_server.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 641 | s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 758 | s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 642 | s_server.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 759 | s_server.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 643 | s_server.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 760 | s_server.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 644 | s_server.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 761 | s_server.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 645 | s_server.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 762 | s_server.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 646 | s_server.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 763 | s_server.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 647 | s_server.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 764 | s_server.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 648 | s_server.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 765 | s_server.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 766 | s_server.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h | ||
| 649 | s_server.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 767 | s_server.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 650 | s_server.o: s_apps.h | 768 | s_server.o: s_apps.h |
| 651 | s_socket.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 769 | s_socket.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 652 | s_socket.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 770 | s_socket.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 653 | s_socket.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 771 | s_socket.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 772 | s_socket.o: ../include/openssl/comp.h ../include/openssl/conf.h | ||
| 654 | s_socket.o: ../include/openssl/crypto.h ../include/openssl/des.h | 773 | s_socket.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 655 | s_socket.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 774 | s_socket.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 656 | s_socket.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 775 | s_socket.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 657 | s_socket.o: ../include/openssl/evp.h ../include/openssl/idea.h | 776 | s_socket.o: ../include/openssl/e_os2.h ../include/openssl/evp.h |
| 658 | s_socket.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 777 | s_socket.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 778 | s_socket.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 659 | s_socket.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 779 | s_socket.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 660 | s_socket.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 780 | s_socket.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 661 | s_socket.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 781 | s_socket.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 662 | s_socket.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 782 | s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 663 | s_socket.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 783 | s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 664 | s_socket.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 784 | s_socket.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 665 | s_socket.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 785 | s_socket.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 666 | s_socket.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 786 | s_socket.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 667 | s_socket.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 787 | s_socket.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 668 | s_socket.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 788 | s_socket.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 789 | s_socket.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 669 | s_socket.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 790 | s_socket.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 670 | s_socket.o: ../include/openssl/x509_vfy.h apps.h s_apps.h | 791 | s_socket.o: ../include/openssl/x509_vfy.h apps.h s_apps.h |
| 671 | s_time.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 792 | s_time.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 672 | s_time.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 793 | s_time.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 673 | s_time.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 794 | s_time.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 795 | s_time.o: ../include/openssl/comp.h ../include/openssl/conf.h | ||
| 674 | s_time.o: ../include/openssl/crypto.h ../include/openssl/des.h | 796 | s_time.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 675 | s_time.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 797 | s_time.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 676 | s_time.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 798 | s_time.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 677 | s_time.o: ../include/openssl/err.h ../include/openssl/evp.h | 799 | s_time.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 678 | s_time.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 800 | s_time.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 679 | s_time.o: ../include/openssl/md2.h ../include/openssl/md5.h | 801 | s_time.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 680 | s_time.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 802 | s_time.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 681 | s_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 803 | s_time.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 682 | s_time.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 804 | s_time.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 683 | s_time.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 805 | s_time.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 684 | s_time.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 806 | s_time.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 685 | s_time.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 807 | s_time.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 686 | s_time.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 808 | s_time.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 687 | s_time.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 809 | s_time.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 688 | s_time.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 810 | s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 689 | s_time.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 811 | s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 812 | s_time.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | ||
| 813 | s_time.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h | ||
| 690 | s_time.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 814 | s_time.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 691 | s_time.o: s_apps.h | 815 | s_time.o: s_apps.h |
| 692 | sess_id.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 816 | sess_id.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 693 | sess_id.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 817 | sess_id.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 694 | sess_id.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 818 | sess_id.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 819 | sess_id.o: ../include/openssl/comp.h ../include/openssl/conf.h | ||
| 695 | sess_id.o: ../include/openssl/crypto.h ../include/openssl/des.h | 820 | sess_id.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 696 | sess_id.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 821 | sess_id.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 697 | sess_id.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 822 | sess_id.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 698 | sess_id.o: ../include/openssl/err.h ../include/openssl/evp.h | 823 | sess_id.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 699 | sess_id.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 824 | sess_id.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 700 | sess_id.o: ../include/openssl/md2.h ../include/openssl/md5.h | 825 | sess_id.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 701 | sess_id.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 826 | sess_id.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 702 | sess_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 827 | sess_id.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 703 | sess_id.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 828 | sess_id.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 704 | sess_id.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 829 | sess_id.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 705 | sess_id.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 830 | sess_id.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 706 | sess_id.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 831 | sess_id.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 707 | sess_id.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 832 | sess_id.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 708 | sess_id.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 833 | sess_id.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 709 | sess_id.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 834 | sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 710 | sess_id.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 835 | sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 836 | sess_id.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | ||
| 837 | sess_id.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h | ||
| 711 | sess_id.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 838 | sess_id.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 712 | smime.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 839 | smime.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 713 | smime.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 840 | smime.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 714 | smime.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 841 | smime.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 715 | smime.o: ../include/openssl/crypto.h ../include/openssl/des.h | 842 | smime.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 716 | smime.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 843 | smime.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 844 | smime.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 717 | smime.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 845 | smime.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 718 | smime.o: ../include/openssl/err.h ../include/openssl/evp.h | 846 | smime.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 719 | smime.o: ../include/openssl/idea.h ../include/openssl/md2.h | 847 | smime.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 720 | smime.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 848 | smime.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 849 | smime.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 850 | smime.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 721 | smime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 851 | smime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 722 | smime.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 852 | smime.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 723 | smime.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 853 | smime.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 724 | smime.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 854 | smime.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 725 | smime.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 855 | smime.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 726 | smime.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 856 | smime.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 727 | smime.o: ../include/openssl/sha.h ../include/openssl/stack.h | 857 | smime.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 858 | smime.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 728 | smime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 859 | smime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 729 | speed.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 860 | speed.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 730 | speed.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 861 | speed.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 731 | speed.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 862 | speed.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 732 | speed.o: ../include/openssl/crypto.h ../include/openssl/des.h | 863 | speed.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 733 | speed.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 864 | speed.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 865 | speed.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 734 | speed.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 866 | speed.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 735 | speed.o: ../include/openssl/err.h ../include/openssl/evp.h | 867 | speed.o: ../include/openssl/engine.h ../include/openssl/err.h |
| 736 | speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h | 868 | speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h |
| 737 | speed.o: ../include/openssl/md2.h ../include/openssl/md5.h | 869 | speed.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 738 | speed.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 870 | speed.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 871 | speed.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
| 872 | speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 739 | speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 873 | speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 740 | speed.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | 874 | speed.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 741 | speed.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 875 | speed.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 742 | speed.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 876 | speed.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 743 | speed.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 877 | speed.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 744 | speed.o: ../include/openssl/sha.h ../include/openssl/stack.h | 878 | speed.o: ../include/openssl/sha.h ../include/openssl/stack.h |
| 745 | speed.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ./testdsa.h | 879 | speed.o: ../include/openssl/symhacks.h ../include/openssl/x509.h |
| 746 | speed.o: ./testrsa.h apps.h | 880 | speed.o: ../include/openssl/x509_vfy.h ./testdsa.h ./testrsa.h apps.h |
| 747 | spkac.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 881 | spkac.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 748 | spkac.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 882 | spkac.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 749 | spkac.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 883 | spkac.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 750 | spkac.o: ../include/openssl/conf.h ../include/openssl/crypto.h | 884 | spkac.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 751 | spkac.o: ../include/openssl/des.h ../include/openssl/dh.h | 885 | spkac.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 752 | spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | 886 | spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os.h |
| 753 | spkac.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 887 | spkac.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 888 | spkac.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
| 754 | spkac.o: ../include/openssl/evp.h ../include/openssl/idea.h | 889 | spkac.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 755 | spkac.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 890 | spkac.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 756 | spkac.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 891 | spkac.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 892 | spkac.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 757 | spkac.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 893 | spkac.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 758 | spkac.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 894 | spkac.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 759 | spkac.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 895 | spkac.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 760 | spkac.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 896 | spkac.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 761 | spkac.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 897 | spkac.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 762 | spkac.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 898 | spkac.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 763 | spkac.o: ../include/openssl/sha.h ../include/openssl/stack.h | 899 | spkac.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 900 | spkac.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 764 | spkac.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h | 901 | spkac.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h |
| 765 | verify.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 902 | verify.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 766 | verify.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 903 | verify.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| @@ -768,34 +905,40 @@ verify.o: ../include/openssl/buffer.h ../include/openssl/cast.h | |||
| 768 | verify.o: ../include/openssl/conf.h ../include/openssl/crypto.h | 905 | verify.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 769 | verify.o: ../include/openssl/des.h ../include/openssl/dh.h | 906 | verify.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 770 | verify.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | 907 | verify.o: ../include/openssl/dsa.h ../include/openssl/e_os.h |
| 771 | verify.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 908 | verify.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 909 | verify.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
| 772 | verify.o: ../include/openssl/evp.h ../include/openssl/idea.h | 910 | verify.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 773 | verify.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 911 | verify.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 774 | verify.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 912 | verify.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 913 | verify.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 775 | verify.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 914 | verify.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 776 | verify.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 915 | verify.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 777 | verify.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 916 | verify.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 778 | verify.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 917 | verify.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 779 | verify.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 918 | verify.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 780 | verify.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 919 | verify.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 781 | verify.o: ../include/openssl/sha.h ../include/openssl/stack.h | 920 | verify.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 921 | verify.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 782 | verify.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | 922 | verify.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h |
| 783 | verify.o: ../include/openssl/x509v3.h apps.h | 923 | verify.o: ../include/openssl/x509v3.h apps.h |
| 784 | version.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 924 | version.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 785 | version.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 925 | version.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 786 | version.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 926 | version.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 787 | version.o: ../include/openssl/crypto.h ../include/openssl/des.h | 927 | version.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 788 | version.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 928 | version.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 929 | version.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
| 789 | version.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 930 | version.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 790 | version.o: ../include/openssl/evp.h ../include/openssl/idea.h | 931 | version.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 791 | version.o: ../include/openssl/md2.h ../include/openssl/md5.h | 932 | version.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 792 | version.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 933 | version.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 793 | version.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 934 | version.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 794 | version.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 935 | version.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 795 | version.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 936 | version.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h |
| 796 | version.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 937 | version.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 797 | version.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 938 | version.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 798 | version.o: ../include/openssl/stack.h ../include/openssl/x509.h | 939 | version.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 940 | version.o: ../include/openssl/sha.h ../include/openssl/stack.h | ||
| 941 | version.o: ../include/openssl/symhacks.h ../include/openssl/x509.h | ||
| 799 | version.o: ../include/openssl/x509_vfy.h apps.h | 942 | version.o: ../include/openssl/x509_vfy.h apps.h |
| 800 | x509.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 943 | x509.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 801 | x509.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 944 | x509.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| @@ -803,16 +946,19 @@ x509.o: ../include/openssl/buffer.h ../include/openssl/cast.h | |||
| 803 | x509.o: ../include/openssl/conf.h ../include/openssl/crypto.h | 946 | x509.o: ../include/openssl/conf.h ../include/openssl/crypto.h |
| 804 | x509.o: ../include/openssl/des.h ../include/openssl/dh.h | 947 | x509.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 805 | x509.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | 948 | x509.o: ../include/openssl/dsa.h ../include/openssl/e_os.h |
| 806 | x509.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 949 | x509.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 950 | x509.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
| 807 | x509.o: ../include/openssl/evp.h ../include/openssl/idea.h | 951 | x509.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 808 | x509.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 952 | x509.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 809 | x509.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 953 | x509.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 954 | x509.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 810 | x509.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 955 | x509.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 811 | x509.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 956 | x509.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 812 | x509.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 957 | x509.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 813 | x509.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 958 | x509.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 814 | x509.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 959 | x509.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 815 | x509.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 960 | x509.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 816 | x509.o: ../include/openssl/sha.h ../include/openssl/stack.h | 961 | x509.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 962 | x509.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 817 | x509.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | 963 | x509.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h |
| 818 | x509.o: ../include/openssl/x509v3.h apps.h | 964 | x509.o: ../include/openssl/x509v3.h apps.h |
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index a87d23bf33..167c319ebe 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c | |||
| @@ -64,6 +64,11 @@ | |||
| 64 | #define NON_MAIN | 64 | #define NON_MAIN |
| 65 | #include "apps.h" | 65 | #include "apps.h" |
| 66 | #undef NON_MAIN | 66 | #undef NON_MAIN |
| 67 | #include <openssl/err.h> | ||
| 68 | #include <openssl/x509.h> | ||
| 69 | #include <openssl/pem.h> | ||
| 70 | #include <openssl/pkcs12.h> | ||
| 71 | #include <openssl/safestack.h> | ||
| 67 | 72 | ||
| 68 | #ifdef WINDOWS | 73 | #ifdef WINDOWS |
| 69 | # include "bss_file.c" | 74 | # include "bss_file.c" |
| @@ -91,8 +96,8 @@ int args_from_file(char *file, int *argc, char **argv[]) | |||
| 91 | *argv=NULL; | 96 | *argv=NULL; |
| 92 | 97 | ||
| 93 | len=(unsigned int)stbuf.st_size; | 98 | len=(unsigned int)stbuf.st_size; |
| 94 | if (buf != NULL) Free(buf); | 99 | if (buf != NULL) OPENSSL_free(buf); |
| 95 | buf=(char *)Malloc(len+1); | 100 | buf=(char *)OPENSSL_malloc(len+1); |
| 96 | if (buf == NULL) return(0); | 101 | if (buf == NULL) return(0); |
| 97 | 102 | ||
| 98 | len=fread(buf,1,len,fp); | 103 | len=fread(buf,1,len,fp); |
| @@ -102,8 +107,8 @@ int args_from_file(char *file, int *argc, char **argv[]) | |||
| 102 | i=0; | 107 | i=0; |
| 103 | for (p=buf; *p; p++) | 108 | for (p=buf; *p; p++) |
| 104 | if (*p == '\n') i++; | 109 | if (*p == '\n') i++; |
| 105 | if (arg != NULL) Free(arg); | 110 | if (arg != NULL) OPENSSL_free(arg); |
| 106 | arg=(char **)Malloc(sizeof(char *)*(i*2)); | 111 | arg=(char **)OPENSSL_malloc(sizeof(char *)*(i*2)); |
| 107 | 112 | ||
| 108 | *argv=arg; | 113 | *argv=arg; |
| 109 | num=0; | 114 | num=0; |
| @@ -159,6 +164,14 @@ int str2fmt(char *s) | |||
| 159 | return(FORMAT_PEM); | 164 | return(FORMAT_PEM); |
| 160 | else if ((*s == 'N') || (*s == 'n')) | 165 | else if ((*s == 'N') || (*s == 'n')) |
| 161 | return(FORMAT_NETSCAPE); | 166 | return(FORMAT_NETSCAPE); |
| 167 | else if ((*s == 'S') || (*s == 's')) | ||
| 168 | return(FORMAT_SMIME); | ||
| 169 | else if ((*s == '1') | ||
| 170 | || (strcmp(s,"PKCS12") == 0) || (strcmp(s,"pkcs12") == 0) | ||
| 171 | || (strcmp(s,"P12") == 0) || (strcmp(s,"p12") == 0)) | ||
| 172 | return(FORMAT_PKCS12); | ||
| 173 | else if ((*s == 'E') || (*s == 'e')) | ||
| 174 | return(FORMAT_ENGINE); | ||
| 162 | else | 175 | else |
| 163 | return(FORMAT_UNDEF); | 176 | return(FORMAT_UNDEF); |
| 164 | } | 177 | } |
| @@ -266,7 +279,7 @@ int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[]) | |||
| 266 | if (arg->count == 0) | 279 | if (arg->count == 0) |
| 267 | { | 280 | { |
| 268 | arg->count=20; | 281 | arg->count=20; |
| 269 | arg->data=(char **)Malloc(sizeof(char *)*arg->count); | 282 | arg->data=(char **)OPENSSL_malloc(sizeof(char *)*arg->count); |
| 270 | } | 283 | } |
| 271 | for (i=0; i<arg->count; i++) | 284 | for (i=0; i<arg->count; i++) |
| 272 | arg->data[i]=NULL; | 285 | arg->data[i]=NULL; |
| @@ -285,7 +298,7 @@ int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[]) | |||
| 285 | if (num >= arg->count) | 298 | if (num >= arg->count) |
| 286 | { | 299 | { |
| 287 | arg->count+=20; | 300 | arg->count+=20; |
| 288 | arg->data=(char **)Realloc(arg->data, | 301 | arg->data=(char **)OPENSSL_realloc(arg->data, |
| 289 | sizeof(char *)*arg->count); | 302 | sizeof(char *)*arg->count); |
| 290 | if (argc == 0) return(0); | 303 | if (argc == 0) return(0); |
| 291 | } | 304 | } |
| @@ -414,3 +427,352 @@ static char *app_get_pass(BIO *err, char *arg, int keepbio) | |||
| 414 | if(tmp) *tmp = 0; | 427 | if(tmp) *tmp = 0; |
| 415 | return BUF_strdup(tpass); | 428 | return BUF_strdup(tpass); |
| 416 | } | 429 | } |
| 430 | |||
| 431 | int add_oid_section(BIO *err, LHASH *conf) | ||
| 432 | { | ||
| 433 | char *p; | ||
| 434 | STACK_OF(CONF_VALUE) *sktmp; | ||
| 435 | CONF_VALUE *cnf; | ||
| 436 | int i; | ||
| 437 | if(!(p=CONF_get_string(conf,NULL,"oid_section"))) return 1; | ||
| 438 | if(!(sktmp = CONF_get_section(conf, p))) { | ||
| 439 | BIO_printf(err, "problem loading oid section %s\n", p); | ||
| 440 | return 0; | ||
| 441 | } | ||
| 442 | for(i = 0; i < sk_CONF_VALUE_num(sktmp); i++) { | ||
| 443 | cnf = sk_CONF_VALUE_value(sktmp, i); | ||
| 444 | if(OBJ_create(cnf->value, cnf->name, cnf->name) == NID_undef) { | ||
| 445 | BIO_printf(err, "problem creating object %s=%s\n", | ||
| 446 | cnf->name, cnf->value); | ||
| 447 | return 0; | ||
| 448 | } | ||
| 449 | } | ||
| 450 | return 1; | ||
| 451 | } | ||
| 452 | |||
| 453 | X509 *load_cert(BIO *err, char *file, int format) | ||
| 454 | { | ||
| 455 | ASN1_HEADER *ah=NULL; | ||
| 456 | BUF_MEM *buf=NULL; | ||
| 457 | X509 *x=NULL; | ||
| 458 | BIO *cert; | ||
| 459 | |||
| 460 | if ((cert=BIO_new(BIO_s_file())) == NULL) | ||
| 461 | { | ||
| 462 | ERR_print_errors(err); | ||
| 463 | goto end; | ||
| 464 | } | ||
| 465 | |||
| 466 | if (file == NULL) | ||
| 467 | BIO_set_fp(cert,stdin,BIO_NOCLOSE); | ||
| 468 | else | ||
| 469 | { | ||
| 470 | if (BIO_read_filename(cert,file) <= 0) | ||
| 471 | { | ||
| 472 | perror(file); | ||
| 473 | goto end; | ||
| 474 | } | ||
| 475 | } | ||
| 476 | |||
| 477 | if (format == FORMAT_ASN1) | ||
| 478 | x=d2i_X509_bio(cert,NULL); | ||
| 479 | else if (format == FORMAT_NETSCAPE) | ||
| 480 | { | ||
| 481 | unsigned char *p,*op; | ||
| 482 | int size=0,i; | ||
| 483 | |||
| 484 | /* We sort of have to do it this way because it is sort of nice | ||
| 485 | * to read the header first and check it, then | ||
| 486 | * try to read the certificate */ | ||
| 487 | buf=BUF_MEM_new(); | ||
| 488 | for (;;) | ||
| 489 | { | ||
| 490 | if ((buf == NULL) || (!BUF_MEM_grow(buf,size+1024*10))) | ||
| 491 | goto end; | ||
| 492 | i=BIO_read(cert,&(buf->data[size]),1024*10); | ||
| 493 | size+=i; | ||
| 494 | if (i == 0) break; | ||
| 495 | if (i < 0) | ||
| 496 | { | ||
| 497 | perror("reading certificate"); | ||
| 498 | goto end; | ||
| 499 | } | ||
| 500 | } | ||
| 501 | p=(unsigned char *)buf->data; | ||
| 502 | op=p; | ||
| 503 | |||
| 504 | /* First load the header */ | ||
| 505 | if ((ah=d2i_ASN1_HEADER(NULL,&p,(long)size)) == NULL) | ||
| 506 | goto end; | ||
| 507 | if ((ah->header == NULL) || (ah->header->data == NULL) || | ||
| 508 | (strncmp(NETSCAPE_CERT_HDR,(char *)ah->header->data, | ||
| 509 | ah->header->length) != 0)) | ||
| 510 | { | ||
| 511 | BIO_printf(err,"Error reading header on certificate\n"); | ||
| 512 | goto end; | ||
| 513 | } | ||
| 514 | /* header is ok, so now read the object */ | ||
| 515 | p=op; | ||
| 516 | ah->meth=X509_asn1_meth(); | ||
| 517 | if ((ah=d2i_ASN1_HEADER(&ah,&p,(long)size)) == NULL) | ||
| 518 | goto end; | ||
| 519 | x=(X509 *)ah->data; | ||
| 520 | ah->data=NULL; | ||
| 521 | } | ||
| 522 | else if (format == FORMAT_PEM) | ||
| 523 | x=PEM_read_bio_X509_AUX(cert,NULL,NULL,NULL); | ||
| 524 | else if (format == FORMAT_PKCS12) | ||
| 525 | { | ||
| 526 | PKCS12 *p12 = d2i_PKCS12_bio(cert, NULL); | ||
| 527 | |||
| 528 | PKCS12_parse(p12, NULL, NULL, &x, NULL); | ||
| 529 | PKCS12_free(p12); | ||
| 530 | p12 = NULL; | ||
| 531 | } | ||
| 532 | else { | ||
| 533 | BIO_printf(err,"bad input format specified for input cert\n"); | ||
| 534 | goto end; | ||
| 535 | } | ||
| 536 | end: | ||
| 537 | if (x == NULL) | ||
| 538 | { | ||
| 539 | BIO_printf(err,"unable to load certificate\n"); | ||
| 540 | ERR_print_errors(err); | ||
| 541 | } | ||
| 542 | if (ah != NULL) ASN1_HEADER_free(ah); | ||
| 543 | if (cert != NULL) BIO_free(cert); | ||
| 544 | if (buf != NULL) BUF_MEM_free(buf); | ||
| 545 | return(x); | ||
| 546 | } | ||
| 547 | |||
| 548 | EVP_PKEY *load_key(BIO *err, char *file, int format, char *pass) | ||
| 549 | { | ||
| 550 | BIO *key=NULL; | ||
| 551 | EVP_PKEY *pkey=NULL; | ||
| 552 | |||
| 553 | if (file == NULL) | ||
| 554 | { | ||
| 555 | BIO_printf(err,"no keyfile specified\n"); | ||
| 556 | goto end; | ||
| 557 | } | ||
| 558 | key=BIO_new(BIO_s_file()); | ||
| 559 | if (key == NULL) | ||
| 560 | { | ||
| 561 | ERR_print_errors(err); | ||
| 562 | goto end; | ||
| 563 | } | ||
| 564 | if (BIO_read_filename(key,file) <= 0) | ||
| 565 | { | ||
| 566 | perror(file); | ||
| 567 | goto end; | ||
| 568 | } | ||
| 569 | if (format == FORMAT_ASN1) | ||
| 570 | { | ||
| 571 | pkey=d2i_PrivateKey_bio(key, NULL); | ||
| 572 | } | ||
| 573 | else if (format == FORMAT_PEM) | ||
| 574 | { | ||
| 575 | pkey=PEM_read_bio_PrivateKey(key,NULL,NULL,pass); | ||
| 576 | } | ||
| 577 | else if (format == FORMAT_PKCS12) | ||
| 578 | { | ||
| 579 | PKCS12 *p12 = d2i_PKCS12_bio(key, NULL); | ||
| 580 | |||
| 581 | PKCS12_parse(p12, pass, &pkey, NULL, NULL); | ||
| 582 | PKCS12_free(p12); | ||
| 583 | p12 = NULL; | ||
| 584 | } | ||
| 585 | else | ||
| 586 | { | ||
| 587 | BIO_printf(err,"bad input format specified for key\n"); | ||
| 588 | goto end; | ||
| 589 | } | ||
| 590 | end: | ||
| 591 | if (key != NULL) BIO_free(key); | ||
| 592 | if (pkey == NULL) | ||
| 593 | BIO_printf(err,"unable to load Private Key\n"); | ||
| 594 | return(pkey); | ||
| 595 | } | ||
| 596 | |||
| 597 | EVP_PKEY *load_pubkey(BIO *err, char *file, int format) | ||
| 598 | { | ||
| 599 | BIO *key=NULL; | ||
| 600 | EVP_PKEY *pkey=NULL; | ||
| 601 | |||
| 602 | if (file == NULL) | ||
| 603 | { | ||
| 604 | BIO_printf(err,"no keyfile specified\n"); | ||
| 605 | goto end; | ||
| 606 | } | ||
| 607 | key=BIO_new(BIO_s_file()); | ||
| 608 | if (key == NULL) | ||
| 609 | { | ||
| 610 | ERR_print_errors(err); | ||
| 611 | goto end; | ||
| 612 | } | ||
| 613 | if (BIO_read_filename(key,file) <= 0) | ||
| 614 | { | ||
| 615 | perror(file); | ||
| 616 | goto end; | ||
| 617 | } | ||
| 618 | if (format == FORMAT_ASN1) | ||
| 619 | { | ||
| 620 | pkey=d2i_PUBKEY_bio(key, NULL); | ||
| 621 | } | ||
| 622 | else if (format == FORMAT_PEM) | ||
| 623 | { | ||
| 624 | pkey=PEM_read_bio_PUBKEY(key,NULL,NULL,NULL); | ||
| 625 | } | ||
| 626 | else | ||
| 627 | { | ||
| 628 | BIO_printf(err,"bad input format specified for key\n"); | ||
| 629 | goto end; | ||
| 630 | } | ||
| 631 | end: | ||
| 632 | if (key != NULL) BIO_free(key); | ||
| 633 | if (pkey == NULL) | ||
| 634 | BIO_printf(err,"unable to load Public Key\n"); | ||
| 635 | return(pkey); | ||
| 636 | } | ||
| 637 | |||
| 638 | STACK_OF(X509) *load_certs(BIO *err, char *file, int format) | ||
| 639 | { | ||
| 640 | BIO *certs; | ||
| 641 | int i; | ||
| 642 | STACK_OF(X509) *othercerts = NULL; | ||
| 643 | STACK_OF(X509_INFO) *allcerts = NULL; | ||
| 644 | X509_INFO *xi; | ||
| 645 | |||
| 646 | if((certs = BIO_new(BIO_s_file())) == NULL) | ||
| 647 | { | ||
| 648 | ERR_print_errors(err); | ||
| 649 | goto end; | ||
| 650 | } | ||
| 651 | |||
| 652 | if (file == NULL) | ||
| 653 | BIO_set_fp(certs,stdin,BIO_NOCLOSE); | ||
| 654 | else | ||
| 655 | { | ||
| 656 | if (BIO_read_filename(certs,file) <= 0) | ||
| 657 | { | ||
| 658 | perror(file); | ||
| 659 | goto end; | ||
| 660 | } | ||
| 661 | } | ||
| 662 | |||
| 663 | if (format == FORMAT_PEM) | ||
| 664 | { | ||
| 665 | othercerts = sk_X509_new_null(); | ||
| 666 | if(!othercerts) | ||
| 667 | { | ||
| 668 | sk_X509_free(othercerts); | ||
| 669 | othercerts = NULL; | ||
| 670 | goto end; | ||
| 671 | } | ||
| 672 | allcerts = PEM_X509_INFO_read_bio(certs, NULL, NULL, NULL); | ||
| 673 | for(i = 0; i < sk_X509_INFO_num(allcerts); i++) | ||
| 674 | { | ||
| 675 | xi = sk_X509_INFO_value (allcerts, i); | ||
| 676 | if (xi->x509) | ||
| 677 | { | ||
| 678 | sk_X509_push(othercerts, xi->x509); | ||
| 679 | xi->x509 = NULL; | ||
| 680 | } | ||
| 681 | } | ||
| 682 | goto end; | ||
| 683 | } | ||
| 684 | else { | ||
| 685 | BIO_printf(err,"bad input format specified for input cert\n"); | ||
| 686 | goto end; | ||
| 687 | } | ||
| 688 | end: | ||
| 689 | if (othercerts == NULL) | ||
| 690 | { | ||
| 691 | BIO_printf(err,"unable to load certificates\n"); | ||
| 692 | ERR_print_errors(err); | ||
| 693 | } | ||
| 694 | if (allcerts) sk_X509_INFO_pop_free(allcerts, X509_INFO_free); | ||
| 695 | if (certs != NULL) BIO_free(certs); | ||
| 696 | return(othercerts); | ||
| 697 | } | ||
| 698 | |||
| 699 | typedef struct { | ||
| 700 | char *name; | ||
| 701 | unsigned long flag; | ||
| 702 | unsigned long mask; | ||
| 703 | } NAME_EX_TBL; | ||
| 704 | |||
| 705 | int set_name_ex(unsigned long *flags, const char *arg) | ||
| 706 | { | ||
| 707 | char c; | ||
| 708 | const NAME_EX_TBL *ptbl, ex_tbl[] = { | ||
| 709 | { "esc_2253", ASN1_STRFLGS_ESC_2253, 0}, | ||
| 710 | { "esc_ctrl", ASN1_STRFLGS_ESC_CTRL, 0}, | ||
| 711 | { "esc_msb", ASN1_STRFLGS_ESC_MSB, 0}, | ||
| 712 | { "use_quote", ASN1_STRFLGS_ESC_QUOTE, 0}, | ||
| 713 | { "utf8", ASN1_STRFLGS_UTF8_CONVERT, 0}, | ||
| 714 | { "ignore_type", ASN1_STRFLGS_IGNORE_TYPE, 0}, | ||
| 715 | { "show_type", ASN1_STRFLGS_SHOW_TYPE, 0}, | ||
| 716 | { "dump_all", ASN1_STRFLGS_DUMP_ALL, 0}, | ||
| 717 | { "dump_nostr", ASN1_STRFLGS_DUMP_UNKNOWN, 0}, | ||
| 718 | { "dump_der", ASN1_STRFLGS_DUMP_DER, 0}, | ||
| 719 | { "compat", XN_FLAG_COMPAT, 0xffffffffL}, | ||
| 720 | { "sep_comma_plus", XN_FLAG_SEP_COMMA_PLUS, XN_FLAG_SEP_MASK}, | ||
| 721 | { "sep_comma_plus_space", XN_FLAG_SEP_CPLUS_SPC, XN_FLAG_SEP_MASK}, | ||
| 722 | { "sep_semi_plus_space", XN_FLAG_SEP_SPLUS_SPC, XN_FLAG_SEP_MASK}, | ||
| 723 | { "sep_multiline", XN_FLAG_SEP_MULTILINE, XN_FLAG_SEP_MASK}, | ||
| 724 | { "dn_rev", XN_FLAG_DN_REV, 0}, | ||
| 725 | { "nofname", XN_FLAG_FN_NONE, XN_FLAG_FN_MASK}, | ||
| 726 | { "sname", XN_FLAG_FN_SN, XN_FLAG_FN_MASK}, | ||
| 727 | { "lname", XN_FLAG_FN_LN, XN_FLAG_FN_MASK}, | ||
| 728 | { "oid", XN_FLAG_FN_OID, XN_FLAG_FN_MASK}, | ||
| 729 | { "space_eq", XN_FLAG_SPC_EQ, 0}, | ||
| 730 | { "dump_unknown", XN_FLAG_DUMP_UNKNOWN_FIELDS, 0}, | ||
| 731 | { "RFC2253", XN_FLAG_RFC2253, 0xffffffffL}, | ||
| 732 | { "oneline", XN_FLAG_ONELINE, 0xffffffffL}, | ||
| 733 | { "multiline", XN_FLAG_MULTILINE, 0xffffffffL}, | ||
| 734 | { NULL, 0, 0} | ||
| 735 | }; | ||
| 736 | |||
| 737 | c = arg[0]; | ||
| 738 | |||
| 739 | if(c == '-') { | ||
| 740 | c = 0; | ||
| 741 | arg++; | ||
| 742 | } else if (c == '+') { | ||
| 743 | c = 1; | ||
| 744 | arg++; | ||
| 745 | } else c = 1; | ||
| 746 | |||
| 747 | for(ptbl = ex_tbl; ptbl->name; ptbl++) { | ||
| 748 | if(!strcmp(arg, ptbl->name)) { | ||
| 749 | *flags &= ~ptbl->mask; | ||
| 750 | if(c) *flags |= ptbl->flag; | ||
| 751 | else *flags &= ~ptbl->flag; | ||
| 752 | return 1; | ||
| 753 | } | ||
| 754 | } | ||
| 755 | return 0; | ||
| 756 | } | ||
| 757 | |||
| 758 | void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags) | ||
| 759 | { | ||
| 760 | char buf[256]; | ||
| 761 | char mline = 0; | ||
| 762 | int indent = 0; | ||
| 763 | if(title) BIO_puts(out, title); | ||
| 764 | if((lflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) { | ||
| 765 | mline = 1; | ||
| 766 | indent = 4; | ||
| 767 | } | ||
| 768 | if(lflags == XN_FLAG_COMPAT) { | ||
| 769 | X509_NAME_oneline(nm,buf,256); | ||
| 770 | BIO_puts(out,buf); | ||
| 771 | BIO_puts(out, "\n"); | ||
| 772 | } else { | ||
| 773 | if(mline) BIO_puts(out, "\n"); | ||
| 774 | X509_NAME_print_ex(out, nm, indent, lflags); | ||
| 775 | BIO_puts(out, "\n"); | ||
| 776 | } | ||
| 777 | } | ||
| 778 | |||
diff --git a/src/lib/libssl/src/apps/apps.h b/src/lib/libssl/src/apps/apps.h index 2dcdb88c43..74d479e91d 100644 --- a/src/lib/libssl/src/apps/apps.h +++ b/src/lib/libssl/src/apps/apps.h | |||
| @@ -65,6 +65,8 @@ | |||
| 65 | #include <openssl/bio.h> | 65 | #include <openssl/bio.h> |
| 66 | #include <openssl/crypto.h> | 66 | #include <openssl/crypto.h> |
| 67 | #include <openssl/x509.h> | 67 | #include <openssl/x509.h> |
| 68 | #include <openssl/lhash.h> | ||
| 69 | #include <openssl/conf.h> | ||
| 68 | 70 | ||
| 69 | int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn); | 71 | int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn); |
| 70 | int app_RAND_write_file(const char *file, BIO *bio_e); | 72 | int app_RAND_write_file(const char *file, BIO *bio_e); |
| @@ -98,7 +100,6 @@ extern BIO *bio_err; | |||
| 98 | #else | 100 | #else |
| 99 | 101 | ||
| 100 | #define MAIN(a,v) PROG(a,v) | 102 | #define MAIN(a,v) PROG(a,v) |
| 101 | #include <openssl/conf.h> | ||
| 102 | extern LHASH *config; | 103 | extern LHASH *config; |
| 103 | extern char *default_config_file; | 104 | extern char *default_config_file; |
| 104 | extern BIO *bio_err; | 105 | extern BIO *bio_err; |
| @@ -144,13 +145,27 @@ void program_name(char *in,char *out,int size); | |||
| 144 | int chopup_args(ARGS *arg,char *buf, int *argc, char **argv[]); | 145 | int chopup_args(ARGS *arg,char *buf, int *argc, char **argv[]); |
| 145 | #ifdef HEADER_X509_H | 146 | #ifdef HEADER_X509_H |
| 146 | int dump_cert_text(BIO *out, X509 *x); | 147 | int dump_cert_text(BIO *out, X509 *x); |
| 148 | void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags); | ||
| 147 | #endif | 149 | #endif |
| 150 | int set_name_ex(unsigned long *flags, const char *arg); | ||
| 148 | int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2); | 151 | int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2); |
| 152 | int add_oid_section(BIO *err, LHASH *conf); | ||
| 153 | X509 *load_cert(BIO *err, char *file, int format); | ||
| 154 | EVP_PKEY *load_key(BIO *err, char *file, int format, char *pass); | ||
| 155 | EVP_PKEY *load_pubkey(BIO *err, char *file, int format); | ||
| 156 | STACK_OF(X509) *load_certs(BIO *err, char *file, int format); | ||
| 157 | |||
| 149 | #define FORMAT_UNDEF 0 | 158 | #define FORMAT_UNDEF 0 |
| 150 | #define FORMAT_ASN1 1 | 159 | #define FORMAT_ASN1 1 |
| 151 | #define FORMAT_TEXT 2 | 160 | #define FORMAT_TEXT 2 |
| 152 | #define FORMAT_PEM 3 | 161 | #define FORMAT_PEM 3 |
| 153 | #define FORMAT_NETSCAPE 4 | 162 | #define FORMAT_NETSCAPE 4 |
| 163 | #define FORMAT_PKCS12 5 | ||
| 164 | #define FORMAT_SMIME 6 | ||
| 165 | /* Since this is currently inofficial, let's give it a high number */ | ||
| 166 | #define FORMAT_ENGINE 127 | ||
| 167 | |||
| 168 | #define NETSCAPE_CERT_HDR "certificate" | ||
| 154 | 169 | ||
| 155 | #define APP_PASS_LEN 1024 | 170 | #define APP_PASS_LEN 1024 |
| 156 | 171 | ||
diff --git a/src/lib/libssl/src/apps/asn1pars.c b/src/lib/libssl/src/apps/asn1pars.c index f104ebc1f0..f25c9f84e8 100644 --- a/src/lib/libssl/src/apps/asn1pars.c +++ b/src/lib/libssl/src/apps/asn1pars.c | |||
| @@ -88,7 +88,7 @@ int MAIN(int argc, char **argv) | |||
| 88 | unsigned int length=0; | 88 | unsigned int length=0; |
| 89 | long num,tmplen; | 89 | long num,tmplen; |
| 90 | BIO *in=NULL,*out=NULL,*b64=NULL, *derout = NULL; | 90 | BIO *in=NULL,*out=NULL,*b64=NULL, *derout = NULL; |
| 91 | int informat,indent=0, noout = 0; | 91 | int informat,indent=0, noout = 0, dump = 0; |
| 92 | char *infile=NULL,*str=NULL,*prog,*oidfile=NULL, *derfile=NULL; | 92 | char *infile=NULL,*str=NULL,*prog,*oidfile=NULL, *derfile=NULL; |
| 93 | unsigned char *tmpbuf; | 93 | unsigned char *tmpbuf; |
| 94 | BUF_MEM *buf=NULL; | 94 | BUF_MEM *buf=NULL; |
| @@ -108,7 +108,7 @@ int MAIN(int argc, char **argv) | |||
| 108 | argv++; | 108 | argv++; |
| 109 | if ((osk=sk_new_null()) == NULL) | 109 | if ((osk=sk_new_null()) == NULL) |
| 110 | { | 110 | { |
| 111 | BIO_printf(bio_err,"Malloc failure\n"); | 111 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 112 | goto end; | 112 | goto end; |
| 113 | } | 113 | } |
| 114 | while (argc >= 1) | 114 | while (argc >= 1) |
| @@ -149,6 +149,16 @@ int MAIN(int argc, char **argv) | |||
| 149 | length= atoi(*(++argv)); | 149 | length= atoi(*(++argv)); |
| 150 | if (length == 0) goto bad; | 150 | if (length == 0) goto bad; |
| 151 | } | 151 | } |
| 152 | else if (strcmp(*argv,"-dump") == 0) | ||
| 153 | { | ||
| 154 | dump= -1; | ||
| 155 | } | ||
| 156 | else if (strcmp(*argv,"-dlimit") == 0) | ||
| 157 | { | ||
| 158 | if (--argc < 1) goto bad; | ||
| 159 | dump= atoi(*(++argv)); | ||
| 160 | if (dump <= 0) goto bad; | ||
| 161 | } | ||
| 152 | else if (strcmp(*argv,"-strparse") == 0) | 162 | else if (strcmp(*argv,"-strparse") == 0) |
| 153 | { | 163 | { |
| 154 | if (--argc < 1) goto bad; | 164 | if (--argc < 1) goto bad; |
| @@ -176,6 +186,8 @@ bad: | |||
| 176 | BIO_printf(bio_err," -offset arg offset into file\n"); | 186 | BIO_printf(bio_err," -offset arg offset into file\n"); |
| 177 | BIO_printf(bio_err," -length arg length of section in file\n"); | 187 | BIO_printf(bio_err," -length arg length of section in file\n"); |
| 178 | BIO_printf(bio_err," -i indent entries\n"); | 188 | BIO_printf(bio_err," -i indent entries\n"); |
| 189 | BIO_printf(bio_err," -dump dump unknown data in hex form\n"); | ||
| 190 | BIO_printf(bio_err," -dlimit arg dump the first arg bytes of unknown data in hex form\n"); | ||
| 179 | BIO_printf(bio_err," -oid file file of extra oid definitions\n"); | 191 | BIO_printf(bio_err," -oid file file of extra oid definitions\n"); |
| 180 | BIO_printf(bio_err," -strparse offset\n"); | 192 | BIO_printf(bio_err," -strparse offset\n"); |
| 181 | BIO_printf(bio_err," a series of these can be used to 'dig' into multiple\n"); | 193 | BIO_printf(bio_err," a series of these can be used to 'dig' into multiple\n"); |
| @@ -194,6 +206,12 @@ bad: | |||
| 194 | goto end; | 206 | goto end; |
| 195 | } | 207 | } |
| 196 | BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); | 208 | BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); |
| 209 | #ifdef VMS | ||
| 210 | { | ||
| 211 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 212 | out = BIO_push(tmpbio, out); | ||
| 213 | } | ||
| 214 | #endif | ||
| 197 | 215 | ||
| 198 | if (oidfile != NULL) | 216 | if (oidfile != NULL) |
| 199 | { | 217 | { |
| @@ -293,7 +311,8 @@ bad: | |||
| 293 | } | 311 | } |
| 294 | } | 312 | } |
| 295 | if (!noout && | 313 | if (!noout && |
| 296 | !ASN1_parse(out,(unsigned char *)&(str[offset]),length,indent)) | 314 | !ASN1_parse_dump(out,(unsigned char *)&(str[offset]),length, |
| 315 | indent,dump)) | ||
| 297 | { | 316 | { |
| 298 | ERR_print_errors(bio_err); | 317 | ERR_print_errors(bio_err); |
| 299 | goto end; | 318 | goto end; |
| @@ -302,7 +321,7 @@ bad: | |||
| 302 | end: | 321 | end: |
| 303 | BIO_free(derout); | 322 | BIO_free(derout); |
| 304 | if (in != NULL) BIO_free(in); | 323 | if (in != NULL) BIO_free(in); |
| 305 | if (out != NULL) BIO_free(out); | 324 | if (out != NULL) BIO_free_all(out); |
| 306 | if (b64 != NULL) BIO_free(b64); | 325 | if (b64 != NULL) BIO_free(b64); |
| 307 | if (ret != 0) | 326 | if (ret != 0) |
| 308 | ERR_print_errors(bio_err); | 327 | ERR_print_errors(bio_err); |
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c index 73df13fe8e..2ab0c4db51 100644 --- a/src/lib/libssl/src/apps/ca.c +++ b/src/lib/libssl/src/apps/ca.c | |||
| @@ -74,6 +74,7 @@ | |||
| 74 | #include <openssl/x509v3.h> | 74 | #include <openssl/x509v3.h> |
| 75 | #include <openssl/objects.h> | 75 | #include <openssl/objects.h> |
| 76 | #include <openssl/pem.h> | 76 | #include <openssl/pem.h> |
| 77 | #include <openssl/engine.h> | ||
| 77 | 78 | ||
| 78 | #ifndef W_OK | 79 | #ifndef W_OK |
| 79 | # ifdef VMS | 80 | # ifdef VMS |
| @@ -167,6 +168,7 @@ static char *ca_usage[]={ | |||
| 167 | " -revoke file - Revoke a certificate (given in file)\n", | 168 | " -revoke file - Revoke a certificate (given in file)\n", |
| 168 | " -extensions .. - Extension section (override value in config file)\n", | 169 | " -extensions .. - Extension section (override value in config file)\n", |
| 169 | " -crlexts .. - CRL extension section (override value in config file)\n", | 170 | " -crlexts .. - CRL extension section (override value in config file)\n", |
| 171 | " -engine e - use engine e, possibly a hardware device.\n", | ||
| 170 | NULL | 172 | NULL |
| 171 | }; | 173 | }; |
| 172 | 174 | ||
| @@ -176,7 +178,6 @@ extern int EF_PROTECT_BELOW; | |||
| 176 | extern int EF_ALIGNMENT; | 178 | extern int EF_ALIGNMENT; |
| 177 | #endif | 179 | #endif |
| 178 | 180 | ||
| 179 | static int add_oid_section(LHASH *conf); | ||
| 180 | static void lookup_fail(char *name,char *tag); | 181 | static void lookup_fail(char *name,char *tag); |
| 181 | static unsigned long index_serial_hash(char **a); | 182 | static unsigned long index_serial_hash(char **a); |
| 182 | static int index_serial_cmp(char **a, char **b); | 183 | static int index_serial_cmp(char **a, char **b); |
| @@ -217,7 +218,8 @@ int MAIN(int, char **); | |||
| 217 | 218 | ||
| 218 | int MAIN(int argc, char **argv) | 219 | int MAIN(int argc, char **argv) |
| 219 | { | 220 | { |
| 220 | char *key=NULL; | 221 | ENGINE *e = NULL; |
| 222 | char *key=NULL,*passargin=NULL; | ||
| 221 | int total=0; | 223 | int total=0; |
| 222 | int total_done=0; | 224 | int total_done=0; |
| 223 | int badops=0; | 225 | int badops=0; |
| @@ -263,12 +265,13 @@ int MAIN(int argc, char **argv) | |||
| 263 | long l; | 265 | long l; |
| 264 | const EVP_MD *dgst=NULL; | 266 | const EVP_MD *dgst=NULL; |
| 265 | STACK_OF(CONF_VALUE) *attribs=NULL; | 267 | STACK_OF(CONF_VALUE) *attribs=NULL; |
| 266 | STACK *cert_sk=NULL; | 268 | STACK_OF(X509) *cert_sk=NULL; |
| 267 | BIO *hex=NULL; | 269 | BIO *hex=NULL; |
| 268 | #undef BSIZE | 270 | #undef BSIZE |
| 269 | #define BSIZE 256 | 271 | #define BSIZE 256 |
| 270 | MS_STATIC char buf[3][BSIZE]; | 272 | MS_STATIC char buf[3][BSIZE]; |
| 271 | char *randfile=NULL; | 273 | char *randfile=NULL; |
| 274 | char *engine = NULL; | ||
| 272 | 275 | ||
| 273 | #ifdef EFENCE | 276 | #ifdef EFENCE |
| 274 | EF_PROTECT_FREE=1; | 277 | EF_PROTECT_FREE=1; |
| @@ -334,6 +337,11 @@ EF_ALIGNMENT=0; | |||
| 334 | if (--argc < 1) goto bad; | 337 | if (--argc < 1) goto bad; |
| 335 | keyfile= *(++argv); | 338 | keyfile= *(++argv); |
| 336 | } | 339 | } |
| 340 | else if (strcmp(*argv,"-passin") == 0) | ||
| 341 | { | ||
| 342 | if (--argc < 1) goto bad; | ||
| 343 | passargin= *(++argv); | ||
| 344 | } | ||
| 337 | else if (strcmp(*argv,"-key") == 0) | 345 | else if (strcmp(*argv,"-key") == 0) |
| 338 | { | 346 | { |
| 339 | if (--argc < 1) goto bad; | 347 | if (--argc < 1) goto bad; |
| @@ -415,6 +423,11 @@ EF_ALIGNMENT=0; | |||
| 415 | if (--argc < 1) goto bad; | 423 | if (--argc < 1) goto bad; |
| 416 | crl_ext= *(++argv); | 424 | crl_ext= *(++argv); |
| 417 | } | 425 | } |
| 426 | else if (strcmp(*argv,"-engine") == 0) | ||
| 427 | { | ||
| 428 | if (--argc < 1) goto bad; | ||
| 429 | engine= *(++argv); | ||
| 430 | } | ||
| 418 | else | 431 | else |
| 419 | { | 432 | { |
| 420 | bad: | 433 | bad: |
| @@ -435,6 +448,24 @@ bad: | |||
| 435 | 448 | ||
| 436 | ERR_load_crypto_strings(); | 449 | ERR_load_crypto_strings(); |
| 437 | 450 | ||
| 451 | if (engine != NULL) | ||
| 452 | { | ||
| 453 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 454 | { | ||
| 455 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 456 | engine); | ||
| 457 | goto err; | ||
| 458 | } | ||
| 459 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 460 | { | ||
| 461 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 462 | goto err; | ||
| 463 | } | ||
| 464 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 465 | /* Free our "structural" reference. */ | ||
| 466 | ENGINE_free(e); | ||
| 467 | } | ||
| 468 | |||
| 438 | /*****************************************************************/ | 469 | /*****************************************************************/ |
| 439 | if (configfile == NULL) configfile = getenv("OPENSSL_CONF"); | 470 | if (configfile == NULL) configfile = getenv("OPENSSL_CONF"); |
| 440 | if (configfile == NULL) configfile = getenv("SSLEAY_CONF"); | 471 | if (configfile == NULL) configfile = getenv("SSLEAY_CONF"); |
| @@ -498,7 +529,7 @@ bad: | |||
| 498 | BIO_free(oid_bio); | 529 | BIO_free(oid_bio); |
| 499 | } | 530 | } |
| 500 | } | 531 | } |
| 501 | if(!add_oid_section(conf)) | 532 | if(!add_oid_section(bio_err,conf)) |
| 502 | { | 533 | { |
| 503 | ERR_print_errors(bio_err); | 534 | ERR_print_errors(bio_err); |
| 504 | goto err; | 535 | goto err; |
| @@ -527,6 +558,11 @@ bad: | |||
| 527 | lookup_fail(section,ENV_PRIVATE_KEY); | 558 | lookup_fail(section,ENV_PRIVATE_KEY); |
| 528 | goto err; | 559 | goto err; |
| 529 | } | 560 | } |
| 561 | if(!key && !app_passwd(bio_err, passargin, NULL, &key, NULL)) | ||
| 562 | { | ||
| 563 | BIO_printf(bio_err,"Error getting password\n"); | ||
| 564 | goto err; | ||
| 565 | } | ||
| 530 | if (BIO_read_filename(in,keyfile) <= 0) | 566 | if (BIO_read_filename(in,keyfile) <= 0) |
| 531 | { | 567 | { |
| 532 | perror(keyfile); | 568 | perror(keyfile); |
| @@ -681,6 +717,12 @@ bad: | |||
| 681 | if (verbose) | 717 | if (verbose) |
| 682 | { | 718 | { |
| 683 | BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */ | 719 | BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */ |
| 720 | #ifdef VMS | ||
| 721 | { | ||
| 722 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 723 | out = BIO_push(tmpbio, out); | ||
| 724 | } | ||
| 725 | #endif | ||
| 684 | TXT_DB_write(out,db); | 726 | TXT_DB_write(out,db); |
| 685 | BIO_printf(bio_err,"%d entries loaded from the database\n", | 727 | BIO_printf(bio_err,"%d entries loaded from the database\n", |
| 686 | db->data->num); | 728 | db->data->num); |
| @@ -715,7 +757,15 @@ bad: | |||
| 715 | } | 757 | } |
| 716 | } | 758 | } |
| 717 | else | 759 | else |
| 760 | { | ||
| 718 | BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT); | 761 | BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT); |
| 762 | #ifdef VMS | ||
| 763 | { | ||
| 764 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 765 | Sout = BIO_push(tmpbio, Sout); | ||
| 766 | } | ||
| 767 | #endif | ||
| 768 | } | ||
| 719 | } | 769 | } |
| 720 | 770 | ||
| 721 | if (req) | 771 | if (req) |
| @@ -808,7 +858,7 @@ bad: | |||
| 808 | { | 858 | { |
| 809 | if ((f=BN_bn2hex(serial)) == NULL) goto err; | 859 | if ((f=BN_bn2hex(serial)) == NULL) goto err; |
| 810 | BIO_printf(bio_err,"next serial number is %s\n",f); | 860 | BIO_printf(bio_err,"next serial number is %s\n",f); |
| 811 | Free(f); | 861 | OPENSSL_free(f); |
| 812 | } | 862 | } |
| 813 | 863 | ||
| 814 | if ((attribs=CONF_get_section(conf,policy)) == NULL) | 864 | if ((attribs=CONF_get_section(conf,policy)) == NULL) |
| @@ -817,9 +867,9 @@ bad: | |||
| 817 | goto err; | 867 | goto err; |
| 818 | } | 868 | } |
| 819 | 869 | ||
| 820 | if ((cert_sk=sk_new_null()) == NULL) | 870 | if ((cert_sk=sk_X509_new_null()) == NULL) |
| 821 | { | 871 | { |
| 822 | BIO_printf(bio_err,"Malloc failure\n"); | 872 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 823 | goto err; | 873 | goto err; |
| 824 | } | 874 | } |
| 825 | if (spkac_file != NULL) | 875 | if (spkac_file != NULL) |
| @@ -834,9 +884,9 @@ bad: | |||
| 834 | total_done++; | 884 | total_done++; |
| 835 | BIO_printf(bio_err,"\n"); | 885 | BIO_printf(bio_err,"\n"); |
| 836 | if (!BN_add_word(serial,1)) goto err; | 886 | if (!BN_add_word(serial,1)) goto err; |
| 837 | if (!sk_push(cert_sk,(char *)x)) | 887 | if (!sk_X509_push(cert_sk,x)) |
| 838 | { | 888 | { |
| 839 | BIO_printf(bio_err,"Malloc failure\n"); | 889 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 840 | goto err; | 890 | goto err; |
| 841 | } | 891 | } |
| 842 | if (outfile) | 892 | if (outfile) |
| @@ -858,9 +908,9 @@ bad: | |||
| 858 | total_done++; | 908 | total_done++; |
| 859 | BIO_printf(bio_err,"\n"); | 909 | BIO_printf(bio_err,"\n"); |
| 860 | if (!BN_add_word(serial,1)) goto err; | 910 | if (!BN_add_word(serial,1)) goto err; |
| 861 | if (!sk_push(cert_sk,(char *)x)) | 911 | if (!sk_X509_push(cert_sk,x)) |
| 862 | { | 912 | { |
| 863 | BIO_printf(bio_err,"Malloc failure\n"); | 913 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 864 | goto err; | 914 | goto err; |
| 865 | } | 915 | } |
| 866 | } | 916 | } |
| @@ -877,9 +927,9 @@ bad: | |||
| 877 | total_done++; | 927 | total_done++; |
| 878 | BIO_printf(bio_err,"\n"); | 928 | BIO_printf(bio_err,"\n"); |
| 879 | if (!BN_add_word(serial,1)) goto err; | 929 | if (!BN_add_word(serial,1)) goto err; |
| 880 | if (!sk_push(cert_sk,(char *)x)) | 930 | if (!sk_X509_push(cert_sk,x)) |
| 881 | { | 931 | { |
| 882 | BIO_printf(bio_err,"Malloc failure\n"); | 932 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 883 | goto err; | 933 | goto err; |
| 884 | } | 934 | } |
| 885 | } | 935 | } |
| @@ -896,9 +946,9 @@ bad: | |||
| 896 | total_done++; | 946 | total_done++; |
| 897 | BIO_printf(bio_err,"\n"); | 947 | BIO_printf(bio_err,"\n"); |
| 898 | if (!BN_add_word(serial,1)) goto err; | 948 | if (!BN_add_word(serial,1)) goto err; |
| 899 | if (!sk_push(cert_sk,(char *)x)) | 949 | if (!sk_X509_push(cert_sk,x)) |
| 900 | { | 950 | { |
| 901 | BIO_printf(bio_err,"Malloc failure\n"); | 951 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 902 | goto err; | 952 | goto err; |
| 903 | } | 953 | } |
| 904 | } | 954 | } |
| @@ -907,7 +957,7 @@ bad: | |||
| 907 | * and a data base and serial number that need | 957 | * and a data base and serial number that need |
| 908 | * updating */ | 958 | * updating */ |
| 909 | 959 | ||
| 910 | if (sk_num(cert_sk) > 0) | 960 | if (sk_X509_num(cert_sk) > 0) |
| 911 | { | 961 | { |
| 912 | if (!batch) | 962 | if (!batch) |
| 913 | { | 963 | { |
| @@ -923,7 +973,7 @@ bad: | |||
| 923 | } | 973 | } |
| 924 | } | 974 | } |
| 925 | 975 | ||
| 926 | BIO_printf(bio_err,"Write out database with %d new entries\n",sk_num(cert_sk)); | 976 | BIO_printf(bio_err,"Write out database with %d new entries\n",sk_X509_num(cert_sk)); |
| 927 | 977 | ||
| 928 | strncpy(buf[0],serialfile,BSIZE-4); | 978 | strncpy(buf[0],serialfile,BSIZE-4); |
| 929 | 979 | ||
| @@ -955,12 +1005,12 @@ bad: | |||
| 955 | 1005 | ||
| 956 | if (verbose) | 1006 | if (verbose) |
| 957 | BIO_printf(bio_err,"writing new certificates\n"); | 1007 | BIO_printf(bio_err,"writing new certificates\n"); |
| 958 | for (i=0; i<sk_num(cert_sk); i++) | 1008 | for (i=0; i<sk_X509_num(cert_sk); i++) |
| 959 | { | 1009 | { |
| 960 | int k; | 1010 | int k; |
| 961 | unsigned char *n; | 1011 | unsigned char *n; |
| 962 | 1012 | ||
| 963 | x=(X509 *)sk_value(cert_sk,i); | 1013 | x=sk_X509_value(cert_sk,i); |
| 964 | 1014 | ||
| 965 | j=x->cert_info->serialNumber->length; | 1015 | j=x->cert_info->serialNumber->length; |
| 966 | p=(char *)x->cert_info->serialNumber->data; | 1016 | p=(char *)x->cert_info->serialNumber->data; |
| @@ -999,7 +1049,7 @@ bad: | |||
| 999 | write_new_certificate(Sout,x, output_der, notext); | 1049 | write_new_certificate(Sout,x, output_der, notext); |
| 1000 | } | 1050 | } |
| 1001 | 1051 | ||
| 1002 | if (sk_num(cert_sk)) | 1052 | if (sk_X509_num(cert_sk)) |
| 1003 | { | 1053 | { |
| 1004 | /* Rename the database and the serial file */ | 1054 | /* Rename the database and the serial file */ |
| 1005 | strncpy(buf[2],serialfile,BSIZE-4); | 1055 | strncpy(buf[2],serialfile,BSIZE-4); |
| @@ -1011,7 +1061,7 @@ bad: | |||
| 1011 | #endif | 1061 | #endif |
| 1012 | 1062 | ||
| 1013 | BIO_free(in); | 1063 | BIO_free(in); |
| 1014 | BIO_free(out); | 1064 | BIO_free_all(out); |
| 1015 | in=NULL; | 1065 | in=NULL; |
| 1016 | out=NULL; | 1066 | out=NULL; |
| 1017 | if (rename(serialfile,buf[2]) < 0) | 1067 | if (rename(serialfile,buf[2]) < 0) |
| @@ -1228,12 +1278,12 @@ bad: | |||
| 1228 | ret=0; | 1278 | ret=0; |
| 1229 | err: | 1279 | err: |
| 1230 | BIO_free(hex); | 1280 | BIO_free(hex); |
| 1231 | BIO_free(Cout); | 1281 | BIO_free_all(Cout); |
| 1232 | BIO_free(Sout); | 1282 | BIO_free_all(Sout); |
| 1233 | BIO_free(out); | 1283 | BIO_free_all(out); |
| 1234 | BIO_free(in); | 1284 | BIO_free(in); |
| 1235 | 1285 | ||
| 1236 | sk_pop_free(cert_sk,X509_free); | 1286 | sk_X509_pop_free(cert_sk,X509_free); |
| 1237 | 1287 | ||
| 1238 | if (ret) ERR_print_errors(bio_err); | 1288 | if (ret) ERR_print_errors(bio_err); |
| 1239 | app_RAND_write_file(randfile, bio_err); | 1289 | app_RAND_write_file(randfile, bio_err); |
| @@ -1345,7 +1395,7 @@ static int save_serial(char *serialfile, BIGNUM *serial) | |||
| 1345 | BIO_puts(out,"\n"); | 1395 | BIO_puts(out,"\n"); |
| 1346 | ret=1; | 1396 | ret=1; |
| 1347 | err: | 1397 | err: |
| 1348 | if (out != NULL) BIO_free(out); | 1398 | if (out != NULL) BIO_free_all(out); |
| 1349 | if (ai != NULL) ASN1_INTEGER_free(ai); | 1399 | if (ai != NULL) ASN1_INTEGER_free(ai); |
| 1350 | return(ret); | 1400 | return(ret); |
| 1351 | } | 1401 | } |
| @@ -1580,7 +1630,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst, | |||
| 1580 | /* Ok, now we check the 'policy' stuff. */ | 1630 | /* Ok, now we check the 'policy' stuff. */ |
| 1581 | if ((subject=X509_NAME_new()) == NULL) | 1631 | if ((subject=X509_NAME_new()) == NULL) |
| 1582 | { | 1632 | { |
| 1583 | BIO_printf(bio_err,"Malloc failure\n"); | 1633 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 1584 | goto err; | 1634 | goto err; |
| 1585 | } | 1635 | } |
| 1586 | 1636 | ||
| @@ -1678,7 +1728,7 @@ again2: | |||
| 1678 | { | 1728 | { |
| 1679 | if (push != NULL) | 1729 | if (push != NULL) |
| 1680 | X509_NAME_ENTRY_free(push); | 1730 | X509_NAME_ENTRY_free(push); |
| 1681 | BIO_printf(bio_err,"Malloc failure\n"); | 1731 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 1682 | goto err; | 1732 | goto err; |
| 1683 | } | 1733 | } |
| 1684 | } | 1734 | } |
| @@ -1700,7 +1750,7 @@ again2: | |||
| 1700 | row[DB_serial]=BN_bn2hex(serial); | 1750 | row[DB_serial]=BN_bn2hex(serial); |
| 1701 | if ((row[DB_name] == NULL) || (row[DB_serial] == NULL)) | 1751 | if ((row[DB_name] == NULL) || (row[DB_serial] == NULL)) |
| 1702 | { | 1752 | { |
| 1703 | BIO_printf(bio_err,"Malloc failure\n"); | 1753 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 1704 | goto err; | 1754 | goto err; |
| 1705 | } | 1755 | } |
| 1706 | 1756 | ||
| @@ -1841,32 +1891,32 @@ again2: | |||
| 1841 | goto err; | 1891 | goto err; |
| 1842 | 1892 | ||
| 1843 | /* We now just add it to the database */ | 1893 | /* We now just add it to the database */ |
| 1844 | row[DB_type]=(char *)Malloc(2); | 1894 | row[DB_type]=(char *)OPENSSL_malloc(2); |
| 1845 | 1895 | ||
| 1846 | tm=X509_get_notAfter(ret); | 1896 | tm=X509_get_notAfter(ret); |
| 1847 | row[DB_exp_date]=(char *)Malloc(tm->length+1); | 1897 | row[DB_exp_date]=(char *)OPENSSL_malloc(tm->length+1); |
| 1848 | memcpy(row[DB_exp_date],tm->data,tm->length); | 1898 | memcpy(row[DB_exp_date],tm->data,tm->length); |
| 1849 | row[DB_exp_date][tm->length]='\0'; | 1899 | row[DB_exp_date][tm->length]='\0'; |
| 1850 | 1900 | ||
| 1851 | row[DB_rev_date]=NULL; | 1901 | row[DB_rev_date]=NULL; |
| 1852 | 1902 | ||
| 1853 | /* row[DB_serial] done already */ | 1903 | /* row[DB_serial] done already */ |
| 1854 | row[DB_file]=(char *)Malloc(8); | 1904 | row[DB_file]=(char *)OPENSSL_malloc(8); |
| 1855 | /* row[DB_name] done already */ | 1905 | /* row[DB_name] done already */ |
| 1856 | 1906 | ||
| 1857 | if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || | 1907 | if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || |
| 1858 | (row[DB_file] == NULL)) | 1908 | (row[DB_file] == NULL)) |
| 1859 | { | 1909 | { |
| 1860 | BIO_printf(bio_err,"Malloc failure\n"); | 1910 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 1861 | goto err; | 1911 | goto err; |
| 1862 | } | 1912 | } |
| 1863 | strcpy(row[DB_file],"unknown"); | 1913 | strcpy(row[DB_file],"unknown"); |
| 1864 | row[DB_type][0]='V'; | 1914 | row[DB_type][0]='V'; |
| 1865 | row[DB_type][1]='\0'; | 1915 | row[DB_type][1]='\0'; |
| 1866 | 1916 | ||
| 1867 | if ((irow=(char **)Malloc(sizeof(char *)*(DB_NUMBER+1))) == NULL) | 1917 | if ((irow=(char **)OPENSSL_malloc(sizeof(char *)*(DB_NUMBER+1))) == NULL) |
| 1868 | { | 1918 | { |
| 1869 | BIO_printf(bio_err,"Malloc failure\n"); | 1919 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 1870 | goto err; | 1920 | goto err; |
| 1871 | } | 1921 | } |
| 1872 | 1922 | ||
| @@ -1886,7 +1936,7 @@ again2: | |||
| 1886 | ok=1; | 1936 | ok=1; |
| 1887 | err: | 1937 | err: |
| 1888 | for (i=0; i<DB_NUMBER; i++) | 1938 | for (i=0; i<DB_NUMBER; i++) |
| 1889 | if (row[i] != NULL) Free(row[i]); | 1939 | if (row[i] != NULL) OPENSSL_free(row[i]); |
| 1890 | 1940 | ||
| 1891 | if (CAname != NULL) | 1941 | if (CAname != NULL) |
| 1892 | X509_NAME_free(CAname); | 1942 | X509_NAME_free(CAname); |
| @@ -2100,28 +2150,6 @@ static int check_time_format(char *str) | |||
| 2100 | return(ASN1_UTCTIME_check(&tm)); | 2150 | return(ASN1_UTCTIME_check(&tm)); |
| 2101 | } | 2151 | } |
| 2102 | 2152 | ||
| 2103 | static int add_oid_section(LHASH *hconf) | ||
| 2104 | { | ||
| 2105 | char *p; | ||
| 2106 | STACK_OF(CONF_VALUE) *sktmp; | ||
| 2107 | CONF_VALUE *cnf; | ||
| 2108 | int i; | ||
| 2109 | if(!(p=CONF_get_string(hconf,NULL,"oid_section"))) return 1; | ||
| 2110 | if(!(sktmp = CONF_get_section(hconf, p))) { | ||
| 2111 | BIO_printf(bio_err, "problem loading oid section %s\n", p); | ||
| 2112 | return 0; | ||
| 2113 | } | ||
| 2114 | for(i = 0; i < sk_CONF_VALUE_num(sktmp); i++) { | ||
| 2115 | cnf = sk_CONF_VALUE_value(sktmp, i); | ||
| 2116 | if(OBJ_create(cnf->value, cnf->name, cnf->name) == NID_undef) { | ||
| 2117 | BIO_printf(bio_err, "problem creating object %s=%s\n", | ||
| 2118 | cnf->name, cnf->value); | ||
| 2119 | return 0; | ||
| 2120 | } | ||
| 2121 | } | ||
| 2122 | return 1; | ||
| 2123 | } | ||
| 2124 | |||
| 2125 | static int do_revoke(X509 *x509, TXT_DB *db) | 2153 | static int do_revoke(X509 *x509, TXT_DB *db) |
| 2126 | { | 2154 | { |
| 2127 | ASN1_UTCTIME *tm=NULL, *revtm=NULL; | 2155 | ASN1_UTCTIME *tm=NULL, *revtm=NULL; |
| @@ -2137,7 +2165,7 @@ static int do_revoke(X509 *x509, TXT_DB *db) | |||
| 2137 | BN_free(bn); | 2165 | BN_free(bn); |
| 2138 | if ((row[DB_name] == NULL) || (row[DB_serial] == NULL)) | 2166 | if ((row[DB_name] == NULL) || (row[DB_serial] == NULL)) |
| 2139 | { | 2167 | { |
| 2140 | BIO_printf(bio_err,"Malloc failure\n"); | 2168 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 2141 | goto err; | 2169 | goto err; |
| 2142 | } | 2170 | } |
| 2143 | /* We have to lookup by serial number because name lookup | 2171 | /* We have to lookup by serial number because name lookup |
| @@ -2149,33 +2177,33 @@ static int do_revoke(X509 *x509, TXT_DB *db) | |||
| 2149 | BIO_printf(bio_err,"Adding Entry to DB for %s\n", row[DB_name]); | 2177 | BIO_printf(bio_err,"Adding Entry to DB for %s\n", row[DB_name]); |
| 2150 | 2178 | ||
| 2151 | /* We now just add it to the database */ | 2179 | /* We now just add it to the database */ |
| 2152 | row[DB_type]=(char *)Malloc(2); | 2180 | row[DB_type]=(char *)OPENSSL_malloc(2); |
| 2153 | 2181 | ||
| 2154 | tm=X509_get_notAfter(x509); | 2182 | tm=X509_get_notAfter(x509); |
| 2155 | row[DB_exp_date]=(char *)Malloc(tm->length+1); | 2183 | row[DB_exp_date]=(char *)OPENSSL_malloc(tm->length+1); |
| 2156 | memcpy(row[DB_exp_date],tm->data,tm->length); | 2184 | memcpy(row[DB_exp_date],tm->data,tm->length); |
| 2157 | row[DB_exp_date][tm->length]='\0'; | 2185 | row[DB_exp_date][tm->length]='\0'; |
| 2158 | 2186 | ||
| 2159 | row[DB_rev_date]=NULL; | 2187 | row[DB_rev_date]=NULL; |
| 2160 | 2188 | ||
| 2161 | /* row[DB_serial] done already */ | 2189 | /* row[DB_serial] done already */ |
| 2162 | row[DB_file]=(char *)Malloc(8); | 2190 | row[DB_file]=(char *)OPENSSL_malloc(8); |
| 2163 | 2191 | ||
| 2164 | /* row[DB_name] done already */ | 2192 | /* row[DB_name] done already */ |
| 2165 | 2193 | ||
| 2166 | if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || | 2194 | if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || |
| 2167 | (row[DB_file] == NULL)) | 2195 | (row[DB_file] == NULL)) |
| 2168 | { | 2196 | { |
| 2169 | BIO_printf(bio_err,"Malloc failure\n"); | 2197 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 2170 | goto err; | 2198 | goto err; |
| 2171 | } | 2199 | } |
| 2172 | strcpy(row[DB_file],"unknown"); | 2200 | strcpy(row[DB_file],"unknown"); |
| 2173 | row[DB_type][0]='V'; | 2201 | row[DB_type][0]='V'; |
| 2174 | row[DB_type][1]='\0'; | 2202 | row[DB_type][1]='\0'; |
| 2175 | 2203 | ||
| 2176 | if ((irow=(char **)Malloc(sizeof(char *)*(DB_NUMBER+1))) == NULL) | 2204 | if ((irow=(char **)OPENSSL_malloc(sizeof(char *)*(DB_NUMBER+1))) == NULL) |
| 2177 | { | 2205 | { |
| 2178 | BIO_printf(bio_err,"Malloc failure\n"); | 2206 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 2179 | goto err; | 2207 | goto err; |
| 2180 | } | 2208 | } |
| 2181 | 2209 | ||
| @@ -2218,7 +2246,7 @@ static int do_revoke(X509 *x509, TXT_DB *db) | |||
| 2218 | revtm=X509_gmtime_adj(revtm,0); | 2246 | revtm=X509_gmtime_adj(revtm,0); |
| 2219 | rrow[DB_type][0]='R'; | 2247 | rrow[DB_type][0]='R'; |
| 2220 | rrow[DB_type][1]='\0'; | 2248 | rrow[DB_type][1]='\0'; |
| 2221 | rrow[DB_rev_date]=(char *)Malloc(revtm->length+1); | 2249 | rrow[DB_rev_date]=(char *)OPENSSL_malloc(revtm->length+1); |
| 2222 | memcpy(rrow[DB_rev_date],revtm->data,revtm->length); | 2250 | memcpy(rrow[DB_rev_date],revtm->data,revtm->length); |
| 2223 | rrow[DB_rev_date][revtm->length]='\0'; | 2251 | rrow[DB_rev_date][revtm->length]='\0'; |
| 2224 | ASN1_UTCTIME_free(revtm); | 2252 | ASN1_UTCTIME_free(revtm); |
| @@ -2228,7 +2256,7 @@ err: | |||
| 2228 | for (i=0; i<DB_NUMBER; i++) | 2256 | for (i=0; i<DB_NUMBER; i++) |
| 2229 | { | 2257 | { |
| 2230 | if (row[i] != NULL) | 2258 | if (row[i] != NULL) |
| 2231 | Free(row[i]); | 2259 | OPENSSL_free(row[i]); |
| 2232 | } | 2260 | } |
| 2233 | return(ok); | 2261 | return(ok); |
| 2234 | } | 2262 | } |
diff --git a/src/lib/libssl/src/apps/ciphers.c b/src/lib/libssl/src/apps/ciphers.c index f8e9e7be2e..b6e2f966d8 100644 --- a/src/lib/libssl/src/apps/ciphers.c +++ b/src/lib/libssl/src/apps/ciphers.c | |||
| @@ -74,6 +74,7 @@ static char *ciphers_usage[]={ | |||
| 74 | " -v - verbose mode, a textual listing of the ciphers in SSLeay\n", | 74 | " -v - verbose mode, a textual listing of the ciphers in SSLeay\n", |
| 75 | " -ssl2 - SSL2 mode\n", | 75 | " -ssl2 - SSL2 mode\n", |
| 76 | " -ssl3 - SSL3 mode\n", | 76 | " -ssl3 - SSL3 mode\n", |
| 77 | " -tls1 - TLS1 mode\n", | ||
| 77 | NULL | 78 | NULL |
| 78 | }; | 79 | }; |
| 79 | 80 | ||
| @@ -107,6 +108,12 @@ int MAIN(int argc, char **argv) | |||
| 107 | if (bio_err == NULL) | 108 | if (bio_err == NULL) |
| 108 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 109 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
| 109 | STDout=BIO_new_fp(stdout,BIO_NOCLOSE); | 110 | STDout=BIO_new_fp(stdout,BIO_NOCLOSE); |
| 111 | #ifdef VMS | ||
| 112 | { | ||
| 113 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 114 | STDout = BIO_push(tmpbio, STDout); | ||
| 115 | } | ||
| 116 | #endif | ||
| 110 | 117 | ||
| 111 | argc--; | 118 | argc--; |
| 112 | argv++; | 119 | argv++; |
| @@ -122,6 +129,10 @@ int MAIN(int argc, char **argv) | |||
| 122 | else if (strcmp(*argv,"-ssl3") == 0) | 129 | else if (strcmp(*argv,"-ssl3") == 0) |
| 123 | meth=SSLv3_client_method(); | 130 | meth=SSLv3_client_method(); |
| 124 | #endif | 131 | #endif |
| 132 | #ifndef NO_TLS1 | ||
| 133 | else if (strcmp(*argv,"-tls1") == 0) | ||
| 134 | meth=TLSv1_client_method(); | ||
| 135 | #endif | ||
| 125 | else if ((strncmp(*argv,"-h",2) == 0) || | 136 | else if ((strncmp(*argv,"-h",2) == 0) || |
| 126 | (strcmp(*argv,"-?") == 0)) | 137 | (strcmp(*argv,"-?") == 0)) |
| 127 | { | 138 | { |
| @@ -190,7 +201,7 @@ err: | |||
| 190 | end: | 201 | end: |
| 191 | if (ctx != NULL) SSL_CTX_free(ctx); | 202 | if (ctx != NULL) SSL_CTX_free(ctx); |
| 192 | if (ssl != NULL) SSL_free(ssl); | 203 | if (ssl != NULL) SSL_free(ssl); |
| 193 | if (STDout != NULL) BIO_free(STDout); | 204 | if (STDout != NULL) BIO_free_all(STDout); |
| 194 | EXIT(ret); | 205 | EXIT(ret); |
| 195 | } | 206 | } |
| 196 | 207 | ||
diff --git a/src/lib/libssl/src/apps/crl.c b/src/lib/libssl/src/apps/crl.c index 338f46d97c..3b5725f23f 100644 --- a/src/lib/libssl/src/apps/crl.c +++ b/src/lib/libssl/src/apps/crl.c | |||
| @@ -104,6 +104,7 @@ int MAIN(int argc, char **argv) | |||
| 104 | int informat,outformat; | 104 | int informat,outformat; |
| 105 | char *infile=NULL,*outfile=NULL; | 105 | char *infile=NULL,*outfile=NULL; |
| 106 | int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0; | 106 | int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0; |
| 107 | int fingerprint = 0; | ||
| 107 | char **pp,buf[256]; | 108 | char **pp,buf[256]; |
| 108 | X509_STORE *store = NULL; | 109 | X509_STORE *store = NULL; |
| 109 | X509_STORE_CTX ctx; | 110 | X509_STORE_CTX ctx; |
| @@ -111,6 +112,7 @@ int MAIN(int argc, char **argv) | |||
| 111 | X509_OBJECT xobj; | 112 | X509_OBJECT xobj; |
| 112 | EVP_PKEY *pkey; | 113 | EVP_PKEY *pkey; |
| 113 | int do_ver = 0; | 114 | int do_ver = 0; |
| 115 | const EVP_MD *md_alg,*digest=EVP_md5(); | ||
| 114 | 116 | ||
| 115 | apps_startup(); | 117 | apps_startup(); |
| 116 | 118 | ||
| @@ -120,7 +122,15 @@ int MAIN(int argc, char **argv) | |||
| 120 | 122 | ||
| 121 | if (bio_out == NULL) | 123 | if (bio_out == NULL) |
| 122 | if ((bio_out=BIO_new(BIO_s_file())) != NULL) | 124 | if ((bio_out=BIO_new(BIO_s_file())) != NULL) |
| 125 | { | ||
| 123 | BIO_set_fp(bio_out,stdout,BIO_NOCLOSE); | 126 | BIO_set_fp(bio_out,stdout,BIO_NOCLOSE); |
| 127 | #ifdef VMS | ||
| 128 | { | ||
| 129 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 130 | bio_out = BIO_push(tmpbio, bio_out); | ||
| 131 | } | ||
| 132 | #endif | ||
| 133 | } | ||
| 124 | 134 | ||
| 125 | informat=FORMAT_PEM; | 135 | informat=FORMAT_PEM; |
| 126 | outformat=FORMAT_PEM; | 136 | outformat=FORMAT_PEM; |
| @@ -183,6 +193,13 @@ int MAIN(int argc, char **argv) | |||
| 183 | nextupdate= ++num; | 193 | nextupdate= ++num; |
| 184 | else if (strcmp(*argv,"-noout") == 0) | 194 | else if (strcmp(*argv,"-noout") == 0) |
| 185 | noout= ++num; | 195 | noout= ++num; |
| 196 | else if (strcmp(*argv,"-fingerprint") == 0) | ||
| 197 | fingerprint= ++num; | ||
| 198 | else if ((md_alg=EVP_get_digestbyname(*argv + 1))) | ||
| 199 | { | ||
| 200 | /* ok */ | ||
| 201 | digest=md_alg; | ||
| 202 | } | ||
| 186 | else | 203 | else |
| 187 | { | 204 | { |
| 188 | BIO_printf(bio_err,"unknown option %s\n",*argv); | 205 | BIO_printf(bio_err,"unknown option %s\n",*argv); |
| @@ -274,6 +291,26 @@ bad: | |||
| 274 | BIO_printf(bio_out,"NONE"); | 291 | BIO_printf(bio_out,"NONE"); |
| 275 | BIO_printf(bio_out,"\n"); | 292 | BIO_printf(bio_out,"\n"); |
| 276 | } | 293 | } |
| 294 | if (fingerprint == i) | ||
| 295 | { | ||
| 296 | int j; | ||
| 297 | unsigned int n; | ||
| 298 | unsigned char md[EVP_MAX_MD_SIZE]; | ||
| 299 | |||
| 300 | if (!X509_CRL_digest(x,digest,md,&n)) | ||
| 301 | { | ||
| 302 | BIO_printf(bio_err,"out of memory\n"); | ||
| 303 | goto end; | ||
| 304 | } | ||
| 305 | BIO_printf(bio_out,"%s Fingerprint=", | ||
| 306 | OBJ_nid2sn(EVP_MD_type(digest))); | ||
| 307 | for (j=0; j<(int)n; j++) | ||
| 308 | { | ||
| 309 | BIO_printf(bio_out,"%02X%c",md[j], | ||
| 310 | (j+1 == (int)n) | ||
| 311 | ?'\n':':'); | ||
| 312 | } | ||
| 313 | } | ||
| 277 | } | 314 | } |
| 278 | } | 315 | } |
| 279 | 316 | ||
| @@ -285,7 +322,15 @@ bad: | |||
| 285 | } | 322 | } |
| 286 | 323 | ||
| 287 | if (outfile == NULL) | 324 | if (outfile == NULL) |
| 325 | { | ||
| 288 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 326 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 327 | #ifdef VMS | ||
| 328 | { | ||
| 329 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 330 | out = BIO_push(tmpbio, out); | ||
| 331 | } | ||
| 332 | #endif | ||
| 333 | } | ||
| 289 | else | 334 | else |
| 290 | { | 335 | { |
| 291 | if (BIO_write_filename(out,outfile) <= 0) | 336 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -311,8 +356,8 @@ bad: | |||
| 311 | if (!i) { BIO_printf(bio_err,"unable to write CRL\n"); goto end; } | 356 | if (!i) { BIO_printf(bio_err,"unable to write CRL\n"); goto end; } |
| 312 | ret=0; | 357 | ret=0; |
| 313 | end: | 358 | end: |
| 314 | BIO_free(out); | 359 | BIO_free_all(out); |
| 315 | BIO_free(bio_out); | 360 | BIO_free_all(bio_out); |
| 316 | bio_out=NULL; | 361 | bio_out=NULL; |
| 317 | X509_CRL_free(x); | 362 | X509_CRL_free(x); |
| 318 | if(store) { | 363 | if(store) { |
diff --git a/src/lib/libssl/src/apps/crl2p7.c b/src/lib/libssl/src/apps/crl2p7.c index 4056591676..7f853b65ab 100644 --- a/src/lib/libssl/src/apps/crl2p7.c +++ b/src/lib/libssl/src/apps/crl2p7.c | |||
| @@ -141,7 +141,7 @@ int MAIN(int argc, char **argv) | |||
| 141 | else if (strcmp(*argv,"-certfile") == 0) | 141 | else if (strcmp(*argv,"-certfile") == 0) |
| 142 | { | 142 | { |
| 143 | if (--argc < 1) goto bad; | 143 | if (--argc < 1) goto bad; |
| 144 | if(!certflst) certflst = sk_new(NULL); | 144 | if(!certflst) certflst = sk_new_null(); |
| 145 | sk_push(certflst,*(++argv)); | 145 | sk_push(certflst,*(++argv)); |
| 146 | } | 146 | } |
| 147 | else | 147 | else |
| @@ -215,15 +215,15 @@ bad: | |||
| 215 | p7s->contents->type=OBJ_nid2obj(NID_pkcs7_data); | 215 | p7s->contents->type=OBJ_nid2obj(NID_pkcs7_data); |
| 216 | 216 | ||
| 217 | if (!ASN1_INTEGER_set(p7s->version,1)) goto end; | 217 | if (!ASN1_INTEGER_set(p7s->version,1)) goto end; |
| 218 | if ((crl_stack=sk_X509_CRL_new(NULL)) == NULL) goto end; | 218 | if ((crl_stack=sk_X509_CRL_new_null()) == NULL) goto end; |
| 219 | p7s->crl=crl_stack; | 219 | p7s->crl=crl_stack; |
| 220 | if (crl != NULL) | 220 | if (crl != NULL) |
| 221 | { | 221 | { |
| 222 | sk_X509_CRL_push(crl_stack,crl); | 222 | sk_X509_CRL_push(crl_stack,crl); |
| 223 | crl=NULL; /* now part of p7 for Freeing */ | 223 | crl=NULL; /* now part of p7 for OPENSSL_freeing */ |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | if ((cert_stack=sk_X509_new(NULL)) == NULL) goto end; | 226 | if ((cert_stack=sk_X509_new_null()) == NULL) goto end; |
| 227 | p7s->cert=cert_stack; | 227 | p7s->cert=cert_stack; |
| 228 | 228 | ||
| 229 | if(certflst) for(i = 0; i < sk_num(certflst); i++) { | 229 | if(certflst) for(i = 0; i < sk_num(certflst); i++) { |
| @@ -239,7 +239,15 @@ bad: | |||
| 239 | sk_free(certflst); | 239 | sk_free(certflst); |
| 240 | 240 | ||
| 241 | if (outfile == NULL) | 241 | if (outfile == NULL) |
| 242 | { | ||
| 242 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 243 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 244 | #ifdef VMS | ||
| 245 | { | ||
| 246 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 247 | out = BIO_push(tmpbio, out); | ||
| 248 | } | ||
| 249 | #endif | ||
| 250 | } | ||
| 243 | else | 251 | else |
| 244 | { | 252 | { |
| 245 | if (BIO_write_filename(out,outfile) <= 0) | 253 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -266,7 +274,7 @@ bad: | |||
| 266 | ret=0; | 274 | ret=0; |
| 267 | end: | 275 | end: |
| 268 | if (in != NULL) BIO_free(in); | 276 | if (in != NULL) BIO_free(in); |
| 269 | if (out != NULL) BIO_free(out); | 277 | if (out != NULL) BIO_free_all(out); |
| 270 | if (p7 != NULL) PKCS7_free(p7); | 278 | if (p7 != NULL) PKCS7_free(p7); |
| 271 | if (crl != NULL) X509_CRL_free(crl); | 279 | if (crl != NULL) X509_CRL_free(crl); |
| 272 | 280 | ||
| @@ -327,7 +335,7 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile) | |||
| 327 | 335 | ||
| 328 | ret=count; | 336 | ret=count; |
| 329 | end: | 337 | end: |
| 330 | /* never need to Free x */ | 338 | /* never need to OPENSSL_free x */ |
| 331 | if (in != NULL) BIO_free(in); | 339 | if (in != NULL) BIO_free(in); |
| 332 | if (sk != NULL) sk_X509_INFO_free(sk); | 340 | if (sk != NULL) sk_X509_INFO_free(sk); |
| 333 | return(ret); | 341 | return(ret); |
diff --git a/src/lib/libssl/src/apps/dgst.c b/src/lib/libssl/src/apps/dgst.c index 1b56d6ef44..ab3e2dbb02 100644 --- a/src/lib/libssl/src/apps/dgst.c +++ b/src/lib/libssl/src/apps/dgst.c | |||
| @@ -66,6 +66,7 @@ | |||
| 66 | #include <openssl/objects.h> | 66 | #include <openssl/objects.h> |
| 67 | #include <openssl/x509.h> | 67 | #include <openssl/x509.h> |
| 68 | #include <openssl/pem.h> | 68 | #include <openssl/pem.h> |
| 69 | #include <openssl/engine.h> | ||
| 69 | 70 | ||
| 70 | #undef BUFSIZE | 71 | #undef BUFSIZE |
| 71 | #define BUFSIZE 1024*8 | 72 | #define BUFSIZE 1024*8 |
| @@ -73,26 +74,36 @@ | |||
| 73 | #undef PROG | 74 | #undef PROG |
| 74 | #define PROG dgst_main | 75 | #define PROG dgst_main |
| 75 | 76 | ||
| 76 | void do_fp(unsigned char *buf,BIO *f,int sep); | 77 | void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, char binout, |
| 78 | EVP_PKEY *key, unsigned char *sigin, int siglen); | ||
| 77 | 79 | ||
| 78 | int MAIN(int, char **); | 80 | int MAIN(int, char **); |
| 79 | 81 | ||
| 80 | int MAIN(int argc, char **argv) | 82 | int MAIN(int argc, char **argv) |
| 81 | { | 83 | { |
| 84 | ENGINE *e = NULL; | ||
| 82 | unsigned char *buf=NULL; | 85 | unsigned char *buf=NULL; |
| 83 | int i,err=0; | 86 | int i,err=0; |
| 84 | const EVP_MD *md=NULL,*m; | 87 | const EVP_MD *md=NULL,*m; |
| 85 | BIO *in=NULL,*inp; | 88 | BIO *in=NULL,*inp; |
| 86 | BIO *bmd=NULL; | 89 | BIO *bmd=NULL; |
| 90 | BIO *out = NULL; | ||
| 87 | const char *name; | 91 | const char *name; |
| 88 | #define PROG_NAME_SIZE 16 | 92 | #define PROG_NAME_SIZE 16 |
| 89 | char pname[PROG_NAME_SIZE]; | 93 | char pname[PROG_NAME_SIZE]; |
| 90 | int separator=0; | 94 | int separator=0; |
| 91 | int debug=0; | 95 | int debug=0; |
| 96 | const char *outfile = NULL, *keyfile = NULL; | ||
| 97 | const char *sigfile = NULL, *randfile = NULL; | ||
| 98 | char out_bin = -1, want_pub = 0, do_verify = 0; | ||
| 99 | EVP_PKEY *sigkey = NULL; | ||
| 100 | unsigned char *sigbuf = NULL; | ||
| 101 | int siglen = 0; | ||
| 102 | char *engine=NULL; | ||
| 92 | 103 | ||
| 93 | apps_startup(); | 104 | apps_startup(); |
| 94 | 105 | ||
| 95 | if ((buf=(unsigned char *)Malloc(BUFSIZE)) == NULL) | 106 | if ((buf=(unsigned char *)OPENSSL_malloc(BUFSIZE)) == NULL) |
| 96 | { | 107 | { |
| 97 | BIO_printf(bio_err,"out of memory\n"); | 108 | BIO_printf(bio_err,"out of memory\n"); |
| 98 | goto end; | 109 | goto end; |
| @@ -113,6 +124,48 @@ int MAIN(int argc, char **argv) | |||
| 113 | if ((*argv)[0] != '-') break; | 124 | if ((*argv)[0] != '-') break; |
| 114 | if (strcmp(*argv,"-c") == 0) | 125 | if (strcmp(*argv,"-c") == 0) |
| 115 | separator=1; | 126 | separator=1; |
| 127 | else if (strcmp(*argv,"-rand") == 0) | ||
| 128 | { | ||
| 129 | if (--argc < 1) break; | ||
| 130 | randfile=*(++argv); | ||
| 131 | } | ||
| 132 | else if (strcmp(*argv,"-out") == 0) | ||
| 133 | { | ||
| 134 | if (--argc < 1) break; | ||
| 135 | outfile=*(++argv); | ||
| 136 | } | ||
| 137 | else if (strcmp(*argv,"-sign") == 0) | ||
| 138 | { | ||
| 139 | if (--argc < 1) break; | ||
| 140 | keyfile=*(++argv); | ||
| 141 | } | ||
| 142 | else if (strcmp(*argv,"-verify") == 0) | ||
| 143 | { | ||
| 144 | if (--argc < 1) break; | ||
| 145 | keyfile=*(++argv); | ||
| 146 | want_pub = 1; | ||
| 147 | do_verify = 1; | ||
| 148 | } | ||
| 149 | else if (strcmp(*argv,"-prverify") == 0) | ||
| 150 | { | ||
| 151 | if (--argc < 1) break; | ||
| 152 | keyfile=*(++argv); | ||
| 153 | do_verify = 1; | ||
| 154 | } | ||
| 155 | else if (strcmp(*argv,"-signature") == 0) | ||
| 156 | { | ||
| 157 | if (--argc < 1) break; | ||
| 158 | sigfile=*(++argv); | ||
| 159 | } | ||
| 160 | else if (strcmp(*argv,"-engine") == 0) | ||
| 161 | { | ||
| 162 | if (--argc < 1) break; | ||
| 163 | engine= *(++argv); | ||
| 164 | } | ||
| 165 | else if (strcmp(*argv,"-hex") == 0) | ||
| 166 | out_bin = 0; | ||
| 167 | else if (strcmp(*argv,"-binary") == 0) | ||
| 168 | out_bin = 1; | ||
| 116 | else if (strcmp(*argv,"-d") == 0) | 169 | else if (strcmp(*argv,"-d") == 0) |
| 117 | debug=1; | 170 | debug=1; |
| 118 | else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL) | 171 | else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL) |
| @@ -126,15 +179,32 @@ int MAIN(int argc, char **argv) | |||
| 126 | if (md == NULL) | 179 | if (md == NULL) |
| 127 | md=EVP_md5(); | 180 | md=EVP_md5(); |
| 128 | 181 | ||
| 182 | if(do_verify && !sigfile) { | ||
| 183 | BIO_printf(bio_err, "No signature to verify: use the -signature option\n"); | ||
| 184 | err = 1; | ||
| 185 | goto end; | ||
| 186 | } | ||
| 187 | |||
| 129 | if ((argc > 0) && (argv[0][0] == '-')) /* bad option */ | 188 | if ((argc > 0) && (argv[0][0] == '-')) /* bad option */ |
| 130 | { | 189 | { |
| 131 | BIO_printf(bio_err,"unknown option '%s'\n",*argv); | 190 | BIO_printf(bio_err,"unknown option '%s'\n",*argv); |
| 132 | BIO_printf(bio_err,"options are\n"); | 191 | BIO_printf(bio_err,"options are\n"); |
| 133 | BIO_printf(bio_err,"-c to output the digest with separating colons\n"); | 192 | BIO_printf(bio_err,"-c to output the digest with separating colons\n"); |
| 134 | BIO_printf(bio_err,"-d to output debug info\n"); | 193 | BIO_printf(bio_err,"-d to output debug info\n"); |
| 194 | BIO_printf(bio_err,"-hex output as hex dump\n"); | ||
| 195 | BIO_printf(bio_err,"-binary output in binary form\n"); | ||
| 196 | BIO_printf(bio_err,"-sign file sign digest using private key in file\n"); | ||
| 197 | BIO_printf(bio_err,"-verify file verify a signature using public key in file\n"); | ||
| 198 | BIO_printf(bio_err,"-prverify file verify a signature using private key in file\n"); | ||
| 199 | BIO_printf(bio_err,"-signature file signature to verify\n"); | ||
| 200 | BIO_printf(bio_err,"-binary output in binary form\n"); | ||
| 201 | BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n"); | ||
| 202 | |||
| 135 | BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n", | 203 | BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n", |
| 136 | LN_md5,LN_md5); | 204 | LN_md5,LN_md5); |
| 137 | BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n", | 205 | BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n", |
| 206 | LN_md4,LN_md4); | ||
| 207 | BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n", | ||
| 138 | LN_md2,LN_md2); | 208 | LN_md2,LN_md2); |
| 139 | BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n", | 209 | BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n", |
| 140 | LN_sha1,LN_sha1); | 210 | LN_sha1,LN_sha1); |
| @@ -147,7 +217,25 @@ int MAIN(int argc, char **argv) | |||
| 147 | err=1; | 217 | err=1; |
| 148 | goto end; | 218 | goto end; |
| 149 | } | 219 | } |
| 150 | 220 | ||
| 221 | if (engine != NULL) | ||
| 222 | { | ||
| 223 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 224 | { | ||
| 225 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 226 | engine); | ||
| 227 | goto end; | ||
| 228 | } | ||
| 229 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 230 | { | ||
| 231 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 232 | goto end; | ||
| 233 | } | ||
| 234 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 235 | /* Free our "structural" reference. */ | ||
| 236 | ENGINE_free(e); | ||
| 237 | } | ||
| 238 | |||
| 151 | in=BIO_new(BIO_s_file()); | 239 | in=BIO_new(BIO_s_file()); |
| 152 | bmd=BIO_new(BIO_f_md()); | 240 | bmd=BIO_new(BIO_f_md()); |
| 153 | if (debug) | 241 | if (debug) |
| @@ -163,6 +251,80 @@ int MAIN(int argc, char **argv) | |||
| 163 | goto end; | 251 | goto end; |
| 164 | } | 252 | } |
| 165 | 253 | ||
| 254 | if(out_bin == -1) { | ||
| 255 | if(keyfile) out_bin = 1; | ||
| 256 | else out_bin = 0; | ||
| 257 | } | ||
| 258 | |||
| 259 | if(randfile) | ||
| 260 | app_RAND_load_file(randfile, bio_err, 0); | ||
| 261 | |||
| 262 | if(outfile) { | ||
| 263 | if(out_bin) | ||
| 264 | out = BIO_new_file(outfile, "wb"); | ||
| 265 | else out = BIO_new_file(outfile, "w"); | ||
| 266 | } else { | ||
| 267 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 268 | #ifdef VMS | ||
| 269 | { | ||
| 270 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 271 | out = BIO_push(tmpbio, out); | ||
| 272 | } | ||
| 273 | #endif | ||
| 274 | } | ||
| 275 | |||
| 276 | if(!out) { | ||
| 277 | BIO_printf(bio_err, "Error opening output file %s\n", | ||
| 278 | outfile ? outfile : "(stdout)"); | ||
| 279 | ERR_print_errors(bio_err); | ||
| 280 | goto end; | ||
| 281 | } | ||
| 282 | |||
| 283 | if(keyfile) { | ||
| 284 | BIO *keybio; | ||
| 285 | keybio = BIO_new_file(keyfile, "r"); | ||
| 286 | if(!keybio) { | ||
| 287 | BIO_printf(bio_err, "Error opening key file %s\n", | ||
| 288 | keyfile); | ||
| 289 | ERR_print_errors(bio_err); | ||
| 290 | goto end; | ||
| 291 | } | ||
| 292 | |||
| 293 | if(want_pub) | ||
| 294 | sigkey = PEM_read_bio_PUBKEY(keybio, NULL, NULL, NULL); | ||
| 295 | else sigkey = PEM_read_bio_PrivateKey(keybio, NULL, NULL, NULL); | ||
| 296 | BIO_free(keybio); | ||
| 297 | if(!sigkey) { | ||
| 298 | BIO_printf(bio_err, "Error reading key file %s\n", | ||
| 299 | keyfile); | ||
| 300 | ERR_print_errors(bio_err); | ||
| 301 | goto end; | ||
| 302 | } | ||
| 303 | } | ||
| 304 | |||
| 305 | if(sigfile && sigkey) { | ||
| 306 | BIO *sigbio; | ||
| 307 | sigbio = BIO_new_file(sigfile, "rb"); | ||
| 308 | siglen = EVP_PKEY_size(sigkey); | ||
| 309 | sigbuf = OPENSSL_malloc(siglen); | ||
| 310 | if(!sigbio) { | ||
| 311 | BIO_printf(bio_err, "Error opening signature file %s\n", | ||
| 312 | sigfile); | ||
| 313 | ERR_print_errors(bio_err); | ||
| 314 | goto end; | ||
| 315 | } | ||
| 316 | siglen = BIO_read(sigbio, sigbuf, siglen); | ||
| 317 | BIO_free(sigbio); | ||
| 318 | if(siglen <= 0) { | ||
| 319 | BIO_printf(bio_err, "Error reading signature file %s\n", | ||
| 320 | sigfile); | ||
| 321 | ERR_print_errors(bio_err); | ||
| 322 | goto end; | ||
| 323 | } | ||
| 324 | } | ||
| 325 | |||
| 326 | |||
| 327 | |||
| 166 | /* we use md as a filter, reading from 'in' */ | 328 | /* we use md as a filter, reading from 'in' */ |
| 167 | BIO_set_md(bmd,md); | 329 | BIO_set_md(bmd,md); |
| 168 | inp=BIO_push(bmd,in); | 330 | inp=BIO_push(bmd,in); |
| @@ -170,7 +332,7 @@ int MAIN(int argc, char **argv) | |||
| 170 | if (argc == 0) | 332 | if (argc == 0) |
| 171 | { | 333 | { |
| 172 | BIO_set_fp(in,stdin,BIO_NOCLOSE); | 334 | BIO_set_fp(in,stdin,BIO_NOCLOSE); |
| 173 | do_fp(buf,inp,separator); | 335 | do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf, siglen); |
| 174 | } | 336 | } |
| 175 | else | 337 | else |
| 176 | { | 338 | { |
| @@ -183,8 +345,9 @@ int MAIN(int argc, char **argv) | |||
| 183 | err++; | 345 | err++; |
| 184 | continue; | 346 | continue; |
| 185 | } | 347 | } |
| 186 | printf("%s(%s)= ",name,argv[i]); | 348 | if(!out_bin) BIO_printf(out, "%s(%s)= ",name,argv[i]); |
| 187 | do_fp(buf,inp,separator); | 349 | do_fp(out, buf,inp,separator, out_bin, sigkey, |
| 350 | sigbuf, siglen); | ||
| 188 | (void)BIO_reset(bmd); | 351 | (void)BIO_reset(bmd); |
| 189 | } | 352 | } |
| 190 | } | 353 | } |
| @@ -192,14 +355,18 @@ end: | |||
| 192 | if (buf != NULL) | 355 | if (buf != NULL) |
| 193 | { | 356 | { |
| 194 | memset(buf,0,BUFSIZE); | 357 | memset(buf,0,BUFSIZE); |
| 195 | Free(buf); | 358 | OPENSSL_free(buf); |
| 196 | } | 359 | } |
| 197 | if (in != NULL) BIO_free(in); | 360 | if (in != NULL) BIO_free(in); |
| 361 | BIO_free_all(out); | ||
| 362 | EVP_PKEY_free(sigkey); | ||
| 363 | if(sigbuf) OPENSSL_free(sigbuf); | ||
| 198 | if (bmd != NULL) BIO_free(bmd); | 364 | if (bmd != NULL) BIO_free(bmd); |
| 199 | EXIT(err); | 365 | EXIT(err); |
| 200 | } | 366 | } |
| 201 | 367 | ||
| 202 | void do_fp(unsigned char *buf, BIO *bp, int sep) | 368 | void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, char binout, |
| 369 | EVP_PKEY *key, unsigned char *sigin, int siglen) | ||
| 203 | { | 370 | { |
| 204 | int len; | 371 | int len; |
| 205 | int i; | 372 | int i; |
| @@ -209,14 +376,44 @@ void do_fp(unsigned char *buf, BIO *bp, int sep) | |||
| 209 | i=BIO_read(bp,(char *)buf,BUFSIZE); | 376 | i=BIO_read(bp,(char *)buf,BUFSIZE); |
| 210 | if (i <= 0) break; | 377 | if (i <= 0) break; |
| 211 | } | 378 | } |
| 212 | len=BIO_gets(bp,(char *)buf,BUFSIZE); | 379 | if(sigin) |
| 380 | { | ||
| 381 | EVP_MD_CTX *ctx; | ||
| 382 | BIO_get_md_ctx(bp, &ctx); | ||
| 383 | i = EVP_VerifyFinal(ctx, sigin, (unsigned int)siglen, key); | ||
| 384 | if(i > 0) BIO_printf(out, "Verified OK\n"); | ||
| 385 | else if(i == 0) BIO_printf(out, "Verification Failure\n"); | ||
| 386 | else | ||
| 387 | { | ||
| 388 | BIO_printf(bio_err, "Error Verifying Data\n"); | ||
| 389 | ERR_print_errors(bio_err); | ||
| 390 | } | ||
| 391 | return; | ||
| 392 | } | ||
| 393 | if(key) | ||
| 394 | { | ||
| 395 | EVP_MD_CTX *ctx; | ||
| 396 | BIO_get_md_ctx(bp, &ctx); | ||
| 397 | if(!EVP_SignFinal(ctx, buf, (unsigned int *)&len, key)) | ||
| 398 | { | ||
| 399 | BIO_printf(bio_err, "Error Signing Data\n"); | ||
| 400 | ERR_print_errors(bio_err); | ||
| 401 | return; | ||
| 402 | } | ||
| 403 | } | ||
| 404 | else | ||
| 405 | len=BIO_gets(bp,(char *)buf,BUFSIZE); | ||
| 213 | 406 | ||
| 214 | for (i=0; i<len; i++) | 407 | if(binout) BIO_write(out, buf, len); |
| 408 | else | ||
| 215 | { | 409 | { |
| 216 | if (sep && (i != 0)) | 410 | for (i=0; i<len; i++) |
| 217 | putc(':',stdout); | 411 | { |
| 218 | printf("%02x",buf[i]); | 412 | if (sep && (i != 0)) |
| 413 | BIO_printf(out, ":"); | ||
| 414 | BIO_printf(out, "%02x",buf[i]); | ||
| 415 | } | ||
| 416 | BIO_printf(out, "\n"); | ||
| 219 | } | 417 | } |
| 220 | printf("\n"); | ||
| 221 | } | 418 | } |
| 222 | 419 | ||
diff --git a/src/lib/libssl/src/apps/dh.c b/src/lib/libssl/src/apps/dh.c index 674963f81a..229ba2f63a 100644 --- a/src/lib/libssl/src/apps/dh.c +++ b/src/lib/libssl/src/apps/dh.c | |||
| @@ -69,6 +69,7 @@ | |||
| 69 | #include <openssl/dh.h> | 69 | #include <openssl/dh.h> |
| 70 | #include <openssl/x509.h> | 70 | #include <openssl/x509.h> |
| 71 | #include <openssl/pem.h> | 71 | #include <openssl/pem.h> |
| 72 | #include <openssl/engine.h> | ||
| 72 | 73 | ||
| 73 | #undef PROG | 74 | #undef PROG |
| 74 | #define PROG dh_main | 75 | #define PROG dh_main |
| @@ -87,11 +88,12 @@ int MAIN(int, char **); | |||
| 87 | 88 | ||
| 88 | int MAIN(int argc, char **argv) | 89 | int MAIN(int argc, char **argv) |
| 89 | { | 90 | { |
| 91 | ENGINE *e = NULL; | ||
| 90 | DH *dh=NULL; | 92 | DH *dh=NULL; |
| 91 | int i,badops=0,text=0; | 93 | int i,badops=0,text=0; |
| 92 | BIO *in=NULL,*out=NULL; | 94 | BIO *in=NULL,*out=NULL; |
| 93 | int informat,outformat,check=0,noout=0,C=0,ret=1; | 95 | int informat,outformat,check=0,noout=0,C=0,ret=1; |
| 94 | char *infile,*outfile,*prog; | 96 | char *infile,*outfile,*prog,*engine; |
| 95 | 97 | ||
| 96 | apps_startup(); | 98 | apps_startup(); |
| 97 | 99 | ||
| @@ -99,6 +101,7 @@ int MAIN(int argc, char **argv) | |||
| 99 | if ((bio_err=BIO_new(BIO_s_file())) != NULL) | 101 | if ((bio_err=BIO_new(BIO_s_file())) != NULL) |
| 100 | BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); | 102 | BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); |
| 101 | 103 | ||
| 104 | engine=NULL; | ||
| 102 | infile=NULL; | 105 | infile=NULL; |
| 103 | outfile=NULL; | 106 | outfile=NULL; |
| 104 | informat=FORMAT_PEM; | 107 | informat=FORMAT_PEM; |
| @@ -129,6 +132,11 @@ int MAIN(int argc, char **argv) | |||
| 129 | if (--argc < 1) goto bad; | 132 | if (--argc < 1) goto bad; |
| 130 | outfile= *(++argv); | 133 | outfile= *(++argv); |
| 131 | } | 134 | } |
| 135 | else if (strcmp(*argv,"-engine") == 0) | ||
| 136 | { | ||
| 137 | if (--argc < 1) goto bad; | ||
| 138 | engine= *(++argv); | ||
| 139 | } | ||
| 132 | else if (strcmp(*argv,"-check") == 0) | 140 | else if (strcmp(*argv,"-check") == 0) |
| 133 | check=1; | 141 | check=1; |
| 134 | else if (strcmp(*argv,"-text") == 0) | 142 | else if (strcmp(*argv,"-text") == 0) |
| @@ -160,11 +168,30 @@ bad: | |||
| 160 | BIO_printf(bio_err," -text print a text form of the DH parameters\n"); | 168 | BIO_printf(bio_err," -text print a text form of the DH parameters\n"); |
| 161 | BIO_printf(bio_err," -C Output C code\n"); | 169 | BIO_printf(bio_err," -C Output C code\n"); |
| 162 | BIO_printf(bio_err," -noout no output\n"); | 170 | BIO_printf(bio_err," -noout no output\n"); |
| 171 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 163 | goto end; | 172 | goto end; |
| 164 | } | 173 | } |
| 165 | 174 | ||
| 166 | ERR_load_crypto_strings(); | 175 | ERR_load_crypto_strings(); |
| 167 | 176 | ||
| 177 | if (engine != NULL) | ||
| 178 | { | ||
| 179 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 180 | { | ||
| 181 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 182 | engine); | ||
| 183 | goto end; | ||
| 184 | } | ||
| 185 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 186 | { | ||
| 187 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 188 | goto end; | ||
| 189 | } | ||
| 190 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 191 | /* Free our "structural" reference. */ | ||
| 192 | ENGINE_free(e); | ||
| 193 | } | ||
| 194 | |||
| 168 | in=BIO_new(BIO_s_file()); | 195 | in=BIO_new(BIO_s_file()); |
| 169 | out=BIO_new(BIO_s_file()); | 196 | out=BIO_new(BIO_s_file()); |
| 170 | if ((in == NULL) || (out == NULL)) | 197 | if ((in == NULL) || (out == NULL)) |
| @@ -184,7 +211,15 @@ bad: | |||
| 184 | } | 211 | } |
| 185 | } | 212 | } |
| 186 | if (outfile == NULL) | 213 | if (outfile == NULL) |
| 214 | { | ||
| 187 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 215 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 216 | #ifdef VMS | ||
| 217 | { | ||
| 218 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 219 | out = BIO_push(tmpbio, out); | ||
| 220 | } | ||
| 221 | #endif | ||
| 222 | } | ||
| 188 | else | 223 | else |
| 189 | { | 224 | { |
| 190 | if (BIO_write_filename(out,outfile) <= 0) | 225 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -251,10 +286,10 @@ bad: | |||
| 251 | 286 | ||
| 252 | len=BN_num_bytes(dh->p); | 287 | len=BN_num_bytes(dh->p); |
| 253 | bits=BN_num_bits(dh->p); | 288 | bits=BN_num_bits(dh->p); |
| 254 | data=(unsigned char *)Malloc(len); | 289 | data=(unsigned char *)OPENSSL_malloc(len); |
| 255 | if (data == NULL) | 290 | if (data == NULL) |
| 256 | { | 291 | { |
| 257 | perror("Malloc"); | 292 | perror("OPENSSL_malloc"); |
| 258 | goto end; | 293 | goto end; |
| 259 | } | 294 | } |
| 260 | l=BN_bn2bin(dh->p,data); | 295 | l=BN_bn2bin(dh->p,data); |
| @@ -285,7 +320,7 @@ bad: | |||
| 285 | printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n"); | 320 | printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n"); |
| 286 | printf("\t\treturn(NULL);\n"); | 321 | printf("\t\treturn(NULL);\n"); |
| 287 | printf("\treturn(dh);\n\t}\n"); | 322 | printf("\treturn(dh);\n\t}\n"); |
| 288 | Free(data); | 323 | OPENSSL_free(data); |
| 289 | } | 324 | } |
| 290 | 325 | ||
| 291 | 326 | ||
| @@ -309,7 +344,7 @@ bad: | |||
| 309 | ret=0; | 344 | ret=0; |
| 310 | end: | 345 | end: |
| 311 | if (in != NULL) BIO_free(in); | 346 | if (in != NULL) BIO_free(in); |
| 312 | if (out != NULL) BIO_free(out); | 347 | if (out != NULL) BIO_free_all(out); |
| 313 | if (dh != NULL) DH_free(dh); | 348 | if (dh != NULL) DH_free(dh); |
| 314 | EXIT(ret); | 349 | EXIT(ret); |
| 315 | } | 350 | } |
diff --git a/src/lib/libssl/src/apps/dh1024.pem b/src/lib/libssl/src/apps/dh1024.pem index 81d43f6a3e..6eaeca9b8e 100644 --- a/src/lib/libssl/src/apps/dh1024.pem +++ b/src/lib/libssl/src/apps/dh1024.pem | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | -----BEGIN DH PARAMETERS----- | 1 | -----BEGIN DH PARAMETERS----- |
| 2 | MIGHAoGBAJf2QmHKtQXdKCjhPx1ottPb0PMTBH9A6FbaWMsTuKG/K3g6TG1Z1fkq | 2 | MIGHAoGBAPSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kjwEPwpVsY |
| 3 | /Gz/PWk/eLI9TzFgqVAuPvr3q14a1aZeVUMTgo2oO5/y2UHe6VaJ+trqCTat3xlx | 3 | jY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6 |
| 4 | /mNbIK9HA2RgPC3gWfVLZQrY+gz3ASHHR5nXWHEyvpuZm7m3h+irAgEC | 4 | ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpL3jHAgEC |
| 5 | -----END DH PARAMETERS----- | 5 | -----END DH PARAMETERS----- |
| 6 | |||
| 7 | These are the 1024 bit DH parameters from "Assigned Number for SKIP Protocols" | ||
| 8 | (http://www.skip-vpn.org/spec/numbers.html). | ||
| 9 | See there for how they were generated. | ||
| 10 | Note that g is not a generator, but this is not a problem since p is a safe prime. | ||
diff --git a/src/lib/libssl/src/apps/dh2048.pem b/src/lib/libssl/src/apps/dh2048.pem new file mode 100644 index 0000000000..dcd0b8d01b --- /dev/null +++ b/src/lib/libssl/src/apps/dh2048.pem | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | -----BEGIN DH PARAMETERS----- | ||
| 2 | MIIBCAKCAQEA9kJXtwh/CBdyorrWqULzBej5UxE5T7bxbrlLOCDaAadWoxTpj0BV | ||
| 3 | 89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N286Z4VeSWc39uK50 | ||
| 4 | T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/RgBYK+X0iP1YTknb | ||
| 5 | zSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2Ou1WMuF040zT9fBdX | ||
| 6 | Q6MdGGzeMyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqVDNmWn6vQClCbAkbT | ||
| 7 | CD1mpF1Bn5x8vYlLIhkmuquiXsNV6TILOwIBAg== | ||
| 8 | -----END DH PARAMETERS----- | ||
| 9 | |||
| 10 | These are the 2048 bit DH parameters from "Assigned Number for SKIP Protocols" | ||
| 11 | (http://www.skip-vpn.org/spec/numbers.html). | ||
| 12 | See there for how they were generated. | ||
diff --git a/src/lib/libssl/src/apps/dh4096.pem b/src/lib/libssl/src/apps/dh4096.pem new file mode 100644 index 0000000000..1b35ad8e62 --- /dev/null +++ b/src/lib/libssl/src/apps/dh4096.pem | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | -----BEGIN DH PARAMETERS----- | ||
| 2 | MIICCAKCAgEA+hRyUsFN4VpJ1O8JLcCo/VWr19k3BCgJ4uk+d+KhehjdRqNDNyOQ | ||
| 3 | l/MOyQNQfWXPeGKmOmIig6Ev/nm6Nf9Z2B1h3R4hExf+zTiHnvVPeRBhjdQi81rt | ||
| 4 | Xeoh6TNrSBIKIHfUJWBh3va0TxxjQIs6IZOLeVNRLMqzeylWqMf49HsIXqbcokUS | ||
| 5 | Vt1BkvLdW48j8PPv5DsKRN3tloTxqDJGo9tKvj1Fuk74A+Xda1kNhB7KFlqMyN98 | ||
| 6 | VETEJ6c7KpfOo30mnK30wqw3S8OtaIR/maYX72tGOno2ehFDkq3pnPtEbD2CScxc | ||
| 7 | alJC+EL7RPk5c/tgeTvCngvc1KZn92Y//EI7G9tPZtylj2b56sHtMftIoYJ9+ODM | ||
| 8 | sccD5Piz/rejE3Ome8EOOceUSCYAhXn8b3qvxVI1ddd1pED6FHRhFvLrZxFvBEM9 | ||
| 9 | ERRMp5QqOaHJkM+Dxv8Cj6MqrCbfC4u+ZErxodzuusgDgvZiLF22uxMZbobFWyte | ||
| 10 | OvOzKGtwcTqO/1wV5gKkzu1ZVswVUQd5Gg8lJicwqRWyyNRczDDoG9jVDxmogKTH | ||
| 11 | AaqLulO7R8Ifa1SwF2DteSGVtgWEN8gDpN3RBmmPTDngyF2DHb5qmpnznwtFKdTL | ||
| 12 | KWbuHn491xNO25CQWMtem80uKw+pTnisBRF/454n1Jnhub144YRBoN8CAQI= | ||
| 13 | -----END DH PARAMETERS----- | ||
| 14 | |||
| 15 | These are the 4096 bit DH parameters from "Assigned Number for SKIP Protocols" | ||
| 16 | (http://www.skip-vpn.org/spec/numbers.html). | ||
| 17 | See there for how they were generated. | ||
| 18 | Note that g is not a generator, but this is not a problem since p is a safe prime. | ||
diff --git a/src/lib/libssl/src/apps/dh512.pem b/src/lib/libssl/src/apps/dh512.pem new file mode 100644 index 0000000000..200d16cd89 --- /dev/null +++ b/src/lib/libssl/src/apps/dh512.pem | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | -----BEGIN DH PARAMETERS----- | ||
| 2 | MEYCQQD1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWak | ||
| 3 | XUGfnHy9iUsiGSa6q6Jew1XpKgVfAgEC | ||
| 4 | -----END DH PARAMETERS----- | ||
| 5 | |||
| 6 | These are the 512 bit DH parameters from "Assigned Number for SKIP Protocols" | ||
| 7 | (http://www.skip-vpn.org/spec/numbers.html). | ||
| 8 | See there for how they were generated. | ||
| 9 | Note that g is not a generator, but this is not a problem since p is a safe prime. | ||
diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c index 709547ff5e..9d5705f8bf 100644 --- a/src/lib/libssl/src/apps/dhparam.c +++ b/src/lib/libssl/src/apps/dhparam.c | |||
| @@ -121,6 +121,7 @@ | |||
| 121 | #include <openssl/dh.h> | 121 | #include <openssl/dh.h> |
| 122 | #include <openssl/x509.h> | 122 | #include <openssl/x509.h> |
| 123 | #include <openssl/pem.h> | 123 | #include <openssl/pem.h> |
| 124 | #include <openssl/engine.h> | ||
| 124 | 125 | ||
| 125 | #ifndef NO_DSA | 126 | #ifndef NO_DSA |
| 126 | #include <openssl/dsa.h> | 127 | #include <openssl/dsa.h> |
| @@ -148,6 +149,7 @@ int MAIN(int, char **); | |||
| 148 | 149 | ||
| 149 | int MAIN(int argc, char **argv) | 150 | int MAIN(int argc, char **argv) |
| 150 | { | 151 | { |
| 152 | ENGINE *e = NULL; | ||
| 151 | DH *dh=NULL; | 153 | DH *dh=NULL; |
| 152 | int i,badops=0,text=0; | 154 | int i,badops=0,text=0; |
| 153 | #ifndef NO_DSA | 155 | #ifndef NO_DSA |
| @@ -156,7 +158,7 @@ int MAIN(int argc, char **argv) | |||
| 156 | BIO *in=NULL,*out=NULL; | 158 | BIO *in=NULL,*out=NULL; |
| 157 | int informat,outformat,check=0,noout=0,C=0,ret=1; | 159 | int informat,outformat,check=0,noout=0,C=0,ret=1; |
| 158 | char *infile,*outfile,*prog; | 160 | char *infile,*outfile,*prog; |
| 159 | char *inrand=NULL; | 161 | char *inrand=NULL,*engine=NULL; |
| 160 | int num = 0, g = 0; | 162 | int num = 0, g = 0; |
| 161 | 163 | ||
| 162 | apps_startup(); | 164 | apps_startup(); |
| @@ -195,6 +197,11 @@ int MAIN(int argc, char **argv) | |||
| 195 | if (--argc < 1) goto bad; | 197 | if (--argc < 1) goto bad; |
| 196 | outfile= *(++argv); | 198 | outfile= *(++argv); |
| 197 | } | 199 | } |
| 200 | else if (strcmp(*argv,"-engine") == 0) | ||
| 201 | { | ||
| 202 | if (--argc < 1) goto bad; | ||
| 203 | engine= *(++argv); | ||
| 204 | } | ||
| 198 | else if (strcmp(*argv,"-check") == 0) | 205 | else if (strcmp(*argv,"-check") == 0) |
| 199 | check=1; | 206 | check=1; |
| 200 | else if (strcmp(*argv,"-text") == 0) | 207 | else if (strcmp(*argv,"-text") == 0) |
| @@ -240,6 +247,7 @@ bad: | |||
| 240 | BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n"); | 247 | BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n"); |
| 241 | BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n"); | 248 | BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n"); |
| 242 | BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n"); | 249 | BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n"); |
| 250 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 243 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 251 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); |
| 244 | BIO_printf(bio_err," - load the file (or the files in the directory) into\n"); | 252 | BIO_printf(bio_err," - load the file (or the files in the directory) into\n"); |
| 245 | BIO_printf(bio_err," the random number generator\n"); | 253 | BIO_printf(bio_err," the random number generator\n"); |
| @@ -249,6 +257,24 @@ bad: | |||
| 249 | 257 | ||
| 250 | ERR_load_crypto_strings(); | 258 | ERR_load_crypto_strings(); |
| 251 | 259 | ||
| 260 | if (engine != NULL) | ||
| 261 | { | ||
| 262 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 263 | { | ||
| 264 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 265 | engine); | ||
| 266 | goto end; | ||
| 267 | } | ||
| 268 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 269 | { | ||
| 270 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 271 | goto end; | ||
| 272 | } | ||
| 273 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 274 | /* Free our "structural" reference. */ | ||
| 275 | ENGINE_free(e); | ||
| 276 | } | ||
| 277 | |||
| 252 | if (g && !num) | 278 | if (g && !num) |
| 253 | num = DEFBITS; | 279 | num = DEFBITS; |
| 254 | 280 | ||
| @@ -285,7 +311,7 @@ bad: | |||
| 285 | DSA *dsa; | 311 | DSA *dsa; |
| 286 | 312 | ||
| 287 | BIO_printf(bio_err,"Generating DSA parameters, %d bit long prime\n",num); | 313 | BIO_printf(bio_err,"Generating DSA parameters, %d bit long prime\n",num); |
| 288 | dsa = DSA_generate_parameters(num, NULL, 0, NULL, NULL, dh_cb, bio_err); | 314 | dsa = DSA_generate_parameters(num, NULL, 0, NULL, NULL, dh_cb, bio_err); |
| 289 | if (dsa == NULL) | 315 | if (dsa == NULL) |
| 290 | { | 316 | { |
| 291 | ERR_print_errors(bio_err); | 317 | ERR_print_errors(bio_err); |
| @@ -391,7 +417,15 @@ bad: | |||
| 391 | goto end; | 417 | goto end; |
| 392 | } | 418 | } |
| 393 | if (outfile == NULL) | 419 | if (outfile == NULL) |
| 420 | { | ||
| 394 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 421 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 422 | #ifdef VMS | ||
| 423 | { | ||
| 424 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 425 | out = BIO_push(tmpbio, out); | ||
| 426 | } | ||
| 427 | #endif | ||
| 428 | } | ||
| 395 | else | 429 | else |
| 396 | { | 430 | { |
| 397 | if (BIO_write_filename(out,outfile) <= 0) | 431 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -432,10 +466,10 @@ bad: | |||
| 432 | 466 | ||
| 433 | len=BN_num_bytes(dh->p); | 467 | len=BN_num_bytes(dh->p); |
| 434 | bits=BN_num_bits(dh->p); | 468 | bits=BN_num_bits(dh->p); |
| 435 | data=(unsigned char *)Malloc(len); | 469 | data=(unsigned char *)OPENSSL_malloc(len); |
| 436 | if (data == NULL) | 470 | if (data == NULL) |
| 437 | { | 471 | { |
| 438 | perror("Malloc"); | 472 | perror("OPENSSL_malloc"); |
| 439 | goto end; | 473 | goto end; |
| 440 | } | 474 | } |
| 441 | printf("#ifndef HEADER_DH_H\n" | 475 | printf("#ifndef HEADER_DH_H\n" |
| @@ -472,7 +506,7 @@ bad: | |||
| 472 | if (dh->length) | 506 | if (dh->length) |
| 473 | printf("\tdh->length = %d;\n", dh->length); | 507 | printf("\tdh->length = %d;\n", dh->length); |
| 474 | printf("\treturn(dh);\n\t}\n"); | 508 | printf("\treturn(dh);\n\t}\n"); |
| 475 | Free(data); | 509 | OPENSSL_free(data); |
| 476 | } | 510 | } |
| 477 | 511 | ||
| 478 | 512 | ||
| @@ -496,7 +530,7 @@ bad: | |||
| 496 | ret=0; | 530 | ret=0; |
| 497 | end: | 531 | end: |
| 498 | if (in != NULL) BIO_free(in); | 532 | if (in != NULL) BIO_free(in); |
| 499 | if (out != NULL) BIO_free(out); | 533 | if (out != NULL) BIO_free_all(out); |
| 500 | if (dh != NULL) DH_free(dh); | 534 | if (dh != NULL) DH_free(dh); |
| 501 | EXIT(ret); | 535 | EXIT(ret); |
| 502 | } | 536 | } |
diff --git a/src/lib/libssl/src/apps/dsa.c b/src/lib/libssl/src/apps/dsa.c index 4977671b8a..49ca9003ac 100644 --- a/src/lib/libssl/src/apps/dsa.c +++ b/src/lib/libssl/src/apps/dsa.c | |||
| @@ -68,6 +68,7 @@ | |||
| 68 | #include <openssl/evp.h> | 68 | #include <openssl/evp.h> |
| 69 | #include <openssl/x509.h> | 69 | #include <openssl/x509.h> |
| 70 | #include <openssl/pem.h> | 70 | #include <openssl/pem.h> |
| 71 | #include <openssl/engine.h> | ||
| 71 | 72 | ||
| 72 | #undef PROG | 73 | #undef PROG |
| 73 | #define PROG dsa_main | 74 | #define PROG dsa_main |
| @@ -87,6 +88,7 @@ int MAIN(int, char **); | |||
| 87 | 88 | ||
| 88 | int MAIN(int argc, char **argv) | 89 | int MAIN(int argc, char **argv) |
| 89 | { | 90 | { |
| 91 | ENGINE *e = NULL; | ||
| 90 | int ret=1; | 92 | int ret=1; |
| 91 | DSA *dsa=NULL; | 93 | DSA *dsa=NULL; |
| 92 | int i,badops=0; | 94 | int i,badops=0; |
| @@ -94,7 +96,7 @@ int MAIN(int argc, char **argv) | |||
| 94 | BIO *in=NULL,*out=NULL; | 96 | BIO *in=NULL,*out=NULL; |
| 95 | int informat,outformat,text=0,noout=0; | 97 | int informat,outformat,text=0,noout=0; |
| 96 | int pubin = 0, pubout = 0; | 98 | int pubin = 0, pubout = 0; |
| 97 | char *infile,*outfile,*prog; | 99 | char *infile,*outfile,*prog,*engine; |
| 98 | char *passargin = NULL, *passargout = NULL; | 100 | char *passargin = NULL, *passargout = NULL; |
| 99 | char *passin = NULL, *passout = NULL; | 101 | char *passin = NULL, *passout = NULL; |
| 100 | int modulus=0; | 102 | int modulus=0; |
| @@ -105,6 +107,7 @@ int MAIN(int argc, char **argv) | |||
| 105 | if ((bio_err=BIO_new(BIO_s_file())) != NULL) | 107 | if ((bio_err=BIO_new(BIO_s_file())) != NULL) |
| 106 | BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); | 108 | BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); |
| 107 | 109 | ||
| 110 | engine=NULL; | ||
| 108 | infile=NULL; | 111 | infile=NULL; |
| 109 | outfile=NULL; | 112 | outfile=NULL; |
| 110 | informat=FORMAT_PEM; | 113 | informat=FORMAT_PEM; |
| @@ -145,6 +148,11 @@ int MAIN(int argc, char **argv) | |||
| 145 | if (--argc < 1) goto bad; | 148 | if (--argc < 1) goto bad; |
| 146 | passargout= *(++argv); | 149 | passargout= *(++argv); |
| 147 | } | 150 | } |
| 151 | else if (strcmp(*argv,"-engine") == 0) | ||
| 152 | { | ||
| 153 | if (--argc < 1) goto bad; | ||
| 154 | engine= *(++argv); | ||
| 155 | } | ||
| 148 | else if (strcmp(*argv,"-noout") == 0) | 156 | else if (strcmp(*argv,"-noout") == 0) |
| 149 | noout=1; | 157 | noout=1; |
| 150 | else if (strcmp(*argv,"-text") == 0) | 158 | else if (strcmp(*argv,"-text") == 0) |
| @@ -176,6 +184,7 @@ bad: | |||
| 176 | BIO_printf(bio_err," -passin arg input file pass phrase source\n"); | 184 | BIO_printf(bio_err," -passin arg input file pass phrase source\n"); |
| 177 | BIO_printf(bio_err," -out arg output file\n"); | 185 | BIO_printf(bio_err," -out arg output file\n"); |
| 178 | BIO_printf(bio_err," -passout arg output file pass phrase source\n"); | 186 | BIO_printf(bio_err," -passout arg output file pass phrase source\n"); |
| 187 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 179 | BIO_printf(bio_err," -des encrypt PEM output with cbc des\n"); | 188 | BIO_printf(bio_err," -des encrypt PEM output with cbc des\n"); |
| 180 | BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n"); | 189 | BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n"); |
| 181 | #ifndef NO_IDEA | 190 | #ifndef NO_IDEA |
| @@ -189,6 +198,24 @@ bad: | |||
| 189 | 198 | ||
| 190 | ERR_load_crypto_strings(); | 199 | ERR_load_crypto_strings(); |
| 191 | 200 | ||
| 201 | if (engine != NULL) | ||
| 202 | { | ||
| 203 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 204 | { | ||
| 205 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 206 | engine); | ||
| 207 | goto end; | ||
| 208 | } | ||
| 209 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 210 | { | ||
| 211 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 212 | goto end; | ||
| 213 | } | ||
| 214 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 215 | /* Free our "structural" reference. */ | ||
| 216 | ENGINE_free(e); | ||
| 217 | } | ||
| 218 | |||
| 192 | if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { | 219 | if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { |
| 193 | BIO_printf(bio_err, "Error getting passwords\n"); | 220 | BIO_printf(bio_err, "Error getting passwords\n"); |
| 194 | goto end; | 221 | goto end; |
| @@ -233,7 +260,15 @@ bad: | |||
| 233 | } | 260 | } |
| 234 | 261 | ||
| 235 | if (outfile == NULL) | 262 | if (outfile == NULL) |
| 263 | { | ||
| 236 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 264 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 265 | #ifdef VMS | ||
| 266 | { | ||
| 267 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 268 | out = BIO_push(tmpbio, out); | ||
| 269 | } | ||
| 270 | #endif | ||
| 271 | } | ||
| 237 | else | 272 | else |
| 238 | { | 273 | { |
| 239 | if (BIO_write_filename(out,outfile) <= 0) | 274 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -281,10 +316,10 @@ bad: | |||
| 281 | ret=0; | 316 | ret=0; |
| 282 | end: | 317 | end: |
| 283 | if(in != NULL) BIO_free(in); | 318 | if(in != NULL) BIO_free(in); |
| 284 | if(out != NULL) BIO_free(out); | 319 | if(out != NULL) BIO_free_all(out); |
| 285 | if(dsa != NULL) DSA_free(dsa); | 320 | if(dsa != NULL) DSA_free(dsa); |
| 286 | if(passin) Free(passin); | 321 | if(passin) OPENSSL_free(passin); |
| 287 | if(passout) Free(passout); | 322 | if(passout) OPENSSL_free(passout); |
| 288 | EXIT(ret); | 323 | EXIT(ret); |
| 289 | } | 324 | } |
| 290 | #endif | 325 | #endif |
diff --git a/src/lib/libssl/src/apps/dsaparam.c b/src/lib/libssl/src/apps/dsaparam.c index 4d4e1ad2b5..67f054c645 100644 --- a/src/lib/libssl/src/apps/dsaparam.c +++ b/src/lib/libssl/src/apps/dsaparam.c | |||
| @@ -69,6 +69,7 @@ | |||
| 69 | #include <openssl/dsa.h> | 69 | #include <openssl/dsa.h> |
| 70 | #include <openssl/x509.h> | 70 | #include <openssl/x509.h> |
| 71 | #include <openssl/pem.h> | 71 | #include <openssl/pem.h> |
| 72 | #include <openssl/engine.h> | ||
| 72 | 73 | ||
| 73 | #undef PROG | 74 | #undef PROG |
| 74 | #define PROG dsaparam_main | 75 | #define PROG dsaparam_main |
| @@ -90,11 +91,12 @@ int MAIN(int, char **); | |||
| 90 | 91 | ||
| 91 | int MAIN(int argc, char **argv) | 92 | int MAIN(int argc, char **argv) |
| 92 | { | 93 | { |
| 94 | ENGINE *e = NULL; | ||
| 93 | DSA *dsa=NULL; | 95 | DSA *dsa=NULL; |
| 94 | int i,badops=0,text=0; | 96 | int i,badops=0,text=0; |
| 95 | BIO *in=NULL,*out=NULL; | 97 | BIO *in=NULL,*out=NULL; |
| 96 | int informat,outformat,noout=0,C=0,ret=1; | 98 | int informat,outformat,noout=0,C=0,ret=1; |
| 97 | char *infile,*outfile,*prog,*inrand=NULL; | 99 | char *infile,*outfile,*prog,*inrand=NULL,*engine=NULL; |
| 98 | int numbits= -1,num,genkey=0; | 100 | int numbits= -1,num,genkey=0; |
| 99 | int need_rand=0; | 101 | int need_rand=0; |
| 100 | 102 | ||
| @@ -205,7 +207,15 @@ bad: | |||
| 205 | } | 207 | } |
| 206 | } | 208 | } |
| 207 | if (outfile == NULL) | 209 | if (outfile == NULL) |
| 210 | { | ||
| 208 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 211 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 212 | #ifdef VMS | ||
| 213 | { | ||
| 214 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 215 | out = BIO_push(tmpbio, out); | ||
| 216 | } | ||
| 217 | #endif | ||
| 218 | } | ||
| 209 | else | 219 | else |
| 210 | { | 220 | { |
| 211 | if (BIO_write_filename(out,outfile) <= 0) | 221 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -260,10 +270,10 @@ bad: | |||
| 260 | bits_p=BN_num_bits(dsa->p); | 270 | bits_p=BN_num_bits(dsa->p); |
| 261 | bits_q=BN_num_bits(dsa->q); | 271 | bits_q=BN_num_bits(dsa->q); |
| 262 | bits_g=BN_num_bits(dsa->g); | 272 | bits_g=BN_num_bits(dsa->g); |
| 263 | data=(unsigned char *)Malloc(len+20); | 273 | data=(unsigned char *)OPENSSL_malloc(len+20); |
| 264 | if (data == NULL) | 274 | if (data == NULL) |
| 265 | { | 275 | { |
| 266 | perror("Malloc"); | 276 | perror("OPENSSL_malloc"); |
| 267 | goto end; | 277 | goto end; |
| 268 | } | 278 | } |
| 269 | l=BN_bn2bin(dsa->p,data); | 279 | l=BN_bn2bin(dsa->p,data); |
| @@ -347,7 +357,7 @@ bad: | |||
| 347 | ret=0; | 357 | ret=0; |
| 348 | end: | 358 | end: |
| 349 | if (in != NULL) BIO_free(in); | 359 | if (in != NULL) BIO_free(in); |
| 350 | if (out != NULL) BIO_free(out); | 360 | if (out != NULL) BIO_free_all(out); |
| 351 | if (dsa != NULL) DSA_free(dsa); | 361 | if (dsa != NULL) DSA_free(dsa); |
| 352 | EXIT(ret); | 362 | EXIT(ret); |
| 353 | } | 363 | } |
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c index 6531c58c54..b9190ef53f 100644 --- a/src/lib/libssl/src/apps/enc.c +++ b/src/lib/libssl/src/apps/enc.c | |||
| @@ -70,6 +70,7 @@ | |||
| 70 | #include <openssl/md5.h> | 70 | #include <openssl/md5.h> |
| 71 | #endif | 71 | #endif |
| 72 | #include <openssl/pem.h> | 72 | #include <openssl/pem.h> |
| 73 | #include <openssl/engine.h> | ||
| 73 | 74 | ||
| 74 | int set_hex(char *in,unsigned char *out,int size); | 75 | int set_hex(char *in,unsigned char *out,int size); |
| 75 | #undef SIZE | 76 | #undef SIZE |
| @@ -84,6 +85,7 @@ int MAIN(int, char **); | |||
| 84 | 85 | ||
| 85 | int MAIN(int argc, char **argv) | 86 | int MAIN(int argc, char **argv) |
| 86 | { | 87 | { |
| 88 | ENGINE *e = NULL; | ||
| 87 | static const char magic[]="Salted__"; | 89 | static const char magic[]="Salted__"; |
| 88 | char mbuf[8]; /* should be 1 smaller than magic */ | 90 | char mbuf[8]; /* should be 1 smaller than magic */ |
| 89 | char *strbuf=NULL; | 91 | char *strbuf=NULL; |
| @@ -101,6 +103,7 @@ int MAIN(int argc, char **argv) | |||
| 101 | BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL; | 103 | BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL; |
| 102 | #define PROG_NAME_SIZE 16 | 104 | #define PROG_NAME_SIZE 16 |
| 103 | char pname[PROG_NAME_SIZE]; | 105 | char pname[PROG_NAME_SIZE]; |
| 106 | char *engine = NULL; | ||
| 104 | 107 | ||
| 105 | apps_startup(); | 108 | apps_startup(); |
| 106 | 109 | ||
| @@ -141,6 +144,11 @@ int MAIN(int argc, char **argv) | |||
| 141 | if (--argc < 1) goto bad; | 144 | if (--argc < 1) goto bad; |
| 142 | passarg= *(++argv); | 145 | passarg= *(++argv); |
| 143 | } | 146 | } |
| 147 | else if (strcmp(*argv,"-engine") == 0) | ||
| 148 | { | ||
| 149 | if (--argc < 1) goto bad; | ||
| 150 | engine= *(++argv); | ||
| 151 | } | ||
| 144 | else if (strcmp(*argv,"-d") == 0) | 152 | else if (strcmp(*argv,"-d") == 0) |
| 145 | enc=0; | 153 | enc=0; |
| 146 | else if (strcmp(*argv,"-p") == 0) | 154 | else if (strcmp(*argv,"-p") == 0) |
| @@ -241,6 +249,7 @@ bad: | |||
| 241 | BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv"); | 249 | BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv"); |
| 242 | BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]"); | 250 | BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]"); |
| 243 | BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>"); | 251 | BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>"); |
| 252 | BIO_printf(bio_err,"%-14s use engine e, possibly a hardware device.\n","-engine e"); | ||
| 244 | 253 | ||
| 245 | BIO_printf(bio_err,"Cipher Types\n"); | 254 | BIO_printf(bio_err,"Cipher Types\n"); |
| 246 | BIO_printf(bio_err,"des : 56 bit key DES encryption\n"); | 255 | BIO_printf(bio_err,"des : 56 bit key DES encryption\n"); |
| @@ -314,6 +323,24 @@ bad: | |||
| 314 | argv++; | 323 | argv++; |
| 315 | } | 324 | } |
| 316 | 325 | ||
| 326 | if (engine != NULL) | ||
| 327 | { | ||
| 328 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 329 | { | ||
| 330 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 331 | engine); | ||
| 332 | goto end; | ||
| 333 | } | ||
| 334 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 335 | { | ||
| 336 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 337 | goto end; | ||
| 338 | } | ||
| 339 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 340 | /* Free our "structural" reference. */ | ||
| 341 | ENGINE_free(e); | ||
| 342 | } | ||
| 343 | |||
| 317 | if (bufsize != NULL) | 344 | if (bufsize != NULL) |
| 318 | { | 345 | { |
| 319 | unsigned long n; | 346 | unsigned long n; |
| @@ -343,11 +370,11 @@ bad: | |||
| 343 | if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize); | 370 | if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize); |
| 344 | } | 371 | } |
| 345 | 372 | ||
| 346 | strbuf=Malloc(SIZE); | 373 | strbuf=OPENSSL_malloc(SIZE); |
| 347 | buff=(unsigned char *)Malloc(EVP_ENCODE_LENGTH(bsize)); | 374 | buff=(unsigned char *)OPENSSL_malloc(EVP_ENCODE_LENGTH(bsize)); |
| 348 | if ((buff == NULL) || (strbuf == NULL)) | 375 | if ((buff == NULL) || (strbuf == NULL)) |
| 349 | { | 376 | { |
| 350 | BIO_printf(bio_err,"Malloc failure %ld\n",(long)EVP_ENCODE_LENGTH(bsize)); | 377 | BIO_printf(bio_err,"OPENSSL_malloc failure %ld\n",(long)EVP_ENCODE_LENGTH(bsize)); |
| 351 | goto end; | 378 | goto end; |
| 352 | } | 379 | } |
| 353 | 380 | ||
| @@ -416,7 +443,15 @@ bad: | |||
| 416 | 443 | ||
| 417 | 444 | ||
| 418 | if (outf == NULL) | 445 | if (outf == NULL) |
| 446 | { | ||
| 419 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 447 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 448 | #ifdef VMS | ||
| 449 | { | ||
| 450 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 451 | out = BIO_push(tmpbio, out); | ||
| 452 | } | ||
| 453 | #endif | ||
| 454 | } | ||
| 420 | else | 455 | else |
| 421 | { | 456 | { |
| 422 | if (BIO_write_filename(out,outf) <= 0) | 457 | if (BIO_write_filename(out,outf) <= 0) |
| @@ -581,13 +616,13 @@ bad: | |||
| 581 | } | 616 | } |
| 582 | end: | 617 | end: |
| 583 | ERR_print_errors(bio_err); | 618 | ERR_print_errors(bio_err); |
| 584 | if (strbuf != NULL) Free(strbuf); | 619 | if (strbuf != NULL) OPENSSL_free(strbuf); |
| 585 | if (buff != NULL) Free(buff); | 620 | if (buff != NULL) OPENSSL_free(buff); |
| 586 | if (in != NULL) BIO_free(in); | 621 | if (in != NULL) BIO_free(in); |
| 587 | if (out != NULL) BIO_free(out); | 622 | if (out != NULL) BIO_free_all(out); |
| 588 | if (benc != NULL) BIO_free(benc); | 623 | if (benc != NULL) BIO_free(benc); |
| 589 | if (b64 != NULL) BIO_free(b64); | 624 | if (b64 != NULL) BIO_free(b64); |
| 590 | if(pass) Free(pass); | 625 | if(pass) OPENSSL_free(pass); |
| 591 | EXIT(ret); | 626 | EXIT(ret); |
| 592 | } | 627 | } |
| 593 | 628 | ||
diff --git a/src/lib/libssl/src/apps/errstr.c b/src/lib/libssl/src/apps/errstr.c index 4650379589..e392328f93 100644 --- a/src/lib/libssl/src/apps/errstr.c +++ b/src/lib/libssl/src/apps/errstr.c | |||
| @@ -91,12 +91,18 @@ int MAIN(int argc, char **argv) | |||
| 91 | out=BIO_new(BIO_s_file()); | 91 | out=BIO_new(BIO_s_file()); |
| 92 | if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE)) | 92 | if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE)) |
| 93 | { | 93 | { |
| 94 | #ifdef VMS | ||
| 95 | { | ||
| 96 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 97 | out = BIO_push(tmpbio, out); | ||
| 98 | } | ||
| 99 | #endif | ||
| 94 | lh_node_stats_bio((LHASH *)ERR_get_string_table(),out); | 100 | lh_node_stats_bio((LHASH *)ERR_get_string_table(),out); |
| 95 | lh_stats_bio((LHASH *)ERR_get_string_table(),out); | 101 | lh_stats_bio((LHASH *)ERR_get_string_table(),out); |
| 96 | lh_node_usage_stats_bio((LHASH *) | 102 | lh_node_usage_stats_bio((LHASH *) |
| 97 | ERR_get_string_table(),out); | 103 | ERR_get_string_table(),out); |
| 98 | } | 104 | } |
| 99 | if (out != NULL) BIO_free(out); | 105 | if (out != NULL) BIO_free_all(out); |
| 100 | argc--; | 106 | argc--; |
| 101 | argv++; | 107 | argv++; |
| 102 | } | 108 | } |
| @@ -104,7 +110,10 @@ int MAIN(int argc, char **argv) | |||
| 104 | for (i=1; i<argc; i++) | 110 | for (i=1; i<argc; i++) |
| 105 | { | 111 | { |
| 106 | if (sscanf(argv[i],"%lx",&l)) | 112 | if (sscanf(argv[i],"%lx",&l)) |
| 107 | printf("%s\n",ERR_error_string(l,buf)); | 113 | { |
| 114 | ERR_error_string_n(l, buf, sizeof buf); | ||
| 115 | printf("%s\n",buf); | ||
| 116 | } | ||
| 108 | else | 117 | else |
| 109 | { | 118 | { |
| 110 | printf("%s: bad error code\n",argv[i]); | 119 | printf("%s: bad error code\n",argv[i]); |
diff --git a/src/lib/libssl/src/apps/gendh.c b/src/lib/libssl/src/apps/gendh.c index caf5e8d736..e81109eaac 100644 --- a/src/lib/libssl/src/apps/gendh.c +++ b/src/lib/libssl/src/apps/gendh.c | |||
| @@ -70,6 +70,7 @@ | |||
| 70 | #include <openssl/dh.h> | 70 | #include <openssl/dh.h> |
| 71 | #include <openssl/x509.h> | 71 | #include <openssl/x509.h> |
| 72 | #include <openssl/pem.h> | 72 | #include <openssl/pem.h> |
| 73 | #include <openssl/engine.h> | ||
| 73 | 74 | ||
| 74 | #define DEFBITS 512 | 75 | #define DEFBITS 512 |
| 75 | #undef PROG | 76 | #undef PROG |
| @@ -81,11 +82,13 @@ int MAIN(int, char **); | |||
| 81 | 82 | ||
| 82 | int MAIN(int argc, char **argv) | 83 | int MAIN(int argc, char **argv) |
| 83 | { | 84 | { |
| 85 | ENGINE *e = NULL; | ||
| 84 | DH *dh=NULL; | 86 | DH *dh=NULL; |
| 85 | int ret=1,num=DEFBITS; | 87 | int ret=1,num=DEFBITS; |
| 86 | int g=2; | 88 | int g=2; |
| 87 | char *outfile=NULL; | 89 | char *outfile=NULL; |
| 88 | char *inrand=NULL; | 90 | char *inrand=NULL; |
| 91 | char *engine=NULL; | ||
| 89 | BIO *out=NULL; | 92 | BIO *out=NULL; |
| 90 | 93 | ||
| 91 | apps_startup(); | 94 | apps_startup(); |
| @@ -110,6 +113,11 @@ int MAIN(int argc, char **argv) | |||
| 110 | g=3; */ | 113 | g=3; */ |
| 111 | else if (strcmp(*argv,"-5") == 0) | 114 | else if (strcmp(*argv,"-5") == 0) |
| 112 | g=5; | 115 | g=5; |
| 116 | else if (strcmp(*argv,"-engine") == 0) | ||
| 117 | { | ||
| 118 | if (--argc < 1) goto bad; | ||
| 119 | engine= *(++argv); | ||
| 120 | } | ||
| 113 | else if (strcmp(*argv,"-rand") == 0) | 121 | else if (strcmp(*argv,"-rand") == 0) |
| 114 | { | 122 | { |
| 115 | if (--argc < 1) goto bad; | 123 | if (--argc < 1) goto bad; |
| @@ -125,15 +133,34 @@ int MAIN(int argc, char **argv) | |||
| 125 | bad: | 133 | bad: |
| 126 | BIO_printf(bio_err,"usage: gendh [args] [numbits]\n"); | 134 | BIO_printf(bio_err,"usage: gendh [args] [numbits]\n"); |
| 127 | BIO_printf(bio_err," -out file - output the key to 'file\n"); | 135 | BIO_printf(bio_err," -out file - output the key to 'file\n"); |
| 128 | BIO_printf(bio_err," -2 use 2 as the generator value\n"); | 136 | BIO_printf(bio_err," -2 - use 2 as the generator value\n"); |
| 129 | /* BIO_printf(bio_err," -3 use 3 as the generator value\n"); */ | 137 | /* BIO_printf(bio_err," -3 - use 3 as the generator value\n"); */ |
| 130 | BIO_printf(bio_err," -5 use 5 as the generator value\n"); | 138 | BIO_printf(bio_err," -5 - use 5 as the generator value\n"); |
| 139 | BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n"); | ||
| 131 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 140 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); |
| 132 | BIO_printf(bio_err," - load the file (or the files in the directory) into\n"); | 141 | BIO_printf(bio_err," - load the file (or the files in the directory) into\n"); |
| 133 | BIO_printf(bio_err," the random number generator\n"); | 142 | BIO_printf(bio_err," the random number generator\n"); |
| 134 | goto end; | 143 | goto end; |
| 135 | } | 144 | } |
| 136 | 145 | ||
| 146 | if (engine != NULL) | ||
| 147 | { | ||
| 148 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 149 | { | ||
| 150 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 151 | engine); | ||
| 152 | goto end; | ||
| 153 | } | ||
| 154 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 155 | { | ||
| 156 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 157 | goto end; | ||
| 158 | } | ||
| 159 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 160 | /* Free our "structural" reference. */ | ||
| 161 | ENGINE_free(e); | ||
| 162 | } | ||
| 163 | |||
| 137 | out=BIO_new(BIO_s_file()); | 164 | out=BIO_new(BIO_s_file()); |
| 138 | if (out == NULL) | 165 | if (out == NULL) |
| 139 | { | 166 | { |
| @@ -142,7 +169,15 @@ bad: | |||
| 142 | } | 169 | } |
| 143 | 170 | ||
| 144 | if (outfile == NULL) | 171 | if (outfile == NULL) |
| 172 | { | ||
| 145 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 173 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 174 | #ifdef VMS | ||
| 175 | { | ||
| 176 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 177 | out = BIO_push(tmpbio, out); | ||
| 178 | } | ||
| 179 | #endif | ||
| 180 | } | ||
| 146 | else | 181 | else |
| 147 | { | 182 | { |
| 148 | if (BIO_write_filename(out,outfile) <= 0) | 183 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -174,7 +209,7 @@ bad: | |||
| 174 | end: | 209 | end: |
| 175 | if (ret != 0) | 210 | if (ret != 0) |
| 176 | ERR_print_errors(bio_err); | 211 | ERR_print_errors(bio_err); |
| 177 | if (out != NULL) BIO_free(out); | 212 | if (out != NULL) BIO_free_all(out); |
| 178 | if (dh != NULL) DH_free(dh); | 213 | if (dh != NULL) DH_free(dh); |
| 179 | EXIT(ret); | 214 | EXIT(ret); |
| 180 | } | 215 | } |
diff --git a/src/lib/libssl/src/apps/gendsa.c b/src/lib/libssl/src/apps/gendsa.c index b1a1c4fcfa..1c0ec371d2 100644 --- a/src/lib/libssl/src/apps/gendsa.c +++ b/src/lib/libssl/src/apps/gendsa.c | |||
| @@ -68,6 +68,7 @@ | |||
| 68 | #include <openssl/dsa.h> | 68 | #include <openssl/dsa.h> |
| 69 | #include <openssl/x509.h> | 69 | #include <openssl/x509.h> |
| 70 | #include <openssl/pem.h> | 70 | #include <openssl/pem.h> |
| 71 | #include <openssl/engine.h> | ||
| 71 | 72 | ||
| 72 | #define DEFBITS 512 | 73 | #define DEFBITS 512 |
| 73 | #undef PROG | 74 | #undef PROG |
| @@ -77,6 +78,7 @@ int MAIN(int, char **); | |||
| 77 | 78 | ||
| 78 | int MAIN(int argc, char **argv) | 79 | int MAIN(int argc, char **argv) |
| 79 | { | 80 | { |
| 81 | ENGINE *e = NULL; | ||
| 80 | DSA *dsa=NULL; | 82 | DSA *dsa=NULL; |
| 81 | int ret=1; | 83 | int ret=1; |
| 82 | char *outfile=NULL; | 84 | char *outfile=NULL; |
| @@ -84,6 +86,7 @@ int MAIN(int argc, char **argv) | |||
| 84 | char *passargout = NULL, *passout = NULL; | 86 | char *passargout = NULL, *passout = NULL; |
| 85 | BIO *out=NULL,*in=NULL; | 87 | BIO *out=NULL,*in=NULL; |
| 86 | EVP_CIPHER *enc=NULL; | 88 | EVP_CIPHER *enc=NULL; |
| 89 | char *engine=NULL; | ||
| 87 | 90 | ||
| 88 | apps_startup(); | 91 | apps_startup(); |
| 89 | 92 | ||
| @@ -106,6 +109,11 @@ int MAIN(int argc, char **argv) | |||
| 106 | if (--argc < 1) goto bad; | 109 | if (--argc < 1) goto bad; |
| 107 | passargout= *(++argv); | 110 | passargout= *(++argv); |
| 108 | } | 111 | } |
| 112 | else if (strcmp(*argv,"-engine") == 0) | ||
| 113 | { | ||
| 114 | if (--argc < 1) goto bad; | ||
| 115 | engine= *(++argv); | ||
| 116 | } | ||
| 109 | else if (strcmp(*argv,"-rand") == 0) | 117 | else if (strcmp(*argv,"-rand") == 0) |
| 110 | { | 118 | { |
| 111 | if (--argc < 1) goto bad; | 119 | if (--argc < 1) goto bad; |
| @@ -145,6 +153,7 @@ bad: | |||
| 145 | #ifndef NO_IDEA | 153 | #ifndef NO_IDEA |
| 146 | BIO_printf(bio_err," -idea - encrypt the generated key with IDEA in cbc mode\n"); | 154 | BIO_printf(bio_err," -idea - encrypt the generated key with IDEA in cbc mode\n"); |
| 147 | #endif | 155 | #endif |
| 156 | BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n"); | ||
| 148 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 157 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); |
| 149 | BIO_printf(bio_err," - load the file (or the files in the directory) into\n"); | 158 | BIO_printf(bio_err," - load the file (or the files in the directory) into\n"); |
| 150 | BIO_printf(bio_err," the random number generator\n"); | 159 | BIO_printf(bio_err," the random number generator\n"); |
| @@ -153,6 +162,24 @@ bad: | |||
| 153 | goto end; | 162 | goto end; |
| 154 | } | 163 | } |
| 155 | 164 | ||
| 165 | if (engine != NULL) | ||
| 166 | { | ||
| 167 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 168 | { | ||
| 169 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 170 | engine); | ||
| 171 | goto end; | ||
| 172 | } | ||
| 173 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 174 | { | ||
| 175 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 176 | goto end; | ||
| 177 | } | ||
| 178 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 179 | /* Free our "structural" reference. */ | ||
| 180 | ENGINE_free(e); | ||
| 181 | } | ||
| 182 | |||
| 156 | if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) { | 183 | if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) { |
| 157 | BIO_printf(bio_err, "Error getting password\n"); | 184 | BIO_printf(bio_err, "Error getting password\n"); |
| 158 | goto end; | 185 | goto end; |
| @@ -178,7 +205,15 @@ bad: | |||
| 178 | if (out == NULL) goto end; | 205 | if (out == NULL) goto end; |
| 179 | 206 | ||
| 180 | if (outfile == NULL) | 207 | if (outfile == NULL) |
| 208 | { | ||
| 181 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 209 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 210 | #ifdef VMS | ||
| 211 | { | ||
| 212 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 213 | out = BIO_push(tmpbio, out); | ||
| 214 | } | ||
| 215 | #endif | ||
| 216 | } | ||
| 182 | else | 217 | else |
| 183 | { | 218 | { |
| 184 | if (BIO_write_filename(out,outfile) <= 0) | 219 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -209,9 +244,9 @@ end: | |||
| 209 | if (ret != 0) | 244 | if (ret != 0) |
| 210 | ERR_print_errors(bio_err); | 245 | ERR_print_errors(bio_err); |
| 211 | if (in != NULL) BIO_free(in); | 246 | if (in != NULL) BIO_free(in); |
| 212 | if (out != NULL) BIO_free(out); | 247 | if (out != NULL) BIO_free_all(out); |
| 213 | if (dsa != NULL) DSA_free(dsa); | 248 | if (dsa != NULL) DSA_free(dsa); |
| 214 | if(passout) Free(passout); | 249 | if(passout) OPENSSL_free(passout); |
| 215 | EXIT(ret); | 250 | EXIT(ret); |
| 216 | } | 251 | } |
| 217 | #endif | 252 | #endif |
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c index 6fe578d69f..e7445e6a49 100644 --- a/src/lib/libssl/src/apps/genrsa.c +++ b/src/lib/libssl/src/apps/genrsa.c | |||
| @@ -69,6 +69,7 @@ | |||
| 69 | #include <openssl/evp.h> | 69 | #include <openssl/evp.h> |
| 70 | #include <openssl/x509.h> | 70 | #include <openssl/x509.h> |
| 71 | #include <openssl/pem.h> | 71 | #include <openssl/pem.h> |
| 72 | #include <openssl/engine.h> | ||
| 72 | 73 | ||
| 73 | #define DEFBITS 512 | 74 | #define DEFBITS 512 |
| 74 | #undef PROG | 75 | #undef PROG |
| @@ -80,6 +81,7 @@ int MAIN(int, char **); | |||
| 80 | 81 | ||
| 81 | int MAIN(int argc, char **argv) | 82 | int MAIN(int argc, char **argv) |
| 82 | { | 83 | { |
| 84 | ENGINE *e = NULL; | ||
| 83 | int ret=1; | 85 | int ret=1; |
| 84 | RSA *rsa=NULL; | 86 | RSA *rsa=NULL; |
| 85 | int i,num=DEFBITS; | 87 | int i,num=DEFBITS; |
| @@ -88,6 +90,7 @@ int MAIN(int argc, char **argv) | |||
| 88 | unsigned long f4=RSA_F4; | 90 | unsigned long f4=RSA_F4; |
| 89 | char *outfile=NULL; | 91 | char *outfile=NULL; |
| 90 | char *passargout = NULL, *passout = NULL; | 92 | char *passargout = NULL, *passout = NULL; |
| 93 | char *engine=NULL; | ||
| 91 | char *inrand=NULL; | 94 | char *inrand=NULL; |
| 92 | BIO *out=NULL; | 95 | BIO *out=NULL; |
| 93 | 96 | ||
| @@ -114,8 +117,13 @@ int MAIN(int argc, char **argv) | |||
| 114 | } | 117 | } |
| 115 | else if (strcmp(*argv,"-3") == 0) | 118 | else if (strcmp(*argv,"-3") == 0) |
| 116 | f4=3; | 119 | f4=3; |
| 117 | else if (strcmp(*argv,"-F4") == 0) | 120 | else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0) |
| 118 | f4=RSA_F4; | 121 | f4=RSA_F4; |
| 122 | else if (strcmp(*argv,"-engine") == 0) | ||
| 123 | { | ||
| 124 | if (--argc < 1) goto bad; | ||
| 125 | engine= *(++argv); | ||
| 126 | } | ||
| 119 | else if (strcmp(*argv,"-rand") == 0) | 127 | else if (strcmp(*argv,"-rand") == 0) |
| 120 | { | 128 | { |
| 121 | if (--argc < 1) goto bad; | 129 | if (--argc < 1) goto bad; |
| @@ -154,6 +162,7 @@ bad: | |||
| 154 | BIO_printf(bio_err," -passout arg output file pass phrase source\n"); | 162 | BIO_printf(bio_err," -passout arg output file pass phrase source\n"); |
| 155 | BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n"); | 163 | BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n"); |
| 156 | BIO_printf(bio_err," -3 use 3 for the E value\n"); | 164 | BIO_printf(bio_err," -3 use 3 for the E value\n"); |
| 165 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 157 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 166 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); |
| 158 | BIO_printf(bio_err," load the file (or the files in the directory) into\n"); | 167 | BIO_printf(bio_err," load the file (or the files in the directory) into\n"); |
| 159 | BIO_printf(bio_err," the random number generator\n"); | 168 | BIO_printf(bio_err," the random number generator\n"); |
| @@ -167,8 +176,34 @@ bad: | |||
| 167 | goto err; | 176 | goto err; |
| 168 | } | 177 | } |
| 169 | 178 | ||
| 179 | if (engine != NULL) | ||
| 180 | { | ||
| 181 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 182 | { | ||
| 183 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 184 | engine); | ||
| 185 | goto err; | ||
| 186 | } | ||
| 187 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 188 | { | ||
| 189 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 190 | goto err; | ||
| 191 | } | ||
| 192 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 193 | /* Free our "structural" reference. */ | ||
| 194 | ENGINE_free(e); | ||
| 195 | } | ||
| 196 | |||
| 170 | if (outfile == NULL) | 197 | if (outfile == NULL) |
| 198 | { | ||
| 171 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 199 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 200 | #ifdef VMS | ||
| 201 | { | ||
| 202 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 203 | out = BIO_push(tmpbio, out); | ||
| 204 | } | ||
| 205 | #endif | ||
| 206 | } | ||
| 172 | else | 207 | else |
| 173 | { | 208 | { |
| 174 | if (BIO_write_filename(out,outfile) <= 0) | 209 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -178,7 +213,8 @@ bad: | |||
| 178 | } | 213 | } |
| 179 | } | 214 | } |
| 180 | 215 | ||
| 181 | if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL) | 216 | if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL |
| 217 | && !RAND_status()) | ||
| 182 | { | 218 | { |
| 183 | BIO_printf(bio_err,"warning, not much extra random data, consider using the -rand option\n"); | 219 | BIO_printf(bio_err,"warning, not much extra random data, consider using the -rand option\n"); |
| 184 | } | 220 | } |
| @@ -212,8 +248,8 @@ bad: | |||
| 212 | ret=0; | 248 | ret=0; |
| 213 | err: | 249 | err: |
| 214 | if (rsa != NULL) RSA_free(rsa); | 250 | if (rsa != NULL) RSA_free(rsa); |
| 215 | if (out != NULL) BIO_free(out); | 251 | if (out != NULL) BIO_free_all(out); |
| 216 | if(passout) Free(passout); | 252 | if(passout) OPENSSL_free(passout); |
| 217 | if (ret != 0) | 253 | if (ret != 0) |
| 218 | ERR_print_errors(bio_err); | 254 | ERR_print_errors(bio_err); |
| 219 | EXIT(ret); | 255 | EXIT(ret); |
diff --git a/src/lib/libssl/src/apps/makeapps.com b/src/lib/libssl/src/apps/makeapps.com index 94acbf8219..7e9d0ac8d6 100644 --- a/src/lib/libssl/src/apps/makeapps.com +++ b/src/lib/libssl/src/apps/makeapps.com | |||
| @@ -154,13 +154,13 @@ $! Define The Application Files. | |||
| 154 | $! | 154 | $! |
| 155 | $ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+- | 155 | $ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+- |
| 156 | "CA;PKCS7;CRL2P7;CRL;"+- | 156 | "CA;PKCS7;CRL2P7;CRL;"+- |
| 157 | "RSA;DSA;DSAPARAM;"+- | 157 | "RSA;RSAUTL;DSA;DSAPARAM;"+- |
| 158 | "X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+- | 158 | "X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+- |
| 159 | "S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+- | 159 | "S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+- |
| 160 | "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND" | 160 | "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND" |
| 161 | $ APP_FILES := OPENSSL,'OBJ_DIR'VERIFY.OBJ,ASN1PARS.OBJ,REQ.OBJ,DGST.OBJ,DH.OBJ,DHPARAM.OBJ,ENC.OBJ,PASSWD.OBJ,GENDH.OBJ,ERRSTR.OBJ,- | 161 | $ APP_FILES := OPENSSL,'OBJ_DIR'VERIFY.OBJ,ASN1PARS.OBJ,REQ.OBJ,DGST.OBJ,DH.OBJ,DHPARAM.OBJ,ENC.OBJ,PASSWD.OBJ,GENDH.OBJ,ERRSTR.OBJ,- |
| 162 | CA.OBJ,PKCS7.OBJ,CRL2P7.OBJ,CRL.OBJ,- | 162 | CA.OBJ,PKCS7.OBJ,CRL2P7.OBJ,CRL.OBJ,- |
| 163 | RSA.OBJ,DSA.OBJ,DSAPARAM.OBJ,- | 163 | RSA.OBJ,RSAUTL.OBJ,DSA.OBJ,DSAPARAM.OBJ,- |
| 164 | X509.OBJ,GENRSA.OBJ,GENDSA.OBJ,S_SERVER.OBJ,S_CLIENT.OBJ,SPEED.OBJ,- | 164 | X509.OBJ,GENRSA.OBJ,GENDSA.OBJ,S_SERVER.OBJ,S_CLIENT.OBJ,SPEED.OBJ,- |
| 165 | S_TIME.OBJ,APPS.OBJ,S_CB.OBJ,S_SOCKET.OBJ,APP_RAND.OBJ,VERSION.OBJ,SESS_ID.OBJ,- | 165 | S_TIME.OBJ,APPS.OBJ,S_CB.OBJ,S_SOCKET.OBJ,APP_RAND.OBJ,VERSION.OBJ,SESS_ID.OBJ,- |
| 166 | CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ | 166 | CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ |
diff --git a/src/lib/libssl/src/apps/md4.c b/src/lib/libssl/src/apps/md4.c new file mode 100644 index 0000000000..e4b0aac011 --- /dev/null +++ b/src/lib/libssl/src/apps/md4.c | |||
| @@ -0,0 +1,127 @@ | |||
| 1 | /* crypto/md4/md4.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <stdlib.h> | ||
| 61 | #include <openssl/md4.h> | ||
| 62 | |||
| 63 | #define BUFSIZE 1024*16 | ||
| 64 | |||
| 65 | void do_fp(FILE *f); | ||
| 66 | void pt(unsigned char *md); | ||
| 67 | #ifndef _OSD_POSIX | ||
| 68 | int read(int, void *, unsigned int); | ||
| 69 | #endif | ||
| 70 | |||
| 71 | int main(int argc, char **argv) | ||
| 72 | { | ||
| 73 | int i,err=0; | ||
| 74 | FILE *IN; | ||
| 75 | |||
| 76 | if (argc == 1) | ||
| 77 | { | ||
| 78 | do_fp(stdin); | ||
| 79 | } | ||
| 80 | else | ||
| 81 | { | ||
| 82 | for (i=1; i<argc; i++) | ||
| 83 | { | ||
| 84 | IN=fopen(argv[i],"r"); | ||
| 85 | if (IN == NULL) | ||
| 86 | { | ||
| 87 | perror(argv[i]); | ||
| 88 | err++; | ||
| 89 | continue; | ||
| 90 | } | ||
| 91 | printf("MD4(%s)= ",argv[i]); | ||
| 92 | do_fp(IN); | ||
| 93 | fclose(IN); | ||
| 94 | } | ||
| 95 | } | ||
| 96 | exit(err); | ||
| 97 | } | ||
| 98 | |||
| 99 | void do_fp(FILE *f) | ||
| 100 | { | ||
| 101 | MD4_CTX c; | ||
| 102 | unsigned char md[MD4_DIGEST_LENGTH]; | ||
| 103 | int fd; | ||
| 104 | int i; | ||
| 105 | static unsigned char buf[BUFSIZE]; | ||
| 106 | |||
| 107 | fd=fileno(f); | ||
| 108 | MD4_Init(&c); | ||
| 109 | for (;;) | ||
| 110 | { | ||
| 111 | i=read(fd,buf,BUFSIZE); | ||
| 112 | if (i <= 0) break; | ||
| 113 | MD4_Update(&c,buf,(unsigned long)i); | ||
| 114 | } | ||
| 115 | MD4_Final(&(md[0]),&c); | ||
| 116 | pt(md); | ||
| 117 | } | ||
| 118 | |||
| 119 | void pt(unsigned char *md) | ||
| 120 | { | ||
| 121 | int i; | ||
| 122 | |||
| 123 | for (i=0; i<MD4_DIGEST_LENGTH; i++) | ||
| 124 | printf("%02x",md[i]); | ||
| 125 | printf("\n"); | ||
| 126 | } | ||
| 127 | |||
diff --git a/src/lib/libssl/src/apps/nseq.c b/src/lib/libssl/src/apps/nseq.c index cc88d50ceb..1d73d1ad52 100644 --- a/src/lib/libssl/src/apps/nseq.c +++ b/src/lib/libssl/src/apps/nseq.c | |||
| @@ -119,11 +119,18 @@ int MAIN(int argc, char **argv) | |||
| 119 | "Can't open output file %s\n", outfile); | 119 | "Can't open output file %s\n", outfile); |
| 120 | goto end; | 120 | goto end; |
| 121 | } | 121 | } |
| 122 | } else out = BIO_new_fp(stdout, BIO_NOCLOSE); | 122 | } else { |
| 123 | 123 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | |
| 124 | #ifdef VMS | ||
| 125 | { | ||
| 126 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 127 | out = BIO_push(tmpbio, out); | ||
| 128 | } | ||
| 129 | #endif | ||
| 130 | } | ||
| 124 | if (toseq) { | 131 | if (toseq) { |
| 125 | seq = NETSCAPE_CERT_SEQUENCE_new(); | 132 | seq = NETSCAPE_CERT_SEQUENCE_new(); |
| 126 | seq->certs = sk_X509_new(NULL); | 133 | seq->certs = sk_X509_new_null(); |
| 127 | while((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL))) | 134 | while((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL))) |
| 128 | sk_X509_push(seq->certs,x509); | 135 | sk_X509_push(seq->certs,x509); |
| 129 | 136 | ||
| @@ -152,7 +159,7 @@ int MAIN(int argc, char **argv) | |||
| 152 | ret = 0; | 159 | ret = 0; |
| 153 | end: | 160 | end: |
| 154 | BIO_free(in); | 161 | BIO_free(in); |
| 155 | BIO_free(out); | 162 | BIO_free_all(out); |
| 156 | NETSCAPE_CERT_SEQUENCE_free(seq); | 163 | NETSCAPE_CERT_SEQUENCE_free(seq); |
| 157 | 164 | ||
| 158 | EXIT(ret); | 165 | EXIT(ret); |
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c index a2a263062d..4f61006b73 100644 --- a/src/lib/libssl/src/apps/openssl.c +++ b/src/lib/libssl/src/apps/openssl.c | |||
| @@ -101,6 +101,8 @@ int main(int Argc, char *Argv[]) | |||
| 101 | arg.data=NULL; | 101 | arg.data=NULL; |
| 102 | arg.count=0; | 102 | arg.count=0; |
| 103 | 103 | ||
| 104 | if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) | ||
| 105 | CRYPTO_malloc_debug_init(); | ||
| 104 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | 106 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); |
| 105 | 107 | ||
| 106 | apps_startup(); | 108 | apps_startup(); |
| @@ -201,7 +203,7 @@ end: | |||
| 201 | config=NULL; | 203 | config=NULL; |
| 202 | } | 204 | } |
| 203 | if (prog != NULL) lh_free(prog); | 205 | if (prog != NULL) lh_free(prog); |
| 204 | if (arg.data != NULL) Free(arg.data); | 206 | if (arg.data != NULL) OPENSSL_free(arg.data); |
| 205 | ERR_remove_state(0); | 207 | ERR_remove_state(0); |
| 206 | 208 | ||
| 207 | EVP_cleanup(); | 209 | EVP_cleanup(); |
| @@ -236,13 +238,19 @@ static int do_cmd(LHASH *prog, int argc, char *argv[]) | |||
| 236 | else if ((strncmp(argv[0],"no-",3)) == 0) | 238 | else if ((strncmp(argv[0],"no-",3)) == 0) |
| 237 | { | 239 | { |
| 238 | BIO *bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE); | 240 | BIO *bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE); |
| 241 | #ifdef VMS | ||
| 242 | { | ||
| 243 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 244 | bio_stdout = BIO_push(tmpbio, bio_stdout); | ||
| 245 | } | ||
| 246 | #endif | ||
| 239 | f.name=argv[0]+3; | 247 | f.name=argv[0]+3; |
| 240 | ret = (lh_retrieve(prog,&f) != NULL); | 248 | ret = (lh_retrieve(prog,&f) != NULL); |
| 241 | if (!ret) | 249 | if (!ret) |
| 242 | BIO_printf(bio_stdout, "%s\n", argv[0]); | 250 | BIO_printf(bio_stdout, "%s\n", argv[0]); |
| 243 | else | 251 | else |
| 244 | BIO_printf(bio_stdout, "%s\n", argv[0]+3); | 252 | BIO_printf(bio_stdout, "%s\n", argv[0]+3); |
| 245 | BIO_free(bio_stdout); | 253 | BIO_free_all(bio_stdout); |
| 246 | goto end; | 254 | goto end; |
| 247 | } | 255 | } |
| 248 | else if ((strcmp(argv[0],"quit") == 0) || | 256 | else if ((strcmp(argv[0],"quit") == 0) || |
| @@ -267,11 +275,17 @@ static int do_cmd(LHASH *prog, int argc, char *argv[]) | |||
| 267 | else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */ | 275 | else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */ |
| 268 | list_type = FUNC_TYPE_CIPHER; | 276 | list_type = FUNC_TYPE_CIPHER; |
| 269 | bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE); | 277 | bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE); |
| 278 | #ifdef VMS | ||
| 279 | { | ||
| 280 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 281 | bio_stdout = BIO_push(tmpbio, bio_stdout); | ||
| 282 | } | ||
| 283 | #endif | ||
| 270 | 284 | ||
| 271 | for (fp=functions; fp->name != NULL; fp++) | 285 | for (fp=functions; fp->name != NULL; fp++) |
| 272 | if (fp->type == list_type) | 286 | if (fp->type == list_type) |
| 273 | BIO_printf(bio_stdout, "%s\n", fp->name); | 287 | BIO_printf(bio_stdout, "%s\n", fp->name); |
| 274 | BIO_free(bio_stdout); | 288 | BIO_free_all(bio_stdout); |
| 275 | ret=0; | 289 | ret=0; |
| 276 | goto end; | 290 | goto end; |
| 277 | } | 291 | } |
diff --git a/src/lib/libssl/src/apps/passwd.c b/src/lib/libssl/src/apps/passwd.c index c7e21d2081..6851a9927d 100644 --- a/src/lib/libssl/src/apps/passwd.c +++ b/src/lib/libssl/src/apps/passwd.c | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | /* apps/passwd.c */ | 1 | /* apps/passwd.c */ |
| 2 | 2 | ||
| 3 | #if defined NO_MD5 || defined CHARSET_EBCDIC | 3 | #if defined NO_MD5 || defined CHARSET_EBCDIC |
| 4 | # define NO_APR1 | 4 | # define NO_MD5CRYPT_1 |
| 5 | #endif | 5 | #endif |
| 6 | 6 | ||
| 7 | #if !defined(NO_DES) || !defined(NO_APR1) | 7 | #if !defined(NO_DES) || !defined(NO_MD5CRYPT_1) |
| 8 | 8 | ||
| 9 | #include <assert.h> | 9 | #include <assert.h> |
| 10 | #include <string.h> | 10 | #include <string.h> |
| @@ -19,7 +19,7 @@ | |||
| 19 | #ifndef NO_DES | 19 | #ifndef NO_DES |
| 20 | # include <openssl/des.h> | 20 | # include <openssl/des.h> |
| 21 | #endif | 21 | #endif |
| 22 | #ifndef NO_APR1 | 22 | #ifndef NO_MD5CRYPT_1 |
| 23 | # include <openssl/md5.h> | 23 | # include <openssl/md5.h> |
| 24 | #endif | 24 | #endif |
| 25 | 25 | ||
| @@ -42,10 +42,11 @@ static unsigned const char cov_2char[64]={ | |||
| 42 | 42 | ||
| 43 | static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, | 43 | static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, |
| 44 | char *passwd, BIO *out, int quiet, int table, int reverse, | 44 | char *passwd, BIO *out, int quiet, int table, int reverse, |
| 45 | size_t pw_maxlen, int usecrypt, int useapr1); | 45 | size_t pw_maxlen, int usecrypt, int use1, int useapr1); |
| 46 | 46 | ||
| 47 | /* -crypt - standard Unix password algorithm (default, only choice) | 47 | /* -crypt - standard Unix password algorithm (default) |
| 48 | * -apr1 - MD5-based password algorithm | 48 | * -1 - MD5-based password algorithm |
| 49 | * -apr1 - MD5-based password algorithm, Apache variant | ||
| 49 | * -salt string - salt | 50 | * -salt string - salt |
| 50 | * -in file - read passwords from file | 51 | * -in file - read passwords from file |
| 51 | * -stdin - read passwords from stdin | 52 | * -stdin - read passwords from stdin |
| @@ -63,11 +64,12 @@ int MAIN(int argc, char **argv) | |||
| 63 | int in_stdin = 0; | 64 | int in_stdin = 0; |
| 64 | char *salt = NULL, *passwd = NULL, **passwds = NULL; | 65 | char *salt = NULL, *passwd = NULL, **passwds = NULL; |
| 65 | char *salt_malloc = NULL, *passwd_malloc = NULL; | 66 | char *salt_malloc = NULL, *passwd_malloc = NULL; |
| 67 | size_t passwd_malloc_size = 0; | ||
| 66 | int pw_source_defined = 0; | 68 | int pw_source_defined = 0; |
| 67 | BIO *in = NULL, *out = NULL; | 69 | BIO *in = NULL, *out = NULL; |
| 68 | int i, badopt, opt_done; | 70 | int i, badopt, opt_done; |
| 69 | int passed_salt = 0, quiet = 0, table = 0, reverse = 0; | 71 | int passed_salt = 0, quiet = 0, table = 0, reverse = 0; |
| 70 | int usecrypt = 0, useapr1 = 0; | 72 | int usecrypt = 0, use1 = 0, useapr1 = 0; |
| 71 | size_t pw_maxlen = 0; | 73 | size_t pw_maxlen = 0; |
| 72 | 74 | ||
| 73 | apps_startup(); | 75 | apps_startup(); |
| @@ -79,6 +81,12 @@ int MAIN(int argc, char **argv) | |||
| 79 | if (out == NULL) | 81 | if (out == NULL) |
| 80 | goto err; | 82 | goto err; |
| 81 | BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT); | 83 | BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT); |
| 84 | #ifdef VMS | ||
| 85 | { | ||
| 86 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 87 | out = BIO_push(tmpbio, out); | ||
| 88 | } | ||
| 89 | #endif | ||
| 82 | 90 | ||
| 83 | badopt = 0, opt_done = 0; | 91 | badopt = 0, opt_done = 0; |
| 84 | i = 0; | 92 | i = 0; |
| @@ -86,6 +94,8 @@ int MAIN(int argc, char **argv) | |||
| 86 | { | 94 | { |
| 87 | if (strcmp(argv[i], "-crypt") == 0) | 95 | if (strcmp(argv[i], "-crypt") == 0) |
| 88 | usecrypt = 1; | 96 | usecrypt = 1; |
| 97 | else if (strcmp(argv[i], "-1") == 0) | ||
| 98 | use1 = 1; | ||
| 89 | else if (strcmp(argv[i], "-apr1") == 0) | 99 | else if (strcmp(argv[i], "-apr1") == 0) |
| 90 | useapr1 = 1; | 100 | useapr1 = 1; |
| 91 | else if (strcmp(argv[i], "-salt") == 0) | 101 | else if (strcmp(argv[i], "-salt") == 0) |
| @@ -137,17 +147,17 @@ int MAIN(int argc, char **argv) | |||
| 137 | badopt = 1; | 147 | badopt = 1; |
| 138 | } | 148 | } |
| 139 | 149 | ||
| 140 | if (!usecrypt && !useapr1) /* use default */ | 150 | if (!usecrypt && !use1 && !useapr1) /* use default */ |
| 141 | usecrypt = 1; | 151 | usecrypt = 1; |
| 142 | if (usecrypt + useapr1 > 1) /* conflict */ | 152 | if (usecrypt + use1 + useapr1 > 1) /* conflict */ |
| 143 | badopt = 1; | 153 | badopt = 1; |
| 144 | 154 | ||
| 145 | /* reject unsupported algorithms */ | 155 | /* reject unsupported algorithms */ |
| 146 | #ifdef NO_DES | 156 | #ifdef NO_DES |
| 147 | if (usecrypt) badopt = 1; | 157 | if (usecrypt) badopt = 1; |
| 148 | #endif | 158 | #endif |
| 149 | #ifdef NO_APR1 | 159 | #ifdef NO_MD5CRYPT_1 |
| 150 | if (useapr1) badopt = 1; | 160 | if (use1 || useapr1) badopt = 1; |
| 151 | #endif | 161 | #endif |
| 152 | 162 | ||
| 153 | if (badopt) | 163 | if (badopt) |
| @@ -157,8 +167,9 @@ int MAIN(int argc, char **argv) | |||
| 157 | #ifndef NO_DES | 167 | #ifndef NO_DES |
| 158 | BIO_printf(bio_err, "-crypt standard Unix password algorithm (default)\n"); | 168 | BIO_printf(bio_err, "-crypt standard Unix password algorithm (default)\n"); |
| 159 | #endif | 169 | #endif |
| 160 | #ifndef NO_APR1 | 170 | #ifndef NO_MD5CRYPT_1 |
| 161 | BIO_printf(bio_err, "-apr1 MD5-based password algorithm\n"); | 171 | BIO_printf(bio_err, "-1 MD5-based password algorithm\n"); |
| 172 | BIO_printf(bio_err, "-apr1 MD5-based password algorithm, Apache variant\n"); | ||
| 162 | #endif | 173 | #endif |
| 163 | BIO_printf(bio_err, "-salt string use provided salt\n"); | 174 | BIO_printf(bio_err, "-salt string use provided salt\n"); |
| 164 | BIO_printf(bio_err, "-in file read passwords from file\n"); | 175 | BIO_printf(bio_err, "-in file read passwords from file\n"); |
| @@ -190,13 +201,16 @@ int MAIN(int argc, char **argv) | |||
| 190 | 201 | ||
| 191 | if (usecrypt) | 202 | if (usecrypt) |
| 192 | pw_maxlen = 8; | 203 | pw_maxlen = 8; |
| 193 | else if (useapr1) | 204 | else if (use1 || useapr1) |
| 194 | pw_maxlen = 256; /* arbitrary limit, should be enough for most passwords */ | 205 | pw_maxlen = 256; /* arbitrary limit, should be enough for most passwords */ |
| 195 | 206 | ||
| 196 | if (passwds == NULL) | 207 | if (passwds == NULL) |
| 197 | { | 208 | { |
| 198 | /* no passwords on the command line */ | 209 | /* no passwords on the command line */ |
| 199 | passwd = passwd_malloc = Malloc(pw_maxlen + 1); | 210 | |
| 211 | passwd_malloc_size = pw_maxlen + 2; | ||
| 212 | /* longer than necessary so that we can warn about truncation */ | ||
| 213 | passwd = passwd_malloc = OPENSSL_malloc(passwd_malloc_size); | ||
| 200 | if (passwd_malloc == NULL) | 214 | if (passwd_malloc == NULL) |
| 201 | goto err; | 215 | goto err; |
| 202 | } | 216 | } |
| @@ -208,7 +222,7 @@ int MAIN(int argc, char **argv) | |||
| 208 | 222 | ||
| 209 | passwds = passwds_static; | 223 | passwds = passwds_static; |
| 210 | if (in == NULL) | 224 | if (in == NULL) |
| 211 | if (EVP_read_pw_string(passwd_malloc, pw_maxlen + 1, "Password: ", 0) != 0) | 225 | if (EVP_read_pw_string(passwd_malloc, passwd_malloc_size, "Password: ", 0) != 0) |
| 212 | goto err; | 226 | goto err; |
| 213 | passwds[0] = passwd_malloc; | 227 | passwds[0] = passwd_malloc; |
| 214 | } | 228 | } |
| @@ -222,7 +236,7 @@ int MAIN(int argc, char **argv) | |||
| 222 | { | 236 | { |
| 223 | passwd = *passwds++; | 237 | passwd = *passwds++; |
| 224 | if (!do_passwd(passed_salt, &salt, &salt_malloc, passwd, out, | 238 | if (!do_passwd(passed_salt, &salt, &salt_malloc, passwd, out, |
| 225 | quiet, table, reverse, pw_maxlen, usecrypt, useapr1)) | 239 | quiet, table, reverse, pw_maxlen, usecrypt, use1, useapr1)) |
| 226 | goto err; | 240 | goto err; |
| 227 | } | 241 | } |
| 228 | while (*passwds != NULL); | 242 | while (*passwds != NULL); |
| @@ -251,7 +265,7 @@ int MAIN(int argc, char **argv) | |||
| 251 | } | 265 | } |
| 252 | 266 | ||
| 253 | if (!do_passwd(passed_salt, &salt, &salt_malloc, passwd, out, | 267 | if (!do_passwd(passed_salt, &salt, &salt_malloc, passwd, out, |
| 254 | quiet, table, reverse, pw_maxlen, usecrypt, useapr1)) | 268 | quiet, table, reverse, pw_maxlen, usecrypt, use1, useapr1)) |
| 255 | goto err; | 269 | goto err; |
| 256 | } | 270 | } |
| 257 | done = (r <= 0); | 271 | done = (r <= 0); |
| @@ -262,22 +276,29 @@ int MAIN(int argc, char **argv) | |||
| 262 | err: | 276 | err: |
| 263 | ERR_print_errors(bio_err); | 277 | ERR_print_errors(bio_err); |
| 264 | if (salt_malloc) | 278 | if (salt_malloc) |
| 265 | Free(salt_malloc); | 279 | OPENSSL_free(salt_malloc); |
| 266 | if (passwd_malloc) | 280 | if (passwd_malloc) |
| 267 | Free(passwd_malloc); | 281 | OPENSSL_free(passwd_malloc); |
| 268 | if (in) | 282 | if (in) |
| 269 | BIO_free(in); | 283 | BIO_free(in); |
| 270 | if (out) | 284 | if (out) |
| 271 | BIO_free(out); | 285 | BIO_free_all(out); |
| 272 | EXIT(ret); | 286 | EXIT(ret); |
| 273 | } | 287 | } |
| 274 | 288 | ||
| 275 | 289 | ||
| 276 | #ifndef NO_APR1 | 290 | #ifndef NO_MD5CRYPT_1 |
| 277 | /* MD5-based password algorithm compatible to the one found in Apache | 291 | /* MD5-based password algorithm (should probably be available as a library |
| 278 | * (should probably be available as a library function; | 292 | * function; then the static buffer would not be acceptable). |
| 279 | * then the static buffer would not be acceptable) */ | 293 | * For magic string "1", this should be compatible to the MD5-based BSD |
| 280 | static char *apr1_crypt(const char *passwd, const char *salt) | 294 | * password algorithm. |
| 295 | * For 'magic' string "apr1", this is compatible to the MD5-based Apache | ||
| 296 | * password algorithm. | ||
| 297 | * (Apparently, the Apache password algorithm is identical except that the | ||
| 298 | * 'magic' string was changed -- the laziest application of the NIH principle | ||
| 299 | * I've ever encountered.) | ||
| 300 | */ | ||
| 301 | static char *md5crypt(const char *passwd, const char *magic, const char *salt) | ||
| 281 | { | 302 | { |
| 282 | static char out_buf[6 + 9 + 24 + 2]; /* "$apr1$..salt..$.......md5hash..........\0" */ | 303 | static char out_buf[6 + 9 + 24 + 2]; /* "$apr1$..salt..$.......md5hash..........\0" */ |
| 283 | unsigned char buf[MD5_DIGEST_LENGTH]; | 304 | unsigned char buf[MD5_DIGEST_LENGTH]; |
| @@ -287,7 +308,11 @@ static char *apr1_crypt(const char *passwd, const char *salt) | |||
| 287 | size_t passwd_len, salt_len; | 308 | size_t passwd_len, salt_len; |
| 288 | 309 | ||
| 289 | passwd_len = strlen(passwd); | 310 | passwd_len = strlen(passwd); |
| 290 | strcpy(out_buf, "$apr1$"); | 311 | out_buf[0] = '$'; |
| 312 | out_buf[1] = 0; | ||
| 313 | assert(strlen(magic) <= 4); /* "1" or "apr1" */ | ||
| 314 | strncat(out_buf, magic, 4); | ||
| 315 | strncat(out_buf, "$", 1); | ||
| 291 | strncat(out_buf, salt, 8); | 316 | strncat(out_buf, salt, 8); |
| 292 | assert(strlen(out_buf) <= 6 + 8); /* "$apr1$..salt.." */ | 317 | assert(strlen(out_buf) <= 6 + 8); /* "$apr1$..salt.." */ |
| 293 | salt_out = out_buf + 6; | 318 | salt_out = out_buf + 6; |
| @@ -296,7 +321,9 @@ static char *apr1_crypt(const char *passwd, const char *salt) | |||
| 296 | 321 | ||
| 297 | MD5_Init(&md); | 322 | MD5_Init(&md); |
| 298 | MD5_Update(&md, passwd, passwd_len); | 323 | MD5_Update(&md, passwd, passwd_len); |
| 299 | MD5_Update(&md, "$apr1$", 6); | 324 | MD5_Update(&md, "$", 1); |
| 325 | MD5_Update(&md, magic, strlen(magic)); | ||
| 326 | MD5_Update(&md, "$", 1); | ||
| 300 | MD5_Update(&md, salt_out, salt_len); | 327 | MD5_Update(&md, salt_out, salt_len); |
| 301 | 328 | ||
| 302 | { | 329 | { |
| @@ -380,7 +407,7 @@ static char *apr1_crypt(const char *passwd, const char *salt) | |||
| 380 | 407 | ||
| 381 | static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, | 408 | static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, |
| 382 | char *passwd, BIO *out, int quiet, int table, int reverse, | 409 | char *passwd, BIO *out, int quiet, int table, int reverse, |
| 383 | size_t pw_maxlen, int usecrypt, int useapr1) | 410 | size_t pw_maxlen, int usecrypt, int use1, int useapr1) |
| 384 | { | 411 | { |
| 385 | char *hash = NULL; | 412 | char *hash = NULL; |
| 386 | 413 | ||
| @@ -395,7 +422,7 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, | |||
| 395 | { | 422 | { |
| 396 | if (*salt_malloc_p == NULL) | 423 | if (*salt_malloc_p == NULL) |
| 397 | { | 424 | { |
| 398 | *salt_p = *salt_malloc_p = Malloc(3); | 425 | *salt_p = *salt_malloc_p = OPENSSL_malloc(3); |
| 399 | if (*salt_malloc_p == NULL) | 426 | if (*salt_malloc_p == NULL) |
| 400 | goto err; | 427 | goto err; |
| 401 | } | 428 | } |
| @@ -411,14 +438,14 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, | |||
| 411 | } | 438 | } |
| 412 | #endif /* !NO_DES */ | 439 | #endif /* !NO_DES */ |
| 413 | 440 | ||
| 414 | #ifndef NO_APR1 | 441 | #ifndef NO_MD5CRYPT_1 |
| 415 | if (useapr1) | 442 | if (use1 || useapr1) |
| 416 | { | 443 | { |
| 417 | int i; | 444 | int i; |
| 418 | 445 | ||
| 419 | if (*salt_malloc_p == NULL) | 446 | if (*salt_malloc_p == NULL) |
| 420 | { | 447 | { |
| 421 | *salt_p = *salt_malloc_p = Malloc(9); | 448 | *salt_p = *salt_malloc_p = OPENSSL_malloc(9); |
| 422 | if (*salt_malloc_p == NULL) | 449 | if (*salt_malloc_p == NULL) |
| 423 | goto err; | 450 | goto err; |
| 424 | } | 451 | } |
| @@ -429,7 +456,7 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, | |||
| 429 | (*salt_p)[i] = cov_2char[(*salt_p)[i] & 0x3f]; /* 6 bits */ | 456 | (*salt_p)[i] = cov_2char[(*salt_p)[i] & 0x3f]; /* 6 bits */ |
| 430 | (*salt_p)[8] = 0; | 457 | (*salt_p)[8] = 0; |
| 431 | } | 458 | } |
| 432 | #endif /* !NO_APR1 */ | 459 | #endif /* !NO_MD5CRYPT_1 */ |
| 433 | } | 460 | } |
| 434 | 461 | ||
| 435 | assert(*salt_p != NULL); | 462 | assert(*salt_p != NULL); |
| @@ -448,9 +475,9 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, | |||
| 448 | if (usecrypt) | 475 | if (usecrypt) |
| 449 | hash = des_crypt(passwd, *salt_p); | 476 | hash = des_crypt(passwd, *salt_p); |
| 450 | #endif | 477 | #endif |
| 451 | #ifndef NO_APR1 | 478 | #ifndef NO_MD5CRYPT_1 |
| 452 | if (useapr1) | 479 | if (use1 || useapr1) |
| 453 | hash = apr1_crypt(passwd, *salt_p); | 480 | hash = md5crypt(passwd, (use1 ? "1" : "apr1"), *salt_p); |
| 454 | #endif | 481 | #endif |
| 455 | assert(hash != NULL); | 482 | assert(hash != NULL); |
| 456 | 483 | ||
diff --git a/src/lib/libssl/src/apps/pem_mail.c b/src/lib/libssl/src/apps/pem_mail.c index f85c7b1c83..e69de29bb2 100644 --- a/src/lib/libssl/src/apps/pem_mail.c +++ b/src/lib/libssl/src/apps/pem_mail.c | |||
| @@ -1,170 +0,0 @@ | |||
| 1 | /* apps/pem_mail.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include <openssl/rsa.h> | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | #include <openssl/x509.h> | ||
| 65 | #include <openssl/err.h> | ||
| 66 | #include <openssl/pem.h> | ||
| 67 | #include "apps.h" | ||
| 68 | |||
| 69 | #undef PROG | ||
| 70 | #define PROG pem_mail_main | ||
| 71 | |||
| 72 | static char *usage[]={ | ||
| 73 | "usage: pem_mail args\n", | ||
| 74 | "\n", | ||
| 75 | " -in arg - input file - default stdin\n", | ||
| 76 | " -out arg - output file - default stdout\n", | ||
| 77 | " -cert arg - the certificate to use\n", | ||
| 78 | " -key arg - the private key to use\n", | ||
| 79 | " -MIC - sign the message\n", | ||
| 80 | " -enc arg - encrypt with one of cbc-des\n", | ||
| 81 | NULL | ||
| 82 | }; | ||
| 83 | |||
| 84 | |||
| 85 | typedef struct lines_St | ||
| 86 | { | ||
| 87 | char *line; | ||
| 88 | struct lines_st *next; | ||
| 89 | } LINES; | ||
| 90 | |||
| 91 | int main(int argc, char **argv) | ||
| 92 | { | ||
| 93 | FILE *in; | ||
| 94 | RSA *rsa=NULL; | ||
| 95 | EVP_MD_CTX ctx; | ||
| 96 | unsigned int mic=0,i,n; | ||
| 97 | unsigned char buf[1024*15]; | ||
| 98 | char *prog,*infile=NULL,*outfile=NULL,*key=NULL; | ||
| 99 | int badops=0; | ||
| 100 | |||
| 101 | apps_startup(); | ||
| 102 | |||
| 103 | prog=argv[0]; | ||
| 104 | argc--; | ||
| 105 | argv++; | ||
| 106 | while (argc >= 1) | ||
| 107 | { | ||
| 108 | if (strcmp(*argv,"-key") == 0) | ||
| 109 | { | ||
| 110 | if (--argc < 1) goto bad; | ||
| 111 | key= *(++argv); | ||
| 112 | } | ||
| 113 | else if (strcmp(*argv,"-in") == 0) | ||
| 114 | { | ||
| 115 | if (--argc < 1) goto bad; | ||
| 116 | infile= *(++argv); | ||
| 117 | } | ||
| 118 | else if (strcmp(*argv,"-out") == 0) | ||
| 119 | { | ||
| 120 | if (--argc < 1) goto bad; | ||
| 121 | outfile= *(++argv); | ||
| 122 | } | ||
| 123 | else if (strcmp(*argv,"-mic") == 0) | ||
| 124 | mic=1; | ||
| 125 | else | ||
| 126 | { | ||
| 127 | BIO_printf(bio_err,"unknown option %s\n",*argv); | ||
| 128 | badops=1; | ||
| 129 | break; | ||
| 130 | } | ||
| 131 | argc--; | ||
| 132 | argv++; | ||
| 133 | } | ||
| 134 | |||
| 135 | if (badops) | ||
| 136 | { | ||
| 137 | bad: | ||
| 138 | BIO_printf(bio_err,"%s [options] <infile >outfile\n",prog); | ||
| 139 | BIO_printf(bio_err,"where options are\n"); | ||
| 140 | EXIT(1); | ||
| 141 | } | ||
| 142 | |||
| 143 | if (key == NULL) | ||
| 144 | { BIO_printf(bio_err,"you need to specify a key\n"); EXIT(1); } | ||
| 145 | in=fopen(key,"r"); | ||
| 146 | if (in == NULL) { perror(key); EXIT(1); } | ||
| 147 | rsa=PEM_read_RSAPrivateKey(in,NULL,NULL); | ||
| 148 | if (rsa == NULL) | ||
| 149 | { | ||
| 150 | BIO_printf(bio_err,"unable to load Private Key\n"); | ||
| 151 | ERR_print_errors(bio_err); | ||
| 152 | EXIT(1); | ||
| 153 | } | ||
| 154 | fclose(in); | ||
| 155 | |||
| 156 | PEM_SignInit(&ctx,EVP_md5()); | ||
| 157 | for (;;) | ||
| 158 | { | ||
| 159 | i=fread(buf,1,1024*10,stdin); | ||
| 160 | if (i <= 0) break; | ||
| 161 | PEM_SignUpdate(&ctx,buf,i); | ||
| 162 | } | ||
| 163 | if (!PEM_SignFinal(&ctx,buf,&n,rsa)) goto err; | ||
| 164 | BIO_printf(bio_err,"%s\n",buf); | ||
| 165 | EXIT(0); | ||
| 166 | err: | ||
| 167 | ERR_print_errors(bio_err); | ||
| 168 | EXIT(1); | ||
| 169 | } | ||
| 170 | #endif | ||
diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c index bf76864713..365a8ada93 100644 --- a/src/lib/libssl/src/apps/pkcs12.c +++ b/src/lib/libssl/src/apps/pkcs12.c | |||
| @@ -66,6 +66,7 @@ | |||
| 66 | #include <openssl/err.h> | 66 | #include <openssl/err.h> |
| 67 | #include <openssl/pem.h> | 67 | #include <openssl/pem.h> |
| 68 | #include <openssl/pkcs12.h> | 68 | #include <openssl/pkcs12.h> |
| 69 | #include <openssl/engine.h> | ||
| 69 | 70 | ||
| 70 | #define PROG pkcs12_main | 71 | #define PROG pkcs12_main |
| 71 | 72 | ||
| @@ -78,9 +79,10 @@ EVP_CIPHER *enc; | |||
| 78 | #define CLCERTS 0x8 | 79 | #define CLCERTS 0x8 |
| 79 | #define CACERTS 0x10 | 80 | #define CACERTS 0x10 |
| 80 | 81 | ||
| 81 | int get_cert_chain(X509 *cert, STACK_OF(X509) **chain); | 82 | int get_cert_chain (X509 *cert, X509_STORE *store, STACK_OF(X509) **chain); |
| 82 | int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options, char *pempass); | 83 | int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options, char *pempass); |
| 83 | int dump_certs_pkeys_bags(BIO *out, STACK *bags, char *pass, int passlen, int options, char *pempass); | 84 | int dump_certs_pkeys_bags(BIO *out, STACK_OF(PKCS12_SAFEBAG) *bags, char *pass, |
| 85 | int passlen, int options, char *pempass); | ||
| 84 | int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, char *pass, int passlen, int options, char *pempass); | 86 | int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, char *pass, int passlen, int options, char *pempass); |
| 85 | int print_attribs(BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst, char *name); | 87 | int print_attribs(BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst, char *name); |
| 86 | void hex_prin(BIO *out, unsigned char *buf, int len); | 88 | void hex_prin(BIO *out, unsigned char *buf, int len); |
| @@ -91,6 +93,7 @@ int MAIN(int, char **); | |||
| 91 | 93 | ||
| 92 | int MAIN(int argc, char **argv) | 94 | int MAIN(int argc, char **argv) |
| 93 | { | 95 | { |
| 96 | ENGINE *e = NULL; | ||
| 94 | char *infile=NULL, *outfile=NULL, *keyname = NULL; | 97 | char *infile=NULL, *outfile=NULL, *keyname = NULL; |
| 95 | char *certfile=NULL; | 98 | char *certfile=NULL; |
| 96 | BIO *in=NULL, *out = NULL, *inkey = NULL, *certsin = NULL; | 99 | BIO *in=NULL, *out = NULL, *inkey = NULL, *certsin = NULL; |
| @@ -116,6 +119,8 @@ int MAIN(int argc, char **argv) | |||
| 116 | char *passargin = NULL, *passargout = NULL, *passarg = NULL; | 119 | char *passargin = NULL, *passargout = NULL, *passarg = NULL; |
| 117 | char *passin = NULL, *passout = NULL; | 120 | char *passin = NULL, *passout = NULL; |
| 118 | char *inrand = NULL; | 121 | char *inrand = NULL; |
| 122 | char *CApath = NULL, *CAfile = NULL; | ||
| 123 | char *engine=NULL; | ||
| 119 | 124 | ||
| 120 | apps_startup(); | 125 | apps_startup(); |
| 121 | 126 | ||
| @@ -195,7 +200,7 @@ int MAIN(int argc, char **argv) | |||
| 195 | } else if (!strcmp (*args, "-caname")) { | 200 | } else if (!strcmp (*args, "-caname")) { |
| 196 | if (args[1]) { | 201 | if (args[1]) { |
| 197 | args++; | 202 | args++; |
| 198 | if (!canames) canames = sk_new(NULL); | 203 | if (!canames) canames = sk_new_null(); |
| 199 | sk_push(canames, *args); | 204 | sk_push(canames, *args); |
| 200 | } else badarg = 1; | 205 | } else badarg = 1; |
| 201 | } else if (!strcmp (*args, "-in")) { | 206 | } else if (!strcmp (*args, "-in")) { |
| @@ -224,6 +229,21 @@ int MAIN(int argc, char **argv) | |||
| 224 | passarg = *args; | 229 | passarg = *args; |
| 225 | noprompt = 1; | 230 | noprompt = 1; |
| 226 | } else badarg = 1; | 231 | } else badarg = 1; |
| 232 | } else if (!strcmp(*args,"-CApath")) { | ||
| 233 | if (args[1]) { | ||
| 234 | args++; | ||
| 235 | CApath = *args; | ||
| 236 | } else badarg = 1; | ||
| 237 | } else if (!strcmp(*args,"-CAfile")) { | ||
| 238 | if (args[1]) { | ||
| 239 | args++; | ||
| 240 | CAfile = *args; | ||
| 241 | } else badarg = 1; | ||
| 242 | } else if (!strcmp(*args,"-engine")) { | ||
| 243 | if (args[1]) { | ||
| 244 | args++; | ||
| 245 | engine = *args; | ||
| 246 | } else badarg = 1; | ||
| 227 | } else badarg = 1; | 247 | } else badarg = 1; |
| 228 | 248 | ||
| 229 | } else badarg = 1; | 249 | } else badarg = 1; |
| @@ -237,6 +257,8 @@ int MAIN(int argc, char **argv) | |||
| 237 | BIO_printf (bio_err, "-chain add certificate chain\n"); | 257 | BIO_printf (bio_err, "-chain add certificate chain\n"); |
| 238 | BIO_printf (bio_err, "-inkey file private key if not infile\n"); | 258 | BIO_printf (bio_err, "-inkey file private key if not infile\n"); |
| 239 | BIO_printf (bio_err, "-certfile f add all certs in f\n"); | 259 | BIO_printf (bio_err, "-certfile f add all certs in f\n"); |
| 260 | BIO_printf (bio_err, "-CApath arg - PEM format directory of CA's\n"); | ||
| 261 | BIO_printf (bio_err, "-CAfile arg - PEM format file of CA's\n"); | ||
| 240 | BIO_printf (bio_err, "-name \"name\" use name as friendly name\n"); | 262 | BIO_printf (bio_err, "-name \"name\" use name as friendly name\n"); |
| 241 | BIO_printf (bio_err, "-caname \"nm\" use nm as CA friendly name (can be used more than once).\n"); | 263 | BIO_printf (bio_err, "-caname \"nm\" use nm as CA friendly name (can be used more than once).\n"); |
| 242 | BIO_printf (bio_err, "-in infile input filename\n"); | 264 | BIO_printf (bio_err, "-in infile input filename\n"); |
| @@ -265,12 +287,27 @@ int MAIN(int argc, char **argv) | |||
| 265 | BIO_printf (bio_err, "-password p set import/export password source\n"); | 287 | BIO_printf (bio_err, "-password p set import/export password source\n"); |
| 266 | BIO_printf (bio_err, "-passin p input file pass phrase source\n"); | 288 | BIO_printf (bio_err, "-passin p input file pass phrase source\n"); |
| 267 | BIO_printf (bio_err, "-passout p output file pass phrase source\n"); | 289 | BIO_printf (bio_err, "-passout p output file pass phrase source\n"); |
| 290 | BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n"); | ||
| 268 | BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 291 | BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); |
| 269 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); | 292 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); |
| 270 | BIO_printf(bio_err, " the random number generator\n"); | 293 | BIO_printf(bio_err, " the random number generator\n"); |
| 271 | goto end; | 294 | goto end; |
| 272 | } | 295 | } |
| 273 | 296 | ||
| 297 | if (engine != NULL) { | ||
| 298 | if((e = ENGINE_by_id(engine)) == NULL) { | ||
| 299 | BIO_printf(bio_err,"invalid engine \"%s\"\n", engine); | ||
| 300 | goto end; | ||
| 301 | } | ||
| 302 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { | ||
| 303 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 304 | goto end; | ||
| 305 | } | ||
| 306 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 307 | /* Free our "structural" reference. */ | ||
| 308 | ENGINE_free(e); | ||
| 309 | } | ||
| 310 | |||
| 274 | if(passarg) { | 311 | if(passarg) { |
| 275 | if(export_cert) passargout = passarg; | 312 | if(export_cert) passargout = passarg; |
| 276 | else passargin = passarg; | 313 | else passargin = passarg; |
| @@ -336,8 +373,15 @@ int MAIN(int argc, char **argv) | |||
| 336 | CRYPTO_push_info("write files"); | 373 | CRYPTO_push_info("write files"); |
| 337 | #endif | 374 | #endif |
| 338 | 375 | ||
| 339 | if (!outfile) out = BIO_new_fp(stdout, BIO_NOCLOSE); | 376 | if (!outfile) { |
| 340 | else out = BIO_new_file(outfile, "wb"); | 377 | out = BIO_new_fp(stdout, BIO_NOCLOSE); |
| 378 | #ifdef VMS | ||
| 379 | { | ||
| 380 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 381 | out = BIO_push(tmpbio, out); | ||
| 382 | } | ||
| 383 | #endif | ||
| 384 | } else out = BIO_new_file(outfile, "wb"); | ||
| 341 | if (!out) { | 385 | if (!out) { |
| 342 | BIO_printf(bio_err, "Error opening output file %s\n", | 386 | BIO_printf(bio_err, "Error opening output file %s\n", |
| 343 | outfile ? outfile : "<stdout>"); | 387 | outfile ? outfile : "<stdout>"); |
| @@ -359,20 +403,22 @@ int MAIN(int argc, char **argv) | |||
| 359 | } | 403 | } |
| 360 | 404 | ||
| 361 | if (export_cert) { | 405 | if (export_cert) { |
| 362 | EVP_PKEY *key; | 406 | EVP_PKEY *key = NULL; |
| 363 | STACK *bags, *safes; | 407 | STACK_OF(PKCS12_SAFEBAG) *bags = NULL; |
| 364 | PKCS12_SAFEBAG *bag; | 408 | STACK_OF(PKCS7) *safes = NULL; |
| 365 | PKCS8_PRIV_KEY_INFO *p8; | 409 | PKCS12_SAFEBAG *bag = NULL; |
| 366 | PKCS7 *authsafe; | 410 | PKCS8_PRIV_KEY_INFO *p8 = NULL; |
| 411 | PKCS7 *authsafe = NULL; | ||
| 367 | X509 *ucert = NULL; | 412 | X509 *ucert = NULL; |
| 368 | STACK_OF(X509) *certs=NULL; | 413 | STACK_OF(X509) *certs=NULL; |
| 369 | char *catmp; | 414 | char *catmp = NULL; |
| 370 | int i; | 415 | int i; |
| 371 | unsigned char keyid[EVP_MAX_MD_SIZE]; | 416 | unsigned char keyid[EVP_MAX_MD_SIZE]; |
| 372 | unsigned int keyidlen = 0; | 417 | unsigned int keyidlen = 0; |
| 373 | 418 | ||
| 374 | #ifdef CRYPTO_MDEBUG | 419 | #ifdef CRYPTO_MDEBUG |
| 375 | CRYPTO_push_info("process -export_cert"); | 420 | CRYPTO_push_info("process -export_cert"); |
| 421 | CRYPTO_push_info("reading private key"); | ||
| 376 | #endif | 422 | #endif |
| 377 | key = PEM_read_bio_PrivateKey(inkey ? inkey : in, NULL, NULL, passin); | 423 | key = PEM_read_bio_PrivateKey(inkey ? inkey : in, NULL, NULL, passin); |
| 378 | if (!inkey) (void) BIO_reset(in); | 424 | if (!inkey) (void) BIO_reset(in); |
| @@ -380,18 +426,28 @@ int MAIN(int argc, char **argv) | |||
| 380 | if (!key) { | 426 | if (!key) { |
| 381 | BIO_printf (bio_err, "Error loading private key\n"); | 427 | BIO_printf (bio_err, "Error loading private key\n"); |
| 382 | ERR_print_errors(bio_err); | 428 | ERR_print_errors(bio_err); |
| 383 | goto end; | 429 | goto export_end; |
| 384 | } | 430 | } |
| 385 | 431 | ||
| 386 | certs = sk_X509_new(NULL); | 432 | #ifdef CRYPTO_MDEBUG |
| 433 | CRYPTO_pop_info(); | ||
| 434 | CRYPTO_push_info("reading certs from input"); | ||
| 435 | #endif | ||
| 436 | |||
| 437 | certs = sk_X509_new_null(); | ||
| 387 | 438 | ||
| 388 | /* Load in all certs in input file */ | 439 | /* Load in all certs in input file */ |
| 389 | if(!cert_load(in, certs)) { | 440 | if(!cert_load(in, certs)) { |
| 390 | BIO_printf(bio_err, "Error loading certificates from input\n"); | 441 | BIO_printf(bio_err, "Error loading certificates from input\n"); |
| 391 | ERR_print_errors(bio_err); | 442 | ERR_print_errors(bio_err); |
| 392 | goto end; | 443 | goto export_end; |
| 393 | } | 444 | } |
| 394 | 445 | ||
| 446 | #ifdef CRYPTO_MDEBUG | ||
| 447 | CRYPTO_pop_info(); | ||
| 448 | CRYPTO_push_info("reading certs from input 2"); | ||
| 449 | #endif | ||
| 450 | |||
| 395 | for(i = 0; i < sk_X509_num(certs); i++) { | 451 | for(i = 0; i < sk_X509_num(certs); i++) { |
| 396 | ucert = sk_X509_value(certs, i); | 452 | ucert = sk_X509_value(certs, i); |
| 397 | if(X509_check_private_key(ucert, key)) { | 453 | if(X509_check_private_key(ucert, key)) { |
| @@ -399,41 +455,68 @@ int MAIN(int argc, char **argv) | |||
| 399 | break; | 455 | break; |
| 400 | } | 456 | } |
| 401 | } | 457 | } |
| 402 | |||
| 403 | if(!keyidlen) { | 458 | if(!keyidlen) { |
| 459 | ucert = NULL; | ||
| 404 | BIO_printf(bio_err, "No certificate matches private key\n"); | 460 | BIO_printf(bio_err, "No certificate matches private key\n"); |
| 405 | goto end; | 461 | goto export_end; |
| 406 | } | 462 | } |
| 407 | 463 | ||
| 408 | bags = sk_new (NULL); | 464 | #ifdef CRYPTO_MDEBUG |
| 465 | CRYPTO_pop_info(); | ||
| 466 | CRYPTO_push_info("reading certs from certfile"); | ||
| 467 | #endif | ||
| 468 | |||
| 469 | bags = sk_PKCS12_SAFEBAG_new_null (); | ||
| 409 | 470 | ||
| 410 | /* Add any more certificates asked for */ | 471 | /* Add any more certificates asked for */ |
| 411 | if (certsin) { | 472 | if (certsin) { |
| 412 | if(!cert_load(certsin, certs)) { | 473 | if(!cert_load(certsin, certs)) { |
| 413 | BIO_printf(bio_err, "Error loading certificates from certfile\n"); | 474 | BIO_printf(bio_err, "Error loading certificates from certfile\n"); |
| 414 | ERR_print_errors(bio_err); | 475 | ERR_print_errors(bio_err); |
| 415 | goto end; | 476 | goto export_end; |
| 416 | } | 477 | } |
| 417 | BIO_free(certsin); | 478 | BIO_free(certsin); |
| 418 | } | 479 | } |
| 419 | 480 | ||
| 481 | #ifdef CRYPTO_MDEBUG | ||
| 482 | CRYPTO_pop_info(); | ||
| 483 | CRYPTO_push_info("building chain"); | ||
| 484 | #endif | ||
| 485 | |||
| 420 | /* If chaining get chain from user cert */ | 486 | /* If chaining get chain from user cert */ |
| 421 | if (chain) { | 487 | if (chain) { |
| 422 | int vret; | 488 | int vret; |
| 423 | STACK_OF(X509) *chain2; | 489 | STACK_OF(X509) *chain2; |
| 424 | vret = get_cert_chain (ucert, &chain2); | 490 | X509_STORE *store = X509_STORE_new(); |
| 491 | if (!store) | ||
| 492 | { | ||
| 493 | BIO_printf (bio_err, "Memory allocation error\n"); | ||
| 494 | goto export_end; | ||
| 495 | } | ||
| 496 | if (!X509_STORE_load_locations(store, CAfile, CApath)) | ||
| 497 | X509_STORE_set_default_paths (store); | ||
| 498 | |||
| 499 | vret = get_cert_chain (ucert, store, &chain2); | ||
| 500 | X509_STORE_free(store); | ||
| 501 | |||
| 502 | if (!vret) { | ||
| 503 | /* Exclude verified certificate */ | ||
| 504 | for (i = 1; i < sk_X509_num (chain2) ; i++) | ||
| 505 | sk_X509_push(certs, sk_X509_value (chain2, i)); | ||
| 506 | } | ||
| 507 | sk_X509_free(chain2); | ||
| 425 | if (vret) { | 508 | if (vret) { |
| 426 | BIO_printf (bio_err, "Error %s getting chain.\n", | 509 | BIO_printf (bio_err, "Error %s getting chain.\n", |
| 427 | X509_verify_cert_error_string(vret)); | 510 | X509_verify_cert_error_string(vret)); |
| 428 | goto end; | 511 | goto export_end; |
| 429 | } | 512 | } |
| 430 | /* Exclude verified certificate */ | ||
| 431 | for (i = 1; i < sk_X509_num (chain2) ; i++) | ||
| 432 | sk_X509_push(certs, sk_X509_value (chain2, i)); | ||
| 433 | sk_X509_free(chain2); | ||
| 434 | |||
| 435 | } | 513 | } |
| 436 | 514 | ||
| 515 | #ifdef CRYPTO_MDEBUG | ||
| 516 | CRYPTO_pop_info(); | ||
| 517 | CRYPTO_push_info("building bags"); | ||
| 518 | #endif | ||
| 519 | |||
| 437 | /* We now have loads of certificates: include them all */ | 520 | /* We now have loads of certificates: include them all */ |
| 438 | for(i = 0; i < sk_X509_num(certs); i++) { | 521 | for(i = 0; i < sk_X509_num(certs); i++) { |
| 439 | X509 *cert = NULL; | 522 | X509 *cert = NULL; |
| @@ -445,59 +528,101 @@ int MAIN(int argc, char **argv) | |||
| 445 | PKCS12_add_localkeyid(bag, keyid, keyidlen); | 528 | PKCS12_add_localkeyid(bag, keyid, keyidlen); |
| 446 | } else if((catmp = sk_shift(canames))) | 529 | } else if((catmp = sk_shift(canames))) |
| 447 | PKCS12_add_friendlyname(bag, catmp, -1); | 530 | PKCS12_add_friendlyname(bag, catmp, -1); |
| 448 | sk_push(bags, (char *)bag); | 531 | sk_PKCS12_SAFEBAG_push(bags, bag); |
| 449 | } | 532 | } |
| 450 | sk_X509_pop_free(certs, X509_free); | 533 | sk_X509_pop_free(certs, X509_free); |
| 451 | if (canames) sk_free(canames); | 534 | certs = NULL; |
| 535 | /* ucert is part of certs so it is already freed */ | ||
| 536 | ucert = NULL; | ||
| 537 | |||
| 538 | #ifdef CRYPTO_MDEBUG | ||
| 539 | CRYPTO_pop_info(); | ||
| 540 | CRYPTO_push_info("encrypting bags"); | ||
| 541 | #endif | ||
| 452 | 542 | ||
| 453 | if(!noprompt && | 543 | if(!noprompt && |
| 454 | EVP_read_pw_string(pass, 50, "Enter Export Password:", 1)) { | 544 | EVP_read_pw_string(pass, 50, "Enter Export Password:", 1)) { |
| 455 | BIO_printf (bio_err, "Can't read Password\n"); | 545 | BIO_printf (bio_err, "Can't read Password\n"); |
| 456 | goto end; | 546 | goto export_end; |
| 457 | } | 547 | } |
| 458 | if (!twopass) strcpy(macpass, pass); | 548 | if (!twopass) strcpy(macpass, pass); |
| 459 | /* Turn certbags into encrypted authsafe */ | 549 | /* Turn certbags into encrypted authsafe */ |
| 460 | authsafe = PKCS12_pack_p7encdata(cert_pbe, cpass, -1, NULL, 0, | 550 | authsafe = PKCS12_pack_p7encdata(cert_pbe, cpass, -1, NULL, 0, |
| 461 | iter, bags); | 551 | iter, bags); |
| 462 | sk_pop_free(bags, PKCS12_SAFEBAG_free); | 552 | sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); |
| 553 | bags = NULL; | ||
| 463 | 554 | ||
| 464 | if (!authsafe) { | 555 | if (!authsafe) { |
| 465 | ERR_print_errors (bio_err); | 556 | ERR_print_errors (bio_err); |
| 466 | goto end; | 557 | goto export_end; |
| 467 | } | 558 | } |
| 468 | 559 | ||
| 469 | safes = sk_new (NULL); | 560 | safes = sk_PKCS7_new_null (); |
| 470 | sk_push (safes, (char *)authsafe); | 561 | sk_PKCS7_push (safes, authsafe); |
| 562 | |||
| 563 | #ifdef CRYPTO_MDEBUG | ||
| 564 | CRYPTO_pop_info(); | ||
| 565 | CRYPTO_push_info("building shrouded key bag"); | ||
| 566 | #endif | ||
| 471 | 567 | ||
| 472 | /* Make a shrouded key bag */ | 568 | /* Make a shrouded key bag */ |
| 473 | p8 = EVP_PKEY2PKCS8 (key); | 569 | p8 = EVP_PKEY2PKCS8 (key); |
| 474 | EVP_PKEY_free(key); | ||
| 475 | if(keytype) PKCS8_add_keyusage(p8, keytype); | 570 | if(keytype) PKCS8_add_keyusage(p8, keytype); |
| 476 | bag = PKCS12_MAKE_SHKEYBAG(key_pbe, cpass, -1, NULL, 0, iter, p8); | 571 | bag = PKCS12_MAKE_SHKEYBAG(key_pbe, cpass, -1, NULL, 0, iter, p8); |
| 477 | PKCS8_PRIV_KEY_INFO_free(p8); | 572 | PKCS8_PRIV_KEY_INFO_free(p8); |
| 573 | p8 = NULL; | ||
| 478 | if (name) PKCS12_add_friendlyname (bag, name, -1); | 574 | if (name) PKCS12_add_friendlyname (bag, name, -1); |
| 479 | PKCS12_add_localkeyid (bag, keyid, keyidlen); | 575 | PKCS12_add_localkeyid (bag, keyid, keyidlen); |
| 480 | bags = sk_new(NULL); | 576 | bags = sk_PKCS12_SAFEBAG_new_null(); |
| 481 | sk_push (bags, (char *)bag); | 577 | sk_PKCS12_SAFEBAG_push (bags, bag); |
| 578 | |||
| 579 | #ifdef CRYPTO_MDEBUG | ||
| 580 | CRYPTO_pop_info(); | ||
| 581 | CRYPTO_push_info("encrypting shrouded key bag"); | ||
| 582 | #endif | ||
| 583 | |||
| 482 | /* Turn it into unencrypted safe bag */ | 584 | /* Turn it into unencrypted safe bag */ |
| 483 | authsafe = PKCS12_pack_p7data (bags); | 585 | authsafe = PKCS12_pack_p7data (bags); |
| 484 | sk_pop_free(bags, PKCS12_SAFEBAG_free); | 586 | sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); |
| 485 | sk_push (safes, (char *)authsafe); | 587 | bags = NULL; |
| 588 | sk_PKCS7_push (safes, authsafe); | ||
| 589 | |||
| 590 | #ifdef CRYPTO_MDEBUG | ||
| 591 | CRYPTO_pop_info(); | ||
| 592 | CRYPTO_push_info("building pkcs12"); | ||
| 593 | #endif | ||
| 486 | 594 | ||
| 487 | p12 = PKCS12_init (NID_pkcs7_data); | 595 | p12 = PKCS12_init (NID_pkcs7_data); |
| 488 | 596 | ||
| 489 | M_PKCS12_pack_authsafes (p12, safes); | 597 | M_PKCS12_pack_authsafes (p12, safes); |
| 490 | 598 | ||
| 491 | sk_pop_free(safes, PKCS7_free); | 599 | sk_PKCS7_pop_free(safes, PKCS7_free); |
| 600 | safes = NULL; | ||
| 492 | 601 | ||
| 493 | PKCS12_set_mac (p12, mpass, -1, NULL, 0, maciter, NULL); | 602 | PKCS12_set_mac (p12, mpass, -1, NULL, 0, maciter, NULL); |
| 494 | 603 | ||
| 495 | i2d_PKCS12_bio (out, p12); | 604 | #ifdef CRYPTO_MDEBUG |
| 605 | CRYPTO_pop_info(); | ||
| 606 | CRYPTO_push_info("writing pkcs12"); | ||
| 607 | #endif | ||
| 496 | 608 | ||
| 497 | PKCS12_free(p12); | 609 | i2d_PKCS12_bio (out, p12); |
| 498 | 610 | ||
| 499 | ret = 0; | 611 | ret = 0; |
| 500 | 612 | ||
| 613 | export_end: | ||
| 614 | #ifdef CRYPTO_MDEBUG | ||
| 615 | CRYPTO_pop_info(); | ||
| 616 | CRYPTO_pop_info(); | ||
| 617 | CRYPTO_push_info("process -export_cert: freeing"); | ||
| 618 | #endif | ||
| 619 | |||
| 620 | if (key) EVP_PKEY_free(key); | ||
| 621 | if (certs) sk_X509_pop_free(certs, X509_free); | ||
| 622 | if (safes) sk_PKCS7_pop_free(safes, PKCS7_free); | ||
| 623 | if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); | ||
| 624 | if (ucert) X509_free(ucert); | ||
| 625 | |||
| 501 | #ifdef CRYPTO_MDEBUG | 626 | #ifdef CRYPTO_MDEBUG |
| 502 | CRYPTO_pop_info(); | 627 | CRYPTO_pop_info(); |
| 503 | #endif | 628 | #endif |
| @@ -528,11 +653,16 @@ int MAIN(int argc, char **argv) | |||
| 528 | #ifdef CRYPTO_MDEBUG | 653 | #ifdef CRYPTO_MDEBUG |
| 529 | CRYPTO_push_info("verify MAC"); | 654 | CRYPTO_push_info("verify MAC"); |
| 530 | #endif | 655 | #endif |
| 531 | if (!PKCS12_verify_mac (p12, mpass, -1)) { | 656 | /* If we enter empty password try no password first */ |
| 657 | if(!macpass[0] && PKCS12_verify_mac(p12, NULL, 0)) { | ||
| 658 | /* If mac and crypto pass the same set it to NULL too */ | ||
| 659 | if(!twopass) cpass = NULL; | ||
| 660 | } else if (!PKCS12_verify_mac(p12, mpass, -1)) { | ||
| 532 | BIO_printf (bio_err, "Mac verify error: invalid password?\n"); | 661 | BIO_printf (bio_err, "Mac verify error: invalid password?\n"); |
| 533 | ERR_print_errors (bio_err); | 662 | ERR_print_errors (bio_err); |
| 534 | goto end; | 663 | goto end; |
| 535 | } else BIO_printf (bio_err, "MAC verified OK\n"); | 664 | } |
| 665 | BIO_printf (bio_err, "MAC verified OK\n"); | ||
| 536 | #ifdef CRYPTO_MDEBUG | 666 | #ifdef CRYPTO_MDEBUG |
| 537 | CRYPTO_pop_info(); | 667 | CRYPTO_pop_info(); |
| 538 | #endif | 668 | #endif |
| @@ -549,29 +679,32 @@ int MAIN(int argc, char **argv) | |||
| 549 | #ifdef CRYPTO_MDEBUG | 679 | #ifdef CRYPTO_MDEBUG |
| 550 | CRYPTO_pop_info(); | 680 | CRYPTO_pop_info(); |
| 551 | #endif | 681 | #endif |
| 552 | PKCS12_free(p12); | ||
| 553 | ret = 0; | 682 | ret = 0; |
| 554 | end: | 683 | end: |
| 684 | if (p12) PKCS12_free(p12); | ||
| 555 | if(export_cert || inrand) app_RAND_write_file(NULL, bio_err); | 685 | if(export_cert || inrand) app_RAND_write_file(NULL, bio_err); |
| 556 | #ifdef CRYPTO_MDEBUG | 686 | #ifdef CRYPTO_MDEBUG |
| 557 | CRYPTO_remove_all_info(); | 687 | CRYPTO_remove_all_info(); |
| 558 | #endif | 688 | #endif |
| 559 | BIO_free(in); | 689 | BIO_free(in); |
| 560 | BIO_free(out); | 690 | BIO_free_all(out); |
| 561 | if(passin) Free(passin); | 691 | if (canames) sk_free(canames); |
| 562 | if(passout) Free(passout); | 692 | if(passin) OPENSSL_free(passin); |
| 693 | if(passout) OPENSSL_free(passout); | ||
| 563 | EXIT(ret); | 694 | EXIT(ret); |
| 564 | } | 695 | } |
| 565 | 696 | ||
| 566 | int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, | 697 | int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, |
| 567 | int passlen, int options, char *pempass) | 698 | int passlen, int options, char *pempass) |
| 568 | { | 699 | { |
| 569 | STACK *asafes, *bags; | 700 | STACK_OF(PKCS7) *asafes; |
| 701 | STACK_OF(PKCS12_SAFEBAG) *bags; | ||
| 570 | int i, bagnid; | 702 | int i, bagnid; |
| 571 | PKCS7 *p7; | 703 | PKCS7 *p7; |
| 704 | |||
| 572 | if (!( asafes = M_PKCS12_unpack_authsafes (p12))) return 0; | 705 | if (!( asafes = M_PKCS12_unpack_authsafes (p12))) return 0; |
| 573 | for (i = 0; i < sk_num (asafes); i++) { | 706 | for (i = 0; i < sk_PKCS7_num (asafes); i++) { |
| 574 | p7 = (PKCS7 *) sk_value (asafes, i); | 707 | p7 = sk_PKCS7_value (asafes, i); |
| 575 | bagnid = OBJ_obj2nid (p7->type); | 708 | bagnid = OBJ_obj2nid (p7->type); |
| 576 | if (bagnid == NID_pkcs7_data) { | 709 | if (bagnid == NID_pkcs7_data) { |
| 577 | bags = M_PKCS12_unpack_p7data (p7); | 710 | bags = M_PKCS12_unpack_p7data (p7); |
| @@ -587,23 +720,25 @@ int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, | |||
| 587 | if (!bags) return 0; | 720 | if (!bags) return 0; |
| 588 | if (!dump_certs_pkeys_bags (out, bags, pass, passlen, | 721 | if (!dump_certs_pkeys_bags (out, bags, pass, passlen, |
| 589 | options, pempass)) { | 722 | options, pempass)) { |
| 590 | sk_pop_free (bags, PKCS12_SAFEBAG_free); | 723 | sk_PKCS12_SAFEBAG_pop_free (bags, PKCS12_SAFEBAG_free); |
| 591 | return 0; | 724 | return 0; |
| 592 | } | 725 | } |
| 593 | sk_pop_free (bags, PKCS12_SAFEBAG_free); | 726 | sk_PKCS12_SAFEBAG_pop_free (bags, PKCS12_SAFEBAG_free); |
| 594 | } | 727 | } |
| 595 | sk_pop_free (asafes, PKCS7_free); | 728 | sk_PKCS7_pop_free (asafes, PKCS7_free); |
| 596 | return 1; | 729 | return 1; |
| 597 | } | 730 | } |
| 598 | 731 | ||
| 599 | int dump_certs_pkeys_bags (BIO *out, STACK *bags, char *pass, | 732 | int dump_certs_pkeys_bags (BIO *out, STACK_OF(PKCS12_SAFEBAG) *bags, |
| 600 | int passlen, int options, char *pempass) | 733 | char *pass, int passlen, int options, char *pempass) |
| 601 | { | 734 | { |
| 602 | int i; | 735 | int i; |
| 603 | for (i = 0; i < sk_num (bags); i++) { | 736 | for (i = 0; i < sk_PKCS12_SAFEBAG_num (bags); i++) { |
| 604 | if (!dump_certs_pkeys_bag (out, | 737 | if (!dump_certs_pkeys_bag (out, |
| 605 | (PKCS12_SAFEBAG *)sk_value (bags, i), pass, passlen, | 738 | sk_PKCS12_SAFEBAG_value (bags, i), |
| 606 | options, pempass)) return 0; | 739 | pass, passlen, |
| 740 | options, pempass)) | ||
| 741 | return 0; | ||
| 607 | } | 742 | } |
| 608 | return 1; | 743 | return 1; |
| 609 | } | 744 | } |
| @@ -679,15 +814,12 @@ int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, char *pass, | |||
| 679 | 814 | ||
| 680 | /* Hope this is OK .... */ | 815 | /* Hope this is OK .... */ |
| 681 | 816 | ||
| 682 | int get_cert_chain (X509 *cert, STACK_OF(X509) **chain) | 817 | int get_cert_chain (X509 *cert, X509_STORE *store, STACK_OF(X509) **chain) |
| 683 | { | 818 | { |
| 684 | X509_STORE *store; | ||
| 685 | X509_STORE_CTX store_ctx; | 819 | X509_STORE_CTX store_ctx; |
| 686 | STACK_OF(X509) *chn; | 820 | STACK_OF(X509) *chn; |
| 687 | int i; | 821 | int i; |
| 688 | 822 | ||
| 689 | store = X509_STORE_new (); | ||
| 690 | X509_STORE_set_default_paths (store); | ||
| 691 | X509_STORE_CTX_init(&store_ctx, store, cert, NULL); | 823 | X509_STORE_CTX_init(&store_ctx, store, cert, NULL); |
| 692 | if (X509_verify_cert(&store_ctx) <= 0) { | 824 | if (X509_verify_cert(&store_ctx) <= 0) { |
| 693 | i = X509_STORE_CTX_get_error (&store_ctx); | 825 | i = X509_STORE_CTX_get_error (&store_ctx); |
| @@ -698,7 +830,6 @@ int get_cert_chain (X509 *cert, STACK_OF(X509) **chain) | |||
| 698 | *chain = chn; | 830 | *chain = chn; |
| 699 | err: | 831 | err: |
| 700 | X509_STORE_CTX_cleanup(&store_ctx); | 832 | X509_STORE_CTX_cleanup(&store_ctx); |
| 701 | X509_STORE_free(store); | ||
| 702 | 833 | ||
| 703 | return i; | 834 | return i; |
| 704 | } | 835 | } |
| @@ -722,10 +853,22 @@ int cert_load(BIO *in, STACK_OF(X509) *sk) | |||
| 722 | int ret; | 853 | int ret; |
| 723 | X509 *cert; | 854 | X509 *cert; |
| 724 | ret = 0; | 855 | ret = 0; |
| 856 | #ifdef CRYPTO_MDEBUG | ||
| 857 | CRYPTO_push_info("cert_load(): reading one cert"); | ||
| 858 | #endif | ||
| 725 | while((cert = PEM_read_bio_X509(in, NULL, NULL, NULL))) { | 859 | while((cert = PEM_read_bio_X509(in, NULL, NULL, NULL))) { |
| 860 | #ifdef CRYPTO_MDEBUG | ||
| 861 | CRYPTO_pop_info(); | ||
| 862 | #endif | ||
| 726 | ret = 1; | 863 | ret = 1; |
| 727 | sk_X509_push(sk, cert); | 864 | sk_X509_push(sk, cert); |
| 865 | #ifdef CRYPTO_MDEBUG | ||
| 866 | CRYPTO_push_info("cert_load(): reading one cert"); | ||
| 867 | #endif | ||
| 728 | } | 868 | } |
| 869 | #ifdef CRYPTO_MDEBUG | ||
| 870 | CRYPTO_pop_info(); | ||
| 871 | #endif | ||
| 729 | if(ret) ERR_clear_error(); | 872 | if(ret) ERR_clear_error(); |
| 730 | return ret; | 873 | return ret; |
| 731 | } | 874 | } |
| @@ -763,18 +906,18 @@ int print_attribs (BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst, char *name) | |||
| 763 | value = uni2asc(av->value.bmpstring->data, | 906 | value = uni2asc(av->value.bmpstring->data, |
| 764 | av->value.bmpstring->length); | 907 | av->value.bmpstring->length); |
| 765 | BIO_printf(out, "%s\n", value); | 908 | BIO_printf(out, "%s\n", value); |
| 766 | Free(value); | 909 | OPENSSL_free(value); |
| 767 | break; | 910 | break; |
| 768 | 911 | ||
| 769 | case V_ASN1_OCTET_STRING: | 912 | case V_ASN1_OCTET_STRING: |
| 770 | hex_prin(out, av->value.bit_string->data, | 913 | hex_prin(out, av->value.octet_string->data, |
| 771 | av->value.bit_string->length); | 914 | av->value.octet_string->length); |
| 772 | BIO_printf(out, "\n"); | 915 | BIO_printf(out, "\n"); |
| 773 | break; | 916 | break; |
| 774 | 917 | ||
| 775 | case V_ASN1_BIT_STRING: | 918 | case V_ASN1_BIT_STRING: |
| 776 | hex_prin(out, av->value.octet_string->data, | 919 | hex_prin(out, av->value.bit_string->data, |
| 777 | av->value.octet_string->length); | 920 | av->value.bit_string->length); |
| 778 | BIO_printf(out, "\n"); | 921 | BIO_printf(out, "\n"); |
| 779 | break; | 922 | break; |
| 780 | 923 | ||
diff --git a/src/lib/libssl/src/apps/pkcs7.c b/src/lib/libssl/src/apps/pkcs7.c index f471cc77fd..b348da2203 100644 --- a/src/lib/libssl/src/apps/pkcs7.c +++ b/src/lib/libssl/src/apps/pkcs7.c | |||
| @@ -67,6 +67,7 @@ | |||
| 67 | #include <openssl/x509.h> | 67 | #include <openssl/x509.h> |
| 68 | #include <openssl/pkcs7.h> | 68 | #include <openssl/pkcs7.h> |
| 69 | #include <openssl/pem.h> | 69 | #include <openssl/pem.h> |
| 70 | #include <openssl/engine.h> | ||
| 70 | 71 | ||
| 71 | #undef PROG | 72 | #undef PROG |
| 72 | #define PROG pkcs7_main | 73 | #define PROG pkcs7_main |
| @@ -82,6 +83,7 @@ int MAIN(int, char **); | |||
| 82 | 83 | ||
| 83 | int MAIN(int argc, char **argv) | 84 | int MAIN(int argc, char **argv) |
| 84 | { | 85 | { |
| 86 | ENGINE *e = NULL; | ||
| 85 | PKCS7 *p7=NULL; | 87 | PKCS7 *p7=NULL; |
| 86 | int i,badops=0; | 88 | int i,badops=0; |
| 87 | BIO *in=NULL,*out=NULL; | 89 | BIO *in=NULL,*out=NULL; |
| @@ -89,6 +91,7 @@ int MAIN(int argc, char **argv) | |||
| 89 | char *infile,*outfile,*prog; | 91 | char *infile,*outfile,*prog; |
| 90 | int print_certs=0,text=0,noout=0; | 92 | int print_certs=0,text=0,noout=0; |
| 91 | int ret=0; | 93 | int ret=0; |
| 94 | char *engine=NULL; | ||
| 92 | 95 | ||
| 93 | apps_startup(); | 96 | apps_startup(); |
| 94 | 97 | ||
| @@ -132,6 +135,11 @@ int MAIN(int argc, char **argv) | |||
| 132 | text=1; | 135 | text=1; |
| 133 | else if (strcmp(*argv,"-print_certs") == 0) | 136 | else if (strcmp(*argv,"-print_certs") == 0) |
| 134 | print_certs=1; | 137 | print_certs=1; |
| 138 | else if (strcmp(*argv,"-engine") == 0) | ||
| 139 | { | ||
| 140 | if (--argc < 1) goto bad; | ||
| 141 | engine= *(++argv); | ||
| 142 | } | ||
| 135 | else | 143 | else |
| 136 | { | 144 | { |
| 137 | BIO_printf(bio_err,"unknown option %s\n",*argv); | 145 | BIO_printf(bio_err,"unknown option %s\n",*argv); |
| @@ -154,11 +162,30 @@ bad: | |||
| 154 | BIO_printf(bio_err," -print_certs print any certs or crl in the input\n"); | 162 | BIO_printf(bio_err," -print_certs print any certs or crl in the input\n"); |
| 155 | BIO_printf(bio_err," -text print full details of certificates\n"); | 163 | BIO_printf(bio_err," -text print full details of certificates\n"); |
| 156 | BIO_printf(bio_err," -noout don't output encoded data\n"); | 164 | BIO_printf(bio_err," -noout don't output encoded data\n"); |
| 165 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 157 | EXIT(1); | 166 | EXIT(1); |
| 158 | } | 167 | } |
| 159 | 168 | ||
| 160 | ERR_load_crypto_strings(); | 169 | ERR_load_crypto_strings(); |
| 161 | 170 | ||
| 171 | if (engine != NULL) | ||
| 172 | { | ||
| 173 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 174 | { | ||
| 175 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 176 | engine); | ||
| 177 | goto end; | ||
| 178 | } | ||
| 179 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 180 | { | ||
| 181 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 182 | goto end; | ||
| 183 | } | ||
| 184 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 185 | /* Free our "structural" reference. */ | ||
| 186 | ENGINE_free(e); | ||
| 187 | } | ||
| 188 | |||
| 162 | in=BIO_new(BIO_s_file()); | 189 | in=BIO_new(BIO_s_file()); |
| 163 | out=BIO_new(BIO_s_file()); | 190 | out=BIO_new(BIO_s_file()); |
| 164 | if ((in == NULL) || (out == NULL)) | 191 | if ((in == NULL) || (out == NULL)) |
| @@ -196,7 +223,15 @@ bad: | |||
| 196 | } | 223 | } |
| 197 | 224 | ||
| 198 | if (outfile == NULL) | 225 | if (outfile == NULL) |
| 226 | { | ||
| 199 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 227 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 228 | #ifdef VMS | ||
| 229 | { | ||
| 230 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 231 | out = BIO_push(tmpbio, out); | ||
| 232 | } | ||
| 233 | #endif | ||
| 234 | } | ||
| 200 | else | 235 | else |
| 201 | { | 236 | { |
| 202 | if (BIO_write_filename(out,outfile) <= 0) | 237 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -280,6 +315,6 @@ bad: | |||
| 280 | end: | 315 | end: |
| 281 | if (p7 != NULL) PKCS7_free(p7); | 316 | if (p7 != NULL) PKCS7_free(p7); |
| 282 | if (in != NULL) BIO_free(in); | 317 | if (in != NULL) BIO_free(in); |
| 283 | if (out != NULL) BIO_free(out); | 318 | if (out != NULL) BIO_free_all(out); |
| 284 | EXIT(ret); | 319 | EXIT(ret); |
| 285 | } | 320 | } |
diff --git a/src/lib/libssl/src/apps/pkcs8.c b/src/lib/libssl/src/apps/pkcs8.c index 3e59b74124..bd1697a325 100644 --- a/src/lib/libssl/src/apps/pkcs8.c +++ b/src/lib/libssl/src/apps/pkcs8.c | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | #include <openssl/err.h> | 62 | #include <openssl/err.h> |
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | #include <openssl/pkcs12.h> | 64 | #include <openssl/pkcs12.h> |
| 65 | #include <openssl/engine.h> | ||
| 65 | 66 | ||
| 66 | #include "apps.h" | 67 | #include "apps.h" |
| 67 | #define PROG pkcs8_main | 68 | #define PROG pkcs8_main |
| @@ -70,6 +71,7 @@ int MAIN(int, char **); | |||
| 70 | 71 | ||
| 71 | int MAIN(int argc, char **argv) | 72 | int MAIN(int argc, char **argv) |
| 72 | { | 73 | { |
| 74 | ENGINE *e = NULL; | ||
| 73 | char **args, *infile = NULL, *outfile = NULL; | 75 | char **args, *infile = NULL, *outfile = NULL; |
| 74 | char *passargin = NULL, *passargout = NULL; | 76 | char *passargin = NULL, *passargout = NULL; |
| 75 | BIO *in = NULL, *out = NULL; | 77 | BIO *in = NULL, *out = NULL; |
| @@ -85,9 +87,13 @@ int MAIN(int argc, char **argv) | |||
| 85 | EVP_PKEY *pkey; | 87 | EVP_PKEY *pkey; |
| 86 | char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL; | 88 | char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL; |
| 87 | int badarg = 0; | 89 | int badarg = 0; |
| 90 | char *engine=NULL; | ||
| 91 | |||
| 88 | if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE); | 92 | if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE); |
| 93 | |||
| 89 | informat=FORMAT_PEM; | 94 | informat=FORMAT_PEM; |
| 90 | outformat=FORMAT_PEM; | 95 | outformat=FORMAT_PEM; |
| 96 | |||
| 91 | ERR_load_crypto_strings(); | 97 | ERR_load_crypto_strings(); |
| 92 | OpenSSL_add_all_algorithms(); | 98 | OpenSSL_add_all_algorithms(); |
| 93 | args = argv + 1; | 99 | args = argv + 1; |
| @@ -138,6 +144,11 @@ int MAIN(int argc, char **argv) | |||
| 138 | if (!args[1]) goto bad; | 144 | if (!args[1]) goto bad; |
| 139 | passargout= *(++args); | 145 | passargout= *(++args); |
| 140 | } | 146 | } |
| 147 | else if (strcmp(*args,"-engine") == 0) | ||
| 148 | { | ||
| 149 | if (!args[1]) goto bad; | ||
| 150 | engine= *(++args); | ||
| 151 | } | ||
| 141 | else if (!strcmp (*args, "-in")) { | 152 | else if (!strcmp (*args, "-in")) { |
| 142 | if (args[1]) { | 153 | if (args[1]) { |
| 143 | args++; | 154 | args++; |
| @@ -170,9 +181,28 @@ int MAIN(int argc, char **argv) | |||
| 170 | BIO_printf(bio_err, "-nocrypt use or expect unencrypted private key\n"); | 181 | BIO_printf(bio_err, "-nocrypt use or expect unencrypted private key\n"); |
| 171 | BIO_printf(bio_err, "-v2 alg use PKCS#5 v2.0 and cipher \"alg\"\n"); | 182 | BIO_printf(bio_err, "-v2 alg use PKCS#5 v2.0 and cipher \"alg\"\n"); |
| 172 | BIO_printf(bio_err, "-v1 obj use PKCS#5 v1.5 and cipher \"alg\"\n"); | 183 | BIO_printf(bio_err, "-v1 obj use PKCS#5 v1.5 and cipher \"alg\"\n"); |
| 184 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 173 | return (1); | 185 | return (1); |
| 174 | } | 186 | } |
| 175 | 187 | ||
| 188 | if (engine != NULL) | ||
| 189 | { | ||
| 190 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 191 | { | ||
| 192 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 193 | engine); | ||
| 194 | return (1); | ||
| 195 | } | ||
| 196 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 197 | { | ||
| 198 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 199 | return (1); | ||
| 200 | } | ||
| 201 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 202 | /* Free our "structural" reference. */ | ||
| 203 | ENGINE_free(e); | ||
| 204 | } | ||
| 205 | |||
| 176 | if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { | 206 | if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { |
| 177 | BIO_printf(bio_err, "Error getting passwords\n"); | 207 | BIO_printf(bio_err, "Error getting passwords\n"); |
| 178 | return (1); | 208 | return (1); |
| @@ -194,8 +224,15 @@ int MAIN(int argc, char **argv) | |||
| 194 | "Can't open output file %s\n", outfile); | 224 | "Can't open output file %s\n", outfile); |
| 195 | return (1); | 225 | return (1); |
| 196 | } | 226 | } |
| 197 | } else out = BIO_new_fp (stdout, BIO_NOCLOSE); | 227 | } else { |
| 198 | 228 | out = BIO_new_fp (stdout, BIO_NOCLOSE); | |
| 229 | #ifdef VMS | ||
| 230 | { | ||
| 231 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 232 | out = BIO_push(tmpbio, out); | ||
| 233 | } | ||
| 234 | #endif | ||
| 235 | } | ||
| 199 | if (topk8) { | 236 | if (topk8) { |
| 200 | if(informat == FORMAT_PEM) | 237 | if(informat == FORMAT_PEM) |
| 201 | pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, passin); | 238 | pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, passin); |
| @@ -253,9 +290,9 @@ int MAIN(int argc, char **argv) | |||
| 253 | } | 290 | } |
| 254 | PKCS8_PRIV_KEY_INFO_free (p8inf); | 291 | PKCS8_PRIV_KEY_INFO_free (p8inf); |
| 255 | EVP_PKEY_free(pkey); | 292 | EVP_PKEY_free(pkey); |
| 256 | BIO_free(out); | 293 | BIO_free_all(out); |
| 257 | if(passin) Free(passin); | 294 | if(passin) OPENSSL_free(passin); |
| 258 | if(passout) Free(passout); | 295 | if(passout) OPENSSL_free(passout); |
| 259 | return (0); | 296 | return (0); |
| 260 | } | 297 | } |
| 261 | 298 | ||
| @@ -336,10 +373,10 @@ int MAIN(int argc, char **argv) | |||
| 336 | } | 373 | } |
| 337 | 374 | ||
| 338 | EVP_PKEY_free(pkey); | 375 | EVP_PKEY_free(pkey); |
| 339 | BIO_free(out); | 376 | BIO_free_all(out); |
| 340 | BIO_free(in); | 377 | BIO_free(in); |
| 341 | if(passin) Free(passin); | 378 | if(passin) OPENSSL_free(passin); |
| 342 | if(passout) Free(passout); | 379 | if(passout) OPENSSL_free(passout); |
| 343 | 380 | ||
| 344 | return (0); | 381 | return (0); |
| 345 | } | 382 | } |
diff --git a/src/lib/libssl/src/apps/progs.h b/src/lib/libssl/src/apps/progs.h index 7d2238493a..fbc65de632 100644 --- a/src/lib/libssl/src/apps/progs.h +++ b/src/lib/libssl/src/apps/progs.h | |||
| @@ -14,6 +14,7 @@ extern int errstr_main(int argc,char *argv[]); | |||
| 14 | extern int ca_main(int argc,char *argv[]); | 14 | extern int ca_main(int argc,char *argv[]); |
| 15 | extern int crl_main(int argc,char *argv[]); | 15 | extern int crl_main(int argc,char *argv[]); |
| 16 | extern int rsa_main(int argc,char *argv[]); | 16 | extern int rsa_main(int argc,char *argv[]); |
| 17 | extern int rsautl_main(int argc,char *argv[]); | ||
| 17 | extern int dsa_main(int argc,char *argv[]); | 18 | extern int dsa_main(int argc,char *argv[]); |
| 18 | extern int dsaparam_main(int argc,char *argv[]); | 19 | extern int dsaparam_main(int argc,char *argv[]); |
| 19 | extern int x509_main(int argc,char *argv[]); | 20 | extern int x509_main(int argc,char *argv[]); |
| @@ -67,6 +68,9 @@ FUNCTION functions[] = { | |||
| 67 | #ifndef NO_RSA | 68 | #ifndef NO_RSA |
| 68 | {FUNC_TYPE_GENERAL,"rsa",rsa_main}, | 69 | {FUNC_TYPE_GENERAL,"rsa",rsa_main}, |
| 69 | #endif | 70 | #endif |
| 71 | #ifndef NO_RSA | ||
| 72 | {FUNC_TYPE_GENERAL,"rsautl",rsautl_main}, | ||
| 73 | #endif | ||
| 70 | #ifndef NO_DSA | 74 | #ifndef NO_DSA |
| 71 | {FUNC_TYPE_GENERAL,"dsa",dsa_main}, | 75 | {FUNC_TYPE_GENERAL,"dsa",dsa_main}, |
| 72 | #endif | 76 | #endif |
| @@ -106,6 +110,7 @@ FUNCTION functions[] = { | |||
| 106 | {FUNC_TYPE_GENERAL,"smime",smime_main}, | 110 | {FUNC_TYPE_GENERAL,"smime",smime_main}, |
| 107 | {FUNC_TYPE_GENERAL,"rand",rand_main}, | 111 | {FUNC_TYPE_GENERAL,"rand",rand_main}, |
| 108 | {FUNC_TYPE_MD,"md2",dgst_main}, | 112 | {FUNC_TYPE_MD,"md2",dgst_main}, |
| 113 | {FUNC_TYPE_MD,"md4",dgst_main}, | ||
| 109 | {FUNC_TYPE_MD,"md5",dgst_main}, | 114 | {FUNC_TYPE_MD,"md5",dgst_main}, |
| 110 | {FUNC_TYPE_MD,"sha",dgst_main}, | 115 | {FUNC_TYPE_MD,"sha",dgst_main}, |
| 111 | {FUNC_TYPE_MD,"sha1",dgst_main}, | 116 | {FUNC_TYPE_MD,"sha1",dgst_main}, |
diff --git a/src/lib/libssl/src/apps/progs.pl b/src/lib/libssl/src/apps/progs.pl index 9842d2ace7..214025cd2d 100644 --- a/src/lib/libssl/src/apps/progs.pl +++ b/src/lib/libssl/src/apps/progs.pl | |||
| @@ -29,7 +29,7 @@ foreach (@ARGV) | |||
| 29 | $str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n"; | 29 | $str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n"; |
| 30 | if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/)) | 30 | if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/)) |
| 31 | { print "#if !defined(NO_SOCK) && !(defined(NO_SSL2) && defined(NO_SSL3))\n${str}#endif\n"; } | 31 | { print "#if !defined(NO_SOCK) && !(defined(NO_SSL2) && defined(NO_SSL3))\n${str}#endif\n"; } |
| 32 | elsif ( ($_ =~ /^rsa$/) || ($_ =~ /^genrsa$/) ) | 32 | elsif ( ($_ =~ /^rsa$/) || ($_ =~ /^genrsa$/) || ($_ =~ /^rsautl$/)) |
| 33 | { print "#ifndef NO_RSA\n${str}#endif\n"; } | 33 | { print "#ifndef NO_RSA\n${str}#endif\n"; } |
| 34 | elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/)) | 34 | elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/)) |
| 35 | { print "#ifndef NO_DSA\n${str}#endif\n"; } | 35 | { print "#ifndef NO_DSA\n${str}#endif\n"; } |
| @@ -41,7 +41,7 @@ foreach (@ARGV) | |||
| 41 | { print $str; } | 41 | { print $str; } |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | foreach ("md2","md5","sha","sha1","mdc2","rmd160") | 44 | foreach ("md2","md4","md5","sha","sha1","mdc2","rmd160") |
| 45 | { | 45 | { |
| 46 | push(@files,$_); | 46 | push(@files,$_); |
| 47 | printf "\t{FUNC_TYPE_MD,\"%s\",dgst_main},\n",$_; | 47 | printf "\t{FUNC_TYPE_MD,\"%s\",dgst_main},\n",$_; |
diff --git a/src/lib/libssl/src/apps/rand.c b/src/lib/libssl/src/apps/rand.c index cfbba30755..6add7bbd6c 100644 --- a/src/lib/libssl/src/apps/rand.c +++ b/src/lib/libssl/src/apps/rand.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <openssl/bio.h> | 9 | #include <openssl/bio.h> |
| 10 | #include <openssl/err.h> | 10 | #include <openssl/err.h> |
| 11 | #include <openssl/rand.h> | 11 | #include <openssl/rand.h> |
| 12 | #include <openssl/engine.h> | ||
| 12 | 13 | ||
| 13 | #undef PROG | 14 | #undef PROG |
| 14 | #define PROG rand_main | 15 | #define PROG rand_main |
| @@ -23,6 +24,7 @@ int MAIN(int, char **); | |||
| 23 | 24 | ||
| 24 | int MAIN(int argc, char **argv) | 25 | int MAIN(int argc, char **argv) |
| 25 | { | 26 | { |
| 27 | ENGINE *e = NULL; | ||
| 26 | int i, r, ret = 1; | 28 | int i, r, ret = 1; |
| 27 | int badopt; | 29 | int badopt; |
| 28 | char *outfile = NULL; | 30 | char *outfile = NULL; |
| @@ -30,6 +32,7 @@ int MAIN(int argc, char **argv) | |||
| 30 | int base64 = 0; | 32 | int base64 = 0; |
| 31 | BIO *out = NULL; | 33 | BIO *out = NULL; |
| 32 | int num = -1; | 34 | int num = -1; |
| 35 | char *engine=NULL; | ||
| 33 | 36 | ||
| 34 | apps_startup(); | 37 | apps_startup(); |
| 35 | 38 | ||
| @@ -48,6 +51,13 @@ int MAIN(int argc, char **argv) | |||
| 48 | else | 51 | else |
| 49 | badopt = 1; | 52 | badopt = 1; |
| 50 | } | 53 | } |
| 54 | if (strcmp(argv[i], "-engine") == 0) | ||
| 55 | { | ||
| 56 | if ((argv[i+1] != NULL) && (engine == NULL)) | ||
| 57 | engine = argv[++i]; | ||
| 58 | else | ||
| 59 | badopt = 1; | ||
| 60 | } | ||
| 51 | else if (strcmp(argv[i], "-rand") == 0) | 61 | else if (strcmp(argv[i], "-rand") == 0) |
| 52 | { | 62 | { |
| 53 | if ((argv[i+1] != NULL) && (inrand == NULL)) | 63 | if ((argv[i+1] != NULL) && (inrand == NULL)) |
| @@ -62,7 +72,7 @@ int MAIN(int argc, char **argv) | |||
| 62 | else | 72 | else |
| 63 | badopt = 1; | 73 | badopt = 1; |
| 64 | } | 74 | } |
| 65 | else if (isdigit(argv[i][0])) | 75 | else if (isdigit((unsigned char)argv[i][0])) |
| 66 | { | 76 | { |
| 67 | if (num < 0) | 77 | if (num < 0) |
| 68 | { | 78 | { |
| @@ -84,12 +94,31 @@ int MAIN(int argc, char **argv) | |||
| 84 | { | 94 | { |
| 85 | BIO_printf(bio_err, "Usage: rand [options] num\n"); | 95 | BIO_printf(bio_err, "Usage: rand [options] num\n"); |
| 86 | BIO_printf(bio_err, "where options are\n"); | 96 | BIO_printf(bio_err, "where options are\n"); |
| 87 | BIO_printf(bio_err, "-out file - write to file\n"); | 97 | BIO_printf(bio_err, "-out file - write to file\n"); |
| 88 | BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 98 | BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n"); |
| 89 | BIO_printf(bio_err, "-base64 - encode output\n"); | 99 | BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); |
| 100 | BIO_printf(bio_err, "-base64 - encode output\n"); | ||
| 90 | goto err; | 101 | goto err; |
| 91 | } | 102 | } |
| 92 | 103 | ||
| 104 | if (engine != NULL) | ||
| 105 | { | ||
| 106 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 107 | { | ||
| 108 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 109 | engine); | ||
| 110 | goto err; | ||
| 111 | } | ||
| 112 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 113 | { | ||
| 114 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 115 | goto err; | ||
| 116 | } | ||
| 117 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 118 | /* Free our "structural" reference. */ | ||
| 119 | ENGINE_free(e); | ||
| 120 | } | ||
| 121 | |||
| 93 | app_RAND_load_file(NULL, bio_err, (inrand != NULL)); | 122 | app_RAND_load_file(NULL, bio_err, (inrand != NULL)); |
| 94 | if (inrand != NULL) | 123 | if (inrand != NULL) |
| 95 | BIO_printf(bio_err,"%ld semi-random bytes loaded\n", | 124 | BIO_printf(bio_err,"%ld semi-random bytes loaded\n", |
| @@ -101,7 +130,15 @@ int MAIN(int argc, char **argv) | |||
| 101 | if (outfile != NULL) | 130 | if (outfile != NULL) |
| 102 | r = BIO_write_filename(out, outfile); | 131 | r = BIO_write_filename(out, outfile); |
| 103 | else | 132 | else |
| 133 | { | ||
| 104 | r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT); | 134 | r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT); |
| 135 | #ifdef VMS | ||
| 136 | { | ||
| 137 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 138 | out = BIO_push(tmpbio, out); | ||
| 139 | } | ||
| 140 | #endif | ||
| 141 | } | ||
| 105 | if (r <= 0) | 142 | if (r <= 0) |
| 106 | goto err; | 143 | goto err; |
| 107 | 144 | ||
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c index eb338eeb1b..0751d92201 100644 --- a/src/lib/libssl/src/apps/req.c +++ b/src/lib/libssl/src/apps/req.c | |||
| @@ -73,6 +73,7 @@ | |||
| 73 | #include <openssl/x509v3.h> | 73 | #include <openssl/x509v3.h> |
| 74 | #include <openssl/objects.h> | 74 | #include <openssl/objects.h> |
| 75 | #include <openssl/pem.h> | 75 | #include <openssl/pem.h> |
| 76 | #include <openssl/engine.h> | ||
| 76 | 77 | ||
| 77 | #define SECTION "req" | 78 | #define SECTION "req" |
| 78 | 79 | ||
| @@ -102,6 +103,7 @@ | |||
| 102 | * -config file - Load configuration file. | 103 | * -config file - Load configuration file. |
| 103 | * -key file - make a request using key in file (or use it for verification). | 104 | * -key file - make a request using key in file (or use it for verification). |
| 104 | * -keyform - key file format. | 105 | * -keyform - key file format. |
| 106 | * -rand file(s) - load the file(s) into the PRNG. | ||
| 105 | * -newkey - make a key and a request. | 107 | * -newkey - make a key and a request. |
| 106 | * -modulus - print RSA modulus. | 108 | * -modulus - print RSA modulus. |
| 107 | * -x509 - output a self signed X509 structure instead. | 109 | * -x509 - output a self signed X509 structure instead. |
| @@ -125,7 +127,6 @@ static void MS_CALLBACK req_cb(int p,int n,void *arg); | |||
| 125 | #endif | 127 | #endif |
| 126 | static int req_check_len(int len,int min,int max); | 128 | static int req_check_len(int len,int min,int max); |
| 127 | static int check_end(char *str, char *end); | 129 | static int check_end(char *str, char *end); |
| 128 | static int add_oid_section(LHASH *conf); | ||
| 129 | #ifndef MONOLITH | 130 | #ifndef MONOLITH |
| 130 | static char *default_config_file=NULL; | 131 | static char *default_config_file=NULL; |
| 131 | static LHASH *config=NULL; | 132 | static LHASH *config=NULL; |
| @@ -140,6 +141,7 @@ int MAIN(int, char **); | |||
| 140 | 141 | ||
| 141 | int MAIN(int argc, char **argv) | 142 | int MAIN(int argc, char **argv) |
| 142 | { | 143 | { |
| 144 | ENGINE *e = NULL; | ||
| 143 | #ifndef NO_DSA | 145 | #ifndef NO_DSA |
| 144 | DSA *dsa_params=NULL; | 146 | DSA *dsa_params=NULL; |
| 145 | #endif | 147 | #endif |
| @@ -152,10 +154,12 @@ int MAIN(int argc, char **argv) | |||
| 152 | int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM; | 154 | int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM; |
| 153 | int nodes=0,kludge=0,newhdr=0; | 155 | int nodes=0,kludge=0,newhdr=0; |
| 154 | char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL; | 156 | char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL; |
| 157 | char *engine=NULL; | ||
| 155 | char *extensions = NULL; | 158 | char *extensions = NULL; |
| 156 | char *req_exts = NULL; | 159 | char *req_exts = NULL; |
| 157 | EVP_CIPHER *cipher=NULL; | 160 | EVP_CIPHER *cipher=NULL; |
| 158 | int modulus=0; | 161 | int modulus=0; |
| 162 | char *inrand=NULL; | ||
| 159 | char *passargin = NULL, *passargout = NULL; | 163 | char *passargin = NULL, *passargout = NULL; |
| 160 | char *passin = NULL, *passout = NULL; | 164 | char *passin = NULL, *passout = NULL; |
| 161 | char *p; | 165 | char *p; |
| @@ -194,6 +198,11 @@ int MAIN(int argc, char **argv) | |||
| 194 | if (--argc < 1) goto bad; | 198 | if (--argc < 1) goto bad; |
| 195 | outformat=str2fmt(*(++argv)); | 199 | outformat=str2fmt(*(++argv)); |
| 196 | } | 200 | } |
| 201 | else if (strcmp(*argv,"-engine") == 0) | ||
| 202 | { | ||
| 203 | if (--argc < 1) goto bad; | ||
| 204 | engine= *(++argv); | ||
| 205 | } | ||
| 197 | else if (strcmp(*argv,"-key") == 0) | 206 | else if (strcmp(*argv,"-key") == 0) |
| 198 | { | 207 | { |
| 199 | if (--argc < 1) goto bad; | 208 | if (--argc < 1) goto bad; |
| @@ -239,6 +248,11 @@ int MAIN(int argc, char **argv) | |||
| 239 | if (--argc < 1) goto bad; | 248 | if (--argc < 1) goto bad; |
| 240 | passargout= *(++argv); | 249 | passargout= *(++argv); |
| 241 | } | 250 | } |
| 251 | else if (strcmp(*argv,"-rand") == 0) | ||
| 252 | { | ||
| 253 | if (--argc < 1) goto bad; | ||
| 254 | inrand= *(++argv); | ||
| 255 | } | ||
| 242 | else if (strcmp(*argv,"-newkey") == 0) | 256 | else if (strcmp(*argv,"-newkey") == 0) |
| 243 | { | 257 | { |
| 244 | int is_numeric; | 258 | int is_numeric; |
| @@ -369,9 +383,13 @@ bad: | |||
| 369 | BIO_printf(bio_err," -verify verify signature on REQ\n"); | 383 | BIO_printf(bio_err," -verify verify signature on REQ\n"); |
| 370 | BIO_printf(bio_err," -modulus RSA modulus\n"); | 384 | BIO_printf(bio_err," -modulus RSA modulus\n"); |
| 371 | BIO_printf(bio_err," -nodes don't encrypt the output key\n"); | 385 | BIO_printf(bio_err," -nodes don't encrypt the output key\n"); |
| 386 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 372 | BIO_printf(bio_err," -key file use the private key contained in file\n"); | 387 | BIO_printf(bio_err," -key file use the private key contained in file\n"); |
| 373 | BIO_printf(bio_err," -keyform arg key file format\n"); | 388 | BIO_printf(bio_err," -keyform arg key file format\n"); |
| 374 | BIO_printf(bio_err," -keyout arg file to send the key to\n"); | 389 | BIO_printf(bio_err," -keyout arg file to send the key to\n"); |
| 390 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | ||
| 391 | BIO_printf(bio_err," load the file (or the files in the directory) into\n"); | ||
| 392 | BIO_printf(bio_err," the random number generator\n"); | ||
| 375 | BIO_printf(bio_err," -newkey rsa:bits generate a new RSA key of 'bits' in size\n"); | 393 | BIO_printf(bio_err," -newkey rsa:bits generate a new RSA key of 'bits' in size\n"); |
| 376 | BIO_printf(bio_err," -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n"); | 394 | BIO_printf(bio_err," -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n"); |
| 377 | 395 | ||
| @@ -457,7 +475,7 @@ bad: | |||
| 457 | } | 475 | } |
| 458 | } | 476 | } |
| 459 | } | 477 | } |
| 460 | if(!add_oid_section(req_conf)) goto end; | 478 | if(!add_oid_section(bio_err, req_conf)) goto end; |
| 461 | 479 | ||
| 462 | if ((md_alg == NULL) && | 480 | if ((md_alg == NULL) && |
| 463 | ((p=CONF_get_string(req_conf,SECTION,"default_md")) != NULL)) | 481 | ((p=CONF_get_string(req_conf,SECTION,"default_md")) != NULL)) |
| @@ -513,24 +531,55 @@ bad: | |||
| 513 | if ((in == NULL) || (out == NULL)) | 531 | if ((in == NULL) || (out == NULL)) |
| 514 | goto end; | 532 | goto end; |
| 515 | 533 | ||
| 516 | if (keyfile != NULL) | 534 | if (engine != NULL) |
| 517 | { | 535 | { |
| 518 | if (BIO_read_filename(in,keyfile) <= 0) | 536 | if((e = ENGINE_by_id(engine)) == NULL) |
| 519 | { | 537 | { |
| 520 | perror(keyfile); | 538 | BIO_printf(bio_err,"invalid engine \"%s\"\n", |
| 539 | engine); | ||
| 521 | goto end; | 540 | goto end; |
| 522 | } | 541 | } |
| 542 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 543 | { | ||
| 544 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 545 | goto end; | ||
| 546 | } | ||
| 547 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 548 | /* Free our "structural" reference. */ | ||
| 549 | ENGINE_free(e); | ||
| 550 | } | ||
| 523 | 551 | ||
| 524 | if (keyform == FORMAT_ASN1) | 552 | if (keyfile != NULL) |
| 525 | pkey=d2i_PrivateKey_bio(in,NULL); | 553 | { |
| 526 | else if (keyform == FORMAT_PEM) | 554 | if (keyform == FORMAT_ENGINE) |
| 527 | { | 555 | { |
| 528 | pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,passin); | 556 | if (!e) |
| 557 | { | ||
| 558 | BIO_printf(bio_err,"no engine specified\n"); | ||
| 559 | goto end; | ||
| 560 | } | ||
| 561 | pkey = ENGINE_load_private_key(e, keyfile, NULL); | ||
| 529 | } | 562 | } |
| 530 | else | 563 | else |
| 531 | { | 564 | { |
| 532 | BIO_printf(bio_err,"bad input format specified for X509 request\n"); | 565 | if (BIO_read_filename(in,keyfile) <= 0) |
| 533 | goto end; | 566 | { |
| 567 | perror(keyfile); | ||
| 568 | goto end; | ||
| 569 | } | ||
| 570 | |||
| 571 | if (keyform == FORMAT_ASN1) | ||
| 572 | pkey=d2i_PrivateKey_bio(in,NULL); | ||
| 573 | else if (keyform == FORMAT_PEM) | ||
| 574 | { | ||
| 575 | pkey=PEM_read_bio_PrivateKey(in,NULL,NULL, | ||
| 576 | passin); | ||
| 577 | } | ||
| 578 | else | ||
| 579 | { | ||
| 580 | BIO_printf(bio_err,"bad input format specified for X509 request\n"); | ||
| 581 | goto end; | ||
| 582 | } | ||
| 534 | } | 583 | } |
| 535 | 584 | ||
| 536 | if (pkey == NULL) | 585 | if (pkey == NULL) |
| @@ -538,12 +587,19 @@ bad: | |||
| 538 | BIO_printf(bio_err,"unable to load Private key\n"); | 587 | BIO_printf(bio_err,"unable to load Private key\n"); |
| 539 | goto end; | 588 | goto end; |
| 540 | } | 589 | } |
| 590 | if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) | ||
| 591 | { | ||
| 592 | char *randfile = CONF_get_string(req_conf,SECTION,"RANDFILE"); | ||
| 593 | app_RAND_load_file(randfile, bio_err, 0); | ||
| 594 | } | ||
| 541 | } | 595 | } |
| 542 | 596 | ||
| 543 | if (newreq && (pkey == NULL)) | 597 | if (newreq && (pkey == NULL)) |
| 544 | { | 598 | { |
| 545 | char *randfile = CONF_get_string(req_conf,SECTION,"RANDFILE"); | 599 | char *randfile = CONF_get_string(req_conf,SECTION,"RANDFILE"); |
| 546 | app_RAND_load_file(randfile, bio_err, 0); | 600 | app_RAND_load_file(randfile, bio_err, 0); |
| 601 | if (inrand) | ||
| 602 | app_RAND_load_files(inrand); | ||
| 547 | 603 | ||
| 548 | if (newkey <= 0) | 604 | if (newkey <= 0) |
| 549 | { | 605 | { |
| @@ -593,6 +649,12 @@ bad: | |||
| 593 | { | 649 | { |
| 594 | BIO_printf(bio_err,"writing new private key to stdout\n"); | 650 | BIO_printf(bio_err,"writing new private key to stdout\n"); |
| 595 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 651 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 652 | #ifdef VMS | ||
| 653 | { | ||
| 654 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 655 | out = BIO_push(tmpbio, out); | ||
| 656 | } | ||
| 657 | #endif | ||
| 596 | } | 658 | } |
| 597 | else | 659 | else |
| 598 | { | 660 | { |
| @@ -788,7 +850,15 @@ loop: | |||
| 788 | } | 850 | } |
| 789 | 851 | ||
| 790 | if (outfile == NULL) | 852 | if (outfile == NULL) |
| 853 | { | ||
| 791 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 854 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 855 | #ifdef VMS | ||
| 856 | { | ||
| 857 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 858 | out = BIO_push(tmpbio, out); | ||
| 859 | } | ||
| 860 | #endif | ||
| 861 | } | ||
| 792 | else | 862 | else |
| 793 | { | 863 | { |
| 794 | if ((keyout != NULL) && (strcmp(outfile,keyout) == 0)) | 864 | if ((keyout != NULL) && (strcmp(outfile,keyout) == 0)) |
| @@ -874,12 +944,12 @@ end: | |||
| 874 | } | 944 | } |
| 875 | if ((req_conf != NULL) && (req_conf != config)) CONF_free(req_conf); | 945 | if ((req_conf != NULL) && (req_conf != config)) CONF_free(req_conf); |
| 876 | BIO_free(in); | 946 | BIO_free(in); |
| 877 | BIO_free(out); | 947 | BIO_free_all(out); |
| 878 | EVP_PKEY_free(pkey); | 948 | EVP_PKEY_free(pkey); |
| 879 | X509_REQ_free(req); | 949 | X509_REQ_free(req); |
| 880 | X509_free(x509ss); | 950 | X509_free(x509ss); |
| 881 | if(passargin && passin) Free(passin); | 951 | if(passargin && passin) OPENSSL_free(passin); |
| 882 | if(passargout && passout) Free(passout); | 952 | if(passargout && passout) OPENSSL_free(passout); |
| 883 | OBJ_cleanup(); | 953 | OBJ_cleanup(); |
| 884 | #ifndef NO_DSA | 954 | #ifndef NO_DSA |
| 885 | if (dsa_params != NULL) DSA_free(dsa_params); | 955 | if (dsa_params != NULL) DSA_free(dsa_params); |
| @@ -1083,7 +1153,11 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk, | |||
| 1083 | * multiple instances | 1153 | * multiple instances |
| 1084 | */ | 1154 | */ |
| 1085 | for(p = v->name; *p ; p++) | 1155 | for(p = v->name; *p ; p++) |
| 1156 | #ifndef CHARSET_EBCDIC | ||
| 1086 | if ((*p == ':') || (*p == ',') || (*p == '.')) { | 1157 | if ((*p == ':') || (*p == ',') || (*p == '.')) { |
| 1158 | #else | ||
| 1159 | if ((*p == os_toascii[':']) || (*p == os_toascii[',']) || (*p == os_toascii['.'])) { | ||
| 1160 | #endif | ||
| 1087 | p++; | 1161 | p++; |
| 1088 | if(*p) type = p; | 1162 | if(*p) type = p; |
| 1089 | break; | 1163 | break; |
| @@ -1199,6 +1273,9 @@ start: | |||
| 1199 | return(0); | 1273 | return(0); |
| 1200 | } | 1274 | } |
| 1201 | buf[--i]='\0'; | 1275 | buf[--i]='\0'; |
| 1276 | #ifdef CHARSET_EBCDIC | ||
| 1277 | ebcdic2ascii(buf, buf, i); | ||
| 1278 | #endif | ||
| 1202 | if(!req_check_len(i, min, max)) goto start; | 1279 | if(!req_check_len(i, min, max)) goto start; |
| 1203 | 1280 | ||
| 1204 | if(!X509_REQ_add1_attr_by_NID(req, nid, MBSTRING_ASC, | 1281 | if(!X509_REQ_add1_attr_by_NID(req, nid, MBSTRING_ASC, |
| @@ -1256,25 +1333,3 @@ static int check_end(char *str, char *end) | |||
| 1256 | tmp = str + slen - elen; | 1333 | tmp = str + slen - elen; |
| 1257 | return strcmp(tmp, end); | 1334 | return strcmp(tmp, end); |
| 1258 | } | 1335 | } |
| 1259 | |||
| 1260 | static int add_oid_section(LHASH *conf) | ||
| 1261 | { | ||
| 1262 | char *p; | ||
| 1263 | STACK_OF(CONF_VALUE) *sktmp; | ||
| 1264 | CONF_VALUE *cnf; | ||
| 1265 | int i; | ||
| 1266 | if(!(p=CONF_get_string(conf,NULL,"oid_section"))) return 1; | ||
| 1267 | if(!(sktmp = CONF_get_section(conf, p))) { | ||
| 1268 | BIO_printf(bio_err, "problem loading oid section %s\n", p); | ||
| 1269 | return 0; | ||
| 1270 | } | ||
| 1271 | for(i = 0; i < sk_CONF_VALUE_num(sktmp); i++) { | ||
| 1272 | cnf = sk_CONF_VALUE_value(sktmp, i); | ||
| 1273 | if(OBJ_create(cnf->value, cnf->name, cnf->name) == NID_undef) { | ||
| 1274 | BIO_printf(bio_err, "problem creating object %s=%s\n", | ||
| 1275 | cnf->name, cnf->value); | ||
| 1276 | return 0; | ||
| 1277 | } | ||
| 1278 | } | ||
| 1279 | return 1; | ||
| 1280 | } | ||
diff --git a/src/lib/libssl/src/apps/rsa.c b/src/lib/libssl/src/apps/rsa.c index 9d4c2e6564..7e9e5e2c38 100644 --- a/src/lib/libssl/src/apps/rsa.c +++ b/src/lib/libssl/src/apps/rsa.c | |||
| @@ -68,6 +68,7 @@ | |||
| 68 | #include <openssl/evp.h> | 68 | #include <openssl/evp.h> |
| 69 | #include <openssl/x509.h> | 69 | #include <openssl/x509.h> |
| 70 | #include <openssl/pem.h> | 70 | #include <openssl/pem.h> |
| 71 | #include <openssl/engine.h> | ||
| 71 | 72 | ||
| 72 | #undef PROG | 73 | #undef PROG |
| 73 | #define PROG rsa_main | 74 | #define PROG rsa_main |
| @@ -90,9 +91,10 @@ int MAIN(int, char **); | |||
| 90 | 91 | ||
| 91 | int MAIN(int argc, char **argv) | 92 | int MAIN(int argc, char **argv) |
| 92 | { | 93 | { |
| 94 | ENGINE *e = NULL; | ||
| 93 | int ret=1; | 95 | int ret=1; |
| 94 | RSA *rsa=NULL; | 96 | RSA *rsa=NULL; |
| 95 | int i,badops=0; | 97 | int i,badops=0, sgckey=0; |
| 96 | const EVP_CIPHER *enc=NULL; | 98 | const EVP_CIPHER *enc=NULL; |
| 97 | BIO *in=NULL,*out=NULL; | 99 | BIO *in=NULL,*out=NULL; |
| 98 | int informat,outformat,text=0,check=0,noout=0; | 100 | int informat,outformat,text=0,check=0,noout=0; |
| @@ -100,6 +102,7 @@ int MAIN(int argc, char **argv) | |||
| 100 | char *infile,*outfile,*prog; | 102 | char *infile,*outfile,*prog; |
| 101 | char *passargin = NULL, *passargout = NULL; | 103 | char *passargin = NULL, *passargout = NULL; |
| 102 | char *passin = NULL, *passout = NULL; | 104 | char *passin = NULL, *passout = NULL; |
| 105 | char *engine=NULL; | ||
| 103 | int modulus=0; | 106 | int modulus=0; |
| 104 | 107 | ||
| 105 | apps_startup(); | 108 | apps_startup(); |
| @@ -148,6 +151,13 @@ int MAIN(int argc, char **argv) | |||
| 148 | if (--argc < 1) goto bad; | 151 | if (--argc < 1) goto bad; |
| 149 | passargout= *(++argv); | 152 | passargout= *(++argv); |
| 150 | } | 153 | } |
| 154 | else if (strcmp(*argv,"-engine") == 0) | ||
| 155 | { | ||
| 156 | if (--argc < 1) goto bad; | ||
| 157 | engine= *(++argv); | ||
| 158 | } | ||
| 159 | else if (strcmp(*argv,"-sgckey") == 0) | ||
| 160 | sgckey=1; | ||
| 151 | else if (strcmp(*argv,"-pubin") == 0) | 161 | else if (strcmp(*argv,"-pubin") == 0) |
| 152 | pubin=1; | 162 | pubin=1; |
| 153 | else if (strcmp(*argv,"-pubout") == 0) | 163 | else if (strcmp(*argv,"-pubout") == 0) |
| @@ -178,6 +188,7 @@ bad: | |||
| 178 | BIO_printf(bio_err," -inform arg input format - one of DER NET PEM\n"); | 188 | BIO_printf(bio_err," -inform arg input format - one of DER NET PEM\n"); |
| 179 | BIO_printf(bio_err," -outform arg output format - one of DER NET PEM\n"); | 189 | BIO_printf(bio_err," -outform arg output format - one of DER NET PEM\n"); |
| 180 | BIO_printf(bio_err," -in arg input file\n"); | 190 | BIO_printf(bio_err," -in arg input file\n"); |
| 191 | BIO_printf(bio_err," -sgckey Use IIS SGC key format\n"); | ||
| 181 | BIO_printf(bio_err," -passin arg input file pass phrase source\n"); | 192 | BIO_printf(bio_err," -passin arg input file pass phrase source\n"); |
| 182 | BIO_printf(bio_err," -out arg output file\n"); | 193 | BIO_printf(bio_err," -out arg output file\n"); |
| 183 | BIO_printf(bio_err," -passout arg output file pass phrase source\n"); | 194 | BIO_printf(bio_err," -passout arg output file pass phrase source\n"); |
| @@ -192,11 +203,30 @@ bad: | |||
| 192 | BIO_printf(bio_err," -check verify key consistency\n"); | 203 | BIO_printf(bio_err," -check verify key consistency\n"); |
| 193 | BIO_printf(bio_err," -pubin expect a public key in input file\n"); | 204 | BIO_printf(bio_err," -pubin expect a public key in input file\n"); |
| 194 | BIO_printf(bio_err," -pubout output a public key\n"); | 205 | BIO_printf(bio_err," -pubout output a public key\n"); |
| 206 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 195 | goto end; | 207 | goto end; |
| 196 | } | 208 | } |
| 197 | 209 | ||
| 198 | ERR_load_crypto_strings(); | 210 | ERR_load_crypto_strings(); |
| 199 | 211 | ||
| 212 | if (engine != NULL) | ||
| 213 | { | ||
| 214 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 215 | { | ||
| 216 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 217 | engine); | ||
| 218 | goto end; | ||
| 219 | } | ||
| 220 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 221 | { | ||
| 222 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 223 | goto end; | ||
| 224 | } | ||
| 225 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 226 | /* Free our "structural" reference. */ | ||
| 227 | ENGINE_free(e); | ||
| 228 | } | ||
| 229 | |||
| 200 | if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { | 230 | if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { |
| 201 | BIO_printf(bio_err, "Error getting passwords\n"); | 231 | BIO_printf(bio_err, "Error getting passwords\n"); |
| 202 | goto end; | 232 | goto end; |
| @@ -254,7 +284,7 @@ bad: | |||
| 254 | } | 284 | } |
| 255 | } | 285 | } |
| 256 | p=(unsigned char *)buf->data; | 286 | p=(unsigned char *)buf->data; |
| 257 | rsa=d2i_Netscape_RSA(NULL,&p,(long)size,NULL); | 287 | rsa=d2i_RSA_NET(NULL,&p,(long)size,NULL, sgckey); |
| 258 | BUF_MEM_free(buf); | 288 | BUF_MEM_free(buf); |
| 259 | } | 289 | } |
| 260 | #endif | 290 | #endif |
| @@ -275,7 +305,15 @@ bad: | |||
| 275 | } | 305 | } |
| 276 | 306 | ||
| 277 | if (outfile == NULL) | 307 | if (outfile == NULL) |
| 308 | { | ||
| 278 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 309 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 310 | #ifdef VMS | ||
| 311 | { | ||
| 312 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 313 | out = BIO_push(tmpbio, out); | ||
| 314 | } | ||
| 315 | #endif | ||
| 316 | } | ||
| 279 | else | 317 | else |
| 280 | { | 318 | { |
| 281 | if (BIO_write_filename(out,outfile) <= 0) | 319 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -344,16 +382,16 @@ bad: | |||
| 344 | int size; | 382 | int size; |
| 345 | 383 | ||
| 346 | i=1; | 384 | i=1; |
| 347 | size=i2d_Netscape_RSA(rsa,NULL,NULL); | 385 | size=i2d_RSA_NET(rsa,NULL,NULL, sgckey); |
| 348 | if ((p=(unsigned char *)Malloc(size)) == NULL) | 386 | if ((p=(unsigned char *)OPENSSL_malloc(size)) == NULL) |
| 349 | { | 387 | { |
| 350 | BIO_printf(bio_err,"Malloc failure\n"); | 388 | BIO_printf(bio_err,"Memory allocation failure\n"); |
| 351 | goto end; | 389 | goto end; |
| 352 | } | 390 | } |
| 353 | pp=p; | 391 | pp=p; |
| 354 | i2d_Netscape_RSA(rsa,&p,NULL); | 392 | i2d_RSA_NET(rsa,&p,NULL, sgckey); |
| 355 | BIO_write(out,(char *)pp,size); | 393 | BIO_write(out,(char *)pp,size); |
| 356 | Free(pp); | 394 | OPENSSL_free(pp); |
| 357 | } | 395 | } |
| 358 | #endif | 396 | #endif |
| 359 | else if (outformat == FORMAT_PEM) { | 397 | else if (outformat == FORMAT_PEM) { |
| @@ -374,10 +412,10 @@ bad: | |||
| 374 | ret=0; | 412 | ret=0; |
| 375 | end: | 413 | end: |
| 376 | if(in != NULL) BIO_free(in); | 414 | if(in != NULL) BIO_free(in); |
| 377 | if(out != NULL) BIO_free(out); | 415 | if(out != NULL) BIO_free_all(out); |
| 378 | if(rsa != NULL) RSA_free(rsa); | 416 | if(rsa != NULL) RSA_free(rsa); |
| 379 | if(passin) Free(passin); | 417 | if(passin) OPENSSL_free(passin); |
| 380 | if(passout) Free(passout); | 418 | if(passout) OPENSSL_free(passout); |
| 381 | EXIT(ret); | 419 | EXIT(ret); |
| 382 | } | 420 | } |
| 383 | #else /* !NO_RSA */ | 421 | #else /* !NO_RSA */ |
diff --git a/src/lib/libssl/src/apps/rsautl.c b/src/lib/libssl/src/apps/rsautl.c new file mode 100644 index 0000000000..2ef75649dd --- /dev/null +++ b/src/lib/libssl/src/apps/rsautl.c | |||
| @@ -0,0 +1,315 @@ | |||
| 1 | /* rsautl.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | #include "apps.h" | ||
| 59 | #include <string.h> | ||
| 60 | #include <openssl/err.h> | ||
| 61 | #include <openssl/pem.h> | ||
| 62 | #include <openssl/engine.h> | ||
| 63 | |||
| 64 | #define RSA_SIGN 1 | ||
| 65 | #define RSA_VERIFY 2 | ||
| 66 | #define RSA_ENCRYPT 3 | ||
| 67 | #define RSA_DECRYPT 4 | ||
| 68 | |||
| 69 | #define KEY_PRIVKEY 1 | ||
| 70 | #define KEY_PUBKEY 2 | ||
| 71 | #define KEY_CERT 3 | ||
| 72 | |||
| 73 | static void usage(void); | ||
| 74 | |||
| 75 | #undef PROG | ||
| 76 | |||
| 77 | #define PROG rsautl_main | ||
| 78 | |||
| 79 | int MAIN(int argc, char **); | ||
| 80 | |||
| 81 | int MAIN(int argc, char **argv) | ||
| 82 | { | ||
| 83 | ENGINE *e = NULL; | ||
| 84 | BIO *in = NULL, *out = NULL; | ||
| 85 | char *infile = NULL, *outfile = NULL; | ||
| 86 | char *keyfile = NULL; | ||
| 87 | char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY; | ||
| 88 | int keyform = FORMAT_PEM; | ||
| 89 | char need_priv = 0, badarg = 0, rev = 0; | ||
| 90 | char hexdump = 0, asn1parse = 0; | ||
| 91 | X509 *x; | ||
| 92 | EVP_PKEY *pkey = NULL; | ||
| 93 | RSA *rsa = NULL; | ||
| 94 | unsigned char *rsa_in = NULL, *rsa_out = NULL, pad; | ||
| 95 | int rsa_inlen, rsa_outlen = 0; | ||
| 96 | int keysize; | ||
| 97 | char *engine=NULL; | ||
| 98 | |||
| 99 | int ret = 1; | ||
| 100 | |||
| 101 | argc--; | ||
| 102 | argv++; | ||
| 103 | |||
| 104 | if(!bio_err) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE); | ||
| 105 | ERR_load_crypto_strings(); | ||
| 106 | OpenSSL_add_all_algorithms(); | ||
| 107 | pad = RSA_PKCS1_PADDING; | ||
| 108 | |||
| 109 | while(argc >= 1) | ||
| 110 | { | ||
| 111 | if (!strcmp(*argv,"-in")) { | ||
| 112 | if (--argc < 1) badarg = 1; | ||
| 113 | infile= *(++argv); | ||
| 114 | } else if (!strcmp(*argv,"-out")) { | ||
| 115 | if (--argc < 1) badarg = 1; | ||
| 116 | outfile= *(++argv); | ||
| 117 | } else if(!strcmp(*argv, "-inkey")) { | ||
| 118 | if (--argc < 1) badarg = 1; | ||
| 119 | keyfile = *(++argv); | ||
| 120 | } else if(!strcmp(*argv, "-engine")) { | ||
| 121 | if (--argc < 1) badarg = 1; | ||
| 122 | engine = *(++argv); | ||
| 123 | } else if(!strcmp(*argv, "-pubin")) { | ||
| 124 | key_type = KEY_PUBKEY; | ||
| 125 | } else if(!strcmp(*argv, "-certin")) { | ||
| 126 | key_type = KEY_CERT; | ||
| 127 | } | ||
| 128 | else if(!strcmp(*argv, "-asn1parse")) asn1parse = 1; | ||
| 129 | else if(!strcmp(*argv, "-hexdump")) hexdump = 1; | ||
| 130 | else if(!strcmp(*argv, "-raw")) pad = RSA_NO_PADDING; | ||
| 131 | else if(!strcmp(*argv, "-oaep")) pad = RSA_PKCS1_OAEP_PADDING; | ||
| 132 | else if(!strcmp(*argv, "-ssl")) pad = RSA_SSLV23_PADDING; | ||
| 133 | else if(!strcmp(*argv, "-pkcs")) pad = RSA_PKCS1_PADDING; | ||
| 134 | else if(!strcmp(*argv, "-sign")) { | ||
| 135 | rsa_mode = RSA_SIGN; | ||
| 136 | need_priv = 1; | ||
| 137 | } else if(!strcmp(*argv, "-verify")) rsa_mode = RSA_VERIFY; | ||
| 138 | else if(!strcmp(*argv, "-rev")) rev = 1; | ||
| 139 | else if(!strcmp(*argv, "-encrypt")) rsa_mode = RSA_ENCRYPT; | ||
| 140 | else if(!strcmp(*argv, "-decrypt")) { | ||
| 141 | rsa_mode = RSA_DECRYPT; | ||
| 142 | need_priv = 1; | ||
| 143 | } else badarg = 1; | ||
| 144 | if(badarg) { | ||
| 145 | usage(); | ||
| 146 | goto end; | ||
| 147 | } | ||
| 148 | argc--; | ||
| 149 | argv++; | ||
| 150 | } | ||
| 151 | |||
| 152 | if(need_priv && (key_type != KEY_PRIVKEY)) { | ||
| 153 | BIO_printf(bio_err, "A private key is needed for this operation\n"); | ||
| 154 | goto end; | ||
| 155 | } | ||
| 156 | |||
| 157 | if (engine != NULL) | ||
| 158 | { | ||
| 159 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 160 | { | ||
| 161 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 162 | engine); | ||
| 163 | goto end; | ||
| 164 | } | ||
| 165 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 166 | { | ||
| 167 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 168 | goto end; | ||
| 169 | } | ||
| 170 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 171 | /* Free our "structural" reference. */ | ||
| 172 | ENGINE_free(e); | ||
| 173 | } | ||
| 174 | |||
| 175 | /* FIXME: seed PRNG only if needed */ | ||
| 176 | app_RAND_load_file(NULL, bio_err, 0); | ||
| 177 | |||
| 178 | switch(key_type) { | ||
| 179 | case KEY_PRIVKEY: | ||
| 180 | pkey = load_key(bio_err, keyfile, keyform, NULL); | ||
| 181 | break; | ||
| 182 | |||
| 183 | case KEY_PUBKEY: | ||
| 184 | pkey = load_pubkey(bio_err, keyfile, keyform); | ||
| 185 | break; | ||
| 186 | |||
| 187 | case KEY_CERT: | ||
| 188 | x = load_cert(bio_err, keyfile, keyform); | ||
| 189 | if(x) { | ||
| 190 | pkey = X509_get_pubkey(x); | ||
| 191 | X509_free(x); | ||
| 192 | } | ||
| 193 | break; | ||
| 194 | } | ||
| 195 | |||
| 196 | if(!pkey) { | ||
| 197 | BIO_printf(bio_err, "Error loading key\n"); | ||
| 198 | return 1; | ||
| 199 | } | ||
| 200 | |||
| 201 | rsa = EVP_PKEY_get1_RSA(pkey); | ||
| 202 | EVP_PKEY_free(pkey); | ||
| 203 | |||
| 204 | if(!rsa) { | ||
| 205 | BIO_printf(bio_err, "Error getting RSA key\n"); | ||
| 206 | ERR_print_errors(bio_err); | ||
| 207 | goto end; | ||
| 208 | } | ||
| 209 | |||
| 210 | |||
| 211 | if(infile) { | ||
| 212 | if(!(in = BIO_new_file(infile, "rb"))) { | ||
| 213 | BIO_printf(bio_err, "Error Reading Input File\n"); | ||
| 214 | ERR_print_errors(bio_err); | ||
| 215 | goto end; | ||
| 216 | } | ||
| 217 | } else in = BIO_new_fp(stdin, BIO_NOCLOSE); | ||
| 218 | |||
| 219 | if(outfile) { | ||
| 220 | if(!(out = BIO_new_file(outfile, "wb"))) { | ||
| 221 | BIO_printf(bio_err, "Error Reading Output File\n"); | ||
| 222 | ERR_print_errors(bio_err); | ||
| 223 | goto end; | ||
| 224 | } | ||
| 225 | } else { | ||
| 226 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 227 | #ifdef VMS | ||
| 228 | { | ||
| 229 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 230 | out = BIO_push(tmpbio, out); | ||
| 231 | } | ||
| 232 | #endif | ||
| 233 | } | ||
| 234 | |||
| 235 | keysize = RSA_size(rsa); | ||
| 236 | |||
| 237 | rsa_in = OPENSSL_malloc(keysize * 2); | ||
| 238 | rsa_out = OPENSSL_malloc(keysize); | ||
| 239 | |||
| 240 | /* Read the input data */ | ||
| 241 | rsa_inlen = BIO_read(in, rsa_in, keysize * 2); | ||
| 242 | if(rsa_inlen <= 0) { | ||
| 243 | BIO_printf(bio_err, "Error reading input Data\n"); | ||
| 244 | exit(1); | ||
| 245 | } | ||
| 246 | if(rev) { | ||
| 247 | int i; | ||
| 248 | unsigned char ctmp; | ||
| 249 | for(i = 0; i < rsa_inlen/2; i++) { | ||
| 250 | ctmp = rsa_in[i]; | ||
| 251 | rsa_in[i] = rsa_in[rsa_inlen - 1 - i]; | ||
| 252 | rsa_in[rsa_inlen - 1 - i] = ctmp; | ||
| 253 | } | ||
| 254 | } | ||
| 255 | switch(rsa_mode) { | ||
| 256 | |||
| 257 | case RSA_VERIFY: | ||
| 258 | rsa_outlen = RSA_public_decrypt(rsa_inlen, rsa_in, rsa_out, rsa, pad); | ||
| 259 | break; | ||
| 260 | |||
| 261 | case RSA_SIGN: | ||
| 262 | rsa_outlen = RSA_private_encrypt(rsa_inlen, rsa_in, rsa_out, rsa, pad); | ||
| 263 | break; | ||
| 264 | |||
| 265 | case RSA_ENCRYPT: | ||
| 266 | rsa_outlen = RSA_public_encrypt(rsa_inlen, rsa_in, rsa_out, rsa, pad); | ||
| 267 | break; | ||
| 268 | |||
| 269 | case RSA_DECRYPT: | ||
| 270 | rsa_outlen = RSA_private_decrypt(rsa_inlen, rsa_in, rsa_out, rsa, pad); | ||
| 271 | break; | ||
| 272 | |||
| 273 | } | ||
| 274 | |||
| 275 | if(rsa_outlen <= 0) { | ||
| 276 | BIO_printf(bio_err, "RSA operation error\n"); | ||
| 277 | ERR_print_errors(bio_err); | ||
| 278 | goto end; | ||
| 279 | } | ||
| 280 | ret = 0; | ||
| 281 | if(asn1parse) { | ||
| 282 | if(!ASN1_parse_dump(out, rsa_out, rsa_outlen, 1, -1)) { | ||
| 283 | ERR_print_errors(bio_err); | ||
| 284 | } | ||
| 285 | } else if(hexdump) BIO_dump(out, (char *)rsa_out, rsa_outlen); | ||
| 286 | else BIO_write(out, rsa_out, rsa_outlen); | ||
| 287 | end: | ||
| 288 | RSA_free(rsa); | ||
| 289 | BIO_free(in); | ||
| 290 | BIO_free_all(out); | ||
| 291 | if(rsa_in) OPENSSL_free(rsa_in); | ||
| 292 | if(rsa_out) OPENSSL_free(rsa_out); | ||
| 293 | return ret; | ||
| 294 | } | ||
| 295 | |||
| 296 | static void usage() | ||
| 297 | { | ||
| 298 | BIO_printf(bio_err, "Usage: rsautl [options]\n"); | ||
| 299 | BIO_printf(bio_err, "-in file input file\n"); | ||
| 300 | BIO_printf(bio_err, "-out file output file\n"); | ||
| 301 | BIO_printf(bio_err, "-inkey file input key\n"); | ||
| 302 | BIO_printf(bio_err, "-pubin input is an RSA public\n"); | ||
| 303 | BIO_printf(bio_err, "-certin input is a certificate carrying an RSA public key\n"); | ||
| 304 | BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n"); | ||
| 305 | BIO_printf(bio_err, "-ssl use SSL v2 padding\n"); | ||
| 306 | BIO_printf(bio_err, "-raw use no padding\n"); | ||
| 307 | BIO_printf(bio_err, "-pkcs use PKCS#1 v1.5 padding (default)\n"); | ||
| 308 | BIO_printf(bio_err, "-oaep use PKCS#1 OAEP\n"); | ||
| 309 | BIO_printf(bio_err, "-sign sign with private key\n"); | ||
| 310 | BIO_printf(bio_err, "-verify verify with public key\n"); | ||
| 311 | BIO_printf(bio_err, "-encrypt encrypt with public key\n"); | ||
| 312 | BIO_printf(bio_err, "-decrypt decrypt with private key\n"); | ||
| 313 | BIO_printf(bio_err, "-hexdump hex dump output\n"); | ||
| 314 | } | ||
| 315 | |||
diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c index e629f8e7f1..45d627a60a 100644 --- a/src/lib/libssl/src/apps/s_client.c +++ b/src/lib/libssl/src/apps/s_client.c | |||
| @@ -79,6 +79,7 @@ typedef unsigned int u_int; | |||
| 79 | #include <openssl/ssl.h> | 79 | #include <openssl/ssl.h> |
| 80 | #include <openssl/err.h> | 80 | #include <openssl/err.h> |
| 81 | #include <openssl/pem.h> | 81 | #include <openssl/pem.h> |
| 82 | #include <openssl/engine.h> | ||
| 82 | #include "s_apps.h" | 83 | #include "s_apps.h" |
| 83 | 84 | ||
| 84 | #ifdef WINDOWS | 85 | #ifdef WINDOWS |
| @@ -152,6 +153,7 @@ static void sc_usage(void) | |||
| 152 | BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n"); | 153 | BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n"); |
| 153 | BIO_printf(bio_err," -cipher - preferred cipher to use, use the 'openssl ciphers'\n"); | 154 | BIO_printf(bio_err," -cipher - preferred cipher to use, use the 'openssl ciphers'\n"); |
| 154 | BIO_printf(bio_err," command to see what is available\n"); | 155 | BIO_printf(bio_err," command to see what is available\n"); |
| 156 | BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n"); | ||
| 155 | 157 | ||
| 156 | } | 158 | } |
| 157 | 159 | ||
| @@ -179,6 +181,8 @@ int MAIN(int argc, char **argv) | |||
| 179 | int prexit = 0; | 181 | int prexit = 0; |
| 180 | SSL_METHOD *meth=NULL; | 182 | SSL_METHOD *meth=NULL; |
| 181 | BIO *sbio; | 183 | BIO *sbio; |
| 184 | char *engine_id=NULL; | ||
| 185 | ENGINE *e=NULL; | ||
| 182 | #ifdef WINDOWS | 186 | #ifdef WINDOWS |
| 183 | struct timeval tv; | 187 | struct timeval tv; |
| 184 | #endif | 188 | #endif |
| @@ -201,8 +205,8 @@ int MAIN(int argc, char **argv) | |||
| 201 | if (bio_err == NULL) | 205 | if (bio_err == NULL) |
| 202 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 206 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
| 203 | 207 | ||
| 204 | if ( ((cbuf=Malloc(BUFSIZZ)) == NULL) || | 208 | if ( ((cbuf=OPENSSL_malloc(BUFSIZZ)) == NULL) || |
| 205 | ((sbuf=Malloc(BUFSIZZ)) == NULL)) | 209 | ((sbuf=OPENSSL_malloc(BUFSIZZ)) == NULL)) |
| 206 | { | 210 | { |
| 207 | BIO_printf(bio_err,"out of memory\n"); | 211 | BIO_printf(bio_err,"out of memory\n"); |
| 208 | goto end; | 212 | goto end; |
| @@ -316,6 +320,11 @@ int MAIN(int argc, char **argv) | |||
| 316 | else if (strcmp(*argv,"-nbio") == 0) | 320 | else if (strcmp(*argv,"-nbio") == 0) |
| 317 | { c_nbio=1; } | 321 | { c_nbio=1; } |
| 318 | #endif | 322 | #endif |
| 323 | else if (strcmp(*argv,"-engine") == 0) | ||
| 324 | { | ||
| 325 | if (--argc < 1) goto bad; | ||
| 326 | engine_id = *(++argv); | ||
| 327 | } | ||
| 319 | else | 328 | else |
| 320 | { | 329 | { |
| 321 | BIO_printf(bio_err,"unknown option %s\n",*argv); | 330 | BIO_printf(bio_err,"unknown option %s\n",*argv); |
| @@ -349,6 +358,30 @@ bad: | |||
| 349 | 358 | ||
| 350 | OpenSSL_add_ssl_algorithms(); | 359 | OpenSSL_add_ssl_algorithms(); |
| 351 | SSL_load_error_strings(); | 360 | SSL_load_error_strings(); |
| 361 | |||
| 362 | if (engine_id != NULL) | ||
| 363 | { | ||
| 364 | if((e = ENGINE_by_id(engine_id)) == NULL) | ||
| 365 | { | ||
| 366 | BIO_printf(bio_err,"invalid engine\n"); | ||
| 367 | ERR_print_errors(bio_err); | ||
| 368 | goto end; | ||
| 369 | } | ||
| 370 | if (c_debug) | ||
| 371 | { | ||
| 372 | ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM, | ||
| 373 | 0, bio_err, 0); | ||
| 374 | } | ||
| 375 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 376 | { | ||
| 377 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 378 | ERR_print_errors(bio_err); | ||
| 379 | goto end; | ||
| 380 | } | ||
| 381 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine_id); | ||
| 382 | ENGINE_free(e); | ||
| 383 | } | ||
| 384 | |||
| 352 | ctx=SSL_CTX_new(meth); | 385 | ctx=SSL_CTX_new(meth); |
| 353 | if (ctx == NULL) | 386 | if (ctx == NULL) |
| 354 | { | 387 | { |
| @@ -523,7 +556,7 @@ re_start: | |||
| 523 | tv.tv_usec = 0; | 556 | tv.tv_usec = 0; |
| 524 | i=select(width,(void *)&readfds,(void *)&writefds, | 557 | i=select(width,(void *)&readfds,(void *)&writefds, |
| 525 | NULL,&tv); | 558 | NULL,&tv); |
| 526 | if(!i && (!_kbhit() || !read_tty) ) continue; | 559 | if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue; |
| 527 | } else i=select(width,(void *)&readfds,(void *)&writefds, | 560 | } else i=select(width,(void *)&readfds,(void *)&writefds, |
| 528 | NULL,NULL); | 561 | NULL,NULL); |
| 529 | } | 562 | } |
| @@ -689,7 +722,7 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240 | |||
| 689 | } | 722 | } |
| 690 | 723 | ||
| 691 | #ifdef WINDOWS | 724 | #ifdef WINDOWS |
| 692 | else if (_kbhit()) | 725 | else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) |
| 693 | #else | 726 | #else |
| 694 | else if (FD_ISSET(fileno(stdin),&readfds)) | 727 | else if (FD_ISSET(fileno(stdin),&readfds)) |
| 695 | #endif | 728 | #endif |
| @@ -753,8 +786,8 @@ end: | |||
| 753 | if (con != NULL) SSL_free(con); | 786 | if (con != NULL) SSL_free(con); |
| 754 | if (con2 != NULL) SSL_free(con2); | 787 | if (con2 != NULL) SSL_free(con2); |
| 755 | if (ctx != NULL) SSL_CTX_free(ctx); | 788 | if (ctx != NULL) SSL_CTX_free(ctx); |
| 756 | if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); Free(cbuf); } | 789 | if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); OPENSSL_free(cbuf); } |
| 757 | if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); Free(sbuf); } | 790 | if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); OPENSSL_free(sbuf); } |
| 758 | if (bio_c_out != NULL) | 791 | if (bio_c_out != NULL) |
| 759 | { | 792 | { |
| 760 | BIO_free(bio_c_out); | 793 | BIO_free(bio_c_out); |
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index af19b89227..61a77dff11 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
| @@ -83,6 +83,7 @@ typedef unsigned int u_int; | |||
| 83 | #include <openssl/pem.h> | 83 | #include <openssl/pem.h> |
| 84 | #include <openssl/x509.h> | 84 | #include <openssl/x509.h> |
| 85 | #include <openssl/ssl.h> | 85 | #include <openssl/ssl.h> |
| 86 | #include <openssl/engine.h> | ||
| 86 | #include "s_apps.h" | 87 | #include "s_apps.h" |
| 87 | 88 | ||
| 88 | #ifdef WINDOWS | 89 | #ifdef WINDOWS |
| @@ -176,6 +177,7 @@ static int s_debug=0; | |||
| 176 | static int s_quiet=0; | 177 | static int s_quiet=0; |
| 177 | 178 | ||
| 178 | static int hack=0; | 179 | static int hack=0; |
| 180 | static char *engine_id=NULL; | ||
| 179 | 181 | ||
| 180 | #ifdef MONOLITH | 182 | #ifdef MONOLITH |
| 181 | static void s_server_init(void) | 183 | static void s_server_init(void) |
| @@ -198,6 +200,7 @@ static void s_server_init(void) | |||
| 198 | s_debug=0; | 200 | s_debug=0; |
| 199 | s_quiet=0; | 201 | s_quiet=0; |
| 200 | hack=0; | 202 | hack=0; |
| 203 | engine_id=NULL; | ||
| 201 | } | 204 | } |
| 202 | #endif | 205 | #endif |
| 203 | 206 | ||
| @@ -242,6 +245,7 @@ static void sv_usage(void) | |||
| 242 | BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n"); | 245 | BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n"); |
| 243 | BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n"); | 246 | BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n"); |
| 244 | BIO_printf(bio_err," -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n"); | 247 | BIO_printf(bio_err," -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n"); |
| 248 | BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n"); | ||
| 245 | } | 249 | } |
| 246 | 250 | ||
| 247 | static int local_argc=0; | 251 | static int local_argc=0; |
| @@ -285,7 +289,7 @@ static int ebcdic_new(BIO *bi) | |||
| 285 | { | 289 | { |
| 286 | EBCDIC_OUTBUFF *wbuf; | 290 | EBCDIC_OUTBUFF *wbuf; |
| 287 | 291 | ||
| 288 | wbuf = (EBCDIC_OUTBUFF *)Malloc(sizeof(EBCDIC_OUTBUFF) + 1024); | 292 | wbuf = (EBCDIC_OUTBUFF *)OPENSSL_malloc(sizeof(EBCDIC_OUTBUFF) + 1024); |
| 289 | wbuf->alloced = 1024; | 293 | wbuf->alloced = 1024; |
| 290 | wbuf->buff[0] = '\0'; | 294 | wbuf->buff[0] = '\0'; |
| 291 | 295 | ||
| @@ -299,7 +303,7 @@ static int ebcdic_free(BIO *a) | |||
| 299 | { | 303 | { |
| 300 | if (a == NULL) return(0); | 304 | if (a == NULL) return(0); |
| 301 | if (a->ptr != NULL) | 305 | if (a->ptr != NULL) |
| 302 | Free(a->ptr); | 306 | OPENSSL_free(a->ptr); |
| 303 | a->ptr=NULL; | 307 | a->ptr=NULL; |
| 304 | a->init=0; | 308 | a->init=0; |
| 305 | a->flags=0; | 309 | a->flags=0; |
| @@ -336,8 +340,8 @@ static int ebcdic_write(BIO *b, char *in, int inl) | |||
| 336 | num = num + num; /* double the size */ | 340 | num = num + num; /* double the size */ |
| 337 | if (num < inl) | 341 | if (num < inl) |
| 338 | num = inl; | 342 | num = inl; |
| 339 | Free(wbuf); | 343 | OPENSSL_free(wbuf); |
| 340 | wbuf=(EBCDIC_OUTBUFF *)Malloc(sizeof(EBCDIC_OUTBUFF) + num); | 344 | wbuf=(EBCDIC_OUTBUFF *)OPENSSL_malloc(sizeof(EBCDIC_OUTBUFF) + num); |
| 341 | 345 | ||
| 342 | wbuf->alloced = num; | 346 | wbuf->alloced = num; |
| 343 | wbuf->buff[0] = '\0'; | 347 | wbuf->buff[0] = '\0'; |
| @@ -411,6 +415,7 @@ int MAIN(int argc, char *argv[]) | |||
| 411 | int no_tmp_rsa=0,no_dhe=0,nocert=0; | 415 | int no_tmp_rsa=0,no_dhe=0,nocert=0; |
| 412 | int state=0; | 416 | int state=0; |
| 413 | SSL_METHOD *meth=NULL; | 417 | SSL_METHOD *meth=NULL; |
| 418 | ENGINE *e=NULL; | ||
| 414 | #ifndef NO_DH | 419 | #ifndef NO_DH |
| 415 | DH *dh=NULL; | 420 | DH *dh=NULL; |
| 416 | #endif | 421 | #endif |
| @@ -565,6 +570,11 @@ int MAIN(int argc, char *argv[]) | |||
| 565 | else if (strcmp(*argv,"-tls1") == 0) | 570 | else if (strcmp(*argv,"-tls1") == 0) |
| 566 | { meth=TLSv1_server_method(); } | 571 | { meth=TLSv1_server_method(); } |
| 567 | #endif | 572 | #endif |
| 573 | else if (strcmp(*argv,"-engine") == 0) | ||
| 574 | { | ||
| 575 | if (--argc < 1) goto bad; | ||
| 576 | engine_id= *(++argv); | ||
| 577 | } | ||
| 568 | else | 578 | else |
| 569 | { | 579 | { |
| 570 | BIO_printf(bio_err,"unknown option %s\n",*argv); | 580 | BIO_printf(bio_err,"unknown option %s\n",*argv); |
| @@ -609,6 +619,29 @@ bad: | |||
| 609 | SSL_load_error_strings(); | 619 | SSL_load_error_strings(); |
| 610 | OpenSSL_add_ssl_algorithms(); | 620 | OpenSSL_add_ssl_algorithms(); |
| 611 | 621 | ||
| 622 | if (engine_id != NULL) | ||
| 623 | { | ||
| 624 | if((e = ENGINE_by_id(engine_id)) == NULL) | ||
| 625 | { | ||
| 626 | BIO_printf(bio_err,"invalid engine\n"); | ||
| 627 | ERR_print_errors(bio_err); | ||
| 628 | goto end; | ||
| 629 | } | ||
| 630 | if (s_debug) | ||
| 631 | { | ||
| 632 | ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM, | ||
| 633 | 0, bio_err, 0); | ||
| 634 | } | ||
| 635 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 636 | { | ||
| 637 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 638 | ERR_print_errors(bio_err); | ||
| 639 | goto end; | ||
| 640 | } | ||
| 641 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine_id); | ||
| 642 | ENGINE_free(e); | ||
| 643 | } | ||
| 644 | |||
| 612 | ctx=SSL_CTX_new(meth); | 645 | ctx=SSL_CTX_new(meth); |
| 613 | if (ctx == NULL) | 646 | if (ctx == NULL) |
| 614 | { | 647 | { |
| @@ -766,7 +799,7 @@ static int sv_body(char *hostname, int s, unsigned char *context) | |||
| 766 | struct timeval tv; | 799 | struct timeval tv; |
| 767 | #endif | 800 | #endif |
| 768 | 801 | ||
| 769 | if ((buf=Malloc(bufsize)) == NULL) | 802 | if ((buf=OPENSSL_malloc(bufsize)) == NULL) |
| 770 | { | 803 | { |
| 771 | BIO_printf(bio_err,"out of memory\n"); | 804 | BIO_printf(bio_err,"out of memory\n"); |
| 772 | goto err; | 805 | goto err; |
| @@ -1028,7 +1061,7 @@ err: | |||
| 1028 | if (buf != NULL) | 1061 | if (buf != NULL) |
| 1029 | { | 1062 | { |
| 1030 | memset(buf,0,bufsize); | 1063 | memset(buf,0,bufsize); |
| 1031 | Free(buf); | 1064 | OPENSSL_free(buf); |
| 1032 | } | 1065 | } |
| 1033 | if (ret >= 0) | 1066 | if (ret >= 0) |
| 1034 | BIO_printf(bio_s_out,"ACCEPT\n"); | 1067 | BIO_printf(bio_s_out,"ACCEPT\n"); |
| @@ -1145,7 +1178,7 @@ static int www_body(char *hostname, int s, unsigned char *context) | |||
| 1145 | BIO *io,*ssl_bio,*sbio; | 1178 | BIO *io,*ssl_bio,*sbio; |
| 1146 | long total_bytes; | 1179 | long total_bytes; |
| 1147 | 1180 | ||
| 1148 | buf=Malloc(bufsize); | 1181 | buf=OPENSSL_malloc(bufsize); |
| 1149 | if (buf == NULL) return(0); | 1182 | if (buf == NULL) return(0); |
| 1150 | io=BIO_new(BIO_f_buffer()); | 1183 | io=BIO_new(BIO_f_buffer()); |
| 1151 | ssl_bio=BIO_new(BIO_f_ssl()); | 1184 | ssl_bio=BIO_new(BIO_f_ssl()); |
| @@ -1474,7 +1507,7 @@ err: | |||
| 1474 | if (ret >= 0) | 1507 | if (ret >= 0) |
| 1475 | BIO_printf(bio_s_out,"ACCEPT\n"); | 1508 | BIO_printf(bio_s_out,"ACCEPT\n"); |
| 1476 | 1509 | ||
| 1477 | if (buf != NULL) Free(buf); | 1510 | if (buf != NULL) OPENSSL_free(buf); |
| 1478 | if (io != NULL) BIO_free_all(io); | 1511 | if (io != NULL) BIO_free_all(io); |
| 1479 | /* if (ssl_bio != NULL) BIO_free(ssl_bio);*/ | 1512 | /* if (ssl_bio != NULL) BIO_free(ssl_bio);*/ |
| 1480 | return(ret); | 1513 | return(ret); |
diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c index 081b1a57d1..9812e6d505 100644 --- a/src/lib/libssl/src/apps/s_socket.c +++ b/src/lib/libssl/src/apps/s_socket.c | |||
| @@ -209,9 +209,11 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port) | |||
| 209 | s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL); | 209 | s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL); |
| 210 | if (s == INVALID_SOCKET) { perror("socket"); return(0); } | 210 | if (s == INVALID_SOCKET) { perror("socket"); return(0); } |
| 211 | 211 | ||
| 212 | #ifndef MPE | ||
| 212 | i=0; | 213 | i=0; |
| 213 | i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); | 214 | i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); |
| 214 | if (i < 0) { perror("keepalive"); return(0); } | 215 | if (i < 0) { perror("keepalive"); return(0); } |
| 216 | #endif | ||
| 215 | 217 | ||
| 216 | if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1) | 218 | if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1) |
| 217 | { close(s); perror("connect"); return(0); } | 219 | { close(s); perror("connect"); return(0); } |
| @@ -241,7 +243,7 @@ int do_server(int port, int *ret, int (*cb)(), char *context) | |||
| 241 | return(0); | 243 | return(0); |
| 242 | } | 244 | } |
| 243 | i=(*cb)(name,sock, context); | 245 | i=(*cb)(name,sock, context); |
| 244 | if (name != NULL) Free(name); | 246 | if (name != NULL) OPENSSL_free(name); |
| 245 | SHUTDOWN2(sock); | 247 | SHUTDOWN2(sock); |
| 246 | if (i < 0) | 248 | if (i < 0) |
| 247 | { | 249 | { |
| @@ -372,9 +374,9 @@ redoit: | |||
| 372 | } | 374 | } |
| 373 | else | 375 | else |
| 374 | { | 376 | { |
| 375 | if ((*host=(char *)Malloc(strlen(h1->h_name)+1)) == NULL) | 377 | if ((*host=(char *)OPENSSL_malloc(strlen(h1->h_name)+1)) == NULL) |
| 376 | { | 378 | { |
| 377 | perror("Malloc"); | 379 | perror("OPENSSL_malloc"); |
| 378 | return(0); | 380 | return(0); |
| 379 | } | 381 | } |
| 380 | strcpy(*host,h1->h_name); | 382 | strcpy(*host,h1->h_name); |
diff --git a/src/lib/libssl/src/apps/sess_id.c b/src/lib/libssl/src/apps/sess_id.c index 71d5aa0b7c..60cc3f1e49 100644 --- a/src/lib/libssl/src/apps/sess_id.c +++ b/src/lib/libssl/src/apps/sess_id.c | |||
| @@ -206,7 +206,15 @@ bad: | |||
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | if (outfile == NULL) | 208 | if (outfile == NULL) |
| 209 | { | ||
| 209 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 210 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 211 | #ifdef VMS | ||
| 212 | { | ||
| 213 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 214 | out = BIO_push(tmpbio, out); | ||
| 215 | } | ||
| 216 | #endif | ||
| 217 | } | ||
| 210 | else | 218 | else |
| 211 | { | 219 | { |
| 212 | if (BIO_write_filename(out,outfile) <= 0) | 220 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -262,7 +270,7 @@ bad: | |||
| 262 | } | 270 | } |
| 263 | ret=0; | 271 | ret=0; |
| 264 | end: | 272 | end: |
| 265 | if (out != NULL) BIO_free(out); | 273 | if (out != NULL) BIO_free_all(out); |
| 266 | if (x != NULL) SSL_SESSION_free(x); | 274 | if (x != NULL) SSL_SESSION_free(x); |
| 267 | EXIT(ret); | 275 | EXIT(ret); |
| 268 | } | 276 | } |
diff --git a/src/lib/libssl/src/apps/smime.c b/src/lib/libssl/src/apps/smime.c index 7dc66d6ecd..16b940084b 100644 --- a/src/lib/libssl/src/apps/smime.c +++ b/src/lib/libssl/src/apps/smime.c | |||
| @@ -64,12 +64,10 @@ | |||
| 64 | #include <openssl/crypto.h> | 64 | #include <openssl/crypto.h> |
| 65 | #include <openssl/pem.h> | 65 | #include <openssl/pem.h> |
| 66 | #include <openssl/err.h> | 66 | #include <openssl/err.h> |
| 67 | #include <openssl/engine.h> | ||
| 67 | 68 | ||
| 68 | #undef PROG | 69 | #undef PROG |
| 69 | #define PROG smime_main | 70 | #define PROG smime_main |
| 70 | static X509 *load_cert(char *file); | ||
| 71 | static EVP_PKEY *load_key(char *file, char *pass); | ||
| 72 | static STACK_OF(X509) *load_certs(char *file); | ||
| 73 | static X509_STORE *setup_verify(char *CAfile, char *CApath); | 71 | static X509_STORE *setup_verify(char *CAfile, char *CApath); |
| 74 | static int save_certs(char *signerfile, STACK_OF(X509) *signers); | 72 | static int save_certs(char *signerfile, STACK_OF(X509) *signers); |
| 75 | 73 | ||
| @@ -84,13 +82,14 @@ int MAIN(int, char **); | |||
| 84 | 82 | ||
| 85 | int MAIN(int argc, char **argv) | 83 | int MAIN(int argc, char **argv) |
| 86 | { | 84 | { |
| 85 | ENGINE *e = NULL; | ||
| 87 | int operation = 0; | 86 | int operation = 0; |
| 88 | int ret = 0; | 87 | int ret = 0; |
| 89 | char **args; | 88 | char **args; |
| 90 | char *inmode = "r", *outmode = "w"; | 89 | char *inmode = "r", *outmode = "w"; |
| 91 | char *infile = NULL, *outfile = NULL; | 90 | char *infile = NULL, *outfile = NULL; |
| 92 | char *signerfile = NULL, *recipfile = NULL; | 91 | char *signerfile = NULL, *recipfile = NULL; |
| 93 | char *certfile = NULL, *keyfile = NULL; | 92 | char *certfile = NULL, *keyfile = NULL, *contfile=NULL; |
| 94 | EVP_CIPHER *cipher = NULL; | 93 | EVP_CIPHER *cipher = NULL; |
| 95 | PKCS7 *p7 = NULL; | 94 | PKCS7 *p7 = NULL; |
| 96 | X509_STORE *store = NULL; | 95 | X509_STORE *store = NULL; |
| @@ -105,8 +104,10 @@ int MAIN(int argc, char **argv) | |||
| 105 | char *passargin = NULL, *passin = NULL; | 104 | char *passargin = NULL, *passin = NULL; |
| 106 | char *inrand = NULL; | 105 | char *inrand = NULL; |
| 107 | int need_rand = 0; | 106 | int need_rand = 0; |
| 108 | args = argv + 1; | 107 | int informat = FORMAT_SMIME, outformat = FORMAT_SMIME; |
| 108 | char *engine=NULL; | ||
| 109 | 109 | ||
| 110 | args = argv + 1; | ||
| 110 | ret = 1; | 111 | ret = 1; |
| 111 | 112 | ||
| 112 | while (!badarg && *args && *args[0] == '-') { | 113 | while (!badarg && *args && *args[0] == '-') { |
| @@ -143,6 +144,8 @@ int MAIN(int argc, char **argv) | |||
| 143 | flags |= PKCS7_NOATTR; | 144 | flags |= PKCS7_NOATTR; |
| 144 | else if (!strcmp (*args, "-nodetach")) | 145 | else if (!strcmp (*args, "-nodetach")) |
| 145 | flags &= ~PKCS7_DETACHED; | 146 | flags &= ~PKCS7_DETACHED; |
| 147 | else if (!strcmp (*args, "-nosmimecap")) | ||
| 148 | flags |= PKCS7_NOSMIMECAP; | ||
| 146 | else if (!strcmp (*args, "-binary")) | 149 | else if (!strcmp (*args, "-binary")) |
| 147 | flags |= PKCS7_BINARY; | 150 | flags |= PKCS7_BINARY; |
| 148 | else if (!strcmp (*args, "-nosigs")) | 151 | else if (!strcmp (*args, "-nosigs")) |
| @@ -153,6 +156,11 @@ int MAIN(int argc, char **argv) | |||
| 153 | inrand = *args; | 156 | inrand = *args; |
| 154 | } else badarg = 1; | 157 | } else badarg = 1; |
| 155 | need_rand = 1; | 158 | need_rand = 1; |
| 159 | } else if (!strcmp(*args,"-engine")) { | ||
| 160 | if (args[1]) { | ||
| 161 | args++; | ||
| 162 | engine = *args; | ||
| 163 | } else badarg = 1; | ||
| 156 | } else if (!strcmp(*args,"-passin")) { | 164 | } else if (!strcmp(*args,"-passin")) { |
| 157 | if (args[1]) { | 165 | if (args[1]) { |
| 158 | args++; | 166 | args++; |
| @@ -208,11 +216,26 @@ int MAIN(int argc, char **argv) | |||
| 208 | args++; | 216 | args++; |
| 209 | infile = *args; | 217 | infile = *args; |
| 210 | } else badarg = 1; | 218 | } else badarg = 1; |
| 219 | } else if (!strcmp (*args, "-inform")) { | ||
| 220 | if (args[1]) { | ||
| 221 | args++; | ||
| 222 | informat = str2fmt(*args); | ||
| 223 | } else badarg = 1; | ||
| 224 | } else if (!strcmp (*args, "-outform")) { | ||
| 225 | if (args[1]) { | ||
| 226 | args++; | ||
| 227 | outformat = str2fmt(*args); | ||
| 228 | } else badarg = 1; | ||
| 211 | } else if (!strcmp (*args, "-out")) { | 229 | } else if (!strcmp (*args, "-out")) { |
| 212 | if (args[1]) { | 230 | if (args[1]) { |
| 213 | args++; | 231 | args++; |
| 214 | outfile = *args; | 232 | outfile = *args; |
| 215 | } else badarg = 1; | 233 | } else badarg = 1; |
| 234 | } else if (!strcmp (*args, "-content")) { | ||
| 235 | if (args[1]) { | ||
| 236 | args++; | ||
| 237 | contfile = *args; | ||
| 238 | } else badarg = 1; | ||
| 216 | } else badarg = 1; | 239 | } else badarg = 1; |
| 217 | args++; | 240 | args++; |
| 218 | } | 241 | } |
| @@ -264,14 +287,18 @@ int MAIN(int argc, char **argv) | |||
| 264 | BIO_printf (bio_err, "-signer file signer certificate file\n"); | 287 | BIO_printf (bio_err, "-signer file signer certificate file\n"); |
| 265 | BIO_printf (bio_err, "-recip file recipient certificate file for decryption\n"); | 288 | BIO_printf (bio_err, "-recip file recipient certificate file for decryption\n"); |
| 266 | BIO_printf (bio_err, "-in file input file\n"); | 289 | BIO_printf (bio_err, "-in file input file\n"); |
| 290 | BIO_printf (bio_err, "-inform arg input format SMIME (default), PEM or DER\n"); | ||
| 267 | BIO_printf (bio_err, "-inkey file input private key (if not signer or recipient)\n"); | 291 | BIO_printf (bio_err, "-inkey file input private key (if not signer or recipient)\n"); |
| 268 | BIO_printf (bio_err, "-out file output file\n"); | 292 | BIO_printf (bio_err, "-out file output file\n"); |
| 293 | BIO_printf (bio_err, "-outform arg output format SMIME (default), PEM or DER\n"); | ||
| 294 | BIO_printf (bio_err, "-content file supply or override content for detached signature\n"); | ||
| 269 | BIO_printf (bio_err, "-to addr to address\n"); | 295 | BIO_printf (bio_err, "-to addr to address\n"); |
| 270 | BIO_printf (bio_err, "-from ad from address\n"); | 296 | BIO_printf (bio_err, "-from ad from address\n"); |
| 271 | BIO_printf (bio_err, "-subject s subject\n"); | 297 | BIO_printf (bio_err, "-subject s subject\n"); |
| 272 | BIO_printf (bio_err, "-text include or delete text MIME headers\n"); | 298 | BIO_printf (bio_err, "-text include or delete text MIME headers\n"); |
| 273 | BIO_printf (bio_err, "-CApath dir trusted certificates directory\n"); | 299 | BIO_printf (bio_err, "-CApath dir trusted certificates directory\n"); |
| 274 | BIO_printf (bio_err, "-CAfile file trusted certificates file\n"); | 300 | BIO_printf (bio_err, "-CAfile file trusted certificates file\n"); |
| 301 | BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n"); | ||
| 275 | BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 302 | BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); |
| 276 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); | 303 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); |
| 277 | BIO_printf(bio_err, " the random number generator\n"); | 304 | BIO_printf(bio_err, " the random number generator\n"); |
| @@ -279,6 +306,24 @@ int MAIN(int argc, char **argv) | |||
| 279 | goto end; | 306 | goto end; |
| 280 | } | 307 | } |
| 281 | 308 | ||
| 309 | if (engine != NULL) | ||
| 310 | { | ||
| 311 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 312 | { | ||
| 313 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 314 | engine); | ||
| 315 | goto end; | ||
| 316 | } | ||
| 317 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 318 | { | ||
| 319 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 320 | goto end; | ||
| 321 | } | ||
| 322 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 323 | /* Free our "structural" reference. */ | ||
| 324 | ENGINE_free(e); | ||
| 325 | } | ||
| 326 | |||
| 282 | if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { | 327 | if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { |
| 283 | BIO_printf(bio_err, "Error getting password\n"); | 328 | BIO_printf(bio_err, "Error getting password\n"); |
| 284 | goto end; | 329 | goto end; |
| @@ -295,9 +340,12 @@ int MAIN(int argc, char **argv) | |||
| 295 | 340 | ||
| 296 | if(operation != SMIME_SIGN) flags &= ~PKCS7_DETACHED; | 341 | if(operation != SMIME_SIGN) flags &= ~PKCS7_DETACHED; |
| 297 | 342 | ||
| 298 | if(flags & PKCS7_BINARY) { | 343 | if(operation & SMIME_OP) { |
| 299 | if(operation & SMIME_OP) inmode = "rb"; | 344 | if(flags & PKCS7_BINARY) inmode = "rb"; |
| 300 | else outmode = "rb"; | 345 | if(outformat == FORMAT_ASN1) outmode = "wb"; |
| 346 | } else { | ||
| 347 | if(flags & PKCS7_BINARY) outmode = "wb"; | ||
| 348 | if(informat == FORMAT_ASN1) inmode = "rb"; | ||
| 301 | } | 349 | } |
| 302 | 350 | ||
| 303 | if(operation == SMIME_ENCRYPT) { | 351 | if(operation == SMIME_ENCRYPT) { |
| @@ -311,7 +359,7 @@ int MAIN(int argc, char **argv) | |||
| 311 | } | 359 | } |
| 312 | encerts = sk_X509_new_null(); | 360 | encerts = sk_X509_new_null(); |
| 313 | while (*args) { | 361 | while (*args) { |
| 314 | if(!(cert = load_cert(*args))) { | 362 | if(!(cert = load_cert(bio_err,*args,FORMAT_PEM))) { |
| 315 | BIO_printf(bio_err, "Can't read recipient certificate file %s\n", *args); | 363 | BIO_printf(bio_err, "Can't read recipient certificate file %s\n", *args); |
| 316 | goto end; | 364 | goto end; |
| 317 | } | 365 | } |
| @@ -322,14 +370,14 @@ int MAIN(int argc, char **argv) | |||
| 322 | } | 370 | } |
| 323 | 371 | ||
| 324 | if(signerfile && (operation == SMIME_SIGN)) { | 372 | if(signerfile && (operation == SMIME_SIGN)) { |
| 325 | if(!(signer = load_cert(signerfile))) { | 373 | if(!(signer = load_cert(bio_err,signerfile,FORMAT_PEM))) { |
| 326 | BIO_printf(bio_err, "Can't read signer certificate file %s\n", signerfile); | 374 | BIO_printf(bio_err, "Can't read signer certificate file %s\n", signerfile); |
| 327 | goto end; | 375 | goto end; |
| 328 | } | 376 | } |
| 329 | } | 377 | } |
| 330 | 378 | ||
| 331 | if(certfile) { | 379 | if(certfile) { |
| 332 | if(!(other = load_certs(certfile))) { | 380 | if(!(other = load_certs(bio_err,certfile,FORMAT_PEM))) { |
| 333 | BIO_printf(bio_err, "Can't read certificate file %s\n", certfile); | 381 | BIO_printf(bio_err, "Can't read certificate file %s\n", certfile); |
| 334 | ERR_print_errors(bio_err); | 382 | ERR_print_errors(bio_err); |
| 335 | goto end; | 383 | goto end; |
| @@ -337,7 +385,7 @@ int MAIN(int argc, char **argv) | |||
| 337 | } | 385 | } |
| 338 | 386 | ||
| 339 | if(recipfile && (operation == SMIME_DECRYPT)) { | 387 | if(recipfile && (operation == SMIME_DECRYPT)) { |
| 340 | if(!(recip = load_cert(recipfile))) { | 388 | if(!(recip = load_cert(bio_err,recipfile,FORMAT_PEM))) { |
| 341 | BIO_printf(bio_err, "Can't read recipient certificate file %s\n", recipfile); | 389 | BIO_printf(bio_err, "Can't read recipient certificate file %s\n", recipfile); |
| 342 | ERR_print_errors(bio_err); | 390 | ERR_print_errors(bio_err); |
| 343 | goto end; | 391 | goto end; |
| @@ -351,7 +399,7 @@ int MAIN(int argc, char **argv) | |||
| 351 | } else keyfile = NULL; | 399 | } else keyfile = NULL; |
| 352 | 400 | ||
| 353 | if(keyfile) { | 401 | if(keyfile) { |
| 354 | if(!(key = load_key(keyfile, passin))) { | 402 | if(!(key = load_key(bio_err,keyfile, FORMAT_PEM, passin))) { |
| 355 | BIO_printf(bio_err, "Can't read recipient certificate file %s\n", keyfile); | 403 | BIO_printf(bio_err, "Can't read recipient certificate file %s\n", keyfile); |
| 356 | ERR_print_errors(bio_err); | 404 | ERR_print_errors(bio_err); |
| 357 | goto end; | 405 | goto end; |
| @@ -372,7 +420,15 @@ int MAIN(int argc, char **argv) | |||
| 372 | "Can't open output file %s\n", outfile); | 420 | "Can't open output file %s\n", outfile); |
| 373 | goto end; | 421 | goto end; |
| 374 | } | 422 | } |
| 375 | } else out = BIO_new_fp(stdout, BIO_NOCLOSE); | 423 | } else { |
| 424 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 425 | #ifdef VMS | ||
| 426 | { | ||
| 427 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 428 | out = BIO_push(tmpbio, out); | ||
| 429 | } | ||
| 430 | #endif | ||
| 431 | } | ||
| 376 | 432 | ||
| 377 | if(operation == SMIME_VERIFY) { | 433 | if(operation == SMIME_VERIFY) { |
| 378 | if(!(store = setup_verify(CAfile, CApath))) goto end; | 434 | if(!(store = setup_verify(CAfile, CApath))) goto end; |
| @@ -386,10 +442,28 @@ int MAIN(int argc, char **argv) | |||
| 386 | p7 = PKCS7_sign(signer, key, other, in, flags); | 442 | p7 = PKCS7_sign(signer, key, other, in, flags); |
| 387 | BIO_reset(in); | 443 | BIO_reset(in); |
| 388 | } else { | 444 | } else { |
| 389 | if(!(p7 = SMIME_read_PKCS7(in, &indata))) { | 445 | if(informat == FORMAT_SMIME) |
| 446 | p7 = SMIME_read_PKCS7(in, &indata); | ||
| 447 | else if(informat == FORMAT_PEM) | ||
| 448 | p7 = PEM_read_bio_PKCS7(in, NULL, NULL, NULL); | ||
| 449 | else if(informat == FORMAT_ASN1) | ||
| 450 | p7 = d2i_PKCS7_bio(in, NULL); | ||
| 451 | else { | ||
| 452 | BIO_printf(bio_err, "Bad input format for PKCS#7 file\n"); | ||
| 453 | goto end; | ||
| 454 | } | ||
| 455 | |||
| 456 | if(!p7) { | ||
| 390 | BIO_printf(bio_err, "Error reading S/MIME message\n"); | 457 | BIO_printf(bio_err, "Error reading S/MIME message\n"); |
| 391 | goto end; | 458 | goto end; |
| 392 | } | 459 | } |
| 460 | if(contfile) { | ||
| 461 | BIO_free(indata); | ||
| 462 | if(!(indata = BIO_new_file(contfile, "rb"))) { | ||
| 463 | BIO_printf(bio_err, "Can't read content file %s\n", contfile); | ||
| 464 | goto end; | ||
| 465 | } | ||
| 466 | } | ||
| 393 | } | 467 | } |
| 394 | 468 | ||
| 395 | if(!p7) { | 469 | if(!p7) { |
| @@ -425,7 +499,16 @@ int MAIN(int argc, char **argv) | |||
| 425 | if(to) BIO_printf(out, "To: %s\n", to); | 499 | if(to) BIO_printf(out, "To: %s\n", to); |
| 426 | if(from) BIO_printf(out, "From: %s\n", from); | 500 | if(from) BIO_printf(out, "From: %s\n", from); |
| 427 | if(subject) BIO_printf(out, "Subject: %s\n", subject); | 501 | if(subject) BIO_printf(out, "Subject: %s\n", subject); |
| 428 | SMIME_write_PKCS7(out, p7, in, flags); | 502 | if(outformat == FORMAT_SMIME) |
| 503 | SMIME_write_PKCS7(out, p7, in, flags); | ||
| 504 | else if(outformat == FORMAT_PEM) | ||
| 505 | PEM_write_bio_PKCS7(out,p7); | ||
| 506 | else if(outformat == FORMAT_ASN1) | ||
| 507 | i2d_PKCS7_bio(out,p7); | ||
| 508 | else { | ||
| 509 | BIO_printf(bio_err, "Bad output format for PKCS#7 file\n"); | ||
| 510 | goto end; | ||
| 511 | } | ||
| 429 | } | 512 | } |
| 430 | ret = 0; | 513 | ret = 0; |
| 431 | end: | 514 | end: |
| @@ -442,54 +525,11 @@ end: | |||
| 442 | PKCS7_free(p7); | 525 | PKCS7_free(p7); |
| 443 | BIO_free(in); | 526 | BIO_free(in); |
| 444 | BIO_free(indata); | 527 | BIO_free(indata); |
| 445 | BIO_free(out); | 528 | BIO_free_all(out); |
| 446 | if(passin) Free(passin); | 529 | if(passin) OPENSSL_free(passin); |
| 447 | return (ret); | 530 | return (ret); |
| 448 | } | 531 | } |
| 449 | 532 | ||
| 450 | static X509 *load_cert(char *file) | ||
| 451 | { | ||
| 452 | BIO *in; | ||
| 453 | X509 *cert; | ||
| 454 | if(!(in = BIO_new_file(file, "r"))) return NULL; | ||
| 455 | cert = PEM_read_bio_X509(in, NULL, NULL,NULL); | ||
| 456 | BIO_free(in); | ||
| 457 | return cert; | ||
| 458 | } | ||
| 459 | |||
| 460 | static EVP_PKEY *load_key(char *file, char *pass) | ||
| 461 | { | ||
| 462 | BIO *in; | ||
| 463 | EVP_PKEY *key; | ||
| 464 | if(!(in = BIO_new_file(file, "r"))) return NULL; | ||
| 465 | key = PEM_read_bio_PrivateKey(in, NULL,NULL,pass); | ||
| 466 | BIO_free(in); | ||
| 467 | return key; | ||
| 468 | } | ||
| 469 | |||
| 470 | static STACK_OF(X509) *load_certs(char *file) | ||
| 471 | { | ||
| 472 | BIO *in; | ||
| 473 | int i; | ||
| 474 | STACK_OF(X509) *othercerts; | ||
| 475 | STACK_OF(X509_INFO) *allcerts; | ||
| 476 | X509_INFO *xi; | ||
| 477 | if(!(in = BIO_new_file(file, "r"))) return NULL; | ||
| 478 | othercerts = sk_X509_new(NULL); | ||
| 479 | if(!othercerts) return NULL; | ||
| 480 | allcerts = PEM_X509_INFO_read_bio(in, NULL, NULL, NULL); | ||
| 481 | for(i = 0; i < sk_X509_INFO_num(allcerts); i++) { | ||
| 482 | xi = sk_X509_INFO_value (allcerts, i); | ||
| 483 | if (xi->x509) { | ||
| 484 | sk_X509_push(othercerts, xi->x509); | ||
| 485 | xi->x509 = NULL; | ||
| 486 | } | ||
| 487 | } | ||
| 488 | sk_X509_INFO_pop_free(allcerts, X509_INFO_free); | ||
| 489 | BIO_free(in); | ||
| 490 | return othercerts; | ||
| 491 | } | ||
| 492 | |||
| 493 | static X509_STORE *setup_verify(char *CAfile, char *CApath) | 533 | static X509_STORE *setup_verify(char *CAfile, char *CApath) |
| 494 | { | 534 | { |
| 495 | X509_STORE *store; | 535 | X509_STORE *store; |
diff --git a/src/lib/libssl/src/apps/speed.c b/src/lib/libssl/src/apps/speed.c index f7a8e00a8b..ba41916371 100644 --- a/src/lib/libssl/src/apps/speed.c +++ b/src/lib/libssl/src/apps/speed.c | |||
| @@ -81,17 +81,27 @@ | |||
| 81 | #include <openssl/crypto.h> | 81 | #include <openssl/crypto.h> |
| 82 | #include <openssl/rand.h> | 82 | #include <openssl/rand.h> |
| 83 | #include <openssl/err.h> | 83 | #include <openssl/err.h> |
| 84 | #include <openssl/engine.h> | ||
| 84 | 85 | ||
| 85 | #if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) | 86 | #if defined(__FreeBSD__) |
| 86 | #define TIMES | 87 | # define USE_TOD |
| 88 | #elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) | ||
| 89 | # define TIMES | ||
| 90 | #endif | ||
| 91 | #if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) | ||
| 92 | # define TIMEB | ||
| 87 | #endif | 93 | #endif |
| 88 | 94 | ||
| 89 | #ifndef _IRIX | 95 | #ifndef _IRIX |
| 90 | #include <time.h> | 96 | # include <time.h> |
| 91 | #endif | 97 | #endif |
| 92 | #ifdef TIMES | 98 | #ifdef TIMES |
| 93 | #include <sys/types.h> | 99 | # include <sys/types.h> |
| 94 | #include <sys/times.h> | 100 | # include <sys/times.h> |
| 101 | #endif | ||
| 102 | #ifdef USE_TOD | ||
| 103 | # include <sys/time.h> | ||
| 104 | # include <sys/resource.h> | ||
| 95 | #endif | 105 | #endif |
| 96 | 106 | ||
| 97 | /* Depending on the VMS version, the tms structure is perhaps defined. | 107 | /* Depending on the VMS version, the tms structure is perhaps defined. |
| @@ -102,10 +112,14 @@ | |||
| 102 | #undef TIMES | 112 | #undef TIMES |
| 103 | #endif | 113 | #endif |
| 104 | 114 | ||
| 105 | #ifndef TIMES | 115 | #ifdef TIMEB |
| 106 | #include <sys/timeb.h> | 116 | #include <sys/timeb.h> |
| 107 | #endif | 117 | #endif |
| 108 | 118 | ||
| 119 | #if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) | ||
| 120 | #error "It seems neither struct tms nor struct timeb is supported in this platform!" | ||
| 121 | #endif | ||
| 122 | |||
| 109 | #if defined(sun) || defined(__ultrix) | 123 | #if defined(sun) || defined(__ultrix) |
| 110 | #define _POSIX_SOURCE | 124 | #define _POSIX_SOURCE |
| 111 | #include <limits.h> | 125 | #include <limits.h> |
| @@ -121,6 +135,9 @@ | |||
| 121 | #ifndef NO_MDC2 | 135 | #ifndef NO_MDC2 |
| 122 | #include <openssl/mdc2.h> | 136 | #include <openssl/mdc2.h> |
| 123 | #endif | 137 | #endif |
| 138 | #ifndef NO_MD4 | ||
| 139 | #include <openssl/md4.h> | ||
| 140 | #endif | ||
| 124 | #ifndef NO_MD5 | 141 | #ifndef NO_MD5 |
| 125 | #include <openssl/md5.h> | 142 | #include <openssl/md5.h> |
| 126 | #endif | 143 | #endif |
| @@ -178,7 +195,7 @@ | |||
| 178 | #define BUFSIZE ((long)1024*8+1) | 195 | #define BUFSIZE ((long)1024*8+1) |
| 179 | int run=0; | 196 | int run=0; |
| 180 | 197 | ||
| 181 | static double Time_F(int s); | 198 | static double Time_F(int s, int usertime); |
| 182 | static void print_message(char *s,long num,int length); | 199 | static void print_message(char *s,long num,int length); |
| 183 | static void pkey_print_message(char *str,char *str2,long num,int bits,int sec); | 200 | static void pkey_print_message(char *str,char *str2,long num,int bits,int sec); |
| 184 | #ifdef SIGALRM | 201 | #ifdef SIGALRM |
| @@ -202,39 +219,91 @@ static SIGRETTYPE sig_done(int sig) | |||
| 202 | #define START 0 | 219 | #define START 0 |
| 203 | #define STOP 1 | 220 | #define STOP 1 |
| 204 | 221 | ||
| 205 | static double Time_F(int s) | 222 | static double Time_F(int s, int usertime) |
| 206 | { | 223 | { |
| 207 | double ret; | 224 | double ret; |
| 208 | #ifdef TIMES | ||
| 209 | static struct tms tstart,tend; | ||
| 210 | 225 | ||
| 211 | if (s == START) | 226 | #ifdef USE_TOD |
| 212 | { | 227 | if(usertime) |
| 213 | times(&tstart); | 228 | { |
| 214 | return(0); | 229 | static struct rusage tstart,tend; |
| 230 | |||
| 231 | if (s == START) | ||
| 232 | { | ||
| 233 | getrusage(RUSAGE_SELF,&tstart); | ||
| 234 | return(0); | ||
| 235 | } | ||
| 236 | else | ||
| 237 | { | ||
| 238 | long i; | ||
| 239 | |||
| 240 | getrusage(RUSAGE_SELF,&tend); | ||
| 241 | i=(long)tend.ru_utime.tv_usec-(long)tstart.ru_utime.tv_usec; | ||
| 242 | ret=((double)(tend.ru_utime.tv_sec-tstart.ru_utime.tv_sec)) | ||
| 243 | +((double)i)/1000000.0; | ||
| 244 | return((ret < 0.001)?0.001:ret); | ||
| 245 | } | ||
| 215 | } | 246 | } |
| 216 | else | 247 | else |
| 217 | { | 248 | { |
| 218 | times(&tend); | 249 | static struct timeval tstart,tend; |
| 219 | ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ; | 250 | long i; |
| 220 | return((ret < 1e-3)?1e-3:ret); | ||
| 221 | } | ||
| 222 | #else /* !times() */ | ||
| 223 | static struct timeb tstart,tend; | ||
| 224 | long i; | ||
| 225 | 251 | ||
| 226 | if (s == START) | 252 | if (s == START) |
| 253 | { | ||
| 254 | gettimeofday(&tstart,NULL); | ||
| 255 | return(0); | ||
| 256 | } | ||
| 257 | else | ||
| 258 | { | ||
| 259 | gettimeofday(&tend,NULL); | ||
| 260 | i=(long)tend.tv_usec-(long)tstart.tv_usec; | ||
| 261 | ret=((double)(tend.tv_sec-tstart.tv_sec))+((double)i)/1000000.0; | ||
| 262 | return((ret < 0.001)?0.001:ret); | ||
| 263 | } | ||
| 264 | } | ||
| 265 | #else /* ndef USE_TOD */ | ||
| 266 | |||
| 267 | # ifdef TIMES | ||
| 268 | if (usertime) | ||
| 227 | { | 269 | { |
| 228 | ftime(&tstart); | 270 | static struct tms tstart,tend; |
| 229 | return(0); | 271 | |
| 272 | if (s == START) | ||
| 273 | { | ||
| 274 | times(&tstart); | ||
| 275 | return(0); | ||
| 276 | } | ||
| 277 | else | ||
| 278 | { | ||
| 279 | times(&tend); | ||
| 280 | ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ; | ||
| 281 | return((ret < 1e-3)?1e-3:ret); | ||
| 282 | } | ||
| 230 | } | 283 | } |
| 284 | # endif /* times() */ | ||
| 285 | # if defined(TIMES) && defined(TIMEB) | ||
| 231 | else | 286 | else |
| 287 | # endif | ||
| 288 | # ifdef TIMEB | ||
| 232 | { | 289 | { |
| 233 | ftime(&tend); | 290 | static struct timeb tstart,tend; |
| 234 | i=(long)tend.millitm-(long)tstart.millitm; | 291 | long i; |
| 235 | ret=((double)(tend.time-tstart.time))+((double)i)/1000.0; | 292 | |
| 236 | return((ret < 0.001)?0.001:ret); | 293 | if (s == START) |
| 294 | { | ||
| 295 | ftime(&tstart); | ||
| 296 | return(0); | ||
| 297 | } | ||
| 298 | else | ||
| 299 | { | ||
| 300 | ftime(&tend); | ||
| 301 | i=(long)tend.millitm-(long)tstart.millitm; | ||
| 302 | ret=((double)(tend.time-tstart.time))+((double)i)/1000.0; | ||
| 303 | return((ret < 0.001)?0.001:ret); | ||
| 304 | } | ||
| 237 | } | 305 | } |
| 306 | # endif | ||
| 238 | #endif | 307 | #endif |
| 239 | } | 308 | } |
| 240 | 309 | ||
| @@ -242,21 +311,25 @@ int MAIN(int, char **); | |||
| 242 | 311 | ||
| 243 | int MAIN(int argc, char **argv) | 312 | int MAIN(int argc, char **argv) |
| 244 | { | 313 | { |
| 314 | ENGINE *e; | ||
| 245 | unsigned char *buf=NULL,*buf2=NULL; | 315 | unsigned char *buf=NULL,*buf2=NULL; |
| 246 | int mret=1; | 316 | int mret=1; |
| 247 | #define ALGOR_NUM 14 | 317 | #define ALGOR_NUM 15 |
| 248 | #define SIZE_NUM 5 | 318 | #define SIZE_NUM 5 |
| 249 | #define RSA_NUM 4 | 319 | #define RSA_NUM 4 |
| 250 | #define DSA_NUM 3 | 320 | #define DSA_NUM 3 |
| 251 | long count,rsa_count; | 321 | long count,rsa_count; |
| 252 | int i,j,k; | 322 | int i,j,k; |
| 253 | unsigned rsa_num,rsa_num2; | 323 | unsigned rsa_num; |
| 254 | #ifndef NO_MD2 | 324 | #ifndef NO_MD2 |
| 255 | unsigned char md2[MD2_DIGEST_LENGTH]; | 325 | unsigned char md2[MD2_DIGEST_LENGTH]; |
| 256 | #endif | 326 | #endif |
| 257 | #ifndef NO_MDC2 | 327 | #ifndef NO_MDC2 |
| 258 | unsigned char mdc2[MDC2_DIGEST_LENGTH]; | 328 | unsigned char mdc2[MDC2_DIGEST_LENGTH]; |
| 259 | #endif | 329 | #endif |
| 330 | #ifndef NO_MD4 | ||
| 331 | unsigned char md4[MD4_DIGEST_LENGTH]; | ||
| 332 | #endif | ||
| 260 | #ifndef NO_MD5 | 333 | #ifndef NO_MD5 |
| 261 | unsigned char md5[MD5_DIGEST_LENGTH]; | 334 | unsigned char md5[MD5_DIGEST_LENGTH]; |
| 262 | unsigned char hmac[MD5_DIGEST_LENGTH]; | 335 | unsigned char hmac[MD5_DIGEST_LENGTH]; |
| @@ -298,23 +371,24 @@ int MAIN(int argc, char **argv) | |||
| 298 | #endif | 371 | #endif |
| 299 | #define D_MD2 0 | 372 | #define D_MD2 0 |
| 300 | #define D_MDC2 1 | 373 | #define D_MDC2 1 |
| 301 | #define D_MD5 2 | 374 | #define D_MD4 2 |
| 302 | #define D_HMAC 3 | 375 | #define D_MD5 3 |
| 303 | #define D_SHA1 4 | 376 | #define D_HMAC 4 |
| 304 | #define D_RMD160 5 | 377 | #define D_SHA1 5 |
| 305 | #define D_RC4 6 | 378 | #define D_RMD160 6 |
| 306 | #define D_CBC_DES 7 | 379 | #define D_RC4 7 |
| 307 | #define D_EDE3_DES 8 | 380 | #define D_CBC_DES 8 |
| 308 | #define D_CBC_IDEA 9 | 381 | #define D_EDE3_DES 9 |
| 309 | #define D_CBC_RC2 10 | 382 | #define D_CBC_IDEA 10 |
| 310 | #define D_CBC_RC5 11 | 383 | #define D_CBC_RC2 11 |
| 311 | #define D_CBC_BF 12 | 384 | #define D_CBC_RC5 12 |
| 312 | #define D_CBC_CAST 13 | 385 | #define D_CBC_BF 13 |
| 386 | #define D_CBC_CAST 14 | ||
| 313 | double d,results[ALGOR_NUM][SIZE_NUM]; | 387 | double d,results[ALGOR_NUM][SIZE_NUM]; |
| 314 | static int lengths[SIZE_NUM]={8,64,256,1024,8*1024}; | 388 | static int lengths[SIZE_NUM]={8,64,256,1024,8*1024}; |
| 315 | long c[ALGOR_NUM][SIZE_NUM]; | 389 | long c[ALGOR_NUM][SIZE_NUM]; |
| 316 | static char *names[ALGOR_NUM]={ | 390 | static char *names[ALGOR_NUM]={ |
| 317 | "md2","mdc2","md5","hmac(md5)","sha1","rmd160","rc4", | 391 | "md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4", |
| 318 | "des cbc","des ede3","idea cbc", | 392 | "des cbc","des ede3","idea cbc", |
| 319 | "rc2 cbc","rc5-32/12 cbc","blowfish cbc","cast cbc"}; | 393 | "rc2 cbc","rc5-32/12 cbc","blowfish cbc","cast cbc"}; |
| 320 | #define R_DSA_512 0 | 394 | #define R_DSA_512 0 |
| @@ -345,6 +419,11 @@ int MAIN(int argc, char **argv) | |||
| 345 | int dsa_doit[DSA_NUM]; | 419 | int dsa_doit[DSA_NUM]; |
| 346 | int doit[ALGOR_NUM]; | 420 | int doit[ALGOR_NUM]; |
| 347 | int pr_header=0; | 421 | int pr_header=0; |
| 422 | int usertime=1; | ||
| 423 | |||
| 424 | #ifndef TIMES | ||
| 425 | usertime=-1; | ||
| 426 | #endif | ||
| 348 | 427 | ||
| 349 | apps_startup(); | 428 | apps_startup(); |
| 350 | memset(results, 0, sizeof(results)); | 429 | memset(results, 0, sizeof(results)); |
| @@ -362,7 +441,7 @@ int MAIN(int argc, char **argv) | |||
| 362 | rsa_key[i]=NULL; | 441 | rsa_key[i]=NULL; |
| 363 | #endif | 442 | #endif |
| 364 | 443 | ||
| 365 | if ((buf=(unsigned char *)Malloc((int)BUFSIZE)) == NULL) | 444 | if ((buf=(unsigned char *)OPENSSL_malloc((int)BUFSIZE)) == NULL) |
| 366 | { | 445 | { |
| 367 | BIO_printf(bio_err,"out of memory\n"); | 446 | BIO_printf(bio_err,"out of memory\n"); |
| 368 | goto end; | 447 | goto end; |
| @@ -370,7 +449,7 @@ int MAIN(int argc, char **argv) | |||
| 370 | #ifndef NO_DES | 449 | #ifndef NO_DES |
| 371 | buf_as_des_cblock = (des_cblock *)buf; | 450 | buf_as_des_cblock = (des_cblock *)buf; |
| 372 | #endif | 451 | #endif |
| 373 | if ((buf2=(unsigned char *)Malloc((int)BUFSIZE)) == NULL) | 452 | if ((buf2=(unsigned char *)OPENSSL_malloc((int)BUFSIZE)) == NULL) |
| 374 | { | 453 | { |
| 375 | BIO_printf(bio_err,"out of memory\n"); | 454 | BIO_printf(bio_err,"out of memory\n"); |
| 376 | goto end; | 455 | goto end; |
| @@ -391,6 +470,39 @@ int MAIN(int argc, char **argv) | |||
| 391 | argv++; | 470 | argv++; |
| 392 | while (argc) | 471 | while (argc) |
| 393 | { | 472 | { |
| 473 | if ((argc > 0) && (strcmp(*argv,"-elapsed") == 0)) | ||
| 474 | usertime = 0; | ||
| 475 | else | ||
| 476 | if ((argc > 0) && (strcmp(*argv,"-engine") == 0)) | ||
| 477 | { | ||
| 478 | argc--; | ||
| 479 | argv++; | ||
| 480 | if(argc == 0) | ||
| 481 | { | ||
| 482 | BIO_printf(bio_err,"no engine given\n"); | ||
| 483 | goto end; | ||
| 484 | } | ||
| 485 | if((e = ENGINE_by_id(*argv)) == NULL) | ||
| 486 | { | ||
| 487 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 488 | *argv); | ||
| 489 | goto end; | ||
| 490 | } | ||
| 491 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 492 | { | ||
| 493 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 494 | goto end; | ||
| 495 | } | ||
| 496 | BIO_printf(bio_err,"engine \"%s\" set.\n", *argv); | ||
| 497 | /* Free our "structural" reference. */ | ||
| 498 | ENGINE_free(e); | ||
| 499 | /* It will be increased again further down. We just | ||
| 500 | don't want speed to confuse an engine with an | ||
| 501 | algorithm, especially when none is given (which | ||
| 502 | means all of them should be run) */ | ||
| 503 | j--; | ||
| 504 | } | ||
| 505 | else | ||
| 394 | #ifndef NO_MD2 | 506 | #ifndef NO_MD2 |
| 395 | if (strcmp(*argv,"md2") == 0) doit[D_MD2]=1; | 507 | if (strcmp(*argv,"md2") == 0) doit[D_MD2]=1; |
| 396 | else | 508 | else |
| @@ -399,6 +511,10 @@ int MAIN(int argc, char **argv) | |||
| 399 | if (strcmp(*argv,"mdc2") == 0) doit[D_MDC2]=1; | 511 | if (strcmp(*argv,"mdc2") == 0) doit[D_MDC2]=1; |
| 400 | else | 512 | else |
| 401 | #endif | 513 | #endif |
| 514 | #ifndef NO_MD4 | ||
| 515 | if (strcmp(*argv,"md4") == 0) doit[D_MD4]=1; | ||
| 516 | else | ||
| 517 | #endif | ||
| 402 | #ifndef NO_MD5 | 518 | #ifndef NO_MD5 |
| 403 | if (strcmp(*argv,"md5") == 0) doit[D_MD5]=1; | 519 | if (strcmp(*argv,"md5") == 0) doit[D_MD5]=1; |
| 404 | else | 520 | else |
| @@ -434,7 +550,7 @@ int MAIN(int argc, char **argv) | |||
| 434 | #ifdef RSAref | 550 | #ifdef RSAref |
| 435 | if (strcmp(*argv,"rsaref") == 0) | 551 | if (strcmp(*argv,"rsaref") == 0) |
| 436 | { | 552 | { |
| 437 | RSA_set_default_method(RSA_PKCS1_RSAref()); | 553 | RSA_set_default_openssl_method(RSA_PKCS1_RSAref()); |
| 438 | j--; | 554 | j--; |
| 439 | } | 555 | } |
| 440 | else | 556 | else |
| @@ -442,7 +558,7 @@ int MAIN(int argc, char **argv) | |||
| 442 | #ifndef RSA_NULL | 558 | #ifndef RSA_NULL |
| 443 | if (strcmp(*argv,"openssl") == 0) | 559 | if (strcmp(*argv,"openssl") == 0) |
| 444 | { | 560 | { |
| 445 | RSA_set_default_method(RSA_PKCS1_SSLeay()); | 561 | RSA_set_default_openssl_method(RSA_PKCS1_SSLeay()); |
| 446 | j--; | 562 | j--; |
| 447 | } | 563 | } |
| 448 | else | 564 | else |
| @@ -510,8 +626,34 @@ int MAIN(int argc, char **argv) | |||
| 510 | else | 626 | else |
| 511 | #endif | 627 | #endif |
| 512 | { | 628 | { |
| 513 | BIO_printf(bio_err,"bad value, pick one of\n"); | 629 | BIO_printf(bio_err,"Error: bad option or value\n"); |
| 514 | BIO_printf(bio_err,"md2 mdc2 md5 hmac sha1 rmd160\n"); | 630 | BIO_printf(bio_err,"\n"); |
| 631 | BIO_printf(bio_err,"Available values:\n"); | ||
| 632 | #ifndef NO_MD2 | ||
| 633 | BIO_printf(bio_err,"md2 "); | ||
| 634 | #endif | ||
| 635 | #ifndef NO_MDC2 | ||
| 636 | BIO_printf(bio_err,"mdc2 "); | ||
| 637 | #endif | ||
| 638 | #ifndef NO_MD4 | ||
| 639 | BIO_printf(bio_err,"md4 "); | ||
| 640 | #endif | ||
| 641 | #ifndef NO_MD5 | ||
| 642 | BIO_printf(bio_err,"md5 "); | ||
| 643 | #ifndef NO_HMAC | ||
| 644 | BIO_printf(bio_err,"hmac "); | ||
| 645 | #endif | ||
| 646 | #endif | ||
| 647 | #ifndef NO_SHA1 | ||
| 648 | BIO_printf(bio_err,"sha1 "); | ||
| 649 | #endif | ||
| 650 | #ifndef NO_RIPEMD160 | ||
| 651 | BIO_printf(bio_err,"rmd160"); | ||
| 652 | #endif | ||
| 653 | #if !defined(NO_MD2) || !defined(NO_MDC2) || !defined(NO_MD4) || !defined(NO_MD5) || !defined(NO_SHA1) || !defined(NO_RIPEMD160) | ||
| 654 | BIO_printf(bio_err,"\n"); | ||
| 655 | #endif | ||
| 656 | |||
| 515 | #ifndef NO_IDEA | 657 | #ifndef NO_IDEA |
| 516 | BIO_printf(bio_err,"idea-cbc "); | 658 | BIO_printf(bio_err,"idea-cbc "); |
| 517 | #endif | 659 | #endif |
| @@ -524,20 +666,49 @@ int MAIN(int argc, char **argv) | |||
| 524 | #ifndef NO_BF | 666 | #ifndef NO_BF |
| 525 | BIO_printf(bio_err,"bf-cbc"); | 667 | BIO_printf(bio_err,"bf-cbc"); |
| 526 | #endif | 668 | #endif |
| 527 | #if !defined(NO_IDEA) && !defined(NO_RC2) && !defined(NO_BF) && !defined(NO_RC5) | 669 | #if !defined(NO_IDEA) || !defined(NO_RC2) || !defined(NO_BF) || !defined(NO_RC5) |
| 528 | BIO_printf(bio_err,"\n"); | 670 | BIO_printf(bio_err,"\n"); |
| 529 | #endif | 671 | #endif |
| 672 | |||
| 530 | BIO_printf(bio_err,"des-cbc des-ede3 "); | 673 | BIO_printf(bio_err,"des-cbc des-ede3 "); |
| 531 | #ifndef NO_RC4 | 674 | #ifndef NO_RC4 |
| 532 | BIO_printf(bio_err,"rc4"); | 675 | BIO_printf(bio_err,"rc4"); |
| 533 | #endif | 676 | #endif |
| 677 | BIO_printf(bio_err,"\n"); | ||
| 678 | |||
| 534 | #ifndef NO_RSA | 679 | #ifndef NO_RSA |
| 535 | BIO_printf(bio_err,"\nrsa512 rsa1024 rsa2048 rsa4096\n"); | 680 | BIO_printf(bio_err,"rsa512 rsa1024 rsa2048 rsa4096\n"); |
| 536 | #endif | 681 | #endif |
| 682 | |||
| 537 | #ifndef NO_DSA | 683 | #ifndef NO_DSA |
| 538 | BIO_printf(bio_err,"\ndsa512 dsa1024 dsa2048\n"); | 684 | BIO_printf(bio_err,"dsa512 dsa1024 dsa2048\n"); |
| 685 | #endif | ||
| 686 | |||
| 687 | #ifndef NO_IDEA | ||
| 688 | BIO_printf(bio_err,"idea "); | ||
| 689 | #endif | ||
| 690 | #ifndef NO_RC2 | ||
| 691 | BIO_printf(bio_err,"rc2 "); | ||
| 692 | #endif | ||
| 693 | #ifndef NO_DES | ||
| 694 | BIO_printf(bio_err,"des "); | ||
| 695 | #endif | ||
| 696 | #ifndef NO_RSA | ||
| 697 | BIO_printf(bio_err,"rsa "); | ||
| 698 | #endif | ||
| 699 | #ifndef NO_BF | ||
| 700 | BIO_printf(bio_err,"blowfish"); | ||
| 701 | #endif | ||
| 702 | #if !defined(NO_IDEA) || !defined(NO_RC2) || !defined(NO_DES) || !defined(NO_RSA) || !defined(NO_BF) | ||
| 703 | BIO_printf(bio_err,"\n"); | ||
| 539 | #endif | 704 | #endif |
| 540 | BIO_printf(bio_err,"idea rc2 des rsa blowfish\n"); | 705 | |
| 706 | BIO_printf(bio_err,"\n"); | ||
| 707 | BIO_printf(bio_err,"Available options:\n"); | ||
| 708 | #ifdef TIMES | ||
| 709 | BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n"); | ||
| 710 | #endif | ||
| 711 | BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n"); | ||
| 541 | goto end; | 712 | goto end; |
| 542 | } | 713 | } |
| 543 | argc--; | 714 | argc--; |
| @@ -557,10 +728,13 @@ int MAIN(int argc, char **argv) | |||
| 557 | for (i=0; i<ALGOR_NUM; i++) | 728 | for (i=0; i<ALGOR_NUM; i++) |
| 558 | if (doit[i]) pr_header++; | 729 | if (doit[i]) pr_header++; |
| 559 | 730 | ||
| 560 | #ifndef TIMES | 731 | if (usertime == 0) |
| 561 | BIO_printf(bio_err,"To get the most accurate results, try to run this\n"); | 732 | BIO_printf(bio_err,"You have chosen to measure elapsed time instead of user CPU time.\n"); |
| 562 | BIO_printf(bio_err,"program when this computer is idle.\n"); | 733 | if (usertime <= 0) |
| 563 | #endif | 734 | { |
| 735 | BIO_printf(bio_err,"To get the most accurate results, try to run this\n"); | ||
| 736 | BIO_printf(bio_err,"program when this computer is idle.\n"); | ||
| 737 | } | ||
| 564 | 738 | ||
| 565 | #ifndef NO_RSA | 739 | #ifndef NO_RSA |
| 566 | for (i=0; i<RSA_NUM; i++) | 740 | for (i=0; i<RSA_NUM; i++) |
| @@ -624,14 +798,15 @@ int MAIN(int argc, char **argv) | |||
| 624 | do { | 798 | do { |
| 625 | long i; | 799 | long i; |
| 626 | count*=2; | 800 | count*=2; |
| 627 | Time_F(START); | 801 | Time_F(START,usertime); |
| 628 | for (i=count; i; i--) | 802 | for (i=count; i; i--) |
| 629 | des_ecb_encrypt(buf_as_des_cblock,buf_as_des_cblock, | 803 | des_ecb_encrypt(buf_as_des_cblock,buf_as_des_cblock, |
| 630 | &(sch[0]),DES_ENCRYPT); | 804 | &(sch[0]),DES_ENCRYPT); |
| 631 | d=Time_F(STOP); | 805 | d=Time_F(STOP,usertime); |
| 632 | } while (d <3); | 806 | } while (d <3); |
| 633 | c[D_MD2][0]=count/10; | 807 | c[D_MD2][0]=count/10; |
| 634 | c[D_MDC2][0]=count/10; | 808 | c[D_MDC2][0]=count/10; |
| 809 | c[D_MD4][0]=count; | ||
| 635 | c[D_MD5][0]=count; | 810 | c[D_MD5][0]=count; |
| 636 | c[D_HMAC][0]=count; | 811 | c[D_HMAC][0]=count; |
| 637 | c[D_SHA1][0]=count; | 812 | c[D_SHA1][0]=count; |
| @@ -649,6 +824,7 @@ int MAIN(int argc, char **argv) | |||
| 649 | { | 824 | { |
| 650 | c[D_MD2][i]=c[D_MD2][0]*4*lengths[0]/lengths[i]; | 825 | c[D_MD2][i]=c[D_MD2][0]*4*lengths[0]/lengths[i]; |
| 651 | c[D_MDC2][i]=c[D_MDC2][0]*4*lengths[0]/lengths[i]; | 826 | c[D_MDC2][i]=c[D_MDC2][0]*4*lengths[0]/lengths[i]; |
| 827 | c[D_MD4][i]=c[D_MD4][0]*4*lengths[0]/lengths[i]; | ||
| 652 | c[D_MD5][i]=c[D_MD5][0]*4*lengths[0]/lengths[i]; | 828 | c[D_MD5][i]=c[D_MD5][0]*4*lengths[0]/lengths[i]; |
| 653 | c[D_HMAC][i]=c[D_HMAC][0]*4*lengths[0]/lengths[i]; | 829 | c[D_HMAC][i]=c[D_HMAC][0]*4*lengths[0]/lengths[i]; |
| 654 | c[D_SHA1][i]=c[D_SHA1][0]*4*lengths[0]/lengths[i]; | 830 | c[D_SHA1][i]=c[D_SHA1][0]*4*lengths[0]/lengths[i]; |
| @@ -725,10 +901,10 @@ int MAIN(int argc, char **argv) | |||
| 725 | for (j=0; j<SIZE_NUM; j++) | 901 | for (j=0; j<SIZE_NUM; j++) |
| 726 | { | 902 | { |
| 727 | print_message(names[D_MD2],c[D_MD2][j],lengths[j]); | 903 | print_message(names[D_MD2],c[D_MD2][j],lengths[j]); |
| 728 | Time_F(START); | 904 | Time_F(START,usertime); |
| 729 | for (count=0,run=1; COND(c[D_MD2][j]); count++) | 905 | for (count=0,run=1; COND(c[D_MD2][j]); count++) |
| 730 | MD2(buf,(unsigned long)lengths[j],&(md2[0])); | 906 | MD2(buf,(unsigned long)lengths[j],&(md2[0])); |
| 731 | d=Time_F(STOP); | 907 | d=Time_F(STOP,usertime); |
| 732 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 908 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 733 | count,names[D_MD2],d); | 909 | count,names[D_MD2],d); |
| 734 | results[D_MD2][j]=((double)count)/d*lengths[j]; | 910 | results[D_MD2][j]=((double)count)/d*lengths[j]; |
| @@ -741,10 +917,10 @@ int MAIN(int argc, char **argv) | |||
| 741 | for (j=0; j<SIZE_NUM; j++) | 917 | for (j=0; j<SIZE_NUM; j++) |
| 742 | { | 918 | { |
| 743 | print_message(names[D_MDC2],c[D_MDC2][j],lengths[j]); | 919 | print_message(names[D_MDC2],c[D_MDC2][j],lengths[j]); |
| 744 | Time_F(START); | 920 | Time_F(START,usertime); |
| 745 | for (count=0,run=1; COND(c[D_MDC2][j]); count++) | 921 | for (count=0,run=1; COND(c[D_MDC2][j]); count++) |
| 746 | MDC2(buf,(unsigned long)lengths[j],&(mdc2[0])); | 922 | MDC2(buf,(unsigned long)lengths[j],&(mdc2[0])); |
| 747 | d=Time_F(STOP); | 923 | d=Time_F(STOP,usertime); |
| 748 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 924 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 749 | count,names[D_MDC2],d); | 925 | count,names[D_MDC2],d); |
| 750 | results[D_MDC2][j]=((double)count)/d*lengths[j]; | 926 | results[D_MDC2][j]=((double)count)/d*lengths[j]; |
| @@ -752,16 +928,33 @@ int MAIN(int argc, char **argv) | |||
| 752 | } | 928 | } |
| 753 | #endif | 929 | #endif |
| 754 | 930 | ||
| 931 | #ifndef NO_MD4 | ||
| 932 | if (doit[D_MD4]) | ||
| 933 | { | ||
| 934 | for (j=0; j<SIZE_NUM; j++) | ||
| 935 | { | ||
| 936 | print_message(names[D_MD4],c[D_MD4][j],lengths[j]); | ||
| 937 | Time_F(START,usertime); | ||
| 938 | for (count=0,run=1; COND(c[D_MD4][j]); count++) | ||
| 939 | MD4(&(buf[0]),(unsigned long)lengths[j],&(md4[0])); | ||
| 940 | d=Time_F(STOP,usertime); | ||
| 941 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | ||
| 942 | count,names[D_MD4],d); | ||
| 943 | results[D_MD4][j]=((double)count)/d*lengths[j]; | ||
| 944 | } | ||
| 945 | } | ||
| 946 | #endif | ||
| 947 | |||
| 755 | #ifndef NO_MD5 | 948 | #ifndef NO_MD5 |
| 756 | if (doit[D_MD5]) | 949 | if (doit[D_MD5]) |
| 757 | { | 950 | { |
| 758 | for (j=0; j<SIZE_NUM; j++) | 951 | for (j=0; j<SIZE_NUM; j++) |
| 759 | { | 952 | { |
| 760 | print_message(names[D_MD5],c[D_MD5][j],lengths[j]); | 953 | print_message(names[D_MD5],c[D_MD5][j],lengths[j]); |
| 761 | Time_F(START); | 954 | Time_F(START,usertime); |
| 762 | for (count=0,run=1; COND(c[D_MD5][j]); count++) | 955 | for (count=0,run=1; COND(c[D_MD5][j]); count++) |
| 763 | MD5(&(buf[0]),(unsigned long)lengths[j],&(md5[0])); | 956 | MD5(&(buf[0]),(unsigned long)lengths[j],&(md5[0])); |
| 764 | d=Time_F(STOP); | 957 | d=Time_F(STOP,usertime); |
| 765 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 958 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 766 | count,names[D_MD5],d); | 959 | count,names[D_MD5],d); |
| 767 | results[D_MD5][j]=((double)count)/d*lengths[j]; | 960 | results[D_MD5][j]=((double)count)/d*lengths[j]; |
| @@ -779,14 +972,14 @@ int MAIN(int argc, char **argv) | |||
| 779 | for (j=0; j<SIZE_NUM; j++) | 972 | for (j=0; j<SIZE_NUM; j++) |
| 780 | { | 973 | { |
| 781 | print_message(names[D_HMAC],c[D_HMAC][j],lengths[j]); | 974 | print_message(names[D_HMAC],c[D_HMAC][j],lengths[j]); |
| 782 | Time_F(START); | 975 | Time_F(START,usertime); |
| 783 | for (count=0,run=1; COND(c[D_HMAC][j]); count++) | 976 | for (count=0,run=1; COND(c[D_HMAC][j]); count++) |
| 784 | { | 977 | { |
| 785 | HMAC_Init(&hctx,NULL,0,NULL); | 978 | HMAC_Init(&hctx,NULL,0,NULL); |
| 786 | HMAC_Update(&hctx,buf,lengths[j]); | 979 | HMAC_Update(&hctx,buf,lengths[j]); |
| 787 | HMAC_Final(&hctx,&(hmac[0]),NULL); | 980 | HMAC_Final(&hctx,&(hmac[0]),NULL); |
| 788 | } | 981 | } |
| 789 | d=Time_F(STOP); | 982 | d=Time_F(STOP,usertime); |
| 790 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 983 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 791 | count,names[D_HMAC],d); | 984 | count,names[D_HMAC],d); |
| 792 | results[D_HMAC][j]=((double)count)/d*lengths[j]; | 985 | results[D_HMAC][j]=((double)count)/d*lengths[j]; |
| @@ -799,10 +992,10 @@ int MAIN(int argc, char **argv) | |||
| 799 | for (j=0; j<SIZE_NUM; j++) | 992 | for (j=0; j<SIZE_NUM; j++) |
| 800 | { | 993 | { |
| 801 | print_message(names[D_SHA1],c[D_SHA1][j],lengths[j]); | 994 | print_message(names[D_SHA1],c[D_SHA1][j],lengths[j]); |
| 802 | Time_F(START); | 995 | Time_F(START,usertime); |
| 803 | for (count=0,run=1; COND(c[D_SHA1][j]); count++) | 996 | for (count=0,run=1; COND(c[D_SHA1][j]); count++) |
| 804 | SHA1(buf,(unsigned long)lengths[j],&(sha[0])); | 997 | SHA1(buf,(unsigned long)lengths[j],&(sha[0])); |
| 805 | d=Time_F(STOP); | 998 | d=Time_F(STOP,usertime); |
| 806 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 999 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 807 | count,names[D_SHA1],d); | 1000 | count,names[D_SHA1],d); |
| 808 | results[D_SHA1][j]=((double)count)/d*lengths[j]; | 1001 | results[D_SHA1][j]=((double)count)/d*lengths[j]; |
| @@ -815,10 +1008,10 @@ int MAIN(int argc, char **argv) | |||
| 815 | for (j=0; j<SIZE_NUM; j++) | 1008 | for (j=0; j<SIZE_NUM; j++) |
| 816 | { | 1009 | { |
| 817 | print_message(names[D_RMD160],c[D_RMD160][j],lengths[j]); | 1010 | print_message(names[D_RMD160],c[D_RMD160][j],lengths[j]); |
| 818 | Time_F(START); | 1011 | Time_F(START,usertime); |
| 819 | for (count=0,run=1; COND(c[D_RMD160][j]); count++) | 1012 | for (count=0,run=1; COND(c[D_RMD160][j]); count++) |
| 820 | RIPEMD160(buf,(unsigned long)lengths[j],&(rmd160[0])); | 1013 | RIPEMD160(buf,(unsigned long)lengths[j],&(rmd160[0])); |
| 821 | d=Time_F(STOP); | 1014 | d=Time_F(STOP,usertime); |
| 822 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1015 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 823 | count,names[D_RMD160],d); | 1016 | count,names[D_RMD160],d); |
| 824 | results[D_RMD160][j]=((double)count)/d*lengths[j]; | 1017 | results[D_RMD160][j]=((double)count)/d*lengths[j]; |
| @@ -831,11 +1024,11 @@ int MAIN(int argc, char **argv) | |||
| 831 | for (j=0; j<SIZE_NUM; j++) | 1024 | for (j=0; j<SIZE_NUM; j++) |
| 832 | { | 1025 | { |
| 833 | print_message(names[D_RC4],c[D_RC4][j],lengths[j]); | 1026 | print_message(names[D_RC4],c[D_RC4][j],lengths[j]); |
| 834 | Time_F(START); | 1027 | Time_F(START,usertime); |
| 835 | for (count=0,run=1; COND(c[D_RC4][j]); count++) | 1028 | for (count=0,run=1; COND(c[D_RC4][j]); count++) |
| 836 | RC4(&rc4_ks,(unsigned int)lengths[j], | 1029 | RC4(&rc4_ks,(unsigned int)lengths[j], |
| 837 | buf,buf); | 1030 | buf,buf); |
| 838 | d=Time_F(STOP); | 1031 | d=Time_F(STOP,usertime); |
| 839 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1032 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 840 | count,names[D_RC4],d); | 1033 | count,names[D_RC4],d); |
| 841 | results[D_RC4][j]=((double)count)/d*lengths[j]; | 1034 | results[D_RC4][j]=((double)count)/d*lengths[j]; |
| @@ -848,11 +1041,11 @@ int MAIN(int argc, char **argv) | |||
| 848 | for (j=0; j<SIZE_NUM; j++) | 1041 | for (j=0; j<SIZE_NUM; j++) |
| 849 | { | 1042 | { |
| 850 | print_message(names[D_CBC_DES],c[D_CBC_DES][j],lengths[j]); | 1043 | print_message(names[D_CBC_DES],c[D_CBC_DES][j],lengths[j]); |
| 851 | Time_F(START); | 1044 | Time_F(START,usertime); |
| 852 | for (count=0,run=1; COND(c[D_CBC_DES][j]); count++) | 1045 | for (count=0,run=1; COND(c[D_CBC_DES][j]); count++) |
| 853 | des_ncbc_encrypt(buf,buf,lengths[j],sch, | 1046 | des_ncbc_encrypt(buf,buf,lengths[j],sch, |
| 854 | &iv,DES_ENCRYPT); | 1047 | &iv,DES_ENCRYPT); |
| 855 | d=Time_F(STOP); | 1048 | d=Time_F(STOP,usertime); |
| 856 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1049 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 857 | count,names[D_CBC_DES],d); | 1050 | count,names[D_CBC_DES],d); |
| 858 | results[D_CBC_DES][j]=((double)count)/d*lengths[j]; | 1051 | results[D_CBC_DES][j]=((double)count)/d*lengths[j]; |
| @@ -864,12 +1057,12 @@ int MAIN(int argc, char **argv) | |||
| 864 | for (j=0; j<SIZE_NUM; j++) | 1057 | for (j=0; j<SIZE_NUM; j++) |
| 865 | { | 1058 | { |
| 866 | print_message(names[D_EDE3_DES],c[D_EDE3_DES][j],lengths[j]); | 1059 | print_message(names[D_EDE3_DES],c[D_EDE3_DES][j],lengths[j]); |
| 867 | Time_F(START); | 1060 | Time_F(START,usertime); |
| 868 | for (count=0,run=1; COND(c[D_EDE3_DES][j]); count++) | 1061 | for (count=0,run=1; COND(c[D_EDE3_DES][j]); count++) |
| 869 | des_ede3_cbc_encrypt(buf,buf,lengths[j], | 1062 | des_ede3_cbc_encrypt(buf,buf,lengths[j], |
| 870 | sch,sch2,sch3, | 1063 | sch,sch2,sch3, |
| 871 | &iv,DES_ENCRYPT); | 1064 | &iv,DES_ENCRYPT); |
| 872 | d=Time_F(STOP); | 1065 | d=Time_F(STOP,usertime); |
| 873 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1066 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 874 | count,names[D_EDE3_DES],d); | 1067 | count,names[D_EDE3_DES],d); |
| 875 | results[D_EDE3_DES][j]=((double)count)/d*lengths[j]; | 1068 | results[D_EDE3_DES][j]=((double)count)/d*lengths[j]; |
| @@ -882,12 +1075,12 @@ int MAIN(int argc, char **argv) | |||
| 882 | for (j=0; j<SIZE_NUM; j++) | 1075 | for (j=0; j<SIZE_NUM; j++) |
| 883 | { | 1076 | { |
| 884 | print_message(names[D_CBC_IDEA],c[D_CBC_IDEA][j],lengths[j]); | 1077 | print_message(names[D_CBC_IDEA],c[D_CBC_IDEA][j],lengths[j]); |
| 885 | Time_F(START); | 1078 | Time_F(START,usertime); |
| 886 | for (count=0,run=1; COND(c[D_CBC_IDEA][j]); count++) | 1079 | for (count=0,run=1; COND(c[D_CBC_IDEA][j]); count++) |
| 887 | idea_cbc_encrypt(buf,buf, | 1080 | idea_cbc_encrypt(buf,buf, |
| 888 | (unsigned long)lengths[j],&idea_ks, | 1081 | (unsigned long)lengths[j],&idea_ks, |
| 889 | iv,IDEA_ENCRYPT); | 1082 | iv,IDEA_ENCRYPT); |
| 890 | d=Time_F(STOP); | 1083 | d=Time_F(STOP,usertime); |
| 891 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1084 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 892 | count,names[D_CBC_IDEA],d); | 1085 | count,names[D_CBC_IDEA],d); |
| 893 | results[D_CBC_IDEA][j]=((double)count)/d*lengths[j]; | 1086 | results[D_CBC_IDEA][j]=((double)count)/d*lengths[j]; |
| @@ -900,12 +1093,12 @@ int MAIN(int argc, char **argv) | |||
| 900 | for (j=0; j<SIZE_NUM; j++) | 1093 | for (j=0; j<SIZE_NUM; j++) |
| 901 | { | 1094 | { |
| 902 | print_message(names[D_CBC_RC2],c[D_CBC_RC2][j],lengths[j]); | 1095 | print_message(names[D_CBC_RC2],c[D_CBC_RC2][j],lengths[j]); |
| 903 | Time_F(START); | 1096 | Time_F(START,usertime); |
| 904 | for (count=0,run=1; COND(c[D_CBC_RC2][j]); count++) | 1097 | for (count=0,run=1; COND(c[D_CBC_RC2][j]); count++) |
| 905 | RC2_cbc_encrypt(buf,buf, | 1098 | RC2_cbc_encrypt(buf,buf, |
| 906 | (unsigned long)lengths[j],&rc2_ks, | 1099 | (unsigned long)lengths[j],&rc2_ks, |
| 907 | iv,RC2_ENCRYPT); | 1100 | iv,RC2_ENCRYPT); |
| 908 | d=Time_F(STOP); | 1101 | d=Time_F(STOP,usertime); |
| 909 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1102 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 910 | count,names[D_CBC_RC2],d); | 1103 | count,names[D_CBC_RC2],d); |
| 911 | results[D_CBC_RC2][j]=((double)count)/d*lengths[j]; | 1104 | results[D_CBC_RC2][j]=((double)count)/d*lengths[j]; |
| @@ -918,12 +1111,12 @@ int MAIN(int argc, char **argv) | |||
| 918 | for (j=0; j<SIZE_NUM; j++) | 1111 | for (j=0; j<SIZE_NUM; j++) |
| 919 | { | 1112 | { |
| 920 | print_message(names[D_CBC_RC5],c[D_CBC_RC5][j],lengths[j]); | 1113 | print_message(names[D_CBC_RC5],c[D_CBC_RC5][j],lengths[j]); |
| 921 | Time_F(START); | 1114 | Time_F(START,usertime); |
| 922 | for (count=0,run=1; COND(c[D_CBC_RC5][j]); count++) | 1115 | for (count=0,run=1; COND(c[D_CBC_RC5][j]); count++) |
| 923 | RC5_32_cbc_encrypt(buf,buf, | 1116 | RC5_32_cbc_encrypt(buf,buf, |
| 924 | (unsigned long)lengths[j],&rc5_ks, | 1117 | (unsigned long)lengths[j],&rc5_ks, |
| 925 | iv,RC5_ENCRYPT); | 1118 | iv,RC5_ENCRYPT); |
| 926 | d=Time_F(STOP); | 1119 | d=Time_F(STOP,usertime); |
| 927 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1120 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 928 | count,names[D_CBC_RC5],d); | 1121 | count,names[D_CBC_RC5],d); |
| 929 | results[D_CBC_RC5][j]=((double)count)/d*lengths[j]; | 1122 | results[D_CBC_RC5][j]=((double)count)/d*lengths[j]; |
| @@ -936,12 +1129,12 @@ int MAIN(int argc, char **argv) | |||
| 936 | for (j=0; j<SIZE_NUM; j++) | 1129 | for (j=0; j<SIZE_NUM; j++) |
| 937 | { | 1130 | { |
| 938 | print_message(names[D_CBC_BF],c[D_CBC_BF][j],lengths[j]); | 1131 | print_message(names[D_CBC_BF],c[D_CBC_BF][j],lengths[j]); |
| 939 | Time_F(START); | 1132 | Time_F(START,usertime); |
| 940 | for (count=0,run=1; COND(c[D_CBC_BF][j]); count++) | 1133 | for (count=0,run=1; COND(c[D_CBC_BF][j]); count++) |
| 941 | BF_cbc_encrypt(buf,buf, | 1134 | BF_cbc_encrypt(buf,buf, |
| 942 | (unsigned long)lengths[j],&bf_ks, | 1135 | (unsigned long)lengths[j],&bf_ks, |
| 943 | iv,BF_ENCRYPT); | 1136 | iv,BF_ENCRYPT); |
| 944 | d=Time_F(STOP); | 1137 | d=Time_F(STOP,usertime); |
| 945 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1138 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 946 | count,names[D_CBC_BF],d); | 1139 | count,names[D_CBC_BF],d); |
| 947 | results[D_CBC_BF][j]=((double)count)/d*lengths[j]; | 1140 | results[D_CBC_BF][j]=((double)count)/d*lengths[j]; |
| @@ -954,12 +1147,12 @@ int MAIN(int argc, char **argv) | |||
| 954 | for (j=0; j<SIZE_NUM; j++) | 1147 | for (j=0; j<SIZE_NUM; j++) |
| 955 | { | 1148 | { |
| 956 | print_message(names[D_CBC_CAST],c[D_CBC_CAST][j],lengths[j]); | 1149 | print_message(names[D_CBC_CAST],c[D_CBC_CAST][j],lengths[j]); |
| 957 | Time_F(START); | 1150 | Time_F(START,usertime); |
| 958 | for (count=0,run=1; COND(c[D_CBC_CAST][j]); count++) | 1151 | for (count=0,run=1; COND(c[D_CBC_CAST][j]); count++) |
| 959 | CAST_cbc_encrypt(buf,buf, | 1152 | CAST_cbc_encrypt(buf,buf, |
| 960 | (unsigned long)lengths[j],&cast_ks, | 1153 | (unsigned long)lengths[j],&cast_ks, |
| 961 | iv,CAST_ENCRYPT); | 1154 | iv,CAST_ENCRYPT); |
| 962 | d=Time_F(STOP); | 1155 | d=Time_F(STOP,usertime); |
| 963 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", | 1156 | BIO_printf(bio_err,"%ld %s's in %.2fs\n", |
| 964 | count,names[D_CBC_CAST],d); | 1157 | count,names[D_CBC_CAST],d); |
| 965 | results[D_CBC_CAST][j]=((double)count)/d*lengths[j]; | 1158 | results[D_CBC_CAST][j]=((double)count)/d*lengths[j]; |
| @@ -974,49 +1167,73 @@ int MAIN(int argc, char **argv) | |||
| 974 | int ret; | 1167 | int ret; |
| 975 | if (!rsa_doit[j]) continue; | 1168 | if (!rsa_doit[j]) continue; |
| 976 | ret=RSA_sign(NID_md5_sha1, buf,36, buf2, &rsa_num, rsa_key[j]); | 1169 | ret=RSA_sign(NID_md5_sha1, buf,36, buf2, &rsa_num, rsa_key[j]); |
| 977 | pkey_print_message("private","rsa",rsa_c[j][0],rsa_bits[j], | 1170 | if (ret == 0) |
| 978 | RSA_SECONDS); | 1171 | { |
| 979 | /* RSA_blinding_on(rsa_key[j],NULL); */ | 1172 | BIO_printf(bio_err,"RSA sign failure. No RSA sign will be done.\n"); |
| 980 | Time_F(START); | 1173 | ERR_print_errors(bio_err); |
| 981 | for (count=0,run=1; COND(rsa_c[j][0]); count++) | 1174 | rsa_count=1; |
| 1175 | } | ||
| 1176 | else | ||
| 982 | { | 1177 | { |
| 983 | ret=RSA_sign(NID_md5_sha1, buf,36, buf2, &rsa_num, | 1178 | pkey_print_message("private","rsa", |
| 984 | rsa_key[j]); | 1179 | rsa_c[j][0],rsa_bits[j], |
| 985 | if (ret <= 0) | 1180 | RSA_SECONDS); |
| 1181 | /* RSA_blinding_on(rsa_key[j],NULL); */ | ||
| 1182 | Time_F(START,usertime); | ||
| 1183 | for (count=0,run=1; COND(rsa_c[j][0]); count++) | ||
| 986 | { | 1184 | { |
| 987 | BIO_printf(bio_err,"RSA private encrypt failure\n"); | 1185 | ret=RSA_sign(NID_md5_sha1, buf,36, buf2, |
| 988 | ERR_print_errors(bio_err); | 1186 | &rsa_num, rsa_key[j]); |
| 989 | count=1; | 1187 | if (ret == 0) |
| 990 | break; | 1188 | { |
| 1189 | BIO_printf(bio_err, | ||
| 1190 | "RSA sign failure\n"); | ||
| 1191 | ERR_print_errors(bio_err); | ||
| 1192 | count=1; | ||
| 1193 | break; | ||
| 1194 | } | ||
| 991 | } | 1195 | } |
| 1196 | d=Time_F(STOP,usertime); | ||
| 1197 | BIO_printf(bio_err, | ||
| 1198 | "%ld %d bit private RSA's in %.2fs\n", | ||
| 1199 | count,rsa_bits[j],d); | ||
| 1200 | rsa_results[j][0]=d/(double)count; | ||
| 1201 | rsa_count=count; | ||
| 992 | } | 1202 | } |
| 993 | d=Time_F(STOP); | ||
| 994 | BIO_printf(bio_err,"%ld %d bit private RSA's in %.2fs\n", | ||
| 995 | count,rsa_bits[j],d); | ||
| 996 | rsa_results[j][0]=d/(double)count; | ||
| 997 | rsa_count=count; | ||
| 998 | 1203 | ||
| 999 | #if 1 | 1204 | #if 1 |
| 1000 | ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); | 1205 | ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); |
| 1001 | pkey_print_message("public","rsa",rsa_c[j][1],rsa_bits[j], | 1206 | if (ret <= 0) |
| 1002 | RSA_SECONDS); | 1207 | { |
| 1003 | Time_F(START); | 1208 | BIO_printf(bio_err,"RSA verify failure. No RSA verify will be done.\n"); |
| 1004 | for (count=0,run=1; COND(rsa_c[j][1]); count++) | 1209 | ERR_print_errors(bio_err); |
| 1210 | dsa_doit[j] = 0; | ||
| 1211 | } | ||
| 1212 | else | ||
| 1005 | { | 1213 | { |
| 1006 | ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, | 1214 | pkey_print_message("public","rsa", |
| 1007 | rsa_key[j]); | 1215 | rsa_c[j][1],rsa_bits[j], |
| 1008 | if (ret <= 0) | 1216 | RSA_SECONDS); |
| 1217 | Time_F(START,usertime); | ||
| 1218 | for (count=0,run=1; COND(rsa_c[j][1]); count++) | ||
| 1009 | { | 1219 | { |
| 1010 | BIO_printf(bio_err,"RSA verify failure\n"); | 1220 | ret=RSA_verify(NID_md5_sha1, buf,36, buf2, |
| 1011 | ERR_print_errors(bio_err); | 1221 | rsa_num, rsa_key[j]); |
| 1012 | count=1; | 1222 | if (ret == 0) |
| 1013 | break; | 1223 | { |
| 1224 | BIO_printf(bio_err, | ||
| 1225 | "RSA verify failure\n"); | ||
| 1226 | ERR_print_errors(bio_err); | ||
| 1227 | count=1; | ||
| 1228 | break; | ||
| 1229 | } | ||
| 1014 | } | 1230 | } |
| 1231 | d=Time_F(STOP,usertime); | ||
| 1232 | BIO_printf(bio_err, | ||
| 1233 | "%ld %d bit public RSA's in %.2fs\n", | ||
| 1234 | count,rsa_bits[j],d); | ||
| 1235 | rsa_results[j][1]=d/(double)count; | ||
| 1015 | } | 1236 | } |
| 1016 | d=Time_F(STOP); | ||
| 1017 | BIO_printf(bio_err,"%ld %d bit public RSA's in %.2fs\n", | ||
| 1018 | count,rsa_bits[j],d); | ||
| 1019 | rsa_results[j][1]=d/(double)count; | ||
| 1020 | #endif | 1237 | #endif |
| 1021 | 1238 | ||
| 1022 | if (rsa_count <= 1) | 1239 | if (rsa_count <= 1) |
| @@ -1038,54 +1255,77 @@ int MAIN(int argc, char **argv) | |||
| 1038 | for (j=0; j<DSA_NUM; j++) | 1255 | for (j=0; j<DSA_NUM; j++) |
| 1039 | { | 1256 | { |
| 1040 | unsigned int kk; | 1257 | unsigned int kk; |
| 1258 | int ret; | ||
| 1041 | 1259 | ||
| 1042 | if (!dsa_doit[j]) continue; | 1260 | if (!dsa_doit[j]) continue; |
| 1043 | DSA_generate_key(dsa_key[j]); | 1261 | DSA_generate_key(dsa_key[j]); |
| 1044 | /* DSA_sign_setup(dsa_key[j],NULL); */ | 1262 | /* DSA_sign_setup(dsa_key[j],NULL); */ |
| 1045 | rsa_num=DSA_sign(EVP_PKEY_DSA,buf,20,buf2, | 1263 | ret=DSA_sign(EVP_PKEY_DSA,buf,20,buf2, |
| 1046 | &kk,dsa_key[j]); | 1264 | &kk,dsa_key[j]); |
| 1047 | pkey_print_message("sign","dsa",dsa_c[j][0],dsa_bits[j], | 1265 | if (ret == 0) |
| 1048 | DSA_SECONDS); | 1266 | { |
| 1049 | Time_F(START); | 1267 | BIO_printf(bio_err,"DSA sign failure. No DSA sign will be done.\n"); |
| 1050 | for (count=0,run=1; COND(dsa_c[j][0]); count++) | 1268 | ERR_print_errors(bio_err); |
| 1269 | rsa_count=1; | ||
| 1270 | } | ||
| 1271 | else | ||
| 1051 | { | 1272 | { |
| 1052 | rsa_num=DSA_sign(EVP_PKEY_DSA,buf,20,buf2, | 1273 | pkey_print_message("sign","dsa", |
| 1053 | &kk,dsa_key[j]); | 1274 | dsa_c[j][0],dsa_bits[j], |
| 1054 | if (rsa_num == 0) | 1275 | DSA_SECONDS); |
| 1276 | Time_F(START,usertime); | ||
| 1277 | for (count=0,run=1; COND(dsa_c[j][0]); count++) | ||
| 1055 | { | 1278 | { |
| 1056 | BIO_printf(bio_err,"DSA sign failure\n"); | 1279 | ret=DSA_sign(EVP_PKEY_DSA,buf,20,buf2, |
| 1057 | ERR_print_errors(bio_err); | 1280 | &kk,dsa_key[j]); |
| 1058 | count=1; | 1281 | if (ret == 0) |
| 1059 | break; | 1282 | { |
| 1283 | BIO_printf(bio_err, | ||
| 1284 | "DSA sign failure\n"); | ||
| 1285 | ERR_print_errors(bio_err); | ||
| 1286 | count=1; | ||
| 1287 | break; | ||
| 1288 | } | ||
| 1060 | } | 1289 | } |
| 1290 | d=Time_F(STOP,usertime); | ||
| 1291 | BIO_printf(bio_err,"%ld %d bit DSA signs in %.2fs\n", | ||
| 1292 | count,dsa_bits[j],d); | ||
| 1293 | dsa_results[j][0]=d/(double)count; | ||
| 1294 | rsa_count=count; | ||
| 1061 | } | 1295 | } |
| 1062 | d=Time_F(STOP); | ||
| 1063 | BIO_printf(bio_err,"%ld %d bit DSA signs in %.2fs\n", | ||
| 1064 | count,dsa_bits[j],d); | ||
| 1065 | dsa_results[j][0]=d/(double)count; | ||
| 1066 | rsa_count=count; | ||
| 1067 | 1296 | ||
| 1068 | rsa_num2=DSA_verify(EVP_PKEY_DSA,buf,20,buf2, | 1297 | ret=DSA_verify(EVP_PKEY_DSA,buf,20,buf2, |
| 1069 | kk,dsa_key[j]); | 1298 | kk,dsa_key[j]); |
| 1070 | pkey_print_message("verify","dsa",dsa_c[j][1],dsa_bits[j], | 1299 | if (ret <= 0) |
| 1071 | DSA_SECONDS); | 1300 | { |
| 1072 | Time_F(START); | 1301 | BIO_printf(bio_err,"DSA verify failure. No DSA verify will be done.\n"); |
| 1073 | for (count=0,run=1; COND(dsa_c[j][1]); count++) | 1302 | ERR_print_errors(bio_err); |
| 1303 | dsa_doit[j] = 0; | ||
| 1304 | } | ||
| 1305 | else | ||
| 1074 | { | 1306 | { |
| 1075 | rsa_num2=DSA_verify(EVP_PKEY_DSA,buf,20,buf2, | 1307 | pkey_print_message("verify","dsa", |
| 1076 | kk,dsa_key[j]); | 1308 | dsa_c[j][1],dsa_bits[j], |
| 1077 | if (rsa_num2 == 0) | 1309 | DSA_SECONDS); |
| 1310 | Time_F(START,usertime); | ||
| 1311 | for (count=0,run=1; COND(dsa_c[j][1]); count++) | ||
| 1078 | { | 1312 | { |
| 1079 | BIO_printf(bio_err,"DSA verify failure\n"); | 1313 | ret=DSA_verify(EVP_PKEY_DSA,buf,20,buf2, |
| 1080 | ERR_print_errors(bio_err); | 1314 | kk,dsa_key[j]); |
| 1081 | count=1; | 1315 | if (ret <= 0) |
| 1082 | break; | 1316 | { |
| 1317 | BIO_printf(bio_err, | ||
| 1318 | "DSA verify failure\n"); | ||
| 1319 | ERR_print_errors(bio_err); | ||
| 1320 | count=1; | ||
| 1321 | break; | ||
| 1322 | } | ||
| 1083 | } | 1323 | } |
| 1324 | d=Time_F(STOP,usertime); | ||
| 1325 | BIO_printf(bio_err,"%ld %d bit DSA verify in %.2fs\n", | ||
| 1326 | count,dsa_bits[j],d); | ||
| 1327 | dsa_results[j][1]=d/(double)count; | ||
| 1084 | } | 1328 | } |
| 1085 | d=Time_F(STOP); | ||
| 1086 | BIO_printf(bio_err,"%ld %d bit DSA verify in %.2fs\n", | ||
| 1087 | count,dsa_bits[j],d); | ||
| 1088 | dsa_results[j][1]=d/(double)count; | ||
| 1089 | 1329 | ||
| 1090 | if (rsa_count <= 1) | 1330 | if (rsa_count <= 1) |
| 1091 | { | 1331 | { |
| @@ -1173,8 +1413,9 @@ int MAIN(int argc, char **argv) | |||
| 1173 | #endif | 1413 | #endif |
| 1174 | mret=0; | 1414 | mret=0; |
| 1175 | end: | 1415 | end: |
| 1176 | if (buf != NULL) Free(buf); | 1416 | ERR_print_errors(bio_err); |
| 1177 | if (buf2 != NULL) Free(buf2); | 1417 | if (buf != NULL) OPENSSL_free(buf); |
| 1418 | if (buf2 != NULL) OPENSSL_free(buf2); | ||
| 1178 | #ifndef NO_RSA | 1419 | #ifndef NO_RSA |
| 1179 | for (i=0; i<RSA_NUM; i++) | 1420 | for (i=0; i<RSA_NUM; i++) |
| 1180 | if (rsa_key[i] != NULL) | 1421 | if (rsa_key[i] != NULL) |
diff --git a/src/lib/libssl/src/apps/spkac.c b/src/lib/libssl/src/apps/spkac.c index f3ee7e34e3..d7e46782f7 100644 --- a/src/lib/libssl/src/apps/spkac.c +++ b/src/lib/libssl/src/apps/spkac.c | |||
| @@ -69,6 +69,7 @@ | |||
| 69 | #include <openssl/lhash.h> | 69 | #include <openssl/lhash.h> |
| 70 | #include <openssl/x509.h> | 70 | #include <openssl/x509.h> |
| 71 | #include <openssl/pem.h> | 71 | #include <openssl/pem.h> |
| 72 | #include <openssl/engine.h> | ||
| 72 | 73 | ||
| 73 | #undef PROG | 74 | #undef PROG |
| 74 | #define PROG spkac_main | 75 | #define PROG spkac_main |
| @@ -81,6 +82,7 @@ int MAIN(int, char **); | |||
| 81 | 82 | ||
| 82 | int MAIN(int argc, char **argv) | 83 | int MAIN(int argc, char **argv) |
| 83 | { | 84 | { |
| 85 | ENGINE *e = NULL; | ||
| 84 | int i,badops=0, ret = 1; | 86 | int i,badops=0, ret = 1; |
| 85 | BIO *in = NULL,*out = NULL, *key = NULL; | 87 | BIO *in = NULL,*out = NULL, *key = NULL; |
| 86 | int verify=0,noout=0,pubkey=0; | 88 | int verify=0,noout=0,pubkey=0; |
| @@ -91,6 +93,7 @@ int MAIN(int argc, char **argv) | |||
| 91 | LHASH *conf = NULL; | 93 | LHASH *conf = NULL; |
| 92 | NETSCAPE_SPKI *spki = NULL; | 94 | NETSCAPE_SPKI *spki = NULL; |
| 93 | EVP_PKEY *pkey = NULL; | 95 | EVP_PKEY *pkey = NULL; |
| 96 | char *engine=NULL; | ||
| 94 | 97 | ||
| 95 | apps_startup(); | 98 | apps_startup(); |
| 96 | 99 | ||
| @@ -136,6 +139,11 @@ int MAIN(int argc, char **argv) | |||
| 136 | if (--argc < 1) goto bad; | 139 | if (--argc < 1) goto bad; |
| 137 | spksect= *(++argv); | 140 | spksect= *(++argv); |
| 138 | } | 141 | } |
| 142 | else if (strcmp(*argv,"-engine") == 0) | ||
| 143 | { | ||
| 144 | if (--argc < 1) goto bad; | ||
| 145 | engine= *(++argv); | ||
| 146 | } | ||
| 139 | else if (strcmp(*argv,"-noout") == 0) | 147 | else if (strcmp(*argv,"-noout") == 0) |
| 140 | noout=1; | 148 | noout=1; |
| 141 | else if (strcmp(*argv,"-pubkey") == 0) | 149 | else if (strcmp(*argv,"-pubkey") == 0) |
| @@ -161,6 +169,7 @@ bad: | |||
| 161 | BIO_printf(bio_err," -noout don't print SPKAC\n"); | 169 | BIO_printf(bio_err," -noout don't print SPKAC\n"); |
| 162 | BIO_printf(bio_err," -pubkey output public key\n"); | 170 | BIO_printf(bio_err," -pubkey output public key\n"); |
| 163 | BIO_printf(bio_err," -verify verify SPKAC signature\n"); | 171 | BIO_printf(bio_err," -verify verify SPKAC signature\n"); |
| 172 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | ||
| 164 | goto end; | 173 | goto end; |
| 165 | } | 174 | } |
| 166 | 175 | ||
| @@ -170,6 +179,24 @@ bad: | |||
| 170 | goto end; | 179 | goto end; |
| 171 | } | 180 | } |
| 172 | 181 | ||
| 182 | if (engine != NULL) | ||
| 183 | { | ||
| 184 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 185 | { | ||
| 186 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 187 | engine); | ||
| 188 | goto end; | ||
| 189 | } | ||
| 190 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 191 | { | ||
| 192 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 193 | goto end; | ||
| 194 | } | ||
| 195 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 196 | /* Free our "structural" reference. */ | ||
| 197 | ENGINE_free(e); | ||
| 198 | } | ||
| 199 | |||
| 173 | if(keyfile) { | 200 | if(keyfile) { |
| 174 | if(strcmp(keyfile, "-")) key = BIO_new_file(keyfile, "r"); | 201 | if(strcmp(keyfile, "-")) key = BIO_new_file(keyfile, "r"); |
| 175 | else key = BIO_new_fp(stdin, BIO_NOCLOSE); | 202 | else key = BIO_new_fp(stdin, BIO_NOCLOSE); |
| @@ -192,7 +219,15 @@ bad: | |||
| 192 | spkstr = NETSCAPE_SPKI_b64_encode(spki); | 219 | spkstr = NETSCAPE_SPKI_b64_encode(spki); |
| 193 | 220 | ||
| 194 | if (outfile) out = BIO_new_file(outfile, "w"); | 221 | if (outfile) out = BIO_new_file(outfile, "w"); |
| 195 | else out = BIO_new_fp(stdout, BIO_NOCLOSE); | 222 | else { |
| 223 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 224 | #ifdef VMS | ||
| 225 | { | ||
| 226 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 227 | out = BIO_push(tmpbio, out); | ||
| 228 | } | ||
| 229 | #endif | ||
| 230 | } | ||
| 196 | 231 | ||
| 197 | if(!out) { | 232 | if(!out) { |
| 198 | BIO_printf(bio_err, "Error opening output file\n"); | 233 | BIO_printf(bio_err, "Error opening output file\n"); |
| @@ -200,7 +235,7 @@ bad: | |||
| 200 | goto end; | 235 | goto end; |
| 201 | } | 236 | } |
| 202 | BIO_printf(out, "SPKAC=%s\n", spkstr); | 237 | BIO_printf(out, "SPKAC=%s\n", spkstr); |
| 203 | Free(spkstr); | 238 | OPENSSL_free(spkstr); |
| 204 | ret = 0; | 239 | ret = 0; |
| 205 | goto end; | 240 | goto end; |
| 206 | } | 241 | } |
| @@ -241,7 +276,15 @@ bad: | |||
| 241 | } | 276 | } |
| 242 | 277 | ||
| 243 | if (outfile) out = BIO_new_file(outfile, "w"); | 278 | if (outfile) out = BIO_new_file(outfile, "w"); |
| 244 | else out = BIO_new_fp(stdout, BIO_NOCLOSE); | 279 | else { |
| 280 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 281 | #ifdef VMS | ||
| 282 | { | ||
| 283 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 284 | out = BIO_push(tmpbio, out); | ||
| 285 | } | ||
| 286 | #endif | ||
| 287 | } | ||
| 245 | 288 | ||
| 246 | if(!out) { | 289 | if(!out) { |
| 247 | BIO_printf(bio_err, "Error opening output file\n"); | 290 | BIO_printf(bio_err, "Error opening output file\n"); |
| @@ -268,9 +311,9 @@ end: | |||
| 268 | CONF_free(conf); | 311 | CONF_free(conf); |
| 269 | NETSCAPE_SPKI_free(spki); | 312 | NETSCAPE_SPKI_free(spki); |
| 270 | BIO_free(in); | 313 | BIO_free(in); |
| 271 | BIO_free(out); | 314 | BIO_free_all(out); |
| 272 | BIO_free(key); | 315 | BIO_free(key); |
| 273 | EVP_PKEY_free(pkey); | 316 | EVP_PKEY_free(pkey); |
| 274 | if(passin) Free(passin); | 317 | if(passin) OPENSSL_free(passin); |
| 275 | EXIT(ret); | 318 | EXIT(ret); |
| 276 | } | 319 | } |
diff --git a/src/lib/libssl/src/apps/verify.c b/src/lib/libssl/src/apps/verify.c index 267ee4ecd7..f384de6d29 100644 --- a/src/lib/libssl/src/apps/verify.c +++ b/src/lib/libssl/src/apps/verify.c | |||
| @@ -65,26 +65,29 @@ | |||
| 65 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
| 66 | #include <openssl/x509v3.h> | 66 | #include <openssl/x509v3.h> |
| 67 | #include <openssl/pem.h> | 67 | #include <openssl/pem.h> |
| 68 | #include <openssl/engine.h> | ||
| 68 | 69 | ||
| 69 | #undef PROG | 70 | #undef PROG |
| 70 | #define PROG verify_main | 71 | #define PROG verify_main |
| 71 | 72 | ||
| 72 | static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx); | 73 | static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx); |
| 73 | static int check(X509_STORE *ctx,char *file, STACK_OF(X509)*other, int purpose); | 74 | static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose); |
| 74 | static STACK_OF(X509) *load_untrusted(char *file); | 75 | static STACK_OF(X509) *load_untrusted(char *file); |
| 75 | static int v_verbose=0; | 76 | static int v_verbose=0, issuer_checks = 0; |
| 76 | 77 | ||
| 77 | int MAIN(int, char **); | 78 | int MAIN(int, char **); |
| 78 | 79 | ||
| 79 | int MAIN(int argc, char **argv) | 80 | int MAIN(int argc, char **argv) |
| 80 | { | 81 | { |
| 82 | ENGINE *e = NULL; | ||
| 81 | int i,ret=1; | 83 | int i,ret=1; |
| 82 | int purpose = -1; | 84 | int purpose = -1; |
| 83 | char *CApath=NULL,*CAfile=NULL; | 85 | char *CApath=NULL,*CAfile=NULL; |
| 84 | char *untfile = NULL; | 86 | char *untfile = NULL, *trustfile = NULL; |
| 85 | STACK_OF(X509) *untrusted = NULL; | 87 | STACK_OF(X509) *untrusted = NULL, *trusted = NULL; |
| 86 | X509_STORE *cert_ctx=NULL; | 88 | X509_STORE *cert_ctx=NULL; |
| 87 | X509_LOOKUP *lookup=NULL; | 89 | X509_LOOKUP *lookup=NULL; |
| 90 | char *engine=NULL; | ||
| 88 | 91 | ||
| 89 | cert_ctx=X509_STORE_new(); | 92 | cert_ctx=X509_STORE_new(); |
| 90 | if (cert_ctx == NULL) goto end; | 93 | if (cert_ctx == NULL) goto end; |
| @@ -132,8 +135,20 @@ int MAIN(int argc, char **argv) | |||
| 132 | if (argc-- < 1) goto end; | 135 | if (argc-- < 1) goto end; |
| 133 | untfile= *(++argv); | 136 | untfile= *(++argv); |
| 134 | } | 137 | } |
| 138 | else if (strcmp(*argv,"-trusted") == 0) | ||
| 139 | { | ||
| 140 | if (argc-- < 1) goto end; | ||
| 141 | trustfile= *(++argv); | ||
| 142 | } | ||
| 143 | else if (strcmp(*argv,"-engine") == 0) | ||
| 144 | { | ||
| 145 | if (--argc < 1) goto end; | ||
| 146 | engine= *(++argv); | ||
| 147 | } | ||
| 135 | else if (strcmp(*argv,"-help") == 0) | 148 | else if (strcmp(*argv,"-help") == 0) |
| 136 | goto end; | 149 | goto end; |
| 150 | else if (strcmp(*argv,"-issuer_checks") == 0) | ||
| 151 | issuer_checks=1; | ||
| 137 | else if (strcmp(*argv,"-verbose") == 0) | 152 | else if (strcmp(*argv,"-verbose") == 0) |
| 138 | v_verbose=1; | 153 | v_verbose=1; |
| 139 | else if (argv[0][0] == '-') | 154 | else if (argv[0][0] == '-') |
| @@ -147,6 +162,24 @@ int MAIN(int argc, char **argv) | |||
| 147 | break; | 162 | break; |
| 148 | } | 163 | } |
| 149 | 164 | ||
| 165 | if (engine != NULL) | ||
| 166 | { | ||
| 167 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 168 | { | ||
| 169 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 170 | engine); | ||
| 171 | goto end; | ||
| 172 | } | ||
| 173 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 174 | { | ||
| 175 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 176 | goto end; | ||
| 177 | } | ||
| 178 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 179 | /* Free our "structural" reference. */ | ||
| 180 | ENGINE_free(e); | ||
| 181 | } | ||
| 182 | |||
| 150 | lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file()); | 183 | lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file()); |
| 151 | if (lookup == NULL) abort(); | 184 | if (lookup == NULL) abort(); |
| 152 | if (CAfile) { | 185 | if (CAfile) { |
| @@ -179,14 +212,22 @@ int MAIN(int argc, char **argv) | |||
| 179 | } | 212 | } |
| 180 | } | 213 | } |
| 181 | 214 | ||
| 182 | if (argc < 1) check(cert_ctx, NULL, untrusted, purpose); | 215 | if(trustfile) { |
| 216 | if(!(trusted = load_untrusted(trustfile))) { | ||
| 217 | BIO_printf(bio_err, "Error loading untrusted file %s\n", trustfile); | ||
| 218 | ERR_print_errors(bio_err); | ||
| 219 | goto end; | ||
| 220 | } | ||
| 221 | } | ||
| 222 | |||
| 223 | if (argc < 1) check(cert_ctx, NULL, untrusted, trusted, purpose); | ||
| 183 | else | 224 | else |
| 184 | for (i=0; i<argc; i++) | 225 | for (i=0; i<argc; i++) |
| 185 | check(cert_ctx,argv[i], untrusted, purpose); | 226 | check(cert_ctx,argv[i], untrusted, trusted, purpose); |
| 186 | ret=0; | 227 | ret=0; |
| 187 | end: | 228 | end: |
| 188 | if (ret == 1) { | 229 | if (ret == 1) { |
| 189 | BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] cert1 cert2 ...\n"); | 230 | BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-engine e] cert1 cert2 ...\n"); |
| 190 | BIO_printf(bio_err,"recognized usages:\n"); | 231 | BIO_printf(bio_err,"recognized usages:\n"); |
| 191 | for(i = 0; i < X509_PURPOSE_get_count(); i++) { | 232 | for(i = 0; i < X509_PURPOSE_get_count(); i++) { |
| 192 | X509_PURPOSE *ptmp; | 233 | X509_PURPOSE *ptmp; |
| @@ -197,10 +238,11 @@ end: | |||
| 197 | } | 238 | } |
| 198 | if (cert_ctx != NULL) X509_STORE_free(cert_ctx); | 239 | if (cert_ctx != NULL) X509_STORE_free(cert_ctx); |
| 199 | sk_X509_pop_free(untrusted, X509_free); | 240 | sk_X509_pop_free(untrusted, X509_free); |
| 241 | sk_X509_pop_free(trusted, X509_free); | ||
| 200 | EXIT(ret); | 242 | EXIT(ret); |
| 201 | } | 243 | } |
| 202 | 244 | ||
| 203 | static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, int purpose) | 245 | static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose) |
| 204 | { | 246 | { |
| 205 | X509 *x=NULL; | 247 | X509 *x=NULL; |
| 206 | BIO *in=NULL; | 248 | BIO *in=NULL; |
| @@ -242,7 +284,10 @@ static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, int purpos | |||
| 242 | goto end; | 284 | goto end; |
| 243 | } | 285 | } |
| 244 | X509_STORE_CTX_init(csc,ctx,x,uchain); | 286 | X509_STORE_CTX_init(csc,ctx,x,uchain); |
| 287 | if(tchain) X509_STORE_CTX_trusted_stack(csc, tchain); | ||
| 245 | if(purpose >= 0) X509_STORE_CTX_set_purpose(csc, purpose); | 288 | if(purpose >= 0) X509_STORE_CTX_set_purpose(csc, purpose); |
| 289 | if(issuer_checks) | ||
| 290 | X509_STORE_CTX_set_flags(csc, X509_V_FLAG_CB_ISSUER_CHECK); | ||
| 246 | i=X509_verify_cert(csc); | 291 | i=X509_verify_cert(csc); |
| 247 | X509_STORE_CTX_free(csc); | 292 | X509_STORE_CTX_free(csc); |
| 248 | 293 | ||
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c index 2d6384184c..0c0d42a0ac 100644 --- a/src/lib/libssl/src/apps/x509.c +++ b/src/lib/libssl/src/apps/x509.c | |||
| @@ -73,6 +73,7 @@ | |||
| 73 | #include <openssl/x509v3.h> | 73 | #include <openssl/x509v3.h> |
| 74 | #include <openssl/objects.h> | 74 | #include <openssl/objects.h> |
| 75 | #include <openssl/pem.h> | 75 | #include <openssl/pem.h> |
| 76 | #include <openssl/engine.h> | ||
| 76 | 77 | ||
| 77 | #undef PROG | 78 | #undef PROG |
| 78 | #define PROG x509_main | 79 | #define PROG x509_main |
| @@ -81,8 +82,6 @@ | |||
| 81 | #define POSTFIX ".srl" | 82 | #define POSTFIX ".srl" |
| 82 | #define DEF_DAYS 30 | 83 | #define DEF_DAYS 30 |
| 83 | 84 | ||
| 84 | #define CERT_HDR "certificate" | ||
| 85 | |||
| 86 | static char *x509_usage[]={ | 85 | static char *x509_usage[]={ |
| 87 | "usage: x509 args\n", | 86 | "usage: x509 args\n", |
| 88 | " -inform arg - input format - default PEM (one of DER, NET or PEM)\n", | 87 | " -inform arg - input format - default PEM (one of DER, NET or PEM)\n", |
| @@ -97,6 +96,7 @@ static char *x509_usage[]={ | |||
| 97 | " -hash - print hash value\n", | 96 | " -hash - print hash value\n", |
| 98 | " -subject - print subject DN\n", | 97 | " -subject - print subject DN\n", |
| 99 | " -issuer - print issuer DN\n", | 98 | " -issuer - print issuer DN\n", |
| 99 | " -email - print email address(es)\n", | ||
| 100 | " -startdate - notBefore field\n", | 100 | " -startdate - notBefore field\n", |
| 101 | " -enddate - notAfter field\n", | 101 | " -enddate - notAfter field\n", |
| 102 | " -purpose - print out certificate purposes\n", | 102 | " -purpose - print out certificate purposes\n", |
| @@ -113,6 +113,8 @@ static char *x509_usage[]={ | |||
| 113 | " -addreject arg - reject certificate for a given purpose\n", | 113 | " -addreject arg - reject certificate for a given purpose\n", |
| 114 | " -setalias arg - set certificate alias\n", | 114 | " -setalias arg - set certificate alias\n", |
| 115 | " -days arg - How long till expiry of a signed certificate - def 30 days\n", | 115 | " -days arg - How long till expiry of a signed certificate - def 30 days\n", |
| 116 | " -checkend arg - check whether the cert expires in the next arg seconds\n", | ||
| 117 | " exit 1 if so, 0 if not\n", | ||
| 116 | " -signkey arg - self sign cert with arg\n", | 118 | " -signkey arg - self sign cert with arg\n", |
| 117 | " -x509toreq - output a certification request object\n", | 119 | " -x509toreq - output a certification request object\n", |
| 118 | " -req - input is a certificate request, sign and output.\n", | 120 | " -req - input is a certificate request, sign and output.\n", |
| @@ -127,12 +129,12 @@ static char *x509_usage[]={ | |||
| 127 | " -extfile - configuration file with X509V3 extensions to add\n", | 129 | " -extfile - configuration file with X509V3 extensions to add\n", |
| 128 | " -extensions - section from config file with X509V3 extensions to add\n", | 130 | " -extensions - section from config file with X509V3 extensions to add\n", |
| 129 | " -clrext - delete extensions before signing and input certificate\n", | 131 | " -clrext - delete extensions before signing and input certificate\n", |
| 132 | " -nameopt arg - various certificate name options\n", | ||
| 133 | " -engine e - use engine e, possibly a hardware device.\n", | ||
| 130 | NULL | 134 | NULL |
| 131 | }; | 135 | }; |
| 132 | 136 | ||
| 133 | static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx); | 137 | static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx); |
| 134 | static EVP_PKEY *load_key(char *file, int format, char *passin); | ||
| 135 | static X509 *load_cert(char *file, int format); | ||
| 136 | static int sign (X509 *x, EVP_PKEY *pkey,int days,int clrext, const EVP_MD *digest, | 138 | static int sign (X509 *x, EVP_PKEY *pkey,int days,int clrext, const EVP_MD *digest, |
| 137 | LHASH *conf, char *section); | 139 | LHASH *conf, char *section); |
| 138 | static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest, | 140 | static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest, |
| @@ -145,6 +147,7 @@ int MAIN(int, char **); | |||
| 145 | 147 | ||
| 146 | int MAIN(int argc, char **argv) | 148 | int MAIN(int argc, char **argv) |
| 147 | { | 149 | { |
| 150 | ENGINE *e = NULL; | ||
| 148 | int ret=1; | 151 | int ret=1; |
| 149 | X509_REQ *req=NULL; | 152 | X509_REQ *req=NULL; |
| 150 | X509 *x=NULL,*xca=NULL; | 153 | X509 *x=NULL,*xca=NULL; |
| @@ -159,7 +162,7 @@ int MAIN(int argc, char **argv) | |||
| 159 | char *CAkeyfile=NULL,*CAserial=NULL; | 162 | char *CAkeyfile=NULL,*CAserial=NULL; |
| 160 | char *alias=NULL; | 163 | char *alias=NULL; |
| 161 | int text=0,serial=0,hash=0,subject=0,issuer=0,startdate=0,enddate=0; | 164 | int text=0,serial=0,hash=0,subject=0,issuer=0,startdate=0,enddate=0; |
| 162 | int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0; | 165 | int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0,email=0; |
| 163 | int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0; | 166 | int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0; |
| 164 | int C=0; | 167 | int C=0; |
| 165 | int x509req=0,days=DEF_DAYS,modulus=0,pubkey=0; | 168 | int x509req=0,days=DEF_DAYS,modulus=0,pubkey=0; |
| @@ -173,6 +176,9 @@ int MAIN(int argc, char **argv) | |||
| 173 | LHASH *extconf = NULL; | 176 | LHASH *extconf = NULL; |
| 174 | char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL; | 177 | char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL; |
| 175 | int need_rand = 0; | 178 | int need_rand = 0; |
| 179 | int checkend=0,checkoffset=0; | ||
| 180 | unsigned long nmflag = 0; | ||
| 181 | char *engine=NULL; | ||
| 176 | 182 | ||
| 177 | reqfile=0; | 183 | reqfile=0; |
| 178 | 184 | ||
| @@ -181,6 +187,12 @@ int MAIN(int argc, char **argv) | |||
| 181 | if (bio_err == NULL) | 187 | if (bio_err == NULL) |
| 182 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 188 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
| 183 | STDout=BIO_new_fp(stdout,BIO_NOCLOSE); | 189 | STDout=BIO_new_fp(stdout,BIO_NOCLOSE); |
| 190 | #ifdef VMS | ||
| 191 | { | ||
| 192 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 193 | STDout = BIO_push(tmpbio, STDout); | ||
| 194 | } | ||
| 195 | #endif | ||
| 184 | 196 | ||
| 185 | informat=FORMAT_PEM; | 197 | informat=FORMAT_PEM; |
| 186 | outformat=FORMAT_PEM; | 198 | outformat=FORMAT_PEM; |
| @@ -289,24 +301,26 @@ int MAIN(int argc, char **argv) | |||
| 289 | else if (strcmp(*argv,"-addtrust") == 0) | 301 | else if (strcmp(*argv,"-addtrust") == 0) |
| 290 | { | 302 | { |
| 291 | if (--argc < 1) goto bad; | 303 | if (--argc < 1) goto bad; |
| 292 | if(!(objtmp = OBJ_txt2obj(*(++argv), 0))) { | 304 | if (!(objtmp = OBJ_txt2obj(*(++argv), 0))) |
| 305 | { | ||
| 293 | BIO_printf(bio_err, | 306 | BIO_printf(bio_err, |
| 294 | "Invalid trust object value %s\n", *argv); | 307 | "Invalid trust object value %s\n", *argv); |
| 295 | goto bad; | 308 | goto bad; |
| 296 | } | 309 | } |
| 297 | if(!trust) trust = sk_ASN1_OBJECT_new_null(); | 310 | if (!trust) trust = sk_ASN1_OBJECT_new_null(); |
| 298 | sk_ASN1_OBJECT_push(trust, objtmp); | 311 | sk_ASN1_OBJECT_push(trust, objtmp); |
| 299 | trustout = 1; | 312 | trustout = 1; |
| 300 | } | 313 | } |
| 301 | else if (strcmp(*argv,"-addreject") == 0) | 314 | else if (strcmp(*argv,"-addreject") == 0) |
| 302 | { | 315 | { |
| 303 | if (--argc < 1) goto bad; | 316 | if (--argc < 1) goto bad; |
| 304 | if(!(objtmp = OBJ_txt2obj(*(++argv), 0))) { | 317 | if (!(objtmp = OBJ_txt2obj(*(++argv), 0))) |
| 318 | { | ||
| 305 | BIO_printf(bio_err, | 319 | BIO_printf(bio_err, |
| 306 | "Invalid reject object value %s\n", *argv); | 320 | "Invalid reject object value %s\n", *argv); |
| 307 | goto bad; | 321 | goto bad; |
| 308 | } | 322 | } |
| 309 | if(!reject) reject = sk_ASN1_OBJECT_new_null(); | 323 | if (!reject) reject = sk_ASN1_OBJECT_new_null(); |
| 310 | sk_ASN1_OBJECT_push(reject, objtmp); | 324 | sk_ASN1_OBJECT_push(reject, objtmp); |
| 311 | trustout = 1; | 325 | trustout = 1; |
| 312 | } | 326 | } |
| @@ -316,14 +330,26 @@ int MAIN(int argc, char **argv) | |||
| 316 | alias= *(++argv); | 330 | alias= *(++argv); |
| 317 | trustout = 1; | 331 | trustout = 1; |
| 318 | } | 332 | } |
| 333 | else if (strcmp(*argv,"-nameopt") == 0) | ||
| 334 | { | ||
| 335 | if (--argc < 1) goto bad; | ||
| 336 | if (!set_name_ex(&nmflag, *(++argv))) goto bad; | ||
| 337 | } | ||
| 319 | else if (strcmp(*argv,"-setalias") == 0) | 338 | else if (strcmp(*argv,"-setalias") == 0) |
| 320 | { | 339 | { |
| 321 | if (--argc < 1) goto bad; | 340 | if (--argc < 1) goto bad; |
| 322 | alias= *(++argv); | 341 | alias= *(++argv); |
| 323 | trustout = 1; | 342 | trustout = 1; |
| 324 | } | 343 | } |
| 344 | else if (strcmp(*argv,"-engine") == 0) | ||
| 345 | { | ||
| 346 | if (--argc < 1) goto bad; | ||
| 347 | engine= *(++argv); | ||
| 348 | } | ||
| 325 | else if (strcmp(*argv,"-C") == 0) | 349 | else if (strcmp(*argv,"-C") == 0) |
| 326 | C= ++num; | 350 | C= ++num; |
| 351 | else if (strcmp(*argv,"-email") == 0) | ||
| 352 | email= ++num; | ||
| 327 | else if (strcmp(*argv,"-serial") == 0) | 353 | else if (strcmp(*argv,"-serial") == 0) |
| 328 | serial= ++num; | 354 | serial= ++num; |
| 329 | else if (strcmp(*argv,"-modulus") == 0) | 355 | else if (strcmp(*argv,"-modulus") == 0) |
| @@ -353,6 +379,12 @@ int MAIN(int argc, char **argv) | |||
| 353 | startdate= ++num; | 379 | startdate= ++num; |
| 354 | else if (strcmp(*argv,"-enddate") == 0) | 380 | else if (strcmp(*argv,"-enddate") == 0) |
| 355 | enddate= ++num; | 381 | enddate= ++num; |
| 382 | else if (strcmp(*argv,"-checkend") == 0) | ||
| 383 | { | ||
| 384 | if (--argc < 1) goto bad; | ||
| 385 | checkoffset=atoi(*(++argv)); | ||
| 386 | checkend=1; | ||
| 387 | } | ||
| 356 | else if (strcmp(*argv,"-noout") == 0) | 388 | else if (strcmp(*argv,"-noout") == 0) |
| 357 | noout= ++num; | 389 | noout= ++num; |
| 358 | else if (strcmp(*argv,"-trustout") == 0) | 390 | else if (strcmp(*argv,"-trustout") == 0) |
| @@ -397,15 +429,34 @@ bad: | |||
| 397 | goto end; | 429 | goto end; |
| 398 | } | 430 | } |
| 399 | 431 | ||
| 432 | if (engine != NULL) | ||
| 433 | { | ||
| 434 | if((e = ENGINE_by_id(engine)) == NULL) | ||
| 435 | { | ||
| 436 | BIO_printf(bio_err,"invalid engine \"%s\"\n", | ||
| 437 | engine); | ||
| 438 | goto end; | ||
| 439 | } | ||
| 440 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) | ||
| 441 | { | ||
| 442 | BIO_printf(bio_err,"can't use that engine\n"); | ||
| 443 | goto end; | ||
| 444 | } | ||
| 445 | BIO_printf(bio_err,"engine \"%s\" set.\n", engine); | ||
| 446 | /* Free our "structural" reference. */ | ||
| 447 | ENGINE_free(e); | ||
| 448 | } | ||
| 449 | |||
| 400 | if (need_rand) | 450 | if (need_rand) |
| 401 | app_RAND_load_file(NULL, bio_err, 0); | 451 | app_RAND_load_file(NULL, bio_err, 0); |
| 402 | 452 | ||
| 403 | ERR_load_crypto_strings(); | 453 | ERR_load_crypto_strings(); |
| 404 | 454 | ||
| 405 | if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { | 455 | if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) |
| 456 | { | ||
| 406 | BIO_printf(bio_err, "Error getting password\n"); | 457 | BIO_printf(bio_err, "Error getting password\n"); |
| 407 | goto end; | 458 | goto end; |
| 408 | } | 459 | } |
| 409 | 460 | ||
| 410 | if (!X509_STORE_set_default_paths(ctx)) | 461 | if (!X509_STORE_set_default_paths(ctx)) |
| 411 | { | 462 | { |
| @@ -421,10 +472,12 @@ bad: | |||
| 421 | goto end; | 472 | goto end; |
| 422 | } | 473 | } |
| 423 | 474 | ||
| 424 | if (extfile) { | 475 | if (extfile) |
| 476 | { | ||
| 425 | long errorline; | 477 | long errorline; |
| 426 | X509V3_CTX ctx2; | 478 | X509V3_CTX ctx2; |
| 427 | if (!(extconf=CONF_load(NULL,extfile,&errorline))) { | 479 | if (!(extconf=CONF_load(NULL,extfile,&errorline))) |
| 480 | { | ||
| 428 | if (errorline <= 0) | 481 | if (errorline <= 0) |
| 429 | BIO_printf(bio_err, | 482 | BIO_printf(bio_err, |
| 430 | "error loading the config file '%s'\n", | 483 | "error loading the config file '%s'\n", |
| @@ -434,19 +487,20 @@ bad: | |||
| 434 | "error on line %ld of config file '%s'\n" | 487 | "error on line %ld of config file '%s'\n" |
| 435 | ,errorline,extfile); | 488 | ,errorline,extfile); |
| 436 | goto end; | 489 | goto end; |
| 437 | } | 490 | } |
| 438 | if(!extsect && !(extsect = CONF_get_string(extconf, "default", | 491 | if (!extsect && !(extsect = CONF_get_string(extconf, "default", |
| 439 | "extensions"))) extsect = "default"; | 492 | "extensions"))) extsect = "default"; |
| 440 | X509V3_set_ctx_test(&ctx2); | 493 | X509V3_set_ctx_test(&ctx2); |
| 441 | X509V3_set_conf_lhash(&ctx2, extconf); | 494 | X509V3_set_conf_lhash(&ctx2, extconf); |
| 442 | if(!X509V3_EXT_add_conf(extconf, &ctx2, extsect, NULL)) { | 495 | if (!X509V3_EXT_add_conf(extconf, &ctx2, extsect, NULL)) |
| 496 | { | ||
| 443 | BIO_printf(bio_err, | 497 | BIO_printf(bio_err, |
| 444 | "Error Loading extension section %s\n", | 498 | "Error Loading extension section %s\n", |
| 445 | extsect); | 499 | extsect); |
| 446 | ERR_print_errors(bio_err); | 500 | ERR_print_errors(bio_err); |
| 447 | goto end; | 501 | goto end; |
| 448 | } | 502 | } |
| 449 | } | 503 | } |
| 450 | 504 | ||
| 451 | 505 | ||
| 452 | if (reqfile) | 506 | if (reqfile) |
| @@ -474,13 +528,18 @@ bad: | |||
| 474 | if (BIO_read_filename(in,infile) <= 0) | 528 | if (BIO_read_filename(in,infile) <= 0) |
| 475 | { | 529 | { |
| 476 | perror(infile); | 530 | perror(infile); |
| 531 | BIO_free(in); | ||
| 477 | goto end; | 532 | goto end; |
| 478 | } | 533 | } |
| 479 | } | 534 | } |
| 480 | req=PEM_read_bio_X509_REQ(in,NULL,NULL,NULL); | 535 | req=PEM_read_bio_X509_REQ(in,NULL,NULL,NULL); |
| 481 | BIO_free(in); | 536 | BIO_free(in); |
| 482 | 537 | ||
| 483 | if (req == NULL) { perror(infile); goto end; } | 538 | if (req == NULL) |
| 539 | { | ||
| 540 | ERR_print_errors(bio_err); | ||
| 541 | goto end; | ||
| 542 | } | ||
| 484 | 543 | ||
| 485 | if ( (req->req_info == NULL) || | 544 | if ( (req->req_info == NULL) || |
| 486 | (req->req_info->pubkey == NULL) || | 545 | (req->req_info->pubkey == NULL) || |
| @@ -511,9 +570,8 @@ bad: | |||
| 511 | } | 570 | } |
| 512 | else | 571 | else |
| 513 | BIO_printf(bio_err,"Signature ok\n"); | 572 | BIO_printf(bio_err,"Signature ok\n"); |
| 514 | 573 | ||
| 515 | X509_NAME_oneline(req->req_info->subject,buf,256); | 574 | print_name(bio_err, "subject=", X509_REQ_get_subject_name(req), nmflag); |
| 516 | BIO_printf(bio_err,"subject=%s\n",buf); | ||
| 517 | 575 | ||
| 518 | if ((x=X509_new()) == NULL) goto end; | 576 | if ((x=X509_new()) == NULL) goto end; |
| 519 | ci=x->cert_info; | 577 | ci=x->cert_info; |
| @@ -530,12 +588,12 @@ bad: | |||
| 530 | EVP_PKEY_free(pkey); | 588 | EVP_PKEY_free(pkey); |
| 531 | } | 589 | } |
| 532 | else | 590 | else |
| 533 | x=load_cert(infile,informat); | 591 | x=load_cert(bio_err,infile,informat); |
| 534 | 592 | ||
| 535 | if (x == NULL) goto end; | 593 | if (x == NULL) goto end; |
| 536 | if (CA_flag) | 594 | if (CA_flag) |
| 537 | { | 595 | { |
| 538 | xca=load_cert(CAfile,CAformat); | 596 | xca=load_cert(bio_err,CAfile,CAformat); |
| 539 | if (xca == NULL) goto end; | 597 | if (xca == NULL) goto end; |
| 540 | } | 598 | } |
| 541 | 599 | ||
| @@ -551,7 +609,15 @@ bad: | |||
| 551 | goto end; | 609 | goto end; |
| 552 | } | 610 | } |
| 553 | if (outfile == NULL) | 611 | if (outfile == NULL) |
| 612 | { | ||
| 554 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 613 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 614 | #ifdef VMS | ||
| 615 | { | ||
| 616 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | ||
| 617 | out = BIO_push(tmpbio, out); | ||
| 618 | } | ||
| 619 | #endif | ||
| 620 | } | ||
| 555 | else | 621 | else |
| 556 | { | 622 | { |
| 557 | if (BIO_write_filename(out,outfile) <= 0) | 623 | if (BIO_write_filename(out,outfile) <= 0) |
| @@ -562,24 +628,28 @@ bad: | |||
| 562 | } | 628 | } |
| 563 | } | 629 | } |
| 564 | 630 | ||
| 565 | if(alias) X509_alias_set1(x, (unsigned char *)alias, -1); | 631 | if (alias) X509_alias_set1(x, (unsigned char *)alias, -1); |
| 566 | 632 | ||
| 567 | if(clrtrust) X509_trust_clear(x); | 633 | if (clrtrust) X509_trust_clear(x); |
| 568 | if(clrreject) X509_reject_clear(x); | 634 | if (clrreject) X509_reject_clear(x); |
| 569 | 635 | ||
| 570 | if(trust) { | 636 | if (trust) |
| 571 | for(i = 0; i < sk_ASN1_OBJECT_num(trust); i++) { | 637 | { |
| 638 | for (i = 0; i < sk_ASN1_OBJECT_num(trust); i++) | ||
| 639 | { | ||
| 572 | objtmp = sk_ASN1_OBJECT_value(trust, i); | 640 | objtmp = sk_ASN1_OBJECT_value(trust, i); |
| 573 | X509_add1_trust_object(x, objtmp); | 641 | X509_add1_trust_object(x, objtmp); |
| 642 | } | ||
| 574 | } | 643 | } |
| 575 | } | ||
| 576 | 644 | ||
| 577 | if(reject) { | 645 | if (reject) |
| 578 | for(i = 0; i < sk_ASN1_OBJECT_num(reject); i++) { | 646 | { |
| 647 | for (i = 0; i < sk_ASN1_OBJECT_num(reject); i++) | ||
| 648 | { | ||
| 579 | objtmp = sk_ASN1_OBJECT_value(reject, i); | 649 | objtmp = sk_ASN1_OBJECT_value(reject, i); |
| 580 | X509_add1_reject_object(x, objtmp); | 650 | X509_add1_reject_object(x, objtmp); |
| 651 | } | ||
| 581 | } | 652 | } |
| 582 | } | ||
| 583 | 653 | ||
| 584 | if (num) | 654 | if (num) |
| 585 | { | 655 | { |
| @@ -587,15 +657,13 @@ bad: | |||
| 587 | { | 657 | { |
| 588 | if (issuer == i) | 658 | if (issuer == i) |
| 589 | { | 659 | { |
| 590 | X509_NAME_oneline(X509_get_issuer_name(x), | 660 | print_name(STDout, "issuer= ", |
| 591 | buf,256); | 661 | X509_get_issuer_name(x), nmflag); |
| 592 | BIO_printf(STDout,"issuer= %s\n",buf); | ||
| 593 | } | 662 | } |
| 594 | else if (subject == i) | 663 | else if (subject == i) |
| 595 | { | 664 | { |
| 596 | X509_NAME_oneline(X509_get_subject_name(x), | 665 | print_name(STDout, "subject= ", |
| 597 | buf,256); | 666 | X509_get_subject_name(x), nmflag); |
| 598 | BIO_printf(STDout,"subject=%s\n",buf); | ||
| 599 | } | 667 | } |
| 600 | else if (serial == i) | 668 | else if (serial == i) |
| 601 | { | 669 | { |
| @@ -603,11 +671,20 @@ bad: | |||
| 603 | i2a_ASN1_INTEGER(STDout,x->cert_info->serialNumber); | 671 | i2a_ASN1_INTEGER(STDout,x->cert_info->serialNumber); |
| 604 | BIO_printf(STDout,"\n"); | 672 | BIO_printf(STDout,"\n"); |
| 605 | } | 673 | } |
| 674 | else if (email == i) | ||
| 675 | { | ||
| 676 | int j; | ||
| 677 | STACK *emlst; | ||
| 678 | emlst = X509_get1_email(x); | ||
| 679 | for (j = 0; j < sk_num(emlst); j++) | ||
| 680 | BIO_printf(STDout, "%s\n", sk_value(emlst, j)); | ||
| 681 | X509_email_free(emlst); | ||
| 682 | } | ||
| 606 | else if (aliasout == i) | 683 | else if (aliasout == i) |
| 607 | { | 684 | { |
| 608 | unsigned char *alstr; | 685 | unsigned char *alstr; |
| 609 | alstr = X509_alias_get0(x, NULL); | 686 | alstr = X509_alias_get0(x, NULL); |
| 610 | if(alstr) BIO_printf(STDout,"%s\n", alstr); | 687 | if (alstr) BIO_printf(STDout,"%s\n", alstr); |
| 611 | else BIO_puts(STDout,"<No Alias>\n"); | 688 | else BIO_puts(STDout,"<No Alias>\n"); |
| 612 | } | 689 | } |
| 613 | else if (hash == i) | 690 | else if (hash == i) |
| @@ -619,7 +696,7 @@ bad: | |||
| 619 | X509_PURPOSE *ptmp; | 696 | X509_PURPOSE *ptmp; |
| 620 | int j; | 697 | int j; |
| 621 | BIO_printf(STDout, "Certificate purposes:\n"); | 698 | BIO_printf(STDout, "Certificate purposes:\n"); |
| 622 | for(j = 0; j < X509_PURPOSE_get_count(); j++) | 699 | for (j = 0; j < X509_PURPOSE_get_count(); j++) |
| 623 | { | 700 | { |
| 624 | ptmp = X509_PURPOSE_get0(j); | 701 | ptmp = X509_PURPOSE_get0(j); |
| 625 | purpose_print(STDout, x, ptmp); | 702 | purpose_print(STDout, x, ptmp); |
| @@ -682,7 +759,7 @@ bad: | |||
| 682 | BIO_printf(STDout,"/* issuer :%s */\n",buf); | 759 | BIO_printf(STDout,"/* issuer :%s */\n",buf); |
| 683 | 760 | ||
| 684 | z=i2d_X509(x,NULL); | 761 | z=i2d_X509(x,NULL); |
| 685 | m=Malloc(z); | 762 | m=OPENSSL_malloc(z); |
| 686 | 763 | ||
| 687 | d=(unsigned char *)m; | 764 | d=(unsigned char *)m; |
| 688 | z=i2d_X509_NAME(X509_get_subject_name(x),&d); | 765 | z=i2d_X509_NAME(X509_get_subject_name(x),&d); |
| @@ -720,7 +797,7 @@ bad: | |||
| 720 | if (y%16 != 0) BIO_printf(STDout,"\n"); | 797 | if (y%16 != 0) BIO_printf(STDout,"\n"); |
| 721 | BIO_printf(STDout,"};\n"); | 798 | BIO_printf(STDout,"};\n"); |
| 722 | 799 | ||
| 723 | Free(m); | 800 | OPENSSL_free(m); |
| 724 | } | 801 | } |
| 725 | else if (text == i) | 802 | else if (text == i) |
| 726 | { | 803 | { |
| @@ -765,7 +842,8 @@ bad: | |||
| 765 | BIO_printf(bio_err,"Getting Private key\n"); | 842 | BIO_printf(bio_err,"Getting Private key\n"); |
| 766 | if (Upkey == NULL) | 843 | if (Upkey == NULL) |
| 767 | { | 844 | { |
| 768 | Upkey=load_key(keyfile,keyformat, passin); | 845 | Upkey=load_key(bio_err, |
| 846 | keyfile,keyformat, passin); | ||
| 769 | if (Upkey == NULL) goto end; | 847 | if (Upkey == NULL) goto end; |
| 770 | } | 848 | } |
| 771 | #ifndef NO_DSA | 849 | #ifndef NO_DSA |
| @@ -782,7 +860,8 @@ bad: | |||
| 782 | BIO_printf(bio_err,"Getting CA Private Key\n"); | 860 | BIO_printf(bio_err,"Getting CA Private Key\n"); |
| 783 | if (CAkeyfile != NULL) | 861 | if (CAkeyfile != NULL) |
| 784 | { | 862 | { |
| 785 | CApkey=load_key(CAkeyfile,CAkeyformat, passin); | 863 | CApkey=load_key(bio_err, |
| 864 | CAkeyfile,CAkeyformat, passin); | ||
| 786 | if (CApkey == NULL) goto end; | 865 | if (CApkey == NULL) goto end; |
| 787 | } | 866 | } |
| 788 | #ifndef NO_DSA | 867 | #ifndef NO_DSA |
| @@ -808,7 +887,8 @@ bad: | |||
| 808 | } | 887 | } |
| 809 | else | 888 | else |
| 810 | { | 889 | { |
| 811 | pk=load_key(keyfile,FORMAT_PEM, passin); | 890 | pk=load_key(bio_err, |
| 891 | keyfile,FORMAT_PEM, passin); | ||
| 812 | if (pk == NULL) goto end; | 892 | if (pk == NULL) goto end; |
| 813 | } | 893 | } |
| 814 | 894 | ||
| @@ -834,6 +914,23 @@ bad: | |||
| 834 | } | 914 | } |
| 835 | } | 915 | } |
| 836 | 916 | ||
| 917 | if (checkend) | ||
| 918 | { | ||
| 919 | time_t tnow=time(NULL); | ||
| 920 | |||
| 921 | if (ASN1_UTCTIME_cmp_time_t(X509_get_notAfter(x), tnow+checkoffset) == -1) | ||
| 922 | { | ||
| 923 | BIO_printf(out,"Certificate will expire\n"); | ||
| 924 | ret=1; | ||
| 925 | } | ||
| 926 | else | ||
| 927 | { | ||
| 928 | BIO_printf(out,"Certificate will not expire\n"); | ||
| 929 | ret=0; | ||
| 930 | } | ||
| 931 | goto end; | ||
| 932 | } | ||
| 933 | |||
| 837 | if (noout) | 934 | if (noout) |
| 838 | { | 935 | { |
| 839 | ret=0; | 936 | ret=0; |
| @@ -842,16 +939,18 @@ bad: | |||
| 842 | 939 | ||
| 843 | if (outformat == FORMAT_ASN1) | 940 | if (outformat == FORMAT_ASN1) |
| 844 | i=i2d_X509_bio(out,x); | 941 | i=i2d_X509_bio(out,x); |
| 845 | else if (outformat == FORMAT_PEM) { | 942 | else if (outformat == FORMAT_PEM) |
| 846 | if(trustout) i=PEM_write_bio_X509_AUX(out,x); | 943 | { |
| 944 | if (trustout) i=PEM_write_bio_X509_AUX(out,x); | ||
| 847 | else i=PEM_write_bio_X509(out,x); | 945 | else i=PEM_write_bio_X509(out,x); |
| 848 | } else if (outformat == FORMAT_NETSCAPE) | 946 | } |
| 947 | else if (outformat == FORMAT_NETSCAPE) | ||
| 849 | { | 948 | { |
| 850 | ASN1_HEADER ah; | 949 | ASN1_HEADER ah; |
| 851 | ASN1_OCTET_STRING os; | 950 | ASN1_OCTET_STRING os; |
| 852 | 951 | ||
| 853 | os.data=(unsigned char *)CERT_HDR; | 952 | os.data=(unsigned char *)NETSCAPE_CERT_HDR; |
| 854 | os.length=strlen(CERT_HDR); | 953 | os.length=strlen(NETSCAPE_CERT_HDR); |
| 855 | ah.header= &os; | 954 | ah.header= &os; |
| 856 | ah.data=(char *)x; | 955 | ah.data=(char *)x; |
| 857 | ah.meth=X509_asn1_meth(); | 956 | ah.meth=X509_asn1_meth(); |
| @@ -863,7 +962,8 @@ bad: | |||
| 863 | BIO_printf(bio_err,"bad output format specified for outfile\n"); | 962 | BIO_printf(bio_err,"bad output format specified for outfile\n"); |
| 864 | goto end; | 963 | goto end; |
| 865 | } | 964 | } |
| 866 | if (!i) { | 965 | if (!i) |
| 966 | { | ||
| 867 | BIO_printf(bio_err,"unable to write certificate\n"); | 967 | BIO_printf(bio_err,"unable to write certificate\n"); |
| 868 | ERR_print_errors(bio_err); | 968 | ERR_print_errors(bio_err); |
| 869 | goto end; | 969 | goto end; |
| @@ -874,8 +974,8 @@ end: | |||
| 874 | app_RAND_write_file(NULL, bio_err); | 974 | app_RAND_write_file(NULL, bio_err); |
| 875 | OBJ_cleanup(); | 975 | OBJ_cleanup(); |
| 876 | CONF_free(extconf); | 976 | CONF_free(extconf); |
| 877 | BIO_free(out); | 977 | BIO_free_all(out); |
| 878 | BIO_free(STDout); | 978 | BIO_free_all(STDout); |
| 879 | X509_STORE_free(ctx); | 979 | X509_STORE_free(ctx); |
| 880 | X509_REQ_free(req); | 980 | X509_REQ_free(req); |
| 881 | X509_free(x); | 981 | X509_free(x); |
| @@ -885,7 +985,7 @@ end: | |||
| 885 | X509_REQ_free(rq); | 985 | X509_REQ_free(rq); |
| 886 | sk_ASN1_OBJECT_pop_free(trust, ASN1_OBJECT_free); | 986 | sk_ASN1_OBJECT_pop_free(trust, ASN1_OBJECT_free); |
| 887 | sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free); | 987 | sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free); |
| 888 | if(passin) Free(passin); | 988 | if (passin) OPENSSL_free(passin); |
| 889 | EXIT(ret); | 989 | EXIT(ret); |
| 890 | } | 990 | } |
| 891 | 991 | ||
| @@ -907,7 +1007,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest, | |||
| 907 | EVP_PKEY_free(upkey); | 1007 | EVP_PKEY_free(upkey); |
| 908 | 1008 | ||
| 909 | X509_STORE_CTX_init(&xsc,ctx,x,NULL); | 1009 | X509_STORE_CTX_init(&xsc,ctx,x,NULL); |
| 910 | buf=Malloc(EVP_PKEY_size(pkey)*2+ | 1010 | buf=OPENSSL_malloc(EVP_PKEY_size(pkey)*2+ |
| 911 | ((serialfile == NULL) | 1011 | ((serialfile == NULL) |
| 912 | ?(strlen(CAfile)+strlen(POSTFIX)+1) | 1012 | ?(strlen(CAfile)+strlen(POSTFIX)+1) |
| 913 | :(strlen(serialfile)))+1); | 1013 | :(strlen(serialfile)))+1); |
| @@ -1012,17 +1112,19 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest, | |||
| 1012 | if (X509_gmtime_adj(X509_get_notAfter(x),(long)60*60*24*days) == NULL) | 1112 | if (X509_gmtime_adj(X509_get_notAfter(x),(long)60*60*24*days) == NULL) |
| 1013 | goto end; | 1113 | goto end; |
| 1014 | 1114 | ||
| 1015 | if(clrext) { | 1115 | if (clrext) |
| 1016 | while(X509_get_ext_count(x) > 0) X509_delete_ext(x, 0); | 1116 | { |
| 1017 | } | 1117 | while (X509_get_ext_count(x) > 0) X509_delete_ext(x, 0); |
| 1118 | } | ||
| 1018 | 1119 | ||
| 1019 | if(conf) { | 1120 | if (conf) |
| 1121 | { | ||
| 1020 | X509V3_CTX ctx2; | 1122 | X509V3_CTX ctx2; |
| 1021 | X509_set_version(x,2); /* version 3 certificate */ | 1123 | X509_set_version(x,2); /* version 3 certificate */ |
| 1022 | X509V3_set_ctx(&ctx2, xca, x, NULL, NULL, 0); | 1124 | X509V3_set_ctx(&ctx2, xca, x, NULL, NULL, 0); |
| 1023 | X509V3_set_conf_lhash(&ctx2, conf); | 1125 | X509V3_set_conf_lhash(&ctx2, conf); |
| 1024 | if(!X509V3_EXT_add_conf(conf, &ctx2, section, x)) goto end; | 1126 | if (!X509V3_EXT_add_conf(conf, &ctx2, section, x)) goto end; |
| 1025 | } | 1127 | } |
| 1026 | 1128 | ||
| 1027 | if (!X509_sign(x,pkey,digest)) goto end; | 1129 | if (!X509_sign(x,pkey,digest)) goto end; |
| 1028 | ret=1; | 1130 | ret=1; |
| @@ -1030,16 +1132,15 @@ end: | |||
| 1030 | X509_STORE_CTX_cleanup(&xsc); | 1132 | X509_STORE_CTX_cleanup(&xsc); |
| 1031 | if (!ret) | 1133 | if (!ret) |
| 1032 | ERR_print_errors(bio_err); | 1134 | ERR_print_errors(bio_err); |
| 1033 | if (buf != NULL) Free(buf); | 1135 | if (buf != NULL) OPENSSL_free(buf); |
| 1034 | if (bs != NULL) ASN1_INTEGER_free(bs); | 1136 | if (bs != NULL) ASN1_INTEGER_free(bs); |
| 1035 | if (io != NULL) BIO_free(io); | 1137 | if (io != NULL) BIO_free(io); |
| 1036 | if (serial != NULL) BN_free(serial); | 1138 | if (serial != NULL) BN_free(serial); |
| 1037 | return(ret); | 1139 | return ret; |
| 1038 | } | 1140 | } |
| 1039 | 1141 | ||
| 1040 | static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx) | 1142 | static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx) |
| 1041 | { | 1143 | { |
| 1042 | char buf[256]; | ||
| 1043 | int err; | 1144 | int err; |
| 1044 | X509 *err_cert; | 1145 | X509 *err_cert; |
| 1045 | 1146 | ||
| @@ -1048,7 +1149,7 @@ static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx) | |||
| 1048 | * final ok == 1 calls to this function */ | 1149 | * final ok == 1 calls to this function */ |
| 1049 | err=X509_STORE_CTX_get_error(ctx); | 1150 | err=X509_STORE_CTX_get_error(ctx); |
| 1050 | if (err == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) | 1151 | if (err == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) |
| 1051 | return(1); | 1152 | return 1; |
| 1052 | 1153 | ||
| 1053 | /* BAD we should have gotten an error. Normally if everything | 1154 | /* BAD we should have gotten an error. Normally if everything |
| 1054 | * worked X509_STORE_CTX_get_error(ctx) will still be set to | 1155 | * worked X509_STORE_CTX_get_error(ctx) will still be set to |
| @@ -1056,145 +1157,17 @@ static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx) | |||
| 1056 | if (ok) | 1157 | if (ok) |
| 1057 | { | 1158 | { |
| 1058 | BIO_printf(bio_err,"error with certificate to be certified - should be self signed\n"); | 1159 | BIO_printf(bio_err,"error with certificate to be certified - should be self signed\n"); |
| 1059 | return(0); | 1160 | return 0; |
| 1060 | } | 1161 | } |
| 1061 | else | 1162 | else |
| 1062 | { | 1163 | { |
| 1063 | err_cert=X509_STORE_CTX_get_current_cert(ctx); | 1164 | err_cert=X509_STORE_CTX_get_current_cert(ctx); |
| 1064 | X509_NAME_oneline(X509_get_subject_name(err_cert),buf,256); | 1165 | print_name(bio_err, NULL, X509_get_subject_name(err_cert),0); |
| 1065 | BIO_printf(bio_err,"%s\n",buf); | ||
| 1066 | BIO_printf(bio_err,"error with certificate - error %d at depth %d\n%s\n", | 1166 | BIO_printf(bio_err,"error with certificate - error %d at depth %d\n%s\n", |
| 1067 | err,X509_STORE_CTX_get_error_depth(ctx), | 1167 | err,X509_STORE_CTX_get_error_depth(ctx), |
| 1068 | X509_verify_cert_error_string(err)); | 1168 | X509_verify_cert_error_string(err)); |
| 1069 | return(1); | 1169 | return 1; |
| 1070 | } | ||
| 1071 | } | ||
| 1072 | |||
| 1073 | static EVP_PKEY *load_key(char *file, int format, char *passin) | ||
| 1074 | { | ||
| 1075 | BIO *key=NULL; | ||
| 1076 | EVP_PKEY *pkey=NULL; | ||
| 1077 | |||
| 1078 | if (file == NULL) | ||
| 1079 | { | ||
| 1080 | BIO_printf(bio_err,"no keyfile specified\n"); | ||
| 1081 | goto end; | ||
| 1082 | } | ||
| 1083 | key=BIO_new(BIO_s_file()); | ||
| 1084 | if (key == NULL) | ||
| 1085 | { | ||
| 1086 | ERR_print_errors(bio_err); | ||
| 1087 | goto end; | ||
| 1088 | } | ||
| 1089 | if (BIO_read_filename(key,file) <= 0) | ||
| 1090 | { | ||
| 1091 | perror(file); | ||
| 1092 | goto end; | ||
| 1093 | } | ||
| 1094 | if (format == FORMAT_ASN1) | ||
| 1095 | { | ||
| 1096 | pkey=d2i_PrivateKey_bio(key, NULL); | ||
| 1097 | } | ||
| 1098 | else if (format == FORMAT_PEM) | ||
| 1099 | { | ||
| 1100 | pkey=PEM_read_bio_PrivateKey(key,NULL,NULL,passin); | ||
| 1101 | } | 1170 | } |
| 1102 | else | ||
| 1103 | { | ||
| 1104 | BIO_printf(bio_err,"bad input format specified for key\n"); | ||
| 1105 | goto end; | ||
| 1106 | } | ||
| 1107 | end: | ||
| 1108 | if (key != NULL) BIO_free(key); | ||
| 1109 | if (pkey == NULL) | ||
| 1110 | BIO_printf(bio_err,"unable to load Private Key\n"); | ||
| 1111 | return(pkey); | ||
| 1112 | } | ||
| 1113 | |||
| 1114 | static X509 *load_cert(char *file, int format) | ||
| 1115 | { | ||
| 1116 | ASN1_HEADER *ah=NULL; | ||
| 1117 | BUF_MEM *buf=NULL; | ||
| 1118 | X509 *x=NULL; | ||
| 1119 | BIO *cert; | ||
| 1120 | |||
| 1121 | if ((cert=BIO_new(BIO_s_file())) == NULL) | ||
| 1122 | { | ||
| 1123 | ERR_print_errors(bio_err); | ||
| 1124 | goto end; | ||
| 1125 | } | ||
| 1126 | |||
| 1127 | if (file == NULL) | ||
| 1128 | BIO_set_fp(cert,stdin,BIO_NOCLOSE); | ||
| 1129 | else | ||
| 1130 | { | ||
| 1131 | if (BIO_read_filename(cert,file) <= 0) | ||
| 1132 | { | ||
| 1133 | perror(file); | ||
| 1134 | goto end; | ||
| 1135 | } | ||
| 1136 | } | ||
| 1137 | if (format == FORMAT_ASN1) | ||
| 1138 | x=d2i_X509_bio(cert,NULL); | ||
| 1139 | else if (format == FORMAT_NETSCAPE) | ||
| 1140 | { | ||
| 1141 | unsigned char *p,*op; | ||
| 1142 | int size=0,i; | ||
| 1143 | |||
| 1144 | /* We sort of have to do it this way because it is sort of nice | ||
| 1145 | * to read the header first and check it, then | ||
| 1146 | * try to read the certificate */ | ||
| 1147 | buf=BUF_MEM_new(); | ||
| 1148 | for (;;) | ||
| 1149 | { | ||
| 1150 | if ((buf == NULL) || (!BUF_MEM_grow(buf,size+1024*10))) | ||
| 1151 | goto end; | ||
| 1152 | i=BIO_read(cert,&(buf->data[size]),1024*10); | ||
| 1153 | size+=i; | ||
| 1154 | if (i == 0) break; | ||
| 1155 | if (i < 0) | ||
| 1156 | { | ||
| 1157 | perror("reading certificate"); | ||
| 1158 | goto end; | ||
| 1159 | } | ||
| 1160 | } | ||
| 1161 | p=(unsigned char *)buf->data; | ||
| 1162 | op=p; | ||
| 1163 | |||
| 1164 | /* First load the header */ | ||
| 1165 | if ((ah=d2i_ASN1_HEADER(NULL,&p,(long)size)) == NULL) | ||
| 1166 | goto end; | ||
| 1167 | if ((ah->header == NULL) || (ah->header->data == NULL) || | ||
| 1168 | (strncmp(CERT_HDR,(char *)ah->header->data, | ||
| 1169 | ah->header->length) != 0)) | ||
| 1170 | { | ||
| 1171 | BIO_printf(bio_err,"Error reading header on certificate\n"); | ||
| 1172 | goto end; | ||
| 1173 | } | ||
| 1174 | /* header is ok, so now read the object */ | ||
| 1175 | p=op; | ||
| 1176 | ah->meth=X509_asn1_meth(); | ||
| 1177 | if ((ah=d2i_ASN1_HEADER(&ah,&p,(long)size)) == NULL) | ||
| 1178 | goto end; | ||
| 1179 | x=(X509 *)ah->data; | ||
| 1180 | ah->data=NULL; | ||
| 1181 | } | ||
| 1182 | else if (format == FORMAT_PEM) | ||
| 1183 | x=PEM_read_bio_X509_AUX(cert,NULL,NULL,NULL); | ||
| 1184 | else { | ||
| 1185 | BIO_printf(bio_err,"bad input format specified for input cert\n"); | ||
| 1186 | goto end; | ||
| 1187 | } | ||
| 1188 | end: | ||
| 1189 | if (x == NULL) | ||
| 1190 | { | ||
| 1191 | BIO_printf(bio_err,"unable to load certificate\n"); | ||
| 1192 | ERR_print_errors(bio_err); | ||
| 1193 | } | ||
| 1194 | if (ah != NULL) ASN1_HEADER_free(ah); | ||
| 1195 | if (cert != NULL) BIO_free(cert); | ||
| 1196 | if (buf != NULL) BUF_MEM_free(buf); | ||
| 1197 | return(x); | ||
| 1198 | } | 1171 | } |
| 1199 | 1172 | ||
| 1200 | /* self sign */ | 1173 | /* self sign */ |
| @@ -1220,21 +1193,23 @@ static int sign(X509 *x, EVP_PKEY *pkey, int days, int clrext, const EVP_MD *dig | |||
| 1220 | goto err; | 1193 | goto err; |
| 1221 | 1194 | ||
| 1222 | if (!X509_set_pubkey(x,pkey)) goto err; | 1195 | if (!X509_set_pubkey(x,pkey)) goto err; |
| 1223 | if(clrext) { | 1196 | if (clrext) |
| 1224 | while(X509_get_ext_count(x) > 0) X509_delete_ext(x, 0); | 1197 | { |
| 1225 | } | 1198 | while (X509_get_ext_count(x) > 0) X509_delete_ext(x, 0); |
| 1226 | if(conf) { | 1199 | } |
| 1200 | if (conf) | ||
| 1201 | { | ||
| 1227 | X509V3_CTX ctx; | 1202 | X509V3_CTX ctx; |
| 1228 | X509_set_version(x,2); /* version 3 certificate */ | 1203 | X509_set_version(x,2); /* version 3 certificate */ |
| 1229 | X509V3_set_ctx(&ctx, x, x, NULL, NULL, 0); | 1204 | X509V3_set_ctx(&ctx, x, x, NULL, NULL, 0); |
| 1230 | X509V3_set_conf_lhash(&ctx, conf); | 1205 | X509V3_set_conf_lhash(&ctx, conf); |
| 1231 | if(!X509V3_EXT_add_conf(conf, &ctx, section, x)) goto err; | 1206 | if (!X509V3_EXT_add_conf(conf, &ctx, section, x)) goto err; |
| 1232 | } | 1207 | } |
| 1233 | if (!X509_sign(x,pkey,digest)) goto err; | 1208 | if (!X509_sign(x,pkey,digest)) goto err; |
| 1234 | return(1); | 1209 | return 1; |
| 1235 | err: | 1210 | err: |
| 1236 | ERR_print_errors(bio_err); | 1211 | ERR_print_errors(bio_err); |
| 1237 | return(0); | 1212 | return 0; |
| 1238 | } | 1213 | } |
| 1239 | 1214 | ||
| 1240 | static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt) | 1215 | static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt) |
| @@ -1243,13 +1218,14 @@ static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt) | |||
| 1243 | char *pname; | 1218 | char *pname; |
| 1244 | id = X509_PURPOSE_get_id(pt); | 1219 | id = X509_PURPOSE_get_id(pt); |
| 1245 | pname = X509_PURPOSE_get0_name(pt); | 1220 | pname = X509_PURPOSE_get0_name(pt); |
| 1246 | for(i = 0; i < 2; i++) { | 1221 | for (i = 0; i < 2; i++) |
| 1222 | { | ||
| 1247 | idret = X509_check_purpose(cert, id, i); | 1223 | idret = X509_check_purpose(cert, id, i); |
| 1248 | BIO_printf(bio, "%s%s : ", pname, i ? " CA" : ""); | 1224 | BIO_printf(bio, "%s%s : ", pname, i ? " CA" : ""); |
| 1249 | if(idret == 1) BIO_printf(bio, "Yes\n"); | 1225 | if (idret == 1) BIO_printf(bio, "Yes\n"); |
| 1250 | else if (idret == 0) BIO_printf(bio, "No\n"); | 1226 | else if (idret == 0) BIO_printf(bio, "No\n"); |
| 1251 | else BIO_printf(bio, "Yes (WARNING code=%d)\n", idret); | 1227 | else BIO_printf(bio, "Yes (WARNING code=%d)\n", idret); |
| 1252 | } | 1228 | } |
| 1253 | return 1; | 1229 | return 1; |
| 1254 | } | 1230 | } |
| 1255 | 1231 | ||
diff --git a/src/lib/libssl/src/config b/src/lib/libssl/src/config index 53b219a1f9..458838d800 100644 --- a/src/lib/libssl/src/config +++ b/src/lib/libssl/src/config | |||
| @@ -71,6 +71,10 @@ fi | |||
| 71 | # Now we simply scan though... In most cases, the SYSTEM info is enough | 71 | # Now we simply scan though... In most cases, the SYSTEM info is enough |
| 72 | # | 72 | # |
| 73 | case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in | 73 | case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in |
| 74 | MPE/iX:*) | ||
| 75 | MACHINE=`echo "$MACHINE" | sed -e 's/-/_/g'` | ||
| 76 | echo "parisc-hp-MPE/iX"; exit 0 | ||
| 77 | ;; | ||
| 74 | A/UX:*) | 78 | A/UX:*) |
| 75 | echo "m68k-apple-aux3"; exit 0 | 79 | echo "m68k-apple-aux3"; exit 0 |
| 76 | ;; | 80 | ;; |
| @@ -164,7 +168,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in | |||
| 164 | ;; | 168 | ;; |
| 165 | 169 | ||
| 166 | NetBSD:*:*:*386*) | 170 | NetBSD:*:*:*386*) |
| 167 | echo "`sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whateve\r-netbsd"; exit 0 | 171 | echo "`/usr/sbin/sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0 |
| 168 | ;; | 172 | ;; |
| 169 | 173 | ||
| 170 | NetBSD:*) | 174 | NetBSD:*) |
| @@ -181,11 +185,11 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in | |||
| 181 | 185 | ||
| 182 | QNX:*) | 186 | QNX:*) |
| 183 | case "$VERSION" in | 187 | case "$VERSION" in |
| 184 | 423) | 188 | 4*) |
| 185 | echo "${MACHINE}-qssl-qnx32" | 189 | echo "${MACHINE}-whatever-qnx4" |
| 186 | ;; | 190 | ;; |
| 187 | *) | 191 | *) |
| 188 | echo "${MACHINE}-qssl-qnx" | 192 | echo "${MACHINE}-whatever-qnx" |
| 189 | ;; | 193 | ;; |
| 190 | esac | 194 | esac |
| 191 | exit 0 | 195 | exit 0 |
| @@ -200,7 +204,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in | |||
| 200 | ;; | 204 | ;; |
| 201 | 205 | ||
| 202 | SunOS:5.*) | 206 | SunOS:5.*) |
| 203 | echo "${MACHINE}-sun-solaris2"; exit 0 | 207 | echo "${MACHINE}-whatever-solaris2"; exit 0 |
| 204 | ;; | 208 | ;; |
| 205 | 209 | ||
| 206 | SunOS:*) | 210 | SunOS:*) |
| @@ -247,6 +251,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in | |||
| 247 | echo "${MACHINE}-v11-${SYSTEM}"; exit 0; | 251 | echo "${MACHINE}-v11-${SYSTEM}"; exit 0; |
| 248 | ;; | 252 | ;; |
| 249 | 253 | ||
| 254 | NEWS-OS:4.*) | ||
| 255 | echo "mips-sony-newsos4"; exit 0; | ||
| 256 | ;; | ||
| 257 | |||
| 250 | esac | 258 | esac |
| 251 | 259 | ||
| 252 | # | 260 | # |
| @@ -407,6 +415,7 @@ case "$GUESSOS" in | |||
| 407 | ;; | 415 | ;; |
| 408 | mips-*-linux?) OUT="linux-mips" ;; | 416 | mips-*-linux?) OUT="linux-mips" ;; |
| 409 | ppc-*-linux2) OUT="linux-ppc" ;; | 417 | ppc-*-linux2) OUT="linux-ppc" ;; |
| 418 | m68k-*-linux*) OUT="linux-m68k" ;; | ||
| 410 | ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; | 419 | ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; |
| 411 | sparc64-*-linux2) | 420 | sparc64-*-linux2) |
| 412 | #Before we can uncomment following lines we have to wait at least | 421 | #Before we can uncomment following lines we have to wait at least |
| @@ -424,9 +433,10 @@ case "$GUESSOS" in | |||
| 424 | sun4d) OUT="linux-sparcv8" ;; | 433 | sun4d) OUT="linux-sparcv8" ;; |
| 425 | *) OUT="linux-sparcv7" ;; | 434 | *) OUT="linux-sparcv7" ;; |
| 426 | esac ;; | 435 | esac ;; |
| 436 | arm*-*-linux2) OUT="linux-elf-arm" ;; | ||
| 427 | *-*-linux2) OUT="linux-elf" ;; | 437 | *-*-linux2) OUT="linux-elf" ;; |
| 428 | *-*-linux1) OUT="linux-aout" ;; | 438 | *-*-linux1) OUT="linux-aout" ;; |
| 429 | sun4u*-sun-solaris2) | 439 | sun4u*-*-solaris2) |
| 430 | ISA64=`(isalist) 2>/dev/null | grep sparcv9` | 440 | ISA64=`(isalist) 2>/dev/null | grep sparcv9` |
| 431 | if [ "$ISA64" != "" -a "$CC" = "cc" -a $CCVER -ge 50 ]; then | 441 | if [ "$ISA64" != "" -a "$CC" = "cc" -a $CCVER -ge 50 ]; then |
| 432 | echo "WARNING! If you wish to build 64-bit library, then you have to" | 442 | echo "WARNING! If you wish to build 64-bit library, then you have to" |
| @@ -435,10 +445,10 @@ case "$GUESSOS" in | |||
| 435 | read waste < /dev/tty | 445 | read waste < /dev/tty |
| 436 | fi | 446 | fi |
| 437 | OUT="solaris-sparcv9-$CC" ;; | 447 | OUT="solaris-sparcv9-$CC" ;; |
| 438 | sun4m-sun-solaris2) OUT="solaris-sparcv8-$CC" ;; | 448 | sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;; |
| 439 | sun4d-sun-solaris2) OUT="solaris-sparcv8-$CC" ;; | 449 | sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;; |
| 440 | sun4*-sun-solaris2) OUT="solaris-sparcv7-$CC" ;; | 450 | sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; |
| 441 | *86*-sun-solaris2) OUT="solaris-x86-$CC" ;; | 451 | *86*-*-solaris2) OUT="solaris-x86-$CC" ;; |
| 442 | *-*-sunos4) OUT="sunos-$CC" ;; | 452 | *-*-sunos4) OUT="sunos-$CC" ;; |
| 443 | alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;; | 453 | alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;; |
| 444 | *-freebsd[3-9]*) OUT="FreeBSD-elf" ;; | 454 | *-freebsd[3-9]*) OUT="FreeBSD-elf" ;; |
| @@ -468,14 +478,21 @@ case "$GUESSOS" in | |||
| 468 | # these are all covered by the catchall below | 478 | # these are all covered by the catchall below |
| 469 | # *-aix) OUT="aix-$CC" ;; | 479 | # *-aix) OUT="aix-$CC" ;; |
| 470 | # *-dgux) OUT="dgux" ;; | 480 | # *-dgux) OUT="dgux" ;; |
| 481 | mips-sony-newsos4) OUT="newsos4-gcc" ;; | ||
| 471 | *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;; | 482 | *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;; |
| 472 | esac | 483 | esac |
| 473 | 484 | ||
| 485 | # NB: This atalla support has been superceded by the ENGINE support | ||
| 486 | # That contains its own header and definitions anyway. Support can | ||
| 487 | # be enabled or disabled on any supported platform without external | ||
| 488 | # headers, eg. by adding the "hw-atalla" switch to ./config or | ||
| 489 | # perl Configure | ||
| 490 | # | ||
| 474 | # See whether we can compile Atalla support | 491 | # See whether we can compile Atalla support |
| 475 | if [ -f /usr/include/atasi.h ] | 492 | #if [ -f /usr/include/atasi.h ] |
| 476 | then | 493 | #then |
| 477 | options="$options -DATALLA" | 494 | # options="$options -DATALLA" |
| 478 | fi | 495 | #fi |
| 479 | 496 | ||
| 480 | # gcc < 2.8 does not support -mcpu=ultrasparc | 497 | # gcc < 2.8 does not support -mcpu=ultrasparc |
| 481 | if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] | 498 | if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] |
| @@ -491,17 +508,6 @@ then | |||
| 491 | sleep 5 | 508 | sleep 5 |
| 492 | OUT=linux-sparcv8 | 509 | OUT=linux-sparcv8 |
| 493 | fi | 510 | fi |
| 494 | # To start with $OUT is never i86pc-sun-solaris2. Secondly why | ||
| 495 | # ban *all* assembler implementation if it can't stand only one, | ||
| 496 | # SHA-0 implementation. | ||
| 497 | #if [ "$OUT" = "i86pc-sun-solaris2" ] | ||
| 498 | #then | ||
| 499 | # ASM=`as -V /dev/null 2>&1` | ||
| 500 | # case "$ASM" in | ||
| 501 | # GNU*) ;; | ||
| 502 | # *) options="$options no-asm" ; echo "WARNING: You need the GNU assembler to use OpenSSL assembler code." ; echo "Sun as is not supported on Solaris x86." ;; | ||
| 503 | # esac | ||
| 504 | #fi | ||
| 505 | 511 | ||
| 506 | case "$GUESSOS" in | 512 | case "$GUESSOS" in |
| 507 | i386-*) options="$options 386" ;; | 513 | i386-*) options="$options 386" ;; |
| @@ -557,7 +563,7 @@ OUT="$PREFIX$OUT" | |||
| 557 | 563 | ||
| 558 | $PERL ./Configure LIST | grep "$OUT" > /dev/null | 564 | $PERL ./Configure LIST | grep "$OUT" > /dev/null |
| 559 | if [ $? = "0" ]; then | 565 | if [ $? = "0" ]; then |
| 560 | echo Configuring for $OUT | 566 | #echo Configuring for $OUT |
| 561 | 567 | ||
| 562 | if [ "$TEST" = "true" ]; then | 568 | if [ "$TEST" = "true" ]; then |
| 563 | echo $PERL ./Configure $OUT $options | 569 | echo $PERL ./Configure $OUT $options |
diff --git a/src/lib/libssl/src/crypto/Makefile b/src/lib/libssl/src/crypto/Makefile index b980f54dba..3c4cf3ea9a 100644 --- a/src/lib/libssl/src/crypto/Makefile +++ b/src/lib/libssl/src/crypto/Makefile | |||
| @@ -27,7 +27,7 @@ LIBS= | |||
| 27 | 27 | ||
| 28 | SDIRS= md2 md5 sha mdc2 hmac ripemd \ | 28 | SDIRS= md2 md5 sha mdc2 hmac ripemd \ |
| 29 | des rc2 rc4 rc5 idea bf cast \ | 29 | des rc2 rc4 rc5 idea bf cast \ |
| 30 | bn rsa dsa dh \ | 30 | bn rsa dsa dh dso engine \ |
| 31 | buffer bio stack lhash rand err objects \ | 31 | buffer bio stack lhash rand err objects \ |
| 32 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp | 32 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp |
| 33 | 33 | ||
| @@ -39,7 +39,7 @@ LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdi | |||
| 39 | 39 | ||
| 40 | SRC= $(LIBSRC) | 40 | SRC= $(LIBSRC) |
| 41 | 41 | ||
| 42 | EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h | 42 | EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h |
| 43 | HEADER= cryptlib.h buildinf.h md32_common.h $(EXHEADER) | 43 | HEADER= cryptlib.h buildinf.h md32_common.h $(EXHEADER) |
| 44 | 44 | ||
| 45 | ALL= $(GENERAL) $(SRC) $(HEADER) | 45 | ALL= $(GENERAL) $(SRC) $(HEADER) |
| @@ -155,41 +155,45 @@ dclean: | |||
| 155 | 155 | ||
| 156 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 156 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 157 | 157 | ||
| 158 | cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h | 158 | cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h |
| 159 | cpt_err.o: ../include/openssl/err.h ../include/openssl/lhash.h | ||
| 159 | cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h | 160 | cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 160 | cpt_err.o: ../include/openssl/stack.h | 161 | cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 161 | cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 162 | cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 162 | cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 163 | cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 163 | cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 164 | cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 164 | cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 165 | cryptlib.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 165 | cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h | 166 | cryptlib.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 166 | cryptlib.o: cryptlib.h | 167 | cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h |
| 167 | cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 168 | cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 168 | cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 169 | cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 169 | cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 170 | cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 170 | cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 171 | cversion.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 171 | cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h | 172 | cversion.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 172 | cversion.o: buildinf.h cryptlib.h | 173 | cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h |
| 174 | cversion.o: cryptlib.h | ||
| 173 | ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 175 | ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 174 | ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 176 | ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 175 | ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 177 | ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 176 | ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | 178 | ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 177 | ex_data.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h | 179 | ex_data.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 178 | ex_data.o: ../include/openssl/stack.h cryptlib.h | 180 | ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h |
| 179 | mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 181 | mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 180 | mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 182 | mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 181 | mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 183 | mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 182 | mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 184 | mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 183 | mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h cryptlib.h | 185 | mem.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 186 | mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h | ||
| 184 | mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 187 | mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 185 | mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 188 | mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 186 | mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 189 | mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 187 | mem_dbg.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | 190 | mem_dbg.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 188 | mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h | 191 | mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 189 | mem_dbg.o: ../include/openssl/stack.h cryptlib.h | 192 | mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h |
| 190 | tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 193 | tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 191 | tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 194 | tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 192 | tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 195 | tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 193 | tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 196 | tmdiff.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 194 | tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h | 197 | tmdiff.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 198 | tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 195 | tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h | 199 | tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/Makefile.ssl b/src/lib/libssl/src/crypto/Makefile.ssl index f9b33586be..05e3bb701e 100644 --- a/src/lib/libssl/src/crypto/Makefile.ssl +++ b/src/lib/libssl/src/crypto/Makefile.ssl | |||
| @@ -27,7 +27,7 @@ LIBS= | |||
| 27 | 27 | ||
| 28 | SDIRS= md2 md5 sha mdc2 hmac ripemd \ | 28 | SDIRS= md2 md5 sha mdc2 hmac ripemd \ |
| 29 | des rc2 rc4 rc5 idea bf cast \ | 29 | des rc2 rc4 rc5 idea bf cast \ |
| 30 | bn rsa dsa dh \ | 30 | bn rsa dsa dh dso engine \ |
| 31 | buffer bio stack lhash rand err objects \ | 31 | buffer bio stack lhash rand err objects \ |
| 32 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp | 32 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp |
| 33 | 33 | ||
| @@ -39,7 +39,7 @@ LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdi | |||
| 39 | 39 | ||
| 40 | SRC= $(LIBSRC) | 40 | SRC= $(LIBSRC) |
| 41 | 41 | ||
| 42 | EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h | 42 | EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h |
| 43 | HEADER= cryptlib.h buildinf.h md32_common.h $(EXHEADER) | 43 | HEADER= cryptlib.h buildinf.h md32_common.h $(EXHEADER) |
| 44 | 44 | ||
| 45 | ALL= $(GENERAL) $(SRC) $(HEADER) | 45 | ALL= $(GENERAL) $(SRC) $(HEADER) |
| @@ -155,41 +155,45 @@ dclean: | |||
| 155 | 155 | ||
| 156 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 156 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 157 | 157 | ||
| 158 | cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h | 158 | cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h |
| 159 | cpt_err.o: ../include/openssl/err.h ../include/openssl/lhash.h | ||
| 159 | cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h | 160 | cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 160 | cpt_err.o: ../include/openssl/stack.h | 161 | cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 161 | cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 162 | cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 162 | cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 163 | cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 163 | cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 164 | cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 164 | cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 165 | cryptlib.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 165 | cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h | 166 | cryptlib.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 166 | cryptlib.o: cryptlib.h | 167 | cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h |
| 167 | cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 168 | cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 168 | cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 169 | cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 169 | cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 170 | cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 170 | cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 171 | cversion.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 171 | cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h | 172 | cversion.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 172 | cversion.o: buildinf.h cryptlib.h | 173 | cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h |
| 174 | cversion.o: cryptlib.h | ||
| 173 | ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 175 | ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 174 | ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 176 | ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 175 | ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 177 | ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 176 | ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | 178 | ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 177 | ex_data.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h | 179 | ex_data.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 178 | ex_data.o: ../include/openssl/stack.h cryptlib.h | 180 | ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h |
| 179 | mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 181 | mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 180 | mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 182 | mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 181 | mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 183 | mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 182 | mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 184 | mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 183 | mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h cryptlib.h | 185 | mem.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 186 | mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h | ||
| 184 | mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 187 | mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 185 | mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 188 | mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 186 | mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 189 | mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 187 | mem_dbg.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | 190 | mem_dbg.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 188 | mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h | 191 | mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 189 | mem_dbg.o: ../include/openssl/stack.h cryptlib.h | 192 | mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h |
| 190 | tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h | 193 | tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h |
| 191 | tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | 194 | tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 192 | tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 195 | tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 193 | tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 196 | tmdiff.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 194 | tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h | 197 | tmdiff.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h |
| 198 | tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 195 | tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h | 199 | tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/asn1/Makefile.ssl b/src/lib/libssl/src/crypto/asn1/Makefile.ssl index a17a713a75..b8059ddffe 100644 --- a/src/lib/libssl/src/crypto/asn1/Makefile.ssl +++ b/src/lib/libssl/src/crypto/asn1/Makefile.ssl | |||
| @@ -24,7 +24,7 @@ APPS= | |||
| 24 | LIB=$(TOP)/libcrypto.a | 24 | LIB=$(TOP)/libcrypto.a |
| 25 | LIBSRC= a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.c a_int.c a_octet.c \ | 25 | LIBSRC= a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.c a_int.c a_octet.c \ |
| 26 | a_null.c a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c a_bmp.c \ | 26 | a_null.c a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c a_bmp.c \ |
| 27 | a_enum.c a_vis.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c \ | 27 | a_enum.c a_vis.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c a_strex.c \ |
| 28 | x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c \ | 28 | x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c \ |
| 29 | x_name.c x_cinf.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c \ | 29 | x_name.c x_cinf.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c \ |
| 30 | d2i_r_pr.c i2d_r_pr.c d2i_r_pu.c i2d_r_pu.c \ | 30 | d2i_r_pr.c i2d_r_pr.c d2i_r_pu.c i2d_r_pu.c \ |
| @@ -39,7 +39,7 @@ LIBSRC= a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.c a_int.c a_octet.c \ | |||
| 39 | evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c | 39 | evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c |
| 40 | LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_gentm.o a_time.o a_int.o a_octet.o \ | 40 | LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_gentm.o a_time.o a_int.o a_octet.o \ |
| 41 | a_null.o a_print.o a_type.o a_set.o a_dup.o a_d2i_fp.o a_i2d_fp.o a_bmp.o \ | 41 | a_null.o a_print.o a_type.o a_set.o a_dup.o a_d2i_fp.o a_i2d_fp.o a_bmp.o \ |
| 42 | a_enum.o a_vis.o a_utf8.o a_sign.o a_digest.o a_verify.o a_mbstr.o \ | 42 | a_enum.o a_vis.o a_utf8.o a_sign.o a_digest.o a_verify.o a_mbstr.o a_strex.o \ |
| 43 | x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o \ | 43 | x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o \ |
| 44 | x_name.o x_cinf.o x_x509.o x_x509a.o x_crl.o x_info.o x_spki.o nsseq.o \ | 44 | x_name.o x_cinf.o x_x509.o x_x509a.o x_crl.o x_info.o x_spki.o nsseq.o \ |
| 45 | d2i_r_pr.o i2d_r_pr.o d2i_r_pu.o i2d_r_pu.o \ | 45 | d2i_r_pr.o i2d_r_pr.o d2i_r_pu.o i2d_r_pu.o \ |
| @@ -119,37 +119,43 @@ a_bitstr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | |||
| 119 | a_bitstr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 119 | a_bitstr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 120 | a_bitstr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 120 | a_bitstr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 121 | a_bitstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 121 | a_bitstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 122 | a_bitstr.o: ../../include/openssl/opensslconf.h | 122 | a_bitstr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 123 | a_bitstr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 123 | a_bitstr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 124 | a_bitstr.o: ../../include/openssl/stack.h ../cryptlib.h | 124 | a_bitstr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 125 | a_bitstr.o: ../cryptlib.h | ||
| 125 | a_bmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 126 | a_bmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 126 | a_bmp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 127 | a_bmp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 127 | a_bmp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 128 | a_bmp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 128 | a_bmp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 129 | a_bmp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 129 | a_bmp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 130 | a_bmp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 130 | a_bmp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 131 | a_bmp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 132 | a_bmp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 131 | a_bmp.o: ../cryptlib.h | 133 | a_bmp.o: ../cryptlib.h |
| 132 | a_bool.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 134 | a_bool.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 133 | a_bool.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 135 | a_bool.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 134 | a_bool.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 136 | a_bool.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 135 | a_bool.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 137 | a_bool.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 136 | a_bool.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 138 | a_bool.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 137 | a_bool.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 139 | a_bool.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 140 | a_bool.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 138 | a_bool.o: ../cryptlib.h | 141 | a_bool.o: ../cryptlib.h |
| 139 | a_bytes.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 142 | a_bytes.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 140 | a_bytes.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 143 | a_bytes.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 141 | a_bytes.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 144 | a_bytes.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 142 | a_bytes.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 145 | a_bytes.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 143 | a_bytes.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 146 | a_bytes.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 144 | a_bytes.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 147 | a_bytes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 145 | a_bytes.o: ../../include/openssl/stack.h ../cryptlib.h | 148 | a_bytes.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 149 | a_bytes.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 146 | a_d2i_fp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 150 | a_d2i_fp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 147 | a_d2i_fp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 151 | a_d2i_fp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 148 | a_d2i_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 152 | a_d2i_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 149 | a_d2i_fp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 153 | a_d2i_fp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 150 | a_d2i_fp.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 154 | a_d2i_fp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 155 | a_d2i_fp.o: ../../include/openssl/opensslconf.h | ||
| 151 | a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 156 | a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 152 | a_d2i_fp.o: ../../include/openssl/stack.h ../cryptlib.h | 157 | a_d2i_fp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 158 | a_d2i_fp.o: ../cryptlib.h | ||
| 153 | a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 159 | a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 154 | a_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 160 | a_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 155 | a_digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 161 | a_digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -157,107 +163,124 @@ a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 157 | a_digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 163 | a_digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 158 | a_digest.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 164 | a_digest.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 159 | a_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 165 | a_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 160 | a_digest.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 166 | a_digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 167 | a_digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 161 | a_digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 168 | a_digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 162 | a_digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 169 | a_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 170 | a_digest.o: ../../include/openssl/opensslconf.h | ||
| 163 | a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 171 | a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 164 | a_digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 172 | a_digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 165 | a_digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 173 | a_digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 166 | a_digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 174 | a_digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 167 | a_digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 175 | a_digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 168 | a_digest.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 176 | a_digest.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 169 | a_digest.o: ../cryptlib.h | 177 | a_digest.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 170 | a_dup.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 178 | a_dup.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 171 | a_dup.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 179 | a_dup.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 172 | a_dup.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 180 | a_dup.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 173 | a_dup.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 181 | a_dup.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 174 | a_dup.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 182 | a_dup.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 175 | a_dup.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 183 | a_dup.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 176 | a_dup.o: ../../include/openssl/stack.h ../cryptlib.h | 184 | a_dup.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 185 | a_dup.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 177 | a_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 186 | a_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 178 | a_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 187 | a_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 179 | a_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 188 | a_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 180 | a_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 189 | a_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 181 | a_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 190 | a_enum.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 182 | a_enum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 191 | a_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 192 | a_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 183 | a_enum.o: ../cryptlib.h | 193 | a_enum.o: ../cryptlib.h |
| 184 | a_gentm.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 194 | a_gentm.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 185 | a_gentm.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 195 | a_gentm.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 186 | a_gentm.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 196 | a_gentm.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 187 | a_gentm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 197 | a_gentm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 188 | a_gentm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 198 | a_gentm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 189 | a_gentm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 199 | a_gentm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 200 | a_gentm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 190 | a_gentm.o: ../cryptlib.h | 201 | a_gentm.o: ../cryptlib.h |
| 191 | a_hdr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 202 | a_hdr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 192 | a_hdr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 203 | a_hdr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 193 | a_hdr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 204 | a_hdr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 194 | a_hdr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 205 | a_hdr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 195 | a_hdr.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 206 | a_hdr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 196 | a_hdr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 207 | a_hdr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 197 | a_hdr.o: ../../include/openssl/stack.h ../cryptlib.h | 208 | a_hdr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 209 | a_hdr.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 198 | a_i2d_fp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 210 | a_i2d_fp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 199 | a_i2d_fp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 211 | a_i2d_fp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 200 | a_i2d_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 212 | a_i2d_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 201 | a_i2d_fp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 213 | a_i2d_fp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 202 | a_i2d_fp.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 214 | a_i2d_fp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 215 | a_i2d_fp.o: ../../include/openssl/opensslconf.h | ||
| 203 | a_i2d_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 216 | a_i2d_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 204 | a_i2d_fp.o: ../../include/openssl/stack.h ../cryptlib.h | 217 | a_i2d_fp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 218 | a_i2d_fp.o: ../cryptlib.h | ||
| 205 | a_int.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 219 | a_int.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 206 | a_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 220 | a_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 207 | a_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 221 | a_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 208 | a_int.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 222 | a_int.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 209 | a_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 223 | a_int.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 210 | a_int.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 224 | a_int.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 225 | a_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 211 | a_int.o: ../cryptlib.h | 226 | a_int.o: ../cryptlib.h |
| 212 | a_mbstr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 227 | a_mbstr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 213 | a_mbstr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 228 | a_mbstr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 214 | a_mbstr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 229 | a_mbstr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 215 | a_mbstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 230 | a_mbstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 216 | a_mbstr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 231 | a_mbstr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 217 | a_mbstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 232 | a_mbstr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 233 | a_mbstr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 218 | a_mbstr.o: ../cryptlib.h | 234 | a_mbstr.o: ../cryptlib.h |
| 219 | a_meth.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 235 | a_meth.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 220 | a_meth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 236 | a_meth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 221 | a_meth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 237 | a_meth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 222 | a_meth.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 238 | a_meth.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 223 | a_meth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 239 | a_meth.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 224 | a_meth.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 240 | a_meth.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 241 | a_meth.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 225 | a_meth.o: ../cryptlib.h | 242 | a_meth.o: ../cryptlib.h |
| 226 | a_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 243 | a_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 227 | a_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 244 | a_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 228 | a_null.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 245 | a_null.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 229 | a_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 246 | a_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 230 | a_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 247 | a_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 231 | a_null.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 248 | a_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 249 | a_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 232 | a_null.o: ../cryptlib.h | 250 | a_null.o: ../cryptlib.h |
| 233 | a_object.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 251 | a_object.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 234 | a_object.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 252 | a_object.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 235 | a_object.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 253 | a_object.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 236 | a_object.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 254 | a_object.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 255 | a_object.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 237 | a_object.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 256 | a_object.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 238 | a_object.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 257 | a_object.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 239 | a_object.o: ../../include/openssl/stack.h ../cryptlib.h | 258 | a_object.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 259 | a_object.o: ../cryptlib.h | ||
| 240 | a_octet.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 260 | a_octet.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 241 | a_octet.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 261 | a_octet.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 242 | a_octet.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 262 | a_octet.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 243 | a_octet.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 263 | a_octet.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 244 | a_octet.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 264 | a_octet.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 245 | a_octet.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 265 | a_octet.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 266 | a_octet.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 246 | a_octet.o: ../cryptlib.h | 267 | a_octet.o: ../cryptlib.h |
| 247 | a_print.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 268 | a_print.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 248 | a_print.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 269 | a_print.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 249 | a_print.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 270 | a_print.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 250 | a_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 271 | a_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 251 | a_print.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 272 | a_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 252 | a_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 273 | a_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 274 | a_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 253 | a_print.o: ../cryptlib.h | 275 | a_print.o: ../cryptlib.h |
| 254 | a_set.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 276 | a_set.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 255 | a_set.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 277 | a_set.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 256 | a_set.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 278 | a_set.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 257 | a_set.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 279 | a_set.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 258 | a_set.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 280 | a_set.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 259 | a_set.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 281 | a_set.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 260 | a_set.o: ../../include/openssl/stack.h ../cryptlib.h | 282 | a_set.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 283 | a_set.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 261 | a_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 284 | a_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 262 | a_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 285 | a_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 263 | a_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 286 | a_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -265,50 +288,76 @@ a_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 265 | a_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 288 | a_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 266 | a_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 289 | a_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 267 | a_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 290 | a_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 268 | a_sign.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 291 | a_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 292 | a_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 269 | a_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 293 | a_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 270 | a_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 294 | a_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 271 | a_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 295 | a_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 272 | a_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 296 | a_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 273 | a_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 297 | a_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 274 | a_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 298 | a_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 275 | a_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 299 | a_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 300 | a_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 276 | a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 301 | a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 277 | a_sign.o: ../cryptlib.h | 302 | a_sign.o: ../cryptlib.h |
| 303 | a_strex.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 304 | a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 305 | a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 306 | a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 307 | a_strex.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 308 | a_strex.o: ../../include/openssl/e_os2.h ../../include/openssl/evp.h | ||
| 309 | a_strex.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 310 | a_strex.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 311 | a_strex.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 312 | a_strex.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 313 | a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 314 | a_strex.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 315 | a_strex.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 316 | a_strex.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 317 | a_strex.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 318 | a_strex.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 319 | a_strex.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 320 | a_strex.o: charmap.h | ||
| 278 | a_strnid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 321 | a_strnid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 279 | a_strnid.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 322 | a_strnid.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 280 | a_strnid.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 323 | a_strnid.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 281 | a_strnid.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 324 | a_strnid.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 325 | a_strnid.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 282 | a_strnid.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 326 | a_strnid.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 283 | a_strnid.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 327 | a_strnid.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 284 | a_strnid.o: ../../include/openssl/stack.h ../cryptlib.h | 328 | a_strnid.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 329 | a_strnid.o: ../cryptlib.h | ||
| 285 | a_time.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 330 | a_time.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 286 | a_time.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 331 | a_time.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 287 | a_time.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 332 | a_time.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 288 | a_time.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 333 | a_time.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 289 | a_time.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 334 | a_time.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 290 | a_time.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 335 | a_time.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 336 | a_time.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 291 | a_time.o: ../cryptlib.h | 337 | a_time.o: ../cryptlib.h |
| 292 | a_type.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 338 | a_type.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 293 | a_type.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 339 | a_type.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 294 | a_type.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 340 | a_type.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 295 | a_type.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 341 | a_type.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 296 | a_type.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 342 | a_type.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 297 | a_type.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 343 | a_type.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 298 | a_type.o: ../../include/openssl/stack.h ../cryptlib.h | 344 | a_type.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 345 | a_type.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 299 | a_utctm.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 346 | a_utctm.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 300 | a_utctm.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 347 | a_utctm.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 301 | a_utctm.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 348 | a_utctm.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 302 | a_utctm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 349 | a_utctm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 303 | a_utctm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 350 | a_utctm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 304 | a_utctm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 351 | a_utctm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 352 | a_utctm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 305 | a_utctm.o: ../cryptlib.h | 353 | a_utctm.o: ../cryptlib.h |
| 306 | a_utf8.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 354 | a_utf8.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 307 | a_utf8.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 355 | a_utf8.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 308 | a_utf8.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 356 | a_utf8.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 309 | a_utf8.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 357 | a_utf8.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 310 | a_utf8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 358 | a_utf8.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 311 | a_utf8.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 359 | a_utf8.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 360 | a_utf8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 312 | a_utf8.o: ../cryptlib.h | 361 | a_utf8.o: ../cryptlib.h |
| 313 | a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 362 | a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 314 | a_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 363 | a_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -317,64 +366,79 @@ a_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 317 | a_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 366 | a_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 318 | a_verify.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 367 | a_verify.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 319 | a_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 368 | a_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 320 | a_verify.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 369 | a_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 370 | a_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 321 | a_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 371 | a_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 322 | a_verify.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 372 | a_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 373 | a_verify.o: ../../include/openssl/opensslconf.h | ||
| 323 | a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 374 | a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 324 | a_verify.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 375 | a_verify.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 325 | a_verify.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 376 | a_verify.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 326 | a_verify.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 377 | a_verify.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 327 | a_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 378 | a_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 328 | a_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 379 | a_verify.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 329 | a_verify.o: ../cryptlib.h | 380 | a_verify.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 330 | a_vis.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 381 | a_vis.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 331 | a_vis.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 382 | a_vis.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 332 | a_vis.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 383 | a_vis.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 333 | a_vis.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 384 | a_vis.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 334 | a_vis.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 385 | a_vis.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 335 | a_vis.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 386 | a_vis.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 387 | a_vis.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 336 | a_vis.o: ../cryptlib.h | 388 | a_vis.o: ../cryptlib.h |
| 337 | asn1_err.o: ../../include/openssl/asn1.h ../../include/openssl/bn.h | 389 | asn1_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 338 | asn1_err.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 390 | asn1_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h |
| 339 | asn1_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 391 | asn1_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 392 | asn1_err.o: ../../include/openssl/opensslconf.h | ||
| 393 | asn1_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
| 394 | asn1_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 340 | asn1_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 395 | asn1_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 341 | asn1_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 396 | asn1_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 342 | asn1_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 397 | asn1_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 343 | asn1_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 398 | asn1_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 344 | asn1_lib.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 399 | asn1_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 400 | asn1_lib.o: ../../include/openssl/opensslconf.h | ||
| 345 | asn1_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 401 | asn1_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 346 | asn1_lib.o: ../../include/openssl/stack.h ../cryptlib.h | 402 | asn1_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 403 | asn1_lib.o: ../cryptlib.h | ||
| 347 | asn1_par.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 404 | asn1_par.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 348 | asn1_par.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 405 | asn1_par.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 349 | asn1_par.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 406 | asn1_par.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 350 | asn1_par.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 407 | asn1_par.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 408 | asn1_par.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 351 | asn1_par.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 409 | asn1_par.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 352 | asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 410 | asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 353 | asn1_par.o: ../../include/openssl/stack.h ../cryptlib.h | 411 | asn1_par.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 412 | asn1_par.o: ../cryptlib.h | ||
| 354 | asn_pack.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 413 | asn_pack.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 355 | asn_pack.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 414 | asn_pack.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 356 | asn_pack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 415 | asn_pack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 357 | asn_pack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 416 | asn_pack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 358 | asn_pack.o: ../../include/openssl/opensslconf.h | 417 | asn_pack.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 359 | asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 418 | asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 360 | asn_pack.o: ../../include/openssl/stack.h ../cryptlib.h | 419 | asn_pack.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 420 | asn_pack.o: ../cryptlib.h | ||
| 361 | d2i_dhp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 421 | d2i_dhp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 362 | d2i_dhp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 422 | d2i_dhp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 363 | d2i_dhp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 423 | d2i_dhp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 364 | d2i_dhp.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h | 424 | d2i_dhp.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h |
| 365 | d2i_dhp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 425 | d2i_dhp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 426 | d2i_dhp.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 366 | d2i_dhp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 427 | d2i_dhp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 367 | d2i_dhp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 428 | d2i_dhp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 368 | d2i_dhp.o: ../../include/openssl/stack.h ../cryptlib.h | 429 | d2i_dhp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 430 | d2i_dhp.o: ../cryptlib.h | ||
| 369 | d2i_dsap.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 431 | d2i_dsap.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 370 | d2i_dsap.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 432 | d2i_dsap.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 371 | d2i_dsap.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 433 | d2i_dsap.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 372 | d2i_dsap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 434 | d2i_dsap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 373 | d2i_dsap.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 435 | d2i_dsap.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 374 | d2i_dsap.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 436 | d2i_dsap.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 437 | d2i_dsap.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 375 | d2i_dsap.o: ../../include/openssl/opensslconf.h | 438 | d2i_dsap.o: ../../include/openssl/opensslconf.h |
| 376 | d2i_dsap.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 439 | d2i_dsap.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 377 | d2i_dsap.o: ../../include/openssl/stack.h ../cryptlib.h | 440 | d2i_dsap.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 441 | d2i_dsap.o: ../cryptlib.h | ||
| 378 | d2i_pr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 442 | d2i_pr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 379 | d2i_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 443 | d2i_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 380 | d2i_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 444 | d2i_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -382,14 +446,16 @@ d2i_pr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 382 | d2i_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 446 | d2i_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 383 | d2i_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 447 | d2i_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 384 | d2i_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 448 | d2i_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 385 | d2i_pr.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 449 | d2i_pr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 450 | d2i_pr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 386 | d2i_pr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 451 | d2i_pr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 387 | d2i_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 452 | d2i_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 388 | d2i_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 453 | d2i_pr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 389 | d2i_pr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 454 | d2i_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 390 | d2i_pr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 455 | d2i_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 391 | d2i_pr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 456 | d2i_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 392 | d2i_pr.o: ../../include/openssl/stack.h ../cryptlib.h | 457 | d2i_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 458 | d2i_pr.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 393 | d2i_pu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 459 | d2i_pu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 394 | d2i_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 460 | d2i_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 395 | d2i_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 461 | d2i_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -397,94 +463,110 @@ d2i_pu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 397 | d2i_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 463 | d2i_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 398 | d2i_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 464 | d2i_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 399 | d2i_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 465 | d2i_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 400 | d2i_pu.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 466 | d2i_pu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 467 | d2i_pu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 401 | d2i_pu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 468 | d2i_pu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 402 | d2i_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 469 | d2i_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 403 | d2i_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 470 | d2i_pu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 404 | d2i_pu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 471 | d2i_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 405 | d2i_pu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 472 | d2i_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 406 | d2i_pu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 473 | d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 407 | d2i_pu.o: ../../include/openssl/stack.h ../cryptlib.h | 474 | d2i_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 475 | d2i_pu.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 408 | d2i_r_pr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 476 | d2i_r_pr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 409 | d2i_r_pr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 477 | d2i_r_pr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 410 | d2i_r_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 478 | d2i_r_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 411 | d2i_r_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 479 | d2i_r_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 412 | d2i_r_pr.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 480 | d2i_r_pr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 481 | d2i_r_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 413 | d2i_r_pr.o: ../../include/openssl/opensslconf.h | 482 | d2i_r_pr.o: ../../include/openssl/opensslconf.h |
| 414 | d2i_r_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h | 483 | d2i_r_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h |
| 415 | d2i_r_pr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 484 | d2i_r_pr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 416 | d2i_r_pr.o: ../cryptlib.h | 485 | d2i_r_pr.o: ../../include/openssl/symhacks.h ../cryptlib.h |
| 417 | d2i_r_pu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 486 | d2i_r_pu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 418 | d2i_r_pu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 487 | d2i_r_pu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 419 | d2i_r_pu.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 488 | d2i_r_pu.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 420 | d2i_r_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 489 | d2i_r_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 421 | d2i_r_pu.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 490 | d2i_r_pu.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 491 | d2i_r_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 422 | d2i_r_pu.o: ../../include/openssl/opensslconf.h | 492 | d2i_r_pu.o: ../../include/openssl/opensslconf.h |
| 423 | d2i_r_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h | 493 | d2i_r_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h |
| 424 | d2i_r_pu.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 494 | d2i_r_pu.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 425 | d2i_r_pu.o: ../cryptlib.h | 495 | d2i_r_pu.o: ../../include/openssl/symhacks.h ../cryptlib.h |
| 426 | d2i_s_pr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 496 | d2i_s_pr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 427 | d2i_s_pr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 497 | d2i_s_pr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 428 | d2i_s_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 498 | d2i_s_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 429 | d2i_s_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 499 | d2i_s_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 430 | d2i_s_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 500 | d2i_s_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 431 | d2i_s_pr.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 501 | d2i_s_pr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 502 | d2i_s_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 432 | d2i_s_pr.o: ../../include/openssl/opensslconf.h | 503 | d2i_s_pr.o: ../../include/openssl/opensslconf.h |
| 433 | d2i_s_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 504 | d2i_s_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 434 | d2i_s_pr.o: ../../include/openssl/stack.h ../cryptlib.h | 505 | d2i_s_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 506 | d2i_s_pr.o: ../cryptlib.h | ||
| 435 | d2i_s_pu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 507 | d2i_s_pu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 436 | d2i_s_pu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 508 | d2i_s_pu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 437 | d2i_s_pu.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 509 | d2i_s_pu.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 438 | d2i_s_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 510 | d2i_s_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 439 | d2i_s_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 511 | d2i_s_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 440 | d2i_s_pu.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 512 | d2i_s_pu.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 513 | d2i_s_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 441 | d2i_s_pu.o: ../../include/openssl/opensslconf.h | 514 | d2i_s_pu.o: ../../include/openssl/opensslconf.h |
| 442 | d2i_s_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 515 | d2i_s_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 443 | d2i_s_pu.o: ../../include/openssl/stack.h ../cryptlib.h | 516 | d2i_s_pu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 517 | d2i_s_pu.o: ../cryptlib.h | ||
| 444 | evp_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 518 | evp_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 445 | evp_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 519 | evp_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 446 | evp_asn1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 520 | evp_asn1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 447 | evp_asn1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 521 | evp_asn1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 448 | evp_asn1.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 522 | evp_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 523 | evp_asn1.o: ../../include/openssl/opensslconf.h | ||
| 449 | evp_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 524 | evp_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 450 | evp_asn1.o: ../../include/openssl/stack.h ../cryptlib.h | 525 | evp_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 526 | evp_asn1.o: ../cryptlib.h | ||
| 451 | f_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 527 | f_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 452 | f_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 528 | f_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 453 | f_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 529 | f_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 454 | f_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 530 | f_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 455 | f_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 531 | f_enum.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 456 | f_enum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 532 | f_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 533 | f_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 457 | f_enum.o: ../cryptlib.h | 534 | f_enum.o: ../cryptlib.h |
| 458 | f_int.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 535 | f_int.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 459 | f_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 536 | f_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 460 | f_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 537 | f_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 461 | f_int.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 538 | f_int.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 462 | f_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 539 | f_int.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 463 | f_int.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 540 | f_int.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 541 | f_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 464 | f_int.o: ../cryptlib.h | 542 | f_int.o: ../cryptlib.h |
| 465 | f_string.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 543 | f_string.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 466 | f_string.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 544 | f_string.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 467 | f_string.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 545 | f_string.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 468 | f_string.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 546 | f_string.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 469 | f_string.o: ../../include/openssl/opensslconf.h | 547 | f_string.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 470 | f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 548 | f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 471 | f_string.o: ../../include/openssl/stack.h ../cryptlib.h | 549 | f_string.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 550 | f_string.o: ../cryptlib.h | ||
| 472 | i2d_dhp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 551 | i2d_dhp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 473 | i2d_dhp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 552 | i2d_dhp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 474 | i2d_dhp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 553 | i2d_dhp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 475 | i2d_dhp.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h | 554 | i2d_dhp.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h |
| 476 | i2d_dhp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 555 | i2d_dhp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 477 | i2d_dhp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 556 | i2d_dhp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 478 | i2d_dhp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 557 | i2d_dhp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 558 | i2d_dhp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 479 | i2d_dhp.o: ../cryptlib.h | 559 | i2d_dhp.o: ../cryptlib.h |
| 480 | i2d_dsap.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 560 | i2d_dsap.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 481 | i2d_dsap.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 561 | i2d_dsap.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 482 | i2d_dsap.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 562 | i2d_dsap.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 483 | i2d_dsap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 563 | i2d_dsap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 484 | i2d_dsap.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 564 | i2d_dsap.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 485 | i2d_dsap.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 565 | i2d_dsap.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 566 | i2d_dsap.o: ../../include/openssl/opensslconf.h | ||
| 486 | i2d_dsap.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 567 | i2d_dsap.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 487 | i2d_dsap.o: ../../include/openssl/stack.h ../cryptlib.h | 568 | i2d_dsap.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 569 | i2d_dsap.o: ../cryptlib.h | ||
| 488 | i2d_pr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 570 | i2d_pr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 489 | i2d_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 571 | i2d_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 490 | i2d_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 572 | i2d_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -492,14 +574,16 @@ i2d_pr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 492 | i2d_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 574 | i2d_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 493 | i2d_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 575 | i2d_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 494 | i2d_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 576 | i2d_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 495 | i2d_pr.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 577 | i2d_pr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 578 | i2d_pr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 496 | i2d_pr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 579 | i2d_pr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 497 | i2d_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 580 | i2d_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 498 | i2d_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 581 | i2d_pr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 499 | i2d_pr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 582 | i2d_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 500 | i2d_pr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 583 | i2d_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 501 | i2d_pr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 584 | i2d_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 502 | i2d_pr.o: ../../include/openssl/stack.h ../cryptlib.h | 585 | i2d_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 586 | i2d_pr.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 503 | i2d_pu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 587 | i2d_pu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 504 | i2d_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 588 | i2d_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 505 | i2d_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 589 | i2d_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -507,50 +591,58 @@ i2d_pu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 507 | i2d_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 591 | i2d_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 508 | i2d_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 592 | i2d_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 509 | i2d_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 593 | i2d_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 510 | i2d_pu.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 594 | i2d_pu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 595 | i2d_pu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 511 | i2d_pu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 596 | i2d_pu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 512 | i2d_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 597 | i2d_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 513 | i2d_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 598 | i2d_pu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 514 | i2d_pu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 599 | i2d_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 515 | i2d_pu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 600 | i2d_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 516 | i2d_pu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 601 | i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 517 | i2d_pu.o: ../../include/openssl/stack.h ../cryptlib.h | 602 | i2d_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 603 | i2d_pu.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 518 | i2d_r_pr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 604 | i2d_r_pr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 519 | i2d_r_pr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 605 | i2d_r_pr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 520 | i2d_r_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 606 | i2d_r_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 521 | i2d_r_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 607 | i2d_r_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 522 | i2d_r_pr.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 608 | i2d_r_pr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 609 | i2d_r_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 523 | i2d_r_pr.o: ../../include/openssl/opensslconf.h | 610 | i2d_r_pr.o: ../../include/openssl/opensslconf.h |
| 524 | i2d_r_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h | 611 | i2d_r_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h |
| 525 | i2d_r_pr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 612 | i2d_r_pr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 526 | i2d_r_pr.o: ../cryptlib.h | 613 | i2d_r_pr.o: ../../include/openssl/symhacks.h ../cryptlib.h |
| 527 | i2d_r_pu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 614 | i2d_r_pu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 528 | i2d_r_pu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 615 | i2d_r_pu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 529 | i2d_r_pu.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 616 | i2d_r_pu.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 530 | i2d_r_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 617 | i2d_r_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 531 | i2d_r_pu.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 618 | i2d_r_pu.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 619 | i2d_r_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 532 | i2d_r_pu.o: ../../include/openssl/opensslconf.h | 620 | i2d_r_pu.o: ../../include/openssl/opensslconf.h |
| 533 | i2d_r_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h | 621 | i2d_r_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h |
| 534 | i2d_r_pu.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 622 | i2d_r_pu.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 535 | i2d_r_pu.o: ../cryptlib.h | 623 | i2d_r_pu.o: ../../include/openssl/symhacks.h ../cryptlib.h |
| 536 | i2d_s_pr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 624 | i2d_s_pr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 537 | i2d_s_pr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 625 | i2d_s_pr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 538 | i2d_s_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 626 | i2d_s_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 539 | i2d_s_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 627 | i2d_s_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 540 | i2d_s_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 628 | i2d_s_pr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 541 | i2d_s_pr.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 629 | i2d_s_pr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 630 | i2d_s_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 542 | i2d_s_pr.o: ../../include/openssl/opensslconf.h | 631 | i2d_s_pr.o: ../../include/openssl/opensslconf.h |
| 543 | i2d_s_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 632 | i2d_s_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 544 | i2d_s_pr.o: ../../include/openssl/stack.h ../cryptlib.h | 633 | i2d_s_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 634 | i2d_s_pr.o: ../cryptlib.h | ||
| 545 | i2d_s_pu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 635 | i2d_s_pu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 546 | i2d_s_pu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 636 | i2d_s_pu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 547 | i2d_s_pu.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 637 | i2d_s_pu.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 548 | i2d_s_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 638 | i2d_s_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 549 | i2d_s_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 639 | i2d_s_pu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 550 | i2d_s_pu.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 640 | i2d_s_pu.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 641 | i2d_s_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 551 | i2d_s_pu.o: ../../include/openssl/opensslconf.h | 642 | i2d_s_pu.o: ../../include/openssl/opensslconf.h |
| 552 | i2d_s_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 643 | i2d_s_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 553 | i2d_s_pu.o: ../../include/openssl/stack.h ../cryptlib.h | 644 | i2d_s_pu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 645 | i2d_s_pu.o: ../cryptlib.h | ||
| 554 | n_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 646 | n_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 555 | n_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 647 | n_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 556 | n_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 648 | n_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -559,31 +651,35 @@ n_pkey.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 559 | n_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 651 | n_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 560 | n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 652 | n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 561 | n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 653 | n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 562 | n_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 654 | n_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 563 | n_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 655 | n_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 564 | n_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 656 | n_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 565 | n_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 657 | n_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 566 | n_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 658 | n_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 567 | n_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 659 | n_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 568 | n_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 660 | n_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 569 | n_pkey.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 661 | n_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 662 | n_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 663 | n_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 570 | n_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 664 | n_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 571 | nsseq.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 665 | nsseq.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 572 | nsseq.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 666 | nsseq.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 573 | nsseq.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | 667 | nsseq.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 574 | nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 668 | nsseq.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h |
| 575 | nsseq.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 669 | nsseq.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 576 | nsseq.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 670 | nsseq.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 577 | nsseq.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 671 | nsseq.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 578 | nsseq.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 672 | nsseq.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 579 | nsseq.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 673 | nsseq.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 674 | nsseq.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 675 | nsseq.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 580 | nsseq.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 676 | nsseq.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 581 | nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 677 | nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 582 | nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 678 | nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 583 | nsseq.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 679 | nsseq.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 584 | nsseq.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 680 | nsseq.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 585 | nsseq.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 681 | nsseq.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 586 | nsseq.o: ../../include/openssl/x509_vfy.h | 682 | nsseq.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 587 | p5_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 683 | p5_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 588 | p5_pbe.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 684 | p5_pbe.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 589 | p5_pbe.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 685 | p5_pbe.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -592,14 +688,16 @@ p5_pbe.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 592 | p5_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 688 | p5_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 593 | p5_pbe.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 689 | p5_pbe.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 594 | p5_pbe.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 690 | p5_pbe.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 595 | p5_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 691 | p5_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 596 | p5_pbe.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 692 | p5_pbe.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 597 | p5_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 693 | p5_pbe.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 598 | p5_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | 694 | p5_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 599 | p5_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 695 | p5_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 600 | p5_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 696 | p5_pbe.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 601 | p5_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 697 | p5_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 602 | p5_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 698 | p5_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 699 | p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 700 | p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 603 | p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 701 | p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 604 | p5_pbe.o: ../cryptlib.h | 702 | p5_pbe.o: ../cryptlib.h |
| 605 | p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 703 | p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| @@ -610,16 +708,18 @@ p5_pbev2.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 610 | p5_pbev2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 708 | p5_pbev2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 611 | p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 709 | p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 612 | p5_pbev2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 710 | p5_pbev2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 613 | p5_pbev2.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 711 | p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 614 | p5_pbev2.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 712 | p5_pbev2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 615 | p5_pbev2.o: ../../include/openssl/opensslconf.h | 713 | p5_pbev2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 714 | p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 616 | p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 715 | p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 617 | p5_pbev2.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 716 | p5_pbev2.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 618 | p5_pbev2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 717 | p5_pbev2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 619 | p5_pbev2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 718 | p5_pbev2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 620 | p5_pbev2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 719 | p5_pbev2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 621 | p5_pbev2.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 720 | p5_pbev2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 622 | p5_pbev2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 721 | p5_pbev2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 722 | p5_pbev2.o: ../cryptlib.h | ||
| 623 | p7_dgst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 723 | p7_dgst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 624 | p7_dgst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 724 | p7_dgst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 625 | p7_dgst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 725 | p7_dgst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -628,14 +728,16 @@ p7_dgst.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 628 | p7_dgst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 728 | p7_dgst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 629 | p7_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 729 | p7_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 630 | p7_dgst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 730 | p7_dgst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 631 | p7_dgst.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 731 | p7_dgst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 632 | p7_dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 732 | p7_dgst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 633 | p7_dgst.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 733 | p7_dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 634 | p7_dgst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 734 | p7_dgst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 635 | p7_dgst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 735 | p7_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 636 | p7_dgst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 736 | p7_dgst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 637 | p7_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 737 | p7_dgst.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 638 | p7_dgst.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 738 | p7_dgst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 739 | p7_dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 740 | p7_dgst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 639 | p7_dgst.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 741 | p7_dgst.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 640 | p7_enc.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 742 | p7_enc.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 641 | p7_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 743 | p7_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -645,14 +747,16 @@ p7_enc.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 645 | p7_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 747 | p7_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 646 | p7_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 748 | p7_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 647 | p7_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 749 | p7_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 648 | p7_enc.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 750 | p7_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 649 | p7_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 751 | p7_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 650 | p7_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 752 | p7_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 651 | p7_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 753 | p7_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 652 | p7_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 754 | p7_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 653 | p7_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 755 | p7_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 654 | p7_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 756 | p7_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 655 | p7_enc.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 757 | p7_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 758 | p7_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 759 | p7_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 656 | p7_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 760 | p7_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 657 | p7_enc_c.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 761 | p7_enc_c.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 658 | p7_enc_c.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 762 | p7_enc_c.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -662,16 +766,17 @@ p7_enc_c.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 662 | p7_enc_c.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 766 | p7_enc_c.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 663 | p7_enc_c.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 767 | p7_enc_c.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 664 | p7_enc_c.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 768 | p7_enc_c.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 665 | p7_enc_c.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 769 | p7_enc_c.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 666 | p7_enc_c.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 770 | p7_enc_c.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 667 | p7_enc_c.o: ../../include/openssl/opensslconf.h | 771 | p7_enc_c.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 772 | p7_enc_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 668 | p7_enc_c.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 773 | p7_enc_c.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 669 | p7_enc_c.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 774 | p7_enc_c.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 670 | p7_enc_c.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 775 | p7_enc_c.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 671 | p7_enc_c.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 776 | p7_enc_c.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 672 | p7_enc_c.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 777 | p7_enc_c.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 673 | p7_enc_c.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 778 | p7_enc_c.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 674 | p7_enc_c.o: ../cryptlib.h | 779 | p7_enc_c.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 675 | p7_evp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 780 | p7_evp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 676 | p7_evp.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 781 | p7_evp.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 677 | p7_evp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 782 | p7_evp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -680,14 +785,16 @@ p7_evp.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 680 | p7_evp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 785 | p7_evp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 681 | p7_evp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 786 | p7_evp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 682 | p7_evp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 787 | p7_evp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 683 | p7_evp.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 788 | p7_evp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 684 | p7_evp.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 789 | p7_evp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 685 | p7_evp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 790 | p7_evp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 686 | p7_evp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 791 | p7_evp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 687 | p7_evp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 792 | p7_evp.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 688 | p7_evp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 793 | p7_evp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 689 | p7_evp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 794 | p7_evp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 690 | p7_evp.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 795 | p7_evp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 796 | p7_evp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 797 | p7_evp.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 691 | p7_evp.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 798 | p7_evp.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 692 | p7_i_s.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 799 | p7_i_s.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 693 | p7_i_s.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 800 | p7_i_s.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -697,14 +804,16 @@ p7_i_s.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 697 | p7_i_s.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 804 | p7_i_s.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 698 | p7_i_s.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 805 | p7_i_s.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 699 | p7_i_s.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 806 | p7_i_s.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 700 | p7_i_s.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 807 | p7_i_s.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 701 | p7_i_s.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 808 | p7_i_s.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 702 | p7_i_s.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 809 | p7_i_s.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 703 | p7_i_s.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 810 | p7_i_s.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 704 | p7_i_s.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 811 | p7_i_s.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 705 | p7_i_s.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 812 | p7_i_s.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 706 | p7_i_s.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 813 | p7_i_s.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 707 | p7_i_s.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 814 | p7_i_s.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 815 | p7_i_s.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 816 | p7_i_s.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 708 | p7_i_s.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 817 | p7_i_s.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 709 | p7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 818 | p7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 710 | p7_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 819 | p7_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -714,14 +823,16 @@ p7_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 714 | p7_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 823 | p7_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 715 | p7_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 824 | p7_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 716 | p7_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 825 | p7_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 717 | p7_lib.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 826 | p7_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 718 | p7_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 827 | p7_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 719 | p7_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 828 | p7_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 720 | p7_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 829 | p7_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 721 | p7_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 830 | p7_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 722 | p7_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 831 | p7_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 723 | p7_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 832 | p7_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 724 | p7_lib.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 833 | p7_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 834 | p7_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 835 | p7_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 725 | p7_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 836 | p7_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 726 | p7_recip.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 837 | p7_recip.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 727 | p7_recip.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 838 | p7_recip.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -731,16 +842,17 @@ p7_recip.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 731 | p7_recip.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 842 | p7_recip.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 732 | p7_recip.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 843 | p7_recip.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 733 | p7_recip.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 844 | p7_recip.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 734 | p7_recip.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 845 | p7_recip.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 735 | p7_recip.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 846 | p7_recip.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 736 | p7_recip.o: ../../include/openssl/opensslconf.h | 847 | p7_recip.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 848 | p7_recip.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 737 | p7_recip.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 849 | p7_recip.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 738 | p7_recip.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 850 | p7_recip.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 739 | p7_recip.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 851 | p7_recip.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 740 | p7_recip.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 852 | p7_recip.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 741 | p7_recip.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 853 | p7_recip.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 742 | p7_recip.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 854 | p7_recip.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 743 | p7_recip.o: ../cryptlib.h | 855 | p7_recip.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 744 | p7_s_e.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 856 | p7_s_e.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 745 | p7_s_e.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 857 | p7_s_e.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 746 | p7_s_e.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 858 | p7_s_e.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -749,14 +861,16 @@ p7_s_e.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 749 | p7_s_e.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 861 | p7_s_e.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 750 | p7_s_e.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 862 | p7_s_e.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 751 | p7_s_e.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 863 | p7_s_e.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 752 | p7_s_e.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 864 | p7_s_e.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 753 | p7_s_e.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 865 | p7_s_e.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 754 | p7_s_e.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 866 | p7_s_e.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 755 | p7_s_e.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 867 | p7_s_e.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 756 | p7_s_e.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 868 | p7_s_e.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 757 | p7_s_e.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 869 | p7_s_e.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 758 | p7_s_e.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 870 | p7_s_e.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 759 | p7_s_e.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 871 | p7_s_e.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 872 | p7_s_e.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 873 | p7_s_e.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 760 | p7_s_e.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 874 | p7_s_e.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 761 | p7_signd.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 875 | p7_signd.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 762 | p7_signd.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 876 | p7_signd.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -766,16 +880,17 @@ p7_signd.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 766 | p7_signd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 880 | p7_signd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 767 | p7_signd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 881 | p7_signd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 768 | p7_signd.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 882 | p7_signd.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 769 | p7_signd.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 883 | p7_signd.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 770 | p7_signd.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 884 | p7_signd.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 771 | p7_signd.o: ../../include/openssl/opensslconf.h | 885 | p7_signd.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 886 | p7_signd.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 772 | p7_signd.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 887 | p7_signd.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 773 | p7_signd.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 888 | p7_signd.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 774 | p7_signd.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 889 | p7_signd.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 775 | p7_signd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 890 | p7_signd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 776 | p7_signd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 891 | p7_signd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 777 | p7_signd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 892 | p7_signd.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 778 | p7_signd.o: ../cryptlib.h | 893 | p7_signd.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 779 | p7_signi.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 894 | p7_signi.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 780 | p7_signi.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 895 | p7_signi.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 781 | p7_signi.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 896 | p7_signi.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -784,16 +899,17 @@ p7_signi.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 784 | p7_signi.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 899 | p7_signi.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 785 | p7_signi.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 900 | p7_signi.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 786 | p7_signi.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 901 | p7_signi.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 787 | p7_signi.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 902 | p7_signi.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 788 | p7_signi.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 903 | p7_signi.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 789 | p7_signi.o: ../../include/openssl/opensslconf.h | 904 | p7_signi.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 905 | p7_signi.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 790 | p7_signi.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 906 | p7_signi.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 791 | p7_signi.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 907 | p7_signi.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 792 | p7_signi.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 908 | p7_signi.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 793 | p7_signi.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 909 | p7_signi.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 794 | p7_signi.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 910 | p7_signi.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 795 | p7_signi.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 911 | p7_signi.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 796 | p7_signi.o: ../cryptlib.h | 912 | p7_signi.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 797 | p8_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 913 | p8_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 798 | p8_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 914 | p8_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 799 | p8_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 915 | p8_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -802,14 +918,16 @@ p8_pkey.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 802 | p8_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 918 | p8_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 803 | p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 919 | p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 804 | p8_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 920 | p8_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 805 | p8_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 921 | p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 806 | p8_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 922 | p8_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 807 | p8_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 923 | p8_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 808 | p8_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 924 | p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 809 | p8_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 925 | p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 810 | p8_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 926 | p8_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 811 | p8_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 927 | p8_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 812 | p8_pkey.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 928 | p8_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 929 | p8_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 930 | p8_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 813 | p8_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 931 | p8_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 814 | t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 932 | t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 815 | t_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 933 | t_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -817,16 +935,18 @@ t_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 817 | t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 935 | t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 818 | t_bitst.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 936 | t_bitst.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 819 | t_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 937 | t_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 820 | t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 938 | t_bitst.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 821 | t_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 939 | t_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 822 | t_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 940 | t_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 941 | t_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 823 | t_bitst.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 942 | t_bitst.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 824 | t_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 943 | t_bitst.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 825 | t_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 944 | t_bitst.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 826 | t_bitst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 945 | t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 827 | t_bitst.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 946 | t_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 828 | t_bitst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 947 | t_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 829 | t_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 948 | t_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 949 | t_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 830 | t_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 950 | t_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 831 | t_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h | 951 | t_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 832 | t_crl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 952 | t_crl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -835,25 +955,28 @@ t_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 835 | t_crl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 955 | t_crl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 836 | t_crl.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 956 | t_crl.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 837 | t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 957 | t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 838 | t_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 958 | t_crl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 839 | t_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 959 | t_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 840 | t_crl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 960 | t_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 961 | t_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 841 | t_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 962 | t_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 842 | t_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 963 | t_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 843 | t_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 964 | t_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 844 | t_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 965 | t_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 845 | t_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 966 | t_crl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 846 | t_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 967 | t_crl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 847 | t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 968 | t_crl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 969 | t_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 848 | t_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 970 | t_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 849 | t_crl.o: ../../include/openssl/x509v3.h ../cryptlib.h | 971 | t_crl.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 850 | t_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 972 | t_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 851 | t_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 973 | t_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 852 | t_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 974 | t_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 853 | t_pkey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 975 | t_pkey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 854 | t_pkey.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 976 | t_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 855 | t_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h | 977 | t_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 856 | t_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 978 | t_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 979 | t_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 857 | t_pkey.o: ../cryptlib.h | 980 | t_pkey.o: ../cryptlib.h |
| 858 | t_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 981 | t_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 859 | t_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 982 | t_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -861,16 +984,18 @@ t_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 861 | t_req.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 984 | t_req.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 862 | t_req.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 985 | t_req.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 863 | t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 986 | t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 864 | t_req.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 987 | t_req.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 865 | t_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 988 | t_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 866 | t_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 989 | t_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 990 | t_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 867 | t_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 991 | t_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 868 | t_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 992 | t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 869 | t_req.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 993 | t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 870 | t_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 994 | t_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 871 | t_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 995 | t_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 872 | t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 996 | t_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 873 | t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 997 | t_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 998 | t_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 874 | t_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 999 | t_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 875 | t_req.o: ../../include/openssl/x509v3.h ../cryptlib.h | 1000 | t_req.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 876 | t_spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1001 | t_spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| @@ -881,14 +1006,16 @@ t_spki.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 881 | t_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1006 | t_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 882 | t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1007 | t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 883 | t_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1008 | t_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 884 | t_spki.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1009 | t_spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 885 | t_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1010 | t_spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 886 | t_spki.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1011 | t_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 887 | t_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1012 | t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 888 | t_spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1013 | t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 889 | t_spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1014 | t_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 890 | t_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1015 | t_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 891 | t_spki.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1016 | t_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1017 | t_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1018 | t_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 892 | t_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1019 | t_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 893 | t_x509.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 1020 | t_x509.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 894 | t_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 1021 | t_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -896,16 +1023,18 @@ t_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 896 | t_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 1023 | t_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 897 | t_x509.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 1024 | t_x509.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 898 | t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1025 | t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 899 | t_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1026 | t_x509.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 900 | t_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1027 | t_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 901 | t_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 1028 | t_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 1029 | t_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 902 | t_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 1030 | t_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 903 | t_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 1031 | t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 904 | t_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 1032 | t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 905 | t_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 1033 | t_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 906 | t_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 1034 | t_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 907 | t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 1035 | t_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 908 | t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 1036 | t_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 1037 | t_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 909 | t_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 1038 | t_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 910 | t_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h | 1039 | t_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 911 | t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1040 | t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| @@ -916,14 +1045,16 @@ t_x509a.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 916 | t_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1045 | t_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 917 | t_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1046 | t_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 918 | t_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1047 | t_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 919 | t_x509a.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1048 | t_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 920 | t_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1049 | t_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 921 | t_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1050 | t_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 922 | t_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1051 | t_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 923 | t_x509a.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1052 | t_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 924 | t_x509a.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1053 | t_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 925 | t_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1054 | t_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 926 | t_x509a.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1055 | t_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1056 | t_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1057 | t_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 927 | t_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1058 | t_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 928 | x_algor.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1059 | x_algor.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 929 | x_algor.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1060 | x_algor.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -933,14 +1064,16 @@ x_algor.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 933 | x_algor.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1064 | x_algor.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 934 | x_algor.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1065 | x_algor.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 935 | x_algor.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1066 | x_algor.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 936 | x_algor.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1067 | x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 937 | x_algor.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1068 | x_algor.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 938 | x_algor.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1069 | x_algor.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 939 | x_algor.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1070 | x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 940 | x_algor.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1071 | x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 941 | x_algor.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1072 | x_algor.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 942 | x_algor.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1073 | x_algor.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 943 | x_algor.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1074 | x_algor.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1075 | x_algor.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1076 | x_algor.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 944 | x_algor.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1077 | x_algor.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 945 | x_attrib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1078 | x_attrib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 946 | x_attrib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1079 | x_attrib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -950,16 +1083,17 @@ x_attrib.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 950 | x_attrib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1083 | x_attrib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 951 | x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1084 | x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 952 | x_attrib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1085 | x_attrib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 953 | x_attrib.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1086 | x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 954 | x_attrib.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1087 | x_attrib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 955 | x_attrib.o: ../../include/openssl/opensslconf.h | 1088 | x_attrib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1089 | x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 956 | x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 1090 | x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 957 | x_attrib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 1091 | x_attrib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 958 | x_attrib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 1092 | x_attrib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 959 | x_attrib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 1093 | x_attrib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 960 | x_attrib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 1094 | x_attrib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 961 | x_attrib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 1095 | x_attrib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 962 | x_attrib.o: ../cryptlib.h | 1096 | x_attrib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 963 | x_cinf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1097 | x_cinf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 964 | x_cinf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1098 | x_cinf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 965 | x_cinf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 1099 | x_cinf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -968,14 +1102,16 @@ x_cinf.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 968 | x_cinf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1102 | x_cinf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 969 | x_cinf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1103 | x_cinf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 970 | x_cinf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1104 | x_cinf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 971 | x_cinf.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1105 | x_cinf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 972 | x_cinf.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1106 | x_cinf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 973 | x_cinf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1107 | x_cinf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 974 | x_cinf.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1108 | x_cinf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 975 | x_cinf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1109 | x_cinf.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 976 | x_cinf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1110 | x_cinf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 977 | x_cinf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1111 | x_cinf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 978 | x_cinf.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1112 | x_cinf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1113 | x_cinf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1114 | x_cinf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 979 | x_cinf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1115 | x_cinf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 980 | x_crl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1116 | x_crl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 981 | x_crl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1117 | x_crl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -985,14 +1121,16 @@ x_crl.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 985 | x_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1121 | x_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 986 | x_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1122 | x_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 987 | x_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1123 | x_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 988 | x_crl.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1124 | x_crl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 989 | x_crl.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1125 | x_crl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 990 | x_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1126 | x_crl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 991 | x_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1127 | x_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 992 | x_crl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1128 | x_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 993 | x_crl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1129 | x_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 994 | x_crl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1130 | x_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 995 | x_crl.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1131 | x_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1132 | x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1133 | x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 996 | x_crl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1134 | x_crl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 997 | x_exten.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1135 | x_exten.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 998 | x_exten.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1136 | x_exten.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1002,14 +1140,16 @@ x_exten.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1002 | x_exten.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1140 | x_exten.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1003 | x_exten.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1141 | x_exten.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1004 | x_exten.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1142 | x_exten.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1005 | x_exten.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1143 | x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1006 | x_exten.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1144 | x_exten.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1007 | x_exten.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1145 | x_exten.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1008 | x_exten.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1146 | x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1009 | x_exten.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1147 | x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1010 | x_exten.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1148 | x_exten.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1011 | x_exten.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1149 | x_exten.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1012 | x_exten.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1150 | x_exten.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1151 | x_exten.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1152 | x_exten.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1013 | x_exten.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1153 | x_exten.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1014 | x_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1154 | x_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1015 | x_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1155 | x_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1019,14 +1159,16 @@ x_info.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1019 | x_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1159 | x_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1020 | x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1160 | x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1021 | x_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1161 | x_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1022 | x_info.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1162 | x_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1023 | x_info.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1163 | x_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1024 | x_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1164 | x_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1025 | x_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1165 | x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1026 | x_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1166 | x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1027 | x_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1167 | x_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1028 | x_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1168 | x_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1029 | x_info.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1169 | x_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1170 | x_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1171 | x_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1030 | x_info.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1172 | x_info.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1031 | x_name.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1173 | x_name.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1032 | x_name.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1174 | x_name.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1036,14 +1178,16 @@ x_name.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1036 | x_name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1178 | x_name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1037 | x_name.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1179 | x_name.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1038 | x_name.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1180 | x_name.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1039 | x_name.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1181 | x_name.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1040 | x_name.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1182 | x_name.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1041 | x_name.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1183 | x_name.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1042 | x_name.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1184 | x_name.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1043 | x_name.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1185 | x_name.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1044 | x_name.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1186 | x_name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1045 | x_name.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1187 | x_name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1046 | x_name.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1188 | x_name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1189 | x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1190 | x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1047 | x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1191 | x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1048 | x_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1192 | x_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1049 | x_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1193 | x_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1053,14 +1197,16 @@ x_pkey.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1053 | x_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1197 | x_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1054 | x_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1198 | x_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1055 | x_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1199 | x_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1056 | x_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1200 | x_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1057 | x_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1201 | x_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1058 | x_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1202 | x_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1059 | x_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1203 | x_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1060 | x_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1204 | x_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1061 | x_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1205 | x_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1062 | x_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1206 | x_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1063 | x_pkey.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1207 | x_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1208 | x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1209 | x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1064 | x_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1210 | x_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1065 | x_pubkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1211 | x_pubkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1066 | x_pubkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1212 | x_pubkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1070,16 +1216,17 @@ x_pubkey.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1070 | x_pubkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1216 | x_pubkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1071 | x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1217 | x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1072 | x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1218 | x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1073 | x_pubkey.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1219 | x_pubkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1074 | x_pubkey.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1220 | x_pubkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1075 | x_pubkey.o: ../../include/openssl/opensslconf.h | 1221 | x_pubkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1222 | x_pubkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 1076 | x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 1223 | x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1077 | x_pubkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 1224 | x_pubkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1078 | x_pubkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 1225 | x_pubkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1079 | x_pubkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 1226 | x_pubkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1080 | x_pubkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 1227 | x_pubkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 1081 | x_pubkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 1228 | x_pubkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 1082 | x_pubkey.o: ../cryptlib.h | 1229 | x_pubkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1083 | x_req.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1230 | x_req.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1084 | x_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1231 | x_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 1085 | x_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 1232 | x_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -1088,14 +1235,16 @@ x_req.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1088 | x_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1235 | x_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1089 | x_req.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1236 | x_req.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1090 | x_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1237 | x_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1091 | x_req.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1238 | x_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1092 | x_req.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1239 | x_req.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1093 | x_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1240 | x_req.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1094 | x_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1241 | x_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1095 | x_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1242 | x_req.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1096 | x_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1243 | x_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1097 | x_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1244 | x_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1098 | x_req.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1245 | x_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1246 | x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1247 | x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1099 | x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1248 | x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1100 | x_sig.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1249 | x_sig.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1101 | x_sig.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1250 | x_sig.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1105,14 +1254,16 @@ x_sig.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1105 | x_sig.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1254 | x_sig.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1106 | x_sig.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1255 | x_sig.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1107 | x_sig.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1256 | x_sig.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1108 | x_sig.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1257 | x_sig.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1109 | x_sig.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1258 | x_sig.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1110 | x_sig.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1259 | x_sig.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1111 | x_sig.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1260 | x_sig.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1112 | x_sig.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1261 | x_sig.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1113 | x_sig.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1262 | x_sig.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1114 | x_sig.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1263 | x_sig.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1115 | x_sig.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1264 | x_sig.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1265 | x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1266 | x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1116 | x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1267 | x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1117 | x_spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1268 | x_spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1118 | x_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1269 | x_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1122,14 +1273,16 @@ x_spki.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1122 | x_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1273 | x_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1123 | x_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1274 | x_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1124 | x_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1275 | x_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1125 | x_spki.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1276 | x_spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1126 | x_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1277 | x_spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1127 | x_spki.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1278 | x_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1128 | x_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1279 | x_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1129 | x_spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1280 | x_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1130 | x_spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1281 | x_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1131 | x_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1282 | x_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1132 | x_spki.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1283 | x_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1284 | x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1285 | x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1133 | x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1286 | x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1134 | x_val.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1287 | x_val.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1135 | x_val.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1288 | x_val.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1139,32 +1292,38 @@ x_val.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1139 | x_val.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1292 | x_val.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1140 | x_val.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1293 | x_val.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1141 | x_val.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1294 | x_val.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1142 | x_val.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1295 | x_val.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1143 | x_val.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1296 | x_val.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1144 | x_val.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1297 | x_val.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1145 | x_val.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1298 | x_val.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1146 | x_val.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1299 | x_val.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1147 | x_val.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1300 | x_val.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1148 | x_val.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1301 | x_val.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1149 | x_val.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1302 | x_val.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1303 | x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1304 | x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1150 | x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1305 | x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1151 | x_x509.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1306 | x_x509.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1152 | x_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1307 | x_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 1153 | x_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 1308 | x_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 1154 | x_x509.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | 1309 | x_x509.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 1155 | x_x509.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 1310 | x_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 1156 | x_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1311 | x_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 1312 | x_x509.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
| 1157 | x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1313 | x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1158 | x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1314 | x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1159 | x_x509.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1315 | x_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1160 | x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1316 | x_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1161 | x_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1317 | x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1162 | x_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1318 | x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1163 | x_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1319 | x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1164 | x_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1320 | x_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1165 | x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1321 | x_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1166 | x_x509.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1322 | x_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1167 | x_x509.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1323 | x_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 1324 | x_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1325 | x_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | ||
| 1326 | x_x509.o: ../cryptlib.h | ||
| 1168 | x_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 1327 | x_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1169 | x_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 1328 | x_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 1170 | x_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 1329 | x_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -1173,12 +1332,14 @@ x_x509a.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1173 | x_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 1332 | x_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1174 | x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 1333 | x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1175 | x_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 1334 | x_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1176 | x_x509a.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 1335 | x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1177 | x_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 1336 | x_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1178 | x_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 1337 | x_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1179 | x_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 1338 | x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1180 | x_x509a.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 1339 | x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1181 | x_x509a.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 1340 | x_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1182 | x_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 1341 | x_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1183 | x_x509a.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 1342 | x_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1343 | x_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1344 | x_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1184 | x_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 1345 | x_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/asn1/a_bitstr.c b/src/lib/libssl/src/crypto/asn1/a_bitstr.c index c77456b315..7013a407ad 100644 --- a/src/lib/libssl/src/crypto/asn1/a_bitstr.c +++ b/src/lib/libssl/src/crypto/asn1/a_bitstr.c | |||
| @@ -70,13 +70,27 @@ int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, int len) | |||
| 70 | { return M_ASN1_BIT_STRING_set(x, d, len); } | 70 | { return M_ASN1_BIT_STRING_set(x, d, len); } |
| 71 | 71 | ||
| 72 | int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) | 72 | int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) |
| 73 | { | ||
| 74 | int len, ret; | ||
| 75 | len = i2c_ASN1_BIT_STRING(a, NULL); | ||
| 76 | ret=ASN1_object_size(0,len,V_ASN1_BIT_STRING); | ||
| 77 | if(pp) { | ||
| 78 | ASN1_put_object(pp,0,len,V_ASN1_BIT_STRING,V_ASN1_UNIVERSAL); | ||
| 79 | i2c_ASN1_BIT_STRING(a, pp); | ||
| 80 | } | ||
| 81 | return ret; | ||
| 82 | } | ||
| 83 | |||
| 84 | int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) | ||
| 73 | { | 85 | { |
| 74 | int ret,j,r,bits,len; | 86 | int ret,j,bits,len; |
| 75 | unsigned char *p,*d; | 87 | unsigned char *p,*d; |
| 76 | 88 | ||
| 77 | if (a == NULL) return(0); | 89 | if (a == NULL) return(0); |
| 78 | 90 | ||
| 79 | len=a->length; | 91 | len=a->length; |
| 92 | ret=1+len; | ||
| 93 | if (pp == NULL) return(ret); | ||
| 80 | 94 | ||
| 81 | if (len > 0) | 95 | if (len > 0) |
| 82 | { | 96 | { |
| @@ -104,36 +118,27 @@ int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) | |||
| 104 | } | 118 | } |
| 105 | else | 119 | else |
| 106 | bits=0; | 120 | bits=0; |
| 107 | ret=1+len; | ||
| 108 | r=ASN1_object_size(0,ret,V_ASN1_BIT_STRING); | ||
| 109 | if (pp == NULL) return(r); | ||
| 110 | p= *pp; | 121 | p= *pp; |
| 111 | 122 | ||
| 112 | ASN1_put_object(&p,0,ret,V_ASN1_BIT_STRING,V_ASN1_UNIVERSAL); | ||
| 113 | *(p++)=(unsigned char)bits; | 123 | *(p++)=(unsigned char)bits; |
| 114 | d=a->data; | 124 | d=a->data; |
| 115 | memcpy(p,d,len); | 125 | memcpy(p,d,len); |
| 116 | p+=len; | 126 | p+=len; |
| 117 | if (len > 0) p[-1]&=(0xff<<bits); | 127 | if (len > 0) p[-1]&=(0xff<<bits); |
| 118 | *pp=p; | 128 | *pp=p; |
| 119 | return(r); | 129 | return(ret); |
| 120 | } | 130 | } |
| 121 | 131 | ||
| 132 | |||
| 133 | /* Convert DER encoded ASN1 BIT_STRING to ASN1_BIT_STRING structure */ | ||
| 122 | ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp, | 134 | ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp, |
| 123 | long length) | 135 | long length) |
| 124 | { | 136 | { |
| 125 | ASN1_BIT_STRING *ret=NULL; | 137 | unsigned char *p; |
| 126 | unsigned char *p,*s; | ||
| 127 | long len; | 138 | long len; |
| 128 | int inf,tag,xclass; | ||
| 129 | int i; | 139 | int i; |
| 130 | 140 | int inf,tag,xclass; | |
| 131 | if ((a == NULL) || ((*a) == NULL)) | 141 | ASN1_BIT_STRING *ret; |
| 132 | { | ||
| 133 | if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL); | ||
| 134 | } | ||
| 135 | else | ||
| 136 | ret=(*a); | ||
| 137 | 142 | ||
| 138 | p= *pp; | 143 | p= *pp; |
| 139 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); | 144 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); |
| @@ -149,7 +154,30 @@ ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp, | |||
| 149 | goto err; | 154 | goto err; |
| 150 | } | 155 | } |
| 151 | if (len < 1) { i=ASN1_R_STRING_TOO_SHORT; goto err; } | 156 | if (len < 1) { i=ASN1_R_STRING_TOO_SHORT; goto err; } |
| 157 | ret = c2i_ASN1_BIT_STRING(a, &p, len); | ||
| 158 | if(ret) *pp = p; | ||
| 159 | return ret; | ||
| 160 | err: | ||
| 161 | ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,i); | ||
| 162 | return(NULL); | ||
| 163 | |||
| 164 | } | ||
| 165 | |||
| 166 | ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp, | ||
| 167 | long len) | ||
| 168 | { | ||
| 169 | ASN1_BIT_STRING *ret=NULL; | ||
| 170 | unsigned char *p,*s; | ||
| 171 | int i; | ||
| 172 | |||
| 173 | if ((a == NULL) || ((*a) == NULL)) | ||
| 174 | { | ||
| 175 | if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL); | ||
| 176 | } | ||
| 177 | else | ||
| 178 | ret=(*a); | ||
| 152 | 179 | ||
| 180 | p= *pp; | ||
| 153 | i= *(p++); | 181 | i= *(p++); |
| 154 | /* We do this to preserve the settings. If we modify | 182 | /* We do this to preserve the settings. If we modify |
| 155 | * the settings, via the _set_bit function, we will recalculate | 183 | * the settings, via the _set_bit function, we will recalculate |
| @@ -159,7 +187,7 @@ ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp, | |||
| 159 | 187 | ||
| 160 | if (len-- > 1) /* using one because of the bits left byte */ | 188 | if (len-- > 1) /* using one because of the bits left byte */ |
| 161 | { | 189 | { |
| 162 | s=(unsigned char *)Malloc((int)len); | 190 | s=(unsigned char *)OPENSSL_malloc((int)len); |
| 163 | if (s == NULL) | 191 | if (s == NULL) |
| 164 | { | 192 | { |
| 165 | i=ERR_R_MALLOC_FAILURE; | 193 | i=ERR_R_MALLOC_FAILURE; |
| @@ -173,7 +201,7 @@ ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp, | |||
| 173 | s=NULL; | 201 | s=NULL; |
| 174 | 202 | ||
| 175 | ret->length=(int)len; | 203 | ret->length=(int)len; |
| 176 | if (ret->data != NULL) Free(ret->data); | 204 | if (ret->data != NULL) OPENSSL_free(ret->data); |
| 177 | ret->data=s; | 205 | ret->data=s; |
| 178 | ret->type=V_ASN1_BIT_STRING; | 206 | ret->type=V_ASN1_BIT_STRING; |
| 179 | if (a != NULL) (*a)=ret; | 207 | if (a != NULL) (*a)=ret; |
| @@ -204,14 +232,14 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) | |||
| 204 | { | 232 | { |
| 205 | if (!value) return(1); /* Don't need to set */ | 233 | if (!value) return(1); /* Don't need to set */ |
| 206 | if (a->data == NULL) | 234 | if (a->data == NULL) |
| 207 | c=(unsigned char *)Malloc(w+1); | 235 | c=(unsigned char *)OPENSSL_malloc(w+1); |
| 208 | else | 236 | else |
| 209 | c=(unsigned char *)Realloc(a->data,w+1); | 237 | c=(unsigned char *)OPENSSL_realloc(a->data,w+1); |
| 210 | if (c == NULL) return(0); | 238 | if (c == NULL) return(0); |
| 239 | if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length); | ||
| 211 | a->data=c; | 240 | a->data=c; |
| 212 | a->length=w+1; | 241 | a->length=w+1; |
| 213 | c[w]=0; | 242 | } |
| 214 | } | ||
| 215 | a->data[w]=((a->data[w])&iv)|v; | 243 | a->data[w]=((a->data[w])&iv)|v; |
| 216 | while ((a->length > 0) && (a->data[a->length-1] == 0)) | 244 | while ((a->length > 0) && (a->data[a->length-1] == 0)) |
| 217 | a->length--; | 245 | a->length--; |
diff --git a/src/lib/libssl/src/crypto/asn1/a_bytes.c b/src/lib/libssl/src/crypto/asn1/a_bytes.c index 8cde695804..3a0c0c7835 100644 --- a/src/lib/libssl/src/crypto/asn1/a_bytes.c +++ b/src/lib/libssl/src/crypto/asn1/a_bytes.c | |||
| @@ -111,7 +111,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp, | |||
| 111 | 111 | ||
| 112 | if (len != 0) | 112 | if (len != 0) |
| 113 | { | 113 | { |
| 114 | s=(unsigned char *)Malloc((int)len+1); | 114 | s=(unsigned char *)OPENSSL_malloc((int)len+1); |
| 115 | if (s == NULL) | 115 | if (s == NULL) |
| 116 | { | 116 | { |
| 117 | i=ERR_R_MALLOC_FAILURE; | 117 | i=ERR_R_MALLOC_FAILURE; |
| @@ -124,7 +124,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp, | |||
| 124 | else | 124 | else |
| 125 | s=NULL; | 125 | s=NULL; |
| 126 | 126 | ||
| 127 | if (ret->data != NULL) Free(ret->data); | 127 | if (ret->data != NULL) OPENSSL_free(ret->data); |
| 128 | ret->length=(int)len; | 128 | ret->length=(int)len; |
| 129 | ret->data=s; | 129 | ret->data=s; |
| 130 | ret->type=tag; | 130 | ret->type=tag; |
| @@ -218,8 +218,8 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, long length, | |||
| 218 | { | 218 | { |
| 219 | if ((ret->length < len) || (ret->data == NULL)) | 219 | if ((ret->length < len) || (ret->data == NULL)) |
| 220 | { | 220 | { |
| 221 | if (ret->data != NULL) Free(ret->data); | 221 | if (ret->data != NULL) OPENSSL_free(ret->data); |
| 222 | s=(unsigned char *)Malloc((int)len + 1); | 222 | s=(unsigned char *)OPENSSL_malloc((int)len + 1); |
| 223 | if (s == NULL) | 223 | if (s == NULL) |
| 224 | { | 224 | { |
| 225 | i=ERR_R_MALLOC_FAILURE; | 225 | i=ERR_R_MALLOC_FAILURE; |
| @@ -235,7 +235,7 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, long length, | |||
| 235 | else | 235 | else |
| 236 | { | 236 | { |
| 237 | s=NULL; | 237 | s=NULL; |
| 238 | if (ret->data != NULL) Free(ret->data); | 238 | if (ret->data != NULL) OPENSSL_free(ret->data); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | ret->length=(int)len; | 241 | ret->length=(int)len; |
| @@ -310,14 +310,14 @@ static int asn1_collate_primitive(ASN1_STRING *a, ASN1_CTX *c) | |||
| 310 | if (!asn1_Finish(c)) goto err; | 310 | if (!asn1_Finish(c)) goto err; |
| 311 | 311 | ||
| 312 | a->length=num; | 312 | a->length=num; |
| 313 | if (a->data != NULL) Free(a->data); | 313 | if (a->data != NULL) OPENSSL_free(a->data); |
| 314 | a->data=(unsigned char *)b.data; | 314 | a->data=(unsigned char *)b.data; |
| 315 | if (os != NULL) ASN1_STRING_free(os); | 315 | if (os != NULL) ASN1_STRING_free(os); |
| 316 | return(1); | 316 | return(1); |
| 317 | err: | 317 | err: |
| 318 | ASN1err(ASN1_F_ASN1_COLLATE_PRIMITIVE,c->error); | 318 | ASN1err(ASN1_F_ASN1_COLLATE_PRIMITIVE,c->error); |
| 319 | if (os != NULL) ASN1_STRING_free(os); | 319 | if (os != NULL) ASN1_STRING_free(os); |
| 320 | if (b.data != NULL) Free(b.data); | 320 | if (b.data != NULL) OPENSSL_free(b.data); |
| 321 | return(0); | 321 | return(0); |
| 322 | } | 322 | } |
| 323 | 323 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_digest.c b/src/lib/libssl/src/crypto/asn1/a_digest.c index 3370aae998..8257b8639e 100644 --- a/src/lib/libssl/src/crypto/asn1/a_digest.c +++ b/src/lib/libssl/src/crypto/asn1/a_digest.c | |||
| @@ -77,14 +77,14 @@ int ASN1_digest(int (*i2d)(), const EVP_MD *type, char *data, | |||
| 77 | unsigned char *str,*p; | 77 | unsigned char *str,*p; |
| 78 | 78 | ||
| 79 | i=i2d(data,NULL); | 79 | i=i2d(data,NULL); |
| 80 | if ((str=(unsigned char *)Malloc(i)) == NULL) return(0); | 80 | if ((str=(unsigned char *)OPENSSL_malloc(i)) == NULL) return(0); |
| 81 | p=str; | 81 | p=str; |
| 82 | i2d(data,&p); | 82 | i2d(data,&p); |
| 83 | 83 | ||
| 84 | EVP_DigestInit(&ctx,type); | 84 | EVP_DigestInit(&ctx,type); |
| 85 | EVP_DigestUpdate(&ctx,str,i); | 85 | EVP_DigestUpdate(&ctx,str,i); |
| 86 | EVP_DigestFinal(&ctx,md,len); | 86 | EVP_DigestFinal(&ctx,md,len); |
| 87 | Free(str); | 87 | OPENSSL_free(str); |
| 88 | return(1); | 88 | return(1); |
| 89 | } | 89 | } |
| 90 | 90 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_dup.c b/src/lib/libssl/src/crypto/asn1/a_dup.c index 3202a816d0..c3bda58a5d 100644 --- a/src/lib/libssl/src/crypto/asn1/a_dup.c +++ b/src/lib/libssl/src/crypto/asn1/a_dup.c | |||
| @@ -71,13 +71,13 @@ char *ASN1_dup(int (*i2d)(), char *(*d2i)(), char *x) | |||
| 71 | if (x == NULL) return(NULL); | 71 | if (x == NULL) return(NULL); |
| 72 | 72 | ||
| 73 | i=(long)i2d(x,NULL); | 73 | i=(long)i2d(x,NULL); |
| 74 | b=(unsigned char *)Malloc((unsigned int)i+10); | 74 | b=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
| 75 | if (b == NULL) | 75 | if (b == NULL) |
| 76 | { ASN1err(ASN1_F_ASN1_DUP,ERR_R_MALLOC_FAILURE); return(NULL); } | 76 | { ASN1err(ASN1_F_ASN1_DUP,ERR_R_MALLOC_FAILURE); return(NULL); } |
| 77 | p= b; | 77 | p= b; |
| 78 | i=i2d(x,&p); | 78 | i=i2d(x,&p); |
| 79 | p= b; | 79 | p= b; |
| 80 | ret=d2i(NULL,&p,i); | 80 | ret=d2i(NULL,&p,i); |
| 81 | Free(b); | 81 | OPENSSL_free(b); |
| 82 | return(ret); | 82 | return(ret); |
| 83 | } | 83 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_enum.c b/src/lib/libssl/src/crypto/asn1/a_enum.c index ccf62e5a04..1428d1df7a 100644 --- a/src/lib/libssl/src/crypto/asn1/a_enum.c +++ b/src/lib/libssl/src/crypto/asn1/a_enum.c | |||
| @@ -71,88 +71,28 @@ ASN1_ENUMERATED *ASN1_ENUMERATED_new(void) | |||
| 71 | void ASN1_ENUMERATED_free(ASN1_ENUMERATED *x) | 71 | void ASN1_ENUMERATED_free(ASN1_ENUMERATED *x) |
| 72 | { M_ASN1_ENUMERATED_free(x); } | 72 | { M_ASN1_ENUMERATED_free(x); } |
| 73 | 73 | ||
| 74 | int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **pp) | ||
| 75 | { | ||
| 76 | int pad=0,ret,r,i,t; | ||
| 77 | unsigned char *p,*n,pb=0; | ||
| 78 | |||
| 79 | if ((a == NULL) || (a->data == NULL)) return(0); | ||
| 80 | t=a->type; | ||
| 81 | if (a->length == 0) | ||
| 82 | ret=1; | ||
| 83 | else | ||
| 84 | { | ||
| 85 | ret=a->length; | ||
| 86 | i=a->data[0]; | ||
| 87 | if ((t == V_ASN1_ENUMERATED) && (i > 127)) { | ||
| 88 | pad=1; | ||
| 89 | pb=0; | ||
| 90 | } else if(t == V_ASN1_NEG_ENUMERATED) { | ||
| 91 | if(i>128) { | ||
| 92 | pad=1; | ||
| 93 | pb=0xFF; | ||
| 94 | } else if(i == 128) { | ||
| 95 | for(i = 1; i < a->length; i++) if(a->data[i]) { | ||
| 96 | pad=1; | ||
| 97 | pb=0xFF; | ||
| 98 | break; | ||
| 99 | } | ||
| 100 | } | ||
| 101 | } | ||
| 102 | ret+=pad; | ||
| 103 | } | ||
| 104 | r=ASN1_object_size(0,ret,V_ASN1_ENUMERATED); | ||
| 105 | if (pp == NULL) return(r); | ||
| 106 | p= *pp; | ||
| 107 | |||
| 108 | ASN1_put_object(&p,0,ret,V_ASN1_ENUMERATED,V_ASN1_UNIVERSAL); | ||
| 109 | if (pad) *(p++)=pb; | ||
| 110 | if (a->length == 0) | ||
| 111 | *(p++)=0; | ||
| 112 | else if (t == V_ASN1_ENUMERATED) | ||
| 113 | { | ||
| 114 | memcpy(p,a->data,(unsigned int)a->length); | ||
| 115 | p+=a->length; | ||
| 116 | } | ||
| 117 | else { | ||
| 118 | /* Begin at the end of the encoding */ | ||
| 119 | n=a->data + a->length - 1; | ||
| 120 | p += a->length - 1; | ||
| 121 | i = a->length; | ||
| 122 | /* Copy zeros to destination as long as source is zero */ | ||
| 123 | while(!*n) { | ||
| 124 | *(p--) = 0; | ||
| 125 | n--; | ||
| 126 | i--; | ||
| 127 | } | ||
| 128 | /* Complement and increment next octet */ | ||
| 129 | *(p--) = ((*(n--)) ^ 0xff) + 1; | ||
| 130 | i--; | ||
| 131 | /* Complement any octets left */ | ||
| 132 | for(;i > 0; i--) *(p--) = *(n--) ^ 0xff; | ||
| 133 | p += a->length; | ||
| 134 | } | ||
| 135 | 74 | ||
| 136 | *pp=p; | 75 | int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **pp) |
| 137 | return(r); | 76 | { |
| 77 | int len, ret; | ||
| 78 | if(!a) return 0; | ||
| 79 | len = i2c_ASN1_INTEGER(a, NULL); | ||
| 80 | ret=ASN1_object_size(0,len,V_ASN1_ENUMERATED); | ||
| 81 | if(pp) { | ||
| 82 | ASN1_put_object(pp,0,len,V_ASN1_ENUMERATED,V_ASN1_UNIVERSAL); | ||
| 83 | i2c_ASN1_INTEGER(a, pp); | ||
| 138 | } | 84 | } |
| 85 | return ret; | ||
| 86 | } | ||
| 139 | 87 | ||
| 140 | ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp, | 88 | ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp, |
| 141 | long length) | 89 | long length) |
| 142 | { | 90 | { |
| 143 | ASN1_ENUMERATED *ret=NULL; | 91 | unsigned char *p; |
| 144 | unsigned char *p,*to,*s; | ||
| 145 | long len; | 92 | long len; |
| 146 | int inf,tag,xclass; | ||
| 147 | int i; | 93 | int i; |
| 148 | 94 | int inf,tag,xclass; | |
| 149 | if ((a == NULL) || ((*a) == NULL)) | 95 | ASN1_ENUMERATED *ret; |
| 150 | { | ||
| 151 | if ((ret=M_ASN1_ENUMERATED_new()) == NULL) return(NULL); | ||
| 152 | ret->type=V_ASN1_ENUMERATED; | ||
| 153 | } | ||
| 154 | else | ||
| 155 | ret=(*a); | ||
| 156 | 96 | ||
| 157 | p= *pp; | 97 | p= *pp; |
| 158 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); | 98 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); |
| @@ -167,70 +107,17 @@ ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp, | |||
| 167 | i=ASN1_R_EXPECTING_AN_ENUMERATED; | 107 | i=ASN1_R_EXPECTING_AN_ENUMERATED; |
| 168 | goto err; | 108 | goto err; |
| 169 | } | 109 | } |
| 170 | 110 | ret = c2i_ASN1_INTEGER(a, &p, len); | |
| 171 | /* We must Malloc stuff, even for 0 bytes otherwise it | 111 | if(ret) { |
| 172 | * signifies a missing NULL parameter. */ | 112 | ret->type = (V_ASN1_NEG & ret->type) | V_ASN1_ENUMERATED; |
| 173 | s=(unsigned char *)Malloc((int)len+1); | 113 | *pp = p; |
| 174 | if (s == NULL) | ||
| 175 | { | ||
| 176 | i=ERR_R_MALLOC_FAILURE; | ||
| 177 | goto err; | ||
| 178 | } | ||
| 179 | to=s; | ||
| 180 | if(!len) { | ||
| 181 | /* Strictly speaking this is an illegal ENUMERATED but we | ||
| 182 | * tolerate it. | ||
| 183 | */ | ||
| 184 | ret->type=V_ASN1_ENUMERATED; | ||
| 185 | } else if (*p & 0x80) /* a negative number */ | ||
| 186 | { | ||
| 187 | ret->type=V_ASN1_NEG_ENUMERATED; | ||
| 188 | if ((*p == 0xff) && (len != 1)) { | ||
| 189 | p++; | ||
| 190 | len--; | ||
| 191 | } | ||
| 192 | i = len; | ||
| 193 | p += i - 1; | ||
| 194 | to += i - 1; | ||
| 195 | while((!*p) && i) { | ||
| 196 | *(to--) = 0; | ||
| 197 | i--; | ||
| 198 | p--; | ||
| 199 | } | ||
| 200 | if(!i) { | ||
| 201 | *s = 1; | ||
| 202 | s[len] = 0; | ||
| 203 | p += len; | ||
| 204 | len++; | ||
| 205 | } else { | ||
| 206 | *(to--) = (*(p--) ^ 0xff) + 1; | ||
| 207 | i--; | ||
| 208 | for(;i > 0; i--) *(to--) = *(p--) ^ 0xff; | ||
| 209 | p += len; | ||
| 210 | } | ||
| 211 | } else { | ||
| 212 | ret->type=V_ASN1_ENUMERATED; | ||
| 213 | if ((*p == 0) && (len != 1)) | ||
| 214 | { | ||
| 215 | p++; | ||
| 216 | len--; | ||
| 217 | } | ||
| 218 | memcpy(s,p,(int)len); | ||
| 219 | p+=len; | ||
| 220 | } | 114 | } |
| 221 | 115 | return ret; | |
| 222 | if (ret->data != NULL) Free(ret->data); | ||
| 223 | ret->data=s; | ||
| 224 | ret->length=(int)len; | ||
| 225 | if (a != NULL) (*a)=ret; | ||
| 226 | *pp=p; | ||
| 227 | return(ret); | ||
| 228 | err: | 116 | err: |
| 229 | ASN1err(ASN1_F_D2I_ASN1_ENUMERATED,i); | 117 | ASN1err(ASN1_F_D2I_ASN1_ENUMERATED,i); |
| 230 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) | ||
| 231 | M_ASN1_ENUMERATED_free(ret); | ||
| 232 | return(NULL); | 118 | return(NULL); |
| 233 | } | 119 | |
| 120 | } | ||
| 234 | 121 | ||
| 235 | int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) | 122 | int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) |
| 236 | { | 123 | { |
| @@ -242,8 +129,8 @@ int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) | |||
| 242 | if (a->length < (sizeof(long)+1)) | 129 | if (a->length < (sizeof(long)+1)) |
| 243 | { | 130 | { |
| 244 | if (a->data != NULL) | 131 | if (a->data != NULL) |
| 245 | Free(a->data); | 132 | OPENSSL_free(a->data); |
| 246 | if ((a->data=(unsigned char *)Malloc(sizeof(long)+1)) != NULL) | 133 | if ((a->data=(unsigned char *)OPENSSL_malloc(sizeof(long)+1)) != NULL) |
| 247 | memset((char *)a->data,0,sizeof(long)+1); | 134 | memset((char *)a->data,0,sizeof(long)+1); |
| 248 | } | 135 | } |
| 249 | if (a->data == NULL) | 136 | if (a->data == NULL) |
| @@ -318,7 +205,7 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai) | |||
| 318 | else ret->type=V_ASN1_ENUMERATED; | 205 | else ret->type=V_ASN1_ENUMERATED; |
| 319 | j=BN_num_bits(bn); | 206 | j=BN_num_bits(bn); |
| 320 | len=((j == 0)?0:((j/8)+1)); | 207 | len=((j == 0)?0:((j/8)+1)); |
| 321 | ret->data=(unsigned char *)Malloc(len+4); | 208 | ret->data=(unsigned char *)OPENSSL_malloc(len+4); |
| 322 | ret->length=BN_bn2bin(bn,ret->data); | 209 | ret->length=BN_bn2bin(bn,ret->data); |
| 323 | return(ret); | 210 | return(ret); |
| 324 | err: | 211 | err: |
| @@ -332,6 +219,6 @@ BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn) | |||
| 332 | 219 | ||
| 333 | if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL) | 220 | if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL) |
| 334 | ASN1err(ASN1_F_ASN1_ENUMERATED_TO_BN,ASN1_R_BN_LIB); | 221 | ASN1err(ASN1_F_ASN1_ENUMERATED_TO_BN,ASN1_R_BN_LIB); |
| 335 | if(ai->type == V_ASN1_NEG_ENUMERATED) bn->neg = 1; | 222 | else if(ai->type == V_ASN1_NEG_ENUMERATED) ret->neg = 1; |
| 336 | return(ret); | 223 | return(ret); |
| 337 | } | 224 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_gentm.c b/src/lib/libssl/src/crypto/asn1/a_gentm.c index 84062170e8..314479a03d 100644 --- a/src/lib/libssl/src/crypto/asn1/a_gentm.c +++ b/src/lib/libssl/src/crypto/asn1/a_gentm.c | |||
| @@ -212,10 +212,10 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, | |||
| 212 | p=(char *)s->data; | 212 | p=(char *)s->data; |
| 213 | if ((p == NULL) || (s->length < 16)) | 213 | if ((p == NULL) || (s->length < 16)) |
| 214 | { | 214 | { |
| 215 | p=Malloc(20); | 215 | p=OPENSSL_malloc(20); |
| 216 | if (p == NULL) return(NULL); | 216 | if (p == NULL) return(NULL); |
| 217 | if (s->data != NULL) | 217 | if (s->data != NULL) |
| 218 | Free(s->data); | 218 | OPENSSL_free(s->data); |
| 219 | s->data=(unsigned char *)p; | 219 | s->data=(unsigned char *)p; |
| 220 | } | 220 | } |
| 221 | 221 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_hdr.c b/src/lib/libssl/src/crypto/asn1/a_hdr.c index 434610e8e1..b1aad81f77 100644 --- a/src/lib/libssl/src/crypto/asn1/a_hdr.c +++ b/src/lib/libssl/src/crypto/asn1/a_hdr.c | |||
| @@ -115,5 +115,5 @@ void ASN1_HEADER_free(ASN1_HEADER *a) | |||
| 115 | M_ASN1_OCTET_STRING_free(a->header); | 115 | M_ASN1_OCTET_STRING_free(a->header); |
| 116 | if (a->meth != NULL) | 116 | if (a->meth != NULL) |
| 117 | a->meth->destroy(a->data); | 117 | a->meth->destroy(a->data); |
| 118 | Free(a); | 118 | OPENSSL_free(a); |
| 119 | } | 119 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_i2d_fp.c b/src/lib/libssl/src/crypto/asn1/a_i2d_fp.c index d9b8035e17..aee29a7790 100644 --- a/src/lib/libssl/src/crypto/asn1/a_i2d_fp.c +++ b/src/lib/libssl/src/crypto/asn1/a_i2d_fp.c | |||
| @@ -86,7 +86,7 @@ int ASN1_i2d_bio(int (*i2d)(), BIO *out, unsigned char *x) | |||
| 86 | int i,j=0,n,ret=1; | 86 | int i,j=0,n,ret=1; |
| 87 | 87 | ||
| 88 | n=i2d(x,NULL); | 88 | n=i2d(x,NULL); |
| 89 | b=(char *)Malloc(n); | 89 | b=(char *)OPENSSL_malloc(n); |
| 90 | if (b == NULL) | 90 | if (b == NULL) |
| 91 | { | 91 | { |
| 92 | ASN1err(ASN1_F_ASN1_I2D_BIO,ERR_R_MALLOC_FAILURE); | 92 | ASN1err(ASN1_F_ASN1_I2D_BIO,ERR_R_MALLOC_FAILURE); |
| @@ -108,6 +108,6 @@ int ASN1_i2d_bio(int (*i2d)(), BIO *out, unsigned char *x) | |||
| 108 | j+=i; | 108 | j+=i; |
| 109 | n-=i; | 109 | n-=i; |
| 110 | } | 110 | } |
| 111 | Free(b); | 111 | OPENSSL_free(b); |
| 112 | return(ret); | 112 | return(ret); |
| 113 | } | 113 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_int.c b/src/lib/libssl/src/crypto/asn1/a_int.c index 8b6794e8c1..6f0413f885 100644 --- a/src/lib/libssl/src/crypto/asn1/a_int.c +++ b/src/lib/libssl/src/crypto/asn1/a_int.c | |||
| @@ -72,8 +72,23 @@ ASN1_INTEGER *ASN1_INTEGER_dup(ASN1_INTEGER *x) | |||
| 72 | int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y) | 72 | int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y) |
| 73 | { return M_ASN1_INTEGER_cmp(x,y);} | 73 | { return M_ASN1_INTEGER_cmp(x,y);} |
| 74 | 74 | ||
| 75 | /* Output ASN1 INTEGER including tag+length */ | ||
| 76 | |||
| 77 | int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) | ||
| 78 | { | ||
| 79 | int len, ret; | ||
| 80 | if(!a) return 0; | ||
| 81 | len = i2c_ASN1_INTEGER(a, NULL); | ||
| 82 | ret=ASN1_object_size(0,len,V_ASN1_INTEGER); | ||
| 83 | if(pp) { | ||
| 84 | ASN1_put_object(pp,0,len,V_ASN1_INTEGER,V_ASN1_UNIVERSAL); | ||
| 85 | i2c_ASN1_INTEGER(a, pp); | ||
| 86 | } | ||
| 87 | return ret; | ||
| 88 | } | ||
| 89 | |||
| 75 | /* | 90 | /* |
| 76 | * This converts an ASN1 INTEGER into its DER encoding. | 91 | * This converts an ASN1 INTEGER into its content encoding. |
| 77 | * The internal representation is an ASN1_STRING whose data is a big endian | 92 | * The internal representation is an ASN1_STRING whose data is a big endian |
| 78 | * representation of the value, ignoring the sign. The sign is determined by | 93 | * representation of the value, ignoring the sign. The sign is determined by |
| 79 | * the type: V_ASN1_INTEGER for positive and V_ASN1_NEG_INTEGER for negative. | 94 | * the type: V_ASN1_INTEGER for positive and V_ASN1_NEG_INTEGER for negative. |
| @@ -97,23 +112,23 @@ int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y) | |||
| 97 | * followed by optional zeros isn't padded. | 112 | * followed by optional zeros isn't padded. |
| 98 | */ | 113 | */ |
| 99 | 114 | ||
| 100 | int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) | 115 | int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) |
| 101 | { | 116 | { |
| 102 | int pad=0,ret,r,i,t; | 117 | int pad=0,ret,i,neg; |
| 103 | unsigned char *p,*n,pb=0; | 118 | unsigned char *p,*n,pb=0; |
| 104 | 119 | ||
| 105 | if ((a == NULL) || (a->data == NULL)) return(0); | 120 | if ((a == NULL) || (a->data == NULL)) return(0); |
| 106 | t=a->type; | 121 | neg=a->type & V_ASN1_NEG; |
| 107 | if (a->length == 0) | 122 | if (a->length == 0) |
| 108 | ret=1; | 123 | ret=1; |
| 109 | else | 124 | else |
| 110 | { | 125 | { |
| 111 | ret=a->length; | 126 | ret=a->length; |
| 112 | i=a->data[0]; | 127 | i=a->data[0]; |
| 113 | if ((t == V_ASN1_INTEGER) && (i > 127)) { | 128 | if (!neg && (i > 127)) { |
| 114 | pad=1; | 129 | pad=1; |
| 115 | pb=0; | 130 | pb=0; |
| 116 | } else if(t == V_ASN1_NEG_INTEGER) { | 131 | } else if(neg) { |
| 117 | if(i>128) { | 132 | if(i>128) { |
| 118 | pad=1; | 133 | pad=1; |
| 119 | pb=0xFF; | 134 | pb=0xFF; |
| @@ -131,14 +146,12 @@ int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) | |||
| 131 | } | 146 | } |
| 132 | ret+=pad; | 147 | ret+=pad; |
| 133 | } | 148 | } |
| 134 | r=ASN1_object_size(0,ret,V_ASN1_INTEGER); | 149 | if (pp == NULL) return(ret); |
| 135 | if (pp == NULL) return(r); | ||
| 136 | p= *pp; | 150 | p= *pp; |
| 137 | 151 | ||
| 138 | ASN1_put_object(&p,0,ret,V_ASN1_INTEGER,V_ASN1_UNIVERSAL); | ||
| 139 | if (pad) *(p++)=pb; | 152 | if (pad) *(p++)=pb; |
| 140 | if (a->length == 0) *(p++)=0; | 153 | if (a->length == 0) *(p++)=0; |
| 141 | else if (t == V_ASN1_INTEGER) memcpy(p,a->data,(unsigned int)a->length); | 154 | else if (!neg) memcpy(p,a->data,(unsigned int)a->length); |
| 142 | else { | 155 | else { |
| 143 | /* Begin at the end of the encoding */ | 156 | /* Begin at the end of the encoding */ |
| 144 | n=a->data + a->length - 1; | 157 | n=a->data + a->length - 1; |
| @@ -157,30 +170,22 @@ int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) | |||
| 157 | for(;i > 0; i--) *(p--) = *(n--) ^ 0xff; | 170 | for(;i > 0; i--) *(p--) = *(n--) ^ 0xff; |
| 158 | } | 171 | } |
| 159 | 172 | ||
| 160 | *pp+=r; | 173 | *pp+=ret; |
| 161 | return(r); | 174 | return(ret); |
| 162 | } | 175 | } |
| 163 | 176 | ||
| 177 | /* Convert DER encoded ASN1 INTEGER to ASN1_INTEGER structure */ | ||
| 164 | ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp, | 178 | ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp, |
| 165 | long length) | 179 | long length) |
| 166 | { | 180 | { |
| 167 | ASN1_INTEGER *ret=NULL; | 181 | unsigned char *p; |
| 168 | unsigned char *p,*to,*s, *pend; | ||
| 169 | long len; | 182 | long len; |
| 170 | int inf,tag,xclass; | ||
| 171 | int i; | 183 | int i; |
| 172 | 184 | int inf,tag,xclass; | |
| 173 | if ((a == NULL) || ((*a) == NULL)) | 185 | ASN1_INTEGER *ret; |
| 174 | { | ||
| 175 | if ((ret=M_ASN1_INTEGER_new()) == NULL) return(NULL); | ||
| 176 | ret->type=V_ASN1_INTEGER; | ||
| 177 | } | ||
| 178 | else | ||
| 179 | ret=(*a); | ||
| 180 | 186 | ||
| 181 | p= *pp; | 187 | p= *pp; |
| 182 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); | 188 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); |
| 183 | pend = p + len; | ||
| 184 | if (inf & 0x80) | 189 | if (inf & 0x80) |
| 185 | { | 190 | { |
| 186 | i=ASN1_R_BAD_OBJECT_HEADER; | 191 | i=ASN1_R_BAD_OBJECT_HEADER; |
| @@ -192,10 +197,39 @@ ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp, | |||
| 192 | i=ASN1_R_EXPECTING_AN_INTEGER; | 197 | i=ASN1_R_EXPECTING_AN_INTEGER; |
| 193 | goto err; | 198 | goto err; |
| 194 | } | 199 | } |
| 200 | ret = c2i_ASN1_INTEGER(a, &p, len); | ||
| 201 | if(ret) *pp = p; | ||
| 202 | return ret; | ||
| 203 | err: | ||
| 204 | ASN1err(ASN1_F_D2I_ASN1_INTEGER,i); | ||
| 205 | return(NULL); | ||
| 206 | |||
| 207 | } | ||
| 208 | |||
| 209 | |||
| 210 | /* Convert just ASN1 INTEGER content octets to ASN1_INTEGER structure */ | ||
| 211 | |||
| 212 | ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp, | ||
| 213 | long len) | ||
| 214 | { | ||
| 215 | ASN1_INTEGER *ret=NULL; | ||
| 216 | unsigned char *p,*to,*s, *pend; | ||
| 217 | int i; | ||
| 218 | |||
| 219 | if ((a == NULL) || ((*a) == NULL)) | ||
| 220 | { | ||
| 221 | if ((ret=M_ASN1_INTEGER_new()) == NULL) return(NULL); | ||
| 222 | ret->type=V_ASN1_INTEGER; | ||
| 223 | } | ||
| 224 | else | ||
| 225 | ret=(*a); | ||
| 195 | 226 | ||
| 196 | /* We must Malloc stuff, even for 0 bytes otherwise it | 227 | p= *pp; |
| 228 | pend = p + len; | ||
| 229 | |||
| 230 | /* We must OPENSSL_malloc stuff, even for 0 bytes otherwise it | ||
| 197 | * signifies a missing NULL parameter. */ | 231 | * signifies a missing NULL parameter. */ |
| 198 | s=(unsigned char *)Malloc((int)len+1); | 232 | s=(unsigned char *)OPENSSL_malloc((int)len+1); |
| 199 | if (s == NULL) | 233 | if (s == NULL) |
| 200 | { | 234 | { |
| 201 | i=ERR_R_MALLOC_FAILURE; | 235 | i=ERR_R_MALLOC_FAILURE; |
| @@ -248,7 +282,7 @@ ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp, | |||
| 248 | memcpy(s,p,(int)len); | 282 | memcpy(s,p,(int)len); |
| 249 | } | 283 | } |
| 250 | 284 | ||
| 251 | if (ret->data != NULL) Free(ret->data); | 285 | if (ret->data != NULL) OPENSSL_free(ret->data); |
| 252 | ret->data=s; | 286 | ret->data=s; |
| 253 | ret->length=(int)len; | 287 | ret->length=(int)len; |
| 254 | if (a != NULL) (*a)=ret; | 288 | if (a != NULL) (*a)=ret; |
| @@ -261,6 +295,7 @@ err: | |||
| 261 | return(NULL); | 295 | return(NULL); |
| 262 | } | 296 | } |
| 263 | 297 | ||
| 298 | |||
| 264 | /* This is a version of d2i_ASN1_INTEGER that ignores the sign bit of | 299 | /* This is a version of d2i_ASN1_INTEGER that ignores the sign bit of |
| 265 | * ASN1 integers: some broken software can encode a positive INTEGER | 300 | * ASN1 integers: some broken software can encode a positive INTEGER |
| 266 | * with its MSB set as negative (it doesn't add a padding zero). | 301 | * with its MSB set as negative (it doesn't add a padding zero). |
| @@ -297,9 +332,9 @@ ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, unsigned char **pp, | |||
| 297 | goto err; | 332 | goto err; |
| 298 | } | 333 | } |
| 299 | 334 | ||
| 300 | /* We must Malloc stuff, even for 0 bytes otherwise it | 335 | /* We must OPENSSL_malloc stuff, even for 0 bytes otherwise it |
| 301 | * signifies a missing NULL parameter. */ | 336 | * signifies a missing NULL parameter. */ |
| 302 | s=(unsigned char *)Malloc((int)len+1); | 337 | s=(unsigned char *)OPENSSL_malloc((int)len+1); |
| 303 | if (s == NULL) | 338 | if (s == NULL) |
| 304 | { | 339 | { |
| 305 | i=ERR_R_MALLOC_FAILURE; | 340 | i=ERR_R_MALLOC_FAILURE; |
| @@ -317,7 +352,7 @@ ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, unsigned char **pp, | |||
| 317 | p+=len; | 352 | p+=len; |
| 318 | } | 353 | } |
| 319 | 354 | ||
| 320 | if (ret->data != NULL) Free(ret->data); | 355 | if (ret->data != NULL) OPENSSL_free(ret->data); |
| 321 | ret->data=s; | 356 | ret->data=s; |
| 322 | ret->length=(int)len; | 357 | ret->length=(int)len; |
| 323 | if (a != NULL) (*a)=ret; | 358 | if (a != NULL) (*a)=ret; |
| @@ -340,8 +375,8 @@ int ASN1_INTEGER_set(ASN1_INTEGER *a, long v) | |||
| 340 | if (a->length < (sizeof(long)+1)) | 375 | if (a->length < (sizeof(long)+1)) |
| 341 | { | 376 | { |
| 342 | if (a->data != NULL) | 377 | if (a->data != NULL) |
| 343 | Free(a->data); | 378 | OPENSSL_free(a->data); |
| 344 | if ((a->data=(unsigned char *)Malloc(sizeof(long)+1)) != NULL) | 379 | if ((a->data=(unsigned char *)OPENSSL_malloc(sizeof(long)+1)) != NULL) |
| 345 | memset((char *)a->data,0,sizeof(long)+1); | 380 | memset((char *)a->data,0,sizeof(long)+1); |
| 346 | } | 381 | } |
| 347 | if (a->data == NULL) | 382 | if (a->data == NULL) |
| @@ -416,7 +451,7 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai) | |||
| 416 | else ret->type=V_ASN1_INTEGER; | 451 | else ret->type=V_ASN1_INTEGER; |
| 417 | j=BN_num_bits(bn); | 452 | j=BN_num_bits(bn); |
| 418 | len=((j == 0)?0:((j/8)+1)); | 453 | len=((j == 0)?0:((j/8)+1)); |
| 419 | ret->data=(unsigned char *)Malloc(len+4); | 454 | ret->data=(unsigned char *)OPENSSL_malloc(len+4); |
| 420 | ret->length=BN_bn2bin(bn,ret->data); | 455 | ret->length=BN_bn2bin(bn,ret->data); |
| 421 | return(ret); | 456 | return(ret); |
| 422 | err: | 457 | err: |
| @@ -430,6 +465,9 @@ BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai, BIGNUM *bn) | |||
| 430 | 465 | ||
| 431 | if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL) | 466 | if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL) |
| 432 | ASN1err(ASN1_F_ASN1_INTEGER_TO_BN,ASN1_R_BN_LIB); | 467 | ASN1err(ASN1_F_ASN1_INTEGER_TO_BN,ASN1_R_BN_LIB); |
| 433 | if(ai->type == V_ASN1_NEG_INTEGER) bn->neg = 1; | 468 | else if(ai->type == V_ASN1_NEG_INTEGER) ret->neg = 1; |
| 434 | return(ret); | 469 | return(ret); |
| 435 | } | 470 | } |
| 471 | |||
| 472 | IMPLEMENT_STACK_OF(ASN1_INTEGER) | ||
| 473 | IMPLEMENT_ASN1_SET_OF(ASN1_INTEGER) | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_mbstr.c b/src/lib/libssl/src/crypto/asn1/a_mbstr.c index 7a710d5459..5d981c6553 100644 --- a/src/lib/libssl/src/crypto/asn1/a_mbstr.c +++ b/src/lib/libssl/src/crypto/asn1/a_mbstr.c | |||
| @@ -92,6 +92,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
| 92 | { | 92 | { |
| 93 | int str_type; | 93 | int str_type; |
| 94 | int ret; | 94 | int ret; |
| 95 | char free_out; | ||
| 95 | int outform, outlen; | 96 | int outform, outlen; |
| 96 | ASN1_STRING *dest; | 97 | ASN1_STRING *dest; |
| 97 | unsigned char *p; | 98 | unsigned char *p; |
| @@ -180,14 +181,16 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
| 180 | } | 181 | } |
| 181 | if(!out) return str_type; | 182 | if(!out) return str_type; |
| 182 | if(*out) { | 183 | if(*out) { |
| 184 | free_out = 0; | ||
| 183 | dest = *out; | 185 | dest = *out; |
| 184 | if(dest->data) { | 186 | if(dest->data) { |
| 185 | dest->length = 0; | 187 | dest->length = 0; |
| 186 | Free(dest->data); | 188 | OPENSSL_free(dest->data); |
| 187 | dest->data = NULL; | 189 | dest->data = NULL; |
| 188 | } | 190 | } |
| 189 | dest->type = str_type; | 191 | dest->type = str_type; |
| 190 | } else { | 192 | } else { |
| 193 | free_out = 1; | ||
| 191 | dest = ASN1_STRING_type_new(str_type); | 194 | dest = ASN1_STRING_type_new(str_type); |
| 192 | if(!dest) { | 195 | if(!dest) { |
| 193 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, | 196 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, |
| @@ -228,8 +231,8 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
| 228 | cpyfunc = cpy_utf8; | 231 | cpyfunc = cpy_utf8; |
| 229 | break; | 232 | break; |
| 230 | } | 233 | } |
| 231 | if(!(p = Malloc(outlen + 1))) { | 234 | if(!(p = OPENSSL_malloc(outlen + 1))) { |
| 232 | ASN1_STRING_free(dest); | 235 | if(free_out) ASN1_STRING_free(dest); |
| 233 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY,ERR_R_MALLOC_FAILURE); | 236 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY,ERR_R_MALLOC_FAILURE); |
| 234 | return -1; | 237 | return -1; |
| 235 | } | 238 | } |
| @@ -258,8 +261,8 @@ static int traverse_string(const unsigned char *p, int len, int inform, | |||
| 258 | value |= *p++; | 261 | value |= *p++; |
| 259 | len -= 2; | 262 | len -= 2; |
| 260 | } else if(inform == MBSTRING_UNIV) { | 263 | } else if(inform == MBSTRING_UNIV) { |
| 261 | value = *p++ << 24; | 264 | value = ((unsigned long)*p++) << 24; |
| 262 | value |= *p++ << 16; | 265 | value |= ((unsigned long)*p++) << 16; |
| 263 | value |= *p++ << 8; | 266 | value |= *p++ << 8; |
| 264 | value |= *p++; | 267 | value |= *p++; |
| 265 | len -= 4; | 268 | len -= 4; |
| @@ -382,9 +385,16 @@ static int is_printable(unsigned long value) | |||
| 382 | /* Note: we can't use 'isalnum' because certain accented | 385 | /* Note: we can't use 'isalnum' because certain accented |
| 383 | * characters may count as alphanumeric in some environments. | 386 | * characters may count as alphanumeric in some environments. |
| 384 | */ | 387 | */ |
| 388 | #ifndef CHARSET_EBCDIC | ||
| 385 | if((ch >= 'a') && (ch <= 'z')) return 1; | 389 | if((ch >= 'a') && (ch <= 'z')) return 1; |
| 386 | if((ch >= 'A') && (ch <= 'Z')) return 1; | 390 | if((ch >= 'A') && (ch <= 'Z')) return 1; |
| 387 | if((ch >= '0') && (ch <= '9')) return 1; | 391 | if((ch >= '0') && (ch <= '9')) return 1; |
| 388 | if ((ch == ' ') || strchr("'()+,-./:=?", ch)) return 1; | 392 | if ((ch == ' ') || strchr("'()+,-./:=?", ch)) return 1; |
| 393 | #else /*CHARSET_EBCDIC*/ | ||
| 394 | if((ch >= os_toascii['a']) && (ch <= os_toascii['z'])) return 1; | ||
| 395 | if((ch >= os_toascii['A']) && (ch <= os_toascii['Z'])) return 1; | ||
| 396 | if((ch >= os_toascii['0']) && (ch <= os_toascii['9'])) return 1; | ||
| 397 | if ((ch == os_toascii[' ']) || strchr("'()+,-./:=?", os_toebcdic[ch])) return 1; | ||
| 398 | #endif /*CHARSET_EBCDIC*/ | ||
| 389 | return 0; | 399 | return 0; |
| 390 | } | 400 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_object.c b/src/lib/libssl/src/crypto/asn1/a_object.c index 09d56fb669..20caa2d3bd 100644 --- a/src/lib/libssl/src/crypto/asn1/a_object.c +++ b/src/lib/libssl/src/crypto/asn1/a_object.c | |||
| @@ -65,11 +65,12 @@ | |||
| 65 | int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp) | 65 | int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp) |
| 66 | { | 66 | { |
| 67 | unsigned char *p; | 67 | unsigned char *p; |
| 68 | int objsize; | ||
| 68 | 69 | ||
| 69 | if ((a == NULL) || (a->data == NULL)) return(0); | 70 | if ((a == NULL) || (a->data == NULL)) return(0); |
| 70 | 71 | ||
| 71 | if (pp == NULL) | 72 | objsize = ASN1_object_size(0,a->length,V_ASN1_OBJECT); |
| 72 | return(ASN1_object_size(0,a->length,V_ASN1_OBJECT)); | 73 | if (pp == NULL) return objsize; |
| 73 | 74 | ||
| 74 | p= *pp; | 75 | p= *pp; |
| 75 | ASN1_put_object(&p,0,a->length,V_ASN1_OBJECT,V_ASN1_UNIVERSAL); | 76 | ASN1_put_object(&p,0,a->length,V_ASN1_OBJECT,V_ASN1_UNIVERSAL); |
| @@ -77,7 +78,7 @@ int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp) | |||
| 77 | p+=a->length; | 78 | p+=a->length; |
| 78 | 79 | ||
| 79 | *pp=p; | 80 | *pp=p; |
| 80 | return(a->length); | 81 | return(objsize); |
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num) | 84 | int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num) |
| @@ -190,24 +191,13 @@ int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a) | |||
| 190 | 191 | ||
| 191 | ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp, | 192 | ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp, |
| 192 | long length) | 193 | long length) |
| 193 | { | 194 | { |
| 194 | ASN1_OBJECT *ret=NULL; | ||
| 195 | unsigned char *p; | 195 | unsigned char *p; |
| 196 | long len; | 196 | long len; |
| 197 | int tag,xclass; | 197 | int tag,xclass; |
| 198 | int inf,i; | 198 | int inf,i; |
| 199 | 199 | ASN1_OBJECT *ret = NULL; | |
| 200 | /* only the ASN1_OBJECTs from the 'table' will have values | ||
| 201 | * for ->sn or ->ln */ | ||
| 202 | if ((a == NULL) || ((*a) == NULL) || | ||
| 203 | !((*a)->flags & ASN1_OBJECT_FLAG_DYNAMIC)) | ||
| 204 | { | ||
| 205 | if ((ret=ASN1_OBJECT_new()) == NULL) return(NULL); | ||
| 206 | } | ||
| 207 | else ret=(*a); | ||
| 208 | |||
| 209 | p= *pp; | 200 | p= *pp; |
| 210 | |||
| 211 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); | 201 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); |
| 212 | if (inf & 0x80) | 202 | if (inf & 0x80) |
| 213 | { | 203 | { |
| @@ -220,10 +210,36 @@ ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp, | |||
| 220 | i=ASN1_R_EXPECTING_AN_OBJECT; | 210 | i=ASN1_R_EXPECTING_AN_OBJECT; |
| 221 | goto err; | 211 | goto err; |
| 222 | } | 212 | } |
| 213 | ret = c2i_ASN1_OBJECT(a, &p, len); | ||
| 214 | if(ret) *pp = p; | ||
| 215 | return ret; | ||
| 216 | err: | ||
| 217 | ASN1err(ASN1_F_D2I_ASN1_OBJECT,i); | ||
| 218 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) | ||
| 219 | ASN1_OBJECT_free(ret); | ||
| 220 | return(NULL); | ||
| 221 | } | ||
| 222 | ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp, | ||
| 223 | long len) | ||
| 224 | { | ||
| 225 | ASN1_OBJECT *ret=NULL; | ||
| 226 | unsigned char *p; | ||
| 227 | int i; | ||
| 228 | |||
| 229 | /* only the ASN1_OBJECTs from the 'table' will have values | ||
| 230 | * for ->sn or ->ln */ | ||
| 231 | if ((a == NULL) || ((*a) == NULL) || | ||
| 232 | !((*a)->flags & ASN1_OBJECT_FLAG_DYNAMIC)) | ||
| 233 | { | ||
| 234 | if ((ret=ASN1_OBJECT_new()) == NULL) return(NULL); | ||
| 235 | } | ||
| 236 | else ret=(*a); | ||
| 237 | |||
| 238 | p= *pp; | ||
| 223 | if ((ret->data == NULL) || (ret->length < len)) | 239 | if ((ret->data == NULL) || (ret->length < len)) |
| 224 | { | 240 | { |
| 225 | if (ret->data != NULL) Free(ret->data); | 241 | if (ret->data != NULL) OPENSSL_free(ret->data); |
| 226 | ret->data=(unsigned char *)Malloc(len ? (int)len : 1); | 242 | ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); |
| 227 | ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; | 243 | ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; |
| 228 | if (ret->data == NULL) | 244 | if (ret->data == NULL) |
| 229 | { i=ERR_R_MALLOC_FAILURE; goto err; } | 245 | { i=ERR_R_MALLOC_FAILURE; goto err; } |
| @@ -249,7 +265,7 @@ ASN1_OBJECT *ASN1_OBJECT_new(void) | |||
| 249 | { | 265 | { |
| 250 | ASN1_OBJECT *ret; | 266 | ASN1_OBJECT *ret; |
| 251 | 267 | ||
| 252 | ret=(ASN1_OBJECT *)Malloc(sizeof(ASN1_OBJECT)); | 268 | ret=(ASN1_OBJECT *)OPENSSL_malloc(sizeof(ASN1_OBJECT)); |
| 253 | if (ret == NULL) | 269 | if (ret == NULL) |
| 254 | { | 270 | { |
| 255 | ASN1err(ASN1_F_ASN1_OBJECT_NEW,ERR_R_MALLOC_FAILURE); | 271 | ASN1err(ASN1_F_ASN1_OBJECT_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -270,19 +286,19 @@ void ASN1_OBJECT_free(ASN1_OBJECT *a) | |||
| 270 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) | 286 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) |
| 271 | { | 287 | { |
| 272 | #ifndef CONST_STRICT /* disable purely for compile-time strict const checking. Doing this on a "real" compile will cause memory leaks */ | 288 | #ifndef CONST_STRICT /* disable purely for compile-time strict const checking. Doing this on a "real" compile will cause memory leaks */ |
| 273 | if (a->sn != NULL) Free((void *)a->sn); | 289 | if (a->sn != NULL) OPENSSL_free((void *)a->sn); |
| 274 | if (a->ln != NULL) Free((void *)a->ln); | 290 | if (a->ln != NULL) OPENSSL_free((void *)a->ln); |
| 275 | #endif | 291 | #endif |
| 276 | a->sn=a->ln=NULL; | 292 | a->sn=a->ln=NULL; |
| 277 | } | 293 | } |
| 278 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) | 294 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) |
| 279 | { | 295 | { |
| 280 | if (a->data != NULL) Free(a->data); | 296 | if (a->data != NULL) OPENSSL_free(a->data); |
| 281 | a->data=NULL; | 297 | a->data=NULL; |
| 282 | a->length=0; | 298 | a->length=0; |
| 283 | } | 299 | } |
| 284 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC) | 300 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC) |
| 285 | Free(a); | 301 | OPENSSL_free(a); |
| 286 | } | 302 | } |
| 287 | 303 | ||
| 288 | ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len, | 304 | ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len, |
diff --git a/src/lib/libssl/src/crypto/asn1/a_set.c b/src/lib/libssl/src/crypto/asn1/a_set.c index c2481e7597..caf5a1419c 100644 --- a/src/lib/libssl/src/crypto/asn1/a_set.c +++ b/src/lib/libssl/src/crypto/asn1/a_set.c | |||
| @@ -116,7 +116,7 @@ int i2d_ASN1_SET(STACK *a, unsigned char **pp, int (*func)(), int ex_tag, | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | pStart = p; /* Catch the beg of Setblobs*/ | 118 | pStart = p; /* Catch the beg of Setblobs*/ |
| 119 | rgSetBlob = (MYBLOB *)Malloc( sk_num(a) * sizeof(MYBLOB)); /* In this array | 119 | rgSetBlob = (MYBLOB *)OPENSSL_malloc( sk_num(a) * sizeof(MYBLOB)); /* In this array |
| 120 | we will store the SET blobs */ | 120 | we will store the SET blobs */ |
| 121 | 121 | ||
| 122 | for (i=0; i<sk_num(a); i++) | 122 | for (i=0; i<sk_num(a); i++) |
| @@ -133,7 +133,7 @@ SetBlob | |||
| 133 | /* Now we have to sort the blobs. I am using a simple algo. | 133 | /* Now we have to sort the blobs. I am using a simple algo. |
| 134 | *Sort ptrs *Copy to temp-mem *Copy from temp-mem to user-mem*/ | 134 | *Sort ptrs *Copy to temp-mem *Copy from temp-mem to user-mem*/ |
| 135 | qsort( rgSetBlob, sk_num(a), sizeof(MYBLOB), SetBlobCmp); | 135 | qsort( rgSetBlob, sk_num(a), sizeof(MYBLOB), SetBlobCmp); |
| 136 | pTempMem = Malloc(totSize); | 136 | pTempMem = OPENSSL_malloc(totSize); |
| 137 | 137 | ||
| 138 | /* Copy to temp mem */ | 138 | /* Copy to temp mem */ |
| 139 | p = pTempMem; | 139 | p = pTempMem; |
| @@ -145,20 +145,20 @@ SetBlob | |||
| 145 | 145 | ||
| 146 | /* Copy back to user mem*/ | 146 | /* Copy back to user mem*/ |
| 147 | memcpy(pStart, pTempMem, totSize); | 147 | memcpy(pStart, pTempMem, totSize); |
| 148 | Free(pTempMem); | 148 | OPENSSL_free(pTempMem); |
| 149 | Free(rgSetBlob); | 149 | OPENSSL_free(rgSetBlob); |
| 150 | 150 | ||
| 151 | return(r); | 151 | return(r); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length, | 154 | STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length, |
| 155 | char *(*func)(), void (*free_func)(), int ex_tag, int ex_class) | 155 | char *(*func)(), void (*free_func)(void *), int ex_tag, int ex_class) |
| 156 | { | 156 | { |
| 157 | ASN1_CTX c; | 157 | ASN1_CTX c; |
| 158 | STACK *ret=NULL; | 158 | STACK *ret=NULL; |
| 159 | 159 | ||
| 160 | if ((a == NULL) || ((*a) == NULL)) | 160 | if ((a == NULL) || ((*a) == NULL)) |
| 161 | { if ((ret=sk_new(NULL)) == NULL) goto err; } | 161 | { if ((ret=sk_new_null()) == NULL) goto err; } |
| 162 | else | 162 | else |
| 163 | ret=(*a); | 163 | ret=(*a); |
| 164 | 164 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_sign.c b/src/lib/libssl/src/crypto/asn1/a_sign.c index cfb4bca4f1..4c651706d2 100644 --- a/src/lib/libssl/src/crypto/asn1/a_sign.c +++ b/src/lib/libssl/src/crypto/asn1/a_sign.c | |||
| @@ -108,9 +108,9 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2, | |||
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| 110 | inl=i2d(data,NULL); | 110 | inl=i2d(data,NULL); |
| 111 | buf_in=(unsigned char *)Malloc((unsigned int)inl); | 111 | buf_in=(unsigned char *)OPENSSL_malloc((unsigned int)inl); |
| 112 | outll=outl=EVP_PKEY_size(pkey); | 112 | outll=outl=EVP_PKEY_size(pkey); |
| 113 | buf_out=(unsigned char *)Malloc((unsigned int)outl); | 113 | buf_out=(unsigned char *)OPENSSL_malloc((unsigned int)outl); |
| 114 | if ((buf_in == NULL) || (buf_out == NULL)) | 114 | if ((buf_in == NULL) || (buf_out == NULL)) |
| 115 | { | 115 | { |
| 116 | outl=0; | 116 | outl=0; |
| @@ -129,7 +129,7 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2, | |||
| 129 | ASN1err(ASN1_F_ASN1_SIGN,ERR_R_EVP_LIB); | 129 | ASN1err(ASN1_F_ASN1_SIGN,ERR_R_EVP_LIB); |
| 130 | goto err; | 130 | goto err; |
| 131 | } | 131 | } |
| 132 | if (signature->data != NULL) Free(signature->data); | 132 | if (signature->data != NULL) OPENSSL_free(signature->data); |
| 133 | signature->data=buf_out; | 133 | signature->data=buf_out; |
| 134 | buf_out=NULL; | 134 | buf_out=NULL; |
| 135 | signature->length=outl; | 135 | signature->length=outl; |
| @@ -141,8 +141,8 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2, | |||
| 141 | err: | 141 | err: |
| 142 | memset(&ctx,0,sizeof(ctx)); | 142 | memset(&ctx,0,sizeof(ctx)); |
| 143 | if (buf_in != NULL) | 143 | if (buf_in != NULL) |
| 144 | { memset((char *)buf_in,0,(unsigned int)inl); Free(buf_in); } | 144 | { memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); } |
| 145 | if (buf_out != NULL) | 145 | if (buf_out != NULL) |
| 146 | { memset((char *)buf_out,0,outll); Free(buf_out); } | 146 | { memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); } |
| 147 | return(outl); | 147 | return(outl); |
| 148 | } | 148 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_strex.c b/src/lib/libssl/src/crypto/asn1/a_strex.c new file mode 100644 index 0000000000..569b811998 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/a_strex.c | |||
| @@ -0,0 +1,533 @@ | |||
| 1 | /* a_strex.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <openssl/crypto.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | #include <openssl/asn1.h> | ||
| 64 | |||
| 65 | #include "charmap.h" | ||
| 66 | |||
| 67 | /* ASN1_STRING_print_ex() and X509_NAME_print_ex(). | ||
| 68 | * Enhanced string and name printing routines handling | ||
| 69 | * multibyte characters, RFC2253 and a host of other | ||
| 70 | * options. | ||
| 71 | */ | ||
| 72 | |||
| 73 | |||
| 74 | #define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253) | ||
| 75 | |||
| 76 | |||
| 77 | /* Three IO functions for sending data to memory, a BIO and | ||
| 78 | * and a FILE pointer. | ||
| 79 | */ | ||
| 80 | |||
| 81 | int send_mem_chars(void *arg, const void *buf, int len) | ||
| 82 | { | ||
| 83 | unsigned char **out = arg; | ||
| 84 | if(!out) return 1; | ||
| 85 | memcpy(*out, buf, len); | ||
| 86 | *out += len; | ||
| 87 | return 1; | ||
| 88 | } | ||
| 89 | |||
| 90 | int send_bio_chars(void *arg, const void *buf, int len) | ||
| 91 | { | ||
| 92 | if(!arg) return 1; | ||
| 93 | if(BIO_write(arg, buf, len) != len) return 0; | ||
| 94 | return 1; | ||
| 95 | } | ||
| 96 | |||
| 97 | int send_fp_chars(void *arg, const void *buf, int len) | ||
| 98 | { | ||
| 99 | if(!arg) return 1; | ||
| 100 | if(fwrite(buf, 1, len, arg) != (unsigned int)len) return 0; | ||
| 101 | return 1; | ||
| 102 | } | ||
| 103 | |||
| 104 | typedef int char_io(void *arg, const void *buf, int len); | ||
| 105 | |||
| 106 | /* This function handles display of | ||
| 107 | * strings, one character at a time. | ||
| 108 | * It is passed an unsigned long for each | ||
| 109 | * character because it could come from 2 or even | ||
| 110 | * 4 byte forms. | ||
| 111 | */ | ||
| 112 | |||
| 113 | static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, char_io *io_ch, void *arg) | ||
| 114 | { | ||
| 115 | unsigned char chflgs, chtmp; | ||
| 116 | char tmphex[11]; | ||
| 117 | if(c > 0xffff) { | ||
| 118 | BIO_snprintf(tmphex, 11, "\\W%08lX", c); | ||
| 119 | if(!io_ch(arg, tmphex, 10)) return -1; | ||
| 120 | return 10; | ||
| 121 | } | ||
| 122 | if(c > 0xff) { | ||
| 123 | BIO_snprintf(tmphex, 11, "\\U%04lX", c); | ||
| 124 | if(!io_ch(arg, tmphex, 6)) return -1; | ||
| 125 | return 6; | ||
| 126 | } | ||
| 127 | chtmp = (unsigned char)c; | ||
| 128 | if(chtmp > 0x7f) chflgs = flags & ASN1_STRFLGS_ESC_MSB; | ||
| 129 | else chflgs = char_type[chtmp] & flags; | ||
| 130 | if(chflgs & CHARTYPE_BS_ESC) { | ||
| 131 | /* If we don't escape with quotes, signal we need quotes */ | ||
| 132 | if(chflgs & ASN1_STRFLGS_ESC_QUOTE) { | ||
| 133 | if(do_quotes) *do_quotes = 1; | ||
| 134 | if(!io_ch(arg, &chtmp, 1)) return -1; | ||
| 135 | return 1; | ||
| 136 | } | ||
| 137 | if(!io_ch(arg, "\\", 1)) return -1; | ||
| 138 | if(!io_ch(arg, &chtmp, 1)) return -1; | ||
| 139 | return 2; | ||
| 140 | } | ||
| 141 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { | ||
| 142 | BIO_snprintf(tmphex, 11, "\\%02X", chtmp); | ||
| 143 | if(!io_ch(arg, tmphex, 3)) return -1; | ||
| 144 | return 3; | ||
| 145 | } | ||
| 146 | if(!io_ch(arg, &chtmp, 1)) return -1; | ||
| 147 | return 1; | ||
| 148 | } | ||
| 149 | |||
| 150 | #define BUF_TYPE_WIDTH_MASK 0x7 | ||
| 151 | #define BUF_TYPE_CONVUTF8 0x8 | ||
| 152 | |||
| 153 | /* This function sends each character in a buffer to | ||
| 154 | * do_esc_char(). It interprets the content formats | ||
| 155 | * and converts to or from UTF8 as appropriate. | ||
| 156 | */ | ||
| 157 | |||
| 158 | static int do_buf(unsigned char *buf, int buflen, | ||
| 159 | int type, unsigned char flags, char *quotes, char_io *io_ch, void *arg) | ||
| 160 | { | ||
| 161 | int i, outlen, len; | ||
| 162 | unsigned char orflags, *p, *q; | ||
| 163 | unsigned long c; | ||
| 164 | p = buf; | ||
| 165 | q = buf + buflen; | ||
| 166 | outlen = 0; | ||
| 167 | while(p != q) { | ||
| 168 | if(p == buf) orflags = CHARTYPE_FIRST_ESC_2253; | ||
| 169 | else orflags = 0; | ||
| 170 | switch(type & BUF_TYPE_WIDTH_MASK) { | ||
| 171 | case 4: | ||
| 172 | c = ((unsigned long)*p++) << 24; | ||
| 173 | c |= ((unsigned long)*p++) << 16; | ||
| 174 | c |= ((unsigned long)*p++) << 8; | ||
| 175 | c |= *p++; | ||
| 176 | break; | ||
| 177 | |||
| 178 | case 2: | ||
| 179 | c = ((unsigned long)*p++) << 8; | ||
| 180 | c |= *p++; | ||
| 181 | break; | ||
| 182 | |||
| 183 | case 1: | ||
| 184 | c = *p++; | ||
| 185 | break; | ||
| 186 | |||
| 187 | case 0: | ||
| 188 | i = UTF8_getc(p, buflen, &c); | ||
| 189 | if(i < 0) return -1; /* Invalid UTF8String */ | ||
| 190 | p += i; | ||
| 191 | break; | ||
| 192 | } | ||
| 193 | if (p == q) orflags = CHARTYPE_LAST_ESC_2253; | ||
| 194 | if(type & BUF_TYPE_CONVUTF8) { | ||
| 195 | unsigned char utfbuf[6]; | ||
| 196 | int utflen; | ||
| 197 | utflen = UTF8_putc(utfbuf, 6, c); | ||
| 198 | for(i = 0; i < utflen; i++) { | ||
| 199 | /* We don't need to worry about setting orflags correctly | ||
| 200 | * because if utflen==1 its value will be correct anyway | ||
| 201 | * otherwise each character will be > 0x7f and so the | ||
| 202 | * character will never be escaped on first and last. | ||
| 203 | */ | ||
| 204 | len = do_esc_char(utfbuf[i], (unsigned char)(flags | orflags), quotes, io_ch, arg); | ||
| 205 | if(len < 0) return -1; | ||
| 206 | outlen += len; | ||
| 207 | } | ||
| 208 | } else { | ||
| 209 | len = do_esc_char(c, (unsigned char)(flags | orflags), quotes, io_ch, arg); | ||
| 210 | if(len < 0) return -1; | ||
| 211 | outlen += len; | ||
| 212 | } | ||
| 213 | } | ||
| 214 | return outlen; | ||
| 215 | } | ||
| 216 | |||
| 217 | /* This function hex dumps a buffer of characters */ | ||
| 218 | |||
| 219 | static int do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf, int buflen) | ||
| 220 | { | ||
| 221 | const static char hexdig[] = "0123456789ABCDEF"; | ||
| 222 | unsigned char *p, *q; | ||
| 223 | char hextmp[2]; | ||
| 224 | if(arg) { | ||
| 225 | p = buf; | ||
| 226 | q = buf + buflen; | ||
| 227 | while(p != q) { | ||
| 228 | hextmp[0] = hexdig[*p >> 4]; | ||
| 229 | hextmp[1] = hexdig[*p & 0xf]; | ||
| 230 | if(!io_ch(arg, hextmp, 2)) return -1; | ||
| 231 | p++; | ||
| 232 | } | ||
| 233 | } | ||
| 234 | return buflen << 1; | ||
| 235 | } | ||
| 236 | |||
| 237 | /* "dump" a string. This is done when the type is unknown, | ||
| 238 | * or the flags request it. We can either dump the content | ||
| 239 | * octets or the entire DER encoding. This uses the RFC2253 | ||
| 240 | * #01234 format. | ||
| 241 | */ | ||
| 242 | |||
| 243 | int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING *str) | ||
| 244 | { | ||
| 245 | /* Placing the ASN1_STRING in a temp ASN1_TYPE allows | ||
| 246 | * the DER encoding to readily obtained | ||
| 247 | */ | ||
| 248 | ASN1_TYPE t; | ||
| 249 | unsigned char *der_buf, *p; | ||
| 250 | int outlen, der_len; | ||
| 251 | |||
| 252 | if(!io_ch(arg, "#", 1)) return -1; | ||
| 253 | /* If we don't dump DER encoding just dump content octets */ | ||
| 254 | if(!(lflags & ASN1_STRFLGS_DUMP_DER)) { | ||
| 255 | outlen = do_hex_dump(io_ch, arg, str->data, str->length); | ||
| 256 | if(outlen < 0) return -1; | ||
| 257 | return outlen + 1; | ||
| 258 | } | ||
| 259 | t.type = str->type; | ||
| 260 | t.value.ptr = (char *)str; | ||
| 261 | der_len = i2d_ASN1_TYPE(&t, NULL); | ||
| 262 | der_buf = OPENSSL_malloc(der_len); | ||
| 263 | if(!der_buf) return -1; | ||
| 264 | p = der_buf; | ||
| 265 | i2d_ASN1_TYPE(&t, &p); | ||
| 266 | outlen = do_hex_dump(io_ch, arg, der_buf, der_len); | ||
| 267 | OPENSSL_free(der_buf); | ||
| 268 | if(outlen < 0) return -1; | ||
| 269 | return outlen + 1; | ||
| 270 | } | ||
| 271 | |||
| 272 | /* Lookup table to convert tags to character widths, | ||
| 273 | * 0 = UTF8 encoded, -1 is used for non string types | ||
| 274 | * otherwise it is the number of bytes per character | ||
| 275 | */ | ||
| 276 | |||
| 277 | const static char tag2nbyte[] = { | ||
| 278 | -1, -1, -1, -1, -1, /* 0-4 */ | ||
| 279 | -1, -1, -1, -1, -1, /* 5-9 */ | ||
| 280 | -1, -1, 0, -1, /* 10-13 */ | ||
| 281 | -1, -1, -1, -1, /* 15-17 */ | ||
| 282 | -1, 1, 1, /* 18-20 */ | ||
| 283 | -1, 1, -1,-1, /* 21-24 */ | ||
| 284 | -1, 1, -1, /* 25-27 */ | ||
| 285 | 4, -1, 2 /* 28-30 */ | ||
| 286 | }; | ||
| 287 | |||
| 288 | #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \ | ||
| 289 | ASN1_STRFLGS_ESC_QUOTE | \ | ||
| 290 | ASN1_STRFLGS_ESC_CTRL | \ | ||
| 291 | ASN1_STRFLGS_ESC_MSB) | ||
| 292 | |||
| 293 | /* This is the main function, print out an | ||
| 294 | * ASN1_STRING taking note of various escape | ||
| 295 | * and display options. Returns number of | ||
| 296 | * characters written or -1 if an error | ||
| 297 | * occurred. | ||
| 298 | */ | ||
| 299 | |||
| 300 | static int do_print_ex(char_io *io_ch, void *arg, unsigned long lflags, ASN1_STRING *str) | ||
| 301 | { | ||
| 302 | int outlen, len; | ||
| 303 | int type; | ||
| 304 | char quotes; | ||
| 305 | unsigned char flags; | ||
| 306 | quotes = 0; | ||
| 307 | /* Keep a copy of escape flags */ | ||
| 308 | flags = (unsigned char)(lflags & ESC_FLAGS); | ||
| 309 | |||
| 310 | type = str->type; | ||
| 311 | |||
| 312 | outlen = 0; | ||
| 313 | |||
| 314 | |||
| 315 | if(lflags & ASN1_STRFLGS_SHOW_TYPE) { | ||
| 316 | const char *tagname; | ||
| 317 | tagname = ASN1_tag2str(type); | ||
| 318 | outlen += strlen(tagname); | ||
| 319 | if(!io_ch(arg, tagname, outlen) || !io_ch(arg, ":", 1)) return -1; | ||
| 320 | outlen++; | ||
| 321 | } | ||
| 322 | |||
| 323 | /* Decide what to do with type, either dump content or display it */ | ||
| 324 | |||
| 325 | /* Dump everything */ | ||
| 326 | if(lflags & ASN1_STRFLGS_DUMP_ALL) type = -1; | ||
| 327 | /* Ignore the string type */ | ||
| 328 | else if(lflags & ASN1_STRFLGS_IGNORE_TYPE) type = 1; | ||
| 329 | else { | ||
| 330 | /* Else determine width based on type */ | ||
| 331 | if((type > 0) && (type < 31)) type = tag2nbyte[type]; | ||
| 332 | else type = -1; | ||
| 333 | if((type == -1) && !(lflags & ASN1_STRFLGS_DUMP_UNKNOWN)) type = 1; | ||
| 334 | } | ||
| 335 | |||
| 336 | if(type == -1) { | ||
| 337 | len = do_dump(lflags, io_ch, arg, str); | ||
| 338 | if(len < 0) return -1; | ||
| 339 | outlen += len; | ||
| 340 | return outlen; | ||
| 341 | } | ||
| 342 | |||
| 343 | if(lflags & ASN1_STRFLGS_UTF8_CONVERT) { | ||
| 344 | /* Note: if string is UTF8 and we want | ||
| 345 | * to convert to UTF8 then we just interpret | ||
| 346 | * it as 1 byte per character to avoid converting | ||
| 347 | * twice. | ||
| 348 | */ | ||
| 349 | if(!type) type = 1; | ||
| 350 | else type |= BUF_TYPE_CONVUTF8; | ||
| 351 | } | ||
| 352 | |||
| 353 | len = do_buf(str->data, str->length, type, flags, "es, io_ch, NULL); | ||
| 354 | if(outlen < 0) return -1; | ||
| 355 | outlen += len; | ||
| 356 | if(quotes) outlen += 2; | ||
| 357 | if(!arg) return outlen; | ||
| 358 | if(quotes && !io_ch(arg, "\"", 1)) return -1; | ||
| 359 | do_buf(str->data, str->length, type, flags, NULL, io_ch, arg); | ||
| 360 | if(quotes && !io_ch(arg, "\"", 1)) return -1; | ||
| 361 | return outlen; | ||
| 362 | } | ||
| 363 | |||
| 364 | /* Used for line indenting: print 'indent' spaces */ | ||
| 365 | |||
| 366 | static int do_indent(char_io *io_ch, void *arg, int indent) | ||
| 367 | { | ||
| 368 | int i; | ||
| 369 | for(i = 0; i < indent; i++) | ||
| 370 | if(!io_ch(arg, " ", 1)) return 0; | ||
| 371 | return 1; | ||
| 372 | } | ||
| 373 | |||
| 374 | |||
| 375 | static int do_name_ex(char_io *io_ch, void *arg, X509_NAME *n, | ||
| 376 | int indent, unsigned long flags) | ||
| 377 | { | ||
| 378 | int i, prev = -1, orflags, cnt; | ||
| 379 | int fn_opt, fn_nid; | ||
| 380 | ASN1_OBJECT *fn; | ||
| 381 | ASN1_STRING *val; | ||
| 382 | X509_NAME_ENTRY *ent; | ||
| 383 | char objtmp[80]; | ||
| 384 | const char *objbuf; | ||
| 385 | int outlen, len; | ||
| 386 | char *sep_dn, *sep_mv, *sep_eq; | ||
| 387 | int sep_dn_len, sep_mv_len, sep_eq_len; | ||
| 388 | if(indent < 0) indent = 0; | ||
| 389 | outlen = indent; | ||
| 390 | if(!do_indent(io_ch, arg, indent)) return -1; | ||
| 391 | switch (flags & XN_FLAG_SEP_MASK) | ||
| 392 | { | ||
| 393 | case XN_FLAG_SEP_MULTILINE: | ||
| 394 | sep_dn = "\n"; | ||
| 395 | sep_dn_len = 1; | ||
| 396 | sep_mv = " + "; | ||
| 397 | sep_mv_len = 3; | ||
| 398 | break; | ||
| 399 | |||
| 400 | case XN_FLAG_SEP_COMMA_PLUS: | ||
| 401 | sep_dn = ","; | ||
| 402 | sep_dn_len = 1; | ||
| 403 | sep_mv = "+"; | ||
| 404 | sep_mv_len = 1; | ||
| 405 | indent = 0; | ||
| 406 | break; | ||
| 407 | |||
| 408 | case XN_FLAG_SEP_CPLUS_SPC: | ||
| 409 | sep_dn = ", "; | ||
| 410 | sep_dn_len = 2; | ||
| 411 | sep_mv = " + "; | ||
| 412 | sep_mv_len = 3; | ||
| 413 | indent = 0; | ||
| 414 | break; | ||
| 415 | |||
| 416 | case XN_FLAG_SEP_SPLUS_SPC: | ||
| 417 | sep_dn = "; "; | ||
| 418 | sep_dn_len = 2; | ||
| 419 | sep_mv = " + "; | ||
| 420 | sep_mv_len = 3; | ||
| 421 | indent = 0; | ||
| 422 | break; | ||
| 423 | |||
| 424 | default: | ||
| 425 | return -1; | ||
| 426 | } | ||
| 427 | |||
| 428 | if(flags & XN_FLAG_SPC_EQ) { | ||
| 429 | sep_eq = " = "; | ||
| 430 | sep_eq_len = 3; | ||
| 431 | } else { | ||
| 432 | sep_eq = "="; | ||
| 433 | sep_eq_len = 1; | ||
| 434 | } | ||
| 435 | |||
| 436 | fn_opt = flags & XN_FLAG_FN_MASK; | ||
| 437 | |||
| 438 | cnt = X509_NAME_entry_count(n); | ||
| 439 | for(i = 0; i < cnt; i++) { | ||
| 440 | if(flags & XN_FLAG_DN_REV) | ||
| 441 | ent = X509_NAME_get_entry(n, cnt - i - 1); | ||
| 442 | else ent = X509_NAME_get_entry(n, i); | ||
| 443 | if(prev != -1) { | ||
| 444 | if(prev == ent->set) { | ||
| 445 | if(!io_ch(arg, sep_mv, sep_mv_len)) return -1; | ||
| 446 | outlen += sep_mv_len; | ||
| 447 | } else { | ||
| 448 | if(!io_ch(arg, sep_dn, sep_dn_len)) return -1; | ||
| 449 | outlen += sep_dn_len; | ||
| 450 | if(!do_indent(io_ch, arg, indent)) return -1; | ||
| 451 | outlen += indent; | ||
| 452 | } | ||
| 453 | } | ||
| 454 | prev = ent->set; | ||
| 455 | fn = X509_NAME_ENTRY_get_object(ent); | ||
| 456 | val = X509_NAME_ENTRY_get_data(ent); | ||
| 457 | fn_nid = OBJ_obj2nid(fn); | ||
| 458 | if(fn_opt != XN_FLAG_FN_NONE) { | ||
| 459 | int objlen; | ||
| 460 | if((fn_opt == XN_FLAG_FN_OID) || (fn_nid==NID_undef) ) { | ||
| 461 | OBJ_obj2txt(objtmp, 80, fn, 1); | ||
| 462 | objbuf = objtmp; | ||
| 463 | } else { | ||
| 464 | if(fn_opt == XN_FLAG_FN_SN) | ||
| 465 | objbuf = OBJ_nid2sn(fn_nid); | ||
| 466 | else if(fn_opt == XN_FLAG_FN_LN) | ||
| 467 | objbuf = OBJ_nid2ln(fn_nid); | ||
| 468 | else objbuf = ""; | ||
| 469 | } | ||
| 470 | objlen = strlen(objbuf); | ||
| 471 | if(!io_ch(arg, objbuf, objlen)) return -1; | ||
| 472 | if(!io_ch(arg, sep_eq, sep_eq_len)) return -1; | ||
| 473 | outlen += objlen + sep_eq_len; | ||
| 474 | } | ||
| 475 | /* If the field name is unknown then fix up the DER dump | ||
| 476 | * flag. We might want to limit this further so it will | ||
| 477 | * DER dump on anything other than a few 'standard' fields. | ||
| 478 | */ | ||
| 479 | if((fn_nid == NID_undef) && (flags & XN_FLAG_DUMP_UNKNOWN_FIELDS)) | ||
| 480 | orflags = ASN1_STRFLGS_DUMP_ALL; | ||
| 481 | else orflags = 0; | ||
| 482 | |||
| 483 | len = do_print_ex(io_ch, arg, flags | orflags, val); | ||
| 484 | if(len < 0) return -1; | ||
| 485 | outlen += len; | ||
| 486 | } | ||
| 487 | return outlen; | ||
| 488 | } | ||
| 489 | |||
| 490 | /* Wrappers round the main functions */ | ||
| 491 | |||
| 492 | int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags) | ||
| 493 | { | ||
| 494 | return do_name_ex(send_bio_chars, out, nm, indent, flags); | ||
| 495 | } | ||
| 496 | |||
| 497 | |||
| 498 | int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags) | ||
| 499 | { | ||
| 500 | return do_name_ex(send_fp_chars, fp, nm, indent, flags); | ||
| 501 | } | ||
| 502 | |||
| 503 | int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags) | ||
| 504 | { | ||
| 505 | return do_print_ex(send_bio_chars, out, flags, str); | ||
| 506 | } | ||
| 507 | |||
| 508 | |||
| 509 | int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags) | ||
| 510 | { | ||
| 511 | return do_print_ex(send_fp_chars, fp, flags, str); | ||
| 512 | } | ||
| 513 | |||
| 514 | /* Utility function: convert any string type to UTF8, returns number of bytes | ||
| 515 | * in output string or a negative error code | ||
| 516 | */ | ||
| 517 | |||
| 518 | int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in) | ||
| 519 | { | ||
| 520 | ASN1_STRING stmp, *str = &stmp; | ||
| 521 | int mbflag, type, ret; | ||
| 522 | if(!*out || !in) return -1; | ||
| 523 | type = in->type; | ||
| 524 | if((type < 0) || (type > 30)) return -1; | ||
| 525 | mbflag = tag2nbyte[type]; | ||
| 526 | if(mbflag == -1) return -1; | ||
| 527 | mbflag |= MBSTRING_FLAG; | ||
| 528 | stmp.data = NULL; | ||
| 529 | ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING); | ||
| 530 | if(ret < 0) return ret; | ||
| 531 | if(out) *out = stmp.data; | ||
| 532 | return stmp.length; | ||
| 533 | } | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_strnid.c b/src/lib/libssl/src/crypto/asn1/a_strnid.c index ab8417ffab..6b10cff994 100644 --- a/src/lib/libssl/src/crypto/asn1/a_strnid.c +++ b/src/lib/libssl/src/crypto/asn1/a_strnid.c | |||
| @@ -65,8 +65,9 @@ | |||
| 65 | 65 | ||
| 66 | static STACK_OF(ASN1_STRING_TABLE) *stable = NULL; | 66 | static STACK_OF(ASN1_STRING_TABLE) *stable = NULL; |
| 67 | static void st_free(ASN1_STRING_TABLE *tbl); | 67 | static void st_free(ASN1_STRING_TABLE *tbl); |
| 68 | static int sk_table_cmp(ASN1_STRING_TABLE **a, ASN1_STRING_TABLE **b); | 68 | static int sk_table_cmp(const ASN1_STRING_TABLE * const *a, |
| 69 | static int table_cmp(ASN1_STRING_TABLE *a, ASN1_STRING_TABLE *b); | 69 | const ASN1_STRING_TABLE * const *b); |
| 70 | static int table_cmp(const void *a, const void *b); | ||
| 70 | 71 | ||
| 71 | 72 | ||
| 72 | /* This is the global mask for the mbstring functions: this is use to | 73 | /* This is the global mask for the mbstring functions: this is use to |
| @@ -173,14 +174,16 @@ static ASN1_STRING_TABLE tbl_standard[] = { | |||
| 173 | {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK} | 174 | {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK} |
| 174 | }; | 175 | }; |
| 175 | 176 | ||
| 176 | static int sk_table_cmp(ASN1_STRING_TABLE **a, ASN1_STRING_TABLE **b) | 177 | static int sk_table_cmp(const ASN1_STRING_TABLE * const *a, |
| 178 | const ASN1_STRING_TABLE * const *b) | ||
| 177 | { | 179 | { |
| 178 | return (*a)->nid - (*b)->nid; | 180 | return (*a)->nid - (*b)->nid; |
| 179 | } | 181 | } |
| 180 | 182 | ||
| 181 | static int table_cmp(ASN1_STRING_TABLE *a, ASN1_STRING_TABLE *b) | 183 | static int table_cmp(const void *a, const void *b) |
| 182 | { | 184 | { |
| 183 | return a->nid - b->nid; | 185 | const ASN1_STRING_TABLE *sa = a, *sb = b; |
| 186 | return sa->nid - sb->nid; | ||
| 184 | } | 187 | } |
| 185 | 188 | ||
| 186 | ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid) | 189 | ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid) |
| @@ -192,7 +195,7 @@ ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid) | |||
| 192 | ttmp = (ASN1_STRING_TABLE *) OBJ_bsearch((char *)&fnd, | 195 | ttmp = (ASN1_STRING_TABLE *) OBJ_bsearch((char *)&fnd, |
| 193 | (char *)tbl_standard, | 196 | (char *)tbl_standard, |
| 194 | sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE), | 197 | sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE), |
| 195 | sizeof(ASN1_STRING_TABLE), (int(*)())table_cmp); | 198 | sizeof(ASN1_STRING_TABLE), table_cmp); |
| 196 | if(ttmp) return ttmp; | 199 | if(ttmp) return ttmp; |
| 197 | if(!stable) return NULL; | 200 | if(!stable) return NULL; |
| 198 | idx = sk_ASN1_STRING_TABLE_find(stable, &fnd); | 201 | idx = sk_ASN1_STRING_TABLE_find(stable, &fnd); |
| @@ -213,7 +216,7 @@ int ASN1_STRING_TABLE_add(int nid, | |||
| 213 | return 0; | 216 | return 0; |
| 214 | } | 217 | } |
| 215 | if(!(tmp = ASN1_STRING_TABLE_get(nid))) { | 218 | if(!(tmp = ASN1_STRING_TABLE_get(nid))) { |
| 216 | tmp = Malloc(sizeof(ASN1_STRING_TABLE)); | 219 | tmp = OPENSSL_malloc(sizeof(ASN1_STRING_TABLE)); |
| 217 | if(!tmp) { | 220 | if(!tmp) { |
| 218 | ASN1err(ASN1_F_ASN1_STRING_TABLE_ADD, | 221 | ASN1err(ASN1_F_ASN1_STRING_TABLE_ADD, |
| 219 | ERR_R_MALLOC_FAILURE); | 222 | ERR_R_MALLOC_FAILURE); |
| @@ -241,7 +244,7 @@ void ASN1_STRING_TABLE_cleanup(void) | |||
| 241 | 244 | ||
| 242 | static void st_free(ASN1_STRING_TABLE *tbl) | 245 | static void st_free(ASN1_STRING_TABLE *tbl) |
| 243 | { | 246 | { |
| 244 | if(tbl->flags & STABLE_FLAGS_MALLOC) Free(tbl); | 247 | if(tbl->flags & STABLE_FLAGS_MALLOC) OPENSSL_free(tbl); |
| 245 | } | 248 | } |
| 246 | 249 | ||
| 247 | IMPLEMENT_STACK_OF(ASN1_STRING_TABLE) | 250 | IMPLEMENT_STACK_OF(ASN1_STRING_TABLE) |
diff --git a/src/lib/libssl/src/crypto/asn1/a_time.c b/src/lib/libssl/src/crypto/asn1/a_time.c index b193f1c71f..8c0ddee4ac 100644 --- a/src/lib/libssl/src/crypto/asn1/a_time.c +++ b/src/lib/libssl/src/crypto/asn1/a_time.c | |||
| @@ -113,11 +113,9 @@ ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, unsigned char **pp, long length) | |||
| 113 | ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t) | 113 | ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t) |
| 114 | { | 114 | { |
| 115 | struct tm *ts; | 115 | struct tm *ts; |
| 116 | #if defined(THREADS) && !defined(WIN32) | 116 | #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) |
| 117 | struct tm data; | 117 | struct tm data; |
| 118 | #endif | ||
| 119 | 118 | ||
| 120 | #if defined(THREADS) && !defined(WIN32) | ||
| 121 | gmtime_r(&t,&data); | 119 | gmtime_r(&t,&data); |
| 122 | ts=&data; /* should return &data, but doesn't on some systems, so we don't even look at the return value */ | 120 | ts=&data; /* should return &data, but doesn't on some systems, so we don't even look at the return value */ |
| 123 | #else | 121 | #else |
diff --git a/src/lib/libssl/src/crypto/asn1/a_type.c b/src/lib/libssl/src/crypto/asn1/a_type.c index 161ef81197..e72a6b29e0 100644 --- a/src/lib/libssl/src/crypto/asn1/a_type.c +++ b/src/lib/libssl/src/crypto/asn1/a_type.c | |||
| @@ -123,6 +123,8 @@ int i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **pp) | |||
| 123 | break; | 123 | break; |
| 124 | case V_ASN1_SET: | 124 | case V_ASN1_SET: |
| 125 | case V_ASN1_SEQUENCE: | 125 | case V_ASN1_SEQUENCE: |
| 126 | case V_ASN1_OTHER: | ||
| 127 | default: | ||
| 126 | if (a->value.set == NULL) | 128 | if (a->value.set == NULL) |
| 127 | r=0; | 129 | r=0; |
| 128 | else | 130 | else |
| @@ -159,6 +161,8 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length) | |||
| 159 | 161 | ||
| 160 | inf=ASN1_get_object(&q,&len,&tag,&xclass,length); | 162 | inf=ASN1_get_object(&q,&len,&tag,&xclass,length); |
| 161 | if (inf & 0x80) goto err; | 163 | if (inf & 0x80) goto err; |
| 164 | /* If not universal tag we've no idea what it is */ | ||
| 165 | if(xclass != V_ASN1_UNIVERSAL) tag = V_ASN1_OTHER; | ||
| 162 | 166 | ||
| 163 | ASN1_TYPE_component_free(ret); | 167 | ASN1_TYPE_component_free(ret); |
| 164 | 168 | ||
| @@ -245,6 +249,8 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length) | |||
| 245 | break; | 249 | break; |
| 246 | case V_ASN1_SET: | 250 | case V_ASN1_SET: |
| 247 | case V_ASN1_SEQUENCE: | 251 | case V_ASN1_SEQUENCE: |
| 252 | case V_ASN1_OTHER: | ||
| 253 | default: | ||
| 248 | /* Sets and sequences are left complete */ | 254 | /* Sets and sequences are left complete */ |
| 249 | if ((ret->value.set=ASN1_STRING_new()) == NULL) goto err; | 255 | if ((ret->value.set=ASN1_STRING_new()) == NULL) goto err; |
| 250 | ret->value.set->type=tag; | 256 | ret->value.set->type=tag; |
| @@ -252,9 +258,6 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length) | |||
| 252 | if (!ASN1_STRING_set(ret->value.set,p,(int)len)) goto err; | 258 | if (!ASN1_STRING_set(ret->value.set,p,(int)len)) goto err; |
| 253 | p+=len; | 259 | p+=len; |
| 254 | break; | 260 | break; |
| 255 | default: | ||
| 256 | ASN1err(ASN1_F_D2I_ASN1_TYPE,ASN1_R_BAD_TYPE); | ||
| 257 | goto err; | ||
| 258 | } | 261 | } |
| 259 | 262 | ||
| 260 | ret->type=tag; | 263 | ret->type=tag; |
| @@ -282,7 +285,7 @@ void ASN1_TYPE_free(ASN1_TYPE *a) | |||
| 282 | { | 285 | { |
| 283 | if (a == NULL) return; | 286 | if (a == NULL) return; |
| 284 | ASN1_TYPE_component_free(a); | 287 | ASN1_TYPE_component_free(a); |
| 285 | Free(a); | 288 | OPENSSL_free(a); |
| 286 | } | 289 | } |
| 287 | 290 | ||
| 288 | int ASN1_TYPE_get(ASN1_TYPE *a) | 291 | int ASN1_TYPE_get(ASN1_TYPE *a) |
| @@ -312,6 +315,8 @@ static void ASN1_TYPE_component_free(ASN1_TYPE *a) | |||
| 312 | case V_ASN1_OBJECT: | 315 | case V_ASN1_OBJECT: |
| 313 | ASN1_OBJECT_free(a->value.object); | 316 | ASN1_OBJECT_free(a->value.object); |
| 314 | break; | 317 | break; |
| 318 | case V_ASN1_NULL: | ||
| 319 | break; | ||
| 315 | case V_ASN1_INTEGER: | 320 | case V_ASN1_INTEGER: |
| 316 | case V_ASN1_NEG_INTEGER: | 321 | case V_ASN1_NEG_INTEGER: |
| 317 | case V_ASN1_ENUMERATED: | 322 | case V_ASN1_ENUMERATED: |
| @@ -333,10 +338,9 @@ static void ASN1_TYPE_component_free(ASN1_TYPE *a) | |||
| 333 | case V_ASN1_UNIVERSALSTRING: | 338 | case V_ASN1_UNIVERSALSTRING: |
| 334 | case V_ASN1_BMPSTRING: | 339 | case V_ASN1_BMPSTRING: |
| 335 | case V_ASN1_UTF8STRING: | 340 | case V_ASN1_UTF8STRING: |
| 336 | ASN1_STRING_free((ASN1_STRING *)a->value.ptr); | 341 | case V_ASN1_OTHER: |
| 337 | break; | ||
| 338 | default: | 342 | default: |
| 339 | /* MEMORY LEAK */ | 343 | ASN1_STRING_free((ASN1_STRING *)a->value.ptr); |
| 340 | break; | 344 | break; |
| 341 | } | 345 | } |
| 342 | a->type=0; | 346 | a->type=0; |
diff --git a/src/lib/libssl/src/crypto/asn1/a_utctm.c b/src/lib/libssl/src/crypto/asn1/a_utctm.c index 07565974e3..d381c9e0d1 100644 --- a/src/lib/libssl/src/crypto/asn1/a_utctm.c +++ b/src/lib/libssl/src/crypto/asn1/a_utctm.c | |||
| @@ -193,7 +193,8 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) | |||
| 193 | { | 193 | { |
| 194 | char *p; | 194 | char *p; |
| 195 | struct tm *ts; | 195 | struct tm *ts; |
| 196 | #if defined(THREADS) && !defined(WIN32) | 196 | #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) |
| 197 | |||
| 197 | struct tm data; | 198 | struct tm data; |
| 198 | #endif | 199 | #endif |
| 199 | 200 | ||
| @@ -202,7 +203,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) | |||
| 202 | if (s == NULL) | 203 | if (s == NULL) |
| 203 | return(NULL); | 204 | return(NULL); |
| 204 | 205 | ||
| 205 | #if defined(THREADS) && !defined(WIN32) | 206 | #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) |
| 206 | gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ | 207 | gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ |
| 207 | ts=&data; | 208 | ts=&data; |
| 208 | #else | 209 | #else |
| @@ -248,10 +249,10 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) | |||
| 248 | p=(char *)s->data; | 249 | p=(char *)s->data; |
| 249 | if ((p == NULL) || (s->length < 14)) | 250 | if ((p == NULL) || (s->length < 14)) |
| 250 | { | 251 | { |
| 251 | p=Malloc(20); | 252 | p=OPENSSL_malloc(20); |
| 252 | if (p == NULL) return(NULL); | 253 | if (p == NULL) return(NULL); |
| 253 | if (s->data != NULL) | 254 | if (s->data != NULL) |
| 254 | Free(s->data); | 255 | OPENSSL_free(s->data); |
| 255 | s->data=(unsigned char *)p; | 256 | s->data=(unsigned char *)p; |
| 256 | } | 257 | } |
| 257 | 258 | ||
| @@ -264,3 +265,84 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) | |||
| 264 | #endif | 265 | #endif |
| 265 | return(s); | 266 | return(s); |
| 266 | } | 267 | } |
| 268 | |||
| 269 | |||
| 270 | int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t) | ||
| 271 | { | ||
| 272 | struct tm *tm; | ||
| 273 | int offset; | ||
| 274 | int year; | ||
| 275 | |||
| 276 | #define g2(p) (((p)[0]-'0')*10+(p)[1]-'0') | ||
| 277 | |||
| 278 | if (s->data[12] == 'Z') | ||
| 279 | offset=0; | ||
| 280 | else | ||
| 281 | { | ||
| 282 | offset = g2(s->data+13)*60+g2(s->data+15); | ||
| 283 | if (s->data[12] == '-') | ||
| 284 | offset = -offset; | ||
| 285 | } | ||
| 286 | |||
| 287 | t -= offset*60; /* FIXME: may overflow in extreme cases */ | ||
| 288 | |||
| 289 | #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) | ||
| 290 | { struct tm data; gmtime_r(&t, &data); tm = &data; } | ||
| 291 | #else | ||
| 292 | tm = gmtime(&t); | ||
| 293 | #endif | ||
| 294 | |||
| 295 | #define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1 | ||
| 296 | year = g2(s->data); | ||
| 297 | if (year < 50) | ||
| 298 | year += 100; | ||
| 299 | return_cmp(year, tm->tm_year); | ||
| 300 | return_cmp(g2(s->data+2) - 1, tm->tm_mon); | ||
| 301 | return_cmp(g2(s->data+4), tm->tm_mday); | ||
| 302 | return_cmp(g2(s->data+6), tm->tm_hour); | ||
| 303 | return_cmp(g2(s->data+8), tm->tm_min); | ||
| 304 | return_cmp(g2(s->data+10), tm->tm_sec); | ||
| 305 | #undef g2 | ||
| 306 | #undef return_cmp | ||
| 307 | |||
| 308 | return 0; | ||
| 309 | } | ||
| 310 | |||
| 311 | |||
| 312 | #if 0 | ||
| 313 | time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s) | ||
| 314 | { | ||
| 315 | struct tm tm; | ||
| 316 | int offset; | ||
| 317 | |||
| 318 | memset(&tm,'\0',sizeof tm); | ||
| 319 | |||
| 320 | #define g2(p) (((p)[0]-'0')*10+(p)[1]-'0') | ||
| 321 | tm.tm_year=g2(s->data); | ||
| 322 | if(tm.tm_year < 50) | ||
| 323 | tm.tm_year+=100; | ||
| 324 | tm.tm_mon=g2(s->data+2)-1; | ||
| 325 | tm.tm_mday=g2(s->data+4); | ||
| 326 | tm.tm_hour=g2(s->data+6); | ||
| 327 | tm.tm_min=g2(s->data+8); | ||
| 328 | tm.tm_sec=g2(s->data+10); | ||
| 329 | if(s->data[12] == 'Z') | ||
| 330 | offset=0; | ||
| 331 | else | ||
| 332 | { | ||
| 333 | offset=g2(s->data+13)*60+g2(s->data+15); | ||
| 334 | if(s->data[12] == '-') | ||
| 335 | offset= -offset; | ||
| 336 | } | ||
| 337 | #undef g2 | ||
| 338 | |||
| 339 | return mktime(&tm)-offset*60; /* FIXME: mktime assumes the current timezone | ||
| 340 | * instead of UTC, and unless we rewrite OpenSSL | ||
| 341 | * in Lisp we cannot locally change the timezone | ||
| 342 | * without possibly interfering with other parts | ||
| 343 | * of the program. timegm, which uses UTC, is | ||
| 344 | * non-standard. | ||
| 345 | * Also time_t is inappropriate for general | ||
| 346 | * UTC times because it may a 32 bit type. */ | ||
| 347 | } | ||
| 348 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_utf8.c b/src/lib/libssl/src/crypto/asn1/a_utf8.c index b5125af224..854278f136 100644 --- a/src/lib/libssl/src/crypto/asn1/a_utf8.c +++ b/src/lib/libssl/src/crypto/asn1/a_utf8.c | |||
| @@ -133,7 +133,7 @@ int UTF8_getc(const unsigned char *str, int len, unsigned long *val) | |||
| 133 | if( ((p[1] & 0xc0) != 0x80) | 133 | if( ((p[1] & 0xc0) != 0x80) |
| 134 | || ((p[2] & 0xc0) != 0x80) | 134 | || ((p[2] & 0xc0) != 0x80) |
| 135 | || ((p[3] & 0xc0) != 0x80) ) return -3; | 135 | || ((p[3] & 0xc0) != 0x80) ) return -3; |
| 136 | value = (*p++ & 0x7) << 18; | 136 | value = ((unsigned long)(*p++ & 0x7)) << 18; |
| 137 | value |= (*p++ & 0x3f) << 12; | 137 | value |= (*p++ & 0x3f) << 12; |
| 138 | value |= (*p++ & 0x3f) << 6; | 138 | value |= (*p++ & 0x3f) << 6; |
| 139 | value |= *p++ & 0x3f; | 139 | value |= *p++ & 0x3f; |
| @@ -145,9 +145,9 @@ int UTF8_getc(const unsigned char *str, int len, unsigned long *val) | |||
| 145 | || ((p[2] & 0xc0) != 0x80) | 145 | || ((p[2] & 0xc0) != 0x80) |
| 146 | || ((p[3] & 0xc0) != 0x80) | 146 | || ((p[3] & 0xc0) != 0x80) |
| 147 | || ((p[4] & 0xc0) != 0x80) ) return -3; | 147 | || ((p[4] & 0xc0) != 0x80) ) return -3; |
| 148 | value = (*p++ & 0x3) << 24; | 148 | value = ((unsigned long)(*p++ & 0x3)) << 24; |
| 149 | value |= (*p++ & 0x3f) << 18; | 149 | value |= ((unsigned long)(*p++ & 0x3f)) << 18; |
| 150 | value |= (*p++ & 0x3f) << 12; | 150 | value |= ((unsigned long)(*p++ & 0x3f)) << 12; |
| 151 | value |= (*p++ & 0x3f) << 6; | 151 | value |= (*p++ & 0x3f) << 6; |
| 152 | value |= *p++ & 0x3f; | 152 | value |= *p++ & 0x3f; |
| 153 | if(value < 0x200000) return -4; | 153 | if(value < 0x200000) return -4; |
| @@ -159,10 +159,10 @@ int UTF8_getc(const unsigned char *str, int len, unsigned long *val) | |||
| 159 | || ((p[3] & 0xc0) != 0x80) | 159 | || ((p[3] & 0xc0) != 0x80) |
| 160 | || ((p[4] & 0xc0) != 0x80) | 160 | || ((p[4] & 0xc0) != 0x80) |
| 161 | || ((p[5] & 0xc0) != 0x80) ) return -3; | 161 | || ((p[5] & 0xc0) != 0x80) ) return -3; |
| 162 | value = (*p++ & 0x1) << 30; | 162 | value = ((unsigned long)(*p++ & 0x1)) << 30; |
| 163 | value |= (*p++ & 0x3f) << 24; | 163 | value |= ((unsigned long)(*p++ & 0x3f)) << 24; |
| 164 | value |= (*p++ & 0x3f) << 18; | 164 | value |= ((unsigned long)(*p++ & 0x3f)) << 18; |
| 165 | value |= (*p++ & 0x3f) << 12; | 165 | value |= ((unsigned long)(*p++ & 0x3f)) << 12; |
| 166 | value |= (*p++ & 0x3f) << 6; | 166 | value |= (*p++ & 0x3f) << 6; |
| 167 | value |= *p++ & 0x3f; | 167 | value |= *p++ & 0x3f; |
| 168 | if(value < 0x4000000) return -4; | 168 | if(value < 0x4000000) return -4; |
diff --git a/src/lib/libssl/src/crypto/asn1/a_verify.c b/src/lib/libssl/src/crypto/asn1/a_verify.c index d4aede85c3..2a11927e5c 100644 --- a/src/lib/libssl/src/crypto/asn1/a_verify.c +++ b/src/lib/libssl/src/crypto/asn1/a_verify.c | |||
| @@ -88,7 +88,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature, | |||
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | inl=i2d(data,NULL); | 90 | inl=i2d(data,NULL); |
| 91 | buf_in=Malloc((unsigned int)inl); | 91 | buf_in=OPENSSL_malloc((unsigned int)inl); |
| 92 | if (buf_in == NULL) | 92 | if (buf_in == NULL) |
| 93 | { | 93 | { |
| 94 | ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_MALLOC_FAILURE); | 94 | ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_MALLOC_FAILURE); |
| @@ -101,7 +101,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature, | |||
| 101 | EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl); | 101 | EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl); |
| 102 | 102 | ||
| 103 | memset(buf_in,0,(unsigned int)inl); | 103 | memset(buf_in,0,(unsigned int)inl); |
| 104 | Free(buf_in); | 104 | OPENSSL_free(buf_in); |
| 105 | 105 | ||
| 106 | if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data, | 106 | if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data, |
| 107 | (unsigned int)signature->length,pkey) <= 0) | 107 | (unsigned int)signature->length,pkey) <= 0) |
diff --git a/src/lib/libssl/src/crypto/asn1/asn1.h b/src/lib/libssl/src/crypto/asn1/asn1.h index 99bd64a11e..6f956b1963 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1.h +++ b/src/lib/libssl/src/crypto/asn1/asn1.h | |||
| @@ -59,17 +59,18 @@ | |||
| 59 | #ifndef HEADER_ASN1_H | 59 | #ifndef HEADER_ASN1_H |
| 60 | #define HEADER_ASN1_H | 60 | #define HEADER_ASN1_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #include <time.h> | 62 | #include <time.h> |
| 63 | #ifndef NO_BIO | ||
| 64 | #include <openssl/bio.h> | ||
| 65 | #endif | ||
| 67 | #include <openssl/bn.h> | 66 | #include <openssl/bn.h> |
| 68 | #include <openssl/stack.h> | 67 | #include <openssl/stack.h> |
| 69 | #include <openssl/safestack.h> | 68 | #include <openssl/safestack.h> |
| 70 | 69 | ||
| 71 | #ifdef VMS | 70 | #include <openssl/symhacks.h> |
| 72 | #include <openssl/vms_idhacks.h> | 71 | |
| 72 | #ifdef __cplusplus | ||
| 73 | extern "C" { | ||
| 73 | #endif | 74 | #endif |
| 74 | 75 | ||
| 75 | #define V_ASN1_UNIVERSAL 0x00 | 76 | #define V_ASN1_UNIVERSAL 0x00 |
| @@ -82,12 +83,15 @@ extern "C" { | |||
| 82 | #define V_ASN1_PRIMATIVE_TAG 0x1f | 83 | #define V_ASN1_PRIMATIVE_TAG 0x1f |
| 83 | 84 | ||
| 84 | #define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */ | 85 | #define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */ |
| 86 | #define V_ASN1_OTHER -3 /* used in ASN1_TYPE */ | ||
| 87 | |||
| 88 | #define V_ASN1_NEG 0x100 /* negative flag */ | ||
| 85 | 89 | ||
| 86 | #define V_ASN1_UNDEF -1 | 90 | #define V_ASN1_UNDEF -1 |
| 87 | #define V_ASN1_EOC 0 | 91 | #define V_ASN1_EOC 0 |
| 88 | #define V_ASN1_BOOLEAN 1 /**/ | 92 | #define V_ASN1_BOOLEAN 1 /**/ |
| 89 | #define V_ASN1_INTEGER 2 | 93 | #define V_ASN1_INTEGER 2 |
| 90 | #define V_ASN1_NEG_INTEGER (2+0x100) | 94 | #define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG) |
| 91 | #define V_ASN1_BIT_STRING 3 | 95 | #define V_ASN1_BIT_STRING 3 |
| 92 | #define V_ASN1_OCTET_STRING 4 | 96 | #define V_ASN1_OCTET_STRING 4 |
| 93 | #define V_ASN1_NULL 5 | 97 | #define V_ASN1_NULL 5 |
| @@ -96,7 +100,7 @@ extern "C" { | |||
| 96 | #define V_ASN1_EXTERNAL 8 | 100 | #define V_ASN1_EXTERNAL 8 |
| 97 | #define V_ASN1_REAL 9 | 101 | #define V_ASN1_REAL 9 |
| 98 | #define V_ASN1_ENUMERATED 10 | 102 | #define V_ASN1_ENUMERATED 10 |
| 99 | #define V_ASN1_NEG_ENUMERATED (10+0x100) | 103 | #define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG) |
| 100 | #define V_ASN1_UTF8STRING 12 | 104 | #define V_ASN1_UTF8STRING 12 |
| 101 | #define V_ASN1_SEQUENCE 16 | 105 | #define V_ASN1_SEQUENCE 16 |
| 102 | #define V_ASN1_SET 17 | 106 | #define V_ASN1_SET 17 |
| @@ -140,32 +144,10 @@ extern "C" { | |||
| 140 | #define MBSTRING_UNIV (MBSTRING_FLAG|3) | 144 | #define MBSTRING_UNIV (MBSTRING_FLAG|3) |
| 141 | #define MBSTRING_UTF8 (MBSTRING_FLAG|4) | 145 | #define MBSTRING_UTF8 (MBSTRING_FLAG|4) |
| 142 | 146 | ||
| 143 | #define DECLARE_ASN1_SET_OF(type) \ | 147 | struct X509_algor_st; |
| 144 | int i2d_ASN1_SET_OF_##type(STACK_OF(type) *a,unsigned char **pp, \ | 148 | |
| 145 | int (*func)(type *,unsigned char **), int ex_tag, \ | 149 | #define DECLARE_ASN1_SET_OF(type) /* filled in by mkstack.pl */ |
| 146 | int ex_class, int is_set); \ | 150 | #define IMPLEMENT_ASN1_SET_OF(type) /* nothing, no longer needed */ |
| 147 | STACK_OF(type) *d2i_ASN1_SET_OF_##type(STACK_OF(type) **a,unsigned char **pp, \ | ||
| 148 | long length, \ | ||
| 149 | type *(*func)(type **, \ | ||
| 150 | unsigned char **,long), \ | ||
| 151 | void (*free_func)(type *), \ | ||
| 152 | int ex_tag,int ex_class); | ||
| 153 | |||
| 154 | #define IMPLEMENT_ASN1_SET_OF(type) \ | ||
| 155 | int i2d_ASN1_SET_OF_##type(STACK_OF(type) *a,unsigned char **pp, \ | ||
| 156 | int (*func)(type *,unsigned char **), int ex_tag, \ | ||
| 157 | int ex_class, int is_set) \ | ||
| 158 | { return i2d_ASN1_SET((STACK *)a,pp,func,ex_tag,ex_class,is_set); } \ | ||
| 159 | STACK_OF(type) *d2i_ASN1_SET_OF_##type(STACK_OF(type) **a,unsigned char **pp, \ | ||
| 160 | long length, \ | ||
| 161 | type *(*func)(type **, \ | ||
| 162 | unsigned char **,long), \ | ||
| 163 | void (*free_func)(type *), \ | ||
| 164 | int ex_tag,int ex_class) \ | ||
| 165 | { return (STACK_OF(type) *)d2i_ASN1_SET((STACK **)a,pp,length, \ | ||
| 166 | (char *(*)())func, \ | ||
| 167 | (void (*)())free_func, \ | ||
| 168 | ex_tag,ex_class); } | ||
| 169 | 151 | ||
| 170 | typedef struct asn1_ctx_st | 152 | typedef struct asn1_ctx_st |
| 171 | { | 153 | { |
| @@ -254,6 +236,7 @@ DECLARE_STACK_OF(ASN1_STRING_TABLE) | |||
| 254 | #define ASN1_BMPSTRING ASN1_STRING | 236 | #define ASN1_BMPSTRING ASN1_STRING |
| 255 | #define ASN1_VISIBLESTRING ASN1_STRING | 237 | #define ASN1_VISIBLESTRING ASN1_STRING |
| 256 | #define ASN1_UTF8STRING ASN1_STRING | 238 | #define ASN1_UTF8STRING ASN1_STRING |
| 239 | #define ASN1_BOOLEAN int | ||
| 257 | #else | 240 | #else |
| 258 | typedef struct asn1_string_st ASN1_INTEGER; | 241 | typedef struct asn1_string_st ASN1_INTEGER; |
| 259 | typedef struct asn1_string_st ASN1_ENUMERATED; | 242 | typedef struct asn1_string_st ASN1_ENUMERATED; |
| @@ -270,15 +253,99 @@ typedef struct asn1_string_st ASN1_TIME; | |||
| 270 | typedef struct asn1_string_st ASN1_GENERALIZEDTIME; | 253 | typedef struct asn1_string_st ASN1_GENERALIZEDTIME; |
| 271 | typedef struct asn1_string_st ASN1_VISIBLESTRING; | 254 | typedef struct asn1_string_st ASN1_VISIBLESTRING; |
| 272 | typedef struct asn1_string_st ASN1_UTF8STRING; | 255 | typedef struct asn1_string_st ASN1_UTF8STRING; |
| 256 | typedef int ASN1_BOOLEAN; | ||
| 273 | #endif | 257 | #endif |
| 274 | 258 | ||
| 275 | typedef int ASN1_NULL; | 259 | typedef int ASN1_NULL; |
| 276 | 260 | ||
| 261 | /* Parameters used by ASN1_STRING_print_ex() */ | ||
| 262 | |||
| 263 | /* These determine which characters to escape: | ||
| 264 | * RFC2253 special characters, control characters and | ||
| 265 | * MSB set characters | ||
| 266 | */ | ||
| 267 | |||
| 268 | #define ASN1_STRFLGS_ESC_2253 1 | ||
| 269 | #define ASN1_STRFLGS_ESC_CTRL 2 | ||
| 270 | #define ASN1_STRFLGS_ESC_MSB 4 | ||
| 271 | |||
| 272 | |||
| 273 | /* This flag determines how we do escaping: normally | ||
| 274 | * RC2253 backslash only, set this to use backslash and | ||
| 275 | * quote. | ||
| 276 | */ | ||
| 277 | |||
| 278 | #define ASN1_STRFLGS_ESC_QUOTE 8 | ||
| 279 | |||
| 280 | |||
| 281 | /* These three flags are internal use only. */ | ||
| 282 | |||
| 283 | /* Character is a valid PrintableString character */ | ||
| 284 | #define CHARTYPE_PRINTABLESTRING 0x10 | ||
| 285 | /* Character needs escaping if it is the first character */ | ||
| 286 | #define CHARTYPE_FIRST_ESC_2253 0x20 | ||
| 287 | /* Character needs escaping if it is the last character */ | ||
| 288 | #define CHARTYPE_LAST_ESC_2253 0x40 | ||
| 289 | |||
| 290 | /* NB the internal flags are safely reused below by flags | ||
| 291 | * handled at the top level. | ||
| 292 | */ | ||
| 293 | |||
| 294 | /* If this is set we convert all character strings | ||
| 295 | * to UTF8 first | ||
| 296 | */ | ||
| 297 | |||
| 298 | #define ASN1_STRFLGS_UTF8_CONVERT 0x10 | ||
| 299 | |||
| 300 | /* If this is set we don't attempt to interpret content: | ||
| 301 | * just assume all strings are 1 byte per character. This | ||
| 302 | * will produce some pretty odd looking output! | ||
| 303 | */ | ||
| 304 | |||
| 305 | #define ASN1_STRFLGS_IGNORE_TYPE 0x20 | ||
| 306 | |||
| 307 | /* If this is set we include the string type in the output */ | ||
| 308 | #define ASN1_STRFLGS_SHOW_TYPE 0x40 | ||
| 309 | |||
| 310 | /* This determines which strings to display and which to | ||
| 311 | * 'dump' (hex dump of content octets or DER encoding). We can | ||
| 312 | * only dump non character strings or everything. If we | ||
| 313 | * don't dump 'unknown' they are interpreted as character | ||
| 314 | * strings with 1 octet per character and are subject to | ||
| 315 | * the usual escaping options. | ||
| 316 | */ | ||
| 317 | |||
| 318 | #define ASN1_STRFLGS_DUMP_ALL 0x80 | ||
| 319 | #define ASN1_STRFLGS_DUMP_UNKNOWN 0x100 | ||
| 320 | |||
| 321 | /* These determine what 'dumping' does, we can dump the | ||
| 322 | * content octets or the DER encoding: both use the | ||
| 323 | * RFC2253 #XXXXX notation. | ||
| 324 | */ | ||
| 325 | |||
| 326 | #define ASN1_STRFLGS_DUMP_DER 0x200 | ||
| 327 | |||
| 328 | /* All the string flags consistent with RFC2253, | ||
| 329 | * escaping control characters isn't essential in | ||
| 330 | * RFC2253 but it is advisable anyway. | ||
| 331 | */ | ||
| 332 | |||
| 333 | #define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \ | ||
| 334 | ASN1_STRFLGS_ESC_CTRL | \ | ||
| 335 | ASN1_STRFLGS_ESC_MSB | \ | ||
| 336 | ASN1_STRFLGS_UTF8_CONVERT | \ | ||
| 337 | ASN1_STRFLGS_DUMP_UNKNOWN | \ | ||
| 338 | ASN1_STRFLGS_DUMP_DER) | ||
| 339 | |||
| 340 | DECLARE_STACK_OF(ASN1_INTEGER) | ||
| 341 | DECLARE_ASN1_SET_OF(ASN1_INTEGER) | ||
| 342 | |||
| 277 | typedef struct asn1_type_st | 343 | typedef struct asn1_type_st |
| 278 | { | 344 | { |
| 279 | int type; | 345 | int type; |
| 280 | union { | 346 | union { |
| 281 | char *ptr; | 347 | char *ptr; |
| 348 | ASN1_BOOLEAN boolean; | ||
| 282 | ASN1_STRING * asn1_string; | 349 | ASN1_STRING * asn1_string; |
| 283 | ASN1_OBJECT * object; | 350 | ASN1_OBJECT * object; |
| 284 | ASN1_INTEGER * integer; | 351 | ASN1_INTEGER * integer; |
| @@ -520,6 +587,8 @@ void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); | |||
| 520 | ASN1_OBJECT * ASN1_OBJECT_new(void ); | 587 | ASN1_OBJECT * ASN1_OBJECT_new(void ); |
| 521 | void ASN1_OBJECT_free(ASN1_OBJECT *a); | 588 | void ASN1_OBJECT_free(ASN1_OBJECT *a); |
| 522 | int i2d_ASN1_OBJECT(ASN1_OBJECT *a,unsigned char **pp); | 589 | int i2d_ASN1_OBJECT(ASN1_OBJECT *a,unsigned char **pp); |
| 590 | ASN1_OBJECT * c2i_ASN1_OBJECT(ASN1_OBJECT **a,unsigned char **pp, | ||
| 591 | long length); | ||
| 523 | ASN1_OBJECT * d2i_ASN1_OBJECT(ASN1_OBJECT **a,unsigned char **pp, | 592 | ASN1_OBJECT * d2i_ASN1_OBJECT(ASN1_OBJECT **a,unsigned char **pp, |
| 524 | long length); | 593 | long length); |
| 525 | 594 | ||
| @@ -542,14 +611,17 @@ unsigned char * ASN1_STRING_data(ASN1_STRING *x); | |||
| 542 | ASN1_BIT_STRING * ASN1_BIT_STRING_new(void); | 611 | ASN1_BIT_STRING * ASN1_BIT_STRING_new(void); |
| 543 | void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a); | 612 | void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a); |
| 544 | int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a,unsigned char **pp); | 613 | int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a,unsigned char **pp); |
| 614 | int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a,unsigned char **pp); | ||
| 545 | ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,unsigned char **pp, | 615 | ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,unsigned char **pp, |
| 546 | long length); | 616 | long length); |
| 617 | ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,unsigned char **pp, | ||
| 618 | long length); | ||
| 547 | int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, | 619 | int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, |
| 548 | int length ); | 620 | int length ); |
| 549 | int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); | 621 | int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); |
| 550 | int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n); | 622 | int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n); |
| 551 | 623 | ||
| 552 | #ifdef HEADER_BIO_H | 624 | #ifndef NO_BIO |
| 553 | int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, | 625 | int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, |
| 554 | BIT_STRING_BITNAME *tbl, int indent); | 626 | BIT_STRING_BITNAME *tbl, int indent); |
| 555 | #endif | 627 | #endif |
| @@ -563,8 +635,11 @@ int d2i_ASN1_BOOLEAN(int *a,unsigned char **pp,long length); | |||
| 563 | ASN1_INTEGER * ASN1_INTEGER_new(void); | 635 | ASN1_INTEGER * ASN1_INTEGER_new(void); |
| 564 | void ASN1_INTEGER_free(ASN1_INTEGER *a); | 636 | void ASN1_INTEGER_free(ASN1_INTEGER *a); |
| 565 | int i2d_ASN1_INTEGER(ASN1_INTEGER *a,unsigned char **pp); | 637 | int i2d_ASN1_INTEGER(ASN1_INTEGER *a,unsigned char **pp); |
| 638 | int i2c_ASN1_INTEGER(ASN1_INTEGER *a,unsigned char **pp); | ||
| 566 | ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a,unsigned char **pp, | 639 | ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a,unsigned char **pp, |
| 567 | long length); | 640 | long length); |
| 641 | ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a,unsigned char **pp, | ||
| 642 | long length); | ||
| 568 | ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a,unsigned char **pp, | 643 | ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a,unsigned char **pp, |
| 569 | long length); | 644 | long length); |
| 570 | ASN1_INTEGER * ASN1_INTEGER_dup(ASN1_INTEGER *x); | 645 | ASN1_INTEGER * ASN1_INTEGER_dup(ASN1_INTEGER *x); |
| @@ -579,6 +654,10 @@ ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a,unsigned char **pp, | |||
| 579 | int ASN1_UTCTIME_check(ASN1_UTCTIME *a); | 654 | int ASN1_UTCTIME_check(ASN1_UTCTIME *a); |
| 580 | ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t); | 655 | ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t); |
| 581 | int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str); | 656 | int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str); |
| 657 | int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); | ||
| 658 | #if 0 | ||
| 659 | time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s); | ||
| 660 | #endif | ||
| 582 | 661 | ||
| 583 | int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a); | 662 | int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a); |
| 584 | ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t); | 663 | ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t); |
| @@ -673,10 +752,10 @@ ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t); | |||
| 673 | int i2d_ASN1_SET(STACK *a, unsigned char **pp, | 752 | int i2d_ASN1_SET(STACK *a, unsigned char **pp, |
| 674 | int (*func)(), int ex_tag, int ex_class, int is_set); | 753 | int (*func)(), int ex_tag, int ex_class, int is_set); |
| 675 | STACK * d2i_ASN1_SET(STACK **a, unsigned char **pp, long length, | 754 | STACK * d2i_ASN1_SET(STACK **a, unsigned char **pp, long length, |
| 676 | char *(*func)(), void (*free_func)(), | 755 | char *(*func)(), void (*free_func)(void *), |
| 677 | int ex_tag, int ex_class); | 756 | int ex_tag, int ex_class); |
| 678 | 757 | ||
| 679 | #ifdef HEADER_BIO_H | 758 | #ifndef NO_BIO |
| 680 | int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); | 759 | int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); |
| 681 | int a2i_ASN1_INTEGER(BIO *bp,ASN1_INTEGER *bs,char *buf,int size); | 760 | int a2i_ASN1_INTEGER(BIO *bp,ASN1_INTEGER *bs,char *buf,int size); |
| 682 | int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a); | 761 | int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a); |
| @@ -729,16 +808,21 @@ char *ASN1_dup(int (*i2d)(),char *(*d2i)(),char *x); | |||
| 729 | #ifndef NO_FP_API | 808 | #ifndef NO_FP_API |
| 730 | char *ASN1_d2i_fp(char *(*xnew)(),char *(*d2i)(),FILE *fp,unsigned char **x); | 809 | char *ASN1_d2i_fp(char *(*xnew)(),char *(*d2i)(),FILE *fp,unsigned char **x); |
| 731 | int ASN1_i2d_fp(int (*i2d)(),FILE *out,unsigned char *x); | 810 | int ASN1_i2d_fp(int (*i2d)(),FILE *out,unsigned char *x); |
| 811 | int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags); | ||
| 732 | #endif | 812 | #endif |
| 733 | 813 | ||
| 734 | #ifdef HEADER_BIO_H | 814 | int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in); |
| 815 | |||
| 816 | #ifndef NO_BIO | ||
| 735 | char *ASN1_d2i_bio(char *(*xnew)(),char *(*d2i)(),BIO *bp,unsigned char **x); | 817 | char *ASN1_d2i_bio(char *(*xnew)(),char *(*d2i)(),BIO *bp,unsigned char **x); |
| 736 | int ASN1_i2d_bio(int (*i2d)(),BIO *out,unsigned char *x); | 818 | int ASN1_i2d_bio(int (*i2d)(),BIO *out,unsigned char *x); |
| 737 | int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a); | 819 | int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a); |
| 738 | int ASN1_GENERALIZEDTIME_print(BIO *fp,ASN1_GENERALIZEDTIME *a); | 820 | int ASN1_GENERALIZEDTIME_print(BIO *fp,ASN1_GENERALIZEDTIME *a); |
| 739 | int ASN1_TIME_print(BIO *fp,ASN1_TIME *a); | 821 | int ASN1_TIME_print(BIO *fp,ASN1_TIME *a); |
| 740 | int ASN1_STRING_print(BIO *bp,ASN1_STRING *v); | 822 | int ASN1_STRING_print(BIO *bp,ASN1_STRING *v); |
| 823 | int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags); | ||
| 741 | int ASN1_parse(BIO *bp,unsigned char *pp,long len,int indent); | 824 | int ASN1_parse(BIO *bp,unsigned char *pp,long len,int indent); |
| 825 | int ASN1_parse_dump(BIO *bp,unsigned char *pp,long len,int indent,int dump); | ||
| 742 | #endif | 826 | #endif |
| 743 | const char *ASN1_tag2str(int tag); | 827 | const char *ASN1_tag2str(int tag); |
| 744 | 828 | ||
| @@ -768,9 +852,9 @@ int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, | |||
| 768 | unsigned char *data, int max_len); | 852 | unsigned char *data, int max_len); |
| 769 | 853 | ||
| 770 | STACK *ASN1_seq_unpack(unsigned char *buf, int len, char *(*d2i)(), | 854 | STACK *ASN1_seq_unpack(unsigned char *buf, int len, char *(*d2i)(), |
| 771 | void (*free_func)() ); | 855 | void (*free_func)(void *) ); |
| 772 | unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf, | 856 | unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf, |
| 773 | int *len ); | 857 | int *len ); |
| 774 | void *ASN1_unpack_string(ASN1_STRING *oct, char *(*d2i)()); | 858 | void *ASN1_unpack_string(ASN1_STRING *oct, char *(*d2i)()); |
| 775 | ASN1_STRING *ASN1_pack_string(void *obj, int (*i2d)(), ASN1_OCTET_STRING **oct); | 859 | ASN1_STRING *ASN1_pack_string(void *obj, int (*i2d)(), ASN1_OCTET_STRING **oct); |
| 776 | 860 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_lib.c b/src/lib/libssl/src/crypto/asn1/asn1_lib.c index be8daa8688..77447a5240 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_lib.c +++ b/src/lib/libssl/src/crypto/asn1/asn1_lib.c | |||
| @@ -181,7 +181,7 @@ void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag, | |||
| 181 | int xclass) | 181 | int xclass) |
| 182 | { | 182 | { |
| 183 | unsigned char *p= *pp; | 183 | unsigned char *p= *pp; |
| 184 | int i; | 184 | int i, ttag; |
| 185 | 185 | ||
| 186 | i=(constructed)?V_ASN1_CONSTRUCTED:0; | 186 | i=(constructed)?V_ASN1_CONSTRUCTED:0; |
| 187 | i|=(xclass&V_ASN1_PRIVATE); | 187 | i|=(xclass&V_ASN1_PRIVATE); |
| @@ -190,12 +190,15 @@ void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag, | |||
| 190 | else | 190 | else |
| 191 | { | 191 | { |
| 192 | *(p++)=i|V_ASN1_PRIMITIVE_TAG; | 192 | *(p++)=i|V_ASN1_PRIMITIVE_TAG; |
| 193 | while (tag > 0x7f) | 193 | for(i = 0, ttag = tag; ttag > 0; i++) ttag >>=7; |
| 194 | ttag = i; | ||
| 195 | while(i-- > 0) | ||
| 194 | { | 196 | { |
| 195 | *(p++)=(tag&0x7f)|0x80; | 197 | p[i] = tag & 0x7f; |
| 196 | tag>>=7; | 198 | if(i != (ttag - 1)) p[i] |= 0x80; |
| 199 | tag >>= 7; | ||
| 197 | } | 200 | } |
| 198 | *(p++)=(tag&0x7f); | 201 | p += ttag; |
| 199 | } | 202 | } |
| 200 | if ((constructed == 2) && (length == 0)) | 203 | if ((constructed == 2) && (length == 0)) |
| 201 | *(p++)=0x80; /* der_put_length would output 0 instead */ | 204 | *(p++)=0x80; /* der_put_length would output 0 instead */ |
| @@ -335,9 +338,9 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) | |||
| 335 | { | 338 | { |
| 336 | c=str->data; | 339 | c=str->data; |
| 337 | if (c == NULL) | 340 | if (c == NULL) |
| 338 | str->data=Malloc(len+1); | 341 | str->data=OPENSSL_malloc(len+1); |
| 339 | else | 342 | else |
| 340 | str->data=Realloc(c,len+1); | 343 | str->data=OPENSSL_realloc(c,len+1); |
| 341 | 344 | ||
| 342 | if (str->data == NULL) | 345 | if (str->data == NULL) |
| 343 | { | 346 | { |
| @@ -365,7 +368,7 @@ ASN1_STRING *ASN1_STRING_type_new(int type) | |||
| 365 | { | 368 | { |
| 366 | ASN1_STRING *ret; | 369 | ASN1_STRING *ret; |
| 367 | 370 | ||
| 368 | ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING)); | 371 | ret=(ASN1_STRING *)OPENSSL_malloc(sizeof(ASN1_STRING)); |
| 369 | if (ret == NULL) | 372 | if (ret == NULL) |
| 370 | { | 373 | { |
| 371 | ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE); | 374 | ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -381,8 +384,8 @@ ASN1_STRING *ASN1_STRING_type_new(int type) | |||
| 381 | void ASN1_STRING_free(ASN1_STRING *a) | 384 | void ASN1_STRING_free(ASN1_STRING *a) |
| 382 | { | 385 | { |
| 383 | if (a == NULL) return; | 386 | if (a == NULL) return; |
| 384 | if (a->data != NULL) Free(a->data); | 387 | if (a->data != NULL) OPENSSL_free(a->data); |
| 385 | Free(a); | 388 | OPENSSL_free(a); |
| 386 | } | 389 | } |
| 387 | 390 | ||
| 388 | int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b) | 391 | int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b) |
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_mac.h b/src/lib/libssl/src/crypto/asn1/asn1_mac.h index 4f2a82d340..4512ba6cc6 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_mac.h +++ b/src/lib/libssl/src/crypto/asn1/asn1_mac.h | |||
| @@ -59,12 +59,12 @@ | |||
| 59 | #ifndef HEADER_ASN1_MAC_H | 59 | #ifndef HEADER_ASN1_MAC_H |
| 60 | #define HEADER_ASN1_MAC_H | 60 | #define HEADER_ASN1_MAC_H |
| 61 | 61 | ||
| 62 | #include <openssl/asn1.h> | ||
| 63 | |||
| 62 | #ifdef __cplusplus | 64 | #ifdef __cplusplus |
| 63 | extern "C" { | 65 | extern "C" { |
| 64 | #endif | 66 | #endif |
| 65 | 67 | ||
| 66 | #include <openssl/asn1.h> | ||
| 67 | |||
| 68 | #ifndef ASN1_MAC_ERR_LIB | 68 | #ifndef ASN1_MAC_ERR_LIB |
| 69 | #define ASN1_MAC_ERR_LIB ERR_LIB_ASN1 | 69 | #define ASN1_MAC_ERR_LIB ERR_LIB_ASN1 |
| 70 | #endif | 70 | #endif |
| @@ -340,7 +340,7 @@ err:\ | |||
| 340 | 340 | ||
| 341 | /* New macros */ | 341 | /* New macros */ |
| 342 | #define M_ASN1_New_Malloc(ret,type) \ | 342 | #define M_ASN1_New_Malloc(ret,type) \ |
| 343 | if ((ret=(type *)Malloc(sizeof(type))) == NULL) \ | 343 | if ((ret=(type *)OPENSSL_malloc(sizeof(type))) == NULL) \ |
| 344 | { c.line=__LINE__; goto err2; } | 344 | { c.line=__LINE__; goto err2; } |
| 345 | 345 | ||
| 346 | #define M_ASN1_New(arg,func) \ | 346 | #define M_ASN1_New(arg,func) \ |
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_par.c b/src/lib/libssl/src/crypto/asn1/asn1_par.c index d1e9816bad..facfdd27fc 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_par.c +++ b/src/lib/libssl/src/crypto/asn1/asn1_par.c | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | static int asn1_print_info(BIO *bp, int tag, int xclass,int constructed, | 65 | static int asn1_print_info(BIO *bp, int tag, int xclass,int constructed, |
| 66 | int indent); | 66 | int indent); |
| 67 | static int asn1_parse2(BIO *bp, unsigned char **pp, long length, | 67 | static int asn1_parse2(BIO *bp, unsigned char **pp, long length, |
| 68 | int offset, int depth, int indent); | 68 | int offset, int depth, int indent, int dump); |
| 69 | static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed, | 69 | static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed, |
| 70 | int indent) | 70 | int indent) |
| 71 | { | 71 | { |
| @@ -110,11 +110,16 @@ err: | |||
| 110 | 110 | ||
| 111 | int ASN1_parse(BIO *bp, unsigned char *pp, long len, int indent) | 111 | int ASN1_parse(BIO *bp, unsigned char *pp, long len, int indent) |
| 112 | { | 112 | { |
| 113 | return(asn1_parse2(bp,&pp,len,0,0,indent)); | 113 | return(asn1_parse2(bp,&pp,len,0,0,indent,0)); |
| 114 | } | ||
| 115 | |||
| 116 | int ASN1_parse_dump(BIO *bp, unsigned char *pp, long len, int indent, int dump) | ||
| 117 | { | ||
| 118 | return(asn1_parse2(bp,&pp,len,0,0,indent,dump)); | ||
| 114 | } | 119 | } |
| 115 | 120 | ||
| 116 | static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, | 121 | static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, |
| 117 | int depth, int indent) | 122 | int depth, int indent, int dump) |
| 118 | { | 123 | { |
| 119 | unsigned char *p,*ep,*tot,*op,*opp; | 124 | unsigned char *p,*ep,*tot,*op,*opp; |
| 120 | long len; | 125 | long len; |
| @@ -123,7 +128,13 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, | |||
| 123 | ASN1_OBJECT *o=NULL; | 128 | ASN1_OBJECT *o=NULL; |
| 124 | ASN1_OCTET_STRING *os=NULL; | 129 | ASN1_OCTET_STRING *os=NULL; |
| 125 | /* ASN1_BMPSTRING *bmp=NULL;*/ | 130 | /* ASN1_BMPSTRING *bmp=NULL;*/ |
| 131 | int dump_indent; | ||
| 126 | 132 | ||
| 133 | #if 0 | ||
| 134 | dump_indent = indent; | ||
| 135 | #else | ||
| 136 | dump_indent = 6; /* Because we know BIO_dump_indent() */ | ||
| 137 | #endif | ||
| 127 | p= *pp; | 138 | p= *pp; |
| 128 | tot=p+length; | 139 | tot=p+length; |
| 129 | op=p-1; | 140 | op=p-1; |
| @@ -178,7 +189,7 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, | |||
| 178 | { | 189 | { |
| 179 | r=asn1_parse2(bp,&p,(long)(tot-p), | 190 | r=asn1_parse2(bp,&p,(long)(tot-p), |
| 180 | offset+(p - *pp),depth+1, | 191 | offset+(p - *pp),depth+1, |
| 181 | indent); | 192 | indent,dump); |
| 182 | if (r == 0) { ret=0; goto end; } | 193 | if (r == 0) { ret=0; goto end; } |
| 183 | if ((r == 2) || (p >= tot)) break; | 194 | if ((r == 2) || (p >= tot)) break; |
| 184 | } | 195 | } |
| @@ -188,7 +199,7 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, | |||
| 188 | { | 199 | { |
| 189 | r=asn1_parse2(bp,&p,(long)len, | 200 | r=asn1_parse2(bp,&p,(long)len, |
| 190 | offset+(p - *pp),depth+1, | 201 | offset+(p - *pp),depth+1, |
| 191 | indent); | 202 | indent,dump); |
| 192 | if (r == 0) { ret=0; goto end; } | 203 | if (r == 0) { ret=0; goto end; } |
| 193 | } | 204 | } |
| 194 | } | 205 | } |
| @@ -273,6 +284,20 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, | |||
| 273 | os->length) <= 0) | 284 | os->length) <= 0) |
| 274 | goto end; | 285 | goto end; |
| 275 | } | 286 | } |
| 287 | if (!printable && (os->length > 0) | ||
| 288 | && dump) | ||
| 289 | { | ||
| 290 | if (!nl) | ||
| 291 | { | ||
| 292 | if (BIO_write(bp,"\n",1) <= 0) | ||
| 293 | goto end; | ||
| 294 | } | ||
| 295 | if (BIO_dump_indent(bp,(char *)opp, | ||
| 296 | ((dump == -1 || dump > os->length)?os->length:dump), | ||
| 297 | dump_indent) <= 0) | ||
| 298 | goto end; | ||
| 299 | nl=1; | ||
| 300 | } | ||
| 276 | M_ASN1_OCTET_STRING_free(os); | 301 | M_ASN1_OCTET_STRING_free(os); |
| 277 | os=NULL; | 302 | os=NULL; |
| 278 | } | 303 | } |
| @@ -341,6 +366,19 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, | |||
| 341 | } | 366 | } |
| 342 | M_ASN1_ENUMERATED_free(bs); | 367 | M_ASN1_ENUMERATED_free(bs); |
| 343 | } | 368 | } |
| 369 | else if (len > 0 && dump) | ||
| 370 | { | ||
| 371 | if (!nl) | ||
| 372 | { | ||
| 373 | if (BIO_write(bp,"\n",1) <= 0) | ||
| 374 | goto end; | ||
| 375 | } | ||
| 376 | if (BIO_dump_indent(bp,(char *)p, | ||
| 377 | ((dump == -1 || dump > len)?len:dump), | ||
| 378 | dump_indent) <= 0) | ||
| 379 | goto end; | ||
| 380 | nl=1; | ||
| 381 | } | ||
| 344 | 382 | ||
| 345 | if (!nl) | 383 | if (!nl) |
| 346 | { | 384 | { |
diff --git a/src/lib/libssl/src/crypto/asn1/asn_pack.c b/src/lib/libssl/src/crypto/asn1/asn_pack.c index 662a2626a1..bdf5f130b3 100644 --- a/src/lib/libssl/src/crypto/asn1/asn_pack.c +++ b/src/lib/libssl/src/crypto/asn1/asn_pack.c | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | /* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */ | 65 | /* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */ |
| 66 | 66 | ||
| 67 | STACK *ASN1_seq_unpack(unsigned char *buf, int len, char *(*d2i)(), | 67 | STACK *ASN1_seq_unpack(unsigned char *buf, int len, char *(*d2i)(), |
| 68 | void (*free_func)()) | 68 | void (*free_func)(void *)) |
| 69 | { | 69 | { |
| 70 | STACK *sk; | 70 | STACK *sk; |
| 71 | unsigned char *pbuf; | 71 | unsigned char *pbuf; |
| @@ -77,7 +77,7 @@ STACK *ASN1_seq_unpack(unsigned char *buf, int len, char *(*d2i)(), | |||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | /* Turn a STACK structures into an ASN1 encoded SEQUENCE OF structure in a | 79 | /* Turn a STACK structures into an ASN1 encoded SEQUENCE OF structure in a |
| 80 | * Malloc'ed buffer | 80 | * OPENSSL_malloc'ed buffer |
| 81 | */ | 81 | */ |
| 82 | 82 | ||
| 83 | unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf, | 83 | unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf, |
| @@ -90,7 +90,7 @@ unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf, | |||
| 90 | ASN1err(ASN1_F_ASN1_SEQ_PACK,ASN1_R_ENCODE_ERROR); | 90 | ASN1err(ASN1_F_ASN1_SEQ_PACK,ASN1_R_ENCODE_ERROR); |
| 91 | return NULL; | 91 | return NULL; |
| 92 | } | 92 | } |
| 93 | if (!(safe = Malloc (safelen))) { | 93 | if (!(safe = OPENSSL_malloc (safelen))) { |
| 94 | ASN1err(ASN1_F_ASN1_SEQ_PACK,ERR_R_MALLOC_FAILURE); | 94 | ASN1err(ASN1_F_ASN1_SEQ_PACK,ERR_R_MALLOC_FAILURE); |
| 95 | return NULL; | 95 | return NULL; |
| 96 | } | 96 | } |
| @@ -134,7 +134,7 @@ ASN1_STRING *ASN1_pack_string (void *obj, int (*i2d)(), ASN1_STRING **oct) | |||
| 134 | ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); | 134 | ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); |
| 135 | return NULL; | 135 | return NULL; |
| 136 | } | 136 | } |
| 137 | if (!(p = Malloc (octmp->length))) { | 137 | if (!(p = OPENSSL_malloc (octmp->length))) { |
| 138 | ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); | 138 | ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); |
| 139 | return NULL; | 139 | return NULL; |
| 140 | } | 140 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/charmap.h b/src/lib/libssl/src/crypto/asn1/charmap.h new file mode 100644 index 0000000000..bd020a9562 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/charmap.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | /* Auto generated with chartype.pl script. | ||
| 2 | * Mask of various character properties | ||
| 3 | */ | ||
| 4 | |||
| 5 | static unsigned char char_type[] = { | ||
| 6 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 7 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 8 | 120, 0, 1,40, 0, 0, 0,16,16,16, 0,25,25,16,16,16, | ||
| 9 | 16,16,16,16,16,16,16,16,16,16,16, 9, 9,16, 9,16, | ||
| 10 | 0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | ||
| 11 | 16,16,16,16,16,16,16,16,16,16,16, 0, 1, 0, 0, 0, | ||
| 12 | 0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | ||
| 13 | 16,16,16,16,16,16,16,16,16,16,16, 0, 0, 0, 0, 2 | ||
| 14 | }; | ||
| 15 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/charmap.pl b/src/lib/libssl/src/crypto/asn1/charmap.pl new file mode 100644 index 0000000000..2875c59867 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/charmap.pl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | #!/usr/local/bin/perl -w | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | |||
| 5 | my ($i, @arr); | ||
| 6 | |||
| 7 | # Set up an array with the type of ASCII characters | ||
| 8 | # Each set bit represents a character property. | ||
| 9 | |||
| 10 | # RFC2253 character properties | ||
| 11 | my $RFC2253_ESC = 1; # Character escaped with \ | ||
| 12 | my $ESC_CTRL = 2; # Escaped control character | ||
| 13 | # These are used with RFC1779 quoting using " | ||
| 14 | my $NOESC_QUOTE = 8; # Not escaped if quoted | ||
| 15 | my $PSTRING_CHAR = 0x10; # Valid PrintableString character | ||
| 16 | my $RFC2253_FIRST_ESC = 0x20; # Escaped with \ if first character | ||
| 17 | my $RFC2253_LAST_ESC = 0x40; # Escaped with \ if last character | ||
| 18 | |||
| 19 | for($i = 0; $i < 128; $i++) { | ||
| 20 | # Set the RFC2253 escape characters (control) | ||
| 21 | $arr[$i] = 0; | ||
| 22 | if(($i < 32) || ($i > 126)) { | ||
| 23 | $arr[$i] |= $ESC_CTRL; | ||
| 24 | } | ||
| 25 | |||
| 26 | # Some PrintableString characters | ||
| 27 | if( ( ( $i >= ord("a")) && ( $i <= ord("z")) ) | ||
| 28 | || ( ( $i >= ord("A")) && ( $i <= ord("Z")) ) | ||
| 29 | || ( ( $i >= ord("0")) && ( $i <= ord("9")) ) ) { | ||
| 30 | $arr[$i] |= $PSTRING_CHAR; | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | # Now setup the rest | ||
| 35 | |||
| 36 | # Remaining RFC2253 escaped characters | ||
| 37 | |||
| 38 | $arr[ord(" ")] |= $NOESC_QUOTE | $RFC2253_FIRST_ESC | $RFC2253_LAST_ESC; | ||
| 39 | $arr[ord("#")] |= $NOESC_QUOTE | $RFC2253_FIRST_ESC; | ||
| 40 | |||
| 41 | $arr[ord(",")] |= $NOESC_QUOTE | $RFC2253_ESC; | ||
| 42 | $arr[ord("+")] |= $NOESC_QUOTE | $RFC2253_ESC; | ||
| 43 | $arr[ord("\"")] |= $RFC2253_ESC; | ||
| 44 | $arr[ord("\\")] |= $RFC2253_ESC; | ||
| 45 | $arr[ord("<")] |= $NOESC_QUOTE | $RFC2253_ESC; | ||
| 46 | $arr[ord(">")] |= $NOESC_QUOTE | $RFC2253_ESC; | ||
| 47 | $arr[ord(";")] |= $NOESC_QUOTE | $RFC2253_ESC; | ||
| 48 | |||
| 49 | # Remaining PrintableString characters | ||
| 50 | |||
| 51 | $arr[ord(" ")] |= $PSTRING_CHAR; | ||
| 52 | $arr[ord("'")] |= $PSTRING_CHAR; | ||
| 53 | $arr[ord("(")] |= $PSTRING_CHAR; | ||
| 54 | $arr[ord(")")] |= $PSTRING_CHAR; | ||
| 55 | $arr[ord("+")] |= $PSTRING_CHAR; | ||
| 56 | $arr[ord(",")] |= $PSTRING_CHAR; | ||
| 57 | $arr[ord("-")] |= $PSTRING_CHAR; | ||
| 58 | $arr[ord(".")] |= $PSTRING_CHAR; | ||
| 59 | $arr[ord("/")] |= $PSTRING_CHAR; | ||
| 60 | $arr[ord(":")] |= $PSTRING_CHAR; | ||
| 61 | $arr[ord("=")] |= $PSTRING_CHAR; | ||
| 62 | $arr[ord("?")] |= $PSTRING_CHAR; | ||
| 63 | |||
| 64 | # Now generate the C code | ||
| 65 | |||
| 66 | print <<EOF; | ||
| 67 | /* Auto generated with chartype.pl script. | ||
| 68 | * Mask of various character properties | ||
| 69 | */ | ||
| 70 | |||
| 71 | static unsigned char char_type[] = { | ||
| 72 | EOF | ||
| 73 | |||
| 74 | for($i = 0; $i < 128; $i++) { | ||
| 75 | print("\n") if($i && (($i % 16) == 0)); | ||
| 76 | printf("%2d", $arr[$i]); | ||
| 77 | print(",") if ($i != 127); | ||
| 78 | } | ||
| 79 | print("\n};\n\n"); | ||
| 80 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_dsap.c b/src/lib/libssl/src/crypto/asn1/d2i_dsap.c index 6d1c297133..9d4dea6145 100644 --- a/src/lib/libssl/src/crypto/asn1/d2i_dsap.c +++ b/src/lib/libssl/src/crypto/asn1/d2i_dsap.c | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 65 | #include <openssl/asn1_mac.h> | 65 | #include <openssl/asn1_mac.h> |
| 66 | 66 | ||
| 67 | #ifdef NEG_PUBKEY_BUG | 67 | #ifndef NO_NEG_PUBKEY_BUG |
| 68 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | 68 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER |
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c index d1289f160e..9e5d41cf53 100644 --- a/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c +++ b/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 65 | #include <openssl/asn1_mac.h> | 65 | #include <openssl/asn1_mac.h> |
| 66 | 66 | ||
| 67 | #ifdef NEG_PUBKEY_BUG | 67 | #ifndef NO_NEG_PUBKEY_BUG |
| 68 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | 68 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER |
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c b/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c index dec2a2ebd3..55d5802d70 100644 --- a/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c +++ b/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c | |||
| @@ -92,6 +92,7 @@ DSA *d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length) | |||
| 92 | == NULL) goto err_bn; | 92 | == NULL) goto err_bn; |
| 93 | 93 | ||
| 94 | M_ASN1_INTEGER_free(bs); | 94 | M_ASN1_INTEGER_free(bs); |
| 95 | bs = NULL; | ||
| 95 | 96 | ||
| 96 | M_ASN1_D2I_Finish_2(a); | 97 | M_ASN1_D2I_Finish_2(a); |
| 97 | err_bn: | 98 | err_bn: |
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c index e0adaa0393..0b7d2fafcc 100644 --- a/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c +++ b/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | #include <openssl/objects.h> | 66 | #include <openssl/objects.h> |
| 67 | #include <openssl/asn1_mac.h> | 67 | #include <openssl/asn1_mac.h> |
| 68 | 68 | ||
| 69 | #ifdef NEG_PUBKEY_BUG | 69 | #ifndef NO_NEG_PUBKEY_BUG |
| 70 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | 70 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER |
| 71 | #endif | 71 | #endif |
| 72 | 72 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/f_enum.c b/src/lib/libssl/src/crypto/asn1/f_enum.c index 3d0b1107cb..56e3cc8df2 100644 --- a/src/lib/libssl/src/crypto/asn1/f_enum.c +++ b/src/lib/libssl/src/crypto/asn1/f_enum.c | |||
| @@ -153,15 +153,15 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size) | |||
| 153 | if (num+i > slen) | 153 | if (num+i > slen) |
| 154 | { | 154 | { |
| 155 | if (s == NULL) | 155 | if (s == NULL) |
| 156 | sp=(unsigned char *)Malloc( | 156 | sp=(unsigned char *)OPENSSL_malloc( |
| 157 | (unsigned int)num+i*2); | 157 | (unsigned int)num+i*2); |
| 158 | else | 158 | else |
| 159 | sp=(unsigned char *)Realloc(s, | 159 | sp=(unsigned char *)OPENSSL_realloc(s, |
| 160 | (unsigned int)num+i*2); | 160 | (unsigned int)num+i*2); |
| 161 | if (sp == NULL) | 161 | if (sp == NULL) |
| 162 | { | 162 | { |
| 163 | ASN1err(ASN1_F_A2I_ASN1_ENUMERATED,ERR_R_MALLOC_FAILURE); | 163 | ASN1err(ASN1_F_A2I_ASN1_ENUMERATED,ERR_R_MALLOC_FAILURE); |
| 164 | if (s != NULL) Free(s); | 164 | if (s != NULL) OPENSSL_free(s); |
| 165 | goto err; | 165 | goto err; |
| 166 | } | 166 | } |
| 167 | s=sp; | 167 | s=sp; |
diff --git a/src/lib/libssl/src/crypto/asn1/f_int.c b/src/lib/libssl/src/crypto/asn1/f_int.c index cd57331c3f..6b090f6740 100644 --- a/src/lib/libssl/src/crypto/asn1/f_int.c +++ b/src/lib/libssl/src/crypto/asn1/f_int.c | |||
| @@ -160,15 +160,15 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) | |||
| 160 | if (num+i > slen) | 160 | if (num+i > slen) |
| 161 | { | 161 | { |
| 162 | if (s == NULL) | 162 | if (s == NULL) |
| 163 | sp=(unsigned char *)Malloc( | 163 | sp=(unsigned char *)OPENSSL_malloc( |
| 164 | (unsigned int)num+i*2); | 164 | (unsigned int)num+i*2); |
| 165 | else | 165 | else |
| 166 | sp=(unsigned char *)Realloc(s, | 166 | sp=(unsigned char *)OPENSSL_realloc(s, |
| 167 | (unsigned int)num+i*2); | 167 | (unsigned int)num+i*2); |
| 168 | if (sp == NULL) | 168 | if (sp == NULL) |
| 169 | { | 169 | { |
| 170 | ASN1err(ASN1_F_A2I_ASN1_INTEGER,ERR_R_MALLOC_FAILURE); | 170 | ASN1err(ASN1_F_A2I_ASN1_INTEGER,ERR_R_MALLOC_FAILURE); |
| 171 | if (s != NULL) Free(s); | 171 | if (s != NULL) OPENSSL_free(s); |
| 172 | goto err; | 172 | goto err; |
| 173 | } | 173 | } |
| 174 | s=sp; | 174 | s=sp; |
diff --git a/src/lib/libssl/src/crypto/asn1/f_string.c b/src/lib/libssl/src/crypto/asn1/f_string.c index 088313689a..968698a798 100644 --- a/src/lib/libssl/src/crypto/asn1/f_string.c +++ b/src/lib/libssl/src/crypto/asn1/f_string.c | |||
| @@ -158,15 +158,15 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) | |||
| 158 | if (num+i > slen) | 158 | if (num+i > slen) |
| 159 | { | 159 | { |
| 160 | if (s == NULL) | 160 | if (s == NULL) |
| 161 | sp=(unsigned char *)Malloc( | 161 | sp=(unsigned char *)OPENSSL_malloc( |
| 162 | (unsigned int)num+i*2); | 162 | (unsigned int)num+i*2); |
| 163 | else | 163 | else |
| 164 | sp=(unsigned char *)Realloc(s, | 164 | sp=(unsigned char *)OPENSSL_realloc(s, |
| 165 | (unsigned int)num+i*2); | 165 | (unsigned int)num+i*2); |
| 166 | if (sp == NULL) | 166 | if (sp == NULL) |
| 167 | { | 167 | { |
| 168 | ASN1err(ASN1_F_A2I_ASN1_STRING,ERR_R_MALLOC_FAILURE); | 168 | ASN1err(ASN1_F_A2I_ASN1_STRING,ERR_R_MALLOC_FAILURE); |
| 169 | if (s != NULL) Free(s); | 169 | if (s != NULL) OPENSSL_free(s); |
| 170 | goto err; | 170 | goto err; |
| 171 | } | 171 | } |
| 172 | s=sp; | 172 | s=sp; |
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_dhp.c b/src/lib/libssl/src/crypto/asn1/i2d_dhp.c index 61eeb646f9..b1de17fe07 100644 --- a/src/lib/libssl/src/crypto/asn1/i2d_dhp.c +++ b/src/lib/libssl/src/crypto/asn1/i2d_dhp.c | |||
| @@ -105,7 +105,7 @@ int i2d_DHparams(DH *a, unsigned char **pp) | |||
| 105 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | 105 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); |
| 106 | 106 | ||
| 107 | bs.type=V_ASN1_INTEGER; | 107 | bs.type=V_ASN1_INTEGER; |
| 108 | bs.data=(unsigned char *)Malloc(max+4); | 108 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); |
| 109 | if (bs.data == NULL) | 109 | if (bs.data == NULL) |
| 110 | { | 110 | { |
| 111 | ASN1err(ASN1_F_I2D_DHPARAMS,ERR_R_MALLOC_FAILURE); | 111 | ASN1err(ASN1_F_I2D_DHPARAMS,ERR_R_MALLOC_FAILURE); |
| @@ -118,7 +118,7 @@ int i2d_DHparams(DH *a, unsigned char **pp) | |||
| 118 | bs.length=BN_bn2bin(num[i],bs.data); | 118 | bs.length=BN_bn2bin(num[i],bs.data); |
| 119 | i2d_ASN1_INTEGER(&bs,&p); | 119 | i2d_ASN1_INTEGER(&bs,&p); |
| 120 | } | 120 | } |
| 121 | Free(bs.data); | 121 | OPENSSL_free(bs.data); |
| 122 | ret=t; | 122 | ret=t; |
| 123 | err: | 123 | err: |
| 124 | if (num[2] != NULL) BN_free(num[2]); | 124 | if (num[2] != NULL) BN_free(num[2]); |
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_dsap.c b/src/lib/libssl/src/crypto/asn1/i2d_dsap.c index 4021123ba3..157fb43893 100644 --- a/src/lib/libssl/src/crypto/asn1/i2d_dsap.c +++ b/src/lib/libssl/src/crypto/asn1/i2d_dsap.c | |||
| @@ -94,7 +94,7 @@ int i2d_DSAparams(DSA *a, unsigned char **pp) | |||
| 94 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | 94 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); |
| 95 | 95 | ||
| 96 | bs.type=V_ASN1_INTEGER; | 96 | bs.type=V_ASN1_INTEGER; |
| 97 | bs.data=(unsigned char *)Malloc(max+4); | 97 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); |
| 98 | if (bs.data == NULL) | 98 | if (bs.data == NULL) |
| 99 | { | 99 | { |
| 100 | ASN1err(ASN1_F_I2D_DSAPARAMS,ERR_R_MALLOC_FAILURE); | 100 | ASN1err(ASN1_F_I2D_DSAPARAMS,ERR_R_MALLOC_FAILURE); |
| @@ -107,7 +107,7 @@ int i2d_DSAparams(DSA *a, unsigned char **pp) | |||
| 107 | bs.length=BN_bn2bin(num[i],bs.data); | 107 | bs.length=BN_bn2bin(num[i],bs.data); |
| 108 | i2d_ASN1_INTEGER(&bs,&p); | 108 | i2d_ASN1_INTEGER(&bs,&p); |
| 109 | } | 109 | } |
| 110 | Free(bs.data); | 110 | OPENSSL_free(bs.data); |
| 111 | ret=t; | 111 | ret=t; |
| 112 | err: | 112 | err: |
| 113 | *pp=p; | 113 | *pp=p; |
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c b/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c index 1250fa4b2d..88b1aac989 100644 --- a/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c +++ b/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c | |||
| @@ -107,7 +107,7 @@ int i2d_RSAPrivateKey(RSA *a, unsigned char **pp) | |||
| 107 | 107 | ||
| 108 | i2d_ASN1_INTEGER(&bs,&p); | 108 | i2d_ASN1_INTEGER(&bs,&p); |
| 109 | 109 | ||
| 110 | bs.data=(unsigned char *)Malloc(max+4); | 110 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); |
| 111 | if (bs.data == NULL) | 111 | if (bs.data == NULL) |
| 112 | { | 112 | { |
| 113 | ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); | 113 | ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); |
| @@ -119,7 +119,7 @@ int i2d_RSAPrivateKey(RSA *a, unsigned char **pp) | |||
| 119 | bs.length=BN_bn2bin(num[i],bs.data); | 119 | bs.length=BN_bn2bin(num[i],bs.data); |
| 120 | i2d_ASN1_INTEGER(&bs,&p); | 120 | i2d_ASN1_INTEGER(&bs,&p); |
| 121 | } | 121 | } |
| 122 | Free(bs.data); | 122 | OPENSSL_free(bs.data); |
| 123 | *pp=p; | 123 | *pp=p; |
| 124 | return(t); | 124 | return(t); |
| 125 | } | 125 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c b/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c index 582b92ee4c..8178c2c3b3 100644 --- a/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c +++ b/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c | |||
| @@ -93,7 +93,7 @@ int i2d_RSAPublicKey(RSA *a, unsigned char **pp) | |||
| 93 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | 93 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); |
| 94 | 94 | ||
| 95 | bs.type=V_ASN1_INTEGER; | 95 | bs.type=V_ASN1_INTEGER; |
| 96 | bs.data=(unsigned char *)Malloc(max+4); | 96 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); |
| 97 | if (bs.data == NULL) | 97 | if (bs.data == NULL) |
| 98 | { | 98 | { |
| 99 | ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ERR_R_MALLOC_FAILURE); | 99 | ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ERR_R_MALLOC_FAILURE); |
| @@ -105,7 +105,7 @@ int i2d_RSAPublicKey(RSA *a, unsigned char **pp) | |||
| 105 | bs.length=BN_bn2bin(num[i],bs.data); | 105 | bs.length=BN_bn2bin(num[i],bs.data); |
| 106 | i2d_ASN1_INTEGER(&bs,&p); | 106 | i2d_ASN1_INTEGER(&bs,&p); |
| 107 | } | 107 | } |
| 108 | Free(bs.data); | 108 | OPENSSL_free(bs.data); |
| 109 | *pp=p; | 109 | *pp=p; |
| 110 | return(t); | 110 | return(t); |
| 111 | } | 111 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c b/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c index e399ceaeb9..9922952ad7 100644 --- a/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c +++ b/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c | |||
| @@ -104,7 +104,7 @@ int i2d_DSAPrivateKey(DSA *a, unsigned char **pp) | |||
| 104 | 104 | ||
| 105 | i2d_ASN1_INTEGER(&bs,&p); | 105 | i2d_ASN1_INTEGER(&bs,&p); |
| 106 | 106 | ||
| 107 | bs.data=(unsigned char *)Malloc(max+4); | 107 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); |
| 108 | if (bs.data == NULL) | 108 | if (bs.data == NULL) |
| 109 | { | 109 | { |
| 110 | ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); | 110 | ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); |
| @@ -116,7 +116,7 @@ int i2d_DSAPrivateKey(DSA *a, unsigned char **pp) | |||
| 116 | bs.length=BN_bn2bin(num[i],bs.data); | 116 | bs.length=BN_bn2bin(num[i],bs.data); |
| 117 | i2d_ASN1_INTEGER(&bs,&p); | 117 | i2d_ASN1_INTEGER(&bs,&p); |
| 118 | } | 118 | } |
| 119 | Free(bs.data); | 119 | OPENSSL_free(bs.data); |
| 120 | *pp=p; | 120 | *pp=p; |
| 121 | return(t); | 121 | return(t); |
| 122 | } | 122 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c b/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c index ca7f251b71..e6014b82a8 100644 --- a/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c +++ b/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c | |||
| @@ -109,7 +109,7 @@ int i2d_DSAPublicKey(DSA *a, unsigned char **pp) | |||
| 109 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | 109 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); |
| 110 | 110 | ||
| 111 | bs.type=V_ASN1_INTEGER; | 111 | bs.type=V_ASN1_INTEGER; |
| 112 | bs.data=(unsigned char *)Malloc(max+4); | 112 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); |
| 113 | if (bs.data == NULL) | 113 | if (bs.data == NULL) |
| 114 | { | 114 | { |
| 115 | ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ERR_R_MALLOC_FAILURE); | 115 | ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ERR_R_MALLOC_FAILURE); |
| @@ -121,7 +121,7 @@ int i2d_DSAPublicKey(DSA *a, unsigned char **pp) | |||
| 121 | bs.length=BN_bn2bin(num[i],bs.data); | 121 | bs.length=BN_bn2bin(num[i],bs.data); |
| 122 | i2d_ASN1_INTEGER(&bs,&p); | 122 | i2d_ASN1_INTEGER(&bs,&p); |
| 123 | } | 123 | } |
| 124 | Free(bs.data); | 124 | OPENSSL_free(bs.data); |
| 125 | *pp=p; | 125 | *pp=p; |
| 126 | if(all) return(t); | 126 | if(all) return(t); |
| 127 | else return(tot); | 127 | else return(tot); |
diff --git a/src/lib/libssl/src/crypto/asn1/n_pkey.c b/src/lib/libssl/src/crypto/asn1/n_pkey.c index d804986b73..9840193538 100644 --- a/src/lib/libssl/src/crypto/asn1/n_pkey.c +++ b/src/lib/libssl/src/crypto/asn1/n_pkey.c | |||
| @@ -81,6 +81,11 @@ static NETSCAPE_PKEY *NETSCAPE_PKEY_new(void); | |||
| 81 | static void NETSCAPE_PKEY_free(NETSCAPE_PKEY *); | 81 | static void NETSCAPE_PKEY_free(NETSCAPE_PKEY *); |
| 82 | 82 | ||
| 83 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()) | 83 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()) |
| 84 | { | ||
| 85 | return i2d_RSA_NET(a, pp, cb, 0); | ||
| 86 | } | ||
| 87 | |||
| 88 | int i2d_RSA_NET(RSA *a, unsigned char **pp, int (*cb)(), int sgckey) | ||
| 84 | { | 89 | { |
| 85 | int i,j,l[6]; | 90 | int i,j,l[6]; |
| 86 | NETSCAPE_PKEY *pkey; | 91 | NETSCAPE_PKEY *pkey; |
| @@ -139,8 +144,8 @@ int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()) | |||
| 139 | } | 144 | } |
| 140 | 145 | ||
| 141 | if (pkey->private_key->data != NULL) | 146 | if (pkey->private_key->data != NULL) |
| 142 | Free(pkey->private_key->data); | 147 | OPENSSL_free(pkey->private_key->data); |
| 143 | if ((pkey->private_key->data=(unsigned char *)Malloc(l[0])) == NULL) | 148 | if ((pkey->private_key->data=(unsigned char *)OPENSSL_malloc(l[0])) == NULL) |
| 144 | { | 149 | { |
| 145 | ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ERR_R_MALLOC_FAILURE); | 150 | ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ERR_R_MALLOC_FAILURE); |
| 146 | goto err; | 151 | goto err; |
| @@ -148,7 +153,7 @@ int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()) | |||
| 148 | zz=pkey->private_key->data; | 153 | zz=pkey->private_key->data; |
| 149 | i2d_RSAPrivateKey(a,&zz); | 154 | i2d_RSAPrivateKey(a,&zz); |
| 150 | 155 | ||
| 151 | if ((os2.data=(unsigned char *)Malloc(os2.length)) == NULL) | 156 | if ((os2.data=(unsigned char *)OPENSSL_malloc(os2.length)) == NULL) |
| 152 | { | 157 | { |
| 153 | ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ERR_R_MALLOC_FAILURE); | 158 | ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ERR_R_MALLOC_FAILURE); |
| 154 | goto err; | 159 | goto err; |
| @@ -164,8 +169,18 @@ int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()) | |||
| 164 | ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ASN1_R_BAD_PASSWORD_READ); | 169 | ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ASN1_R_BAD_PASSWORD_READ); |
| 165 | goto err; | 170 | goto err; |
| 166 | } | 171 | } |
| 167 | EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf, | 172 | i = strlen((char *)buf); |
| 168 | strlen((char *)buf),1,key,NULL); | 173 | /* If the key is used for SGC the algorithm is modified a little. */ |
| 174 | if(sgckey){ | ||
| 175 | EVP_MD_CTX mctx; | ||
| 176 | EVP_DigestInit(&mctx, EVP_md5()); | ||
| 177 | EVP_DigestUpdate(&mctx, buf, i); | ||
| 178 | EVP_DigestFinal(&mctx, buf, NULL); | ||
| 179 | memcpy(buf + 16, "SGCKEYSALT", 10); | ||
| 180 | i = 26; | ||
| 181 | } | ||
| 182 | |||
| 183 | EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL); | ||
| 169 | memset(buf,0,256); | 184 | memset(buf,0,256); |
| 170 | 185 | ||
| 171 | EVP_CIPHER_CTX_init(&ctx); | 186 | EVP_CIPHER_CTX_init(&ctx); |
| @@ -182,14 +197,20 @@ int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()) | |||
| 182 | i2d_ASN1_OCTET_STRING(&os2,&p); | 197 | i2d_ASN1_OCTET_STRING(&os2,&p); |
| 183 | ret=l[5]; | 198 | ret=l[5]; |
| 184 | err: | 199 | err: |
| 185 | if (os2.data != NULL) Free(os2.data); | 200 | if (os2.data != NULL) OPENSSL_free(os2.data); |
| 186 | if (alg != NULL) X509_ALGOR_free(alg); | 201 | if (alg != NULL) X509_ALGOR_free(alg); |
| 187 | if (pkey != NULL) NETSCAPE_PKEY_free(pkey); | 202 | if (pkey != NULL) NETSCAPE_PKEY_free(pkey); |
| 188 | r=r; | 203 | r=r; |
| 189 | return(ret); | 204 | return(ret); |
| 190 | } | 205 | } |
| 191 | 206 | ||
| 207 | |||
| 192 | RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()) | 208 | RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()) |
| 209 | { | ||
| 210 | return d2i_RSA_NET(a, pp, length, cb, 0); | ||
| 211 | } | ||
| 212 | |||
| 213 | RSA *d2i_RSA_NET(RSA **a, unsigned char **pp, long length, int (*cb)(), int sgckey) | ||
| 193 | { | 214 | { |
| 194 | RSA *ret=NULL; | 215 | RSA *ret=NULL; |
| 195 | ASN1_OCTET_STRING *os=NULL; | 216 | ASN1_OCTET_STRING *os=NULL; |
| @@ -210,14 +231,24 @@ RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()) | |||
| 210 | } | 231 | } |
| 211 | M_ASN1_BIT_STRING_free(os); | 232 | M_ASN1_BIT_STRING_free(os); |
| 212 | c.q=c.p; | 233 | c.q=c.p; |
| 213 | if ((ret=d2i_Netscape_RSA_2(a,&c.p,c.slen,cb)) == NULL) goto err; | 234 | if ((ret=d2i_RSA_NET_2(a,&c.p,c.slen,cb, sgckey)) == NULL) goto err; |
| 214 | c.slen-=(c.p-c.q); | 235 | /* Note: some versions of IIS key files use length values that are |
| 236 | * too small for the surrounding SEQUENCEs. This following line | ||
| 237 | * effectively disable length checking. | ||
| 238 | */ | ||
| 239 | c.slen = 0; | ||
| 215 | 240 | ||
| 216 | M_ASN1_D2I_Finish(a,RSA_free,ASN1_F_D2I_NETSCAPE_RSA); | 241 | M_ASN1_D2I_Finish(a,RSA_free,ASN1_F_D2I_NETSCAPE_RSA); |
| 217 | } | 242 | } |
| 218 | 243 | ||
| 219 | RSA *d2i_Netscape_RSA_2(RSA **a, unsigned char **pp, long length, | 244 | RSA *d2i_Netscape_RSA_2(RSA **a, unsigned char **pp, long length, |
| 220 | int (*cb)()) | 245 | int (*cb)()) |
| 246 | { | ||
| 247 | return d2i_RSA_NET_2(a, pp, length, cb, 0); | ||
| 248 | } | ||
| 249 | |||
| 250 | RSA *d2i_RSA_NET_2(RSA **a, unsigned char **pp, long length, | ||
| 251 | int (*cb)(), int sgckey) | ||
| 221 | { | 252 | { |
| 222 | NETSCAPE_PKEY *pkey=NULL; | 253 | NETSCAPE_PKEY *pkey=NULL; |
| 223 | RSA *ret=NULL; | 254 | RSA *ret=NULL; |
| @@ -250,8 +281,17 @@ RSA *d2i_Netscape_RSA_2(RSA **a, unsigned char **pp, long length, | |||
| 250 | goto err; | 281 | goto err; |
| 251 | } | 282 | } |
| 252 | 283 | ||
| 253 | EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf, | 284 | i = strlen((char *)buf); |
| 254 | strlen((char *)buf),1,key,NULL); | 285 | if(sgckey){ |
| 286 | EVP_MD_CTX mctx; | ||
| 287 | EVP_DigestInit(&mctx, EVP_md5()); | ||
| 288 | EVP_DigestUpdate(&mctx, buf, i); | ||
| 289 | EVP_DigestFinal(&mctx, buf, NULL); | ||
| 290 | memcpy(buf + 16, "SGCKEYSALT", 10); | ||
| 291 | i = 26; | ||
| 292 | } | ||
| 293 | |||
| 294 | EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL); | ||
| 255 | memset(buf,0,256); | 295 | memset(buf,0,256); |
| 256 | 296 | ||
| 257 | EVP_CIPHER_CTX_init(&ctx); | 297 | EVP_CIPHER_CTX_init(&ctx); |
| @@ -334,7 +374,7 @@ static void NETSCAPE_PKEY_free(NETSCAPE_PKEY *a) | |||
| 334 | M_ASN1_INTEGER_free(a->version); | 374 | M_ASN1_INTEGER_free(a->version); |
| 335 | X509_ALGOR_free(a->algor); | 375 | X509_ALGOR_free(a->algor); |
| 336 | M_ASN1_OCTET_STRING_free(a->private_key); | 376 | M_ASN1_OCTET_STRING_free(a->private_key); |
| 337 | Free(a); | 377 | OPENSSL_free(a); |
| 338 | } | 378 | } |
| 339 | 379 | ||
| 340 | #endif /* NO_RC4 */ | 380 | #endif /* NO_RC4 */ |
diff --git a/src/lib/libssl/src/crypto/asn1/nsseq.c b/src/lib/libssl/src/crypto/asn1/nsseq.c index 417d024b81..6e7f09ba23 100644 --- a/src/lib/libssl/src/crypto/asn1/nsseq.c +++ b/src/lib/libssl/src/crypto/asn1/nsseq.c | |||
| @@ -114,5 +114,5 @@ void NETSCAPE_CERT_SEQUENCE_free (NETSCAPE_CERT_SEQUENCE *a) | |||
| 114 | ASN1_OBJECT_free(a->type); | 114 | ASN1_OBJECT_free(a->type); |
| 115 | if(a->certs) | 115 | if(a->certs) |
| 116 | sk_X509_pop_free(a->certs, X509_free); | 116 | sk_X509_pop_free(a->certs, X509_free); |
| 117 | Free (a); | 117 | OPENSSL_free (a); |
| 118 | } | 118 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/p5_pbe.c b/src/lib/libssl/src/crypto/asn1/p5_pbe.c index a147ac3295..b7ed538eb2 100644 --- a/src/lib/libssl/src/crypto/asn1/p5_pbe.c +++ b/src/lib/libssl/src/crypto/asn1/p5_pbe.c | |||
| @@ -103,7 +103,7 @@ void PBEPARAM_free (PBEPARAM *a) | |||
| 103 | if(a==NULL) return; | 103 | if(a==NULL) return; |
| 104 | M_ASN1_OCTET_STRING_free(a->salt); | 104 | M_ASN1_OCTET_STRING_free(a->salt); |
| 105 | M_ASN1_INTEGER_free (a->iter); | 105 | M_ASN1_INTEGER_free (a->iter); |
| 106 | Free (a); | 106 | OPENSSL_free (a); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | /* Return an algorithm identifier for a PKCS#5 PBE algorithm */ | 109 | /* Return an algorithm identifier for a PKCS#5 PBE algorithm */ |
| @@ -123,7 +123,7 @@ X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt, | |||
| 123 | if(iter <= 0) iter = PKCS5_DEFAULT_ITER; | 123 | if(iter <= 0) iter = PKCS5_DEFAULT_ITER; |
| 124 | ASN1_INTEGER_set (pbe->iter, iter); | 124 | ASN1_INTEGER_set (pbe->iter, iter); |
| 125 | if (!saltlen) saltlen = PKCS5_SALT_LEN; | 125 | if (!saltlen) saltlen = PKCS5_SALT_LEN; |
| 126 | if (!(pbe->salt->data = Malloc (saltlen))) { | 126 | if (!(pbe->salt->data = OPENSSL_malloc (saltlen))) { |
| 127 | ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE); | 127 | ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE); |
| 128 | return NULL; | 128 | return NULL; |
| 129 | } | 129 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/p5_pbev2.c b/src/lib/libssl/src/crypto/asn1/p5_pbev2.c index 1bbdb10c71..6a7b578c0e 100644 --- a/src/lib/libssl/src/crypto/asn1/p5_pbev2.c +++ b/src/lib/libssl/src/crypto/asn1/p5_pbev2.c | |||
| @@ -104,7 +104,7 @@ void PBE2PARAM_free (PBE2PARAM *a) | |||
| 104 | if(a==NULL) return; | 104 | if(a==NULL) return; |
| 105 | X509_ALGOR_free(a->keyfunc); | 105 | X509_ALGOR_free(a->keyfunc); |
| 106 | X509_ALGOR_free(a->encryption); | 106 | X509_ALGOR_free(a->encryption); |
| 107 | Free (a); | 107 | OPENSSL_free (a); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **pp) | 110 | int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **pp) |
| @@ -158,7 +158,7 @@ void PBKDF2PARAM_free (PBKDF2PARAM *a) | |||
| 158 | M_ASN1_INTEGER_free(a->iter); | 158 | M_ASN1_INTEGER_free(a->iter); |
| 159 | M_ASN1_INTEGER_free(a->keylength); | 159 | M_ASN1_INTEGER_free(a->keylength); |
| 160 | X509_ALGOR_free(a->prf); | 160 | X509_ALGOR_free(a->prf); |
| 161 | Free (a); | 161 | OPENSSL_free (a); |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | /* Return an algorithm identifier for a PKCS#5 v2.0 PBE algorithm: | 164 | /* Return an algorithm identifier for a PKCS#5 v2.0 PBE algorithm: |
| @@ -210,7 +210,7 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, | |||
| 210 | if(!(osalt = M_ASN1_OCTET_STRING_new())) goto merr; | 210 | if(!(osalt = M_ASN1_OCTET_STRING_new())) goto merr; |
| 211 | 211 | ||
| 212 | if (!saltlen) saltlen = PKCS5_SALT_LEN; | 212 | if (!saltlen) saltlen = PKCS5_SALT_LEN; |
| 213 | if (!(osalt->data = Malloc (saltlen))) goto merr; | 213 | if (!(osalt->data = OPENSSL_malloc (saltlen))) goto merr; |
| 214 | osalt->length = saltlen; | 214 | osalt->length = saltlen; |
| 215 | if (salt) memcpy (osalt->data, salt, saltlen); | 215 | if (salt) memcpy (osalt->data, salt, saltlen); |
| 216 | else if (RAND_pseudo_bytes (osalt->data, saltlen) < 0) goto merr; | 216 | else if (RAND_pseudo_bytes (osalt->data, saltlen) < 0) goto merr; |
diff --git a/src/lib/libssl/src/crypto/asn1/p7_dgst.c b/src/lib/libssl/src/crypto/asn1/p7_dgst.c index cba90e94a1..c170244616 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_dgst.c +++ b/src/lib/libssl/src/crypto/asn1/p7_dgst.c | |||
| @@ -116,6 +116,6 @@ void PKCS7_DIGEST_free(PKCS7_DIGEST *a) | |||
| 116 | X509_ALGOR_free(a->md); | 116 | X509_ALGOR_free(a->md); |
| 117 | PKCS7_free(a->contents); | 117 | PKCS7_free(a->contents); |
| 118 | M_ASN1_OCTET_STRING_free(a->digest); | 118 | M_ASN1_OCTET_STRING_free(a->digest); |
| 119 | Free(a); | 119 | OPENSSL_free(a); |
| 120 | } | 120 | } |
| 121 | 121 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_enc.c b/src/lib/libssl/src/crypto/asn1/p7_enc.c index 83b0e15faa..38ccafbdb0 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_enc.c +++ b/src/lib/libssl/src/crypto/asn1/p7_enc.c | |||
| @@ -106,6 +106,6 @@ void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a) | |||
| 106 | if (a == NULL) return; | 106 | if (a == NULL) return; |
| 107 | M_ASN1_INTEGER_free(a->version); | 107 | M_ASN1_INTEGER_free(a->version); |
| 108 | PKCS7_ENC_CONTENT_free(a->enc_data); | 108 | PKCS7_ENC_CONTENT_free(a->enc_data); |
| 109 | Free(a); | 109 | OPENSSL_free(a); |
| 110 | } | 110 | } |
| 111 | 111 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_enc_c.c b/src/lib/libssl/src/crypto/asn1/p7_enc_c.c index 582cc78b06..031178ab52 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_enc_c.c +++ b/src/lib/libssl/src/crypto/asn1/p7_enc_c.c | |||
| @@ -115,6 +115,6 @@ void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a) | |||
| 115 | ASN1_OBJECT_free(a->content_type); | 115 | ASN1_OBJECT_free(a->content_type); |
| 116 | X509_ALGOR_free(a->algorithm); | 116 | X509_ALGOR_free(a->algorithm); |
| 117 | M_ASN1_OCTET_STRING_free(a->enc_data); | 117 | M_ASN1_OCTET_STRING_free(a->enc_data); |
| 118 | Free(a); | 118 | OPENSSL_free(a); |
| 119 | } | 119 | } |
| 120 | 120 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_evp.c b/src/lib/libssl/src/crypto/asn1/p7_evp.c index 4e734fdd28..60be3e5f66 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_evp.c +++ b/src/lib/libssl/src/crypto/asn1/p7_evp.c | |||
| @@ -114,6 +114,6 @@ void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a) | |||
| 114 | M_ASN1_INTEGER_free(a->version); | 114 | M_ASN1_INTEGER_free(a->version); |
| 115 | sk_PKCS7_RECIP_INFO_pop_free(a->recipientinfo,PKCS7_RECIP_INFO_free); | 115 | sk_PKCS7_RECIP_INFO_pop_free(a->recipientinfo,PKCS7_RECIP_INFO_free); |
| 116 | PKCS7_ENC_CONTENT_free(a->enc_data); | 116 | PKCS7_ENC_CONTENT_free(a->enc_data); |
| 117 | Free(a); | 117 | OPENSSL_free(a); |
| 118 | } | 118 | } |
| 119 | 119 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_i_s.c b/src/lib/libssl/src/crypto/asn1/p7_i_s.c index d21f7ddb84..4a7260a5c8 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_i_s.c +++ b/src/lib/libssl/src/crypto/asn1/p7_i_s.c | |||
| @@ -106,6 +106,6 @@ void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a) | |||
| 106 | if (a == NULL) return; | 106 | if (a == NULL) return; |
| 107 | X509_NAME_free(a->issuer); | 107 | X509_NAME_free(a->issuer); |
| 108 | M_ASN1_INTEGER_free(a->serial); | 108 | M_ASN1_INTEGER_free(a->serial); |
| 109 | Free(a); | 109 | OPENSSL_free(a); |
| 110 | } | 110 | } |
| 111 | 111 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_lib.c b/src/lib/libssl/src/crypto/asn1/p7_lib.c index 86db82cfa1..b1196ef581 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_lib.c +++ b/src/lib/libssl/src/crypto/asn1/p7_lib.c | |||
| @@ -62,6 +62,8 @@ | |||
| 62 | #include <openssl/pkcs7.h> | 62 | #include <openssl/pkcs7.h> |
| 63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 64 | 64 | ||
| 65 | #ifdef PKCS7_INDEFINITE_ENCODING | ||
| 66 | |||
| 65 | int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | 67 | int i2d_PKCS7(PKCS7 *a, unsigned char **pp) |
| 66 | { | 68 | { |
| 67 | M_ASN1_I2D_vars(a); | 69 | M_ASN1_I2D_vars(a); |
| @@ -102,6 +104,7 @@ int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | |||
| 102 | M_ASN1_I2D_len(a->d.encrypted,i2d_PKCS7_ENCRYPT); | 104 | M_ASN1_I2D_len(a->d.encrypted,i2d_PKCS7_ENCRYPT); |
| 103 | break; | 105 | break; |
| 104 | default: | 106 | default: |
| 107 | M_ASN1_I2D_len(a->d.other,i2d_ASN1_TYPE); | ||
| 105 | break; | 108 | break; |
| 106 | } | 109 | } |
| 107 | } | 110 | } |
| @@ -136,6 +139,7 @@ int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | |||
| 136 | M_ASN1_I2D_put(a->d.encrypted,i2d_PKCS7_ENCRYPT); | 139 | M_ASN1_I2D_put(a->d.encrypted,i2d_PKCS7_ENCRYPT); |
| 137 | break; | 140 | break; |
| 138 | default: | 141 | default: |
| 142 | M_ASN1_I2D_put(a->d.other,i2d_ASN1_TYPE); | ||
| 139 | break; | 143 | break; |
| 140 | } | 144 | } |
| 141 | M_ASN1_I2D_INF_seq_end(); | 145 | M_ASN1_I2D_INF_seq_end(); |
| @@ -144,6 +148,98 @@ int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | |||
| 144 | M_ASN1_I2D_finish(); | 148 | M_ASN1_I2D_finish(); |
| 145 | } | 149 | } |
| 146 | 150 | ||
| 151 | #else | ||
| 152 | |||
| 153 | int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | ||
| 154 | { | ||
| 155 | int explen = 0; | ||
| 156 | M_ASN1_I2D_vars(a); | ||
| 157 | |||
| 158 | if (a->asn1 != NULL) | ||
| 159 | { | ||
| 160 | if (pp == NULL) | ||
| 161 | return((int)a->length); | ||
| 162 | memcpy(*pp,a->asn1,(int)a->length); | ||
| 163 | *pp+=a->length; | ||
| 164 | return((int)a->length); | ||
| 165 | } | ||
| 166 | |||
| 167 | M_ASN1_I2D_len(a->type,i2d_ASN1_OBJECT); | ||
| 168 | if (a->d.ptr != NULL) | ||
| 169 | { | ||
| 170 | /* Save current length */ | ||
| 171 | r = ret; | ||
| 172 | switch (OBJ_obj2nid(a->type)) | ||
| 173 | { | ||
| 174 | case NID_pkcs7_data: | ||
| 175 | M_ASN1_I2D_len(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 176 | break; | ||
| 177 | case NID_pkcs7_signed: | ||
| 178 | M_ASN1_I2D_len(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 179 | break; | ||
| 180 | case NID_pkcs7_enveloped: | ||
| 181 | M_ASN1_I2D_len(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 182 | break; | ||
| 183 | case NID_pkcs7_signedAndEnveloped: | ||
| 184 | M_ASN1_I2D_len(a->d.signed_and_enveloped, | ||
| 185 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 186 | break; | ||
| 187 | case NID_pkcs7_digest: | ||
| 188 | M_ASN1_I2D_len(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 189 | break; | ||
| 190 | case NID_pkcs7_encrypted: | ||
| 191 | M_ASN1_I2D_len(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 192 | break; | ||
| 193 | default: | ||
| 194 | M_ASN1_I2D_len(a->d.other,i2d_ASN1_TYPE); | ||
| 195 | break; | ||
| 196 | } | ||
| 197 | /* Work out explicit tag content size */ | ||
| 198 | explen = ret - r; | ||
| 199 | /* Work out explicit tag size: Note: ASN1_object_size | ||
| 200 | * includes the content length. | ||
| 201 | */ | ||
| 202 | ret = r + ASN1_object_size(1, explen, 0); | ||
| 203 | } | ||
| 204 | |||
| 205 | M_ASN1_I2D_seq_total(); | ||
| 206 | |||
| 207 | M_ASN1_I2D_put(a->type,i2d_ASN1_OBJECT); | ||
| 208 | |||
| 209 | if (a->d.ptr != NULL) | ||
| 210 | { | ||
| 211 | ASN1_put_object(&p, 1, explen, 0, V_ASN1_CONTEXT_SPECIFIC); | ||
| 212 | switch (OBJ_obj2nid(a->type)) | ||
| 213 | { | ||
| 214 | case NID_pkcs7_data: | ||
| 215 | M_ASN1_I2D_put(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 216 | break; | ||
| 217 | case NID_pkcs7_signed: | ||
| 218 | M_ASN1_I2D_put(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 219 | break; | ||
| 220 | case NID_pkcs7_enveloped: | ||
| 221 | M_ASN1_I2D_put(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 222 | break; | ||
| 223 | case NID_pkcs7_signedAndEnveloped: | ||
| 224 | M_ASN1_I2D_put(a->d.signed_and_enveloped, | ||
| 225 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 226 | break; | ||
| 227 | case NID_pkcs7_digest: | ||
| 228 | M_ASN1_I2D_put(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 229 | break; | ||
| 230 | case NID_pkcs7_encrypted: | ||
| 231 | M_ASN1_I2D_put(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 232 | break; | ||
| 233 | default: | ||
| 234 | M_ASN1_I2D_put(a->d.other,i2d_ASN1_TYPE); | ||
| 235 | break; | ||
| 236 | } | ||
| 237 | } | ||
| 238 | M_ASN1_I2D_finish(); | ||
| 239 | } | ||
| 240 | |||
| 241 | #endif | ||
| 242 | |||
| 147 | PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length) | 243 | PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length) |
| 148 | { | 244 | { |
| 149 | M_ASN1_D2I_vars(a,PKCS7 *,PKCS7_new); | 245 | M_ASN1_D2I_vars(a,PKCS7 *,PKCS7_new); |
| @@ -152,7 +248,7 @@ PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length) | |||
| 152 | { | 248 | { |
| 153 | if ((*a)->asn1 != NULL) | 249 | if ((*a)->asn1 != NULL) |
| 154 | { | 250 | { |
| 155 | Free((*a)->asn1); | 251 | OPENSSL_free((*a)->asn1); |
| 156 | (*a)->asn1=NULL; | 252 | (*a)->asn1=NULL; |
| 157 | } | 253 | } |
| 158 | (*a)->length=0; | 254 | (*a)->length=0; |
| @@ -206,10 +302,8 @@ PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length) | |||
| 206 | M_ASN1_D2I_get(ret->d.encrypted,d2i_PKCS7_ENCRYPT); | 302 | M_ASN1_D2I_get(ret->d.encrypted,d2i_PKCS7_ENCRYPT); |
| 207 | break; | 303 | break; |
| 208 | default: | 304 | default: |
| 209 | c.error=ASN1_R_BAD_PKCS7_TYPE; | 305 | M_ASN1_D2I_get(ret->d.other,d2i_ASN1_TYPE); |
| 210 | c.line=__LINE__; | 306 | break; |
| 211 | goto err; | ||
| 212 | /* break; */ | ||
| 213 | } | 307 | } |
| 214 | if (Tinf == (1|V_ASN1_CONSTRUCTED)) | 308 | if (Tinf == (1|V_ASN1_CONSTRUCTED)) |
| 215 | { | 309 | { |
| @@ -251,7 +345,7 @@ void PKCS7_free(PKCS7 *a) | |||
| 251 | { | 345 | { |
| 252 | ASN1_OBJECT_free(a->type); | 346 | ASN1_OBJECT_free(a->type); |
| 253 | } | 347 | } |
| 254 | Free(a); | 348 | OPENSSL_free(a); |
| 255 | } | 349 | } |
| 256 | 350 | ||
| 257 | void PKCS7_content_free(PKCS7 *a) | 351 | void PKCS7_content_free(PKCS7 *a) |
| @@ -259,7 +353,7 @@ void PKCS7_content_free(PKCS7 *a) | |||
| 259 | if(a == NULL) | 353 | if(a == NULL) |
| 260 | return; | 354 | return; |
| 261 | 355 | ||
| 262 | if (a->asn1 != NULL) Free(a->asn1); | 356 | if (a->asn1 != NULL) OPENSSL_free(a->asn1); |
| 263 | 357 | ||
| 264 | if (a->d.ptr != NULL) | 358 | if (a->d.ptr != NULL) |
| 265 | { | 359 | { |
| @@ -286,10 +380,12 @@ void PKCS7_content_free(PKCS7 *a) | |||
| 286 | PKCS7_ENCRYPT_free(a->d.encrypted); | 380 | PKCS7_ENCRYPT_free(a->d.encrypted); |
| 287 | break; | 381 | break; |
| 288 | default: | 382 | default: |
| 289 | /* MEMORY LEAK */ | 383 | ASN1_TYPE_free(a->d.other); |
| 290 | break; | 384 | break; |
| 291 | } | 385 | } |
| 292 | } | 386 | } |
| 293 | a->d.ptr=NULL; | 387 | a->d.ptr=NULL; |
| 294 | } | 388 | } |
| 295 | 389 | ||
| 390 | IMPLEMENT_STACK_OF(PKCS7) | ||
| 391 | IMPLEMENT_ASN1_SET_OF(PKCS7) | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_recip.c b/src/lib/libssl/src/crypto/asn1/p7_recip.c index b1abfa3b8f..5f6c88a2fa 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_recip.c +++ b/src/lib/libssl/src/crypto/asn1/p7_recip.c | |||
| @@ -118,7 +118,7 @@ void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a) | |||
| 118 | X509_ALGOR_free(a->key_enc_algor); | 118 | X509_ALGOR_free(a->key_enc_algor); |
| 119 | M_ASN1_OCTET_STRING_free(a->enc_key); | 119 | M_ASN1_OCTET_STRING_free(a->enc_key); |
| 120 | if (a->cert != NULL) X509_free(a->cert); | 120 | if (a->cert != NULL) X509_free(a->cert); |
| 121 | Free(a); | 121 | OPENSSL_free(a); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | IMPLEMENT_STACK_OF(PKCS7_RECIP_INFO) | 124 | IMPLEMENT_STACK_OF(PKCS7_RECIP_INFO) |
diff --git a/src/lib/libssl/src/crypto/asn1/p7_s_e.c b/src/lib/libssl/src/crypto/asn1/p7_s_e.c index 3d18fedf8e..709eb24b27 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_s_e.c +++ b/src/lib/libssl/src/crypto/asn1/p7_s_e.c | |||
| @@ -140,6 +140,6 @@ void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a) | |||
| 140 | sk_X509_pop_free(a->cert,X509_free); | 140 | sk_X509_pop_free(a->cert,X509_free); |
| 141 | sk_X509_CRL_pop_free(a->crl,X509_CRL_free); | 141 | sk_X509_CRL_pop_free(a->crl,X509_CRL_free); |
| 142 | sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); | 142 | sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); |
| 143 | Free(a); | 143 | OPENSSL_free(a); |
| 144 | } | 144 | } |
| 145 | 145 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_signd.c b/src/lib/libssl/src/crypto/asn1/p7_signd.c index f6f16a8715..c835f5475f 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_signd.c +++ b/src/lib/libssl/src/crypto/asn1/p7_signd.c | |||
| @@ -131,5 +131,5 @@ void PKCS7_SIGNED_free(PKCS7_SIGNED *a) | |||
| 131 | sk_X509_pop_free(a->cert,X509_free); | 131 | sk_X509_pop_free(a->cert,X509_free); |
| 132 | sk_X509_CRL_pop_free(a->crl,X509_CRL_free); | 132 | sk_X509_CRL_pop_free(a->crl,X509_CRL_free); |
| 133 | sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); | 133 | sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); |
| 134 | Free(a); | 134 | OPENSSL_free(a); |
| 135 | } | 135 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/p7_signi.c b/src/lib/libssl/src/crypto/asn1/p7_signi.c index f74658ffe6..248bf00945 100644 --- a/src/lib/libssl/src/crypto/asn1/p7_signi.c +++ b/src/lib/libssl/src/crypto/asn1/p7_signi.c | |||
| @@ -143,7 +143,7 @@ void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a) | |||
| 143 | sk_X509_ATTRIBUTE_pop_free(a->unauth_attr,X509_ATTRIBUTE_free); | 143 | sk_X509_ATTRIBUTE_pop_free(a->unauth_attr,X509_ATTRIBUTE_free); |
| 144 | if (a->pkey != NULL) | 144 | if (a->pkey != NULL) |
| 145 | EVP_PKEY_free(a->pkey); | 145 | EVP_PKEY_free(a->pkey); |
| 146 | Free(a); | 146 | OPENSSL_free(a); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | IMPLEMENT_STACK_OF(PKCS7_SIGNER_INFO) | 149 | IMPLEMENT_STACK_OF(PKCS7_SIGNER_INFO) |
diff --git a/src/lib/libssl/src/crypto/asn1/p8_key.c b/src/lib/libssl/src/crypto/asn1/p8_key.c index 0b24374627..3a31248e14 100644 --- a/src/lib/libssl/src/crypto/asn1/p8_key.c +++ b/src/lib/libssl/src/crypto/asn1/p8_key.c | |||
| @@ -94,7 +94,7 @@ X509 *X509_KEY_new(void) | |||
| 94 | { | 94 | { |
| 95 | X509_KEY *ret=NULL; | 95 | X509_KEY *ret=NULL; |
| 96 | 96 | ||
| 97 | M_ASN1_New_Malloc(ret,X509_KEY); | 97 | M_ASN1_New_OPENSSL_malloc(ret,X509_KEY); |
| 98 | ret->references=1; | 98 | ret->references=1; |
| 99 | ret->type=NID | 99 | ret->type=NID |
| 100 | M_ASN1_New(ret->cert_info,X509_CINF_new); | 100 | M_ASN1_New(ret->cert_info,X509_CINF_new); |
| @@ -126,6 +126,6 @@ void X509_KEY_free(X509 *a) | |||
| 126 | X509_CINF_free(a->cert_info); | 126 | X509_CINF_free(a->cert_info); |
| 127 | X509_ALGOR_free(a->sig_alg); | 127 | X509_ALGOR_free(a->sig_alg); |
| 128 | ASN1_BIT_STRING_free(a->signature); | 128 | ASN1_BIT_STRING_free(a->signature); |
| 129 | Free(a); | 129 | OPENSSL_free(a); |
| 130 | } | 130 | } |
| 131 | 131 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p8_pkey.c b/src/lib/libssl/src/crypto/asn1/p8_pkey.c index 59cfbe7f28..fa6cbfb6f8 100644 --- a/src/lib/libssl/src/crypto/asn1/p8_pkey.c +++ b/src/lib/libssl/src/crypto/asn1/p8_pkey.c | |||
| @@ -123,5 +123,5 @@ void PKCS8_PRIV_KEY_INFO_free (PKCS8_PRIV_KEY_INFO *a) | |||
| 123 | 0, a->pkey->value.octet_string->length); | 123 | 0, a->pkey->value.octet_string->length); |
| 124 | ASN1_TYPE_free (a->pkey); | 124 | ASN1_TYPE_free (a->pkey); |
| 125 | sk_X509_ATTRIBUTE_pop_free (a->attributes, X509_ATTRIBUTE_free); | 125 | sk_X509_ATTRIBUTE_pop_free (a->attributes, X509_ATTRIBUTE_free); |
| 126 | Free (a); | 126 | OPENSSL_free (a); |
| 127 | } | 127 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/t_pkey.c b/src/lib/libssl/src/crypto/asn1/t_pkey.c index e570ed1c47..ae18da96e3 100644 --- a/src/lib/libssl/src/crypto/asn1/t_pkey.c +++ b/src/lib/libssl/src/crypto/asn1/t_pkey.c | |||
| @@ -99,7 +99,7 @@ int RSA_print(BIO *bp, RSA *x, int off) | |||
| 99 | int i,ret=0; | 99 | int i,ret=0; |
| 100 | 100 | ||
| 101 | i=RSA_size(x); | 101 | i=RSA_size(x); |
| 102 | m=(unsigned char *)Malloc((unsigned int)i+10); | 102 | m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
| 103 | if (m == NULL) | 103 | if (m == NULL) |
| 104 | { | 104 | { |
| 105 | RSAerr(RSA_F_RSA_PRINT,ERR_R_MALLOC_FAILURE); | 105 | RSAerr(RSA_F_RSA_PRINT,ERR_R_MALLOC_FAILURE); |
| @@ -133,7 +133,7 @@ int RSA_print(BIO *bp, RSA *x, int off) | |||
| 133 | if (!print(bp,"coefficient:",x->iqmp,m,off)) goto err; | 133 | if (!print(bp,"coefficient:",x->iqmp,m,off)) goto err; |
| 134 | ret=1; | 134 | ret=1; |
| 135 | err: | 135 | err: |
| 136 | if (m != NULL) Free(m); | 136 | if (m != NULL) OPENSSL_free(m); |
| 137 | return(ret); | 137 | return(ret); |
| 138 | } | 138 | } |
| 139 | #endif /* NO_RSA */ | 139 | #endif /* NO_RSA */ |
| @@ -176,7 +176,7 @@ int DSA_print(BIO *bp, DSA *x, int off) | |||
| 176 | i=BN_num_bytes(bn)*2; | 176 | i=BN_num_bytes(bn)*2; |
| 177 | else | 177 | else |
| 178 | i=256; | 178 | i=256; |
| 179 | m=(unsigned char *)Malloc((unsigned int)i+10); | 179 | m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
| 180 | if (m == NULL) | 180 | if (m == NULL) |
| 181 | { | 181 | { |
| 182 | DSAerr(DSA_F_DSA_PRINT,ERR_R_MALLOC_FAILURE); | 182 | DSAerr(DSA_F_DSA_PRINT,ERR_R_MALLOC_FAILURE); |
| @@ -204,7 +204,7 @@ int DSA_print(BIO *bp, DSA *x, int off) | |||
| 204 | if ((x->g != NULL) && !print(bp,"G: ",x->g,m,off)) goto err; | 204 | if ((x->g != NULL) && !print(bp,"G: ",x->g,m,off)) goto err; |
| 205 | ret=1; | 205 | ret=1; |
| 206 | err: | 206 | err: |
| 207 | if (m != NULL) Free(m); | 207 | if (m != NULL) OPENSSL_free(m); |
| 208 | return(ret); | 208 | return(ret); |
| 209 | } | 209 | } |
| 210 | #endif /* !NO_DSA */ | 210 | #endif /* !NO_DSA */ |
| @@ -284,7 +284,7 @@ int DHparams_print(BIO *bp, DH *x) | |||
| 284 | int reason=ERR_R_BUF_LIB,i,ret=0; | 284 | int reason=ERR_R_BUF_LIB,i,ret=0; |
| 285 | 285 | ||
| 286 | i=BN_num_bytes(x->p); | 286 | i=BN_num_bytes(x->p); |
| 287 | m=(unsigned char *)Malloc((unsigned int)i+10); | 287 | m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
| 288 | if (m == NULL) | 288 | if (m == NULL) |
| 289 | { | 289 | { |
| 290 | reason=ERR_R_MALLOC_FAILURE; | 290 | reason=ERR_R_MALLOC_FAILURE; |
| @@ -307,7 +307,7 @@ int DHparams_print(BIO *bp, DH *x) | |||
| 307 | err: | 307 | err: |
| 308 | DHerr(DH_F_DHPARAMS_PRINT,reason); | 308 | DHerr(DH_F_DHPARAMS_PRINT,reason); |
| 309 | } | 309 | } |
| 310 | if (m != NULL) Free(m); | 310 | if (m != NULL) OPENSSL_free(m); |
| 311 | return(ret); | 311 | return(ret); |
| 312 | } | 312 | } |
| 313 | #endif | 313 | #endif |
| @@ -337,7 +337,7 @@ int DSAparams_print(BIO *bp, DSA *x) | |||
| 337 | int reason=ERR_R_BUF_LIB,i,ret=0; | 337 | int reason=ERR_R_BUF_LIB,i,ret=0; |
| 338 | 338 | ||
| 339 | i=BN_num_bytes(x->p); | 339 | i=BN_num_bytes(x->p); |
| 340 | m=(unsigned char *)Malloc((unsigned int)i+10); | 340 | m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
| 341 | if (m == NULL) | 341 | if (m == NULL) |
| 342 | { | 342 | { |
| 343 | reason=ERR_R_MALLOC_FAILURE; | 343 | reason=ERR_R_MALLOC_FAILURE; |
| @@ -352,7 +352,7 @@ int DSAparams_print(BIO *bp, DSA *x) | |||
| 352 | if (!print(bp,"g:",x->g,m,4)) goto err; | 352 | if (!print(bp,"g:",x->g,m,4)) goto err; |
| 353 | ret=1; | 353 | ret=1; |
| 354 | err: | 354 | err: |
| 355 | if (m != NULL) Free(m); | 355 | if (m != NULL) OPENSSL_free(m); |
| 356 | DSAerr(DSA_F_DSAPARAMS_PRINT,reason); | 356 | DSAerr(DSA_F_DSAPARAMS_PRINT,reason); |
| 357 | return(ret); | 357 | return(ret); |
| 358 | } | 358 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/t_x509.c b/src/lib/libssl/src/crypto/asn1/t_x509.c index 6ee1065ce9..314bdfb1c7 100644 --- a/src/lib/libssl/src/crypto/asn1/t_x509.c +++ b/src/lib/libssl/src/crypto/asn1/t_x509.c | |||
| @@ -223,7 +223,7 @@ int X509_print(BIO *bp, X509 *x) | |||
| 223 | ret=1; | 223 | ret=1; |
| 224 | err: | 224 | err: |
| 225 | if (str != NULL) ASN1_STRING_free(str); | 225 | if (str != NULL) ASN1_STRING_free(str); |
| 226 | if (m != NULL) Free(m); | 226 | if (m != NULL) OPENSSL_free(m); |
| 227 | return(ret); | 227 | return(ret); |
| 228 | } | 228 | } |
| 229 | 229 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/t_x509a.c b/src/lib/libssl/src/crypto/asn1/t_x509a.c index a18ebb586c..f06af5b576 100644 --- a/src/lib/libssl/src/crypto/asn1/t_x509a.c +++ b/src/lib/libssl/src/crypto/asn1/t_x509a.c | |||
| @@ -98,5 +98,13 @@ int X509_CERT_AUX_print(BIO *out, X509_CERT_AUX *aux, int indent) | |||
| 98 | } else BIO_printf(out, "%*sNo Rejected Uses.\n", indent, ""); | 98 | } else BIO_printf(out, "%*sNo Rejected Uses.\n", indent, ""); |
| 99 | if(aux->alias) BIO_printf(out, "%*sAlias: %s\n", indent, "", | 99 | if(aux->alias) BIO_printf(out, "%*sAlias: %s\n", indent, "", |
| 100 | aux->alias->data); | 100 | aux->alias->data); |
| 101 | if(aux->keyid) { | ||
| 102 | BIO_printf(out, "%*sKey Id: ", indent, ""); | ||
| 103 | for(i = 0; i < aux->keyid->length; i++) | ||
| 104 | BIO_printf(out, "%s%02X", | ||
| 105 | i ? ":" : "", | ||
| 106 | aux->keyid->data[i]); | ||
| 107 | BIO_write(out,"\n",1); | ||
| 108 | } | ||
| 101 | return 1; | 109 | return 1; |
| 102 | } | 110 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/x_algor.c b/src/lib/libssl/src/crypto/asn1/x_algor.c index fe023842f8..853a8dfeef 100644 --- a/src/lib/libssl/src/crypto/asn1/x_algor.c +++ b/src/lib/libssl/src/crypto/asn1/x_algor.c | |||
| @@ -111,7 +111,7 @@ void X509_ALGOR_free(X509_ALGOR *a) | |||
| 111 | if (a == NULL) return; | 111 | if (a == NULL) return; |
| 112 | ASN1_OBJECT_free(a->algorithm); | 112 | ASN1_OBJECT_free(a->algorithm); |
| 113 | ASN1_TYPE_free(a->parameter); | 113 | ASN1_TYPE_free(a->parameter); |
| 114 | Free(a); | 114 | OPENSSL_free(a); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | IMPLEMENT_STACK_OF(X509_ALGOR) | 117 | IMPLEMENT_STACK_OF(X509_ALGOR) |
diff --git a/src/lib/libssl/src/crypto/asn1/x_attrib.c b/src/lib/libssl/src/crypto/asn1/x_attrib.c index a874df79db..14e5ea27aa 100644 --- a/src/lib/libssl/src/crypto/asn1/x_attrib.c +++ b/src/lib/libssl/src/crypto/asn1/x_attrib.c | |||
| @@ -160,6 +160,6 @@ void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a) | |||
| 160 | sk_ASN1_TYPE_pop_free(a->value.set,ASN1_TYPE_free); | 160 | sk_ASN1_TYPE_pop_free(a->value.set,ASN1_TYPE_free); |
| 161 | else | 161 | else |
| 162 | ASN1_TYPE_free(a->value.single); | 162 | ASN1_TYPE_free(a->value.single); |
| 163 | Free(a); | 163 | OPENSSL_free(a); |
| 164 | } | 164 | } |
| 165 | 165 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/x_cinf.c b/src/lib/libssl/src/crypto/asn1/x_cinf.c index b87c8fff17..339a110eef 100644 --- a/src/lib/libssl/src/crypto/asn1/x_cinf.c +++ b/src/lib/libssl/src/crypto/asn1/x_cinf.c | |||
| @@ -196,6 +196,6 @@ void X509_CINF_free(X509_CINF *a) | |||
| 196 | M_ASN1_BIT_STRING_free(a->issuerUID); | 196 | M_ASN1_BIT_STRING_free(a->issuerUID); |
| 197 | M_ASN1_BIT_STRING_free(a->subjectUID); | 197 | M_ASN1_BIT_STRING_free(a->subjectUID); |
| 198 | sk_X509_EXTENSION_pop_free(a->extensions,X509_EXTENSION_free); | 198 | sk_X509_EXTENSION_pop_free(a->extensions,X509_EXTENSION_free); |
| 199 | Free(a); | 199 | OPENSSL_free(a); |
| 200 | } | 200 | } |
| 201 | 201 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/x_crl.c b/src/lib/libssl/src/crypto/asn1/x_crl.c index 12a42d04c7..1f302d0e01 100644 --- a/src/lib/libssl/src/crypto/asn1/x_crl.c +++ b/src/lib/libssl/src/crypto/asn1/x_crl.c | |||
| @@ -61,8 +61,10 @@ | |||
| 61 | #include <openssl/asn1_mac.h> | 61 | #include <openssl/asn1_mac.h> |
| 62 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
| 63 | 63 | ||
| 64 | static int X509_REVOKED_cmp(X509_REVOKED **a,X509_REVOKED **b); | 64 | static int X509_REVOKED_cmp(const X509_REVOKED * const *a, |
| 65 | static int X509_REVOKED_seq_cmp(X509_REVOKED **a,X509_REVOKED **b); | 65 | const X509_REVOKED * const *b); |
| 66 | static int X509_REVOKED_seq_cmp(const X509_REVOKED * const *a, | ||
| 67 | const X509_REVOKED * const *b); | ||
| 66 | int i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **pp) | 68 | int i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **pp) |
| 67 | { | 69 | { |
| 68 | M_ASN1_I2D_vars(a); | 70 | M_ASN1_I2D_vars(a); |
| @@ -100,7 +102,8 @@ int i2d_X509_CRL_INFO(X509_CRL_INFO *a, unsigned char **pp) | |||
| 100 | { | 102 | { |
| 101 | int v1=0; | 103 | int v1=0; |
| 102 | long l=0; | 104 | long l=0; |
| 103 | int (*old_cmp)(X509_REVOKED **,X509_REVOKED **); | 105 | int (*old_cmp)(const X509_REVOKED * const *, |
| 106 | const X509_REVOKED * const *); | ||
| 104 | M_ASN1_I2D_vars(a); | 107 | M_ASN1_I2D_vars(a); |
| 105 | 108 | ||
| 106 | old_cmp=sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_seq_cmp); | 109 | old_cmp=sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_seq_cmp); |
| @@ -283,7 +286,7 @@ void X509_REVOKED_free(X509_REVOKED *a) | |||
| 283 | M_ASN1_INTEGER_free(a->serialNumber); | 286 | M_ASN1_INTEGER_free(a->serialNumber); |
| 284 | M_ASN1_UTCTIME_free(a->revocationDate); | 287 | M_ASN1_UTCTIME_free(a->revocationDate); |
| 285 | sk_X509_EXTENSION_pop_free(a->extensions,X509_EXTENSION_free); | 288 | sk_X509_EXTENSION_pop_free(a->extensions,X509_EXTENSION_free); |
| 286 | Free(a); | 289 | OPENSSL_free(a); |
| 287 | } | 290 | } |
| 288 | 291 | ||
| 289 | void X509_CRL_INFO_free(X509_CRL_INFO *a) | 292 | void X509_CRL_INFO_free(X509_CRL_INFO *a) |
| @@ -297,7 +300,7 @@ void X509_CRL_INFO_free(X509_CRL_INFO *a) | |||
| 297 | M_ASN1_UTCTIME_free(a->nextUpdate); | 300 | M_ASN1_UTCTIME_free(a->nextUpdate); |
| 298 | sk_X509_REVOKED_pop_free(a->revoked,X509_REVOKED_free); | 301 | sk_X509_REVOKED_pop_free(a->revoked,X509_REVOKED_free); |
| 299 | sk_X509_EXTENSION_pop_free(a->extensions,X509_EXTENSION_free); | 302 | sk_X509_EXTENSION_pop_free(a->extensions,X509_EXTENSION_free); |
| 300 | Free(a); | 303 | OPENSSL_free(a); |
| 301 | } | 304 | } |
| 302 | 305 | ||
| 303 | void X509_CRL_free(X509_CRL *a) | 306 | void X509_CRL_free(X509_CRL *a) |
| @@ -322,17 +325,19 @@ void X509_CRL_free(X509_CRL *a) | |||
| 322 | X509_CRL_INFO_free(a->crl); | 325 | X509_CRL_INFO_free(a->crl); |
| 323 | X509_ALGOR_free(a->sig_alg); | 326 | X509_ALGOR_free(a->sig_alg); |
| 324 | M_ASN1_BIT_STRING_free(a->signature); | 327 | M_ASN1_BIT_STRING_free(a->signature); |
| 325 | Free(a); | 328 | OPENSSL_free(a); |
| 326 | } | 329 | } |
| 327 | 330 | ||
| 328 | static int X509_REVOKED_cmp(X509_REVOKED **a, X509_REVOKED **b) | 331 | static int X509_REVOKED_cmp(const X509_REVOKED * const *a, |
| 332 | const X509_REVOKED * const *b) | ||
| 329 | { | 333 | { |
| 330 | return(ASN1_STRING_cmp( | 334 | return(ASN1_STRING_cmp( |
| 331 | (ASN1_STRING *)(*a)->serialNumber, | 335 | (ASN1_STRING *)(*a)->serialNumber, |
| 332 | (ASN1_STRING *)(*b)->serialNumber)); | 336 | (ASN1_STRING *)(*b)->serialNumber)); |
| 333 | } | 337 | } |
| 334 | 338 | ||
| 335 | static int X509_REVOKED_seq_cmp(X509_REVOKED **a, X509_REVOKED **b) | 339 | static int X509_REVOKED_seq_cmp(const X509_REVOKED * const *a, |
| 340 | const X509_REVOKED * const *b) | ||
| 336 | { | 341 | { |
| 337 | return((*a)->sequence-(*b)->sequence); | 342 | return((*a)->sequence-(*b)->sequence); |
| 338 | } | 343 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/x_exten.c b/src/lib/libssl/src/crypto/asn1/x_exten.c index 185cbd78a0..fbfd963b40 100644 --- a/src/lib/libssl/src/crypto/asn1/x_exten.c +++ b/src/lib/libssl/src/crypto/asn1/x_exten.c | |||
| @@ -134,6 +134,6 @@ void X509_EXTENSION_free(X509_EXTENSION *a) | |||
| 134 | if (a == NULL) return; | 134 | if (a == NULL) return; |
| 135 | ASN1_OBJECT_free(a->object); | 135 | ASN1_OBJECT_free(a->object); |
| 136 | M_ASN1_OCTET_STRING_free(a->value); | 136 | M_ASN1_OCTET_STRING_free(a->value); |
| 137 | Free(a); | 137 | OPENSSL_free(a); |
| 138 | } | 138 | } |
| 139 | 139 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/x_info.c b/src/lib/libssl/src/crypto/asn1/x_info.c index 7fdc6f9dc8..5e62fc2f6f 100644 --- a/src/lib/libssl/src/crypto/asn1/x_info.c +++ b/src/lib/libssl/src/crypto/asn1/x_info.c | |||
| @@ -66,7 +66,7 @@ X509_INFO *X509_INFO_new(void) | |||
| 66 | { | 66 | { |
| 67 | X509_INFO *ret=NULL; | 67 | X509_INFO *ret=NULL; |
| 68 | 68 | ||
| 69 | ret=(X509_INFO *)Malloc(sizeof(X509_INFO)); | 69 | ret=(X509_INFO *)OPENSSL_malloc(sizeof(X509_INFO)); |
| 70 | if (ret == NULL) | 70 | if (ret == NULL) |
| 71 | { | 71 | { |
| 72 | ASN1err(ASN1_F_X509_INFO_NEW,ERR_R_MALLOC_FAILURE); | 72 | ASN1err(ASN1_F_X509_INFO_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -106,8 +106,8 @@ void X509_INFO_free(X509_INFO *x) | |||
| 106 | if (x->x509 != NULL) X509_free(x->x509); | 106 | if (x->x509 != NULL) X509_free(x->x509); |
| 107 | if (x->crl != NULL) X509_CRL_free(x->crl); | 107 | if (x->crl != NULL) X509_CRL_free(x->crl); |
| 108 | if (x->x_pkey != NULL) X509_PKEY_free(x->x_pkey); | 108 | if (x->x_pkey != NULL) X509_PKEY_free(x->x_pkey); |
| 109 | if (x->enc_data != NULL) Free(x->enc_data); | 109 | if (x->enc_data != NULL) OPENSSL_free(x->enc_data); |
| 110 | Free(x); | 110 | OPENSSL_free(x); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | IMPLEMENT_STACK_OF(X509_INFO) | 113 | IMPLEMENT_STACK_OF(X509_INFO) |
diff --git a/src/lib/libssl/src/crypto/asn1/x_name.c b/src/lib/libssl/src/crypto/asn1/x_name.c index 64baf5719d..b832deb928 100644 --- a/src/lib/libssl/src/crypto/asn1/x_name.c +++ b/src/lib/libssl/src/crypto/asn1/x_name.c | |||
| @@ -217,7 +217,7 @@ X509_NAME *X509_NAME_new(void) | |||
| 217 | ASN1_CTX c; | 217 | ASN1_CTX c; |
| 218 | 218 | ||
| 219 | M_ASN1_New_Malloc(ret,X509_NAME); | 219 | M_ASN1_New_Malloc(ret,X509_NAME); |
| 220 | if ((ret->entries=sk_X509_NAME_ENTRY_new(NULL)) == NULL) | 220 | if ((ret->entries=sk_X509_NAME_ENTRY_new_null()) == NULL) |
| 221 | { c.line=__LINE__; goto err2; } | 221 | { c.line=__LINE__; goto err2; } |
| 222 | M_ASN1_New(ret->bytes,BUF_MEM_new); | 222 | M_ASN1_New(ret->bytes,BUF_MEM_new); |
| 223 | ret->modified=1; | 223 | ret->modified=1; |
| @@ -246,7 +246,7 @@ void X509_NAME_free(X509_NAME *a) | |||
| 246 | 246 | ||
| 247 | BUF_MEM_free(a->bytes); | 247 | BUF_MEM_free(a->bytes); |
| 248 | sk_X509_NAME_ENTRY_pop_free(a->entries,X509_NAME_ENTRY_free); | 248 | sk_X509_NAME_ENTRY_pop_free(a->entries,X509_NAME_ENTRY_free); |
| 249 | Free(a); | 249 | OPENSSL_free(a); |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a) | 252 | void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a) |
| @@ -254,7 +254,7 @@ void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a) | |||
| 254 | if (a == NULL) return; | 254 | if (a == NULL) return; |
| 255 | ASN1_OBJECT_free(a->object); | 255 | ASN1_OBJECT_free(a->object); |
| 256 | M_ASN1_BIT_STRING_free(a->value); | 256 | M_ASN1_BIT_STRING_free(a->value); |
| 257 | Free(a); | 257 | OPENSSL_free(a); |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | int X509_NAME_set(X509_NAME **xn, X509_NAME *name) | 260 | int X509_NAME_set(X509_NAME **xn, X509_NAME *name) |
diff --git a/src/lib/libssl/src/crypto/asn1/x_pkey.c b/src/lib/libssl/src/crypto/asn1/x_pkey.c index fe58919dbb..f1c6221ac3 100644 --- a/src/lib/libssl/src/crypto/asn1/x_pkey.c +++ b/src/lib/libssl/src/crypto/asn1/x_pkey.c | |||
| @@ -146,6 +146,6 @@ void X509_PKEY_free(X509_PKEY *x) | |||
| 146 | if (x->enc_algor != NULL) X509_ALGOR_free(x->enc_algor); | 146 | if (x->enc_algor != NULL) X509_ALGOR_free(x->enc_algor); |
| 147 | if (x->enc_pkey != NULL) M_ASN1_OCTET_STRING_free(x->enc_pkey); | 147 | if (x->enc_pkey != NULL) M_ASN1_OCTET_STRING_free(x->enc_pkey); |
| 148 | if (x->dec_pkey != NULL)EVP_PKEY_free(x->dec_pkey); | 148 | if (x->dec_pkey != NULL)EVP_PKEY_free(x->dec_pkey); |
| 149 | if ((x->key_data != NULL) && (x->key_free)) Free(x->key_data); | 149 | if ((x->key_data != NULL) && (x->key_free)) OPENSSL_free(x->key_data); |
| 150 | Free(x); | 150 | OPENSSL_free(x); |
| 151 | } | 151 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/x_pubkey.c b/src/lib/libssl/src/crypto/asn1/x_pubkey.c index 7a05d575c9..b2e2a51477 100644 --- a/src/lib/libssl/src/crypto/asn1/x_pubkey.c +++ b/src/lib/libssl/src/crypto/asn1/x_pubkey.c | |||
| @@ -112,7 +112,7 @@ void X509_PUBKEY_free(X509_PUBKEY *a) | |||
| 112 | X509_ALGOR_free(a->algor); | 112 | X509_ALGOR_free(a->algor); |
| 113 | M_ASN1_BIT_STRING_free(a->public_key); | 113 | M_ASN1_BIT_STRING_free(a->public_key); |
| 114 | if (a->pkey != NULL) EVP_PKEY_free(a->pkey); | 114 | if (a->pkey != NULL) EVP_PKEY_free(a->pkey); |
| 115 | Free(a); | 115 | OPENSSL_free(a); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) | 118 | int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) |
| @@ -156,14 +156,14 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) | |||
| 156 | dsa->write_params=0; | 156 | dsa->write_params=0; |
| 157 | ASN1_TYPE_free(a->parameter); | 157 | ASN1_TYPE_free(a->parameter); |
| 158 | i=i2d_DSAparams(dsa,NULL); | 158 | i=i2d_DSAparams(dsa,NULL); |
| 159 | p=(unsigned char *)Malloc(i); | 159 | p=(unsigned char *)OPENSSL_malloc(i); |
| 160 | pp=p; | 160 | pp=p; |
| 161 | i2d_DSAparams(dsa,&pp); | 161 | i2d_DSAparams(dsa,&pp); |
| 162 | a->parameter=ASN1_TYPE_new(); | 162 | a->parameter=ASN1_TYPE_new(); |
| 163 | a->parameter->type=V_ASN1_SEQUENCE; | 163 | a->parameter->type=V_ASN1_SEQUENCE; |
| 164 | a->parameter->value.sequence=ASN1_STRING_new(); | 164 | a->parameter->value.sequence=ASN1_STRING_new(); |
| 165 | ASN1_STRING_set(a->parameter->value.sequence,p,i); | 165 | ASN1_STRING_set(a->parameter->value.sequence,p,i); |
| 166 | Free(p); | 166 | OPENSSL_free(p); |
| 167 | } | 167 | } |
| 168 | else | 168 | else |
| 169 | #endif | 169 | #endif |
| @@ -173,7 +173,7 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) | |||
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | if ((i=i2d_PublicKey(pkey,NULL)) <= 0) goto err; | 175 | if ((i=i2d_PublicKey(pkey,NULL)) <= 0) goto err; |
| 176 | if ((s=(unsigned char *)Malloc(i+1)) == NULL) goto err; | 176 | if ((s=(unsigned char *)OPENSSL_malloc(i+1)) == NULL) goto err; |
| 177 | p=s; | 177 | p=s; |
| 178 | i2d_PublicKey(pkey,&p); | 178 | i2d_PublicKey(pkey,&p); |
| 179 | if (!M_ASN1_BIT_STRING_set(pk->public_key,s,i)) goto err; | 179 | if (!M_ASN1_BIT_STRING_set(pk->public_key,s,i)) goto err; |
| @@ -181,7 +181,7 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) | |||
| 181 | pk->public_key->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); | 181 | pk->public_key->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); |
| 182 | pk->public_key->flags|=ASN1_STRING_FLAG_BITS_LEFT; | 182 | pk->public_key->flags|=ASN1_STRING_FLAG_BITS_LEFT; |
| 183 | 183 | ||
| 184 | Free(s); | 184 | OPENSSL_free(s); |
| 185 | 185 | ||
| 186 | #if 0 | 186 | #if 0 |
| 187 | CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY); | 187 | CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY); |
diff --git a/src/lib/libssl/src/crypto/asn1/x_req.c b/src/lib/libssl/src/crypto/asn1/x_req.c index 0cd572ee73..6dddd4f653 100644 --- a/src/lib/libssl/src/crypto/asn1/x_req.c +++ b/src/lib/libssl/src/crypto/asn1/x_req.c | |||
| @@ -65,6 +65,14 @@ int i2d_X509_REQ_INFO(X509_REQ_INFO *a, unsigned char **pp) | |||
| 65 | { | 65 | { |
| 66 | M_ASN1_I2D_vars(a); | 66 | M_ASN1_I2D_vars(a); |
| 67 | 67 | ||
| 68 | if(a->asn1) { | ||
| 69 | if(pp) { | ||
| 70 | memcpy(*pp, a->asn1, a->length); | ||
| 71 | *pp += a->length; | ||
| 72 | } | ||
| 73 | return a->length; | ||
| 74 | } | ||
| 75 | |||
| 68 | M_ASN1_I2D_len(a->version, i2d_ASN1_INTEGER); | 76 | M_ASN1_I2D_len(a->version, i2d_ASN1_INTEGER); |
| 69 | M_ASN1_I2D_len(a->subject, i2d_X509_NAME); | 77 | M_ASN1_I2D_len(a->subject, i2d_X509_NAME); |
| 70 | M_ASN1_I2D_len(a->pubkey, i2d_X509_PUBKEY); | 78 | M_ASN1_I2D_len(a->pubkey, i2d_X509_PUBKEY); |
| @@ -152,6 +160,7 @@ X509_REQ_INFO *X509_REQ_INFO_new(void) | |||
| 152 | M_ASN1_New(ret->pubkey,X509_PUBKEY_new); | 160 | M_ASN1_New(ret->pubkey,X509_PUBKEY_new); |
| 153 | M_ASN1_New(ret->attributes,sk_X509_ATTRIBUTE_new_null); | 161 | M_ASN1_New(ret->attributes,sk_X509_ATTRIBUTE_new_null); |
| 154 | ret->req_kludge=0; | 162 | ret->req_kludge=0; |
| 163 | ret->asn1 = NULL; | ||
| 155 | return(ret); | 164 | return(ret); |
| 156 | M_ASN1_New_Error(ASN1_F_X509_REQ_INFO_NEW); | 165 | M_ASN1_New_Error(ASN1_F_X509_REQ_INFO_NEW); |
| 157 | } | 166 | } |
| @@ -159,11 +168,12 @@ X509_REQ_INFO *X509_REQ_INFO_new(void) | |||
| 159 | void X509_REQ_INFO_free(X509_REQ_INFO *a) | 168 | void X509_REQ_INFO_free(X509_REQ_INFO *a) |
| 160 | { | 169 | { |
| 161 | if (a == NULL) return; | 170 | if (a == NULL) return; |
| 171 | if(a->asn1) OPENSSL_free(a->asn1); | ||
| 162 | M_ASN1_INTEGER_free(a->version); | 172 | M_ASN1_INTEGER_free(a->version); |
| 163 | X509_NAME_free(a->subject); | 173 | X509_NAME_free(a->subject); |
| 164 | X509_PUBKEY_free(a->pubkey); | 174 | X509_PUBKEY_free(a->pubkey); |
| 165 | sk_X509_ATTRIBUTE_pop_free(a->attributes,X509_ATTRIBUTE_free); | 175 | sk_X509_ATTRIBUTE_pop_free(a->attributes,X509_ATTRIBUTE_free); |
| 166 | Free(a); | 176 | OPENSSL_free(a); |
| 167 | } | 177 | } |
| 168 | 178 | ||
| 169 | int i2d_X509_REQ(X509_REQ *a, unsigned char **pp) | 179 | int i2d_X509_REQ(X509_REQ *a, unsigned char **pp) |
| @@ -189,6 +199,17 @@ X509_REQ *d2i_X509_REQ(X509_REQ **a, unsigned char **pp, long length) | |||
| 189 | M_ASN1_D2I_Init(); | 199 | M_ASN1_D2I_Init(); |
| 190 | M_ASN1_D2I_start_sequence(); | 200 | M_ASN1_D2I_start_sequence(); |
| 191 | M_ASN1_D2I_get(ret->req_info,d2i_X509_REQ_INFO); | 201 | M_ASN1_D2I_get(ret->req_info,d2i_X509_REQ_INFO); |
| 202 | |||
| 203 | /* Keep a copy of the original encoding for signature checking */ | ||
| 204 | ret->req_info->length = c.p - c.q; | ||
| 205 | if(!(ret->req_info->asn1 = OPENSSL_malloc(ret->req_info->length))) { | ||
| 206 | c.line=__LINE__; | ||
| 207 | c.error = ERR_R_MALLOC_FAILURE; | ||
| 208 | goto err; | ||
| 209 | } | ||
| 210 | |||
| 211 | memcpy(ret->req_info->asn1, c.q, ret->req_info->length); | ||
| 212 | |||
| 192 | M_ASN1_D2I_get(ret->sig_alg,d2i_X509_ALGOR); | 213 | M_ASN1_D2I_get(ret->sig_alg,d2i_X509_ALGOR); |
| 193 | M_ASN1_D2I_get(ret->signature,d2i_ASN1_BIT_STRING); | 214 | M_ASN1_D2I_get(ret->signature,d2i_ASN1_BIT_STRING); |
| 194 | M_ASN1_D2I_Finish(a,X509_REQ_free,ASN1_F_D2I_X509_REQ); | 215 | M_ASN1_D2I_Finish(a,X509_REQ_free,ASN1_F_D2I_X509_REQ); |
| @@ -230,7 +251,7 @@ void X509_REQ_free(X509_REQ *a) | |||
| 230 | X509_REQ_INFO_free(a->req_info); | 251 | X509_REQ_INFO_free(a->req_info); |
| 231 | X509_ALGOR_free(a->sig_alg); | 252 | X509_ALGOR_free(a->sig_alg); |
| 232 | M_ASN1_BIT_STRING_free(a->signature); | 253 | M_ASN1_BIT_STRING_free(a->signature); |
| 233 | Free(a); | 254 | OPENSSL_free(a); |
| 234 | } | 255 | } |
| 235 | 256 | ||
| 236 | 257 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/x_sig.c b/src/lib/libssl/src/crypto/asn1/x_sig.c index 3559bd5368..d79f147647 100644 --- a/src/lib/libssl/src/crypto/asn1/x_sig.c +++ b/src/lib/libssl/src/crypto/asn1/x_sig.c | |||
| @@ -104,7 +104,7 @@ void X509_SIG_free(X509_SIG *a) | |||
| 104 | if (a == NULL) return; | 104 | if (a == NULL) return; |
| 105 | X509_ALGOR_free(a->algor); | 105 | X509_ALGOR_free(a->algor); |
| 106 | M_ASN1_OCTET_STRING_free(a->digest); | 106 | M_ASN1_OCTET_STRING_free(a->digest); |
| 107 | Free(a); | 107 | OPENSSL_free(a); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | 110 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/x_spki.c b/src/lib/libssl/src/crypto/asn1/x_spki.c index 8f5e7e6380..4f01888f7d 100644 --- a/src/lib/libssl/src/crypto/asn1/x_spki.c +++ b/src/lib/libssl/src/crypto/asn1/x_spki.c | |||
| @@ -109,7 +109,7 @@ void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a) | |||
| 109 | if (a == NULL) return; | 109 | if (a == NULL) return; |
| 110 | X509_PUBKEY_free(a->pubkey); | 110 | X509_PUBKEY_free(a->pubkey); |
| 111 | M_ASN1_IA5STRING_free(a->challenge); | 111 | M_ASN1_IA5STRING_free(a->challenge); |
| 112 | Free(a); | 112 | OPENSSL_free(a); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a, unsigned char **pp) | 115 | int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a, unsigned char **pp) |
| @@ -161,6 +161,6 @@ void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a) | |||
| 161 | NETSCAPE_SPKAC_free(a->spkac); | 161 | NETSCAPE_SPKAC_free(a->spkac); |
| 162 | X509_ALGOR_free(a->sig_algor); | 162 | X509_ALGOR_free(a->sig_algor); |
| 163 | M_ASN1_BIT_STRING_free(a->signature); | 163 | M_ASN1_BIT_STRING_free(a->signature); |
| 164 | Free(a); | 164 | OPENSSL_free(a); |
| 165 | } | 165 | } |
| 166 | 166 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/x_val.c b/src/lib/libssl/src/crypto/asn1/x_val.c index 1a2f49ffdf..0f8f020b57 100644 --- a/src/lib/libssl/src/crypto/asn1/x_val.c +++ b/src/lib/libssl/src/crypto/asn1/x_val.c | |||
| @@ -104,6 +104,6 @@ void X509_VAL_free(X509_VAL *a) | |||
| 104 | if (a == NULL) return; | 104 | if (a == NULL) return; |
| 105 | M_ASN1_TIME_free(a->notBefore); | 105 | M_ASN1_TIME_free(a->notBefore); |
| 106 | M_ASN1_TIME_free(a->notAfter); | 106 | M_ASN1_TIME_free(a->notAfter); |
| 107 | Free(a); | 107 | OPENSSL_free(a); |
| 108 | } | 108 | } |
| 109 | 109 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/x_x509.c b/src/lib/libssl/src/crypto/asn1/x_x509.c index 11e564ea30..61ba856b17 100644 --- a/src/lib/libssl/src/crypto/asn1/x_x509.c +++ b/src/lib/libssl/src/crypto/asn1/x_x509.c | |||
| @@ -61,6 +61,7 @@ | |||
| 61 | #include <openssl/evp.h> | 61 | #include <openssl/evp.h> |
| 62 | #include <openssl/asn1_mac.h> | 62 | #include <openssl/asn1_mac.h> |
| 63 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
| 64 | #include <openssl/x509v3.h> | ||
| 64 | 65 | ||
| 65 | static int x509_meth_num = 0; | 66 | static int x509_meth_num = 0; |
| 66 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_meth = NULL; | 67 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_meth = NULL; |
| @@ -102,7 +103,7 @@ X509 *d2i_X509(X509 **a, unsigned char **pp, long length) | |||
| 102 | M_ASN1_D2I_get(ret->cert_info,d2i_X509_CINF); | 103 | M_ASN1_D2I_get(ret->cert_info,d2i_X509_CINF); |
| 103 | M_ASN1_D2I_get(ret->sig_alg,d2i_X509_ALGOR); | 104 | M_ASN1_D2I_get(ret->sig_alg,d2i_X509_ALGOR); |
| 104 | M_ASN1_D2I_get(ret->signature,d2i_ASN1_BIT_STRING); | 105 | M_ASN1_D2I_get(ret->signature,d2i_ASN1_BIT_STRING); |
| 105 | if (ret->name != NULL) Free(ret->name); | 106 | if (ret->name != NULL) OPENSSL_free(ret->name); |
| 106 | ret->name=X509_NAME_oneline(ret->cert_info->subject,NULL,0); | 107 | ret->name=X509_NAME_oneline(ret->cert_info->subject,NULL,0); |
| 107 | 108 | ||
| 108 | M_ASN1_D2I_Finish(a,X509_free,ASN1_F_D2I_X509); | 109 | M_ASN1_D2I_Finish(a,X509_free,ASN1_F_D2I_X509); |
| @@ -114,11 +115,14 @@ X509 *X509_new(void) | |||
| 114 | ASN1_CTX c; | 115 | ASN1_CTX c; |
| 115 | 116 | ||
| 116 | M_ASN1_New_Malloc(ret,X509); | 117 | M_ASN1_New_Malloc(ret,X509); |
| 117 | ret->references=1; | ||
| 118 | ret->valid=0; | 118 | ret->valid=0; |
| 119 | ret->references=1; | ||
| 120 | ret->name = NULL; | ||
| 119 | ret->ex_flags = 0; | 121 | ret->ex_flags = 0; |
| 120 | ret->name=NULL; | 122 | ret->ex_pathlen = -1; |
| 121 | ret->aux=NULL; | 123 | ret->skid = NULL; |
| 124 | ret->akid = NULL; | ||
| 125 | ret->aux = NULL; | ||
| 122 | M_ASN1_New(ret->cert_info,X509_CINF_new); | 126 | M_ASN1_New(ret->cert_info,X509_CINF_new); |
| 123 | M_ASN1_New(ret->sig_alg,X509_ALGOR_new); | 127 | M_ASN1_New(ret->sig_alg,X509_ALGOR_new); |
| 124 | M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new); | 128 | M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new); |
| @@ -151,9 +155,11 @@ void X509_free(X509 *a) | |||
| 151 | X509_ALGOR_free(a->sig_alg); | 155 | X509_ALGOR_free(a->sig_alg); |
| 152 | M_ASN1_BIT_STRING_free(a->signature); | 156 | M_ASN1_BIT_STRING_free(a->signature); |
| 153 | X509_CERT_AUX_free(a->aux); | 157 | X509_CERT_AUX_free(a->aux); |
| 158 | ASN1_OCTET_STRING_free(a->skid); | ||
| 159 | AUTHORITY_KEYID_free(a->akid); | ||
| 154 | 160 | ||
| 155 | if (a->name != NULL) Free(a->name); | 161 | if (a->name != NULL) OPENSSL_free(a->name); |
| 156 | Free(a); | 162 | OPENSSL_free(a); |
| 157 | } | 163 | } |
| 158 | 164 | ||
| 159 | int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 165 | int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
diff --git a/src/lib/libssl/src/crypto/asn1/x_x509a.c b/src/lib/libssl/src/crypto/asn1/x_x509a.c index b9987ea968..ebcce87bf2 100644 --- a/src/lib/libssl/src/crypto/asn1/x_x509a.c +++ b/src/lib/libssl/src/crypto/asn1/x_x509a.c | |||
| @@ -112,7 +112,7 @@ void X509_CERT_AUX_free(X509_CERT_AUX *a) | |||
| 112 | ASN1_UTF8STRING_free(a->alias); | 112 | ASN1_UTF8STRING_free(a->alias); |
| 113 | ASN1_OCTET_STRING_free(a->keyid); | 113 | ASN1_OCTET_STRING_free(a->keyid); |
| 114 | sk_X509_ALGOR_pop_free(a->other, X509_ALGOR_free); | 114 | sk_X509_ALGOR_pop_free(a->other, X509_ALGOR_free); |
| 115 | Free(a); | 115 | OPENSSL_free(a); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | int i2d_X509_CERT_AUX(X509_CERT_AUX *a, unsigned char **pp) | 118 | int i2d_X509_CERT_AUX(X509_CERT_AUX *a, unsigned char **pp) |
| @@ -153,6 +153,14 @@ int X509_alias_set1(X509 *x, unsigned char *name, int len) | |||
| 153 | return ASN1_STRING_set(aux->alias, name, len); | 153 | return ASN1_STRING_set(aux->alias, name, len); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | int X509_keyid_set1(X509 *x, unsigned char *id, int len) | ||
| 157 | { | ||
| 158 | X509_CERT_AUX *aux; | ||
| 159 | if(!(aux = aux_get(x))) return 0; | ||
| 160 | if(!aux->keyid && !(aux->keyid = ASN1_OCTET_STRING_new())) return 0; | ||
| 161 | return ASN1_STRING_set(aux->keyid, id, len); | ||
| 162 | } | ||
| 163 | |||
| 156 | unsigned char *X509_alias_get0(X509 *x, int *len) | 164 | unsigned char *X509_alias_get0(X509 *x, int *len) |
| 157 | { | 165 | { |
| 158 | if(!x->aux || !x->aux->alias) return NULL; | 166 | if(!x->aux || !x->aux->alias) return NULL; |
diff --git a/src/lib/libssl/src/crypto/bf/Makefile.ssl b/src/lib/libssl/src/crypto/bf/Makefile.ssl index cf2f7dd48e..f4eb90f13f 100644 --- a/src/lib/libssl/src/crypto/bf/Makefile.ssl +++ b/src/lib/libssl/src/crypto/bf/Makefile.ssl | |||
| @@ -77,7 +77,9 @@ links: | |||
| 77 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | 77 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) |
| 78 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | 78 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) |
| 79 | 79 | ||
| 80 | install: | 80 | install: installs |
| 81 | |||
| 82 | installs: | ||
| 81 | @for i in $(EXHEADER) ; \ | 83 | @for i in $(EXHEADER) ; \ |
| 82 | do \ | 84 | do \ |
| 83 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | 85 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
diff --git a/src/lib/libssl/src/crypto/bf/bftest.c b/src/lib/libssl/src/crypto/bf/bftest.c index 5695250195..cf67cadefd 100644 --- a/src/lib/libssl/src/crypto/bf/bftest.c +++ b/src/lib/libssl/src/crypto/bf/bftest.c | |||
| @@ -442,7 +442,8 @@ static int test(void) | |||
| 442 | { | 442 | { |
| 443 | BF_set_key(&key,n,key_test); | 443 | BF_set_key(&key,n,key_test); |
| 444 | BF_ecb_encrypt(key_data,out,&key,BF_ENCRYPT); | 444 | BF_ecb_encrypt(key_data,out,&key,BF_ENCRYPT); |
| 445 | if (memcmp(out,&(key_out[n-1][0]),8) != 0) | 445 | /* mips-sgi-irix6.5-gcc vv -mabi=64 bug workaround */ |
| 446 | if (memcmp(out,&(key_out[i=n-1][0]),8) != 0) | ||
| 446 | { | 447 | { |
| 447 | printf("blowfish setkey error\n"); | 448 | printf("blowfish setkey error\n"); |
| 448 | err=1; | 449 | err=1; |
diff --git a/src/lib/libssl/src/crypto/bio/Makefile.ssl b/src/lib/libssl/src/crypto/bio/Makefile.ssl index 755f255fe4..916d651d47 100644 --- a/src/lib/libssl/src/crypto/bio/Makefile.ssl +++ b/src/lib/libssl/src/crypto/bio/Makefile.ssl | |||
| @@ -27,11 +27,13 @@ LIBSRC= bio_lib.c bio_cb.c bio_err.c \ | |||
| 27 | bss_file.c bss_sock.c bss_conn.c \ | 27 | bss_file.c bss_sock.c bss_conn.c \ |
| 28 | bf_null.c bf_buff.c b_print.c b_dump.c \ | 28 | bf_null.c bf_buff.c b_print.c b_dump.c \ |
| 29 | b_sock.c bss_acpt.c bf_nbio.c bss_log.c bss_bio.c | 29 | b_sock.c bss_acpt.c bf_nbio.c bss_log.c bss_bio.c |
| 30 | # bf_lbuf.c | ||
| 30 | LIBOBJ= bio_lib.o bio_cb.o bio_err.o \ | 31 | LIBOBJ= bio_lib.o bio_cb.o bio_err.o \ |
| 31 | bss_mem.o bss_null.o bss_fd.o \ | 32 | bss_mem.o bss_null.o bss_fd.o \ |
| 32 | bss_file.o bss_sock.o bss_conn.o \ | 33 | bss_file.o bss_sock.o bss_conn.o \ |
| 33 | bf_null.o bf_buff.o b_print.o b_dump.o \ | 34 | bf_null.o bf_buff.o b_print.o b_dump.o \ |
| 34 | b_sock.o bss_acpt.o bf_nbio.o bss_log.o bss_bio.o | 35 | b_sock.o bss_acpt.o bf_nbio.o bss_log.o bss_bio.o |
| 36 | # bf_lbuf.o | ||
| 35 | 37 | ||
| 36 | SRC= $(LIBSRC) | 38 | SRC= $(LIBSRC) |
| 37 | 39 | ||
| @@ -89,20 +91,23 @@ clean: | |||
| 89 | b_dump.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 91 | b_dump.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 90 | b_dump.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 92 | b_dump.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 91 | b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 93 | b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 92 | b_dump.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 94 | b_dump.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 93 | b_dump.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 95 | b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 96 | b_dump.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 94 | b_dump.o: ../cryptlib.h | 97 | b_dump.o: ../cryptlib.h |
| 95 | b_print.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 98 | b_print.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 96 | b_print.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 99 | b_print.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 97 | b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 100 | b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 98 | b_print.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 101 | b_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 99 | b_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 102 | b_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 103 | b_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 100 | b_print.o: ../cryptlib.h | 104 | b_print.o: ../cryptlib.h |
| 101 | b_sock.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 105 | b_sock.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 102 | b_sock.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 106 | b_sock.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 103 | b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 107 | b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 104 | b_sock.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 108 | b_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 105 | b_sock.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 109 | b_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 110 | b_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 106 | b_sock.o: ../cryptlib.h | 111 | b_sock.o: ../cryptlib.h |
| 107 | bf_buff.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 112 | bf_buff.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 108 | bf_buff.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 113 | bf_buff.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -111,14 +116,16 @@ bf_buff.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 111 | bf_buff.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 116 | bf_buff.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 112 | bf_buff.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 117 | bf_buff.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 113 | bf_buff.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 118 | bf_buff.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 114 | bf_buff.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 119 | bf_buff.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 120 | bf_buff.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 115 | bf_buff.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 121 | bf_buff.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 116 | bf_buff.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 122 | bf_buff.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 117 | bf_buff.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 123 | bf_buff.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 118 | bf_buff.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 124 | bf_buff.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 119 | bf_buff.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 125 | bf_buff.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 120 | bf_buff.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 126 | bf_buff.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 121 | bf_buff.o: ../../include/openssl/stack.h ../cryptlib.h | 127 | bf_buff.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 128 | bf_buff.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 122 | bf_nbio.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 129 | bf_nbio.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 123 | bf_nbio.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 130 | bf_nbio.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 124 | bf_nbio.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 131 | bf_nbio.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -126,14 +133,16 @@ bf_nbio.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 126 | bf_nbio.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 133 | bf_nbio.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 127 | bf_nbio.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 134 | bf_nbio.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 128 | bf_nbio.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 135 | bf_nbio.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 129 | bf_nbio.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 136 | bf_nbio.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 137 | bf_nbio.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 130 | bf_nbio.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 138 | bf_nbio.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 131 | bf_nbio.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 139 | bf_nbio.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 132 | bf_nbio.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 140 | bf_nbio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 133 | bf_nbio.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 141 | bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 134 | bf_nbio.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 142 | bf_nbio.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 135 | bf_nbio.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 143 | bf_nbio.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 136 | bf_nbio.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 144 | bf_nbio.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 145 | bf_nbio.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 137 | bf_nbio.o: ../cryptlib.h | 146 | bf_nbio.o: ../cryptlib.h |
| 138 | bf_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 147 | bf_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 139 | bf_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 148 | bf_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -142,79 +151,93 @@ bf_null.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 142 | bf_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 151 | bf_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 143 | bf_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 152 | bf_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 144 | bf_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 153 | bf_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 145 | bf_null.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 154 | bf_null.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 155 | bf_null.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 146 | bf_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 156 | bf_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 147 | bf_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 157 | bf_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 148 | bf_null.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 158 | bf_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 149 | bf_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 159 | bf_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 150 | bf_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 160 | bf_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 151 | bf_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 161 | bf_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 152 | bf_null.o: ../../include/openssl/stack.h ../cryptlib.h | 162 | bf_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 163 | bf_null.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 153 | bio_cb.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 164 | bio_cb.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 154 | bio_cb.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 165 | bio_cb.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 155 | bio_cb.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 166 | bio_cb.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 156 | bio_cb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 167 | bio_cb.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 157 | bio_cb.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 168 | bio_cb.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 169 | bio_cb.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 158 | bio_cb.o: ../cryptlib.h | 170 | bio_cb.o: ../cryptlib.h |
| 159 | bio_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h | 171 | bio_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h |
| 160 | bio_err.o: ../../include/openssl/err.h ../../include/openssl/opensslv.h | 172 | bio_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 161 | bio_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 173 | bio_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 174 | bio_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 162 | bio_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 175 | bio_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 163 | bio_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 176 | bio_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 164 | bio_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 177 | bio_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 165 | bio_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 178 | bio_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 166 | bio_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 179 | bio_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 180 | bio_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 167 | bio_lib.o: ../cryptlib.h | 181 | bio_lib.o: ../cryptlib.h |
| 168 | bss_acpt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 182 | bss_acpt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 169 | bss_acpt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 183 | bss_acpt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 170 | bss_acpt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 184 | bss_acpt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 171 | bss_acpt.o: ../../include/openssl/opensslconf.h | 185 | bss_acpt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 172 | bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 186 | bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 173 | bss_acpt.o: ../../include/openssl/stack.h ../cryptlib.h | 187 | bss_acpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 188 | bss_acpt.o: ../cryptlib.h | ||
| 174 | bss_bio.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h | 189 | bss_bio.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h |
| 175 | bss_bio.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 190 | bss_bio.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 176 | bss_bio.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 191 | bss_bio.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 177 | bss_bio.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 192 | bss_bio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 178 | bss_bio.o: ../../include/openssl/stack.h | 193 | bss_bio.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 194 | bss_bio.o: ../../include/openssl/symhacks.h | ||
| 179 | bss_conn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 195 | bss_conn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 180 | bss_conn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 196 | bss_conn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 181 | bss_conn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 197 | bss_conn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 182 | bss_conn.o: ../../include/openssl/opensslconf.h | 198 | bss_conn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 183 | bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 199 | bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 184 | bss_conn.o: ../../include/openssl/stack.h ../cryptlib.h | 200 | bss_conn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 201 | bss_conn.o: ../cryptlib.h | ||
| 185 | bss_fd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 202 | bss_fd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 186 | bss_fd.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 203 | bss_fd.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 187 | bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 204 | bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 188 | bss_fd.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 205 | bss_fd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 189 | bss_fd.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 206 | bss_fd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 207 | bss_fd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 190 | bss_fd.o: ../cryptlib.h bss_sock.c | 208 | bss_fd.o: ../cryptlib.h bss_sock.c |
| 191 | bss_file.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 209 | bss_file.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 192 | bss_file.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 210 | bss_file.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 193 | bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 211 | bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 194 | bss_file.o: ../../include/openssl/opensslconf.h | 212 | bss_file.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 195 | bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 213 | bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 196 | bss_file.o: ../../include/openssl/stack.h ../cryptlib.h | 214 | bss_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 215 | bss_file.o: ../cryptlib.h | ||
| 197 | bss_log.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 216 | bss_log.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 198 | bss_log.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 217 | bss_log.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 199 | bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 218 | bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 200 | bss_log.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 219 | bss_log.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 201 | bss_log.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 220 | bss_log.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 221 | bss_log.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 202 | bss_log.o: ../cryptlib.h | 222 | bss_log.o: ../cryptlib.h |
| 203 | bss_mem.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 223 | bss_mem.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 204 | bss_mem.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 224 | bss_mem.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 205 | bss_mem.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 225 | bss_mem.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 206 | bss_mem.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 226 | bss_mem.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 207 | bss_mem.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 227 | bss_mem.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 228 | bss_mem.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 208 | bss_mem.o: ../cryptlib.h | 229 | bss_mem.o: ../cryptlib.h |
| 209 | bss_null.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 230 | bss_null.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 210 | bss_null.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 231 | bss_null.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 211 | bss_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 232 | bss_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 212 | bss_null.o: ../../include/openssl/opensslconf.h | 233 | bss_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 213 | bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 234 | bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 214 | bss_null.o: ../../include/openssl/stack.h ../cryptlib.h | 235 | bss_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 236 | bss_null.o: ../cryptlib.h | ||
| 215 | bss_sock.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 237 | bss_sock.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 216 | bss_sock.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 238 | bss_sock.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 217 | bss_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 239 | bss_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 218 | bss_sock.o: ../../include/openssl/opensslconf.h | 240 | bss_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 219 | bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 241 | bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 220 | bss_sock.o: ../../include/openssl/stack.h ../cryptlib.h | 242 | bss_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 243 | bss_sock.o: ../cryptlib.h | ||
diff --git a/src/lib/libssl/src/crypto/bio/b_dump.c b/src/lib/libssl/src/crypto/bio/b_dump.c index f5aeb237f5..8397cfab6a 100644 --- a/src/lib/libssl/src/crypto/bio/b_dump.c +++ b/src/lib/libssl/src/crypto/bio/b_dump.c | |||
| @@ -66,63 +66,87 @@ | |||
| 66 | 66 | ||
| 67 | #define TRUNCATE | 67 | #define TRUNCATE |
| 68 | #define DUMP_WIDTH 16 | 68 | #define DUMP_WIDTH 16 |
| 69 | #define DUMP_WIDTH_LESS_INDENT(i) (DUMP_WIDTH-((i-(i>6?6:i)+3)/4)) | ||
| 69 | 70 | ||
| 70 | int BIO_dump(BIO *bio, const char *s, int len) | 71 | int BIO_dump(BIO *bio, const char *s, int len) |
| 71 | { | 72 | { |
| 72 | int ret=0; | 73 | return BIO_dump_indent(bio, s, len, 0); |
| 73 | char buf[160+1],tmp[20]; | 74 | } |
| 74 | int i,j,rows,trunc; | ||
| 75 | unsigned char ch; | ||
| 76 | |||
| 77 | trunc=0; | ||
| 78 | 75 | ||
| 76 | int BIO_dump_indent(BIO *bio, const char *s, int len, int indent) | ||
| 77 | { | ||
| 78 | int ret=0; | ||
| 79 | char buf[288+1],tmp[20],str[128+1]; | ||
| 80 | int i,j,rows,trunc; | ||
| 81 | unsigned char ch; | ||
| 82 | int dump_width; | ||
| 83 | |||
| 84 | trunc=0; | ||
| 85 | |||
| 79 | #ifdef TRUNCATE | 86 | #ifdef TRUNCATE |
| 80 | for(; (len > 0) && ((s[len-1] == ' ') || (s[len-1] == '\0')); len--) | 87 | for(; (len > 0) && ((s[len-1] == ' ') || (s[len-1] == '\0')); len--) |
| 81 | trunc++; | 88 | trunc++; |
| 82 | #endif | 89 | #endif |
| 83 | 90 | ||
| 84 | rows=(len/DUMP_WIDTH); | 91 | if (indent < 0) |
| 85 | if ((rows*DUMP_WIDTH)<len) | 92 | indent = 0; |
| 86 | rows++; | 93 | if (indent) |
| 87 | for(i=0;i<rows;i++) { | 94 | { |
| 88 | buf[0]='\0'; /* start with empty string */ | 95 | if (indent > 128) indent=128; |
| 89 | sprintf(tmp,"%04x - ",i*DUMP_WIDTH); | 96 | memset(str,' ',indent); |
| 90 | strcpy(buf,tmp); | 97 | } |
| 91 | for(j=0;j<DUMP_WIDTH;j++) { | 98 | str[indent]='\0'; |
| 92 | if (((i*DUMP_WIDTH)+j)>=len) { | 99 | |
| 93 | strcat(buf," "); | 100 | dump_width=DUMP_WIDTH_LESS_INDENT(indent); |
| 94 | } else { | 101 | rows=(len/dump_width); |
| 95 | ch=((unsigned char)*(s+i*DUMP_WIDTH+j)) & 0xff; | 102 | if ((rows*dump_width)<len) |
| 96 | sprintf(tmp,"%02x%c",ch,j==7?'-':' '); | 103 | rows++; |
| 97 | strcat(buf,tmp); | 104 | for(i=0;i<rows;i++) |
| 98 | } | 105 | { |
| 99 | } | 106 | buf[0]='\0'; /* start with empty string */ |
| 100 | strcat(buf," "); | 107 | strcpy(buf,str); |
| 101 | for(j=0;j<DUMP_WIDTH;j++) { | 108 | sprintf(tmp,"%04x - ",i*dump_width); |
| 102 | if (((i*DUMP_WIDTH)+j)>=len) | 109 | strcat(buf,tmp); |
| 103 | break; | 110 | for(j=0;j<dump_width;j++) |
| 104 | ch=((unsigned char)*(s+i*DUMP_WIDTH+j)) & 0xff; | 111 | { |
| 112 | if (((i*dump_width)+j)>=len) | ||
| 113 | { | ||
| 114 | strcat(buf," "); | ||
| 115 | } | ||
| 116 | else | ||
| 117 | { | ||
| 118 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; | ||
| 119 | sprintf(tmp,"%02x%c",ch,j==7?'-':' '); | ||
| 120 | strcat(buf,tmp); | ||
| 121 | } | ||
| 122 | } | ||
| 123 | strcat(buf," "); | ||
| 124 | for(j=0;j<dump_width;j++) | ||
| 125 | { | ||
| 126 | if (((i*dump_width)+j)>=len) | ||
| 127 | break; | ||
| 128 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; | ||
| 105 | #ifndef CHARSET_EBCDIC | 129 | #ifndef CHARSET_EBCDIC |
| 106 | sprintf(tmp,"%c",((ch>=' ')&&(ch<='~'))?ch:'.'); | 130 | sprintf(tmp,"%c",((ch>=' ')&&(ch<='~'))?ch:'.'); |
| 107 | #else | 131 | #else |
| 108 | sprintf(tmp,"%c",((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) | 132 | sprintf(tmp,"%c",((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) |
| 109 | ? os_toebcdic[ch] | 133 | ? os_toebcdic[ch] |
| 110 | : '.'); | 134 | : '.'); |
| 111 | #endif | 135 | #endif |
| 112 | strcat(buf,tmp); | 136 | strcat(buf,tmp); |
| 113 | } | 137 | } |
| 114 | strcat(buf,"\n"); | 138 | strcat(buf,"\n"); |
| 115 | /* if this is the last call then update the ddt_dump thing so that | 139 | /* if this is the last call then update the ddt_dump thing so that |
| 116 | * we will move the selection point in the debug window | 140 | * we will move the selection point in the debug window |
| 117 | */ | 141 | */ |
| 118 | ret+=BIO_write(bio,(char *)buf,strlen(buf)); | 142 | ret+=BIO_write(bio,(char *)buf,strlen(buf)); |
| 119 | } | 143 | } |
| 120 | #ifdef TRUNCATE | 144 | #ifdef TRUNCATE |
| 121 | if (trunc > 0) { | 145 | if (trunc > 0) |
| 122 | sprintf(buf,"%04x - <SPACES/NULS>\n",len+trunc); | 146 | { |
| 123 | ret+=BIO_write(bio,(char *)buf,strlen(buf)); | 147 | sprintf(buf,"%s%04x - <SPACES/NULS>\n",str,len+trunc); |
| 124 | } | 148 | ret+=BIO_write(bio,(char *)buf,strlen(buf)); |
| 149 | } | ||
| 125 | #endif | 150 | #endif |
| 126 | return(ret); | 151 | return(ret); |
| 127 | } | 152 | } |
| 128 | |||
diff --git a/src/lib/libssl/src/crypto/bio/b_print.c b/src/lib/libssl/src/crypto/bio/b_print.c index b11b501512..a62f551635 100644 --- a/src/lib/libssl/src/crypto/bio/b_print.c +++ b/src/lib/libssl/src/crypto/bio/b_print.c | |||
| @@ -61,7 +61,6 @@ | |||
| 61 | */ | 61 | */ |
| 62 | 62 | ||
| 63 | #include <stdio.h> | 63 | #include <stdio.h> |
| 64 | #include <stdarg.h> | ||
| 65 | #include <string.h> | 64 | #include <string.h> |
| 66 | #include <ctype.h> | 65 | #include <ctype.h> |
| 67 | #include <assert.h> | 66 | #include <assert.h> |
| @@ -78,48 +77,7 @@ | |||
| 78 | # endif | 77 | # endif |
| 79 | #endif | 78 | #endif |
| 80 | 79 | ||
| 81 | static void dopr (char *buffer, size_t maxlen, size_t *retlen, | 80 | /***************************************************************************/ |
| 82 | const char *format, va_list args); | ||
| 83 | #ifdef USE_ALLOCATING_PRINT | ||
| 84 | static void doapr (char **buffer, size_t *retlen, | ||
| 85 | const char *format, va_list args); | ||
| 86 | #endif | ||
| 87 | |||
| 88 | int BIO_printf (BIO *bio, ...) | ||
| 89 | { | ||
| 90 | va_list args; | ||
| 91 | char *format; | ||
| 92 | int ret; | ||
| 93 | size_t retlen; | ||
| 94 | #ifdef USE_ALLOCATING_PRINT | ||
| 95 | char *hugebuf; | ||
| 96 | #else | ||
| 97 | MS_STATIC char hugebuf[1024*2]; /* 10k in one chunk is the limit */ | ||
| 98 | #endif | ||
| 99 | |||
| 100 | va_start(args, bio); | ||
| 101 | format=va_arg(args, char *); | ||
| 102 | |||
| 103 | #ifndef USE_ALLOCATING_PRINT | ||
| 104 | hugebuf[0]='\0'; | ||
| 105 | dopr(hugebuf, sizeof(hugebuf), &retlen, format, args); | ||
| 106 | #else | ||
| 107 | hugebuf = NULL; | ||
| 108 | CRYPTO_push_info("doapr()"); | ||
| 109 | doapr(&hugebuf, &retlen, format, args); | ||
| 110 | if (hugebuf) | ||
| 111 | { | ||
| 112 | #endif | ||
| 113 | ret=BIO_write(bio, hugebuf, (int)retlen); | ||
| 114 | |||
| 115 | #ifdef USE_ALLOCATING_PRINT | ||
| 116 | Free(hugebuf); | ||
| 117 | } | ||
| 118 | CRYPTO_pop_info(); | ||
| 119 | #endif | ||
| 120 | va_end(args); | ||
| 121 | return(ret); | ||
| 122 | } | ||
| 123 | 81 | ||
| 124 | /* | 82 | /* |
| 125 | * Copyright Patrick Powell 1995 | 83 | * Copyright Patrick Powell 1995 |
| @@ -140,6 +98,7 @@ int BIO_printf (BIO *bio, ...) | |||
| 140 | * o Andrew Tridgell <tridge@samba.org> (1998, for Samba) | 98 | * o Andrew Tridgell <tridge@samba.org> (1998, for Samba) |
| 141 | * o Luke Mewburn <lukem@netbsd.org> (1999, for LukemFTP) | 99 | * o Luke Mewburn <lukem@netbsd.org> (1999, for LukemFTP) |
| 142 | * o Ralf S. Engelschall <rse@engelschall.com> (1999, for Pth) | 100 | * o Ralf S. Engelschall <rse@engelschall.com> (1999, for Pth) |
| 101 | * o ... (for OpenSSL) | ||
| 143 | */ | 102 | */ |
| 144 | 103 | ||
| 145 | #if HAVE_LONG_DOUBLE | 104 | #if HAVE_LONG_DOUBLE |
| @@ -154,25 +113,15 @@ int BIO_printf (BIO *bio, ...) | |||
| 154 | #define LLONG long | 113 | #define LLONG long |
| 155 | #endif | 114 | #endif |
| 156 | 115 | ||
| 157 | static void fmtstr (void (*)(char **, size_t *, size_t *, int), | 116 | static void fmtstr (char **, char **, size_t *, size_t *, |
| 158 | char **, size_t *, size_t *, const char *, int, int, | 117 | const char *, int, int, int); |
| 159 | int); | 118 | static void fmtint (char **, char **, size_t *, size_t *, |
| 160 | static void fmtint (void (*)(char **, size_t *, size_t *, int), | 119 | LLONG, int, int, int, int); |
| 161 | char **, size_t *, size_t *, LLONG, int, int, int, int); | 120 | static void fmtfp (char **, char **, size_t *, size_t *, |
| 162 | static void fmtfp (void (*)(char **, size_t *, size_t *, int), | 121 | LDOUBLE, int, int, int); |
| 163 | char **, size_t *, size_t *, LDOUBLE, int, int, int); | 122 | static void doapr_outch (char **, char **, size_t *, size_t *, int); |
| 164 | #ifndef USE_ALLOCATING_PRINT | 123 | static void _dopr(char **sbuffer, char **buffer, |
| 165 | static int dopr_isbig (size_t, size_t); | 124 | size_t *maxlen, size_t *retlen, int *truncated, |
| 166 | static int dopr_copy (size_t); | ||
| 167 | static void dopr_outch (char **, size_t *, size_t *, int); | ||
| 168 | #else | ||
| 169 | static int doapr_isbig (size_t, size_t); | ||
| 170 | static int doapr_copy (size_t); | ||
| 171 | static void doapr_outch (char **, size_t *, size_t *, int); | ||
| 172 | #endif | ||
| 173 | static void _dopr(void (*)(char **, size_t *, size_t *, int), | ||
| 174 | int (*)(size_t, size_t), int (*)(size_t), | ||
| 175 | char **buffer, size_t *maxlen, size_t *retlen, | ||
| 176 | const char *format, va_list args); | 125 | const char *format, va_list args); |
| 177 | 126 | ||
| 178 | /* format read states */ | 127 | /* format read states */ |
| @@ -204,41 +153,13 @@ static void _dopr(void (*)(char **, size_t *, size_t *, int), | |||
| 204 | #define char_to_int(p) (p - '0') | 153 | #define char_to_int(p) (p - '0') |
| 205 | #define MAX(p,q) ((p >= q) ? p : q) | 154 | #define MAX(p,q) ((p >= q) ? p : q) |
| 206 | 155 | ||
| 207 | #ifndef USE_ALLOCATING_PRINT | ||
| 208 | static void | ||
| 209 | dopr( | ||
| 210 | char *buffer, | ||
| 211 | size_t maxlen, | ||
| 212 | size_t *retlen, | ||
| 213 | const char *format, | ||
| 214 | va_list args) | ||
| 215 | { | ||
| 216 | _dopr(dopr_outch, dopr_isbig, dopr_copy, | ||
| 217 | &buffer, &maxlen, retlen, format, args); | ||
| 218 | } | ||
| 219 | |||
| 220 | #else | ||
| 221 | static void | ||
| 222 | doapr( | ||
| 223 | char **buffer, | ||
| 224 | size_t *retlen, | ||
| 225 | const char *format, | ||
| 226 | va_list args) | ||
| 227 | { | ||
| 228 | size_t dummy_maxlen = 0; | ||
| 229 | _dopr(doapr_outch, doapr_isbig, doapr_copy, | ||
| 230 | buffer, &dummy_maxlen, retlen, format, args); | ||
| 231 | } | ||
| 232 | #endif | ||
| 233 | |||
| 234 | static void | 156 | static void |
| 235 | _dopr( | 157 | _dopr( |
| 236 | void (*outch_fn)(char **, size_t *, size_t *, int), | 158 | char **sbuffer, |
| 237 | int (*isbig_fn)(size_t, size_t), | ||
| 238 | int (*copy_fn)(size_t), | ||
| 239 | char **buffer, | 159 | char **buffer, |
| 240 | size_t *maxlen, | 160 | size_t *maxlen, |
| 241 | size_t *retlen, | 161 | size_t *retlen, |
| 162 | int *truncated, | ||
| 242 | const char *format, | 163 | const char *format, |
| 243 | va_list args) | 164 | va_list args) |
| 244 | { | 165 | { |
| @@ -259,7 +180,7 @@ _dopr( | |||
| 259 | ch = *format++; | 180 | ch = *format++; |
| 260 | 181 | ||
| 261 | while (state != DP_S_DONE) { | 182 | while (state != DP_S_DONE) { |
| 262 | if ((ch == '\0') || (*isbig_fn)(currlen, *maxlen)) | 183 | if (ch == '\0' || (buffer == NULL && currlen >= *maxlen)) |
| 263 | state = DP_S_DONE; | 184 | state = DP_S_DONE; |
| 264 | 185 | ||
| 265 | switch (state) { | 186 | switch (state) { |
| @@ -267,7 +188,7 @@ _dopr( | |||
| 267 | if (ch == '%') | 188 | if (ch == '%') |
| 268 | state = DP_S_FLAGS; | 189 | state = DP_S_FLAGS; |
| 269 | else | 190 | else |
| 270 | (*outch_fn)(buffer, &currlen, maxlen, ch); | 191 | doapr_outch(sbuffer,buffer, &currlen, maxlen, ch); |
| 271 | ch = *format++; | 192 | ch = *format++; |
| 272 | break; | 193 | break; |
| 273 | case DP_S_FLAGS: | 194 | case DP_S_FLAGS: |
| @@ -373,8 +294,8 @@ _dopr( | |||
| 373 | value = va_arg(args, int); | 294 | value = va_arg(args, int); |
| 374 | break; | 295 | break; |
| 375 | } | 296 | } |
| 376 | fmtint(outch_fn, buffer, &currlen, maxlen, | 297 | fmtint(sbuffer, buffer, &currlen, maxlen, |
| 377 | value, 10, min, max, flags); | 298 | value, 10, min, max, flags); |
| 378 | break; | 299 | break; |
| 379 | case 'X': | 300 | case 'X': |
| 380 | flags |= DP_F_UP; | 301 | flags |= DP_F_UP; |
| @@ -399,7 +320,7 @@ _dopr( | |||
| 399 | unsigned int); | 320 | unsigned int); |
| 400 | break; | 321 | break; |
| 401 | } | 322 | } |
| 402 | fmtint(outch_fn, buffer, &currlen, maxlen, value, | 323 | fmtint(sbuffer, buffer, &currlen, maxlen, value, |
| 403 | ch == 'o' ? 8 : (ch == 'u' ? 10 : 16), | 324 | ch == 'o' ? 8 : (ch == 'u' ? 10 : 16), |
| 404 | min, max, flags); | 325 | min, max, flags); |
| 405 | break; | 326 | break; |
| @@ -408,8 +329,8 @@ _dopr( | |||
| 408 | fvalue = va_arg(args, LDOUBLE); | 329 | fvalue = va_arg(args, LDOUBLE); |
| 409 | else | 330 | else |
| 410 | fvalue = va_arg(args, double); | 331 | fvalue = va_arg(args, double); |
| 411 | fmtfp(outch_fn, buffer, &currlen, maxlen, | 332 | fmtfp(sbuffer, buffer, &currlen, maxlen, |
| 412 | fvalue, min, max, flags); | 333 | fvalue, min, max, flags); |
| 413 | break; | 334 | break; |
| 414 | case 'E': | 335 | case 'E': |
| 415 | flags |= DP_F_UP; | 336 | flags |= DP_F_UP; |
| @@ -428,19 +349,23 @@ _dopr( | |||
| 428 | fvalue = va_arg(args, double); | 349 | fvalue = va_arg(args, double); |
| 429 | break; | 350 | break; |
| 430 | case 'c': | 351 | case 'c': |
| 431 | (*outch_fn)(buffer, &currlen, maxlen, | 352 | doapr_outch(sbuffer, buffer, &currlen, maxlen, |
| 432 | va_arg(args, int)); | 353 | va_arg(args, int)); |
| 433 | break; | 354 | break; |
| 434 | case 's': | 355 | case 's': |
| 435 | strvalue = va_arg(args, char *); | 356 | strvalue = va_arg(args, char *); |
| 436 | if (max < 0) | 357 | if (max < 0) { |
| 437 | max = (*copy_fn)(*maxlen); | 358 | if (buffer) |
| 438 | fmtstr(outch_fn, buffer, &currlen, maxlen, strvalue, | 359 | max = INT_MAX; |
| 439 | flags, min, max); | 360 | else |
| 361 | max = *maxlen; | ||
| 362 | } | ||
| 363 | fmtstr(sbuffer, buffer, &currlen, maxlen, strvalue, | ||
| 364 | flags, min, max); | ||
| 440 | break; | 365 | break; |
| 441 | case 'p': | 366 | case 'p': |
| 442 | value = (long)va_arg(args, void *); | 367 | value = (long)va_arg(args, void *); |
| 443 | fmtint(outch_fn, buffer, &currlen, maxlen, | 368 | fmtint(sbuffer, buffer, &currlen, maxlen, |
| 444 | value, 16, min, max, flags); | 369 | value, 16, min, max, flags); |
| 445 | break; | 370 | break; |
| 446 | case 'n': /* XXX */ | 371 | case 'n': /* XXX */ |
| @@ -463,7 +388,7 @@ _dopr( | |||
| 463 | } | 388 | } |
| 464 | break; | 389 | break; |
| 465 | case '%': | 390 | case '%': |
| 466 | (*outch_fn)(buffer, &currlen, maxlen, ch); | 391 | doapr_outch(sbuffer, buffer, &currlen, maxlen, ch); |
| 467 | break; | 392 | break; |
| 468 | case 'w': | 393 | case 'w': |
| 469 | /* not supported yet, treat as next char */ | 394 | /* not supported yet, treat as next char */ |
| @@ -484,16 +409,17 @@ _dopr( | |||
| 484 | break; | 409 | break; |
| 485 | } | 410 | } |
| 486 | } | 411 | } |
| 487 | if (currlen >= *maxlen - 1) | 412 | *truncated = (currlen > *maxlen - 1); |
| 413 | if (*truncated) | ||
| 488 | currlen = *maxlen - 1; | 414 | currlen = *maxlen - 1; |
| 489 | (*buffer)[currlen] = '\0'; | 415 | doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0'); |
| 490 | *retlen = currlen; | 416 | *retlen = currlen - 1; |
| 491 | return; | 417 | return; |
| 492 | } | 418 | } |
| 493 | 419 | ||
| 494 | static void | 420 | static void |
| 495 | fmtstr( | 421 | fmtstr( |
| 496 | void (*outch_fn)(char **, size_t *, size_t *, int), | 422 | char **sbuffer, |
| 497 | char **buffer, | 423 | char **buffer, |
| 498 | size_t *currlen, | 424 | size_t *currlen, |
| 499 | size_t *maxlen, | 425 | size_t *maxlen, |
| @@ -516,16 +442,16 @@ fmtstr( | |||
| 516 | padlen = -padlen; | 442 | padlen = -padlen; |
| 517 | 443 | ||
| 518 | while ((padlen > 0) && (cnt < max)) { | 444 | while ((padlen > 0) && (cnt < max)) { |
| 519 | (*outch_fn)(buffer, currlen, maxlen, ' '); | 445 | doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); |
| 520 | --padlen; | 446 | --padlen; |
| 521 | ++cnt; | 447 | ++cnt; |
| 522 | } | 448 | } |
| 523 | while (*value && (cnt < max)) { | 449 | while (*value && (cnt < max)) { |
| 524 | (*outch_fn)(buffer, currlen, maxlen, *value++); | 450 | doapr_outch(sbuffer, buffer, currlen, maxlen, *value++); |
| 525 | ++cnt; | 451 | ++cnt; |
| 526 | } | 452 | } |
| 527 | while ((padlen < 0) && (cnt < max)) { | 453 | while ((padlen < 0) && (cnt < max)) { |
| 528 | (*outch_fn)(buffer, currlen, maxlen, ' '); | 454 | doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); |
| 529 | ++padlen; | 455 | ++padlen; |
| 530 | ++cnt; | 456 | ++cnt; |
| 531 | } | 457 | } |
| @@ -533,7 +459,7 @@ fmtstr( | |||
| 533 | 459 | ||
| 534 | static void | 460 | static void |
| 535 | fmtint( | 461 | fmtint( |
| 536 | void (*outch_fn)(char **, size_t *, size_t *, int), | 462 | char **sbuffer, |
| 537 | char **buffer, | 463 | char **buffer, |
| 538 | size_t *currlen, | 464 | size_t *currlen, |
| 539 | size_t *maxlen, | 465 | size_t *maxlen, |
| @@ -590,28 +516,28 @@ fmtint( | |||
| 590 | 516 | ||
| 591 | /* spaces */ | 517 | /* spaces */ |
| 592 | while (spadlen > 0) { | 518 | while (spadlen > 0) { |
| 593 | (*outch_fn)(buffer, currlen, maxlen, ' '); | 519 | doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); |
| 594 | --spadlen; | 520 | --spadlen; |
| 595 | } | 521 | } |
| 596 | 522 | ||
| 597 | /* sign */ | 523 | /* sign */ |
| 598 | if (signvalue) | 524 | if (signvalue) |
| 599 | (*outch_fn)(buffer, currlen, maxlen, signvalue); | 525 | doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); |
| 600 | 526 | ||
| 601 | /* zeros */ | 527 | /* zeros */ |
| 602 | if (zpadlen > 0) { | 528 | if (zpadlen > 0) { |
| 603 | while (zpadlen > 0) { | 529 | while (zpadlen > 0) { |
| 604 | (*outch_fn)(buffer, currlen, maxlen, '0'); | 530 | doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); |
| 605 | --zpadlen; | 531 | --zpadlen; |
| 606 | } | 532 | } |
| 607 | } | 533 | } |
| 608 | /* digits */ | 534 | /* digits */ |
| 609 | while (place > 0) | 535 | while (place > 0) |
| 610 | (*outch_fn)(buffer, currlen, maxlen, convert[--place]); | 536 | doapr_outch(sbuffer, buffer, currlen, maxlen, convert[--place]); |
| 611 | 537 | ||
| 612 | /* left justified spaces */ | 538 | /* left justified spaces */ |
| 613 | while (spadlen < 0) { | 539 | while (spadlen < 0) { |
| 614 | (*outch_fn)(buffer, currlen, maxlen, ' '); | 540 | doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); |
| 615 | ++spadlen; | 541 | ++spadlen; |
| 616 | } | 542 | } |
| 617 | return; | 543 | return; |
| @@ -650,7 +576,7 @@ round(LDOUBLE value) | |||
| 650 | 576 | ||
| 651 | static void | 577 | static void |
| 652 | fmtfp( | 578 | fmtfp( |
| 653 | void (*outch_fn)(char **, size_t *, size_t *, int), | 579 | char **sbuffer, |
| 654 | char **buffer, | 580 | char **buffer, |
| 655 | size_t *currlen, | 581 | size_t *currlen, |
| 656 | size_t *maxlen, | 582 | size_t *maxlen, |
| @@ -731,114 +657,158 @@ fmtfp( | |||
| 731 | 657 | ||
| 732 | if ((flags & DP_F_ZERO) && (padlen > 0)) { | 658 | if ((flags & DP_F_ZERO) && (padlen > 0)) { |
| 733 | if (signvalue) { | 659 | if (signvalue) { |
| 734 | (*outch_fn)(buffer, currlen, maxlen, signvalue); | 660 | doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); |
| 735 | --padlen; | 661 | --padlen; |
| 736 | signvalue = 0; | 662 | signvalue = 0; |
| 737 | } | 663 | } |
| 738 | while (padlen > 0) { | 664 | while (padlen > 0) { |
| 739 | (*outch_fn)(buffer, currlen, maxlen, '0'); | 665 | doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); |
| 740 | --padlen; | 666 | --padlen; |
| 741 | } | 667 | } |
| 742 | } | 668 | } |
| 743 | while (padlen > 0) { | 669 | while (padlen > 0) { |
| 744 | (*outch_fn)(buffer, currlen, maxlen, ' '); | 670 | doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); |
| 745 | --padlen; | 671 | --padlen; |
| 746 | } | 672 | } |
| 747 | if (signvalue) | 673 | if (signvalue) |
| 748 | (*outch_fn)(buffer, currlen, maxlen, signvalue); | 674 | doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); |
| 749 | 675 | ||
| 750 | while (iplace > 0) | 676 | while (iplace > 0) |
| 751 | (*outch_fn)(buffer, currlen, maxlen, iconvert[--iplace]); | 677 | doapr_outch(sbuffer, buffer, currlen, maxlen, iconvert[--iplace]); |
| 752 | 678 | ||
| 753 | /* | 679 | /* |
| 754 | * Decimal point. This should probably use locale to find the correct | 680 | * Decimal point. This should probably use locale to find the correct |
| 755 | * char to print out. | 681 | * char to print out. |
| 756 | */ | 682 | */ |
| 757 | if (max > 0) { | 683 | if (max > 0) { |
| 758 | (*outch_fn)(buffer, currlen, maxlen, '.'); | 684 | doapr_outch(sbuffer, buffer, currlen, maxlen, '.'); |
| 759 | 685 | ||
| 760 | while (fplace > 0) | 686 | while (fplace > 0) |
| 761 | (*outch_fn)(buffer, currlen, maxlen, fconvert[--fplace]); | 687 | doapr_outch(sbuffer, buffer, currlen, maxlen, fconvert[--fplace]); |
| 762 | } | 688 | } |
| 763 | while (zpadlen > 0) { | 689 | while (zpadlen > 0) { |
| 764 | (*outch_fn)(buffer, currlen, maxlen, '0'); | 690 | doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); |
| 765 | --zpadlen; | 691 | --zpadlen; |
| 766 | } | 692 | } |
| 767 | 693 | ||
| 768 | while (padlen < 0) { | 694 | while (padlen < 0) { |
| 769 | (*outch_fn)(buffer, currlen, maxlen, ' '); | 695 | doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); |
| 770 | ++padlen; | 696 | ++padlen; |
| 771 | } | 697 | } |
| 772 | } | 698 | } |
| 773 | 699 | ||
| 774 | static int | ||
| 775 | dopr_copy( | ||
| 776 | size_t len) | ||
| 777 | { | ||
| 778 | return len; | ||
| 779 | } | ||
| 780 | |||
| 781 | #ifdef USE_ALLOCATING_PRINT | ||
| 782 | static int | ||
| 783 | doapr_copy( | ||
| 784 | size_t len) | ||
| 785 | { | ||
| 786 | /* Return as high an integer as possible */ | ||
| 787 | return INT_MAX; | ||
| 788 | } | ||
| 789 | #endif | ||
| 790 | |||
| 791 | static int | ||
| 792 | dopr_isbig( | ||
| 793 | size_t currlen, | ||
| 794 | size_t maxlen) | ||
| 795 | { | ||
| 796 | return currlen > maxlen; | ||
| 797 | } | ||
| 798 | |||
| 799 | #ifdef USE_ALLOCATING_PRINT | ||
| 800 | static int | ||
| 801 | doapr_isbig( | ||
| 802 | size_t currlen, | ||
| 803 | size_t maxlen) | ||
| 804 | { | ||
| 805 | return 0; | ||
| 806 | } | ||
| 807 | #endif | ||
| 808 | |||
| 809 | static void | ||
| 810 | dopr_outch( | ||
| 811 | char **buffer, | ||
| 812 | size_t *currlen, | ||
| 813 | size_t *maxlen, | ||
| 814 | int c) | ||
| 815 | { | ||
| 816 | if (*currlen < *maxlen) | ||
| 817 | (*buffer)[(*currlen)++] = (char)c; | ||
| 818 | return; | ||
| 819 | } | ||
| 820 | |||
| 821 | #ifdef USE_ALLOCATING_PRINT | ||
| 822 | static void | 700 | static void |
| 823 | doapr_outch( | 701 | doapr_outch( |
| 702 | char **sbuffer, | ||
| 824 | char **buffer, | 703 | char **buffer, |
| 825 | size_t *currlen, | 704 | size_t *currlen, |
| 826 | size_t *maxlen, | 705 | size_t *maxlen, |
| 827 | int c) | 706 | int c) |
| 828 | { | 707 | { |
| 829 | if (*buffer == NULL) { | 708 | /* If we haven't at least one buffer, someone has doe a big booboo */ |
| 830 | if (*maxlen == 0) | 709 | assert(*sbuffer != NULL || buffer != NULL); |
| 831 | *maxlen = 1024; | 710 | |
| 832 | *buffer = Malloc(*maxlen); | 711 | if (buffer) { |
| 712 | while (*currlen >= *maxlen) { | ||
| 713 | if (*buffer == NULL) { | ||
| 714 | assert(*sbuffer != NULL); | ||
| 715 | if (*maxlen == 0) | ||
| 716 | *maxlen = 1024; | ||
| 717 | *buffer = OPENSSL_malloc(*maxlen); | ||
| 718 | if (*currlen > 0) | ||
| 719 | memcpy(*buffer, *sbuffer, *currlen); | ||
| 720 | *sbuffer = NULL; | ||
| 721 | } else { | ||
| 722 | *maxlen += 1024; | ||
| 723 | *buffer = OPENSSL_realloc(*buffer, *maxlen); | ||
| 724 | } | ||
| 725 | } | ||
| 726 | /* What to do if *buffer is NULL? */ | ||
| 727 | assert(*sbuffer != NULL || *buffer != NULL); | ||
| 833 | } | 728 | } |
| 834 | while (*currlen >= *maxlen) { | 729 | |
| 835 | *maxlen += 1024; | 730 | if (*currlen < *maxlen) { |
| 836 | *buffer = Realloc(*buffer, *maxlen); | 731 | if (*sbuffer) |
| 732 | (*sbuffer)[(*currlen)++] = (char)c; | ||
| 733 | else | ||
| 734 | (*buffer)[(*currlen)++] = (char)c; | ||
| 837 | } | 735 | } |
| 838 | /* What to do if *buffer is NULL? */ | ||
| 839 | assert(*buffer != NULL); | ||
| 840 | 736 | ||
| 841 | (*buffer)[(*currlen)++] = (char)c; | ||
| 842 | return; | 737 | return; |
| 843 | } | 738 | } |
| 844 | #endif | 739 | |
| 740 | /***************************************************************************/ | ||
| 741 | |||
| 742 | int BIO_printf (BIO *bio, const char *format, ...) | ||
| 743 | { | ||
| 744 | va_list args; | ||
| 745 | int ret; | ||
| 746 | |||
| 747 | va_start(args, format); | ||
| 748 | |||
| 749 | ret = BIO_vprintf(bio, format, args); | ||
| 750 | |||
| 751 | va_end(args); | ||
| 752 | return(ret); | ||
| 753 | } | ||
| 754 | |||
| 755 | int BIO_vprintf (BIO *bio, const char *format, va_list args) | ||
| 756 | { | ||
| 757 | int ret; | ||
| 758 | size_t retlen; | ||
| 759 | MS_STATIC char hugebuf[1024*10]; | ||
| 760 | char *hugebufp = hugebuf; | ||
| 761 | size_t hugebufsize = sizeof(hugebuf); | ||
| 762 | char *dynbuf = NULL; | ||
| 763 | int ignored; | ||
| 764 | |||
| 765 | dynbuf = NULL; | ||
| 766 | CRYPTO_push_info("doapr()"); | ||
| 767 | _dopr(&hugebufp, &dynbuf, &hugebufsize, | ||
| 768 | &retlen, &ignored, format, args); | ||
| 769 | if (dynbuf) | ||
| 770 | { | ||
| 771 | ret=BIO_write(bio, dynbuf, (int)retlen); | ||
| 772 | OPENSSL_free(dynbuf); | ||
| 773 | } | ||
| 774 | else | ||
| 775 | { | ||
| 776 | ret=BIO_write(bio, hugebuf, (int)retlen); | ||
| 777 | } | ||
| 778 | CRYPTO_pop_info(); | ||
| 779 | return(ret); | ||
| 780 | } | ||
| 781 | |||
| 782 | /* As snprintf is not available everywhere, we provide our own implementation. | ||
| 783 | * This function has nothing to do with BIOs, but it's closely related | ||
| 784 | * to BIO_printf, and we need *some* name prefix ... | ||
| 785 | * (XXX the function should be renamed, but to what?) */ | ||
| 786 | int BIO_snprintf(char *buf, size_t n, const char *format, ...) | ||
| 787 | { | ||
| 788 | va_list args; | ||
| 789 | int ret; | ||
| 790 | |||
| 791 | va_start(args, format); | ||
| 792 | |||
| 793 | ret = BIO_vsnprintf(buf, n, format, args); | ||
| 794 | |||
| 795 | va_end(args); | ||
| 796 | return(ret); | ||
| 797 | } | ||
| 798 | |||
| 799 | int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) | ||
| 800 | { | ||
| 801 | size_t retlen; | ||
| 802 | int truncated; | ||
| 803 | |||
| 804 | _dopr(&buf, NULL, &n, &retlen, &truncated, format, args); | ||
| 805 | |||
| 806 | if (truncated) | ||
| 807 | /* In case of truncation, return -1 like traditional snprintf. | ||
| 808 | * (Current drafts for ISO/IEC 9899 say snprintf should return | ||
| 809 | * the number of characters that would have been written, | ||
| 810 | * had the buffer been large enough.) */ | ||
| 811 | return -1; | ||
| 812 | else | ||
| 813 | return (retlen <= INT_MAX) ? retlen : -1; | ||
| 814 | } | ||
diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c index 6409f98f57..64310058b4 100644 --- a/src/lib/libssl/src/crypto/bio/b_sock.c +++ b/src/lib/libssl/src/crypto/bio/b_sock.c | |||
| @@ -105,17 +105,22 @@ int BIO_get_host_ip(const char *str, unsigned char *ip) | |||
| 105 | struct hostent *he; | 105 | struct hostent *he; |
| 106 | 106 | ||
| 107 | i=get_ip(str,ip); | 107 | i=get_ip(str,ip); |
| 108 | if (i > 0) return(1); | ||
| 109 | if (i < 0) | 108 | if (i < 0) |
| 110 | { | 109 | { |
| 111 | BIOerr(BIO_F_BIO_GET_HOST_IP,BIO_R_INVALID_IP_ADDRESS); | 110 | BIOerr(BIO_F_BIO_GET_HOST_IP,BIO_R_INVALID_IP_ADDRESS); |
| 112 | goto err; | 111 | goto err; |
| 113 | } | 112 | } |
| 114 | 113 | ||
| 115 | /* do a gethostbyname */ | 114 | /* At this point, we have something that is most probably correct |
| 115 | in some way, so let's init the socket. */ | ||
| 116 | if (!BIO_sock_init()) | 116 | if (!BIO_sock_init()) |
| 117 | return(0); /* don't generate another error code here */ | 117 | return(0); /* don't generate another error code here */ |
| 118 | 118 | ||
| 119 | /* If the string actually contained an IP address, we need not do | ||
| 120 | anything more */ | ||
| 121 | if (i > 0) return(1); | ||
| 122 | |||
| 123 | /* do a gethostbyname */ | ||
| 119 | CRYPTO_w_lock(CRYPTO_LOCK_GETHOSTBYNAME); | 124 | CRYPTO_w_lock(CRYPTO_LOCK_GETHOSTBYNAME); |
| 120 | locked = 1; | 125 | locked = 1; |
| 121 | he=BIO_gethostbyname(str); | 126 | he=BIO_gethostbyname(str); |
| @@ -267,14 +272,14 @@ static struct hostent *ghbn_dup(struct hostent *a) | |||
| 267 | int i,j; | 272 | int i,j; |
| 268 | 273 | ||
| 269 | MemCheck_off(); | 274 | MemCheck_off(); |
| 270 | ret=(struct hostent *)Malloc(sizeof(struct hostent)); | 275 | ret=(struct hostent *)OPENSSL_malloc(sizeof(struct hostent)); |
| 271 | if (ret == NULL) return(NULL); | 276 | if (ret == NULL) return(NULL); |
| 272 | memset(ret,0,sizeof(struct hostent)); | 277 | memset(ret,0,sizeof(struct hostent)); |
| 273 | 278 | ||
| 274 | for (i=0; a->h_aliases[i] != NULL; i++) | 279 | for (i=0; a->h_aliases[i] != NULL; i++) |
| 275 | ; | 280 | ; |
| 276 | i++; | 281 | i++; |
| 277 | ret->h_aliases = (char **)Malloc(i*sizeof(char *)); | 282 | ret->h_aliases = (char **)OPENSSL_malloc(i*sizeof(char *)); |
| 278 | if (ret->h_aliases == NULL) | 283 | if (ret->h_aliases == NULL) |
| 279 | goto err; | 284 | goto err; |
| 280 | memset(ret->h_aliases, 0, i*sizeof(char *)); | 285 | memset(ret->h_aliases, 0, i*sizeof(char *)); |
| @@ -282,25 +287,25 @@ static struct hostent *ghbn_dup(struct hostent *a) | |||
| 282 | for (i=0; a->h_addr_list[i] != NULL; i++) | 287 | for (i=0; a->h_addr_list[i] != NULL; i++) |
| 283 | ; | 288 | ; |
| 284 | i++; | 289 | i++; |
| 285 | ret->h_addr_list=(char **)Malloc(i*sizeof(char *)); | 290 | ret->h_addr_list=(char **)OPENSSL_malloc(i*sizeof(char *)); |
| 286 | if (ret->h_addr_list == NULL) | 291 | if (ret->h_addr_list == NULL) |
| 287 | goto err; | 292 | goto err; |
| 288 | memset(ret->h_addr_list, 0, i*sizeof(char *)); | 293 | memset(ret->h_addr_list, 0, i*sizeof(char *)); |
| 289 | 294 | ||
| 290 | j=strlen(a->h_name)+1; | 295 | j=strlen(a->h_name)+1; |
| 291 | if ((ret->h_name=Malloc(j)) == NULL) goto err; | 296 | if ((ret->h_name=OPENSSL_malloc(j)) == NULL) goto err; |
| 292 | memcpy((char *)ret->h_name,a->h_name,j); | 297 | memcpy((char *)ret->h_name,a->h_name,j); |
| 293 | for (i=0; a->h_aliases[i] != NULL; i++) | 298 | for (i=0; a->h_aliases[i] != NULL; i++) |
| 294 | { | 299 | { |
| 295 | j=strlen(a->h_aliases[i])+1; | 300 | j=strlen(a->h_aliases[i])+1; |
| 296 | if ((ret->h_aliases[i]=Malloc(j)) == NULL) goto err; | 301 | if ((ret->h_aliases[i]=OPENSSL_malloc(j)) == NULL) goto err; |
| 297 | memcpy(ret->h_aliases[i],a->h_aliases[i],j); | 302 | memcpy(ret->h_aliases[i],a->h_aliases[i],j); |
| 298 | } | 303 | } |
| 299 | ret->h_length=a->h_length; | 304 | ret->h_length=a->h_length; |
| 300 | ret->h_addrtype=a->h_addrtype; | 305 | ret->h_addrtype=a->h_addrtype; |
| 301 | for (i=0; a->h_addr_list[i] != NULL; i++) | 306 | for (i=0; a->h_addr_list[i] != NULL; i++) |
| 302 | { | 307 | { |
| 303 | if ((ret->h_addr_list[i]=Malloc(a->h_length)) == NULL) | 308 | if ((ret->h_addr_list[i]=OPENSSL_malloc(a->h_length)) == NULL) |
| 304 | goto err; | 309 | goto err; |
| 305 | memcpy(ret->h_addr_list[i],a->h_addr_list[i],a->h_length); | 310 | memcpy(ret->h_addr_list[i],a->h_addr_list[i],a->h_length); |
| 306 | } | 311 | } |
| @@ -325,17 +330,17 @@ static void ghbn_free(struct hostent *a) | |||
| 325 | if (a->h_aliases != NULL) | 330 | if (a->h_aliases != NULL) |
| 326 | { | 331 | { |
| 327 | for (i=0; a->h_aliases[i] != NULL; i++) | 332 | for (i=0; a->h_aliases[i] != NULL; i++) |
| 328 | Free(a->h_aliases[i]); | 333 | OPENSSL_free(a->h_aliases[i]); |
| 329 | Free(a->h_aliases); | 334 | OPENSSL_free(a->h_aliases); |
| 330 | } | 335 | } |
| 331 | if (a->h_addr_list != NULL) | 336 | if (a->h_addr_list != NULL) |
| 332 | { | 337 | { |
| 333 | for (i=0; a->h_addr_list[i] != NULL; i++) | 338 | for (i=0; a->h_addr_list[i] != NULL; i++) |
| 334 | Free(a->h_addr_list[i]); | 339 | OPENSSL_free(a->h_addr_list[i]); |
| 335 | Free(a->h_addr_list); | 340 | OPENSSL_free(a->h_addr_list); |
| 336 | } | 341 | } |
| 337 | if (a->h_name != NULL) Free(a->h_name); | 342 | if (a->h_name != NULL) OPENSSL_free(a->h_name); |
| 338 | Free(a); | 343 | OPENSSL_free(a); |
| 339 | } | 344 | } |
| 340 | 345 | ||
| 341 | struct hostent *BIO_gethostbyname(const char *name) | 346 | struct hostent *BIO_gethostbyname(const char *name) |
| @@ -628,7 +633,7 @@ again: | |||
| 628 | } | 633 | } |
| 629 | ret=1; | 634 | ret=1; |
| 630 | err: | 635 | err: |
| 631 | if (str != NULL) Free(str); | 636 | if (str != NULL) OPENSSL_free(str); |
| 632 | if ((ret == 0) && (s != INVALID_SOCKET)) | 637 | if ((ret == 0) && (s != INVALID_SOCKET)) |
| 633 | { | 638 | { |
| 634 | closesocket(s); | 639 | closesocket(s); |
| @@ -667,7 +672,7 @@ int BIO_accept(int sock, char **addr) | |||
| 667 | port=ntohs(from.sin_port); | 672 | port=ntohs(from.sin_port); |
| 668 | if (*addr == NULL) | 673 | if (*addr == NULL) |
| 669 | { | 674 | { |
| 670 | if ((p=Malloc(24)) == NULL) | 675 | if ((p=OPENSSL_malloc(24)) == NULL) |
| 671 | { | 676 | { |
| 672 | BIOerr(BIO_F_BIO_ACCEPT,ERR_R_MALLOC_FAILURE); | 677 | BIOerr(BIO_F_BIO_ACCEPT,ERR_R_MALLOC_FAILURE); |
| 673 | goto end; | 678 | goto end; |
diff --git a/src/lib/libssl/src/crypto/bio/bf_buff.c b/src/lib/libssl/src/crypto/bio/bf_buff.c index ff0c9070ae..f50e8f98a3 100644 --- a/src/lib/libssl/src/crypto/bio/bf_buff.c +++ b/src/lib/libssl/src/crypto/bio/bf_buff.c | |||
| @@ -62,14 +62,14 @@ | |||
| 62 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | 64 | ||
| 65 | static int buffer_write(BIO *h,char *buf,int num); | 65 | static int buffer_write(BIO *h, const char *buf,int num); |
| 66 | static int buffer_read(BIO *h,char *buf,int size); | 66 | static int buffer_read(BIO *h, char *buf, int size); |
| 67 | static int buffer_puts(BIO *h,char *str); | 67 | static int buffer_puts(BIO *h, const char *str); |
| 68 | static int buffer_gets(BIO *h,char *str,int size); | 68 | static int buffer_gets(BIO *h, char *str, int size); |
| 69 | static long buffer_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 69 | static long buffer_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 70 | static int buffer_new(BIO *h); | 70 | static int buffer_new(BIO *h); |
| 71 | static int buffer_free(BIO *data); | 71 | static int buffer_free(BIO *data); |
| 72 | static long buffer_callback_ctrl(BIO *h,int cmd, void (*fp)()); | 72 | static long buffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); |
| 73 | #define DEFAULT_BUFFER_SIZE 1024 | 73 | #define DEFAULT_BUFFER_SIZE 1024 |
| 74 | 74 | ||
| 75 | static BIO_METHOD methods_buffer= | 75 | static BIO_METHOD methods_buffer= |
| @@ -95,12 +95,12 @@ static int buffer_new(BIO *bi) | |||
| 95 | { | 95 | { |
| 96 | BIO_F_BUFFER_CTX *ctx; | 96 | BIO_F_BUFFER_CTX *ctx; |
| 97 | 97 | ||
| 98 | ctx=(BIO_F_BUFFER_CTX *)Malloc(sizeof(BIO_F_BUFFER_CTX)); | 98 | ctx=(BIO_F_BUFFER_CTX *)OPENSSL_malloc(sizeof(BIO_F_BUFFER_CTX)); |
| 99 | if (ctx == NULL) return(0); | 99 | if (ctx == NULL) return(0); |
| 100 | ctx->ibuf=(char *)Malloc(DEFAULT_BUFFER_SIZE); | 100 | ctx->ibuf=(char *)OPENSSL_malloc(DEFAULT_BUFFER_SIZE); |
| 101 | if (ctx->ibuf == NULL) { Free(ctx); return(0); } | 101 | if (ctx->ibuf == NULL) { OPENSSL_free(ctx); return(0); } |
| 102 | ctx->obuf=(char *)Malloc(DEFAULT_BUFFER_SIZE); | 102 | ctx->obuf=(char *)OPENSSL_malloc(DEFAULT_BUFFER_SIZE); |
| 103 | if (ctx->obuf == NULL) { Free(ctx->ibuf); Free(ctx); return(0); } | 103 | if (ctx->obuf == NULL) { OPENSSL_free(ctx->ibuf); OPENSSL_free(ctx); return(0); } |
| 104 | ctx->ibuf_size=DEFAULT_BUFFER_SIZE; | 104 | ctx->ibuf_size=DEFAULT_BUFFER_SIZE; |
| 105 | ctx->obuf_size=DEFAULT_BUFFER_SIZE; | 105 | ctx->obuf_size=DEFAULT_BUFFER_SIZE; |
| 106 | ctx->ibuf_len=0; | 106 | ctx->ibuf_len=0; |
| @@ -120,9 +120,9 @@ static int buffer_free(BIO *a) | |||
| 120 | 120 | ||
| 121 | if (a == NULL) return(0); | 121 | if (a == NULL) return(0); |
| 122 | b=(BIO_F_BUFFER_CTX *)a->ptr; | 122 | b=(BIO_F_BUFFER_CTX *)a->ptr; |
| 123 | if (b->ibuf != NULL) Free(b->ibuf); | 123 | if (b->ibuf != NULL) OPENSSL_free(b->ibuf); |
| 124 | if (b->obuf != NULL) Free(b->obuf); | 124 | if (b->obuf != NULL) OPENSSL_free(b->obuf); |
| 125 | Free(a->ptr); | 125 | OPENSSL_free(a->ptr); |
| 126 | a->ptr=NULL; | 126 | a->ptr=NULL; |
| 127 | a->init=0; | 127 | a->init=0; |
| 128 | a->flags=0; | 128 | a->flags=0; |
| @@ -195,7 +195,7 @@ start: | |||
| 195 | goto start; | 195 | goto start; |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static int buffer_write(BIO *b, char *in, int inl) | 198 | static int buffer_write(BIO *b, const char *in, int inl) |
| 199 | { | 199 | { |
| 200 | int i,num=0; | 200 | int i,num=0; |
| 201 | BIO_F_BUFFER_CTX *ctx; | 201 | BIO_F_BUFFER_CTX *ctx; |
| @@ -268,7 +268,7 @@ start: | |||
| 268 | goto start; | 268 | goto start; |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | static long buffer_ctrl(BIO *b, int cmd, long num, char *ptr) | 271 | static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 272 | { | 272 | { |
| 273 | BIO *dbio; | 273 | BIO *dbio; |
| 274 | BIO_F_BUFFER_CTX *ctx; | 274 | BIO_F_BUFFER_CTX *ctx; |
| @@ -319,9 +319,9 @@ static long buffer_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 319 | case BIO_C_SET_BUFF_READ_DATA: | 319 | case BIO_C_SET_BUFF_READ_DATA: |
| 320 | if (num > ctx->ibuf_size) | 320 | if (num > ctx->ibuf_size) |
| 321 | { | 321 | { |
| 322 | p1=Malloc((int)num); | 322 | p1=OPENSSL_malloc((int)num); |
| 323 | if (p1 == NULL) goto malloc_error; | 323 | if (p1 == NULL) goto malloc_error; |
| 324 | if (ctx->ibuf != NULL) Free(ctx->ibuf); | 324 | if (ctx->ibuf != NULL) OPENSSL_free(ctx->ibuf); |
| 325 | ctx->ibuf=p1; | 325 | ctx->ibuf=p1; |
| 326 | } | 326 | } |
| 327 | ctx->ibuf_off=0; | 327 | ctx->ibuf_off=0; |
| @@ -353,21 +353,21 @@ static long buffer_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 353 | p2=ctx->obuf; | 353 | p2=ctx->obuf; |
| 354 | if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) | 354 | if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) |
| 355 | { | 355 | { |
| 356 | p1=(char *)Malloc((int)num); | 356 | p1=(char *)OPENSSL_malloc((int)num); |
| 357 | if (p1 == NULL) goto malloc_error; | 357 | if (p1 == NULL) goto malloc_error; |
| 358 | } | 358 | } |
| 359 | if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) | 359 | if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) |
| 360 | { | 360 | { |
| 361 | p2=(char *)Malloc((int)num); | 361 | p2=(char *)OPENSSL_malloc((int)num); |
| 362 | if (p2 == NULL) | 362 | if (p2 == NULL) |
| 363 | { | 363 | { |
| 364 | if (p1 != ctx->ibuf) Free(p1); | 364 | if (p1 != ctx->ibuf) OPENSSL_free(p1); |
| 365 | goto malloc_error; | 365 | goto malloc_error; |
| 366 | } | 366 | } |
| 367 | } | 367 | } |
| 368 | if (ctx->ibuf != p1) | 368 | if (ctx->ibuf != p1) |
| 369 | { | 369 | { |
| 370 | Free(ctx->ibuf); | 370 | OPENSSL_free(ctx->ibuf); |
| 371 | ctx->ibuf=p1; | 371 | ctx->ibuf=p1; |
| 372 | ctx->ibuf_off=0; | 372 | ctx->ibuf_off=0; |
| 373 | ctx->ibuf_len=0; | 373 | ctx->ibuf_len=0; |
| @@ -375,7 +375,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 375 | } | 375 | } |
| 376 | if (ctx->obuf != p2) | 376 | if (ctx->obuf != p2) |
| 377 | { | 377 | { |
| 378 | Free(ctx->obuf); | 378 | OPENSSL_free(ctx->obuf); |
| 379 | ctx->obuf=p2; | 379 | ctx->obuf=p2; |
| 380 | ctx->obuf_off=0; | 380 | ctx->obuf_off=0; |
| 381 | ctx->obuf_len=0; | 381 | ctx->obuf_len=0; |
| @@ -439,7 +439,7 @@ malloc_error: | |||
| 439 | return(0); | 439 | return(0); |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | static long buffer_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 442 | static long buffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 443 | { | 443 | { |
| 444 | long ret=1; | 444 | long ret=1; |
| 445 | 445 | ||
| @@ -504,8 +504,8 @@ static int buffer_gets(BIO *b, char *buf, int size) | |||
| 504 | } | 504 | } |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | static int buffer_puts(BIO *b, char *str) | 507 | static int buffer_puts(BIO *b, const char *str) |
| 508 | { | 508 | { |
| 509 | return(BIO_write(b,str,strlen(str))); | 509 | return(buffer_write(b,str,strlen(str))); |
| 510 | } | 510 | } |
| 511 | 511 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bf_lbuf.c b/src/lib/libssl/src/crypto/bio/bf_lbuf.c new file mode 100644 index 0000000000..7bcf8ed941 --- /dev/null +++ b/src/lib/libssl/src/crypto/bio/bf_lbuf.c | |||
| @@ -0,0 +1,397 @@ | |||
| 1 | /* crypto/bio/bf_buff.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <errno.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bio.h> | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | |||
| 65 | static int linebuffer_write(BIO *h, const char *buf,int num); | ||
| 66 | static int linebuffer_read(BIO *h, char *buf, int size); | ||
| 67 | static int linebuffer_puts(BIO *h, const char *str); | ||
| 68 | static int linebuffer_gets(BIO *h, char *str, int size); | ||
| 69 | static long linebuffer_ctrl(BIO *h, int cmd, long arg1, void *arg2); | ||
| 70 | static int linebuffer_new(BIO *h); | ||
| 71 | static int linebuffer_free(BIO *data); | ||
| 72 | static long linebuffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); | ||
| 73 | |||
| 74 | /* A 10k maximum should be enough for most purposes */ | ||
| 75 | #define DEFAULT_LINEBUFFER_SIZE 1024*10 | ||
| 76 | |||
| 77 | /* #define DEBUG */ | ||
| 78 | |||
| 79 | static BIO_METHOD methods_linebuffer= | ||
| 80 | { | ||
| 81 | BIO_TYPE_LINEBUFFER, | ||
| 82 | "linebuffer", | ||
| 83 | linebuffer_write, | ||
| 84 | linebuffer_read, | ||
| 85 | linebuffer_puts, | ||
| 86 | linebuffer_gets, | ||
| 87 | linebuffer_ctrl, | ||
| 88 | linebuffer_new, | ||
| 89 | linebuffer_free, | ||
| 90 | linebuffer_callback_ctrl, | ||
| 91 | }; | ||
| 92 | |||
| 93 | BIO_METHOD *BIO_f_linebuffer(void) | ||
| 94 | { | ||
| 95 | return(&methods_linebuffer); | ||
| 96 | } | ||
| 97 | |||
| 98 | typedef struct bio_linebuffer_ctx_struct | ||
| 99 | { | ||
| 100 | char *obuf; /* the output char array */ | ||
| 101 | int obuf_size; /* how big is the output buffer */ | ||
| 102 | int obuf_len; /* how many bytes are in it */ | ||
| 103 | } BIO_LINEBUFFER_CTX; | ||
| 104 | |||
| 105 | static int linebuffer_new(BIO *bi) | ||
| 106 | { | ||
| 107 | BIO_LINEBUFFER_CTX *ctx; | ||
| 108 | |||
| 109 | ctx=(BIO_LINEBUFFER_CTX *)OPENSSL_malloc(sizeof(BIO_LINEBUFFER_CTX)); | ||
| 110 | if (ctx == NULL) return(0); | ||
| 111 | ctx->obuf=(char *)OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE); | ||
| 112 | if (ctx->obuf == NULL) { OPENSSL_free(ctx); return(0); } | ||
| 113 | ctx->obuf_size=DEFAULT_LINEBUFFER_SIZE; | ||
| 114 | ctx->obuf_len=0; | ||
| 115 | |||
| 116 | bi->init=1; | ||
| 117 | bi->ptr=(char *)ctx; | ||
| 118 | bi->flags=0; | ||
| 119 | return(1); | ||
| 120 | } | ||
| 121 | |||
| 122 | static int linebuffer_free(BIO *a) | ||
| 123 | { | ||
| 124 | BIO_LINEBUFFER_CTX *b; | ||
| 125 | |||
| 126 | if (a == NULL) return(0); | ||
| 127 | b=(BIO_LINEBUFFER_CTX *)a->ptr; | ||
| 128 | if (b->obuf != NULL) OPENSSL_free(b->obuf); | ||
| 129 | OPENSSL_free(a->ptr); | ||
| 130 | a->ptr=NULL; | ||
| 131 | a->init=0; | ||
| 132 | a->flags=0; | ||
| 133 | return(1); | ||
| 134 | } | ||
| 135 | |||
| 136 | static int linebuffer_read(BIO *b, char *out, int outl) | ||
| 137 | { | ||
| 138 | int ret=0; | ||
| 139 | |||
| 140 | if (out == NULL) return(0); | ||
| 141 | if (b->next_bio == NULL) return(0); | ||
| 142 | ret=BIO_read(b->next_bio,out,outl); | ||
| 143 | BIO_clear_retry_flags(b); | ||
| 144 | BIO_copy_next_retry(b); | ||
| 145 | return(ret); | ||
| 146 | } | ||
| 147 | |||
| 148 | static int linebuffer_write(BIO *b, const char *in, int inl) | ||
| 149 | { | ||
| 150 | int i,num=0,foundnl; | ||
| 151 | BIO_LINEBUFFER_CTX *ctx; | ||
| 152 | |||
| 153 | if ((in == NULL) || (inl <= 0)) return(0); | ||
| 154 | ctx=(BIO_LINEBUFFER_CTX *)b->ptr; | ||
| 155 | if ((ctx == NULL) || (b->next_bio == NULL)) return(0); | ||
| 156 | |||
| 157 | BIO_clear_retry_flags(b); | ||
| 158 | |||
| 159 | do | ||
| 160 | { | ||
| 161 | const char *p; | ||
| 162 | |||
| 163 | for(p = in; p < in + inl && *p != '\n'; p++) | ||
| 164 | ; | ||
| 165 | if (*p == '\n') | ||
| 166 | { | ||
| 167 | p++; | ||
| 168 | foundnl = 1; | ||
| 169 | } | ||
| 170 | else | ||
| 171 | foundnl = 0; | ||
| 172 | |||
| 173 | /* If a NL was found and we already have text in the save | ||
| 174 | buffer, concatenate them and write */ | ||
| 175 | while ((foundnl || p - in > ctx->obuf_size - ctx->obuf_len) | ||
| 176 | && ctx->obuf_len > 0) | ||
| 177 | { | ||
| 178 | int orig_olen = ctx->obuf_len; | ||
| 179 | |||
| 180 | i = ctx->obuf_size - ctx->obuf_len; | ||
| 181 | if (p - in > 0) | ||
| 182 | { | ||
| 183 | if (i >= p - in) | ||
| 184 | { | ||
| 185 | memcpy(&(ctx->obuf[ctx->obuf_len]), | ||
| 186 | in,p - in); | ||
| 187 | ctx->obuf_len += p - in; | ||
| 188 | inl -= p - in; | ||
| 189 | num += p - in; | ||
| 190 | in = p; | ||
| 191 | } | ||
| 192 | else | ||
| 193 | { | ||
| 194 | memcpy(&(ctx->obuf[ctx->obuf_len]), | ||
| 195 | in,i); | ||
| 196 | ctx->obuf_len += i; | ||
| 197 | inl -= i; | ||
| 198 | in += i; | ||
| 199 | num += i; | ||
| 200 | } | ||
| 201 | } | ||
| 202 | |||
| 203 | #ifdef DEBUG | ||
| 204 | BIO_write(b->next_bio, "<*<", 3); | ||
| 205 | #endif | ||
| 206 | i=BIO_write(b->next_bio, | ||
| 207 | ctx->obuf, ctx->obuf_len); | ||
| 208 | if (i <= 0) | ||
| 209 | { | ||
| 210 | ctx->obuf_len = orig_olen; | ||
| 211 | BIO_copy_next_retry(b); | ||
| 212 | |||
| 213 | #ifdef DEBUG | ||
| 214 | BIO_write(b->next_bio, ">*>", 3); | ||
| 215 | #endif | ||
| 216 | if (i < 0) return((num > 0)?num:i); | ||
| 217 | if (i == 0) return(num); | ||
| 218 | } | ||
| 219 | #ifdef DEBUG | ||
| 220 | BIO_write(b->next_bio, ">*>", 3); | ||
| 221 | #endif | ||
| 222 | if (i < ctx->obuf_len) | ||
| 223 | memmove(ctx->obuf, ctx->obuf + i, | ||
| 224 | ctx->obuf_len - i); | ||
| 225 | ctx->obuf_len-=i; | ||
| 226 | } | ||
| 227 | |||
| 228 | /* Now that the save buffer is emptied, let's write the input | ||
| 229 | buffer if a NL was found and there is anything to write. */ | ||
| 230 | if ((foundnl || p - in > ctx->obuf_size) && p - in > 0) | ||
| 231 | { | ||
| 232 | #ifdef DEBUG | ||
| 233 | BIO_write(b->next_bio, "<*<", 3); | ||
| 234 | #endif | ||
| 235 | i=BIO_write(b->next_bio,in,p - in); | ||
| 236 | if (i <= 0) | ||
| 237 | { | ||
| 238 | BIO_copy_next_retry(b); | ||
| 239 | #ifdef DEBUG | ||
| 240 | BIO_write(b->next_bio, ">*>", 3); | ||
| 241 | #endif | ||
| 242 | if (i < 0) return((num > 0)?num:i); | ||
| 243 | if (i == 0) return(num); | ||
| 244 | } | ||
| 245 | #ifdef DEBUG | ||
| 246 | BIO_write(b->next_bio, ">*>", 3); | ||
| 247 | #endif | ||
| 248 | num+=i; | ||
| 249 | in+=i; | ||
| 250 | inl-=i; | ||
| 251 | } | ||
| 252 | } | ||
| 253 | while(foundnl && inl > 0); | ||
| 254 | /* We've written as much as we can. The rest of the input buffer, if | ||
| 255 | any, is text that doesn't and with a NL and therefore needs to be | ||
| 256 | saved for the next trip. */ | ||
| 257 | if (inl > 0) | ||
| 258 | { | ||
| 259 | memcpy(&(ctx->obuf[ctx->obuf_len]), in, inl); | ||
| 260 | ctx->obuf_len += inl; | ||
| 261 | num += inl; | ||
| 262 | } | ||
| 263 | return num; | ||
| 264 | } | ||
| 265 | |||
| 266 | static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) | ||
| 267 | { | ||
| 268 | BIO *dbio; | ||
| 269 | BIO_LINEBUFFER_CTX *ctx; | ||
| 270 | long ret=1; | ||
| 271 | char *p; | ||
| 272 | int r; | ||
| 273 | int obs; | ||
| 274 | |||
| 275 | ctx=(BIO_LINEBUFFER_CTX *)b->ptr; | ||
| 276 | |||
| 277 | switch (cmd) | ||
| 278 | { | ||
| 279 | case BIO_CTRL_RESET: | ||
| 280 | ctx->obuf_len=0; | ||
| 281 | if (b->next_bio == NULL) return(0); | ||
| 282 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 283 | break; | ||
| 284 | case BIO_CTRL_INFO: | ||
| 285 | ret=(long)ctx->obuf_len; | ||
| 286 | break; | ||
| 287 | case BIO_CTRL_WPENDING: | ||
| 288 | ret=(long)ctx->obuf_len; | ||
| 289 | if (ret == 0) | ||
| 290 | { | ||
| 291 | if (b->next_bio == NULL) return(0); | ||
| 292 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 293 | } | ||
| 294 | break; | ||
| 295 | case BIO_C_SET_BUFF_SIZE: | ||
| 296 | obs=(int)num; | ||
| 297 | p=ctx->obuf; | ||
| 298 | if ((obs > DEFAULT_LINEBUFFER_SIZE) && (obs != ctx->obuf_size)) | ||
| 299 | { | ||
| 300 | p=(char *)OPENSSL_malloc((int)num); | ||
| 301 | if (p == NULL) | ||
| 302 | goto malloc_error; | ||
| 303 | } | ||
| 304 | if (ctx->obuf != p) | ||
| 305 | { | ||
| 306 | if (ctx->obuf_len > obs) | ||
| 307 | { | ||
| 308 | ctx->obuf_len = obs; | ||
| 309 | } | ||
| 310 | memcpy(p, ctx->obuf, ctx->obuf_len); | ||
| 311 | OPENSSL_free(ctx->obuf); | ||
| 312 | ctx->obuf=p; | ||
| 313 | ctx->obuf_size=obs; | ||
| 314 | } | ||
| 315 | break; | ||
| 316 | case BIO_C_DO_STATE_MACHINE: | ||
| 317 | if (b->next_bio == NULL) return(0); | ||
| 318 | BIO_clear_retry_flags(b); | ||
| 319 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 320 | BIO_copy_next_retry(b); | ||
| 321 | break; | ||
| 322 | |||
| 323 | case BIO_CTRL_FLUSH: | ||
| 324 | if (b->next_bio == NULL) return(0); | ||
| 325 | if (ctx->obuf_len <= 0) | ||
| 326 | { | ||
| 327 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 328 | break; | ||
| 329 | } | ||
| 330 | |||
| 331 | for (;;) | ||
| 332 | { | ||
| 333 | BIO_clear_retry_flags(b); | ||
| 334 | if (ctx->obuf_len > 0) | ||
| 335 | { | ||
| 336 | r=BIO_write(b->next_bio, | ||
| 337 | ctx->obuf, ctx->obuf_len); | ||
| 338 | #if 0 | ||
| 339 | fprintf(stderr,"FLUSH %3d -> %3d\n",ctx->obuf_len,r); | ||
| 340 | #endif | ||
| 341 | BIO_copy_next_retry(b); | ||
| 342 | if (r <= 0) return((long)r); | ||
| 343 | if (r < ctx->obuf_len) | ||
| 344 | memmove(ctx->obuf, ctx->obuf + r, | ||
| 345 | ctx->obuf_len - r); | ||
| 346 | ctx->obuf_len-=r; | ||
| 347 | } | ||
| 348 | else | ||
| 349 | { | ||
| 350 | ctx->obuf_len=0; | ||
| 351 | ret=1; | ||
| 352 | break; | ||
| 353 | } | ||
| 354 | } | ||
| 355 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 356 | break; | ||
| 357 | case BIO_CTRL_DUP: | ||
| 358 | dbio=(BIO *)ptr; | ||
| 359 | if ( !BIO_set_write_buffer_size(dbio,ctx->obuf_size)) | ||
| 360 | ret=0; | ||
| 361 | break; | ||
| 362 | default: | ||
| 363 | if (b->next_bio == NULL) return(0); | ||
| 364 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 365 | break; | ||
| 366 | } | ||
| 367 | return(ret); | ||
| 368 | malloc_error: | ||
| 369 | BIOerr(BIO_F_LINEBUFFER_CTRL,ERR_R_MALLOC_FAILURE); | ||
| 370 | return(0); | ||
| 371 | } | ||
| 372 | |||
| 373 | static long linebuffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) | ||
| 374 | { | ||
| 375 | long ret=1; | ||
| 376 | |||
| 377 | if (b->next_bio == NULL) return(0); | ||
| 378 | switch (cmd) | ||
| 379 | { | ||
| 380 | default: | ||
| 381 | ret=BIO_callback_ctrl(b->next_bio,cmd,fp); | ||
| 382 | break; | ||
| 383 | } | ||
| 384 | return(ret); | ||
| 385 | } | ||
| 386 | |||
| 387 | static int linebuffer_gets(BIO *b, char *buf, int size) | ||
| 388 | { | ||
| 389 | if (b->next_bio == NULL) return(0); | ||
| 390 | return(BIO_gets(b->next_bio,buf,size)); | ||
| 391 | } | ||
| 392 | |||
| 393 | static int linebuffer_puts(BIO *b, const char *str) | ||
| 394 | { | ||
| 395 | return(linebuffer_write(b,str,strlen(str))); | ||
| 396 | } | ||
| 397 | |||
diff --git a/src/lib/libssl/src/crypto/bio/bf_nbio.c b/src/lib/libssl/src/crypto/bio/bf_nbio.c index 5e574b7231..413ef5c4c5 100644 --- a/src/lib/libssl/src/crypto/bio/bf_nbio.c +++ b/src/lib/libssl/src/crypto/bio/bf_nbio.c | |||
| @@ -66,14 +66,14 @@ | |||
| 66 | /* BIO_put and BIO_get both add to the digest, | 66 | /* BIO_put and BIO_get both add to the digest, |
| 67 | * BIO_gets returns the digest */ | 67 | * BIO_gets returns the digest */ |
| 68 | 68 | ||
| 69 | static int nbiof_write(BIO *h,char *buf,int num); | 69 | static int nbiof_write(BIO *h,const char *buf,int num); |
| 70 | static int nbiof_read(BIO *h,char *buf,int size); | 70 | static int nbiof_read(BIO *h,char *buf,int size); |
| 71 | static int nbiof_puts(BIO *h,char *str); | 71 | static int nbiof_puts(BIO *h,const char *str); |
| 72 | static int nbiof_gets(BIO *h,char *str,int size); | 72 | static int nbiof_gets(BIO *h,char *str,int size); |
| 73 | static long nbiof_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 73 | static long nbiof_ctrl(BIO *h,int cmd,long arg1,void *arg2); |
| 74 | static int nbiof_new(BIO *h); | 74 | static int nbiof_new(BIO *h); |
| 75 | static int nbiof_free(BIO *data); | 75 | static int nbiof_free(BIO *data); |
| 76 | static long nbiof_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 76 | static long nbiof_callback_ctrl(BIO *h,int cmd,bio_info_cb *fp); |
| 77 | typedef struct nbio_test_st | 77 | typedef struct nbio_test_st |
| 78 | { | 78 | { |
| 79 | /* only set if we sent a 'should retry' error */ | 79 | /* only set if we sent a 'should retry' error */ |
| @@ -104,7 +104,7 @@ static int nbiof_new(BIO *bi) | |||
| 104 | { | 104 | { |
| 105 | NBIO_TEST *nt; | 105 | NBIO_TEST *nt; |
| 106 | 106 | ||
| 107 | nt=(NBIO_TEST *)Malloc(sizeof(NBIO_TEST)); | 107 | nt=(NBIO_TEST *)OPENSSL_malloc(sizeof(NBIO_TEST)); |
| 108 | nt->lrn= -1; | 108 | nt->lrn= -1; |
| 109 | nt->lwn= -1; | 109 | nt->lwn= -1; |
| 110 | bi->ptr=(char *)nt; | 110 | bi->ptr=(char *)nt; |
| @@ -117,7 +117,7 @@ static int nbiof_free(BIO *a) | |||
| 117 | { | 117 | { |
| 118 | if (a == NULL) return(0); | 118 | if (a == NULL) return(0); |
| 119 | if (a->ptr != NULL) | 119 | if (a->ptr != NULL) |
| 120 | Free(a->ptr); | 120 | OPENSSL_free(a->ptr); |
| 121 | a->ptr=NULL; | 121 | a->ptr=NULL; |
| 122 | a->init=0; | 122 | a->init=0; |
| 123 | a->flags=0; | 123 | a->flags=0; |
| @@ -159,7 +159,7 @@ static int nbiof_read(BIO *b, char *out, int outl) | |||
| 159 | return(ret); | 159 | return(ret); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | static int nbiof_write(BIO *b, char *in, int inl) | 162 | static int nbiof_write(BIO *b, const char *in, int inl) |
| 163 | { | 163 | { |
| 164 | NBIO_TEST *nt; | 164 | NBIO_TEST *nt; |
| 165 | int ret=0; | 165 | int ret=0; |
| @@ -204,7 +204,7 @@ static int nbiof_write(BIO *b, char *in, int inl) | |||
| 204 | return(ret); | 204 | return(ret); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | static long nbiof_ctrl(BIO *b, int cmd, long num, char *ptr) | 207 | static long nbiof_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 208 | { | 208 | { |
| 209 | long ret; | 209 | long ret; |
| 210 | 210 | ||
| @@ -226,7 +226,7 @@ static long nbiof_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 226 | return(ret); | 226 | return(ret); |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | static long nbiof_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 229 | static long nbiof_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 230 | { | 230 | { |
| 231 | long ret=1; | 231 | long ret=1; |
| 232 | 232 | ||
| @@ -247,7 +247,7 @@ static int nbiof_gets(BIO *bp, char *buf, int size) | |||
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | 249 | ||
| 250 | static int nbiof_puts(BIO *bp, char *str) | 250 | static int nbiof_puts(BIO *bp, const char *str) |
| 251 | { | 251 | { |
| 252 | if (bp->next_bio == NULL) return(0); | 252 | if (bp->next_bio == NULL) return(0); |
| 253 | return(BIO_puts(bp->next_bio,str)); | 253 | return(BIO_puts(bp->next_bio,str)); |
diff --git a/src/lib/libssl/src/crypto/bio/bf_null.c b/src/lib/libssl/src/crypto/bio/bf_null.c index 0d183a6d9a..2678a1a85d 100644 --- a/src/lib/libssl/src/crypto/bio/bf_null.c +++ b/src/lib/libssl/src/crypto/bio/bf_null.c | |||
| @@ -65,14 +65,14 @@ | |||
| 65 | /* BIO_put and BIO_get both add to the digest, | 65 | /* BIO_put and BIO_get both add to the digest, |
| 66 | * BIO_gets returns the digest */ | 66 | * BIO_gets returns the digest */ |
| 67 | 67 | ||
| 68 | static int nullf_write(BIO *h,char *buf,int num); | 68 | static int nullf_write(BIO *h, const char *buf, int num); |
| 69 | static int nullf_read(BIO *h,char *buf,int size); | 69 | static int nullf_read(BIO *h, char *buf, int size); |
| 70 | static int nullf_puts(BIO *h,char *str); | 70 | static int nullf_puts(BIO *h, const char *str); |
| 71 | static int nullf_gets(BIO *h,char *str,int size); | 71 | static int nullf_gets(BIO *h, char *str, int size); |
| 72 | static long nullf_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 72 | static long nullf_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 73 | static int nullf_new(BIO *h); | 73 | static int nullf_new(BIO *h); |
| 74 | static int nullf_free(BIO *data); | 74 | static int nullf_free(BIO *data); |
| 75 | static long nullf_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 75 | static long nullf_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); |
| 76 | static BIO_METHOD methods_nullf= | 76 | static BIO_METHOD methods_nullf= |
| 77 | { | 77 | { |
| 78 | BIO_TYPE_NULL_FILTER, | 78 | BIO_TYPE_NULL_FILTER, |
| @@ -121,7 +121,7 @@ static int nullf_read(BIO *b, char *out, int outl) | |||
| 121 | return(ret); | 121 | return(ret); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | static int nullf_write(BIO *b, char *in, int inl) | 124 | static int nullf_write(BIO *b, const char *in, int inl) |
| 125 | { | 125 | { |
| 126 | int ret=0; | 126 | int ret=0; |
| 127 | 127 | ||
| @@ -133,7 +133,7 @@ static int nullf_write(BIO *b, char *in, int inl) | |||
| 133 | return(ret); | 133 | return(ret); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | static long nullf_ctrl(BIO *b, int cmd, long num, char *ptr) | 136 | static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 137 | { | 137 | { |
| 138 | long ret; | 138 | long ret; |
| 139 | 139 | ||
| @@ -154,7 +154,7 @@ static long nullf_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 154 | return(ret); | 154 | return(ret); |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | static long nullf_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 157 | static long nullf_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 158 | { | 158 | { |
| 159 | long ret=1; | 159 | long ret=1; |
| 160 | 160 | ||
| @@ -175,7 +175,7 @@ static int nullf_gets(BIO *bp, char *buf, int size) | |||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | 177 | ||
| 178 | static int nullf_puts(BIO *bp, char *str) | 178 | static int nullf_puts(BIO *bp, const char *str) |
| 179 | { | 179 | { |
| 180 | if (bp->next_bio == NULL) return(0); | 180 | if (bp->next_bio == NULL) return(0); |
| 181 | return(BIO_puts(bp->next_bio,str)); | 181 | return(BIO_puts(bp->next_bio,str)); |
diff --git a/src/lib/libssl/src/crypto/bio/bio.h b/src/lib/libssl/src/crypto/bio/bio.h index ebdb18170b..97003b503c 100644 --- a/src/lib/libssl/src/crypto/bio/bio.h +++ b/src/lib/libssl/src/crypto/bio/bio.h | |||
| @@ -59,14 +59,17 @@ | |||
| 59 | #ifndef HEADER_BIO_H | 59 | #ifndef HEADER_BIO_H |
| 60 | #define HEADER_BIO_H | 60 | #define HEADER_BIO_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | 62 | #ifndef NO_FP_API |
| 63 | extern "C" { | 63 | # include <stdio.h> |
| 64 | #endif | 64 | #endif |
| 65 | #include <stdarg.h> | ||
| 65 | 66 | ||
| 66 | #include <stdio.h> | ||
| 67 | #include <stdlib.h> | ||
| 68 | #include <openssl/crypto.h> | 67 | #include <openssl/crypto.h> |
| 69 | 68 | ||
| 69 | #ifdef __cplusplus | ||
| 70 | extern "C" { | ||
| 71 | #endif | ||
| 72 | |||
| 70 | /* These are the 'types' of BIOs */ | 73 | /* These are the 'types' of BIOs */ |
| 71 | #define BIO_TYPE_NONE 0 | 74 | #define BIO_TYPE_NONE 0 |
| 72 | #define BIO_TYPE_MEM (1|0x0400) | 75 | #define BIO_TYPE_MEM (1|0x0400) |
| @@ -88,6 +91,7 @@ extern "C" { | |||
| 88 | #define BIO_TYPE_NULL_FILTER (17|0x0200) | 91 | #define BIO_TYPE_NULL_FILTER (17|0x0200) |
| 89 | #define BIO_TYPE_BER (18|0x0200) /* BER -> bin filter */ | 92 | #define BIO_TYPE_BER (18|0x0200) /* BER -> bin filter */ |
| 90 | #define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */ | 93 | #define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */ |
| 94 | #define BIO_TYPE_LINEBUFFER (20|0x0200) /* filter */ | ||
| 91 | 95 | ||
| 92 | #define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */ | 96 | #define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */ |
| 93 | #define BIO_TYPE_FILTER 0x0200 | 97 | #define BIO_TYPE_FILTER 0x0200 |
| @@ -207,19 +211,23 @@ extern "C" { | |||
| 207 | #define BIO_method_name(b) ((b)->method->name) | 211 | #define BIO_method_name(b) ((b)->method->name) |
| 208 | #define BIO_method_type(b) ((b)->method->type) | 212 | #define BIO_method_type(b) ((b)->method->type) |
| 209 | 213 | ||
| 214 | typedef struct bio_st BIO; | ||
| 215 | |||
| 216 | typedef void bio_info_cb(struct bio_st *, int, const char *, int, long, long); | ||
| 217 | |||
| 210 | #ifndef WIN16 | 218 | #ifndef WIN16 |
| 211 | typedef struct bio_method_st | 219 | typedef struct bio_method_st |
| 212 | { | 220 | { |
| 213 | int type; | 221 | int type; |
| 214 | const char *name; | 222 | const char *name; |
| 215 | int (*bwrite)(); | 223 | int (*bwrite)(BIO *, const char *, int); |
| 216 | int (*bread)(); | 224 | int (*bread)(BIO *, char *, int); |
| 217 | int (*bputs)(); | 225 | int (*bputs)(BIO *, const char *); |
| 218 | int (*bgets)(); | 226 | int (*bgets)(BIO *, char *, int); |
| 219 | long (*ctrl)(); | 227 | long (*ctrl)(BIO *, int, long, void *); |
| 220 | int (*create)(); | 228 | int (*create)(BIO *); |
| 221 | int (*destroy)(); | 229 | int (*destroy)(BIO *); |
| 222 | long (*callback_ctrl)(); | 230 | long (*callback_ctrl)(BIO *, int, bio_info_cb *); |
| 223 | } BIO_METHOD; | 231 | } BIO_METHOD; |
| 224 | #else | 232 | #else |
| 225 | typedef struct bio_method_st | 233 | typedef struct bio_method_st |
| @@ -237,7 +245,7 @@ typedef struct bio_method_st | |||
| 237 | } BIO_METHOD; | 245 | } BIO_METHOD; |
| 238 | #endif | 246 | #endif |
| 239 | 247 | ||
| 240 | typedef struct bio_st | 248 | struct bio_st |
| 241 | { | 249 | { |
| 242 | BIO_METHOD *method; | 250 | BIO_METHOD *method; |
| 243 | /* bio, mode, argp, argi, argl, ret */ | 251 | /* bio, mode, argp, argi, argl, ret */ |
| @@ -257,7 +265,9 @@ typedef struct bio_st | |||
| 257 | unsigned long num_write; | 265 | unsigned long num_write; |
| 258 | 266 | ||
| 259 | CRYPTO_EX_DATA ex_data; | 267 | CRYPTO_EX_DATA ex_data; |
| 260 | } BIO; | 268 | }; |
| 269 | |||
| 270 | DECLARE_STACK_OF(BIO) | ||
| 261 | 271 | ||
| 262 | typedef struct bio_f_buffer_ctx_struct | 272 | typedef struct bio_f_buffer_ctx_struct |
| 263 | { | 273 | { |
| @@ -454,8 +464,8 @@ int BIO_read_filename(BIO *b,const char *name); | |||
| 454 | size_t BIO_ctrl_pending(BIO *b); | 464 | size_t BIO_ctrl_pending(BIO *b); |
| 455 | size_t BIO_ctrl_wpending(BIO *b); | 465 | size_t BIO_ctrl_wpending(BIO *b); |
| 456 | #define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) | 466 | #define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) |
| 457 | #define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0,(void (**)())(cbp)) | 467 | #define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0,(bio_info_cb **)(cbp)) |
| 458 | #define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,(void (*)())(cb)) | 468 | #define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,(bio_info_cb *)(cb)) |
| 459 | 469 | ||
| 460 | /* For the BIO_f_buffer() type */ | 470 | /* For the BIO_f_buffer() type */ |
| 461 | #define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) | 471 | #define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) |
| @@ -465,6 +475,7 @@ size_t BIO_ctrl_wpending(BIO *b); | |||
| 465 | #define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL) | 475 | #define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL) |
| 466 | #define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2) | 476 | #define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2) |
| 467 | #define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL) | 477 | #define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL) |
| 478 | #define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL) | ||
| 468 | /* macros with inappropriate type -- but ...pending macros use int too: */ | 479 | /* macros with inappropriate type -- but ...pending macros use int too: */ |
| 469 | #define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL) | 480 | #define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL) |
| 470 | #define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL) | 481 | #define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL) |
| @@ -472,11 +483,6 @@ size_t BIO_ctrl_get_write_guarantee(BIO *b); | |||
| 472 | size_t BIO_ctrl_get_read_request(BIO *b); | 483 | size_t BIO_ctrl_get_read_request(BIO *b); |
| 473 | int BIO_ctrl_reset_read_request(BIO *b); | 484 | int BIO_ctrl_reset_read_request(BIO *b); |
| 474 | 485 | ||
| 475 | #ifdef NO_STDIO | ||
| 476 | #define NO_FP_API | ||
| 477 | #endif | ||
| 478 | |||
| 479 | |||
| 480 | /* These two aren't currently implemented */ | 486 | /* These two aren't currently implemented */ |
| 481 | /* int BIO_get_ex_num(BIO *bio); */ | 487 | /* int BIO_get_ex_num(BIO *bio); */ |
| 482 | /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */ | 488 | /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */ |
| @@ -487,6 +493,7 @@ int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | |||
| 487 | unsigned long BIO_number_read(BIO *bio); | 493 | unsigned long BIO_number_read(BIO *bio); |
| 488 | unsigned long BIO_number_written(BIO *bio); | 494 | unsigned long BIO_number_written(BIO *bio); |
| 489 | 495 | ||
| 496 | # ifndef NO_FP_API | ||
| 490 | # if defined(WIN16) && defined(_WINDLL) | 497 | # if defined(WIN16) && defined(_WINDLL) |
| 491 | BIO_METHOD *BIO_s_file_internal(void); | 498 | BIO_METHOD *BIO_s_file_internal(void); |
| 492 | BIO *BIO_new_file_internal(char *filename, char *mode); | 499 | BIO *BIO_new_file_internal(char *filename, char *mode); |
| @@ -502,21 +509,24 @@ BIO *BIO_new_fp(FILE *stream, int close_flag); | |||
| 502 | # define BIO_new_file_internal BIO_new_file | 509 | # define BIO_new_file_internal BIO_new_file |
| 503 | # define BIO_new_fp_internal BIO_s_file | 510 | # define BIO_new_fp_internal BIO_s_file |
| 504 | # endif /* FP_API */ | 511 | # endif /* FP_API */ |
| 512 | # endif | ||
| 505 | BIO * BIO_new(BIO_METHOD *type); | 513 | BIO * BIO_new(BIO_METHOD *type); |
| 506 | int BIO_set(BIO *a,BIO_METHOD *type); | 514 | int BIO_set(BIO *a,BIO_METHOD *type); |
| 507 | int BIO_free(BIO *a); | 515 | int BIO_free(BIO *a); |
| 516 | void BIO_vfree(BIO *a); | ||
| 508 | int BIO_read(BIO *b, void *data, int len); | 517 | int BIO_read(BIO *b, void *data, int len); |
| 509 | int BIO_gets(BIO *bp,char *buf, int size); | 518 | int BIO_gets(BIO *bp,char *buf, int size); |
| 510 | int BIO_write(BIO *b, const void *data, int len); | 519 | int BIO_write(BIO *b, const void *data, int len); |
| 511 | int BIO_puts(BIO *bp,const char *buf); | 520 | int BIO_puts(BIO *bp,const char *buf); |
| 512 | long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg); | 521 | long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg); |
| 513 | long BIO_callback_ctrl(BIO *bp,int cmd,void (*fp)()); | 522 | long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, long)); |
| 514 | char * BIO_ptr_ctrl(BIO *bp,int cmd,long larg); | 523 | char * BIO_ptr_ctrl(BIO *bp,int cmd,long larg); |
| 515 | long BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg); | 524 | long BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg); |
| 516 | BIO * BIO_push(BIO *b,BIO *append); | 525 | BIO * BIO_push(BIO *b,BIO *append); |
| 517 | BIO * BIO_pop(BIO *b); | 526 | BIO * BIO_pop(BIO *b); |
| 518 | void BIO_free_all(BIO *a); | 527 | void BIO_free_all(BIO *a); |
| 519 | BIO * BIO_find_type(BIO *b,int bio_type); | 528 | BIO * BIO_find_type(BIO *b,int bio_type); |
| 529 | BIO * BIO_next(BIO *b); | ||
| 520 | BIO * BIO_get_retry_BIO(BIO *bio, int *reason); | 530 | BIO * BIO_get_retry_BIO(BIO *bio, int *reason); |
| 521 | int BIO_get_retry_reason(BIO *bio); | 531 | int BIO_get_retry_reason(BIO *bio); |
| 522 | BIO * BIO_dup_chain(BIO *in); | 532 | BIO * BIO_dup_chain(BIO *in); |
| @@ -545,6 +555,9 @@ BIO_METHOD *BIO_s_bio(void); | |||
| 545 | BIO_METHOD *BIO_s_null(void); | 555 | BIO_METHOD *BIO_s_null(void); |
| 546 | BIO_METHOD *BIO_f_null(void); | 556 | BIO_METHOD *BIO_f_null(void); |
| 547 | BIO_METHOD *BIO_f_buffer(void); | 557 | BIO_METHOD *BIO_f_buffer(void); |
| 558 | #ifdef VMS | ||
| 559 | BIO_METHOD *BIO_f_linebuffer(void); | ||
| 560 | #endif | ||
| 548 | BIO_METHOD *BIO_f_nbio_test(void); | 561 | BIO_METHOD *BIO_f_nbio_test(void); |
| 549 | /* BIO_METHOD *BIO_f_ber(void); */ | 562 | /* BIO_METHOD *BIO_f_ber(void); */ |
| 550 | 563 | ||
| @@ -553,6 +566,7 @@ int BIO_sock_non_fatal_error(int error); | |||
| 553 | int BIO_fd_should_retry(int i); | 566 | int BIO_fd_should_retry(int i); |
| 554 | int BIO_fd_non_fatal_error(int error); | 567 | int BIO_fd_non_fatal_error(int error); |
| 555 | int BIO_dump(BIO *b,const char *bytes,int len); | 568 | int BIO_dump(BIO *b,const char *bytes,int len); |
| 569 | int BIO_dump_indent(BIO *b,const char *bytes,int len,int indent); | ||
| 556 | 570 | ||
| 557 | struct hostent *BIO_gethostbyname(const char *name); | 571 | struct hostent *BIO_gethostbyname(const char *name); |
| 558 | /* We might want a thread-safe interface too: | 572 | /* We might want a thread-safe interface too: |
| @@ -592,7 +606,10 @@ void BIO_copy_next_retry(BIO *b); | |||
| 592 | 606 | ||
| 593 | long BIO_ghbn_ctrl(int cmd,int iarg,char *parg); | 607 | long BIO_ghbn_ctrl(int cmd,int iarg,char *parg); |
| 594 | 608 | ||
| 595 | int BIO_printf(BIO *bio, ...); | 609 | int BIO_printf(BIO *bio, const char *format, ...); |
| 610 | int BIO_vprintf(BIO *bio, const char *format, va_list args); | ||
| 611 | int BIO_snprintf(char *buf, size_t n, const char *format, ...); | ||
| 612 | int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args); | ||
| 596 | 613 | ||
| 597 | /* BEGIN ERROR CODES */ | 614 | /* BEGIN ERROR CODES */ |
| 598 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 615 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
| @@ -627,6 +644,8 @@ int BIO_printf(BIO *bio, ...); | |||
| 627 | #define BIO_F_CONN_CTRL 127 | 644 | #define BIO_F_CONN_CTRL 127 |
| 628 | #define BIO_F_CONN_STATE 115 | 645 | #define BIO_F_CONN_STATE 115 |
| 629 | #define BIO_F_FILE_CTRL 116 | 646 | #define BIO_F_FILE_CTRL 116 |
| 647 | #define BIO_F_LINEBUFFER_CTRL 129 | ||
| 648 | #define BIO_F_MEM_READ 128 | ||
| 630 | #define BIO_F_MEM_WRITE 117 | 649 | #define BIO_F_MEM_WRITE 117 |
| 631 | #define BIO_F_SSL_NEW 118 | 650 | #define BIO_F_SSL_NEW 118 |
| 632 | #define BIO_F_WSASTARTUP 119 | 651 | #define BIO_F_WSASTARTUP 119 |
| @@ -637,6 +656,7 @@ int BIO_printf(BIO *bio, ...); | |||
| 637 | #define BIO_R_BAD_HOSTNAME_LOOKUP 102 | 656 | #define BIO_R_BAD_HOSTNAME_LOOKUP 102 |
| 638 | #define BIO_R_BROKEN_PIPE 124 | 657 | #define BIO_R_BROKEN_PIPE 124 |
| 639 | #define BIO_R_CONNECT_ERROR 103 | 658 | #define BIO_R_CONNECT_ERROR 103 |
| 659 | #define BIO_R_EOF_ON_MEMORY_BIO 127 | ||
| 640 | #define BIO_R_ERROR_SETTING_NBIO 104 | 660 | #define BIO_R_ERROR_SETTING_NBIO 104 |
| 641 | #define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET 105 | 661 | #define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET 105 |
| 642 | #define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET 106 | 662 | #define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET 106 |
diff --git a/src/lib/libssl/src/crypto/bio/bio_err.c b/src/lib/libssl/src/crypto/bio/bio_err.c index f38e7b9178..bb815fb1e6 100644 --- a/src/lib/libssl/src/crypto/bio/bio_err.c +++ b/src/lib/libssl/src/crypto/bio/bio_err.c | |||
| @@ -91,6 +91,8 @@ static ERR_STRING_DATA BIO_str_functs[]= | |||
| 91 | {ERR_PACK(0,BIO_F_CONN_CTRL,0), "CONN_CTRL"}, | 91 | {ERR_PACK(0,BIO_F_CONN_CTRL,0), "CONN_CTRL"}, |
| 92 | {ERR_PACK(0,BIO_F_CONN_STATE,0), "CONN_STATE"}, | 92 | {ERR_PACK(0,BIO_F_CONN_STATE,0), "CONN_STATE"}, |
| 93 | {ERR_PACK(0,BIO_F_FILE_CTRL,0), "FILE_CTRL"}, | 93 | {ERR_PACK(0,BIO_F_FILE_CTRL,0), "FILE_CTRL"}, |
| 94 | {ERR_PACK(0,BIO_F_LINEBUFFER_CTRL,0), "LINEBUFFER_CTRL"}, | ||
| 95 | {ERR_PACK(0,BIO_F_MEM_READ,0), "MEM_READ"}, | ||
| 94 | {ERR_PACK(0,BIO_F_MEM_WRITE,0), "MEM_WRITE"}, | 96 | {ERR_PACK(0,BIO_F_MEM_WRITE,0), "MEM_WRITE"}, |
| 95 | {ERR_PACK(0,BIO_F_SSL_NEW,0), "SSL_new"}, | 97 | {ERR_PACK(0,BIO_F_SSL_NEW,0), "SSL_new"}, |
| 96 | {ERR_PACK(0,BIO_F_WSASTARTUP,0), "WSASTARTUP"}, | 98 | {ERR_PACK(0,BIO_F_WSASTARTUP,0), "WSASTARTUP"}, |
| @@ -104,6 +106,7 @@ static ERR_STRING_DATA BIO_str_reasons[]= | |||
| 104 | {BIO_R_BAD_HOSTNAME_LOOKUP ,"bad hostname lookup"}, | 106 | {BIO_R_BAD_HOSTNAME_LOOKUP ,"bad hostname lookup"}, |
| 105 | {BIO_R_BROKEN_PIPE ,"broken pipe"}, | 107 | {BIO_R_BROKEN_PIPE ,"broken pipe"}, |
| 106 | {BIO_R_CONNECT_ERROR ,"connect error"}, | 108 | {BIO_R_CONNECT_ERROR ,"connect error"}, |
| 109 | {BIO_R_EOF_ON_MEMORY_BIO ,"EOF on memory BIO"}, | ||
| 107 | {BIO_R_ERROR_SETTING_NBIO ,"error setting nbio"}, | 110 | {BIO_R_ERROR_SETTING_NBIO ,"error setting nbio"}, |
| 108 | {BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET,"error setting nbio on accepted socket"}, | 111 | {BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET,"error setting nbio on accepted socket"}, |
| 109 | {BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET,"error setting nbio on accept socket"}, | 112 | {BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET,"error setting nbio on accept socket"}, |
| @@ -124,8 +127,8 @@ static ERR_STRING_DATA BIO_str_reasons[]= | |||
| 124 | {BIO_R_UNABLE_TO_LISTEN_SOCKET ,"unable to listen socket"}, | 127 | {BIO_R_UNABLE_TO_LISTEN_SOCKET ,"unable to listen socket"}, |
| 125 | {BIO_R_UNINITIALIZED ,"uninitialized"}, | 128 | {BIO_R_UNINITIALIZED ,"uninitialized"}, |
| 126 | {BIO_R_UNSUPPORTED_METHOD ,"unsupported method"}, | 129 | {BIO_R_UNSUPPORTED_METHOD ,"unsupported method"}, |
| 127 | {BIO_R_WRITE_TO_READ_ONLY_BIO ,"write to read only bio"}, | 130 | {BIO_R_WRITE_TO_READ_ONLY_BIO ,"write to read only BIO"}, |
| 128 | {BIO_R_WSASTARTUP ,"wsastartup"}, | 131 | {BIO_R_WSASTARTUP ,"WSAStartup"}, |
| 129 | {0,NULL} | 132 | {0,NULL} |
| 130 | }; | 133 | }; |
| 131 | 134 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bio_lib.c b/src/lib/libssl/src/crypto/bio/bio_lib.c index e88dcc80f3..381afc9b8e 100644 --- a/src/lib/libssl/src/crypto/bio/bio_lib.c +++ b/src/lib/libssl/src/crypto/bio/bio_lib.c | |||
| @@ -70,7 +70,7 @@ BIO *BIO_new(BIO_METHOD *method) | |||
| 70 | { | 70 | { |
| 71 | BIO *ret=NULL; | 71 | BIO *ret=NULL; |
| 72 | 72 | ||
| 73 | ret=(BIO *)Malloc(sizeof(BIO)); | 73 | ret=(BIO *)OPENSSL_malloc(sizeof(BIO)); |
| 74 | if (ret == NULL) | 74 | if (ret == NULL) |
| 75 | { | 75 | { |
| 76 | BIOerr(BIO_F_BIO_NEW,ERR_R_MALLOC_FAILURE); | 76 | BIOerr(BIO_F_BIO_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -78,7 +78,7 @@ BIO *BIO_new(BIO_METHOD *method) | |||
| 78 | } | 78 | } |
| 79 | if (!BIO_set(ret,method)) | 79 | if (!BIO_set(ret,method)) |
| 80 | { | 80 | { |
| 81 | Free(ret); | 81 | OPENSSL_free(ret); |
| 82 | ret=NULL; | 82 | ret=NULL; |
| 83 | } | 83 | } |
| 84 | return(ret); | 84 | return(ret); |
| @@ -133,10 +133,13 @@ int BIO_free(BIO *a) | |||
| 133 | 133 | ||
| 134 | if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); | 134 | if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); |
| 135 | ret=a->method->destroy(a); | 135 | ret=a->method->destroy(a); |
| 136 | Free(a); | 136 | OPENSSL_free(a); |
| 137 | return(1); | 137 | return(1); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | void BIO_vfree(BIO *a) | ||
| 141 | { BIO_free(a); } | ||
| 142 | |||
| 140 | int BIO_read(BIO *b, void *out, int outl) | 143 | int BIO_read(BIO *b, void *out, int outl) |
| 141 | { | 144 | { |
| 142 | int i; | 145 | int i; |
| @@ -198,13 +201,7 @@ int BIO_write(BIO *b, const void *in, int inl) | |||
| 198 | 201 | ||
| 199 | if (i > 0) b->num_write+=(unsigned long)i; | 202 | if (i > 0) b->num_write+=(unsigned long)i; |
| 200 | 203 | ||
| 201 | /* This is evil and not thread safe. If the BIO has been freed, | 204 | if (cb != NULL) |
| 202 | * we must not call the callback. The only way to be able to | ||
| 203 | * determine this is the reference count which is now invalid since | ||
| 204 | * the memory has been free()ed. | ||
| 205 | */ | ||
| 206 | if (b->references <= 0) abort(); | ||
| 207 | if (cb != NULL) /* && (b->references >= 1)) */ | ||
| 208 | i=(int)cb(b,BIO_CB_WRITE|BIO_CB_RETURN,in,inl, | 205 | i=(int)cb(b,BIO_CB_WRITE|BIO_CB_RETURN,in,inl, |
| 209 | 0L,(long)i); | 206 | 0L,(long)i); |
| 210 | return(i); | 207 | return(i); |
| @@ -235,6 +232,8 @@ int BIO_puts(BIO *b, const char *in) | |||
| 235 | 232 | ||
| 236 | i=b->method->bputs(b,in); | 233 | i=b->method->bputs(b,in); |
| 237 | 234 | ||
| 235 | if (i > 0) b->num_write+=(unsigned long)i; | ||
| 236 | |||
| 238 | if (cb != NULL) | 237 | if (cb != NULL) |
| 239 | i=(int)cb(b,BIO_CB_PUTS|BIO_CB_RETURN,in,0, | 238 | i=(int)cb(b,BIO_CB_PUTS|BIO_CB_RETURN,in,0, |
| 240 | 0L,(long)i); | 239 | 0L,(long)i); |
| @@ -317,7 +316,7 @@ long BIO_ctrl(BIO *b, int cmd, long larg, void *parg) | |||
| 317 | return(ret); | 316 | return(ret); |
| 318 | } | 317 | } |
| 319 | 318 | ||
| 320 | long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 319 | long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, long)) |
| 321 | { | 320 | { |
| 322 | long ret; | 321 | long ret; |
| 323 | long (*cb)(); | 322 | long (*cb)(); |
| @@ -419,6 +418,7 @@ BIO *BIO_find_type(BIO *bio, int type) | |||
| 419 | { | 418 | { |
| 420 | int mt,mask; | 419 | int mt,mask; |
| 421 | 420 | ||
| 421 | if(!bio) return NULL; | ||
| 422 | mask=type&0xff; | 422 | mask=type&0xff; |
| 423 | do { | 423 | do { |
| 424 | if (bio->method != NULL) | 424 | if (bio->method != NULL) |
| @@ -437,6 +437,12 @@ BIO *BIO_find_type(BIO *bio, int type) | |||
| 437 | return(NULL); | 437 | return(NULL); |
| 438 | } | 438 | } |
| 439 | 439 | ||
| 440 | BIO *BIO_next(BIO *b) | ||
| 441 | { | ||
| 442 | if(!b) return NULL; | ||
| 443 | return b->next_bio; | ||
| 444 | } | ||
| 445 | |||
| 440 | void BIO_free_all(BIO *bio) | 446 | void BIO_free_all(BIO *bio) |
| 441 | { | 447 | { |
| 442 | BIO *b; | 448 | BIO *b; |
| @@ -532,3 +538,5 @@ unsigned long BIO_number_written(BIO *bio) | |||
| 532 | if(bio) return bio->num_write; | 538 | if(bio) return bio->num_write; |
| 533 | return 0; | 539 | return 0; |
| 534 | } | 540 | } |
| 541 | |||
| 542 | IMPLEMENT_STACK_OF(BIO) | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_acpt.c b/src/lib/libssl/src/crypto/bio/bss_acpt.c index 9afa636406..4da5822062 100644 --- a/src/lib/libssl/src/crypto/bio/bss_acpt.c +++ b/src/lib/libssl/src/crypto/bio/bss_acpt.c | |||
| @@ -92,10 +92,10 @@ typedef struct bio_accept_st | |||
| 92 | BIO *bio_chain; | 92 | BIO *bio_chain; |
| 93 | } BIO_ACCEPT; | 93 | } BIO_ACCEPT; |
| 94 | 94 | ||
| 95 | static int acpt_write(BIO *h,char *buf,int num); | 95 | static int acpt_write(BIO *h, const char *buf, int num); |
| 96 | static int acpt_read(BIO *h,char *buf,int size); | 96 | static int acpt_read(BIO *h, char *buf, int size); |
| 97 | static int acpt_puts(BIO *h,char *str); | 97 | static int acpt_puts(BIO *h, const char *str); |
| 98 | static long acpt_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 98 | static long acpt_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 99 | static int acpt_new(BIO *h); | 99 | static int acpt_new(BIO *h); |
| 100 | static int acpt_free(BIO *data); | 100 | static int acpt_free(BIO *data); |
| 101 | static int acpt_state(BIO *b, BIO_ACCEPT *c); | 101 | static int acpt_state(BIO *b, BIO_ACCEPT *c); |
| @@ -145,7 +145,7 @@ BIO_ACCEPT *BIO_ACCEPT_new(void) | |||
| 145 | { | 145 | { |
| 146 | BIO_ACCEPT *ret; | 146 | BIO_ACCEPT *ret; |
| 147 | 147 | ||
| 148 | if ((ret=(BIO_ACCEPT *)Malloc(sizeof(BIO_ACCEPT))) == NULL) | 148 | if ((ret=(BIO_ACCEPT *)OPENSSL_malloc(sizeof(BIO_ACCEPT))) == NULL) |
| 149 | return(NULL); | 149 | return(NULL); |
| 150 | 150 | ||
| 151 | memset(ret,0,sizeof(BIO_ACCEPT)); | 151 | memset(ret,0,sizeof(BIO_ACCEPT)); |
| @@ -159,10 +159,10 @@ void BIO_ACCEPT_free(BIO_ACCEPT *a) | |||
| 159 | if(a == NULL) | 159 | if(a == NULL) |
| 160 | return; | 160 | return; |
| 161 | 161 | ||
| 162 | if (a->param_addr != NULL) Free(a->param_addr); | 162 | if (a->param_addr != NULL) OPENSSL_free(a->param_addr); |
| 163 | if (a->addr != NULL) Free(a->addr); | 163 | if (a->addr != NULL) OPENSSL_free(a->addr); |
| 164 | if (a->bio_chain != NULL) BIO_free(a->bio_chain); | 164 | if (a->bio_chain != NULL) BIO_free(a->bio_chain); |
| 165 | Free(a); | 165 | OPENSSL_free(a); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | static void acpt_close_socket(BIO *bio) | 168 | static void acpt_close_socket(BIO *bio) |
| @@ -307,7 +307,7 @@ static int acpt_read(BIO *b, char *out, int outl) | |||
| 307 | return(ret); | 307 | return(ret); |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | static int acpt_write(BIO *b, char *in, int inl) | 310 | static int acpt_write(BIO *b, const char *in, int inl) |
| 311 | { | 311 | { |
| 312 | int ret; | 312 | int ret; |
| 313 | BIO_ACCEPT *data; | 313 | BIO_ACCEPT *data; |
| @@ -326,7 +326,7 @@ static int acpt_write(BIO *b, char *in, int inl) | |||
| 326 | return(ret); | 326 | return(ret); |
| 327 | } | 327 | } |
| 328 | 328 | ||
| 329 | static long acpt_ctrl(BIO *b, int cmd, long num, char *ptr) | 329 | static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 330 | { | 330 | { |
| 331 | BIO *dbio; | 331 | BIO *dbio; |
| 332 | int *ip; | 332 | int *ip; |
| @@ -355,7 +355,7 @@ static long acpt_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 355 | { | 355 | { |
| 356 | b->init=1; | 356 | b->init=1; |
| 357 | if (data->param_addr != NULL) | 357 | if (data->param_addr != NULL) |
| 358 | Free(data->param_addr); | 358 | OPENSSL_free(data->param_addr); |
| 359 | data->param_addr=BUF_strdup(ptr); | 359 | data->param_addr=BUF_strdup(ptr); |
| 360 | } | 360 | } |
| 361 | else if (num == 1) | 361 | else if (num == 1) |
| @@ -440,7 +440,7 @@ static long acpt_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 440 | return(ret); | 440 | return(ret); |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | static int acpt_puts(BIO *bp, char *str) | 443 | static int acpt_puts(BIO *bp, const char *str) |
| 444 | { | 444 | { |
| 445 | int n,ret; | 445 | int n,ret; |
| 446 | 446 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_bio.c b/src/lib/libssl/src/crypto/bio/bss_bio.c index 1e2d7491f2..78c6ab4fdd 100644 --- a/src/lib/libssl/src/crypto/bio/bss_bio.c +++ b/src/lib/libssl/src/crypto/bio/bss_bio.c | |||
| @@ -30,9 +30,9 @@ | |||
| 30 | static int bio_new(BIO *bio); | 30 | static int bio_new(BIO *bio); |
| 31 | static int bio_free(BIO *bio); | 31 | static int bio_free(BIO *bio); |
| 32 | static int bio_read(BIO *bio, char *buf, int size); | 32 | static int bio_read(BIO *bio, char *buf, int size); |
| 33 | static int bio_write(BIO *bio, char *buf, int num); | 33 | static int bio_write(BIO *bio, const char *buf, int num); |
| 34 | static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr); | 34 | static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr); |
| 35 | static int bio_puts(BIO *bio, char *str); | 35 | static int bio_puts(BIO *bio, const char *str); |
| 36 | 36 | ||
| 37 | static int bio_make_pair(BIO *bio1, BIO *bio2); | 37 | static int bio_make_pair(BIO *bio1, BIO *bio2); |
| 38 | static void bio_destroy_pair(BIO *bio); | 38 | static void bio_destroy_pair(BIO *bio); |
| @@ -80,7 +80,7 @@ static int bio_new(BIO *bio) | |||
| 80 | { | 80 | { |
| 81 | struct bio_bio_st *b; | 81 | struct bio_bio_st *b; |
| 82 | 82 | ||
| 83 | b = Malloc(sizeof *b); | 83 | b = OPENSSL_malloc(sizeof *b); |
| 84 | if (b == NULL) | 84 | if (b == NULL) |
| 85 | return 0; | 85 | return 0; |
| 86 | 86 | ||
| @@ -108,10 +108,10 @@ static int bio_free(BIO *bio) | |||
| 108 | 108 | ||
| 109 | if (b->buf != NULL) | 109 | if (b->buf != NULL) |
| 110 | { | 110 | { |
| 111 | Free(b->buf); | 111 | OPENSSL_free(b->buf); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | Free(b); | 114 | OPENSSL_free(b); |
| 115 | 115 | ||
| 116 | return 1; | 116 | return 1; |
| 117 | } | 117 | } |
| @@ -283,7 +283,7 @@ static ssize_t bio_nread(BIO *bio, char **buf, size_t num_) | |||
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | 285 | ||
| 286 | static int bio_write(BIO *bio, char *buf, int num_) | 286 | static int bio_write(BIO *bio, const char *buf, int num_) |
| 287 | { | 287 | { |
| 288 | size_t num = num_; | 288 | size_t num = num_; |
| 289 | size_t rest; | 289 | size_t rest; |
| @@ -464,7 +464,7 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr) | |||
| 464 | { | 464 | { |
| 465 | if (b->buf) | 465 | if (b->buf) |
| 466 | { | 466 | { |
| 467 | Free(b->buf); | 467 | OPENSSL_free(b->buf); |
| 468 | b->buf = NULL; | 468 | b->buf = NULL; |
| 469 | } | 469 | } |
| 470 | b->size = new_size; | 470 | b->size = new_size; |
| @@ -628,7 +628,7 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr) | |||
| 628 | return ret; | 628 | return ret; |
| 629 | } | 629 | } |
| 630 | 630 | ||
| 631 | static int bio_puts(BIO *bio, char *str) | 631 | static int bio_puts(BIO *bio, const char *str) |
| 632 | { | 632 | { |
| 633 | return bio_write(bio, str, strlen(str)); | 633 | return bio_write(bio, str, strlen(str)); |
| 634 | } | 634 | } |
| @@ -652,7 +652,7 @@ static int bio_make_pair(BIO *bio1, BIO *bio2) | |||
| 652 | 652 | ||
| 653 | if (b1->buf == NULL) | 653 | if (b1->buf == NULL) |
| 654 | { | 654 | { |
| 655 | b1->buf = Malloc(b1->size); | 655 | b1->buf = OPENSSL_malloc(b1->size); |
| 656 | if (b1->buf == NULL) | 656 | if (b1->buf == NULL) |
| 657 | { | 657 | { |
| 658 | BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE); | 658 | BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE); |
| @@ -664,7 +664,7 @@ static int bio_make_pair(BIO *bio1, BIO *bio2) | |||
| 664 | 664 | ||
| 665 | if (b2->buf == NULL) | 665 | if (b2->buf == NULL) |
| 666 | { | 666 | { |
| 667 | b2->buf = Malloc(b2->size); | 667 | b2->buf = OPENSSL_malloc(b2->size); |
| 668 | if (b2->buf == NULL) | 668 | if (b2->buf == NULL) |
| 669 | { | 669 | { |
| 670 | BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE); | 670 | BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE); |
diff --git a/src/lib/libssl/src/crypto/bio/bss_conn.c b/src/lib/libssl/src/crypto/bio/bss_conn.c index 22d00b369e..a6b77a2cb9 100644 --- a/src/lib/libssl/src/crypto/bio/bss_conn.c +++ b/src/lib/libssl/src/crypto/bio/bss_conn.c | |||
| @@ -98,13 +98,13 @@ typedef struct bio_connect_st | |||
| 98 | int (*info_callback)(); | 98 | int (*info_callback)(); |
| 99 | } BIO_CONNECT; | 99 | } BIO_CONNECT; |
| 100 | 100 | ||
| 101 | static int conn_write(BIO *h,char *buf,int num); | 101 | static int conn_write(BIO *h, const char *buf, int num); |
| 102 | static int conn_read(BIO *h,char *buf,int size); | 102 | static int conn_read(BIO *h, char *buf, int size); |
| 103 | static int conn_puts(BIO *h,char *str); | 103 | static int conn_puts(BIO *h, const char *str); |
| 104 | static long conn_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 104 | static long conn_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 105 | static int conn_new(BIO *h); | 105 | static int conn_new(BIO *h); |
| 106 | static int conn_free(BIO *data); | 106 | static int conn_free(BIO *data); |
| 107 | static long conn_callback_ctrl(BIO *h,int cmd,void *(*fp)()); | 107 | static long conn_callback_ctrl(BIO *h, int cmd, bio_info_cb *); |
| 108 | 108 | ||
| 109 | static int conn_state(BIO *b, BIO_CONNECT *c); | 109 | static int conn_state(BIO *b, BIO_CONNECT *c); |
| 110 | static void conn_close_socket(BIO *data); | 110 | static void conn_close_socket(BIO *data); |
| @@ -165,7 +165,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c) | |||
| 165 | break; | 165 | break; |
| 166 | } | 166 | } |
| 167 | if (c->param_port != NULL) | 167 | if (c->param_port != NULL) |
| 168 | Free(c->param_port); | 168 | OPENSSL_free(c->param_port); |
| 169 | c->param_port=BUF_strdup(p); | 169 | c->param_port=BUF_strdup(p); |
| 170 | } | 170 | } |
| 171 | } | 171 | } |
| @@ -188,7 +188,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c) | |||
| 188 | case BIO_CONN_S_GET_PORT: | 188 | case BIO_CONN_S_GET_PORT: |
| 189 | if (c->param_port == NULL) | 189 | if (c->param_port == NULL) |
| 190 | { | 190 | { |
| 191 | abort(); | 191 | /* abort(); */ |
| 192 | goto exit_loop; | 192 | goto exit_loop; |
| 193 | } | 193 | } |
| 194 | else if (BIO_get_port(c->param_port,&c->port) <= 0) | 194 | else if (BIO_get_port(c->param_port,&c->port) <= 0) |
| @@ -236,7 +236,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c) | |||
| 236 | } | 236 | } |
| 237 | c->state=BIO_CONN_S_CONNECT; | 237 | c->state=BIO_CONN_S_CONNECT; |
| 238 | 238 | ||
| 239 | #ifdef SO_KEEPALIVE | 239 | #if defined(SO_KEEPALIVE) && !defined(MPE) |
| 240 | i=1; | 240 | i=1; |
| 241 | i=setsockopt(b->num,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); | 241 | i=setsockopt(b->num,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); |
| 242 | if (i < 0) | 242 | if (i < 0) |
| @@ -299,7 +299,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c) | |||
| 299 | ret=1; | 299 | ret=1; |
| 300 | goto exit_loop; | 300 | goto exit_loop; |
| 301 | default: | 301 | default: |
| 302 | abort(); | 302 | /* abort(); */ |
| 303 | goto exit_loop; | 303 | goto exit_loop; |
| 304 | } | 304 | } |
| 305 | 305 | ||
| @@ -322,7 +322,7 @@ BIO_CONNECT *BIO_CONNECT_new(void) | |||
| 322 | { | 322 | { |
| 323 | BIO_CONNECT *ret; | 323 | BIO_CONNECT *ret; |
| 324 | 324 | ||
| 325 | if ((ret=(BIO_CONNECT *)Malloc(sizeof(BIO_CONNECT))) == NULL) | 325 | if ((ret=(BIO_CONNECT *)OPENSSL_malloc(sizeof(BIO_CONNECT))) == NULL) |
| 326 | return(NULL); | 326 | return(NULL); |
| 327 | ret->state=BIO_CONN_S_BEFORE; | 327 | ret->state=BIO_CONN_S_BEFORE; |
| 328 | ret->param_hostname=NULL; | 328 | ret->param_hostname=NULL; |
| @@ -344,10 +344,10 @@ void BIO_CONNECT_free(BIO_CONNECT *a) | |||
| 344 | return; | 344 | return; |
| 345 | 345 | ||
| 346 | if (a->param_hostname != NULL) | 346 | if (a->param_hostname != NULL) |
| 347 | Free(a->param_hostname); | 347 | OPENSSL_free(a->param_hostname); |
| 348 | if (a->param_port != NULL) | 348 | if (a->param_port != NULL) |
| 349 | Free(a->param_port); | 349 | OPENSSL_free(a->param_port); |
| 350 | Free(a); | 350 | OPENSSL_free(a); |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | BIO_METHOD *BIO_s_connect(void) | 353 | BIO_METHOD *BIO_s_connect(void) |
| @@ -426,7 +426,7 @@ static int conn_read(BIO *b, char *out, int outl) | |||
| 426 | return(ret); | 426 | return(ret); |
| 427 | } | 427 | } |
| 428 | 428 | ||
| 429 | static int conn_write(BIO *b, char *in, int inl) | 429 | static int conn_write(BIO *b, const char *in, int inl) |
| 430 | { | 430 | { |
| 431 | int ret; | 431 | int ret; |
| 432 | BIO_CONNECT *data; | 432 | BIO_CONNECT *data; |
| @@ -449,7 +449,7 @@ static int conn_write(BIO *b, char *in, int inl) | |||
| 449 | return(ret); | 449 | return(ret); |
| 450 | } | 450 | } |
| 451 | 451 | ||
| 452 | static long conn_ctrl(BIO *b, int cmd, long num, char *ptr) | 452 | static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 453 | { | 453 | { |
| 454 | BIO *dbio; | 454 | BIO *dbio; |
| 455 | int *ip; | 455 | int *ip; |
| @@ -507,23 +507,24 @@ static long conn_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 507 | if (num == 0) | 507 | if (num == 0) |
| 508 | { | 508 | { |
| 509 | if (data->param_hostname != NULL) | 509 | if (data->param_hostname != NULL) |
| 510 | Free(data->param_hostname); | 510 | OPENSSL_free(data->param_hostname); |
| 511 | data->param_hostname=BUF_strdup(ptr); | 511 | data->param_hostname=BUF_strdup(ptr); |
| 512 | } | 512 | } |
| 513 | else if (num == 1) | 513 | else if (num == 1) |
| 514 | { | 514 | { |
| 515 | if (data->param_port != NULL) | 515 | if (data->param_port != NULL) |
| 516 | Free(data->param_port); | 516 | OPENSSL_free(data->param_port); |
| 517 | data->param_port=BUF_strdup(ptr); | 517 | data->param_port=BUF_strdup(ptr); |
| 518 | } | 518 | } |
| 519 | else if (num == 2) | 519 | else if (num == 2) |
| 520 | { | 520 | { |
| 521 | char buf[16]; | 521 | char buf[16]; |
| 522 | char *p = ptr; | ||
| 522 | 523 | ||
| 523 | sprintf(buf,"%d.%d.%d.%d", | 524 | sprintf(buf,"%d.%d.%d.%d", |
| 524 | ptr[0],ptr[1],ptr[2],ptr[3]); | 525 | p[0],p[1],p[2],p[3]); |
| 525 | if (data->param_hostname != NULL) | 526 | if (data->param_hostname != NULL) |
| 526 | Free(data->param_hostname); | 527 | OPENSSL_free(data->param_hostname); |
| 527 | data->param_hostname=BUF_strdup(buf); | 528 | data->param_hostname=BUF_strdup(buf); |
| 528 | memcpy(&(data->ip[0]),ptr,4); | 529 | memcpy(&(data->ip[0]),ptr,4); |
| 529 | } | 530 | } |
| @@ -533,7 +534,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 533 | 534 | ||
| 534 | sprintf(buf,"%d",*(int *)ptr); | 535 | sprintf(buf,"%d",*(int *)ptr); |
| 535 | if (data->param_port != NULL) | 536 | if (data->param_port != NULL) |
| 536 | Free(data->param_port); | 537 | OPENSSL_free(data->param_port); |
| 537 | data->param_port=BUF_strdup(buf); | 538 | data->param_port=BUF_strdup(buf); |
| 538 | data->port= *(int *)ptr; | 539 | data->port= *(int *)ptr; |
| 539 | } | 540 | } |
| @@ -573,7 +574,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 573 | if (data->param_hostname) | 574 | if (data->param_hostname) |
| 574 | BIO_set_conn_hostname(dbio,data->param_hostname); | 575 | BIO_set_conn_hostname(dbio,data->param_hostname); |
| 575 | BIO_set_nbio(dbio,data->nbio); | 576 | BIO_set_nbio(dbio,data->nbio); |
| 576 | (void)BIO_set_info_callback(dbio,(void *(*)())(data->info_callback)); | 577 | (void)BIO_set_info_callback(dbio,data->info_callback); |
| 577 | } | 578 | } |
| 578 | break; | 579 | break; |
| 579 | case BIO_CTRL_SET_CALLBACK: | 580 | case BIO_CTRL_SET_CALLBACK: |
| @@ -601,7 +602,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 601 | return(ret); | 602 | return(ret); |
| 602 | } | 603 | } |
| 603 | 604 | ||
| 604 | static long conn_callback_ctrl(BIO *b, int cmd, void *(*fp)()) | 605 | static long conn_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 605 | { | 606 | { |
| 606 | long ret=1; | 607 | long ret=1; |
| 607 | BIO_CONNECT *data; | 608 | BIO_CONNECT *data; |
| @@ -622,7 +623,7 @@ static long conn_callback_ctrl(BIO *b, int cmd, void *(*fp)()) | |||
| 622 | return(ret); | 623 | return(ret); |
| 623 | } | 624 | } |
| 624 | 625 | ||
| 625 | static int conn_puts(BIO *bp, char *str) | 626 | static int conn_puts(BIO *bp, const char *str) |
| 626 | { | 627 | { |
| 627 | int n,ret; | 628 | int n,ret; |
| 628 | 629 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_file.c b/src/lib/libssl/src/crypto/bio/bss_file.c index 0d44dc3889..1f770b390f 100644 --- a/src/lib/libssl/src/crypto/bio/bss_file.c +++ b/src/lib/libssl/src/crypto/bio/bss_file.c | |||
| @@ -73,11 +73,11 @@ | |||
| 73 | 73 | ||
| 74 | #if !defined(NO_STDIO) | 74 | #if !defined(NO_STDIO) |
| 75 | 75 | ||
| 76 | static int MS_CALLBACK file_write(BIO *h,char *buf,int num); | 76 | static int MS_CALLBACK file_write(BIO *h, const char *buf, int num); |
| 77 | static int MS_CALLBACK file_read(BIO *h,char *buf,int size); | 77 | static int MS_CALLBACK file_read(BIO *h, char *buf, int size); |
| 78 | static int MS_CALLBACK file_puts(BIO *h,char *str); | 78 | static int MS_CALLBACK file_puts(BIO *h, const char *str); |
| 79 | static int MS_CALLBACK file_gets(BIO *h,char *str,int size); | 79 | static int MS_CALLBACK file_gets(BIO *h, char *str, int size); |
| 80 | static long MS_CALLBACK file_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 80 | static long MS_CALLBACK file_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 81 | static int MS_CALLBACK file_new(BIO *h); | 81 | static int MS_CALLBACK file_new(BIO *h); |
| 82 | static int MS_CALLBACK file_free(BIO *data); | 82 | static int MS_CALLBACK file_free(BIO *data); |
| 83 | static BIO_METHOD methods_filep= | 83 | static BIO_METHOD methods_filep= |
| @@ -163,7 +163,7 @@ static int MS_CALLBACK file_read(BIO *b, char *out, int outl) | |||
| 163 | return(ret); | 163 | return(ret); |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | static int MS_CALLBACK file_write(BIO *b, char *in, int inl) | 166 | static int MS_CALLBACK file_write(BIO *b, const char *in, int inl) |
| 167 | { | 167 | { |
| 168 | int ret=0; | 168 | int ret=0; |
| 169 | 169 | ||
| @@ -179,7 +179,7 @@ static int MS_CALLBACK file_write(BIO *b, char *in, int inl) | |||
| 179 | return(ret); | 179 | return(ret); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, char *ptr) | 182 | static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 183 | { | 183 | { |
| 184 | long ret=1; | 184 | long ret=1; |
| 185 | FILE *fp=(FILE *)b->ptr; | 185 | FILE *fp=(FILE *)b->ptr; |
| @@ -294,7 +294,7 @@ static int MS_CALLBACK file_gets(BIO *bp, char *buf, int size) | |||
| 294 | return(ret); | 294 | return(ret); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | static int MS_CALLBACK file_puts(BIO *bp, char *str) | 297 | static int MS_CALLBACK file_puts(BIO *bp, const char *str) |
| 298 | { | 298 | { |
| 299 | int n,ret; | 299 | int n,ret; |
| 300 | 300 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_log.c b/src/lib/libssl/src/crypto/bio/bss_log.c index 497eb1af72..1edf16a76f 100644 --- a/src/lib/libssl/src/crypto/bio/bss_log.c +++ b/src/lib/libssl/src/crypto/bio/bss_log.c | |||
| @@ -110,14 +110,26 @@ | |||
| 110 | #define LOG_DAEMON OPC$M_NM_NTWORK | 110 | #define LOG_DAEMON OPC$M_NM_NTWORK |
| 111 | #endif | 111 | #endif |
| 112 | 112 | ||
| 113 | static int MS_CALLBACK slg_write(BIO *h,char *buf,int num); | 113 | static int MS_CALLBACK slg_write(BIO *h, const char *buf, int num); |
| 114 | static int MS_CALLBACK slg_puts(BIO *h,char *str); | 114 | static int MS_CALLBACK slg_puts(BIO *h, const char *str); |
| 115 | static long MS_CALLBACK slg_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 115 | static long MS_CALLBACK slg_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 116 | static int MS_CALLBACK slg_new(BIO *h); | 116 | static int MS_CALLBACK slg_new(BIO *h); |
| 117 | static int MS_CALLBACK slg_free(BIO *data); | 117 | static int MS_CALLBACK slg_free(BIO *data); |
| 118 | static void xopenlog(BIO* bp, const char* name, int level); | 118 | static void xopenlog(BIO* bp, char* name, int level); |
| 119 | static void xsyslog(BIO* bp, int priority, const char* string); | 119 | static void xsyslog(BIO* bp, int priority, const char* string); |
| 120 | static void xcloselog(BIO* bp); | 120 | static void xcloselog(BIO* bp); |
| 121 | #ifdef WIN32 | ||
| 122 | LONG (WINAPI *go_for_advapi)() = RegOpenKeyEx; | ||
| 123 | HANDLE (WINAPI *register_event_source)() = NULL; | ||
| 124 | BOOL (WINAPI *deregister_event_source)() = NULL; | ||
| 125 | BOOL (WINAPI *report_event)() = NULL; | ||
| 126 | #define DL_PROC(m,f) (GetProcAddress( m, f )) | ||
| 127 | #ifdef UNICODE | ||
| 128 | #define DL_PROC_X(m,f) DL_PROC( m, f "W" ) | ||
| 129 | #else | ||
| 130 | #define DL_PROC_X(m,f) DL_PROC( m, f "A" ) | ||
| 131 | #endif | ||
| 132 | #endif | ||
| 121 | 133 | ||
| 122 | static BIO_METHOD methods_slg= | 134 | static BIO_METHOD methods_slg= |
| 123 | { | 135 | { |
| @@ -153,40 +165,60 @@ static int MS_CALLBACK slg_free(BIO *a) | |||
| 153 | return(1); | 165 | return(1); |
| 154 | } | 166 | } |
| 155 | 167 | ||
| 156 | static int MS_CALLBACK slg_write(BIO *b, char *in, int inl) | 168 | static int MS_CALLBACK slg_write(BIO *b, const char *in, int inl) |
| 157 | { | 169 | { |
| 158 | int ret= inl; | 170 | int ret= inl; |
| 159 | char* buf= in; | 171 | char* buf; |
| 160 | char* pp; | 172 | char* pp; |
| 161 | int priority; | 173 | int priority, i; |
| 162 | 174 | static struct | |
| 163 | if((buf= (char *)Malloc(inl+ 1)) == NULL){ | 175 | { |
| 176 | int strl; | ||
| 177 | char str[10]; | ||
| 178 | int log_level; | ||
| 179 | } | ||
| 180 | mapping[] = | ||
| 181 | { | ||
| 182 | { 6, "PANIC ", LOG_EMERG }, | ||
| 183 | { 6, "EMERG ", LOG_EMERG }, | ||
| 184 | { 4, "EMR ", LOG_EMERG }, | ||
| 185 | { 6, "ALERT ", LOG_ALERT }, | ||
| 186 | { 4, "ALR ", LOG_ALERT }, | ||
| 187 | { 5, "CRIT ", LOG_CRIT }, | ||
| 188 | { 4, "CRI ", LOG_CRIT }, | ||
| 189 | { 6, "ERROR ", LOG_ERR }, | ||
| 190 | { 4, "ERR ", LOG_ERR }, | ||
| 191 | { 8, "WARNING ", LOG_WARNING }, | ||
| 192 | { 5, "WARN ", LOG_WARNING }, | ||
| 193 | { 4, "WAR ", LOG_WARNING }, | ||
| 194 | { 7, "NOTICE ", LOG_NOTICE }, | ||
| 195 | { 5, "NOTE ", LOG_NOTICE }, | ||
| 196 | { 4, "NOT ", LOG_NOTICE }, | ||
| 197 | { 5, "INFO ", LOG_INFO }, | ||
| 198 | { 4, "INF ", LOG_INFO }, | ||
| 199 | { 6, "DEBUG ", LOG_DEBUG }, | ||
| 200 | { 4, "DBG ", LOG_DEBUG }, | ||
| 201 | { 0, "", LOG_ERR } /* The default */ | ||
| 202 | }; | ||
| 203 | |||
| 204 | if((buf= (char *)OPENSSL_malloc(inl+ 1)) == NULL){ | ||
| 164 | return(0); | 205 | return(0); |
| 165 | } | 206 | } |
| 166 | strncpy(buf, in, inl); | 207 | strncpy(buf, in, inl); |
| 167 | buf[inl]= '\0'; | 208 | buf[inl]= '\0'; |
| 168 | 209 | ||
| 169 | if(strncmp(buf, "ERR ", 4) == 0){ | 210 | i = 0; |
| 170 | priority= LOG_ERR; | 211 | while(strncmp(buf, mapping[i].str, mapping[i].strl) != 0) i++; |
| 171 | pp= buf+ 4; | 212 | priority = mapping[i].log_level; |
| 172 | }else if(strncmp(buf, "WAR ", 4) == 0){ | 213 | pp = buf + mapping[i].strl; |
| 173 | priority= LOG_WARNING; | ||
| 174 | pp= buf+ 4; | ||
| 175 | }else if(strncmp(buf, "INF ", 4) == 0){ | ||
| 176 | priority= LOG_INFO; | ||
| 177 | pp= buf+ 4; | ||
| 178 | }else{ | ||
| 179 | priority= LOG_ERR; | ||
| 180 | pp= buf; | ||
| 181 | } | ||
| 182 | 214 | ||
| 183 | xsyslog(b, priority, pp); | 215 | xsyslog(b, priority, pp); |
| 184 | 216 | ||
| 185 | Free(buf); | 217 | OPENSSL_free(buf); |
| 186 | return(ret); | 218 | return(ret); |
| 187 | } | 219 | } |
| 188 | 220 | ||
| 189 | static long MS_CALLBACK slg_ctrl(BIO *b, int cmd, long num, char *ptr) | 221 | static long MS_CALLBACK slg_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 190 | { | 222 | { |
| 191 | switch (cmd) | 223 | switch (cmd) |
| 192 | { | 224 | { |
| @@ -200,7 +232,7 @@ static long MS_CALLBACK slg_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 200 | return(0); | 232 | return(0); |
| 201 | } | 233 | } |
| 202 | 234 | ||
| 203 | static int MS_CALLBACK slg_puts(BIO *bp, char *str) | 235 | static int MS_CALLBACK slg_puts(BIO *bp, const char *str) |
| 204 | { | 236 | { |
| 205 | int n,ret; | 237 | int n,ret; |
| 206 | 238 | ||
| @@ -211,9 +243,29 @@ static int MS_CALLBACK slg_puts(BIO *bp, char *str) | |||
| 211 | 243 | ||
| 212 | #if defined(WIN32) | 244 | #if defined(WIN32) |
| 213 | 245 | ||
| 214 | static void xopenlog(BIO* bp, const char* name, int level) | 246 | static void xopenlog(BIO* bp, char* name, int level) |
| 215 | { | 247 | { |
| 216 | bp->ptr= (char *)RegisterEventSource(NULL, name); | 248 | if ( !register_event_source ) |
| 249 | { | ||
| 250 | HANDLE advapi; | ||
| 251 | if ( !(advapi = GetModuleHandle("advapi32")) ) | ||
| 252 | return; | ||
| 253 | register_event_source = (HANDLE (WINAPI *)())DL_PROC_X(advapi, | ||
| 254 | "RegisterEventSource" ); | ||
| 255 | deregister_event_source = (BOOL (WINAPI *)())DL_PROC(advapi, | ||
| 256 | "DeregisterEventSource"); | ||
| 257 | report_event = (BOOL (WINAPI *)())DL_PROC_X(advapi, | ||
| 258 | "ReportEvent" ); | ||
| 259 | if ( !(register_event_source && deregister_event_source && | ||
| 260 | report_event) ) | ||
| 261 | { | ||
| 262 | register_event_source = NULL; | ||
| 263 | deregister_event_source = NULL; | ||
| 264 | report_event = NULL; | ||
| 265 | return; | ||
| 266 | } | ||
| 267 | } | ||
| 268 | bp->ptr= (char *)register_event_source(NULL, name); | ||
| 217 | } | 269 | } |
| 218 | 270 | ||
| 219 | static void xsyslog(BIO *bp, int priority, const char *string) | 271 | static void xsyslog(BIO *bp, int priority, const char *string) |
| @@ -225,16 +277,22 @@ static void xsyslog(BIO *bp, int priority, const char *string) | |||
| 225 | 277 | ||
| 226 | switch (priority) | 278 | switch (priority) |
| 227 | { | 279 | { |
| 280 | case LOG_EMERG: | ||
| 281 | case LOG_ALERT: | ||
| 282 | case LOG_CRIT: | ||
| 228 | case LOG_ERR: | 283 | case LOG_ERR: |
| 229 | evtype = EVENTLOG_ERROR_TYPE; | 284 | evtype = EVENTLOG_ERROR_TYPE; |
| 230 | break; | 285 | break; |
| 231 | case LOG_WARNING: | 286 | case LOG_WARNING: |
| 232 | evtype = EVENTLOG_WARNING_TYPE; | 287 | evtype = EVENTLOG_WARNING_TYPE; |
| 233 | break; | 288 | break; |
| 289 | case LOG_NOTICE: | ||
| 234 | case LOG_INFO: | 290 | case LOG_INFO: |
| 291 | case LOG_DEBUG: | ||
| 235 | evtype = EVENTLOG_INFORMATION_TYPE; | 292 | evtype = EVENTLOG_INFORMATION_TYPE; |
| 236 | break; | 293 | break; |
| 237 | default: | 294 | default: /* Should never happen, but set it |
| 295 | as error anyway. */ | ||
| 238 | evtype = EVENTLOG_ERROR_TYPE; | 296 | evtype = EVENTLOG_ERROR_TYPE; |
| 239 | break; | 297 | break; |
| 240 | } | 298 | } |
| @@ -243,15 +301,15 @@ static void xsyslog(BIO *bp, int priority, const char *string) | |||
| 243 | lpszStrings[0] = pidbuf; | 301 | lpszStrings[0] = pidbuf; |
| 244 | lpszStrings[1] = string; | 302 | lpszStrings[1] = string; |
| 245 | 303 | ||
| 246 | if(bp->ptr) | 304 | if(report_event && bp->ptr) |
| 247 | ReportEvent(bp->ptr, evtype, 0, 1024, NULL, 2, 0, | 305 | report_event(bp->ptr, evtype, 0, 1024, NULL, 2, 0, |
| 248 | lpszStrings, NULL); | 306 | lpszStrings, NULL); |
| 249 | } | 307 | } |
| 250 | 308 | ||
| 251 | static void xcloselog(BIO* bp) | 309 | static void xcloselog(BIO* bp) |
| 252 | { | 310 | { |
| 253 | if(bp->ptr) | 311 | if(deregister_event_source && bp->ptr) |
| 254 | DeregisterEventSource((HANDLE)(bp->ptr)); | 312 | deregister_event_source((HANDLE)(bp->ptr)); |
| 255 | bp->ptr= NULL; | 313 | bp->ptr= NULL; |
| 256 | } | 314 | } |
| 257 | 315 | ||
| @@ -259,7 +317,7 @@ static void xcloselog(BIO* bp) | |||
| 259 | 317 | ||
| 260 | static int VMS_OPC_target = LOG_DAEMON; | 318 | static int VMS_OPC_target = LOG_DAEMON; |
| 261 | 319 | ||
| 262 | static void xopenlog(BIO* bp, const char* name, int level) | 320 | static void xopenlog(BIO* bp, char* name, int level) |
| 263 | { | 321 | { |
| 264 | VMS_OPC_target = level; | 322 | VMS_OPC_target = level; |
| 265 | } | 323 | } |
| @@ -294,7 +352,7 @@ static void xsyslog(BIO *bp, int priority, const char *string) | |||
| 294 | lib$sys_fao(&fao_cmd, &len, &buf_dsc, priority_tag, string); | 352 | lib$sys_fao(&fao_cmd, &len, &buf_dsc, priority_tag, string); |
| 295 | 353 | ||
| 296 | /* we know there's an 8 byte header. That's documented */ | 354 | /* we know there's an 8 byte header. That's documented */ |
| 297 | opcdef_p = (struct opcdef *) Malloc(8 + len); | 355 | opcdef_p = (struct opcdef *) OPENSSL_malloc(8 + len); |
| 298 | opcdef_p->opc$b_ms_type = OPC$_RQ_RQST; | 356 | opcdef_p->opc$b_ms_type = OPC$_RQ_RQST; |
| 299 | memcpy(opcdef_p->opc$z_ms_target_classes, &VMS_OPC_target, 3); | 357 | memcpy(opcdef_p->opc$z_ms_target_classes, &VMS_OPC_target, 3); |
| 300 | opcdef_p->opc$l_ms_rqstid = 0; | 358 | opcdef_p->opc$l_ms_rqstid = 0; |
| @@ -307,7 +365,7 @@ static void xsyslog(BIO *bp, int priority, const char *string) | |||
| 307 | 365 | ||
| 308 | sys$sndopr(opc_dsc, 0); | 366 | sys$sndopr(opc_dsc, 0); |
| 309 | 367 | ||
| 310 | Free(opcdef_p); | 368 | OPENSSL_free(opcdef_p); |
| 311 | } | 369 | } |
| 312 | 370 | ||
| 313 | static void xcloselog(BIO* bp) | 371 | static void xcloselog(BIO* bp) |
| @@ -316,7 +374,7 @@ static void xcloselog(BIO* bp) | |||
| 316 | 374 | ||
| 317 | #else /* Unix */ | 375 | #else /* Unix */ |
| 318 | 376 | ||
| 319 | static void xopenlog(BIO* bp, const char* name, int level) | 377 | static void xopenlog(BIO* bp, char* name, int level) |
| 320 | { | 378 | { |
| 321 | openlog(name, LOG_PID|LOG_CONS, level); | 379 | openlog(name, LOG_PID|LOG_CONS, level); |
| 322 | } | 380 | } |
diff --git a/src/lib/libssl/src/crypto/bio/bss_mem.c b/src/lib/libssl/src/crypto/bio/bss_mem.c index 41eab92415..28ff7582bf 100644 --- a/src/lib/libssl/src/crypto/bio/bss_mem.c +++ b/src/lib/libssl/src/crypto/bio/bss_mem.c | |||
| @@ -61,11 +61,11 @@ | |||
| 61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 62 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
| 63 | 63 | ||
| 64 | static int mem_write(BIO *h,char *buf,int num); | 64 | static int mem_write(BIO *h, const char *buf, int num); |
| 65 | static int mem_read(BIO *h,char *buf,int size); | 65 | static int mem_read(BIO *h, char *buf, int size); |
| 66 | static int mem_puts(BIO *h,char *str); | 66 | static int mem_puts(BIO *h, const char *str); |
| 67 | static int mem_gets(BIO *h,char *str,int size); | 67 | static int mem_gets(BIO *h, char *str, int size); |
| 68 | static long mem_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 68 | static long mem_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 69 | static int mem_new(BIO *h); | 69 | static int mem_new(BIO *h); |
| 70 | static int mem_free(BIO *data); | 70 | static int mem_free(BIO *data); |
| 71 | static BIO_METHOD mem_method= | 71 | static BIO_METHOD mem_method= |
| @@ -163,14 +163,14 @@ static int mem_read(BIO *b, char *out, int outl) | |||
| 163 | } | 163 | } |
| 164 | } else if (bm->length == 0) | 164 | } else if (bm->length == 0) |
| 165 | { | 165 | { |
| 166 | if (b->num != 0) | 166 | ret = b->num; |
| 167 | if (ret != 0) | ||
| 167 | BIO_set_retry_read(b); | 168 | BIO_set_retry_read(b); |
| 168 | ret= b->num; | ||
| 169 | } | 169 | } |
| 170 | return(ret); | 170 | return(ret); |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static int mem_write(BIO *b, char *in, int inl) | 173 | static int mem_write(BIO *b, const char *in, int inl) |
| 174 | { | 174 | { |
| 175 | int ret= -1; | 175 | int ret= -1; |
| 176 | int blen; | 176 | int blen; |
| @@ -198,7 +198,7 @@ end: | |||
| 198 | return(ret); | 198 | return(ret); |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | static long mem_ctrl(BIO *b, int cmd, long num, char *ptr) | 201 | static long mem_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 202 | { | 202 | { |
| 203 | long ret=1; | 203 | long ret=1; |
| 204 | char **pptr; | 204 | char **pptr; |
| @@ -208,15 +208,20 @@ static long mem_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 208 | switch (cmd) | 208 | switch (cmd) |
| 209 | { | 209 | { |
| 210 | case BIO_CTRL_RESET: | 210 | case BIO_CTRL_RESET: |
| 211 | if (bm->data != NULL) { | 211 | if (bm->data != NULL) |
| 212 | { | ||
| 212 | /* For read only case reset to the start again */ | 213 | /* For read only case reset to the start again */ |
| 213 | if(b->flags & BIO_FLAGS_MEM_RDONLY) | 214 | if(b->flags & BIO_FLAGS_MEM_RDONLY) |
| 214 | bm->data -= bm->max - bm->length; | 215 | { |
| 215 | else { | 216 | bm->data -= bm->max - bm->length; |
| 217 | bm->length = bm->max; | ||
| 218 | } | ||
| 219 | else | ||
| 220 | { | ||
| 216 | memset(bm->data,0,bm->max); | 221 | memset(bm->data,0,bm->max); |
| 217 | bm->length=0; | 222 | bm->length=0; |
| 223 | } | ||
| 218 | } | 224 | } |
| 219 | } | ||
| 220 | break; | 225 | break; |
| 221 | case BIO_CTRL_EOF: | 226 | case BIO_CTRL_EOF: |
| 222 | ret=(long)(bm->length == 0); | 227 | ret=(long)(bm->length == 0); |
| @@ -300,7 +305,7 @@ static int mem_gets(BIO *bp, char *buf, int size) | |||
| 300 | return(ret); | 305 | return(ret); |
| 301 | } | 306 | } |
| 302 | 307 | ||
| 303 | static int mem_puts(BIO *bp, char *str) | 308 | static int mem_puts(BIO *bp, const char *str) |
| 304 | { | 309 | { |
| 305 | int n,ret; | 310 | int n,ret; |
| 306 | 311 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_null.c b/src/lib/libssl/src/crypto/bio/bss_null.c index aee18e3ada..46b73339df 100644 --- a/src/lib/libssl/src/crypto/bio/bss_null.c +++ b/src/lib/libssl/src/crypto/bio/bss_null.c | |||
| @@ -61,11 +61,11 @@ | |||
| 61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 62 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
| 63 | 63 | ||
| 64 | static int null_write(BIO *h,char *buf,int num); | 64 | static int null_write(BIO *h, const char *buf, int num); |
| 65 | static int null_read(BIO *h,char *buf,int size); | 65 | static int null_read(BIO *h, char *buf, int size); |
| 66 | static int null_puts(BIO *h,char *str); | 66 | static int null_puts(BIO *h, const char *str); |
| 67 | static int null_gets(BIO *h,char *str,int size); | 67 | static int null_gets(BIO *h, char *str, int size); |
| 68 | static long null_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 68 | static long null_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 69 | static int null_new(BIO *h); | 69 | static int null_new(BIO *h); |
| 70 | static int null_free(BIO *data); | 70 | static int null_free(BIO *data); |
| 71 | static BIO_METHOD null_method= | 71 | static BIO_METHOD null_method= |
| @@ -106,12 +106,12 @@ static int null_read(BIO *b, char *out, int outl) | |||
| 106 | return(0); | 106 | return(0); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | static int null_write(BIO *b, char *in, int inl) | 109 | static int null_write(BIO *b, const char *in, int inl) |
| 110 | { | 110 | { |
| 111 | return(inl); | 111 | return(inl); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static long null_ctrl(BIO *b, int cmd, long num, char *ptr) | 114 | static long null_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 115 | { | 115 | { |
| 116 | long ret=1; | 116 | long ret=1; |
| 117 | 117 | ||
| @@ -142,7 +142,7 @@ static int null_gets(BIO *bp, char *buf, int size) | |||
| 142 | return(0); | 142 | return(0); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | static int null_puts(BIO *bp, char *str) | 145 | static int null_puts(BIO *bp, const char *str) |
| 146 | { | 146 | { |
| 147 | if (str == NULL) return(0); | 147 | if (str == NULL) return(0); |
| 148 | return(strlen(str)); | 148 | return(strlen(str)); |
diff --git a/src/lib/libssl/src/crypto/bio/bss_rtcp.c b/src/lib/libssl/src/crypto/bio/bss_rtcp.c index 4ad0739464..7dae485564 100644 --- a/src/lib/libssl/src/crypto/bio/bss_rtcp.c +++ b/src/lib/libssl/src/crypto/bio/bss_rtcp.c | |||
| @@ -88,11 +88,11 @@ struct rpc_ctx { | |||
| 88 | struct rpc_msg msg; | 88 | struct rpc_msg msg; |
| 89 | }; | 89 | }; |
| 90 | 90 | ||
| 91 | static int rtcp_write(BIO *h,char *buf,int num); | 91 | static int rtcp_write(BIO *h,const char *buf,int num); |
| 92 | static int rtcp_read(BIO *h,char *buf,int size); | 92 | static int rtcp_read(BIO *h,char *buf,int size); |
| 93 | static int rtcp_puts(BIO *h,char *str); | 93 | static int rtcp_puts(BIO *h,const char *str); |
| 94 | static int rtcp_gets(BIO *h,char *str,int size); | 94 | static int rtcp_gets(BIO *h,char *str,int size); |
| 95 | static long rtcp_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 95 | static long rtcp_ctrl(BIO *h,int cmd,long arg1,void *arg2); |
| 96 | static int rtcp_new(BIO *h); | 96 | static int rtcp_new(BIO *h); |
| 97 | static int rtcp_free(BIO *data); | 97 | static int rtcp_free(BIO *data); |
| 98 | 98 | ||
| @@ -156,7 +156,7 @@ static int rtcp_new(BIO *bi) | |||
| 156 | bi->init=1; | 156 | bi->init=1; |
| 157 | bi->num=0; | 157 | bi->num=0; |
| 158 | bi->flags = 0; | 158 | bi->flags = 0; |
| 159 | bi->ptr=Malloc(sizeof(struct rpc_ctx)); | 159 | bi->ptr=OPENSSL_malloc(sizeof(struct rpc_ctx)); |
| 160 | ctx = (struct rpc_ctx *) bi->ptr; | 160 | ctx = (struct rpc_ctx *) bi->ptr; |
| 161 | ctx->filled = 0; | 161 | ctx->filled = 0; |
| 162 | ctx->pos = 0; | 162 | ctx->pos = 0; |
| @@ -166,7 +166,7 @@ static int rtcp_new(BIO *bi) | |||
| 166 | static int rtcp_free(BIO *a) | 166 | static int rtcp_free(BIO *a) |
| 167 | { | 167 | { |
| 168 | if (a == NULL) return(0); | 168 | if (a == NULL) return(0); |
| 169 | if ( a->ptr ) Free ( a->ptr ); | 169 | if ( a->ptr ) OPENSSL_free ( a->ptr ); |
| 170 | a->ptr = NULL; | 170 | a->ptr = NULL; |
| 171 | return(1); | 171 | return(1); |
| 172 | } | 172 | } |
| @@ -218,7 +218,7 @@ static int rtcp_read(BIO *b, char *out, int outl) | |||
| 218 | return length; | 218 | return length; |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | static int rtcp_write(BIO *b, char *in, int inl) | 221 | static int rtcp_write(BIO *b, const char *in, int inl) |
| 222 | { | 222 | { |
| 223 | int status, i, segment, length; | 223 | int status, i, segment, length; |
| 224 | struct rpc_ctx *ctx; | 224 | struct rpc_ctx *ctx; |
| @@ -247,7 +247,7 @@ static int rtcp_write(BIO *b, char *in, int inl) | |||
| 247 | return(i); | 247 | return(i); |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | static long rtcp_ctrl(BIO *b, int cmd, long num, char *ptr) | 250 | static long rtcp_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 251 | { | 251 | { |
| 252 | long ret=1; | 252 | long ret=1; |
| 253 | 253 | ||
| @@ -283,7 +283,7 @@ static int rtcp_gets(BIO *bp, char *buf, int size) | |||
| 283 | return(0); | 283 | return(0); |
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | static int rtcp_puts(BIO *bp, char *str) | 286 | static int rtcp_puts(BIO *bp, const char *str) |
| 287 | { | 287 | { |
| 288 | int length; | 288 | int length; |
| 289 | if (str == NULL) return(0); | 289 | if (str == NULL) return(0); |
diff --git a/src/lib/libssl/src/crypto/bio/bss_sock.c b/src/lib/libssl/src/crypto/bio/bss_sock.c index 8ce80ef68d..50c6744c06 100644 --- a/src/lib/libssl/src/crypto/bio/bss_sock.c +++ b/src/lib/libssl/src/crypto/bio/bss_sock.c | |||
| @@ -65,19 +65,19 @@ | |||
| 65 | #include <openssl/bio.h> | 65 | #include <openssl/bio.h> |
| 66 | 66 | ||
| 67 | #ifndef BIO_FD | 67 | #ifndef BIO_FD |
| 68 | static int sock_write(BIO *h,char *buf,int num); | 68 | static int sock_write(BIO *h, const char *buf, int num); |
| 69 | static int sock_read(BIO *h,char *buf,int size); | 69 | static int sock_read(BIO *h, char *buf, int size); |
| 70 | static int sock_puts(BIO *h,char *str); | 70 | static int sock_puts(BIO *h, const char *str); |
| 71 | static long sock_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 71 | static long sock_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 72 | static int sock_new(BIO *h); | 72 | static int sock_new(BIO *h); |
| 73 | static int sock_free(BIO *data); | 73 | static int sock_free(BIO *data); |
| 74 | int BIO_sock_should_retry(int s); | 74 | int BIO_sock_should_retry(int s); |
| 75 | #else | 75 | #else |
| 76 | 76 | ||
| 77 | static int fd_write(BIO *h,char *buf,int num); | 77 | static int fd_write(BIO *h, const char *buf, int num); |
| 78 | static int fd_read(BIO *h,char *buf,int size); | 78 | static int fd_read(BIO *h, char *buf, int size); |
| 79 | static int fd_puts(BIO *h,char *str); | 79 | static int fd_puts(BIO *h, const char *str); |
| 80 | static long fd_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 80 | static long fd_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 81 | static int fd_new(BIO *h); | 81 | static int fd_new(BIO *h); |
| 82 | static int fd_free(BIO *data); | 82 | static int fd_free(BIO *data); |
| 83 | int BIO_fd_should_retry(int s); | 83 | int BIO_fd_should_retry(int s); |
| @@ -209,9 +209,9 @@ static int fd_read(BIO *b, char *out,int outl) | |||
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | #ifndef BIO_FD | 211 | #ifndef BIO_FD |
| 212 | static int sock_write(BIO *b, char *in, int inl) | 212 | static int sock_write(BIO *b, const char *in, int inl) |
| 213 | #else | 213 | #else |
| 214 | static int fd_write(BIO *b, char *in, int inl) | 214 | static int fd_write(BIO *b, const char *in, int inl) |
| 215 | #endif | 215 | #endif |
| 216 | { | 216 | { |
| 217 | int ret; | 217 | int ret; |
| @@ -237,9 +237,9 @@ static int fd_write(BIO *b, char *in, int inl) | |||
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | #ifndef BIO_FD | 239 | #ifndef BIO_FD |
| 240 | static long sock_ctrl(BIO *b, int cmd, long num, char *ptr) | 240 | static long sock_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 241 | #else | 241 | #else |
| 242 | static long fd_ctrl(BIO *b, int cmd, long num, char *ptr) | 242 | static long fd_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 243 | #endif | 243 | #endif |
| 244 | { | 244 | { |
| 245 | long ret=1; | 245 | long ret=1; |
| @@ -313,9 +313,9 @@ static int sock_gets(BIO *bp, char *buf,int size) | |||
| 313 | #endif | 313 | #endif |
| 314 | 314 | ||
| 315 | #ifndef BIO_FD | 315 | #ifndef BIO_FD |
| 316 | static int sock_puts(BIO *bp, char *str) | 316 | static int sock_puts(BIO *bp, const char *str) |
| 317 | #else | 317 | #else |
| 318 | static int fd_puts(BIO *bp, char *str) | 318 | static int fd_puts(BIO *bp, const char *str) |
| 319 | #endif | 319 | #endif |
| 320 | { | 320 | { |
| 321 | int n,ret; | 321 | int n,ret; |
diff --git a/src/lib/libssl/src/crypto/bn/Makefile.ssl b/src/lib/libssl/src/crypto/bn/Makefile.ssl index beb9c1b523..17b72d577f 100644 --- a/src/lib/libssl/src/crypto/bn/Makefile.ssl +++ b/src/lib/libssl/src/crypto/bn/Makefile.ssl | |||
| @@ -170,118 +170,143 @@ clean: | |||
| 170 | bn_add.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 170 | bn_add.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 171 | bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 171 | bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 172 | bn_add.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 172 | bn_add.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 173 | bn_add.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 173 | bn_add.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 174 | bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 174 | bn_add.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 175 | bn_add.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 175 | bn_add.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 176 | bn_add.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 176 | bn_asm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 177 | bn_asm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 177 | bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 178 | bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 178 | bn_asm.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 179 | bn_asm.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 179 | bn_asm.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 180 | bn_asm.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 180 | bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 181 | bn_asm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 181 | bn_asm.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 182 | bn_asm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 183 | bn_asm.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 182 | bn_blind.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 184 | bn_blind.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 183 | bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 185 | bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 184 | bn_blind.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 186 | bn_blind.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 185 | bn_blind.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 187 | bn_blind.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 188 | bn_blind.o: ../../include/openssl/opensslconf.h | ||
| 186 | bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 189 | bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 187 | bn_blind.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 190 | bn_blind.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 191 | bn_blind.o: ../cryptlib.h bn_lcl.h | ||
| 188 | bn_ctx.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 192 | bn_ctx.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 189 | bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 193 | bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 190 | bn_ctx.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 194 | bn_ctx.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 191 | bn_ctx.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 195 | bn_ctx.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 192 | bn_ctx.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 196 | bn_ctx.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 193 | bn_ctx.o: ../../include/openssl/stack.h ../cryptlib.h | 197 | bn_ctx.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 198 | bn_ctx.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 194 | bn_div.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 199 | bn_div.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 195 | bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 200 | bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 196 | bn_div.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 201 | bn_div.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 197 | bn_div.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 202 | bn_div.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 198 | bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 203 | bn_div.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 199 | bn_div.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 204 | bn_div.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 200 | bn_err.o: ../../include/openssl/bn.h ../../include/openssl/err.h | 205 | bn_div.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h |
| 201 | bn_err.o: ../../include/openssl/opensslconf.h | 206 | bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 207 | bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/err.h | ||
| 208 | bn_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 209 | bn_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
| 210 | bn_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 202 | bn_exp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 211 | bn_exp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 203 | bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 212 | bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 204 | bn_exp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 213 | bn_exp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 205 | bn_exp.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 214 | bn_exp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 206 | bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 215 | bn_exp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 207 | bn_exp.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 216 | bn_exp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 217 | bn_exp.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 208 | bn_exp2.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 218 | bn_exp2.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 209 | bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 219 | bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 210 | bn_exp2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 220 | bn_exp2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 211 | bn_exp2.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 221 | bn_exp2.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 212 | bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 222 | bn_exp2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 213 | bn_exp2.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 223 | bn_exp2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 224 | bn_exp2.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 214 | bn_gcd.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 225 | bn_gcd.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 215 | bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 226 | bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 216 | bn_gcd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 227 | bn_gcd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 217 | bn_gcd.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 228 | bn_gcd.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 218 | bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 229 | bn_gcd.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 219 | bn_gcd.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 230 | bn_gcd.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 231 | bn_gcd.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 220 | bn_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 232 | bn_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 221 | bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 233 | bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 222 | bn_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 234 | bn_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 223 | bn_lib.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 235 | bn_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 224 | bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 236 | bn_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 225 | bn_lib.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 237 | bn_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 238 | bn_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 226 | bn_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 239 | bn_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 227 | bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 240 | bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 228 | bn_mont.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 241 | bn_mont.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 229 | bn_mont.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 242 | bn_mont.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 230 | bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 243 | bn_mont.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 231 | bn_mont.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 244 | bn_mont.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 245 | bn_mont.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 232 | bn_mpi.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 246 | bn_mpi.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 233 | bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 247 | bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 234 | bn_mpi.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 248 | bn_mpi.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 235 | bn_mpi.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 249 | bn_mpi.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 236 | bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 250 | bn_mpi.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 237 | bn_mpi.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 251 | bn_mpi.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 252 | bn_mpi.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 238 | bn_mul.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 253 | bn_mul.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 239 | bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 254 | bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 240 | bn_mul.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 255 | bn_mul.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 241 | bn_mul.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 256 | bn_mul.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 242 | bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 257 | bn_mul.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 243 | bn_mul.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 258 | bn_mul.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 259 | bn_mul.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 244 | bn_prime.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 260 | bn_prime.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 245 | bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 261 | bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 246 | bn_prime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 262 | bn_prime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 247 | bn_prime.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 263 | bn_prime.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 264 | bn_prime.o: ../../include/openssl/opensslconf.h | ||
| 248 | bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 265 | bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 249 | bn_prime.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 266 | bn_prime.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 250 | bn_prime.o: ../cryptlib.h bn_lcl.h bn_prime.h | 267 | bn_prime.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_prime.h |
| 251 | bn_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 268 | bn_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 252 | bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 269 | bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 253 | bn_print.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 270 | bn_print.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 254 | bn_print.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 271 | bn_print.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 272 | bn_print.o: ../../include/openssl/opensslconf.h | ||
| 255 | bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 273 | bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 256 | bn_print.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 274 | bn_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 275 | bn_print.o: ../cryptlib.h bn_lcl.h | ||
| 257 | bn_rand.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 276 | bn_rand.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 258 | bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 277 | bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 259 | bn_rand.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 278 | bn_rand.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 260 | bn_rand.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 279 | bn_rand.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 261 | bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 280 | bn_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 262 | bn_rand.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 281 | bn_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h |
| 282 | bn_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 263 | bn_rand.o: ../cryptlib.h bn_lcl.h | 283 | bn_rand.o: ../cryptlib.h bn_lcl.h |
| 264 | bn_recp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 284 | bn_recp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 265 | bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 285 | bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 266 | bn_recp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 286 | bn_recp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 267 | bn_recp.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 287 | bn_recp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 268 | bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 288 | bn_recp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 269 | bn_recp.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 289 | bn_recp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 290 | bn_recp.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 270 | bn_shift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 291 | bn_shift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 271 | bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 292 | bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 272 | bn_shift.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 293 | bn_shift.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 273 | bn_shift.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 294 | bn_shift.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 295 | bn_shift.o: ../../include/openssl/opensslconf.h | ||
| 274 | bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 296 | bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 275 | bn_shift.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 297 | bn_shift.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 298 | bn_shift.o: ../cryptlib.h bn_lcl.h | ||
| 276 | bn_sqr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 299 | bn_sqr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 277 | bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 300 | bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 278 | bn_sqr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 301 | bn_sqr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 279 | bn_sqr.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 302 | bn_sqr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 280 | bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 303 | bn_sqr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 281 | bn_sqr.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 304 | bn_sqr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 305 | bn_sqr.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
| 282 | bn_word.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 306 | bn_word.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 283 | bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 307 | bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 284 | bn_word.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 308 | bn_word.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 285 | bn_word.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 309 | bn_word.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 286 | bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 310 | bn_word.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 287 | bn_word.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h | 311 | bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 312 | bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h | ||
diff --git a/src/lib/libssl/src/crypto/bn/asm/README b/src/lib/libssl/src/crypto/bn/asm/README index 86bf64cfc2..a0fe58a677 100644 --- a/src/lib/libssl/src/crypto/bn/asm/README +++ b/src/lib/libssl/src/crypto/bn/asm/README | |||
| @@ -15,9 +15,9 @@ On the 2 alpha C compilers I had access to, it was not possible to do | |||
| 15 | were 64 bits). So the hand assember gives access to the 128 bit result and | 15 | were 64 bits). So the hand assember gives access to the 128 bit result and |
| 16 | a 2 times speedup :-). | 16 | a 2 times speedup :-). |
| 17 | 17 | ||
| 18 | There are 2 versions of assember for the HP PA-RISC. | 18 | There are 3 versions of assember for the HP PA-RISC. |
| 19 | pa-risc.s is the origional one which works fine. | 19 | |
| 20 | pa-risc2.s is a new version that often generates warnings but if the | 20 | pa-risc.s is the origional one which works fine and generated using gcc :-) |
| 21 | tests pass, it gives performance that is over 2 times faster than | 21 | |
| 22 | pa-risc.s. | 22 | pa-risc2W.s and pa-risc2.s are 64 and 32-bit PA-RISC 2.0 implementations |
| 23 | Both were generated using gcc :-) | 23 | by Chris Ruemmler from HP (with some help from the HP C compiler). |
diff --git a/src/lib/libssl/src/crypto/bn/asm/pa-risc2.s b/src/lib/libssl/src/crypto/bn/asm/pa-risc2.s index c2725996a4..7239aa2c76 100644 --- a/src/lib/libssl/src/crypto/bn/asm/pa-risc2.s +++ b/src/lib/libssl/src/crypto/bn/asm/pa-risc2.s | |||
| @@ -1,416 +1,1618 @@ | |||
| 1 | .SPACE $PRIVATE$ | 1 | ; |
| 2 | .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31 | 2 | ; PA-RISC 2.0 implementation of bn_asm code, based on the |
| 3 | .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82 | 3 | ; 64-bit version of the code. This code is effectively the |
| 4 | .SPACE $TEXT$ | 4 | ; same as the 64-bit version except the register model is |
| 5 | .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 | 5 | ; slightly different given all values must be 32-bit between |
| 6 | .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY | 6 | ; function calls. Thus the 64-bit return values are returned |
| 7 | .IMPORT $global$,DATA | 7 | ; in %ret0 and %ret1 vs just %ret0 as is done in 64-bit |
| 8 | .IMPORT $$dyncall,MILLICODE | 8 | ; |
| 9 | ; gcc_compiled.: | 9 | ; |
| 10 | .SPACE $TEXT$ | 10 | ; This code is approximately 2x faster than the C version |
| 11 | .SUBSPA $CODE$ | 11 | ; for RSA/DSA. |
| 12 | 12 | ; | |
| 13 | .align 4 | 13 | ; See http://devresource.hp.com/ for more details on the PA-RISC |
| 14 | .EXPORT bn_mul_add_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR | 14 | ; architecture. Also see the book "PA-RISC 2.0 Architecture" |
| 15 | ; by Gerry Kane for information on the instruction set architecture. | ||
| 16 | ; | ||
| 17 | ; Code written by Chris Ruemmler (with some help from the HP C | ||
| 18 | ; compiler). | ||
| 19 | ; | ||
| 20 | ; The code compiles with HP's assembler | ||
| 21 | ; | ||
| 22 | |||
| 23 | .level 2.0N | ||
| 24 | .space $TEXT$ | ||
| 25 | .subspa $CODE$,QUAD=0,ALIGN=8,ACCESS=0x2c,CODE_ONLY | ||
| 26 | |||
| 27 | ; | ||
| 28 | ; Global Register definitions used for the routines. | ||
| 29 | ; | ||
| 30 | ; Some information about HP's runtime architecture for 32-bits. | ||
| 31 | ; | ||
| 32 | ; "Caller save" means the calling function must save the register | ||
| 33 | ; if it wants the register to be preserved. | ||
| 34 | ; "Callee save" means if a function uses the register, it must save | ||
| 35 | ; the value before using it. | ||
| 36 | ; | ||
| 37 | ; For the floating point registers | ||
| 38 | ; | ||
| 39 | ; "caller save" registers: fr4-fr11, fr22-fr31 | ||
| 40 | ; "callee save" registers: fr12-fr21 | ||
| 41 | ; "special" registers: fr0-fr3 (status and exception registers) | ||
| 42 | ; | ||
| 43 | ; For the integer registers | ||
| 44 | ; value zero : r0 | ||
| 45 | ; "caller save" registers: r1,r19-r26 | ||
| 46 | ; "callee save" registers: r3-r18 | ||
| 47 | ; return register : r2 (rp) | ||
| 48 | ; return values ; r28,r29 (ret0,ret1) | ||
| 49 | ; Stack pointer ; r30 (sp) | ||
| 50 | ; millicode return ptr ; r31 (also a caller save register) | ||
| 51 | |||
| 52 | |||
| 53 | ; | ||
| 54 | ; Arguments to the routines | ||
| 55 | ; | ||
| 56 | r_ptr .reg %r26 | ||
| 57 | a_ptr .reg %r25 | ||
| 58 | b_ptr .reg %r24 | ||
| 59 | num .reg %r24 | ||
| 60 | n .reg %r23 | ||
| 61 | |||
| 62 | ; | ||
| 63 | ; Note that the "w" argument for bn_mul_add_words and bn_mul_words | ||
| 64 | ; is passed on the stack at a delta of -56 from the top of stack | ||
| 65 | ; as the routine is entered. | ||
| 66 | ; | ||
| 67 | |||
| 68 | ; | ||
| 69 | ; Globals used in some routines | ||
| 70 | ; | ||
| 71 | |||
| 72 | top_overflow .reg %r23 | ||
| 73 | high_mask .reg %r22 ; value 0xffffffff80000000L | ||
| 74 | |||
| 75 | |||
| 76 | ;------------------------------------------------------------------------------ | ||
| 77 | ; | ||
| 78 | ; bn_mul_add_words | ||
| 79 | ; | ||
| 80 | ;BN_ULONG bn_mul_add_words(BN_ULONG *r_ptr, BN_ULONG *a_ptr, | ||
| 81 | ; int num, BN_ULONG w) | ||
| 82 | ; | ||
| 83 | ; arg0 = r_ptr | ||
| 84 | ; arg1 = a_ptr | ||
| 85 | ; arg3 = num | ||
| 86 | ; -56(sp) = w | ||
| 87 | ; | ||
| 88 | ; Local register definitions | ||
| 89 | ; | ||
| 90 | |||
| 91 | fm1 .reg %fr22 | ||
| 92 | fm .reg %fr23 | ||
| 93 | ht_temp .reg %fr24 | ||
| 94 | ht_temp_1 .reg %fr25 | ||
| 95 | lt_temp .reg %fr26 | ||
| 96 | lt_temp_1 .reg %fr27 | ||
| 97 | fm1_1 .reg %fr28 | ||
| 98 | fm_1 .reg %fr29 | ||
| 99 | |||
| 100 | fw_h .reg %fr7L | ||
| 101 | fw_l .reg %fr7R | ||
| 102 | fw .reg %fr7 | ||
| 103 | |||
| 104 | fht_0 .reg %fr8L | ||
| 105 | flt_0 .reg %fr8R | ||
| 106 | t_float_0 .reg %fr8 | ||
| 107 | |||
| 108 | fht_1 .reg %fr9L | ||
| 109 | flt_1 .reg %fr9R | ||
| 110 | t_float_1 .reg %fr9 | ||
| 111 | |||
| 112 | tmp_0 .reg %r31 | ||
| 113 | tmp_1 .reg %r21 | ||
| 114 | m_0 .reg %r20 | ||
| 115 | m_1 .reg %r19 | ||
| 116 | ht_0 .reg %r1 | ||
| 117 | ht_1 .reg %r3 | ||
| 118 | lt_0 .reg %r4 | ||
| 119 | lt_1 .reg %r5 | ||
| 120 | m1_0 .reg %r6 | ||
| 121 | m1_1 .reg %r7 | ||
| 122 | rp_val .reg %r8 | ||
| 123 | rp_val_1 .reg %r9 | ||
| 124 | |||
| 15 | bn_mul_add_words | 125 | bn_mul_add_words |
| 16 | .PROC | 126 | .export bn_mul_add_words,entry,NO_RELOCATION,LONG_RETURN |
| 17 | .CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=4 | 127 | .proc |
| 18 | .ENTRY | 128 | .callinfo frame=128 |
| 19 | stw %r2,-20(0,%r30) | 129 | .entry |
| 20 | stwm %r4,64(0,%r30) | 130 | .align 64 |
| 21 | copy %r24,%r31 | 131 | |
| 22 | stw %r3,-60(0,%r30) | 132 | STD %r3,0(%sp) ; save r3 |
| 23 | ldi 0,%r20 | 133 | STD %r4,8(%sp) ; save r4 |
| 24 | ldo 12(%r26),%r2 | 134 | NOP ; Needed to make the loop 16-byte aligned |
| 25 | stw %r23,-16(0,%r30) | 135 | NOP ; needed to make the loop 16-byte aligned |
| 26 | copy %r25,%r3 | 136 | |
| 27 | ldo 12(%r3),%r1 | 137 | STD %r5,16(%sp) ; save r5 |
| 28 | fldws -16(0,%r30),%fr8L | 138 | NOP |
| 29 | L$0010 | 139 | STD %r6,24(%sp) ; save r6 |
| 30 | copy %r20,%r25 | 140 | STD %r7,32(%sp) ; save r7 |
| 31 | ldi 0,%r24 | 141 | |
| 32 | fldws 0(0,%r3),%fr9L | 142 | STD %r8,40(%sp) ; save r8 |
| 33 | ldw 0(0,%r26),%r19 | 143 | STD %r9,48(%sp) ; save r9 |
| 34 | xmpyu %fr8L,%fr9L,%fr9 | 144 | COPY %r0,%ret1 ; return 0 by default |
| 35 | fstds %fr9,-16(0,%r30) | 145 | DEPDI,Z 1,31,1,top_overflow ; top_overflow = 1 << 32 |
| 36 | copy %r19,%r23 | 146 | |
| 37 | ldw -16(0,%r30),%r28 | 147 | CMPIB,>= 0,num,bn_mul_add_words_exit ; if (num <= 0) then exit |
| 38 | ldw -12(0,%r30),%r29 | 148 | LDO 128(%sp),%sp ; bump stack |
| 39 | ldi 0,%r22 | 149 | |
| 40 | add %r23,%r29,%r29 | 150 | ; |
| 41 | addc %r22,%r28,%r28 | 151 | ; The loop is unrolled twice, so if there is only 1 number |
| 42 | add %r25,%r29,%r29 | 152 | ; then go straight to the cleanup code. |
| 43 | addc %r24,%r28,%r28 | 153 | ; |
| 44 | copy %r28,%r21 | 154 | CMPIB,= 1,num,bn_mul_add_words_single_top |
| 45 | ldi 0,%r20 | 155 | FLDD -184(%sp),fw ; (-56-128) load up w into fw (fw_h/fw_l) |
| 46 | copy %r21,%r20 | 156 | |
| 47 | addib,= -1,%r31,L$0011 | 157 | ; |
| 48 | stw %r29,0(0,%r26) | 158 | ; This loop is unrolled 2 times (64-byte aligned as well) |
| 49 | copy %r20,%r25 | 159 | ; |
| 50 | ldi 0,%r24 | 160 | ; PA-RISC 2.0 chips have two fully pipelined multipliers, thus |
| 51 | fldws -8(0,%r1),%fr9L | 161 | ; two 32-bit mutiplies can be issued per cycle. |
| 52 | ldw -8(0,%r2),%r19 | 162 | ; |
| 53 | xmpyu %fr8L,%fr9L,%fr9 | 163 | bn_mul_add_words_unroll2 |
| 54 | fstds %fr9,-16(0,%r30) | 164 | |
| 55 | copy %r19,%r23 | 165 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) |
| 56 | ldw -16(0,%r30),%r28 | 166 | FLDD 8(a_ptr),t_float_1 ; load up 64-bit value (fr8L) ht(L)/lt(R) |
| 57 | ldw -12(0,%r30),%r29 | 167 | LDD 0(r_ptr),rp_val ; rp[0] |
| 58 | ldi 0,%r22 | 168 | LDD 8(r_ptr),rp_val_1 ; rp[1] |
| 59 | add %r23,%r29,%r29 | 169 | |
| 60 | addc %r22,%r28,%r28 | 170 | XMPYU fht_0,fw_l,fm1 ; m1[0] = fht_0*fw_l |
| 61 | add %r25,%r29,%r29 | 171 | XMPYU fht_1,fw_l,fm1_1 ; m1[1] = fht_1*fw_l |
| 62 | addc %r24,%r28,%r28 | 172 | FSTD fm1,-16(%sp) ; -16(sp) = m1[0] |
| 63 | copy %r28,%r21 | 173 | FSTD fm1_1,-48(%sp) ; -48(sp) = m1[1] |
| 64 | ldi 0,%r20 | 174 | |
| 65 | copy %r21,%r20 | 175 | XMPYU flt_0,fw_h,fm ; m[0] = flt_0*fw_h |
| 66 | addib,= -1,%r31,L$0011 | 176 | XMPYU flt_1,fw_h,fm_1 ; m[1] = flt_1*fw_h |
| 67 | stw %r29,-8(0,%r2) | 177 | FSTD fm,-8(%sp) ; -8(sp) = m[0] |
| 68 | copy %r20,%r25 | 178 | FSTD fm_1,-40(%sp) ; -40(sp) = m[1] |
| 69 | ldi 0,%r24 | 179 | |
| 70 | fldws -4(0,%r1),%fr9L | 180 | XMPYU fht_0,fw_h,ht_temp ; ht_temp = fht_0*fw_h |
| 71 | ldw -4(0,%r2),%r19 | 181 | XMPYU fht_1,fw_h,ht_temp_1 ; ht_temp_1 = fht_1*fw_h |
| 72 | xmpyu %fr8L,%fr9L,%fr9 | 182 | FSTD ht_temp,-24(%sp) ; -24(sp) = ht_temp |
| 73 | fstds %fr9,-16(0,%r30) | 183 | FSTD ht_temp_1,-56(%sp) ; -56(sp) = ht_temp_1 |
| 74 | copy %r19,%r23 | 184 | |
| 75 | ldw -16(0,%r30),%r28 | 185 | XMPYU flt_0,fw_l,lt_temp ; lt_temp = lt*fw_l |
| 76 | ldw -12(0,%r30),%r29 | 186 | XMPYU flt_1,fw_l,lt_temp_1 ; lt_temp = lt*fw_l |
| 77 | ldi 0,%r22 | 187 | FSTD lt_temp,-32(%sp) ; -32(sp) = lt_temp |
| 78 | add %r23,%r29,%r29 | 188 | FSTD lt_temp_1,-64(%sp) ; -64(sp) = lt_temp_1 |
| 79 | addc %r22,%r28,%r28 | 189 | |
| 80 | add %r25,%r29,%r29 | 190 | LDD -8(%sp),m_0 ; m[0] |
| 81 | addc %r24,%r28,%r28 | 191 | LDD -40(%sp),m_1 ; m[1] |
| 82 | copy %r28,%r21 | 192 | LDD -16(%sp),m1_0 ; m1[0] |
| 83 | ldi 0,%r20 | 193 | LDD -48(%sp),m1_1 ; m1[1] |
| 84 | copy %r21,%r20 | 194 | |
| 85 | addib,= -1,%r31,L$0011 | 195 | LDD -24(%sp),ht_0 ; ht[0] |
| 86 | stw %r29,-4(0,%r2) | 196 | LDD -56(%sp),ht_1 ; ht[1] |
| 87 | copy %r20,%r25 | 197 | ADD,L m1_0,m_0,tmp_0 ; tmp_0 = m[0] + m1[0]; |
| 88 | ldi 0,%r24 | 198 | ADD,L m1_1,m_1,tmp_1 ; tmp_1 = m[1] + m1[1]; |
| 89 | fldws 0(0,%r1),%fr9L | 199 | |
| 90 | ldw 0(0,%r2),%r19 | 200 | LDD -32(%sp),lt_0 |
| 91 | xmpyu %fr8L,%fr9L,%fr9 | 201 | LDD -64(%sp),lt_1 |
| 92 | fstds %fr9,-16(0,%r30) | 202 | CMPCLR,*>>= tmp_0,m1_0, %r0 ; if (m[0] < m1[0]) |
| 93 | copy %r19,%r23 | 203 | ADD,L ht_0,top_overflow,ht_0 ; ht[0] += (1<<32) |
| 94 | ldw -16(0,%r30),%r28 | 204 | |
| 95 | ldw -12(0,%r30),%r29 | 205 | CMPCLR,*>>= tmp_1,m1_1,%r0 ; if (m[1] < m1[1]) |
| 96 | ldi 0,%r22 | 206 | ADD,L ht_1,top_overflow,ht_1 ; ht[1] += (1<<32) |
| 97 | add %r23,%r29,%r29 | 207 | EXTRD,U tmp_0,31,32,m_0 ; m[0]>>32 |
| 98 | addc %r22,%r28,%r28 | 208 | DEPD,Z tmp_0,31,32,m1_0 ; m1[0] = m[0]<<32 |
| 99 | add %r25,%r29,%r29 | 209 | |
| 100 | addc %r24,%r28,%r28 | 210 | EXTRD,U tmp_1,31,32,m_1 ; m[1]>>32 |
| 101 | copy %r28,%r21 | 211 | DEPD,Z tmp_1,31,32,m1_1 ; m1[1] = m[1]<<32 |
| 102 | ldi 0,%r20 | 212 | ADD,L ht_0,m_0,ht_0 ; ht[0]+= (m[0]>>32) |
| 103 | copy %r21,%r20 | 213 | ADD,L ht_1,m_1,ht_1 ; ht[1]+= (m[1]>>32) |
| 104 | addib,= -1,%r31,L$0011 | 214 | |
| 105 | stw %r29,0(0,%r2) | 215 | ADD lt_0,m1_0,lt_0 ; lt[0] = lt[0]+m1[0]; |
| 106 | ldo 16(%r1),%r1 | 216 | ADD,DC ht_0,%r0,ht_0 ; ht[0]++ |
| 107 | ldo 16(%r3),%r3 | 217 | ADD lt_1,m1_1,lt_1 ; lt[1] = lt[1]+m1[1]; |
| 108 | ldo 16(%r2),%r2 | 218 | ADD,DC ht_1,%r0,ht_1 ; ht[1]++ |
| 109 | bl L$0010,0 | 219 | |
| 110 | ldo 16(%r26),%r26 | 220 | ADD %ret1,lt_0,lt_0 ; lt[0] = lt[0] + c; |
| 111 | L$0011 | 221 | ADD,DC ht_0,%r0,ht_0 ; ht[0]++ |
| 112 | copy %r20,%r28 | 222 | ADD lt_0,rp_val,lt_0 ; lt[0] = lt[0]+rp[0] |
| 113 | ldw -84(0,%r30),%r2 | 223 | ADD,DC ht_0,%r0,ht_0 ; ht[0]++ |
| 114 | ldw -60(0,%r30),%r3 | 224 | |
| 115 | bv 0(%r2) | 225 | LDO -2(num),num ; num = num - 2; |
| 116 | ldwm -64(0,%r30),%r4 | 226 | ADD ht_0,lt_1,lt_1 ; lt[1] = lt[1] + ht_0 (c); |
| 117 | .EXIT | 227 | ADD,DC ht_1,%r0,ht_1 ; ht[1]++ |
| 118 | .PROCEND | 228 | STD lt_0,0(r_ptr) ; rp[0] = lt[0] |
| 119 | .align 4 | 229 | |
| 120 | .EXPORT bn_mul_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR | 230 | ADD lt_1,rp_val_1,lt_1 ; lt[1] = lt[1]+rp[1] |
| 231 | ADD,DC ht_1,%r0,%ret1 ; ht[1]++ | ||
| 232 | LDO 16(a_ptr),a_ptr ; a_ptr += 2 | ||
| 233 | |||
| 234 | STD lt_1,8(r_ptr) ; rp[1] = lt[1] | ||
| 235 | CMPIB,<= 2,num,bn_mul_add_words_unroll2 ; go again if more to do | ||
| 236 | LDO 16(r_ptr),r_ptr ; r_ptr += 2 | ||
| 237 | |||
| 238 | CMPIB,=,N 0,num,bn_mul_add_words_exit ; are we done, or cleanup last one | ||
| 239 | |||
| 240 | ; | ||
| 241 | ; Top of loop aligned on 64-byte boundary | ||
| 242 | ; | ||
| 243 | bn_mul_add_words_single_top | ||
| 244 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 245 | LDD 0(r_ptr),rp_val ; rp[0] | ||
| 246 | LDO 8(a_ptr),a_ptr ; a_ptr++ | ||
| 247 | XMPYU fht_0,fw_l,fm1 ; m1 = ht*fw_l | ||
| 248 | FSTD fm1,-16(%sp) ; -16(sp) = m1 | ||
| 249 | XMPYU flt_0,fw_h,fm ; m = lt*fw_h | ||
| 250 | FSTD fm,-8(%sp) ; -8(sp) = m | ||
| 251 | XMPYU fht_0,fw_h,ht_temp ; ht_temp = ht*fw_h | ||
| 252 | FSTD ht_temp,-24(%sp) ; -24(sp) = ht | ||
| 253 | XMPYU flt_0,fw_l,lt_temp ; lt_temp = lt*fw_l | ||
| 254 | FSTD lt_temp,-32(%sp) ; -32(sp) = lt | ||
| 255 | |||
| 256 | LDD -8(%sp),m_0 | ||
| 257 | LDD -16(%sp),m1_0 ; m1 = temp1 | ||
| 258 | ADD,L m_0,m1_0,tmp_0 ; tmp_0 = m + m1; | ||
| 259 | LDD -24(%sp),ht_0 | ||
| 260 | LDD -32(%sp),lt_0 | ||
| 261 | |||
| 262 | CMPCLR,*>>= tmp_0,m1_0,%r0 ; if (m < m1) | ||
| 263 | ADD,L ht_0,top_overflow,ht_0 ; ht += (1<<32) | ||
| 264 | |||
| 265 | EXTRD,U tmp_0,31,32,m_0 ; m>>32 | ||
| 266 | DEPD,Z tmp_0,31,32,m1_0 ; m1 = m<<32 | ||
| 267 | |||
| 268 | ADD,L ht_0,m_0,ht_0 ; ht+= (m>>32) | ||
| 269 | ADD lt_0,m1_0,tmp_0 ; tmp_0 = lt+m1; | ||
| 270 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 271 | ADD %ret1,tmp_0,lt_0 ; lt = lt + c; | ||
| 272 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 273 | ADD lt_0,rp_val,lt_0 ; lt = lt+rp[0] | ||
| 274 | ADD,DC ht_0,%r0,%ret1 ; ht++ | ||
| 275 | STD lt_0,0(r_ptr) ; rp[0] = lt | ||
| 276 | |||
| 277 | bn_mul_add_words_exit | ||
| 278 | .EXIT | ||
| 279 | |||
| 280 | EXTRD,U %ret1,31,32,%ret0 ; for 32-bit, return in ret0/ret1 | ||
| 281 | LDD -80(%sp),%r9 ; restore r9 | ||
| 282 | LDD -88(%sp),%r8 ; restore r8 | ||
| 283 | LDD -96(%sp),%r7 ; restore r7 | ||
| 284 | LDD -104(%sp),%r6 ; restore r6 | ||
| 285 | LDD -112(%sp),%r5 ; restore r5 | ||
| 286 | LDD -120(%sp),%r4 ; restore r4 | ||
| 287 | BVE (%rp) | ||
| 288 | LDD,MB -128(%sp),%r3 ; restore r3 | ||
| 289 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 290 | |||
| 291 | ;---------------------------------------------------------------------------- | ||
| 292 | ; | ||
| 293 | ;BN_ULONG bn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w) | ||
| 294 | ; | ||
| 295 | ; arg0 = rp | ||
| 296 | ; arg1 = ap | ||
| 297 | ; arg3 = num | ||
| 298 | ; w on stack at -56(sp) | ||
| 299 | |||
| 121 | bn_mul_words | 300 | bn_mul_words |
| 122 | .PROC | 301 | .proc |
| 123 | .CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3 | 302 | .callinfo frame=128 |
| 124 | .ENTRY | 303 | .entry |
| 125 | stw %r2,-20(0,%r30) | 304 | .EXPORT bn_mul_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN |
| 126 | copy %r25,%r2 | 305 | .align 64 |
| 127 | stwm %r4,64(0,%r30) | 306 | |
| 128 | copy %r24,%r19 | 307 | STD %r3,0(%sp) ; save r3 |
| 129 | ldi 0,%r28 | 308 | STD %r4,8(%sp) ; save r4 |
| 130 | stw %r23,-16(0,%r30) | 309 | NOP |
| 131 | ldo 12(%r26),%r31 | 310 | STD %r5,16(%sp) ; save r5 |
| 132 | ldo 12(%r2),%r29 | 311 | |
| 133 | fldws -16(0,%r30),%fr8L | 312 | STD %r6,24(%sp) ; save r6 |
| 134 | L$0026 | 313 | STD %r7,32(%sp) ; save r7 |
| 135 | fldws 0(0,%r2),%fr9L | 314 | COPY %r0,%ret1 ; return 0 by default |
| 136 | xmpyu %fr8L,%fr9L,%fr9 | 315 | DEPDI,Z 1,31,1,top_overflow ; top_overflow = 1 << 32 |
| 137 | fstds %fr9,-16(0,%r30) | 316 | |
| 138 | copy %r28,%r21 | 317 | CMPIB,>= 0,num,bn_mul_words_exit |
| 139 | ldi 0,%r20 | 318 | LDO 128(%sp),%sp ; bump stack |
| 140 | ldw -16(0,%r30),%r24 | 319 | |
| 141 | ldw -12(0,%r30),%r25 | 320 | ; |
| 142 | add %r21,%r25,%r25 | 321 | ; See if only 1 word to do, thus just do cleanup |
| 143 | addc %r20,%r24,%r24 | 322 | ; |
| 144 | copy %r24,%r23 | 323 | CMPIB,= 1,num,bn_mul_words_single_top |
| 145 | ldi 0,%r22 | 324 | FLDD -184(%sp),fw ; (-56-128) load up w into fw (fw_h/fw_l) |
| 146 | copy %r23,%r28 | 325 | |
| 147 | addib,= -1,%r19,L$0027 | 326 | ; |
| 148 | stw %r25,0(0,%r26) | 327 | ; This loop is unrolled 2 times (64-byte aligned as well) |
| 149 | fldws -8(0,%r29),%fr9L | 328 | ; |
| 150 | xmpyu %fr8L,%fr9L,%fr9 | 329 | ; PA-RISC 2.0 chips have two fully pipelined multipliers, thus |
| 151 | fstds %fr9,-16(0,%r30) | 330 | ; two 32-bit mutiplies can be issued per cycle. |
| 152 | copy %r28,%r21 | 331 | ; |
| 153 | ldi 0,%r20 | 332 | bn_mul_words_unroll2 |
| 154 | ldw -16(0,%r30),%r24 | 333 | |
| 155 | ldw -12(0,%r30),%r25 | 334 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) |
| 156 | add %r21,%r25,%r25 | 335 | FLDD 8(a_ptr),t_float_1 ; load up 64-bit value (fr8L) ht(L)/lt(R) |
| 157 | addc %r20,%r24,%r24 | 336 | XMPYU fht_0,fw_l,fm1 ; m1[0] = fht_0*fw_l |
| 158 | copy %r24,%r23 | 337 | XMPYU fht_1,fw_l,fm1_1 ; m1[1] = ht*fw_l |
| 159 | ldi 0,%r22 | 338 | |
| 160 | copy %r23,%r28 | 339 | FSTD fm1,-16(%sp) ; -16(sp) = m1 |
| 161 | addib,= -1,%r19,L$0027 | 340 | FSTD fm1_1,-48(%sp) ; -48(sp) = m1 |
| 162 | stw %r25,-8(0,%r31) | 341 | XMPYU flt_0,fw_h,fm ; m = lt*fw_h |
| 163 | fldws -4(0,%r29),%fr9L | 342 | XMPYU flt_1,fw_h,fm_1 ; m = lt*fw_h |
| 164 | xmpyu %fr8L,%fr9L,%fr9 | 343 | |
| 165 | fstds %fr9,-16(0,%r30) | 344 | FSTD fm,-8(%sp) ; -8(sp) = m |
| 166 | copy %r28,%r21 | 345 | FSTD fm_1,-40(%sp) ; -40(sp) = m |
| 167 | ldi 0,%r20 | 346 | XMPYU fht_0,fw_h,ht_temp ; ht_temp = fht_0*fw_h |
| 168 | ldw -16(0,%r30),%r24 | 347 | XMPYU fht_1,fw_h,ht_temp_1 ; ht_temp = ht*fw_h |
| 169 | ldw -12(0,%r30),%r25 | 348 | |
| 170 | add %r21,%r25,%r25 | 349 | FSTD ht_temp,-24(%sp) ; -24(sp) = ht |
| 171 | addc %r20,%r24,%r24 | 350 | FSTD ht_temp_1,-56(%sp) ; -56(sp) = ht |
| 172 | copy %r24,%r23 | 351 | XMPYU flt_0,fw_l,lt_temp ; lt_temp = lt*fw_l |
| 173 | ldi 0,%r22 | 352 | XMPYU flt_1,fw_l,lt_temp_1 ; lt_temp = lt*fw_l |
| 174 | copy %r23,%r28 | 353 | |
| 175 | addib,= -1,%r19,L$0027 | 354 | FSTD lt_temp,-32(%sp) ; -32(sp) = lt |
| 176 | stw %r25,-4(0,%r31) | 355 | FSTD lt_temp_1,-64(%sp) ; -64(sp) = lt |
| 177 | fldws 0(0,%r29),%fr9L | 356 | LDD -8(%sp),m_0 |
| 178 | xmpyu %fr8L,%fr9L,%fr9 | 357 | LDD -40(%sp),m_1 |
| 179 | fstds %fr9,-16(0,%r30) | 358 | |
| 180 | copy %r28,%r21 | 359 | LDD -16(%sp),m1_0 |
| 181 | ldi 0,%r20 | 360 | LDD -48(%sp),m1_1 |
| 182 | ldw -16(0,%r30),%r24 | 361 | LDD -24(%sp),ht_0 |
| 183 | ldw -12(0,%r30),%r25 | 362 | LDD -56(%sp),ht_1 |
| 184 | add %r21,%r25,%r25 | 363 | |
| 185 | addc %r20,%r24,%r24 | 364 | ADD,L m1_0,m_0,tmp_0 ; tmp_0 = m + m1; |
| 186 | copy %r24,%r23 | 365 | ADD,L m1_1,m_1,tmp_1 ; tmp_1 = m + m1; |
| 187 | ldi 0,%r22 | 366 | LDD -32(%sp),lt_0 |
| 188 | copy %r23,%r28 | 367 | LDD -64(%sp),lt_1 |
| 189 | addib,= -1,%r19,L$0027 | 368 | |
| 190 | stw %r25,0(0,%r31) | 369 | CMPCLR,*>>= tmp_0,m1_0, %r0 ; if (m < m1) |
| 191 | ldo 16(%r29),%r29 | 370 | ADD,L ht_0,top_overflow,ht_0 ; ht += (1<<32) |
| 192 | ldo 16(%r2),%r2 | 371 | CMPCLR,*>>= tmp_1,m1_1,%r0 ; if (m < m1) |
| 193 | ldo 16(%r31),%r31 | 372 | ADD,L ht_1,top_overflow,ht_1 ; ht += (1<<32) |
| 194 | bl L$0026,0 | 373 | |
| 195 | ldo 16(%r26),%r26 | 374 | EXTRD,U tmp_0,31,32,m_0 ; m>>32 |
| 196 | L$0027 | 375 | DEPD,Z tmp_0,31,32,m1_0 ; m1 = m<<32 |
| 197 | ldw -84(0,%r30),%r2 | 376 | EXTRD,U tmp_1,31,32,m_1 ; m>>32 |
| 198 | bv 0(%r2) | 377 | DEPD,Z tmp_1,31,32,m1_1 ; m1 = m<<32 |
| 199 | ldwm -64(0,%r30),%r4 | 378 | |
| 200 | .EXIT | 379 | ADD,L ht_0,m_0,ht_0 ; ht+= (m>>32) |
| 201 | .PROCEND | 380 | ADD,L ht_1,m_1,ht_1 ; ht+= (m>>32) |
| 202 | .align 4 | 381 | ADD lt_0,m1_0,lt_0 ; lt = lt+m1; |
| 203 | .EXPORT bn_sqr_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR | 382 | ADD,DC ht_0,%r0,ht_0 ; ht++ |
| 383 | |||
| 384 | ADD lt_1,m1_1,lt_1 ; lt = lt+m1; | ||
| 385 | ADD,DC ht_1,%r0,ht_1 ; ht++ | ||
| 386 | ADD %ret1,lt_0,lt_0 ; lt = lt + c (ret1); | ||
| 387 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 388 | |||
| 389 | ADD ht_0,lt_1,lt_1 ; lt = lt + c (ht_0) | ||
| 390 | ADD,DC ht_1,%r0,ht_1 ; ht++ | ||
| 391 | STD lt_0,0(r_ptr) ; rp[0] = lt | ||
| 392 | STD lt_1,8(r_ptr) ; rp[1] = lt | ||
| 393 | |||
| 394 | COPY ht_1,%ret1 ; carry = ht | ||
| 395 | LDO -2(num),num ; num = num - 2; | ||
| 396 | LDO 16(a_ptr),a_ptr ; ap += 2 | ||
| 397 | CMPIB,<= 2,num,bn_mul_words_unroll2 | ||
| 398 | LDO 16(r_ptr),r_ptr ; rp++ | ||
| 399 | |||
| 400 | CMPIB,=,N 0,num,bn_mul_words_exit ; are we done? | ||
| 401 | |||
| 402 | ; | ||
| 403 | ; Top of loop aligned on 64-byte boundary | ||
| 404 | ; | ||
| 405 | bn_mul_words_single_top | ||
| 406 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 407 | |||
| 408 | XMPYU fht_0,fw_l,fm1 ; m1 = ht*fw_l | ||
| 409 | FSTD fm1,-16(%sp) ; -16(sp) = m1 | ||
| 410 | XMPYU flt_0,fw_h,fm ; m = lt*fw_h | ||
| 411 | FSTD fm,-8(%sp) ; -8(sp) = m | ||
| 412 | XMPYU fht_0,fw_h,ht_temp ; ht_temp = ht*fw_h | ||
| 413 | FSTD ht_temp,-24(%sp) ; -24(sp) = ht | ||
| 414 | XMPYU flt_0,fw_l,lt_temp ; lt_temp = lt*fw_l | ||
| 415 | FSTD lt_temp,-32(%sp) ; -32(sp) = lt | ||
| 416 | |||
| 417 | LDD -8(%sp),m_0 | ||
| 418 | LDD -16(%sp),m1_0 | ||
| 419 | ADD,L m_0,m1_0,tmp_0 ; tmp_0 = m + m1; | ||
| 420 | LDD -24(%sp),ht_0 | ||
| 421 | LDD -32(%sp),lt_0 | ||
| 422 | |||
| 423 | CMPCLR,*>>= tmp_0,m1_0,%r0 ; if (m < m1) | ||
| 424 | ADD,L ht_0,top_overflow,ht_0 ; ht += (1<<32) | ||
| 425 | |||
| 426 | EXTRD,U tmp_0,31,32,m_0 ; m>>32 | ||
| 427 | DEPD,Z tmp_0,31,32,m1_0 ; m1 = m<<32 | ||
| 428 | |||
| 429 | ADD,L ht_0,m_0,ht_0 ; ht+= (m>>32) | ||
| 430 | ADD lt_0,m1_0,lt_0 ; lt= lt+m1; | ||
| 431 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 432 | |||
| 433 | ADD %ret1,lt_0,lt_0 ; lt = lt + c; | ||
| 434 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 435 | |||
| 436 | COPY ht_0,%ret1 ; copy carry | ||
| 437 | STD lt_0,0(r_ptr) ; rp[0] = lt | ||
| 438 | |||
| 439 | bn_mul_words_exit | ||
| 440 | .EXIT | ||
| 441 | EXTRD,U %ret1,31,32,%ret0 ; for 32-bit, return in ret0/ret1 | ||
| 442 | LDD -96(%sp),%r7 ; restore r7 | ||
| 443 | LDD -104(%sp),%r6 ; restore r6 | ||
| 444 | LDD -112(%sp),%r5 ; restore r5 | ||
| 445 | LDD -120(%sp),%r4 ; restore r4 | ||
| 446 | BVE (%rp) | ||
| 447 | LDD,MB -128(%sp),%r3 ; restore r3 | ||
| 448 | .PROCEND | ||
| 449 | |||
| 450 | ;---------------------------------------------------------------------------- | ||
| 451 | ; | ||
| 452 | ;void bn_sqr_words(BN_ULONG *rp, BN_ULONG *ap, int num) | ||
| 453 | ; | ||
| 454 | ; arg0 = rp | ||
| 455 | ; arg1 = ap | ||
| 456 | ; arg2 = num | ||
| 457 | ; | ||
| 458 | |||
| 204 | bn_sqr_words | 459 | bn_sqr_words |
| 460 | .proc | ||
| 461 | .callinfo FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE | ||
| 462 | .EXPORT bn_sqr_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 463 | .entry | ||
| 464 | .align 64 | ||
| 465 | |||
| 466 | STD %r3,0(%sp) ; save r3 | ||
| 467 | STD %r4,8(%sp) ; save r4 | ||
| 468 | NOP | ||
| 469 | STD %r5,16(%sp) ; save r5 | ||
| 470 | |||
| 471 | CMPIB,>= 0,num,bn_sqr_words_exit | ||
| 472 | LDO 128(%sp),%sp ; bump stack | ||
| 473 | |||
| 474 | ; | ||
| 475 | ; If only 1, the goto straight to cleanup | ||
| 476 | ; | ||
| 477 | CMPIB,= 1,num,bn_sqr_words_single_top | ||
| 478 | DEPDI,Z -1,32,33,high_mask ; Create Mask 0xffffffff80000000L | ||
| 479 | |||
| 480 | ; | ||
| 481 | ; This loop is unrolled 2 times (64-byte aligned as well) | ||
| 482 | ; | ||
| 483 | |||
| 484 | bn_sqr_words_unroll2 | ||
| 485 | FLDD 0(a_ptr),t_float_0 ; a[0] | ||
| 486 | FLDD 8(a_ptr),t_float_1 ; a[1] | ||
| 487 | XMPYU fht_0,flt_0,fm ; m[0] | ||
| 488 | XMPYU fht_1,flt_1,fm_1 ; m[1] | ||
| 489 | |||
| 490 | FSTD fm,-24(%sp) ; store m[0] | ||
| 491 | FSTD fm_1,-56(%sp) ; store m[1] | ||
| 492 | XMPYU flt_0,flt_0,lt_temp ; lt[0] | ||
| 493 | XMPYU flt_1,flt_1,lt_temp_1 ; lt[1] | ||
| 494 | |||
| 495 | FSTD lt_temp,-16(%sp) ; store lt[0] | ||
| 496 | FSTD lt_temp_1,-48(%sp) ; store lt[1] | ||
| 497 | XMPYU fht_0,fht_0,ht_temp ; ht[0] | ||
| 498 | XMPYU fht_1,fht_1,ht_temp_1 ; ht[1] | ||
| 499 | |||
| 500 | FSTD ht_temp,-8(%sp) ; store ht[0] | ||
| 501 | FSTD ht_temp_1,-40(%sp) ; store ht[1] | ||
| 502 | LDD -24(%sp),m_0 | ||
| 503 | LDD -56(%sp),m_1 | ||
| 504 | |||
| 505 | AND m_0,high_mask,tmp_0 ; m[0] & Mask | ||
| 506 | AND m_1,high_mask,tmp_1 ; m[1] & Mask | ||
| 507 | DEPD,Z m_0,30,31,m_0 ; m[0] << 32+1 | ||
| 508 | DEPD,Z m_1,30,31,m_1 ; m[1] << 32+1 | ||
| 509 | |||
| 510 | LDD -16(%sp),lt_0 | ||
| 511 | LDD -48(%sp),lt_1 | ||
| 512 | EXTRD,U tmp_0,32,33,tmp_0 ; tmp_0 = m[0]&Mask >> 32-1 | ||
| 513 | EXTRD,U tmp_1,32,33,tmp_1 ; tmp_1 = m[1]&Mask >> 32-1 | ||
| 514 | |||
| 515 | LDD -8(%sp),ht_0 | ||
| 516 | LDD -40(%sp),ht_1 | ||
| 517 | ADD,L ht_0,tmp_0,ht_0 ; ht[0] += tmp_0 | ||
| 518 | ADD,L ht_1,tmp_1,ht_1 ; ht[1] += tmp_1 | ||
| 519 | |||
| 520 | ADD lt_0,m_0,lt_0 ; lt = lt+m | ||
| 521 | ADD,DC ht_0,%r0,ht_0 ; ht[0]++ | ||
| 522 | STD lt_0,0(r_ptr) ; rp[0] = lt[0] | ||
| 523 | STD ht_0,8(r_ptr) ; rp[1] = ht[1] | ||
| 524 | |||
| 525 | ADD lt_1,m_1,lt_1 ; lt = lt+m | ||
| 526 | ADD,DC ht_1,%r0,ht_1 ; ht[1]++ | ||
| 527 | STD lt_1,16(r_ptr) ; rp[2] = lt[1] | ||
| 528 | STD ht_1,24(r_ptr) ; rp[3] = ht[1] | ||
| 529 | |||
| 530 | LDO -2(num),num ; num = num - 2; | ||
| 531 | LDO 16(a_ptr),a_ptr ; ap += 2 | ||
| 532 | CMPIB,<= 2,num,bn_sqr_words_unroll2 | ||
| 533 | LDO 32(r_ptr),r_ptr ; rp += 4 | ||
| 534 | |||
| 535 | CMPIB,=,N 0,num,bn_sqr_words_exit ; are we done? | ||
| 536 | |||
| 537 | ; | ||
| 538 | ; Top of loop aligned on 64-byte boundary | ||
| 539 | ; | ||
| 540 | bn_sqr_words_single_top | ||
| 541 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 542 | |||
| 543 | XMPYU fht_0,flt_0,fm ; m | ||
| 544 | FSTD fm,-24(%sp) ; store m | ||
| 545 | |||
| 546 | XMPYU flt_0,flt_0,lt_temp ; lt | ||
| 547 | FSTD lt_temp,-16(%sp) ; store lt | ||
| 548 | |||
| 549 | XMPYU fht_0,fht_0,ht_temp ; ht | ||
| 550 | FSTD ht_temp,-8(%sp) ; store ht | ||
| 551 | |||
| 552 | LDD -24(%sp),m_0 ; load m | ||
| 553 | AND m_0,high_mask,tmp_0 ; m & Mask | ||
| 554 | DEPD,Z m_0,30,31,m_0 ; m << 32+1 | ||
| 555 | LDD -16(%sp),lt_0 ; lt | ||
| 556 | |||
| 557 | LDD -8(%sp),ht_0 ; ht | ||
| 558 | EXTRD,U tmp_0,32,33,tmp_0 ; tmp_0 = m&Mask >> 32-1 | ||
| 559 | ADD m_0,lt_0,lt_0 ; lt = lt+m | ||
| 560 | ADD,L ht_0,tmp_0,ht_0 ; ht += tmp_0 | ||
| 561 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 562 | |||
| 563 | STD lt_0,0(r_ptr) ; rp[0] = lt | ||
| 564 | STD ht_0,8(r_ptr) ; rp[1] = ht | ||
| 565 | |||
| 566 | bn_sqr_words_exit | ||
| 567 | .EXIT | ||
| 568 | LDD -112(%sp),%r5 ; restore r5 | ||
| 569 | LDD -120(%sp),%r4 ; restore r4 | ||
| 570 | BVE (%rp) | ||
| 571 | LDD,MB -128(%sp),%r3 | ||
| 572 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 573 | |||
| 574 | |||
| 575 | ;---------------------------------------------------------------------------- | ||
| 576 | ; | ||
| 577 | ;BN_ULONG bn_add_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) | ||
| 578 | ; | ||
| 579 | ; arg0 = rp | ||
| 580 | ; arg1 = ap | ||
| 581 | ; arg2 = bp | ||
| 582 | ; arg3 = n | ||
| 583 | |||
| 584 | t .reg %r22 | ||
| 585 | b .reg %r21 | ||
| 586 | l .reg %r20 | ||
| 587 | |||
| 588 | bn_add_words | ||
| 589 | .proc | ||
| 590 | .entry | ||
| 591 | .callinfo | ||
| 592 | .EXPORT bn_add_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 593 | .align 64 | ||
| 594 | |||
| 595 | CMPIB,>= 0,n,bn_add_words_exit | ||
| 596 | COPY %r0,%ret1 ; return 0 by default | ||
| 597 | |||
| 598 | ; | ||
| 599 | ; If 2 or more numbers do the loop | ||
| 600 | ; | ||
| 601 | CMPIB,= 1,n,bn_add_words_single_top | ||
| 602 | NOP | ||
| 603 | |||
| 604 | ; | ||
| 605 | ; This loop is unrolled 2 times (64-byte aligned as well) | ||
| 606 | ; | ||
| 607 | bn_add_words_unroll2 | ||
| 608 | LDD 0(a_ptr),t | ||
| 609 | LDD 0(b_ptr),b | ||
| 610 | ADD t,%ret1,t ; t = t+c; | ||
| 611 | ADD,DC %r0,%r0,%ret1 ; set c to carry | ||
| 612 | ADD t,b,l ; l = t + b[0] | ||
| 613 | ADD,DC %ret1,%r0,%ret1 ; c+= carry | ||
| 614 | STD l,0(r_ptr) | ||
| 615 | |||
| 616 | LDD 8(a_ptr),t | ||
| 617 | LDD 8(b_ptr),b | ||
| 618 | ADD t,%ret1,t ; t = t+c; | ||
| 619 | ADD,DC %r0,%r0,%ret1 ; set c to carry | ||
| 620 | ADD t,b,l ; l = t + b[0] | ||
| 621 | ADD,DC %ret1,%r0,%ret1 ; c+= carry | ||
| 622 | STD l,8(r_ptr) | ||
| 623 | |||
| 624 | LDO -2(n),n | ||
| 625 | LDO 16(a_ptr),a_ptr | ||
| 626 | LDO 16(b_ptr),b_ptr | ||
| 627 | |||
| 628 | CMPIB,<= 2,n,bn_add_words_unroll2 | ||
| 629 | LDO 16(r_ptr),r_ptr | ||
| 630 | |||
| 631 | CMPIB,=,N 0,n,bn_add_words_exit ; are we done? | ||
| 632 | |||
| 633 | bn_add_words_single_top | ||
| 634 | LDD 0(a_ptr),t | ||
| 635 | LDD 0(b_ptr),b | ||
| 636 | |||
| 637 | ADD t,%ret1,t ; t = t+c; | ||
| 638 | ADD,DC %r0,%r0,%ret1 ; set c to carry (could use CMPCLR??) | ||
| 639 | ADD t,b,l ; l = t + b[0] | ||
| 640 | ADD,DC %ret1,%r0,%ret1 ; c+= carry | ||
| 641 | STD l,0(r_ptr) | ||
| 642 | |||
| 643 | bn_add_words_exit | ||
| 644 | .EXIT | ||
| 645 | BVE (%rp) | ||
| 646 | EXTRD,U %ret1,31,32,%ret0 ; for 32-bit, return in ret0/ret1 | ||
| 647 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 648 | |||
| 649 | ;---------------------------------------------------------------------------- | ||
| 650 | ; | ||
| 651 | ;BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) | ||
| 652 | ; | ||
| 653 | ; arg0 = rp | ||
| 654 | ; arg1 = ap | ||
| 655 | ; arg2 = bp | ||
| 656 | ; arg3 = n | ||
| 657 | |||
| 658 | t1 .reg %r22 | ||
| 659 | t2 .reg %r21 | ||
| 660 | sub_tmp1 .reg %r20 | ||
| 661 | sub_tmp2 .reg %r19 | ||
| 662 | |||
| 663 | |||
| 664 | bn_sub_words | ||
| 665 | .proc | ||
| 666 | .callinfo | ||
| 667 | .EXPORT bn_sub_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 668 | .entry | ||
| 669 | .align 64 | ||
| 670 | |||
| 671 | CMPIB,>= 0,n,bn_sub_words_exit | ||
| 672 | COPY %r0,%ret1 ; return 0 by default | ||
| 673 | |||
| 674 | ; | ||
| 675 | ; If 2 or more numbers do the loop | ||
| 676 | ; | ||
| 677 | CMPIB,= 1,n,bn_sub_words_single_top | ||
| 678 | NOP | ||
| 679 | |||
| 680 | ; | ||
| 681 | ; This loop is unrolled 2 times (64-byte aligned as well) | ||
| 682 | ; | ||
| 683 | bn_sub_words_unroll2 | ||
| 684 | LDD 0(a_ptr),t1 | ||
| 685 | LDD 0(b_ptr),t2 | ||
| 686 | SUB t1,t2,sub_tmp1 ; t3 = t1-t2; | ||
| 687 | SUB sub_tmp1,%ret1,sub_tmp1 ; t3 = t3- c; | ||
| 688 | |||
| 689 | CMPCLR,*>> t1,t2,sub_tmp2 ; clear if t1 > t2 | ||
| 690 | LDO 1(%r0),sub_tmp2 | ||
| 691 | |||
| 692 | CMPCLR,*= t1,t2,%r0 | ||
| 693 | COPY sub_tmp2,%ret1 | ||
| 694 | STD sub_tmp1,0(r_ptr) | ||
| 695 | |||
| 696 | LDD 8(a_ptr),t1 | ||
| 697 | LDD 8(b_ptr),t2 | ||
| 698 | SUB t1,t2,sub_tmp1 ; t3 = t1-t2; | ||
| 699 | SUB sub_tmp1,%ret1,sub_tmp1 ; t3 = t3- c; | ||
| 700 | CMPCLR,*>> t1,t2,sub_tmp2 ; clear if t1 > t2 | ||
| 701 | LDO 1(%r0),sub_tmp2 | ||
| 702 | |||
| 703 | CMPCLR,*= t1,t2,%r0 | ||
| 704 | COPY sub_tmp2,%ret1 | ||
| 705 | STD sub_tmp1,8(r_ptr) | ||
| 706 | |||
| 707 | LDO -2(n),n | ||
| 708 | LDO 16(a_ptr),a_ptr | ||
| 709 | LDO 16(b_ptr),b_ptr | ||
| 710 | |||
| 711 | CMPIB,<= 2,n,bn_sub_words_unroll2 | ||
| 712 | LDO 16(r_ptr),r_ptr | ||
| 713 | |||
| 714 | CMPIB,=,N 0,n,bn_sub_words_exit ; are we done? | ||
| 715 | |||
| 716 | bn_sub_words_single_top | ||
| 717 | LDD 0(a_ptr),t1 | ||
| 718 | LDD 0(b_ptr),t2 | ||
| 719 | SUB t1,t2,sub_tmp1 ; t3 = t1-t2; | ||
| 720 | SUB sub_tmp1,%ret1,sub_tmp1 ; t3 = t3- c; | ||
| 721 | CMPCLR,*>> t1,t2,sub_tmp2 ; clear if t1 > t2 | ||
| 722 | LDO 1(%r0),sub_tmp2 | ||
| 723 | |||
| 724 | CMPCLR,*= t1,t2,%r0 | ||
| 725 | COPY sub_tmp2,%ret1 | ||
| 726 | |||
| 727 | STD sub_tmp1,0(r_ptr) | ||
| 728 | |||
| 729 | bn_sub_words_exit | ||
| 730 | .EXIT | ||
| 731 | BVE (%rp) | ||
| 732 | EXTRD,U %ret1,31,32,%ret0 ; for 32-bit, return in ret0/ret1 | ||
| 733 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 734 | |||
| 735 | ;------------------------------------------------------------------------------ | ||
| 736 | ; | ||
| 737 | ; unsigned long bn_div_words(unsigned long h, unsigned long l, unsigned long d) | ||
| 738 | ; | ||
| 739 | ; arg0 = h | ||
| 740 | ; arg1 = l | ||
| 741 | ; arg2 = d | ||
| 742 | ; | ||
| 743 | ; This is mainly just output from the HP C compiler. | ||
| 744 | ; | ||
| 745 | ;------------------------------------------------------------------------------ | ||
| 746 | bn_div_words | ||
| 205 | .PROC | 747 | .PROC |
| 206 | .CALLINFO FRAME=0,NO_CALLS | 748 | .EXPORT bn_div_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR,LONG_RETURN |
| 207 | .ENTRY | 749 | .IMPORT BN_num_bits_word,CODE |
| 208 | ldo 28(%r26),%r19 | 750 | .IMPORT __iob,DATA |
| 209 | ldo 12(%r25),%r28 | 751 | .IMPORT fprintf,CODE |
| 210 | L$0042 | 752 | .IMPORT abort,CODE |
| 211 | fldws 0(0,%r25),%fr8L | 753 | .IMPORT $$div2U,MILLICODE |
| 212 | fldws 0(0,%r25),%fr8R | 754 | .CALLINFO CALLER,FRAME=144,ENTRY_GR=%r9,SAVE_RP,ARGS_SAVED,ORDERING_AWARE |
| 213 | xmpyu %fr8L,%fr8R,%fr8 | 755 | .ENTRY |
| 214 | fstds %fr8,-16(0,%r30) | 756 | STW %r2,-20(%r30) ;offset 0x8ec |
| 215 | ldw -16(0,%r30),%r22 | 757 | STW,MA %r3,192(%r30) ;offset 0x8f0 |
| 216 | ldw -12(0,%r30),%r23 | 758 | STW %r4,-188(%r30) ;offset 0x8f4 |
| 217 | stw %r23,0(0,%r26) | 759 | DEPD %r5,31,32,%r6 ;offset 0x8f8 |
| 218 | copy %r22,%r21 | 760 | STD %r6,-184(%r30) ;offset 0x8fc |
| 219 | ldi 0,%r20 | 761 | DEPD %r7,31,32,%r8 ;offset 0x900 |
| 220 | addib,= -1,%r24,L$0049 | 762 | STD %r8,-176(%r30) ;offset 0x904 |
| 221 | stw %r21,-24(0,%r19) | 763 | STW %r9,-168(%r30) ;offset 0x908 |
| 222 | fldws -8(0,%r28),%fr8L | 764 | LDD -248(%r30),%r3 ;offset 0x90c |
| 223 | fldws -8(0,%r28),%fr8R | 765 | COPY %r26,%r4 ;offset 0x910 |
| 224 | xmpyu %fr8L,%fr8R,%fr8 | 766 | COPY %r24,%r5 ;offset 0x914 |
| 225 | fstds %fr8,-16(0,%r30) | 767 | DEPD %r25,31,32,%r4 ;offset 0x918 |
| 226 | ldw -16(0,%r30),%r22 | 768 | CMPB,*<> %r3,%r0,$0006000C ;offset 0x91c |
| 227 | ldw -12(0,%r30),%r23 | 769 | DEPD %r23,31,32,%r5 ;offset 0x920 |
| 228 | stw %r23,-20(0,%r19) | 770 | MOVIB,TR -1,%r29,$00060002 ;offset 0x924 |
| 229 | copy %r22,%r21 | 771 | EXTRD,U %r29,31,32,%r28 ;offset 0x928 |
| 230 | ldi 0,%r20 | 772 | $0006002A |
| 231 | addib,= -1,%r24,L$0049 | 773 | LDO -1(%r29),%r29 ;offset 0x92c |
| 232 | stw %r21,-16(0,%r19) | 774 | SUB %r23,%r7,%r23 ;offset 0x930 |
| 233 | fldws -4(0,%r28),%fr8L | 775 | $00060024 |
| 234 | fldws -4(0,%r28),%fr8R | 776 | SUB %r4,%r31,%r25 ;offset 0x934 |
| 235 | xmpyu %fr8L,%fr8R,%fr8 | 777 | AND %r25,%r19,%r26 ;offset 0x938 |
| 236 | fstds %fr8,-16(0,%r30) | 778 | CMPB,*<>,N %r0,%r26,$00060046 ;offset 0x93c |
| 237 | ldw -16(0,%r30),%r22 | 779 | DEPD,Z %r25,31,32,%r20 ;offset 0x940 |
| 238 | ldw -12(0,%r30),%r23 | 780 | OR %r20,%r24,%r21 ;offset 0x944 |
| 239 | stw %r23,-12(0,%r19) | 781 | CMPB,*<<,N %r21,%r23,$0006002A ;offset 0x948 |
| 240 | copy %r22,%r21 | 782 | SUB %r31,%r2,%r31 ;offset 0x94c |
| 241 | ldi 0,%r20 | 783 | $00060046 |
| 242 | addib,= -1,%r24,L$0049 | 784 | $0006002E |
| 243 | stw %r21,-8(0,%r19) | 785 | DEPD,Z %r23,31,32,%r25 ;offset 0x950 |
| 244 | fldws 0(0,%r28),%fr8L | 786 | EXTRD,U %r23,31,32,%r26 ;offset 0x954 |
| 245 | fldws 0(0,%r28),%fr8R | 787 | AND %r25,%r19,%r24 ;offset 0x958 |
| 246 | xmpyu %fr8L,%fr8R,%fr8 | 788 | ADD,L %r31,%r26,%r31 ;offset 0x95c |
| 247 | fstds %fr8,-16(0,%r30) | 789 | CMPCLR,*>>= %r5,%r24,%r0 ;offset 0x960 |
| 248 | ldw -16(0,%r30),%r22 | 790 | LDO 1(%r31),%r31 ;offset 0x964 |
| 249 | ldw -12(0,%r30),%r23 | 791 | $00060032 |
| 250 | stw %r23,-4(0,%r19) | 792 | CMPB,*<<=,N %r31,%r4,$00060036 ;offset 0x968 |
| 251 | copy %r22,%r21 | 793 | LDO -1(%r29),%r29 ;offset 0x96c |
| 252 | ldi 0,%r20 | 794 | ADD,L %r4,%r3,%r4 ;offset 0x970 |
| 253 | addib,= -1,%r24,L$0049 | 795 | $00060036 |
| 254 | stw %r21,0(0,%r19) | 796 | ADDIB,=,N -1,%r8,$D0 ;offset 0x974 |
| 255 | ldo 16(%r28),%r28 | 797 | SUB %r5,%r24,%r28 ;offset 0x978 |
| 256 | ldo 16(%r25),%r25 | 798 | $0006003A |
| 257 | ldo 32(%r19),%r19 | 799 | SUB %r4,%r31,%r24 ;offset 0x97c |
| 258 | bl L$0042,0 | 800 | SHRPD %r24,%r28,32,%r4 ;offset 0x980 |
| 259 | ldo 32(%r26),%r26 | 801 | DEPD,Z %r29,31,32,%r9 ;offset 0x984 |
| 260 | L$0049 | 802 | DEPD,Z %r28,31,32,%r5 ;offset 0x988 |
| 261 | bv,n 0(%r2) | 803 | $0006001C |
| 262 | .EXIT | 804 | EXTRD,U %r4,31,32,%r31 ;offset 0x98c |
| 263 | .PROCEND | 805 | CMPB,*<>,N %r31,%r2,$00060020 ;offset 0x990 |
| 264 | .IMPORT BN_num_bits_word,CODE | 806 | MOVB,TR %r6,%r29,$D1 ;offset 0x994 |
| 265 | .IMPORT fprintf,CODE | 807 | STD %r29,-152(%r30) ;offset 0x998 |
| 266 | .IMPORT __iob,DATA | 808 | $0006000C |
| 267 | .SPACE $TEXT$ | 809 | EXTRD,U %r3,31,32,%r25 ;offset 0x99c |
| 268 | .SUBSPA $LIT$ | 810 | COPY %r3,%r26 ;offset 0x9a0 |
| 269 | 811 | EXTRD,U %r3,31,32,%r9 ;offset 0x9a4 | |
| 270 | .align 4 | 812 | EXTRD,U %r4,31,32,%r8 ;offset 0x9a8 |
| 271 | L$C0000 | 813 | .CALL ARGW0=GR,ARGW1=GR,RTNVAL=GR ;in=25,26;out=28; |
| 272 | .STRING "Division would overflow (%d)\x0a\x00" | 814 | B,L BN_num_bits_word,%r2 ;offset 0x9ac |
| 273 | .IMPORT abort,CODE | 815 | EXTRD,U %r5,31,32,%r7 ;offset 0x9b0 |
| 274 | .SPACE $TEXT$ | 816 | LDI 64,%r20 ;offset 0x9b4 |
| 275 | .SUBSPA $CODE$ | 817 | DEPD %r7,31,32,%r5 ;offset 0x9b8 |
| 276 | 818 | DEPD %r8,31,32,%r4 ;offset 0x9bc | |
| 277 | .align 4 | 819 | DEPD %r9,31,32,%r3 ;offset 0x9c0 |
| 278 | .EXPORT bn_div64,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR | 820 | CMPB,= %r28,%r20,$00060012 ;offset 0x9c4 |
| 279 | bn_div64 | 821 | COPY %r28,%r24 ;offset 0x9c8 |
| 822 | MTSARCM %r24 ;offset 0x9cc | ||
| 823 | DEPDI,Z -1,%sar,1,%r19 ;offset 0x9d0 | ||
| 824 | CMPB,*>>,N %r4,%r19,$D2 ;offset 0x9d4 | ||
| 825 | $00060012 | ||
| 826 | SUBI 64,%r24,%r31 ;offset 0x9d8 | ||
| 827 | CMPCLR,*<< %r4,%r3,%r0 ;offset 0x9dc | ||
| 828 | SUB %r4,%r3,%r4 ;offset 0x9e0 | ||
| 829 | $00060016 | ||
| 830 | CMPB,= %r31,%r0,$0006001A ;offset 0x9e4 | ||
| 831 | COPY %r0,%r9 ;offset 0x9e8 | ||
| 832 | MTSARCM %r31 ;offset 0x9ec | ||
| 833 | DEPD,Z %r3,%sar,64,%r3 ;offset 0x9f0 | ||
| 834 | SUBI 64,%r31,%r26 ;offset 0x9f4 | ||
| 835 | MTSAR %r26 ;offset 0x9f8 | ||
| 836 | SHRPD %r4,%r5,%sar,%r4 ;offset 0x9fc | ||
| 837 | MTSARCM %r31 ;offset 0xa00 | ||
| 838 | DEPD,Z %r5,%sar,64,%r5 ;offset 0xa04 | ||
| 839 | $0006001A | ||
| 840 | DEPDI,Z -1,31,32,%r19 ;offset 0xa08 | ||
| 841 | AND %r3,%r19,%r29 ;offset 0xa0c | ||
| 842 | EXTRD,U %r29,31,32,%r2 ;offset 0xa10 | ||
| 843 | DEPDI,Z -1,63,32,%r6 ;offset 0xa14 | ||
| 844 | MOVIB,TR 2,%r8,$0006001C ;offset 0xa18 | ||
| 845 | EXTRD,U %r3,63,32,%r7 ;offset 0xa1c | ||
| 846 | $D2 | ||
| 847 | ADDIL LR'__iob-$global$,%r27,%r1 ;offset 0xa20 | ||
| 848 | LDIL LR'C$7,%r21 ;offset 0xa24 | ||
| 849 | LDO RR'__iob-$global$+32(%r1),%r26 ;offset 0xa28 | ||
| 850 | .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR ;in=24,25,26;out=28; | ||
| 851 | B,L fprintf,%r2 ;offset 0xa2c | ||
| 852 | LDO RR'C$7(%r21),%r25 ;offset 0xa30 | ||
| 853 | .CALL ; | ||
| 854 | B,L abort,%r2 ;offset 0xa34 | ||
| 855 | NOP ;offset 0xa38 | ||
| 856 | B $D3 ;offset 0xa3c | ||
| 857 | LDW -212(%r30),%r2 ;offset 0xa40 | ||
| 858 | $00060020 | ||
| 859 | COPY %r4,%r26 ;offset 0xa44 | ||
| 860 | EXTRD,U %r4,31,32,%r25 ;offset 0xa48 | ||
| 861 | COPY %r2,%r24 ;offset 0xa4c | ||
| 862 | .CALL ;in=23,24,25,26;out=20,21,22,28,29; (MILLICALL) | ||
| 863 | B,L $$div2U,%r31 ;offset 0xa50 | ||
| 864 | EXTRD,U %r2,31,32,%r23 ;offset 0xa54 | ||
| 865 | DEPD %r28,31,32,%r29 ;offset 0xa58 | ||
| 866 | $00060022 | ||
| 867 | STD %r29,-152(%r30) ;offset 0xa5c | ||
| 868 | $D1 | ||
| 869 | AND %r5,%r19,%r24 ;offset 0xa60 | ||
| 870 | EXTRD,U %r24,31,32,%r24 ;offset 0xa64 | ||
| 871 | STW %r2,-160(%r30) ;offset 0xa68 | ||
| 872 | STW %r7,-128(%r30) ;offset 0xa6c | ||
| 873 | FLDD -152(%r30),%fr4 ;offset 0xa70 | ||
| 874 | FLDD -152(%r30),%fr7 ;offset 0xa74 | ||
| 875 | FLDW -160(%r30),%fr8L ;offset 0xa78 | ||
| 876 | FLDW -128(%r30),%fr5L ;offset 0xa7c | ||
| 877 | XMPYU %fr8L,%fr7L,%fr10 ;offset 0xa80 | ||
| 878 | FSTD %fr10,-136(%r30) ;offset 0xa84 | ||
| 879 | XMPYU %fr8L,%fr7R,%fr22 ;offset 0xa88 | ||
| 880 | FSTD %fr22,-144(%r30) ;offset 0xa8c | ||
| 881 | XMPYU %fr5L,%fr4L,%fr11 ;offset 0xa90 | ||
| 882 | XMPYU %fr5L,%fr4R,%fr23 ;offset 0xa94 | ||
| 883 | FSTD %fr11,-112(%r30) ;offset 0xa98 | ||
| 884 | FSTD %fr23,-120(%r30) ;offset 0xa9c | ||
| 885 | LDD -136(%r30),%r28 ;offset 0xaa0 | ||
| 886 | DEPD,Z %r28,31,32,%r31 ;offset 0xaa4 | ||
| 887 | LDD -144(%r30),%r20 ;offset 0xaa8 | ||
| 888 | ADD,L %r20,%r31,%r31 ;offset 0xaac | ||
| 889 | LDD -112(%r30),%r22 ;offset 0xab0 | ||
| 890 | DEPD,Z %r22,31,32,%r22 ;offset 0xab4 | ||
| 891 | LDD -120(%r30),%r21 ;offset 0xab8 | ||
| 892 | B $00060024 ;offset 0xabc | ||
| 893 | ADD,L %r21,%r22,%r23 ;offset 0xac0 | ||
| 894 | $D0 | ||
| 895 | OR %r9,%r29,%r29 ;offset 0xac4 | ||
| 896 | $00060040 | ||
| 897 | EXTRD,U %r29,31,32,%r28 ;offset 0xac8 | ||
| 898 | $00060002 | ||
| 899 | $L2 | ||
| 900 | LDW -212(%r30),%r2 ;offset 0xacc | ||
| 901 | $D3 | ||
| 902 | LDW -168(%r30),%r9 ;offset 0xad0 | ||
| 903 | LDD -176(%r30),%r8 ;offset 0xad4 | ||
| 904 | EXTRD,U %r8,31,32,%r7 ;offset 0xad8 | ||
| 905 | LDD -184(%r30),%r6 ;offset 0xadc | ||
| 906 | EXTRD,U %r6,31,32,%r5 ;offset 0xae0 | ||
| 907 | LDW -188(%r30),%r4 ;offset 0xae4 | ||
| 908 | BVE (%r2) ;offset 0xae8 | ||
| 909 | .EXIT | ||
| 910 | LDW,MB -192(%r30),%r3 ;offset 0xaec | ||
| 911 | .PROCEND ;in=23,25;out=28,29;fpin=105,107; | ||
| 912 | |||
| 913 | |||
| 914 | |||
| 915 | |||
| 916 | ;---------------------------------------------------------------------------- | ||
| 917 | ; | ||
| 918 | ; Registers to hold 64-bit values to manipulate. The "L" part | ||
| 919 | ; of the register corresponds to the upper 32-bits, while the "R" | ||
| 920 | ; part corresponds to the lower 32-bits | ||
| 921 | ; | ||
| 922 | ; Note, that when using b6 and b7, the code must save these before | ||
| 923 | ; using them because they are callee save registers | ||
| 924 | ; | ||
| 925 | ; | ||
| 926 | ; Floating point registers to use to save values that | ||
| 927 | ; are manipulated. These don't collide with ftemp1-6 and | ||
| 928 | ; are all caller save registers | ||
| 929 | ; | ||
| 930 | a0 .reg %fr22 | ||
| 931 | a0L .reg %fr22L | ||
| 932 | a0R .reg %fr22R | ||
| 933 | |||
| 934 | a1 .reg %fr23 | ||
| 935 | a1L .reg %fr23L | ||
| 936 | a1R .reg %fr23R | ||
| 937 | |||
| 938 | a2 .reg %fr24 | ||
| 939 | a2L .reg %fr24L | ||
| 940 | a2R .reg %fr24R | ||
| 941 | |||
| 942 | a3 .reg %fr25 | ||
| 943 | a3L .reg %fr25L | ||
| 944 | a3R .reg %fr25R | ||
| 945 | |||
| 946 | a4 .reg %fr26 | ||
| 947 | a4L .reg %fr26L | ||
| 948 | a4R .reg %fr26R | ||
| 949 | |||
| 950 | a5 .reg %fr27 | ||
| 951 | a5L .reg %fr27L | ||
| 952 | a5R .reg %fr27R | ||
| 953 | |||
| 954 | a6 .reg %fr28 | ||
| 955 | a6L .reg %fr28L | ||
| 956 | a6R .reg %fr28R | ||
| 957 | |||
| 958 | a7 .reg %fr29 | ||
| 959 | a7L .reg %fr29L | ||
| 960 | a7R .reg %fr29R | ||
| 961 | |||
| 962 | b0 .reg %fr30 | ||
| 963 | b0L .reg %fr30L | ||
| 964 | b0R .reg %fr30R | ||
| 965 | |||
| 966 | b1 .reg %fr31 | ||
| 967 | b1L .reg %fr31L | ||
| 968 | b1R .reg %fr31R | ||
| 969 | |||
| 970 | ; | ||
| 971 | ; Temporary floating point variables, these are all caller save | ||
| 972 | ; registers | ||
| 973 | ; | ||
| 974 | ftemp1 .reg %fr4 | ||
| 975 | ftemp2 .reg %fr5 | ||
| 976 | ftemp3 .reg %fr6 | ||
| 977 | ftemp4 .reg %fr7 | ||
| 978 | |||
| 979 | ; | ||
| 980 | ; The B set of registers when used. | ||
| 981 | ; | ||
| 982 | |||
| 983 | b2 .reg %fr8 | ||
| 984 | b2L .reg %fr8L | ||
| 985 | b2R .reg %fr8R | ||
| 986 | |||
| 987 | b3 .reg %fr9 | ||
| 988 | b3L .reg %fr9L | ||
| 989 | b3R .reg %fr9R | ||
| 990 | |||
| 991 | b4 .reg %fr10 | ||
| 992 | b4L .reg %fr10L | ||
| 993 | b4R .reg %fr10R | ||
| 994 | |||
| 995 | b5 .reg %fr11 | ||
| 996 | b5L .reg %fr11L | ||
| 997 | b5R .reg %fr11R | ||
| 998 | |||
| 999 | b6 .reg %fr12 | ||
| 1000 | b6L .reg %fr12L | ||
| 1001 | b6R .reg %fr12R | ||
| 1002 | |||
| 1003 | b7 .reg %fr13 | ||
| 1004 | b7L .reg %fr13L | ||
| 1005 | b7R .reg %fr13R | ||
| 1006 | |||
| 1007 | c1 .reg %r21 ; only reg | ||
| 1008 | temp1 .reg %r20 ; only reg | ||
| 1009 | temp2 .reg %r19 ; only reg | ||
| 1010 | temp3 .reg %r31 ; only reg | ||
| 1011 | |||
| 1012 | m1 .reg %r28 | ||
| 1013 | c2 .reg %r23 | ||
| 1014 | high_one .reg %r1 | ||
| 1015 | ht .reg %r6 | ||
| 1016 | lt .reg %r5 | ||
| 1017 | m .reg %r4 | ||
| 1018 | c3 .reg %r3 | ||
| 1019 | |||
| 1020 | SQR_ADD_C .macro A0L,A0R,C1,C2,C3 | ||
| 1021 | XMPYU A0L,A0R,ftemp1 ; m | ||
| 1022 | FSTD ftemp1,-24(%sp) ; store m | ||
| 1023 | |||
| 1024 | XMPYU A0R,A0R,ftemp2 ; lt | ||
| 1025 | FSTD ftemp2,-16(%sp) ; store lt | ||
| 1026 | |||
| 1027 | XMPYU A0L,A0L,ftemp3 ; ht | ||
| 1028 | FSTD ftemp3,-8(%sp) ; store ht | ||
| 1029 | |||
| 1030 | LDD -24(%sp),m ; load m | ||
| 1031 | AND m,high_mask,temp2 ; m & Mask | ||
| 1032 | DEPD,Z m,30,31,temp3 ; m << 32+1 | ||
| 1033 | LDD -16(%sp),lt ; lt | ||
| 1034 | |||
| 1035 | LDD -8(%sp),ht ; ht | ||
| 1036 | EXTRD,U temp2,32,33,temp1 ; temp1 = m&Mask >> 32-1 | ||
| 1037 | ADD temp3,lt,lt ; lt = lt+m | ||
| 1038 | ADD,L ht,temp1,ht ; ht += temp1 | ||
| 1039 | ADD,DC ht,%r0,ht ; ht++ | ||
| 1040 | |||
| 1041 | ADD C1,lt,C1 ; c1=c1+lt | ||
| 1042 | ADD,DC ht,%r0,ht ; ht++ | ||
| 1043 | |||
| 1044 | ADD C2,ht,C2 ; c2=c2+ht | ||
| 1045 | ADD,DC C3,%r0,C3 ; c3++ | ||
| 1046 | .endm | ||
| 1047 | |||
| 1048 | SQR_ADD_C2 .macro A0L,A0R,A1L,A1R,C1,C2,C3 | ||
| 1049 | XMPYU A0L,A1R,ftemp1 ; m1 = bl*ht | ||
| 1050 | FSTD ftemp1,-16(%sp) ; | ||
| 1051 | XMPYU A0R,A1L,ftemp2 ; m = bh*lt | ||
| 1052 | FSTD ftemp2,-8(%sp) ; | ||
| 1053 | XMPYU A0R,A1R,ftemp3 ; lt = bl*lt | ||
| 1054 | FSTD ftemp3,-32(%sp) | ||
| 1055 | XMPYU A0L,A1L,ftemp4 ; ht = bh*ht | ||
| 1056 | FSTD ftemp4,-24(%sp) ; | ||
| 1057 | |||
| 1058 | LDD -8(%sp),m ; r21 = m | ||
| 1059 | LDD -16(%sp),m1 ; r19 = m1 | ||
| 1060 | ADD,L m,m1,m ; m+m1 | ||
| 1061 | |||
| 1062 | DEPD,Z m,31,32,temp3 ; (m+m1<<32) | ||
| 1063 | LDD -24(%sp),ht ; r24 = ht | ||
| 1064 | |||
| 1065 | CMPCLR,*>>= m,m1,%r0 ; if (m < m1) | ||
| 1066 | ADD,L ht,high_one,ht ; ht+=high_one | ||
| 1067 | |||
| 1068 | EXTRD,U m,31,32,temp1 ; m >> 32 | ||
| 1069 | LDD -32(%sp),lt ; lt | ||
| 1070 | ADD,L ht,temp1,ht ; ht+= m>>32 | ||
| 1071 | ADD lt,temp3,lt ; lt = lt+m1 | ||
| 1072 | ADD,DC ht,%r0,ht ; ht++ | ||
| 1073 | |||
| 1074 | ADD ht,ht,ht ; ht=ht+ht; | ||
| 1075 | ADD,DC C3,%r0,C3 ; add in carry (c3++) | ||
| 1076 | |||
| 1077 | ADD lt,lt,lt ; lt=lt+lt; | ||
| 1078 | ADD,DC ht,%r0,ht ; add in carry (ht++) | ||
| 1079 | |||
| 1080 | ADD C1,lt,C1 ; c1=c1+lt | ||
| 1081 | ADD,DC,*NUV ht,%r0,ht ; add in carry (ht++) | ||
| 1082 | LDO 1(C3),C3 ; bump c3 if overflow,nullify otherwise | ||
| 1083 | |||
| 1084 | ADD C2,ht,C2 ; c2 = c2 + ht | ||
| 1085 | ADD,DC C3,%r0,C3 ; add in carry (c3++) | ||
| 1086 | .endm | ||
| 1087 | |||
| 1088 | ; | ||
| 1089 | ;void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a) | ||
| 1090 | ; arg0 = r_ptr | ||
| 1091 | ; arg1 = a_ptr | ||
| 1092 | ; | ||
| 1093 | |||
| 1094 | bn_sqr_comba8 | ||
| 280 | .PROC | 1095 | .PROC |
| 281 | .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=8 | 1096 | .CALLINFO FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE |
| 282 | .ENTRY | 1097 | .EXPORT bn_sqr_comba8,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN |
| 283 | stw %r2,-20(0,%r30) | 1098 | .ENTRY |
| 284 | stwm %r8,128(0,%r30) | 1099 | .align 64 |
| 285 | stw %r7,-124(0,%r30) | 1100 | |
| 286 | stw %r4,-112(0,%r30) | 1101 | STD %r3,0(%sp) ; save r3 |
| 287 | stw %r3,-108(0,%r30) | 1102 | STD %r4,8(%sp) ; save r4 |
| 288 | copy %r26,%r3 | 1103 | STD %r5,16(%sp) ; save r5 |
| 289 | copy %r25,%r4 | 1104 | STD %r6,24(%sp) ; save r6 |
| 290 | stw %r6,-120(0,%r30) | 1105 | |
| 291 | ldi 0,%r7 | 1106 | ; |
| 292 | stw %r5,-116(0,%r30) | 1107 | ; Zero out carries |
| 293 | movb,<> %r24,%r5,L$0051 | 1108 | ; |
| 294 | ldi 2,%r6 | 1109 | COPY %r0,c1 |
| 295 | bl L$0068,0 | 1110 | COPY %r0,c2 |
| 296 | ldi -1,%r28 | 1111 | COPY %r0,c3 |
| 297 | L$0051 | 1112 | |
| 298 | .CALL ARGW0=GR | 1113 | LDO 128(%sp),%sp ; bump stack |
| 299 | bl BN_num_bits_word,%r2 | 1114 | DEPDI,Z -1,32,33,high_mask ; Create Mask 0xffffffff80000000L |
| 300 | copy %r5,%r26 | 1115 | DEPDI,Z 1,31,1,high_one ; Create Value 1 << 32 |
| 301 | copy %r28,%r24 | 1116 | |
| 302 | ldi 32,%r19 | 1117 | ; |
| 303 | comb,= %r19,%r24,L$0052 | 1118 | ; Load up all of the values we are going to use |
| 304 | subi 31,%r24,%r19 | 1119 | ; |
| 305 | mtsar %r19 | 1120 | FLDD 0(a_ptr),a0 |
| 306 | zvdepi 1,32,%r19 | 1121 | FLDD 8(a_ptr),a1 |
| 307 | comb,>>= %r19,%r3,L$0052 | 1122 | FLDD 16(a_ptr),a2 |
| 308 | addil LR'__iob-$global$+32,%r27 | 1123 | FLDD 24(a_ptr),a3 |
| 309 | ldo RR'__iob-$global$+32(%r1),%r26 | 1124 | FLDD 32(a_ptr),a4 |
| 310 | ldil LR'L$C0000,%r25 | 1125 | FLDD 40(a_ptr),a5 |
| 311 | .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR | 1126 | FLDD 48(a_ptr),a6 |
| 312 | bl fprintf,%r2 | 1127 | FLDD 56(a_ptr),a7 |
| 313 | ldo RR'L$C0000(%r25),%r25 | 1128 | |
| 314 | .CALL | 1129 | SQR_ADD_C a0L,a0R,c1,c2,c3 |
| 315 | bl abort,%r2 | 1130 | STD c1,0(r_ptr) ; r[0] = c1; |
| 316 | nop | 1131 | COPY %r0,c1 |
| 317 | L$0052 | 1132 | |
| 318 | comb,>> %r5,%r3,L$0053 | 1133 | SQR_ADD_C2 a1L,a1R,a0L,a0R,c2,c3,c1 |
| 319 | subi 32,%r24,%r24 | 1134 | STD c2,8(r_ptr) ; r[1] = c2; |
| 320 | sub %r3,%r5,%r3 | 1135 | COPY %r0,c2 |
| 321 | L$0053 | 1136 | |
| 322 | comib,= 0,%r24,L$0054 | 1137 | SQR_ADD_C a1L,a1R,c3,c1,c2 |
| 323 | subi 31,%r24,%r19 | 1138 | SQR_ADD_C2 a2L,a2R,a0L,a0R,c3,c1,c2 |
| 324 | mtsar %r19 | 1139 | STD c3,16(r_ptr) ; r[2] = c3; |
| 325 | zvdep %r5,32,%r5 | 1140 | COPY %r0,c3 |
| 326 | zvdep %r3,32,%r21 | 1141 | |
| 327 | subi 32,%r24,%r20 | 1142 | SQR_ADD_C2 a3L,a3R,a0L,a0R,c1,c2,c3 |
| 328 | mtsar %r20 | 1143 | SQR_ADD_C2 a2L,a2R,a1L,a1R,c1,c2,c3 |
| 329 | vshd 0,%r4,%r20 | 1144 | STD c1,24(r_ptr) ; r[3] = c1; |
| 330 | or %r21,%r20,%r3 | 1145 | COPY %r0,c1 |
| 331 | mtsar %r19 | 1146 | |
| 332 | zvdep %r4,32,%r4 | 1147 | SQR_ADD_C a2L,a2R,c2,c3,c1 |
| 333 | L$0054 | 1148 | SQR_ADD_C2 a3L,a3R,a1L,a1R,c2,c3,c1 |
| 334 | extru %r5,15,16,%r23 | 1149 | SQR_ADD_C2 a4L,a4R,a0L,a0R,c2,c3,c1 |
| 335 | extru %r5,31,16,%r28 | 1150 | STD c2,32(r_ptr) ; r[4] = c2; |
| 336 | L$0055 | 1151 | COPY %r0,c2 |
| 337 | extru %r3,15,16,%r19 | 1152 | |
| 338 | comb,<> %r23,%r19,L$0058 | 1153 | SQR_ADD_C2 a5L,a5R,a0L,a0R,c3,c1,c2 |
| 339 | copy %r3,%r26 | 1154 | SQR_ADD_C2 a4L,a4R,a1L,a1R,c3,c1,c2 |
| 340 | bl L$0059,0 | 1155 | SQR_ADD_C2 a3L,a3R,a2L,a2R,c3,c1,c2 |
| 341 | zdepi -1,31,16,%r29 | 1156 | STD c3,40(r_ptr) ; r[5] = c3; |
| 342 | L$0058 | 1157 | COPY %r0,c3 |
| 343 | .IMPORT $$divU,MILLICODE | 1158 | |
| 344 | bl $$divU,%r31 | 1159 | SQR_ADD_C a3L,a3R,c1,c2,c3 |
| 345 | copy %r23,%r25 | 1160 | SQR_ADD_C2 a4L,a4R,a2L,a2R,c1,c2,c3 |
| 346 | L$0059 | 1161 | SQR_ADD_C2 a5L,a5R,a1L,a1R,c1,c2,c3 |
| 347 | stw %r29,-16(0,%r30) | 1162 | SQR_ADD_C2 a6L,a6R,a0L,a0R,c1,c2,c3 |
| 348 | fldws -16(0,%r30),%fr10L | 1163 | STD c1,48(r_ptr) ; r[6] = c1; |
| 349 | stw %r28,-16(0,%r30) | 1164 | COPY %r0,c1 |
| 350 | fldws -16(0,%r30),%fr10R | 1165 | |
| 351 | stw %r23,-16(0,%r30) | 1166 | SQR_ADD_C2 a7L,a7R,a0L,a0R,c2,c3,c1 |
| 352 | xmpyu %fr10L,%fr10R,%fr8 | 1167 | SQR_ADD_C2 a6L,a6R,a1L,a1R,c2,c3,c1 |
| 353 | fldws -16(0,%r30),%fr10R | 1168 | SQR_ADD_C2 a5L,a5R,a2L,a2R,c2,c3,c1 |
| 354 | fstws %fr8R,-16(0,%r30) | 1169 | SQR_ADD_C2 a4L,a4R,a3L,a3R,c2,c3,c1 |
| 355 | xmpyu %fr10L,%fr10R,%fr9 | 1170 | STD c2,56(r_ptr) ; r[7] = c2; |
| 356 | ldw -16(0,%r30),%r8 | 1171 | COPY %r0,c2 |
| 357 | fstws %fr9R,-16(0,%r30) | 1172 | |
| 358 | copy %r8,%r22 | 1173 | SQR_ADD_C a4L,a4R,c3,c1,c2 |
| 359 | ldw -16(0,%r30),%r8 | 1174 | SQR_ADD_C2 a5L,a5R,a3L,a3R,c3,c1,c2 |
| 360 | extru %r4,15,16,%r24 | 1175 | SQR_ADD_C2 a6L,a6R,a2L,a2R,c3,c1,c2 |
| 361 | copy %r8,%r21 | 1176 | SQR_ADD_C2 a7L,a7R,a1L,a1R,c3,c1,c2 |
| 362 | L$0060 | 1177 | STD c3,64(r_ptr) ; r[8] = c3; |
| 363 | sub %r3,%r21,%r20 | 1178 | COPY %r0,c3 |
| 364 | copy %r20,%r19 | 1179 | |
| 365 | depi 0,31,16,%r19 | 1180 | SQR_ADD_C2 a7L,a7R,a2L,a2R,c1,c2,c3 |
| 366 | comib,<> 0,%r19,L$0061 | 1181 | SQR_ADD_C2 a6L,a6R,a3L,a3R,c1,c2,c3 |
| 367 | zdep %r20,15,16,%r19 | 1182 | SQR_ADD_C2 a5L,a5R,a4L,a4R,c1,c2,c3 |
| 368 | addl %r19,%r24,%r19 | 1183 | STD c1,72(r_ptr) ; r[9] = c1; |
| 369 | comb,>>= %r19,%r22,L$0061 | 1184 | COPY %r0,c1 |
| 370 | sub %r22,%r28,%r22 | 1185 | |
| 371 | sub %r21,%r23,%r21 | 1186 | SQR_ADD_C a5L,a5R,c2,c3,c1 |
| 372 | bl L$0060,0 | 1187 | SQR_ADD_C2 a6L,a6R,a4L,a4R,c2,c3,c1 |
| 373 | ldo -1(%r29),%r29 | 1188 | SQR_ADD_C2 a7L,a7R,a3L,a3R,c2,c3,c1 |
| 374 | L$0061 | 1189 | STD c2,80(r_ptr) ; r[10] = c2; |
| 375 | stw %r29,-16(0,%r30) | 1190 | COPY %r0,c2 |
| 376 | fldws -16(0,%r30),%fr10L | 1191 | |
| 377 | stw %r28,-16(0,%r30) | 1192 | SQR_ADD_C2 a7L,a7R,a4L,a4R,c3,c1,c2 |
| 378 | fldws -16(0,%r30),%fr10R | 1193 | SQR_ADD_C2 a6L,a6R,a5L,a5R,c3,c1,c2 |
| 379 | xmpyu %fr10L,%fr10R,%fr8 | 1194 | STD c3,88(r_ptr) ; r[11] = c3; |
| 380 | fstws %fr8R,-16(0,%r30) | 1195 | COPY %r0,c3 |
| 381 | ldw -16(0,%r30),%r8 | 1196 | |
| 382 | stw %r23,-16(0,%r30) | 1197 | SQR_ADD_C a6L,a6R,c1,c2,c3 |
| 383 | fldws -16(0,%r30),%fr10R | 1198 | SQR_ADD_C2 a7L,a7R,a5L,a5R,c1,c2,c3 |
| 384 | copy %r8,%r19 | 1199 | STD c1,96(r_ptr) ; r[12] = c1; |
| 385 | xmpyu %fr10L,%fr10R,%fr8 | 1200 | COPY %r0,c1 |
| 386 | fstws %fr8R,-16(0,%r30) | 1201 | |
| 387 | extru %r19,15,16,%r20 | 1202 | SQR_ADD_C2 a7L,a7R,a6L,a6R,c2,c3,c1 |
| 388 | ldw -16(0,%r30),%r8 | 1203 | STD c2,104(r_ptr) ; r[13] = c2; |
| 389 | zdep %r19,15,16,%r19 | 1204 | COPY %r0,c2 |
| 390 | addl %r8,%r20,%r20 | 1205 | |
| 391 | comclr,<<= %r19,%r4,0 | 1206 | SQR_ADD_C a7L,a7R,c3,c1,c2 |
| 392 | addi 1,%r20,%r20 | 1207 | STD c3, 112(r_ptr) ; r[14] = c3 |
| 393 | comb,<<= %r20,%r3,L$0066 | 1208 | STD c1, 120(r_ptr) ; r[15] = c1 |
| 394 | sub %r4,%r19,%r4 | 1209 | |
| 395 | addl %r3,%r5,%r3 | 1210 | .EXIT |
| 396 | ldo -1(%r29),%r29 | 1211 | LDD -104(%sp),%r6 ; restore r6 |
| 397 | L$0066 | 1212 | LDD -112(%sp),%r5 ; restore r5 |
| 398 | addib,= -1,%r6,L$0056 | 1213 | LDD -120(%sp),%r4 ; restore r4 |
| 399 | sub %r3,%r20,%r3 | 1214 | BVE (%rp) |
| 400 | zdep %r29,15,16,%r7 | 1215 | LDD,MB -128(%sp),%r3 |
| 401 | shd %r3,%r4,16,%r3 | 1216 | |
| 402 | bl L$0055,0 | 1217 | .PROCEND |
| 403 | zdep %r4,15,16,%r4 | 1218 | |
| 404 | L$0056 | 1219 | ;----------------------------------------------------------------------------- |
| 405 | or %r7,%r29,%r28 | 1220 | ; |
| 406 | L$0068 | 1221 | ;void bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a) |
| 407 | ldw -148(0,%r30),%r2 | 1222 | ; arg0 = r_ptr |
| 408 | ldw -124(0,%r30),%r7 | 1223 | ; arg1 = a_ptr |
| 409 | ldw -120(0,%r30),%r6 | 1224 | ; |
| 410 | ldw -116(0,%r30),%r5 | 1225 | |
| 411 | ldw -112(0,%r30),%r4 | 1226 | bn_sqr_comba4 |
| 412 | ldw -108(0,%r30),%r3 | 1227 | .proc |
| 413 | bv 0(%r2) | 1228 | .callinfo FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE |
| 414 | ldwm -128(0,%r30),%r8 | 1229 | .EXPORT bn_sqr_comba4,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN |
| 415 | .EXIT | 1230 | .entry |
| 416 | .PROCEND | 1231 | .align 64 |
| 1232 | STD %r3,0(%sp) ; save r3 | ||
| 1233 | STD %r4,8(%sp) ; save r4 | ||
| 1234 | STD %r5,16(%sp) ; save r5 | ||
| 1235 | STD %r6,24(%sp) ; save r6 | ||
| 1236 | |||
| 1237 | ; | ||
| 1238 | ; Zero out carries | ||
| 1239 | ; | ||
| 1240 | COPY %r0,c1 | ||
| 1241 | COPY %r0,c2 | ||
| 1242 | COPY %r0,c3 | ||
| 1243 | |||
| 1244 | LDO 128(%sp),%sp ; bump stack | ||
| 1245 | DEPDI,Z -1,32,33,high_mask ; Create Mask 0xffffffff80000000L | ||
| 1246 | DEPDI,Z 1,31,1,high_one ; Create Value 1 << 32 | ||
| 1247 | |||
| 1248 | ; | ||
| 1249 | ; Load up all of the values we are going to use | ||
| 1250 | ; | ||
| 1251 | FLDD 0(a_ptr),a0 | ||
| 1252 | FLDD 8(a_ptr),a1 | ||
| 1253 | FLDD 16(a_ptr),a2 | ||
| 1254 | FLDD 24(a_ptr),a3 | ||
| 1255 | FLDD 32(a_ptr),a4 | ||
| 1256 | FLDD 40(a_ptr),a5 | ||
| 1257 | FLDD 48(a_ptr),a6 | ||
| 1258 | FLDD 56(a_ptr),a7 | ||
| 1259 | |||
| 1260 | SQR_ADD_C a0L,a0R,c1,c2,c3 | ||
| 1261 | |||
| 1262 | STD c1,0(r_ptr) ; r[0] = c1; | ||
| 1263 | COPY %r0,c1 | ||
| 1264 | |||
| 1265 | SQR_ADD_C2 a1L,a1R,a0L,a0R,c2,c3,c1 | ||
| 1266 | |||
| 1267 | STD c2,8(r_ptr) ; r[1] = c2; | ||
| 1268 | COPY %r0,c2 | ||
| 1269 | |||
| 1270 | SQR_ADD_C a1L,a1R,c3,c1,c2 | ||
| 1271 | SQR_ADD_C2 a2L,a2R,a0L,a0R,c3,c1,c2 | ||
| 1272 | |||
| 1273 | STD c3,16(r_ptr) ; r[2] = c3; | ||
| 1274 | COPY %r0,c3 | ||
| 1275 | |||
| 1276 | SQR_ADD_C2 a3L,a3R,a0L,a0R,c1,c2,c3 | ||
| 1277 | SQR_ADD_C2 a2L,a2R,a1L,a1R,c1,c2,c3 | ||
| 1278 | |||
| 1279 | STD c1,24(r_ptr) ; r[3] = c1; | ||
| 1280 | COPY %r0,c1 | ||
| 1281 | |||
| 1282 | SQR_ADD_C a2L,a2R,c2,c3,c1 | ||
| 1283 | SQR_ADD_C2 a3L,a3R,a1L,a1R,c2,c3,c1 | ||
| 1284 | |||
| 1285 | STD c2,32(r_ptr) ; r[4] = c2; | ||
| 1286 | COPY %r0,c2 | ||
| 1287 | |||
| 1288 | SQR_ADD_C2 a3L,a3R,a2L,a2R,c3,c1,c2 | ||
| 1289 | STD c3,40(r_ptr) ; r[5] = c3; | ||
| 1290 | COPY %r0,c3 | ||
| 1291 | |||
| 1292 | SQR_ADD_C a3L,a3R,c1,c2,c3 | ||
| 1293 | STD c1,48(r_ptr) ; r[6] = c1; | ||
| 1294 | STD c2,56(r_ptr) ; r[7] = c2; | ||
| 1295 | |||
| 1296 | .EXIT | ||
| 1297 | LDD -104(%sp),%r6 ; restore r6 | ||
| 1298 | LDD -112(%sp),%r5 ; restore r5 | ||
| 1299 | LDD -120(%sp),%r4 ; restore r4 | ||
| 1300 | BVE (%rp) | ||
| 1301 | LDD,MB -128(%sp),%r3 | ||
| 1302 | |||
| 1303 | .PROCEND | ||
| 1304 | |||
| 1305 | |||
| 1306 | ;--------------------------------------------------------------------------- | ||
| 1307 | |||
| 1308 | MUL_ADD_C .macro A0L,A0R,B0L,B0R,C1,C2,C3 | ||
| 1309 | XMPYU A0L,B0R,ftemp1 ; m1 = bl*ht | ||
| 1310 | FSTD ftemp1,-16(%sp) ; | ||
| 1311 | XMPYU A0R,B0L,ftemp2 ; m = bh*lt | ||
| 1312 | FSTD ftemp2,-8(%sp) ; | ||
| 1313 | XMPYU A0R,B0R,ftemp3 ; lt = bl*lt | ||
| 1314 | FSTD ftemp3,-32(%sp) | ||
| 1315 | XMPYU A0L,B0L,ftemp4 ; ht = bh*ht | ||
| 1316 | FSTD ftemp4,-24(%sp) ; | ||
| 1317 | |||
| 1318 | LDD -8(%sp),m ; r21 = m | ||
| 1319 | LDD -16(%sp),m1 ; r19 = m1 | ||
| 1320 | ADD,L m,m1,m ; m+m1 | ||
| 1321 | |||
| 1322 | DEPD,Z m,31,32,temp3 ; (m+m1<<32) | ||
| 1323 | LDD -24(%sp),ht ; r24 = ht | ||
| 1324 | |||
| 1325 | CMPCLR,*>>= m,m1,%r0 ; if (m < m1) | ||
| 1326 | ADD,L ht,high_one,ht ; ht+=high_one | ||
| 1327 | |||
| 1328 | EXTRD,U m,31,32,temp1 ; m >> 32 | ||
| 1329 | LDD -32(%sp),lt ; lt | ||
| 1330 | ADD,L ht,temp1,ht ; ht+= m>>32 | ||
| 1331 | ADD lt,temp3,lt ; lt = lt+m1 | ||
| 1332 | ADD,DC ht,%r0,ht ; ht++ | ||
| 1333 | |||
| 1334 | ADD C1,lt,C1 ; c1=c1+lt | ||
| 1335 | ADD,DC ht,%r0,ht ; bump c3 if overflow,nullify otherwise | ||
| 1336 | |||
| 1337 | ADD C2,ht,C2 ; c2 = c2 + ht | ||
| 1338 | ADD,DC C3,%r0,C3 ; add in carry (c3++) | ||
| 1339 | .endm | ||
| 1340 | |||
| 1341 | |||
| 1342 | ; | ||
| 1343 | ;void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) | ||
| 1344 | ; arg0 = r_ptr | ||
| 1345 | ; arg1 = a_ptr | ||
| 1346 | ; arg2 = b_ptr | ||
| 1347 | ; | ||
| 1348 | |||
| 1349 | bn_mul_comba8 | ||
| 1350 | .proc | ||
| 1351 | .callinfo FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE | ||
| 1352 | .EXPORT bn_mul_comba8,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 1353 | .entry | ||
| 1354 | .align 64 | ||
| 1355 | |||
| 1356 | STD %r3,0(%sp) ; save r3 | ||
| 1357 | STD %r4,8(%sp) ; save r4 | ||
| 1358 | STD %r5,16(%sp) ; save r5 | ||
| 1359 | STD %r6,24(%sp) ; save r6 | ||
| 1360 | FSTD %fr12,32(%sp) ; save r6 | ||
| 1361 | FSTD %fr13,40(%sp) ; save r7 | ||
| 1362 | |||
| 1363 | ; | ||
| 1364 | ; Zero out carries | ||
| 1365 | ; | ||
| 1366 | COPY %r0,c1 | ||
| 1367 | COPY %r0,c2 | ||
| 1368 | COPY %r0,c3 | ||
| 1369 | |||
| 1370 | LDO 128(%sp),%sp ; bump stack | ||
| 1371 | DEPDI,Z 1,31,1,high_one ; Create Value 1 << 32 | ||
| 1372 | |||
| 1373 | ; | ||
| 1374 | ; Load up all of the values we are going to use | ||
| 1375 | ; | ||
| 1376 | FLDD 0(a_ptr),a0 | ||
| 1377 | FLDD 8(a_ptr),a1 | ||
| 1378 | FLDD 16(a_ptr),a2 | ||
| 1379 | FLDD 24(a_ptr),a3 | ||
| 1380 | FLDD 32(a_ptr),a4 | ||
| 1381 | FLDD 40(a_ptr),a5 | ||
| 1382 | FLDD 48(a_ptr),a6 | ||
| 1383 | FLDD 56(a_ptr),a7 | ||
| 1384 | |||
| 1385 | FLDD 0(b_ptr),b0 | ||
| 1386 | FLDD 8(b_ptr),b1 | ||
| 1387 | FLDD 16(b_ptr),b2 | ||
| 1388 | FLDD 24(b_ptr),b3 | ||
| 1389 | FLDD 32(b_ptr),b4 | ||
| 1390 | FLDD 40(b_ptr),b5 | ||
| 1391 | FLDD 48(b_ptr),b6 | ||
| 1392 | FLDD 56(b_ptr),b7 | ||
| 1393 | |||
| 1394 | MUL_ADD_C a0L,a0R,b0L,b0R,c1,c2,c3 | ||
| 1395 | STD c1,0(r_ptr) | ||
| 1396 | COPY %r0,c1 | ||
| 1397 | |||
| 1398 | MUL_ADD_C a0L,a0R,b1L,b1R,c2,c3,c1 | ||
| 1399 | MUL_ADD_C a1L,a1R,b0L,b0R,c2,c3,c1 | ||
| 1400 | STD c2,8(r_ptr) | ||
| 1401 | COPY %r0,c2 | ||
| 1402 | |||
| 1403 | MUL_ADD_C a2L,a2R,b0L,b0R,c3,c1,c2 | ||
| 1404 | MUL_ADD_C a1L,a1R,b1L,b1R,c3,c1,c2 | ||
| 1405 | MUL_ADD_C a0L,a0R,b2L,b2R,c3,c1,c2 | ||
| 1406 | STD c3,16(r_ptr) | ||
| 1407 | COPY %r0,c3 | ||
| 1408 | |||
| 1409 | MUL_ADD_C a0L,a0R,b3L,b3R,c1,c2,c3 | ||
| 1410 | MUL_ADD_C a1L,a1R,b2L,b2R,c1,c2,c3 | ||
| 1411 | MUL_ADD_C a2L,a2R,b1L,b1R,c1,c2,c3 | ||
| 1412 | MUL_ADD_C a3L,a3R,b0L,b0R,c1,c2,c3 | ||
| 1413 | STD c1,24(r_ptr) | ||
| 1414 | COPY %r0,c1 | ||
| 1415 | |||
| 1416 | MUL_ADD_C a4L,a4R,b0L,b0R,c2,c3,c1 | ||
| 1417 | MUL_ADD_C a3L,a3R,b1L,b1R,c2,c3,c1 | ||
| 1418 | MUL_ADD_C a2L,a2R,b2L,b2R,c2,c3,c1 | ||
| 1419 | MUL_ADD_C a1L,a1R,b3L,b3R,c2,c3,c1 | ||
| 1420 | MUL_ADD_C a0L,a0R,b4L,b4R,c2,c3,c1 | ||
| 1421 | STD c2,32(r_ptr) | ||
| 1422 | COPY %r0,c2 | ||
| 1423 | |||
| 1424 | MUL_ADD_C a0L,a0R,b5L,b5R,c3,c1,c2 | ||
| 1425 | MUL_ADD_C a1L,a1R,b4L,b4R,c3,c1,c2 | ||
| 1426 | MUL_ADD_C a2L,a2R,b3L,b3R,c3,c1,c2 | ||
| 1427 | MUL_ADD_C a3L,a3R,b2L,b2R,c3,c1,c2 | ||
| 1428 | MUL_ADD_C a4L,a4R,b1L,b1R,c3,c1,c2 | ||
| 1429 | MUL_ADD_C a5L,a5R,b0L,b0R,c3,c1,c2 | ||
| 1430 | STD c3,40(r_ptr) | ||
| 1431 | COPY %r0,c3 | ||
| 1432 | |||
| 1433 | MUL_ADD_C a6L,a6R,b0L,b0R,c1,c2,c3 | ||
| 1434 | MUL_ADD_C a5L,a5R,b1L,b1R,c1,c2,c3 | ||
| 1435 | MUL_ADD_C a4L,a4R,b2L,b2R,c1,c2,c3 | ||
| 1436 | MUL_ADD_C a3L,a3R,b3L,b3R,c1,c2,c3 | ||
| 1437 | MUL_ADD_C a2L,a2R,b4L,b4R,c1,c2,c3 | ||
| 1438 | MUL_ADD_C a1L,a1R,b5L,b5R,c1,c2,c3 | ||
| 1439 | MUL_ADD_C a0L,a0R,b6L,b6R,c1,c2,c3 | ||
| 1440 | STD c1,48(r_ptr) | ||
| 1441 | COPY %r0,c1 | ||
| 1442 | |||
| 1443 | MUL_ADD_C a0L,a0R,b7L,b7R,c2,c3,c1 | ||
| 1444 | MUL_ADD_C a1L,a1R,b6L,b6R,c2,c3,c1 | ||
| 1445 | MUL_ADD_C a2L,a2R,b5L,b5R,c2,c3,c1 | ||
| 1446 | MUL_ADD_C a3L,a3R,b4L,b4R,c2,c3,c1 | ||
| 1447 | MUL_ADD_C a4L,a4R,b3L,b3R,c2,c3,c1 | ||
| 1448 | MUL_ADD_C a5L,a5R,b2L,b2R,c2,c3,c1 | ||
| 1449 | MUL_ADD_C a6L,a6R,b1L,b1R,c2,c3,c1 | ||
| 1450 | MUL_ADD_C a7L,a7R,b0L,b0R,c2,c3,c1 | ||
| 1451 | STD c2,56(r_ptr) | ||
| 1452 | COPY %r0,c2 | ||
| 1453 | |||
| 1454 | MUL_ADD_C a7L,a7R,b1L,b1R,c3,c1,c2 | ||
| 1455 | MUL_ADD_C a6L,a6R,b2L,b2R,c3,c1,c2 | ||
| 1456 | MUL_ADD_C a5L,a5R,b3L,b3R,c3,c1,c2 | ||
| 1457 | MUL_ADD_C a4L,a4R,b4L,b4R,c3,c1,c2 | ||
| 1458 | MUL_ADD_C a3L,a3R,b5L,b5R,c3,c1,c2 | ||
| 1459 | MUL_ADD_C a2L,a2R,b6L,b6R,c3,c1,c2 | ||
| 1460 | MUL_ADD_C a1L,a1R,b7L,b7R,c3,c1,c2 | ||
| 1461 | STD c3,64(r_ptr) | ||
| 1462 | COPY %r0,c3 | ||
| 1463 | |||
| 1464 | MUL_ADD_C a2L,a2R,b7L,b7R,c1,c2,c3 | ||
| 1465 | MUL_ADD_C a3L,a3R,b6L,b6R,c1,c2,c3 | ||
| 1466 | MUL_ADD_C a4L,a4R,b5L,b5R,c1,c2,c3 | ||
| 1467 | MUL_ADD_C a5L,a5R,b4L,b4R,c1,c2,c3 | ||
| 1468 | MUL_ADD_C a6L,a6R,b3L,b3R,c1,c2,c3 | ||
| 1469 | MUL_ADD_C a7L,a7R,b2L,b2R,c1,c2,c3 | ||
| 1470 | STD c1,72(r_ptr) | ||
| 1471 | COPY %r0,c1 | ||
| 1472 | |||
| 1473 | MUL_ADD_C a7L,a7R,b3L,b3R,c2,c3,c1 | ||
| 1474 | MUL_ADD_C a6L,a6R,b4L,b4R,c2,c3,c1 | ||
| 1475 | MUL_ADD_C a5L,a5R,b5L,b5R,c2,c3,c1 | ||
| 1476 | MUL_ADD_C a4L,a4R,b6L,b6R,c2,c3,c1 | ||
| 1477 | MUL_ADD_C a3L,a3R,b7L,b7R,c2,c3,c1 | ||
| 1478 | STD c2,80(r_ptr) | ||
| 1479 | COPY %r0,c2 | ||
| 1480 | |||
| 1481 | MUL_ADD_C a4L,a4R,b7L,b7R,c3,c1,c2 | ||
| 1482 | MUL_ADD_C a5L,a5R,b6L,b6R,c3,c1,c2 | ||
| 1483 | MUL_ADD_C a6L,a6R,b5L,b5R,c3,c1,c2 | ||
| 1484 | MUL_ADD_C a7L,a7R,b4L,b4R,c3,c1,c2 | ||
| 1485 | STD c3,88(r_ptr) | ||
| 1486 | COPY %r0,c3 | ||
| 1487 | |||
| 1488 | MUL_ADD_C a7L,a7R,b5L,b5R,c1,c2,c3 | ||
| 1489 | MUL_ADD_C a6L,a6R,b6L,b6R,c1,c2,c3 | ||
| 1490 | MUL_ADD_C a5L,a5R,b7L,b7R,c1,c2,c3 | ||
| 1491 | STD c1,96(r_ptr) | ||
| 1492 | COPY %r0,c1 | ||
| 1493 | |||
| 1494 | MUL_ADD_C a6L,a6R,b7L,b7R,c2,c3,c1 | ||
| 1495 | MUL_ADD_C a7L,a7R,b6L,b6R,c2,c3,c1 | ||
| 1496 | STD c2,104(r_ptr) | ||
| 1497 | COPY %r0,c2 | ||
| 1498 | |||
| 1499 | MUL_ADD_C a7L,a7R,b7L,b7R,c3,c1,c2 | ||
| 1500 | STD c3,112(r_ptr) | ||
| 1501 | STD c1,120(r_ptr) | ||
| 1502 | |||
| 1503 | .EXIT | ||
| 1504 | FLDD -88(%sp),%fr13 | ||
| 1505 | FLDD -96(%sp),%fr12 | ||
| 1506 | LDD -104(%sp),%r6 ; restore r6 | ||
| 1507 | LDD -112(%sp),%r5 ; restore r5 | ||
| 1508 | LDD -120(%sp),%r4 ; restore r4 | ||
| 1509 | BVE (%rp) | ||
| 1510 | LDD,MB -128(%sp),%r3 | ||
| 1511 | |||
| 1512 | .PROCEND | ||
| 1513 | |||
| 1514 | ;----------------------------------------------------------------------------- | ||
| 1515 | ; | ||
| 1516 | ;void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) | ||
| 1517 | ; arg0 = r_ptr | ||
| 1518 | ; arg1 = a_ptr | ||
| 1519 | ; arg2 = b_ptr | ||
| 1520 | ; | ||
| 1521 | |||
| 1522 | bn_mul_comba4 | ||
| 1523 | .proc | ||
| 1524 | .callinfo FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE | ||
| 1525 | .EXPORT bn_mul_comba4,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 1526 | .entry | ||
| 1527 | .align 64 | ||
| 1528 | |||
| 1529 | STD %r3,0(%sp) ; save r3 | ||
| 1530 | STD %r4,8(%sp) ; save r4 | ||
| 1531 | STD %r5,16(%sp) ; save r5 | ||
| 1532 | STD %r6,24(%sp) ; save r6 | ||
| 1533 | FSTD %fr12,32(%sp) ; save r6 | ||
| 1534 | FSTD %fr13,40(%sp) ; save r7 | ||
| 1535 | |||
| 1536 | ; | ||
| 1537 | ; Zero out carries | ||
| 1538 | ; | ||
| 1539 | COPY %r0,c1 | ||
| 1540 | COPY %r0,c2 | ||
| 1541 | COPY %r0,c3 | ||
| 1542 | |||
| 1543 | LDO 128(%sp),%sp ; bump stack | ||
| 1544 | DEPDI,Z 1,31,1,high_one ; Create Value 1 << 32 | ||
| 1545 | |||
| 1546 | ; | ||
| 1547 | ; Load up all of the values we are going to use | ||
| 1548 | ; | ||
| 1549 | FLDD 0(a_ptr),a0 | ||
| 1550 | FLDD 8(a_ptr),a1 | ||
| 1551 | FLDD 16(a_ptr),a2 | ||
| 1552 | FLDD 24(a_ptr),a3 | ||
| 1553 | |||
| 1554 | FLDD 0(b_ptr),b0 | ||
| 1555 | FLDD 8(b_ptr),b1 | ||
| 1556 | FLDD 16(b_ptr),b2 | ||
| 1557 | FLDD 24(b_ptr),b3 | ||
| 1558 | |||
| 1559 | MUL_ADD_C a0L,a0R,b0L,b0R,c1,c2,c3 | ||
| 1560 | STD c1,0(r_ptr) | ||
| 1561 | COPY %r0,c1 | ||
| 1562 | |||
| 1563 | MUL_ADD_C a0L,a0R,b1L,b1R,c2,c3,c1 | ||
| 1564 | MUL_ADD_C a1L,a1R,b0L,b0R,c2,c3,c1 | ||
| 1565 | STD c2,8(r_ptr) | ||
| 1566 | COPY %r0,c2 | ||
| 1567 | |||
| 1568 | MUL_ADD_C a2L,a2R,b0L,b0R,c3,c1,c2 | ||
| 1569 | MUL_ADD_C a1L,a1R,b1L,b1R,c3,c1,c2 | ||
| 1570 | MUL_ADD_C a0L,a0R,b2L,b2R,c3,c1,c2 | ||
| 1571 | STD c3,16(r_ptr) | ||
| 1572 | COPY %r0,c3 | ||
| 1573 | |||
| 1574 | MUL_ADD_C a0L,a0R,b3L,b3R,c1,c2,c3 | ||
| 1575 | MUL_ADD_C a1L,a1R,b2L,b2R,c1,c2,c3 | ||
| 1576 | MUL_ADD_C a2L,a2R,b1L,b1R,c1,c2,c3 | ||
| 1577 | MUL_ADD_C a3L,a3R,b0L,b0R,c1,c2,c3 | ||
| 1578 | STD c1,24(r_ptr) | ||
| 1579 | COPY %r0,c1 | ||
| 1580 | |||
| 1581 | MUL_ADD_C a3L,a3R,b1L,b1R,c2,c3,c1 | ||
| 1582 | MUL_ADD_C a2L,a2R,b2L,b2R,c2,c3,c1 | ||
| 1583 | MUL_ADD_C a1L,a1R,b3L,b3R,c2,c3,c1 | ||
| 1584 | STD c2,32(r_ptr) | ||
| 1585 | COPY %r0,c2 | ||
| 1586 | |||
| 1587 | MUL_ADD_C a2L,a2R,b3L,b3R,c3,c1,c2 | ||
| 1588 | MUL_ADD_C a3L,a3R,b2L,b2R,c3,c1,c2 | ||
| 1589 | STD c3,40(r_ptr) | ||
| 1590 | COPY %r0,c3 | ||
| 1591 | |||
| 1592 | MUL_ADD_C a3L,a3R,b3L,b3R,c1,c2,c3 | ||
| 1593 | STD c1,48(r_ptr) | ||
| 1594 | STD c2,56(r_ptr) | ||
| 1595 | |||
| 1596 | .EXIT | ||
| 1597 | FLDD -88(%sp),%fr13 | ||
| 1598 | FLDD -96(%sp),%fr12 | ||
| 1599 | LDD -104(%sp),%r6 ; restore r6 | ||
| 1600 | LDD -112(%sp),%r5 ; restore r5 | ||
| 1601 | LDD -120(%sp),%r4 ; restore r4 | ||
| 1602 | BVE (%rp) | ||
| 1603 | LDD,MB -128(%sp),%r3 | ||
| 1604 | |||
| 1605 | .PROCEND | ||
| 1606 | |||
| 1607 | |||
| 1608 | .SPACE $TEXT$ | ||
| 1609 | .SUBSPA $CODE$ | ||
| 1610 | .SPACE $PRIVATE$,SORT=16 | ||
| 1611 | .IMPORT $global$,DATA | ||
| 1612 | .SPACE $TEXT$ | ||
| 1613 | .SUBSPA $CODE$ | ||
| 1614 | .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16 | ||
| 1615 | C$7 | ||
| 1616 | .ALIGN 8 | ||
| 1617 | .STRINGZ "Division would overflow (%d)\n" | ||
| 1618 | .END | ||
diff --git a/src/lib/libssl/src/crypto/bn/asm/pa-risc2W.s b/src/lib/libssl/src/crypto/bn/asm/pa-risc2W.s new file mode 100644 index 0000000000..54b6606252 --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/asm/pa-risc2W.s | |||
| @@ -0,0 +1,1605 @@ | |||
| 1 | ; | ||
| 2 | ; PA-RISC 64-bit implementation of bn_asm code | ||
| 3 | ; | ||
| 4 | ; This code is approximately 2x faster than the C version | ||
| 5 | ; for RSA/DSA. | ||
| 6 | ; | ||
| 7 | ; See http://devresource.hp.com/ for more details on the PA-RISC | ||
| 8 | ; architecture. Also see the book "PA-RISC 2.0 Architecture" | ||
| 9 | ; by Gerry Kane for information on the instruction set architecture. | ||
| 10 | ; | ||
| 11 | ; Code written by Chris Ruemmler (with some help from the HP C | ||
| 12 | ; compiler). | ||
| 13 | ; | ||
| 14 | ; The code compiles with HP's assembler | ||
| 15 | ; | ||
| 16 | |||
| 17 | .level 2.0W | ||
| 18 | .space $TEXT$ | ||
| 19 | .subspa $CODE$,QUAD=0,ALIGN=8,ACCESS=0x2c,CODE_ONLY | ||
| 20 | |||
| 21 | ; | ||
| 22 | ; Global Register definitions used for the routines. | ||
| 23 | ; | ||
| 24 | ; Some information about HP's runtime architecture for 64-bits. | ||
| 25 | ; | ||
| 26 | ; "Caller save" means the calling function must save the register | ||
| 27 | ; if it wants the register to be preserved. | ||
| 28 | ; "Callee save" means if a function uses the register, it must save | ||
| 29 | ; the value before using it. | ||
| 30 | ; | ||
| 31 | ; For the floating point registers | ||
| 32 | ; | ||
| 33 | ; "caller save" registers: fr4-fr11, fr22-fr31 | ||
| 34 | ; "callee save" registers: fr12-fr21 | ||
| 35 | ; "special" registers: fr0-fr3 (status and exception registers) | ||
| 36 | ; | ||
| 37 | ; For the integer registers | ||
| 38 | ; value zero : r0 | ||
| 39 | ; "caller save" registers: r1,r19-r26 | ||
| 40 | ; "callee save" registers: r3-r18 | ||
| 41 | ; return register : r2 (rp) | ||
| 42 | ; return values ; r28 (ret0,ret1) | ||
| 43 | ; Stack pointer ; r30 (sp) | ||
| 44 | ; global data pointer ; r27 (dp) | ||
| 45 | ; argument pointer ; r29 (ap) | ||
| 46 | ; millicode return ptr ; r31 (also a caller save register) | ||
| 47 | |||
| 48 | |||
| 49 | ; | ||
| 50 | ; Arguments to the routines | ||
| 51 | ; | ||
| 52 | r_ptr .reg %r26 | ||
| 53 | a_ptr .reg %r25 | ||
| 54 | b_ptr .reg %r24 | ||
| 55 | num .reg %r24 | ||
| 56 | w .reg %r23 | ||
| 57 | n .reg %r23 | ||
| 58 | |||
| 59 | |||
| 60 | ; | ||
| 61 | ; Globals used in some routines | ||
| 62 | ; | ||
| 63 | |||
| 64 | top_overflow .reg %r29 | ||
| 65 | high_mask .reg %r22 ; value 0xffffffff80000000L | ||
| 66 | |||
| 67 | |||
| 68 | ;------------------------------------------------------------------------------ | ||
| 69 | ; | ||
| 70 | ; bn_mul_add_words | ||
| 71 | ; | ||
| 72 | ;BN_ULONG bn_mul_add_words(BN_ULONG *r_ptr, BN_ULONG *a_ptr, | ||
| 73 | ; int num, BN_ULONG w) | ||
| 74 | ; | ||
| 75 | ; arg0 = r_ptr | ||
| 76 | ; arg1 = a_ptr | ||
| 77 | ; arg2 = num | ||
| 78 | ; arg3 = w | ||
| 79 | ; | ||
| 80 | ; Local register definitions | ||
| 81 | ; | ||
| 82 | |||
| 83 | fm1 .reg %fr22 | ||
| 84 | fm .reg %fr23 | ||
| 85 | ht_temp .reg %fr24 | ||
| 86 | ht_temp_1 .reg %fr25 | ||
| 87 | lt_temp .reg %fr26 | ||
| 88 | lt_temp_1 .reg %fr27 | ||
| 89 | fm1_1 .reg %fr28 | ||
| 90 | fm_1 .reg %fr29 | ||
| 91 | |||
| 92 | fw_h .reg %fr7L | ||
| 93 | fw_l .reg %fr7R | ||
| 94 | fw .reg %fr7 | ||
| 95 | |||
| 96 | fht_0 .reg %fr8L | ||
| 97 | flt_0 .reg %fr8R | ||
| 98 | t_float_0 .reg %fr8 | ||
| 99 | |||
| 100 | fht_1 .reg %fr9L | ||
| 101 | flt_1 .reg %fr9R | ||
| 102 | t_float_1 .reg %fr9 | ||
| 103 | |||
| 104 | tmp_0 .reg %r31 | ||
| 105 | tmp_1 .reg %r21 | ||
| 106 | m_0 .reg %r20 | ||
| 107 | m_1 .reg %r19 | ||
| 108 | ht_0 .reg %r1 | ||
| 109 | ht_1 .reg %r3 | ||
| 110 | lt_0 .reg %r4 | ||
| 111 | lt_1 .reg %r5 | ||
| 112 | m1_0 .reg %r6 | ||
| 113 | m1_1 .reg %r7 | ||
| 114 | rp_val .reg %r8 | ||
| 115 | rp_val_1 .reg %r9 | ||
| 116 | |||
| 117 | bn_mul_add_words | ||
| 118 | .export bn_mul_add_words,entry,NO_RELOCATION,LONG_RETURN | ||
| 119 | .proc | ||
| 120 | .callinfo frame=128 | ||
| 121 | .entry | ||
| 122 | .align 64 | ||
| 123 | |||
| 124 | STD %r3,0(%sp) ; save r3 | ||
| 125 | STD %r4,8(%sp) ; save r4 | ||
| 126 | NOP ; Needed to make the loop 16-byte aligned | ||
| 127 | NOP ; Needed to make the loop 16-byte aligned | ||
| 128 | |||
| 129 | STD %r5,16(%sp) ; save r5 | ||
| 130 | STD %r6,24(%sp) ; save r6 | ||
| 131 | STD %r7,32(%sp) ; save r7 | ||
| 132 | STD %r8,40(%sp) ; save r8 | ||
| 133 | |||
| 134 | STD %r9,48(%sp) ; save r9 | ||
| 135 | COPY %r0,%ret0 ; return 0 by default | ||
| 136 | DEPDI,Z 1,31,1,top_overflow ; top_overflow = 1 << 32 | ||
| 137 | STD w,56(%sp) ; store w on stack | ||
| 138 | |||
| 139 | CMPIB,>= 0,num,bn_mul_add_words_exit ; if (num <= 0) then exit | ||
| 140 | LDO 128(%sp),%sp ; bump stack | ||
| 141 | |||
| 142 | ; | ||
| 143 | ; The loop is unrolled twice, so if there is only 1 number | ||
| 144 | ; then go straight to the cleanup code. | ||
| 145 | ; | ||
| 146 | CMPIB,= 1,num,bn_mul_add_words_single_top | ||
| 147 | FLDD -72(%sp),fw ; load up w into fp register fw (fw_h/fw_l) | ||
| 148 | |||
| 149 | ; | ||
| 150 | ; This loop is unrolled 2 times (64-byte aligned as well) | ||
| 151 | ; | ||
| 152 | ; PA-RISC 2.0 chips have two fully pipelined multipliers, thus | ||
| 153 | ; two 32-bit mutiplies can be issued per cycle. | ||
| 154 | ; | ||
| 155 | bn_mul_add_words_unroll2 | ||
| 156 | |||
| 157 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 158 | FLDD 8(a_ptr),t_float_1 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 159 | LDD 0(r_ptr),rp_val ; rp[0] | ||
| 160 | LDD 8(r_ptr),rp_val_1 ; rp[1] | ||
| 161 | |||
| 162 | XMPYU fht_0,fw_l,fm1 ; m1[0] = fht_0*fw_l | ||
| 163 | XMPYU fht_1,fw_l,fm1_1 ; m1[1] = fht_1*fw_l | ||
| 164 | FSTD fm1,-16(%sp) ; -16(sp) = m1[0] | ||
| 165 | FSTD fm1_1,-48(%sp) ; -48(sp) = m1[1] | ||
| 166 | |||
| 167 | XMPYU flt_0,fw_h,fm ; m[0] = flt_0*fw_h | ||
| 168 | XMPYU flt_1,fw_h,fm_1 ; m[1] = flt_1*fw_h | ||
| 169 | FSTD fm,-8(%sp) ; -8(sp) = m[0] | ||
| 170 | FSTD fm_1,-40(%sp) ; -40(sp) = m[1] | ||
| 171 | |||
| 172 | XMPYU fht_0,fw_h,ht_temp ; ht_temp = fht_0*fw_h | ||
| 173 | XMPYU fht_1,fw_h,ht_temp_1 ; ht_temp_1 = fht_1*fw_h | ||
| 174 | FSTD ht_temp,-24(%sp) ; -24(sp) = ht_temp | ||
| 175 | FSTD ht_temp_1,-56(%sp) ; -56(sp) = ht_temp_1 | ||
| 176 | |||
| 177 | XMPYU flt_0,fw_l,lt_temp ; lt_temp = lt*fw_l | ||
| 178 | XMPYU flt_1,fw_l,lt_temp_1 ; lt_temp = lt*fw_l | ||
| 179 | FSTD lt_temp,-32(%sp) ; -32(sp) = lt_temp | ||
| 180 | FSTD lt_temp_1,-64(%sp) ; -64(sp) = lt_temp_1 | ||
| 181 | |||
| 182 | LDD -8(%sp),m_0 ; m[0] | ||
| 183 | LDD -40(%sp),m_1 ; m[1] | ||
| 184 | LDD -16(%sp),m1_0 ; m1[0] | ||
| 185 | LDD -48(%sp),m1_1 ; m1[1] | ||
| 186 | |||
| 187 | LDD -24(%sp),ht_0 ; ht[0] | ||
| 188 | LDD -56(%sp),ht_1 ; ht[1] | ||
| 189 | ADD,L m1_0,m_0,tmp_0 ; tmp_0 = m[0] + m1[0]; | ||
| 190 | ADD,L m1_1,m_1,tmp_1 ; tmp_1 = m[1] + m1[1]; | ||
| 191 | |||
| 192 | LDD -32(%sp),lt_0 | ||
| 193 | LDD -64(%sp),lt_1 | ||
| 194 | CMPCLR,*>>= tmp_0,m1_0, %r0 ; if (m[0] < m1[0]) | ||
| 195 | ADD,L ht_0,top_overflow,ht_0 ; ht[0] += (1<<32) | ||
| 196 | |||
| 197 | CMPCLR,*>>= tmp_1,m1_1,%r0 ; if (m[1] < m1[1]) | ||
| 198 | ADD,L ht_1,top_overflow,ht_1 ; ht[1] += (1<<32) | ||
| 199 | EXTRD,U tmp_0,31,32,m_0 ; m[0]>>32 | ||
| 200 | DEPD,Z tmp_0,31,32,m1_0 ; m1[0] = m[0]<<32 | ||
| 201 | |||
| 202 | EXTRD,U tmp_1,31,32,m_1 ; m[1]>>32 | ||
| 203 | DEPD,Z tmp_1,31,32,m1_1 ; m1[1] = m[1]<<32 | ||
| 204 | ADD,L ht_0,m_0,ht_0 ; ht[0]+= (m[0]>>32) | ||
| 205 | ADD,L ht_1,m_1,ht_1 ; ht[1]+= (m[1]>>32) | ||
| 206 | |||
| 207 | ADD lt_0,m1_0,lt_0 ; lt[0] = lt[0]+m1[0]; | ||
| 208 | ADD,DC ht_0,%r0,ht_0 ; ht[0]++ | ||
| 209 | ADD lt_1,m1_1,lt_1 ; lt[1] = lt[1]+m1[1]; | ||
| 210 | ADD,DC ht_1,%r0,ht_1 ; ht[1]++ | ||
| 211 | |||
| 212 | ADD %ret0,lt_0,lt_0 ; lt[0] = lt[0] + c; | ||
| 213 | ADD,DC ht_0,%r0,ht_0 ; ht[0]++ | ||
| 214 | ADD lt_0,rp_val,lt_0 ; lt[0] = lt[0]+rp[0] | ||
| 215 | ADD,DC ht_0,%r0,ht_0 ; ht[0]++ | ||
| 216 | |||
| 217 | LDO -2(num),num ; num = num - 2; | ||
| 218 | ADD ht_0,lt_1,lt_1 ; lt[1] = lt[1] + ht_0 (c); | ||
| 219 | ADD,DC ht_1,%r0,ht_1 ; ht[1]++ | ||
| 220 | STD lt_0,0(r_ptr) ; rp[0] = lt[0] | ||
| 221 | |||
| 222 | ADD lt_1,rp_val_1,lt_1 ; lt[1] = lt[1]+rp[1] | ||
| 223 | ADD,DC ht_1,%r0,%ret0 ; ht[1]++ | ||
| 224 | LDO 16(a_ptr),a_ptr ; a_ptr += 2 | ||
| 225 | |||
| 226 | STD lt_1,8(r_ptr) ; rp[1] = lt[1] | ||
| 227 | CMPIB,<= 2,num,bn_mul_add_words_unroll2 ; go again if more to do | ||
| 228 | LDO 16(r_ptr),r_ptr ; r_ptr += 2 | ||
| 229 | |||
| 230 | CMPIB,=,N 0,num,bn_mul_add_words_exit ; are we done, or cleanup last one | ||
| 231 | |||
| 232 | ; | ||
| 233 | ; Top of loop aligned on 64-byte boundary | ||
| 234 | ; | ||
| 235 | bn_mul_add_words_single_top | ||
| 236 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 237 | LDD 0(r_ptr),rp_val ; rp[0] | ||
| 238 | LDO 8(a_ptr),a_ptr ; a_ptr++ | ||
| 239 | XMPYU fht_0,fw_l,fm1 ; m1 = ht*fw_l | ||
| 240 | FSTD fm1,-16(%sp) ; -16(sp) = m1 | ||
| 241 | XMPYU flt_0,fw_h,fm ; m = lt*fw_h | ||
| 242 | FSTD fm,-8(%sp) ; -8(sp) = m | ||
| 243 | XMPYU fht_0,fw_h,ht_temp ; ht_temp = ht*fw_h | ||
| 244 | FSTD ht_temp,-24(%sp) ; -24(sp) = ht | ||
| 245 | XMPYU flt_0,fw_l,lt_temp ; lt_temp = lt*fw_l | ||
| 246 | FSTD lt_temp,-32(%sp) ; -32(sp) = lt | ||
| 247 | |||
| 248 | LDD -8(%sp),m_0 | ||
| 249 | LDD -16(%sp),m1_0 ; m1 = temp1 | ||
| 250 | ADD,L m_0,m1_0,tmp_0 ; tmp_0 = m + m1; | ||
| 251 | LDD -24(%sp),ht_0 | ||
| 252 | LDD -32(%sp),lt_0 | ||
| 253 | |||
| 254 | CMPCLR,*>>= tmp_0,m1_0,%r0 ; if (m < m1) | ||
| 255 | ADD,L ht_0,top_overflow,ht_0 ; ht += (1<<32) | ||
| 256 | |||
| 257 | EXTRD,U tmp_0,31,32,m_0 ; m>>32 | ||
| 258 | DEPD,Z tmp_0,31,32,m1_0 ; m1 = m<<32 | ||
| 259 | |||
| 260 | ADD,L ht_0,m_0,ht_0 ; ht+= (m>>32) | ||
| 261 | ADD lt_0,m1_0,tmp_0 ; tmp_0 = lt+m1; | ||
| 262 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 263 | ADD %ret0,tmp_0,lt_0 ; lt = lt + c; | ||
| 264 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 265 | ADD lt_0,rp_val,lt_0 ; lt = lt+rp[0] | ||
| 266 | ADD,DC ht_0,%r0,%ret0 ; ht++ | ||
| 267 | STD lt_0,0(r_ptr) ; rp[0] = lt | ||
| 268 | |||
| 269 | bn_mul_add_words_exit | ||
| 270 | .EXIT | ||
| 271 | LDD -80(%sp),%r9 ; restore r9 | ||
| 272 | LDD -88(%sp),%r8 ; restore r8 | ||
| 273 | LDD -96(%sp),%r7 ; restore r7 | ||
| 274 | LDD -104(%sp),%r6 ; restore r6 | ||
| 275 | LDD -112(%sp),%r5 ; restore r5 | ||
| 276 | LDD -120(%sp),%r4 ; restore r4 | ||
| 277 | BVE (%rp) | ||
| 278 | LDD,MB -128(%sp),%r3 ; restore r3 | ||
| 279 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 280 | |||
| 281 | ;---------------------------------------------------------------------------- | ||
| 282 | ; | ||
| 283 | ;BN_ULONG bn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w) | ||
| 284 | ; | ||
| 285 | ; arg0 = rp | ||
| 286 | ; arg1 = ap | ||
| 287 | ; arg2 = num | ||
| 288 | ; arg3 = w | ||
| 289 | |||
| 290 | bn_mul_words | ||
| 291 | .proc | ||
| 292 | .callinfo frame=128 | ||
| 293 | .entry | ||
| 294 | .EXPORT bn_mul_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 295 | .align 64 | ||
| 296 | |||
| 297 | STD %r3,0(%sp) ; save r3 | ||
| 298 | STD %r4,8(%sp) ; save r4 | ||
| 299 | STD %r5,16(%sp) ; save r5 | ||
| 300 | STD %r6,24(%sp) ; save r6 | ||
| 301 | |||
| 302 | STD %r7,32(%sp) ; save r7 | ||
| 303 | COPY %r0,%ret0 ; return 0 by default | ||
| 304 | DEPDI,Z 1,31,1,top_overflow ; top_overflow = 1 << 32 | ||
| 305 | STD w,56(%sp) ; w on stack | ||
| 306 | |||
| 307 | CMPIB,>= 0,num,bn_mul_words_exit | ||
| 308 | LDO 128(%sp),%sp ; bump stack | ||
| 309 | |||
| 310 | ; | ||
| 311 | ; See if only 1 word to do, thus just do cleanup | ||
| 312 | ; | ||
| 313 | CMPIB,= 1,num,bn_mul_words_single_top | ||
| 314 | FLDD -72(%sp),fw ; load up w into fp register fw (fw_h/fw_l) | ||
| 315 | |||
| 316 | ; | ||
| 317 | ; This loop is unrolled 2 times (64-byte aligned as well) | ||
| 318 | ; | ||
| 319 | ; PA-RISC 2.0 chips have two fully pipelined multipliers, thus | ||
| 320 | ; two 32-bit mutiplies can be issued per cycle. | ||
| 321 | ; | ||
| 322 | bn_mul_words_unroll2 | ||
| 323 | |||
| 324 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 325 | FLDD 8(a_ptr),t_float_1 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 326 | XMPYU fht_0,fw_l,fm1 ; m1[0] = fht_0*fw_l | ||
| 327 | XMPYU fht_1,fw_l,fm1_1 ; m1[1] = ht*fw_l | ||
| 328 | |||
| 329 | FSTD fm1,-16(%sp) ; -16(sp) = m1 | ||
| 330 | FSTD fm1_1,-48(%sp) ; -48(sp) = m1 | ||
| 331 | XMPYU flt_0,fw_h,fm ; m = lt*fw_h | ||
| 332 | XMPYU flt_1,fw_h,fm_1 ; m = lt*fw_h | ||
| 333 | |||
| 334 | FSTD fm,-8(%sp) ; -8(sp) = m | ||
| 335 | FSTD fm_1,-40(%sp) ; -40(sp) = m | ||
| 336 | XMPYU fht_0,fw_h,ht_temp ; ht_temp = fht_0*fw_h | ||
| 337 | XMPYU fht_1,fw_h,ht_temp_1 ; ht_temp = ht*fw_h | ||
| 338 | |||
| 339 | FSTD ht_temp,-24(%sp) ; -24(sp) = ht | ||
| 340 | FSTD ht_temp_1,-56(%sp) ; -56(sp) = ht | ||
| 341 | XMPYU flt_0,fw_l,lt_temp ; lt_temp = lt*fw_l | ||
| 342 | XMPYU flt_1,fw_l,lt_temp_1 ; lt_temp = lt*fw_l | ||
| 343 | |||
| 344 | FSTD lt_temp,-32(%sp) ; -32(sp) = lt | ||
| 345 | FSTD lt_temp_1,-64(%sp) ; -64(sp) = lt | ||
| 346 | LDD -8(%sp),m_0 | ||
| 347 | LDD -40(%sp),m_1 | ||
| 348 | |||
| 349 | LDD -16(%sp),m1_0 | ||
| 350 | LDD -48(%sp),m1_1 | ||
| 351 | LDD -24(%sp),ht_0 | ||
| 352 | LDD -56(%sp),ht_1 | ||
| 353 | |||
| 354 | ADD,L m1_0,m_0,tmp_0 ; tmp_0 = m + m1; | ||
| 355 | ADD,L m1_1,m_1,tmp_1 ; tmp_1 = m + m1; | ||
| 356 | LDD -32(%sp),lt_0 | ||
| 357 | LDD -64(%sp),lt_1 | ||
| 358 | |||
| 359 | CMPCLR,*>>= tmp_0,m1_0, %r0 ; if (m < m1) | ||
| 360 | ADD,L ht_0,top_overflow,ht_0 ; ht += (1<<32) | ||
| 361 | CMPCLR,*>>= tmp_1,m1_1,%r0 ; if (m < m1) | ||
| 362 | ADD,L ht_1,top_overflow,ht_1 ; ht += (1<<32) | ||
| 363 | |||
| 364 | EXTRD,U tmp_0,31,32,m_0 ; m>>32 | ||
| 365 | DEPD,Z tmp_0,31,32,m1_0 ; m1 = m<<32 | ||
| 366 | EXTRD,U tmp_1,31,32,m_1 ; m>>32 | ||
| 367 | DEPD,Z tmp_1,31,32,m1_1 ; m1 = m<<32 | ||
| 368 | |||
| 369 | ADD,L ht_0,m_0,ht_0 ; ht+= (m>>32) | ||
| 370 | ADD,L ht_1,m_1,ht_1 ; ht+= (m>>32) | ||
| 371 | ADD lt_0,m1_0,lt_0 ; lt = lt+m1; | ||
| 372 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 373 | |||
| 374 | ADD lt_1,m1_1,lt_1 ; lt = lt+m1; | ||
| 375 | ADD,DC ht_1,%r0,ht_1 ; ht++ | ||
| 376 | ADD %ret0,lt_0,lt_0 ; lt = lt + c (ret0); | ||
| 377 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 378 | |||
| 379 | ADD ht_0,lt_1,lt_1 ; lt = lt + c (ht_0) | ||
| 380 | ADD,DC ht_1,%r0,ht_1 ; ht++ | ||
| 381 | STD lt_0,0(r_ptr) ; rp[0] = lt | ||
| 382 | STD lt_1,8(r_ptr) ; rp[1] = lt | ||
| 383 | |||
| 384 | COPY ht_1,%ret0 ; carry = ht | ||
| 385 | LDO -2(num),num ; num = num - 2; | ||
| 386 | LDO 16(a_ptr),a_ptr ; ap += 2 | ||
| 387 | CMPIB,<= 2,num,bn_mul_words_unroll2 | ||
| 388 | LDO 16(r_ptr),r_ptr ; rp++ | ||
| 389 | |||
| 390 | CMPIB,=,N 0,num,bn_mul_words_exit ; are we done? | ||
| 391 | |||
| 392 | ; | ||
| 393 | ; Top of loop aligned on 64-byte boundary | ||
| 394 | ; | ||
| 395 | bn_mul_words_single_top | ||
| 396 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 397 | |||
| 398 | XMPYU fht_0,fw_l,fm1 ; m1 = ht*fw_l | ||
| 399 | FSTD fm1,-16(%sp) ; -16(sp) = m1 | ||
| 400 | XMPYU flt_0,fw_h,fm ; m = lt*fw_h | ||
| 401 | FSTD fm,-8(%sp) ; -8(sp) = m | ||
| 402 | XMPYU fht_0,fw_h,ht_temp ; ht_temp = ht*fw_h | ||
| 403 | FSTD ht_temp,-24(%sp) ; -24(sp) = ht | ||
| 404 | XMPYU flt_0,fw_l,lt_temp ; lt_temp = lt*fw_l | ||
| 405 | FSTD lt_temp,-32(%sp) ; -32(sp) = lt | ||
| 406 | |||
| 407 | LDD -8(%sp),m_0 | ||
| 408 | LDD -16(%sp),m1_0 | ||
| 409 | ADD,L m_0,m1_0,tmp_0 ; tmp_0 = m + m1; | ||
| 410 | LDD -24(%sp),ht_0 | ||
| 411 | LDD -32(%sp),lt_0 | ||
| 412 | |||
| 413 | CMPCLR,*>>= tmp_0,m1_0,%r0 ; if (m < m1) | ||
| 414 | ADD,L ht_0,top_overflow,ht_0 ; ht += (1<<32) | ||
| 415 | |||
| 416 | EXTRD,U tmp_0,31,32,m_0 ; m>>32 | ||
| 417 | DEPD,Z tmp_0,31,32,m1_0 ; m1 = m<<32 | ||
| 418 | |||
| 419 | ADD,L ht_0,m_0,ht_0 ; ht+= (m>>32) | ||
| 420 | ADD lt_0,m1_0,lt_0 ; lt= lt+m1; | ||
| 421 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 422 | |||
| 423 | ADD %ret0,lt_0,lt_0 ; lt = lt + c; | ||
| 424 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 425 | |||
| 426 | COPY ht_0,%ret0 ; copy carry | ||
| 427 | STD lt_0,0(r_ptr) ; rp[0] = lt | ||
| 428 | |||
| 429 | bn_mul_words_exit | ||
| 430 | .EXIT | ||
| 431 | LDD -96(%sp),%r7 ; restore r7 | ||
| 432 | LDD -104(%sp),%r6 ; restore r6 | ||
| 433 | LDD -112(%sp),%r5 ; restore r5 | ||
| 434 | LDD -120(%sp),%r4 ; restore r4 | ||
| 435 | BVE (%rp) | ||
| 436 | LDD,MB -128(%sp),%r3 ; restore r3 | ||
| 437 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 438 | |||
| 439 | ;---------------------------------------------------------------------------- | ||
| 440 | ; | ||
| 441 | ;void bn_sqr_words(BN_ULONG *rp, BN_ULONG *ap, int num) | ||
| 442 | ; | ||
| 443 | ; arg0 = rp | ||
| 444 | ; arg1 = ap | ||
| 445 | ; arg2 = num | ||
| 446 | ; | ||
| 447 | |||
| 448 | bn_sqr_words | ||
| 449 | .proc | ||
| 450 | .callinfo FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE | ||
| 451 | .EXPORT bn_sqr_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 452 | .entry | ||
| 453 | .align 64 | ||
| 454 | |||
| 455 | STD %r3,0(%sp) ; save r3 | ||
| 456 | STD %r4,8(%sp) ; save r4 | ||
| 457 | NOP | ||
| 458 | STD %r5,16(%sp) ; save r5 | ||
| 459 | |||
| 460 | CMPIB,>= 0,num,bn_sqr_words_exit | ||
| 461 | LDO 128(%sp),%sp ; bump stack | ||
| 462 | |||
| 463 | ; | ||
| 464 | ; If only 1, the goto straight to cleanup | ||
| 465 | ; | ||
| 466 | CMPIB,= 1,num,bn_sqr_words_single_top | ||
| 467 | DEPDI,Z -1,32,33,high_mask ; Create Mask 0xffffffff80000000L | ||
| 468 | |||
| 469 | ; | ||
| 470 | ; This loop is unrolled 2 times (64-byte aligned as well) | ||
| 471 | ; | ||
| 472 | |||
| 473 | bn_sqr_words_unroll2 | ||
| 474 | FLDD 0(a_ptr),t_float_0 ; a[0] | ||
| 475 | FLDD 8(a_ptr),t_float_1 ; a[1] | ||
| 476 | XMPYU fht_0,flt_0,fm ; m[0] | ||
| 477 | XMPYU fht_1,flt_1,fm_1 ; m[1] | ||
| 478 | |||
| 479 | FSTD fm,-24(%sp) ; store m[0] | ||
| 480 | FSTD fm_1,-56(%sp) ; store m[1] | ||
| 481 | XMPYU flt_0,flt_0,lt_temp ; lt[0] | ||
| 482 | XMPYU flt_1,flt_1,lt_temp_1 ; lt[1] | ||
| 483 | |||
| 484 | FSTD lt_temp,-16(%sp) ; store lt[0] | ||
| 485 | FSTD lt_temp_1,-48(%sp) ; store lt[1] | ||
| 486 | XMPYU fht_0,fht_0,ht_temp ; ht[0] | ||
| 487 | XMPYU fht_1,fht_1,ht_temp_1 ; ht[1] | ||
| 488 | |||
| 489 | FSTD ht_temp,-8(%sp) ; store ht[0] | ||
| 490 | FSTD ht_temp_1,-40(%sp) ; store ht[1] | ||
| 491 | LDD -24(%sp),m_0 | ||
| 492 | LDD -56(%sp),m_1 | ||
| 493 | |||
| 494 | AND m_0,high_mask,tmp_0 ; m[0] & Mask | ||
| 495 | AND m_1,high_mask,tmp_1 ; m[1] & Mask | ||
| 496 | DEPD,Z m_0,30,31,m_0 ; m[0] << 32+1 | ||
| 497 | DEPD,Z m_1,30,31,m_1 ; m[1] << 32+1 | ||
| 498 | |||
| 499 | LDD -16(%sp),lt_0 | ||
| 500 | LDD -48(%sp),lt_1 | ||
| 501 | EXTRD,U tmp_0,32,33,tmp_0 ; tmp_0 = m[0]&Mask >> 32-1 | ||
| 502 | EXTRD,U tmp_1,32,33,tmp_1 ; tmp_1 = m[1]&Mask >> 32-1 | ||
| 503 | |||
| 504 | LDD -8(%sp),ht_0 | ||
| 505 | LDD -40(%sp),ht_1 | ||
| 506 | ADD,L ht_0,tmp_0,ht_0 ; ht[0] += tmp_0 | ||
| 507 | ADD,L ht_1,tmp_1,ht_1 ; ht[1] += tmp_1 | ||
| 508 | |||
| 509 | ADD lt_0,m_0,lt_0 ; lt = lt+m | ||
| 510 | ADD,DC ht_0,%r0,ht_0 ; ht[0]++ | ||
| 511 | STD lt_0,0(r_ptr) ; rp[0] = lt[0] | ||
| 512 | STD ht_0,8(r_ptr) ; rp[1] = ht[1] | ||
| 513 | |||
| 514 | ADD lt_1,m_1,lt_1 ; lt = lt+m | ||
| 515 | ADD,DC ht_1,%r0,ht_1 ; ht[1]++ | ||
| 516 | STD lt_1,16(r_ptr) ; rp[2] = lt[1] | ||
| 517 | STD ht_1,24(r_ptr) ; rp[3] = ht[1] | ||
| 518 | |||
| 519 | LDO -2(num),num ; num = num - 2; | ||
| 520 | LDO 16(a_ptr),a_ptr ; ap += 2 | ||
| 521 | CMPIB,<= 2,num,bn_sqr_words_unroll2 | ||
| 522 | LDO 32(r_ptr),r_ptr ; rp += 4 | ||
| 523 | |||
| 524 | CMPIB,=,N 0,num,bn_sqr_words_exit ; are we done? | ||
| 525 | |||
| 526 | ; | ||
| 527 | ; Top of loop aligned on 64-byte boundary | ||
| 528 | ; | ||
| 529 | bn_sqr_words_single_top | ||
| 530 | FLDD 0(a_ptr),t_float_0 ; load up 64-bit value (fr8L) ht(L)/lt(R) | ||
| 531 | |||
| 532 | XMPYU fht_0,flt_0,fm ; m | ||
| 533 | FSTD fm,-24(%sp) ; store m | ||
| 534 | |||
| 535 | XMPYU flt_0,flt_0,lt_temp ; lt | ||
| 536 | FSTD lt_temp,-16(%sp) ; store lt | ||
| 537 | |||
| 538 | XMPYU fht_0,fht_0,ht_temp ; ht | ||
| 539 | FSTD ht_temp,-8(%sp) ; store ht | ||
| 540 | |||
| 541 | LDD -24(%sp),m_0 ; load m | ||
| 542 | AND m_0,high_mask,tmp_0 ; m & Mask | ||
| 543 | DEPD,Z m_0,30,31,m_0 ; m << 32+1 | ||
| 544 | LDD -16(%sp),lt_0 ; lt | ||
| 545 | |||
| 546 | LDD -8(%sp),ht_0 ; ht | ||
| 547 | EXTRD,U tmp_0,32,33,tmp_0 ; tmp_0 = m&Mask >> 32-1 | ||
| 548 | ADD m_0,lt_0,lt_0 ; lt = lt+m | ||
| 549 | ADD,L ht_0,tmp_0,ht_0 ; ht += tmp_0 | ||
| 550 | ADD,DC ht_0,%r0,ht_0 ; ht++ | ||
| 551 | |||
| 552 | STD lt_0,0(r_ptr) ; rp[0] = lt | ||
| 553 | STD ht_0,8(r_ptr) ; rp[1] = ht | ||
| 554 | |||
| 555 | bn_sqr_words_exit | ||
| 556 | .EXIT | ||
| 557 | LDD -112(%sp),%r5 ; restore r5 | ||
| 558 | LDD -120(%sp),%r4 ; restore r4 | ||
| 559 | BVE (%rp) | ||
| 560 | LDD,MB -128(%sp),%r3 | ||
| 561 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 562 | |||
| 563 | |||
| 564 | ;---------------------------------------------------------------------------- | ||
| 565 | ; | ||
| 566 | ;BN_ULONG bn_add_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) | ||
| 567 | ; | ||
| 568 | ; arg0 = rp | ||
| 569 | ; arg1 = ap | ||
| 570 | ; arg2 = bp | ||
| 571 | ; arg3 = n | ||
| 572 | |||
| 573 | t .reg %r22 | ||
| 574 | b .reg %r21 | ||
| 575 | l .reg %r20 | ||
| 576 | |||
| 577 | bn_add_words | ||
| 578 | .proc | ||
| 579 | .entry | ||
| 580 | .callinfo | ||
| 581 | .EXPORT bn_add_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 582 | .align 64 | ||
| 583 | |||
| 584 | CMPIB,>= 0,n,bn_add_words_exit | ||
| 585 | COPY %r0,%ret0 ; return 0 by default | ||
| 586 | |||
| 587 | ; | ||
| 588 | ; If 2 or more numbers do the loop | ||
| 589 | ; | ||
| 590 | CMPIB,= 1,n,bn_add_words_single_top | ||
| 591 | NOP | ||
| 592 | |||
| 593 | ; | ||
| 594 | ; This loop is unrolled 2 times (64-byte aligned as well) | ||
| 595 | ; | ||
| 596 | bn_add_words_unroll2 | ||
| 597 | LDD 0(a_ptr),t | ||
| 598 | LDD 0(b_ptr),b | ||
| 599 | ADD t,%ret0,t ; t = t+c; | ||
| 600 | ADD,DC %r0,%r0,%ret0 ; set c to carry | ||
| 601 | ADD t,b,l ; l = t + b[0] | ||
| 602 | ADD,DC %ret0,%r0,%ret0 ; c+= carry | ||
| 603 | STD l,0(r_ptr) | ||
| 604 | |||
| 605 | LDD 8(a_ptr),t | ||
| 606 | LDD 8(b_ptr),b | ||
| 607 | ADD t,%ret0,t ; t = t+c; | ||
| 608 | ADD,DC %r0,%r0,%ret0 ; set c to carry | ||
| 609 | ADD t,b,l ; l = t + b[0] | ||
| 610 | ADD,DC %ret0,%r0,%ret0 ; c+= carry | ||
| 611 | STD l,8(r_ptr) | ||
| 612 | |||
| 613 | LDO -2(n),n | ||
| 614 | LDO 16(a_ptr),a_ptr | ||
| 615 | LDO 16(b_ptr),b_ptr | ||
| 616 | |||
| 617 | CMPIB,<= 2,n,bn_add_words_unroll2 | ||
| 618 | LDO 16(r_ptr),r_ptr | ||
| 619 | |||
| 620 | CMPIB,=,N 0,n,bn_add_words_exit ; are we done? | ||
| 621 | |||
| 622 | bn_add_words_single_top | ||
| 623 | LDD 0(a_ptr),t | ||
| 624 | LDD 0(b_ptr),b | ||
| 625 | |||
| 626 | ADD t,%ret0,t ; t = t+c; | ||
| 627 | ADD,DC %r0,%r0,%ret0 ; set c to carry (could use CMPCLR??) | ||
| 628 | ADD t,b,l ; l = t + b[0] | ||
| 629 | ADD,DC %ret0,%r0,%ret0 ; c+= carry | ||
| 630 | STD l,0(r_ptr) | ||
| 631 | |||
| 632 | bn_add_words_exit | ||
| 633 | .EXIT | ||
| 634 | BVE (%rp) | ||
| 635 | NOP | ||
| 636 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 637 | |||
| 638 | ;---------------------------------------------------------------------------- | ||
| 639 | ; | ||
| 640 | ;BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) | ||
| 641 | ; | ||
| 642 | ; arg0 = rp | ||
| 643 | ; arg1 = ap | ||
| 644 | ; arg2 = bp | ||
| 645 | ; arg3 = n | ||
| 646 | |||
| 647 | t1 .reg %r22 | ||
| 648 | t2 .reg %r21 | ||
| 649 | sub_tmp1 .reg %r20 | ||
| 650 | sub_tmp2 .reg %r19 | ||
| 651 | |||
| 652 | |||
| 653 | bn_sub_words | ||
| 654 | .proc | ||
| 655 | .callinfo | ||
| 656 | .EXPORT bn_sub_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 657 | .entry | ||
| 658 | .align 64 | ||
| 659 | |||
| 660 | CMPIB,>= 0,n,bn_sub_words_exit | ||
| 661 | COPY %r0,%ret0 ; return 0 by default | ||
| 662 | |||
| 663 | ; | ||
| 664 | ; If 2 or more numbers do the loop | ||
| 665 | ; | ||
| 666 | CMPIB,= 1,n,bn_sub_words_single_top | ||
| 667 | NOP | ||
| 668 | |||
| 669 | ; | ||
| 670 | ; This loop is unrolled 2 times (64-byte aligned as well) | ||
| 671 | ; | ||
| 672 | bn_sub_words_unroll2 | ||
| 673 | LDD 0(a_ptr),t1 | ||
| 674 | LDD 0(b_ptr),t2 | ||
| 675 | SUB t1,t2,sub_tmp1 ; t3 = t1-t2; | ||
| 676 | SUB sub_tmp1,%ret0,sub_tmp1 ; t3 = t3- c; | ||
| 677 | |||
| 678 | CMPCLR,*>> t1,t2,sub_tmp2 ; clear if t1 > t2 | ||
| 679 | LDO 1(%r0),sub_tmp2 | ||
| 680 | |||
| 681 | CMPCLR,*= t1,t2,%r0 | ||
| 682 | COPY sub_tmp2,%ret0 | ||
| 683 | STD sub_tmp1,0(r_ptr) | ||
| 684 | |||
| 685 | LDD 8(a_ptr),t1 | ||
| 686 | LDD 8(b_ptr),t2 | ||
| 687 | SUB t1,t2,sub_tmp1 ; t3 = t1-t2; | ||
| 688 | SUB sub_tmp1,%ret0,sub_tmp1 ; t3 = t3- c; | ||
| 689 | CMPCLR,*>> t1,t2,sub_tmp2 ; clear if t1 > t2 | ||
| 690 | LDO 1(%r0),sub_tmp2 | ||
| 691 | |||
| 692 | CMPCLR,*= t1,t2,%r0 | ||
| 693 | COPY sub_tmp2,%ret0 | ||
| 694 | STD sub_tmp1,8(r_ptr) | ||
| 695 | |||
| 696 | LDO -2(n),n | ||
| 697 | LDO 16(a_ptr),a_ptr | ||
| 698 | LDO 16(b_ptr),b_ptr | ||
| 699 | |||
| 700 | CMPIB,<= 2,n,bn_sub_words_unroll2 | ||
| 701 | LDO 16(r_ptr),r_ptr | ||
| 702 | |||
| 703 | CMPIB,=,N 0,n,bn_sub_words_exit ; are we done? | ||
| 704 | |||
| 705 | bn_sub_words_single_top | ||
| 706 | LDD 0(a_ptr),t1 | ||
| 707 | LDD 0(b_ptr),t2 | ||
| 708 | SUB t1,t2,sub_tmp1 ; t3 = t1-t2; | ||
| 709 | SUB sub_tmp1,%ret0,sub_tmp1 ; t3 = t3- c; | ||
| 710 | CMPCLR,*>> t1,t2,sub_tmp2 ; clear if t1 > t2 | ||
| 711 | LDO 1(%r0),sub_tmp2 | ||
| 712 | |||
| 713 | CMPCLR,*= t1,t2,%r0 | ||
| 714 | COPY sub_tmp2,%ret0 | ||
| 715 | |||
| 716 | STD sub_tmp1,0(r_ptr) | ||
| 717 | |||
| 718 | bn_sub_words_exit | ||
| 719 | .EXIT | ||
| 720 | BVE (%rp) | ||
| 721 | NOP | ||
| 722 | .PROCEND ;in=23,24,25,26,29;out=28; | ||
| 723 | |||
| 724 | ;------------------------------------------------------------------------------ | ||
| 725 | ; | ||
| 726 | ; unsigned long bn_div_words(unsigned long h, unsigned long l, unsigned long d) | ||
| 727 | ; | ||
| 728 | ; arg0 = h | ||
| 729 | ; arg1 = l | ||
| 730 | ; arg2 = d | ||
| 731 | ; | ||
| 732 | ; This is mainly just modified assembly from the compiler, thus the | ||
| 733 | ; lack of variable names. | ||
| 734 | ; | ||
| 735 | ;------------------------------------------------------------------------------ | ||
| 736 | bn_div_words | ||
| 737 | .proc | ||
| 738 | .callinfo CALLER,FRAME=272,ENTRY_GR=%r10,SAVE_RP,ARGS_SAVED,ORDERING_AWARE | ||
| 739 | .EXPORT bn_div_words,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 740 | .IMPORT BN_num_bits_word,CODE,NO_RELOCATION | ||
| 741 | .IMPORT __iob,DATA | ||
| 742 | .IMPORT fprintf,CODE,NO_RELOCATION | ||
| 743 | .IMPORT abort,CODE,NO_RELOCATION | ||
| 744 | .IMPORT $$div2U,MILLICODE | ||
| 745 | .entry | ||
| 746 | STD %r2,-16(%r30) | ||
| 747 | STD,MA %r3,352(%r30) | ||
| 748 | STD %r4,-344(%r30) | ||
| 749 | STD %r5,-336(%r30) | ||
| 750 | STD %r6,-328(%r30) | ||
| 751 | STD %r7,-320(%r30) | ||
| 752 | STD %r8,-312(%r30) | ||
| 753 | STD %r9,-304(%r30) | ||
| 754 | STD %r10,-296(%r30) | ||
| 755 | |||
| 756 | STD %r27,-288(%r30) ; save gp | ||
| 757 | |||
| 758 | COPY %r24,%r3 ; save d | ||
| 759 | COPY %r26,%r4 ; save h (high 64-bits) | ||
| 760 | LDO -1(%r0),%ret0 ; return -1 by default | ||
| 761 | |||
| 762 | CMPB,*= %r0,%arg2,$D3 ; if (d == 0) | ||
| 763 | COPY %r25,%r5 ; save l (low 64-bits) | ||
| 764 | |||
| 765 | LDO -48(%r30),%r29 ; create ap | ||
| 766 | .CALL ;in=26,29;out=28; | ||
| 767 | B,L BN_num_bits_word,%r2 | ||
| 768 | COPY %r3,%r26 | ||
| 769 | LDD -288(%r30),%r27 ; restore gp | ||
| 770 | LDI 64,%r21 | ||
| 771 | |||
| 772 | CMPB,= %r21,%ret0,$00000012 ;if (i == 64) (forward) | ||
| 773 | COPY %ret0,%r24 ; i | ||
| 774 | MTSARCM %r24 | ||
| 775 | DEPDI,Z -1,%sar,1,%r29 | ||
| 776 | CMPB,*<<,N %r29,%r4,bn_div_err_case ; if (h > 1<<i) (forward) | ||
| 777 | |||
| 778 | $00000012 | ||
| 779 | SUBI 64,%r24,%r31 ; i = 64 - i; | ||
| 780 | CMPCLR,*<< %r4,%r3,%r0 ; if (h >= d) | ||
| 781 | SUB %r4,%r3,%r4 ; h -= d | ||
| 782 | CMPB,= %r31,%r0,$0000001A ; if (i) | ||
| 783 | COPY %r0,%r10 ; ret = 0 | ||
| 784 | MTSARCM %r31 ; i to shift | ||
| 785 | DEPD,Z %r3,%sar,64,%r3 ; d <<= i; | ||
| 786 | SUBI 64,%r31,%r19 ; 64 - i; redundent | ||
| 787 | MTSAR %r19 ; (64 -i) to shift | ||
| 788 | SHRPD %r4,%r5,%sar,%r4 ; l>> (64-i) | ||
| 789 | MTSARCM %r31 ; i to shift | ||
| 790 | DEPD,Z %r5,%sar,64,%r5 ; l <<= i; | ||
| 791 | |||
| 792 | $0000001A | ||
| 793 | DEPDI,Z -1,31,32,%r19 | ||
| 794 | EXTRD,U %r3,31,32,%r6 ; dh=(d&0xfff)>>32 | ||
| 795 | EXTRD,U %r3,63,32,%r8 ; dl = d&0xffffff | ||
| 796 | LDO 2(%r0),%r9 | ||
| 797 | STD %r3,-280(%r30) ; "d" to stack | ||
| 798 | |||
| 799 | $0000001C | ||
| 800 | DEPDI,Z -1,63,32,%r29 ; | ||
| 801 | EXTRD,U %r4,31,32,%r31 ; h >> 32 | ||
| 802 | CMPB,*=,N %r31,%r6,$D2 ; if ((h>>32) != dh)(forward) div | ||
| 803 | COPY %r4,%r26 | ||
| 804 | EXTRD,U %r4,31,32,%r25 | ||
| 805 | COPY %r6,%r24 | ||
| 806 | .CALL ;in=23,24,25,26;out=20,21,22,28,29; (MILLICALL) | ||
| 807 | B,L $$div2U,%r2 | ||
| 808 | EXTRD,U %r6,31,32,%r23 | ||
| 809 | DEPD %r28,31,32,%r29 | ||
| 810 | $D2 | ||
| 811 | STD %r29,-272(%r30) ; q | ||
| 812 | AND %r5,%r19,%r24 ; t & 0xffffffff00000000; | ||
| 813 | EXTRD,U %r24,31,32,%r24 ; ??? | ||
| 814 | FLDD -272(%r30),%fr7 ; q | ||
| 815 | FLDD -280(%r30),%fr8 ; d | ||
| 816 | XMPYU %fr8L,%fr7L,%fr10 | ||
| 817 | FSTD %fr10,-256(%r30) | ||
| 818 | XMPYU %fr8L,%fr7R,%fr22 | ||
| 819 | FSTD %fr22,-264(%r30) | ||
| 820 | XMPYU %fr8R,%fr7L,%fr11 | ||
| 821 | XMPYU %fr8R,%fr7R,%fr23 | ||
| 822 | FSTD %fr11,-232(%r30) | ||
| 823 | FSTD %fr23,-240(%r30) | ||
| 824 | LDD -256(%r30),%r28 | ||
| 825 | DEPD,Z %r28,31,32,%r2 | ||
| 826 | LDD -264(%r30),%r20 | ||
| 827 | ADD,L %r20,%r2,%r31 | ||
| 828 | LDD -232(%r30),%r22 | ||
| 829 | DEPD,Z %r22,31,32,%r22 | ||
| 830 | LDD -240(%r30),%r21 | ||
| 831 | B $00000024 ; enter loop | ||
| 832 | ADD,L %r21,%r22,%r23 | ||
| 833 | |||
| 834 | $0000002A | ||
| 835 | LDO -1(%r29),%r29 | ||
| 836 | SUB %r23,%r8,%r23 | ||
| 837 | $00000024 | ||
| 838 | SUB %r4,%r31,%r25 | ||
| 839 | AND %r25,%r19,%r26 | ||
| 840 | CMPB,*<>,N %r0,%r26,$00000046 ; (forward) | ||
| 841 | DEPD,Z %r25,31,32,%r20 | ||
| 842 | OR %r20,%r24,%r21 | ||
| 843 | CMPB,*<<,N %r21,%r23,$0000002A ;(backward) | ||
| 844 | SUB %r31,%r6,%r31 | ||
| 845 | ;-------------Break path--------------------- | ||
| 846 | |||
| 847 | $00000046 | ||
| 848 | DEPD,Z %r23,31,32,%r25 ;tl | ||
| 849 | EXTRD,U %r23,31,32,%r26 ;t | ||
| 850 | AND %r25,%r19,%r24 ;tl = (tl<<32)&0xfffffff0000000L | ||
| 851 | ADD,L %r31,%r26,%r31 ;th += t; | ||
| 852 | CMPCLR,*>>= %r5,%r24,%r0 ;if (l<tl) | ||
| 853 | LDO 1(%r31),%r31 ; th++; | ||
| 854 | CMPB,*<<=,N %r31,%r4,$00000036 ;if (n < th) (forward) | ||
| 855 | LDO -1(%r29),%r29 ;q--; | ||
| 856 | ADD,L %r4,%r3,%r4 ;h += d; | ||
| 857 | $00000036 | ||
| 858 | ADDIB,=,N -1,%r9,$D1 ;if (--count == 0) break (forward) | ||
| 859 | SUB %r5,%r24,%r28 ; l -= tl; | ||
| 860 | SUB %r4,%r31,%r24 ; h -= th; | ||
| 861 | SHRPD %r24,%r28,32,%r4 ; h = ((h<<32)|(l>>32)); | ||
| 862 | DEPD,Z %r29,31,32,%r10 ; ret = q<<32 | ||
| 863 | b $0000001C | ||
| 864 | DEPD,Z %r28,31,32,%r5 ; l = l << 32 | ||
| 865 | |||
| 866 | $D1 | ||
| 867 | OR %r10,%r29,%r28 ; ret |= q | ||
| 868 | $D3 | ||
| 869 | LDD -368(%r30),%r2 | ||
| 870 | $D0 | ||
| 871 | LDD -296(%r30),%r10 | ||
| 872 | LDD -304(%r30),%r9 | ||
| 873 | LDD -312(%r30),%r8 | ||
| 874 | LDD -320(%r30),%r7 | ||
| 875 | LDD -328(%r30),%r6 | ||
| 876 | LDD -336(%r30),%r5 | ||
| 877 | LDD -344(%r30),%r4 | ||
| 878 | BVE (%r2) | ||
| 879 | .EXIT | ||
| 880 | LDD,MB -352(%r30),%r3 | ||
| 881 | |||
| 882 | bn_div_err_case | ||
| 883 | MFIA %r6 | ||
| 884 | ADDIL L'bn_div_words-bn_div_err_case,%r6,%r1 | ||
| 885 | LDO R'bn_div_words-bn_div_err_case(%r1),%r6 | ||
| 886 | ADDIL LT'__iob,%r27,%r1 | ||
| 887 | LDD RT'__iob(%r1),%r26 | ||
| 888 | ADDIL L'C$4-bn_div_words,%r6,%r1 | ||
| 889 | LDO R'C$4-bn_div_words(%r1),%r25 | ||
| 890 | LDO 64(%r26),%r26 | ||
| 891 | .CALL ;in=24,25,26,29;out=28; | ||
| 892 | B,L fprintf,%r2 | ||
| 893 | LDO -48(%r30),%r29 | ||
| 894 | LDD -288(%r30),%r27 | ||
| 895 | .CALL ;in=29; | ||
| 896 | B,L abort,%r2 | ||
| 897 | LDO -48(%r30),%r29 | ||
| 898 | LDD -288(%r30),%r27 | ||
| 899 | B $D0 | ||
| 900 | LDD -368(%r30),%r2 | ||
| 901 | .PROCEND ;in=24,25,26,29;out=28; | ||
| 902 | |||
| 903 | ;---------------------------------------------------------------------------- | ||
| 904 | ; | ||
| 905 | ; Registers to hold 64-bit values to manipulate. The "L" part | ||
| 906 | ; of the register corresponds to the upper 32-bits, while the "R" | ||
| 907 | ; part corresponds to the lower 32-bits | ||
| 908 | ; | ||
| 909 | ; Note, that when using b6 and b7, the code must save these before | ||
| 910 | ; using them because they are callee save registers | ||
| 911 | ; | ||
| 912 | ; | ||
| 913 | ; Floating point registers to use to save values that | ||
| 914 | ; are manipulated. These don't collide with ftemp1-6 and | ||
| 915 | ; are all caller save registers | ||
| 916 | ; | ||
| 917 | a0 .reg %fr22 | ||
| 918 | a0L .reg %fr22L | ||
| 919 | a0R .reg %fr22R | ||
| 920 | |||
| 921 | a1 .reg %fr23 | ||
| 922 | a1L .reg %fr23L | ||
| 923 | a1R .reg %fr23R | ||
| 924 | |||
| 925 | a2 .reg %fr24 | ||
| 926 | a2L .reg %fr24L | ||
| 927 | a2R .reg %fr24R | ||
| 928 | |||
| 929 | a3 .reg %fr25 | ||
| 930 | a3L .reg %fr25L | ||
| 931 | a3R .reg %fr25R | ||
| 932 | |||
| 933 | a4 .reg %fr26 | ||
| 934 | a4L .reg %fr26L | ||
| 935 | a4R .reg %fr26R | ||
| 936 | |||
| 937 | a5 .reg %fr27 | ||
| 938 | a5L .reg %fr27L | ||
| 939 | a5R .reg %fr27R | ||
| 940 | |||
| 941 | a6 .reg %fr28 | ||
| 942 | a6L .reg %fr28L | ||
| 943 | a6R .reg %fr28R | ||
| 944 | |||
| 945 | a7 .reg %fr29 | ||
| 946 | a7L .reg %fr29L | ||
| 947 | a7R .reg %fr29R | ||
| 948 | |||
| 949 | b0 .reg %fr30 | ||
| 950 | b0L .reg %fr30L | ||
| 951 | b0R .reg %fr30R | ||
| 952 | |||
| 953 | b1 .reg %fr31 | ||
| 954 | b1L .reg %fr31L | ||
| 955 | b1R .reg %fr31R | ||
| 956 | |||
| 957 | ; | ||
| 958 | ; Temporary floating point variables, these are all caller save | ||
| 959 | ; registers | ||
| 960 | ; | ||
| 961 | ftemp1 .reg %fr4 | ||
| 962 | ftemp2 .reg %fr5 | ||
| 963 | ftemp3 .reg %fr6 | ||
| 964 | ftemp4 .reg %fr7 | ||
| 965 | |||
| 966 | ; | ||
| 967 | ; The B set of registers when used. | ||
| 968 | ; | ||
| 969 | |||
| 970 | b2 .reg %fr8 | ||
| 971 | b2L .reg %fr8L | ||
| 972 | b2R .reg %fr8R | ||
| 973 | |||
| 974 | b3 .reg %fr9 | ||
| 975 | b3L .reg %fr9L | ||
| 976 | b3R .reg %fr9R | ||
| 977 | |||
| 978 | b4 .reg %fr10 | ||
| 979 | b4L .reg %fr10L | ||
| 980 | b4R .reg %fr10R | ||
| 981 | |||
| 982 | b5 .reg %fr11 | ||
| 983 | b5L .reg %fr11L | ||
| 984 | b5R .reg %fr11R | ||
| 985 | |||
| 986 | b6 .reg %fr12 | ||
| 987 | b6L .reg %fr12L | ||
| 988 | b6R .reg %fr12R | ||
| 989 | |||
| 990 | b7 .reg %fr13 | ||
| 991 | b7L .reg %fr13L | ||
| 992 | b7R .reg %fr13R | ||
| 993 | |||
| 994 | c1 .reg %r21 ; only reg | ||
| 995 | temp1 .reg %r20 ; only reg | ||
| 996 | temp2 .reg %r19 ; only reg | ||
| 997 | temp3 .reg %r31 ; only reg | ||
| 998 | |||
| 999 | m1 .reg %r28 | ||
| 1000 | c2 .reg %r23 | ||
| 1001 | high_one .reg %r1 | ||
| 1002 | ht .reg %r6 | ||
| 1003 | lt .reg %r5 | ||
| 1004 | m .reg %r4 | ||
| 1005 | c3 .reg %r3 | ||
| 1006 | |||
| 1007 | SQR_ADD_C .macro A0L,A0R,C1,C2,C3 | ||
| 1008 | XMPYU A0L,A0R,ftemp1 ; m | ||
| 1009 | FSTD ftemp1,-24(%sp) ; store m | ||
| 1010 | |||
| 1011 | XMPYU A0R,A0R,ftemp2 ; lt | ||
| 1012 | FSTD ftemp2,-16(%sp) ; store lt | ||
| 1013 | |||
| 1014 | XMPYU A0L,A0L,ftemp3 ; ht | ||
| 1015 | FSTD ftemp3,-8(%sp) ; store ht | ||
| 1016 | |||
| 1017 | LDD -24(%sp),m ; load m | ||
| 1018 | AND m,high_mask,temp2 ; m & Mask | ||
| 1019 | DEPD,Z m,30,31,temp3 ; m << 32+1 | ||
| 1020 | LDD -16(%sp),lt ; lt | ||
| 1021 | |||
| 1022 | LDD -8(%sp),ht ; ht | ||
| 1023 | EXTRD,U temp2,32,33,temp1 ; temp1 = m&Mask >> 32-1 | ||
| 1024 | ADD temp3,lt,lt ; lt = lt+m | ||
| 1025 | ADD,L ht,temp1,ht ; ht += temp1 | ||
| 1026 | ADD,DC ht,%r0,ht ; ht++ | ||
| 1027 | |||
| 1028 | ADD C1,lt,C1 ; c1=c1+lt | ||
| 1029 | ADD,DC ht,%r0,ht ; ht++ | ||
| 1030 | |||
| 1031 | ADD C2,ht,C2 ; c2=c2+ht | ||
| 1032 | ADD,DC C3,%r0,C3 ; c3++ | ||
| 1033 | .endm | ||
| 1034 | |||
| 1035 | SQR_ADD_C2 .macro A0L,A0R,A1L,A1R,C1,C2,C3 | ||
| 1036 | XMPYU A0L,A1R,ftemp1 ; m1 = bl*ht | ||
| 1037 | FSTD ftemp1,-16(%sp) ; | ||
| 1038 | XMPYU A0R,A1L,ftemp2 ; m = bh*lt | ||
| 1039 | FSTD ftemp2,-8(%sp) ; | ||
| 1040 | XMPYU A0R,A1R,ftemp3 ; lt = bl*lt | ||
| 1041 | FSTD ftemp3,-32(%sp) | ||
| 1042 | XMPYU A0L,A1L,ftemp4 ; ht = bh*ht | ||
| 1043 | FSTD ftemp4,-24(%sp) ; | ||
| 1044 | |||
| 1045 | LDD -8(%sp),m ; r21 = m | ||
| 1046 | LDD -16(%sp),m1 ; r19 = m1 | ||
| 1047 | ADD,L m,m1,m ; m+m1 | ||
| 1048 | |||
| 1049 | DEPD,Z m,31,32,temp3 ; (m+m1<<32) | ||
| 1050 | LDD -24(%sp),ht ; r24 = ht | ||
| 1051 | |||
| 1052 | CMPCLR,*>>= m,m1,%r0 ; if (m < m1) | ||
| 1053 | ADD,L ht,high_one,ht ; ht+=high_one | ||
| 1054 | |||
| 1055 | EXTRD,U m,31,32,temp1 ; m >> 32 | ||
| 1056 | LDD -32(%sp),lt ; lt | ||
| 1057 | ADD,L ht,temp1,ht ; ht+= m>>32 | ||
| 1058 | ADD lt,temp3,lt ; lt = lt+m1 | ||
| 1059 | ADD,DC ht,%r0,ht ; ht++ | ||
| 1060 | |||
| 1061 | ADD ht,ht,ht ; ht=ht+ht; | ||
| 1062 | ADD,DC C3,%r0,C3 ; add in carry (c3++) | ||
| 1063 | |||
| 1064 | ADD lt,lt,lt ; lt=lt+lt; | ||
| 1065 | ADD,DC ht,%r0,ht ; add in carry (ht++) | ||
| 1066 | |||
| 1067 | ADD C1,lt,C1 ; c1=c1+lt | ||
| 1068 | ADD,DC,*NUV ht,%r0,ht ; add in carry (ht++) | ||
| 1069 | LDO 1(C3),C3 ; bump c3 if overflow,nullify otherwise | ||
| 1070 | |||
| 1071 | ADD C2,ht,C2 ; c2 = c2 + ht | ||
| 1072 | ADD,DC C3,%r0,C3 ; add in carry (c3++) | ||
| 1073 | .endm | ||
| 1074 | |||
| 1075 | ; | ||
| 1076 | ;void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a) | ||
| 1077 | ; arg0 = r_ptr | ||
| 1078 | ; arg1 = a_ptr | ||
| 1079 | ; | ||
| 1080 | |||
| 1081 | bn_sqr_comba8 | ||
| 1082 | .PROC | ||
| 1083 | .CALLINFO FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE | ||
| 1084 | .EXPORT bn_sqr_comba8,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 1085 | .ENTRY | ||
| 1086 | .align 64 | ||
| 1087 | |||
| 1088 | STD %r3,0(%sp) ; save r3 | ||
| 1089 | STD %r4,8(%sp) ; save r4 | ||
| 1090 | STD %r5,16(%sp) ; save r5 | ||
| 1091 | STD %r6,24(%sp) ; save r6 | ||
| 1092 | |||
| 1093 | ; | ||
| 1094 | ; Zero out carries | ||
| 1095 | ; | ||
| 1096 | COPY %r0,c1 | ||
| 1097 | COPY %r0,c2 | ||
| 1098 | COPY %r0,c3 | ||
| 1099 | |||
| 1100 | LDO 128(%sp),%sp ; bump stack | ||
| 1101 | DEPDI,Z -1,32,33,high_mask ; Create Mask 0xffffffff80000000L | ||
| 1102 | DEPDI,Z 1,31,1,high_one ; Create Value 1 << 32 | ||
| 1103 | |||
| 1104 | ; | ||
| 1105 | ; Load up all of the values we are going to use | ||
| 1106 | ; | ||
| 1107 | FLDD 0(a_ptr),a0 | ||
| 1108 | FLDD 8(a_ptr),a1 | ||
| 1109 | FLDD 16(a_ptr),a2 | ||
| 1110 | FLDD 24(a_ptr),a3 | ||
| 1111 | FLDD 32(a_ptr),a4 | ||
| 1112 | FLDD 40(a_ptr),a5 | ||
| 1113 | FLDD 48(a_ptr),a6 | ||
| 1114 | FLDD 56(a_ptr),a7 | ||
| 1115 | |||
| 1116 | SQR_ADD_C a0L,a0R,c1,c2,c3 | ||
| 1117 | STD c1,0(r_ptr) ; r[0] = c1; | ||
| 1118 | COPY %r0,c1 | ||
| 1119 | |||
| 1120 | SQR_ADD_C2 a1L,a1R,a0L,a0R,c2,c3,c1 | ||
| 1121 | STD c2,8(r_ptr) ; r[1] = c2; | ||
| 1122 | COPY %r0,c2 | ||
| 1123 | |||
| 1124 | SQR_ADD_C a1L,a1R,c3,c1,c2 | ||
| 1125 | SQR_ADD_C2 a2L,a2R,a0L,a0R,c3,c1,c2 | ||
| 1126 | STD c3,16(r_ptr) ; r[2] = c3; | ||
| 1127 | COPY %r0,c3 | ||
| 1128 | |||
| 1129 | SQR_ADD_C2 a3L,a3R,a0L,a0R,c1,c2,c3 | ||
| 1130 | SQR_ADD_C2 a2L,a2R,a1L,a1R,c1,c2,c3 | ||
| 1131 | STD c1,24(r_ptr) ; r[3] = c1; | ||
| 1132 | COPY %r0,c1 | ||
| 1133 | |||
| 1134 | SQR_ADD_C a2L,a2R,c2,c3,c1 | ||
| 1135 | SQR_ADD_C2 a3L,a3R,a1L,a1R,c2,c3,c1 | ||
| 1136 | SQR_ADD_C2 a4L,a4R,a0L,a0R,c2,c3,c1 | ||
| 1137 | STD c2,32(r_ptr) ; r[4] = c2; | ||
| 1138 | COPY %r0,c2 | ||
| 1139 | |||
| 1140 | SQR_ADD_C2 a5L,a5R,a0L,a0R,c3,c1,c2 | ||
| 1141 | SQR_ADD_C2 a4L,a4R,a1L,a1R,c3,c1,c2 | ||
| 1142 | SQR_ADD_C2 a3L,a3R,a2L,a2R,c3,c1,c2 | ||
| 1143 | STD c3,40(r_ptr) ; r[5] = c3; | ||
| 1144 | COPY %r0,c3 | ||
| 1145 | |||
| 1146 | SQR_ADD_C a3L,a3R,c1,c2,c3 | ||
| 1147 | SQR_ADD_C2 a4L,a4R,a2L,a2R,c1,c2,c3 | ||
| 1148 | SQR_ADD_C2 a5L,a5R,a1L,a1R,c1,c2,c3 | ||
| 1149 | SQR_ADD_C2 a6L,a6R,a0L,a0R,c1,c2,c3 | ||
| 1150 | STD c1,48(r_ptr) ; r[6] = c1; | ||
| 1151 | COPY %r0,c1 | ||
| 1152 | |||
| 1153 | SQR_ADD_C2 a7L,a7R,a0L,a0R,c2,c3,c1 | ||
| 1154 | SQR_ADD_C2 a6L,a6R,a1L,a1R,c2,c3,c1 | ||
| 1155 | SQR_ADD_C2 a5L,a5R,a2L,a2R,c2,c3,c1 | ||
| 1156 | SQR_ADD_C2 a4L,a4R,a3L,a3R,c2,c3,c1 | ||
| 1157 | STD c2,56(r_ptr) ; r[7] = c2; | ||
| 1158 | COPY %r0,c2 | ||
| 1159 | |||
| 1160 | SQR_ADD_C a4L,a4R,c3,c1,c2 | ||
| 1161 | SQR_ADD_C2 a5L,a5R,a3L,a3R,c3,c1,c2 | ||
| 1162 | SQR_ADD_C2 a6L,a6R,a2L,a2R,c3,c1,c2 | ||
| 1163 | SQR_ADD_C2 a7L,a7R,a1L,a1R,c3,c1,c2 | ||
| 1164 | STD c3,64(r_ptr) ; r[8] = c3; | ||
| 1165 | COPY %r0,c3 | ||
| 1166 | |||
| 1167 | SQR_ADD_C2 a7L,a7R,a2L,a2R,c1,c2,c3 | ||
| 1168 | SQR_ADD_C2 a6L,a6R,a3L,a3R,c1,c2,c3 | ||
| 1169 | SQR_ADD_C2 a5L,a5R,a4L,a4R,c1,c2,c3 | ||
| 1170 | STD c1,72(r_ptr) ; r[9] = c1; | ||
| 1171 | COPY %r0,c1 | ||
| 1172 | |||
| 1173 | SQR_ADD_C a5L,a5R,c2,c3,c1 | ||
| 1174 | SQR_ADD_C2 a6L,a6R,a4L,a4R,c2,c3,c1 | ||
| 1175 | SQR_ADD_C2 a7L,a7R,a3L,a3R,c2,c3,c1 | ||
| 1176 | STD c2,80(r_ptr) ; r[10] = c2; | ||
| 1177 | COPY %r0,c2 | ||
| 1178 | |||
| 1179 | SQR_ADD_C2 a7L,a7R,a4L,a4R,c3,c1,c2 | ||
| 1180 | SQR_ADD_C2 a6L,a6R,a5L,a5R,c3,c1,c2 | ||
| 1181 | STD c3,88(r_ptr) ; r[11] = c3; | ||
| 1182 | COPY %r0,c3 | ||
| 1183 | |||
| 1184 | SQR_ADD_C a6L,a6R,c1,c2,c3 | ||
| 1185 | SQR_ADD_C2 a7L,a7R,a5L,a5R,c1,c2,c3 | ||
| 1186 | STD c1,96(r_ptr) ; r[12] = c1; | ||
| 1187 | COPY %r0,c1 | ||
| 1188 | |||
| 1189 | SQR_ADD_C2 a7L,a7R,a6L,a6R,c2,c3,c1 | ||
| 1190 | STD c2,104(r_ptr) ; r[13] = c2; | ||
| 1191 | COPY %r0,c2 | ||
| 1192 | |||
| 1193 | SQR_ADD_C a7L,a7R,c3,c1,c2 | ||
| 1194 | STD c3, 112(r_ptr) ; r[14] = c3 | ||
| 1195 | STD c1, 120(r_ptr) ; r[15] = c1 | ||
| 1196 | |||
| 1197 | .EXIT | ||
| 1198 | LDD -104(%sp),%r6 ; restore r6 | ||
| 1199 | LDD -112(%sp),%r5 ; restore r5 | ||
| 1200 | LDD -120(%sp),%r4 ; restore r4 | ||
| 1201 | BVE (%rp) | ||
| 1202 | LDD,MB -128(%sp),%r3 | ||
| 1203 | |||
| 1204 | .PROCEND | ||
| 1205 | |||
| 1206 | ;----------------------------------------------------------------------------- | ||
| 1207 | ; | ||
| 1208 | ;void bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a) | ||
| 1209 | ; arg0 = r_ptr | ||
| 1210 | ; arg1 = a_ptr | ||
| 1211 | ; | ||
| 1212 | |||
| 1213 | bn_sqr_comba4 | ||
| 1214 | .proc | ||
| 1215 | .callinfo FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE | ||
| 1216 | .EXPORT bn_sqr_comba4,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 1217 | .entry | ||
| 1218 | .align 64 | ||
| 1219 | STD %r3,0(%sp) ; save r3 | ||
| 1220 | STD %r4,8(%sp) ; save r4 | ||
| 1221 | STD %r5,16(%sp) ; save r5 | ||
| 1222 | STD %r6,24(%sp) ; save r6 | ||
| 1223 | |||
| 1224 | ; | ||
| 1225 | ; Zero out carries | ||
| 1226 | ; | ||
| 1227 | COPY %r0,c1 | ||
| 1228 | COPY %r0,c2 | ||
| 1229 | COPY %r0,c3 | ||
| 1230 | |||
| 1231 | LDO 128(%sp),%sp ; bump stack | ||
| 1232 | DEPDI,Z -1,32,33,high_mask ; Create Mask 0xffffffff80000000L | ||
| 1233 | DEPDI,Z 1,31,1,high_one ; Create Value 1 << 32 | ||
| 1234 | |||
| 1235 | ; | ||
| 1236 | ; Load up all of the values we are going to use | ||
| 1237 | ; | ||
| 1238 | FLDD 0(a_ptr),a0 | ||
| 1239 | FLDD 8(a_ptr),a1 | ||
| 1240 | FLDD 16(a_ptr),a2 | ||
| 1241 | FLDD 24(a_ptr),a3 | ||
| 1242 | FLDD 32(a_ptr),a4 | ||
| 1243 | FLDD 40(a_ptr),a5 | ||
| 1244 | FLDD 48(a_ptr),a6 | ||
| 1245 | FLDD 56(a_ptr),a7 | ||
| 1246 | |||
| 1247 | SQR_ADD_C a0L,a0R,c1,c2,c3 | ||
| 1248 | |||
| 1249 | STD c1,0(r_ptr) ; r[0] = c1; | ||
| 1250 | COPY %r0,c1 | ||
| 1251 | |||
| 1252 | SQR_ADD_C2 a1L,a1R,a0L,a0R,c2,c3,c1 | ||
| 1253 | |||
| 1254 | STD c2,8(r_ptr) ; r[1] = c2; | ||
| 1255 | COPY %r0,c2 | ||
| 1256 | |||
| 1257 | SQR_ADD_C a1L,a1R,c3,c1,c2 | ||
| 1258 | SQR_ADD_C2 a2L,a2R,a0L,a0R,c3,c1,c2 | ||
| 1259 | |||
| 1260 | STD c3,16(r_ptr) ; r[2] = c3; | ||
| 1261 | COPY %r0,c3 | ||
| 1262 | |||
| 1263 | SQR_ADD_C2 a3L,a3R,a0L,a0R,c1,c2,c3 | ||
| 1264 | SQR_ADD_C2 a2L,a2R,a1L,a1R,c1,c2,c3 | ||
| 1265 | |||
| 1266 | STD c1,24(r_ptr) ; r[3] = c1; | ||
| 1267 | COPY %r0,c1 | ||
| 1268 | |||
| 1269 | SQR_ADD_C a2L,a2R,c2,c3,c1 | ||
| 1270 | SQR_ADD_C2 a3L,a3R,a1L,a1R,c2,c3,c1 | ||
| 1271 | |||
| 1272 | STD c2,32(r_ptr) ; r[4] = c2; | ||
| 1273 | COPY %r0,c2 | ||
| 1274 | |||
| 1275 | SQR_ADD_C2 a3L,a3R,a2L,a2R,c3,c1,c2 | ||
| 1276 | STD c3,40(r_ptr) ; r[5] = c3; | ||
| 1277 | COPY %r0,c3 | ||
| 1278 | |||
| 1279 | SQR_ADD_C a3L,a3R,c1,c2,c3 | ||
| 1280 | STD c1,48(r_ptr) ; r[6] = c1; | ||
| 1281 | STD c2,56(r_ptr) ; r[7] = c2; | ||
| 1282 | |||
| 1283 | .EXIT | ||
| 1284 | LDD -104(%sp),%r6 ; restore r6 | ||
| 1285 | LDD -112(%sp),%r5 ; restore r5 | ||
| 1286 | LDD -120(%sp),%r4 ; restore r4 | ||
| 1287 | BVE (%rp) | ||
| 1288 | LDD,MB -128(%sp),%r3 | ||
| 1289 | |||
| 1290 | .PROCEND | ||
| 1291 | |||
| 1292 | |||
| 1293 | ;--------------------------------------------------------------------------- | ||
| 1294 | |||
| 1295 | MUL_ADD_C .macro A0L,A0R,B0L,B0R,C1,C2,C3 | ||
| 1296 | XMPYU A0L,B0R,ftemp1 ; m1 = bl*ht | ||
| 1297 | FSTD ftemp1,-16(%sp) ; | ||
| 1298 | XMPYU A0R,B0L,ftemp2 ; m = bh*lt | ||
| 1299 | FSTD ftemp2,-8(%sp) ; | ||
| 1300 | XMPYU A0R,B0R,ftemp3 ; lt = bl*lt | ||
| 1301 | FSTD ftemp3,-32(%sp) | ||
| 1302 | XMPYU A0L,B0L,ftemp4 ; ht = bh*ht | ||
| 1303 | FSTD ftemp4,-24(%sp) ; | ||
| 1304 | |||
| 1305 | LDD -8(%sp),m ; r21 = m | ||
| 1306 | LDD -16(%sp),m1 ; r19 = m1 | ||
| 1307 | ADD,L m,m1,m ; m+m1 | ||
| 1308 | |||
| 1309 | DEPD,Z m,31,32,temp3 ; (m+m1<<32) | ||
| 1310 | LDD -24(%sp),ht ; r24 = ht | ||
| 1311 | |||
| 1312 | CMPCLR,*>>= m,m1,%r0 ; if (m < m1) | ||
| 1313 | ADD,L ht,high_one,ht ; ht+=high_one | ||
| 1314 | |||
| 1315 | EXTRD,U m,31,32,temp1 ; m >> 32 | ||
| 1316 | LDD -32(%sp),lt ; lt | ||
| 1317 | ADD,L ht,temp1,ht ; ht+= m>>32 | ||
| 1318 | ADD lt,temp3,lt ; lt = lt+m1 | ||
| 1319 | ADD,DC ht,%r0,ht ; ht++ | ||
| 1320 | |||
| 1321 | ADD C1,lt,C1 ; c1=c1+lt | ||
| 1322 | ADD,DC ht,%r0,ht ; bump c3 if overflow,nullify otherwise | ||
| 1323 | |||
| 1324 | ADD C2,ht,C2 ; c2 = c2 + ht | ||
| 1325 | ADD,DC C3,%r0,C3 ; add in carry (c3++) | ||
| 1326 | .endm | ||
| 1327 | |||
| 1328 | |||
| 1329 | ; | ||
| 1330 | ;void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) | ||
| 1331 | ; arg0 = r_ptr | ||
| 1332 | ; arg1 = a_ptr | ||
| 1333 | ; arg2 = b_ptr | ||
| 1334 | ; | ||
| 1335 | |||
| 1336 | bn_mul_comba8 | ||
| 1337 | .proc | ||
| 1338 | .callinfo FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE | ||
| 1339 | .EXPORT bn_mul_comba8,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 1340 | .entry | ||
| 1341 | .align 64 | ||
| 1342 | |||
| 1343 | STD %r3,0(%sp) ; save r3 | ||
| 1344 | STD %r4,8(%sp) ; save r4 | ||
| 1345 | STD %r5,16(%sp) ; save r5 | ||
| 1346 | STD %r6,24(%sp) ; save r6 | ||
| 1347 | FSTD %fr12,32(%sp) ; save r6 | ||
| 1348 | FSTD %fr13,40(%sp) ; save r7 | ||
| 1349 | |||
| 1350 | ; | ||
| 1351 | ; Zero out carries | ||
| 1352 | ; | ||
| 1353 | COPY %r0,c1 | ||
| 1354 | COPY %r0,c2 | ||
| 1355 | COPY %r0,c3 | ||
| 1356 | |||
| 1357 | LDO 128(%sp),%sp ; bump stack | ||
| 1358 | DEPDI,Z 1,31,1,high_one ; Create Value 1 << 32 | ||
| 1359 | |||
| 1360 | ; | ||
| 1361 | ; Load up all of the values we are going to use | ||
| 1362 | ; | ||
| 1363 | FLDD 0(a_ptr),a0 | ||
| 1364 | FLDD 8(a_ptr),a1 | ||
| 1365 | FLDD 16(a_ptr),a2 | ||
| 1366 | FLDD 24(a_ptr),a3 | ||
| 1367 | FLDD 32(a_ptr),a4 | ||
| 1368 | FLDD 40(a_ptr),a5 | ||
| 1369 | FLDD 48(a_ptr),a6 | ||
| 1370 | FLDD 56(a_ptr),a7 | ||
| 1371 | |||
| 1372 | FLDD 0(b_ptr),b0 | ||
| 1373 | FLDD 8(b_ptr),b1 | ||
| 1374 | FLDD 16(b_ptr),b2 | ||
| 1375 | FLDD 24(b_ptr),b3 | ||
| 1376 | FLDD 32(b_ptr),b4 | ||
| 1377 | FLDD 40(b_ptr),b5 | ||
| 1378 | FLDD 48(b_ptr),b6 | ||
| 1379 | FLDD 56(b_ptr),b7 | ||
| 1380 | |||
| 1381 | MUL_ADD_C a0L,a0R,b0L,b0R,c1,c2,c3 | ||
| 1382 | STD c1,0(r_ptr) | ||
| 1383 | COPY %r0,c1 | ||
| 1384 | |||
| 1385 | MUL_ADD_C a0L,a0R,b1L,b1R,c2,c3,c1 | ||
| 1386 | MUL_ADD_C a1L,a1R,b0L,b0R,c2,c3,c1 | ||
| 1387 | STD c2,8(r_ptr) | ||
| 1388 | COPY %r0,c2 | ||
| 1389 | |||
| 1390 | MUL_ADD_C a2L,a2R,b0L,b0R,c3,c1,c2 | ||
| 1391 | MUL_ADD_C a1L,a1R,b1L,b1R,c3,c1,c2 | ||
| 1392 | MUL_ADD_C a0L,a0R,b2L,b2R,c3,c1,c2 | ||
| 1393 | STD c3,16(r_ptr) | ||
| 1394 | COPY %r0,c3 | ||
| 1395 | |||
| 1396 | MUL_ADD_C a0L,a0R,b3L,b3R,c1,c2,c3 | ||
| 1397 | MUL_ADD_C a1L,a1R,b2L,b2R,c1,c2,c3 | ||
| 1398 | MUL_ADD_C a2L,a2R,b1L,b1R,c1,c2,c3 | ||
| 1399 | MUL_ADD_C a3L,a3R,b0L,b0R,c1,c2,c3 | ||
| 1400 | STD c1,24(r_ptr) | ||
| 1401 | COPY %r0,c1 | ||
| 1402 | |||
| 1403 | MUL_ADD_C a4L,a4R,b0L,b0R,c2,c3,c1 | ||
| 1404 | MUL_ADD_C a3L,a3R,b1L,b1R,c2,c3,c1 | ||
| 1405 | MUL_ADD_C a2L,a2R,b2L,b2R,c2,c3,c1 | ||
| 1406 | MUL_ADD_C a1L,a1R,b3L,b3R,c2,c3,c1 | ||
| 1407 | MUL_ADD_C a0L,a0R,b4L,b4R,c2,c3,c1 | ||
| 1408 | STD c2,32(r_ptr) | ||
| 1409 | COPY %r0,c2 | ||
| 1410 | |||
| 1411 | MUL_ADD_C a0L,a0R,b5L,b5R,c3,c1,c2 | ||
| 1412 | MUL_ADD_C a1L,a1R,b4L,b4R,c3,c1,c2 | ||
| 1413 | MUL_ADD_C a2L,a2R,b3L,b3R,c3,c1,c2 | ||
| 1414 | MUL_ADD_C a3L,a3R,b2L,b2R,c3,c1,c2 | ||
| 1415 | MUL_ADD_C a4L,a4R,b1L,b1R,c3,c1,c2 | ||
| 1416 | MUL_ADD_C a5L,a5R,b0L,b0R,c3,c1,c2 | ||
| 1417 | STD c3,40(r_ptr) | ||
| 1418 | COPY %r0,c3 | ||
| 1419 | |||
| 1420 | MUL_ADD_C a6L,a6R,b0L,b0R,c1,c2,c3 | ||
| 1421 | MUL_ADD_C a5L,a5R,b1L,b1R,c1,c2,c3 | ||
| 1422 | MUL_ADD_C a4L,a4R,b2L,b2R,c1,c2,c3 | ||
| 1423 | MUL_ADD_C a3L,a3R,b3L,b3R,c1,c2,c3 | ||
| 1424 | MUL_ADD_C a2L,a2R,b4L,b4R,c1,c2,c3 | ||
| 1425 | MUL_ADD_C a1L,a1R,b5L,b5R,c1,c2,c3 | ||
| 1426 | MUL_ADD_C a0L,a0R,b6L,b6R,c1,c2,c3 | ||
| 1427 | STD c1,48(r_ptr) | ||
| 1428 | COPY %r0,c1 | ||
| 1429 | |||
| 1430 | MUL_ADD_C a0L,a0R,b7L,b7R,c2,c3,c1 | ||
| 1431 | MUL_ADD_C a1L,a1R,b6L,b6R,c2,c3,c1 | ||
| 1432 | MUL_ADD_C a2L,a2R,b5L,b5R,c2,c3,c1 | ||
| 1433 | MUL_ADD_C a3L,a3R,b4L,b4R,c2,c3,c1 | ||
| 1434 | MUL_ADD_C a4L,a4R,b3L,b3R,c2,c3,c1 | ||
| 1435 | MUL_ADD_C a5L,a5R,b2L,b2R,c2,c3,c1 | ||
| 1436 | MUL_ADD_C a6L,a6R,b1L,b1R,c2,c3,c1 | ||
| 1437 | MUL_ADD_C a7L,a7R,b0L,b0R,c2,c3,c1 | ||
| 1438 | STD c2,56(r_ptr) | ||
| 1439 | COPY %r0,c2 | ||
| 1440 | |||
| 1441 | MUL_ADD_C a7L,a7R,b1L,b1R,c3,c1,c2 | ||
| 1442 | MUL_ADD_C a6L,a6R,b2L,b2R,c3,c1,c2 | ||
| 1443 | MUL_ADD_C a5L,a5R,b3L,b3R,c3,c1,c2 | ||
| 1444 | MUL_ADD_C a4L,a4R,b4L,b4R,c3,c1,c2 | ||
| 1445 | MUL_ADD_C a3L,a3R,b5L,b5R,c3,c1,c2 | ||
| 1446 | MUL_ADD_C a2L,a2R,b6L,b6R,c3,c1,c2 | ||
| 1447 | MUL_ADD_C a1L,a1R,b7L,b7R,c3,c1,c2 | ||
| 1448 | STD c3,64(r_ptr) | ||
| 1449 | COPY %r0,c3 | ||
| 1450 | |||
| 1451 | MUL_ADD_C a2L,a2R,b7L,b7R,c1,c2,c3 | ||
| 1452 | MUL_ADD_C a3L,a3R,b6L,b6R,c1,c2,c3 | ||
| 1453 | MUL_ADD_C a4L,a4R,b5L,b5R,c1,c2,c3 | ||
| 1454 | MUL_ADD_C a5L,a5R,b4L,b4R,c1,c2,c3 | ||
| 1455 | MUL_ADD_C a6L,a6R,b3L,b3R,c1,c2,c3 | ||
| 1456 | MUL_ADD_C a7L,a7R,b2L,b2R,c1,c2,c3 | ||
| 1457 | STD c1,72(r_ptr) | ||
| 1458 | COPY %r0,c1 | ||
| 1459 | |||
| 1460 | MUL_ADD_C a7L,a7R,b3L,b3R,c2,c3,c1 | ||
| 1461 | MUL_ADD_C a6L,a6R,b4L,b4R,c2,c3,c1 | ||
| 1462 | MUL_ADD_C a5L,a5R,b5L,b5R,c2,c3,c1 | ||
| 1463 | MUL_ADD_C a4L,a4R,b6L,b6R,c2,c3,c1 | ||
| 1464 | MUL_ADD_C a3L,a3R,b7L,b7R,c2,c3,c1 | ||
| 1465 | STD c2,80(r_ptr) | ||
| 1466 | COPY %r0,c2 | ||
| 1467 | |||
| 1468 | MUL_ADD_C a4L,a4R,b7L,b7R,c3,c1,c2 | ||
| 1469 | MUL_ADD_C a5L,a5R,b6L,b6R,c3,c1,c2 | ||
| 1470 | MUL_ADD_C a6L,a6R,b5L,b5R,c3,c1,c2 | ||
| 1471 | MUL_ADD_C a7L,a7R,b4L,b4R,c3,c1,c2 | ||
| 1472 | STD c3,88(r_ptr) | ||
| 1473 | COPY %r0,c3 | ||
| 1474 | |||
| 1475 | MUL_ADD_C a7L,a7R,b5L,b5R,c1,c2,c3 | ||
| 1476 | MUL_ADD_C a6L,a6R,b6L,b6R,c1,c2,c3 | ||
| 1477 | MUL_ADD_C a5L,a5R,b7L,b7R,c1,c2,c3 | ||
| 1478 | STD c1,96(r_ptr) | ||
| 1479 | COPY %r0,c1 | ||
| 1480 | |||
| 1481 | MUL_ADD_C a6L,a6R,b7L,b7R,c2,c3,c1 | ||
| 1482 | MUL_ADD_C a7L,a7R,b6L,b6R,c2,c3,c1 | ||
| 1483 | STD c2,104(r_ptr) | ||
| 1484 | COPY %r0,c2 | ||
| 1485 | |||
| 1486 | MUL_ADD_C a7L,a7R,b7L,b7R,c3,c1,c2 | ||
| 1487 | STD c3,112(r_ptr) | ||
| 1488 | STD c1,120(r_ptr) | ||
| 1489 | |||
| 1490 | .EXIT | ||
| 1491 | FLDD -88(%sp),%fr13 | ||
| 1492 | FLDD -96(%sp),%fr12 | ||
| 1493 | LDD -104(%sp),%r6 ; restore r6 | ||
| 1494 | LDD -112(%sp),%r5 ; restore r5 | ||
| 1495 | LDD -120(%sp),%r4 ; restore r4 | ||
| 1496 | BVE (%rp) | ||
| 1497 | LDD,MB -128(%sp),%r3 | ||
| 1498 | |||
| 1499 | .PROCEND | ||
| 1500 | |||
| 1501 | ;----------------------------------------------------------------------------- | ||
| 1502 | ; | ||
| 1503 | ;void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) | ||
| 1504 | ; arg0 = r_ptr | ||
| 1505 | ; arg1 = a_ptr | ||
| 1506 | ; arg2 = b_ptr | ||
| 1507 | ; | ||
| 1508 | |||
| 1509 | bn_mul_comba4 | ||
| 1510 | .proc | ||
| 1511 | .callinfo FRAME=128,ENTRY_GR=%r3,ARGS_SAVED,ORDERING_AWARE | ||
| 1512 | .EXPORT bn_mul_comba4,ENTRY,PRIV_LEV=3,NO_RELOCATION,LONG_RETURN | ||
| 1513 | .entry | ||
| 1514 | .align 64 | ||
| 1515 | |||
| 1516 | STD %r3,0(%sp) ; save r3 | ||
| 1517 | STD %r4,8(%sp) ; save r4 | ||
| 1518 | STD %r5,16(%sp) ; save r5 | ||
| 1519 | STD %r6,24(%sp) ; save r6 | ||
| 1520 | FSTD %fr12,32(%sp) ; save r6 | ||
| 1521 | FSTD %fr13,40(%sp) ; save r7 | ||
| 1522 | |||
| 1523 | ; | ||
| 1524 | ; Zero out carries | ||
| 1525 | ; | ||
| 1526 | COPY %r0,c1 | ||
| 1527 | COPY %r0,c2 | ||
| 1528 | COPY %r0,c3 | ||
| 1529 | |||
| 1530 | LDO 128(%sp),%sp ; bump stack | ||
| 1531 | DEPDI,Z 1,31,1,high_one ; Create Value 1 << 32 | ||
| 1532 | |||
| 1533 | ; | ||
| 1534 | ; Load up all of the values we are going to use | ||
| 1535 | ; | ||
| 1536 | FLDD 0(a_ptr),a0 | ||
| 1537 | FLDD 8(a_ptr),a1 | ||
| 1538 | FLDD 16(a_ptr),a2 | ||
| 1539 | FLDD 24(a_ptr),a3 | ||
| 1540 | |||
| 1541 | FLDD 0(b_ptr),b0 | ||
| 1542 | FLDD 8(b_ptr),b1 | ||
| 1543 | FLDD 16(b_ptr),b2 | ||
| 1544 | FLDD 24(b_ptr),b3 | ||
| 1545 | |||
| 1546 | MUL_ADD_C a0L,a0R,b0L,b0R,c1,c2,c3 | ||
| 1547 | STD c1,0(r_ptr) | ||
| 1548 | COPY %r0,c1 | ||
| 1549 | |||
| 1550 | MUL_ADD_C a0L,a0R,b1L,b1R,c2,c3,c1 | ||
| 1551 | MUL_ADD_C a1L,a1R,b0L,b0R,c2,c3,c1 | ||
| 1552 | STD c2,8(r_ptr) | ||
| 1553 | COPY %r0,c2 | ||
| 1554 | |||
| 1555 | MUL_ADD_C a2L,a2R,b0L,b0R,c3,c1,c2 | ||
| 1556 | MUL_ADD_C a1L,a1R,b1L,b1R,c3,c1,c2 | ||
| 1557 | MUL_ADD_C a0L,a0R,b2L,b2R,c3,c1,c2 | ||
| 1558 | STD c3,16(r_ptr) | ||
| 1559 | COPY %r0,c3 | ||
| 1560 | |||
| 1561 | MUL_ADD_C a0L,a0R,b3L,b3R,c1,c2,c3 | ||
| 1562 | MUL_ADD_C a1L,a1R,b2L,b2R,c1,c2,c3 | ||
| 1563 | MUL_ADD_C a2L,a2R,b1L,b1R,c1,c2,c3 | ||
| 1564 | MUL_ADD_C a3L,a3R,b0L,b0R,c1,c2,c3 | ||
| 1565 | STD c1,24(r_ptr) | ||
| 1566 | COPY %r0,c1 | ||
| 1567 | |||
| 1568 | MUL_ADD_C a3L,a3R,b1L,b1R,c2,c3,c1 | ||
| 1569 | MUL_ADD_C a2L,a2R,b2L,b2R,c2,c3,c1 | ||
| 1570 | MUL_ADD_C a1L,a1R,b3L,b3R,c2,c3,c1 | ||
| 1571 | STD c2,32(r_ptr) | ||
| 1572 | COPY %r0,c2 | ||
| 1573 | |||
| 1574 | MUL_ADD_C a2L,a2R,b3L,b3R,c3,c1,c2 | ||
| 1575 | MUL_ADD_C a3L,a3R,b2L,b2R,c3,c1,c2 | ||
| 1576 | STD c3,40(r_ptr) | ||
| 1577 | COPY %r0,c3 | ||
| 1578 | |||
| 1579 | MUL_ADD_C a3L,a3R,b3L,b3R,c1,c2,c3 | ||
| 1580 | STD c1,48(r_ptr) | ||
| 1581 | STD c2,56(r_ptr) | ||
| 1582 | |||
| 1583 | .EXIT | ||
| 1584 | FLDD -88(%sp),%fr13 | ||
| 1585 | FLDD -96(%sp),%fr12 | ||
| 1586 | LDD -104(%sp),%r6 ; restore r6 | ||
| 1587 | LDD -112(%sp),%r5 ; restore r5 | ||
| 1588 | LDD -120(%sp),%r4 ; restore r4 | ||
| 1589 | BVE (%rp) | ||
| 1590 | LDD,MB -128(%sp),%r3 | ||
| 1591 | |||
| 1592 | .PROCEND | ||
| 1593 | |||
| 1594 | |||
| 1595 | .SPACE $TEXT$ | ||
| 1596 | .SUBSPA $CODE$ | ||
| 1597 | .SPACE $PRIVATE$,SORT=16 | ||
| 1598 | .IMPORT $global$,DATA | ||
| 1599 | .SPACE $TEXT$ | ||
| 1600 | .SUBSPA $CODE$ | ||
| 1601 | .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16 | ||
| 1602 | C$4 | ||
| 1603 | .ALIGN 8 | ||
| 1604 | .STRINGZ "Division would overflow (%d)\n" | ||
| 1605 | .END | ||
diff --git a/src/lib/libssl/src/crypto/bn/bn.h b/src/lib/libssl/src/crypto/bn/bn.h index 009b0eb685..1eb8395b25 100644 --- a/src/lib/libssl/src/crypto/bn/bn.h +++ b/src/lib/libssl/src/crypto/bn/bn.h | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | #ifndef HEADER_BN_H | 59 | #ifndef HEADER_BN_H |
| 60 | #define HEADER_BN_H | 60 | #define HEADER_BN_H |
| 61 | 61 | ||
| 62 | #ifndef WIN16 | 62 | #ifndef NO_FP_API |
| 63 | #include <stdio.h> /* FILE */ | 63 | #include <stdio.h> /* FILE */ |
| 64 | #endif | 64 | #endif |
| 65 | #include <openssl/opensslconf.h> | 65 | #include <openssl/opensslconf.h> |
| @@ -233,7 +233,7 @@ typedef struct bignum_st | |||
| 233 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ | 233 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ |
| 234 | int top; /* Index of last used d +1. */ | 234 | int top; /* Index of last used d +1. */ |
| 235 | /* The next are internal book keeping for bn_expand. */ | 235 | /* The next are internal book keeping for bn_expand. */ |
| 236 | int max; /* Size of the d array. */ | 236 | int dmax; /* Size of the d array. */ |
| 237 | int neg; /* one if the number is negative */ | 237 | int neg; /* one if the number is negative */ |
| 238 | int flags; | 238 | int flags; |
| 239 | } BIGNUM; | 239 | } BIGNUM; |
| @@ -364,6 +364,8 @@ int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
| 364 | const BIGNUM *m,BN_CTX *ctx); | 364 | const BIGNUM *m,BN_CTX *ctx); |
| 365 | int BN_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 365 | int BN_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, |
| 366 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 366 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
| 367 | int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p, | ||
| 368 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 367 | int BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2, | 369 | int BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2, |
| 368 | BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx); | 370 | BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx); |
| 369 | int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, | 371 | int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, |
| @@ -433,9 +435,9 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *m, | |||
| 433 | 435 | ||
| 434 | /* library internal functions */ | 436 | /* library internal functions */ |
| 435 | 437 | ||
| 436 | #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->max)?\ | 438 | #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ |
| 437 | (a):bn_expand2((a),(bits)/BN_BITS2+1)) | 439 | (a):bn_expand2((a),(bits)/BN_BITS2+1)) |
| 438 | #define bn_wexpand(a,words) (((words) <= (a)->max)?(a):bn_expand2((a),(words))) | 440 | #define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) |
| 439 | BIGNUM *bn_expand2(BIGNUM *a, int words); | 441 | BIGNUM *bn_expand2(BIGNUM *a, int words); |
| 440 | 442 | ||
| 441 | #define bn_fix_top(a) \ | 443 | #define bn_fix_top(a) \ |
| @@ -483,7 +485,9 @@ BN_ULONG bn_sub_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int num); | |||
| 483 | #define BN_F_BN_CTX_NEW 106 | 485 | #define BN_F_BN_CTX_NEW 106 |
| 484 | #define BN_F_BN_DIV 107 | 486 | #define BN_F_BN_DIV 107 |
| 485 | #define BN_F_BN_EXPAND2 108 | 487 | #define BN_F_BN_EXPAND2 108 |
| 488 | #define BN_F_BN_MOD_EXP2_MONT 118 | ||
| 486 | #define BN_F_BN_MOD_EXP_MONT 109 | 489 | #define BN_F_BN_MOD_EXP_MONT 109 |
| 490 | #define BN_F_BN_MOD_EXP_MONT_WORD 117 | ||
| 487 | #define BN_F_BN_MOD_INVERSE 110 | 491 | #define BN_F_BN_MOD_INVERSE 110 |
| 488 | #define BN_F_BN_MOD_MUL_RECIPROCAL 111 | 492 | #define BN_F_BN_MOD_MUL_RECIPROCAL 111 |
| 489 | #define BN_F_BN_MPI2BN 112 | 493 | #define BN_F_BN_MPI2BN 112 |
diff --git a/src/lib/libssl/src/crypto/bn/bn_asm.c b/src/lib/libssl/src/crypto/bn/bn_asm.c index 3329cc18e6..44e52a40db 100644 --- a/src/lib/libssl/src/crypto/bn/bn_asm.c +++ b/src/lib/libssl/src/crypto/bn/bn_asm.c | |||
| @@ -227,7 +227,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) | |||
| 227 | 227 | ||
| 228 | #else | 228 | #else |
| 229 | 229 | ||
| 230 | /* Divide h-l by d and return the result. */ | 230 | /* Divide h,l by d and return the result. */ |
| 231 | /* I need to test this some more :-( */ | 231 | /* I need to test this some more :-( */ |
| 232 | BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) | 232 | BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) |
| 233 | { | 233 | { |
| @@ -237,13 +237,8 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) | |||
| 237 | if (d == 0) return(BN_MASK2); | 237 | if (d == 0) return(BN_MASK2); |
| 238 | 238 | ||
| 239 | i=BN_num_bits_word(d); | 239 | i=BN_num_bits_word(d); |
| 240 | if ((i != BN_BITS2) && (h > (BN_ULONG)1<<i)) | 240 | assert((i == BN_BITS2) || (h > (BN_ULONG)1<<i)); |
| 241 | { | 241 | |
| 242 | #if !defined(NO_STDIO) && !defined(WIN16) | ||
| 243 | fprintf(stderr,"Division would overflow (%d)\n",i); | ||
| 244 | #endif | ||
| 245 | abort(); | ||
| 246 | } | ||
| 247 | i=BN_BITS2-i; | 242 | i=BN_BITS2-i; |
| 248 | if (h >= d) h-=d; | 243 | if (h >= d) h-=d; |
| 249 | 244 | ||
diff --git a/src/lib/libssl/src/crypto/bn/bn_blind.c b/src/lib/libssl/src/crypto/bn/bn_blind.c index 1b1bb06046..2d287e6d1b 100644 --- a/src/lib/libssl/src/crypto/bn/bn_blind.c +++ b/src/lib/libssl/src/crypto/bn/bn_blind.c | |||
| @@ -67,7 +67,7 @@ BN_BLINDING *BN_BLINDING_new(BIGNUM *A, BIGNUM *Ai, BIGNUM *mod) | |||
| 67 | bn_check_top(Ai); | 67 | bn_check_top(Ai); |
| 68 | bn_check_top(mod); | 68 | bn_check_top(mod); |
| 69 | 69 | ||
| 70 | if ((ret=(BN_BLINDING *)Malloc(sizeof(BN_BLINDING))) == NULL) | 70 | if ((ret=(BN_BLINDING *)OPENSSL_malloc(sizeof(BN_BLINDING))) == NULL) |
| 71 | { | 71 | { |
| 72 | BNerr(BN_F_BN_BLINDING_NEW,ERR_R_MALLOC_FAILURE); | 72 | BNerr(BN_F_BN_BLINDING_NEW,ERR_R_MALLOC_FAILURE); |
| 73 | return(NULL); | 73 | return(NULL); |
| @@ -91,7 +91,7 @@ void BN_BLINDING_free(BN_BLINDING *r) | |||
| 91 | 91 | ||
| 92 | if (r->A != NULL) BN_free(r->A ); | 92 | if (r->A != NULL) BN_free(r->A ); |
| 93 | if (r->Ai != NULL) BN_free(r->Ai); | 93 | if (r->Ai != NULL) BN_free(r->Ai); |
| 94 | Free(r); | 94 | OPENSSL_free(r); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx) | 97 | int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx) |
diff --git a/src/lib/libssl/src/crypto/bn/bn_ctx.c b/src/lib/libssl/src/crypto/bn/bn_ctx.c index 46132fd180..b1a8d7571e 100644 --- a/src/lib/libssl/src/crypto/bn/bn_ctx.c +++ b/src/lib/libssl/src/crypto/bn/bn_ctx.c | |||
| @@ -69,7 +69,7 @@ BN_CTX *BN_CTX_new(void) | |||
| 69 | { | 69 | { |
| 70 | BN_CTX *ret; | 70 | BN_CTX *ret; |
| 71 | 71 | ||
| 72 | ret=(BN_CTX *)Malloc(sizeof(BN_CTX)); | 72 | ret=(BN_CTX *)OPENSSL_malloc(sizeof(BN_CTX)); |
| 73 | if (ret == NULL) | 73 | if (ret == NULL) |
| 74 | { | 74 | { |
| 75 | BNerr(BN_F_BN_CTX_NEW,ERR_R_MALLOC_FAILURE); | 75 | BNerr(BN_F_BN_CTX_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -102,7 +102,7 @@ void BN_CTX_free(BN_CTX *ctx) | |||
| 102 | for (i=0; i < BN_CTX_NUM; i++) | 102 | for (i=0; i < BN_CTX_NUM; i++) |
| 103 | BN_clear_free(&(ctx->bn[i])); | 103 | BN_clear_free(&(ctx->bn[i])); |
| 104 | if (ctx->flags & BN_FLG_MALLOCED) | 104 | if (ctx->flags & BN_FLG_MALLOCED) |
| 105 | Free(ctx); | 105 | OPENSSL_free(ctx); |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | void BN_CTX_start(BN_CTX *ctx) | 108 | void BN_CTX_start(BN_CTX *ctx) |
diff --git a/src/lib/libssl/src/crypto/bn/bn_div.c b/src/lib/libssl/src/crypto/bn/bn_div.c index 07af1d3b44..c3772c243b 100644 --- a/src/lib/libssl/src/crypto/bn/bn_div.c +++ b/src/lib/libssl/src/crypto/bn/bn_div.c | |||
| @@ -205,7 +205,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, | |||
| 205 | BN_init(&wnum); | 205 | BN_init(&wnum); |
| 206 | wnum.d= &(snum->d[loop]); | 206 | wnum.d= &(snum->d[loop]); |
| 207 | wnum.top= div_n; | 207 | wnum.top= div_n; |
| 208 | wnum.max= snum->max+1; /* a bit of a lie */ | 208 | wnum.dmax= snum->dmax+1; /* a bit of a lie */ |
| 209 | 209 | ||
| 210 | /* Get the top 2 words of sdiv */ | 210 | /* Get the top 2 words of sdiv */ |
| 211 | /* i=sdiv->top; */ | 211 | /* i=sdiv->top; */ |
diff --git a/src/lib/libssl/src/crypto/bn/bn_err.c b/src/lib/libssl/src/crypto/bn/bn_err.c index 988270bcf4..86550c4c21 100644 --- a/src/lib/libssl/src/crypto/bn/bn_err.c +++ b/src/lib/libssl/src/crypto/bn/bn_err.c | |||
| @@ -76,7 +76,9 @@ static ERR_STRING_DATA BN_str_functs[]= | |||
| 76 | {ERR_PACK(0,BN_F_BN_CTX_NEW,0), "BN_CTX_new"}, | 76 | {ERR_PACK(0,BN_F_BN_CTX_NEW,0), "BN_CTX_new"}, |
| 77 | {ERR_PACK(0,BN_F_BN_DIV,0), "BN_div"}, | 77 | {ERR_PACK(0,BN_F_BN_DIV,0), "BN_div"}, |
| 78 | {ERR_PACK(0,BN_F_BN_EXPAND2,0), "bn_expand2"}, | 78 | {ERR_PACK(0,BN_F_BN_EXPAND2,0), "bn_expand2"}, |
| 79 | {ERR_PACK(0,BN_F_BN_MOD_EXP2_MONT,0), "BN_mod_exp2_mont"}, | ||
| 79 | {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT,0), "BN_mod_exp_mont"}, | 80 | {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT,0), "BN_mod_exp_mont"}, |
| 81 | {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT_WORD,0), "BN_mod_exp_mont_word"}, | ||
| 80 | {ERR_PACK(0,BN_F_BN_MOD_INVERSE,0), "BN_mod_inverse"}, | 82 | {ERR_PACK(0,BN_F_BN_MOD_INVERSE,0), "BN_mod_inverse"}, |
| 81 | {ERR_PACK(0,BN_F_BN_MOD_MUL_RECIPROCAL,0), "BN_mod_mul_reciprocal"}, | 83 | {ERR_PACK(0,BN_F_BN_MOD_MUL_RECIPROCAL,0), "BN_mod_mul_reciprocal"}, |
| 82 | {ERR_PACK(0,BN_F_BN_MPI2BN,0), "BN_mpi2bn"}, | 84 | {ERR_PACK(0,BN_F_BN_MPI2BN,0), "BN_mpi2bn"}, |
diff --git a/src/lib/libssl/src/crypto/bn/bn_exp.c b/src/lib/libssl/src/crypto/bn/bn_exp.c index 0c11601675..d2c91628ac 100644 --- a/src/lib/libssl/src/crypto/bn/bn_exp.c +++ b/src/lib/libssl/src/crypto/bn/bn_exp.c | |||
| @@ -55,18 +55,66 @@ | |||
| 55 | * copied and put under another distribution licence | 55 | * copied and put under another distribution licence |
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | /* ==================================================================== | ||
| 59 | * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. | ||
| 60 | * | ||
| 61 | * Redistribution and use in source and binary forms, with or without | ||
| 62 | * modification, are permitted provided that the following conditions | ||
| 63 | * are met: | ||
| 64 | * | ||
| 65 | * 1. Redistributions of source code must retain the above copyright | ||
| 66 | * notice, this list of conditions and the following disclaimer. | ||
| 67 | * | ||
| 68 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 69 | * notice, this list of conditions and the following disclaimer in | ||
| 70 | * the documentation and/or other materials provided with the | ||
| 71 | * distribution. | ||
| 72 | * | ||
| 73 | * 3. All advertising materials mentioning features or use of this | ||
| 74 | * software must display the following acknowledgment: | ||
| 75 | * "This product includes software developed by the OpenSSL Project | ||
| 76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 77 | * | ||
| 78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 79 | * endorse or promote products derived from this software without | ||
| 80 | * prior written permission. For written permission, please contact | ||
| 81 | * openssl-core@openssl.org. | ||
| 82 | * | ||
| 83 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 84 | * nor may "OpenSSL" appear in their names without prior written | ||
| 85 | * permission of the OpenSSL Project. | ||
| 86 | * | ||
| 87 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 88 | * acknowledgment: | ||
| 89 | * "This product includes software developed by the OpenSSL Project | ||
| 90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 91 | * | ||
| 92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 103 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 104 | * ==================================================================== | ||
| 105 | * | ||
| 106 | * This product includes cryptographic software written by Eric Young | ||
| 107 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 108 | * Hudson (tjh@cryptsoft.com). | ||
| 109 | * | ||
| 110 | */ | ||
| 111 | |||
| 58 | 112 | ||
| 59 | #include <stdio.h> | 113 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 114 | #include "cryptlib.h" |
| 61 | #include "bn_lcl.h" | 115 | #include "bn_lcl.h" |
| 62 | #ifdef ATALLA | ||
| 63 | # include <alloca.h> | ||
| 64 | # include <atasi.h> | ||
| 65 | # include <assert.h> | ||
| 66 | # include <dlfcn.h> | ||
| 67 | #endif | ||
| 68 | 116 | ||
| 69 | #define TABLE_SIZE 16 | 117 | #define TABLE_SIZE 32 |
| 70 | 118 | ||
| 71 | /* slow but works */ | 119 | /* slow but works */ |
| 72 | int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx) | 120 | int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx) |
| @@ -91,42 +139,6 @@ err: | |||
| 91 | return(r); | 139 | return(r); |
| 92 | } | 140 | } |
| 93 | 141 | ||
| 94 | #if 0 | ||
| 95 | /* this one works - simple but works */ | ||
| 96 | int BN_mod_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m, BN_CTX *ctx) | ||
| 97 | { | ||
| 98 | int i,bits,ret=0; | ||
| 99 | BIGNUM *v,*tmp; | ||
| 100 | |||
| 101 | BN_CTX_start(ctx); | ||
| 102 | v = BN_CTX_get(ctx); | ||
| 103 | tmp = BN_CTX_get(ctx); | ||
| 104 | if (v == NULL || tmp == NULL) goto err; | ||
| 105 | |||
| 106 | if (BN_copy(v,a) == NULL) goto err; | ||
| 107 | bits=BN_num_bits(p); | ||
| 108 | |||
| 109 | if (BN_is_odd(p)) | ||
| 110 | { if (BN_copy(r,a) == NULL) goto err; } | ||
| 111 | else { if (!BN_one(r)) goto err; } | ||
| 112 | |||
| 113 | for (i=1; i<bits; i++) | ||
| 114 | { | ||
| 115 | if (!BN_sqr(tmp,v,ctx)) goto err; | ||
| 116 | if (!BN_mod(v,tmp,m,ctx)) goto err; | ||
| 117 | if (BN_is_bit_set(p,i)) | ||
| 118 | { | ||
| 119 | if (!BN_mul(tmp,r,v,ctx)) goto err; | ||
| 120 | if (!BN_mod(r,tmp,m,ctx)) goto err; | ||
| 121 | } | ||
| 122 | } | ||
| 123 | ret=1; | ||
| 124 | err: | ||
| 125 | BN_CTX_end(ctx); | ||
| 126 | return(ret); | ||
| 127 | } | ||
| 128 | |||
| 129 | #endif | ||
| 130 | 142 | ||
| 131 | /* this one works - simple but works */ | 143 | /* this one works - simple but works */ |
| 132 | int BN_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BN_CTX *ctx) | 144 | int BN_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BN_CTX *ctx) |
| @@ -163,172 +175,6 @@ err: | |||
| 163 | return(ret); | 175 | return(ret); |
| 164 | } | 176 | } |
| 165 | 177 | ||
| 166 | #ifdef ATALLA | ||
| 167 | |||
| 168 | /* | ||
| 169 | * This routine will dynamically check for the existance of an Atalla AXL-200 | ||
| 170 | * SSL accelerator module. If one is found, the variable | ||
| 171 | * asi_accelerator_present is set to 1 and the function pointers | ||
| 172 | * ptr_ASI_xxxxxx above will be initialized to corresponding ASI API calls. | ||
| 173 | */ | ||
| 174 | typedef int tfnASI_GetPerformanceStatistics(int reset_flag, | ||
| 175 | unsigned int *ret_buf); | ||
| 176 | typedef int tfnASI_GetHardwareConfig(long card_num, unsigned int *ret_buf); | ||
| 177 | typedef int tfnASI_RSAPrivateKeyOpFn(RSAPrivateKey * rsaKey, | ||
| 178 | unsigned char *output, | ||
| 179 | unsigned char *input, | ||
| 180 | unsigned int modulus_len); | ||
| 181 | |||
| 182 | static tfnASI_GetHardwareConfig *ptr_ASI_GetHardwareConfig; | ||
| 183 | static tfnASI_RSAPrivateKeyOpFn *ptr_ASI_RSAPrivateKeyOpFn; | ||
| 184 | static tfnASI_GetPerformanceStatistics *ptr_ASI_GetPerformanceStatistics; | ||
| 185 | static int asi_accelerator_present; | ||
| 186 | static int tried_atalla; | ||
| 187 | |||
| 188 | void atalla_initialize_accelerator_handle(void) | ||
| 189 | { | ||
| 190 | void *dl_handle; | ||
| 191 | int status; | ||
| 192 | unsigned int config_buf[1024]; | ||
| 193 | static int tested; | ||
| 194 | |||
| 195 | if(tested) | ||
| 196 | return; | ||
| 197 | |||
| 198 | tested=1; | ||
| 199 | |||
| 200 | bzero((void *)config_buf, 1024); | ||
| 201 | |||
| 202 | /* | ||
| 203 | * Check to see if the library is present on the system | ||
| 204 | */ | ||
| 205 | dl_handle = dlopen("atasi.so", RTLD_NOW); | ||
| 206 | if (dl_handle == (void *) NULL) | ||
| 207 | { | ||
| 208 | /* printf("atasi.so library is not present on the system\n"); | ||
| 209 | printf("No HW acceleration available\n");*/ | ||
| 210 | return; | ||
| 211 | } | ||
| 212 | |||
| 213 | /* | ||
| 214 | * The library is present. Now we'll check to insure that the | ||
| 215 | * LDM is up and running. First we'll get the address of the | ||
| 216 | * function in the atasi library that we need to see if the | ||
| 217 | * LDM is operating. | ||
| 218 | */ | ||
| 219 | |||
| 220 | ptr_ASI_GetHardwareConfig = | ||
| 221 | (tfnASI_GetHardwareConfig *)dlsym(dl_handle,"ASI_GetHardwareConfig"); | ||
| 222 | |||
| 223 | if (ptr_ASI_GetHardwareConfig) | ||
| 224 | { | ||
| 225 | /* | ||
| 226 | * We found the call, now we'll get our config | ||
| 227 | * status. If we get a non 0 result, the LDM is not | ||
| 228 | * running and we cannot use the Atalla ASI * | ||
| 229 | * library. | ||
| 230 | */ | ||
| 231 | status = (*ptr_ASI_GetHardwareConfig)(0L, config_buf); | ||
| 232 | if (status != 0) | ||
| 233 | { | ||
| 234 | printf("atasi.so library is present but not initialized\n"); | ||
| 235 | printf("No HW acceleration available\n"); | ||
| 236 | return; | ||
| 237 | } | ||
| 238 | } | ||
| 239 | else | ||
| 240 | { | ||
| 241 | /* printf("We found the library, but not the function. Very Strange!\n");*/ | ||
| 242 | return ; | ||
| 243 | } | ||
| 244 | |||
| 245 | /* | ||
| 246 | * It looks like we have acceleration capabilities. Load up the | ||
| 247 | * pointers to our ASI API calls. | ||
| 248 | */ | ||
| 249 | ptr_ASI_RSAPrivateKeyOpFn= | ||
| 250 | (tfnASI_RSAPrivateKeyOpFn *)dlsym(dl_handle, "ASI_RSAPrivateKeyOpFn"); | ||
| 251 | if (ptr_ASI_RSAPrivateKeyOpFn == NULL) | ||
| 252 | { | ||
| 253 | /* printf("We found the library, but no RSA function. Very Strange!\n");*/ | ||
| 254 | return; | ||
| 255 | } | ||
| 256 | |||
| 257 | ptr_ASI_GetPerformanceStatistics = | ||
| 258 | (tfnASI_GetPerformanceStatistics *)dlsym(dl_handle, "ASI_GetPerformanceStatistics"); | ||
| 259 | if (ptr_ASI_GetPerformanceStatistics == NULL) | ||
| 260 | { | ||
| 261 | /* printf("We found the library, but no stat function. Very Strange!\n");*/ | ||
| 262 | return; | ||
| 263 | } | ||
| 264 | |||
| 265 | /* | ||
| 266 | * Indicate that acceleration is available | ||
| 267 | */ | ||
| 268 | asi_accelerator_present = 1; | ||
| 269 | |||
| 270 | /* printf("This system has acceleration!\n");*/ | ||
| 271 | |||
| 272 | return; | ||
| 273 | } | ||
| 274 | |||
| 275 | /* make sure this only gets called once when bn_mod_exp calls bn_mod_exp_mont */ | ||
| 276 | int BN_mod_exp_atalla(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m) | ||
| 277 | { | ||
| 278 | unsigned char *abin; | ||
| 279 | unsigned char *pbin; | ||
| 280 | unsigned char *mbin; | ||
| 281 | unsigned char *rbin; | ||
| 282 | int an,pn,mn,ret; | ||
| 283 | RSAPrivateKey keydata; | ||
| 284 | |||
| 285 | atalla_initialize_accelerator_handle(); | ||
| 286 | if(!asi_accelerator_present) | ||
| 287 | return 0; | ||
| 288 | |||
| 289 | |||
| 290 | /* We should be able to run without size testing */ | ||
| 291 | # define ASIZE 128 | ||
| 292 | an=BN_num_bytes(a); | ||
| 293 | pn=BN_num_bytes(p); | ||
| 294 | mn=BN_num_bytes(m); | ||
| 295 | |||
| 296 | if(an <= ASIZE && pn <= ASIZE && mn <= ASIZE) | ||
| 297 | { | ||
| 298 | int size=mn; | ||
| 299 | |||
| 300 | assert(an <= mn); | ||
| 301 | abin=alloca(size); | ||
| 302 | memset(abin,'\0',mn); | ||
| 303 | BN_bn2bin(a,abin+size-an); | ||
| 304 | |||
| 305 | pbin=alloca(pn); | ||
| 306 | BN_bn2bin(p,pbin); | ||
| 307 | |||
| 308 | mbin=alloca(size); | ||
| 309 | memset(mbin,'\0',mn); | ||
| 310 | BN_bn2bin(m,mbin+size-mn); | ||
| 311 | |||
| 312 | rbin=alloca(size); | ||
| 313 | |||
| 314 | memset(&keydata,'\0',sizeof keydata); | ||
| 315 | keydata.privateExponent.data=pbin; | ||
| 316 | keydata.privateExponent.len=pn; | ||
| 317 | keydata.modulus.data=mbin; | ||
| 318 | keydata.modulus.len=size; | ||
| 319 | |||
| 320 | ret=(*ptr_ASI_RSAPrivateKeyOpFn)(&keydata,rbin,abin,keydata.modulus.len); | ||
| 321 | /*fprintf(stderr,"!%s\n",BN_bn2hex(a));*/ | ||
| 322 | if(!ret) | ||
| 323 | { | ||
| 324 | BN_bin2bn(rbin,keydata.modulus.len,r); | ||
| 325 | /*fprintf(stderr,"?%s\n",BN_bn2hex(r));*/ | ||
| 326 | return 1; | ||
| 327 | } | ||
| 328 | } | ||
| 329 | return 0; | ||
| 330 | } | ||
| 331 | #endif /* def ATALLA */ | ||
| 332 | 178 | ||
| 333 | int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, | 179 | int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, |
| 334 | BN_CTX *ctx) | 180 | BN_CTX *ctx) |
| @@ -339,13 +185,6 @@ int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, | |||
| 339 | bn_check_top(p); | 185 | bn_check_top(p); |
| 340 | bn_check_top(m); | 186 | bn_check_top(m); |
| 341 | 187 | ||
| 342 | #ifdef ATALLA | ||
| 343 | if(BN_mod_exp_atalla(r,a,p,m)) | ||
| 344 | return 1; | ||
| 345 | /* If it fails, try the other methods (but don't try atalla again) */ | ||
| 346 | tried_atalla=1; | ||
| 347 | #endif | ||
| 348 | |||
| 349 | #ifdef MONT_MUL_MOD | 188 | #ifdef MONT_MUL_MOD |
| 350 | /* I have finally been able to take out this pre-condition of | 189 | /* I have finally been able to take out this pre-condition of |
| 351 | * the top bit being set. It was caused by an error in BN_div | 190 | * the top bit being set. It was caused by an error in BN_div |
| @@ -354,7 +193,15 @@ int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, | |||
| 354 | /* if ((m->d[m->top-1]&BN_TBIT) && BN_is_odd(m)) */ | 193 | /* if ((m->d[m->top-1]&BN_TBIT) && BN_is_odd(m)) */ |
| 355 | 194 | ||
| 356 | if (BN_is_odd(m)) | 195 | if (BN_is_odd(m)) |
| 357 | { ret=BN_mod_exp_mont(r,a,p,m,ctx,NULL); } | 196 | { |
| 197 | if (a->top == 1) | ||
| 198 | { | ||
| 199 | BN_ULONG A = a->d[0]; | ||
| 200 | ret=BN_mod_exp_mont_word(r,A,p,m,ctx,NULL); | ||
| 201 | } | ||
| 202 | else | ||
| 203 | ret=BN_mod_exp_mont(r,a,p,m,ctx,NULL); | ||
| 204 | } | ||
| 358 | else | 205 | else |
| 359 | #endif | 206 | #endif |
| 360 | #ifdef RECP_MUL_MOD | 207 | #ifdef RECP_MUL_MOD |
| @@ -363,14 +210,10 @@ int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, | |||
| 363 | { ret=BN_mod_exp_simple(r,a,p,m,ctx); } | 210 | { ret=BN_mod_exp_simple(r,a,p,m,ctx); } |
| 364 | #endif | 211 | #endif |
| 365 | 212 | ||
| 366 | #ifdef ATALLA | ||
| 367 | tried_atalla=0; | ||
| 368 | #endif | ||
| 369 | |||
| 370 | return(ret); | 213 | return(ret); |
| 371 | } | 214 | } |
| 372 | 215 | ||
| 373 | /* #ifdef RECP_MUL_MOD */ | 216 | |
| 374 | int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | 217 | int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
| 375 | const BIGNUM *m, BN_CTX *ctx) | 218 | const BIGNUM *m, BN_CTX *ctx) |
| 376 | { | 219 | { |
| @@ -398,27 +241,22 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | |||
| 398 | ts=1; | 241 | ts=1; |
| 399 | 242 | ||
| 400 | if (!BN_mod(&(val[0]),a,m,ctx)) goto err; /* 1 */ | 243 | if (!BN_mod(&(val[0]),a,m,ctx)) goto err; /* 1 */ |
| 401 | if (!BN_mod_mul_reciprocal(aa,&(val[0]),&(val[0]),&recp,ctx)) | ||
| 402 | goto err; /* 2 */ | ||
| 403 | |||
| 404 | if (bits <= 17) /* This is probably 3 or 0x10001, so just do singles */ | ||
| 405 | window=1; | ||
| 406 | else if (bits >= 256) | ||
| 407 | window=5; /* max size of window */ | ||
| 408 | else if (bits >= 128) | ||
| 409 | window=4; | ||
| 410 | else | ||
| 411 | window=3; | ||
| 412 | 244 | ||
| 413 | j=1<<(window-1); | 245 | window = BN_window_bits_for_exponent_size(bits); |
| 414 | for (i=1; i<j; i++) | 246 | if (window > 1) |
| 415 | { | 247 | { |
| 416 | BN_init(&val[i]); | 248 | if (!BN_mod_mul_reciprocal(aa,&(val[0]),&(val[0]),&recp,ctx)) |
| 417 | if (!BN_mod_mul_reciprocal(&(val[i]),&(val[i-1]),aa,&recp,ctx)) | 249 | goto err; /* 2 */ |
| 418 | goto err; | 250 | j=1<<(window-1); |
| 251 | for (i=1; i<j; i++) | ||
| 252 | { | ||
| 253 | BN_init(&val[i]); | ||
| 254 | if (!BN_mod_mul_reciprocal(&(val[i]),&(val[i-1]),aa,&recp,ctx)) | ||
| 255 | goto err; | ||
| 256 | } | ||
| 257 | ts=i; | ||
| 419 | } | 258 | } |
| 420 | ts=i; | 259 | |
| 421 | |||
| 422 | start=1; /* This is used to avoid multiplication etc | 260 | start=1; /* This is used to avoid multiplication etc |
| 423 | * when there is only the value '1' in the | 261 | * when there is only the value '1' in the |
| 424 | * buffer. */ | 262 | * buffer. */ |
| @@ -485,9 +323,8 @@ err: | |||
| 485 | BN_RECP_CTX_free(&recp); | 323 | BN_RECP_CTX_free(&recp); |
| 486 | return(ret); | 324 | return(ret); |
| 487 | } | 325 | } |
| 488 | /* #endif */ | ||
| 489 | 326 | ||
| 490 | /* #ifdef MONT_MUL_MOD */ | 327 | |
| 491 | int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p, | 328 | int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p, |
| 492 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) | 329 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) |
| 493 | { | 330 | { |
| @@ -502,12 +339,6 @@ int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p, | |||
| 502 | bn_check_top(p); | 339 | bn_check_top(p); |
| 503 | bn_check_top(m); | 340 | bn_check_top(m); |
| 504 | 341 | ||
| 505 | #ifdef ATALLA | ||
| 506 | if(!tried_atalla && BN_mod_exp_atalla(rr,a,p,m)) | ||
| 507 | return 1; | ||
| 508 | /* If it fails, try the other methods */ | ||
| 509 | #endif | ||
| 510 | |||
| 511 | if (!(m->d[0] & 1)) | 342 | if (!(m->d[0] & 1)) |
| 512 | { | 343 | { |
| 513 | BNerr(BN_F_BN_MOD_EXP_MONT,BN_R_CALLED_WITH_EVEN_MODULUS); | 344 | BNerr(BN_F_BN_MOD_EXP_MONT,BN_R_CALLED_WITH_EVEN_MODULUS); |
| @@ -527,11 +358,9 @@ int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p, | |||
| 527 | /* If this is not done, things will break in the montgomery | 358 | /* If this is not done, things will break in the montgomery |
| 528 | * part */ | 359 | * part */ |
| 529 | 360 | ||
| 530 | #if 1 | ||
| 531 | if (in_mont != NULL) | 361 | if (in_mont != NULL) |
| 532 | mont=in_mont; | 362 | mont=in_mont; |
| 533 | else | 363 | else |
| 534 | #endif | ||
| 535 | { | 364 | { |
| 536 | if ((mont=BN_MONT_CTX_new()) == NULL) goto err; | 365 | if ((mont=BN_MONT_CTX_new()) == NULL) goto err; |
| 537 | if (!BN_MONT_CTX_set(mont,m,ctx)) goto err; | 366 | if (!BN_MONT_CTX_set(mont,m,ctx)) goto err; |
| @@ -541,31 +370,27 @@ int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p, | |||
| 541 | ts=1; | 370 | ts=1; |
| 542 | if (BN_ucmp(a,m) >= 0) | 371 | if (BN_ucmp(a,m) >= 0) |
| 543 | { | 372 | { |
| 544 | BN_mod(&(val[0]),a,m,ctx); | 373 | if (!BN_mod(&(val[0]),a,m,ctx)) |
| 374 | goto err; | ||
| 545 | aa= &(val[0]); | 375 | aa= &(val[0]); |
| 546 | } | 376 | } |
| 547 | else | 377 | else |
| 548 | aa=a; | 378 | aa=a; |
| 549 | if (!BN_to_montgomery(&(val[0]),aa,mont,ctx)) goto err; /* 1 */ | 379 | if (!BN_to_montgomery(&(val[0]),aa,mont,ctx)) goto err; /* 1 */ |
| 550 | if (!BN_mod_mul_montgomery(d,&(val[0]),&(val[0]),mont,ctx)) goto err; /* 2 */ | ||
| 551 | |||
| 552 | if (bits <= 20) /* This is probably 3 or 0x10001, so just do singles */ | ||
| 553 | window=1; | ||
| 554 | else if (bits >= 256) | ||
| 555 | window=5; /* max size of window */ | ||
| 556 | else if (bits >= 128) | ||
| 557 | window=4; | ||
| 558 | else | ||
| 559 | window=3; | ||
| 560 | 380 | ||
| 561 | j=1<<(window-1); | 381 | window = BN_window_bits_for_exponent_size(bits); |
| 562 | for (i=1; i<j; i++) | 382 | if (window > 1) |
| 563 | { | 383 | { |
| 564 | BN_init(&(val[i])); | 384 | if (!BN_mod_mul_montgomery(d,&(val[0]),&(val[0]),mont,ctx)) goto err; /* 2 */ |
| 565 | if (!BN_mod_mul_montgomery(&(val[i]),&(val[i-1]),d,mont,ctx)) | 385 | j=1<<(window-1); |
| 566 | goto err; | 386 | for (i=1; i<j; i++) |
| 387 | { | ||
| 388 | BN_init(&(val[i])); | ||
| 389 | if (!BN_mod_mul_montgomery(&(val[i]),&(val[i-1]),d,mont,ctx)) | ||
| 390 | goto err; | ||
| 391 | } | ||
| 392 | ts=i; | ||
| 567 | } | 393 | } |
| 568 | ts=i; | ||
| 569 | 394 | ||
| 570 | start=1; /* This is used to avoid multiplication etc | 395 | start=1; /* This is used to avoid multiplication etc |
| 571 | * when there is only the value '1' in the | 396 | * when there is only the value '1' in the |
| @@ -574,7 +399,7 @@ int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p, | |||
| 574 | wstart=bits-1; /* The top bit of the window */ | 399 | wstart=bits-1; /* The top bit of the window */ |
| 575 | wend=0; /* The bottom bit of the window */ | 400 | wend=0; /* The bottom bit of the window */ |
| 576 | 401 | ||
| 577 | if (!BN_to_montgomery(r,BN_value_one(),mont,ctx)) goto err; | 402 | if (!BN_to_montgomery(r,BN_value_one(),mont,ctx)) goto err; |
| 578 | for (;;) | 403 | for (;;) |
| 579 | { | 404 | { |
| 580 | if (BN_is_bit_set(p,wstart) == 0) | 405 | if (BN_is_bit_set(p,wstart) == 0) |
| @@ -626,7 +451,7 @@ int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p, | |||
| 626 | start=0; | 451 | start=0; |
| 627 | if (wstart < 0) break; | 452 | if (wstart < 0) break; |
| 628 | } | 453 | } |
| 629 | BN_from_montgomery(rr,r,mont,ctx); | 454 | if (!BN_from_montgomery(rr,r,mont,ctx)) goto err; |
| 630 | ret=1; | 455 | ret=1; |
| 631 | err: | 456 | err: |
| 632 | if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); | 457 | if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); |
| @@ -635,7 +460,134 @@ err: | |||
| 635 | BN_clear_free(&(val[i])); | 460 | BN_clear_free(&(val[i])); |
| 636 | return(ret); | 461 | return(ret); |
| 637 | } | 462 | } |
| 638 | /* #endif */ | 463 | |
| 464 | int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, | ||
| 465 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) | ||
| 466 | { | ||
| 467 | BN_MONT_CTX *mont = NULL; | ||
| 468 | int b, bits, ret=0; | ||
| 469 | int r_is_one; | ||
| 470 | BN_ULONG w, next_w; | ||
| 471 | BIGNUM *d, *r, *t; | ||
| 472 | BIGNUM *swap_tmp; | ||
| 473 | #define BN_MOD_MUL_WORD(r, w, m) \ | ||
| 474 | (BN_mul_word(r, (w)) && \ | ||
| 475 | (/* BN_ucmp(r, (m)) < 0 ? 1 :*/ \ | ||
| 476 | (BN_mod(t, r, m, ctx) && (swap_tmp = r, r = t, t = swap_tmp, 1)))) | ||
| 477 | /* BN_MOD_MUL_WORD is only used with 'w' large, | ||
| 478 | * so the BN_ucmp test is probably more overhead | ||
| 479 | * than always using BN_mod (which uses BN_copy if | ||
| 480 | * a similar test returns true). */ | ||
| 481 | #define BN_TO_MONTGOMERY_WORD(r, w, mont) \ | ||
| 482 | (BN_set_word(r, (w)) && BN_to_montgomery(r, r, (mont), ctx)) | ||
| 483 | |||
| 484 | bn_check_top(p); | ||
| 485 | bn_check_top(m); | ||
| 486 | |||
| 487 | if (!(m->d[0] & 1)) | ||
| 488 | { | ||
| 489 | BNerr(BN_F_BN_MOD_EXP_MONT_WORD,BN_R_CALLED_WITH_EVEN_MODULUS); | ||
| 490 | return(0); | ||
| 491 | } | ||
| 492 | bits = BN_num_bits(p); | ||
| 493 | if (bits == 0) | ||
| 494 | { | ||
| 495 | BN_one(rr); | ||
| 496 | return(1); | ||
| 497 | } | ||
| 498 | BN_CTX_start(ctx); | ||
| 499 | d = BN_CTX_get(ctx); | ||
| 500 | r = BN_CTX_get(ctx); | ||
| 501 | t = BN_CTX_get(ctx); | ||
| 502 | if (d == NULL || r == NULL || t == NULL) goto err; | ||
| 503 | |||
| 504 | if (in_mont != NULL) | ||
| 505 | mont=in_mont; | ||
| 506 | else | ||
| 507 | { | ||
| 508 | if ((mont = BN_MONT_CTX_new()) == NULL) goto err; | ||
| 509 | if (!BN_MONT_CTX_set(mont, m, ctx)) goto err; | ||
| 510 | } | ||
| 511 | |||
| 512 | r_is_one = 1; /* except for Montgomery factor */ | ||
| 513 | |||
| 514 | /* bits-1 >= 0 */ | ||
| 515 | |||
| 516 | /* The result is accumulated in the product r*w. */ | ||
| 517 | w = a; /* bit 'bits-1' of 'p' is always set */ | ||
| 518 | for (b = bits-2; b >= 0; b--) | ||
| 519 | { | ||
| 520 | /* First, square r*w. */ | ||
| 521 | next_w = w*w; | ||
| 522 | if ((next_w/w) != w) /* overflow */ | ||
| 523 | { | ||
| 524 | if (r_is_one) | ||
| 525 | { | ||
| 526 | if (!BN_TO_MONTGOMERY_WORD(r, w, mont)) goto err; | ||
| 527 | r_is_one = 0; | ||
| 528 | } | ||
| 529 | else | ||
| 530 | { | ||
| 531 | if (!BN_MOD_MUL_WORD(r, w, m)) goto err; | ||
| 532 | } | ||
| 533 | next_w = 1; | ||
| 534 | } | ||
| 535 | w = next_w; | ||
| 536 | if (!r_is_one) | ||
| 537 | { | ||
| 538 | if (!BN_mod_mul_montgomery(r, r, r, mont, ctx)) goto err; | ||
| 539 | } | ||
| 540 | |||
| 541 | /* Second, multiply r*w by 'a' if exponent bit is set. */ | ||
| 542 | if (BN_is_bit_set(p, b)) | ||
| 543 | { | ||
| 544 | next_w = w*a; | ||
| 545 | if ((next_w/a) != w) /* overflow */ | ||
| 546 | { | ||
| 547 | if (r_is_one) | ||
| 548 | { | ||
| 549 | if (!BN_TO_MONTGOMERY_WORD(r, w, mont)) goto err; | ||
| 550 | r_is_one = 0; | ||
| 551 | } | ||
| 552 | else | ||
| 553 | { | ||
| 554 | if (!BN_MOD_MUL_WORD(r, w, m)) goto err; | ||
| 555 | } | ||
| 556 | next_w = a; | ||
| 557 | } | ||
| 558 | w = next_w; | ||
| 559 | } | ||
| 560 | } | ||
| 561 | |||
| 562 | /* Finally, set r:=r*w. */ | ||
| 563 | if (w != 1) | ||
| 564 | { | ||
| 565 | if (r_is_one) | ||
| 566 | { | ||
| 567 | if (!BN_TO_MONTGOMERY_WORD(r, w, mont)) goto err; | ||
| 568 | r_is_one = 0; | ||
| 569 | } | ||
| 570 | else | ||
| 571 | { | ||
| 572 | if (!BN_MOD_MUL_WORD(r, w, m)) goto err; | ||
| 573 | } | ||
| 574 | } | ||
| 575 | |||
| 576 | if (r_is_one) /* can happen only if a == 1*/ | ||
| 577 | { | ||
| 578 | if (!BN_one(rr)) goto err; | ||
| 579 | } | ||
| 580 | else | ||
| 581 | { | ||
| 582 | if (!BN_from_montgomery(rr, r, mont, ctx)) goto err; | ||
| 583 | } | ||
| 584 | ret = 1; | ||
| 585 | err: | ||
| 586 | if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); | ||
| 587 | BN_CTX_end(ctx); | ||
| 588 | return(ret); | ||
| 589 | } | ||
| 590 | |||
| 639 | 591 | ||
| 640 | /* The old fallback, simple version :-) */ | 592 | /* The old fallback, simple version :-) */ |
| 641 | int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m, | 593 | int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m, |
| @@ -660,26 +612,21 @@ int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m, | |||
| 660 | BN_init(&(val[0])); | 612 | BN_init(&(val[0])); |
| 661 | ts=1; | 613 | ts=1; |
| 662 | if (!BN_mod(&(val[0]),a,m,ctx)) goto err; /* 1 */ | 614 | if (!BN_mod(&(val[0]),a,m,ctx)) goto err; /* 1 */ |
| 663 | if (!BN_mod_mul(d,&(val[0]),&(val[0]),m,ctx)) | ||
| 664 | goto err; /* 2 */ | ||
| 665 | |||
| 666 | if (bits <= 17) /* This is probably 3 or 0x10001, so just do singles */ | ||
| 667 | window=1; | ||
| 668 | else if (bits >= 256) | ||
| 669 | window=5; /* max size of window */ | ||
| 670 | else if (bits >= 128) | ||
| 671 | window=4; | ||
| 672 | else | ||
| 673 | window=3; | ||
| 674 | 615 | ||
| 675 | j=1<<(window-1); | 616 | window = BN_window_bits_for_exponent_size(bits); |
| 676 | for (i=1; i<j; i++) | 617 | if (window > 1) |
| 677 | { | 618 | { |
| 678 | BN_init(&(val[i])); | 619 | if (!BN_mod_mul(d,&(val[0]),&(val[0]),m,ctx)) |
| 679 | if (!BN_mod_mul(&(val[i]),&(val[i-1]),d,m,ctx)) | 620 | goto err; /* 2 */ |
| 680 | goto err; | 621 | j=1<<(window-1); |
| 622 | for (i=1; i<j; i++) | ||
| 623 | { | ||
| 624 | BN_init(&(val[i])); | ||
| 625 | if (!BN_mod_mul(&(val[i]),&(val[i-1]),d,m,ctx)) | ||
| 626 | goto err; | ||
| 627 | } | ||
| 628 | ts=i; | ||
| 681 | } | 629 | } |
| 682 | ts=i; | ||
| 683 | 630 | ||
| 684 | start=1; /* This is used to avoid multiplication etc | 631 | start=1; /* This is used to avoid multiplication etc |
| 685 | * when there is only the value '1' in the | 632 | * when there is only the value '1' in the |
diff --git a/src/lib/libssl/src/crypto/bn/bn_exp2.c b/src/lib/libssl/src/crypto/bn/bn_exp2.c index 4f4e9e3299..29029f4c72 100644 --- a/src/lib/libssl/src/crypto/bn/bn_exp2.c +++ b/src/lib/libssl/src/crypto/bn/bn_exp2.c | |||
| @@ -1,27 +1,128 @@ | |||
| 1 | /* crypto/bn/bn_exp2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | /* ==================================================================== | ||
| 59 | * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. | ||
| 60 | * | ||
| 61 | * Redistribution and use in source and binary forms, with or without | ||
| 62 | * modification, are permitted provided that the following conditions | ||
| 63 | * are met: | ||
| 64 | * | ||
| 65 | * 1. Redistributions of source code must retain the above copyright | ||
| 66 | * notice, this list of conditions and the following disclaimer. | ||
| 67 | * | ||
| 68 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 69 | * notice, this list of conditions and the following disclaimer in | ||
| 70 | * the documentation and/or other materials provided with the | ||
| 71 | * distribution. | ||
| 72 | * | ||
| 73 | * 3. All advertising materials mentioning features or use of this | ||
| 74 | * software must display the following acknowledgment: | ||
| 75 | * "This product includes software developed by the OpenSSL Project | ||
| 76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 77 | * | ||
| 78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 79 | * endorse or promote products derived from this software without | ||
| 80 | * prior written permission. For written permission, please contact | ||
| 81 | * openssl-core@openssl.org. | ||
| 82 | * | ||
| 83 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 84 | * nor may "OpenSSL" appear in their names without prior written | ||
| 85 | * permission of the OpenSSL Project. | ||
| 86 | * | ||
| 87 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 88 | * acknowledgment: | ||
| 89 | * "This product includes software developed by the OpenSSL Project | ||
| 90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 91 | * | ||
| 92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 103 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 104 | * ==================================================================== | ||
| 105 | * | ||
| 106 | * This product includes cryptographic software written by Eric Young | ||
| 107 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 108 | * Hudson (tjh@cryptsoft.com). | ||
| 109 | * | ||
| 110 | */ | ||
| 111 | |||
| 1 | #include <stdio.h> | 112 | #include <stdio.h> |
| 2 | #include "cryptlib.h" | 113 | #include "cryptlib.h" |
| 3 | #include "bn_lcl.h" | 114 | #include "bn_lcl.h" |
| 4 | 115 | ||
| 5 | /* I've done some timing with different table sizes. | 116 | #define TABLE_SIZE 32 |
| 6 | * The main hassle is that even with bits set at 3, this requires | ||
| 7 | * 63 BIGNUMs to store the pre-calculated values. | ||
| 8 | * 512 1024 | ||
| 9 | * bits=1 75.4% 79.4% | ||
| 10 | * bits=2 61.2% 62.4% | ||
| 11 | * bits=3 61.3% 59.3% | ||
| 12 | * The lack of speed improvement is also a function of the pre-calculation | ||
| 13 | * which could be removed. | ||
| 14 | */ | ||
| 15 | #define EXP2_TABLE_BITS 2 /* 1 2 3 4 5 */ | ||
| 16 | #define EXP2_TABLE_SIZE 4 /* 2 4 8 16 32 */ | ||
| 17 | 117 | ||
| 18 | int BN_mod_exp2_mont(BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, | 118 | int BN_mod_exp2_mont(BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, |
| 19 | BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) | 119 | BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) |
| 20 | { | 120 | { |
| 21 | int i,j,k,bits,bits1,bits2,ret=0,wstart,wend,window,xvalue,yvalue; | 121 | int i,j,bits,b,bits1,bits2,ret=0,wpos1,wpos2,window1,window2,wvalue1,wvalue2; |
| 22 | int start=1,ts=0,x,y; | 122 | int r_is_one=1,ts1=0,ts2=0; |
| 23 | BIGNUM *d,*aa1,*aa2,*r; | 123 | BIGNUM *d,*r; |
| 24 | BIGNUM val[EXP2_TABLE_SIZE][EXP2_TABLE_SIZE]; | 124 | BIGNUM *a_mod_m; |
| 125 | BIGNUM val1[TABLE_SIZE], val2[TABLE_SIZE]; | ||
| 25 | BN_MONT_CTX *mont=NULL; | 126 | BN_MONT_CTX *mont=NULL; |
| 26 | 127 | ||
| 27 | bn_check_top(a1); | 128 | bn_check_top(a1); |
| @@ -32,7 +133,7 @@ int BN_mod_exp2_mont(BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, | |||
| 32 | 133 | ||
| 33 | if (!(m->d[0] & 1)) | 134 | if (!(m->d[0] & 1)) |
| 34 | { | 135 | { |
| 35 | BNerr(BN_F_BN_MOD_EXP_MONT,BN_R_CALLED_WITH_EVEN_MODULUS); | 136 | BNerr(BN_F_BN_MOD_EXP2_MONT,BN_R_CALLED_WITH_EVEN_MODULUS); |
| 36 | return(0); | 137 | return(0); |
| 37 | } | 138 | } |
| 38 | bits1=BN_num_bits(p1); | 139 | bits1=BN_num_bits(p1); |
| @@ -42,17 +143,13 @@ int BN_mod_exp2_mont(BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, | |||
| 42 | BN_one(rr); | 143 | BN_one(rr); |
| 43 | return(1); | 144 | return(1); |
| 44 | } | 145 | } |
| 146 | bits=(bits1 > bits2)?bits1:bits2; | ||
| 45 | 147 | ||
| 46 | BN_CTX_start(ctx); | 148 | BN_CTX_start(ctx); |
| 47 | d = BN_CTX_get(ctx); | 149 | d = BN_CTX_get(ctx); |
| 48 | r = BN_CTX_get(ctx); | 150 | r = BN_CTX_get(ctx); |
| 49 | if (d == NULL || r == NULL) goto err; | 151 | if (d == NULL || r == NULL) goto err; |
| 50 | 152 | ||
| 51 | bits=(bits1 > bits2)?bits1:bits2; | ||
| 52 | |||
| 53 | /* If this is not done, things will break in the montgomery | ||
| 54 | * part */ | ||
| 55 | |||
| 56 | if (in_mont != NULL) | 153 | if (in_mont != NULL) |
| 57 | mont=in_mont; | 154 | mont=in_mont; |
| 58 | else | 155 | else |
| @@ -61,139 +158,143 @@ int BN_mod_exp2_mont(BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, | |||
| 61 | if (!BN_MONT_CTX_set(mont,m,ctx)) goto err; | 158 | if (!BN_MONT_CTX_set(mont,m,ctx)) goto err; |
| 62 | } | 159 | } |
| 63 | 160 | ||
| 64 | BN_init(&(val[0][0])); | 161 | window1 = BN_window_bits_for_exponent_size(bits1); |
| 65 | BN_init(&(val[1][1])); | 162 | window2 = BN_window_bits_for_exponent_size(bits2); |
| 66 | BN_init(&(val[0][1])); | 163 | |
| 67 | BN_init(&(val[1][0])); | 164 | /* |
| 68 | ts=1; | 165 | * Build table for a1: val1[i] := a1^(2*i + 1) mod m for i = 0 .. 2^(window1-1) |
| 166 | */ | ||
| 167 | BN_init(&val1[0]); | ||
| 168 | ts1=1; | ||
| 69 | if (BN_ucmp(a1,m) >= 0) | 169 | if (BN_ucmp(a1,m) >= 0) |
| 70 | { | 170 | { |
| 71 | BN_mod(&(val[1][0]),a1,m,ctx); | 171 | if (!BN_mod(&(val1[0]),a1,m,ctx)) |
| 72 | aa1= &(val[1][0]); | 172 | goto err; |
| 173 | a_mod_m = &(val1[0]); | ||
| 73 | } | 174 | } |
| 74 | else | 175 | else |
| 75 | aa1=a1; | 176 | a_mod_m = a1; |
| 177 | if (!BN_to_montgomery(&(val1[0]),a_mod_m,mont,ctx)) goto err; | ||
| 178 | if (window1 > 1) | ||
| 179 | { | ||
| 180 | if (!BN_mod_mul_montgomery(d,&(val1[0]),&(val1[0]),mont,ctx)) goto err; | ||
| 181 | |||
| 182 | j=1<<(window1-1); | ||
| 183 | for (i=1; i<j; i++) | ||
| 184 | { | ||
| 185 | BN_init(&(val1[i])); | ||
| 186 | if (!BN_mod_mul_montgomery(&(val1[i]),&(val1[i-1]),d,mont,ctx)) | ||
| 187 | goto err; | ||
| 188 | } | ||
| 189 | ts1=i; | ||
| 190 | } | ||
| 191 | |||
| 192 | |||
| 193 | /* | ||
| 194 | * Build table for a2: val2[i] := a2^(2*i + 1) mod m for i = 0 .. 2^(window2-1) | ||
| 195 | */ | ||
| 196 | BN_init(&val2[0]); | ||
| 197 | ts2=1; | ||
| 76 | if (BN_ucmp(a2,m) >= 0) | 198 | if (BN_ucmp(a2,m) >= 0) |
| 77 | { | 199 | { |
| 78 | BN_mod(&(val[0][1]),a2,m,ctx); | 200 | if (!BN_mod(&(val2[0]),a2,m,ctx)) |
| 79 | aa2= &(val[0][1]); | 201 | goto err; |
| 202 | a_mod_m = &(val2[0]); | ||
| 80 | } | 203 | } |
| 81 | else | 204 | else |
| 82 | aa2=a2; | 205 | a_mod_m = a2; |
| 83 | if (!BN_to_montgomery(&(val[1][0]),aa1,mont,ctx)) goto err; | 206 | if (!BN_to_montgomery(&(val2[0]),a_mod_m,mont,ctx)) goto err; |
| 84 | if (!BN_to_montgomery(&(val[0][1]),aa2,mont,ctx)) goto err; | 207 | if (window2 > 1) |
| 85 | if (!BN_mod_mul_montgomery(&(val[1][1]), | ||
| 86 | &(val[1][0]),&(val[0][1]),mont,ctx)) | ||
| 87 | goto err; | ||
| 88 | |||
| 89 | #if 0 | ||
| 90 | if (bits <= 20) /* This is probably 3 or 0x10001, so just do singles */ | ||
| 91 | window=1; | ||
| 92 | else if (bits > 250) | ||
| 93 | window=5; /* max size of window */ | ||
| 94 | else if (bits >= 120) | ||
| 95 | window=4; | ||
| 96 | else | ||
| 97 | window=3; | ||
| 98 | #else | ||
| 99 | window=EXP2_TABLE_BITS; | ||
| 100 | #endif | ||
| 101 | |||
| 102 | k=1<<window; | ||
| 103 | for (x=0; x<k; x++) | ||
| 104 | { | 208 | { |
| 105 | if (x >= 2) | 209 | if (!BN_mod_mul_montgomery(d,&(val2[0]),&(val2[0]),mont,ctx)) goto err; |
| 106 | { | 210 | |
| 107 | BN_init(&(val[x][0])); | 211 | j=1<<(window2-1); |
| 108 | BN_init(&(val[x][1])); | 212 | for (i=1; i<j; i++) |
| 109 | if (!BN_mod_mul_montgomery(&(val[x][0]), | ||
| 110 | &(val[1][0]),&(val[x-1][0]),mont,ctx)) goto err; | ||
| 111 | if (!BN_mod_mul_montgomery(&(val[x][1]), | ||
| 112 | &(val[1][0]),&(val[x-1][1]),mont,ctx)) goto err; | ||
| 113 | } | ||
| 114 | for (y=2; y<k; y++) | ||
| 115 | { | 213 | { |
| 116 | BN_init(&(val[x][y])); | 214 | BN_init(&(val2[i])); |
| 117 | if (!BN_mod_mul_montgomery(&(val[x][y]), | 215 | if (!BN_mod_mul_montgomery(&(val2[i]),&(val2[i-1]),d,mont,ctx)) |
| 118 | &(val[x][y-1]),&(val[0][1]),mont,ctx)) | ||
| 119 | goto err; | 216 | goto err; |
| 120 | } | 217 | } |
| 218 | ts2=i; | ||
| 121 | } | 219 | } |
| 122 | ts=k; | 220 | |
| 123 | 221 | ||
| 124 | start=1; /* This is used to avoid multiplication etc | 222 | /* Now compute the power product, using independent windows. */ |
| 125 | * when there is only the value '1' in the | 223 | r_is_one=1; |
| 126 | * buffer. */ | 224 | wvalue1=0; /* The 'value' of the first window */ |
| 127 | xvalue=0; /* The 'x value' of the window */ | 225 | wvalue2=0; /* The 'value' of the second window */ |
| 128 | yvalue=0; /* The 'y value' of the window */ | 226 | wpos1=0; /* If wvalue1 > 0, the bottom bit of the first window */ |
| 129 | wstart=bits-1; /* The top bit of the window */ | 227 | wpos2=0; /* If wvalue2 > 0, the bottom bit of the second window */ |
| 130 | wend=0; /* The bottom bit of the window */ | 228 | |
| 131 | 229 | if (!BN_to_montgomery(r,BN_value_one(),mont,ctx)) goto err; | |
| 132 | if (!BN_to_montgomery(r,BN_value_one(),mont,ctx)) goto err; | 230 | for (b=bits-1; b>=0; b--) |
| 133 | for (;;) | ||
| 134 | { | 231 | { |
| 135 | xvalue=BN_is_bit_set(p1,wstart); | 232 | if (!r_is_one) |
| 136 | yvalue=BN_is_bit_set(p2,wstart); | ||
| 137 | if (!(xvalue || yvalue)) | ||
| 138 | { | 233 | { |
| 139 | if (!start) | 234 | if (!BN_mod_mul_montgomery(r,r,r,mont,ctx)) |
| 235 | goto err; | ||
| 236 | } | ||
| 237 | |||
| 238 | if (!wvalue1) | ||
| 239 | if (BN_is_bit_set(p1, b)) | ||
| 140 | { | 240 | { |
| 141 | if (!BN_mod_mul_montgomery(r,r,r,mont,ctx)) | 241 | /* consider bits b-window1+1 .. b for this window */ |
| 142 | goto err; | 242 | i = b-window1+1; |
| 243 | while (!BN_is_bit_set(p1, i)) /* works for i<0 */ | ||
| 244 | i++; | ||
| 245 | wpos1 = i; | ||
| 246 | wvalue1 = 1; | ||
| 247 | for (i = b-1; i >= wpos1; i--) | ||
| 248 | { | ||
| 249 | wvalue1 <<= 1; | ||
| 250 | if (BN_is_bit_set(p1, i)) | ||
| 251 | wvalue1++; | ||
| 252 | } | ||
| 143 | } | 253 | } |
| 144 | wstart--; | 254 | |
| 145 | if (wstart < 0) break; | 255 | if (!wvalue2) |
| 146 | continue; | 256 | if (BN_is_bit_set(p2, b)) |
| 147 | } | ||
| 148 | /* We now have wstart on a 'set' bit, we now need to work out | ||
| 149 | * how bit a window to do. To do this we need to scan | ||
| 150 | * forward until the last set bit before the end of the | ||
| 151 | * window */ | ||
| 152 | j=wstart; | ||
| 153 | /* xvalue=BN_is_bit_set(p1,wstart); already set */ | ||
| 154 | /* yvalue=BN_is_bit_set(p1,wstart); already set */ | ||
| 155 | wend=0; | ||
| 156 | for (i=1; i<window; i++) | ||
| 157 | { | ||
| 158 | if (wstart-i < 0) break; | ||
| 159 | xvalue+=xvalue; | ||
| 160 | xvalue|=BN_is_bit_set(p1,wstart-i); | ||
| 161 | yvalue+=yvalue; | ||
| 162 | yvalue|=BN_is_bit_set(p2,wstart-i); | ||
| 163 | } | ||
| 164 | |||
| 165 | /* i is the size of the current window */ | ||
| 166 | /* add the 'bytes above' */ | ||
| 167 | if (!start) | ||
| 168 | for (j=0; j<i; j++) | ||
| 169 | { | 257 | { |
| 170 | if (!BN_mod_mul_montgomery(r,r,r,mont,ctx)) | 258 | /* consider bits b-window2+1 .. b for this window */ |
| 171 | goto err; | 259 | i = b-window2+1; |
| 260 | while (!BN_is_bit_set(p2, i)) | ||
| 261 | i++; | ||
| 262 | wpos2 = i; | ||
| 263 | wvalue2 = 1; | ||
| 264 | for (i = b-1; i >= wpos2; i--) | ||
| 265 | { | ||
| 266 | wvalue2 <<= 1; | ||
| 267 | if (BN_is_bit_set(p2, i)) | ||
| 268 | wvalue2++; | ||
| 269 | } | ||
| 172 | } | 270 | } |
| 271 | |||
| 272 | if (wvalue1 && b == wpos1) | ||
| 273 | { | ||
| 274 | /* wvalue1 is odd and < 2^window1 */ | ||
| 275 | if (!BN_mod_mul_montgomery(r,r,&(val1[wvalue1>>1]),mont,ctx)) | ||
| 276 | goto err; | ||
| 277 | wvalue1 = 0; | ||
| 278 | r_is_one = 0; | ||
| 279 | } | ||
| 173 | 280 | ||
| 174 | /* wvalue will be an odd number < 2^window */ | 281 | if (wvalue2 && b == wpos2) |
| 175 | if (xvalue || yvalue) | ||
| 176 | { | 282 | { |
| 177 | if (!BN_mod_mul_montgomery(r,r,&(val[xvalue][yvalue]), | 283 | /* wvalue2 is odd and < 2^window2 */ |
| 178 | mont,ctx)) goto err; | 284 | if (!BN_mod_mul_montgomery(r,r,&(val2[wvalue2>>1]),mont,ctx)) |
| 285 | goto err; | ||
| 286 | wvalue2 = 0; | ||
| 287 | r_is_one = 0; | ||
| 179 | } | 288 | } |
| 180 | |||
| 181 | /* move the 'window' down further */ | ||
| 182 | wstart-=i; | ||
| 183 | start=0; | ||
| 184 | if (wstart < 0) break; | ||
| 185 | } | 289 | } |
| 186 | BN_from_montgomery(rr,r,mont,ctx); | 290 | BN_from_montgomery(rr,r,mont,ctx); |
| 187 | ret=1; | 291 | ret=1; |
| 188 | err: | 292 | err: |
| 189 | if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); | 293 | if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); |
| 190 | BN_CTX_end(ctx); | 294 | BN_CTX_end(ctx); |
| 191 | for (i=0; i<ts; i++) | 295 | for (i=0; i<ts1; i++) |
| 192 | { | 296 | BN_clear_free(&(val1[i])); |
| 193 | for (j=0; j<ts; j++) | 297 | for (i=0; i<ts2; i++) |
| 194 | { | 298 | BN_clear_free(&(val2[i])); |
| 195 | BN_clear_free(&(val[i][j])); | ||
| 196 | } | ||
| 197 | } | ||
| 198 | return(ret); | 299 | return(ret); |
| 199 | } | 300 | } |
diff --git a/src/lib/libssl/src/crypto/bn/bn_lcl.h b/src/lib/libssl/src/crypto/bn/bn_lcl.h index e36ccbc4c2..9c959921b4 100644 --- a/src/lib/libssl/src/crypto/bn/bn_lcl.h +++ b/src/lib/libssl/src/crypto/bn/bn_lcl.h | |||
| @@ -55,6 +55,59 @@ | |||
| 55 | * copied and put under another distribution licence | 55 | * copied and put under another distribution licence |
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | /* ==================================================================== | ||
| 59 | * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. | ||
| 60 | * | ||
| 61 | * Redistribution and use in source and binary forms, with or without | ||
| 62 | * modification, are permitted provided that the following conditions | ||
| 63 | * are met: | ||
| 64 | * | ||
| 65 | * 1. Redistributions of source code must retain the above copyright | ||
| 66 | * notice, this list of conditions and the following disclaimer. | ||
| 67 | * | ||
| 68 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 69 | * notice, this list of conditions and the following disclaimer in | ||
| 70 | * the documentation and/or other materials provided with the | ||
| 71 | * distribution. | ||
| 72 | * | ||
| 73 | * 3. All advertising materials mentioning features or use of this | ||
| 74 | * software must display the following acknowledgment: | ||
| 75 | * "This product includes software developed by the OpenSSL Project | ||
| 76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 77 | * | ||
| 78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 79 | * endorse or promote products derived from this software without | ||
| 80 | * prior written permission. For written permission, please contact | ||
| 81 | * openssl-core@openssl.org. | ||
| 82 | * | ||
| 83 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 84 | * nor may "OpenSSL" appear in their names without prior written | ||
| 85 | * permission of the OpenSSL Project. | ||
| 86 | * | ||
| 87 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 88 | * acknowledgment: | ||
| 89 | * "This product includes software developed by the OpenSSL Project | ||
| 90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 91 | * | ||
| 92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 103 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 104 | * ==================================================================== | ||
| 105 | * | ||
| 106 | * This product includes cryptographic software written by Eric Young | ||
| 107 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 108 | * Hudson (tjh@cryptsoft.com). | ||
| 109 | * | ||
| 110 | */ | ||
| 58 | 111 | ||
| 59 | #ifndef HEADER_BN_LCL_H | 112 | #ifndef HEADER_BN_LCL_H |
| 60 | #define HEADER_BN_LCL_H | 113 | #define HEADER_BN_LCL_H |
| @@ -65,6 +118,51 @@ | |||
| 65 | extern "C" { | 118 | extern "C" { |
| 66 | #endif | 119 | #endif |
| 67 | 120 | ||
| 121 | |||
| 122 | /* | ||
| 123 | * BN_window_bits_for_exponent_size -- macro for sliding window mod_exp functions | ||
| 124 | * | ||
| 125 | * | ||
| 126 | * For window size 'w' (w >= 2) and a random 'b' bits exponent, | ||
| 127 | * the number of multiplications is a constant plus on average | ||
| 128 | * | ||
| 129 | * 2^(w-1) + (b-w)/(w+1); | ||
| 130 | * | ||
| 131 | * here 2^(w-1) is for precomputing the table (we actually need | ||
| 132 | * entries only for windows that have the lowest bit set), and | ||
| 133 | * (b-w)/(w+1) is an approximation for the expected number of | ||
| 134 | * w-bit windows, not counting the first one. | ||
| 135 | * | ||
| 136 | * Thus we should use | ||
| 137 | * | ||
| 138 | * w >= 6 if b > 671 | ||
| 139 | * w = 5 if 671 > b > 239 | ||
| 140 | * w = 4 if 239 > b > 79 | ||
| 141 | * w = 3 if 79 > b > 23 | ||
| 142 | * w <= 2 if 23 > b | ||
| 143 | * | ||
| 144 | * (with draws in between). Very small exponents are often selected | ||
| 145 | * with low Hamming weight, so we use w = 1 for b <= 23. | ||
| 146 | */ | ||
| 147 | #if 1 | ||
| 148 | #define BN_window_bits_for_exponent_size(b) \ | ||
| 149 | ((b) > 671 ? 6 : \ | ||
| 150 | (b) > 239 ? 5 : \ | ||
| 151 | (b) > 79 ? 4 : \ | ||
| 152 | (b) > 23 ? 3 : 1) | ||
| 153 | #else | ||
| 154 | /* Old SSLeay/OpenSSL table. | ||
| 155 | * Maximum window size was 5, so this table differs for b==1024; | ||
| 156 | * but it coincides for other interesting values (b==160, b==512). | ||
| 157 | */ | ||
| 158 | #define BN_window_bits_for_exponent_size(b) \ | ||
| 159 | ((b) > 255 ? 5 : \ | ||
| 160 | (b) > 127 ? 4 : \ | ||
| 161 | (b) > 17 ? 3 : 1) | ||
| 162 | #endif | ||
| 163 | |||
| 164 | |||
| 165 | |||
| 68 | /* Pentium pro 16,16,16,32,64 */ | 166 | /* Pentium pro 16,16,16,32,64 */ |
| 69 | /* Alpha 16,16,16,16.64 */ | 167 | /* Alpha 16,16,16,16.64 */ |
| 70 | #define BN_MULL_SIZE_NORMAL (16) /* 32 */ | 168 | #define BN_MULL_SIZE_NORMAL (16) /* 32 */ |
| @@ -130,7 +228,7 @@ extern "C" { | |||
| 130 | /* This is used for internal error checking and is not normally used */ | 228 | /* This is used for internal error checking and is not normally used */ |
| 131 | #ifdef BN_DEBUG | 229 | #ifdef BN_DEBUG |
| 132 | # include <assert.h> | 230 | # include <assert.h> |
| 133 | # define bn_check_top(a) assert ((a)->top >= 0 && (a)->top <= (a)->max); | 231 | # define bn_check_top(a) assert ((a)->top >= 0 && (a)->top <= (a)->dmax); |
| 134 | #else | 232 | #else |
| 135 | # define bn_check_top(a) | 233 | # define bn_check_top(a) |
| 136 | #endif | 234 | #endif |
diff --git a/src/lib/libssl/src/crypto/bn/bn_lib.c b/src/lib/libssl/src/crypto/bn/bn_lib.c index 0e6b12d9c3..b6b0ce4b3c 100644 --- a/src/lib/libssl/src/crypto/bn/bn_lib.c +++ b/src/lib/libssl/src/crypto/bn/bn_lib.c | |||
| @@ -56,6 +56,12 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef BN_DEBUG | ||
| 60 | # undef NDEBUG /* avoid conflicting definitions */ | ||
| 61 | # define NDEBUG | ||
| 62 | #endif | ||
| 63 | |||
| 64 | #include <assert.h> | ||
| 59 | #include <stdio.h> | 65 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 66 | #include "cryptlib.h" |
| 61 | #include "bn_lcl.h" | 67 | #include "bn_lcl.h" |
| @@ -244,14 +250,8 @@ int BN_num_bits(const BIGNUM *a) | |||
| 244 | 250 | ||
| 245 | if (a->top == 0) return(0); | 251 | if (a->top == 0) return(0); |
| 246 | l=a->d[a->top-1]; | 252 | l=a->d[a->top-1]; |
| 253 | assert(l != 0); | ||
| 247 | i=(a->top-1)*BN_BITS2; | 254 | i=(a->top-1)*BN_BITS2; |
| 248 | if (l == 0) | ||
| 249 | { | ||
| 250 | #if !defined(NO_STDIO) && !defined(WIN16) | ||
| 251 | fprintf(stderr,"BAD TOP VALUE\n"); | ||
| 252 | #endif | ||
| 253 | abort(); | ||
| 254 | } | ||
| 255 | return(i+BN_num_bits_word(l)); | 255 | return(i+BN_num_bits_word(l)); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| @@ -262,24 +262,24 @@ void BN_clear_free(BIGNUM *a) | |||
| 262 | if (a == NULL) return; | 262 | if (a == NULL) return; |
| 263 | if (a->d != NULL) | 263 | if (a->d != NULL) |
| 264 | { | 264 | { |
| 265 | memset(a->d,0,a->max*sizeof(a->d[0])); | 265 | memset(a->d,0,a->dmax*sizeof(a->d[0])); |
| 266 | if (!(BN_get_flags(a,BN_FLG_STATIC_DATA))) | 266 | if (!(BN_get_flags(a,BN_FLG_STATIC_DATA))) |
| 267 | Free(a->d); | 267 | OPENSSL_free(a->d); |
| 268 | } | 268 | } |
| 269 | i=BN_get_flags(a,BN_FLG_MALLOCED); | 269 | i=BN_get_flags(a,BN_FLG_MALLOCED); |
| 270 | memset(a,0,sizeof(BIGNUM)); | 270 | memset(a,0,sizeof(BIGNUM)); |
| 271 | if (i) | 271 | if (i) |
| 272 | Free(a); | 272 | OPENSSL_free(a); |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | void BN_free(BIGNUM *a) | 275 | void BN_free(BIGNUM *a) |
| 276 | { | 276 | { |
| 277 | if (a == NULL) return; | 277 | if (a == NULL) return; |
| 278 | if ((a->d != NULL) && !(BN_get_flags(a,BN_FLG_STATIC_DATA))) | 278 | if ((a->d != NULL) && !(BN_get_flags(a,BN_FLG_STATIC_DATA))) |
| 279 | Free(a->d); | 279 | OPENSSL_free(a->d); |
| 280 | a->flags|=BN_FLG_FREE; /* REMOVE? */ | 280 | a->flags|=BN_FLG_FREE; /* REMOVE? */ |
| 281 | if (a->flags & BN_FLG_MALLOCED) | 281 | if (a->flags & BN_FLG_MALLOCED) |
| 282 | Free(a); | 282 | OPENSSL_free(a); |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | void BN_init(BIGNUM *a) | 285 | void BN_init(BIGNUM *a) |
| @@ -291,7 +291,7 @@ BIGNUM *BN_new(void) | |||
| 291 | { | 291 | { |
| 292 | BIGNUM *ret; | 292 | BIGNUM *ret; |
| 293 | 293 | ||
| 294 | if ((ret=(BIGNUM *)Malloc(sizeof(BIGNUM))) == NULL) | 294 | if ((ret=(BIGNUM *)OPENSSL_malloc(sizeof(BIGNUM))) == NULL) |
| 295 | { | 295 | { |
| 296 | BNerr(BN_F_BN_NEW,ERR_R_MALLOC_FAILURE); | 296 | BNerr(BN_F_BN_NEW,ERR_R_MALLOC_FAILURE); |
| 297 | return(NULL); | 297 | return(NULL); |
| @@ -299,7 +299,7 @@ BIGNUM *BN_new(void) | |||
| 299 | ret->flags=BN_FLG_MALLOCED; | 299 | ret->flags=BN_FLG_MALLOCED; |
| 300 | ret->top=0; | 300 | ret->top=0; |
| 301 | ret->neg=0; | 301 | ret->neg=0; |
| 302 | ret->max=0; | 302 | ret->dmax=0; |
| 303 | ret->d=NULL; | 303 | ret->d=NULL; |
| 304 | return(ret); | 304 | return(ret); |
| 305 | } | 305 | } |
| @@ -317,7 +317,7 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) | |||
| 317 | 317 | ||
| 318 | bn_check_top(b); | 318 | bn_check_top(b); |
| 319 | 319 | ||
| 320 | if (words > b->max) | 320 | if (words > b->dmax) |
| 321 | { | 321 | { |
| 322 | bn_check_top(b); | 322 | bn_check_top(b); |
| 323 | if (BN_get_flags(b,BN_FLG_STATIC_DATA)) | 323 | if (BN_get_flags(b,BN_FLG_STATIC_DATA)) |
| @@ -325,7 +325,7 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) | |||
| 325 | BNerr(BN_F_BN_EXPAND2,BN_R_EXPAND_ON_STATIC_BIGNUM_DATA); | 325 | BNerr(BN_F_BN_EXPAND2,BN_R_EXPAND_ON_STATIC_BIGNUM_DATA); |
| 326 | return(NULL); | 326 | return(NULL); |
| 327 | } | 327 | } |
| 328 | a=A=(BN_ULONG *)Malloc(sizeof(BN_ULONG)*(words+1)); | 328 | a=A=(BN_ULONG *)OPENSSL_malloc(sizeof(BN_ULONG)*(words+1)); |
| 329 | if (A == NULL) | 329 | if (A == NULL) |
| 330 | { | 330 | { |
| 331 | BNerr(BN_F_BN_EXPAND2,ERR_R_MALLOC_FAILURE); | 331 | BNerr(BN_F_BN_EXPAND2,ERR_R_MALLOC_FAILURE); |
| @@ -423,21 +423,21 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) | |||
| 423 | case 0: ; /* ultrix cc workaround, see above */ | 423 | case 0: ; /* ultrix cc workaround, see above */ |
| 424 | } | 424 | } |
| 425 | #endif | 425 | #endif |
| 426 | Free(b->d); | 426 | OPENSSL_free(b->d); |
| 427 | } | 427 | } |
| 428 | 428 | ||
| 429 | b->d=a; | 429 | b->d=a; |
| 430 | b->max=words; | 430 | b->dmax=words; |
| 431 | 431 | ||
| 432 | /* Now need to zero any data between b->top and b->max */ | 432 | /* Now need to zero any data between b->top and b->max */ |
| 433 | 433 | ||
| 434 | A= &(b->d[b->top]); | 434 | A= &(b->d[b->top]); |
| 435 | for (i=(b->max - b->top)>>3; i>0; i--,A+=8) | 435 | for (i=(b->dmax - b->top)>>3; i>0; i--,A+=8) |
| 436 | { | 436 | { |
| 437 | A[0]=0; A[1]=0; A[2]=0; A[3]=0; | 437 | A[0]=0; A[1]=0; A[2]=0; A[3]=0; |
| 438 | A[4]=0; A[5]=0; A[6]=0; A[7]=0; | 438 | A[4]=0; A[5]=0; A[6]=0; A[7]=0; |
| 439 | } | 439 | } |
| 440 | for (i=(b->max - b->top)&7; i>0; i--,A++) | 440 | for (i=(b->dmax - b->top)&7; i>0; i--,A++) |
| 441 | A[0]=0; | 441 | A[0]=0; |
| 442 | #else | 442 | #else |
| 443 | memset(A,0,sizeof(BN_ULONG)*(words+1)); | 443 | memset(A,0,sizeof(BN_ULONG)*(words+1)); |
| @@ -508,7 +508,7 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) | |||
| 508 | void BN_clear(BIGNUM *a) | 508 | void BN_clear(BIGNUM *a) |
| 509 | { | 509 | { |
| 510 | if (a->d != NULL) | 510 | if (a->d != NULL) |
| 511 | memset(a->d,0,a->max*sizeof(a->d[0])); | 511 | memset(a->d,0,a->dmax*sizeof(a->d[0])); |
| 512 | a->top=0; | 512 | a->top=0; |
| 513 | a->neg=0; | 513 | a->neg=0; |
| 514 | } | 514 | } |
diff --git a/src/lib/libssl/src/crypto/bn/bn_mont.c b/src/lib/libssl/src/crypto/bn/bn_mont.c index 598fecbf0c..8cf1febacc 100644 --- a/src/lib/libssl/src/crypto/bn/bn_mont.c +++ b/src/lib/libssl/src/crypto/bn/bn_mont.c | |||
| @@ -85,16 +85,7 @@ int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b, | |||
| 85 | 85 | ||
| 86 | if (a == b) | 86 | if (a == b) |
| 87 | { | 87 | { |
| 88 | #if 0 | ||
| 89 | bn_wexpand(tmp,a->top*2); | ||
| 90 | bn_wexpand(tmp2,a->top*4); | ||
| 91 | bn_sqr_recursive(tmp->d,a->d,a->top,tmp2->d); | ||
| 92 | tmp->top=a->top*2; | ||
| 93 | if (tmp->d[tmp->top-1] == 0) | ||
| 94 | tmp->top--; | ||
| 95 | #else | ||
| 96 | if (!BN_sqr(tmp,a,ctx)) goto err; | 88 | if (!BN_sqr(tmp,a,ctx)) goto err; |
| 97 | #endif | ||
| 98 | } | 89 | } |
| 99 | else | 90 | else |
| 100 | { | 91 | { |
| @@ -157,7 +148,22 @@ int BN_from_montgomery(BIGNUM *ret, BIGNUM *a, BN_MONT_CTX *mont, | |||
| 157 | #endif | 148 | #endif |
| 158 | for (i=0; i<nl; i++) | 149 | for (i=0; i<nl; i++) |
| 159 | { | 150 | { |
| 151 | #ifdef __TANDEM | ||
| 152 | { | ||
| 153 | long long t1; | ||
| 154 | long long t2; | ||
| 155 | long long t3; | ||
| 156 | t1 = rp[0] * (n0 & 0177777); | ||
| 157 | t2 = 037777600000l; | ||
| 158 | t2 = n0 & t2; | ||
| 159 | t3 = rp[0] & 0177777; | ||
| 160 | t2 = (t3 * t2) & BN_MASK2; | ||
| 161 | t1 = t1 + t2; | ||
| 162 | v=bn_mul_add_words(rp,np,nl,(BN_ULONG) t1); | ||
| 163 | } | ||
| 164 | #else | ||
| 160 | v=bn_mul_add_words(rp,np,nl,(rp[0]*n0)&BN_MASK2); | 165 | v=bn_mul_add_words(rp,np,nl,(rp[0]*n0)&BN_MASK2); |
| 166 | #endif | ||
| 161 | nrp++; | 167 | nrp++; |
| 162 | rp++; | 168 | rp++; |
| 163 | if (((nrp[-1]+=v)&BN_MASK2) >= v) | 169 | if (((nrp[-1]+=v)&BN_MASK2) >= v) |
| @@ -175,6 +181,7 @@ int BN_from_montgomery(BIGNUM *ret, BIGNUM *a, BN_MONT_CTX *mont, | |||
| 175 | #if 0 | 181 | #if 0 |
| 176 | BN_rshift(ret,r,mont->ri); | 182 | BN_rshift(ret,r,mont->ri); |
| 177 | #else | 183 | #else |
| 184 | ret->neg = r->neg; | ||
| 178 | x=ri; | 185 | x=ri; |
| 179 | rp=ret->d; | 186 | rp=ret->d; |
| 180 | ap= &(r->d[x]); | 187 | ap= &(r->d[x]); |
| @@ -234,7 +241,7 @@ BN_MONT_CTX *BN_MONT_CTX_new(void) | |||
| 234 | { | 241 | { |
| 235 | BN_MONT_CTX *ret; | 242 | BN_MONT_CTX *ret; |
| 236 | 243 | ||
| 237 | if ((ret=(BN_MONT_CTX *)Malloc(sizeof(BN_MONT_CTX))) == NULL) | 244 | if ((ret=(BN_MONT_CTX *)OPENSSL_malloc(sizeof(BN_MONT_CTX))) == NULL) |
| 238 | return(NULL); | 245 | return(NULL); |
| 239 | 246 | ||
| 240 | BN_MONT_CTX_init(ret); | 247 | BN_MONT_CTX_init(ret); |
| @@ -260,7 +267,7 @@ void BN_MONT_CTX_free(BN_MONT_CTX *mont) | |||
| 260 | BN_free(&(mont->N)); | 267 | BN_free(&(mont->N)); |
| 261 | BN_free(&(mont->Ni)); | 268 | BN_free(&(mont->Ni)); |
| 262 | if (mont->flags & BN_FLG_MALLOCED) | 269 | if (mont->flags & BN_FLG_MALLOCED) |
| 263 | Free(mont); | 270 | OPENSSL_free(mont); |
| 264 | } | 271 | } |
| 265 | 272 | ||
| 266 | int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx) | 273 | int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx) |
| @@ -284,7 +291,7 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx) | |||
| 284 | buf[1]=0; | 291 | buf[1]=0; |
| 285 | tmod.d=buf; | 292 | tmod.d=buf; |
| 286 | tmod.top=1; | 293 | tmod.top=1; |
| 287 | tmod.max=2; | 294 | tmod.dmax=2; |
| 288 | tmod.neg=mod->neg; | 295 | tmod.neg=mod->neg; |
| 289 | /* Ri = R^-1 mod N*/ | 296 | /* Ri = R^-1 mod N*/ |
| 290 | if ((BN_mod_inverse(&Ri,R,&tmod,ctx)) == NULL) | 297 | if ((BN_mod_inverse(&Ri,R,&tmod,ctx)) == NULL) |
diff --git a/src/lib/libssl/src/crypto/bn/bn_mul.c b/src/lib/libssl/src/crypto/bn/bn_mul.c index 3e8baaad9a..3e8d8b9567 100644 --- a/src/lib/libssl/src/crypto/bn/bn_mul.c +++ b/src/lib/libssl/src/crypto/bn/bn_mul.c | |||
| @@ -631,7 +631,6 @@ int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) | |||
| 631 | 631 | ||
| 632 | al=a->top; | 632 | al=a->top; |
| 633 | bl=b->top; | 633 | bl=b->top; |
| 634 | r->neg=a->neg^b->neg; | ||
| 635 | 634 | ||
| 636 | if ((al == 0) || (bl == 0)) | 635 | if ((al == 0) || (bl == 0)) |
| 637 | { | 636 | { |
| @@ -647,6 +646,7 @@ int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) | |||
| 647 | } | 646 | } |
| 648 | else | 647 | else |
| 649 | rr = r; | 648 | rr = r; |
| 649 | rr->neg=a->neg^b->neg; | ||
| 650 | 650 | ||
| 651 | #if defined(BN_MUL_COMBA) || defined(BN_RECURSION) | 651 | #if defined(BN_MUL_COMBA) || defined(BN_RECURSION) |
| 652 | i = al-bl; | 652 | i = al-bl; |
diff --git a/src/lib/libssl/src/crypto/bn/bn_print.c b/src/lib/libssl/src/crypto/bn/bn_print.c index 782a96e7e0..532e66bcc3 100644 --- a/src/lib/libssl/src/crypto/bn/bn_print.c +++ b/src/lib/libssl/src/crypto/bn/bn_print.c | |||
| @@ -64,14 +64,14 @@ | |||
| 64 | 64 | ||
| 65 | static const char *Hex="0123456789ABCDEF"; | 65 | static const char *Hex="0123456789ABCDEF"; |
| 66 | 66 | ||
| 67 | /* Must 'Free' the returned data */ | 67 | /* Must 'OPENSSL_free' the returned data */ |
| 68 | char *BN_bn2hex(const BIGNUM *a) | 68 | char *BN_bn2hex(const BIGNUM *a) |
| 69 | { | 69 | { |
| 70 | int i,j,v,z=0; | 70 | int i,j,v,z=0; |
| 71 | char *buf; | 71 | char *buf; |
| 72 | char *p; | 72 | char *p; |
| 73 | 73 | ||
| 74 | buf=(char *)Malloc(a->top*BN_BYTES*2+2); | 74 | buf=(char *)OPENSSL_malloc(a->top*BN_BYTES*2+2); |
| 75 | if (buf == NULL) | 75 | if (buf == NULL) |
| 76 | { | 76 | { |
| 77 | BNerr(BN_F_BN_BN2HEX,ERR_R_MALLOC_FAILURE); | 77 | BNerr(BN_F_BN_BN2HEX,ERR_R_MALLOC_FAILURE); |
| @@ -99,7 +99,7 @@ err: | |||
| 99 | return(buf); | 99 | return(buf); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | /* Must 'Free' the returned data */ | 102 | /* Must 'OPENSSL_free' the returned data */ |
| 103 | char *BN_bn2dec(const BIGNUM *a) | 103 | char *BN_bn2dec(const BIGNUM *a) |
| 104 | { | 104 | { |
| 105 | int i=0,num; | 105 | int i=0,num; |
| @@ -110,8 +110,8 @@ char *BN_bn2dec(const BIGNUM *a) | |||
| 110 | 110 | ||
| 111 | i=BN_num_bits(a)*3; | 111 | i=BN_num_bits(a)*3; |
| 112 | num=(i/10+i/1000+3)+1; | 112 | num=(i/10+i/1000+3)+1; |
| 113 | bn_data=(BN_ULONG *)Malloc((num/BN_DEC_NUM+1)*sizeof(BN_ULONG)); | 113 | bn_data=(BN_ULONG *)OPENSSL_malloc((num/BN_DEC_NUM+1)*sizeof(BN_ULONG)); |
| 114 | buf=(char *)Malloc(num+3); | 114 | buf=(char *)OPENSSL_malloc(num+3); |
| 115 | if ((buf == NULL) || (bn_data == NULL)) | 115 | if ((buf == NULL) || (bn_data == NULL)) |
| 116 | { | 116 | { |
| 117 | BNerr(BN_F_BN_BN2DEC,ERR_R_MALLOC_FAILURE); | 117 | BNerr(BN_F_BN_BN2DEC,ERR_R_MALLOC_FAILURE); |
| @@ -149,7 +149,7 @@ char *BN_bn2dec(const BIGNUM *a) | |||
| 149 | } | 149 | } |
| 150 | } | 150 | } |
| 151 | err: | 151 | err: |
| 152 | if (bn_data != NULL) Free(bn_data); | 152 | if (bn_data != NULL) OPENSSL_free(bn_data); |
| 153 | if (t != NULL) BN_free(t); | 153 | if (t != NULL) BN_free(t); |
| 154 | return(buf); | 154 | return(buf); |
| 155 | } | 155 | } |
diff --git a/src/lib/libssl/src/crypto/bn/bn_rand.c b/src/lib/libssl/src/crypto/bn/bn_rand.c index 943712c15b..21ecbc04ed 100644 --- a/src/lib/libssl/src/crypto/bn/bn_rand.c +++ b/src/lib/libssl/src/crypto/bn/bn_rand.c | |||
| @@ -68,11 +68,17 @@ static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) | |||
| 68 | int ret=0,bit,bytes,mask; | 68 | int ret=0,bit,bytes,mask; |
| 69 | time_t tim; | 69 | time_t tim; |
| 70 | 70 | ||
| 71 | if (bits == 0) | ||
| 72 | { | ||
| 73 | BN_zero(rnd); | ||
| 74 | return 1; | ||
| 75 | } | ||
| 76 | |||
| 71 | bytes=(bits+7)/8; | 77 | bytes=(bits+7)/8; |
| 72 | bit=(bits-1)%8; | 78 | bit=(bits-1)%8; |
| 73 | mask=0xff<<bit; | 79 | mask=0xff<<bit; |
| 74 | 80 | ||
| 75 | buf=(unsigned char *)Malloc(bytes); | 81 | buf=(unsigned char *)OPENSSL_malloc(bytes); |
| 76 | if (buf == NULL) | 82 | if (buf == NULL) |
| 77 | { | 83 | { |
| 78 | BNerr(BN_F_BN_RAND,ERR_R_MALLOC_FAILURE); | 84 | BNerr(BN_F_BN_RAND,ERR_R_MALLOC_FAILURE); |
| @@ -120,7 +126,7 @@ err: | |||
| 120 | if (buf != NULL) | 126 | if (buf != NULL) |
| 121 | { | 127 | { |
| 122 | memset(buf,0,bytes); | 128 | memset(buf,0,bytes); |
| 123 | Free(buf); | 129 | OPENSSL_free(buf); |
| 124 | } | 130 | } |
| 125 | return(ret); | 131 | return(ret); |
| 126 | } | 132 | } |
diff --git a/src/lib/libssl/src/crypto/bn/bn_recp.c b/src/lib/libssl/src/crypto/bn/bn_recp.c index a8796bd0aa..d019941d6b 100644 --- a/src/lib/libssl/src/crypto/bn/bn_recp.c +++ b/src/lib/libssl/src/crypto/bn/bn_recp.c | |||
| @@ -72,7 +72,7 @@ BN_RECP_CTX *BN_RECP_CTX_new(void) | |||
| 72 | { | 72 | { |
| 73 | BN_RECP_CTX *ret; | 73 | BN_RECP_CTX *ret; |
| 74 | 74 | ||
| 75 | if ((ret=(BN_RECP_CTX *)Malloc(sizeof(BN_RECP_CTX))) == NULL) | 75 | if ((ret=(BN_RECP_CTX *)OPENSSL_malloc(sizeof(BN_RECP_CTX))) == NULL) |
| 76 | return(NULL); | 76 | return(NULL); |
| 77 | 77 | ||
| 78 | BN_RECP_CTX_init(ret); | 78 | BN_RECP_CTX_init(ret); |
| @@ -88,7 +88,7 @@ void BN_RECP_CTX_free(BN_RECP_CTX *recp) | |||
| 88 | BN_free(&(recp->N)); | 88 | BN_free(&(recp->N)); |
| 89 | BN_free(&(recp->Nr)); | 89 | BN_free(&(recp->Nr)); |
| 90 | if (recp->flags & BN_FLG_MALLOCED) | 90 | if (recp->flags & BN_FLG_MALLOCED) |
| 91 | Free(recp); | 91 | OPENSSL_free(recp); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx) | 94 | int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx) |
diff --git a/src/lib/libssl/src/crypto/bn/bn_shift.c b/src/lib/libssl/src/crypto/bn/bn_shift.c index 61aae65a6b..0883247384 100644 --- a/src/lib/libssl/src/crypto/bn/bn_shift.c +++ b/src/lib/libssl/src/crypto/bn/bn_shift.c | |||
| @@ -162,7 +162,7 @@ int BN_rshift(BIGNUM *r, BIGNUM *a, int n) | |||
| 162 | nw=n/BN_BITS2; | 162 | nw=n/BN_BITS2; |
| 163 | rb=n%BN_BITS2; | 163 | rb=n%BN_BITS2; |
| 164 | lb=BN_BITS2-rb; | 164 | lb=BN_BITS2-rb; |
| 165 | if (nw > a->top) | 165 | if (nw > a->top || a->top == 0) |
| 166 | { | 166 | { |
| 167 | BN_zero(r); | 167 | BN_zero(r); |
| 168 | return(1); | 168 | return(1); |
diff --git a/src/lib/libssl/src/crypto/bn/bn_sqr.c b/src/lib/libssl/src/crypto/bn/bn_sqr.c index fe00c5f69a..75f4f38392 100644 --- a/src/lib/libssl/src/crypto/bn/bn_sqr.c +++ b/src/lib/libssl/src/crypto/bn/bn_sqr.c | |||
| @@ -188,7 +188,7 @@ void bn_sqr_normal(BN_ULONG *r, BN_ULONG *a, int n, BN_ULONG *tmp) | |||
| 188 | 188 | ||
| 189 | #ifdef BN_RECURSION | 189 | #ifdef BN_RECURSION |
| 190 | /* r is 2*n words in size, | 190 | /* r is 2*n words in size, |
| 191 | * a and b are both n words in size. | 191 | * a and b are both n words in size. (There's not actually a 'b' here ...) |
| 192 | * n must be a power of 2. | 192 | * n must be a power of 2. |
| 193 | * We multiply and return the result. | 193 | * We multiply and return the result. |
| 194 | * t must be 2*n words in size | 194 | * t must be 2*n words in size |
diff --git a/src/lib/libssl/src/crypto/bn/bn_word.c b/src/lib/libssl/src/crypto/bn/bn_word.c index 73157a7d43..cd59baa2c4 100644 --- a/src/lib/libssl/src/crypto/bn/bn_word.c +++ b/src/lib/libssl/src/crypto/bn/bn_word.c | |||
| @@ -115,7 +115,7 @@ int BN_add_word(BIGNUM *a, BN_ULONG w) | |||
| 115 | a->neg=0; | 115 | a->neg=0; |
| 116 | i=BN_sub_word(a,w); | 116 | i=BN_sub_word(a,w); |
| 117 | if (!BN_is_zero(a)) | 117 | if (!BN_is_zero(a)) |
| 118 | a->neg=1; | 118 | a->neg=!(a->neg); |
| 119 | return(i); | 119 | return(i); |
| 120 | } | 120 | } |
| 121 | w&=BN_MASK2; | 121 | w&=BN_MASK2; |
| @@ -140,7 +140,7 @@ int BN_sub_word(BIGNUM *a, BN_ULONG w) | |||
| 140 | { | 140 | { |
| 141 | int i; | 141 | int i; |
| 142 | 142 | ||
| 143 | if (a->neg) | 143 | if (BN_is_zero(a) || a->neg) |
| 144 | { | 144 | { |
| 145 | a->neg=0; | 145 | a->neg=0; |
| 146 | i=BN_add_word(a,w); | 146 | i=BN_add_word(a,w); |
| @@ -182,11 +182,16 @@ int BN_mul_word(BIGNUM *a, BN_ULONG w) | |||
| 182 | w&=BN_MASK2; | 182 | w&=BN_MASK2; |
| 183 | if (a->top) | 183 | if (a->top) |
| 184 | { | 184 | { |
| 185 | ll=bn_mul_words(a->d,a->d,a->top,w); | 185 | if (w == 0) |
| 186 | if (ll) | 186 | BN_zero(a); |
| 187 | else | ||
| 187 | { | 188 | { |
| 188 | if (bn_wexpand(a,a->top+1) == NULL) return(0); | 189 | ll=bn_mul_words(a->d,a->d,a->top,w); |
| 189 | a->d[a->top++]=ll; | 190 | if (ll) |
| 191 | { | ||
| 192 | if (bn_wexpand(a,a->top+1) == NULL) return(0); | ||
| 193 | a->d[a->top++]=ll; | ||
| 194 | } | ||
| 190 | } | 195 | } |
| 191 | } | 196 | } |
| 192 | return(1); | 197 | return(1); |
diff --git a/src/lib/libssl/src/crypto/bn/vms-helper.c b/src/lib/libssl/src/crypto/bn/vms-helper.c index 73af337069..0fa79c4edb 100644 --- a/src/lib/libssl/src/crypto/bn/vms-helper.c +++ b/src/lib/libssl/src/crypto/bn/vms-helper.c | |||
| @@ -59,8 +59,10 @@ | |||
| 59 | 59 | ||
| 60 | bn_div_words_abort(int i) | 60 | bn_div_words_abort(int i) |
| 61 | { | 61 | { |
| 62 | #ifdef BN_DEBUG | ||
| 62 | #if !defined(NO_STDIO) && !defined(WIN16) | 63 | #if !defined(NO_STDIO) && !defined(WIN16) |
| 63 | fprintf(stderr,"Division would overflow (%d)\n",i); | 64 | fprintf(stderr,"Division would overflow (%d)\n",i); |
| 64 | #endif | 65 | #endif |
| 65 | abort(); | 66 | abort(); |
| 67 | #endif | ||
| 66 | } | 68 | } |
diff --git a/src/lib/libssl/src/crypto/buffer/Makefile.ssl b/src/lib/libssl/src/crypto/buffer/Makefile.ssl index 506708c37f..f473d1ab4b 100644 --- a/src/lib/libssl/src/crypto/buffer/Makefile.ssl +++ b/src/lib/libssl/src/crypto/buffer/Makefile.ssl | |||
| @@ -78,10 +78,15 @@ clean: | |||
| 78 | 78 | ||
| 79 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 79 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 80 | 80 | ||
| 81 | buf_err.o: ../../include/openssl/buffer.h ../../include/openssl/err.h | 81 | buf_err.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 82 | buf_err.o: ../../include/openssl/crypto.h ../../include/openssl/err.h | ||
| 83 | buf_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslv.h | ||
| 84 | buf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 85 | buf_err.o: ../../include/openssl/symhacks.h | ||
| 82 | buffer.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 86 | buffer.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 83 | buffer.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 87 | buffer.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 84 | buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 88 | buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 85 | buffer.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 89 | buffer.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 86 | buffer.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 90 | buffer.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 91 | buffer.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 87 | buffer.o: ../cryptlib.h | 92 | buffer.o: ../cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/buffer/buffer.c b/src/lib/libssl/src/crypto/buffer/buffer.c index c3a108ea52..b76ff3ad7a 100644 --- a/src/lib/libssl/src/crypto/buffer/buffer.c +++ b/src/lib/libssl/src/crypto/buffer/buffer.c | |||
| @@ -64,7 +64,7 @@ BUF_MEM *BUF_MEM_new(void) | |||
| 64 | { | 64 | { |
| 65 | BUF_MEM *ret; | 65 | BUF_MEM *ret; |
| 66 | 66 | ||
| 67 | ret=Malloc(sizeof(BUF_MEM)); | 67 | ret=OPENSSL_malloc(sizeof(BUF_MEM)); |
| 68 | if (ret == NULL) | 68 | if (ret == NULL) |
| 69 | { | 69 | { |
| 70 | BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE); | 70 | BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -84,9 +84,9 @@ void BUF_MEM_free(BUF_MEM *a) | |||
| 84 | if (a->data != NULL) | 84 | if (a->data != NULL) |
| 85 | { | 85 | { |
| 86 | memset(a->data,0,(unsigned int)a->max); | 86 | memset(a->data,0,(unsigned int)a->max); |
| 87 | Free(a->data); | 87 | OPENSSL_free(a->data); |
| 88 | } | 88 | } |
| 89 | Free(a); | 89 | OPENSSL_free(a); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | int BUF_MEM_grow(BUF_MEM *str, int len) | 92 | int BUF_MEM_grow(BUF_MEM *str, int len) |
| @@ -107,9 +107,9 @@ int BUF_MEM_grow(BUF_MEM *str, int len) | |||
| 107 | } | 107 | } |
| 108 | n=(len+3)/3*4; | 108 | n=(len+3)/3*4; |
| 109 | if (str->data == NULL) | 109 | if (str->data == NULL) |
| 110 | ret=Malloc(n); | 110 | ret=OPENSSL_malloc(n); |
| 111 | else | 111 | else |
| 112 | ret=Realloc(str->data,n); | 112 | ret=OPENSSL_realloc(str->data,n); |
| 113 | if (ret == NULL) | 113 | if (ret == NULL) |
| 114 | { | 114 | { |
| 115 | BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE); | 115 | BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE); |
| @@ -132,7 +132,7 @@ char *BUF_strdup(const char *str) | |||
| 132 | if (str == NULL) return(NULL); | 132 | if (str == NULL) return(NULL); |
| 133 | 133 | ||
| 134 | n=strlen(str); | 134 | n=strlen(str); |
| 135 | ret=Malloc(n+1); | 135 | ret=OPENSSL_malloc(n+1); |
| 136 | if (ret == NULL) | 136 | if (ret == NULL) |
| 137 | { | 137 | { |
| 138 | BUFerr(BUF_F_BUF_STRDUP,ERR_R_MALLOC_FAILURE); | 138 | BUFerr(BUF_F_BUF_STRDUP,ERR_R_MALLOC_FAILURE); |
diff --git a/src/lib/libssl/src/crypto/cast/c_skey.c b/src/lib/libssl/src/crypto/cast/c_skey.c index acf2c3eeb5..76e40005c9 100644 --- a/src/lib/libssl/src/crypto/cast/c_skey.c +++ b/src/lib/libssl/src/crypto/cast/c_skey.c | |||
| @@ -72,7 +72,7 @@ | |||
| 72 | #define S6 CAST_S_table6 | 72 | #define S6 CAST_S_table6 |
| 73 | #define S7 CAST_S_table7 | 73 | #define S7 CAST_S_table7 |
| 74 | 74 | ||
| 75 | void CAST_set_key(CAST_KEY *key, int len, unsigned char *data) | 75 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data) |
| 76 | { | 76 | { |
| 77 | CAST_LONG x[16]; | 77 | CAST_LONG x[16]; |
| 78 | CAST_LONG z[16]; | 78 | CAST_LONG z[16]; |
diff --git a/src/lib/libssl/src/crypto/cast/cast.h b/src/lib/libssl/src/crypto/cast/cast.h index 6cc5e8aa8c..e24e133099 100644 --- a/src/lib/libssl/src/crypto/cast/cast.h +++ b/src/lib/libssl/src/crypto/cast/cast.h | |||
| @@ -82,7 +82,7 @@ typedef struct cast_key_st | |||
| 82 | } CAST_KEY; | 82 | } CAST_KEY; |
| 83 | 83 | ||
| 84 | 84 | ||
| 85 | void CAST_set_key(CAST_KEY *key, int len, unsigned char *data); | 85 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); |
| 86 | void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key, | 86 | void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key, |
| 87 | int enc); | 87 | int enc); |
| 88 | void CAST_encrypt(CAST_LONG *data,CAST_KEY *key); | 88 | void CAST_encrypt(CAST_LONG *data,CAST_KEY *key); |
diff --git a/src/lib/libssl/src/crypto/comp/Makefile.ssl b/src/lib/libssl/src/crypto/comp/Makefile.ssl index 336864a995..39e7993416 100644 --- a/src/lib/libssl/src/crypto/comp/Makefile.ssl +++ b/src/lib/libssl/src/crypto/comp/Makefile.ssl | |||
| @@ -83,17 +83,19 @@ clean: | |||
| 83 | 83 | ||
| 84 | c_rle.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 84 | c_rle.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 85 | c_rle.o: ../../include/openssl/bn.h ../../include/openssl/comp.h | 85 | c_rle.o: ../../include/openssl/bn.h ../../include/openssl/comp.h |
| 86 | c_rle.o: ../../include/openssl/crypto.h ../../include/openssl/objects.h | 86 | c_rle.o: ../../include/openssl/crypto.h ../../include/openssl/obj_mac.h |
| 87 | c_rle.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 87 | c_rle.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 88 | c_rle.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 88 | c_rle.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 89 | c_rle.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 89 | c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 90 | c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 90 | c_zlib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h | 91 | c_zlib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h |
| 91 | c_zlib.o: ../../include/openssl/crypto.h ../../include/openssl/objects.h | 92 | c_zlib.o: ../../include/openssl/crypto.h ../../include/openssl/obj_mac.h |
| 92 | c_zlib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 93 | c_zlib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 93 | c_zlib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 94 | c_zlib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 95 | c_zlib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 94 | comp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 96 | comp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 95 | comp_lib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h | 97 | comp_lib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h |
| 96 | comp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/objects.h | 98 | comp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/obj_mac.h |
| 97 | comp_lib.o: ../../include/openssl/opensslconf.h | 99 | comp_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 98 | comp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 100 | comp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 99 | comp_lib.o: ../../include/openssl/stack.h | 101 | comp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
diff --git a/src/lib/libssl/src/crypto/comp/comp.h b/src/lib/libssl/src/crypto/comp/comp.h index 811cb5833d..0922609542 100644 --- a/src/lib/libssl/src/crypto/comp/comp.h +++ b/src/lib/libssl/src/crypto/comp/comp.h | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | #ifndef HEADER_COMP_H | 2 | #ifndef HEADER_COMP_H |
| 3 | #define HEADER_COMP_H | 3 | #define HEADER_COMP_H |
| 4 | 4 | ||
| 5 | #include <openssl/crypto.h> | ||
| 6 | |||
| 5 | #ifdef __cplusplus | 7 | #ifdef __cplusplus |
| 6 | extern "C" { | 8 | extern "C" { |
| 7 | #endif | 9 | #endif |
| 8 | 10 | ||
| 9 | #include <openssl/crypto.h> | ||
| 10 | |||
| 11 | typedef struct comp_method_st | 11 | typedef struct comp_method_st |
| 12 | { | 12 | { |
| 13 | int type; /* NID for compression library */ | 13 | int type; /* NID for compression library */ |
diff --git a/src/lib/libssl/src/crypto/comp/comp_lib.c b/src/lib/libssl/src/crypto/comp/comp_lib.c index a67ef23bc0..beb98ce8cc 100644 --- a/src/lib/libssl/src/crypto/comp/comp_lib.c +++ b/src/lib/libssl/src/crypto/comp/comp_lib.c | |||
| @@ -8,7 +8,7 @@ COMP_CTX *COMP_CTX_new(COMP_METHOD *meth) | |||
| 8 | { | 8 | { |
| 9 | COMP_CTX *ret; | 9 | COMP_CTX *ret; |
| 10 | 10 | ||
| 11 | if ((ret=(COMP_CTX *)Malloc(sizeof(COMP_CTX))) == NULL) | 11 | if ((ret=(COMP_CTX *)OPENSSL_malloc(sizeof(COMP_CTX))) == NULL) |
| 12 | { | 12 | { |
| 13 | /* ZZZZZZZZZZZZZZZZ */ | 13 | /* ZZZZZZZZZZZZZZZZ */ |
| 14 | return(NULL); | 14 | return(NULL); |
| @@ -17,7 +17,7 @@ COMP_CTX *COMP_CTX_new(COMP_METHOD *meth) | |||
| 17 | ret->meth=meth; | 17 | ret->meth=meth; |
| 18 | if ((ret->meth->init != NULL) && !ret->meth->init(ret)) | 18 | if ((ret->meth->init != NULL) && !ret->meth->init(ret)) |
| 19 | { | 19 | { |
| 20 | Free(ret); | 20 | OPENSSL_free(ret); |
| 21 | ret=NULL; | 21 | ret=NULL; |
| 22 | } | 22 | } |
| 23 | #if 0 | 23 | #if 0 |
| @@ -37,7 +37,7 @@ void COMP_CTX_free(COMP_CTX *ctx) | |||
| 37 | if (ctx->meth->finish != NULL) | 37 | if (ctx->meth->finish != NULL) |
| 38 | ctx->meth->finish(ctx); | 38 | ctx->meth->finish(ctx); |
| 39 | 39 | ||
| 40 | Free(ctx); | 40 | OPENSSL_free(ctx); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, | 43 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, |
diff --git a/src/lib/libssl/src/crypto/conf/Makefile.ssl b/src/lib/libssl/src/crypto/conf/Makefile.ssl index 9dbb2b276a..efbb578981 100644 --- a/src/lib/libssl/src/crypto/conf/Makefile.ssl +++ b/src/lib/libssl/src/crypto/conf/Makefile.ssl | |||
| @@ -22,14 +22,14 @@ TEST= | |||
| 22 | APPS= | 22 | APPS= |
| 23 | 23 | ||
| 24 | LIB=$(TOP)/libcrypto.a | 24 | LIB=$(TOP)/libcrypto.a |
| 25 | LIBSRC= conf.c conf_err.c | 25 | LIBSRC= conf_err.c conf_lib.c conf_api.c conf_def.c |
| 26 | 26 | ||
| 27 | LIBOBJ= conf.o conf_err.o | 27 | LIBOBJ= conf_err.o conf_lib.o conf_api.o conf_def.o |
| 28 | 28 | ||
| 29 | SRC= $(LIBSRC) | 29 | SRC= $(LIBSRC) |
| 30 | 30 | ||
| 31 | EXHEADER= conf.h | 31 | EXHEADER= conf.h conf_api.h |
| 32 | HEADER= conf_lcl.h $(EXHEADER) | 32 | HEADER= conf_def.h $(EXHEADER) |
| 33 | 33 | ||
| 34 | ALL= $(GENERAL) $(SRC) $(HEADER) | 34 | ALL= $(GENERAL) $(SRC) $(HEADER) |
| 35 | 35 | ||
| @@ -79,14 +79,30 @@ clean: | |||
| 79 | 79 | ||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 81 | 81 | ||
| 82 | conf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 82 | conf_api.o: ../../include/openssl/bio.h ../../include/openssl/conf.h |
| 83 | conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 83 | conf_api.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h |
| 84 | conf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 84 | conf_api.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 85 | conf.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 85 | conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 86 | conf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 86 | conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 87 | conf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 87 | conf_api.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 88 | conf.o: ../cryptlib.h conf_lcl.h | 88 | conf_def.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 89 | conf_def.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h | ||
| 90 | conf_def.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | ||
| 91 | conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 92 | conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 93 | conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
| 94 | conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 95 | conf_def.o: conf_def.h | ||
| 89 | conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h | 96 | conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h |
| 90 | conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/err.h | 97 | conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 91 | conf_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslv.h | 98 | conf_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 92 | conf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 99 | conf_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 100 | conf_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
| 101 | conf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 102 | conf_lib.o: ../../include/openssl/bio.h ../../include/openssl/conf.h | ||
| 103 | conf_lib.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h | ||
| 104 | conf_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 105 | conf_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 106 | conf_lib.o: ../../include/openssl/opensslconf.h | ||
| 107 | conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
| 108 | conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf.c b/src/lib/libssl/src/crypto/conf/conf.c index 3031fa3b44..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/conf/conf.c +++ b/src/lib/libssl/src/crypto/conf/conf.c | |||
| @@ -1,730 +0,0 @@ | |||
| 1 | /* crypto/conf/conf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <errno.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/stack.h> | ||
| 63 | #include <openssl/lhash.h> | ||
| 64 | #include <openssl/conf.h> | ||
| 65 | #include <openssl/buffer.h> | ||
| 66 | #include <openssl/err.h> | ||
| 67 | |||
| 68 | #include "conf_lcl.h" | ||
| 69 | |||
| 70 | static void value_free_hash(CONF_VALUE *a, LHASH *conf); | ||
| 71 | static void value_free_stack(CONF_VALUE *a,LHASH *conf); | ||
| 72 | static unsigned long hash(CONF_VALUE *v); | ||
| 73 | static int cmp_conf(CONF_VALUE *a,CONF_VALUE *b); | ||
| 74 | static char *eat_ws(char *p); | ||
| 75 | static char *eat_alpha_numeric(char *p); | ||
| 76 | static void clear_comments(char *p); | ||
| 77 | static int str_copy(LHASH *conf,char *section,char **to, char *from); | ||
| 78 | static char *scan_quote(char *p); | ||
| 79 | static CONF_VALUE *new_section(LHASH *conf,char *section); | ||
| 80 | static CONF_VALUE *get_section(LHASH *conf,char *section); | ||
| 81 | #define scan_esc(p) ((((p)[1] == '\0')?(p++):(p+=2)),p) | ||
| 82 | |||
| 83 | const char *CONF_version="CONF" OPENSSL_VERSION_PTEXT; | ||
| 84 | |||
| 85 | |||
| 86 | LHASH *CONF_load(LHASH *h, const char *file, long *line) | ||
| 87 | { | ||
| 88 | LHASH *ltmp; | ||
| 89 | BIO *in=NULL; | ||
| 90 | |||
| 91 | #ifdef VMS | ||
| 92 | in=BIO_new_file(file, "r"); | ||
| 93 | #else | ||
| 94 | in=BIO_new_file(file, "rb"); | ||
| 95 | #endif | ||
| 96 | if (in == NULL) | ||
| 97 | { | ||
| 98 | CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); | ||
| 99 | return NULL; | ||
| 100 | } | ||
| 101 | |||
| 102 | ltmp = CONF_load_bio(h, in, line); | ||
| 103 | BIO_free(in); | ||
| 104 | |||
| 105 | return ltmp; | ||
| 106 | } | ||
| 107 | #ifndef NO_FP_API | ||
| 108 | LHASH *CONF_load_fp(LHASH *h, FILE *in, long *line) | ||
| 109 | { | ||
| 110 | BIO *btmp; | ||
| 111 | LHASH *ltmp; | ||
| 112 | if(!(btmp = BIO_new_fp(in, BIO_NOCLOSE))) { | ||
| 113 | CONFerr(CONF_F_CONF_LOAD_FP,ERR_R_BUF_LIB); | ||
| 114 | return NULL; | ||
| 115 | } | ||
| 116 | ltmp = CONF_load_bio(h, btmp, line); | ||
| 117 | BIO_free(btmp); | ||
| 118 | return ltmp; | ||
| 119 | } | ||
| 120 | #endif | ||
| 121 | |||
| 122 | LHASH *CONF_load_bio(LHASH *h, BIO *in, long *line) | ||
| 123 | { | ||
| 124 | LHASH *ret=NULL; | ||
| 125 | #define BUFSIZE 512 | ||
| 126 | char btmp[16]; | ||
| 127 | int bufnum=0,i,ii; | ||
| 128 | BUF_MEM *buff=NULL; | ||
| 129 | char *s,*p,*end; | ||
| 130 | int again,n; | ||
| 131 | long eline=0; | ||
| 132 | CONF_VALUE *v=NULL,*vv,*tv; | ||
| 133 | CONF_VALUE *sv=NULL; | ||
| 134 | char *section=NULL,*buf; | ||
| 135 | STACK_OF(CONF_VALUE) *section_sk=NULL,*ts; | ||
| 136 | char *start,*psection,*pname; | ||
| 137 | |||
| 138 | if ((buff=BUF_MEM_new()) == NULL) | ||
| 139 | { | ||
| 140 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); | ||
| 141 | goto err; | ||
| 142 | } | ||
| 143 | |||
| 144 | section=(char *)Malloc(10); | ||
| 145 | if (section == NULL) | ||
| 146 | { | ||
| 147 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | ||
| 148 | goto err; | ||
| 149 | } | ||
| 150 | strcpy(section,"default"); | ||
| 151 | |||
| 152 | if (h == NULL) | ||
| 153 | { | ||
| 154 | if ((ret=lh_new(hash,cmp_conf)) == NULL) | ||
| 155 | { | ||
| 156 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | ||
| 157 | goto err; | ||
| 158 | } | ||
| 159 | } | ||
| 160 | else | ||
| 161 | ret=h; | ||
| 162 | |||
| 163 | sv=new_section(ret,section); | ||
| 164 | if (sv == NULL) | ||
| 165 | { | ||
| 166 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 167 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 168 | goto err; | ||
| 169 | } | ||
| 170 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 171 | |||
| 172 | bufnum=0; | ||
| 173 | for (;;) | ||
| 174 | { | ||
| 175 | again=0; | ||
| 176 | if (!BUF_MEM_grow(buff,bufnum+BUFSIZE)) | ||
| 177 | { | ||
| 178 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); | ||
| 179 | goto err; | ||
| 180 | } | ||
| 181 | p= &(buff->data[bufnum]); | ||
| 182 | *p='\0'; | ||
| 183 | BIO_gets(in, p, BUFSIZE-1); | ||
| 184 | p[BUFSIZE-1]='\0'; | ||
| 185 | ii=i=strlen(p); | ||
| 186 | if (i == 0) break; | ||
| 187 | while (i > 0) | ||
| 188 | { | ||
| 189 | if ((p[i-1] != '\r') && (p[i-1] != '\n')) | ||
| 190 | break; | ||
| 191 | else | ||
| 192 | i--; | ||
| 193 | } | ||
| 194 | /* we removed some trailing stuff so there is a new | ||
| 195 | * line on the end. */ | ||
| 196 | if (i == ii) | ||
| 197 | again=1; /* long line */ | ||
| 198 | else | ||
| 199 | { | ||
| 200 | p[i]='\0'; | ||
| 201 | eline++; /* another input line */ | ||
| 202 | } | ||
| 203 | |||
| 204 | /* we now have a line with trailing \r\n removed */ | ||
| 205 | |||
| 206 | /* i is the number of bytes */ | ||
| 207 | bufnum+=i; | ||
| 208 | |||
| 209 | v=NULL; | ||
| 210 | /* check for line continuation */ | ||
| 211 | if (bufnum >= 1) | ||
| 212 | { | ||
| 213 | /* If we have bytes and the last char '\\' and | ||
| 214 | * second last char is not '\\' */ | ||
| 215 | p= &(buff->data[bufnum-1]); | ||
| 216 | if ( IS_ESC(p[0]) && | ||
| 217 | ((bufnum <= 1) || !IS_ESC(p[-1]))) | ||
| 218 | { | ||
| 219 | bufnum--; | ||
| 220 | again=1; | ||
| 221 | } | ||
| 222 | } | ||
| 223 | if (again) continue; | ||
| 224 | bufnum=0; | ||
| 225 | buf=buff->data; | ||
| 226 | |||
| 227 | clear_comments(buf); | ||
| 228 | n=strlen(buf); | ||
| 229 | s=eat_ws(buf); | ||
| 230 | if (IS_EOF(*s)) continue; /* blank line */ | ||
| 231 | if (*s == '[') | ||
| 232 | { | ||
| 233 | char *ss; | ||
| 234 | |||
| 235 | s++; | ||
| 236 | start=eat_ws(s); | ||
| 237 | ss=start; | ||
| 238 | again: | ||
| 239 | end=eat_alpha_numeric(ss); | ||
| 240 | p=eat_ws(end); | ||
| 241 | if (*p != ']') | ||
| 242 | { | ||
| 243 | if (*p != '\0') | ||
| 244 | { | ||
| 245 | ss=p; | ||
| 246 | goto again; | ||
| 247 | } | ||
| 248 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 249 | CONF_R_MISSING_CLOSE_SQUARE_BRACKET); | ||
| 250 | goto err; | ||
| 251 | } | ||
| 252 | *end='\0'; | ||
| 253 | if (!str_copy(ret,NULL,§ion,start)) goto err; | ||
| 254 | if ((sv=get_section(ret,section)) == NULL) | ||
| 255 | sv=new_section(ret,section); | ||
| 256 | if (sv == NULL) | ||
| 257 | { | ||
| 258 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 259 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 260 | goto err; | ||
| 261 | } | ||
| 262 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 263 | continue; | ||
| 264 | } | ||
| 265 | else | ||
| 266 | { | ||
| 267 | pname=s; | ||
| 268 | psection=NULL; | ||
| 269 | end=eat_alpha_numeric(s); | ||
| 270 | if ((end[0] == ':') && (end[1] == ':')) | ||
| 271 | { | ||
| 272 | *end='\0'; | ||
| 273 | end+=2; | ||
| 274 | psection=pname; | ||
| 275 | pname=end; | ||
| 276 | end=eat_alpha_numeric(end); | ||
| 277 | } | ||
| 278 | p=eat_ws(end); | ||
| 279 | if (*p != '=') | ||
| 280 | { | ||
| 281 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 282 | CONF_R_MISSING_EQUAL_SIGN); | ||
| 283 | goto err; | ||
| 284 | } | ||
| 285 | *end='\0'; | ||
| 286 | p++; | ||
| 287 | start=eat_ws(p); | ||
| 288 | while (!IS_EOF(*p)) | ||
| 289 | p++; | ||
| 290 | p--; | ||
| 291 | while ((p != start) && (IS_WS(*p))) | ||
| 292 | p--; | ||
| 293 | p++; | ||
| 294 | *p='\0'; | ||
| 295 | |||
| 296 | if (!(v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE)))) | ||
| 297 | { | ||
| 298 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 299 | ERR_R_MALLOC_FAILURE); | ||
| 300 | goto err; | ||
| 301 | } | ||
| 302 | if (psection == NULL) psection=section; | ||
| 303 | v->name=(char *)Malloc(strlen(pname)+1); | ||
| 304 | v->value=NULL; | ||
| 305 | if (v->name == NULL) | ||
| 306 | { | ||
| 307 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 308 | ERR_R_MALLOC_FAILURE); | ||
| 309 | goto err; | ||
| 310 | } | ||
| 311 | strcpy(v->name,pname); | ||
| 312 | if (!str_copy(ret,psection,&(v->value),start)) goto err; | ||
| 313 | |||
| 314 | if (strcmp(psection,section) != 0) | ||
| 315 | { | ||
| 316 | if ((tv=get_section(ret,psection)) | ||
| 317 | == NULL) | ||
| 318 | tv=new_section(ret,psection); | ||
| 319 | if (tv == NULL) | ||
| 320 | { | ||
| 321 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 322 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 323 | goto err; | ||
| 324 | } | ||
| 325 | ts=(STACK_OF(CONF_VALUE) *)tv->value; | ||
| 326 | } | ||
| 327 | else | ||
| 328 | { | ||
| 329 | tv=sv; | ||
| 330 | ts=section_sk; | ||
| 331 | } | ||
| 332 | v->section=tv->section; | ||
| 333 | if (!sk_CONF_VALUE_push(ts,v)) | ||
| 334 | { | ||
| 335 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 336 | ERR_R_MALLOC_FAILURE); | ||
| 337 | goto err; | ||
| 338 | } | ||
| 339 | vv=(CONF_VALUE *)lh_insert(ret,v); | ||
| 340 | if (vv != NULL) | ||
| 341 | { | ||
| 342 | sk_CONF_VALUE_delete_ptr(ts,vv); | ||
| 343 | Free(vv->name); | ||
| 344 | Free(vv->value); | ||
| 345 | Free(vv); | ||
| 346 | } | ||
| 347 | v=NULL; | ||
| 348 | } | ||
| 349 | } | ||
| 350 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 351 | if (section != NULL) Free(section); | ||
| 352 | return(ret); | ||
| 353 | err: | ||
| 354 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 355 | if (section != NULL) Free(section); | ||
| 356 | if (line != NULL) *line=eline; | ||
| 357 | sprintf(btmp,"%ld",eline); | ||
| 358 | ERR_add_error_data(2,"line ",btmp); | ||
| 359 | if ((h != ret) && (ret != NULL)) CONF_free(ret); | ||
| 360 | if (v != NULL) | ||
| 361 | { | ||
| 362 | if (v->name != NULL) Free(v->name); | ||
| 363 | if (v->value != NULL) Free(v->value); | ||
| 364 | if (v != NULL) Free(v); | ||
| 365 | } | ||
| 366 | return(NULL); | ||
| 367 | } | ||
| 368 | |||
| 369 | char *CONF_get_string(LHASH *conf, char *section, char *name) | ||
| 370 | { | ||
| 371 | CONF_VALUE *v,vv; | ||
| 372 | char *p; | ||
| 373 | |||
| 374 | if (name == NULL) return(NULL); | ||
| 375 | if (conf != NULL) | ||
| 376 | { | ||
| 377 | if (section != NULL) | ||
| 378 | { | ||
| 379 | vv.name=name; | ||
| 380 | vv.section=section; | ||
| 381 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 382 | if (v != NULL) return(v->value); | ||
| 383 | if (strcmp(section,"ENV") == 0) | ||
| 384 | { | ||
| 385 | p=Getenv(name); | ||
| 386 | if (p != NULL) return(p); | ||
| 387 | } | ||
| 388 | } | ||
| 389 | vv.section="default"; | ||
| 390 | vv.name=name; | ||
| 391 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 392 | if (v != NULL) | ||
| 393 | return(v->value); | ||
| 394 | else | ||
| 395 | return(NULL); | ||
| 396 | } | ||
| 397 | else | ||
| 398 | return(Getenv(name)); | ||
| 399 | } | ||
| 400 | |||
| 401 | static CONF_VALUE *get_section(LHASH *conf, char *section) | ||
| 402 | { | ||
| 403 | CONF_VALUE *v,vv; | ||
| 404 | |||
| 405 | if ((conf == NULL) || (section == NULL)) return(NULL); | ||
| 406 | vv.name=NULL; | ||
| 407 | vv.section=section; | ||
| 408 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 409 | return(v); | ||
| 410 | } | ||
| 411 | |||
| 412 | STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf, char *section) | ||
| 413 | { | ||
| 414 | CONF_VALUE *v; | ||
| 415 | |||
| 416 | v=get_section(conf,section); | ||
| 417 | if (v != NULL) | ||
| 418 | return((STACK_OF(CONF_VALUE) *)v->value); | ||
| 419 | else | ||
| 420 | return(NULL); | ||
| 421 | } | ||
| 422 | |||
| 423 | long CONF_get_number(LHASH *conf, char *section, char *name) | ||
| 424 | { | ||
| 425 | char *str; | ||
| 426 | long ret=0; | ||
| 427 | |||
| 428 | str=CONF_get_string(conf,section,name); | ||
| 429 | if (str == NULL) return(0); | ||
| 430 | for (;;) | ||
| 431 | { | ||
| 432 | if (IS_NUMER(*str)) | ||
| 433 | ret=ret*10+(*str -'0'); | ||
| 434 | else | ||
| 435 | return(ret); | ||
| 436 | str++; | ||
| 437 | } | ||
| 438 | } | ||
| 439 | |||
| 440 | void CONF_free(LHASH *conf) | ||
| 441 | { | ||
| 442 | if (conf == NULL) return; | ||
| 443 | |||
| 444 | conf->down_load=0; /* evil thing to make sure the 'Free()' | ||
| 445 | * works as expected */ | ||
| 446 | lh_doall_arg(conf,(void (*)())value_free_hash,conf); | ||
| 447 | |||
| 448 | /* We now have only 'section' entries in the hash table. | ||
| 449 | * Due to problems with */ | ||
| 450 | |||
| 451 | lh_doall_arg(conf,(void (*)())value_free_stack,conf); | ||
| 452 | lh_free(conf); | ||
| 453 | } | ||
| 454 | |||
| 455 | static void value_free_hash(CONF_VALUE *a, LHASH *conf) | ||
| 456 | { | ||
| 457 | if (a->name != NULL) | ||
| 458 | { | ||
| 459 | a=(CONF_VALUE *)lh_delete(conf,a); | ||
| 460 | } | ||
| 461 | } | ||
| 462 | |||
| 463 | static void value_free_stack(CONF_VALUE *a, LHASH *conf) | ||
| 464 | { | ||
| 465 | CONF_VALUE *vv; | ||
| 466 | STACK *sk; | ||
| 467 | int i; | ||
| 468 | |||
| 469 | if (a->name != NULL) return; | ||
| 470 | |||
| 471 | sk=(STACK *)a->value; | ||
| 472 | for (i=sk_num(sk)-1; i>=0; i--) | ||
| 473 | { | ||
| 474 | vv=(CONF_VALUE *)sk_value(sk,i); | ||
| 475 | Free(vv->value); | ||
| 476 | Free(vv->name); | ||
| 477 | Free(vv); | ||
| 478 | } | ||
| 479 | if (sk != NULL) sk_free(sk); | ||
| 480 | Free(a->section); | ||
| 481 | Free(a); | ||
| 482 | } | ||
| 483 | |||
| 484 | static void clear_comments(char *p) | ||
| 485 | { | ||
| 486 | char *to; | ||
| 487 | |||
| 488 | to=p; | ||
| 489 | for (;;) | ||
| 490 | { | ||
| 491 | if (IS_COMMENT(*p)) | ||
| 492 | { | ||
| 493 | *p='\0'; | ||
| 494 | return; | ||
| 495 | } | ||
| 496 | if (IS_QUOTE(*p)) | ||
| 497 | { | ||
| 498 | p=scan_quote(p); | ||
| 499 | continue; | ||
| 500 | } | ||
| 501 | if (IS_ESC(*p)) | ||
| 502 | { | ||
| 503 | p=scan_esc(p); | ||
| 504 | continue; | ||
| 505 | } | ||
| 506 | if (IS_EOF(*p)) | ||
| 507 | return; | ||
| 508 | else | ||
| 509 | p++; | ||
| 510 | } | ||
| 511 | } | ||
| 512 | |||
| 513 | static int str_copy(LHASH *conf, char *section, char **pto, char *from) | ||
| 514 | { | ||
| 515 | int q,r,rr=0,to=0,len=0; | ||
| 516 | char *s,*e,*rp,*p,*rrp,*np,*cp,v; | ||
| 517 | BUF_MEM *buf; | ||
| 518 | |||
| 519 | if ((buf=BUF_MEM_new()) == NULL) return(0); | ||
| 520 | |||
| 521 | len=strlen(from)+1; | ||
| 522 | if (!BUF_MEM_grow(buf,len)) goto err; | ||
| 523 | |||
| 524 | for (;;) | ||
| 525 | { | ||
| 526 | if (IS_QUOTE(*from)) | ||
| 527 | { | ||
| 528 | q= *from; | ||
| 529 | from++; | ||
| 530 | while ((*from != '\0') && (*from != q)) | ||
| 531 | { | ||
| 532 | if (*from == '\\') | ||
| 533 | { | ||
| 534 | from++; | ||
| 535 | if (*from == '\0') break; | ||
| 536 | } | ||
| 537 | buf->data[to++]= *(from++); | ||
| 538 | } | ||
| 539 | } | ||
| 540 | else if (*from == '\\') | ||
| 541 | { | ||
| 542 | from++; | ||
| 543 | v= *(from++); | ||
| 544 | if (v == '\0') break; | ||
| 545 | else if (v == 'r') v='\r'; | ||
| 546 | else if (v == 'n') v='\n'; | ||
| 547 | else if (v == 'b') v='\b'; | ||
| 548 | else if (v == 't') v='\t'; | ||
| 549 | buf->data[to++]= v; | ||
| 550 | } | ||
| 551 | else if (*from == '\0') | ||
| 552 | break; | ||
| 553 | else if (*from == '$') | ||
| 554 | { | ||
| 555 | /* try to expand it */ | ||
| 556 | rrp=NULL; | ||
| 557 | s= &(from[1]); | ||
| 558 | if (*s == '{') | ||
| 559 | q='}'; | ||
| 560 | else if (*s == '(') | ||
| 561 | q=')'; | ||
| 562 | else q=0; | ||
| 563 | |||
| 564 | if (q) s++; | ||
| 565 | cp=section; | ||
| 566 | e=np=s; | ||
| 567 | while (IS_ALPHA_NUMERIC(*e)) | ||
| 568 | e++; | ||
| 569 | if ((e[0] == ':') && (e[1] == ':')) | ||
| 570 | { | ||
| 571 | cp=np; | ||
| 572 | rrp=e; | ||
| 573 | rr= *e; | ||
| 574 | *rrp='\0'; | ||
| 575 | e+=2; | ||
| 576 | np=e; | ||
| 577 | while (IS_ALPHA_NUMERIC(*e)) | ||
| 578 | e++; | ||
| 579 | } | ||
| 580 | r= *e; | ||
| 581 | *e='\0'; | ||
| 582 | rp=e; | ||
| 583 | if (q) | ||
| 584 | { | ||
| 585 | if (r != q) | ||
| 586 | { | ||
| 587 | CONFerr(CONF_F_STR_COPY,CONF_R_NO_CLOSE_BRACE); | ||
| 588 | goto err; | ||
| 589 | } | ||
| 590 | e++; | ||
| 591 | } | ||
| 592 | /* So at this point we have | ||
| 593 | * ns which is the start of the name string which is | ||
| 594 | * '\0' terminated. | ||
| 595 | * cs which is the start of the section string which is | ||
| 596 | * '\0' terminated. | ||
| 597 | * e is the 'next point after'. | ||
| 598 | * r and s are the chars replaced by the '\0' | ||
| 599 | * rp and sp is where 'r' and 's' came from. | ||
| 600 | */ | ||
| 601 | p=CONF_get_string(conf,cp,np); | ||
| 602 | if (rrp != NULL) *rrp=rr; | ||
| 603 | *rp=r; | ||
| 604 | if (p == NULL) | ||
| 605 | { | ||
| 606 | CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE); | ||
| 607 | goto err; | ||
| 608 | } | ||
| 609 | BUF_MEM_grow(buf,(strlen(p)+len-(e-from))); | ||
| 610 | while (*p) | ||
| 611 | buf->data[to++]= *(p++); | ||
| 612 | from=e; | ||
| 613 | } | ||
| 614 | else | ||
| 615 | buf->data[to++]= *(from++); | ||
| 616 | } | ||
| 617 | buf->data[to]='\0'; | ||
| 618 | if (*pto != NULL) Free(*pto); | ||
| 619 | *pto=buf->data; | ||
| 620 | Free(buf); | ||
| 621 | return(1); | ||
| 622 | err: | ||
| 623 | if (buf != NULL) BUF_MEM_free(buf); | ||
| 624 | return(0); | ||
| 625 | } | ||
| 626 | |||
| 627 | static char *eat_ws(char *p) | ||
| 628 | { | ||
| 629 | while (IS_WS(*p) && (!IS_EOF(*p))) | ||
| 630 | p++; | ||
| 631 | return(p); | ||
| 632 | } | ||
| 633 | |||
| 634 | static char *eat_alpha_numeric(char *p) | ||
| 635 | { | ||
| 636 | for (;;) | ||
| 637 | { | ||
| 638 | if (IS_ESC(*p)) | ||
| 639 | { | ||
| 640 | p=scan_esc(p); | ||
| 641 | continue; | ||
| 642 | } | ||
| 643 | if (!IS_ALPHA_NUMERIC_PUNCT(*p)) | ||
| 644 | return(p); | ||
| 645 | p++; | ||
| 646 | } | ||
| 647 | } | ||
| 648 | |||
| 649 | static unsigned long hash(CONF_VALUE *v) | ||
| 650 | { | ||
| 651 | return((lh_strhash(v->section)<<2)^lh_strhash(v->name)); | ||
| 652 | } | ||
| 653 | |||
| 654 | static int cmp_conf(CONF_VALUE *a, CONF_VALUE *b) | ||
| 655 | { | ||
| 656 | int i; | ||
| 657 | |||
| 658 | if (a->section != b->section) | ||
| 659 | { | ||
| 660 | i=strcmp(a->section,b->section); | ||
| 661 | if (i) return(i); | ||
| 662 | } | ||
| 663 | |||
| 664 | if ((a->name != NULL) && (b->name != NULL)) | ||
| 665 | { | ||
| 666 | i=strcmp(a->name,b->name); | ||
| 667 | return(i); | ||
| 668 | } | ||
| 669 | else if (a->name == b->name) | ||
| 670 | return(0); | ||
| 671 | else | ||
| 672 | return((a->name == NULL)?-1:1); | ||
| 673 | } | ||
| 674 | |||
| 675 | static char *scan_quote(char *p) | ||
| 676 | { | ||
| 677 | int q= *p; | ||
| 678 | |||
| 679 | p++; | ||
| 680 | while (!(IS_EOF(*p)) && (*p != q)) | ||
| 681 | { | ||
| 682 | if (IS_ESC(*p)) | ||
| 683 | { | ||
| 684 | p++; | ||
| 685 | if (IS_EOF(*p)) return(p); | ||
| 686 | } | ||
| 687 | p++; | ||
| 688 | } | ||
| 689 | if (*p == q) p++; | ||
| 690 | return(p); | ||
| 691 | } | ||
| 692 | |||
| 693 | static CONF_VALUE *new_section(LHASH *conf, char *section) | ||
| 694 | { | ||
| 695 | STACK *sk=NULL; | ||
| 696 | int ok=0,i; | ||
| 697 | CONF_VALUE *v=NULL,*vv; | ||
| 698 | |||
| 699 | if ((sk=sk_new_null()) == NULL) | ||
| 700 | goto err; | ||
| 701 | if ((v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE))) == NULL) | ||
| 702 | goto err; | ||
| 703 | i=strlen(section)+1; | ||
| 704 | if ((v->section=(char *)Malloc(i)) == NULL) | ||
| 705 | goto err; | ||
| 706 | |||
| 707 | memcpy(v->section,section,i); | ||
| 708 | v->name=NULL; | ||
| 709 | v->value=(char *)sk; | ||
| 710 | |||
| 711 | vv=(CONF_VALUE *)lh_insert(conf,v); | ||
| 712 | if (vv != NULL) | ||
| 713 | { | ||
| 714 | #if !defined(NO_STDIO) && !defined(WIN16) | ||
| 715 | fprintf(stderr,"internal fault\n"); | ||
| 716 | #endif | ||
| 717 | abort(); | ||
| 718 | } | ||
| 719 | ok=1; | ||
| 720 | err: | ||
| 721 | if (!ok) | ||
| 722 | { | ||
| 723 | if (sk != NULL) sk_free(sk); | ||
| 724 | if (v != NULL) Free(v); | ||
| 725 | v=NULL; | ||
| 726 | } | ||
| 727 | return(v); | ||
| 728 | } | ||
| 729 | |||
| 730 | IMPLEMENT_STACK_OF(CONF_VALUE) | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf.h b/src/lib/libssl/src/crypto/conf/conf.h index 21831a92a3..2f70634455 100644 --- a/src/lib/libssl/src/crypto/conf/conf.h +++ b/src/lib/libssl/src/crypto/conf/conf.h | |||
| @@ -59,14 +59,15 @@ | |||
| 59 | #ifndef HEADER_CONF_H | 59 | #ifndef HEADER_CONF_H |
| 60 | #define HEADER_CONF_H | 60 | #define HEADER_CONF_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
| 67 | #include <openssl/lhash.h> | 63 | #include <openssl/lhash.h> |
| 68 | #include <openssl/stack.h> | 64 | #include <openssl/stack.h> |
| 69 | #include <openssl/safestack.h> | 65 | #include <openssl/safestack.h> |
| 66 | #include <openssl/e_os.h> | ||
| 67 | |||
| 68 | #ifdef __cplusplus | ||
| 69 | extern "C" { | ||
| 70 | #endif | ||
| 70 | 71 | ||
| 71 | typedef struct | 72 | typedef struct |
| 72 | { | 73 | { |
| @@ -77,6 +78,25 @@ typedef struct | |||
| 77 | 78 | ||
| 78 | DECLARE_STACK_OF(CONF_VALUE) | 79 | DECLARE_STACK_OF(CONF_VALUE) |
| 79 | 80 | ||
| 81 | struct conf_st; | ||
| 82 | typedef struct conf_st CONF; | ||
| 83 | struct conf_method_st; | ||
| 84 | typedef struct conf_method_st CONF_METHOD; | ||
| 85 | |||
| 86 | struct conf_method_st | ||
| 87 | { | ||
| 88 | const char *name; | ||
| 89 | CONF *(MS_FAR *create)(CONF_METHOD *meth); | ||
| 90 | int (MS_FAR *init)(CONF *conf); | ||
| 91 | int (MS_FAR *destroy)(CONF *conf); | ||
| 92 | int (MS_FAR *destroy_data)(CONF *conf); | ||
| 93 | int (MS_FAR *load)(CONF *conf, BIO *bp, long *eline); | ||
| 94 | int (MS_FAR *dump)(CONF *conf, BIO *bp); | ||
| 95 | int (MS_FAR *is_number)(CONF *conf, char c); | ||
| 96 | int (MS_FAR *to_int)(CONF *conf, char c); | ||
| 97 | }; | ||
| 98 | |||
| 99 | int CONF_set_default_method(CONF_METHOD *meth); | ||
| 80 | LHASH *CONF_load(LHASH *conf,const char *file,long *eline); | 100 | LHASH *CONF_load(LHASH *conf,const char *file,long *eline); |
| 81 | #ifndef NO_FP_API | 101 | #ifndef NO_FP_API |
| 82 | LHASH *CONF_load_fp(LHASH *conf, FILE *fp,long *eline); | 102 | LHASH *CONF_load_fp(LHASH *conf, FILE *fp,long *eline); |
| @@ -86,8 +106,40 @@ STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf,char *section); | |||
| 86 | char *CONF_get_string(LHASH *conf,char *group,char *name); | 106 | char *CONF_get_string(LHASH *conf,char *group,char *name); |
| 87 | long CONF_get_number(LHASH *conf,char *group,char *name); | 107 | long CONF_get_number(LHASH *conf,char *group,char *name); |
| 88 | void CONF_free(LHASH *conf); | 108 | void CONF_free(LHASH *conf); |
| 109 | int CONF_dump_fp(LHASH *conf, FILE *out); | ||
| 110 | int CONF_dump_bio(LHASH *conf, BIO *out); | ||
| 89 | void ERR_load_CONF_strings(void ); | 111 | void ERR_load_CONF_strings(void ); |
| 90 | 112 | ||
| 113 | /* New conf code. The semantics are different from the functions above. | ||
| 114 | If that wasn't the case, the above functions would have been replaced */ | ||
| 115 | |||
| 116 | struct conf_st | ||
| 117 | { | ||
| 118 | CONF_METHOD *meth; | ||
| 119 | void *meth_data; | ||
| 120 | LHASH *data; | ||
| 121 | }; | ||
| 122 | |||
| 123 | CONF *NCONF_new(CONF_METHOD *meth); | ||
| 124 | CONF_METHOD *NCONF_default(); | ||
| 125 | CONF_METHOD *NCONF_WIN32(); | ||
| 126 | #if 0 /* Just to give you an idea of what I have in mind */ | ||
| 127 | CONF_METHOD *NCONF_XML(); | ||
| 128 | #endif | ||
| 129 | void NCONF_free(CONF *conf); | ||
| 130 | void NCONF_free_data(CONF *conf); | ||
| 131 | |||
| 132 | int NCONF_load(CONF *conf,const char *file,long *eline); | ||
| 133 | #ifndef NO_FP_API | ||
| 134 | int NCONF_load_fp(CONF *conf, FILE *fp,long *eline); | ||
| 135 | #endif | ||
| 136 | int NCONF_load_bio(CONF *conf, BIO *bp,long *eline); | ||
| 137 | STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section); | ||
| 138 | char *NCONF_get_string(CONF *conf,char *group,char *name); | ||
| 139 | long NCONF_get_number(CONF *conf,char *group,char *name); | ||
| 140 | int NCONF_dump_fp(CONF *conf, FILE *out); | ||
| 141 | int NCONF_dump_bio(CONF *conf, BIO *out); | ||
| 142 | |||
| 91 | 143 | ||
| 92 | /* BEGIN ERROR CODES */ | 144 | /* BEGIN ERROR CODES */ |
| 93 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 145 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
| @@ -97,15 +149,24 @@ void ERR_load_CONF_strings(void ); | |||
| 97 | /* Error codes for the CONF functions. */ | 149 | /* Error codes for the CONF functions. */ |
| 98 | 150 | ||
| 99 | /* Function codes. */ | 151 | /* Function codes. */ |
| 152 | #define CONF_F_CONF_DUMP_FP 104 | ||
| 100 | #define CONF_F_CONF_LOAD 100 | 153 | #define CONF_F_CONF_LOAD 100 |
| 101 | #define CONF_F_CONF_LOAD_BIO 102 | 154 | #define CONF_F_CONF_LOAD_BIO 102 |
| 102 | #define CONF_F_CONF_LOAD_FP 103 | 155 | #define CONF_F_CONF_LOAD_FP 103 |
| 156 | #define CONF_F_NCONF_DUMP_BIO 105 | ||
| 157 | #define CONF_F_NCONF_DUMP_FP 106 | ||
| 158 | #define CONF_F_NCONF_GET_NUMBER 107 | ||
| 159 | #define CONF_F_NCONF_GET_SECTION 108 | ||
| 160 | #define CONF_F_NCONF_GET_STRING 109 | ||
| 161 | #define CONF_F_NCONF_LOAD_BIO 110 | ||
| 162 | #define CONF_F_NCONF_NEW 111 | ||
| 103 | #define CONF_F_STR_COPY 101 | 163 | #define CONF_F_STR_COPY 101 |
| 104 | 164 | ||
| 105 | /* Reason codes. */ | 165 | /* Reason codes. */ |
| 106 | #define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 | 166 | #define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 |
| 107 | #define CONF_R_MISSING_EQUAL_SIGN 101 | 167 | #define CONF_R_MISSING_EQUAL_SIGN 101 |
| 108 | #define CONF_R_NO_CLOSE_BRACE 102 | 168 | #define CONF_R_NO_CLOSE_BRACE 102 |
| 169 | #define CONF_R_NO_CONF 105 | ||
| 109 | #define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 | 170 | #define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 |
| 110 | #define CONF_R_VARIABLE_HAS_NO_VALUE 104 | 171 | #define CONF_R_VARIABLE_HAS_NO_VALUE 104 |
| 111 | 172 | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf_api.c b/src/lib/libssl/src/crypto/conf/conf_api.c new file mode 100644 index 0000000000..d05a778ff6 --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/conf_api.c | |||
| @@ -0,0 +1,289 @@ | |||
| 1 | /* conf_api.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* Part of the code in here was originally in conf.c, which is now removed */ | ||
| 60 | |||
| 61 | #ifndef CONF_DEBUG | ||
| 62 | # undef NDEBUG /* avoid conflicting definitions */ | ||
| 63 | # define NDEBUG | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #include <assert.h> | ||
| 67 | #include <string.h> | ||
| 68 | #include <openssl/conf.h> | ||
| 69 | #include <openssl/conf_api.h> | ||
| 70 | |||
| 71 | static void value_free_hash(CONF_VALUE *a, LHASH *conf); | ||
| 72 | static void value_free_stack(CONF_VALUE *a,LHASH *conf); | ||
| 73 | static unsigned long hash(CONF_VALUE *v); | ||
| 74 | static int cmp_conf(CONF_VALUE *a,CONF_VALUE *b); | ||
| 75 | |||
| 76 | /* Up until OpenSSL 0.9.5a, this was get_section */ | ||
| 77 | CONF_VALUE *_CONF_get_section(CONF *conf, char *section) | ||
| 78 | { | ||
| 79 | CONF_VALUE *v,vv; | ||
| 80 | |||
| 81 | if ((conf == NULL) || (section == NULL)) return(NULL); | ||
| 82 | vv.name=NULL; | ||
| 83 | vv.section=section; | ||
| 84 | v=(CONF_VALUE *)lh_retrieve(conf->data,&vv); | ||
| 85 | return(v); | ||
| 86 | } | ||
| 87 | |||
| 88 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ | ||
| 89 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(CONF *conf, char *section) | ||
| 90 | { | ||
| 91 | CONF_VALUE *v; | ||
| 92 | |||
| 93 | v=_CONF_get_section(conf,section); | ||
| 94 | if (v != NULL) | ||
| 95 | return((STACK_OF(CONF_VALUE) *)v->value); | ||
| 96 | else | ||
| 97 | return(NULL); | ||
| 98 | } | ||
| 99 | |||
| 100 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value) | ||
| 101 | { | ||
| 102 | CONF_VALUE *v = NULL; | ||
| 103 | STACK_OF(CONF_VALUE) *ts; | ||
| 104 | |||
| 105 | ts = (STACK_OF(CONF_VALUE) *)section->value; | ||
| 106 | |||
| 107 | value->section=section->section; | ||
| 108 | if (!sk_CONF_VALUE_push(ts,value)) | ||
| 109 | { | ||
| 110 | return 0; | ||
| 111 | } | ||
| 112 | |||
| 113 | v = (CONF_VALUE *)lh_insert(conf->data, value); | ||
| 114 | if (v != NULL) | ||
| 115 | { | ||
| 116 | sk_CONF_VALUE_delete_ptr(ts,v); | ||
| 117 | OPENSSL_free(v->name); | ||
| 118 | OPENSSL_free(v->value); | ||
| 119 | OPENSSL_free(v); | ||
| 120 | } | ||
| 121 | return 1; | ||
| 122 | } | ||
| 123 | |||
| 124 | char *_CONF_get_string(CONF *conf, char *section, char *name) | ||
| 125 | { | ||
| 126 | CONF_VALUE *v,vv; | ||
| 127 | char *p; | ||
| 128 | |||
| 129 | if (name == NULL) return(NULL); | ||
| 130 | if (conf != NULL) | ||
| 131 | { | ||
| 132 | if (section != NULL) | ||
| 133 | { | ||
| 134 | vv.name=name; | ||
| 135 | vv.section=section; | ||
| 136 | v=(CONF_VALUE *)lh_retrieve(conf->data,&vv); | ||
| 137 | if (v != NULL) return(v->value); | ||
| 138 | if (strcmp(section,"ENV") == 0) | ||
| 139 | { | ||
| 140 | p=Getenv(name); | ||
| 141 | if (p != NULL) return(p); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | vv.section="default"; | ||
| 145 | vv.name=name; | ||
| 146 | v=(CONF_VALUE *)lh_retrieve(conf->data,&vv); | ||
| 147 | if (v != NULL) | ||
| 148 | return(v->value); | ||
| 149 | else | ||
| 150 | return(NULL); | ||
| 151 | } | ||
| 152 | else | ||
| 153 | return(Getenv(name)); | ||
| 154 | } | ||
| 155 | |||
| 156 | long _CONF_get_number(CONF *conf, char *section, char *name) | ||
| 157 | { | ||
| 158 | char *str; | ||
| 159 | long ret=0; | ||
| 160 | |||
| 161 | str=_CONF_get_string(conf,section,name); | ||
| 162 | if (str == NULL) return(0); | ||
| 163 | for (;;) | ||
| 164 | { | ||
| 165 | if (conf->meth->is_number(conf, *str)) | ||
| 166 | ret=ret*10+conf->meth->to_int(conf, *str); | ||
| 167 | else | ||
| 168 | return(ret); | ||
| 169 | str++; | ||
| 170 | } | ||
| 171 | } | ||
| 172 | |||
| 173 | int _CONF_new_data(CONF *conf) | ||
| 174 | { | ||
| 175 | if (conf == NULL) | ||
| 176 | { | ||
| 177 | return 0; | ||
| 178 | } | ||
| 179 | if (conf->data == NULL) | ||
| 180 | if ((conf->data = lh_new(hash,cmp_conf)) == NULL) | ||
| 181 | { | ||
| 182 | return 0; | ||
| 183 | } | ||
| 184 | return 1; | ||
| 185 | } | ||
| 186 | |||
| 187 | void _CONF_free_data(CONF *conf) | ||
| 188 | { | ||
| 189 | if (conf == NULL || conf->data == NULL) return; | ||
| 190 | |||
| 191 | conf->data->down_load=0; /* evil thing to make sure the 'OPENSSL_free()' | ||
| 192 | * works as expected */ | ||
| 193 | lh_doall_arg(conf->data,(void (*)())value_free_hash,conf->data); | ||
| 194 | |||
| 195 | /* We now have only 'section' entries in the hash table. | ||
| 196 | * Due to problems with */ | ||
| 197 | |||
| 198 | lh_doall_arg(conf->data,(void (*)())value_free_stack,conf->data); | ||
| 199 | lh_free(conf->data); | ||
| 200 | } | ||
| 201 | |||
| 202 | static void value_free_hash(CONF_VALUE *a, LHASH *conf) | ||
| 203 | { | ||
| 204 | if (a->name != NULL) | ||
| 205 | { | ||
| 206 | a=(CONF_VALUE *)lh_delete(conf,a); | ||
| 207 | } | ||
| 208 | } | ||
| 209 | |||
| 210 | static void value_free_stack(CONF_VALUE *a, LHASH *conf) | ||
| 211 | { | ||
| 212 | CONF_VALUE *vv; | ||
| 213 | STACK *sk; | ||
| 214 | int i; | ||
| 215 | |||
| 216 | if (a->name != NULL) return; | ||
| 217 | |||
| 218 | sk=(STACK *)a->value; | ||
| 219 | for (i=sk_num(sk)-1; i>=0; i--) | ||
| 220 | { | ||
| 221 | vv=(CONF_VALUE *)sk_value(sk,i); | ||
| 222 | OPENSSL_free(vv->value); | ||
| 223 | OPENSSL_free(vv->name); | ||
| 224 | OPENSSL_free(vv); | ||
| 225 | } | ||
| 226 | if (sk != NULL) sk_free(sk); | ||
| 227 | OPENSSL_free(a->section); | ||
| 228 | OPENSSL_free(a); | ||
| 229 | } | ||
| 230 | |||
| 231 | static unsigned long hash(CONF_VALUE *v) | ||
| 232 | { | ||
| 233 | return((lh_strhash(v->section)<<2)^lh_strhash(v->name)); | ||
| 234 | } | ||
| 235 | |||
| 236 | static int cmp_conf(CONF_VALUE *a, CONF_VALUE *b) | ||
| 237 | { | ||
| 238 | int i; | ||
| 239 | |||
| 240 | if (a->section != b->section) | ||
| 241 | { | ||
| 242 | i=strcmp(a->section,b->section); | ||
| 243 | if (i) return(i); | ||
| 244 | } | ||
| 245 | |||
| 246 | if ((a->name != NULL) && (b->name != NULL)) | ||
| 247 | { | ||
| 248 | i=strcmp(a->name,b->name); | ||
| 249 | return(i); | ||
| 250 | } | ||
| 251 | else if (a->name == b->name) | ||
| 252 | return(0); | ||
| 253 | else | ||
| 254 | return((a->name == NULL)?-1:1); | ||
| 255 | } | ||
| 256 | |||
| 257 | /* Up until OpenSSL 0.9.5a, this was new_section */ | ||
| 258 | CONF_VALUE *_CONF_new_section(CONF *conf, char *section) | ||
| 259 | { | ||
| 260 | STACK *sk=NULL; | ||
| 261 | int ok=0,i; | ||
| 262 | CONF_VALUE *v=NULL,*vv; | ||
| 263 | |||
| 264 | if ((sk=sk_new_null()) == NULL) | ||
| 265 | goto err; | ||
| 266 | if ((v=(CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE))) == NULL) | ||
| 267 | goto err; | ||
| 268 | i=strlen(section)+1; | ||
| 269 | if ((v->section=(char *)OPENSSL_malloc(i)) == NULL) | ||
| 270 | goto err; | ||
| 271 | |||
| 272 | memcpy(v->section,section,i); | ||
| 273 | v->name=NULL; | ||
| 274 | v->value=(char *)sk; | ||
| 275 | |||
| 276 | vv=(CONF_VALUE *)lh_insert(conf->data,v); | ||
| 277 | assert(vv == NULL); | ||
| 278 | ok=1; | ||
| 279 | err: | ||
| 280 | if (!ok) | ||
| 281 | { | ||
| 282 | if (sk != NULL) sk_free(sk); | ||
| 283 | if (v != NULL) OPENSSL_free(v); | ||
| 284 | v=NULL; | ||
| 285 | } | ||
| 286 | return(v); | ||
| 287 | } | ||
| 288 | |||
| 289 | IMPLEMENT_STACK_OF(CONF_VALUE) | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf_api.h b/src/lib/libssl/src/crypto/conf/conf_api.h new file mode 100644 index 0000000000..a5cc17b233 --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/conf_api.h | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | /* conf_api.h */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_CONF_API_H | ||
| 60 | #define HEADER_CONF_API_H | ||
| 61 | |||
| 62 | #include <openssl/lhash.h> | ||
| 63 | #include <openssl/conf.h> | ||
| 64 | |||
| 65 | #ifdef __cplusplus | ||
| 66 | extern "C" { | ||
| 67 | #endif | ||
| 68 | |||
| 69 | /* Up until OpenSSL 0.9.5a, this was new_section */ | ||
| 70 | CONF_VALUE *_CONF_new_section(CONF *conf, char *section); | ||
| 71 | /* Up until OpenSSL 0.9.5a, this was get_section */ | ||
| 72 | CONF_VALUE *_CONF_get_section(CONF *conf, char *section); | ||
| 73 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ | ||
| 74 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(CONF *conf, char *section); | ||
| 75 | |||
| 76 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); | ||
| 77 | char *_CONF_get_string(CONF *conf, char *section, char *name); | ||
| 78 | long _CONF_get_number(CONF *conf, char *section, char *name); | ||
| 79 | |||
| 80 | int _CONF_new_data(CONF *conf); | ||
| 81 | void _CONF_free_data(CONF *conf); | ||
| 82 | |||
| 83 | #ifdef __cplusplus | ||
| 84 | } | ||
| 85 | #endif | ||
| 86 | #endif | ||
| 87 | |||
diff --git a/src/lib/libssl/src/crypto/conf/conf_def.c b/src/lib/libssl/src/crypto/conf/conf_def.c new file mode 100644 index 0000000000..773df32c68 --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/conf_def.c | |||
| @@ -0,0 +1,703 @@ | |||
| 1 | /* crypto/conf/conf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* Part of the code in here was originally in conf.c, which is now removed */ | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include <string.h> | ||
| 63 | #include <openssl/stack.h> | ||
| 64 | #include <openssl/lhash.h> | ||
| 65 | #include <openssl/conf.h> | ||
| 66 | #include <openssl/conf_api.h> | ||
| 67 | #include "conf_def.h" | ||
| 68 | #include <openssl/buffer.h> | ||
| 69 | #include <openssl/err.h> | ||
| 70 | |||
| 71 | static char *eat_ws(CONF *conf, char *p); | ||
| 72 | static char *eat_alpha_numeric(CONF *conf, char *p); | ||
| 73 | static void clear_comments(CONF *conf, char *p); | ||
| 74 | static int str_copy(CONF *conf,char *section,char **to, char *from); | ||
| 75 | static char *scan_quote(CONF *conf, char *p); | ||
| 76 | static char *scan_dquote(CONF *conf, char *p); | ||
| 77 | #define scan_esc(conf,p) (((IS_EOF((conf),(p)[1]))?((p)+1):((p)+2))) | ||
| 78 | |||
| 79 | static CONF *def_create(CONF_METHOD *meth); | ||
| 80 | static int def_init_default(CONF *conf); | ||
| 81 | static int def_init_WIN32(CONF *conf); | ||
| 82 | static int def_destroy(CONF *conf); | ||
| 83 | static int def_destroy_data(CONF *conf); | ||
| 84 | static int def_load(CONF *conf, BIO *bp, long *eline); | ||
| 85 | static int def_dump(CONF *conf, BIO *bp); | ||
| 86 | static int def_is_number(CONF *conf, char c); | ||
| 87 | static int def_to_int(CONF *conf, char c); | ||
| 88 | |||
| 89 | const char *CONF_def_version="CONF_def" OPENSSL_VERSION_PTEXT; | ||
| 90 | |||
| 91 | static CONF_METHOD default_method = { | ||
| 92 | "OpenSSL default", | ||
| 93 | def_create, | ||
| 94 | def_init_default, | ||
| 95 | def_destroy, | ||
| 96 | def_destroy_data, | ||
| 97 | def_load, | ||
| 98 | def_dump, | ||
| 99 | def_is_number, | ||
| 100 | def_to_int | ||
| 101 | }; | ||
| 102 | |||
| 103 | static CONF_METHOD WIN32_method = { | ||
| 104 | "WIN32", | ||
| 105 | def_create, | ||
| 106 | def_init_WIN32, | ||
| 107 | def_destroy, | ||
| 108 | def_destroy_data, | ||
| 109 | def_load, | ||
| 110 | def_dump, | ||
| 111 | def_is_number, | ||
| 112 | def_to_int | ||
| 113 | }; | ||
| 114 | |||
| 115 | CONF_METHOD *NCONF_default() | ||
| 116 | { | ||
| 117 | return &default_method; | ||
| 118 | } | ||
| 119 | CONF_METHOD *NCONF_WIN32() | ||
| 120 | { | ||
| 121 | return &WIN32_method; | ||
| 122 | } | ||
| 123 | |||
| 124 | static CONF *def_create(CONF_METHOD *meth) | ||
| 125 | { | ||
| 126 | CONF *ret; | ||
| 127 | |||
| 128 | ret = (CONF *)OPENSSL_malloc(sizeof(CONF) + sizeof(unsigned short *)); | ||
| 129 | if (ret) | ||
| 130 | if (meth->init(ret) == 0) | ||
| 131 | { | ||
| 132 | OPENSSL_free(ret); | ||
| 133 | ret = NULL; | ||
| 134 | } | ||
| 135 | return ret; | ||
| 136 | } | ||
| 137 | |||
| 138 | static int def_init_default(CONF *conf) | ||
| 139 | { | ||
| 140 | if (conf == NULL) | ||
| 141 | return 0; | ||
| 142 | |||
| 143 | conf->meth = &default_method; | ||
| 144 | conf->meth_data = (void *)CONF_type_default; | ||
| 145 | conf->data = NULL; | ||
| 146 | |||
| 147 | return 1; | ||
| 148 | } | ||
| 149 | |||
| 150 | static int def_init_WIN32(CONF *conf) | ||
| 151 | { | ||
| 152 | if (conf == NULL) | ||
| 153 | return 0; | ||
| 154 | |||
| 155 | conf->meth = &WIN32_method; | ||
| 156 | conf->meth_data = (void *)CONF_type_win32; | ||
| 157 | conf->data = NULL; | ||
| 158 | |||
| 159 | return 1; | ||
| 160 | } | ||
| 161 | |||
| 162 | static int def_destroy(CONF *conf) | ||
| 163 | { | ||
| 164 | if (def_destroy_data(conf)) | ||
| 165 | { | ||
| 166 | OPENSSL_free(conf); | ||
| 167 | return 1; | ||
| 168 | } | ||
| 169 | return 0; | ||
| 170 | } | ||
| 171 | |||
| 172 | static int def_destroy_data(CONF *conf) | ||
| 173 | { | ||
| 174 | if (conf == NULL) | ||
| 175 | return 0; | ||
| 176 | _CONF_free_data(conf); | ||
| 177 | return 1; | ||
| 178 | } | ||
| 179 | |||
| 180 | static int def_load(CONF *conf, BIO *in, long *line) | ||
| 181 | { | ||
| 182 | #define BUFSIZE 512 | ||
| 183 | char btmp[16]; | ||
| 184 | int bufnum=0,i,ii; | ||
| 185 | BUF_MEM *buff=NULL; | ||
| 186 | char *s,*p,*end; | ||
| 187 | int again,n; | ||
| 188 | long eline=0; | ||
| 189 | CONF_VALUE *v=NULL,*tv; | ||
| 190 | CONF_VALUE *sv=NULL; | ||
| 191 | char *section=NULL,*buf; | ||
| 192 | STACK_OF(CONF_VALUE) *section_sk=NULL,*ts; | ||
| 193 | char *start,*psection,*pname; | ||
| 194 | void *h = (void *)(conf->data); | ||
| 195 | |||
| 196 | if ((buff=BUF_MEM_new()) == NULL) | ||
| 197 | { | ||
| 198 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); | ||
| 199 | goto err; | ||
| 200 | } | ||
| 201 | |||
| 202 | section=(char *)OPENSSL_malloc(10); | ||
| 203 | if (section == NULL) | ||
| 204 | { | ||
| 205 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | ||
| 206 | goto err; | ||
| 207 | } | ||
| 208 | strcpy(section,"default"); | ||
| 209 | |||
| 210 | if (_CONF_new_data(conf) == 0) | ||
| 211 | { | ||
| 212 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | ||
| 213 | goto err; | ||
| 214 | } | ||
| 215 | |||
| 216 | sv=_CONF_new_section(conf,section); | ||
| 217 | if (sv == NULL) | ||
| 218 | { | ||
| 219 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 220 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 221 | goto err; | ||
| 222 | } | ||
| 223 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 224 | |||
| 225 | bufnum=0; | ||
| 226 | for (;;) | ||
| 227 | { | ||
| 228 | again=0; | ||
| 229 | if (!BUF_MEM_grow(buff,bufnum+BUFSIZE)) | ||
| 230 | { | ||
| 231 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); | ||
| 232 | goto err; | ||
| 233 | } | ||
| 234 | p= &(buff->data[bufnum]); | ||
| 235 | *p='\0'; | ||
| 236 | BIO_gets(in, p, BUFSIZE-1); | ||
| 237 | p[BUFSIZE-1]='\0'; | ||
| 238 | ii=i=strlen(p); | ||
| 239 | if (i == 0) break; | ||
| 240 | while (i > 0) | ||
| 241 | { | ||
| 242 | if ((p[i-1] != '\r') && (p[i-1] != '\n')) | ||
| 243 | break; | ||
| 244 | else | ||
| 245 | i--; | ||
| 246 | } | ||
| 247 | /* we removed some trailing stuff so there is a new | ||
| 248 | * line on the end. */ | ||
| 249 | if (i == ii) | ||
| 250 | again=1; /* long line */ | ||
| 251 | else | ||
| 252 | { | ||
| 253 | p[i]='\0'; | ||
| 254 | eline++; /* another input line */ | ||
| 255 | } | ||
| 256 | |||
| 257 | /* we now have a line with trailing \r\n removed */ | ||
| 258 | |||
| 259 | /* i is the number of bytes */ | ||
| 260 | bufnum+=i; | ||
| 261 | |||
| 262 | v=NULL; | ||
| 263 | /* check for line continuation */ | ||
| 264 | if (bufnum >= 1) | ||
| 265 | { | ||
| 266 | /* If we have bytes and the last char '\\' and | ||
| 267 | * second last char is not '\\' */ | ||
| 268 | p= &(buff->data[bufnum-1]); | ||
| 269 | if (IS_ESC(conf,p[0]) && | ||
| 270 | ((bufnum <= 1) || !IS_ESC(conf,p[-1]))) | ||
| 271 | { | ||
| 272 | bufnum--; | ||
| 273 | again=1; | ||
| 274 | } | ||
| 275 | } | ||
| 276 | if (again) continue; | ||
| 277 | bufnum=0; | ||
| 278 | buf=buff->data; | ||
| 279 | |||
| 280 | clear_comments(conf, buf); | ||
| 281 | n=strlen(buf); | ||
| 282 | s=eat_ws(conf, buf); | ||
| 283 | if (IS_EOF(conf,*s)) continue; /* blank line */ | ||
| 284 | if (*s == '[') | ||
| 285 | { | ||
| 286 | char *ss; | ||
| 287 | |||
| 288 | s++; | ||
| 289 | start=eat_ws(conf, s); | ||
| 290 | ss=start; | ||
| 291 | again: | ||
| 292 | end=eat_alpha_numeric(conf, ss); | ||
| 293 | p=eat_ws(conf, end); | ||
| 294 | if (*p != ']') | ||
| 295 | { | ||
| 296 | if (*p != '\0') | ||
| 297 | { | ||
| 298 | ss=p; | ||
| 299 | goto again; | ||
| 300 | } | ||
| 301 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 302 | CONF_R_MISSING_CLOSE_SQUARE_BRACKET); | ||
| 303 | goto err; | ||
| 304 | } | ||
| 305 | *end='\0'; | ||
| 306 | if (!str_copy(conf,NULL,§ion,start)) goto err; | ||
| 307 | if ((sv=_CONF_get_section(conf,section)) == NULL) | ||
| 308 | sv=_CONF_new_section(conf,section); | ||
| 309 | if (sv == NULL) | ||
| 310 | { | ||
| 311 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 312 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 313 | goto err; | ||
| 314 | } | ||
| 315 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 316 | continue; | ||
| 317 | } | ||
| 318 | else | ||
| 319 | { | ||
| 320 | pname=s; | ||
| 321 | psection=NULL; | ||
| 322 | end=eat_alpha_numeric(conf, s); | ||
| 323 | if ((end[0] == ':') && (end[1] == ':')) | ||
| 324 | { | ||
| 325 | *end='\0'; | ||
| 326 | end+=2; | ||
| 327 | psection=pname; | ||
| 328 | pname=end; | ||
| 329 | end=eat_alpha_numeric(conf, end); | ||
| 330 | } | ||
| 331 | p=eat_ws(conf, end); | ||
| 332 | if (*p != '=') | ||
| 333 | { | ||
| 334 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 335 | CONF_R_MISSING_EQUAL_SIGN); | ||
| 336 | goto err; | ||
| 337 | } | ||
| 338 | *end='\0'; | ||
| 339 | p++; | ||
| 340 | start=eat_ws(conf, p); | ||
| 341 | while (!IS_EOF(conf,*p)) | ||
| 342 | p++; | ||
| 343 | p--; | ||
| 344 | while ((p != start) && (IS_WS(conf,*p))) | ||
| 345 | p--; | ||
| 346 | p++; | ||
| 347 | *p='\0'; | ||
| 348 | |||
| 349 | if (!(v=(CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE)))) | ||
| 350 | { | ||
| 351 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 352 | ERR_R_MALLOC_FAILURE); | ||
| 353 | goto err; | ||
| 354 | } | ||
| 355 | if (psection == NULL) psection=section; | ||
| 356 | v->name=(char *)OPENSSL_malloc(strlen(pname)+1); | ||
| 357 | v->value=NULL; | ||
| 358 | if (v->name == NULL) | ||
| 359 | { | ||
| 360 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 361 | ERR_R_MALLOC_FAILURE); | ||
| 362 | goto err; | ||
| 363 | } | ||
| 364 | strcpy(v->name,pname); | ||
| 365 | if (!str_copy(conf,psection,&(v->value),start)) goto err; | ||
| 366 | |||
| 367 | if (strcmp(psection,section) != 0) | ||
| 368 | { | ||
| 369 | if ((tv=_CONF_get_section(conf,psection)) | ||
| 370 | == NULL) | ||
| 371 | tv=_CONF_new_section(conf,psection); | ||
| 372 | if (tv == NULL) | ||
| 373 | { | ||
| 374 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 375 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 376 | goto err; | ||
| 377 | } | ||
| 378 | ts=(STACK_OF(CONF_VALUE) *)tv->value; | ||
| 379 | } | ||
| 380 | else | ||
| 381 | { | ||
| 382 | tv=sv; | ||
| 383 | ts=section_sk; | ||
| 384 | } | ||
| 385 | #if 1 | ||
| 386 | if (_CONF_add_string(conf, tv, v) == 0) | ||
| 387 | { | ||
| 388 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 389 | ERR_R_MALLOC_FAILURE); | ||
| 390 | goto err; | ||
| 391 | } | ||
| 392 | #else | ||
| 393 | v->section=tv->section; | ||
| 394 | if (!sk_CONF_VALUE_push(ts,v)) | ||
| 395 | { | ||
| 396 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 397 | ERR_R_MALLOC_FAILURE); | ||
| 398 | goto err; | ||
| 399 | } | ||
| 400 | vv=(CONF_VALUE *)lh_insert(conf->data,v); | ||
| 401 | if (vv != NULL) | ||
| 402 | { | ||
| 403 | sk_CONF_VALUE_delete_ptr(ts,vv); | ||
| 404 | OPENSSL_free(vv->name); | ||
| 405 | OPENSSL_free(vv->value); | ||
| 406 | OPENSSL_free(vv); | ||
| 407 | } | ||
| 408 | #endif | ||
| 409 | v=NULL; | ||
| 410 | } | ||
| 411 | } | ||
| 412 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 413 | if (section != NULL) OPENSSL_free(section); | ||
| 414 | return(1); | ||
| 415 | err: | ||
| 416 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 417 | if (section != NULL) OPENSSL_free(section); | ||
| 418 | if (line != NULL) *line=eline; | ||
| 419 | sprintf(btmp,"%ld",eline); | ||
| 420 | ERR_add_error_data(2,"line ",btmp); | ||
| 421 | if ((h != conf->data) && (conf->data != NULL)) CONF_free(conf->data); | ||
| 422 | if (v != NULL) | ||
| 423 | { | ||
| 424 | if (v->name != NULL) OPENSSL_free(v->name); | ||
| 425 | if (v->value != NULL) OPENSSL_free(v->value); | ||
| 426 | if (v != NULL) OPENSSL_free(v); | ||
| 427 | } | ||
| 428 | return(0); | ||
| 429 | } | ||
| 430 | |||
| 431 | static void clear_comments(CONF *conf, char *p) | ||
| 432 | { | ||
| 433 | char *to; | ||
| 434 | |||
| 435 | to=p; | ||
| 436 | for (;;) | ||
| 437 | { | ||
| 438 | if (IS_FCOMMENT(conf,*p)) | ||
| 439 | { | ||
| 440 | *p='\0'; | ||
| 441 | return; | ||
| 442 | } | ||
| 443 | if (!IS_WS(conf,*p)) | ||
| 444 | { | ||
| 445 | break; | ||
| 446 | } | ||
| 447 | p++; | ||
| 448 | } | ||
| 449 | |||
| 450 | for (;;) | ||
| 451 | { | ||
| 452 | if (IS_COMMENT(conf,*p)) | ||
| 453 | { | ||
| 454 | *p='\0'; | ||
| 455 | return; | ||
| 456 | } | ||
| 457 | if (IS_DQUOTE(conf,*p)) | ||
| 458 | { | ||
| 459 | p=scan_dquote(conf, p); | ||
| 460 | continue; | ||
| 461 | } | ||
| 462 | if (IS_QUOTE(conf,*p)) | ||
| 463 | { | ||
| 464 | p=scan_quote(conf, p); | ||
| 465 | continue; | ||
| 466 | } | ||
| 467 | if (IS_ESC(conf,*p)) | ||
| 468 | { | ||
| 469 | p=scan_esc(conf,p); | ||
| 470 | continue; | ||
| 471 | } | ||
| 472 | if (IS_EOF(conf,*p)) | ||
| 473 | return; | ||
| 474 | else | ||
| 475 | p++; | ||
| 476 | } | ||
| 477 | } | ||
| 478 | |||
| 479 | static int str_copy(CONF *conf, char *section, char **pto, char *from) | ||
| 480 | { | ||
| 481 | int q,r,rr=0,to=0,len=0; | ||
| 482 | char *s,*e,*rp,*p,*rrp,*np,*cp,v; | ||
| 483 | BUF_MEM *buf; | ||
| 484 | |||
| 485 | if ((buf=BUF_MEM_new()) == NULL) return(0); | ||
| 486 | |||
| 487 | len=strlen(from)+1; | ||
| 488 | if (!BUF_MEM_grow(buf,len)) goto err; | ||
| 489 | |||
| 490 | for (;;) | ||
| 491 | { | ||
| 492 | if (IS_QUOTE(conf,*from)) | ||
| 493 | { | ||
| 494 | q= *from; | ||
| 495 | from++; | ||
| 496 | while (!IS_EOF(conf,*from) && (*from != q)) | ||
| 497 | { | ||
| 498 | if (IS_ESC(conf,*from)) | ||
| 499 | { | ||
| 500 | from++; | ||
| 501 | if (IS_EOF(conf,*from)) break; | ||
| 502 | } | ||
| 503 | buf->data[to++]= *(from++); | ||
| 504 | } | ||
| 505 | if (*from == q) from++; | ||
| 506 | } | ||
| 507 | else if (IS_DQUOTE(conf,*from)) | ||
| 508 | { | ||
| 509 | q= *from; | ||
| 510 | from++; | ||
| 511 | while (!IS_EOF(conf,*from)) | ||
| 512 | { | ||
| 513 | if (*from == q) | ||
| 514 | { | ||
| 515 | if (*(from+1) == q) | ||
| 516 | { | ||
| 517 | from++; | ||
| 518 | } | ||
| 519 | else | ||
| 520 | { | ||
| 521 | break; | ||
| 522 | } | ||
| 523 | } | ||
| 524 | buf->data[to++]= *(from++); | ||
| 525 | } | ||
| 526 | if (*from == q) from++; | ||
| 527 | } | ||
| 528 | else if (IS_ESC(conf,*from)) | ||
| 529 | { | ||
| 530 | from++; | ||
| 531 | v= *(from++); | ||
| 532 | if (IS_EOF(conf,v)) break; | ||
| 533 | else if (v == 'r') v='\r'; | ||
| 534 | else if (v == 'n') v='\n'; | ||
| 535 | else if (v == 'b') v='\b'; | ||
| 536 | else if (v == 't') v='\t'; | ||
| 537 | buf->data[to++]= v; | ||
| 538 | } | ||
| 539 | else if (IS_EOF(conf,*from)) | ||
| 540 | break; | ||
| 541 | else if (*from == '$') | ||
| 542 | { | ||
| 543 | /* try to expand it */ | ||
| 544 | rrp=NULL; | ||
| 545 | s= &(from[1]); | ||
| 546 | if (*s == '{') | ||
| 547 | q='}'; | ||
| 548 | else if (*s == '(') | ||
| 549 | q=')'; | ||
| 550 | else q=0; | ||
| 551 | |||
| 552 | if (q) s++; | ||
| 553 | cp=section; | ||
| 554 | e=np=s; | ||
| 555 | while (IS_ALPHA_NUMERIC(conf,*e)) | ||
| 556 | e++; | ||
| 557 | if ((e[0] == ':') && (e[1] == ':')) | ||
| 558 | { | ||
| 559 | cp=np; | ||
| 560 | rrp=e; | ||
| 561 | rr= *e; | ||
| 562 | *rrp='\0'; | ||
| 563 | e+=2; | ||
| 564 | np=e; | ||
| 565 | while (IS_ALPHA_NUMERIC(conf,*e)) | ||
| 566 | e++; | ||
| 567 | } | ||
| 568 | r= *e; | ||
| 569 | *e='\0'; | ||
| 570 | rp=e; | ||
| 571 | if (q) | ||
| 572 | { | ||
| 573 | if (r != q) | ||
| 574 | { | ||
| 575 | CONFerr(CONF_F_STR_COPY,CONF_R_NO_CLOSE_BRACE); | ||
| 576 | goto err; | ||
| 577 | } | ||
| 578 | e++; | ||
| 579 | } | ||
| 580 | /* So at this point we have | ||
| 581 | * ns which is the start of the name string which is | ||
| 582 | * '\0' terminated. | ||
| 583 | * cs which is the start of the section string which is | ||
| 584 | * '\0' terminated. | ||
| 585 | * e is the 'next point after'. | ||
| 586 | * r and s are the chars replaced by the '\0' | ||
| 587 | * rp and sp is where 'r' and 's' came from. | ||
| 588 | */ | ||
| 589 | p=_CONF_get_string(conf,cp,np); | ||
| 590 | if (rrp != NULL) *rrp=rr; | ||
| 591 | *rp=r; | ||
| 592 | if (p == NULL) | ||
| 593 | { | ||
| 594 | CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE); | ||
| 595 | goto err; | ||
| 596 | } | ||
| 597 | BUF_MEM_grow(buf,(strlen(p)+len-(e-from))); | ||
| 598 | while (*p) | ||
| 599 | buf->data[to++]= *(p++); | ||
| 600 | from=e; | ||
| 601 | } | ||
| 602 | else | ||
| 603 | buf->data[to++]= *(from++); | ||
| 604 | } | ||
| 605 | buf->data[to]='\0'; | ||
| 606 | if (*pto != NULL) OPENSSL_free(*pto); | ||
| 607 | *pto=buf->data; | ||
| 608 | OPENSSL_free(buf); | ||
| 609 | return(1); | ||
| 610 | err: | ||
| 611 | if (buf != NULL) BUF_MEM_free(buf); | ||
| 612 | return(0); | ||
| 613 | } | ||
| 614 | |||
| 615 | static char *eat_ws(CONF *conf, char *p) | ||
| 616 | { | ||
| 617 | while (IS_WS(conf,*p) && (!IS_EOF(conf,*p))) | ||
| 618 | p++; | ||
| 619 | return(p); | ||
| 620 | } | ||
| 621 | |||
| 622 | static char *eat_alpha_numeric(CONF *conf, char *p) | ||
| 623 | { | ||
| 624 | for (;;) | ||
| 625 | { | ||
| 626 | if (IS_ESC(conf,*p)) | ||
| 627 | { | ||
| 628 | p=scan_esc(conf,p); | ||
| 629 | continue; | ||
| 630 | } | ||
| 631 | if (!IS_ALPHA_NUMERIC_PUNCT(conf,*p)) | ||
| 632 | return(p); | ||
| 633 | p++; | ||
| 634 | } | ||
| 635 | } | ||
| 636 | |||
| 637 | static char *scan_quote(CONF *conf, char *p) | ||
| 638 | { | ||
| 639 | int q= *p; | ||
| 640 | |||
| 641 | p++; | ||
| 642 | while (!(IS_EOF(conf,*p)) && (*p != q)) | ||
| 643 | { | ||
| 644 | if (IS_ESC(conf,*p)) | ||
| 645 | { | ||
| 646 | p++; | ||
| 647 | if (IS_EOF(conf,*p)) return(p); | ||
| 648 | } | ||
| 649 | p++; | ||
| 650 | } | ||
| 651 | if (*p == q) p++; | ||
| 652 | return(p); | ||
| 653 | } | ||
| 654 | |||
| 655 | |||
| 656 | static char *scan_dquote(CONF *conf, char *p) | ||
| 657 | { | ||
| 658 | int q= *p; | ||
| 659 | |||
| 660 | p++; | ||
| 661 | while (!(IS_EOF(conf,*p))) | ||
| 662 | { | ||
| 663 | if (*p == q) | ||
| 664 | { | ||
| 665 | if (*(p+1) == q) | ||
| 666 | { | ||
| 667 | p++; | ||
| 668 | } | ||
| 669 | else | ||
| 670 | { | ||
| 671 | break; | ||
| 672 | } | ||
| 673 | } | ||
| 674 | p++; | ||
| 675 | } | ||
| 676 | if (*p == q) p++; | ||
| 677 | return(p); | ||
| 678 | } | ||
| 679 | |||
| 680 | static void dump_value(CONF_VALUE *a, BIO *out) | ||
| 681 | { | ||
| 682 | if (a->name) | ||
| 683 | BIO_printf(out, "[%s] %s=%s\n", a->section, a->name, a->value); | ||
| 684 | else | ||
| 685 | BIO_printf(out, "[[%s]]\n", a->section); | ||
| 686 | } | ||
| 687 | |||
| 688 | static int def_dump(CONF *conf, BIO *out) | ||
| 689 | { | ||
| 690 | lh_doall_arg(conf->data, (void (*)())dump_value, out); | ||
| 691 | return 1; | ||
| 692 | } | ||
| 693 | |||
| 694 | static int def_is_number(CONF *conf, char c) | ||
| 695 | { | ||
| 696 | return IS_NUMBER(conf,c); | ||
| 697 | } | ||
| 698 | |||
| 699 | static int def_to_int(CONF *conf, char c) | ||
| 700 | { | ||
| 701 | return c - '0'; | ||
| 702 | } | ||
| 703 | |||
diff --git a/src/lib/libssl/src/crypto/conf/conf_def.h b/src/lib/libssl/src/crypto/conf/conf_def.h new file mode 100644 index 0000000000..3244d9a331 --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/conf_def.h | |||
| @@ -0,0 +1,145 @@ | |||
| 1 | /* crypto/conf/conf_def.h */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* THIS FILE WAS AUTOMAGICALLY GENERATED! | ||
| 60 | Please modify and use keysets.pl to regenerate it. */ | ||
| 61 | |||
| 62 | #define CONF_NUMBER 1 | ||
| 63 | #define CONF_UPPER 2 | ||
| 64 | #define CONF_LOWER 4 | ||
| 65 | #define CONF_UNDER 256 | ||
| 66 | #define CONF_PUNCTUATION 512 | ||
| 67 | #define CONF_WS 16 | ||
| 68 | #define CONF_ESC 32 | ||
| 69 | #define CONF_QUOTE 64 | ||
| 70 | #define CONF_DQUOTE 1024 | ||
| 71 | #define CONF_COMMENT 128 | ||
| 72 | #define CONF_FCOMMENT 2048 | ||
| 73 | #define CONF_EOF 8 | ||
| 74 | #define CONF_ALPHA (CONF_UPPER|CONF_LOWER) | ||
| 75 | #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER) | ||
| 76 | #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \ | ||
| 77 | CONF_PUNCTUATION) | ||
| 78 | |||
| 79 | #define KEYTYPES(c) ((unsigned short *)((c)->meth_data)) | ||
| 80 | #ifndef CHARSET_EBCDIC | ||
| 81 | #define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_COMMENT) | ||
| 82 | #define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_FCOMMENT) | ||
| 83 | #define IS_EOF(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_EOF) | ||
| 84 | #define IS_ESC(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_ESC) | ||
| 85 | #define IS_NUMBER(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_NUMBER) | ||
| 86 | #define IS_WS(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_WS) | ||
| 87 | #define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_ALPHA_NUMERIC) | ||
| 88 | #define IS_ALPHA_NUMERIC_PUNCT(c,a) \ | ||
| 89 | (KEYTYPES(c)[(a)&0x7f]&CONF_ALPHA_NUMERIC_PUNCT) | ||
| 90 | #define IS_QUOTE(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_QUOTE) | ||
| 91 | #define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_DQUOTE) | ||
| 92 | |||
| 93 | #else /*CHARSET_EBCDIC*/ | ||
| 94 | |||
| 95 | #define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_COMMENT) | ||
| 96 | #define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_FCOMMENT) | ||
| 97 | #define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_EOF) | ||
| 98 | #define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ESC) | ||
| 99 | #define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_NUMBER) | ||
| 100 | #define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_WS) | ||
| 101 | #define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC) | ||
| 102 | #define IS_ALPHA_NUMERIC_PUNCT(c,a) \ | ||
| 103 | (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC_PUNCT) | ||
| 104 | #define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_QUOTE) | ||
| 105 | #define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_DQUOTE) | ||
| 106 | #endif /*CHARSET_EBCDIC*/ | ||
| 107 | |||
| 108 | static unsigned short CONF_type_default[128]={ | ||
| 109 | 0x008,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 110 | 0x000,0x010,0x010,0x000,0x000,0x010,0x000,0x000, | ||
| 111 | 0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 112 | 0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 113 | 0x010,0x200,0x040,0x080,0x000,0x200,0x200,0x040, | ||
| 114 | 0x000,0x000,0x200,0x200,0x200,0x200,0x200,0x200, | ||
| 115 | 0x001,0x001,0x001,0x001,0x001,0x001,0x001,0x001, | ||
| 116 | 0x001,0x001,0x000,0x200,0x000,0x000,0x000,0x200, | ||
| 117 | 0x200,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 118 | 0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 119 | 0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 120 | 0x002,0x002,0x002,0x000,0x020,0x000,0x200,0x100, | ||
| 121 | 0x040,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 122 | 0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 123 | 0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 124 | 0x004,0x004,0x004,0x000,0x200,0x000,0x200,0x000, | ||
| 125 | }; | ||
| 126 | |||
| 127 | static unsigned short CONF_type_win32[128]={ | ||
| 128 | 0x008,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 129 | 0x000,0x010,0x010,0x000,0x000,0x010,0x000,0x000, | ||
| 130 | 0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 131 | 0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 132 | 0x010,0x200,0x400,0x000,0x000,0x200,0x200,0x000, | ||
| 133 | 0x000,0x000,0x200,0x200,0x200,0x200,0x200,0x200, | ||
| 134 | 0x001,0x001,0x001,0x001,0x001,0x001,0x001,0x001, | ||
| 135 | 0x001,0x001,0x000,0xA00,0x000,0x000,0x000,0x200, | ||
| 136 | 0x200,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 137 | 0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 138 | 0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 139 | 0x002,0x002,0x002,0x000,0x000,0x000,0x200,0x100, | ||
| 140 | 0x000,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 141 | 0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 142 | 0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 143 | 0x004,0x004,0x004,0x000,0x200,0x000,0x200,0x000, | ||
| 144 | }; | ||
| 145 | |||
diff --git a/src/lib/libssl/src/crypto/conf/conf_err.c b/src/lib/libssl/src/crypto/conf/conf_err.c index 5c1ca59090..06d3163573 100644 --- a/src/lib/libssl/src/crypto/conf/conf_err.c +++ b/src/lib/libssl/src/crypto/conf/conf_err.c | |||
| @@ -66,9 +66,17 @@ | |||
| 66 | #ifndef NO_ERR | 66 | #ifndef NO_ERR |
| 67 | static ERR_STRING_DATA CONF_str_functs[]= | 67 | static ERR_STRING_DATA CONF_str_functs[]= |
| 68 | { | 68 | { |
| 69 | {ERR_PACK(0,CONF_F_CONF_DUMP_FP,0), "CONF_dump_fp"}, | ||
| 69 | {ERR_PACK(0,CONF_F_CONF_LOAD,0), "CONF_load"}, | 70 | {ERR_PACK(0,CONF_F_CONF_LOAD,0), "CONF_load"}, |
| 70 | {ERR_PACK(0,CONF_F_CONF_LOAD_BIO,0), "CONF_load_bio"}, | 71 | {ERR_PACK(0,CONF_F_CONF_LOAD_BIO,0), "CONF_load_bio"}, |
| 71 | {ERR_PACK(0,CONF_F_CONF_LOAD_FP,0), "CONF_load_fp"}, | 72 | {ERR_PACK(0,CONF_F_CONF_LOAD_FP,0), "CONF_load_fp"}, |
| 73 | {ERR_PACK(0,CONF_F_NCONF_DUMP_BIO,0), "NCONF_dump_bio"}, | ||
| 74 | {ERR_PACK(0,CONF_F_NCONF_DUMP_FP,0), "NCONF_dump_fp"}, | ||
| 75 | {ERR_PACK(0,CONF_F_NCONF_GET_NUMBER,0), "NCONF_get_number"}, | ||
| 76 | {ERR_PACK(0,CONF_F_NCONF_GET_SECTION,0), "NCONF_get_section"}, | ||
| 77 | {ERR_PACK(0,CONF_F_NCONF_GET_STRING,0), "NCONF_get_string"}, | ||
| 78 | {ERR_PACK(0,CONF_F_NCONF_LOAD_BIO,0), "NCONF_load_bio"}, | ||
| 79 | {ERR_PACK(0,CONF_F_NCONF_NEW,0), "NCONF_new"}, | ||
| 72 | {ERR_PACK(0,CONF_F_STR_COPY,0), "STR_COPY"}, | 80 | {ERR_PACK(0,CONF_F_STR_COPY,0), "STR_COPY"}, |
| 73 | {0,NULL} | 81 | {0,NULL} |
| 74 | }; | 82 | }; |
| @@ -78,6 +86,7 @@ static ERR_STRING_DATA CONF_str_reasons[]= | |||
| 78 | {CONF_R_MISSING_CLOSE_SQUARE_BRACKET ,"missing close square bracket"}, | 86 | {CONF_R_MISSING_CLOSE_SQUARE_BRACKET ,"missing close square bracket"}, |
| 79 | {CONF_R_MISSING_EQUAL_SIGN ,"missing equal sign"}, | 87 | {CONF_R_MISSING_EQUAL_SIGN ,"missing equal sign"}, |
| 80 | {CONF_R_NO_CLOSE_BRACE ,"no close brace"}, | 88 | {CONF_R_NO_CLOSE_BRACE ,"no close brace"}, |
| 89 | {CONF_R_NO_CONF ,"no conf"}, | ||
| 81 | {CONF_R_UNABLE_TO_CREATE_NEW_SECTION ,"unable to create new section"}, | 90 | {CONF_R_UNABLE_TO_CREATE_NEW_SECTION ,"unable to create new section"}, |
| 82 | {CONF_R_VARIABLE_HAS_NO_VALUE ,"variable has no value"}, | 91 | {CONF_R_VARIABLE_HAS_NO_VALUE ,"variable has no value"}, |
| 83 | {0,NULL} | 92 | {0,NULL} |
diff --git a/src/lib/libssl/src/crypto/conf/conf_lcl.h b/src/lib/libssl/src/crypto/conf/conf_lcl.h index f9a015df57..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/conf/conf_lcl.h +++ b/src/lib/libssl/src/crypto/conf/conf_lcl.h | |||
| @@ -1,116 +0,0 @@ | |||
| 1 | /* crypto/conf/conf_lcl.h */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #define CONF_NUMBER 1 | ||
| 60 | #define CONF_UPPER 2 | ||
| 61 | #define CONF_LOWER 4 | ||
| 62 | #define CONF_UNDER 256 | ||
| 63 | #define CONF_PUNCTUATION 512 | ||
| 64 | #define CONF_WS 16 | ||
| 65 | #define CONF_ESC 32 | ||
| 66 | #define CONF_QUOTE 64 | ||
| 67 | #define CONF_COMMENT 128 | ||
| 68 | #define CONF_EOF 8 | ||
| 69 | #define CONF_ALPHA (CONF_UPPER|CONF_LOWER) | ||
| 70 | #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER) | ||
| 71 | #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \ | ||
| 72 | CONF_PUNCTUATION) | ||
| 73 | |||
| 74 | #ifndef CHARSET_EBCDIC | ||
| 75 | #define IS_COMMENT(a) (CONF_COMMENT&(CONF_type[(a)&0x7f])) | ||
| 76 | #define IS_EOF(a) ((a) == '\0') | ||
| 77 | #define IS_ESC(a) ((a) == '\\') | ||
| 78 | #define IS_NUMER(a) (CONF_type[(a)&0x7f]&CONF_NUMBER) | ||
| 79 | #define IS_WS(a) (CONF_type[(a)&0x7f]&CONF_WS) | ||
| 80 | #define IS_ALPHA_NUMERIC(a) (CONF_type[(a)&0x7f]&CONF_ALPHA_NUMERIC) | ||
| 81 | #define IS_ALPHA_NUMERIC_PUNCT(a) \ | ||
| 82 | (CONF_type[(a)&0x7f]&CONF_ALPHA_NUMERIC_PUNCT) | ||
| 83 | #define IS_QUOTE(a) (CONF_type[(a)&0x7f]&CONF_QUOTE) | ||
| 84 | |||
| 85 | #else /*CHARSET_EBCDIC*/ | ||
| 86 | |||
| 87 | #define IS_COMMENT(a) (CONF_COMMENT&(CONF_type[os_toascii[a]&0x7f])) | ||
| 88 | #define IS_EOF(a) (os_toascii[a] == '\0') | ||
| 89 | #define IS_ESC(a) (os_toascii[a] == '\\') | ||
| 90 | #define IS_NUMER(a) (CONF_type[os_toascii[a]&0x7f]&CONF_NUMBER) | ||
| 91 | #define IS_WS(a) (CONF_type[os_toascii[a]&0x7f]&CONF_WS) | ||
| 92 | #define IS_ALPHA_NUMERIC(a) (CONF_type[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC) | ||
| 93 | #define IS_ALPHA_NUMERIC_PUNCT(a) \ | ||
| 94 | (CONF_type[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC_PUNCT) | ||
| 95 | #define IS_QUOTE(a) (CONF_type[os_toascii[a]&0x7f]&CONF_QUOTE) | ||
| 96 | #endif /*CHARSET_EBCDIC*/ | ||
| 97 | |||
| 98 | static unsigned short CONF_type[128]={ | ||
| 99 | 0x008,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 100 | 0x000,0x010,0x010,0x000,0x000,0x010,0x000,0x000, | ||
| 101 | 0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 102 | 0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 103 | 0x010,0x200,0x040,0x080,0x000,0x200,0x200,0x040, | ||
| 104 | 0x000,0x000,0x200,0x200,0x200,0x200,0x200,0x200, | ||
| 105 | 0x001,0x001,0x001,0x001,0x001,0x001,0x001,0x001, | ||
| 106 | 0x001,0x001,0x000,0x200,0x000,0x000,0x000,0x200, | ||
| 107 | 0x200,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 108 | 0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 109 | 0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 110 | 0x002,0x002,0x002,0x000,0x020,0x000,0x200,0x100, | ||
| 111 | 0x040,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 112 | 0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 113 | 0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 114 | 0x004,0x004,0x004,0x000,0x200,0x000,0x200,0x000, | ||
| 115 | }; | ||
| 116 | |||
diff --git a/src/lib/libssl/src/crypto/conf/conf_lib.c b/src/lib/libssl/src/crypto/conf/conf_lib.c new file mode 100644 index 0000000000..4c8ca9e9ae --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/conf_lib.c | |||
| @@ -0,0 +1,352 @@ | |||
| 1 | /* conf_lib.c */ | ||
| 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <openssl/crypto.h> | ||
| 61 | #include <openssl/err.h> | ||
| 62 | #include <openssl/conf.h> | ||
| 63 | #include <openssl/conf_api.h> | ||
| 64 | #include <openssl/lhash.h> | ||
| 65 | |||
| 66 | const char *CONF_version="CONF" OPENSSL_VERSION_PTEXT; | ||
| 67 | |||
| 68 | static CONF_METHOD *default_CONF_method=NULL; | ||
| 69 | |||
| 70 | /* The following section contains the "CONF classic" functions, | ||
| 71 | rewritten in terms of the new CONF interface. */ | ||
| 72 | |||
| 73 | int CONF_set_default_method(CONF_METHOD *meth) | ||
| 74 | { | ||
| 75 | default_CONF_method = meth; | ||
| 76 | return 1; | ||
| 77 | } | ||
| 78 | |||
| 79 | LHASH *CONF_load(LHASH *conf, const char *file, long *eline) | ||
| 80 | { | ||
| 81 | LHASH *ltmp; | ||
| 82 | BIO *in=NULL; | ||
| 83 | |||
| 84 | #ifdef VMS | ||
| 85 | in=BIO_new_file(file, "r"); | ||
| 86 | #else | ||
| 87 | in=BIO_new_file(file, "rb"); | ||
| 88 | #endif | ||
| 89 | if (in == NULL) | ||
| 90 | { | ||
| 91 | CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); | ||
| 92 | return NULL; | ||
| 93 | } | ||
| 94 | |||
| 95 | ltmp = CONF_load_bio(conf, in, eline); | ||
| 96 | BIO_free(in); | ||
| 97 | |||
| 98 | return ltmp; | ||
| 99 | } | ||
| 100 | |||
| 101 | #ifndef NO_FP_API | ||
| 102 | LHASH *CONF_load_fp(LHASH *conf, FILE *fp,long *eline) | ||
| 103 | { | ||
| 104 | BIO *btmp; | ||
| 105 | LHASH *ltmp; | ||
| 106 | if(!(btmp = BIO_new_fp(fp, BIO_NOCLOSE))) { | ||
| 107 | CONFerr(CONF_F_CONF_LOAD_FP,ERR_R_BUF_LIB); | ||
| 108 | return NULL; | ||
| 109 | } | ||
| 110 | ltmp = CONF_load_bio(conf, btmp, eline); | ||
| 111 | BIO_free(btmp); | ||
| 112 | return ltmp; | ||
| 113 | } | ||
| 114 | #endif | ||
| 115 | |||
| 116 | LHASH *CONF_load_bio(LHASH *conf, BIO *bp,long *eline) | ||
| 117 | { | ||
| 118 | CONF ctmp; | ||
| 119 | int ret; | ||
| 120 | |||
| 121 | if (default_CONF_method == NULL) | ||
| 122 | default_CONF_method = NCONF_default(); | ||
| 123 | |||
| 124 | default_CONF_method->init(&ctmp); | ||
| 125 | ctmp.data = conf; | ||
| 126 | ret = NCONF_load_bio(&ctmp, bp, eline); | ||
| 127 | if (ret) | ||
| 128 | return ctmp.data; | ||
| 129 | return NULL; | ||
| 130 | } | ||
| 131 | |||
| 132 | STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf,char *section) | ||
| 133 | { | ||
| 134 | CONF ctmp; | ||
| 135 | |||
| 136 | if (default_CONF_method == NULL) | ||
| 137 | default_CONF_method = NCONF_default(); | ||
| 138 | |||
| 139 | default_CONF_method->init(&ctmp); | ||
| 140 | ctmp.data = conf; | ||
| 141 | return NCONF_get_section(&ctmp, section); | ||
| 142 | } | ||
| 143 | |||
| 144 | char *CONF_get_string(LHASH *conf,char *group,char *name) | ||
| 145 | { | ||
| 146 | CONF ctmp; | ||
| 147 | |||
| 148 | if (default_CONF_method == NULL) | ||
| 149 | default_CONF_method = NCONF_default(); | ||
| 150 | |||
| 151 | default_CONF_method->init(&ctmp); | ||
| 152 | ctmp.data = conf; | ||
| 153 | return NCONF_get_string(&ctmp, group, name); | ||
| 154 | } | ||
| 155 | |||
| 156 | long CONF_get_number(LHASH *conf,char *group,char *name) | ||
| 157 | { | ||
| 158 | CONF ctmp; | ||
| 159 | |||
| 160 | if (default_CONF_method == NULL) | ||
| 161 | default_CONF_method = NCONF_default(); | ||
| 162 | |||
| 163 | default_CONF_method->init(&ctmp); | ||
| 164 | ctmp.data = conf; | ||
| 165 | return NCONF_get_number(&ctmp, group, name); | ||
| 166 | } | ||
| 167 | |||
| 168 | void CONF_free(LHASH *conf) | ||
| 169 | { | ||
| 170 | CONF ctmp; | ||
| 171 | |||
| 172 | if (default_CONF_method == NULL) | ||
| 173 | default_CONF_method = NCONF_default(); | ||
| 174 | |||
| 175 | default_CONF_method->init(&ctmp); | ||
| 176 | ctmp.data = conf; | ||
| 177 | NCONF_free_data(&ctmp); | ||
| 178 | } | ||
| 179 | |||
| 180 | #ifndef NO_FP_API | ||
| 181 | int CONF_dump_fp(LHASH *conf, FILE *out) | ||
| 182 | { | ||
| 183 | BIO *btmp; | ||
| 184 | int ret; | ||
| 185 | |||
| 186 | if(!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { | ||
| 187 | CONFerr(CONF_F_CONF_DUMP_FP,ERR_R_BUF_LIB); | ||
| 188 | return 0; | ||
| 189 | } | ||
| 190 | ret = CONF_dump_bio(conf, btmp); | ||
| 191 | BIO_free(btmp); | ||
| 192 | return ret; | ||
| 193 | } | ||
| 194 | #endif | ||
| 195 | |||
| 196 | int CONF_dump_bio(LHASH *conf, BIO *out) | ||
| 197 | { | ||
| 198 | CONF ctmp; | ||
| 199 | |||
| 200 | if (default_CONF_method == NULL) | ||
| 201 | default_CONF_method = NCONF_default(); | ||
| 202 | |||
| 203 | default_CONF_method->init(&ctmp); | ||
| 204 | ctmp.data = conf; | ||
| 205 | return NCONF_dump_bio(&ctmp, out); | ||
| 206 | } | ||
| 207 | |||
| 208 | /* The following section contains the "New CONF" functions. They are | ||
| 209 | completely centralised around a new CONF structure that may contain | ||
| 210 | basically anything, but at least a method pointer and a table of data. | ||
| 211 | These functions are also written in terms of the bridge functions used | ||
| 212 | by the "CONF classic" functions, for consistency. */ | ||
| 213 | |||
| 214 | CONF *NCONF_new(CONF_METHOD *meth) | ||
| 215 | { | ||
| 216 | CONF *ret; | ||
| 217 | |||
| 218 | if (meth == NULL) | ||
| 219 | meth = NCONF_default(); | ||
| 220 | |||
| 221 | ret = meth->create(meth); | ||
| 222 | if (ret == NULL) | ||
| 223 | { | ||
| 224 | CONFerr(CONF_F_NCONF_NEW,ERR_R_MALLOC_FAILURE); | ||
| 225 | return(NULL); | ||
| 226 | } | ||
| 227 | |||
| 228 | return ret; | ||
| 229 | } | ||
| 230 | |||
| 231 | void NCONF_free(CONF *conf) | ||
| 232 | { | ||
| 233 | if (conf == NULL) | ||
| 234 | return; | ||
| 235 | conf->meth->destroy(conf); | ||
| 236 | } | ||
| 237 | |||
| 238 | void NCONF_free_data(CONF *conf) | ||
| 239 | { | ||
| 240 | if (conf == NULL) | ||
| 241 | return; | ||
| 242 | conf->meth->destroy_data(conf); | ||
| 243 | } | ||
| 244 | |||
| 245 | int NCONF_load(CONF *conf, const char *file, long *eline) | ||
| 246 | { | ||
| 247 | int ret; | ||
| 248 | BIO *in=NULL; | ||
| 249 | |||
| 250 | #ifdef VMS | ||
| 251 | in=BIO_new_file(file, "r"); | ||
| 252 | #else | ||
| 253 | in=BIO_new_file(file, "rb"); | ||
| 254 | #endif | ||
| 255 | if (in == NULL) | ||
| 256 | { | ||
| 257 | CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); | ||
| 258 | return 0; | ||
| 259 | } | ||
| 260 | |||
| 261 | ret = NCONF_load_bio(conf, in, eline); | ||
| 262 | BIO_free(in); | ||
| 263 | |||
| 264 | return ret; | ||
| 265 | } | ||
| 266 | |||
| 267 | #ifndef NO_FP_API | ||
| 268 | int NCONF_load_fp(CONF *conf, FILE *fp,long *eline) | ||
| 269 | { | ||
| 270 | BIO *btmp; | ||
| 271 | int ret; | ||
| 272 | if(!(btmp = BIO_new_fp(fp, BIO_NOCLOSE))) | ||
| 273 | { | ||
| 274 | CONFerr(CONF_F_CONF_LOAD_FP,ERR_R_BUF_LIB); | ||
| 275 | return 0; | ||
| 276 | } | ||
| 277 | ret = NCONF_load_bio(conf, btmp, eline); | ||
| 278 | BIO_free(btmp); | ||
| 279 | return ret; | ||
| 280 | } | ||
| 281 | #endif | ||
| 282 | |||
| 283 | int NCONF_load_bio(CONF *conf, BIO *bp,long *eline) | ||
| 284 | { | ||
| 285 | if (conf == NULL) | ||
| 286 | { | ||
| 287 | CONFerr(CONF_F_NCONF_LOAD_BIO,CONF_R_NO_CONF); | ||
| 288 | return 0; | ||
| 289 | } | ||
| 290 | |||
| 291 | return conf->meth->load(conf, bp, eline); | ||
| 292 | } | ||
| 293 | |||
| 294 | STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section) | ||
| 295 | { | ||
| 296 | if (conf == NULL) | ||
| 297 | { | ||
| 298 | CONFerr(CONF_F_NCONF_GET_SECTION,CONF_R_NO_CONF); | ||
| 299 | return NULL; | ||
| 300 | } | ||
| 301 | |||
| 302 | return _CONF_get_section_values(conf, section); | ||
| 303 | } | ||
| 304 | |||
| 305 | char *NCONF_get_string(CONF *conf,char *group,char *name) | ||
| 306 | { | ||
| 307 | if (conf == NULL) | ||
| 308 | { | ||
| 309 | CONFerr(CONF_F_NCONF_GET_STRING,CONF_R_NO_CONF); | ||
| 310 | return NULL; | ||
| 311 | } | ||
| 312 | |||
| 313 | return _CONF_get_string(conf, group, name); | ||
| 314 | } | ||
| 315 | |||
| 316 | long NCONF_get_number(CONF *conf,char *group,char *name) | ||
| 317 | { | ||
| 318 | if (conf == NULL) | ||
| 319 | { | ||
| 320 | CONFerr(CONF_F_NCONF_GET_NUMBER,CONF_R_NO_CONF); | ||
| 321 | return 0; | ||
| 322 | } | ||
| 323 | |||
| 324 | return _CONF_get_number(conf, group, name); | ||
| 325 | } | ||
| 326 | |||
| 327 | #ifndef NO_FP_API | ||
| 328 | int NCONF_dump_fp(CONF *conf, FILE *out) | ||
| 329 | { | ||
| 330 | BIO *btmp; | ||
| 331 | int ret; | ||
| 332 | if(!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { | ||
| 333 | CONFerr(CONF_F_NCONF_DUMP_FP,ERR_R_BUF_LIB); | ||
| 334 | return 0; | ||
| 335 | } | ||
| 336 | ret = NCONF_dump_bio(conf, btmp); | ||
| 337 | BIO_free(btmp); | ||
| 338 | return ret; | ||
| 339 | } | ||
| 340 | #endif | ||
| 341 | |||
| 342 | int NCONF_dump_bio(CONF *conf, BIO *out) | ||
| 343 | { | ||
| 344 | if (conf == NULL) | ||
| 345 | { | ||
| 346 | CONFerr(CONF_F_NCONF_DUMP_BIO,CONF_R_NO_CONF); | ||
| 347 | return 0; | ||
| 348 | } | ||
| 349 | |||
| 350 | return conf->meth->dump(conf, out); | ||
| 351 | } | ||
| 352 | |||
diff --git a/src/lib/libssl/src/crypto/conf/keysets.pl b/src/lib/libssl/src/crypto/conf/keysets.pl index 1aed0c80c4..56669e76ac 100644 --- a/src/lib/libssl/src/crypto/conf/keysets.pl +++ b/src/lib/libssl/src/crypto/conf/keysets.pl | |||
| @@ -3,12 +3,15 @@ | |||
| 3 | $NUMBER=0x01; | 3 | $NUMBER=0x01; |
| 4 | $UPPER=0x02; | 4 | $UPPER=0x02; |
| 5 | $LOWER=0x04; | 5 | $LOWER=0x04; |
| 6 | $EOF=0x08; | 6 | $UNDER=0x100; |
| 7 | $PUNCTUATION=0x200; | ||
| 7 | $WS=0x10; | 8 | $WS=0x10; |
| 8 | $ESC=0x20; | 9 | $ESC=0x20; |
| 9 | $QUOTE=0x40; | 10 | $QUOTE=0x40; |
| 11 | $DQUOTE=0x400; | ||
| 10 | $COMMENT=0x80; | 12 | $COMMENT=0x80; |
| 11 | $UNDER=0x100; | 13 | $FCOMMENT=0x800; |
| 14 | $EOF=0x08; | ||
| 12 | 15 | ||
| 13 | foreach (0 .. 127) | 16 | foreach (0 .. 127) |
| 14 | { | 17 | { |
| @@ -18,44 +21,159 @@ foreach (0 .. 127) | |||
| 18 | $v|=$UPPER if ($c =~ /[A-Z]/); | 21 | $v|=$UPPER if ($c =~ /[A-Z]/); |
| 19 | $v|=$LOWER if ($c =~ /[a-z]/); | 22 | $v|=$LOWER if ($c =~ /[a-z]/); |
| 20 | $v|=$UNDER if ($c =~ /_/); | 23 | $v|=$UNDER if ($c =~ /_/); |
| 21 | $v|=$WS if ($c =~ / \t\r\n/); | 24 | $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/); |
| 25 | $v|=$WS if ($c =~ /[ \t\r\n]/); | ||
| 22 | $v|=$ESC if ($c =~ /\\/); | 26 | $v|=$ESC if ($c =~ /\\/); |
| 23 | $v|=$QUOTE if ($c =~ /['`"]/); | 27 | $v|=$QUOTE if ($c =~ /['`"]/); # for emacs: "`'}/) |
| 24 | $v|=$COMMENT if ($c =~ /\#/); | 28 | $v|=$COMMENT if ($c =~ /\#/); |
| 25 | $v|=$EOF if ($c =~ /\0/); | 29 | $v|=$EOF if ($c =~ /\0/); |
| 26 | 30 | ||
| 27 | push(@V,$v); | 31 | push(@V_def,$v); |
| 32 | } | ||
| 33 | |||
| 34 | foreach (0 .. 127) | ||
| 35 | { | ||
| 36 | $v=0; | ||
| 37 | $c=sprintf("%c",$_); | ||
| 38 | $v|=$NUMBER if ($c =~ /[0-9]/); | ||
| 39 | $v|=$UPPER if ($c =~ /[A-Z]/); | ||
| 40 | $v|=$LOWER if ($c =~ /[a-z]/); | ||
| 41 | $v|=$UNDER if ($c =~ /_/); | ||
| 42 | $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/); | ||
| 43 | $v|=$WS if ($c =~ /[ \t\r\n]/); | ||
| 44 | $v|=$DQUOTE if ($c =~ /["]/); # for emacs: "}/) | ||
| 45 | $v|=$FCOMMENT if ($c =~ /;/); | ||
| 46 | $v|=$EOF if ($c =~ /\0/); | ||
| 47 | |||
| 48 | push(@V_w32,$v); | ||
| 28 | } | 49 | } |
| 29 | 50 | ||
| 30 | print <<"EOF"; | 51 | print <<"EOF"; |
| 52 | /* crypto/conf/conf_def.h */ | ||
| 53 | /* Copyright (C) 1995-1998 Eric Young (eay\@cryptsoft.com) | ||
| 54 | * All rights reserved. | ||
| 55 | * | ||
| 56 | * This package is an SSL implementation written | ||
| 57 | * by Eric Young (eay\@cryptsoft.com). | ||
| 58 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 59 | * | ||
| 60 | * This library is free for commercial and non-commercial use as long as | ||
| 61 | * the following conditions are aheared to. The following conditions | ||
| 62 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 63 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 64 | * included with this distribution is covered by the same copyright terms | ||
| 65 | * except that the holder is Tim Hudson (tjh\@cryptsoft.com). | ||
| 66 | * | ||
| 67 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 68 | * the code are not to be removed. | ||
| 69 | * If this package is used in a product, Eric Young should be given attribution | ||
| 70 | * as the author of the parts of the library used. | ||
| 71 | * This can be in the form of a textual message at program startup or | ||
| 72 | * in documentation (online or textual) provided with the package. | ||
| 73 | * | ||
| 74 | * Redistribution and use in source and binary forms, with or without | ||
| 75 | * modification, are permitted provided that the following conditions | ||
| 76 | * are met: | ||
| 77 | * 1. Redistributions of source code must retain the copyright | ||
| 78 | * notice, this list of conditions and the following disclaimer. | ||
| 79 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 80 | * notice, this list of conditions and the following disclaimer in the | ||
| 81 | * documentation and/or other materials provided with the distribution. | ||
| 82 | * 3. All advertising materials mentioning features or use of this software | ||
| 83 | * must display the following acknowledgement: | ||
| 84 | * "This product includes cryptographic software written by | ||
| 85 | * Eric Young (eay\@cryptsoft.com)" | ||
| 86 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 87 | * being used are not cryptographic related :-). | ||
| 88 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 89 | * the apps directory (application code) you must include an acknowledgement: | ||
| 90 | * "This product includes software written by Tim Hudson (tjh\@cryptsoft.com)" | ||
| 91 | * | ||
| 92 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 93 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 95 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 96 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 97 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 98 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 99 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 100 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 101 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 102 | * SUCH DAMAGE. | ||
| 103 | * | ||
| 104 | * The licence and distribution terms for any publically available version or | ||
| 105 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 106 | * copied and put under another distribution licence | ||
| 107 | * [including the GNU Public Licence.] | ||
| 108 | */ | ||
| 109 | |||
| 110 | /* THIS FILE WAS AUTOMAGICALLY GENERATED! | ||
| 111 | Please modify and use keysets.pl to regenerate it. */ | ||
| 112 | |||
| 31 | #define CONF_NUMBER $NUMBER | 113 | #define CONF_NUMBER $NUMBER |
| 32 | #define CONF_UPPER $UPPER | 114 | #define CONF_UPPER $UPPER |
| 33 | #define CONF_LOWER $LOWER | 115 | #define CONF_LOWER $LOWER |
| 34 | #define CONF_EOF $EOF | 116 | #define CONF_UNDER $UNDER |
| 117 | #define CONF_PUNCTUATION $PUNCTUATION | ||
| 35 | #define CONF_WS $WS | 118 | #define CONF_WS $WS |
| 36 | #define CONF_ESC $ESC | 119 | #define CONF_ESC $ESC |
| 37 | #define CONF_QUOTE $QUOTE | 120 | #define CONF_QUOTE $QUOTE |
| 121 | #define CONF_DQUOTE $DQUOTE | ||
| 38 | #define CONF_COMMENT $COMMENT | 122 | #define CONF_COMMENT $COMMENT |
| 123 | #define CONF_FCOMMENT $FCOMMENT | ||
| 124 | #define CONF_EOF $EOF | ||
| 39 | #define CONF_ALPHA (CONF_UPPER|CONF_LOWER) | 125 | #define CONF_ALPHA (CONF_UPPER|CONF_LOWER) |
| 40 | #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER) | 126 | #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER) |
| 41 | #define CONF_UNDER $UNDER | 127 | #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \\ |
| 128 | CONF_PUNCTUATION) | ||
| 129 | |||
| 130 | #define KEYTYPES(c) ((unsigned short *)((c)->meth_data)) | ||
| 131 | #ifndef CHARSET_EBCDIC | ||
| 132 | #define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_COMMENT) | ||
| 133 | #define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_FCOMMENT) | ||
| 134 | #define IS_EOF(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_EOF) | ||
| 135 | #define IS_ESC(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_ESC) | ||
| 136 | #define IS_NUMBER(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_NUMBER) | ||
| 137 | #define IS_WS(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_WS) | ||
| 138 | #define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_ALPHA_NUMERIC) | ||
| 139 | #define IS_ALPHA_NUMERIC_PUNCT(c,a) \\ | ||
| 140 | (KEYTYPES(c)[(a)&0x7f]&CONF_ALPHA_NUMERIC_PUNCT) | ||
| 141 | #define IS_QUOTE(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_QUOTE) | ||
| 142 | #define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0x7f]&CONF_DQUOTE) | ||
| 143 | |||
| 144 | #else /*CHARSET_EBCDIC*/ | ||
| 42 | 145 | ||
| 43 | #define IS_COMMENT(a) (CONF_COMMENT&(CONF_type[(a)&0x7f])) | 146 | #define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_COMMENT) |
| 44 | #define IS_EOF(a) ((a) == '\\0') | 147 | #define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_FCOMMENT) |
| 45 | #define IS_ESC(a) ((a) == '\\\\') | 148 | #define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_EOF) |
| 46 | #define IS_NUMER(a) (CONF_type[(a)&0x7f]&CONF_NUMBER) | 149 | #define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ESC) |
| 47 | #define IS_WS(a) (CONF_type[(a)&0x7f]&CONF_WS) | 150 | #define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_NUMBER) |
| 48 | #define IS_ALPHA_NUMERIC(a) (CONF_type[(a)&0x7f]&CONF_ALPHA_NUMERIC) | 151 | #define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_WS) |
| 49 | #define IS_QUOTE(a) (CONF_type[(a)&0x7f]&CONF_QUOTE) | 152 | #define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC) |
| 153 | #define IS_ALPHA_NUMERIC_PUNCT(c,a) \\ | ||
| 154 | (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC_PUNCT) | ||
| 155 | #define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_QUOTE) | ||
| 156 | #define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_DQUOTE) | ||
| 157 | #endif /*CHARSET_EBCDIC*/ | ||
| 50 | 158 | ||
| 51 | EOF | 159 | EOF |
| 52 | 160 | ||
| 53 | print "static unsigned short CONF_type[128]={"; | 161 | print "static unsigned short CONF_type_default[128]={"; |
| 162 | |||
| 163 | for ($i=0; $i<128; $i++) | ||
| 164 | { | ||
| 165 | print "\n\t" if ($i % 8) == 0; | ||
| 166 | printf "0x%03X,",$V_def[$i]; | ||
| 167 | } | ||
| 168 | |||
| 169 | print "\n\t};\n\n"; | ||
| 170 | |||
| 171 | print "static unsigned short CONF_type_win32[128]={"; | ||
| 54 | 172 | ||
| 55 | for ($i=0; $i<128; $i++) | 173 | for ($i=0; $i<128; $i++) |
| 56 | { | 174 | { |
| 57 | print "\n\t" if ($i % 8) == 0; | 175 | print "\n\t" if ($i % 8) == 0; |
| 58 | printf "0x%03X,",$V[$i]; | 176 | printf "0x%03X,",$V_w32[$i]; |
| 59 | } | 177 | } |
| 60 | 178 | ||
| 61 | print "\n\t};\n"; | 179 | print "\n\t};\n\n"; |
diff --git a/src/lib/libssl/src/crypto/conf/test.c b/src/lib/libssl/src/crypto/conf/test.c index 9390a48baf..7fab85053e 100644 --- a/src/lib/libssl/src/crypto/conf/test.c +++ b/src/lib/libssl/src/crypto/conf/test.c | |||
| @@ -67,7 +67,10 @@ main() | |||
| 67 | long eline; | 67 | long eline; |
| 68 | char *s,*s2; | 68 | char *s,*s2; |
| 69 | 69 | ||
| 70 | conf=CONF_load(NULL,"openssl.conf",&eline); | 70 | #ifdef USE_WIN32 |
| 71 | CONF_set_default_method(CONF_WIN32); | ||
| 72 | #endif | ||
| 73 | conf=CONF_load(NULL,"ssleay.cnf",&eline); | ||
| 71 | if (conf == NULL) | 74 | if (conf == NULL) |
| 72 | { | 75 | { |
| 73 | ERR_load_crypto_strings(); | 76 | ERR_load_crypto_strings(); |
| @@ -88,5 +91,8 @@ main() | |||
| 88 | s=CONF_get_string(conf,"s_client","cipher1"); | 91 | s=CONF_get_string(conf,"s_client","cipher1"); |
| 89 | printf("s_client:cipher1=%s\n",(s == NULL)?"NULL":s); | 92 | printf("s_client:cipher1=%s\n",(s == NULL)?"NULL":s); |
| 90 | 93 | ||
| 94 | printf("---------------------------- DUMP ------------------------\n"); | ||
| 95 | CONF_dump_fp(conf, stdout); | ||
| 96 | |||
| 91 | exit(0); | 97 | exit(0); |
| 92 | } | 98 | } |
diff --git a/src/lib/libssl/src/crypto/cpt_err.c b/src/lib/libssl/src/crypto/cpt_err.c index dadd8d8d92..7018b74ca0 100644 --- a/src/lib/libssl/src/crypto/cpt_err.c +++ b/src/lib/libssl/src/crypto/cpt_err.c | |||
| @@ -67,6 +67,7 @@ | |||
| 67 | static ERR_STRING_DATA CRYPTO_str_functs[]= | 67 | static ERR_STRING_DATA CRYPTO_str_functs[]= |
| 68 | { | 68 | { |
| 69 | {ERR_PACK(0,CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,0), "CRYPTO_get_ex_new_index"}, | 69 | {ERR_PACK(0,CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,0), "CRYPTO_get_ex_new_index"}, |
| 70 | {ERR_PACK(0,CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,0), "CRYPTO_get_new_dynlockid"}, | ||
| 70 | {ERR_PACK(0,CRYPTO_F_CRYPTO_GET_NEW_LOCKID,0), "CRYPTO_get_new_lockid"}, | 71 | {ERR_PACK(0,CRYPTO_F_CRYPTO_GET_NEW_LOCKID,0), "CRYPTO_get_new_lockid"}, |
| 71 | {ERR_PACK(0,CRYPTO_F_CRYPTO_SET_EX_DATA,0), "CRYPTO_set_ex_data"}, | 72 | {ERR_PACK(0,CRYPTO_F_CRYPTO_SET_EX_DATA,0), "CRYPTO_set_ex_data"}, |
| 72 | {0,NULL} | 73 | {0,NULL} |
| @@ -74,6 +75,7 @@ static ERR_STRING_DATA CRYPTO_str_functs[]= | |||
| 74 | 75 | ||
| 75 | static ERR_STRING_DATA CRYPTO_str_reasons[]= | 76 | static ERR_STRING_DATA CRYPTO_str_reasons[]= |
| 76 | { | 77 | { |
| 78 | {CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK ,"no dynlock create callback"}, | ||
| 77 | {0,NULL} | 79 | {0,NULL} |
| 78 | }; | 80 | }; |
| 79 | 81 | ||
diff --git a/src/lib/libssl/src/crypto/cryptlib.c b/src/lib/libssl/src/crypto/cryptlib.c index a8f29f1e65..9de60fd528 100644 --- a/src/lib/libssl/src/crypto/cryptlib.c +++ b/src/lib/libssl/src/crypto/cryptlib.c | |||
| @@ -60,11 +60,15 @@ | |||
| 60 | #include <string.h> | 60 | #include <string.h> |
| 61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 62 | #include <openssl/crypto.h> | 62 | #include <openssl/crypto.h> |
| 63 | #include <openssl/safestack.h> | ||
| 63 | 64 | ||
| 64 | #if defined(WIN32) || defined(WIN16) | 65 | #if defined(WIN32) || defined(WIN16) |
| 65 | static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */ | 66 | static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */ |
| 66 | #endif | 67 | #endif |
| 67 | 68 | ||
| 69 | DECLARE_STACK_OF(CRYPTO_dynlock) | ||
| 70 | IMPLEMENT_STACK_OF(CRYPTO_dynlock) | ||
| 71 | |||
| 68 | /* real #defines in crypto.h, keep these upto date */ | 72 | /* real #defines in crypto.h, keep these upto date */ |
| 69 | static const char* lock_names[CRYPTO_NUM_LOCKS] = | 73 | static const char* lock_names[CRYPTO_NUM_LOCKS] = |
| 70 | { | 74 | { |
| @@ -94,18 +98,36 @@ static const char* lock_names[CRYPTO_NUM_LOCKS] = | |||
| 94 | "RSA_blinding", | 98 | "RSA_blinding", |
| 95 | "dh", | 99 | "dh", |
| 96 | "debug_malloc2", | 100 | "debug_malloc2", |
| 97 | #if CRYPTO_NUM_LOCKS != 26 | 101 | "dso", |
| 102 | "dynlock", | ||
| 103 | "engine", | ||
| 104 | #if CRYPTO_NUM_LOCKS != 29 | ||
| 98 | # error "Inconsistency between crypto.h and cryptlib.c" | 105 | # error "Inconsistency between crypto.h and cryptlib.c" |
| 99 | #endif | 106 | #endif |
| 100 | }; | 107 | }; |
| 101 | 108 | ||
| 109 | /* This is for applications to allocate new type names in the non-dynamic | ||
| 110 | array of lock names. These are numbered with positive numbers. */ | ||
| 102 | static STACK *app_locks=NULL; | 111 | static STACK *app_locks=NULL; |
| 103 | 112 | ||
| 113 | /* For applications that want a more dynamic way of handling threads, the | ||
| 114 | following stack is used. These are externally numbered with negative | ||
| 115 | numbers. */ | ||
| 116 | static STACK_OF(CRYPTO_dynlock) *dyn_locks=NULL; | ||
| 117 | |||
| 118 | |||
| 104 | static void (MS_FAR *locking_callback)(int mode,int type, | 119 | static void (MS_FAR *locking_callback)(int mode,int type, |
| 105 | const char *file,int line)=NULL; | 120 | const char *file,int line)=NULL; |
| 106 | static int (MS_FAR *add_lock_callback)(int *pointer,int amount, | 121 | static int (MS_FAR *add_lock_callback)(int *pointer,int amount, |
| 107 | int type,const char *file,int line)=NULL; | 122 | int type,const char *file,int line)=NULL; |
| 108 | static unsigned long (MS_FAR *id_callback)(void)=NULL; | 123 | static unsigned long (MS_FAR *id_callback)(void)=NULL; |
| 124 | static struct CRYPTO_dynlock_value *(MS_FAR *dynlock_create_callback) | ||
| 125 | (const char *file,int line)=NULL; | ||
| 126 | static void (MS_FAR *dynlock_lock_callback)(int mode, | ||
| 127 | struct CRYPTO_dynlock_value *l, const char *file,int line)=NULL; | ||
| 128 | static void (MS_FAR *dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l, | ||
| 129 | const char *file,int line)=NULL; | ||
| 130 | |||
| 109 | int CRYPTO_get_new_lockid(char *name) | 131 | int CRYPTO_get_new_lockid(char *name) |
| 110 | { | 132 | { |
| 111 | char *str; | 133 | char *str; |
| @@ -125,10 +147,13 @@ int CRYPTO_get_new_lockid(char *name) | |||
| 125 | return(0); | 147 | return(0); |
| 126 | } | 148 | } |
| 127 | if ((str=BUF_strdup(name)) == NULL) | 149 | if ((str=BUF_strdup(name)) == NULL) |
| 150 | { | ||
| 151 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE); | ||
| 128 | return(0); | 152 | return(0); |
| 153 | } | ||
| 129 | i=sk_push(app_locks,str); | 154 | i=sk_push(app_locks,str); |
| 130 | if (!i) | 155 | if (!i) |
| 131 | Free(str); | 156 | OPENSSL_free(str); |
| 132 | else | 157 | else |
| 133 | i+=CRYPTO_NUM_LOCKS; /* gap of one :-) */ | 158 | i+=CRYPTO_NUM_LOCKS; /* gap of one :-) */ |
| 134 | return(i); | 159 | return(i); |
| @@ -139,6 +164,156 @@ int CRYPTO_num_locks(void) | |||
| 139 | return CRYPTO_NUM_LOCKS; | 164 | return CRYPTO_NUM_LOCKS; |
| 140 | } | 165 | } |
| 141 | 166 | ||
| 167 | int CRYPTO_get_new_dynlockid(void) | ||
| 168 | { | ||
| 169 | int i = 0; | ||
| 170 | CRYPTO_dynlock *pointer = NULL; | ||
| 171 | |||
| 172 | if (dynlock_create_callback == NULL) | ||
| 173 | { | ||
| 174 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK); | ||
| 175 | return(0); | ||
| 176 | } | ||
| 177 | CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK); | ||
| 178 | if ((dyn_locks == NULL) | ||
| 179 | && ((dyn_locks=sk_CRYPTO_dynlock_new_null()) == NULL)) | ||
| 180 | { | ||
| 181 | CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK); | ||
| 182 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE); | ||
| 183 | return(0); | ||
| 184 | } | ||
| 185 | CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK); | ||
| 186 | |||
| 187 | pointer = (CRYPTO_dynlock *)OPENSSL_malloc(sizeof(CRYPTO_dynlock)); | ||
| 188 | if (pointer == NULL) | ||
| 189 | { | ||
| 190 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE); | ||
| 191 | return(0); | ||
| 192 | } | ||
| 193 | pointer->references = 1; | ||
| 194 | pointer->data = dynlock_create_callback(__FILE__,__LINE__); | ||
| 195 | if (pointer->data == NULL) | ||
| 196 | { | ||
| 197 | OPENSSL_free(pointer); | ||
| 198 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE); | ||
| 199 | return(0); | ||
| 200 | } | ||
| 201 | |||
| 202 | CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK); | ||
| 203 | /* First, try to find an existing empty slot */ | ||
| 204 | i=sk_CRYPTO_dynlock_find(dyn_locks,NULL); | ||
| 205 | /* If there was none, push, thereby creating a new one */ | ||
| 206 | if (i == -1) | ||
| 207 | i=sk_CRYPTO_dynlock_push(dyn_locks,pointer); | ||
| 208 | CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK); | ||
| 209 | |||
| 210 | if (!i) | ||
| 211 | { | ||
| 212 | dynlock_destroy_callback(pointer->data,__FILE__,__LINE__); | ||
| 213 | OPENSSL_free(pointer); | ||
| 214 | } | ||
| 215 | else | ||
| 216 | i += 1; /* to avoid 0 */ | ||
| 217 | return -i; | ||
| 218 | } | ||
| 219 | |||
| 220 | void CRYPTO_destroy_dynlockid(int i) | ||
| 221 | { | ||
| 222 | CRYPTO_dynlock *pointer = NULL; | ||
| 223 | if (i) | ||
| 224 | i = -i-1; | ||
| 225 | if (dynlock_destroy_callback == NULL) | ||
| 226 | return; | ||
| 227 | |||
| 228 | CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK); | ||
| 229 | |||
| 230 | if (dyn_locks == NULL || i >= sk_CRYPTO_dynlock_num(dyn_locks)) | ||
| 231 | return; | ||
| 232 | pointer = sk_CRYPTO_dynlock_value(dyn_locks, i); | ||
| 233 | if (pointer != NULL) | ||
| 234 | { | ||
| 235 | --pointer->references; | ||
| 236 | #ifdef REF_CHECK | ||
| 237 | if (pointer->references < 0) | ||
| 238 | { | ||
| 239 | fprintf(stderr,"CRYPTO_destroy_dynlockid, bad reference count\n"); | ||
| 240 | abort(); | ||
| 241 | } | ||
| 242 | else | ||
| 243 | #endif | ||
| 244 | if (--(pointer->references) <= 0) | ||
| 245 | { | ||
| 246 | sk_CRYPTO_dynlock_set(dyn_locks, i, NULL); | ||
| 247 | } | ||
| 248 | else | ||
| 249 | pointer = NULL; | ||
| 250 | } | ||
| 251 | CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK); | ||
| 252 | |||
| 253 | if (pointer) | ||
| 254 | { | ||
| 255 | dynlock_destroy_callback(pointer->data,__FILE__,__LINE__); | ||
| 256 | OPENSSL_free(pointer); | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 260 | struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i) | ||
| 261 | { | ||
| 262 | CRYPTO_dynlock *pointer = NULL; | ||
| 263 | if (i) | ||
| 264 | i = -i-1; | ||
| 265 | |||
| 266 | CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK); | ||
| 267 | |||
| 268 | if (dyn_locks != NULL && i < sk_CRYPTO_dynlock_num(dyn_locks)) | ||
| 269 | pointer = sk_CRYPTO_dynlock_value(dyn_locks, i); | ||
| 270 | if (pointer) | ||
| 271 | pointer->references++; | ||
| 272 | |||
| 273 | CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK); | ||
| 274 | |||
| 275 | if (pointer) | ||
| 276 | return pointer->data; | ||
| 277 | return NULL; | ||
| 278 | } | ||
| 279 | |||
| 280 | struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void)) | ||
| 281 | (const char *file,int line) | ||
| 282 | { | ||
| 283 | return(dynlock_create_callback); | ||
| 284 | } | ||
| 285 | |||
| 286 | void (*CRYPTO_get_dynlock_lock_callback(void))(int mode, | ||
| 287 | struct CRYPTO_dynlock_value *l, const char *file,int line) | ||
| 288 | { | ||
| 289 | return(dynlock_lock_callback); | ||
| 290 | } | ||
| 291 | |||
| 292 | void (*CRYPTO_get_dynlock_destroy_callback(void)) | ||
| 293 | (struct CRYPTO_dynlock_value *l, const char *file,int line) | ||
| 294 | { | ||
| 295 | return(dynlock_destroy_callback); | ||
| 296 | } | ||
| 297 | |||
| 298 | void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*func) | ||
| 299 | (const char *file, int line)) | ||
| 300 | { | ||
| 301 | dynlock_create_callback=func; | ||
| 302 | } | ||
| 303 | |||
| 304 | void CRYPTO_set_dynlock_lock_callback(void (*func)(int mode, | ||
| 305 | struct CRYPTO_dynlock_value *l, const char *file, int line)) | ||
| 306 | { | ||
| 307 | dynlock_lock_callback=func; | ||
| 308 | } | ||
| 309 | |||
| 310 | void CRYPTO_set_dynlock_destroy_callback(void (*func) | ||
| 311 | (struct CRYPTO_dynlock_value *l, const char *file, int line)) | ||
| 312 | { | ||
| 313 | dynlock_destroy_callback=func; | ||
| 314 | } | ||
| 315 | |||
| 316 | |||
| 142 | void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file, | 317 | void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file, |
| 143 | int line) | 318 | int line) |
| 144 | { | 319 | { |
| @@ -219,14 +394,28 @@ void CRYPTO_lock(int mode, int type, const char *file, int line) | |||
| 219 | CRYPTO_get_lock_name(type), file, line); | 394 | CRYPTO_get_lock_name(type), file, line); |
| 220 | } | 395 | } |
| 221 | #endif | 396 | #endif |
| 222 | if (locking_callback != NULL) | 397 | if (type < 0) |
| 223 | locking_callback(mode,type,file,line); | 398 | { |
| 399 | int i = -type - 1; | ||
| 400 | struct CRYPTO_dynlock_value *pointer | ||
| 401 | = CRYPTO_get_dynlock_value(i); | ||
| 402 | |||
| 403 | if (pointer) | ||
| 404 | { | ||
| 405 | dynlock_lock_callback(mode, pointer, file, line); | ||
| 406 | } | ||
| 407 | |||
| 408 | CRYPTO_destroy_dynlockid(i); | ||
| 409 | } | ||
| 410 | else | ||
| 411 | if (locking_callback != NULL) | ||
| 412 | locking_callback(mode,type,file,line); | ||
| 224 | } | 413 | } |
| 225 | 414 | ||
| 226 | int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file, | 415 | int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file, |
| 227 | int line) | 416 | int line) |
| 228 | { | 417 | { |
| 229 | int ret; | 418 | int ret = 0; |
| 230 | 419 | ||
| 231 | if (add_lock_callback != NULL) | 420 | if (add_lock_callback != NULL) |
| 232 | { | 421 | { |
| @@ -265,7 +454,7 @@ int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file, | |||
| 265 | const char *CRYPTO_get_lock_name(int type) | 454 | const char *CRYPTO_get_lock_name(int type) |
| 266 | { | 455 | { |
| 267 | if (type < 0) | 456 | if (type < 0) |
| 268 | return("ERROR"); | 457 | return("dynamic"); |
| 269 | else if (type < CRYPTO_NUM_LOCKS) | 458 | else if (type < CRYPTO_NUM_LOCKS) |
| 270 | return(lock_names[type]); | 459 | return(lock_names[type]); |
| 271 | else if (type-CRYPTO_NUM_LOCKS >= sk_num(app_locks)) | 460 | else if (type-CRYPTO_NUM_LOCKS >= sk_num(app_locks)) |
diff --git a/src/lib/libssl/src/crypto/cryptlib.h b/src/lib/libssl/src/crypto/cryptlib.h index e3d38524ae..5eff5d3141 100644 --- a/src/lib/libssl/src/crypto/cryptlib.h +++ b/src/lib/libssl/src/crypto/cryptlib.h | |||
| @@ -62,10 +62,6 @@ | |||
| 62 | #include <stdlib.h> | 62 | #include <stdlib.h> |
| 63 | #include <string.h> | 63 | #include <string.h> |
| 64 | 64 | ||
| 65 | #ifdef __cplusplus | ||
| 66 | extern "C" { | ||
| 67 | #endif | ||
| 68 | |||
| 69 | #include "openssl/e_os.h" | 65 | #include "openssl/e_os.h" |
| 70 | 66 | ||
| 71 | #include <openssl/crypto.h> | 67 | #include <openssl/crypto.h> |
| @@ -74,6 +70,10 @@ extern "C" { | |||
| 74 | #include <openssl/err.h> | 70 | #include <openssl/err.h> |
| 75 | #include <openssl/opensslconf.h> | 71 | #include <openssl/opensslconf.h> |
| 76 | 72 | ||
| 73 | #ifdef __cplusplus | ||
| 74 | extern "C" { | ||
| 75 | #endif | ||
| 76 | |||
| 77 | #ifndef VMS | 77 | #ifndef VMS |
| 78 | #define X509_CERT_AREA OPENSSLDIR | 78 | #define X509_CERT_AREA OPENSSLDIR |
| 79 | #define X509_CERT_DIR OPENSSLDIR "/certs" | 79 | #define X509_CERT_DIR OPENSSLDIR "/certs" |
diff --git a/src/lib/libssl/src/crypto/crypto-lib.com b/src/lib/libssl/src/crypto/crypto-lib.com index 8ddeafbc06..21d56a4b50 100644 --- a/src/lib/libssl/src/crypto/crypto-lib.com +++ b/src/lib/libssl/src/crypto/crypto-lib.com | |||
| @@ -86,9 +86,9 @@ $ ENDIF | |||
| 86 | $! | 86 | $! |
| 87 | $! Define The Different Encryption Types. | 87 | $! Define The Different Encryption Types. |
| 88 | $! | 88 | $! |
| 89 | $ ENCRYPT_TYPES = "Basic,MD2,MD5,SHA,MDC2,HMAC,RIPEMD,"+ - | 89 | $ ENCRYPT_TYPES = "Basic,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ - |
| 90 | "DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ - | 90 | "DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ - |
| 91 | "BN,RSA,DSA,DH,"+ - | 91 | "BN,RSA,DSA,DH,DSO,ENGINE,"+ - |
| 92 | "BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ - | 92 | "BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ - |
| 93 | "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ - | 93 | "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ - |
| 94 | "CONF,TXT_DB,PKCS7,PKCS12,COMP" | 94 | "CONF,TXT_DB,PKCS7,PKCS12,COMP" |
| @@ -176,6 +176,7 @@ $ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE" | |||
| 176 | $ | 176 | $ |
| 177 | $ LIB_ = "cryptlib,mem,mem_dbg,cversion,ex_data,tmdiff,cpt_err" | 177 | $ LIB_ = "cryptlib,mem,mem_dbg,cversion,ex_data,tmdiff,cpt_err" |
| 178 | $ LIB_MD2 = "md2_dgst,md2_one" | 178 | $ LIB_MD2 = "md2_dgst,md2_one" |
| 179 | $ LIB_MD4 = "md4_dgst,md4_one" | ||
| 179 | $ LIB_MD5 = "md5_dgst,md5_one" | 180 | $ LIB_MD5 = "md5_dgst,md5_one" |
| 180 | $ LIB_SHA = "sha_dgst,sha1dgst,sha_one,sha1_one" | 181 | $ LIB_SHA = "sha_dgst,sha1dgst,sha_one,sha1_one" |
| 181 | $ LIB_MDC2 = "mdc2dgst,mdc2_one" | 182 | $ LIB_MDC2 = "mdc2dgst,mdc2_one" |
| @@ -203,35 +204,35 @@ $ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ - | |||
| 203 | "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null" | 204 | "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null" |
| 204 | $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err,dsa_ossl" | 205 | $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err,dsa_ossl" |
| 205 | $ LIB_DH = "dh_gen,dh_key,dh_lib,dh_check,dh_err" | 206 | $ LIB_DH = "dh_gen,dh_key,dh_lib,dh_check,dh_err" |
| 207 | $ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ - | ||
| 208 | "dso_openssl,dso_win32,dso_vms" | ||
| 209 | $ LIB_ENGINE = "engine_err,engine_lib,engine_list,engine_openssl,"+ - | ||
| 210 | "hw_atalla,hw_cswift,hw_ncipher" | ||
| 206 | $ LIB_BUFFER = "buffer,buf_err" | 211 | $ LIB_BUFFER = "buffer,buf_err" |
| 207 | $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - | 212 | $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - |
| 208 | "bss_mem,bss_null,bss_fd,"+ - | 213 | "bss_mem,bss_null,bss_fd,"+ - |
| 209 | "bss_file,bss_sock,bss_conn,"+ - | 214 | "bss_file,bss_sock,bss_conn,"+ - |
| 210 | "bf_null,bf_buff,b_print,b_dump,"+ - | 215 | "bf_null,bf_buff,b_print,b_dump,"+ - |
| 211 | "b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log" | 216 | "b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log,"+ - |
| 217 | "bf_lbuf" | ||
| 212 | $ LIB_STACK = "stack" | 218 | $ LIB_STACK = "stack" |
| 213 | $ LIB_LHASH = "lhash,lh_stats" | 219 | $ LIB_LHASH = "lhash,lh_stats" |
| 214 | $ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd" | 220 | $ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,rand_win" |
| 215 | $ LIB_ERR = "err,err_all,err_prn" | 221 | $ LIB_ERR = "err,err_all,err_prn" |
| 216 | $ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err" | 222 | $ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err" |
| 217 | $ LIB_EVP = "encode,digest,evp_enc,evp_key,"+ - | 223 | $ LIB_EVP = "encode,digest,evp_enc,evp_key,"+ - |
| 218 | "e_ecb_d,e_cbc_d,e_cfb_d,e_ofb_d,"+ - | 224 | "e_des,e_bf,e_idea,e_des3,"+ - |
| 219 | "e_ecb_i,e_cbc_i,e_cfb_i,e_ofb_i,"+ - | 225 | "e_rc4,names,"+ - |
| 220 | "e_ecb_3d,e_cbc_3d,e_rc4,names,"+ - | 226 | "e_xcbc_d,e_rc2,e_cast,e_rc5" |
| 221 | "e_cfb_3d,e_ofb_3d,e_xcbc_d,"+ - | 227 | $ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1," + - |
| 222 | "e_ecb_r2,e_cbc_r2,e_cfb_r2,e_ofb_r2,"+ - | 228 | "m_dss,m_dss1,m_mdc2,m_ripemd,"+ - |
| 223 | "e_ecb_bf,e_cbc_bf,e_cfb_bf,e_ofb_bf" | ||
| 224 | $ LIB_EVP_2 = "e_ecb_c,e_cbc_c,e_cfb_c,e_ofb_c,"+ - | ||
| 225 | "e_ecb_r5,e_cbc_r5,e_cfb_r5,e_ofb_r5,"+ - | ||
| 226 | "m_null,m_md2,m_md5,m_sha,m_sha1,m_dss,m_dss1,m_mdc2,"+ - | ||
| 227 | "m_ripemd,"+ - | ||
| 228 | "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ - | 229 | "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ - |
| 229 | "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - | 230 | "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - |
| 230 | "c_all,c_allc,c_alld,evp_lib,bio_ok,"+- | 231 | "c_all,c_allc,c_alld,evp_lib,bio_ok,"+- |
| 231 | "evp_pkey,evp_pbe,p5_crpt,p5_crpt2" | 232 | "evp_pkey,evp_pbe,p5_crpt,p5_crpt2" |
| 232 | $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ - | 233 | $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ - |
| 233 | "a_null,a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,a_bmp,"+ - | 234 | "a_null,a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,a_bmp,"+ - |
| 234 | "a_enum,a_vis,a_utf8,a_sign,a_digest,a_verify,a_mbstr,"+ - | 235 | "a_enum,a_vis,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ - |
| 235 | "x_algor,x_val,x_pubkey,x_sig,x_req,x_attrib,"+ - | 236 | "x_algor,x_val,x_pubkey,x_sig,x_req,x_attrib,"+ - |
| 236 | "x_name,x_cinf,x_x509,x_x509a,x_crl,x_info,x_spki,nsseq,"+ - | 237 | "x_name,x_cinf,x_x509,x_x509a,x_crl,x_info,x_spki,nsseq,"+ - |
| 237 | "d2i_r_pr,i2d_r_pr,d2i_r_pu,i2d_r_pu,"+ - | 238 | "d2i_r_pr,i2d_r_pr,d2i_r_pu,i2d_r_pu,"+ - |
| @@ -254,7 +255,7 @@ $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ - | |||
| 254 | $ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ - | 255 | $ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ - |
| 255 | "v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ - | 256 | "v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ - |
| 256 | "v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info" | 257 | "v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info" |
| 257 | $ LIB_CONF = "conf,conf_err" | 258 | $ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def" |
| 258 | $ LIB_TXT_DB = "txt_db" | 259 | $ LIB_TXT_DB = "txt_db" |
| 259 | $ LIB_PKCS7 = "pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,pk7_mime" | 260 | $ LIB_PKCS7 = "pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,pk7_mime" |
| 260 | $ LIB_PKCS12 = "p12_add,p12_attr,p12_bags,p12_crpt,p12_crt,p12_decr,"+ - | 261 | $ LIB_PKCS12 = "p12_add,p12_attr,p12_bags,p12_crpt,p12_crt,p12_decr,"+ - |
| @@ -267,8 +268,8 @@ $! Setup exceptional compilations | |||
| 267 | $! | 268 | $! |
| 268 | $ COMPILEWITH_CC3 = ",bss_rtcp," | 269 | $ COMPILEWITH_CC3 = ",bss_rtcp," |
| 269 | $ COMPILEWITH_CC4 = ",a_utctm,bss_log," | 270 | $ COMPILEWITH_CC4 = ",a_utctm,bss_log," |
| 270 | $ COMPILEWITH_CC5 = ",md2_dgst,md5_dgst,mdc2dgst,sha_dgst,sha1dgst," + - | 271 | $ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + - |
| 271 | "rmd_dgst,bf_enc," | 272 | "sha_dgst,sha1dgst,rmd_dgst,bf_enc," |
| 272 | $! | 273 | $! |
| 273 | $! Check To See If We Are Going To Use RSAREF. | 274 | $! Check To See If We Are Going To Use RSAREF. |
| 274 | $! | 275 | $! |
| @@ -281,10 +282,10 @@ $! | |||
| 281 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]RSAREF.C").EQS."") | 282 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]RSAREF.C").EQS."") |
| 282 | $ THEN | 283 | $ THEN |
| 283 | $! | 284 | $! |
| 284 | $! Tell The User That The File Dosen't Exist. | 285 | $! Tell The User That The File Doesn't Exist. |
| 285 | $! | 286 | $! |
| 286 | $ WRITE SYS$OUTPUT "" | 287 | $ WRITE SYS$OUTPUT "" |
| 287 | $ WRITE SYS$OUTPUT "The File [-.RSAREF]RSAREF.C Dosen't Exist." | 288 | $ WRITE SYS$OUTPUT "The File [-.RSAREF]RSAREF.C Doesn't Exist." |
| 288 | $ WRITE SYS$OUTPUT "" | 289 | $ WRITE SYS$OUTPUT "" |
| 289 | $! | 290 | $! |
| 290 | $! Exit The Build. | 291 | $! Exit The Build. |
| @@ -316,10 +317,10 @@ $! | |||
| 316 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]RSAR_ERR.C").EQS."") | 317 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]RSAR_ERR.C").EQS."") |
| 317 | $ THEN | 318 | $ THEN |
| 318 | $! | 319 | $! |
| 319 | $! Tell The User That The File Dosen't Exist. | 320 | $! Tell The User That The File Doesn't Exist. |
| 320 | $! | 321 | $! |
| 321 | $ WRITE SYS$OUTPUT "" | 322 | $ WRITE SYS$OUTPUT "" |
| 322 | $ WRITE SYS$OUTPUT "The File [-.RSAREF]RSAR_ERR.C Dosen't Exist." | 323 | $ WRITE SYS$OUTPUT "The File [-.RSAREF]RSAR_ERR.C Doesn't Exist." |
| 323 | $ WRITE SYS$OUTPUT "" | 324 | $ WRITE SYS$OUTPUT "" |
| 324 | $! | 325 | $! |
| 325 | $! Exit The Build. | 326 | $! Exit The Build. |
| @@ -532,10 +533,10 @@ $! | |||
| 532 | $ IF (F$SEARCH(SOURCE_FILE).EQS."") | 533 | $ IF (F$SEARCH(SOURCE_FILE).EQS."") |
| 533 | $ THEN | 534 | $ THEN |
| 534 | $! | 535 | $! |
| 535 | $! Tell The User That The File Dosen't Exist. | 536 | $! Tell The User That The File Doesn't Exist. |
| 536 | $! | 537 | $! |
| 537 | $ WRITE SYS$OUTPUT "" | 538 | $ WRITE SYS$OUTPUT "" |
| 538 | $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist." | 539 | $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist." |
| 539 | $ WRITE SYS$OUTPUT "" | 540 | $ WRITE SYS$OUTPUT "" |
| 540 | $! | 541 | $! |
| 541 | $! Exit The Build. | 542 | $! Exit The Build. |
| @@ -918,7 +919,7 @@ $! | |||
| 918 | $ WRITE SYS$OUTPUT "" | 919 | $ WRITE SYS$OUTPUT "" |
| 919 | $ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code." | 920 | $ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code." |
| 920 | $ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to" | 921 | $ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to" |
| 921 | $ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the" | 922 | $ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file doesn't have the" |
| 922 | $ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file" | 923 | $ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file" |
| 923 | $ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory" | 924 | $ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory" |
| 924 | $ WRITE SYS$OUTPUT "as that is where the scripts will look for the files." | 925 | $ WRITE SYS$OUTPUT "as that is where the scripts will look for the files." |
| @@ -1139,7 +1140,7 @@ $ ENDIF | |||
| 1139 | $! | 1140 | $! |
| 1140 | $! Set Up Initial CC Definitions, Possibly With User Ones | 1141 | $! Set Up Initial CC Definitions, Possibly With User Ones |
| 1141 | $! | 1142 | $! |
| 1142 | $ CCDEFS = "VMS=1,TCPIP_TYPE_''P5'" | 1143 | $ CCDEFS = "VMS=1,TCPIP_TYPE_''P5',DSO_VMS" |
| 1143 | $ IF F$TRNLNM("OPENSSL_NO_ASM") THEN CCDEFS = CCDEFS + ",NO_ASM" | 1144 | $ IF F$TRNLNM("OPENSSL_NO_ASM") THEN CCDEFS = CCDEFS + ",NO_ASM" |
| 1144 | $ IF F$TRNLNM("OPENSSL_NO_RSA") THEN CCDEFS = CCDEFS + ",NO_RSA" | 1145 | $ IF F$TRNLNM("OPENSSL_NO_RSA") THEN CCDEFS = CCDEFS + ",NO_RSA" |
| 1145 | $ IF F$TRNLNM("OPENSSL_NO_DSA") THEN CCDEFS = CCDEFS + ",NO_DSA" | 1146 | $ IF F$TRNLNM("OPENSSL_NO_DSA") THEN CCDEFS = CCDEFS + ",NO_DSA" |
| @@ -1195,7 +1196,9 @@ $ CC = "CC" | |||
| 1195 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 1196 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 1196 | THEN CC = "CC/DECC" | 1197 | THEN CC = "CC/DECC" |
| 1197 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | 1198 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - |
| 1198 | "/NOLIST/PREFIX=ALL/INCLUDE=SYS$DISK:[]" + CCEXTRAFLAGS | 1199 | "/NOLIST/PREFIX=ALL" + - |
| 1200 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - | ||
| 1201 | CCEXTRAFLAGS | ||
| 1199 | $! | 1202 | $! |
| 1200 | $! Define The Linker Options File Name. | 1203 | $! Define The Linker Options File Name. |
| 1201 | $! | 1204 | $! |
| @@ -1227,7 +1230,8 @@ $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!" | |||
| 1227 | $ EXIT | 1230 | $ EXIT |
| 1228 | $ ENDIF | 1231 | $ ENDIF |
| 1229 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | 1232 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
| 1230 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST/INCLUDE=SYS$DISK:[]" + - | 1233 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 1234 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - | ||
| 1231 | CCEXTRAFLAGS | 1235 | CCEXTRAFLAGS |
| 1232 | $ CCDEFS = """VAXC""," + CCDEFS | 1236 | $ CCDEFS = """VAXC""," + CCDEFS |
| 1233 | $! | 1237 | $! |
| @@ -1259,7 +1263,8 @@ $! | |||
| 1259 | $! Use GNU C... | 1263 | $! Use GNU C... |
| 1260 | $! | 1264 | $! |
| 1261 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 1265 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 1262 | "/INCLUDE=SYS$DISK:[]" + CCEXTRAFLAGS | 1266 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - |
| 1267 | CCEXTRAFLAGS | ||
| 1263 | $! | 1268 | $! |
| 1264 | $! Define The Linker Options File Name. | 1269 | $! Define The Linker Options File Name. |
| 1265 | $! | 1270 | $! |
diff --git a/src/lib/libssl/src/crypto/crypto.h b/src/lib/libssl/src/crypto/crypto.h index 41c937966e..52ee97b71a 100644 --- a/src/lib/libssl/src/crypto/crypto.h +++ b/src/lib/libssl/src/crypto/crypto.h | |||
| @@ -59,10 +59,6 @@ | |||
| 59 | #ifndef HEADER_CRYPTO_H | 59 | #ifndef HEADER_CRYPTO_H |
| 60 | #define HEADER_CRYPTO_H | 60 | #define HEADER_CRYPTO_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #include <stdlib.h> | 62 | #include <stdlib.h> |
| 67 | 63 | ||
| 68 | #ifndef NO_FP_API | 64 | #ifndef NO_FP_API |
| @@ -77,10 +73,13 @@ extern "C" { | |||
| 77 | #include <openssl/ebcdic.h> | 73 | #include <openssl/ebcdic.h> |
| 78 | #endif | 74 | #endif |
| 79 | 75 | ||
| 80 | #if defined(VMS) || defined(__VMS) | 76 | /* Resolve problems on some operating systems with symbol names that clash |
| 81 | #include "vms_idhacks.h" | 77 | one way or another */ |
| 82 | #endif | 78 | #include <openssl/symhacks.h> |
| 83 | 79 | ||
| 80 | #ifdef __cplusplus | ||
| 81 | extern "C" { | ||
| 82 | #endif | ||
| 84 | 83 | ||
| 85 | /* Backward compatibility to SSLeay */ | 84 | /* Backward compatibility to SSLeay */ |
| 86 | /* This is more to be used to check the correct DLL is being used | 85 | /* This is more to be used to check the correct DLL is being used |
| @@ -121,7 +120,10 @@ extern "C" { | |||
| 121 | #define CRYPTO_LOCK_RSA_BLINDING 23 | 120 | #define CRYPTO_LOCK_RSA_BLINDING 23 |
| 122 | #define CRYPTO_LOCK_DH 24 | 121 | #define CRYPTO_LOCK_DH 24 |
| 123 | #define CRYPTO_LOCK_MALLOC2 25 | 122 | #define CRYPTO_LOCK_MALLOC2 25 |
| 124 | #define CRYPTO_NUM_LOCKS 26 | 123 | #define CRYPTO_LOCK_DSO 26 |
| 124 | #define CRYPTO_LOCK_DYNLOCK 27 | ||
| 125 | #define CRYPTO_LOCK_ENGINE 28 | ||
| 126 | #define CRYPTO_NUM_LOCKS 29 | ||
| 125 | 127 | ||
| 126 | #define CRYPTO_LOCK 1 | 128 | #define CRYPTO_LOCK 1 |
| 127 | #define CRYPTO_UNLOCK 2 | 129 | #define CRYPTO_UNLOCK 2 |
| @@ -149,6 +151,17 @@ extern "C" { | |||
| 149 | #define CRYPTO_add(a,b,c) ((*(a))+=(b)) | 151 | #define CRYPTO_add(a,b,c) ((*(a))+=(b)) |
| 150 | #endif | 152 | #endif |
| 151 | 153 | ||
| 154 | /* Some applications as well as some parts of OpenSSL need to allocate | ||
| 155 | and deallocate locks in a dynamic fashion. The following typedef | ||
| 156 | makes this possible in a type-safe manner. */ | ||
| 157 | /* struct CRYPTO_dynlock_value has to be defined by the application. */ | ||
| 158 | typedef struct | ||
| 159 | { | ||
| 160 | int references; | ||
| 161 | struct CRYPTO_dynlock_value *data; | ||
| 162 | } CRYPTO_dynlock; | ||
| 163 | |||
| 164 | |||
| 152 | /* The following can be used to detect memory leaks in the SSLeay library. | 165 | /* The following can be used to detect memory leaks in the SSLeay library. |
| 153 | * It used, it turns on malloc checking */ | 166 | * It used, it turns on malloc checking */ |
| 154 | 167 | ||
| @@ -230,11 +243,11 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) | |||
| 230 | * unless CRYPTO_MDEBUG is defined) */ | 243 | * unless CRYPTO_MDEBUG is defined) */ |
| 231 | #define CRYPTO_malloc_debug_init() do {\ | 244 | #define CRYPTO_malloc_debug_init() do {\ |
| 232 | CRYPTO_set_mem_debug_functions(\ | 245 | CRYPTO_set_mem_debug_functions(\ |
| 233 | (void (*)())CRYPTO_dbg_malloc,\ | 246 | CRYPTO_dbg_malloc,\ |
| 234 | (void (*)())CRYPTO_dbg_realloc,\ | 247 | CRYPTO_dbg_realloc,\ |
| 235 | (void (*)())CRYPTO_dbg_free,\ | 248 | CRYPTO_dbg_free,\ |
| 236 | (void (*)())CRYPTO_dbg_set_options,\ | 249 | CRYPTO_dbg_set_options,\ |
| 237 | (long (*)())CRYPTO_dbg_get_options);\ | 250 | CRYPTO_dbg_get_options);\ |
| 238 | } while(0) | 251 | } while(0) |
| 239 | 252 | ||
| 240 | int CRYPTO_mem_ctrl(int mode); | 253 | int CRYPTO_mem_ctrl(int mode); |
| @@ -249,22 +262,17 @@ int CRYPTO_is_mem_check_on(void); | |||
| 249 | #define MemCheck_off() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE) | 262 | #define MemCheck_off() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE) |
| 250 | #define is_MemCheck_on() CRYPTO_is_mem_check_on() | 263 | #define is_MemCheck_on() CRYPTO_is_mem_check_on() |
| 251 | 264 | ||
| 252 | #define Malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__) | 265 | #define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__) |
| 253 | #define Realloc(addr,num) \ | 266 | #define OPENSSL_realloc(addr,num) \ |
| 254 | CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__) | 267 | CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__) |
| 255 | #define Remalloc(addr,num) \ | 268 | #define OPENSSL_remalloc(addr,num) \ |
| 256 | CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__) | 269 | CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__) |
| 257 | #define FreeFunc CRYPTO_free | 270 | #define OPENSSL_freeFunc CRYPTO_free |
| 258 | #define Free(addr) CRYPTO_free(addr) | 271 | #define OPENSSL_free(addr) CRYPTO_free(addr) |
| 259 | 272 | ||
| 260 | #define Malloc_locked(num) CRYPTO_malloc_locked((int)num,__FILE__,__LINE__) | 273 | #define OPENSSL_malloc_locked(num) \ |
| 261 | #define Free_locked(addr) CRYPTO_free_locked(addr) | 274 | CRYPTO_malloc_locked((int)num,__FILE__,__LINE__) |
| 262 | 275 | #define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr) | |
| 263 | |||
| 264 | /* Case insensiteve linking causes problems.... */ | ||
| 265 | #if defined(WIN16) || defined(VMS) | ||
| 266 | #define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings | ||
| 267 | #endif | ||
| 268 | 276 | ||
| 269 | 277 | ||
| 270 | const char *SSLeay_version(int type); | 278 | const char *SSLeay_version(int type); |
| @@ -298,14 +306,32 @@ const char *CRYPTO_get_lock_name(int type); | |||
| 298 | int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file, | 306 | int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file, |
| 299 | int line); | 307 | int line); |
| 300 | 308 | ||
| 309 | int CRYPTO_get_new_dynlockid(void); | ||
| 310 | void CRYPTO_destroy_dynlockid(int i); | ||
| 311 | struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i); | ||
| 312 | void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*dyn_create_function)(const char *file, int line)); | ||
| 313 | void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line)); | ||
| 314 | void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)(struct CRYPTO_dynlock_value *l, const char *file, int line)); | ||
| 315 | struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))(const char *file,int line); | ||
| 316 | void (*CRYPTO_get_dynlock_lock_callback(void))(int mode, struct CRYPTO_dynlock_value *l, const char *file,int line); | ||
| 317 | void (*CRYPTO_get_dynlock_destroy_callback(void))(struct CRYPTO_dynlock_value *l, const char *file,int line); | ||
| 318 | |||
| 301 | /* CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- | 319 | /* CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- |
| 302 | * call the latter last if you need different functions */ | 320 | * call the latter last if you need different functions */ |
| 303 | int CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *)); | 321 | int CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *)); |
| 304 | int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*free_func)(void *)); | 322 | int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*free_func)(void *)); |
| 305 | int CRYPTO_set_mem_debug_functions(void (*m)(),void (*r)(),void (*f)(),void (*so)(),long (*go)()); | 323 | int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int), |
| 324 | void (*r)(void *,void *,int,const char *,int,int), | ||
| 325 | void (*f)(void *,int), | ||
| 326 | void (*so)(long), | ||
| 327 | long (*go)(void)); | ||
| 306 | void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *)); | 328 | void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *)); |
| 307 | void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)); | 329 | void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)); |
| 308 | void CRYPTO_get_mem_debug_functions(void (**m)(),void (**r)(),void (**f)(),void (**so)(),long (**go)()); | 330 | void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int), |
| 331 | void (**r)(void *,void *,int,const char *,int,int), | ||
| 332 | void (**f)(void *,int), | ||
| 333 | void (**so)(long), | ||
| 334 | long (**go)(void)); | ||
| 309 | 335 | ||
| 310 | void *CRYPTO_malloc_locked(int num, const char *file, int line); | 336 | void *CRYPTO_malloc_locked(int num, const char *file, int line); |
| 311 | void CRYPTO_free_locked(void *); | 337 | void CRYPTO_free_locked(void *); |
| @@ -348,7 +374,7 @@ void CRYPTO_mem_leaks_fp(FILE *); | |||
| 348 | #endif | 374 | #endif |
| 349 | void CRYPTO_mem_leaks(struct bio_st *bio); | 375 | void CRYPTO_mem_leaks(struct bio_st *bio); |
| 350 | /* unsigned long order, char *file, int line, int num_bytes, char *addr */ | 376 | /* unsigned long order, char *file, int line, int num_bytes, char *addr */ |
| 351 | void CRYPTO_mem_leaks_cb(void (*cb)()); | 377 | void CRYPTO_mem_leaks_cb(void (*cb)(unsigned long, const char *, int, int, void *)); |
| 352 | 378 | ||
| 353 | void ERR_load_CRYPTO_strings(void); | 379 | void ERR_load_CRYPTO_strings(void); |
| 354 | 380 | ||
| @@ -361,10 +387,12 @@ void ERR_load_CRYPTO_strings(void); | |||
| 361 | 387 | ||
| 362 | /* Function codes. */ | 388 | /* Function codes. */ |
| 363 | #define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 | 389 | #define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 |
| 390 | #define CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID 103 | ||
| 364 | #define CRYPTO_F_CRYPTO_GET_NEW_LOCKID 101 | 391 | #define CRYPTO_F_CRYPTO_GET_NEW_LOCKID 101 |
| 365 | #define CRYPTO_F_CRYPTO_SET_EX_DATA 102 | 392 | #define CRYPTO_F_CRYPTO_SET_EX_DATA 102 |
| 366 | 393 | ||
| 367 | /* Reason codes. */ | 394 | /* Reason codes. */ |
| 395 | #define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK 100 | ||
| 368 | 396 | ||
| 369 | #ifdef __cplusplus | 397 | #ifdef __cplusplus |
| 370 | } | 398 | } |
diff --git a/src/lib/libssl/src/crypto/des/Makefile.ssl b/src/lib/libssl/src/crypto/des/Makefile.ssl index 3eb0738b7b..34a360b7ab 100644 --- a/src/lib/libssl/src/crypto/des/Makefile.ssl +++ b/src/lib/libssl/src/crypto/des/Makefile.ssl | |||
| @@ -162,16 +162,19 @@ ede_cbcm_enc.o: ../../include/openssl/opensslconf.h des_locl.h | |||
| 162 | enc_read.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 162 | enc_read.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 163 | enc_read.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 163 | enc_read.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 164 | enc_read.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 164 | enc_read.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 165 | enc_read.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 165 | enc_read.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 166 | enc_read.o: ../../include/openssl/opensslconf.h | ||
| 166 | enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 167 | enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 167 | enc_read.o: ../../include/openssl/stack.h ../cryptlib.h des_locl.h | 168 | enc_read.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 169 | enc_read.o: ../cryptlib.h des_locl.h | ||
| 168 | enc_writ.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 170 | enc_writ.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 169 | enc_writ.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 171 | enc_writ.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 170 | enc_writ.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 172 | enc_writ.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 171 | enc_writ.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 173 | enc_writ.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 174 | enc_writ.o: ../../include/openssl/opensslconf.h | ||
| 172 | enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 175 | enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 173 | enc_writ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 176 | enc_writ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 174 | enc_writ.o: ../cryptlib.h des_locl.h | 177 | enc_writ.o: ../../include/openssl/symhacks.h ../cryptlib.h des_locl.h |
| 175 | fcrypt.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h | 178 | fcrypt.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h |
| 176 | fcrypt.o: ../../include/openssl/opensslconf.h des_locl.h | 179 | fcrypt.o: ../../include/openssl/opensslconf.h des_locl.h |
| 177 | fcrypt_b.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h | 180 | fcrypt_b.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h |
| @@ -193,9 +196,11 @@ read2pwd.o: ../../include/openssl/opensslconf.h des_locl.h | |||
| 193 | read_pwd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 196 | read_pwd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 194 | read_pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 197 | read_pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 195 | read_pwd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 198 | read_pwd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 196 | read_pwd.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 199 | read_pwd.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 200 | read_pwd.o: ../../include/openssl/opensslconf.h | ||
| 197 | read_pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 201 | read_pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 198 | read_pwd.o: ../../include/openssl/stack.h ../cryptlib.h des_locl.h | 202 | read_pwd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 203 | read_pwd.o: ../cryptlib.h des_locl.h | ||
| 199 | rpc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h | 204 | rpc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h |
| 200 | rpc_enc.o: ../../include/openssl/opensslconf.h des_locl.h des_ver.h rpc_des.h | 205 | rpc_enc.o: ../../include/openssl/opensslconf.h des_locl.h des_ver.h rpc_des.h |
| 201 | set_key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h | 206 | set_key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h |
diff --git a/src/lib/libssl/src/crypto/des/des.c b/src/lib/libssl/src/crypto/des/des.c index 0197489c9e..215d7413c0 100644 --- a/src/lib/libssl/src/crypto/des/des.c +++ b/src/lib/libssl/src/crypto/des/des.c | |||
| @@ -374,8 +374,8 @@ void doencryption(void) | |||
| 374 | 374 | ||
| 375 | if (buf == NULL) | 375 | if (buf == NULL) |
| 376 | { | 376 | { |
| 377 | if ( (( buf=Malloc(BUFSIZE+8)) == NULL) || | 377 | if ( (( buf=OPENSSL_malloc(BUFSIZE+8)) == NULL) || |
| 378 | ((obuf=Malloc(BUFSIZE+8)) == NULL)) | 378 | ((obuf=OPENSSL_malloc(BUFSIZE+8)) == NULL)) |
| 379 | { | 379 | { |
| 380 | fputs("Not enough memory\n",stderr); | 380 | fputs("Not enough memory\n",stderr); |
| 381 | Exit=10; | 381 | Exit=10; |
diff --git a/src/lib/libssl/src/crypto/des/des.h b/src/lib/libssl/src/crypto/des/des.h index ead67986d9..2db9748cb4 100644 --- a/src/lib/libssl/src/crypto/des/des.h +++ b/src/lib/libssl/src/crypto/des/des.h | |||
| @@ -59,10 +59,6 @@ | |||
| 59 | #ifndef HEADER_DES_H | 59 | #ifndef HEADER_DES_H |
| 60 | #define HEADER_DES_H | 60 | #define HEADER_DES_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_DES | 62 | #ifdef NO_DES |
| 67 | #error DES is disabled. | 63 | #error DES is disabled. |
| 68 | #endif | 64 | #endif |
| @@ -71,10 +67,13 @@ extern "C" { | |||
| 71 | #error <openssl/des.h> replaces <kerberos/des.h>. | 67 | #error <openssl/des.h> replaces <kerberos/des.h>. |
| 72 | #endif | 68 | #endif |
| 73 | 69 | ||
| 74 | #include <stdio.h> | ||
| 75 | #include <openssl/opensslconf.h> /* DES_LONG */ | 70 | #include <openssl/opensslconf.h> /* DES_LONG */ |
| 76 | #include <openssl/e_os2.h> /* OPENSSL_EXTERN */ | 71 | #include <openssl/e_os2.h> /* OPENSSL_EXTERN */ |
| 77 | 72 | ||
| 73 | #ifdef __cplusplus | ||
| 74 | extern "C" { | ||
| 75 | #endif | ||
| 76 | |||
| 78 | typedef unsigned char des_cblock[8]; | 77 | typedef unsigned char des_cblock[8]; |
| 79 | typedef /* const */ unsigned char const_des_cblock[8]; | 78 | typedef /* const */ unsigned char const_des_cblock[8]; |
| 80 | /* With "const", gcc 2.8.1 on Solaris thinks that des_cblock * | 79 | /* With "const", gcc 2.8.1 on Solaris thinks that des_cblock * |
diff --git a/src/lib/libssl/src/crypto/des/enc_read.c b/src/lib/libssl/src/crypto/des/enc_read.c index 7399ff7269..af2d9177d2 100644 --- a/src/lib/libssl/src/crypto/des/enc_read.c +++ b/src/lib/libssl/src/crypto/des/enc_read.c | |||
| @@ -103,17 +103,17 @@ int des_enc_read(int fd, void *buf, int len, des_key_schedule sched, | |||
| 103 | 103 | ||
| 104 | if (tmpbuf == NULL) | 104 | if (tmpbuf == NULL) |
| 105 | { | 105 | { |
| 106 | tmpbuf=Malloc(BSIZE); | 106 | tmpbuf=OPENSSL_malloc(BSIZE); |
| 107 | if (tmpbuf == NULL) return(-1); | 107 | if (tmpbuf == NULL) return(-1); |
| 108 | } | 108 | } |
| 109 | if (net == NULL) | 109 | if (net == NULL) |
| 110 | { | 110 | { |
| 111 | net=Malloc(BSIZE); | 111 | net=OPENSSL_malloc(BSIZE); |
| 112 | if (net == NULL) return(-1); | 112 | if (net == NULL) return(-1); |
| 113 | } | 113 | } |
| 114 | if (unnet == NULL) | 114 | if (unnet == NULL) |
| 115 | { | 115 | { |
| 116 | unnet=Malloc(BSIZE); | 116 | unnet=OPENSSL_malloc(BSIZE); |
| 117 | if (unnet == NULL) return(-1); | 117 | if (unnet == NULL) return(-1); |
| 118 | } | 118 | } |
| 119 | /* left over data from last decrypt */ | 119 | /* left over data from last decrypt */ |
diff --git a/src/lib/libssl/src/crypto/des/enc_writ.c b/src/lib/libssl/src/crypto/des/enc_writ.c index 4d3452724e..cc2b50fb50 100644 --- a/src/lib/libssl/src/crypto/des/enc_writ.c +++ b/src/lib/libssl/src/crypto/des/enc_writ.c | |||
| @@ -95,7 +95,7 @@ int des_enc_write(int fd, const void *_buf, int len, | |||
| 95 | 95 | ||
| 96 | if (outbuf == NULL) | 96 | if (outbuf == NULL) |
| 97 | { | 97 | { |
| 98 | outbuf=Malloc(BSIZE+HDRSIZE); | 98 | outbuf=OPENSSL_malloc(BSIZE+HDRSIZE); |
| 99 | if (outbuf == NULL) return(-1); | 99 | if (outbuf == NULL) return(-1); |
| 100 | } | 100 | } |
| 101 | /* If we are sending less than 8 bytes, the same char will look | 101 | /* If we are sending less than 8 bytes, the same char will look |
diff --git a/src/lib/libssl/src/crypto/des/qud_cksm.c b/src/lib/libssl/src/crypto/des/qud_cksm.c index 5f0ec5387f..9fff989edb 100644 --- a/src/lib/libssl/src/crypto/des/qud_cksm.c +++ b/src/lib/libssl/src/crypto/des/qud_cksm.c | |||
| @@ -81,13 +81,17 @@ DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[], | |||
| 81 | long l; | 81 | long l; |
| 82 | const unsigned char *cp; | 82 | const unsigned char *cp; |
| 83 | #ifdef _CRAY | 83 | #ifdef _CRAY |
| 84 | short *lp; | 84 | struct lp_st { int a:32; int b:32; } *lp; |
| 85 | #else | 85 | #else |
| 86 | DES_LONG *lp; | 86 | DES_LONG *lp; |
| 87 | #endif | 87 | #endif |
| 88 | 88 | ||
| 89 | if (out_count < 1) out_count=1; | 89 | if (out_count < 1) out_count=1; |
| 90 | #ifdef _CRAY | ||
| 91 | lp = (struct lp_st *) &(output[0])[0]; | ||
| 92 | #else | ||
| 90 | lp = (DES_LONG *) &(output[0])[0]; | 93 | lp = (DES_LONG *) &(output[0])[0]; |
| 94 | #endif | ||
| 91 | 95 | ||
| 92 | z0=Q_B0((*seed)[0])|Q_B1((*seed)[1])|Q_B2((*seed)[2])|Q_B3((*seed)[3]); | 96 | z0=Q_B0((*seed)[0])|Q_B1((*seed)[1])|Q_B2((*seed)[2])|Q_B3((*seed)[3]); |
| 93 | z1=Q_B0((*seed)[4])|Q_B1((*seed)[5])|Q_B2((*seed)[6])|Q_B3((*seed)[7]); | 97 | z1=Q_B0((*seed)[4])|Q_B1((*seed)[5])|Q_B2((*seed)[6])|Q_B3((*seed)[7]); |
| @@ -120,8 +124,14 @@ DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[], | |||
| 120 | { | 124 | { |
| 121 | /* The MIT library assumes that the checksum is | 125 | /* The MIT library assumes that the checksum is |
| 122 | * composed of 2*out_count 32 bit ints */ | 126 | * composed of 2*out_count 32 bit ints */ |
| 127 | #ifdef _CRAY | ||
| 128 | (*lp).a = z0; | ||
| 129 | (*lp).b = z1; | ||
| 130 | lp++; | ||
| 131 | #else | ||
| 123 | *lp++ = z0; | 132 | *lp++ = z0; |
| 124 | *lp++ = z1; | 133 | *lp++ = z1; |
| 134 | #endif | ||
| 125 | } | 135 | } |
| 126 | } | 136 | } |
| 127 | return(z0); | 137 | return(z0); |
diff --git a/src/lib/libssl/src/crypto/des/read_pwd.c b/src/lib/libssl/src/crypto/des/read_pwd.c index fa2d67da64..c27ec336e7 100644 --- a/src/lib/libssl/src/crypto/des/read_pwd.c +++ b/src/lib/libssl/src/crypto/des/read_pwd.c | |||
| @@ -161,7 +161,7 @@ | |||
| 161 | #include <sys/ioctl.h> | 161 | #include <sys/ioctl.h> |
| 162 | #endif | 162 | #endif |
| 163 | 163 | ||
| 164 | #ifdef MSDOS | 164 | #if defined(MSDOS) && !defined(__CYGWIN32__) |
| 165 | #include <conio.h> | 165 | #include <conio.h> |
| 166 | #define fgets(a,b,c) noecho_fgets(a,b,c) | 166 | #define fgets(a,b,c) noecho_fgets(a,b,c) |
| 167 | #endif | 167 | #endif |
| @@ -265,13 +265,17 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt, | |||
| 265 | is_a_tty=1; | 265 | is_a_tty=1; |
| 266 | tty=NULL; | 266 | tty=NULL; |
| 267 | 267 | ||
| 268 | #ifndef MSDOS | 268 | #ifdef MSDOS |
| 269 | if ((tty=fopen("/dev/tty","r")) == NULL) | ||
| 270 | tty=stdin; | ||
| 271 | #else /* MSDOS */ | ||
| 272 | if ((tty=fopen("con","r")) == NULL) | 269 | if ((tty=fopen("con","r")) == NULL) |
| 273 | tty=stdin; | 270 | tty=stdin; |
| 274 | #endif /* MSDOS */ | 271 | #elif defined(MAC_OS_pre_X) |
| 272 | tty=stdin; | ||
| 273 | #else | ||
| 274 | #ifndef MPE | ||
| 275 | if ((tty=fopen("/dev/tty","r")) == NULL) | ||
| 276 | #endif | ||
| 277 | tty=stdin; | ||
| 278 | #endif | ||
| 275 | 279 | ||
| 276 | #if defined(TTY_get) && !defined(VMS) | 280 | #if defined(TTY_get) && !defined(VMS) |
| 277 | if (TTY_get(fileno(tty),&tty_orig) == -1) | 281 | if (TTY_get(fileno(tty),&tty_orig) == -1) |
| @@ -310,8 +314,12 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt, | |||
| 310 | 314 | ||
| 311 | #if defined(TTY_set) && !defined(VMS) | 315 | #if defined(TTY_set) && !defined(VMS) |
| 312 | if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1)) | 316 | if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1)) |
| 317 | #ifdef MPE | ||
| 318 | ; /* MPE lies -- echo really has been disabled */ | ||
| 319 | #else | ||
| 313 | return(-1); | 320 | return(-1); |
| 314 | #endif | 321 | #endif |
| 322 | #endif | ||
| 315 | #ifdef VMS | 323 | #ifdef VMS |
| 316 | tty_new[0] = tty_orig[0]; | 324 | tty_new[0] = tty_orig[0]; |
| 317 | tty_new[1] = tty_orig[1] | TT$M_NOECHO; | 325 | tty_new[1] = tty_orig[1] | TT$M_NOECHO; |
diff --git a/src/lib/libssl/src/crypto/dh/Makefile.ssl b/src/lib/libssl/src/crypto/dh/Makefile.ssl index 8df60872ef..88d0d1748b 100644 --- a/src/lib/libssl/src/crypto/dh/Makefile.ssl +++ b/src/lib/libssl/src/crypto/dh/Makefile.ssl | |||
| @@ -82,31 +82,57 @@ dh_check.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | |||
| 82 | dh_check.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 82 | dh_check.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 83 | dh_check.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h | 83 | dh_check.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h |
| 84 | dh_check.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 84 | dh_check.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 85 | dh_check.o: ../../include/openssl/opensslconf.h | 85 | dh_check.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 86 | dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 86 | dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 87 | dh_check.o: ../../include/openssl/stack.h ../cryptlib.h | 87 | dh_check.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 88 | dh_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 88 | dh_check.o: ../cryptlib.h |
| 89 | dh_err.o: ../../include/openssl/dh.h ../../include/openssl/err.h | 89 | dh_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 90 | dh_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | ||
| 91 | dh_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 90 | dh_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 92 | dh_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 91 | dh_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 93 | dh_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 94 | dh_err.o: ../../include/openssl/symhacks.h | ||
| 92 | dh_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 95 | dh_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 93 | dh_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 96 | dh_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 94 | dh_gen.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h | 97 | dh_gen.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h |
| 95 | dh_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 98 | dh_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 96 | dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 99 | dh_gen.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 97 | dh_gen.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 100 | dh_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 101 | dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 98 | dh_gen.o: ../cryptlib.h | 102 | dh_gen.o: ../cryptlib.h |
| 99 | dh_key.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 103 | dh_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 100 | dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 104 | dh_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 101 | dh_key.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h | 105 | dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 102 | dh_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 106 | dh_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 103 | dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 107 | dh_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 104 | dh_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h | 108 | dh_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 105 | dh_key.o: ../../include/openssl/stack.h ../cryptlib.h | 109 | dh_key.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
| 106 | dh_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 110 | dh_key.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 107 | dh_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 111 | dh_key.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 108 | dh_lib.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h | 112 | dh_key.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 109 | dh_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 113 | dh_key.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 110 | dh_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 114 | dh_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 111 | dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 115 | dh_key.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 112 | dh_lib.o: ../cryptlib.h | 116 | dh_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 117 | dh_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 118 | dh_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 119 | dh_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 120 | dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 121 | dh_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 122 | dh_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 123 | dh_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 124 | dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 125 | dh_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 126 | dh_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 127 | dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
| 128 | dh_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 129 | dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 130 | dh_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 131 | dh_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 132 | dh_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 133 | dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 134 | dh_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 135 | dh_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 136 | dh_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 137 | dh_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 138 | dh_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
diff --git a/src/lib/libssl/src/crypto/dh/dh.h b/src/lib/libssl/src/crypto/dh/dh.h index c15b2ad483..7a8d9f88c2 100644 --- a/src/lib/libssl/src/crypto/dh/dh.h +++ b/src/lib/libssl/src/crypto/dh/dh.h | |||
| @@ -59,19 +59,22 @@ | |||
| 59 | #ifndef HEADER_DH_H | 59 | #ifndef HEADER_DH_H |
| 60 | #define HEADER_DH_H | 60 | #define HEADER_DH_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_DH | 62 | #ifdef NO_DH |
| 67 | #error DH is disabled. | 63 | #error DH is disabled. |
| 68 | #endif | 64 | #endif |
| 69 | 65 | ||
| 66 | #ifndef NO_BIO | ||
| 67 | #include <openssl/bio.h> | ||
| 68 | #endif | ||
| 70 | #include <openssl/bn.h> | 69 | #include <openssl/bn.h> |
| 71 | #include <openssl/crypto.h> | 70 | #include <openssl/crypto.h> |
| 72 | 71 | ||
| 73 | #define DH_FLAG_CACHE_MONT_P 0x01 | 72 | #define DH_FLAG_CACHE_MONT_P 0x01 |
| 74 | 73 | ||
| 74 | #ifdef __cplusplus | ||
| 75 | extern "C" { | ||
| 76 | #endif | ||
| 77 | |||
| 75 | typedef struct dh_st DH; | 78 | typedef struct dh_st DH; |
| 76 | 79 | ||
| 77 | typedef struct dh_method { | 80 | typedef struct dh_method { |
| @@ -112,7 +115,11 @@ struct dh_st | |||
| 112 | 115 | ||
| 113 | int references; | 116 | int references; |
| 114 | CRYPTO_EX_DATA ex_data; | 117 | CRYPTO_EX_DATA ex_data; |
| 118 | #if 0 | ||
| 115 | DH_METHOD *meth; | 119 | DH_METHOD *meth; |
| 120 | #else | ||
| 121 | struct engine_st *engine; | ||
| 122 | #endif | ||
| 116 | }; | 123 | }; |
| 117 | 124 | ||
| 118 | #define DH_GENERATOR_2 2 | 125 | #define DH_GENERATOR_2 2 |
| @@ -147,10 +154,15 @@ struct dh_st | |||
| 147 | 154 | ||
| 148 | DH_METHOD *DH_OpenSSL(void); | 155 | DH_METHOD *DH_OpenSSL(void); |
| 149 | 156 | ||
| 150 | void DH_set_default_method(DH_METHOD *meth); | 157 | void DH_set_default_openssl_method(DH_METHOD *meth); |
| 151 | DH_METHOD *DH_get_default_method(void); | 158 | DH_METHOD *DH_get_default_openssl_method(void); |
| 159 | #if 0 | ||
| 152 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); | 160 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); |
| 153 | DH *DH_new_method(DH_METHOD *meth); | 161 | DH *DH_new_method(DH_METHOD *meth); |
| 162 | #else | ||
| 163 | int DH_set_method(DH *dh, struct engine_st *engine); | ||
| 164 | DH *DH_new_method(struct engine_st *engine); | ||
| 165 | #endif | ||
| 154 | 166 | ||
| 155 | DH * DH_new(void); | 167 | DH * DH_new(void); |
| 156 | void DH_free(DH *dh); | 168 | void DH_free(DH *dh); |
| @@ -169,7 +181,7 @@ int i2d_DHparams(DH *a,unsigned char **pp); | |||
| 169 | #ifndef NO_FP_API | 181 | #ifndef NO_FP_API |
| 170 | int DHparams_print_fp(FILE *fp, DH *x); | 182 | int DHparams_print_fp(FILE *fp, DH *x); |
| 171 | #endif | 183 | #endif |
| 172 | #ifdef HEADER_BIO_H | 184 | #ifndef NO_BIO |
| 173 | int DHparams_print(BIO *bp, DH *x); | 185 | int DHparams_print(BIO *bp, DH *x); |
| 174 | #else | 186 | #else |
| 175 | int DHparams_print(char *bp, DH *x); | 187 | int DHparams_print(char *bp, DH *x); |
diff --git a/src/lib/libssl/src/crypto/dh/dh_key.c b/src/lib/libssl/src/crypto/dh/dh_key.c index 0c7eeaf260..6915d79dcc 100644 --- a/src/lib/libssl/src/crypto/dh/dh_key.c +++ b/src/lib/libssl/src/crypto/dh/dh_key.c | |||
| @@ -61,6 +61,7 @@ | |||
| 61 | #include <openssl/bn.h> | 61 | #include <openssl/bn.h> |
| 62 | #include <openssl/rand.h> | 62 | #include <openssl/rand.h> |
| 63 | #include <openssl/dh.h> | 63 | #include <openssl/dh.h> |
| 64 | #include <openssl/engine.h> | ||
| 64 | 65 | ||
| 65 | static int generate_key(DH *dh); | 66 | static int generate_key(DH *dh); |
| 66 | static int compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); | 67 | static int compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); |
| @@ -72,12 +73,12 @@ static int dh_finish(DH *dh); | |||
| 72 | 73 | ||
| 73 | int DH_generate_key(DH *dh) | 74 | int DH_generate_key(DH *dh) |
| 74 | { | 75 | { |
| 75 | return dh->meth->generate_key(dh); | 76 | return ENGINE_get_DH(dh->engine)->generate_key(dh); |
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh) | 79 | int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh) |
| 79 | { | 80 | { |
| 80 | return dh->meth->compute_key(key, pub_key, dh); | 81 | return ENGINE_get_DH(dh->engine)->compute_key(key, pub_key, dh); |
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | static DH_METHOD dh_ossl = { | 84 | static DH_METHOD dh_ossl = { |
| @@ -137,8 +138,9 @@ static int generate_key(DH *dh) | |||
| 137 | } | 138 | } |
| 138 | mont=(BN_MONT_CTX *)dh->method_mont_p; | 139 | mont=(BN_MONT_CTX *)dh->method_mont_p; |
| 139 | 140 | ||
| 140 | if (!dh->meth->bn_mod_exp(dh, pub_key,dh->g,priv_key,dh->p,&ctx,mont)) | 141 | if (!ENGINE_get_DH(dh->engine)->bn_mod_exp(dh, pub_key, dh->g, |
| 141 | goto err; | 142 | priv_key,dh->p,&ctx,mont)) |
| 143 | goto err; | ||
| 142 | 144 | ||
| 143 | dh->pub_key=pub_key; | 145 | dh->pub_key=pub_key; |
| 144 | dh->priv_key=priv_key; | 146 | dh->priv_key=priv_key; |
| @@ -177,7 +179,8 @@ static int compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh) | |||
| 177 | } | 179 | } |
| 178 | 180 | ||
| 179 | mont=(BN_MONT_CTX *)dh->method_mont_p; | 181 | mont=(BN_MONT_CTX *)dh->method_mont_p; |
| 180 | if (!dh->meth->bn_mod_exp(dh, tmp,pub_key,dh->priv_key,dh->p,&ctx,mont)) | 182 | if (!ENGINE_get_DH(dh->engine)->bn_mod_exp(dh, tmp, pub_key, |
| 183 | dh->priv_key,dh->p,&ctx,mont)) | ||
| 181 | { | 184 | { |
| 182 | DHerr(DH_F_DH_COMPUTE_KEY,ERR_R_BN_LIB); | 185 | DHerr(DH_F_DH_COMPUTE_KEY,ERR_R_BN_LIB); |
| 183 | goto err; | 186 | goto err; |
| @@ -193,19 +196,26 @@ err: | |||
| 193 | static int dh_bn_mod_exp(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 196 | static int dh_bn_mod_exp(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, |
| 194 | const BIGNUM *m, BN_CTX *ctx, | 197 | const BIGNUM *m, BN_CTX *ctx, |
| 195 | BN_MONT_CTX *m_ctx) | 198 | BN_MONT_CTX *m_ctx) |
| 196 | { | 199 | { |
| 197 | return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx); | 200 | if (a->top == 1) |
| 198 | } | 201 | { |
| 202 | BN_ULONG A = a->d[0]; | ||
| 203 | return BN_mod_exp_mont_word(r,A,p,m,ctx,m_ctx); | ||
| 204 | } | ||
| 205 | else | ||
| 206 | return BN_mod_exp_mont(r,a,p,m,ctx,m_ctx); | ||
| 207 | } | ||
| 208 | |||
| 199 | 209 | ||
| 200 | static int dh_init(DH *dh) | 210 | static int dh_init(DH *dh) |
| 201 | { | 211 | { |
| 202 | dh->flags |= DH_FLAG_CACHE_MONT_P; | 212 | dh->flags |= DH_FLAG_CACHE_MONT_P; |
| 203 | return(1); | 213 | return(1); |
| 204 | } | 214 | } |
| 205 | 215 | ||
| 206 | static int dh_finish(DH *dh) | 216 | static int dh_finish(DH *dh) |
| 207 | { | 217 | { |
| 208 | if(dh->method_mont_p) | 218 | if(dh->method_mont_p) |
| 209 | BN_MONT_CTX_free((BN_MONT_CTX *)dh->method_mont_p); | 219 | BN_MONT_CTX_free((BN_MONT_CTX *)dh->method_mont_p); |
| 210 | return(1); | 220 | return(1); |
| 211 | } | 221 | } |
diff --git a/src/lib/libssl/src/crypto/dh/dh_lib.c b/src/lib/libssl/src/crypto/dh/dh_lib.c index 6c21463028..66803b5565 100644 --- a/src/lib/libssl/src/crypto/dh/dh_lib.c +++ b/src/lib/libssl/src/crypto/dh/dh_lib.c | |||
| @@ -60,6 +60,7 @@ | |||
| 60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 61 | #include <openssl/bn.h> | 61 | #include <openssl/bn.h> |
| 62 | #include <openssl/dh.h> | 62 | #include <openssl/dh.h> |
| 63 | #include <openssl/engine.h> | ||
| 63 | 64 | ||
| 64 | const char *DH_version="Diffie-Hellman" OPENSSL_VERSION_PTEXT; | 65 | const char *DH_version="Diffie-Hellman" OPENSSL_VERSION_PTEXT; |
| 65 | 66 | ||
| @@ -67,17 +68,32 @@ static DH_METHOD *default_DH_method; | |||
| 67 | static int dh_meth_num = 0; | 68 | static int dh_meth_num = 0; |
| 68 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dh_meth = NULL; | 69 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dh_meth = NULL; |
| 69 | 70 | ||
| 70 | void DH_set_default_method(DH_METHOD *meth) | 71 | void DH_set_default_openssl_method(DH_METHOD *meth) |
| 71 | { | 72 | { |
| 72 | default_DH_method = meth; | 73 | ENGINE *e; |
| 74 | /* We'll need to notify the "openssl" ENGINE of this | ||
| 75 | * change too. We won't bother locking things down at | ||
| 76 | * our end as there was never any locking in these | ||
| 77 | * functions! */ | ||
| 78 | if(default_DH_method != meth) | ||
| 79 | { | ||
| 80 | default_DH_method = meth; | ||
| 81 | e = ENGINE_by_id("openssl"); | ||
| 82 | if(e) | ||
| 83 | { | ||
| 84 | ENGINE_set_DH(e, meth); | ||
| 85 | ENGINE_free(e); | ||
| 86 | } | ||
| 87 | } | ||
| 73 | } | 88 | } |
| 74 | 89 | ||
| 75 | DH_METHOD *DH_get_default_method(void) | 90 | DH_METHOD *DH_get_default_openssl_method(void) |
| 76 | { | 91 | { |
| 77 | if(!default_DH_method) default_DH_method = DH_OpenSSL(); | 92 | if(!default_DH_method) default_DH_method = DH_OpenSSL(); |
| 78 | return default_DH_method; | 93 | return default_DH_method; |
| 79 | } | 94 | } |
| 80 | 95 | ||
| 96 | #if 0 | ||
| 81 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth) | 97 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth) |
| 82 | { | 98 | { |
| 83 | DH_METHOD *mtmp; | 99 | DH_METHOD *mtmp; |
| @@ -87,25 +103,56 @@ DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth) | |||
| 87 | if (meth->init) meth->init(dh); | 103 | if (meth->init) meth->init(dh); |
| 88 | return mtmp; | 104 | return mtmp; |
| 89 | } | 105 | } |
| 106 | #else | ||
| 107 | int DH_set_method(DH *dh, ENGINE *engine) | ||
| 108 | { | ||
| 109 | ENGINE *mtmp; | ||
| 110 | DH_METHOD *meth; | ||
| 111 | mtmp = dh->engine; | ||
| 112 | meth = ENGINE_get_DH(mtmp); | ||
| 113 | if (!ENGINE_init(engine)) | ||
| 114 | return 0; | ||
| 115 | if (meth->finish) meth->finish(dh); | ||
| 116 | dh->engine= engine; | ||
| 117 | meth = ENGINE_get_DH(engine); | ||
| 118 | if (meth->init) meth->init(dh); | ||
| 119 | /* SHOULD ERROR CHECK THIS!!! */ | ||
| 120 | ENGINE_finish(mtmp); | ||
| 121 | return 1; | ||
| 122 | } | ||
| 123 | #endif | ||
| 90 | 124 | ||
| 91 | DH *DH_new(void) | 125 | DH *DH_new(void) |
| 92 | { | 126 | { |
| 93 | return DH_new_method(NULL); | 127 | return DH_new_method(NULL); |
| 94 | } | 128 | } |
| 95 | 129 | ||
| 130 | #if 0 | ||
| 96 | DH *DH_new_method(DH_METHOD *meth) | 131 | DH *DH_new_method(DH_METHOD *meth) |
| 132 | #else | ||
| 133 | DH *DH_new_method(ENGINE *engine) | ||
| 134 | #endif | ||
| 97 | { | 135 | { |
| 136 | DH_METHOD *meth; | ||
| 98 | DH *ret; | 137 | DH *ret; |
| 99 | ret=(DH *)Malloc(sizeof(DH)); | 138 | ret=(DH *)OPENSSL_malloc(sizeof(DH)); |
| 100 | 139 | ||
| 101 | if (ret == NULL) | 140 | if (ret == NULL) |
| 102 | { | 141 | { |
| 103 | DHerr(DH_F_DH_NEW,ERR_R_MALLOC_FAILURE); | 142 | DHerr(DH_F_DH_NEW,ERR_R_MALLOC_FAILURE); |
| 104 | return(NULL); | 143 | return(NULL); |
| 105 | } | 144 | } |
| 106 | if(!default_DH_method) default_DH_method = DH_OpenSSL(); | 145 | if(engine) |
| 107 | if(meth) ret->meth = meth; | 146 | ret->engine = engine; |
| 108 | else ret->meth = default_DH_method; | 147 | else |
| 148 | { | ||
| 149 | if((ret->engine=ENGINE_get_default_DH()) == NULL) | ||
| 150 | { | ||
| 151 | OPENSSL_free(ret); | ||
| 152 | return NULL; | ||
| 153 | } | ||
| 154 | } | ||
| 155 | meth = ENGINE_get_DH(ret->engine); | ||
| 109 | ret->pad=0; | 156 | ret->pad=0; |
| 110 | ret->version=0; | 157 | ret->version=0; |
| 111 | ret->p=NULL; | 158 | ret->p=NULL; |
| @@ -120,10 +167,10 @@ DH *DH_new_method(DH_METHOD *meth) | |||
| 120 | ret->counter = NULL; | 167 | ret->counter = NULL; |
| 121 | ret->method_mont_p=NULL; | 168 | ret->method_mont_p=NULL; |
| 122 | ret->references = 1; | 169 | ret->references = 1; |
| 123 | ret->flags=ret->meth->flags; | 170 | ret->flags=meth->flags; |
| 124 | if ((ret->meth->init != NULL) && !ret->meth->init(ret)) | 171 | if ((meth->init != NULL) && !meth->init(ret)) |
| 125 | { | 172 | { |
| 126 | Free(ret); | 173 | OPENSSL_free(ret); |
| 127 | ret=NULL; | 174 | ret=NULL; |
| 128 | } | 175 | } |
| 129 | else | 176 | else |
| @@ -133,6 +180,7 @@ DH *DH_new_method(DH_METHOD *meth) | |||
| 133 | 180 | ||
| 134 | void DH_free(DH *r) | 181 | void DH_free(DH *r) |
| 135 | { | 182 | { |
| 183 | DH_METHOD *meth; | ||
| 136 | int i; | 184 | int i; |
| 137 | if(r == NULL) return; | 185 | if(r == NULL) return; |
| 138 | i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH); | 186 | i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH); |
| @@ -150,17 +198,19 @@ void DH_free(DH *r) | |||
| 150 | 198 | ||
| 151 | CRYPTO_free_ex_data(dh_meth, r, &r->ex_data); | 199 | CRYPTO_free_ex_data(dh_meth, r, &r->ex_data); |
| 152 | 200 | ||
| 153 | if(r->meth->finish) r->meth->finish(r); | 201 | meth = ENGINE_get_DH(r->engine); |
| 202 | if(meth->finish) meth->finish(r); | ||
| 203 | ENGINE_finish(r->engine); | ||
| 154 | 204 | ||
| 155 | if (r->p != NULL) BN_clear_free(r->p); | 205 | if (r->p != NULL) BN_clear_free(r->p); |
| 156 | if (r->g != NULL) BN_clear_free(r->g); | 206 | if (r->g != NULL) BN_clear_free(r->g); |
| 157 | if (r->q != NULL) BN_clear_free(r->q); | 207 | if (r->q != NULL) BN_clear_free(r->q); |
| 158 | if (r->j != NULL) BN_clear_free(r->j); | 208 | if (r->j != NULL) BN_clear_free(r->j); |
| 159 | if (r->seed) Free(r->seed); | 209 | if (r->seed) OPENSSL_free(r->seed); |
| 160 | if (r->counter != NULL) BN_clear_free(r->counter); | 210 | if (r->counter != NULL) BN_clear_free(r->counter); |
| 161 | if (r->pub_key != NULL) BN_clear_free(r->pub_key); | 211 | if (r->pub_key != NULL) BN_clear_free(r->pub_key); |
| 162 | if (r->priv_key != NULL) BN_clear_free(r->priv_key); | 212 | if (r->priv_key != NULL) BN_clear_free(r->priv_key); |
| 163 | Free(r); | 213 | OPENSSL_free(r); |
| 164 | } | 214 | } |
| 165 | 215 | ||
| 166 | int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 216 | int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
diff --git a/src/lib/libssl/src/crypto/dh/dhtest.c b/src/lib/libssl/src/crypto/dh/dhtest.c index d66c28455e..f0151253d7 100644 --- a/src/lib/libssl/src/crypto/dh/dhtest.c +++ b/src/lib/libssl/src/crypto/dh/dhtest.c | |||
| @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) | |||
| 140 | BIO_puts(out,"\n"); | 140 | BIO_puts(out,"\n"); |
| 141 | 141 | ||
| 142 | alen=DH_size(a); | 142 | alen=DH_size(a); |
| 143 | abuf=(unsigned char *)Malloc(alen); | 143 | abuf=(unsigned char *)OPENSSL_malloc(alen); |
| 144 | aout=DH_compute_key(abuf,b->pub_key,a); | 144 | aout=DH_compute_key(abuf,b->pub_key,a); |
| 145 | 145 | ||
| 146 | BIO_puts(out,"key1 ="); | 146 | BIO_puts(out,"key1 ="); |
| @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) | |||
| 152 | BIO_puts(out,"\n"); | 152 | BIO_puts(out,"\n"); |
| 153 | 153 | ||
| 154 | blen=DH_size(b); | 154 | blen=DH_size(b); |
| 155 | bbuf=(unsigned char *)Malloc(blen); | 155 | bbuf=(unsigned char *)OPENSSL_malloc(blen); |
| 156 | bout=DH_compute_key(bbuf,a->pub_key,b); | 156 | bout=DH_compute_key(bbuf,a->pub_key,b); |
| 157 | 157 | ||
| 158 | BIO_puts(out,"key2 ="); | 158 | BIO_puts(out,"key2 ="); |
| @@ -170,8 +170,8 @@ int main(int argc, char *argv[]) | |||
| 170 | else | 170 | else |
| 171 | ret=0; | 171 | ret=0; |
| 172 | err: | 172 | err: |
| 173 | if (abuf != NULL) Free(abuf); | 173 | if (abuf != NULL) OPENSSL_free(abuf); |
| 174 | if (bbuf != NULL) Free(bbuf); | 174 | if (bbuf != NULL) OPENSSL_free(bbuf); |
| 175 | if(b != NULL) DH_free(b); | 175 | if(b != NULL) DH_free(b); |
| 176 | if(a != NULL) DH_free(a); | 176 | if(a != NULL) DH_free(a); |
| 177 | BIO_free(out); | 177 | BIO_free(out); |
diff --git a/src/lib/libssl/src/crypto/dsa/Makefile.ssl b/src/lib/libssl/src/crypto/dsa/Makefile.ssl index b0bcf974fb..dac582be00 100644 --- a/src/lib/libssl/src/crypto/dsa/Makefile.ssl +++ b/src/lib/libssl/src/crypto/dsa/Makefile.ssl | |||
| @@ -85,62 +85,105 @@ dsa_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | |||
| 85 | dsa_asn1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 85 | dsa_asn1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 86 | dsa_asn1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 86 | dsa_asn1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 87 | dsa_asn1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 87 | dsa_asn1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 88 | dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 88 | dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 89 | dsa_asn1.o: ../../include/openssl/opensslconf.h | ||
| 89 | dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 90 | dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 90 | dsa_asn1.o: ../../include/openssl/stack.h ../cryptlib.h | 91 | dsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 91 | dsa_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 92 | dsa_asn1.o: ../cryptlib.h |
| 92 | dsa_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 93 | dsa_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 93 | dsa_err.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 94 | dsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 95 | dsa_err.o: ../../include/openssl/dsa.h ../../include/openssl/err.h | ||
| 96 | dsa_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 94 | dsa_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 97 | dsa_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 95 | dsa_err.o: ../../include/openssl/stack.h | 98 | dsa_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 96 | dsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 99 | dsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 97 | dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 100 | dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 98 | dsa_gen.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 101 | dsa_gen.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 99 | dsa_gen.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 102 | dsa_gen.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 100 | dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 103 | dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 101 | dsa_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 104 | dsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 102 | dsa_gen.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 105 | dsa_gen.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h |
| 103 | dsa_gen.o: ../../include/openssl/stack.h ../cryptlib.h | 106 | dsa_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 107 | dsa_gen.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 104 | dsa_key.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 108 | dsa_key.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 105 | dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 109 | dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 106 | dsa_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 110 | dsa_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 107 | dsa_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 111 | dsa_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 108 | dsa_key.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 112 | dsa_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 109 | dsa_key.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 113 | dsa_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 110 | dsa_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 114 | dsa_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h |
| 111 | dsa_key.o: ../../include/openssl/stack.h ../cryptlib.h | 115 | dsa_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 116 | dsa_key.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 112 | dsa_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 117 | dsa_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 113 | dsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 118 | dsa_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 114 | dsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | 119 | dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 115 | dsa_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 120 | dsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 116 | dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 121 | dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 117 | dsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 122 | dsa_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 118 | dsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 123 | dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
| 119 | dsa_lib.o: ../cryptlib.h | 124 | dsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 125 | dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 126 | dsa_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 127 | dsa_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 128 | dsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 129 | dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 130 | dsa_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 131 | dsa_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 132 | dsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 133 | dsa_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 134 | dsa_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 120 | dsa_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 135 | dsa_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 121 | dsa_ossl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 136 | dsa_ossl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 122 | dsa_ossl.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | 137 | dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 123 | dsa_ossl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 138 | dsa_ossl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 124 | dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 139 | dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 125 | dsa_ossl.o: ../../include/openssl/opensslconf.h | 140 | dsa_ossl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 141 | dsa_ossl.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
| 142 | dsa_ossl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 143 | dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 144 | dsa_ossl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 145 | dsa_ossl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 146 | dsa_ossl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 126 | dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 147 | dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 127 | dsa_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 148 | dsa_ossl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 128 | dsa_ossl.o: ../cryptlib.h | 149 | dsa_ossl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 150 | dsa_ossl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 151 | dsa_ossl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 152 | dsa_ossl.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 129 | dsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 153 | dsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 130 | dsa_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 154 | dsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 131 | dsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | 155 | dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 132 | dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 156 | dsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 133 | dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 157 | dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 134 | dsa_sign.o: ../../include/openssl/opensslconf.h | 158 | dsa_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 159 | dsa_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
| 160 | dsa_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 161 | dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 162 | dsa_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 163 | dsa_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 164 | dsa_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 135 | dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 165 | dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 136 | dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 166 | dsa_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 137 | dsa_sign.o: ../cryptlib.h | 167 | dsa_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 168 | dsa_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 169 | dsa_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 170 | dsa_sign.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 138 | dsa_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 171 | dsa_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 139 | dsa_vrf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 172 | dsa_vrf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 140 | dsa_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 173 | dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 141 | dsa_vrf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 174 | dsa_vrf.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h |
| 142 | dsa_vrf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 175 | dsa_vrf.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 143 | dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 176 | dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 144 | dsa_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 177 | dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
| 145 | dsa_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 178 | dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 179 | dsa_vrf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 180 | dsa_vrf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 181 | dsa_vrf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 182 | dsa_vrf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 183 | dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 184 | dsa_vrf.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
| 185 | dsa_vrf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 186 | dsa_vrf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 187 | dsa_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 188 | dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 146 | dsa_vrf.o: ../cryptlib.h | 189 | dsa_vrf.o: ../cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/dsa/dsa.h b/src/lib/libssl/src/crypto/dsa/dsa.h index 68d9912cbc..65689a3426 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa.h +++ b/src/lib/libssl/src/crypto/dsa/dsa.h | |||
| @@ -65,14 +65,13 @@ | |||
| 65 | #ifndef HEADER_DSA_H | 65 | #ifndef HEADER_DSA_H |
| 66 | #define HEADER_DSA_H | 66 | #define HEADER_DSA_H |
| 67 | 67 | ||
| 68 | #ifdef __cplusplus | ||
| 69 | extern "C" { | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #ifdef NO_DSA | 68 | #ifdef NO_DSA |
| 73 | #error DSA is disabled. | 69 | #error DSA is disabled. |
| 74 | #endif | 70 | #endif |
| 75 | 71 | ||
| 72 | #ifndef NO_BIO | ||
| 73 | #include <openssl/bio.h> | ||
| 74 | #endif | ||
| 76 | #include <openssl/bn.h> | 75 | #include <openssl/bn.h> |
| 77 | #include <openssl/crypto.h> | 76 | #include <openssl/crypto.h> |
| 78 | #ifndef NO_DH | 77 | #ifndef NO_DH |
| @@ -81,6 +80,10 @@ extern "C" { | |||
| 81 | 80 | ||
| 82 | #define DSA_FLAG_CACHE_MONT_P 0x01 | 81 | #define DSA_FLAG_CACHE_MONT_P 0x01 |
| 83 | 82 | ||
| 83 | #ifdef __cplusplus | ||
| 84 | extern "C" { | ||
| 85 | #endif | ||
| 86 | |||
| 84 | typedef struct dsa_st DSA; | 87 | typedef struct dsa_st DSA; |
| 85 | 88 | ||
| 86 | typedef struct DSA_SIG_st | 89 | typedef struct DSA_SIG_st |
| @@ -130,7 +133,11 @@ struct dsa_st | |||
| 130 | char *method_mont_p; | 133 | char *method_mont_p; |
| 131 | int references; | 134 | int references; |
| 132 | CRYPTO_EX_DATA ex_data; | 135 | CRYPTO_EX_DATA ex_data; |
| 136 | #if 0 | ||
| 133 | DSA_METHOD *meth; | 137 | DSA_METHOD *meth; |
| 138 | #else | ||
| 139 | struct engine_st *engine; | ||
| 140 | #endif | ||
| 134 | }; | 141 | }; |
| 135 | 142 | ||
| 136 | #define DSAparams_dup(x) (DSA *)ASN1_dup((int (*)())i2d_DSAparams, \ | 143 | #define DSAparams_dup(x) (DSA *)ASN1_dup((int (*)())i2d_DSAparams, \ |
| @@ -156,12 +163,20 @@ int DSA_do_verify(const unsigned char *dgst,int dgst_len, | |||
| 156 | 163 | ||
| 157 | DSA_METHOD *DSA_OpenSSL(void); | 164 | DSA_METHOD *DSA_OpenSSL(void); |
| 158 | 165 | ||
| 159 | void DSA_set_default_method(DSA_METHOD *); | 166 | void DSA_set_default_openssl_method(DSA_METHOD *); |
| 160 | DSA_METHOD *DSA_get_default_method(void); | 167 | DSA_METHOD *DSA_get_default_openssl_method(void); |
| 168 | #if 0 | ||
| 161 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *); | 169 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *); |
| 170 | #else | ||
| 171 | int DSA_set_method(DSA *dsa, struct engine_st *engine); | ||
| 172 | #endif | ||
| 162 | 173 | ||
| 163 | DSA * DSA_new(void); | 174 | DSA * DSA_new(void); |
| 175 | #if 0 | ||
| 164 | DSA * DSA_new_method(DSA_METHOD *meth); | 176 | DSA * DSA_new_method(DSA_METHOD *meth); |
| 177 | #else | ||
| 178 | DSA * DSA_new_method(struct engine_st *engine); | ||
| 179 | #endif | ||
| 165 | int DSA_size(DSA *); | 180 | int DSA_size(DSA *); |
| 166 | /* next 4 return -1 on error */ | 181 | /* next 4 return -1 on error */ |
| 167 | int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); | 182 | int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); |
| @@ -188,7 +203,7 @@ int i2d_DSAPublicKey(DSA *a, unsigned char **pp); | |||
| 188 | int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); | 203 | int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); |
| 189 | int i2d_DSAparams(DSA *a,unsigned char **pp); | 204 | int i2d_DSAparams(DSA *a,unsigned char **pp); |
| 190 | 205 | ||
| 191 | #ifdef HEADER_BIO_H | 206 | #ifndef NO_BIO |
| 192 | int DSAparams_print(BIO *bp, DSA *x); | 207 | int DSAparams_print(BIO *bp, DSA *x); |
| 193 | int DSA_print(BIO *bp, DSA *x, int off); | 208 | int DSA_print(BIO *bp, DSA *x, int off); |
| 194 | #endif | 209 | #endif |
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_asn1.c b/src/lib/libssl/src/crypto/dsa/dsa_asn1.c index c9b32b4db7..a76c8f7c7e 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_asn1.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_asn1.c | |||
| @@ -10,7 +10,7 @@ DSA_SIG *DSA_SIG_new(void) | |||
| 10 | { | 10 | { |
| 11 | DSA_SIG *ret; | 11 | DSA_SIG *ret; |
| 12 | 12 | ||
| 13 | ret = Malloc(sizeof(DSA_SIG)); | 13 | ret = OPENSSL_malloc(sizeof(DSA_SIG)); |
| 14 | if (ret == NULL) | 14 | if (ret == NULL) |
| 15 | { | 15 | { |
| 16 | DSAerr(DSA_F_DSA_SIG_NEW,ERR_R_MALLOC_FAILURE); | 16 | DSAerr(DSA_F_DSA_SIG_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -26,7 +26,7 @@ void DSA_SIG_free(DSA_SIG *r) | |||
| 26 | if (r == NULL) return; | 26 | if (r == NULL) return; |
| 27 | if (r->r) BN_clear_free(r->r); | 27 | if (r->r) BN_clear_free(r->r); |
| 28 | if (r->s) BN_clear_free(r->s); | 28 | if (r->s) BN_clear_free(r->s); |
| 29 | Free(r); | 29 | OPENSSL_free(r); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | int i2d_DSA_SIG(DSA_SIG *v, unsigned char **pp) | 32 | int i2d_DSA_SIG(DSA_SIG *v, unsigned char **pp) |
| @@ -35,7 +35,7 @@ int i2d_DSA_SIG(DSA_SIG *v, unsigned char **pp) | |||
| 35 | ASN1_INTEGER rbs,sbs; | 35 | ASN1_INTEGER rbs,sbs; |
| 36 | unsigned char *p; | 36 | unsigned char *p; |
| 37 | 37 | ||
| 38 | rbs.data=Malloc(BN_num_bits(v->r)/8+1); | 38 | rbs.data=OPENSSL_malloc(BN_num_bits(v->r)/8+1); |
| 39 | if (rbs.data == NULL) | 39 | if (rbs.data == NULL) |
| 40 | { | 40 | { |
| 41 | DSAerr(DSA_F_I2D_DSA_SIG, ERR_R_MALLOC_FAILURE); | 41 | DSAerr(DSA_F_I2D_DSA_SIG, ERR_R_MALLOC_FAILURE); |
| @@ -43,10 +43,10 @@ int i2d_DSA_SIG(DSA_SIG *v, unsigned char **pp) | |||
| 43 | } | 43 | } |
| 44 | rbs.type=V_ASN1_INTEGER; | 44 | rbs.type=V_ASN1_INTEGER; |
| 45 | rbs.length=BN_bn2bin(v->r,rbs.data); | 45 | rbs.length=BN_bn2bin(v->r,rbs.data); |
| 46 | sbs.data=Malloc(BN_num_bits(v->s)/8+1); | 46 | sbs.data=OPENSSL_malloc(BN_num_bits(v->s)/8+1); |
| 47 | if (sbs.data == NULL) | 47 | if (sbs.data == NULL) |
| 48 | { | 48 | { |
| 49 | Free(rbs.data); | 49 | OPENSSL_free(rbs.data); |
| 50 | DSAerr(DSA_F_I2D_DSA_SIG, ERR_R_MALLOC_FAILURE); | 50 | DSAerr(DSA_F_I2D_DSA_SIG, ERR_R_MALLOC_FAILURE); |
| 51 | return(0); | 51 | return(0); |
| 52 | } | 52 | } |
| @@ -64,8 +64,8 @@ int i2d_DSA_SIG(DSA_SIG *v, unsigned char **pp) | |||
| 64 | i2d_ASN1_INTEGER(&sbs,&p); | 64 | i2d_ASN1_INTEGER(&sbs,&p); |
| 65 | } | 65 | } |
| 66 | t=ASN1_object_size(1,len,V_ASN1_SEQUENCE); | 66 | t=ASN1_object_size(1,len,V_ASN1_SEQUENCE); |
| 67 | Free(rbs.data); | 67 | OPENSSL_free(rbs.data); |
| 68 | Free(sbs.data); | 68 | OPENSSL_free(sbs.data); |
| 69 | return(t); | 69 | return(t); |
| 70 | } | 70 | } |
| 71 | 71 | ||
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_key.c b/src/lib/libssl/src/crypto/dsa/dsa_key.c index 5aef2d5fcf..af3c56d770 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_key.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_key.c | |||
| @@ -84,7 +84,7 @@ int DSA_generate_key(DSA *dsa) | |||
| 84 | i=BN_num_bits(dsa->q); | 84 | i=BN_num_bits(dsa->q); |
| 85 | for (;;) | 85 | for (;;) |
| 86 | { | 86 | { |
| 87 | if (!BN_rand(priv_key,i,1,0)) | 87 | if (!BN_rand(priv_key,i,0,0)) |
| 88 | goto err; | 88 | goto err; |
| 89 | if (BN_cmp(priv_key,dsa->q) >= 0) | 89 | if (BN_cmp(priv_key,dsa->q) >= 0) |
| 90 | BN_sub(priv_key,priv_key,dsa->q); | 90 | BN_sub(priv_key,priv_key,dsa->q); |
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_lib.c b/src/lib/libssl/src/crypto/dsa/dsa_lib.c index 224e412afc..b31b946ad3 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_lib.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_lib.c | |||
| @@ -63,6 +63,7 @@ | |||
| 63 | #include <openssl/bn.h> | 63 | #include <openssl/bn.h> |
| 64 | #include <openssl/dsa.h> | 64 | #include <openssl/dsa.h> |
| 65 | #include <openssl/asn1.h> | 65 | #include <openssl/asn1.h> |
| 66 | #include <openssl/engine.h> | ||
| 66 | 67 | ||
| 67 | const char *DSA_version="DSA" OPENSSL_VERSION_PTEXT; | 68 | const char *DSA_version="DSA" OPENSSL_VERSION_PTEXT; |
| 68 | 69 | ||
| @@ -70,12 +71,26 @@ static DSA_METHOD *default_DSA_method; | |||
| 70 | static int dsa_meth_num = 0; | 71 | static int dsa_meth_num = 0; |
| 71 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dsa_meth = NULL; | 72 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dsa_meth = NULL; |
| 72 | 73 | ||
| 73 | void DSA_set_default_method(DSA_METHOD *meth) | 74 | void DSA_set_default_openssl_method(DSA_METHOD *meth) |
| 74 | { | 75 | { |
| 75 | default_DSA_method = meth; | 76 | ENGINE *e; |
| 77 | /* We'll need to notify the "openssl" ENGINE of this | ||
| 78 | * change too. We won't bother locking things down at | ||
| 79 | * our end as there was never any locking in these | ||
| 80 | * functions! */ | ||
| 81 | if(default_DSA_method != meth) | ||
| 82 | { | ||
| 83 | default_DSA_method = meth; | ||
| 84 | e = ENGINE_by_id("openssl"); | ||
| 85 | if(e) | ||
| 86 | { | ||
| 87 | ENGINE_set_DSA(e, meth); | ||
| 88 | ENGINE_free(e); | ||
| 89 | } | ||
| 90 | } | ||
| 76 | } | 91 | } |
| 77 | 92 | ||
| 78 | DSA_METHOD *DSA_get_default_method(void) | 93 | DSA_METHOD *DSA_get_default_openssl_method(void) |
| 79 | { | 94 | { |
| 80 | if(!default_DSA_method) default_DSA_method = DSA_OpenSSL(); | 95 | if(!default_DSA_method) default_DSA_method = DSA_OpenSSL(); |
| 81 | return default_DSA_method; | 96 | return default_DSA_method; |
| @@ -86,6 +101,7 @@ DSA *DSA_new(void) | |||
| 86 | return DSA_new_method(NULL); | 101 | return DSA_new_method(NULL); |
| 87 | } | 102 | } |
| 88 | 103 | ||
| 104 | #if 0 | ||
| 89 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth) | 105 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth) |
| 90 | { | 106 | { |
| 91 | DSA_METHOD *mtmp; | 107 | DSA_METHOD *mtmp; |
| @@ -95,21 +111,52 @@ DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth) | |||
| 95 | if (meth->init) meth->init(dsa); | 111 | if (meth->init) meth->init(dsa); |
| 96 | return mtmp; | 112 | return mtmp; |
| 97 | } | 113 | } |
| 114 | #else | ||
| 115 | int DSA_set_method(DSA *dsa, ENGINE *engine) | ||
| 116 | { | ||
| 117 | ENGINE *mtmp; | ||
| 118 | DSA_METHOD *meth; | ||
| 119 | mtmp = dsa->engine; | ||
| 120 | meth = ENGINE_get_DSA(mtmp); | ||
| 121 | if (!ENGINE_init(engine)) | ||
| 122 | return 0; | ||
| 123 | if (meth->finish) meth->finish(dsa); | ||
| 124 | dsa->engine = engine; | ||
| 125 | meth = ENGINE_get_DSA(engine); | ||
| 126 | if (meth->init) meth->init(dsa); | ||
| 127 | /* SHOULD ERROR CHECK THIS!!! */ | ||
| 128 | ENGINE_finish(mtmp); | ||
| 129 | return 1; | ||
| 130 | } | ||
| 131 | #endif | ||
| 98 | 132 | ||
| 99 | 133 | ||
| 134 | #if 0 | ||
| 100 | DSA *DSA_new_method(DSA_METHOD *meth) | 135 | DSA *DSA_new_method(DSA_METHOD *meth) |
| 136 | #else | ||
| 137 | DSA *DSA_new_method(ENGINE *engine) | ||
| 138 | #endif | ||
| 101 | { | 139 | { |
| 140 | DSA_METHOD *meth; | ||
| 102 | DSA *ret; | 141 | DSA *ret; |
| 103 | 142 | ||
| 104 | ret=(DSA *)Malloc(sizeof(DSA)); | 143 | ret=(DSA *)OPENSSL_malloc(sizeof(DSA)); |
| 105 | if (ret == NULL) | 144 | if (ret == NULL) |
| 106 | { | 145 | { |
| 107 | DSAerr(DSA_F_DSA_NEW,ERR_R_MALLOC_FAILURE); | 146 | DSAerr(DSA_F_DSA_NEW,ERR_R_MALLOC_FAILURE); |
| 108 | return(NULL); | 147 | return(NULL); |
| 109 | } | 148 | } |
| 110 | if(!default_DSA_method) default_DSA_method = DSA_OpenSSL(); | 149 | if(engine) |
| 111 | if(meth) ret->meth = meth; | 150 | ret->engine = engine; |
| 112 | else ret->meth = default_DSA_method; | 151 | else |
| 152 | { | ||
| 153 | if((ret->engine=ENGINE_get_default_DSA()) == NULL) | ||
| 154 | { | ||
| 155 | OPENSSL_free(ret); | ||
| 156 | return NULL; | ||
| 157 | } | ||
| 158 | } | ||
| 159 | meth = ENGINE_get_DSA(ret->engine); | ||
| 113 | ret->pad=0; | 160 | ret->pad=0; |
| 114 | ret->version=0; | 161 | ret->version=0; |
| 115 | ret->write_params=1; | 162 | ret->write_params=1; |
| @@ -125,10 +172,10 @@ DSA *DSA_new_method(DSA_METHOD *meth) | |||
| 125 | ret->method_mont_p=NULL; | 172 | ret->method_mont_p=NULL; |
| 126 | 173 | ||
| 127 | ret->references=1; | 174 | ret->references=1; |
| 128 | ret->flags=ret->meth->flags; | 175 | ret->flags=meth->flags; |
| 129 | if ((ret->meth->init != NULL) && !ret->meth->init(ret)) | 176 | if ((meth->init != NULL) && !meth->init(ret)) |
| 130 | { | 177 | { |
| 131 | Free(ret); | 178 | OPENSSL_free(ret); |
| 132 | ret=NULL; | 179 | ret=NULL; |
| 133 | } | 180 | } |
| 134 | else | 181 | else |
| @@ -139,6 +186,7 @@ DSA *DSA_new_method(DSA_METHOD *meth) | |||
| 139 | 186 | ||
| 140 | void DSA_free(DSA *r) | 187 | void DSA_free(DSA *r) |
| 141 | { | 188 | { |
| 189 | DSA_METHOD *meth; | ||
| 142 | int i; | 190 | int i; |
| 143 | 191 | ||
| 144 | if (r == NULL) return; | 192 | if (r == NULL) return; |
| @@ -158,7 +206,9 @@ void DSA_free(DSA *r) | |||
| 158 | 206 | ||
| 159 | CRYPTO_free_ex_data(dsa_meth, r, &r->ex_data); | 207 | CRYPTO_free_ex_data(dsa_meth, r, &r->ex_data); |
| 160 | 208 | ||
| 161 | if(r->meth->finish) r->meth->finish(r); | 209 | meth = ENGINE_get_DSA(r->engine); |
| 210 | if(meth->finish) meth->finish(r); | ||
| 211 | ENGINE_finish(r->engine); | ||
| 162 | 212 | ||
| 163 | if (r->p != NULL) BN_clear_free(r->p); | 213 | if (r->p != NULL) BN_clear_free(r->p); |
| 164 | if (r->q != NULL) BN_clear_free(r->q); | 214 | if (r->q != NULL) BN_clear_free(r->q); |
| @@ -167,7 +217,7 @@ void DSA_free(DSA *r) | |||
| 167 | if (r->priv_key != NULL) BN_clear_free(r->priv_key); | 217 | if (r->priv_key != NULL) BN_clear_free(r->priv_key); |
| 168 | if (r->kinv != NULL) BN_clear_free(r->kinv); | 218 | if (r->kinv != NULL) BN_clear_free(r->kinv); |
| 169 | if (r->r != NULL) BN_clear_free(r->r); | 219 | if (r->r != NULL) BN_clear_free(r->r); |
| 170 | Free(r); | 220 | OPENSSL_free(r); |
| 171 | } | 221 | } |
| 172 | 222 | ||
| 173 | int DSA_size(DSA *r) | 223 | int DSA_size(DSA *r) |
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_ossl.c b/src/lib/libssl/src/crypto/dsa/dsa_ossl.c index b51cf6ad8d..96295dc24f 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_ossl.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_ossl.c | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | #include <openssl/dsa.h> | 64 | #include <openssl/dsa.h> |
| 65 | #include <openssl/rand.h> | 65 | #include <openssl/rand.h> |
| 66 | #include <openssl/asn1.h> | 66 | #include <openssl/asn1.h> |
| 67 | #include <openssl/engine.h> | ||
| 67 | 68 | ||
| 68 | static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); | 69 | static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); |
| 69 | static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); | 70 | static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); |
| @@ -181,7 +182,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | |||
| 181 | /* Get random k */ | 182 | /* Get random k */ |
| 182 | for (;;) | 183 | for (;;) |
| 183 | { | 184 | { |
| 184 | if (!BN_rand(&k, BN_num_bits(dsa->q), 1, 0)) goto err; | 185 | if (!BN_rand(&k, BN_num_bits(dsa->q), 0, 0)) goto err; |
| 185 | if (BN_cmp(&k,dsa->q) >= 0) | 186 | if (BN_cmp(&k,dsa->q) >= 0) |
| 186 | BN_sub(&k,&k,dsa->q); | 187 | BN_sub(&k,&k,dsa->q); |
| 187 | if (!BN_is_zero(&k)) break; | 188 | if (!BN_is_zero(&k)) break; |
| @@ -195,7 +196,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | |||
| 195 | } | 196 | } |
| 196 | 197 | ||
| 197 | /* Compute r = (g^k mod p) mod q */ | 198 | /* Compute r = (g^k mod p) mod q */ |
| 198 | if (!dsa->meth->bn_mod_exp(dsa, r,dsa->g,&k,dsa->p,ctx, | 199 | if (!ENGINE_get_DSA(dsa->engine)->bn_mod_exp(dsa, r,dsa->g,&k,dsa->p,ctx, |
| 199 | (BN_MONT_CTX *)dsa->method_mont_p)) goto err; | 200 | (BN_MONT_CTX *)dsa->method_mont_p)) goto err; |
| 200 | if (!BN_mod(r,r,dsa->q,ctx)) goto err; | 201 | if (!BN_mod(r,r,dsa->q,ctx)) goto err; |
| 201 | 202 | ||
| @@ -273,7 +274,7 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, | |||
| 273 | if (!BN_mod(&u1,&u1,dsa->q,ctx)) goto err; | 274 | if (!BN_mod(&u1,&u1,dsa->q,ctx)) goto err; |
| 274 | #else | 275 | #else |
| 275 | { | 276 | { |
| 276 | if (!dsa->meth->dsa_mod_exp(dsa, &t1,dsa->g,&u1,dsa->pub_key,&u2, | 277 | if (!ENGINE_get_DSA(dsa->engine)->dsa_mod_exp(dsa, &t1,dsa->g,&u1,dsa->pub_key,&u2, |
| 277 | dsa->p,ctx,mont)) goto err; | 278 | dsa->p,ctx,mont)) goto err; |
| 278 | /* BN_copy(&u1,&t1); */ | 279 | /* BN_copy(&u1,&t1); */ |
| 279 | /* let u1 = u1 mod q */ | 280 | /* let u1 = u1 mod q */ |
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_sign.c b/src/lib/libssl/src/crypto/dsa/dsa_sign.c index 89205026f0..dfe27bae47 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_sign.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_sign.c | |||
| @@ -64,10 +64,11 @@ | |||
| 64 | #include <openssl/dsa.h> | 64 | #include <openssl/dsa.h> |
| 65 | #include <openssl/rand.h> | 65 | #include <openssl/rand.h> |
| 66 | #include <openssl/asn1.h> | 66 | #include <openssl/asn1.h> |
| 67 | #include <openssl/engine.h> | ||
| 67 | 68 | ||
| 68 | DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | 69 | DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) |
| 69 | { | 70 | { |
| 70 | return dsa->meth->dsa_do_sign(dgst, dlen, dsa); | 71 | return ENGINE_get_DSA(dsa->engine)->dsa_do_sign(dgst, dlen, dsa); |
| 71 | } | 72 | } |
| 72 | 73 | ||
| 73 | int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, | 74 | int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, |
| @@ -87,6 +88,6 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, | |||
| 87 | 88 | ||
| 88 | int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | 89 | int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) |
| 89 | { | 90 | { |
| 90 | return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp); | 91 | return ENGINE_get_DSA(dsa->engine)->dsa_sign_setup(dsa, ctx_in, kinvp, rp); |
| 91 | } | 92 | } |
| 92 | 93 | ||
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_vrf.c b/src/lib/libssl/src/crypto/dsa/dsa_vrf.c index 03277f80fd..2e891ae491 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_vrf.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_vrf.c | |||
| @@ -65,11 +65,12 @@ | |||
| 65 | #include <openssl/rand.h> | 65 | #include <openssl/rand.h> |
| 66 | #include <openssl/asn1.h> | 66 | #include <openssl/asn1.h> |
| 67 | #include <openssl/asn1_mac.h> | 67 | #include <openssl/asn1_mac.h> |
| 68 | #include <openssl/engine.h> | ||
| 68 | 69 | ||
| 69 | int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, | 70 | int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, |
| 70 | DSA *dsa) | 71 | DSA *dsa) |
| 71 | { | 72 | { |
| 72 | return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa); | 73 | return ENGINE_get_DSA(dsa->engine)->dsa_do_verify(dgst, dgst_len, sig, dsa); |
| 73 | } | 74 | } |
| 74 | 75 | ||
| 75 | /* data has already been hashed (probably with SHA or SHA-1). */ | 76 | /* data has already been hashed (probably with SHA or SHA-1). */ |
diff --git a/src/lib/libssl/src/crypto/dso/Makefile.ssl b/src/lib/libssl/src/crypto/dso/Makefile.ssl new file mode 100644 index 0000000000..effc46d2dc --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/Makefile.ssl | |||
| @@ -0,0 +1,140 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/dso/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= dso | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALL_PREFIX= | ||
| 11 | OPENSSLDIR= /usr/local/ssl | ||
| 12 | INSTALLTOP=/usr/local/ssl | ||
| 13 | MAKE= make -f Makefile.ssl | ||
| 14 | MAKEDEPEND= $(TOP)/util/domd $(TOP) | ||
| 15 | MAKEFILE= Makefile.ssl | ||
| 16 | AR= ar r | ||
| 17 | |||
| 18 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 19 | |||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c \ | ||
| 26 | dso_openssl.c dso_win32.c dso_vms.c | ||
| 27 | LIBOBJ= dso_dl.o dso_dlfcn.o dso_err.o dso_lib.o dso_null.o \ | ||
| 28 | dso_openssl.o dso_win32.o dso_vms.o | ||
| 29 | |||
| 30 | SRC= $(LIBSRC) | ||
| 31 | |||
| 32 | EXHEADER= dso.h | ||
| 33 | HEADER= $(EXHEADER) | ||
| 34 | |||
| 35 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 36 | |||
| 37 | top: | ||
| 38 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 39 | |||
| 40 | all: lib | ||
| 41 | |||
| 42 | lib: $(LIBOBJ) | ||
| 43 | $(AR) $(LIB) $(LIBOBJ) | ||
| 44 | $(RANLIB) $(LIB) | ||
| 45 | @touch lib | ||
| 46 | |||
| 47 | files: | ||
| 48 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 49 | |||
| 50 | links: | ||
| 51 | @$(TOP)/util/point.sh Makefile.ssl Makefile | ||
| 52 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
| 53 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
| 54 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
| 55 | |||
| 56 | install: | ||
| 57 | @for i in $(EXHEADER) ; \ | ||
| 58 | do \ | ||
| 59 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 60 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 61 | done; | ||
| 62 | |||
| 63 | tags: | ||
| 64 | ctags $(SRC) | ||
| 65 | |||
| 66 | tests: | ||
| 67 | |||
| 68 | lint: | ||
| 69 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 70 | |||
| 71 | depend: | ||
| 72 | $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) | ||
| 73 | |||
| 74 | dclean: | ||
| 75 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 76 | mv -f Makefile.new $(MAKEFILE) | ||
| 77 | |||
| 78 | clean: | ||
| 79 | rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 80 | |||
| 81 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 82 | |||
| 83 | dso_dl.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 84 | dso_dl.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h | ||
| 85 | dso_dl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 86 | dso_dl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 87 | dso_dl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 88 | dso_dl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 89 | dso_dl.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 90 | dso_dlfcn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 91 | dso_dlfcn.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h | ||
| 92 | dso_dlfcn.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 93 | dso_dlfcn.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 94 | dso_dlfcn.o: ../../include/openssl/opensslconf.h | ||
| 95 | dso_dlfcn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
| 96 | dso_dlfcn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 97 | dso_dlfcn.o: ../cryptlib.h | ||
| 98 | dso_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h | ||
| 99 | dso_err.o: ../../include/openssl/dso.h ../../include/openssl/err.h | ||
| 100 | dso_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslv.h | ||
| 101 | dso_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 102 | dso_err.o: ../../include/openssl/symhacks.h | ||
| 103 | dso_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 104 | dso_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h | ||
| 105 | dso_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 106 | dso_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 107 | dso_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 108 | dso_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 109 | dso_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 110 | dso_null.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 111 | dso_null.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h | ||
| 112 | dso_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 113 | dso_null.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 114 | dso_null.o: ../../include/openssl/opensslconf.h | ||
| 115 | dso_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
| 116 | dso_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 117 | dso_null.o: ../cryptlib.h | ||
| 118 | dso_openssl.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 119 | dso_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h | ||
| 120 | dso_openssl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 121 | dso_openssl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 122 | dso_openssl.o: ../../include/openssl/opensslconf.h | ||
| 123 | dso_openssl.o: ../../include/openssl/opensslv.h | ||
| 124 | dso_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 125 | dso_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 126 | dso_vms.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 127 | dso_vms.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h | ||
| 128 | dso_vms.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 129 | dso_vms.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 130 | dso_vms.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 131 | dso_vms.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 132 | dso_vms.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 133 | dso_win32.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 134 | dso_win32.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h | ||
| 135 | dso_win32.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 136 | dso_win32.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 137 | dso_win32.o: ../../include/openssl/opensslconf.h | ||
| 138 | dso_win32.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
| 139 | dso_win32.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 140 | dso_win32.o: ../cryptlib.h | ||
diff --git a/src/lib/libssl/src/crypto/dso/README b/src/lib/libssl/src/crypto/dso/README new file mode 100644 index 0000000000..6ba03c5631 --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/README | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | TODO | ||
| 2 | ---- | ||
| 3 | |||
| 4 | Find a way where name-translation can be done in a way that is | ||
| 5 | sensitive to particular methods (ie. generic code could still do | ||
| 6 | different path/filename substitutions on win32 to what it does on | ||
| 7 | *nix) but doesn't assume some canonical form. Already one case | ||
| 8 | exists where the "blah -> (libblah.so,blah.dll)" mapping doesn't | ||
| 9 | suffice. I suspect a callback with an enumerated (or string?) | ||
| 10 | parameter could be the way to go here ... DSO_ctrl the callback | ||
| 11 | into place and it can be invoked to handle name translation with | ||
| 12 | some clue to the calling code as to what kind of system it is. | ||
| 13 | |||
| 14 | NOTES | ||
| 15 | ----- | ||
| 16 | |||
| 17 | I've checked out HPUX (well, version 11 at least) and shl_t is | ||
| 18 | a pointer type so it's safe to use in the way it has been in | ||
| 19 | dso_dl.c. On the other hand, HPUX11 support dlfcn too and | ||
| 20 | according to their man page, prefer developers to move to that. | ||
| 21 | I'll leave Richard's changes there as I guess dso_dl is needed | ||
| 22 | for HPUX10.20. | ||
| 23 | |||
| 24 | |||
diff --git a/src/lib/libssl/src/crypto/dso/dso.h b/src/lib/libssl/src/crypto/dso/dso.h new file mode 100644 index 0000000000..bed7c464a6 --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso.h | |||
| @@ -0,0 +1,250 @@ | |||
| 1 | /* dso.h */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_DSO_H | ||
| 60 | #define HEADER_DSO_H | ||
| 61 | |||
| 62 | #include <openssl/crypto.h> | ||
| 63 | |||
| 64 | #ifdef __cplusplus | ||
| 65 | extern "C" { | ||
| 66 | #endif | ||
| 67 | |||
| 68 | /* These values are used as commands to DSO_ctrl() */ | ||
| 69 | #define DSO_CTRL_GET_FLAGS 1 | ||
| 70 | #define DSO_CTRL_SET_FLAGS 2 | ||
| 71 | #define DSO_CTRL_OR_FLAGS 3 | ||
| 72 | |||
| 73 | /* These flags control the translation of file-names from canonical to | ||
| 74 | * native. Eg. in the CryptoSwift support, the "dl" and "dlfcn" | ||
| 75 | * methods will translate "swift" -> "libswift.so" whereas the "win32" | ||
| 76 | * method will translate "swift" -> "swift.dll". NB: Until I can figure | ||
| 77 | * out how to be more "conventional" with this, the methods will only | ||
| 78 | * honour this flag if it looks like it was passed a file without any | ||
| 79 | * path and if the filename is small enough. | ||
| 80 | */ | ||
| 81 | #define DSO_FLAG_NAME_TRANSLATION 0x01 | ||
| 82 | |||
| 83 | /* The following flag controls the translation of symbol names to upper | ||
| 84 | * case. This is currently only being implemented for OpenVMS. | ||
| 85 | */ | ||
| 86 | #define DSO_FLAG_UPCASE_SYMBOL 0x02 | ||
| 87 | |||
| 88 | |||
| 89 | typedef void (*DSO_FUNC_TYPE)(void); | ||
| 90 | |||
| 91 | typedef struct dso_st DSO; | ||
| 92 | |||
| 93 | typedef struct dso_meth_st | ||
| 94 | { | ||
| 95 | const char *name; | ||
| 96 | /* Loads a shared library */ | ||
| 97 | int (*dso_load)(DSO *dso, const char *filename); | ||
| 98 | /* Unloads a shared library */ | ||
| 99 | int (*dso_unload)(DSO *dso); | ||
| 100 | /* Binds a variable */ | ||
| 101 | void *(*dso_bind_var)(DSO *dso, const char *symname); | ||
| 102 | /* Binds a function - assumes a return type of DSO_FUNC_TYPE. | ||
| 103 | * This should be cast to the real function prototype by the | ||
| 104 | * caller. Platforms that don't have compatible representations | ||
| 105 | * for different prototypes (this is possible within ANSI C) | ||
| 106 | * are highly unlikely to have shared libraries at all, let | ||
| 107 | * alone a DSO_METHOD implemented for them. */ | ||
| 108 | DSO_FUNC_TYPE (*dso_bind_func)(DSO *dso, const char *symname); | ||
| 109 | |||
| 110 | /* I don't think this would actually be used in any circumstances. */ | ||
| 111 | #if 0 | ||
| 112 | /* Unbinds a variable */ | ||
| 113 | int (*dso_unbind_var)(DSO *dso, char *symname, void *symptr); | ||
| 114 | /* Unbinds a function */ | ||
| 115 | int (*dso_unbind_func)(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); | ||
| 116 | #endif | ||
| 117 | /* The generic (yuck) "ctrl()" function. NB: Negative return | ||
| 118 | * values (rather than zero) indicate errors. */ | ||
| 119 | long (*dso_ctrl)(DSO *dso, int cmd, long larg, void *parg); | ||
| 120 | |||
| 121 | /* [De]Initialisation handlers. */ | ||
| 122 | int (*init)(DSO *dso); | ||
| 123 | int (*finish)(DSO *dso); | ||
| 124 | } DSO_METHOD; | ||
| 125 | |||
| 126 | /**********************************************************************/ | ||
| 127 | /* The low-level handle type used to refer to a loaded shared library */ | ||
| 128 | |||
| 129 | struct dso_st | ||
| 130 | { | ||
| 131 | DSO_METHOD *meth; | ||
| 132 | /* Standard dlopen uses a (void *). Win32 uses a HANDLE. VMS | ||
| 133 | * doesn't use anything but will need to cache the filename | ||
| 134 | * for use in the dso_bind handler. All in all, let each | ||
| 135 | * method control its own destiny. "Handles" and such go in | ||
| 136 | * a STACK. */ | ||
| 137 | STACK *meth_data; | ||
| 138 | int references; | ||
| 139 | int flags; | ||
| 140 | /* For use by applications etc ... use this for your bits'n'pieces, | ||
| 141 | * don't touch meth_data! */ | ||
| 142 | CRYPTO_EX_DATA ex_data; | ||
| 143 | }; | ||
| 144 | |||
| 145 | |||
| 146 | DSO * DSO_new(void); | ||
| 147 | DSO * DSO_new_method(DSO_METHOD *method); | ||
| 148 | int DSO_free(DSO *dso); | ||
| 149 | int DSO_flags(DSO *dso); | ||
| 150 | int DSO_up(DSO *dso); | ||
| 151 | long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg); | ||
| 152 | |||
| 153 | void DSO_set_default_method(DSO_METHOD *meth); | ||
| 154 | DSO_METHOD *DSO_get_default_method(void); | ||
| 155 | DSO_METHOD *DSO_get_method(DSO *dso); | ||
| 156 | DSO_METHOD *DSO_set_method(DSO *dso, DSO_METHOD *meth); | ||
| 157 | |||
| 158 | /* The all-singing all-dancing load function, you normally pass NULL | ||
| 159 | * for the first and third parameters. Use DSO_up and DSO_free for | ||
| 160 | * subsequent reference count handling. Any flags passed in will be set | ||
| 161 | * in the constructed DSO after its init() function but before the | ||
| 162 | * load operation. This will be done with; | ||
| 163 | * DSO_ctrl(dso, DSO_CTRL_SET_FLAGS, flags, NULL); */ | ||
| 164 | DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags); | ||
| 165 | |||
| 166 | /* This function binds to a variable inside a shared library. */ | ||
| 167 | void *DSO_bind_var(DSO *dso, const char *symname); | ||
| 168 | |||
| 169 | /* This function binds to a function inside a shared library. */ | ||
| 170 | DSO_FUNC_TYPE DSO_bind_func(DSO *dso, const char *symname); | ||
| 171 | |||
| 172 | /* This method is the default, but will beg, borrow, or steal whatever | ||
| 173 | * method should be the default on any particular platform (including | ||
| 174 | * DSO_METH_null() if necessary). */ | ||
| 175 | DSO_METHOD *DSO_METHOD_openssl(void); | ||
| 176 | |||
| 177 | /* This method is defined for all platforms - if a platform has no | ||
| 178 | * DSO support then this will be the only method! */ | ||
| 179 | DSO_METHOD *DSO_METHOD_null(void); | ||
| 180 | |||
| 181 | /* If DSO_DLFCN is defined, the standard dlfcn.h-style functions | ||
| 182 | * (dlopen, dlclose, dlsym, etc) will be used and incorporated into | ||
| 183 | * this method. If not, this method will return NULL. */ | ||
| 184 | DSO_METHOD *DSO_METHOD_dlfcn(void); | ||
| 185 | |||
| 186 | /* If DSO_DL is defined, the standard dl.h-style functions (shl_load, | ||
| 187 | * shl_unload, shl_findsym, etc) will be used and incorporated into | ||
| 188 | * this method. If not, this method will return NULL. */ | ||
| 189 | DSO_METHOD *DSO_METHOD_dl(void); | ||
| 190 | |||
| 191 | /* If WIN32 is defined, use DLLs. If not, return NULL. */ | ||
| 192 | DSO_METHOD *DSO_METHOD_win32(void); | ||
| 193 | |||
| 194 | /* If VMS is defined, use shared images. If not, return NULL. */ | ||
| 195 | DSO_METHOD *DSO_METHOD_vms(void); | ||
| 196 | |||
| 197 | void ERR_load_DSO_strings(void); | ||
| 198 | |||
| 199 | /* BEGIN ERROR CODES */ | ||
| 200 | /* The following lines are auto generated by the script mkerr.pl. Any changes | ||
| 201 | * made after this point may be overwritten when the script is next run. | ||
| 202 | */ | ||
| 203 | |||
| 204 | /* Error codes for the DSO functions. */ | ||
| 205 | |||
| 206 | /* Function codes. */ | ||
| 207 | #define DSO_F_DLFCN_BIND_FUNC 100 | ||
| 208 | #define DSO_F_DLFCN_BIND_VAR 101 | ||
| 209 | #define DSO_F_DLFCN_CTRL 102 | ||
| 210 | #define DSO_F_DLFCN_LOAD 103 | ||
| 211 | #define DSO_F_DLFCN_UNLOAD 104 | ||
| 212 | #define DSO_F_DL_BIND_FUNC 105 | ||
| 213 | #define DSO_F_DL_BIND_VAR 106 | ||
| 214 | #define DSO_F_DL_CTRL 107 | ||
| 215 | #define DSO_F_DL_LOAD 108 | ||
| 216 | #define DSO_F_DL_UNLOAD 109 | ||
| 217 | #define DSO_F_DSO_BIND_FUNC 110 | ||
| 218 | #define DSO_F_DSO_BIND_VAR 111 | ||
| 219 | #define DSO_F_DSO_CTRL 112 | ||
| 220 | #define DSO_F_DSO_FREE 113 | ||
| 221 | #define DSO_F_DSO_LOAD 114 | ||
| 222 | #define DSO_F_DSO_NEW_METHOD 115 | ||
| 223 | #define DSO_F_DSO_UP 116 | ||
| 224 | #define DSO_F_VMS_BIND_VAR 122 | ||
| 225 | #define DSO_F_VMS_CTRL 123 | ||
| 226 | #define DSO_F_VMS_LOAD 124 | ||
| 227 | #define DSO_F_VMS_UNLOAD 125 | ||
| 228 | #define DSO_F_WIN32_BIND_FUNC 117 | ||
| 229 | #define DSO_F_WIN32_BIND_VAR 118 | ||
| 230 | #define DSO_F_WIN32_CTRL 119 | ||
| 231 | #define DSO_F_WIN32_LOAD 120 | ||
| 232 | #define DSO_F_WIN32_UNLOAD 121 | ||
| 233 | |||
| 234 | /* Reason codes. */ | ||
| 235 | #define DSO_R_CTRL_FAILED 100 | ||
| 236 | #define DSO_R_FILENAME_TOO_BIG 109 | ||
| 237 | #define DSO_R_FINISH_FAILED 101 | ||
| 238 | #define DSO_R_LOAD_FAILED 102 | ||
| 239 | #define DSO_R_NULL_HANDLE 103 | ||
| 240 | #define DSO_R_STACK_ERROR 104 | ||
| 241 | #define DSO_R_SYM_FAILURE 105 | ||
| 242 | #define DSO_R_UNKNOWN_COMMAND 106 | ||
| 243 | #define DSO_R_UNLOAD_FAILED 107 | ||
| 244 | #define DSO_R_UNSUPPORTED 108 | ||
| 245 | |||
| 246 | #ifdef __cplusplus | ||
| 247 | } | ||
| 248 | #endif | ||
| 249 | #endif | ||
| 250 | |||
diff --git a/src/lib/libssl/src/crypto/dso/dso_dl.c b/src/lib/libssl/src/crypto/dso/dso_dl.c new file mode 100644 index 0000000000..69810fc3bb --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso_dl.c | |||
| @@ -0,0 +1,251 @@ | |||
| 1 | /* dso_dl.c */ | ||
| 2 | /* Written by Richard Levitte (levitte@openssl.org) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/dso.h> | ||
| 62 | |||
| 63 | #ifndef DSO_DL | ||
| 64 | DSO_METHOD *DSO_METHOD_dl(void) | ||
| 65 | { | ||
| 66 | return NULL; | ||
| 67 | } | ||
| 68 | #else | ||
| 69 | |||
| 70 | #include <dl.h> | ||
| 71 | |||
| 72 | /* Part of the hack in "dl_load" ... */ | ||
| 73 | #define DSO_MAX_TRANSLATED_SIZE 256 | ||
| 74 | |||
| 75 | static int dl_load(DSO *dso, const char *filename); | ||
| 76 | static int dl_unload(DSO *dso); | ||
| 77 | static void *dl_bind_var(DSO *dso, const char *symname); | ||
| 78 | static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname); | ||
| 79 | #if 0 | ||
| 80 | static int dl_unbind_var(DSO *dso, char *symname, void *symptr); | ||
| 81 | static int dl_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); | ||
| 82 | static int dl_init(DSO *dso); | ||
| 83 | static int dl_finish(DSO *dso); | ||
| 84 | #endif | ||
| 85 | static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg); | ||
| 86 | |||
| 87 | static DSO_METHOD dso_meth_dl = { | ||
| 88 | "OpenSSL 'dl' shared library method", | ||
| 89 | dl_load, | ||
| 90 | dl_unload, | ||
| 91 | dl_bind_var, | ||
| 92 | dl_bind_func, | ||
| 93 | /* For now, "unbind" doesn't exist */ | ||
| 94 | #if 0 | ||
| 95 | NULL, /* unbind_var */ | ||
| 96 | NULL, /* unbind_func */ | ||
| 97 | #endif | ||
| 98 | dl_ctrl, | ||
| 99 | NULL, /* init */ | ||
| 100 | NULL /* finish */ | ||
| 101 | }; | ||
| 102 | |||
| 103 | DSO_METHOD *DSO_METHOD_dl(void) | ||
| 104 | { | ||
| 105 | return(&dso_meth_dl); | ||
| 106 | } | ||
| 107 | |||
| 108 | /* For this DSO_METHOD, our meth_data STACK will contain; | ||
| 109 | * (i) the handle (shl_t) returned from shl_load(). | ||
| 110 | * NB: I checked on HPUX11 and shl_t is itself a pointer | ||
| 111 | * type so the cast is safe. | ||
| 112 | */ | ||
| 113 | |||
| 114 | static int dl_load(DSO *dso, const char *filename) | ||
| 115 | { | ||
| 116 | shl_t ptr; | ||
| 117 | char translated[DSO_MAX_TRANSLATED_SIZE]; | ||
| 118 | int len; | ||
| 119 | |||
| 120 | /* The same comment as in dlfcn_load applies here. bleurgh. */ | ||
| 121 | len = strlen(filename); | ||
| 122 | if((dso->flags & DSO_FLAG_NAME_TRANSLATION) && | ||
| 123 | (len + 6 < DSO_MAX_TRANSLATED_SIZE) && | ||
| 124 | (strstr(filename, "/") == NULL)) | ||
| 125 | { | ||
| 126 | sprintf(translated, "lib%s.so", filename); | ||
| 127 | ptr = shl_load(translated, BIND_IMMEDIATE, NULL); | ||
| 128 | } | ||
| 129 | else | ||
| 130 | ptr = shl_load(filename, BIND_IMMEDIATE, NULL); | ||
| 131 | if(ptr == NULL) | ||
| 132 | { | ||
| 133 | DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED); | ||
| 134 | return(0); | ||
| 135 | } | ||
| 136 | if(!sk_push(dso->meth_data, (char *)ptr)) | ||
| 137 | { | ||
| 138 | DSOerr(DSO_F_DL_LOAD,DSO_R_STACK_ERROR); | ||
| 139 | shl_unload(ptr); | ||
| 140 | return(0); | ||
| 141 | } | ||
| 142 | return(1); | ||
| 143 | } | ||
| 144 | |||
| 145 | static int dl_unload(DSO *dso) | ||
| 146 | { | ||
| 147 | shl_t ptr; | ||
| 148 | if(dso == NULL) | ||
| 149 | { | ||
| 150 | DSOerr(DSO_F_DL_UNLOAD,ERR_R_PASSED_NULL_PARAMETER); | ||
| 151 | return(0); | ||
| 152 | } | ||
| 153 | if(sk_num(dso->meth_data) < 1) | ||
| 154 | return(1); | ||
| 155 | /* Is this statement legal? */ | ||
| 156 | ptr = (shl_t)sk_pop(dso->meth_data); | ||
| 157 | if(ptr == NULL) | ||
| 158 | { | ||
| 159 | DSOerr(DSO_F_DL_UNLOAD,DSO_R_NULL_HANDLE); | ||
| 160 | /* Should push the value back onto the stack in | ||
| 161 | * case of a retry. */ | ||
| 162 | sk_push(dso->meth_data, (char *)ptr); | ||
| 163 | return(0); | ||
| 164 | } | ||
| 165 | shl_unload(ptr); | ||
| 166 | return(1); | ||
| 167 | } | ||
| 168 | |||
| 169 | static void *dl_bind_var(DSO *dso, const char *symname) | ||
| 170 | { | ||
| 171 | shl_t ptr; | ||
| 172 | void *sym; | ||
| 173 | |||
| 174 | if((dso == NULL) || (symname == NULL)) | ||
| 175 | { | ||
| 176 | DSOerr(DSO_F_DL_BIND_VAR,ERR_R_PASSED_NULL_PARAMETER); | ||
| 177 | return(NULL); | ||
| 178 | } | ||
| 179 | if(sk_num(dso->meth_data) < 1) | ||
| 180 | { | ||
| 181 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_STACK_ERROR); | ||
| 182 | return(NULL); | ||
| 183 | } | ||
| 184 | ptr = (shl_t)sk_value(dso->meth_data, sk_num(dso->meth_data) - 1); | ||
| 185 | if(ptr == NULL) | ||
| 186 | { | ||
| 187 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_NULL_HANDLE); | ||
| 188 | return(NULL); | ||
| 189 | } | ||
| 190 | if (shl_findsym(ptr, symname, TYPE_UNDEFINED, &sym) < 0) | ||
| 191 | { | ||
| 192 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE); | ||
| 193 | return(NULL); | ||
| 194 | } | ||
| 195 | return(sym); | ||
| 196 | } | ||
| 197 | |||
| 198 | static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname) | ||
| 199 | { | ||
| 200 | shl_t ptr; | ||
| 201 | void *sym; | ||
| 202 | |||
| 203 | if((dso == NULL) || (symname == NULL)) | ||
| 204 | { | ||
| 205 | DSOerr(DSO_F_DL_BIND_FUNC,ERR_R_PASSED_NULL_PARAMETER); | ||
| 206 | return(NULL); | ||
| 207 | } | ||
| 208 | if(sk_num(dso->meth_data) < 1) | ||
| 209 | { | ||
| 210 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_STACK_ERROR); | ||
| 211 | return(NULL); | ||
| 212 | } | ||
| 213 | ptr = (shl_t)sk_value(dso->meth_data, sk_num(dso->meth_data) - 1); | ||
| 214 | if(ptr == NULL) | ||
| 215 | { | ||
| 216 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_NULL_HANDLE); | ||
| 217 | return(NULL); | ||
| 218 | } | ||
| 219 | if (shl_findsym(ptr, symname, TYPE_UNDEFINED, &sym) < 0) | ||
| 220 | { | ||
| 221 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE); | ||
| 222 | return(NULL); | ||
| 223 | } | ||
| 224 | return((DSO_FUNC_TYPE)sym); | ||
| 225 | } | ||
| 226 | |||
| 227 | static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg) | ||
| 228 | { | ||
| 229 | if(dso == NULL) | ||
| 230 | { | ||
| 231 | DSOerr(DSO_F_DL_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
| 232 | return(-1); | ||
| 233 | } | ||
| 234 | switch(cmd) | ||
| 235 | { | ||
| 236 | case DSO_CTRL_GET_FLAGS: | ||
| 237 | return dso->flags; | ||
| 238 | case DSO_CTRL_SET_FLAGS: | ||
| 239 | dso->flags = (int)larg; | ||
| 240 | return(0); | ||
| 241 | case DSO_CTRL_OR_FLAGS: | ||
| 242 | dso->flags |= (int)larg; | ||
| 243 | return(0); | ||
| 244 | default: | ||
| 245 | break; | ||
| 246 | } | ||
| 247 | DSOerr(DSO_F_DL_CTRL,DSO_R_UNKNOWN_COMMAND); | ||
| 248 | return(-1); | ||
| 249 | } | ||
| 250 | |||
| 251 | #endif /* DSO_DL */ | ||
diff --git a/src/lib/libssl/src/crypto/dso/dso_dlfcn.c b/src/lib/libssl/src/crypto/dso/dso_dlfcn.c new file mode 100644 index 0000000000..e709c721cc --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso_dlfcn.c | |||
| @@ -0,0 +1,276 @@ | |||
| 1 | /* dso_dlfcn.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/dso.h> | ||
| 62 | |||
| 63 | #ifndef DSO_DLFCN | ||
| 64 | DSO_METHOD *DSO_METHOD_dlfcn(void) | ||
| 65 | { | ||
| 66 | return NULL; | ||
| 67 | } | ||
| 68 | #else | ||
| 69 | |||
| 70 | #ifdef HAVE_DLFCN_H | ||
| 71 | #include <dlfcn.h> | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /* Part of the hack in "dlfcn_load" ... */ | ||
| 75 | #define DSO_MAX_TRANSLATED_SIZE 256 | ||
| 76 | |||
| 77 | static int dlfcn_load(DSO *dso, const char *filename); | ||
| 78 | static int dlfcn_unload(DSO *dso); | ||
| 79 | static void *dlfcn_bind_var(DSO *dso, const char *symname); | ||
| 80 | static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname); | ||
| 81 | #if 0 | ||
| 82 | static int dlfcn_unbind(DSO *dso, char *symname, void *symptr); | ||
| 83 | static int dlfcn_init(DSO *dso); | ||
| 84 | static int dlfcn_finish(DSO *dso); | ||
| 85 | #endif | ||
| 86 | static long dlfcn_ctrl(DSO *dso, int cmd, long larg, void *parg); | ||
| 87 | |||
| 88 | static DSO_METHOD dso_meth_dlfcn = { | ||
| 89 | "OpenSSL 'dlfcn' shared library method", | ||
| 90 | dlfcn_load, | ||
| 91 | dlfcn_unload, | ||
| 92 | dlfcn_bind_var, | ||
| 93 | dlfcn_bind_func, | ||
| 94 | /* For now, "unbind" doesn't exist */ | ||
| 95 | #if 0 | ||
| 96 | NULL, /* unbind_var */ | ||
| 97 | NULL, /* unbind_func */ | ||
| 98 | #endif | ||
| 99 | dlfcn_ctrl, | ||
| 100 | NULL, /* init */ | ||
| 101 | NULL /* finish */ | ||
| 102 | }; | ||
| 103 | |||
| 104 | DSO_METHOD *DSO_METHOD_dlfcn(void) | ||
| 105 | { | ||
| 106 | return(&dso_meth_dlfcn); | ||
| 107 | } | ||
| 108 | |||
| 109 | /* Prior to using the dlopen() function, we should decide on the flag | ||
| 110 | * we send. There's a few different ways of doing this and it's a | ||
| 111 | * messy venn-diagram to match up which platforms support what. So | ||
| 112 | * as we don't have autoconf yet, I'm implementing a hack that could | ||
| 113 | * be hacked further relatively easily to deal with cases as we find | ||
| 114 | * them. Initially this is to cope with OpenBSD. */ | ||
| 115 | #ifdef __OpenBSD__ | ||
| 116 | # ifdef DL_LAZY | ||
| 117 | # define DLOPEN_FLAG DL_LAZY | ||
| 118 | # else | ||
| 119 | # ifdef RTLD_NOW | ||
| 120 | # define DLOPEN_FLAG RTLD_NOW | ||
| 121 | # else | ||
| 122 | # define DLOPEN_FLAG 0 | ||
| 123 | # endif | ||
| 124 | # endif | ||
| 125 | #else | ||
| 126 | # define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */ | ||
| 127 | #endif | ||
| 128 | |||
| 129 | /* For this DSO_METHOD, our meth_data STACK will contain; | ||
| 130 | * (i) the handle (void*) returned from dlopen(). | ||
| 131 | */ | ||
| 132 | |||
| 133 | static int dlfcn_load(DSO *dso, const char *filename) | ||
| 134 | { | ||
| 135 | void *ptr; | ||
| 136 | char translated[DSO_MAX_TRANSLATED_SIZE]; | ||
| 137 | int len; | ||
| 138 | |||
| 139 | /* NB: This is a hideous hack, but I'm not yet sure what | ||
| 140 | * to replace it with. This attempts to convert any filename, | ||
| 141 | * that looks like it has no path information, into a | ||
| 142 | * translated form, e. "blah" -> "libblah.so" */ | ||
| 143 | len = strlen(filename); | ||
| 144 | if((dso->flags & DSO_FLAG_NAME_TRANSLATION) && | ||
| 145 | (len + 6 < DSO_MAX_TRANSLATED_SIZE) && | ||
| 146 | (strstr(filename, "/") == NULL)) | ||
| 147 | { | ||
| 148 | sprintf(translated, "lib%s.so", filename); | ||
| 149 | ptr = dlopen(translated, DLOPEN_FLAG); | ||
| 150 | } | ||
| 151 | else | ||
| 152 | { | ||
| 153 | ptr = dlopen(filename, DLOPEN_FLAG); | ||
| 154 | } | ||
| 155 | if(ptr == NULL) | ||
| 156 | { | ||
| 157 | DSOerr(DSO_F_DLFCN_LOAD,DSO_R_LOAD_FAILED); | ||
| 158 | return(0); | ||
| 159 | } | ||
| 160 | if(!sk_push(dso->meth_data, (char *)ptr)) | ||
| 161 | { | ||
| 162 | DSOerr(DSO_F_DLFCN_LOAD,DSO_R_STACK_ERROR); | ||
| 163 | dlclose(ptr); | ||
| 164 | return(0); | ||
| 165 | } | ||
| 166 | return(1); | ||
| 167 | } | ||
| 168 | |||
| 169 | static int dlfcn_unload(DSO *dso) | ||
| 170 | { | ||
| 171 | void *ptr; | ||
| 172 | if(dso == NULL) | ||
| 173 | { | ||
| 174 | DSOerr(DSO_F_DLFCN_UNLOAD,ERR_R_PASSED_NULL_PARAMETER); | ||
| 175 | return(0); | ||
| 176 | } | ||
| 177 | if(sk_num(dso->meth_data) < 1) | ||
| 178 | return(1); | ||
| 179 | ptr = (void *)sk_pop(dso->meth_data); | ||
| 180 | if(ptr == NULL) | ||
| 181 | { | ||
| 182 | DSOerr(DSO_F_DLFCN_UNLOAD,DSO_R_NULL_HANDLE); | ||
| 183 | /* Should push the value back onto the stack in | ||
| 184 | * case of a retry. */ | ||
| 185 | sk_push(dso->meth_data, (char *)ptr); | ||
| 186 | return(0); | ||
| 187 | } | ||
| 188 | /* For now I'm not aware of any errors associated with dlclose() */ | ||
| 189 | dlclose(ptr); | ||
| 190 | return(1); | ||
| 191 | } | ||
| 192 | |||
| 193 | static void *dlfcn_bind_var(DSO *dso, const char *symname) | ||
| 194 | { | ||
| 195 | void *ptr, *sym; | ||
| 196 | |||
| 197 | if((dso == NULL) || (symname == NULL)) | ||
| 198 | { | ||
| 199 | DSOerr(DSO_F_DLFCN_BIND_VAR,ERR_R_PASSED_NULL_PARAMETER); | ||
| 200 | return(NULL); | ||
| 201 | } | ||
| 202 | if(sk_num(dso->meth_data) < 1) | ||
| 203 | { | ||
| 204 | DSOerr(DSO_F_DLFCN_BIND_VAR,DSO_R_STACK_ERROR); | ||
| 205 | return(NULL); | ||
| 206 | } | ||
| 207 | ptr = (void *)sk_value(dso->meth_data, sk_num(dso->meth_data) - 1); | ||
| 208 | if(ptr == NULL) | ||
| 209 | { | ||
| 210 | DSOerr(DSO_F_DLFCN_BIND_VAR,DSO_R_NULL_HANDLE); | ||
| 211 | return(NULL); | ||
| 212 | } | ||
| 213 | sym = dlsym(ptr, symname); | ||
| 214 | if(sym == NULL) | ||
| 215 | { | ||
| 216 | DSOerr(DSO_F_DLFCN_BIND_VAR,DSO_R_SYM_FAILURE); | ||
| 217 | return(NULL); | ||
| 218 | } | ||
| 219 | return(sym); | ||
| 220 | } | ||
| 221 | |||
| 222 | static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname) | ||
| 223 | { | ||
| 224 | void *ptr; | ||
| 225 | DSO_FUNC_TYPE sym; | ||
| 226 | |||
| 227 | if((dso == NULL) || (symname == NULL)) | ||
| 228 | { | ||
| 229 | DSOerr(DSO_F_DLFCN_BIND_FUNC,ERR_R_PASSED_NULL_PARAMETER); | ||
| 230 | return(NULL); | ||
| 231 | } | ||
| 232 | if(sk_num(dso->meth_data) < 1) | ||
| 233 | { | ||
| 234 | DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_STACK_ERROR); | ||
| 235 | return(NULL); | ||
| 236 | } | ||
| 237 | ptr = (void *)sk_value(dso->meth_data, sk_num(dso->meth_data) - 1); | ||
| 238 | if(ptr == NULL) | ||
| 239 | { | ||
| 240 | DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_NULL_HANDLE); | ||
| 241 | return(NULL); | ||
| 242 | } | ||
| 243 | sym = (DSO_FUNC_TYPE)dlsym(ptr, symname); | ||
| 244 | if(sym == NULL) | ||
| 245 | { | ||
| 246 | DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_SYM_FAILURE); | ||
| 247 | return(NULL); | ||
| 248 | } | ||
| 249 | return(sym); | ||
| 250 | } | ||
| 251 | |||
| 252 | static long dlfcn_ctrl(DSO *dso, int cmd, long larg, void *parg) | ||
| 253 | { | ||
| 254 | if(dso == NULL) | ||
| 255 | { | ||
| 256 | DSOerr(DSO_F_DLFCN_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
| 257 | return(-1); | ||
| 258 | } | ||
| 259 | switch(cmd) | ||
| 260 | { | ||
| 261 | case DSO_CTRL_GET_FLAGS: | ||
| 262 | return dso->flags; | ||
| 263 | case DSO_CTRL_SET_FLAGS: | ||
| 264 | dso->flags = (int)larg; | ||
| 265 | return(0); | ||
| 266 | case DSO_CTRL_OR_FLAGS: | ||
| 267 | dso->flags |= (int)larg; | ||
| 268 | return(0); | ||
| 269 | default: | ||
| 270 | break; | ||
| 271 | } | ||
| 272 | DSOerr(DSO_F_DLFCN_CTRL,DSO_R_UNKNOWN_COMMAND); | ||
| 273 | return(-1); | ||
| 274 | } | ||
| 275 | |||
| 276 | #endif /* DSO_DLFCN */ | ||
diff --git a/src/lib/libssl/src/crypto/dso/dso_err.c b/src/lib/libssl/src/crypto/dso/dso_err.c new file mode 100644 index 0000000000..a3d7321c9b --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso_err.c | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | /* crypto/dso/dso_err.c */ | ||
| 2 | /* ==================================================================== | ||
| 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * | ||
| 9 | * 1. Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * | ||
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer in | ||
| 14 | * the documentation and/or other materials provided with the | ||
| 15 | * distribution. | ||
| 16 | * | ||
| 17 | * 3. All advertising materials mentioning features or use of this | ||
| 18 | * software must display the following acknowledgment: | ||
| 19 | * "This product includes software developed by the OpenSSL Project | ||
| 20 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 21 | * | ||
| 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 23 | * endorse or promote products derived from this software without | ||
| 24 | * prior written permission. For written permission, please contact | ||
| 25 | * openssl-core@OpenSSL.org. | ||
| 26 | * | ||
| 27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 28 | * nor may "OpenSSL" appear in their names without prior written | ||
| 29 | * permission of the OpenSSL Project. | ||
| 30 | * | ||
| 31 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 32 | * acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 35 | * | ||
| 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 48 | * ==================================================================== | ||
| 49 | * | ||
| 50 | * This product includes cryptographic software written by Eric Young | ||
| 51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 52 | * Hudson (tjh@cryptsoft.com). | ||
| 53 | * | ||
| 54 | */ | ||
| 55 | |||
| 56 | /* NOTE: this file was auto generated by the mkerr.pl script: any changes | ||
| 57 | * made to it will be overwritten when the script next updates this file, | ||
| 58 | * only reason strings will be preserved. | ||
| 59 | */ | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | #include <openssl/dso.h> | ||
| 64 | |||
| 65 | /* BEGIN ERROR CODES */ | ||
| 66 | #ifndef NO_ERR | ||
| 67 | static ERR_STRING_DATA DSO_str_functs[]= | ||
| 68 | { | ||
| 69 | {ERR_PACK(0,DSO_F_DLFCN_BIND_FUNC,0), "DLFCN_BIND_FUNC"}, | ||
| 70 | {ERR_PACK(0,DSO_F_DLFCN_BIND_VAR,0), "DLFCN_BIND_VAR"}, | ||
| 71 | {ERR_PACK(0,DSO_F_DLFCN_CTRL,0), "DLFCN_CTRL"}, | ||
| 72 | {ERR_PACK(0,DSO_F_DLFCN_LOAD,0), "DLFCN_LOAD"}, | ||
| 73 | {ERR_PACK(0,DSO_F_DLFCN_UNLOAD,0), "DLFCN_UNLOAD"}, | ||
| 74 | {ERR_PACK(0,DSO_F_DL_BIND_FUNC,0), "DL_BIND_FUNC"}, | ||
| 75 | {ERR_PACK(0,DSO_F_DL_BIND_VAR,0), "DL_BIND_VAR"}, | ||
| 76 | {ERR_PACK(0,DSO_F_DL_CTRL,0), "DL_CTRL"}, | ||
| 77 | {ERR_PACK(0,DSO_F_DL_LOAD,0), "DL_LOAD"}, | ||
| 78 | {ERR_PACK(0,DSO_F_DL_UNLOAD,0), "DL_UNLOAD"}, | ||
| 79 | {ERR_PACK(0,DSO_F_DSO_BIND_FUNC,0), "DSO_bind_func"}, | ||
| 80 | {ERR_PACK(0,DSO_F_DSO_BIND_VAR,0), "DSO_bind_var"}, | ||
| 81 | {ERR_PACK(0,DSO_F_DSO_CTRL,0), "DSO_ctrl"}, | ||
| 82 | {ERR_PACK(0,DSO_F_DSO_FREE,0), "DSO_free"}, | ||
| 83 | {ERR_PACK(0,DSO_F_DSO_LOAD,0), "DSO_load"}, | ||
| 84 | {ERR_PACK(0,DSO_F_DSO_NEW_METHOD,0), "DSO_new_method"}, | ||
| 85 | {ERR_PACK(0,DSO_F_DSO_UP,0), "DSO_up"}, | ||
| 86 | {ERR_PACK(0,DSO_F_VMS_BIND_VAR,0), "VMS_BIND_VAR"}, | ||
| 87 | {ERR_PACK(0,DSO_F_VMS_CTRL,0), "VMS_CTRL"}, | ||
| 88 | {ERR_PACK(0,DSO_F_VMS_LOAD,0), "VMS_LOAD"}, | ||
| 89 | {ERR_PACK(0,DSO_F_VMS_UNLOAD,0), "VMS_UNLOAD"}, | ||
| 90 | {ERR_PACK(0,DSO_F_WIN32_BIND_FUNC,0), "WIN32_BIND_FUNC"}, | ||
| 91 | {ERR_PACK(0,DSO_F_WIN32_BIND_VAR,0), "WIN32_BIND_VAR"}, | ||
| 92 | {ERR_PACK(0,DSO_F_WIN32_CTRL,0), "WIN32_CTRL"}, | ||
| 93 | {ERR_PACK(0,DSO_F_WIN32_LOAD,0), "WIN32_LOAD"}, | ||
| 94 | {ERR_PACK(0,DSO_F_WIN32_UNLOAD,0), "WIN32_UNLOAD"}, | ||
| 95 | {0,NULL} | ||
| 96 | }; | ||
| 97 | |||
| 98 | static ERR_STRING_DATA DSO_str_reasons[]= | ||
| 99 | { | ||
| 100 | {DSO_R_CTRL_FAILED ,"control command failed"}, | ||
| 101 | {DSO_R_FILENAME_TOO_BIG ,"filename too big"}, | ||
| 102 | {DSO_R_FINISH_FAILED ,"cleanup method function failed"}, | ||
| 103 | {DSO_R_LOAD_FAILED ,"could not load the shared library"}, | ||
| 104 | {DSO_R_NULL_HANDLE ,"a null shared library handle was used"}, | ||
| 105 | {DSO_R_STACK_ERROR ,"the meth_data stack is corrupt"}, | ||
| 106 | {DSO_R_SYM_FAILURE ,"could not bind to the requested symbol name"}, | ||
| 107 | {DSO_R_UNKNOWN_COMMAND ,"unknown control command"}, | ||
| 108 | {DSO_R_UNLOAD_FAILED ,"could not unload the shared library"}, | ||
| 109 | {DSO_R_UNSUPPORTED ,"functionality not supported"}, | ||
| 110 | {0,NULL} | ||
| 111 | }; | ||
| 112 | |||
| 113 | #endif | ||
| 114 | |||
| 115 | void ERR_load_DSO_strings(void) | ||
| 116 | { | ||
| 117 | static int init=1; | ||
| 118 | |||
| 119 | if (init) | ||
| 120 | { | ||
| 121 | init=0; | ||
| 122 | #ifndef NO_ERR | ||
| 123 | ERR_load_strings(ERR_LIB_DSO,DSO_str_functs); | ||
| 124 | ERR_load_strings(ERR_LIB_DSO,DSO_str_reasons); | ||
| 125 | #endif | ||
| 126 | |||
| 127 | } | ||
| 128 | } | ||
diff --git a/src/lib/libssl/src/crypto/dso/dso_lib.c b/src/lib/libssl/src/crypto/dso/dso_lib.c new file mode 100644 index 0000000000..acd166697e --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso_lib.c | |||
| @@ -0,0 +1,306 @@ | |||
| 1 | /* dso_lib.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <openssl/crypto.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/dso.h> | ||
| 63 | |||
| 64 | static DSO_METHOD *default_DSO_meth = NULL; | ||
| 65 | |||
| 66 | DSO *DSO_new(void) | ||
| 67 | { | ||
| 68 | return(DSO_new_method(NULL)); | ||
| 69 | } | ||
| 70 | |||
| 71 | void DSO_set_default_method(DSO_METHOD *meth) | ||
| 72 | { | ||
| 73 | default_DSO_meth = meth; | ||
| 74 | } | ||
| 75 | |||
| 76 | DSO_METHOD *DSO_get_default_method(void) | ||
| 77 | { | ||
| 78 | return(default_DSO_meth); | ||
| 79 | } | ||
| 80 | |||
| 81 | DSO_METHOD *DSO_get_method(DSO *dso) | ||
| 82 | { | ||
| 83 | return(dso->meth); | ||
| 84 | } | ||
| 85 | |||
| 86 | DSO_METHOD *DSO_set_method(DSO *dso, DSO_METHOD *meth) | ||
| 87 | { | ||
| 88 | DSO_METHOD *mtmp; | ||
| 89 | mtmp = dso->meth; | ||
| 90 | dso->meth = meth; | ||
| 91 | return(mtmp); | ||
| 92 | } | ||
| 93 | |||
| 94 | DSO *DSO_new_method(DSO_METHOD *meth) | ||
| 95 | { | ||
| 96 | DSO *ret; | ||
| 97 | |||
| 98 | if(default_DSO_meth == NULL) | ||
| 99 | /* We default to DSO_METH_openssl() which in turn defaults | ||
| 100 | * to stealing the "best available" method. Will fallback | ||
| 101 | * to DSO_METH_null() in the worst case. */ | ||
| 102 | default_DSO_meth = DSO_METHOD_openssl(); | ||
| 103 | ret = (DSO *)OPENSSL_malloc(sizeof(DSO)); | ||
| 104 | if(ret == NULL) | ||
| 105 | { | ||
| 106 | DSOerr(DSO_F_DSO_NEW_METHOD,ERR_R_MALLOC_FAILURE); | ||
| 107 | return(NULL); | ||
| 108 | } | ||
| 109 | memset(ret, 0, sizeof(DSO)); | ||
| 110 | ret->meth_data = sk_new_null(); | ||
| 111 | if((ret->meth_data = sk_new_null()) == NULL) | ||
| 112 | { | ||
| 113 | /* sk_new doesn't generate any errors so we do */ | ||
| 114 | DSOerr(DSO_F_DSO_NEW_METHOD,ERR_R_MALLOC_FAILURE); | ||
| 115 | OPENSSL_free(ret); | ||
| 116 | return(NULL); | ||
| 117 | } | ||
| 118 | if(meth == NULL) | ||
| 119 | ret->meth = default_DSO_meth; | ||
| 120 | else | ||
| 121 | ret->meth = meth; | ||
| 122 | ret->references = 1; | ||
| 123 | if((ret->meth->init != NULL) && !ret->meth->init(ret)) | ||
| 124 | { | ||
| 125 | OPENSSL_free(ret); | ||
| 126 | ret=NULL; | ||
| 127 | } | ||
| 128 | return(ret); | ||
| 129 | } | ||
| 130 | |||
| 131 | int DSO_free(DSO *dso) | ||
| 132 | { | ||
| 133 | int i; | ||
| 134 | |||
| 135 | if(dso == NULL) | ||
| 136 | { | ||
| 137 | DSOerr(DSO_F_DSO_FREE,ERR_R_PASSED_NULL_PARAMETER); | ||
| 138 | return(0); | ||
| 139 | } | ||
| 140 | |||
| 141 | i=CRYPTO_add(&dso->references,-1,CRYPTO_LOCK_DSO); | ||
| 142 | #ifdef REF_PRINT | ||
| 143 | REF_PRINT("DSO",dso); | ||
| 144 | #endif | ||
| 145 | if(i > 0) return(1); | ||
| 146 | #ifdef REF_CHECK | ||
| 147 | if(i < 0) | ||
| 148 | { | ||
| 149 | fprintf(stderr,"DSO_free, bad reference count\n"); | ||
| 150 | abort(); | ||
| 151 | } | ||
| 152 | #endif | ||
| 153 | |||
| 154 | if((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) | ||
| 155 | { | ||
| 156 | DSOerr(DSO_F_DSO_FREE,DSO_R_UNLOAD_FAILED); | ||
| 157 | return(0); | ||
| 158 | } | ||
| 159 | |||
| 160 | if((dso->meth->finish != NULL) && !dso->meth->finish(dso)) | ||
| 161 | { | ||
| 162 | DSOerr(DSO_F_DSO_FREE,DSO_R_FINISH_FAILED); | ||
| 163 | return(0); | ||
| 164 | } | ||
| 165 | |||
| 166 | sk_free(dso->meth_data); | ||
| 167 | |||
| 168 | OPENSSL_free(dso); | ||
| 169 | return(1); | ||
| 170 | } | ||
| 171 | |||
| 172 | int DSO_flags(DSO *dso) | ||
| 173 | { | ||
| 174 | return((dso == NULL) ? 0 : dso->flags); | ||
| 175 | } | ||
| 176 | |||
| 177 | |||
| 178 | int DSO_up(DSO *dso) | ||
| 179 | { | ||
| 180 | if (dso == NULL) | ||
| 181 | { | ||
| 182 | DSOerr(DSO_F_DSO_UP,ERR_R_PASSED_NULL_PARAMETER); | ||
| 183 | return(0); | ||
| 184 | } | ||
| 185 | |||
| 186 | CRYPTO_add(&dso->references,1,CRYPTO_LOCK_DSO); | ||
| 187 | return(1); | ||
| 188 | } | ||
| 189 | |||
| 190 | DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags) | ||
| 191 | { | ||
| 192 | DSO *ret; | ||
| 193 | int allocated = 0; | ||
| 194 | |||
| 195 | if(filename == NULL) | ||
| 196 | { | ||
| 197 | DSOerr(DSO_F_DSO_LOAD,ERR_R_PASSED_NULL_PARAMETER); | ||
| 198 | return(NULL); | ||
| 199 | } | ||
| 200 | if(dso == NULL) | ||
| 201 | { | ||
| 202 | ret = DSO_new_method(meth); | ||
| 203 | if(ret == NULL) | ||
| 204 | { | ||
| 205 | DSOerr(DSO_F_DSO_LOAD,ERR_R_MALLOC_FAILURE); | ||
| 206 | return(NULL); | ||
| 207 | } | ||
| 208 | allocated = 1; | ||
| 209 | } | ||
| 210 | else | ||
| 211 | ret = dso; | ||
| 212 | /* Bleurgh ... have to check for negative return values for | ||
| 213 | * errors. <grimace> */ | ||
| 214 | if(DSO_ctrl(ret, DSO_CTRL_SET_FLAGS, flags, NULL) < 0) | ||
| 215 | { | ||
| 216 | DSOerr(DSO_F_DSO_LOAD,DSO_R_CTRL_FAILED); | ||
| 217 | if(allocated) | ||
| 218 | DSO_free(ret); | ||
| 219 | return(NULL); | ||
| 220 | } | ||
| 221 | if(ret->meth->dso_load == NULL) | ||
| 222 | { | ||
| 223 | DSOerr(DSO_F_DSO_LOAD,DSO_R_UNSUPPORTED); | ||
| 224 | if(allocated) | ||
| 225 | DSO_free(ret); | ||
| 226 | return(NULL); | ||
| 227 | } | ||
| 228 | if(!ret->meth->dso_load(ret, filename)) | ||
| 229 | { | ||
| 230 | DSOerr(DSO_F_DSO_LOAD,DSO_R_LOAD_FAILED); | ||
| 231 | if(allocated) | ||
| 232 | DSO_free(ret); | ||
| 233 | return(NULL); | ||
| 234 | } | ||
| 235 | /* Load succeeded */ | ||
| 236 | return(ret); | ||
| 237 | } | ||
| 238 | |||
| 239 | void *DSO_bind_var(DSO *dso, const char *symname) | ||
| 240 | { | ||
| 241 | void *ret = NULL; | ||
| 242 | |||
| 243 | if((dso == NULL) || (symname == NULL)) | ||
| 244 | { | ||
| 245 | DSOerr(DSO_F_DSO_BIND_VAR,ERR_R_PASSED_NULL_PARAMETER); | ||
| 246 | return(NULL); | ||
| 247 | } | ||
| 248 | if(dso->meth->dso_bind_var == NULL) | ||
| 249 | { | ||
| 250 | DSOerr(DSO_F_DSO_BIND_VAR,DSO_R_UNSUPPORTED); | ||
| 251 | return(NULL); | ||
| 252 | } | ||
| 253 | if((ret = dso->meth->dso_bind_var(dso, symname)) == NULL) | ||
| 254 | { | ||
| 255 | DSOerr(DSO_F_DSO_BIND_VAR,DSO_R_SYM_FAILURE); | ||
| 256 | return(NULL); | ||
| 257 | } | ||
| 258 | /* Success */ | ||
| 259 | return(ret); | ||
| 260 | } | ||
| 261 | |||
| 262 | DSO_FUNC_TYPE DSO_bind_func(DSO *dso, const char *symname) | ||
| 263 | { | ||
| 264 | DSO_FUNC_TYPE ret = NULL; | ||
| 265 | |||
| 266 | if((dso == NULL) || (symname == NULL)) | ||
| 267 | { | ||
| 268 | DSOerr(DSO_F_DSO_BIND_FUNC,ERR_R_PASSED_NULL_PARAMETER); | ||
| 269 | return(NULL); | ||
| 270 | } | ||
| 271 | if(dso->meth->dso_bind_func == NULL) | ||
| 272 | { | ||
| 273 | DSOerr(DSO_F_DSO_BIND_FUNC,DSO_R_UNSUPPORTED); | ||
| 274 | return(NULL); | ||
| 275 | } | ||
| 276 | if((ret = dso->meth->dso_bind_func(dso, symname)) == NULL) | ||
| 277 | { | ||
| 278 | DSOerr(DSO_F_DSO_BIND_FUNC,DSO_R_SYM_FAILURE); | ||
| 279 | return(NULL); | ||
| 280 | } | ||
| 281 | /* Success */ | ||
| 282 | return(ret); | ||
| 283 | } | ||
| 284 | |||
| 285 | /* I don't really like these *_ctrl functions very much to be perfectly | ||
| 286 | * honest. For one thing, I think I have to return a negative value for | ||
| 287 | * any error because possible DSO_ctrl() commands may return values | ||
| 288 | * such as "size"s that can legitimately be zero (making the standard | ||
| 289 | * "if(DSO_cmd(...))" form that works almost everywhere else fail at | ||
| 290 | * odd times. I'd prefer "output" values to be passed by reference and | ||
| 291 | * the return value as success/failure like usual ... but we conform | ||
| 292 | * when we must... :-) */ | ||
| 293 | long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg) | ||
| 294 | { | ||
| 295 | if(dso == NULL) | ||
| 296 | { | ||
| 297 | DSOerr(DSO_F_DSO_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
| 298 | return(-1); | ||
| 299 | } | ||
| 300 | if((dso->meth == NULL) || (dso->meth->dso_ctrl == NULL)) | ||
| 301 | { | ||
| 302 | DSOerr(DSO_F_DSO_CTRL,DSO_R_UNSUPPORTED); | ||
| 303 | return(-1); | ||
| 304 | } | ||
| 305 | return(dso->meth->dso_ctrl(dso,cmd,larg,parg)); | ||
| 306 | } | ||
diff --git a/src/lib/libssl/src/crypto/dso/dso_null.c b/src/lib/libssl/src/crypto/dso/dso_null.c new file mode 100644 index 0000000000..fa13a7cb0f --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso_null.c | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | /* dso_null.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* This "NULL" method is provided as the fallback for systems that have | ||
| 60 | * no appropriate support for "shared-libraries". */ | ||
| 61 | |||
| 62 | #include <stdio.h> | ||
| 63 | #include "cryptlib.h" | ||
| 64 | #include <openssl/dso.h> | ||
| 65 | |||
| 66 | static DSO_METHOD dso_meth_null = { | ||
| 67 | "NULL shared library method", | ||
| 68 | NULL, /* load */ | ||
| 69 | NULL, /* unload */ | ||
| 70 | NULL, /* bind_var */ | ||
| 71 | NULL, /* bind_func */ | ||
| 72 | /* For now, "unbind" doesn't exist */ | ||
| 73 | #if 0 | ||
| 74 | NULL, /* unbind_var */ | ||
| 75 | NULL, /* unbind_func */ | ||
| 76 | #endif | ||
| 77 | NULL, /* ctrl */ | ||
| 78 | NULL, /* init */ | ||
| 79 | NULL /* finish */ | ||
| 80 | }; | ||
| 81 | |||
| 82 | DSO_METHOD *DSO_METHOD_null(void) | ||
| 83 | { | ||
| 84 | return(&dso_meth_null); | ||
| 85 | } | ||
| 86 | |||
diff --git a/src/lib/libssl/src/crypto/dso/dso_openssl.c b/src/lib/libssl/src/crypto/dso/dso_openssl.c new file mode 100644 index 0000000000..a4395ebffe --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso_openssl.c | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | /* dso_openssl.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/dso.h> | ||
| 62 | |||
| 63 | /* We just pinch the method from an appropriate "default" method. */ | ||
| 64 | |||
| 65 | DSO_METHOD *DSO_METHOD_openssl(void) | ||
| 66 | { | ||
| 67 | #ifdef DEF_DSO_METHOD | ||
| 68 | return(DEF_DSO_METHOD()); | ||
| 69 | #elif defined(DSO_DLFCN) | ||
| 70 | return(DSO_METHOD_dlfcn()); | ||
| 71 | #elif defined(DSO_DL) | ||
| 72 | return(DSO_METHOD_dl()); | ||
| 73 | #elif defined(DSO_WIN32) | ||
| 74 | return(DSO_METHOD_win32()); | ||
| 75 | #elif defined(DSO_VMS) | ||
| 76 | return(DSO_METHOD_vms()); | ||
| 77 | #else | ||
| 78 | return(DSO_METHOD_null()); | ||
| 79 | #endif | ||
| 80 | } | ||
| 81 | |||
diff --git a/src/lib/libssl/src/crypto/dso/dso_vms.c b/src/lib/libssl/src/crypto/dso/dso_vms.c new file mode 100644 index 0000000000..8ff7090129 --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso_vms.c | |||
| @@ -0,0 +1,371 @@ | |||
| 1 | /* dso_vms.c */ | ||
| 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <errno.h> | ||
| 62 | #ifdef VMS | ||
| 63 | #pragma message disable DOLLARID | ||
| 64 | #include <lib$routines.h> | ||
| 65 | #include <libfisdef.h> | ||
| 66 | #include <stsdef.h> | ||
| 67 | #include <descrip.h> | ||
| 68 | #include <starlet.h> | ||
| 69 | #endif | ||
| 70 | #include "cryptlib.h" | ||
| 71 | #include <openssl/dso.h> | ||
| 72 | |||
| 73 | #ifndef VMS | ||
| 74 | DSO_METHOD *DSO_METHOD_vms(void) | ||
| 75 | { | ||
| 76 | return NULL; | ||
| 77 | } | ||
| 78 | #else | ||
| 79 | #pragma message disable DOLLARID | ||
| 80 | |||
| 81 | static int vms_load(DSO *dso, const char *filename); | ||
| 82 | static int vms_unload(DSO *dso); | ||
| 83 | static void *vms_bind_var(DSO *dso, const char *symname); | ||
| 84 | static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname); | ||
| 85 | #if 0 | ||
| 86 | static int vms_unbind_var(DSO *dso, char *symname, void *symptr); | ||
| 87 | static int vms_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); | ||
| 88 | static int vms_init(DSO *dso); | ||
| 89 | static int vms_finish(DSO *dso); | ||
| 90 | #endif | ||
| 91 | static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg); | ||
| 92 | |||
| 93 | static DSO_METHOD dso_meth_vms = { | ||
| 94 | "OpenSSL 'VMS' shared library method", | ||
| 95 | vms_load, | ||
| 96 | NULL, /* unload */ | ||
| 97 | vms_bind_var, | ||
| 98 | vms_bind_func, | ||
| 99 | /* For now, "unbind" doesn't exist */ | ||
| 100 | #if 0 | ||
| 101 | NULL, /* unbind_var */ | ||
| 102 | NULL, /* unbind_func */ | ||
| 103 | #endif | ||
| 104 | vms_ctrl, | ||
| 105 | NULL, /* init */ | ||
| 106 | NULL /* finish */ | ||
| 107 | }; | ||
| 108 | |||
| 109 | /* On VMS, the only "handle" is the file name. LIB$FIND_IMAGE_SYMBOL depends | ||
| 110 | * on the reference to the file name being the same for all calls regarding | ||
| 111 | * one shared image, so we'll just store it in an instance of the following | ||
| 112 | * structure and put a pointer to that instance in the meth_data stack. | ||
| 113 | */ | ||
| 114 | typedef struct dso_internal_st | ||
| 115 | { | ||
| 116 | /* This should contain the name only, no directory, | ||
| 117 | * no extension, nothing but a name. */ | ||
| 118 | struct dsc$descriptor_s filename_dsc; | ||
| 119 | char filename[FILENAME_MAX+1]; | ||
| 120 | /* This contains whatever is not in filename, if needed. | ||
| 121 | * Normally not defined. */ | ||
| 122 | struct dsc$descriptor_s imagename_dsc; | ||
| 123 | char imagename[FILENAME_MAX+1]; | ||
| 124 | } DSO_VMS_INTERNAL; | ||
| 125 | |||
| 126 | |||
| 127 | DSO_METHOD *DSO_METHOD_vms(void) | ||
| 128 | { | ||
| 129 | return(&dso_meth_vms); | ||
| 130 | } | ||
| 131 | |||
| 132 | static int vms_load(DSO *dso, const char *filename) | ||
| 133 | { | ||
| 134 | DSO_VMS_INTERNAL *p; | ||
| 135 | const char *sp1, *sp2; /* Search result */ | ||
| 136 | |||
| 137 | /* A file specification may look like this: | ||
| 138 | * | ||
| 139 | * node::dev:[dir-spec]name.type;ver | ||
| 140 | * | ||
| 141 | * or (for compatibility with TOPS-20): | ||
| 142 | * | ||
| 143 | * node::dev:<dir-spec>name.type;ver | ||
| 144 | * | ||
| 145 | * and the dir-spec uses '.' as separator. Also, a dir-spec | ||
| 146 | * may consist of several parts, with mixed use of [] and <>: | ||
| 147 | * | ||
| 148 | * [dir1.]<dir2> | ||
| 149 | * | ||
| 150 | * We need to split the file specification into the name and | ||
| 151 | * the rest (both before and after the name itself). | ||
| 152 | */ | ||
| 153 | /* Start with trying to find the end of a dir-spec, and save the | ||
| 154 | position of the byte after in sp1 */ | ||
| 155 | sp1 = strrchr(filename, ']'); | ||
| 156 | sp2 = strrchr(filename, '>'); | ||
| 157 | if (sp1 == NULL) sp1 = sp2; | ||
| 158 | if (sp2 != NULL && sp2 > sp1) sp1 = sp2; | ||
| 159 | if (sp1 == NULL) sp1 = strrchr(filename, ':'); | ||
| 160 | if (sp1 == NULL) | ||
| 161 | sp1 = filename; | ||
| 162 | else | ||
| 163 | sp1++; /* The byte after the found character */ | ||
| 164 | /* Now, let's see if there's a type, and save the position in sp2 */ | ||
| 165 | sp2 = strchr(sp1, '.'); | ||
| 166 | /* If we found it, that's where we'll cut. Otherwise, look for a | ||
| 167 | version number and save the position in sp2 */ | ||
| 168 | if (sp2 == NULL) sp2 = strchr(sp1, ';'); | ||
| 169 | /* If there was still nothing to find, set sp2 to point at the end of | ||
| 170 | the string */ | ||
| 171 | if (sp2 == NULL) sp2 = sp1 + strlen(sp1); | ||
| 172 | |||
| 173 | /* Check that we won't get buffer overflows */ | ||
| 174 | if (sp2 - sp1 > FILENAME_MAX | ||
| 175 | || (sp1 - filename) + strlen(sp2) > FILENAME_MAX) | ||
| 176 | { | ||
| 177 | DSOerr(DSO_F_VMS_LOAD,DSO_R_FILENAME_TOO_BIG); | ||
| 178 | return(0); | ||
| 179 | } | ||
| 180 | |||
| 181 | p = (DSO_VMS_INTERNAL *)OPENSSL_malloc(sizeof(DSO_VMS_INTERNAL)); | ||
| 182 | if(p == NULL) | ||
| 183 | { | ||
| 184 | DSOerr(DSO_F_VMS_LOAD,ERR_R_MALLOC_FAILURE); | ||
| 185 | return(0); | ||
| 186 | } | ||
| 187 | |||
| 188 | strncpy(p->filename, sp1, sp2-sp1); | ||
| 189 | p->filename[sp2-sp1] = '\0'; | ||
| 190 | |||
| 191 | strncpy(p->imagename, filename, sp1-filename); | ||
| 192 | p->imagename[sp1-filename] = '\0'; | ||
| 193 | strcat(p->imagename, sp2); | ||
| 194 | |||
| 195 | p->filename_dsc.dsc$w_length = strlen(p->filename); | ||
| 196 | p->filename_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | ||
| 197 | p->filename_dsc.dsc$b_class = DSC$K_CLASS_S; | ||
| 198 | p->filename_dsc.dsc$a_pointer = p->filename; | ||
| 199 | p->imagename_dsc.dsc$w_length = strlen(p->imagename); | ||
| 200 | p->imagename_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | ||
| 201 | p->imagename_dsc.dsc$b_class = DSC$K_CLASS_S; | ||
| 202 | p->imagename_dsc.dsc$a_pointer = p->imagename; | ||
| 203 | |||
| 204 | if(!sk_push(dso->meth_data, (char *)p)) | ||
| 205 | { | ||
| 206 | DSOerr(DSO_F_VMS_LOAD,DSO_R_STACK_ERROR); | ||
| 207 | OPENSSL_free(p); | ||
| 208 | return(0); | ||
| 209 | } | ||
| 210 | return(1); | ||
| 211 | } | ||
| 212 | |||
| 213 | /* Note that this doesn't actually unload the shared image, as there is no | ||
| 214 | * such thing in VMS. Next time it get loaded again, a new copy will | ||
| 215 | * actually be loaded. | ||
| 216 | */ | ||
| 217 | static int vms_unload(DSO *dso) | ||
| 218 | { | ||
| 219 | DSO_VMS_INTERNAL *p; | ||
| 220 | if(dso == NULL) | ||
| 221 | { | ||
| 222 | DSOerr(DSO_F_VMS_UNLOAD,ERR_R_PASSED_NULL_PARAMETER); | ||
| 223 | return(0); | ||
| 224 | } | ||
| 225 | if(sk_num(dso->meth_data) < 1) | ||
| 226 | return(1); | ||
| 227 | p = (DSO_VMS_INTERNAL *)sk_pop(dso->meth_data); | ||
| 228 | if(p == NULL) | ||
| 229 | { | ||
| 230 | DSOerr(DSO_F_VMS_UNLOAD,DSO_R_NULL_HANDLE); | ||
| 231 | return(0); | ||
| 232 | } | ||
| 233 | /* Cleanup */ | ||
| 234 | OPENSSL_free(p); | ||
| 235 | return(1); | ||
| 236 | } | ||
| 237 | |||
| 238 | /* We must do this in a separate function because of the way the exception | ||
| 239 | handler works (it makes this function return */ | ||
| 240 | static int do_find_symbol(DSO_VMS_INTERNAL *ptr, | ||
| 241 | struct dsc$descriptor_s *symname_dsc, void **sym, | ||
| 242 | unsigned long flags) | ||
| 243 | { | ||
| 244 | /* Make sure that signals are caught and returned instead of | ||
| 245 | aborting the program. The exception handler gets unestablished | ||
| 246 | automatically on return from this function. */ | ||
| 247 | lib$establish(lib$sig_to_ret); | ||
| 248 | |||
| 249 | if(ptr->imagename_dsc.dsc$w_length) | ||
| 250 | return lib$find_image_symbol(&ptr->filename_dsc, | ||
| 251 | symname_dsc, sym, | ||
| 252 | &ptr->imagename_dsc, flags); | ||
| 253 | else | ||
| 254 | return lib$find_image_symbol(&ptr->filename_dsc, | ||
| 255 | symname_dsc, sym, | ||
| 256 | 0, flags); | ||
| 257 | } | ||
| 258 | |||
| 259 | void vms_bind_sym(DSO *dso, const char *symname, void **sym) | ||
| 260 | { | ||
| 261 | DSO_VMS_INTERNAL *ptr; | ||
| 262 | int status; | ||
| 263 | int flags = LIB$M_FIS_MIXEDCASE; | ||
| 264 | struct dsc$descriptor_s symname_dsc; | ||
| 265 | *sym = NULL; | ||
| 266 | |||
| 267 | symname_dsc.dsc$w_length = strlen(symname); | ||
| 268 | symname_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | ||
| 269 | symname_dsc.dsc$b_class = DSC$K_CLASS_S; | ||
| 270 | symname_dsc.dsc$a_pointer = (char *)symname; /* The cast is needed */ | ||
| 271 | |||
| 272 | if((dso == NULL) || (symname == NULL)) | ||
| 273 | { | ||
| 274 | DSOerr(DSO_F_VMS_BIND_VAR,ERR_R_PASSED_NULL_PARAMETER); | ||
| 275 | return; | ||
| 276 | } | ||
| 277 | if(sk_num(dso->meth_data) < 1) | ||
| 278 | { | ||
| 279 | DSOerr(DSO_F_VMS_BIND_VAR,DSO_R_STACK_ERROR); | ||
| 280 | return; | ||
| 281 | } | ||
| 282 | ptr = (DSO_VMS_INTERNAL *)sk_value(dso->meth_data, | ||
| 283 | sk_num(dso->meth_data) - 1); | ||
| 284 | if(ptr == NULL) | ||
| 285 | { | ||
| 286 | DSOerr(DSO_F_VMS_BIND_VAR,DSO_R_NULL_HANDLE); | ||
| 287 | return; | ||
| 288 | } | ||
| 289 | |||
| 290 | if(dso->flags & DSO_FLAG_UPCASE_SYMBOL) flags = 0; | ||
| 291 | |||
| 292 | status = do_find_symbol(ptr, &symname_dsc, sym, flags); | ||
| 293 | |||
| 294 | if(!$VMS_STATUS_SUCCESS(status)) | ||
| 295 | { | ||
| 296 | unsigned short length; | ||
| 297 | char errstring[257]; | ||
| 298 | struct dsc$descriptor_s errstring_dsc; | ||
| 299 | |||
| 300 | errstring_dsc.dsc$w_length = sizeof(errstring); | ||
| 301 | errstring_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | ||
| 302 | errstring_dsc.dsc$b_class = DSC$K_CLASS_S; | ||
| 303 | errstring_dsc.dsc$a_pointer = errstring; | ||
| 304 | |||
| 305 | *sym = NULL; | ||
| 306 | |||
| 307 | status = sys$getmsg(status, &length, &errstring_dsc, 1, 0); | ||
| 308 | |||
| 309 | if (!$VMS_STATUS_SUCCESS(status)) | ||
| 310 | lib$signal(status); /* This is really bad. Abort! */ | ||
| 311 | else | ||
| 312 | { | ||
| 313 | errstring[length] = '\0'; | ||
| 314 | |||
| 315 | DSOerr(DSO_F_VMS_BIND_VAR,DSO_R_SYM_FAILURE); | ||
| 316 | if (ptr->imagename_dsc.dsc$w_length) | ||
| 317 | ERR_add_error_data(9, | ||
| 318 | "Symbol ", symname, | ||
| 319 | " in ", ptr->filename, | ||
| 320 | " (", ptr->imagename, ")", | ||
| 321 | ": ", errstring); | ||
| 322 | else | ||
| 323 | ERR_add_error_data(6, | ||
| 324 | "Symbol ", symname, | ||
| 325 | " in ", ptr->filename, | ||
| 326 | ": ", errstring); | ||
| 327 | } | ||
| 328 | return; | ||
| 329 | } | ||
| 330 | return; | ||
| 331 | } | ||
| 332 | |||
| 333 | static void *vms_bind_var(DSO *dso, const char *symname) | ||
| 334 | { | ||
| 335 | void *sym = 0; | ||
| 336 | vms_bind_sym(dso, symname, &sym); | ||
| 337 | return sym; | ||
| 338 | } | ||
| 339 | |||
| 340 | static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname) | ||
| 341 | { | ||
| 342 | DSO_FUNC_TYPE sym = 0; | ||
| 343 | vms_bind_sym(dso, symname, (void **)&sym); | ||
| 344 | return sym; | ||
| 345 | } | ||
| 346 | |||
| 347 | static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg) | ||
| 348 | { | ||
| 349 | if(dso == NULL) | ||
| 350 | { | ||
| 351 | DSOerr(DSO_F_VMS_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
| 352 | return(-1); | ||
| 353 | } | ||
| 354 | switch(cmd) | ||
| 355 | { | ||
| 356 | case DSO_CTRL_GET_FLAGS: | ||
| 357 | return dso->flags; | ||
| 358 | case DSO_CTRL_SET_FLAGS: | ||
| 359 | dso->flags = (int)larg; | ||
| 360 | return(0); | ||
| 361 | case DSO_CTRL_OR_FLAGS: | ||
| 362 | dso->flags |= (int)larg; | ||
| 363 | return(0); | ||
| 364 | default: | ||
| 365 | break; | ||
| 366 | } | ||
| 367 | DSOerr(DSO_F_VMS_CTRL,DSO_R_UNKNOWN_COMMAND); | ||
| 368 | return(-1); | ||
| 369 | } | ||
| 370 | |||
| 371 | #endif /* VMS */ | ||
diff --git a/src/lib/libssl/src/crypto/dso/dso_win32.c b/src/lib/libssl/src/crypto/dso/dso_win32.c new file mode 100644 index 0000000000..7f1d904806 --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/dso_win32.c | |||
| @@ -0,0 +1,273 @@ | |||
| 1 | /* dso_win32.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/dso.h> | ||
| 63 | |||
| 64 | #ifndef WIN32 | ||
| 65 | DSO_METHOD *DSO_METHOD_win32(void) | ||
| 66 | { | ||
| 67 | return NULL; | ||
| 68 | } | ||
| 69 | #else | ||
| 70 | |||
| 71 | /* Part of the hack in "win32_load" ... */ | ||
| 72 | #define DSO_MAX_TRANSLATED_SIZE 256 | ||
| 73 | |||
| 74 | static int win32_load(DSO *dso, const char *filename); | ||
| 75 | static int win32_unload(DSO *dso); | ||
| 76 | static void *win32_bind_var(DSO *dso, const char *symname); | ||
| 77 | static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname); | ||
| 78 | #if 0 | ||
| 79 | static int win32_unbind_var(DSO *dso, char *symname, void *symptr); | ||
| 80 | static int win32_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); | ||
| 81 | static int win32_init(DSO *dso); | ||
| 82 | static int win32_finish(DSO *dso); | ||
| 83 | #endif | ||
| 84 | static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg); | ||
| 85 | |||
| 86 | static DSO_METHOD dso_meth_win32 = { | ||
| 87 | "OpenSSL 'win32' shared library method", | ||
| 88 | win32_load, | ||
| 89 | win32_unload, | ||
| 90 | win32_bind_var, | ||
| 91 | win32_bind_func, | ||
| 92 | /* For now, "unbind" doesn't exist */ | ||
| 93 | #if 0 | ||
| 94 | NULL, /* unbind_var */ | ||
| 95 | NULL, /* unbind_func */ | ||
| 96 | #endif | ||
| 97 | win32_ctrl, | ||
| 98 | NULL, /* init */ | ||
| 99 | NULL /* finish */ | ||
| 100 | }; | ||
| 101 | |||
| 102 | DSO_METHOD *DSO_METHOD_win32(void) | ||
| 103 | { | ||
| 104 | return(&dso_meth_win32); | ||
| 105 | } | ||
| 106 | |||
| 107 | /* For this DSO_METHOD, our meth_data STACK will contain; | ||
| 108 | * (i) a pointer to the handle (HINSTANCE) returned from | ||
| 109 | * LoadLibrary(), and copied. | ||
| 110 | */ | ||
| 111 | |||
| 112 | static int win32_load(DSO *dso, const char *filename) | ||
| 113 | { | ||
| 114 | HINSTANCE h, *p; | ||
| 115 | char translated[DSO_MAX_TRANSLATED_SIZE]; | ||
| 116 | int len; | ||
| 117 | |||
| 118 | /* NB: This is a hideous hack, but I'm not yet sure what | ||
| 119 | * to replace it with. This attempts to convert any filename, | ||
| 120 | * that looks like it has no path information, into a | ||
| 121 | * translated form, e. "blah" -> "blah.dll" ... I'm more | ||
| 122 | * comfortable putting hacks into win32 code though ;-) */ | ||
| 123 | len = strlen(filename); | ||
| 124 | if((dso->flags & DSO_FLAG_NAME_TRANSLATION) && | ||
| 125 | (len + 4 < DSO_MAX_TRANSLATED_SIZE) && | ||
| 126 | (strstr(filename, "/") == NULL) && | ||
| 127 | (strstr(filename, "\\") == NULL) && | ||
| 128 | (strstr(filename, ":") == NULL)) | ||
| 129 | { | ||
| 130 | sprintf(translated, "%s.dll", filename); | ||
| 131 | h = LoadLibrary(translated); | ||
| 132 | } | ||
| 133 | else | ||
| 134 | h = LoadLibrary(filename); | ||
| 135 | if(h == NULL) | ||
| 136 | { | ||
| 137 | DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED); | ||
| 138 | return(0); | ||
| 139 | } | ||
| 140 | p = (HINSTANCE *)OPENSSL_malloc(sizeof(HINSTANCE)); | ||
| 141 | if(p == NULL) | ||
| 142 | { | ||
| 143 | DSOerr(DSO_F_WIN32_LOAD,ERR_R_MALLOC_FAILURE); | ||
| 144 | FreeLibrary(h); | ||
| 145 | return(0); | ||
| 146 | } | ||
| 147 | *p = h; | ||
| 148 | if(!sk_push(dso->meth_data, (char *)p)) | ||
| 149 | { | ||
| 150 | DSOerr(DSO_F_WIN32_LOAD,DSO_R_STACK_ERROR); | ||
| 151 | FreeLibrary(h); | ||
| 152 | OPENSSL_free(p); | ||
| 153 | return(0); | ||
| 154 | } | ||
| 155 | return(1); | ||
| 156 | } | ||
| 157 | |||
| 158 | static int win32_unload(DSO *dso) | ||
| 159 | { | ||
| 160 | HINSTANCE *p; | ||
| 161 | if(dso == NULL) | ||
| 162 | { | ||
| 163 | DSOerr(DSO_F_WIN32_UNLOAD,ERR_R_PASSED_NULL_PARAMETER); | ||
| 164 | return(0); | ||
| 165 | } | ||
| 166 | if(sk_num(dso->meth_data) < 1) | ||
| 167 | return(1); | ||
| 168 | p = (HINSTANCE *)sk_pop(dso->meth_data); | ||
| 169 | if(p == NULL) | ||
| 170 | { | ||
| 171 | DSOerr(DSO_F_WIN32_UNLOAD,DSO_R_NULL_HANDLE); | ||
| 172 | return(0); | ||
| 173 | } | ||
| 174 | if(!FreeLibrary(*p)) | ||
| 175 | { | ||
| 176 | DSOerr(DSO_F_WIN32_UNLOAD,DSO_R_UNLOAD_FAILED); | ||
| 177 | /* We should push the value back onto the stack in | ||
| 178 | * case of a retry. */ | ||
| 179 | sk_push(dso->meth_data, (char *)p); | ||
| 180 | return(0); | ||
| 181 | } | ||
| 182 | /* Cleanup */ | ||
| 183 | OPENSSL_free(p); | ||
| 184 | return(1); | ||
| 185 | } | ||
| 186 | |||
| 187 | /* Using GetProcAddress for variables? TODO: Check this out in | ||
| 188 | * the Win32 API docs, there's probably a variant for variables. */ | ||
| 189 | static void *win32_bind_var(DSO *dso, const char *symname) | ||
| 190 | { | ||
| 191 | HINSTANCE *ptr; | ||
| 192 | void *sym; | ||
| 193 | |||
| 194 | if((dso == NULL) || (symname == NULL)) | ||
| 195 | { | ||
| 196 | DSOerr(DSO_F_WIN32_BIND_VAR,ERR_R_PASSED_NULL_PARAMETER); | ||
| 197 | return(NULL); | ||
| 198 | } | ||
| 199 | if(sk_num(dso->meth_data) < 1) | ||
| 200 | { | ||
| 201 | DSOerr(DSO_F_WIN32_BIND_VAR,DSO_R_STACK_ERROR); | ||
| 202 | return(NULL); | ||
| 203 | } | ||
| 204 | ptr = (HINSTANCE *)sk_value(dso->meth_data, sk_num(dso->meth_data) - 1); | ||
| 205 | if(ptr == NULL) | ||
| 206 | { | ||
| 207 | DSOerr(DSO_F_WIN32_BIND_VAR,DSO_R_NULL_HANDLE); | ||
| 208 | return(NULL); | ||
| 209 | } | ||
| 210 | sym = GetProcAddress(*ptr, symname); | ||
| 211 | if(sym == NULL) | ||
| 212 | { | ||
| 213 | DSOerr(DSO_F_WIN32_BIND_VAR,DSO_R_SYM_FAILURE); | ||
| 214 | return(NULL); | ||
| 215 | } | ||
| 216 | return(sym); | ||
| 217 | } | ||
| 218 | |||
| 219 | static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname) | ||
| 220 | { | ||
| 221 | HINSTANCE *ptr; | ||
| 222 | void *sym; | ||
| 223 | |||
| 224 | if((dso == NULL) || (symname == NULL)) | ||
| 225 | { | ||
| 226 | DSOerr(DSO_F_WIN32_BIND_FUNC,ERR_R_PASSED_NULL_PARAMETER); | ||
| 227 | return(NULL); | ||
| 228 | } | ||
| 229 | if(sk_num(dso->meth_data) < 1) | ||
| 230 | { | ||
| 231 | DSOerr(DSO_F_WIN32_BIND_FUNC,DSO_R_STACK_ERROR); | ||
| 232 | return(NULL); | ||
| 233 | } | ||
| 234 | ptr = (HINSTANCE *)sk_value(dso->meth_data, sk_num(dso->meth_data) - 1); | ||
| 235 | if(ptr == NULL) | ||
| 236 | { | ||
| 237 | DSOerr(DSO_F_WIN32_BIND_FUNC,DSO_R_NULL_HANDLE); | ||
| 238 | return(NULL); | ||
| 239 | } | ||
| 240 | sym = GetProcAddress(*ptr, symname); | ||
| 241 | if(sym == NULL) | ||
| 242 | { | ||
| 243 | DSOerr(DSO_F_WIN32_BIND_FUNC,DSO_R_SYM_FAILURE); | ||
| 244 | return(NULL); | ||
| 245 | } | ||
| 246 | return((DSO_FUNC_TYPE)sym); | ||
| 247 | } | ||
| 248 | |||
| 249 | static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg) | ||
| 250 | { | ||
| 251 | if(dso == NULL) | ||
| 252 | { | ||
| 253 | DSOerr(DSO_F_WIN32_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
| 254 | return(-1); | ||
| 255 | } | ||
| 256 | switch(cmd) | ||
| 257 | { | ||
| 258 | case DSO_CTRL_GET_FLAGS: | ||
| 259 | return dso->flags; | ||
| 260 | case DSO_CTRL_SET_FLAGS: | ||
| 261 | dso->flags = (int)larg; | ||
| 262 | return(0); | ||
| 263 | case DSO_CTRL_OR_FLAGS: | ||
| 264 | dso->flags |= (int)larg; | ||
| 265 | return(0); | ||
| 266 | default: | ||
| 267 | break; | ||
| 268 | } | ||
| 269 | DSOerr(DSO_F_WIN32_CTRL,DSO_R_UNKNOWN_COMMAND); | ||
| 270 | return(-1); | ||
| 271 | } | ||
| 272 | |||
| 273 | #endif /* WIN32 */ | ||
diff --git a/src/lib/libssl/src/crypto/engine/Makefile.ssl b/src/lib/libssl/src/crypto/engine/Makefile.ssl new file mode 100644 index 0000000000..7a0ffe755d --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/Makefile.ssl | |||
| @@ -0,0 +1,220 @@ | |||
| 1 | # | ||
| 2 | # OpenSSL/crypto/engine/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= engine | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALL_PREFIX= | ||
| 11 | OPENSSLDIR= /usr/local/ssl | ||
| 12 | INSTALLTOP=/usr/local/ssl | ||
| 13 | MAKE= make -f Makefile.ssl | ||
| 14 | MAKEDEPEND= $(TOP)/util/domd $(TOP) | ||
| 15 | MAKEFILE= Makefile.ssl | ||
| 16 | AR= ar r | ||
| 17 | |||
| 18 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 19 | |||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= enginetest.c | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= engine_err.c engine_lib.c engine_list.c engine_openssl.c \ | ||
| 26 | hw_atalla.c hw_cswift.c hw_ncipher.c | ||
| 27 | LIBOBJ= engine_err.o engine_lib.o engine_list.o engine_openssl.o \ | ||
| 28 | hw_atalla.o hw_cswift.o hw_ncipher.o | ||
| 29 | |||
| 30 | SRC= $(LIBSRC) | ||
| 31 | |||
| 32 | EXHEADER= engine.h | ||
| 33 | HEADER= $(EXHEADER) | ||
| 34 | |||
| 35 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 36 | |||
| 37 | top: | ||
| 38 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 39 | |||
| 40 | all: lib | ||
| 41 | |||
| 42 | lib: $(LIBOBJ) | ||
| 43 | $(AR) $(LIB) $(LIBOBJ) | ||
| 44 | $(RANLIB) $(LIB) | ||
| 45 | @touch lib | ||
| 46 | |||
| 47 | files: | ||
| 48 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 49 | |||
| 50 | links: | ||
| 51 | @$(TOP)/util/point.sh Makefile.ssl Makefile | ||
| 52 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
| 53 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
| 54 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
| 55 | |||
| 56 | install: | ||
| 57 | @for i in $(EXHEADER) ; \ | ||
| 58 | do \ | ||
| 59 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 60 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 61 | done; | ||
| 62 | |||
| 63 | tags: | ||
| 64 | ctags $(SRC) | ||
| 65 | |||
| 66 | tests: | ||
| 67 | |||
| 68 | lint: | ||
| 69 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 70 | |||
| 71 | depend: | ||
| 72 | $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) | ||
| 73 | |||
| 74 | dclean: | ||
| 75 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 76 | mv -f Makefile.new $(MAKEFILE) | ||
| 77 | |||
| 78 | clean: | ||
| 79 | rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 80 | |||
| 81 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 82 | |||
| 83 | engine_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 84 | engine_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 85 | engine_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 86 | engine_err.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
| 87 | engine_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 88 | engine_err.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
| 89 | engine_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 90 | engine_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 91 | engine_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 92 | engine_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 93 | engine_err.o: ../../include/openssl/objects.h | ||
| 94 | engine_err.o: ../../include/openssl/opensslconf.h | ||
| 95 | engine_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 96 | engine_err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 97 | engine_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 98 | engine_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 99 | engine_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 100 | engine_err.o: ../../include/openssl/symhacks.h | ||
| 101 | engine_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 102 | engine_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 103 | engine_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 104 | engine_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 105 | engine_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 106 | engine_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 107 | engine_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
| 108 | engine_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 109 | engine_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 110 | engine_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 111 | engine_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 112 | engine_lib.o: ../../include/openssl/objects.h | ||
| 113 | engine_lib.o: ../../include/openssl/opensslconf.h | ||
| 114 | engine_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 115 | engine_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 116 | engine_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 117 | engine_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 118 | engine_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 119 | engine_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h | ||
| 120 | engine_list.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 121 | engine_list.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 122 | engine_list.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 123 | engine_list.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 124 | engine_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 125 | engine_list.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 126 | engine_list.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
| 127 | engine_list.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 128 | engine_list.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 129 | engine_list.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 130 | engine_list.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 131 | engine_list.o: ../../include/openssl/objects.h | ||
| 132 | engine_list.o: ../../include/openssl/opensslconf.h | ||
| 133 | engine_list.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 134 | engine_list.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 135 | engine_list.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 136 | engine_list.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 137 | engine_list.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 138 | engine_list.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h | ||
| 139 | engine_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 140 | engine_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 141 | engine_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 142 | engine_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 143 | engine_openssl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 144 | engine_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h | ||
| 145 | engine_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
| 146 | engine_openssl.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 147 | engine_openssl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 148 | engine_openssl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 149 | engine_openssl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 150 | engine_openssl.o: ../../include/openssl/obj_mac.h | ||
| 151 | engine_openssl.o: ../../include/openssl/objects.h | ||
| 152 | engine_openssl.o: ../../include/openssl/opensslconf.h | ||
| 153 | engine_openssl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 154 | engine_openssl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 155 | engine_openssl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 156 | engine_openssl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 157 | engine_openssl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 158 | engine_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h | ||
| 159 | hw_atalla.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 160 | hw_atalla.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 161 | hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 162 | hw_atalla.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 163 | hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 164 | hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h | ||
| 165 | hw_atalla.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
| 166 | hw_atalla.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 167 | hw_atalla.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 168 | hw_atalla.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 169 | hw_atalla.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 170 | hw_atalla.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 171 | hw_atalla.o: ../../include/openssl/opensslconf.h | ||
| 172 | hw_atalla.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 173 | hw_atalla.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 174 | hw_atalla.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 175 | hw_atalla.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 176 | hw_atalla.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 177 | hw_atalla.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h | ||
| 178 | hw_atalla.o: vendor_defns/atalla.h | ||
| 179 | hw_cswift.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 180 | hw_cswift.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 181 | hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 182 | hw_cswift.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 183 | hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 184 | hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h | ||
| 185 | hw_cswift.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
| 186 | hw_cswift.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 187 | hw_cswift.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 188 | hw_cswift.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 189 | hw_cswift.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 190 | hw_cswift.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 191 | hw_cswift.o: ../../include/openssl/opensslconf.h | ||
| 192 | hw_cswift.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 193 | hw_cswift.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 194 | hw_cswift.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 195 | hw_cswift.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 196 | hw_cswift.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 197 | hw_cswift.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h | ||
| 198 | hw_cswift.o: vendor_defns/cswift.h | ||
| 199 | hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 200 | hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 201 | hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 202 | hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 203 | hw_ncipher.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 204 | hw_ncipher.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h | ||
| 205 | hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
| 206 | hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 207 | hw_ncipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 208 | hw_ncipher.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 209 | hw_ncipher.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 210 | hw_ncipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 211 | hw_ncipher.o: ../../include/openssl/opensslconf.h | ||
| 212 | hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | ||
| 213 | hw_ncipher.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | ||
| 214 | hw_ncipher.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
| 215 | hw_ncipher.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 216 | hw_ncipher.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 217 | hw_ncipher.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 218 | hw_ncipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 219 | hw_ncipher.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 220 | hw_ncipher.o: ../cryptlib.h engine_int.h vendor_defns/hwcryptohook.h | ||
diff --git a/src/lib/libssl/src/crypto/engine/README b/src/lib/libssl/src/crypto/engine/README new file mode 100644 index 0000000000..96595e6f35 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/README | |||
| @@ -0,0 +1,278 @@ | |||
| 1 | NOTES, THOUGHTS, and EVERYTHING | ||
| 2 | ------------------------------- | ||
| 3 | |||
| 4 | (1) Concurrency and locking ... I made a change to the ENGINE_free code | ||
| 5 | because I spotted a potential hold-up in proceedings (doing too | ||
| 6 | much inside a lock including calling a callback), there may be | ||
| 7 | other bits like this. What do the speed/optimisation freaks think | ||
| 8 | of this aspect of the code and design? There's lots of locking for | ||
| 9 | manipulation functions and I need that to keep things nice and | ||
| 10 | solid, but this manipulation is mostly (de)initialisation, I would | ||
| 11 | think that most run-time locking is purely in the ENGINE_init and | ||
| 12 | ENGINE_finish calls that might be made when getting handles for | ||
| 13 | RSA (and friends') structures. These would be mostly reference | ||
| 14 | count operations as the functional references should always be 1 | ||
| 15 | or greater at run-time to prevent init/deinit thrashing. | ||
| 16 | |||
| 17 | (2) nCipher support, via the HWCryptoHook API, is now in the code. | ||
| 18 | Apparently this hasn't been tested too much yet, but it looks | ||
| 19 | good. :-) Atalla support has been added too, but shares a lot in | ||
| 20 | common with Ben's original hooks in bn_exp.c (although it has been | ||
| 21 | ENGINE-ified, and error handling wrapped around it) and it's also | ||
| 22 | had some low-volume testing, so it should be usable. | ||
| 23 | |||
| 24 | (3) Of more concern, we need to work out (a) how to put together usable | ||
| 25 | RAND_METHODs for units that just have one "get n or less random | ||
| 26 | bytes" function, (b) we also need to determine how to hook the code | ||
| 27 | in crypto/rand/ to use the ENGINE defaults in a way similar to what | ||
| 28 | has been done in crypto/rsa/, crypto/dsa/, etc. | ||
| 29 | |||
| 30 | (4) ENGINE should really grow to encompass more than 3 public key | ||
| 31 | algorithms and randomness gathering. The structure/data level of | ||
| 32 | the engine code is hidden from code outside the crypto/engine/ | ||
| 33 | directory so change shouldn't be too viral. More important though | ||
| 34 | is how things should evolve ... this needs thought and discussion. | ||
| 35 | |||
| 36 | |||
| 37 | -----------------------------------==*==----------------------------------- | ||
| 38 | |||
| 39 | More notes 2000-08-01 | ||
| 40 | --------------------- | ||
| 41 | |||
| 42 | Geoff Thorpe, who designed the engine part, wrote a pretty good description | ||
| 43 | of the thoughts he had when he built it, good enough to include verbatim here | ||
| 44 | (with his permission) -- Richard Levitte | ||
| 45 | |||
| 46 | |||
| 47 | Date: Tue, 1 Aug 2000 16:54:08 +0100 (BST) | ||
| 48 | From: Geoff Thorpe | ||
| 49 | Subject: Re: The thoughts to merge BRANCH_engine into the main trunk are | ||
| 50 | emerging | ||
| 51 | |||
| 52 | Hi there, | ||
| 53 | |||
| 54 | I'm going to try and do some justice to this, but I'm a little short on | ||
| 55 | time and the there is an endless amount that could be discussed on this | ||
| 56 | subject. sigh ... please bear with me :-) | ||
| 57 | |||
| 58 | > The changes in BRANCH_engine dig deep into the core of OpenSSL, for example | ||
| 59 | > into the RSA and RAND routines, adding a level of indirection which is needed | ||
| 60 | > to keep the abstraction, as far as I understand. It would be a good thing if | ||
| 61 | > those who do play with those things took a look at the changes that have been | ||
| 62 | > done in the branch and say out loud how much (or hopefully little) we've made | ||
| 63 | > fools of ourselves. | ||
| 64 | |||
| 65 | The point here is that the code that has emerged in the BRANCH_engine | ||
| 66 | branch was based on some initial requirements of mine that I went in and | ||
| 67 | addressed, and Richard has picked up the ball and run with it too. It | ||
| 68 | would be really useful to get some review of the approach we've taken, but | ||
| 69 | first I think I need to describe as best I can the reasons behind what has | ||
| 70 | been done so far, in particular what issues we have tried to address when | ||
| 71 | doing this, and what issues we have intentionally (or necessarily) tried | ||
| 72 | to avoid. | ||
| 73 | |||
| 74 | methods, engines, and evps | ||
| 75 | -------------------------- | ||
| 76 | |||
| 77 | There has been some dicussion, particularly with Steve, about where this | ||
| 78 | ENGINE stuff might fit into the conceptual picture as/when we start to | ||
| 79 | abstract algorithms a little bit to make the library more extensible. In | ||
| 80 | particular, it would desirable to have algorithms (symmetric, hash, pkc, | ||
| 81 | etc) abstracted in some way that allows them to be just objects sitting in | ||
| 82 | a list (or database) ... it'll just happen that the "DSA" object doesn't | ||
| 83 | support encryption whereas the "RSA" object does. This requires a lot of | ||
| 84 | consideration to begin to know how to tackle it; in particular how | ||
| 85 | encapsulated should these things be? If the objects also understand their | ||
| 86 | own ASN1 encodings and what-not, then it would for example be possible to | ||
| 87 | add support for elliptic-curve DSA in as a new algorithm and automatically | ||
| 88 | have ECC-DSA certificates supported in SSL applications. Possible, but not | ||
| 89 | easy. :-) | ||
| 90 | |||
| 91 | Whatever, it seems that the way to go (if I've grok'd Steve's comments on | ||
| 92 | this in the past) is to amalgamate these things in EVP as is already done | ||
| 93 | (I think) for ciphers or hashes (Steve, please correct/elaborate). I | ||
| 94 | certainly think something should be done in this direction because right | ||
| 95 | now we have different source directories, types, functions, and methods | ||
| 96 | for each algorithm - even when conceptually they are very much different | ||
| 97 | feathers of the same bird. (This is certainly all true for the public-key | ||
| 98 | stuff, and may be partially true for the other parts.) | ||
| 99 | |||
| 100 | ENGINE was *not* conceived as a way of solving this, far from it. Nor was | ||
| 101 | it conceived as a way of replacing the various "***_METHOD"s. It was | ||
| 102 | conceived as an abstraction of a sort of "virtual crypto device". If we | ||
| 103 | lived in a world where "EVP_ALGO"s (or something like them) encapsulated | ||
| 104 | particular algorithms like RSA,DSA,MD5,RC4,etc, and "***_METHOD"s | ||
| 105 | encapsulated interfaces to algorithms (eg. some algo's might support a | ||
| 106 | PKC_METHOD, a HASH_METHOD, or a CIPHER_METHOD, who knows?), then I would | ||
| 107 | think that ENGINE would encapsulate an implementation of arbitrarily many | ||
| 108 | of those algorithms - perhaps as alternatives to existing algorithms | ||
| 109 | and/or perhaps as new previously unimplemented algorithms. An ENGINE could | ||
| 110 | be used to contain an alternative software implementation, a wrapper for a | ||
| 111 | hardware acceleration and/or key-management unit, a comms-wrapper for | ||
| 112 | distributing cryptographic operations to remote machines, or any other | ||
| 113 | "devices" your imagination can dream up. | ||
| 114 | |||
| 115 | However, what has been done in the ENGINE branch so far is nothing more | ||
| 116 | than starting to get our toes wet. I had a couple of self-imposed | ||
| 117 | requirements when putting the initial abstraction together, and I may have | ||
| 118 | already posed these in one form or another on the list, but briefly; | ||
| 119 | |||
| 120 | (i) only bother with public key algorithms for now, and maybe RAND too | ||
| 121 | (motivated by the need to get hardware support going and the fact | ||
| 122 | this was a comparitively easy subset to address to begin with). | ||
| 123 | |||
| 124 | (ii) don't change (if at all possible) the existing crypto code, ie. the | ||
| 125 | implementations, the way the ***_METHODs work, etc. | ||
| 126 | |||
| 127 | (iii) ensure that if no function from the ENGINE code is ever called then | ||
| 128 | things work the way they always did, and there is no memory | ||
| 129 | allocation (otherwise the failure to cleanup would be a problem - | ||
| 130 | this is part of the reason no STACKs were used, the other part of | ||
| 131 | the reason being I found them inappropriate). | ||
| 132 | |||
| 133 | (iv) ensure that all the built-in crypto was encapsulated by one of | ||
| 134 | these "ENGINE"s and that this engine was automatically selected as | ||
| 135 | the default. | ||
| 136 | |||
| 137 | (v) provide the minimum hooking possible in the existing crypto code | ||
| 138 | so that global functions (eg. RSA_public_encrypt) do not need any | ||
| 139 | extra parameter, yet will use whatever the current default ENGINE | ||
| 140 | for that RSA key is, and that the default can be set "per-key" | ||
| 141 | and globally (new keys will assume the global default, and keys | ||
| 142 | without their own default will be operated on using the global | ||
| 143 | default). NB: Try and make (v) conflict as little as possible with | ||
| 144 | (ii). :-) | ||
| 145 | |||
| 146 | (vi) wrap the ENGINE code up in duct tape so you can't even see the | ||
| 147 | corners. Ie. expose no structures at all, just black-box pointers. | ||
| 148 | |||
| 149 | (v) maintain internally a list of ENGINEs on which a calling | ||
| 150 | application can iterate, interrogate, etc. Allow a calling | ||
| 151 | application to hook in new ENGINEs, remove ENGINEs from the list, | ||
| 152 | and enforce uniqueness within the global list of each ENGINE's | ||
| 153 | "unique id". | ||
| 154 | |||
| 155 | (vi) keep reference counts for everything - eg. this includes storing a | ||
| 156 | reference inside each RSA structure to the ENGINE that it uses. | ||
| 157 | This is freed when the RSA structure is destroyed, or has its | ||
| 158 | ENGINE explicitly changed. The net effect needs to be that at any | ||
| 159 | time, it is deterministic to know whether an ENGINE is in use or | ||
| 160 | can be safely removed (or unloaded in the case of the other type | ||
| 161 | of reference) without invalidating function pointers that may or | ||
| 162 | may not be used indavertently in the future. This was actually | ||
| 163 | one of the biggest problems to overcome in the existing OpenSSL | ||
| 164 | code - implementations had always been assumed to be ever-present, | ||
| 165 | so there was no trivial way to get round this. | ||
| 166 | |||
| 167 | (vii) distinguish between structural references and functional | ||
| 168 | references. | ||
| 169 | |||
| 170 | A *little* detail | ||
| 171 | ----------------- | ||
| 172 | |||
| 173 | While my mind is on it; I'll illustrate the bit in item (vii). This idea | ||
| 174 | turned out to be very handy - the ENGINEs themselves need to be operated | ||
| 175 | on and manipulated simply as objects without necessarily trying to | ||
| 176 | "enable" them for use. Eg. most host machines will not have the necessary | ||
| 177 | hardware or software to support all the engines one might compile into | ||
| 178 | OpenSSL, yet it needs to be possible to iterate across the ENGINEs, | ||
| 179 | querying their names, properties, etc - all happening in a thread-safe | ||
| 180 | manner that uses reference counts (if you imagine two threads iterating | ||
| 181 | through a list and one thread removing the ENGINE the other is currently | ||
| 182 | looking at - you can see the gotcha waiting to happen). For all of this, | ||
| 183 | *structural references* are used and operate much like the other reference | ||
| 184 | counts in OpenSSL. | ||
| 185 | |||
| 186 | The other kind of reference count is for *functional* references - these | ||
| 187 | indicate a reference on which the caller can actually assume the | ||
| 188 | particular ENGINE to be initialised and usable to perform the operations | ||
| 189 | it implements. Any increment or decrement of the functional reference | ||
| 190 | count automatically invokes a corresponding change in the structural | ||
| 191 | reference count, as it is fairly obvious that a functional reference is a | ||
| 192 | restricted case of a structural reference. So struct_ref >= funct_ref at | ||
| 193 | all times. NB: functional references are usually obtained by a call to | ||
| 194 | ENGINE_init(), but can also be created implicitly by calls that require a | ||
| 195 | new functional reference to be created, eg. ENGINE_set_default(). Either | ||
| 196 | way the only time the underlying ENGINE's "init" function is really called | ||
| 197 | is when the (functional) reference count increases to 1, similarly the | ||
| 198 | underlying "finish" handler is only called as the count goes down to 0. | ||
| 199 | The effect of this, for example, is that if you set the default ENGINE for | ||
| 200 | RSA operations to be "cswift", then its functional reference count will | ||
| 201 | already be at least 1 so the CryptoSwift shared-library and the card will | ||
| 202 | stay loaded and initialised until such time as all RSA keys using the | ||
| 203 | cswift ENGINE are changed or destroyed and the default ENGINE for RSA | ||
| 204 | operations has been changed. This prevents repeated thrashing of init and | ||
| 205 | finish handling if the count keeps getting down as far as zero. | ||
| 206 | |||
| 207 | Otherwise, the way the ENGINE code has been put together I think pretty | ||
| 208 | much reflects the above points. The reason for the ENGINE structure having | ||
| 209 | individual RSA_METHOD, DSA_METHOD, etc pointers is simply that it was the | ||
| 210 | easiest way to go about things for now, to hook it all into the raw | ||
| 211 | RSA,DSA,etc code, and I was trying to the keep the structure invisible | ||
| 212 | anyway so that the way this is internally managed could be easily changed | ||
| 213 | later on when we start to work out what's to be done about these other | ||
| 214 | abstractions. | ||
| 215 | |||
| 216 | Down the line, if some EVP-based technique emerges for adequately | ||
| 217 | encapsulating algorithms and all their various bits and pieces, then I can | ||
| 218 | imagine that "ENGINE" would turn into a reference-counting database of | ||
| 219 | these EVP things, of which the default "openssl" ENGINE would be the | ||
| 220 | library's own object database of pre-built software implemented algorithms | ||
| 221 | (and such). It would also be cool to see the idea of "METHOD"s detached | ||
| 222 | from the algorithms themselves ... so RSA, DSA, ElGamal, etc can all | ||
| 223 | expose essentially the same METHOD (aka interface), which would include | ||
| 224 | any querying/flagging stuff to identify what the algorithm can/can't do, | ||
| 225 | its name, and other stuff like max/min block sizes, key sizes, etc. This | ||
| 226 | would result in ENGINE similarly detaching its internal database of | ||
| 227 | algorithm implementations from the function definitions that return | ||
| 228 | interfaces to them. I think ... | ||
| 229 | |||
| 230 | As for DSOs etc. Well the DSO code is pretty handy (but could be made much | ||
| 231 | more so) for loading vendor's driver-libraries and talking to them in some | ||
| 232 | generic way, but right now there's still big problems associated with | ||
| 233 | actually putting OpenSSL code (ie. new ENGINEs, or anything else for that | ||
| 234 | matter) in dynamically loadable libraries. These problems won't go away in | ||
| 235 | a hurry so I don't think we should expect to have any kind of | ||
| 236 | shared-library extensions any time soon - but solving the problems is a | ||
| 237 | good thing to aim for, and would as a side-effect probably help make | ||
| 238 | OpenSSL more usable as a shared-library itself (looking at the things | ||
| 239 | needed to do this will show you why). | ||
| 240 | |||
| 241 | One of the problems is that if you look at any of the ENGINE | ||
| 242 | implementations, eg. hw_cswift.c or hw_ncipher.c, you'll see how it needs | ||
| 243 | a variety of functionality and definitions from various areas of OpenSSL, | ||
| 244 | including crypto/bn/, crypto/err/, crypto/ itself (locking for example), | ||
| 245 | crypto/dso/, crypto/engine/, crypto/rsa, etc etc etc. So if similar code | ||
| 246 | were to be suctioned off into shared libraries, the shared libraries would | ||
| 247 | either have to duplicate all the definitions and code and avoid loader | ||
| 248 | conflicts, or OpenSSL would have to somehow expose all that functionality | ||
| 249 | to the shared-library. If this isn't a big enough problem, the issue of | ||
| 250 | binary compatibility will be - anyone writing Apache modules can tell you | ||
| 251 | that (Ralf? Ben? :-). However, I don't think OpenSSL would need to be | ||
| 252 | quite so forgiving as Apache should be, so OpenSSL could simply tell its | ||
| 253 | version to the DSO and leave the DSO with the problem of deciding whether | ||
| 254 | to proceed or bail out for fear of binary incompatibilities. | ||
| 255 | |||
| 256 | Certainly one thing that would go a long way to addressing this is to | ||
| 257 | embark on a bit of an opaqueness mission. I've set the ENGINE code up with | ||
| 258 | this in mind - it's so draconian that even to declare your own ENGINE, you | ||
| 259 | have to get the engine code to create the underlying ENGINE structure, and | ||
| 260 | then feed in the new ENGINE's function/method pointers through various | ||
| 261 | "set" functions. The more of the code that takes on such a black-box | ||
| 262 | approach, the more of the code that will be (a) easy to expose to shared | ||
| 263 | libraries that need it, and (b) easy to expose to applications wanting to | ||
| 264 | use OpenSSL itself as a shared-library. From my own explorations in | ||
| 265 | OpenSSL, the biggest leviathan I've seen that is a problem in this respect | ||
| 266 | is the BIGNUM code. Trying to "expose" the bignum code through any kind of | ||
| 267 | organised "METHODs", let alone do all the necessary bignum operations | ||
| 268 | solely through functions rather than direct access to the structures and | ||
| 269 | macros, will be a massive pain in the "r"s. | ||
| 270 | |||
| 271 | Anyway, I'm done for now - hope it was readable. Thoughts? | ||
| 272 | |||
| 273 | Cheers, | ||
| 274 | Geoff | ||
| 275 | |||
| 276 | |||
| 277 | -----------------------------------==*==----------------------------------- | ||
| 278 | |||
diff --git a/src/lib/libssl/src/crypto/engine/engine.h b/src/lib/libssl/src/crypto/engine/engine.h new file mode 100644 index 0000000000..2983f47034 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/engine.h | |||
| @@ -0,0 +1,398 @@ | |||
| 1 | /* openssl/engine.h */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_ENGINE_H | ||
| 60 | #define HEADER_ENGINE_H | ||
| 61 | |||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/dsa.h> | ||
| 65 | #include <openssl/dh.h> | ||
| 66 | #include <openssl/rand.h> | ||
| 67 | #include <openssl/evp.h> | ||
| 68 | #include <openssl/symhacks.h> | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | extern "C" { | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /* These flags are used to control combinations of algorithm (methods) | ||
| 75 | * by bitwise "OR"ing. */ | ||
| 76 | #define ENGINE_METHOD_RSA (unsigned int)0x0001 | ||
| 77 | #define ENGINE_METHOD_DSA (unsigned int)0x0002 | ||
| 78 | #define ENGINE_METHOD_DH (unsigned int)0x0004 | ||
| 79 | #define ENGINE_METHOD_RAND (unsigned int)0x0008 | ||
| 80 | #define ENGINE_METHOD_BN_MOD_EXP (unsigned int)0x0010 | ||
| 81 | #define ENGINE_METHOD_BN_MOD_EXP_CRT (unsigned int)0x0020 | ||
| 82 | /* Obvious all-or-nothing cases. */ | ||
| 83 | #define ENGINE_METHOD_ALL (unsigned int)0xFFFF | ||
| 84 | #define ENGINE_METHOD_NONE (unsigned int)0x0000 | ||
| 85 | |||
| 86 | /* These flags are used to tell the ctrl function what should be done. | ||
| 87 | * All command numbers are shared between all engines, even if some don't | ||
| 88 | * make sense to some engines. In such a case, they do nothing but return | ||
| 89 | * the error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED. */ | ||
| 90 | #define ENGINE_CTRL_SET_LOGSTREAM 1 | ||
| 91 | #define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2 | ||
| 92 | /* Flags specific to the nCipher "chil" engine */ | ||
| 93 | #define ENGINE_CTRL_CHIL_SET_FORKCHECK 100 | ||
| 94 | /* Depending on the value of the (long)i argument, this sets or | ||
| 95 | * unsets the SimpleForkCheck flag in the CHIL API to enable or | ||
| 96 | * disable checking and workarounds for applications that fork(). | ||
| 97 | */ | ||
| 98 | #define ENGINE_CTRL_CHIL_NO_LOCKING 101 | ||
| 99 | /* This prevents the initialisation function from providing mutex | ||
| 100 | * callbacks to the nCipher library. */ | ||
| 101 | |||
| 102 | /* As we're missing a BIGNUM_METHOD, we need a couple of locally | ||
| 103 | * defined function types that engines can implement. */ | ||
| 104 | |||
| 105 | #ifndef HEADER_ENGINE_INT_H | ||
| 106 | /* mod_exp operation, calculates; r = a ^ p mod m | ||
| 107 | * NB: ctx can be NULL, but if supplied, the implementation may use | ||
| 108 | * it if it wishes. */ | ||
| 109 | typedef int (*BN_MOD_EXP)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 110 | const BIGNUM *m, BN_CTX *ctx); | ||
| 111 | |||
| 112 | /* private key operation for RSA, provided seperately in case other | ||
| 113 | * RSA implementations wish to use it. */ | ||
| 114 | typedef int (*BN_MOD_EXP_CRT)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 115 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | ||
| 116 | const BIGNUM *iqmp, BN_CTX *ctx); | ||
| 117 | |||
| 118 | /* Generic function pointer */ | ||
| 119 | typedef void (*ENGINE_GEN_FUNC_PTR)(); | ||
| 120 | /* Generic function pointer taking no arguments */ | ||
| 121 | typedef void (*ENGINE_GEN_INT_FUNC_PTR)(void); | ||
| 122 | /* Specific control function pointer */ | ||
| 123 | typedef int (*ENGINE_CTRL_FUNC_PTR)(int cmd, long i, void *p, void (*f)()); | ||
| 124 | |||
| 125 | /* The list of "engine" types is a static array of (const ENGINE*) | ||
| 126 | * pointers (not dynamic because static is fine for now and we otherwise | ||
| 127 | * have to hook an appropriate load/unload function in to initialise and | ||
| 128 | * cleanup). */ | ||
| 129 | typedef struct engine_st ENGINE; | ||
| 130 | #endif | ||
| 131 | |||
| 132 | /* STRUCTURE functions ... all of these functions deal with pointers to | ||
| 133 | * ENGINE structures where the pointers have a "structural reference". | ||
| 134 | * This means that their reference is to allow access to the structure | ||
| 135 | * but it does not imply that the structure is functional. To simply | ||
| 136 | * increment or decrement the structural reference count, use ENGINE_new | ||
| 137 | * and ENGINE_free. NB: This is not required when iterating using | ||
| 138 | * ENGINE_get_next as it will automatically decrement the structural | ||
| 139 | * reference count of the "current" ENGINE and increment the structural | ||
| 140 | * reference count of the ENGINE it returns (unless it is NULL). */ | ||
| 141 | |||
| 142 | /* Get the first/last "ENGINE" type available. */ | ||
| 143 | ENGINE *ENGINE_get_first(void); | ||
| 144 | ENGINE *ENGINE_get_last(void); | ||
| 145 | /* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ | ||
| 146 | ENGINE *ENGINE_get_next(ENGINE *e); | ||
| 147 | ENGINE *ENGINE_get_prev(ENGINE *e); | ||
| 148 | /* Add another "ENGINE" type into the array. */ | ||
| 149 | int ENGINE_add(ENGINE *e); | ||
| 150 | /* Remove an existing "ENGINE" type from the array. */ | ||
| 151 | int ENGINE_remove(ENGINE *e); | ||
| 152 | /* Retrieve an engine from the list by its unique "id" value. */ | ||
| 153 | ENGINE *ENGINE_by_id(const char *id); | ||
| 154 | |||
| 155 | /* These functions are useful for manufacturing new ENGINE | ||
| 156 | * structures. They don't address reference counting at all - | ||
| 157 | * one uses them to populate an ENGINE structure with personalised | ||
| 158 | * implementations of things prior to using it directly or adding | ||
| 159 | * it to the builtin ENGINE list in OpenSSL. These are also here | ||
| 160 | * so that the ENGINE structure doesn't have to be exposed and | ||
| 161 | * break binary compatibility! | ||
| 162 | * | ||
| 163 | * NB: I'm changing ENGINE_new to force the ENGINE structure to | ||
| 164 | * be allocated from within OpenSSL. See the comment for | ||
| 165 | * ENGINE_get_struct_size(). | ||
| 166 | */ | ||
| 167 | #if 0 | ||
| 168 | ENGINE *ENGINE_new(ENGINE *e); | ||
| 169 | #else | ||
| 170 | ENGINE *ENGINE_new(void); | ||
| 171 | #endif | ||
| 172 | int ENGINE_free(ENGINE *e); | ||
| 173 | int ENGINE_set_id(ENGINE *e, const char *id); | ||
| 174 | int ENGINE_set_name(ENGINE *e, const char *name); | ||
| 175 | int ENGINE_set_RSA(ENGINE *e, RSA_METHOD *rsa_meth); | ||
| 176 | int ENGINE_set_DSA(ENGINE *e, DSA_METHOD *dsa_meth); | ||
| 177 | int ENGINE_set_DH(ENGINE *e, DH_METHOD *dh_meth); | ||
| 178 | int ENGINE_set_RAND(ENGINE *e, RAND_METHOD *rand_meth); | ||
| 179 | int ENGINE_set_BN_mod_exp(ENGINE *e, BN_MOD_EXP bn_mod_exp); | ||
| 180 | int ENGINE_set_BN_mod_exp_crt(ENGINE *e, BN_MOD_EXP_CRT bn_mod_exp_crt); | ||
| 181 | int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f); | ||
| 182 | int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f); | ||
| 183 | int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f); | ||
| 184 | |||
| 185 | /* These return values from within the ENGINE structure. These can | ||
| 186 | * be useful with functional references as well as structural | ||
| 187 | * references - it depends which you obtained. Using the result | ||
| 188 | * for functional purposes if you only obtained a structural | ||
| 189 | * reference may be problematic! */ | ||
| 190 | const char *ENGINE_get_id(ENGINE *e); | ||
| 191 | const char *ENGINE_get_name(ENGINE *e); | ||
| 192 | RSA_METHOD *ENGINE_get_RSA(ENGINE *e); | ||
| 193 | DSA_METHOD *ENGINE_get_DSA(ENGINE *e); | ||
| 194 | DH_METHOD *ENGINE_get_DH(ENGINE *e); | ||
| 195 | RAND_METHOD *ENGINE_get_RAND(ENGINE *e); | ||
| 196 | BN_MOD_EXP ENGINE_get_BN_mod_exp(ENGINE *e); | ||
| 197 | BN_MOD_EXP_CRT ENGINE_get_BN_mod_exp_crt(ENGINE *e); | ||
| 198 | ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(ENGINE *e); | ||
| 199 | ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(ENGINE *e); | ||
| 200 | ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(ENGINE *e); | ||
| 201 | |||
| 202 | /* ENGINE_new is normally passed a NULL in the first parameter because | ||
| 203 | * the calling code doesn't have access to the definition of the ENGINE | ||
| 204 | * structure (for good reason). However, if the caller wishes to use | ||
| 205 | * its own memory allocation or use a static array, the following call | ||
| 206 | * should be used to check the amount of memory the ENGINE structure | ||
| 207 | * will occupy. This will make the code more future-proof. | ||
| 208 | * | ||
| 209 | * NB: I'm "#if 0"-ing this out because it's better to force the use of | ||
| 210 | * internally allocated memory. See similar change in ENGINE_new(). | ||
| 211 | */ | ||
| 212 | #if 0 | ||
| 213 | int ENGINE_get_struct_size(void); | ||
| 214 | #endif | ||
| 215 | |||
| 216 | /* FUNCTIONAL functions. These functions deal with ENGINE structures | ||
| 217 | * that have (or will) be initialised for use. Broadly speaking, the | ||
| 218 | * structural functions are useful for iterating the list of available | ||
| 219 | * engine types, creating new engine types, and other "list" operations. | ||
| 220 | * These functions actually deal with ENGINEs that are to be used. As | ||
| 221 | * such these functions can fail (if applicable) when particular | ||
| 222 | * engines are unavailable - eg. if a hardware accelerator is not | ||
| 223 | * attached or not functioning correctly. Each ENGINE has 2 reference | ||
| 224 | * counts; structural and functional. Every time a functional reference | ||
| 225 | * is obtained or released, a corresponding structural reference is | ||
| 226 | * automatically obtained or released too. */ | ||
| 227 | |||
| 228 | /* Initialise a engine type for use (or up its reference count if it's | ||
| 229 | * already in use). This will fail if the engine is not currently | ||
| 230 | * operational and cannot initialise. */ | ||
| 231 | int ENGINE_init(ENGINE *e); | ||
| 232 | /* Free a functional reference to a engine type. This does not require | ||
| 233 | * a corresponding call to ENGINE_free as it also releases a structural | ||
| 234 | * reference. */ | ||
| 235 | int ENGINE_finish(ENGINE *e); | ||
| 236 | /* Send control parametrised commands to the engine. The possibilities | ||
| 237 | * to send down an integer, a pointer to data or a function pointer are | ||
| 238 | * provided. Any of the parameters may or may not be NULL, depending | ||
| 239 | * on the command number */ | ||
| 240 | /* WARNING: This is currently experimental and may change radically! */ | ||
| 241 | int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()); | ||
| 242 | |||
| 243 | /* The following functions handle keys that are stored in some secondary | ||
| 244 | * location, handled by the engine. The storage may be on a card or | ||
| 245 | * whatever. */ | ||
| 246 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, | ||
| 247 | const char *passphrase); | ||
| 248 | EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, | ||
| 249 | const char *passphrase); | ||
| 250 | |||
| 251 | /* This returns a pointer for the current ENGINE structure that | ||
| 252 | * is (by default) performing any RSA operations. The value returned | ||
| 253 | * is an incremented reference, so it should be free'd (ENGINE_finish) | ||
| 254 | * before it is discarded. */ | ||
| 255 | ENGINE *ENGINE_get_default_RSA(void); | ||
| 256 | /* Same for the other "methods" */ | ||
| 257 | ENGINE *ENGINE_get_default_DSA(void); | ||
| 258 | ENGINE *ENGINE_get_default_DH(void); | ||
| 259 | ENGINE *ENGINE_get_default_RAND(void); | ||
| 260 | ENGINE *ENGINE_get_default_BN_mod_exp(void); | ||
| 261 | ENGINE *ENGINE_get_default_BN_mod_exp_crt(void); | ||
| 262 | |||
| 263 | /* This sets a new default ENGINE structure for performing RSA | ||
| 264 | * operations. If the result is non-zero (success) then the ENGINE | ||
| 265 | * structure will have had its reference count up'd so the caller | ||
| 266 | * should still free their own reference 'e'. */ | ||
| 267 | int ENGINE_set_default_RSA(ENGINE *e); | ||
| 268 | /* Same for the other "methods" */ | ||
| 269 | int ENGINE_set_default_DSA(ENGINE *e); | ||
| 270 | int ENGINE_set_default_DH(ENGINE *e); | ||
| 271 | int ENGINE_set_default_RAND(ENGINE *e); | ||
| 272 | int ENGINE_set_default_BN_mod_exp(ENGINE *e); | ||
| 273 | int ENGINE_set_default_BN_mod_exp_crt(ENGINE *e); | ||
| 274 | |||
| 275 | /* The combination "set" - the flags are bitwise "OR"d from the | ||
| 276 | * ENGINE_METHOD_*** defines above. */ | ||
| 277 | int ENGINE_set_default(ENGINE *e, unsigned int flags); | ||
| 278 | |||
| 279 | /* Obligatory error function. */ | ||
| 280 | void ERR_load_ENGINE_strings(void); | ||
| 281 | |||
| 282 | /* | ||
| 283 | * Error codes for all engine functions. NB: We use "generic" | ||
| 284 | * function names instead of per-implementation ones because this | ||
| 285 | * levels the playing field for externally implemented bootstrapped | ||
| 286 | * support code. As the filename and line number is included, it's | ||
| 287 | * more important to indicate the type of function, so that | ||
| 288 | * bootstrapped code (that can't easily add its own errors in) can | ||
| 289 | * use the same error codes too. | ||
| 290 | */ | ||
| 291 | |||
| 292 | /* BEGIN ERROR CODES */ | ||
| 293 | /* The following lines are auto generated by the script mkerr.pl. Any changes | ||
| 294 | * made after this point may be overwritten when the script is next run. | ||
| 295 | */ | ||
| 296 | |||
| 297 | /* Error codes for the ENGINE functions. */ | ||
| 298 | |||
| 299 | /* Function codes. */ | ||
| 300 | #define ENGINE_F_ATALLA_FINISH 135 | ||
| 301 | #define ENGINE_F_ATALLA_INIT 136 | ||
| 302 | #define ENGINE_F_ATALLA_MOD_EXP 137 | ||
| 303 | #define ENGINE_F_ATALLA_RSA_MOD_EXP 138 | ||
| 304 | #define ENGINE_F_CSWIFT_DSA_SIGN 133 | ||
| 305 | #define ENGINE_F_CSWIFT_DSA_VERIFY 134 | ||
| 306 | #define ENGINE_F_CSWIFT_FINISH 100 | ||
| 307 | #define ENGINE_F_CSWIFT_INIT 101 | ||
| 308 | #define ENGINE_F_CSWIFT_MOD_EXP 102 | ||
| 309 | #define ENGINE_F_CSWIFT_MOD_EXP_CRT 103 | ||
| 310 | #define ENGINE_F_CSWIFT_RSA_MOD_EXP 104 | ||
| 311 | #define ENGINE_F_ENGINE_ADD 105 | ||
| 312 | #define ENGINE_F_ENGINE_BY_ID 106 | ||
| 313 | #define ENGINE_F_ENGINE_CTRL 142 | ||
| 314 | #define ENGINE_F_ENGINE_FINISH 107 | ||
| 315 | #define ENGINE_F_ENGINE_FREE 108 | ||
| 316 | #define ENGINE_F_ENGINE_GET_BN_MOD_EXP 109 | ||
| 317 | #define ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT 110 | ||
| 318 | #define ENGINE_F_ENGINE_GET_CTRL_FUNCTION 144 | ||
| 319 | #define ENGINE_F_ENGINE_GET_DH 111 | ||
| 320 | #define ENGINE_F_ENGINE_GET_DSA 112 | ||
| 321 | #define ENGINE_F_ENGINE_GET_FINISH_FUNCTION 145 | ||
| 322 | #define ENGINE_F_ENGINE_GET_ID 113 | ||
| 323 | #define ENGINE_F_ENGINE_GET_INIT_FUNCTION 146 | ||
| 324 | #define ENGINE_F_ENGINE_GET_NAME 114 | ||
| 325 | #define ENGINE_F_ENGINE_GET_NEXT 115 | ||
| 326 | #define ENGINE_F_ENGINE_GET_PREV 116 | ||
| 327 | #define ENGINE_F_ENGINE_GET_RAND 117 | ||
| 328 | #define ENGINE_F_ENGINE_GET_RSA 118 | ||
| 329 | #define ENGINE_F_ENGINE_INIT 119 | ||
| 330 | #define ENGINE_F_ENGINE_LIST_ADD 120 | ||
| 331 | #define ENGINE_F_ENGINE_LIST_REMOVE 121 | ||
| 332 | #define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150 | ||
| 333 | #define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151 | ||
| 334 | #define ENGINE_F_ENGINE_NEW 122 | ||
| 335 | #define ENGINE_F_ENGINE_REMOVE 123 | ||
| 336 | #define ENGINE_F_ENGINE_SET_BN_MOD_EXP 124 | ||
| 337 | #define ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT 125 | ||
| 338 | #define ENGINE_F_ENGINE_SET_CTRL_FUNCTION 147 | ||
| 339 | #define ENGINE_F_ENGINE_SET_DEFAULT_TYPE 126 | ||
| 340 | #define ENGINE_F_ENGINE_SET_DH 127 | ||
| 341 | #define ENGINE_F_ENGINE_SET_DSA 128 | ||
| 342 | #define ENGINE_F_ENGINE_SET_FINISH_FUNCTION 148 | ||
| 343 | #define ENGINE_F_ENGINE_SET_ID 129 | ||
| 344 | #define ENGINE_F_ENGINE_SET_INIT_FUNCTION 149 | ||
| 345 | #define ENGINE_F_ENGINE_SET_NAME 130 | ||
| 346 | #define ENGINE_F_ENGINE_SET_RAND 131 | ||
| 347 | #define ENGINE_F_ENGINE_SET_RSA 132 | ||
| 348 | #define ENGINE_F_ENGINE_UNLOAD_KEY 152 | ||
| 349 | #define ENGINE_F_HWCRHK_CTRL 143 | ||
| 350 | #define ENGINE_F_HWCRHK_FINISH 135 | ||
| 351 | #define ENGINE_F_HWCRHK_GET_PASS 155 | ||
| 352 | #define ENGINE_F_HWCRHK_INIT 136 | ||
| 353 | #define ENGINE_F_HWCRHK_LOAD_PRIVKEY 153 | ||
| 354 | #define ENGINE_F_HWCRHK_LOAD_PUBKEY 154 | ||
| 355 | #define ENGINE_F_HWCRHK_MOD_EXP 137 | ||
| 356 | #define ENGINE_F_HWCRHK_MOD_EXP_CRT 138 | ||
| 357 | #define ENGINE_F_HWCRHK_RAND_BYTES 139 | ||
| 358 | #define ENGINE_F_HWCRHK_RSA_MOD_EXP 140 | ||
| 359 | #define ENGINE_F_LOG_MESSAGE 141 | ||
| 360 | |||
| 361 | /* Reason codes. */ | ||
| 362 | #define ENGINE_R_ALREADY_LOADED 100 | ||
| 363 | #define ENGINE_R_BIO_WAS_FREED 121 | ||
| 364 | #define ENGINE_R_BN_CTX_FULL 101 | ||
| 365 | #define ENGINE_R_BN_EXPAND_FAIL 102 | ||
| 366 | #define ENGINE_R_CHIL_ERROR 123 | ||
| 367 | #define ENGINE_R_CONFLICTING_ENGINE_ID 103 | ||
| 368 | #define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119 | ||
| 369 | #define ENGINE_R_DSO_FAILURE 104 | ||
| 370 | #define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 | ||
| 371 | #define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 | ||
| 372 | #define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129 | ||
| 373 | #define ENGINE_R_FINISH_FAILED 106 | ||
| 374 | #define ENGINE_R_GET_HANDLE_FAILED 107 | ||
| 375 | #define ENGINE_R_ID_OR_NAME_MISSING 108 | ||
| 376 | #define ENGINE_R_INIT_FAILED 109 | ||
| 377 | #define ENGINE_R_INTERNAL_LIST_ERROR 110 | ||
| 378 | #define ENGINE_R_MISSING_KEY_COMPONENTS 111 | ||
| 379 | #define ENGINE_R_NOT_INITIALISED 117 | ||
| 380 | #define ENGINE_R_NOT_LOADED 112 | ||
| 381 | #define ENGINE_R_NO_CALLBACK 127 | ||
| 382 | #define ENGINE_R_NO_CONTROL_FUNCTION 120 | ||
| 383 | #define ENGINE_R_NO_KEY 124 | ||
| 384 | #define ENGINE_R_NO_LOAD_FUNCTION 125 | ||
| 385 | #define ENGINE_R_NO_REFERENCE 130 | ||
| 386 | #define ENGINE_R_NO_SUCH_ENGINE 116 | ||
| 387 | #define ENGINE_R_NO_UNLOAD_FUNCTION 126 | ||
| 388 | #define ENGINE_R_PROVIDE_PARAMETERS 113 | ||
| 389 | #define ENGINE_R_REQUEST_FAILED 114 | ||
| 390 | #define ENGINE_R_REQUEST_FALLBACK 118 | ||
| 391 | #define ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL 122 | ||
| 392 | #define ENGINE_R_UNIT_FAILURE 115 | ||
| 393 | |||
| 394 | #ifdef __cplusplus | ||
| 395 | } | ||
| 396 | #endif | ||
| 397 | #endif | ||
| 398 | |||
diff --git a/src/lib/libssl/src/crypto/engine/engine_err.c b/src/lib/libssl/src/crypto/engine/engine_err.c new file mode 100644 index 0000000000..0d7a31f6d5 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/engine_err.c | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | /* crypto/engine/engine_err.c */ | ||
| 2 | /* ==================================================================== | ||
| 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * | ||
| 9 | * 1. Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * | ||
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer in | ||
| 14 | * the documentation and/or other materials provided with the | ||
| 15 | * distribution. | ||
| 16 | * | ||
| 17 | * 3. All advertising materials mentioning features or use of this | ||
| 18 | * software must display the following acknowledgment: | ||
| 19 | * "This product includes software developed by the OpenSSL Project | ||
| 20 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 21 | * | ||
| 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 23 | * endorse or promote products derived from this software without | ||
| 24 | * prior written permission. For written permission, please contact | ||
| 25 | * openssl-core@OpenSSL.org. | ||
| 26 | * | ||
| 27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 28 | * nor may "OpenSSL" appear in their names without prior written | ||
| 29 | * permission of the OpenSSL Project. | ||
| 30 | * | ||
| 31 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 32 | * acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 35 | * | ||
| 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 48 | * ==================================================================== | ||
| 49 | * | ||
| 50 | * This product includes cryptographic software written by Eric Young | ||
| 51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 52 | * Hudson (tjh@cryptsoft.com). | ||
| 53 | * | ||
| 54 | */ | ||
| 55 | |||
| 56 | /* NOTE: this file was auto generated by the mkerr.pl script: any changes | ||
| 57 | * made to it will be overwritten when the script next updates this file, | ||
| 58 | * only reason strings will be preserved. | ||
| 59 | */ | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | #include <openssl/engine.h> | ||
| 64 | |||
| 65 | /* BEGIN ERROR CODES */ | ||
| 66 | #ifndef NO_ERR | ||
| 67 | static ERR_STRING_DATA ENGINE_str_functs[]= | ||
| 68 | { | ||
| 69 | {ERR_PACK(0,ENGINE_F_ATALLA_FINISH,0), "ATALLA_FINISH"}, | ||
| 70 | {ERR_PACK(0,ENGINE_F_ATALLA_INIT,0), "ATALLA_INIT"}, | ||
| 71 | {ERR_PACK(0,ENGINE_F_ATALLA_MOD_EXP,0), "ATALLA_MOD_EXP"}, | ||
| 72 | {ERR_PACK(0,ENGINE_F_ATALLA_RSA_MOD_EXP,0), "ATALLA_RSA_MOD_EXP"}, | ||
| 73 | {ERR_PACK(0,ENGINE_F_CSWIFT_DSA_SIGN,0), "CSWIFT_DSA_SIGN"}, | ||
| 74 | {ERR_PACK(0,ENGINE_F_CSWIFT_DSA_VERIFY,0), "CSWIFT_DSA_VERIFY"}, | ||
| 75 | {ERR_PACK(0,ENGINE_F_CSWIFT_FINISH,0), "CSWIFT_FINISH"}, | ||
| 76 | {ERR_PACK(0,ENGINE_F_CSWIFT_INIT,0), "CSWIFT_INIT"}, | ||
| 77 | {ERR_PACK(0,ENGINE_F_CSWIFT_MOD_EXP,0), "CSWIFT_MOD_EXP"}, | ||
| 78 | {ERR_PACK(0,ENGINE_F_CSWIFT_MOD_EXP_CRT,0), "CSWIFT_MOD_EXP_CRT"}, | ||
| 79 | {ERR_PACK(0,ENGINE_F_CSWIFT_RSA_MOD_EXP,0), "CSWIFT_RSA_MOD_EXP"}, | ||
| 80 | {ERR_PACK(0,ENGINE_F_ENGINE_ADD,0), "ENGINE_add"}, | ||
| 81 | {ERR_PACK(0,ENGINE_F_ENGINE_BY_ID,0), "ENGINE_by_id"}, | ||
| 82 | {ERR_PACK(0,ENGINE_F_ENGINE_CTRL,0), "ENGINE_ctrl"}, | ||
| 83 | {ERR_PACK(0,ENGINE_F_ENGINE_FINISH,0), "ENGINE_finish"}, | ||
| 84 | {ERR_PACK(0,ENGINE_F_ENGINE_FREE,0), "ENGINE_free"}, | ||
| 85 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_BN_MOD_EXP,0), "ENGINE_get_BN_mod_exp"}, | ||
| 86 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT,0), "ENGINE_get_BN_mod_exp_crt"}, | ||
| 87 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_CTRL_FUNCTION,0), "ENGINE_get_ctrl_function"}, | ||
| 88 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_DH,0), "ENGINE_get_DH"}, | ||
| 89 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_DSA,0), "ENGINE_get_DSA"}, | ||
| 90 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_FINISH_FUNCTION,0), "ENGINE_get_finish_function"}, | ||
| 91 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_ID,0), "ENGINE_get_id"}, | ||
| 92 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_INIT_FUNCTION,0), "ENGINE_get_init_function"}, | ||
| 93 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_NAME,0), "ENGINE_get_name"}, | ||
| 94 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_NEXT,0), "ENGINE_get_next"}, | ||
| 95 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_PREV,0), "ENGINE_get_prev"}, | ||
| 96 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_RAND,0), "ENGINE_get_RAND"}, | ||
| 97 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_RSA,0), "ENGINE_get_RSA"}, | ||
| 98 | {ERR_PACK(0,ENGINE_F_ENGINE_INIT,0), "ENGINE_init"}, | ||
| 99 | {ERR_PACK(0,ENGINE_F_ENGINE_LIST_ADD,0), "ENGINE_LIST_ADD"}, | ||
| 100 | {ERR_PACK(0,ENGINE_F_ENGINE_LIST_REMOVE,0), "ENGINE_LIST_REMOVE"}, | ||
| 101 | {ERR_PACK(0,ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,0), "ENGINE_load_private_key"}, | ||
| 102 | {ERR_PACK(0,ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,0), "ENGINE_load_public_key"}, | ||
| 103 | {ERR_PACK(0,ENGINE_F_ENGINE_NEW,0), "ENGINE_new"}, | ||
| 104 | {ERR_PACK(0,ENGINE_F_ENGINE_REMOVE,0), "ENGINE_remove"}, | ||
| 105 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_BN_MOD_EXP,0), "ENGINE_set_BN_mod_exp"}, | ||
| 106 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT,0), "ENGINE_set_BN_mod_exp_crt"}, | ||
| 107 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_CTRL_FUNCTION,0), "ENGINE_set_ctrl_function"}, | ||
| 108 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DEFAULT_TYPE,0), "ENGINE_SET_DEFAULT_TYPE"}, | ||
| 109 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DH,0), "ENGINE_set_DH"}, | ||
| 110 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DSA,0), "ENGINE_set_DSA"}, | ||
| 111 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_FINISH_FUNCTION,0), "ENGINE_set_finish_function"}, | ||
| 112 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_ID,0), "ENGINE_set_id"}, | ||
| 113 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_INIT_FUNCTION,0), "ENGINE_set_init_function"}, | ||
| 114 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_NAME,0), "ENGINE_set_name"}, | ||
| 115 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_RAND,0), "ENGINE_set_RAND"}, | ||
| 116 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_RSA,0), "ENGINE_set_RSA"}, | ||
| 117 | {ERR_PACK(0,ENGINE_F_ENGINE_UNLOAD_KEY,0), "ENGINE_UNLOAD_KEY"}, | ||
| 118 | {ERR_PACK(0,ENGINE_F_HWCRHK_CTRL,0), "HWCRHK_CTRL"}, | ||
| 119 | {ERR_PACK(0,ENGINE_F_HWCRHK_FINISH,0), "HWCRHK_FINISH"}, | ||
| 120 | {ERR_PACK(0,ENGINE_F_HWCRHK_GET_PASS,0), "HWCRHK_GET_PASS"}, | ||
| 121 | {ERR_PACK(0,ENGINE_F_HWCRHK_INIT,0), "HWCRHK_INIT"}, | ||
| 122 | {ERR_PACK(0,ENGINE_F_HWCRHK_LOAD_PRIVKEY,0), "HWCRHK_LOAD_PRIVKEY"}, | ||
| 123 | {ERR_PACK(0,ENGINE_F_HWCRHK_LOAD_PUBKEY,0), "HWCRHK_LOAD_PUBKEY"}, | ||
| 124 | {ERR_PACK(0,ENGINE_F_HWCRHK_MOD_EXP,0), "HWCRHK_MOD_EXP"}, | ||
| 125 | {ERR_PACK(0,ENGINE_F_HWCRHK_MOD_EXP_CRT,0), "HWCRHK_MOD_EXP_CRT"}, | ||
| 126 | {ERR_PACK(0,ENGINE_F_HWCRHK_RAND_BYTES,0), "HWCRHK_RAND_BYTES"}, | ||
| 127 | {ERR_PACK(0,ENGINE_F_HWCRHK_RSA_MOD_EXP,0), "HWCRHK_RSA_MOD_EXP"}, | ||
| 128 | {ERR_PACK(0,ENGINE_F_LOG_MESSAGE,0), "LOG_MESSAGE"}, | ||
| 129 | {0,NULL} | ||
| 130 | }; | ||
| 131 | |||
| 132 | static ERR_STRING_DATA ENGINE_str_reasons[]= | ||
| 133 | { | ||
| 134 | {ENGINE_R_ALREADY_LOADED ,"already loaded"}, | ||
| 135 | {ENGINE_R_BIO_WAS_FREED ,"bio was freed"}, | ||
| 136 | {ENGINE_R_BN_CTX_FULL ,"BN_CTX full"}, | ||
| 137 | {ENGINE_R_BN_EXPAND_FAIL ,"bn_expand fail"}, | ||
| 138 | {ENGINE_R_CHIL_ERROR ,"chil error"}, | ||
| 139 | {ENGINE_R_CONFLICTING_ENGINE_ID ,"conflicting engine id"}, | ||
| 140 | {ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"}, | ||
| 141 | {ENGINE_R_DSO_FAILURE ,"DSO failure"}, | ||
| 142 | {ENGINE_R_ENGINE_IS_NOT_IN_LIST ,"engine is not in the list"}, | ||
| 143 | {ENGINE_R_FAILED_LOADING_PRIVATE_KEY ,"failed loading private key"}, | ||
| 144 | {ENGINE_R_FAILED_LOADING_PUBLIC_KEY ,"failed loading public key"}, | ||
| 145 | {ENGINE_R_FINISH_FAILED ,"finish failed"}, | ||
| 146 | {ENGINE_R_GET_HANDLE_FAILED ,"could not obtain hardware handle"}, | ||
| 147 | {ENGINE_R_ID_OR_NAME_MISSING ,"'id' or 'name' missing"}, | ||
| 148 | {ENGINE_R_INIT_FAILED ,"init failed"}, | ||
| 149 | {ENGINE_R_INTERNAL_LIST_ERROR ,"internal list error"}, | ||
| 150 | {ENGINE_R_MISSING_KEY_COMPONENTS ,"missing key components"}, | ||
| 151 | {ENGINE_R_NOT_INITIALISED ,"not initialised"}, | ||
| 152 | {ENGINE_R_NOT_LOADED ,"not loaded"}, | ||
| 153 | {ENGINE_R_NO_CALLBACK ,"no callback"}, | ||
| 154 | {ENGINE_R_NO_CONTROL_FUNCTION ,"no control function"}, | ||
| 155 | {ENGINE_R_NO_KEY ,"no key"}, | ||
| 156 | {ENGINE_R_NO_LOAD_FUNCTION ,"no load function"}, | ||
| 157 | {ENGINE_R_NO_REFERENCE ,"no reference"}, | ||
| 158 | {ENGINE_R_NO_SUCH_ENGINE ,"no such engine"}, | ||
| 159 | {ENGINE_R_NO_UNLOAD_FUNCTION ,"no unload function"}, | ||
| 160 | {ENGINE_R_PROVIDE_PARAMETERS ,"provide parameters"}, | ||
| 161 | {ENGINE_R_REQUEST_FAILED ,"request failed"}, | ||
| 162 | {ENGINE_R_REQUEST_FALLBACK ,"request fallback"}, | ||
| 163 | {ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL ,"size too large or too small"}, | ||
| 164 | {ENGINE_R_UNIT_FAILURE ,"unit failure"}, | ||
| 165 | {0,NULL} | ||
| 166 | }; | ||
| 167 | |||
| 168 | #endif | ||
| 169 | |||
| 170 | void ERR_load_ENGINE_strings(void) | ||
| 171 | { | ||
| 172 | static int init=1; | ||
| 173 | |||
| 174 | if (init) | ||
| 175 | { | ||
| 176 | init=0; | ||
| 177 | #ifndef NO_ERR | ||
| 178 | ERR_load_strings(ERR_LIB_ENGINE,ENGINE_str_functs); | ||
| 179 | ERR_load_strings(ERR_LIB_ENGINE,ENGINE_str_reasons); | ||
| 180 | #endif | ||
| 181 | |||
| 182 | } | ||
| 183 | } | ||
diff --git a/src/lib/libssl/src/crypto/engine/engine_int.h b/src/lib/libssl/src/crypto/engine/engine_int.h new file mode 100644 index 0000000000..447fa2a320 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/engine_int.h | |||
| @@ -0,0 +1,160 @@ | |||
| 1 | /* crypto/engine/engine_int.h */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_ENGINE_INT_H | ||
| 60 | #define HEADER_ENGINE_INT_H | ||
| 61 | |||
| 62 | #include <openssl/rsa.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/dh.h> | ||
| 65 | #include <openssl/rand.h> | ||
| 66 | #include <openssl/bn.h> | ||
| 67 | #include <openssl/evp.h> | ||
| 68 | |||
| 69 | #ifdef __cplusplus | ||
| 70 | extern "C" { | ||
| 71 | #endif | ||
| 72 | |||
| 73 | /* Bitwise OR-able values for the "flags" variable in ENGINE. */ | ||
| 74 | #define ENGINE_FLAGS_MALLOCED 0x0001 | ||
| 75 | |||
| 76 | #ifndef HEADER_ENGINE_H | ||
| 77 | /* Regrettably, we need to reproduce the "BN" function types here | ||
| 78 | * because there is no such "BIGNUM_METHOD" as there is with RSA, | ||
| 79 | * DSA, etc. We do this so that we don't have a case where engine.h | ||
| 80 | * and engine_int.h conflict with each other. */ | ||
| 81 | typedef int (*BN_MOD_EXP)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 82 | const BIGNUM *m, BN_CTX *ctx); | ||
| 83 | |||
| 84 | /* private key operation for RSA, provided seperately in case other | ||
| 85 | * RSA implementations wish to use it. */ | ||
| 86 | typedef int (*BN_MOD_EXP_CRT)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 87 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | ||
| 88 | const BIGNUM *iqmp, BN_CTX *ctx); | ||
| 89 | |||
| 90 | /* Generic function pointer */ | ||
| 91 | typedef int (*ENGINE_GEN_FUNC_PTR)(); | ||
| 92 | /* Generic function pointer taking no arguments */ | ||
| 93 | typedef int (*ENGINE_GEN_INT_FUNC_PTR)(void); | ||
| 94 | /* Specific control function pointer */ | ||
| 95 | typedef int (*ENGINE_CTRL_FUNC_PTR)(int cmd, long i, void *p, void (*f)()); | ||
| 96 | |||
| 97 | #endif | ||
| 98 | |||
| 99 | /* This is a structure for storing implementations of various crypto | ||
| 100 | * algorithms and functions. */ | ||
| 101 | typedef struct engine_st | ||
| 102 | { | ||
| 103 | const char *id; | ||
| 104 | const char *name; | ||
| 105 | RSA_METHOD *rsa_meth; | ||
| 106 | DSA_METHOD *dsa_meth; | ||
| 107 | DH_METHOD *dh_meth; | ||
| 108 | RAND_METHOD *rand_meth; | ||
| 109 | BN_MOD_EXP bn_mod_exp; | ||
| 110 | BN_MOD_EXP_CRT bn_mod_exp_crt; | ||
| 111 | int (*init)(void); | ||
| 112 | int (*finish)(void); | ||
| 113 | int (*ctrl)(int cmd, long i, void *p, void (*f)()); | ||
| 114 | EVP_PKEY *(*load_privkey)(const char *key_id, const char *passphrase); | ||
| 115 | EVP_PKEY *(*load_pubkey)(const char *key_id, const char *passphrase); | ||
| 116 | int flags; | ||
| 117 | /* reference count on the structure itself */ | ||
| 118 | int struct_ref; | ||
| 119 | /* reference count on usability of the engine type. NB: This | ||
| 120 | * controls the loading and initialisation of any functionlity | ||
| 121 | * required by this engine, whereas the previous count is | ||
| 122 | * simply to cope with (de)allocation of this structure. Hence, | ||
| 123 | * running_ref <= struct_ref at all times. */ | ||
| 124 | int funct_ref; | ||
| 125 | /* Used to maintain the linked-list of engines. */ | ||
| 126 | struct engine_st *prev; | ||
| 127 | struct engine_st *next; | ||
| 128 | } ENGINE; | ||
| 129 | |||
| 130 | /* BUILT-IN ENGINES. (these functions are only ever called once and | ||
| 131 | * do not return references - they are purely for bootstrapping). */ | ||
| 132 | |||
| 133 | /* Returns a structure of software only methods (the default). */ | ||
| 134 | ENGINE *ENGINE_openssl(); | ||
| 135 | |||
| 136 | #ifndef NO_HW | ||
| 137 | |||
| 138 | #ifndef NO_HW_CSWIFT | ||
| 139 | /* Returns a structure of cswift methods ... NB: This can exist and be | ||
| 140 | * "used" even on non-cswift systems because the "init" will fail if the | ||
| 141 | * card/library are not found. */ | ||
| 142 | ENGINE *ENGINE_cswift(); | ||
| 143 | #endif /* !NO_HW_CSWIFT */ | ||
| 144 | |||
| 145 | #ifndef NO_HW_NCIPHER | ||
| 146 | ENGINE *ENGINE_ncipher(); | ||
| 147 | #endif /* !NO_HW_NCIPHER */ | ||
| 148 | |||
| 149 | #ifndef NO_HW_ATALLA | ||
| 150 | /* Returns a structure of atalla methods. */ | ||
| 151 | ENGINE *ENGINE_atalla(); | ||
| 152 | #endif /* !NO_HW_ATALLA */ | ||
| 153 | |||
| 154 | #endif /* !NO_HW */ | ||
| 155 | |||
| 156 | #ifdef __cplusplus | ||
| 157 | } | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #endif /* HEADER_ENGINE_INT_H */ | ||
diff --git a/src/lib/libssl/src/crypto/engine/engine_lib.c b/src/lib/libssl/src/crypto/engine/engine_lib.c new file mode 100644 index 0000000000..1df07af03a --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/engine_lib.c | |||
| @@ -0,0 +1,488 @@ | |||
| 1 | /* crypto/engine/engine_lib.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <openssl/crypto.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "engine_int.h" | ||
| 62 | #include <openssl/engine.h> | ||
| 63 | |||
| 64 | /* These pointers each have their own "functional reference" when they | ||
| 65 | * are non-NULL. Similarly, when they are retrieved by a call to | ||
| 66 | * ENGINE_get_default_[RSA|DSA|...] the returned pointer is also a | ||
| 67 | * reference and the caller is responsible for freeing that when they | ||
| 68 | * are finished with it (with a call to ENGINE_finish() *NOT* just | ||
| 69 | * ENGINE_free()!!!!!!). */ | ||
| 70 | static ENGINE *engine_def_rsa = NULL; | ||
| 71 | static ENGINE *engine_def_dsa = NULL; | ||
| 72 | static ENGINE *engine_def_dh = NULL; | ||
| 73 | static ENGINE *engine_def_rand = NULL; | ||
| 74 | static ENGINE *engine_def_bn_mod_exp = NULL; | ||
| 75 | static ENGINE *engine_def_bn_mod_exp_crt = NULL; | ||
| 76 | /* A static "once-only" flag used to control if/when the above were | ||
| 77 | * initialised to suitable start-up defaults. */ | ||
| 78 | static int engine_def_flag = 0; | ||
| 79 | |||
| 80 | /* This is used in certain static utility functions to save code | ||
| 81 | * repetition for per-algorithm functions. */ | ||
| 82 | typedef enum { | ||
| 83 | ENGINE_TYPE_RSA, | ||
| 84 | ENGINE_TYPE_DSA, | ||
| 85 | ENGINE_TYPE_DH, | ||
| 86 | ENGINE_TYPE_RAND, | ||
| 87 | ENGINE_TYPE_BN_MOD_EXP, | ||
| 88 | ENGINE_TYPE_BN_MOD_EXP_CRT | ||
| 89 | } ENGINE_TYPE; | ||
| 90 | |||
| 91 | static void engine_def_check_util(ENGINE **def, ENGINE *val) | ||
| 92 | { | ||
| 93 | *def = val; | ||
| 94 | val->struct_ref++; | ||
| 95 | val->funct_ref++; | ||
| 96 | } | ||
| 97 | |||
| 98 | /* In a slight break with convention - this static function must be | ||
| 99 | * called *outside* any locking of CRYPTO_LOCK_ENGINE. */ | ||
| 100 | static void engine_def_check(void) | ||
| 101 | { | ||
| 102 | ENGINE *e; | ||
| 103 | if(engine_def_flag) | ||
| 104 | return; | ||
| 105 | e = ENGINE_get_first(); | ||
| 106 | if(e == NULL) | ||
| 107 | /* The list is empty ... not much we can do! */ | ||
| 108 | return; | ||
| 109 | /* We have a structural reference, see if getting a functional | ||
| 110 | * reference is possible. This is done to cope with init errors | ||
| 111 | * in the engine - the following locked code does a bunch of | ||
| 112 | * manual "ENGINE_init"s which do *not* allow such an init | ||
| 113 | * error so this is worth doing. */ | ||
| 114 | if(ENGINE_init(e)) | ||
| 115 | { | ||
| 116 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 117 | /* Doing another check here prevents an obvious race | ||
| 118 | * condition because the whole function itself cannot | ||
| 119 | * be locked. */ | ||
| 120 | if(engine_def_flag) | ||
| 121 | goto skip_set_defaults; | ||
| 122 | /* OK, we got a functional reference, so we get one each | ||
| 123 | * for the defaults too. */ | ||
| 124 | engine_def_check_util(&engine_def_rsa, e); | ||
| 125 | engine_def_check_util(&engine_def_dsa, e); | ||
| 126 | engine_def_check_util(&engine_def_dh, e); | ||
| 127 | engine_def_check_util(&engine_def_rand, e); | ||
| 128 | engine_def_check_util(&engine_def_bn_mod_exp, e); | ||
| 129 | engine_def_check_util(&engine_def_bn_mod_exp_crt, e); | ||
| 130 | engine_def_flag = 1; | ||
| 131 | skip_set_defaults: | ||
| 132 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 133 | /* The "if" needs to be balanced out. */ | ||
| 134 | ENGINE_finish(e); | ||
| 135 | } | ||
| 136 | /* We need to balance out the fact we obtained a structural | ||
| 137 | * reference to begin with from ENGINE_get_first(). */ | ||
| 138 | ENGINE_free(e); | ||
| 139 | } | ||
| 140 | |||
| 141 | /* Initialise a engine type for use (or up its functional reference count | ||
| 142 | * if it's already in use). */ | ||
| 143 | int ENGINE_init(ENGINE *e) | ||
| 144 | { | ||
| 145 | int to_return = 1; | ||
| 146 | |||
| 147 | if(e == NULL) | ||
| 148 | { | ||
| 149 | ENGINEerr(ENGINE_F_ENGINE_INIT,ERR_R_PASSED_NULL_PARAMETER); | ||
| 150 | return 0; | ||
| 151 | } | ||
| 152 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 153 | if((e->funct_ref == 0) && e->init) | ||
| 154 | /* This is the first functional reference and the engine | ||
| 155 | * requires initialisation so we do it now. */ | ||
| 156 | to_return = e->init(); | ||
| 157 | if(to_return) | ||
| 158 | { | ||
| 159 | /* OK, we return a functional reference which is also a | ||
| 160 | * structural reference. */ | ||
| 161 | e->struct_ref++; | ||
| 162 | e->funct_ref++; | ||
| 163 | } | ||
| 164 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 165 | return to_return; | ||
| 166 | } | ||
| 167 | |||
| 168 | /* Free a functional reference to a engine type */ | ||
| 169 | int ENGINE_finish(ENGINE *e) | ||
| 170 | { | ||
| 171 | int to_return = 1; | ||
| 172 | |||
| 173 | if(e == NULL) | ||
| 174 | { | ||
| 175 | ENGINEerr(ENGINE_F_ENGINE_FINISH,ERR_R_PASSED_NULL_PARAMETER); | ||
| 176 | return 0; | ||
| 177 | } | ||
| 178 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 179 | if((e->funct_ref == 1) && e->finish) | ||
| 180 | #if 0 | ||
| 181 | /* This is the last functional reference and the engine | ||
| 182 | * requires cleanup so we do it now. */ | ||
| 183 | to_return = e->finish(); | ||
| 184 | if(to_return) | ||
| 185 | { | ||
| 186 | /* Cleanup the functional reference which is also a | ||
| 187 | * structural reference. */ | ||
| 188 | e->struct_ref--; | ||
| 189 | e->funct_ref--; | ||
| 190 | } | ||
| 191 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 192 | #else | ||
| 193 | /* I'm going to deliberately do a convoluted version of this | ||
| 194 | * piece of code because we don't want "finish" functions | ||
| 195 | * being called inside a locked block of code, if at all | ||
| 196 | * possible. I'd rather have this call take an extra couple | ||
| 197 | * of ticks than have throughput serialised on a externally- | ||
| 198 | * provided callback function that may conceivably never come | ||
| 199 | * back. :-( */ | ||
| 200 | { | ||
| 201 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 202 | /* CODE ALERT: This *IS* supposed to be "=" and NOT "==" :-) */ | ||
| 203 | if((to_return = e->finish())) | ||
| 204 | { | ||
| 205 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 206 | /* Cleanup the functional reference which is also a | ||
| 207 | * structural reference. */ | ||
| 208 | e->struct_ref--; | ||
| 209 | e->funct_ref--; | ||
| 210 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 211 | } | ||
| 212 | } | ||
| 213 | else | ||
| 214 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 215 | #endif | ||
| 216 | return to_return; | ||
| 217 | } | ||
| 218 | |||
| 219 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, | ||
| 220 | const char *passphrase) | ||
| 221 | { | ||
| 222 | EVP_PKEY *pkey; | ||
| 223 | |||
| 224 | if(e == NULL) | ||
| 225 | { | ||
| 226 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 227 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 228 | return 0; | ||
| 229 | } | ||
| 230 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 231 | if(e->funct_ref == 0) | ||
| 232 | { | ||
| 233 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 234 | ENGINE_R_NOT_INITIALISED); | ||
| 235 | return 0; | ||
| 236 | } | ||
| 237 | if (!e->load_privkey) | ||
| 238 | { | ||
| 239 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 240 | ENGINE_R_NO_LOAD_FUNCTION); | ||
| 241 | return 0; | ||
| 242 | } | ||
| 243 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 244 | pkey = e->load_privkey(key_id, passphrase); | ||
| 245 | if (!pkey) | ||
| 246 | { | ||
| 247 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 248 | ENGINE_R_FAILED_LOADING_PRIVATE_KEY); | ||
| 249 | return 0; | ||
| 250 | } | ||
| 251 | return pkey; | ||
| 252 | } | ||
| 253 | |||
| 254 | EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, | ||
| 255 | const char *passphrase) | ||
| 256 | { | ||
| 257 | EVP_PKEY *pkey; | ||
| 258 | |||
| 259 | if(e == NULL) | ||
| 260 | { | ||
| 261 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 262 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 263 | return 0; | ||
| 264 | } | ||
| 265 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 266 | if(e->funct_ref == 0) | ||
| 267 | { | ||
| 268 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 269 | ENGINE_R_NOT_INITIALISED); | ||
| 270 | return 0; | ||
| 271 | } | ||
| 272 | if (!e->load_pubkey) | ||
| 273 | { | ||
| 274 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 275 | ENGINE_R_NO_LOAD_FUNCTION); | ||
| 276 | return 0; | ||
| 277 | } | ||
| 278 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 279 | pkey = e->load_pubkey(key_id, passphrase); | ||
| 280 | if (!pkey) | ||
| 281 | { | ||
| 282 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 283 | ENGINE_R_FAILED_LOADING_PUBLIC_KEY); | ||
| 284 | return 0; | ||
| 285 | } | ||
| 286 | return pkey; | ||
| 287 | } | ||
| 288 | |||
| 289 | /* Initialise a engine type for use (or up its functional reference count | ||
| 290 | * if it's already in use). */ | ||
| 291 | int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()) | ||
| 292 | { | ||
| 293 | if(e == NULL) | ||
| 294 | { | ||
| 295 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
| 296 | return 0; | ||
| 297 | } | ||
| 298 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 299 | if(e->struct_ref == 0) | ||
| 300 | { | ||
| 301 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ENGINE_R_NO_REFERENCE); | ||
| 302 | return 0; | ||
| 303 | } | ||
| 304 | if (!e->ctrl) | ||
| 305 | { | ||
| 306 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ENGINE_R_NO_CONTROL_FUNCTION); | ||
| 307 | return 0; | ||
| 308 | } | ||
| 309 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 310 | return e->ctrl(cmd, i, p, f); | ||
| 311 | } | ||
| 312 | |||
| 313 | static ENGINE *engine_get_default_type(ENGINE_TYPE t) | ||
| 314 | { | ||
| 315 | ENGINE *ret = NULL; | ||
| 316 | |||
| 317 | /* engine_def_check is lean and mean and won't replace any | ||
| 318 | * prior default engines ... so we must ensure that it is always | ||
| 319 | * the first function to get to touch the default values. */ | ||
| 320 | engine_def_check(); | ||
| 321 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 322 | switch(t) | ||
| 323 | { | ||
| 324 | case ENGINE_TYPE_RSA: | ||
| 325 | ret = engine_def_rsa; break; | ||
| 326 | case ENGINE_TYPE_DSA: | ||
| 327 | ret = engine_def_dsa; break; | ||
| 328 | case ENGINE_TYPE_DH: | ||
| 329 | ret = engine_def_dh; break; | ||
| 330 | case ENGINE_TYPE_RAND: | ||
| 331 | ret = engine_def_rand; break; | ||
| 332 | case ENGINE_TYPE_BN_MOD_EXP: | ||
| 333 | ret = engine_def_bn_mod_exp; break; | ||
| 334 | case ENGINE_TYPE_BN_MOD_EXP_CRT: | ||
| 335 | ret = engine_def_bn_mod_exp_crt; break; | ||
| 336 | } | ||
| 337 | /* Unforunately we can't do this work outside the lock with a | ||
| 338 | * call to ENGINE_init() because that would leave a race | ||
| 339 | * condition open. */ | ||
| 340 | if(ret) | ||
| 341 | { | ||
| 342 | ret->struct_ref++; | ||
| 343 | ret->funct_ref++; | ||
| 344 | } | ||
| 345 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 346 | return ret; | ||
| 347 | } | ||
| 348 | |||
| 349 | ENGINE *ENGINE_get_default_RSA(void) | ||
| 350 | { | ||
| 351 | return engine_get_default_type(ENGINE_TYPE_RSA); | ||
| 352 | } | ||
| 353 | |||
| 354 | ENGINE *ENGINE_get_default_DSA(void) | ||
| 355 | { | ||
| 356 | return engine_get_default_type(ENGINE_TYPE_DSA); | ||
| 357 | } | ||
| 358 | |||
| 359 | ENGINE *ENGINE_get_default_DH(void) | ||
| 360 | { | ||
| 361 | return engine_get_default_type(ENGINE_TYPE_DH); | ||
| 362 | } | ||
| 363 | |||
| 364 | ENGINE *ENGINE_get_default_RAND(void) | ||
| 365 | { | ||
| 366 | return engine_get_default_type(ENGINE_TYPE_RAND); | ||
| 367 | } | ||
| 368 | |||
| 369 | ENGINE *ENGINE_get_default_BN_mod_exp(void) | ||
| 370 | { | ||
| 371 | return engine_get_default_type(ENGINE_TYPE_BN_MOD_EXP); | ||
| 372 | } | ||
| 373 | |||
| 374 | ENGINE *ENGINE_get_default_BN_mod_exp_crt(void) | ||
| 375 | { | ||
| 376 | return engine_get_default_type(ENGINE_TYPE_BN_MOD_EXP_CRT); | ||
| 377 | } | ||
| 378 | |||
| 379 | static int engine_set_default_type(ENGINE_TYPE t, ENGINE *e) | ||
| 380 | { | ||
| 381 | ENGINE *old = NULL; | ||
| 382 | |||
| 383 | if(e == NULL) | ||
| 384 | { | ||
| 385 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 386 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 387 | return 0; | ||
| 388 | } | ||
| 389 | /* engine_def_check is lean and mean and won't replace any | ||
| 390 | * prior default engines ... so we must ensure that it is always | ||
| 391 | * the first function to get to touch the default values. */ | ||
| 392 | engine_def_check(); | ||
| 393 | /* Attempt to get a functional reference (we need one anyway, but | ||
| 394 | * also, 'e' may be just a structural reference being passed in so | ||
| 395 | * this call may actually be the first). */ | ||
| 396 | if(!ENGINE_init(e)) | ||
| 397 | { | ||
| 398 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 399 | ENGINE_R_INIT_FAILED); | ||
| 400 | return 0; | ||
| 401 | } | ||
| 402 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 403 | switch(t) | ||
| 404 | { | ||
| 405 | case ENGINE_TYPE_RSA: | ||
| 406 | old = engine_def_rsa; | ||
| 407 | engine_def_rsa = e; break; | ||
| 408 | case ENGINE_TYPE_DSA: | ||
| 409 | old = engine_def_dsa; | ||
| 410 | engine_def_dsa = e; break; | ||
| 411 | case ENGINE_TYPE_DH: | ||
| 412 | old = engine_def_dh; | ||
| 413 | engine_def_dh = e; break; | ||
| 414 | case ENGINE_TYPE_RAND: | ||
| 415 | old = engine_def_rand; | ||
| 416 | engine_def_rand = e; break; | ||
| 417 | case ENGINE_TYPE_BN_MOD_EXP: | ||
| 418 | old = engine_def_bn_mod_exp; | ||
| 419 | engine_def_bn_mod_exp = e; break; | ||
| 420 | case ENGINE_TYPE_BN_MOD_EXP_CRT: | ||
| 421 | old = engine_def_bn_mod_exp_crt; | ||
| 422 | engine_def_bn_mod_exp_crt = e; break; | ||
| 423 | } | ||
| 424 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 425 | /* If we've replaced a previous value, then we need to remove the | ||
| 426 | * functional reference we had. */ | ||
| 427 | if(old && !ENGINE_finish(old)) | ||
| 428 | { | ||
| 429 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 430 | ENGINE_R_FINISH_FAILED); | ||
| 431 | return 0; | ||
| 432 | } | ||
| 433 | return 1; | ||
| 434 | } | ||
| 435 | |||
| 436 | int ENGINE_set_default_RSA(ENGINE *e) | ||
| 437 | { | ||
| 438 | return engine_set_default_type(ENGINE_TYPE_RSA, e); | ||
| 439 | } | ||
| 440 | |||
| 441 | int ENGINE_set_default_DSA(ENGINE *e) | ||
| 442 | { | ||
| 443 | return engine_set_default_type(ENGINE_TYPE_DSA, e); | ||
| 444 | } | ||
| 445 | |||
| 446 | int ENGINE_set_default_DH(ENGINE *e) | ||
| 447 | { | ||
| 448 | return engine_set_default_type(ENGINE_TYPE_DH, e); | ||
| 449 | } | ||
| 450 | |||
| 451 | int ENGINE_set_default_RAND(ENGINE *e) | ||
| 452 | { | ||
| 453 | return engine_set_default_type(ENGINE_TYPE_RAND, e); | ||
| 454 | } | ||
| 455 | |||
| 456 | int ENGINE_set_default_BN_mod_exp(ENGINE *e) | ||
| 457 | { | ||
| 458 | return engine_set_default_type(ENGINE_TYPE_BN_MOD_EXP, e); | ||
| 459 | } | ||
| 460 | |||
| 461 | int ENGINE_set_default_BN_mod_exp_crt(ENGINE *e) | ||
| 462 | { | ||
| 463 | return engine_set_default_type(ENGINE_TYPE_BN_MOD_EXP_CRT, e); | ||
| 464 | } | ||
| 465 | |||
| 466 | int ENGINE_set_default(ENGINE *e, unsigned int flags) | ||
| 467 | { | ||
| 468 | if((flags & ENGINE_METHOD_RSA) && e->rsa_meth && | ||
| 469 | !ENGINE_set_default_RSA(e)) | ||
| 470 | return 0; | ||
| 471 | if((flags & ENGINE_METHOD_DSA) && e->dsa_meth && | ||
| 472 | !ENGINE_set_default_DSA(e)) | ||
| 473 | return 0; | ||
| 474 | if((flags & ENGINE_METHOD_DH) && e->dh_meth && | ||
| 475 | !ENGINE_set_default_DH(e)) | ||
| 476 | return 0; | ||
| 477 | if((flags & ENGINE_METHOD_RAND) && e->rand_meth && | ||
| 478 | !ENGINE_set_default_RAND(e)) | ||
| 479 | return 0; | ||
| 480 | if((flags & ENGINE_METHOD_BN_MOD_EXP) && e->bn_mod_exp && | ||
| 481 | !ENGINE_set_default_BN_mod_exp(e)) | ||
| 482 | return 0; | ||
| 483 | if((flags & ENGINE_METHOD_BN_MOD_EXP_CRT) && e->bn_mod_exp_crt && | ||
| 484 | !ENGINE_set_default_BN_mod_exp_crt(e)) | ||
| 485 | return 0; | ||
| 486 | return 1; | ||
| 487 | } | ||
| 488 | |||
diff --git a/src/lib/libssl/src/crypto/engine/engine_list.c b/src/lib/libssl/src/crypto/engine/engine_list.c new file mode 100644 index 0000000000..d764c60661 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/engine_list.c | |||
| @@ -0,0 +1,675 @@ | |||
| 1 | /* crypto/engine/engine_list.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <openssl/crypto.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "engine_int.h" | ||
| 62 | #include <openssl/engine.h> | ||
| 63 | |||
| 64 | /* The linked-list of pointers to engine types. engine_list_head | ||
| 65 | * incorporates an implicit structural reference but engine_list_tail | ||
| 66 | * does not - the latter is a computational niceity and only points | ||
| 67 | * to something that is already pointed to by its predecessor in the | ||
| 68 | * list (or engine_list_head itself). In the same way, the use of the | ||
| 69 | * "prev" pointer in each ENGINE is to save excessive list iteration, | ||
| 70 | * it doesn't correspond to an extra structural reference. Hence, | ||
| 71 | * engine_list_head, and each non-null "next" pointer account for | ||
| 72 | * the list itself assuming exactly 1 structural reference on each | ||
| 73 | * list member. */ | ||
| 74 | static ENGINE *engine_list_head = NULL; | ||
| 75 | static ENGINE *engine_list_tail = NULL; | ||
| 76 | /* A boolean switch, used to ensure we only initialise once. This | ||
| 77 | * is needed because the engine list may genuinely become empty during | ||
| 78 | * use (so we can't use engine_list_head as an indicator for example. */ | ||
| 79 | static int engine_list_flag = 0; | ||
| 80 | |||
| 81 | /* These static functions starting with a lower case "engine_" always | ||
| 82 | * take place when CRYPTO_LOCK_ENGINE has been locked up. */ | ||
| 83 | static int engine_list_add(ENGINE *e) | ||
| 84 | { | ||
| 85 | int conflict = 0; | ||
| 86 | ENGINE *iterator = NULL; | ||
| 87 | |||
| 88 | if(e == NULL) | ||
| 89 | { | ||
| 90 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 91 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 92 | return 0; | ||
| 93 | } | ||
| 94 | iterator = engine_list_head; | ||
| 95 | while(iterator && !conflict) | ||
| 96 | { | ||
| 97 | conflict = (strcmp(iterator->id, e->id) == 0); | ||
| 98 | iterator = iterator->next; | ||
| 99 | } | ||
| 100 | if(conflict) | ||
| 101 | { | ||
| 102 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 103 | ENGINE_R_CONFLICTING_ENGINE_ID); | ||
| 104 | return 0; | ||
| 105 | } | ||
| 106 | if(engine_list_head == NULL) | ||
| 107 | { | ||
| 108 | /* We are adding to an empty list. */ | ||
| 109 | if(engine_list_tail) | ||
| 110 | { | ||
| 111 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 112 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 113 | return 0; | ||
| 114 | } | ||
| 115 | engine_list_head = e; | ||
| 116 | e->prev = NULL; | ||
| 117 | } | ||
| 118 | else | ||
| 119 | { | ||
| 120 | /* We are adding to the tail of an existing list. */ | ||
| 121 | if((engine_list_tail == NULL) || | ||
| 122 | (engine_list_tail->next != NULL)) | ||
| 123 | { | ||
| 124 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 125 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 126 | return 0; | ||
| 127 | } | ||
| 128 | engine_list_tail->next = e; | ||
| 129 | e->prev = engine_list_tail; | ||
| 130 | } | ||
| 131 | /* Having the engine in the list assumes a structural | ||
| 132 | * reference. */ | ||
| 133 | e->struct_ref++; | ||
| 134 | /* However it came to be, e is the last item in the list. */ | ||
| 135 | engine_list_tail = e; | ||
| 136 | e->next = NULL; | ||
| 137 | return 1; | ||
| 138 | } | ||
| 139 | |||
| 140 | static int engine_list_remove(ENGINE *e) | ||
| 141 | { | ||
| 142 | ENGINE *iterator; | ||
| 143 | |||
| 144 | if(e == NULL) | ||
| 145 | { | ||
| 146 | ENGINEerr(ENGINE_F_ENGINE_LIST_REMOVE, | ||
| 147 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 148 | return 0; | ||
| 149 | } | ||
| 150 | /* We need to check that e is in our linked list! */ | ||
| 151 | iterator = engine_list_head; | ||
| 152 | while(iterator && (iterator != e)) | ||
| 153 | iterator = iterator->next; | ||
| 154 | if(iterator == NULL) | ||
| 155 | { | ||
| 156 | ENGINEerr(ENGINE_F_ENGINE_LIST_REMOVE, | ||
| 157 | ENGINE_R_ENGINE_IS_NOT_IN_LIST); | ||
| 158 | return 0; | ||
| 159 | } | ||
| 160 | /* un-link e from the chain. */ | ||
| 161 | if(e->next) | ||
| 162 | e->next->prev = e->prev; | ||
| 163 | if(e->prev) | ||
| 164 | e->prev->next = e->next; | ||
| 165 | /* Correct our head/tail if necessary. */ | ||
| 166 | if(engine_list_head == e) | ||
| 167 | engine_list_head = e->next; | ||
| 168 | if(engine_list_tail == e) | ||
| 169 | engine_list_tail = e->prev; | ||
| 170 | /* remove our structural reference. */ | ||
| 171 | e->struct_ref--; | ||
| 172 | return 1; | ||
| 173 | } | ||
| 174 | |||
| 175 | /* This check always takes place with CRYPTO_LOCK_ENGINE locked up | ||
| 176 | * so we're synchronised, but we can't call anything that tries to | ||
| 177 | * lock it again! :-) NB: For convenience (and code-clarity) we | ||
| 178 | * don't output errors for failures of the engine_list_add function | ||
| 179 | * as it will generate errors itself. */ | ||
| 180 | static int engine_internal_check(void) | ||
| 181 | { | ||
| 182 | if(engine_list_flag) | ||
| 183 | return 1; | ||
| 184 | /* This is our first time up, we need to populate the list | ||
| 185 | * with our statically compiled-in engines. */ | ||
| 186 | if(!engine_list_add(ENGINE_openssl())) | ||
| 187 | return 0; | ||
| 188 | #ifndef NO_HW | ||
| 189 | #ifndef NO_HW_CSWIFT | ||
| 190 | if(!engine_list_add(ENGINE_cswift())) | ||
| 191 | return 0; | ||
| 192 | #endif /* !NO_HW_CSWIFT */ | ||
| 193 | #ifndef NO_HW_NCIPHER | ||
| 194 | if(!engine_list_add(ENGINE_ncipher())) | ||
| 195 | return 0; | ||
| 196 | #endif /* !NO_HW_NCIPHER */ | ||
| 197 | #ifndef NO_HW_ATALLA | ||
| 198 | if(!engine_list_add(ENGINE_atalla())) | ||
| 199 | return 0; | ||
| 200 | #endif /* !NO_HW_ATALLA */ | ||
| 201 | #endif /* !NO_HW */ | ||
| 202 | engine_list_flag = 1; | ||
| 203 | return 1; | ||
| 204 | } | ||
| 205 | |||
| 206 | /* Get the first/last "ENGINE" type available. */ | ||
| 207 | ENGINE *ENGINE_get_first(void) | ||
| 208 | { | ||
| 209 | ENGINE *ret = NULL; | ||
| 210 | |||
| 211 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 212 | if(engine_internal_check()) | ||
| 213 | { | ||
| 214 | ret = engine_list_head; | ||
| 215 | if(ret) | ||
| 216 | ret->struct_ref++; | ||
| 217 | } | ||
| 218 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 219 | return ret; | ||
| 220 | } | ||
| 221 | ENGINE *ENGINE_get_last(void) | ||
| 222 | { | ||
| 223 | ENGINE *ret = NULL; | ||
| 224 | |||
| 225 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 226 | if(engine_internal_check()) | ||
| 227 | { | ||
| 228 | ret = engine_list_tail; | ||
| 229 | if(ret) | ||
| 230 | ret->struct_ref++; | ||
| 231 | } | ||
| 232 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 233 | return ret; | ||
| 234 | } | ||
| 235 | |||
| 236 | /* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ | ||
| 237 | ENGINE *ENGINE_get_next(ENGINE *e) | ||
| 238 | { | ||
| 239 | ENGINE *ret = NULL; | ||
| 240 | if(e == NULL) | ||
| 241 | { | ||
| 242 | ENGINEerr(ENGINE_F_ENGINE_GET_NEXT, | ||
| 243 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 244 | return 0; | ||
| 245 | } | ||
| 246 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 247 | ret = e->next; | ||
| 248 | e->struct_ref--; | ||
| 249 | if(ret) | ||
| 250 | ret->struct_ref++; | ||
| 251 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 252 | return ret; | ||
| 253 | } | ||
| 254 | ENGINE *ENGINE_get_prev(ENGINE *e) | ||
| 255 | { | ||
| 256 | ENGINE *ret = NULL; | ||
| 257 | if(e == NULL) | ||
| 258 | { | ||
| 259 | ENGINEerr(ENGINE_F_ENGINE_GET_PREV, | ||
| 260 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 261 | return 0; | ||
| 262 | } | ||
| 263 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 264 | ret = e->prev; | ||
| 265 | e->struct_ref--; | ||
| 266 | if(ret) | ||
| 267 | ret->struct_ref++; | ||
| 268 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 269 | return ret; | ||
| 270 | } | ||
| 271 | |||
| 272 | /* Add another "ENGINE" type into the list. */ | ||
| 273 | int ENGINE_add(ENGINE *e) | ||
| 274 | { | ||
| 275 | int to_return = 1; | ||
| 276 | if(e == NULL) | ||
| 277 | { | ||
| 278 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 279 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 280 | return 0; | ||
| 281 | } | ||
| 282 | if((e->id == NULL) || (e->name == NULL)) | ||
| 283 | { | ||
| 284 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 285 | ENGINE_R_ID_OR_NAME_MISSING); | ||
| 286 | } | ||
| 287 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 288 | if(!engine_internal_check() || !engine_list_add(e)) | ||
| 289 | { | ||
| 290 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 291 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 292 | to_return = 0; | ||
| 293 | } | ||
| 294 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 295 | return to_return; | ||
| 296 | } | ||
| 297 | |||
| 298 | /* Remove an existing "ENGINE" type from the array. */ | ||
| 299 | int ENGINE_remove(ENGINE *e) | ||
| 300 | { | ||
| 301 | int to_return = 1; | ||
| 302 | if(e == NULL) | ||
| 303 | { | ||
| 304 | ENGINEerr(ENGINE_F_ENGINE_REMOVE, | ||
| 305 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 306 | return 0; | ||
| 307 | } | ||
| 308 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 309 | if(!engine_internal_check() || !engine_list_remove(e)) | ||
| 310 | { | ||
| 311 | ENGINEerr(ENGINE_F_ENGINE_REMOVE, | ||
| 312 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 313 | to_return = 0; | ||
| 314 | } | ||
| 315 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 316 | return to_return; | ||
| 317 | } | ||
| 318 | |||
| 319 | ENGINE *ENGINE_by_id(const char *id) | ||
| 320 | { | ||
| 321 | ENGINE *iterator = NULL; | ||
| 322 | if(id == NULL) | ||
| 323 | { | ||
| 324 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 325 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 326 | return NULL; | ||
| 327 | } | ||
| 328 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 329 | if(!engine_internal_check()) | ||
| 330 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 331 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 332 | else | ||
| 333 | { | ||
| 334 | iterator = engine_list_head; | ||
| 335 | while(iterator && (strcmp(id, iterator->id) != 0)) | ||
| 336 | iterator = iterator->next; | ||
| 337 | if(iterator) | ||
| 338 | /* We need to return a structural reference */ | ||
| 339 | iterator->struct_ref++; | ||
| 340 | } | ||
| 341 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 342 | if(iterator == NULL) | ||
| 343 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 344 | ENGINE_R_NO_SUCH_ENGINE); | ||
| 345 | return iterator; | ||
| 346 | } | ||
| 347 | |||
| 348 | /* As per the comments in engine.h, it is generally better all round | ||
| 349 | * if the ENGINE structure is allocated within this framework. */ | ||
| 350 | #if 0 | ||
| 351 | int ENGINE_get_struct_size(void) | ||
| 352 | { | ||
| 353 | return sizeof(ENGINE); | ||
| 354 | } | ||
| 355 | |||
| 356 | ENGINE *ENGINE_new(ENGINE *e) | ||
| 357 | { | ||
| 358 | ENGINE *ret; | ||
| 359 | |||
| 360 | if(e == NULL) | ||
| 361 | { | ||
| 362 | ret = (ENGINE *)(OPENSSL_malloc(sizeof(ENGINE)); | ||
| 363 | if(ret == NULL) | ||
| 364 | { | ||
| 365 | ENGINEerr(ENGINE_F_ENGINE_NEW, | ||
| 366 | ERR_R_MALLOC_FAILURE); | ||
| 367 | return NULL; | ||
| 368 | } | ||
| 369 | } | ||
| 370 | else | ||
| 371 | ret = e; | ||
| 372 | memset(ret, 0, sizeof(ENGINE)); | ||
| 373 | if(e) | ||
| 374 | ret->flags = ENGINE_FLAGS_MALLOCED; | ||
| 375 | ret->struct_ref = 1; | ||
| 376 | return ret; | ||
| 377 | } | ||
| 378 | #else | ||
| 379 | ENGINE *ENGINE_new(void) | ||
| 380 | { | ||
| 381 | ENGINE *ret; | ||
| 382 | |||
| 383 | ret = (ENGINE *)OPENSSL_malloc(sizeof(ENGINE)); | ||
| 384 | if(ret == NULL) | ||
| 385 | { | ||
| 386 | ENGINEerr(ENGINE_F_ENGINE_NEW, ERR_R_MALLOC_FAILURE); | ||
| 387 | return NULL; | ||
| 388 | } | ||
| 389 | memset(ret, 0, sizeof(ENGINE)); | ||
| 390 | ret->flags = ENGINE_FLAGS_MALLOCED; | ||
| 391 | ret->struct_ref = 1; | ||
| 392 | return ret; | ||
| 393 | } | ||
| 394 | #endif | ||
| 395 | |||
| 396 | int ENGINE_free(ENGINE *e) | ||
| 397 | { | ||
| 398 | int i; | ||
| 399 | |||
| 400 | if(e == NULL) | ||
| 401 | { | ||
| 402 | ENGINEerr(ENGINE_F_ENGINE_FREE, | ||
| 403 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 404 | return 0; | ||
| 405 | } | ||
| 406 | i = CRYPTO_add(&e->struct_ref,-1,CRYPTO_LOCK_ENGINE); | ||
| 407 | #ifdef REF_PRINT | ||
| 408 | REF_PRINT("ENGINE",e); | ||
| 409 | #endif | ||
| 410 | if (i > 0) return 1; | ||
| 411 | #ifdef REF_CHECK | ||
| 412 | if (i < 0) | ||
| 413 | { | ||
| 414 | fprintf(stderr,"ENGINE_free, bad reference count\n"); | ||
| 415 | abort(); | ||
| 416 | } | ||
| 417 | #endif | ||
| 418 | if(e->flags & ENGINE_FLAGS_MALLOCED) | ||
| 419 | OPENSSL_free(e); | ||
| 420 | return 1; | ||
| 421 | } | ||
| 422 | |||
| 423 | int ENGINE_set_id(ENGINE *e, const char *id) | ||
| 424 | { | ||
| 425 | if((e == NULL) || (id == NULL)) | ||
| 426 | { | ||
| 427 | ENGINEerr(ENGINE_F_ENGINE_SET_ID, | ||
| 428 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 429 | return 0; | ||
| 430 | } | ||
| 431 | e->id = id; | ||
| 432 | return 1; | ||
| 433 | } | ||
| 434 | |||
| 435 | int ENGINE_set_name(ENGINE *e, const char *name) | ||
| 436 | { | ||
| 437 | if((e == NULL) || (name == NULL)) | ||
| 438 | { | ||
| 439 | ENGINEerr(ENGINE_F_ENGINE_SET_NAME, | ||
| 440 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 441 | return 0; | ||
| 442 | } | ||
| 443 | e->name = name; | ||
| 444 | return 1; | ||
| 445 | } | ||
| 446 | |||
| 447 | int ENGINE_set_RSA(ENGINE *e, RSA_METHOD *rsa_meth) | ||
| 448 | { | ||
| 449 | if((e == NULL) || (rsa_meth == NULL)) | ||
| 450 | { | ||
| 451 | ENGINEerr(ENGINE_F_ENGINE_SET_RSA, | ||
| 452 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 453 | return 0; | ||
| 454 | } | ||
| 455 | e->rsa_meth = rsa_meth; | ||
| 456 | return 1; | ||
| 457 | } | ||
| 458 | |||
| 459 | int ENGINE_set_DSA(ENGINE *e, DSA_METHOD *dsa_meth) | ||
| 460 | { | ||
| 461 | if((e == NULL) || (dsa_meth == NULL)) | ||
| 462 | { | ||
| 463 | ENGINEerr(ENGINE_F_ENGINE_SET_DSA, | ||
| 464 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 465 | return 0; | ||
| 466 | } | ||
| 467 | e->dsa_meth = dsa_meth; | ||
| 468 | return 1; | ||
| 469 | } | ||
| 470 | |||
| 471 | int ENGINE_set_DH(ENGINE *e, DH_METHOD *dh_meth) | ||
| 472 | { | ||
| 473 | if((e == NULL) || (dh_meth == NULL)) | ||
| 474 | { | ||
| 475 | ENGINEerr(ENGINE_F_ENGINE_SET_DH, | ||
| 476 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 477 | return 0; | ||
| 478 | } | ||
| 479 | e->dh_meth = dh_meth; | ||
| 480 | return 1; | ||
| 481 | } | ||
| 482 | |||
| 483 | int ENGINE_set_RAND(ENGINE *e, RAND_METHOD *rand_meth) | ||
| 484 | { | ||
| 485 | if((e == NULL) || (rand_meth == NULL)) | ||
| 486 | { | ||
| 487 | ENGINEerr(ENGINE_F_ENGINE_SET_RAND, | ||
| 488 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 489 | return 0; | ||
| 490 | } | ||
| 491 | e->rand_meth = rand_meth; | ||
| 492 | return 1; | ||
| 493 | } | ||
| 494 | |||
| 495 | int ENGINE_set_BN_mod_exp(ENGINE *e, BN_MOD_EXP bn_mod_exp) | ||
| 496 | { | ||
| 497 | if((e == NULL) || (bn_mod_exp == NULL)) | ||
| 498 | { | ||
| 499 | ENGINEerr(ENGINE_F_ENGINE_SET_BN_MOD_EXP, | ||
| 500 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 501 | return 0; | ||
| 502 | } | ||
| 503 | e->bn_mod_exp = bn_mod_exp; | ||
| 504 | return 1; | ||
| 505 | } | ||
| 506 | |||
| 507 | int ENGINE_set_BN_mod_exp_crt(ENGINE *e, BN_MOD_EXP_CRT bn_mod_exp_crt) | ||
| 508 | { | ||
| 509 | if((e == NULL) || (bn_mod_exp_crt == NULL)) | ||
| 510 | { | ||
| 511 | ENGINEerr(ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT, | ||
| 512 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 513 | return 0; | ||
| 514 | } | ||
| 515 | e->bn_mod_exp_crt = bn_mod_exp_crt; | ||
| 516 | return 1; | ||
| 517 | } | ||
| 518 | |||
| 519 | int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f) | ||
| 520 | { | ||
| 521 | if((e == NULL) || (init_f == NULL)) | ||
| 522 | { | ||
| 523 | ENGINEerr(ENGINE_F_ENGINE_SET_INIT_FUNCTION, | ||
| 524 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 525 | return 0; | ||
| 526 | } | ||
| 527 | e->init = init_f; | ||
| 528 | return 1; | ||
| 529 | } | ||
| 530 | |||
| 531 | int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f) | ||
| 532 | { | ||
| 533 | if((e == NULL) || (finish_f == NULL)) | ||
| 534 | { | ||
| 535 | ENGINEerr(ENGINE_F_ENGINE_SET_FINISH_FUNCTION, | ||
| 536 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 537 | return 0; | ||
| 538 | } | ||
| 539 | e->finish = finish_f; | ||
| 540 | return 1; | ||
| 541 | } | ||
| 542 | |||
| 543 | int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f) | ||
| 544 | { | ||
| 545 | if((e == NULL) || (ctrl_f == NULL)) | ||
| 546 | { | ||
| 547 | ENGINEerr(ENGINE_F_ENGINE_SET_CTRL_FUNCTION, | ||
| 548 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 549 | return 0; | ||
| 550 | } | ||
| 551 | e->ctrl = ctrl_f; | ||
| 552 | return 1; | ||
| 553 | } | ||
| 554 | |||
| 555 | const char *ENGINE_get_id(ENGINE *e) | ||
| 556 | { | ||
| 557 | if(e == NULL) | ||
| 558 | { | ||
| 559 | ENGINEerr(ENGINE_F_ENGINE_GET_ID, | ||
| 560 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 561 | return 0; | ||
| 562 | } | ||
| 563 | return e->id; | ||
| 564 | } | ||
| 565 | |||
| 566 | const char *ENGINE_get_name(ENGINE *e) | ||
| 567 | { | ||
| 568 | if(e == NULL) | ||
| 569 | { | ||
| 570 | ENGINEerr(ENGINE_F_ENGINE_GET_NAME, | ||
| 571 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 572 | return 0; | ||
| 573 | } | ||
| 574 | return e->name; | ||
| 575 | } | ||
| 576 | |||
| 577 | RSA_METHOD *ENGINE_get_RSA(ENGINE *e) | ||
| 578 | { | ||
| 579 | if(e == NULL) | ||
| 580 | { | ||
| 581 | ENGINEerr(ENGINE_F_ENGINE_GET_RSA, | ||
| 582 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 583 | return NULL; | ||
| 584 | } | ||
| 585 | return e->rsa_meth; | ||
| 586 | } | ||
| 587 | |||
| 588 | DSA_METHOD *ENGINE_get_DSA(ENGINE *e) | ||
| 589 | { | ||
| 590 | if(e == NULL) | ||
| 591 | { | ||
| 592 | ENGINEerr(ENGINE_F_ENGINE_GET_DSA, | ||
| 593 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 594 | return NULL; | ||
| 595 | } | ||
| 596 | return e->dsa_meth; | ||
| 597 | } | ||
| 598 | |||
| 599 | DH_METHOD *ENGINE_get_DH(ENGINE *e) | ||
| 600 | { | ||
| 601 | if(e == NULL) | ||
| 602 | { | ||
| 603 | ENGINEerr(ENGINE_F_ENGINE_GET_DH, | ||
| 604 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 605 | return NULL; | ||
| 606 | } | ||
| 607 | return e->dh_meth; | ||
| 608 | } | ||
| 609 | |||
| 610 | RAND_METHOD *ENGINE_get_RAND(ENGINE *e) | ||
| 611 | { | ||
| 612 | if(e == NULL) | ||
| 613 | { | ||
| 614 | ENGINEerr(ENGINE_F_ENGINE_GET_RAND, | ||
| 615 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 616 | return NULL; | ||
| 617 | } | ||
| 618 | return e->rand_meth; | ||
| 619 | } | ||
| 620 | |||
| 621 | BN_MOD_EXP ENGINE_get_BN_mod_exp(ENGINE *e) | ||
| 622 | { | ||
| 623 | if(e == NULL) | ||
| 624 | { | ||
| 625 | ENGINEerr(ENGINE_F_ENGINE_GET_BN_MOD_EXP, | ||
| 626 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 627 | return NULL; | ||
| 628 | } | ||
| 629 | return e->bn_mod_exp; | ||
| 630 | } | ||
| 631 | |||
| 632 | BN_MOD_EXP_CRT ENGINE_get_BN_mod_exp_crt(ENGINE *e) | ||
| 633 | { | ||
| 634 | if(e == NULL) | ||
| 635 | { | ||
| 636 | ENGINEerr(ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT, | ||
| 637 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 638 | return NULL; | ||
| 639 | } | ||
| 640 | return e->bn_mod_exp_crt; | ||
| 641 | } | ||
| 642 | |||
| 643 | ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(ENGINE *e) | ||
| 644 | { | ||
| 645 | if(e == NULL) | ||
| 646 | { | ||
| 647 | ENGINEerr(ENGINE_F_ENGINE_GET_INIT_FUNCTION, | ||
| 648 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 649 | return NULL; | ||
| 650 | } | ||
| 651 | return e->init; | ||
| 652 | } | ||
| 653 | |||
| 654 | ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(ENGINE *e) | ||
| 655 | { | ||
| 656 | if(e == NULL) | ||
| 657 | { | ||
| 658 | ENGINEerr(ENGINE_F_ENGINE_GET_FINISH_FUNCTION, | ||
| 659 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 660 | return NULL; | ||
| 661 | } | ||
| 662 | return e->finish; | ||
| 663 | } | ||
| 664 | |||
| 665 | ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(ENGINE *e) | ||
| 666 | { | ||
| 667 | if(e == NULL) | ||
| 668 | { | ||
| 669 | ENGINEerr(ENGINE_F_ENGINE_GET_CTRL_FUNCTION, | ||
| 670 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 671 | return NULL; | ||
| 672 | } | ||
| 673 | return e->ctrl; | ||
| 674 | } | ||
| 675 | |||
diff --git a/src/lib/libssl/src/crypto/engine/engine_openssl.c b/src/lib/libssl/src/crypto/engine/engine_openssl.c new file mode 100644 index 0000000000..9636f51168 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/engine_openssl.c | |||
| @@ -0,0 +1,174 @@ | |||
| 1 | /* crypto/engine/engine_openssl.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | |||
| 60 | #include <stdio.h> | ||
| 61 | #include <openssl/crypto.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "engine_int.h" | ||
| 64 | #include <openssl/engine.h> | ||
| 65 | #include <openssl/dso.h> | ||
| 66 | #include <openssl/rsa.h> | ||
| 67 | #include <openssl/dsa.h> | ||
| 68 | #include <openssl/dh.h> | ||
| 69 | #include <openssl/rand.h> | ||
| 70 | #include <openssl/bn.h> | ||
| 71 | |||
| 72 | /* This is the only function we need to implement as OpenSSL | ||
| 73 | * doesn't have a native CRT mod_exp. Perhaps this should be | ||
| 74 | * BN_mod_exp_crt and moved into crypto/bn/ ?? ... dunno. */ | ||
| 75 | static int openssl_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 76 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | ||
| 77 | const BIGNUM *iqmp, BN_CTX *ctx); | ||
| 78 | |||
| 79 | /* The ENGINE structure that can be pointed to. */ | ||
| 80 | static ENGINE engine_openssl = | ||
| 81 | { | ||
| 82 | "openssl", | ||
| 83 | "Software default engine support", | ||
| 84 | NULL, | ||
| 85 | NULL, | ||
| 86 | NULL, /* these methods are "stolen" in ENGINE_openssl() */ | ||
| 87 | NULL, | ||
| 88 | NULL, | ||
| 89 | openssl_mod_exp_crt, | ||
| 90 | NULL, /* no init() */ | ||
| 91 | NULL, /* no finish() */ | ||
| 92 | NULL, /* no ctrl() */ | ||
| 93 | NULL, /* no load_privkey() */ | ||
| 94 | NULL, /* no load_pubkey() */ | ||
| 95 | 0, /* no flags */ | ||
| 96 | 0, 0, /* no references. */ | ||
| 97 | NULL, NULL /* unlinked */ | ||
| 98 | }; | ||
| 99 | |||
| 100 | /* As this is only ever called once, there's no need for locking | ||
| 101 | * (indeed - the lock will already be held by our caller!!!) */ | ||
| 102 | ENGINE *ENGINE_openssl() | ||
| 103 | { | ||
| 104 | /* We need to populate our structure with the software pointers | ||
| 105 | * that we want to steal. */ | ||
| 106 | engine_openssl.rsa_meth = RSA_get_default_openssl_method(); | ||
| 107 | engine_openssl.dsa_meth = DSA_get_default_openssl_method(); | ||
| 108 | engine_openssl.dh_meth = DH_get_default_openssl_method(); | ||
| 109 | engine_openssl.rand_meth = RAND_SSLeay(); | ||
| 110 | engine_openssl.bn_mod_exp = BN_mod_exp; | ||
| 111 | return &engine_openssl; | ||
| 112 | } | ||
| 113 | |||
| 114 | /* Chinese Remainder Theorem, taken and adapted from rsa_eay.c */ | ||
| 115 | static int openssl_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 116 | const BIGNUM *q, const BIGNUM *dmp1, | ||
| 117 | const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx) | ||
| 118 | { | ||
| 119 | BIGNUM r1,m1; | ||
| 120 | int ret=0; | ||
| 121 | BN_CTX *bn_ctx; | ||
| 122 | BIGNUM *temp_bn = NULL; | ||
| 123 | |||
| 124 | if (ctx) | ||
| 125 | bn_ctx = ctx; | ||
| 126 | else | ||
| 127 | if ((bn_ctx=BN_CTX_new()) == NULL) goto err; | ||
| 128 | BN_init(&m1); | ||
| 129 | BN_init(&r1); | ||
| 130 | /* BN_mul() cannot accept const BIGNUMs so I use the BN_CTX | ||
| 131 | * to duplicate what I need. <sigh> */ | ||
| 132 | if ((temp_bn = BN_CTX_get(bn_ctx)) == NULL) goto err; | ||
| 133 | if (!BN_copy(temp_bn, iqmp)) goto err; | ||
| 134 | |||
| 135 | if (!BN_mod(&r1, a, q, bn_ctx)) goto err; | ||
| 136 | if (!engine_openssl.bn_mod_exp(&m1, &r1, dmq1, q, bn_ctx)) | ||
| 137 | goto err; | ||
| 138 | |||
| 139 | if (!BN_mod(&r1, a, p, bn_ctx)) goto err; | ||
| 140 | if (!engine_openssl.bn_mod_exp(r, &r1, dmp1, p, bn_ctx)) | ||
| 141 | goto err; | ||
| 142 | |||
| 143 | if (!BN_sub(r, r, &m1)) goto err; | ||
| 144 | /* This will help stop the size of r0 increasing, which does | ||
| 145 | * affect the multiply if it optimised for a power of 2 size */ | ||
| 146 | if (r->neg) | ||
| 147 | if (!BN_add(r, r, p)) goto err; | ||
| 148 | |||
| 149 | if (!BN_mul(&r1, r, temp_bn, bn_ctx)) goto err; | ||
| 150 | if (!BN_mod(r, &r1, p, bn_ctx)) goto err; | ||
| 151 | /* If p < q it is occasionally possible for the correction of | ||
| 152 | * adding 'p' if r is negative above to leave the result still | ||
| 153 | * negative. This can break the private key operations: the following | ||
| 154 | * second correction should *always* correct this rare occurrence. | ||
| 155 | * This will *never* happen with OpenSSL generated keys because | ||
| 156 | * they ensure p > q [steve] | ||
| 157 | */ | ||
| 158 | if (r->neg) | ||
| 159 | if (!BN_add(r, r, p)) goto err; | ||
| 160 | /* Again, BN_mul() will need non-const values. */ | ||
| 161 | if (!BN_copy(temp_bn, q)) goto err; | ||
| 162 | if (!BN_mul(&r1, r, temp_bn, bn_ctx)) goto err; | ||
| 163 | if (!BN_add(r, &r1, &m1)) goto err; | ||
| 164 | |||
| 165 | ret=1; | ||
| 166 | err: | ||
| 167 | BN_clear_free(&m1); | ||
| 168 | BN_clear_free(&r1); | ||
| 169 | if (temp_bn) | ||
| 170 | bn_ctx->tos--; | ||
| 171 | if (!ctx) | ||
| 172 | BN_CTX_free(bn_ctx); | ||
| 173 | return(ret); | ||
| 174 | } | ||
diff --git a/src/lib/libssl/src/crypto/engine/enginetest.c b/src/lib/libssl/src/crypto/engine/enginetest.c new file mode 100644 index 0000000000..a5a3c47fcb --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/enginetest.c | |||
| @@ -0,0 +1,251 @@ | |||
| 1 | /* crypto/engine/enginetest.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <openssl/engine.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | |||
| 64 | static void display_engine_list() | ||
| 65 | { | ||
| 66 | ENGINE *h; | ||
| 67 | int loop; | ||
| 68 | |||
| 69 | h = ENGINE_get_first(); | ||
| 70 | loop = 0; | ||
| 71 | printf("listing available engine types\n"); | ||
| 72 | while(h) | ||
| 73 | { | ||
| 74 | printf("engine %i, id = \"%s\", name = \"%s\"\n", | ||
| 75 | loop++, ENGINE_get_id(h), ENGINE_get_name(h)); | ||
| 76 | h = ENGINE_get_next(h); | ||
| 77 | } | ||
| 78 | printf("end of list\n"); | ||
| 79 | } | ||
| 80 | |||
| 81 | int main(int argc, char *argv[]) | ||
| 82 | { | ||
| 83 | ENGINE *block[512]; | ||
| 84 | char buf[256]; | ||
| 85 | const char *id, *name; | ||
| 86 | ENGINE *ptr; | ||
| 87 | int loop; | ||
| 88 | int to_return = 1; | ||
| 89 | ENGINE *new_h1 = NULL; | ||
| 90 | ENGINE *new_h2 = NULL; | ||
| 91 | ENGINE *new_h3 = NULL; | ||
| 92 | ENGINE *new_h4 = NULL; | ||
| 93 | |||
| 94 | ERR_load_crypto_strings(); | ||
| 95 | |||
| 96 | memset(block, 0, 512 * sizeof(ENGINE *)); | ||
| 97 | if(((new_h1 = ENGINE_new()) == NULL) || | ||
| 98 | !ENGINE_set_id(new_h1, "test_id0") || | ||
| 99 | !ENGINE_set_name(new_h1, "First test item") || | ||
| 100 | ((new_h2 = ENGINE_new()) == NULL) || | ||
| 101 | !ENGINE_set_id(new_h2, "test_id1") || | ||
| 102 | !ENGINE_set_name(new_h2, "Second test item") || | ||
| 103 | ((new_h3 = ENGINE_new()) == NULL) || | ||
| 104 | !ENGINE_set_id(new_h3, "test_id2") || | ||
| 105 | !ENGINE_set_name(new_h3, "Third test item") || | ||
| 106 | ((new_h4 = ENGINE_new()) == NULL) || | ||
| 107 | !ENGINE_set_id(new_h4, "test_id3") || | ||
| 108 | !ENGINE_set_name(new_h4, "Fourth test item")) | ||
| 109 | { | ||
| 110 | printf("Couldn't set up test ENGINE structures\n"); | ||
| 111 | goto end; | ||
| 112 | } | ||
| 113 | printf("\nenginetest beginning\n\n"); | ||
| 114 | display_engine_list(); | ||
| 115 | if(!ENGINE_add(new_h1)) | ||
| 116 | { | ||
| 117 | printf("Add failed!\n"); | ||
| 118 | goto end; | ||
| 119 | } | ||
| 120 | display_engine_list(); | ||
| 121 | ptr = ENGINE_get_first(); | ||
| 122 | if(!ENGINE_remove(ptr)) | ||
| 123 | { | ||
| 124 | printf("Remove failed!\n"); | ||
| 125 | goto end; | ||
| 126 | } | ||
| 127 | display_engine_list(); | ||
| 128 | if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) | ||
| 129 | { | ||
| 130 | printf("Add failed!\n"); | ||
| 131 | goto end; | ||
| 132 | } | ||
| 133 | display_engine_list(); | ||
| 134 | if(!ENGINE_remove(new_h2)) | ||
| 135 | { | ||
| 136 | printf("Remove failed!\n"); | ||
| 137 | goto end; | ||
| 138 | } | ||
| 139 | display_engine_list(); | ||
| 140 | if(!ENGINE_add(new_h4)) | ||
| 141 | { | ||
| 142 | printf("Add failed!\n"); | ||
| 143 | goto end; | ||
| 144 | } | ||
| 145 | display_engine_list(); | ||
| 146 | if(ENGINE_add(new_h3)) | ||
| 147 | { | ||
| 148 | printf("Add *should* have failed but didn't!\n"); | ||
| 149 | goto end; | ||
| 150 | } | ||
| 151 | else | ||
| 152 | printf("Add that should fail did.\n"); | ||
| 153 | ERR_clear_error(); | ||
| 154 | if(ENGINE_remove(new_h2)) | ||
| 155 | { | ||
| 156 | printf("Remove *should* have failed but didn't!\n"); | ||
| 157 | goto end; | ||
| 158 | } | ||
| 159 | else | ||
| 160 | printf("Remove that should fail did.\n"); | ||
| 161 | if(!ENGINE_remove(new_h1)) | ||
| 162 | { | ||
| 163 | printf("Remove failed!\n"); | ||
| 164 | goto end; | ||
| 165 | } | ||
| 166 | display_engine_list(); | ||
| 167 | if(!ENGINE_remove(new_h3)) | ||
| 168 | { | ||
| 169 | printf("Remove failed!\n"); | ||
| 170 | goto end; | ||
| 171 | } | ||
| 172 | display_engine_list(); | ||
| 173 | if(!ENGINE_remove(new_h4)) | ||
| 174 | { | ||
| 175 | printf("Remove failed!\n"); | ||
| 176 | goto end; | ||
| 177 | } | ||
| 178 | display_engine_list(); | ||
| 179 | /* Depending on whether there's any hardware support compiled | ||
| 180 | * in, this remove may be destined to fail. */ | ||
| 181 | ptr = ENGINE_get_first(); | ||
| 182 | if(ptr) | ||
| 183 | if(!ENGINE_remove(ptr)) | ||
| 184 | printf("Remove failed!i - probably no hardware " | ||
| 185 | "support present.\n"); | ||
| 186 | display_engine_list(); | ||
| 187 | if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) | ||
| 188 | { | ||
| 189 | printf("Couldn't add and remove to an empty list!\n"); | ||
| 190 | goto end; | ||
| 191 | } | ||
| 192 | else | ||
| 193 | printf("Successfully added and removed to an empty list!\n"); | ||
| 194 | printf("About to beef up the engine-type list\n"); | ||
| 195 | for(loop = 0; loop < 512; loop++) | ||
| 196 | { | ||
| 197 | sprintf(buf, "id%i", loop); | ||
| 198 | id = strdup(buf); | ||
| 199 | sprintf(buf, "Fake engine type %i", loop); | ||
| 200 | name = strdup(buf); | ||
| 201 | if(((block[loop] = ENGINE_new()) == NULL) || | ||
| 202 | !ENGINE_set_id(block[loop], id) || | ||
| 203 | !ENGINE_set_name(block[loop], name)) | ||
| 204 | { | ||
| 205 | printf("Couldn't create block of ENGINE structures.\n" | ||
| 206 | "I'll probably also core-dump now, damn.\n"); | ||
| 207 | goto end; | ||
| 208 | } | ||
| 209 | } | ||
| 210 | for(loop = 0; loop < 512; loop++) | ||
| 211 | { | ||
| 212 | if(!ENGINE_add(block[loop])) | ||
| 213 | { | ||
| 214 | printf("\nAdding stopped at %i, (%s,%s)\n", | ||
| 215 | loop, ENGINE_get_id(block[loop]), | ||
| 216 | ENGINE_get_name(block[loop])); | ||
| 217 | goto cleanup_loop; | ||
| 218 | } | ||
| 219 | else | ||
| 220 | printf("."); fflush(stdout); | ||
| 221 | } | ||
| 222 | cleanup_loop: | ||
| 223 | printf("\nAbout to empty the engine-type list\n"); | ||
| 224 | while((ptr = ENGINE_get_first()) != NULL) | ||
| 225 | { | ||
| 226 | if(!ENGINE_remove(ptr)) | ||
| 227 | { | ||
| 228 | printf("\nRemove failed!\n"); | ||
| 229 | goto end; | ||
| 230 | } | ||
| 231 | printf("."); fflush(stdout); | ||
| 232 | } | ||
| 233 | for(loop = 0; loop < 512; loop++) | ||
| 234 | { | ||
| 235 | free((char *)(ENGINE_get_id(block[loop]))); | ||
| 236 | free((char *)(ENGINE_get_name(block[loop]))); | ||
| 237 | } | ||
| 238 | printf("\nTests completed happily\n"); | ||
| 239 | to_return = 0; | ||
| 240 | end: | ||
| 241 | if(to_return) | ||
| 242 | ERR_print_errors_fp(stderr); | ||
| 243 | if(new_h1) ENGINE_free(new_h1); | ||
| 244 | if(new_h2) ENGINE_free(new_h2); | ||
| 245 | if(new_h3) ENGINE_free(new_h3); | ||
| 246 | if(new_h4) ENGINE_free(new_h4); | ||
| 247 | for(loop = 0; loop < 512; loop++) | ||
| 248 | if(block[loop]) | ||
| 249 | ENGINE_free(block[loop]); | ||
| 250 | return to_return; | ||
| 251 | } | ||
diff --git a/src/lib/libssl/src/crypto/engine/hw_atalla.c b/src/lib/libssl/src/crypto/engine/hw_atalla.c new file mode 100644 index 0000000000..3bb992a193 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/hw_atalla.c | |||
| @@ -0,0 +1,444 @@ | |||
| 1 | /* crypto/engine/hw_atalla.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <openssl/crypto.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/dso.h> | ||
| 63 | #include "engine_int.h" | ||
| 64 | #include <openssl/engine.h> | ||
| 65 | |||
| 66 | #ifndef NO_HW | ||
| 67 | #ifndef NO_HW_ATALLA | ||
| 68 | |||
| 69 | #ifdef FLAT_INC | ||
| 70 | #include "atalla.h" | ||
| 71 | #else | ||
| 72 | #include "vendor_defns/atalla.h" | ||
| 73 | #endif | ||
| 74 | |||
| 75 | static int atalla_init(void); | ||
| 76 | static int atalla_finish(void); | ||
| 77 | |||
| 78 | /* BIGNUM stuff */ | ||
| 79 | static int atalla_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 80 | const BIGNUM *m, BN_CTX *ctx); | ||
| 81 | |||
| 82 | /* RSA stuff */ | ||
| 83 | static int atalla_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa); | ||
| 84 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | ||
| 85 | static int atalla_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 86 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 87 | |||
| 88 | /* DSA stuff */ | ||
| 89 | static int atalla_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, | ||
| 90 | BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, | ||
| 91 | BN_CTX *ctx, BN_MONT_CTX *in_mont); | ||
| 92 | static int atalla_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, | ||
| 93 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | ||
| 94 | BN_MONT_CTX *m_ctx); | ||
| 95 | |||
| 96 | /* DH stuff */ | ||
| 97 | /* This function is alised to mod_exp (with the DH and mont dropped). */ | ||
| 98 | static int atalla_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 99 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 100 | |||
| 101 | |||
| 102 | /* Our internal RSA_METHOD that we provide pointers to */ | ||
| 103 | static RSA_METHOD atalla_rsa = | ||
| 104 | { | ||
| 105 | "Atalla RSA method", | ||
| 106 | NULL, | ||
| 107 | NULL, | ||
| 108 | NULL, | ||
| 109 | NULL, | ||
| 110 | atalla_rsa_mod_exp, | ||
| 111 | atalla_mod_exp_mont, | ||
| 112 | NULL, | ||
| 113 | NULL, | ||
| 114 | 0, | ||
| 115 | NULL, | ||
| 116 | NULL, | ||
| 117 | NULL | ||
| 118 | }; | ||
| 119 | |||
| 120 | /* Our internal DSA_METHOD that we provide pointers to */ | ||
| 121 | static DSA_METHOD atalla_dsa = | ||
| 122 | { | ||
| 123 | "Atalla DSA method", | ||
| 124 | NULL, /* dsa_do_sign */ | ||
| 125 | NULL, /* dsa_sign_setup */ | ||
| 126 | NULL, /* dsa_do_verify */ | ||
| 127 | atalla_dsa_mod_exp, /* dsa_mod_exp */ | ||
| 128 | atalla_mod_exp_dsa, /* bn_mod_exp */ | ||
| 129 | NULL, /* init */ | ||
| 130 | NULL, /* finish */ | ||
| 131 | 0, /* flags */ | ||
| 132 | NULL /* app_data */ | ||
| 133 | }; | ||
| 134 | |||
| 135 | /* Our internal DH_METHOD that we provide pointers to */ | ||
| 136 | static DH_METHOD atalla_dh = | ||
| 137 | { | ||
| 138 | "Atalla DH method", | ||
| 139 | NULL, | ||
| 140 | NULL, | ||
| 141 | atalla_mod_exp_dh, | ||
| 142 | NULL, | ||
| 143 | NULL, | ||
| 144 | 0, | ||
| 145 | NULL | ||
| 146 | }; | ||
| 147 | |||
| 148 | /* Our ENGINE structure. */ | ||
| 149 | static ENGINE engine_atalla = | ||
| 150 | { | ||
| 151 | "atalla", | ||
| 152 | "Atalla hardware engine support", | ||
| 153 | &atalla_rsa, | ||
| 154 | &atalla_dsa, | ||
| 155 | &atalla_dh, | ||
| 156 | NULL, | ||
| 157 | atalla_mod_exp, | ||
| 158 | NULL, | ||
| 159 | atalla_init, | ||
| 160 | atalla_finish, | ||
| 161 | NULL, /* no ctrl() */ | ||
| 162 | NULL, /* no load_privkey() */ | ||
| 163 | NULL, /* no load_pubkey() */ | ||
| 164 | 0, /* no flags */ | ||
| 165 | 0, 0, /* no references */ | ||
| 166 | NULL, NULL /* unlinked */ | ||
| 167 | }; | ||
| 168 | |||
| 169 | /* As this is only ever called once, there's no need for locking | ||
| 170 | * (indeed - the lock will already be held by our caller!!!) */ | ||
| 171 | ENGINE *ENGINE_atalla() | ||
| 172 | { | ||
| 173 | RSA_METHOD *meth1; | ||
| 174 | DSA_METHOD *meth2; | ||
| 175 | DH_METHOD *meth3; | ||
| 176 | |||
| 177 | /* We know that the "PKCS1_SSLeay()" functions hook properly | ||
| 178 | * to the atalla-specific mod_exp and mod_exp_crt so we use | ||
| 179 | * those functions. NB: We don't use ENGINE_openssl() or | ||
| 180 | * anything "more generic" because something like the RSAref | ||
| 181 | * code may not hook properly, and if you own one of these | ||
| 182 | * cards then you have the right to do RSA operations on it | ||
| 183 | * anyway! */ | ||
| 184 | meth1 = RSA_PKCS1_SSLeay(); | ||
| 185 | atalla_rsa.rsa_pub_enc = meth1->rsa_pub_enc; | ||
| 186 | atalla_rsa.rsa_pub_dec = meth1->rsa_pub_dec; | ||
| 187 | atalla_rsa.rsa_priv_enc = meth1->rsa_priv_enc; | ||
| 188 | atalla_rsa.rsa_priv_dec = meth1->rsa_priv_dec; | ||
| 189 | |||
| 190 | /* Use the DSA_OpenSSL() method and just hook the mod_exp-ish | ||
| 191 | * bits. */ | ||
| 192 | meth2 = DSA_OpenSSL(); | ||
| 193 | atalla_dsa.dsa_do_sign = meth2->dsa_do_sign; | ||
| 194 | atalla_dsa.dsa_sign_setup = meth2->dsa_sign_setup; | ||
| 195 | atalla_dsa.dsa_do_verify = meth2->dsa_do_verify; | ||
| 196 | |||
| 197 | /* Much the same for Diffie-Hellman */ | ||
| 198 | meth3 = DH_OpenSSL(); | ||
| 199 | atalla_dh.generate_key = meth3->generate_key; | ||
| 200 | atalla_dh.compute_key = meth3->compute_key; | ||
| 201 | return &engine_atalla; | ||
| 202 | } | ||
| 203 | |||
| 204 | /* This is a process-global DSO handle used for loading and unloading | ||
| 205 | * the Atalla library. NB: This is only set (or unset) during an | ||
| 206 | * init() or finish() call (reference counts permitting) and they're | ||
| 207 | * operating with global locks, so this should be thread-safe | ||
| 208 | * implicitly. */ | ||
| 209 | static DSO *atalla_dso = NULL; | ||
| 210 | |||
| 211 | /* These are the function pointers that are (un)set when the library has | ||
| 212 | * successfully (un)loaded. */ | ||
| 213 | static tfnASI_GetHardwareConfig *p_Atalla_GetHardwareConfig = NULL; | ||
| 214 | static tfnASI_RSAPrivateKeyOpFn *p_Atalla_RSAPrivateKeyOpFn = NULL; | ||
| 215 | static tfnASI_GetPerformanceStatistics *p_Atalla_GetPerformanceStatistics = NULL; | ||
| 216 | |||
| 217 | /* (de)initialisation functions. */ | ||
| 218 | static int atalla_init() | ||
| 219 | { | ||
| 220 | tfnASI_GetHardwareConfig *p1; | ||
| 221 | tfnASI_RSAPrivateKeyOpFn *p2; | ||
| 222 | tfnASI_GetPerformanceStatistics *p3; | ||
| 223 | /* Not sure of the origin of this magic value, but Ben's code had it | ||
| 224 | * and it seemed to have been working for a few people. :-) */ | ||
| 225 | unsigned int config_buf[1024]; | ||
| 226 | |||
| 227 | if(atalla_dso != NULL) | ||
| 228 | { | ||
| 229 | ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_ALREADY_LOADED); | ||
| 230 | goto err; | ||
| 231 | } | ||
| 232 | /* Attempt to load libatasi.so/atasi.dll/whatever. Needs to be | ||
| 233 | * changed unfortunately because the Atalla drivers don't have | ||
| 234 | * standard library names that can be platform-translated well. */ | ||
| 235 | /* TODO: Work out how to actually map to the names the Atalla | ||
| 236 | * drivers really use - for now a symbollic link needs to be | ||
| 237 | * created on the host system from libatasi.so to atasi.so on | ||
| 238 | * unix variants. */ | ||
| 239 | atalla_dso = DSO_load(NULL, ATALLA_LIBNAME, NULL, | ||
| 240 | DSO_FLAG_NAME_TRANSLATION); | ||
| 241 | if(atalla_dso == NULL) | ||
| 242 | { | ||
| 243 | ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_DSO_FAILURE); | ||
| 244 | goto err; | ||
| 245 | } | ||
| 246 | if(!(p1 = (tfnASI_GetHardwareConfig *)DSO_bind_func( | ||
| 247 | atalla_dso, ATALLA_F1)) || | ||
| 248 | !(p2 = (tfnASI_RSAPrivateKeyOpFn *)DSO_bind_func( | ||
| 249 | atalla_dso, ATALLA_F2)) || | ||
| 250 | !(p3 = (tfnASI_GetPerformanceStatistics *)DSO_bind_func( | ||
| 251 | atalla_dso, ATALLA_F3))) | ||
| 252 | { | ||
| 253 | ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_DSO_FAILURE); | ||
| 254 | goto err; | ||
| 255 | } | ||
| 256 | /* Copy the pointers */ | ||
| 257 | p_Atalla_GetHardwareConfig = p1; | ||
| 258 | p_Atalla_RSAPrivateKeyOpFn = p2; | ||
| 259 | p_Atalla_GetPerformanceStatistics = p3; | ||
| 260 | /* Perform a basic test to see if there's actually any unit | ||
| 261 | * running. */ | ||
| 262 | if(p1(0L, config_buf) != 0) | ||
| 263 | { | ||
| 264 | ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_UNIT_FAILURE); | ||
| 265 | goto err; | ||
| 266 | } | ||
| 267 | /* Everything's fine. */ | ||
| 268 | return 1; | ||
| 269 | err: | ||
| 270 | if(atalla_dso) | ||
| 271 | DSO_free(atalla_dso); | ||
| 272 | p_Atalla_GetHardwareConfig = NULL; | ||
| 273 | p_Atalla_RSAPrivateKeyOpFn = NULL; | ||
| 274 | p_Atalla_GetPerformanceStatistics = NULL; | ||
| 275 | return 0; | ||
| 276 | } | ||
| 277 | |||
| 278 | static int atalla_finish() | ||
| 279 | { | ||
| 280 | if(atalla_dso == NULL) | ||
| 281 | { | ||
| 282 | ENGINEerr(ENGINE_F_ATALLA_FINISH,ENGINE_R_NOT_LOADED); | ||
| 283 | return 0; | ||
| 284 | } | ||
| 285 | if(!DSO_free(atalla_dso)) | ||
| 286 | { | ||
| 287 | ENGINEerr(ENGINE_F_ATALLA_FINISH,ENGINE_R_DSO_FAILURE); | ||
| 288 | return 0; | ||
| 289 | } | ||
| 290 | atalla_dso = NULL; | ||
| 291 | p_Atalla_GetHardwareConfig = NULL; | ||
| 292 | p_Atalla_RSAPrivateKeyOpFn = NULL; | ||
| 293 | p_Atalla_GetPerformanceStatistics = NULL; | ||
| 294 | return 1; | ||
| 295 | } | ||
| 296 | |||
| 297 | static int atalla_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 298 | const BIGNUM *m, BN_CTX *ctx) | ||
| 299 | { | ||
| 300 | /* I need somewhere to store temporary serialised values for | ||
| 301 | * use with the Atalla API calls. A neat cheat - I'll use | ||
| 302 | * BIGNUMs from the BN_CTX but access their arrays directly as | ||
| 303 | * byte arrays <grin>. This way I don't have to clean anything | ||
| 304 | * up. */ | ||
| 305 | BIGNUM *modulus; | ||
| 306 | BIGNUM *exponent; | ||
| 307 | BIGNUM *argument; | ||
| 308 | BIGNUM *result; | ||
| 309 | RSAPrivateKey keydata; | ||
| 310 | int to_return, numbytes; | ||
| 311 | |||
| 312 | modulus = exponent = argument = result = NULL; | ||
| 313 | to_return = 0; /* expect failure */ | ||
| 314 | |||
| 315 | if(!atalla_dso) | ||
| 316 | { | ||
| 317 | ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_NOT_LOADED); | ||
| 318 | goto err; | ||
| 319 | } | ||
| 320 | /* Prepare the params */ | ||
| 321 | modulus = BN_CTX_get(ctx); | ||
| 322 | exponent = BN_CTX_get(ctx); | ||
| 323 | argument = BN_CTX_get(ctx); | ||
| 324 | result = BN_CTX_get(ctx); | ||
| 325 | if(!modulus || !exponent || !argument || !result) | ||
| 326 | { | ||
| 327 | ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_BN_CTX_FULL); | ||
| 328 | goto err; | ||
| 329 | } | ||
| 330 | if(!bn_wexpand(modulus, m->top) || !bn_wexpand(exponent, m->top) || | ||
| 331 | !bn_wexpand(argument, m->top) || !bn_wexpand(result, m->top)) | ||
| 332 | { | ||
| 333 | ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_BN_EXPAND_FAIL); | ||
| 334 | goto err; | ||
| 335 | } | ||
| 336 | /* Prepare the key-data */ | ||
| 337 | memset(&keydata, 0,sizeof keydata); | ||
| 338 | numbytes = BN_num_bytes(m); | ||
| 339 | memset(exponent->d, 0, numbytes); | ||
| 340 | memset(modulus->d, 0, numbytes); | ||
| 341 | BN_bn2bin(p, (unsigned char *)exponent->d + numbytes - BN_num_bytes(p)); | ||
| 342 | BN_bn2bin(m, (unsigned char *)modulus->d + numbytes - BN_num_bytes(m)); | ||
| 343 | keydata.privateExponent.data = (unsigned char *)exponent->d; | ||
| 344 | keydata.privateExponent.len = numbytes; | ||
| 345 | keydata.modulus.data = (unsigned char *)modulus->d; | ||
| 346 | keydata.modulus.len = numbytes; | ||
| 347 | /* Prepare the argument */ | ||
| 348 | memset(argument->d, 0, numbytes); | ||
| 349 | memset(result->d, 0, numbytes); | ||
| 350 | BN_bn2bin(a, (unsigned char *)argument->d + numbytes - BN_num_bytes(a)); | ||
| 351 | /* Perform the operation */ | ||
| 352 | if(p_Atalla_RSAPrivateKeyOpFn(&keydata, (unsigned char *)result->d, | ||
| 353 | (unsigned char *)argument->d, | ||
| 354 | keydata.modulus.len) != 0) | ||
| 355 | { | ||
| 356 | ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_REQUEST_FAILED); | ||
| 357 | goto err; | ||
| 358 | } | ||
| 359 | /* Convert the response */ | ||
| 360 | BN_bin2bn((unsigned char *)result->d, numbytes, r); | ||
| 361 | to_return = 1; | ||
| 362 | err: | ||
| 363 | if(modulus) ctx->tos--; | ||
| 364 | if(exponent) ctx->tos--; | ||
| 365 | if(argument) ctx->tos--; | ||
| 366 | if(result) ctx->tos--; | ||
| 367 | return to_return; | ||
| 368 | } | ||
| 369 | |||
| 370 | static int atalla_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | ||
| 371 | { | ||
| 372 | BN_CTX *ctx = NULL; | ||
| 373 | int to_return = 0; | ||
| 374 | |||
| 375 | if(!atalla_dso) | ||
| 376 | { | ||
| 377 | ENGINEerr(ENGINE_F_ATALLA_RSA_MOD_EXP,ENGINE_R_NOT_LOADED); | ||
| 378 | goto err; | ||
| 379 | } | ||
| 380 | if((ctx = BN_CTX_new()) == NULL) | ||
| 381 | goto err; | ||
| 382 | if(!rsa->d || !rsa->n) | ||
| 383 | { | ||
| 384 | ENGINEerr(ENGINE_F_ATALLA_RSA_MOD_EXP,ENGINE_R_MISSING_KEY_COMPONENTS); | ||
| 385 | goto err; | ||
| 386 | } | ||
| 387 | to_return = atalla_mod_exp(r0, I, rsa->d, rsa->n, ctx); | ||
| 388 | err: | ||
| 389 | if(ctx) | ||
| 390 | BN_CTX_free(ctx); | ||
| 391 | return to_return; | ||
| 392 | } | ||
| 393 | |||
| 394 | /* This code was liberated and adapted from the commented-out code in | ||
| 395 | * dsa_ossl.c. Because of the unoptimised form of the Atalla acceleration | ||
| 396 | * (it doesn't have a CRT form for RSA), this function means that an | ||
| 397 | * Atalla system running with a DSA server certificate can handshake | ||
| 398 | * around 5 or 6 times faster/more than an equivalent system running with | ||
| 399 | * RSA. Just check out the "signs" statistics from the RSA and DSA parts | ||
| 400 | * of "openssl speed -engine atalla dsa1024 rsa1024". */ | ||
| 401 | static int atalla_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, | ||
| 402 | BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, | ||
| 403 | BN_CTX *ctx, BN_MONT_CTX *in_mont) | ||
| 404 | { | ||
| 405 | BIGNUM t; | ||
| 406 | int to_return = 0; | ||
| 407 | |||
| 408 | BN_init(&t); | ||
| 409 | /* let rr = a1 ^ p1 mod m */ | ||
| 410 | if (!atalla_mod_exp(rr,a1,p1,m,ctx)) goto end; | ||
| 411 | /* let t = a2 ^ p2 mod m */ | ||
| 412 | if (!atalla_mod_exp(&t,a2,p2,m,ctx)) goto end; | ||
| 413 | /* let rr = rr * t mod m */ | ||
| 414 | if (!BN_mod_mul(rr,rr,&t,m,ctx)) goto end; | ||
| 415 | to_return = 1; | ||
| 416 | end: | ||
| 417 | BN_free(&t); | ||
| 418 | return to_return; | ||
| 419 | } | ||
| 420 | |||
| 421 | |||
| 422 | static int atalla_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, | ||
| 423 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | ||
| 424 | BN_MONT_CTX *m_ctx) | ||
| 425 | { | ||
| 426 | return atalla_mod_exp(r, a, p, m, ctx); | ||
| 427 | } | ||
| 428 | |||
| 429 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | ||
| 430 | static int atalla_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 431 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | ||
| 432 | { | ||
| 433 | return atalla_mod_exp(r, a, p, m, ctx); | ||
| 434 | } | ||
| 435 | |||
| 436 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ | ||
| 437 | static int atalla_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 438 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | ||
| 439 | { | ||
| 440 | return atalla_mod_exp(r, a, p, m, ctx); | ||
| 441 | } | ||
| 442 | |||
| 443 | #endif /* !NO_HW_ATALLA */ | ||
| 444 | #endif /* !NO_HW */ | ||
diff --git a/src/lib/libssl/src/crypto/engine/hw_cswift.c b/src/lib/libssl/src/crypto/engine/hw_cswift.c new file mode 100644 index 0000000000..77608b8983 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/hw_cswift.c | |||
| @@ -0,0 +1,807 @@ | |||
| 1 | /* crypto/engine/hw_cswift.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <openssl/crypto.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/dso.h> | ||
| 63 | #include "engine_int.h" | ||
| 64 | #include <openssl/engine.h> | ||
| 65 | |||
| 66 | #ifndef NO_HW | ||
| 67 | #ifndef NO_HW_CSWIFT | ||
| 68 | |||
| 69 | /* Attribution notice: Rainbow have generously allowed me to reproduce | ||
| 70 | * the necessary definitions here from their API. This means the support | ||
| 71 | * can build independently of whether application builders have the | ||
| 72 | * API or hardware. This will allow developers to easily produce software | ||
| 73 | * that has latent hardware support for any users that have accelerators | ||
| 74 | * installed, without the developers themselves needing anything extra. | ||
| 75 | * | ||
| 76 | * I have only clipped the parts from the CryptoSwift header files that | ||
| 77 | * are (or seem) relevant to the CryptoSwift support code. This is | ||
| 78 | * simply to keep the file sizes reasonable. | ||
| 79 | * [Geoff] | ||
| 80 | */ | ||
| 81 | #ifdef FLAT_INC | ||
| 82 | #include "cswift.h" | ||
| 83 | #else | ||
| 84 | #include "vendor_defns/cswift.h" | ||
| 85 | #endif | ||
| 86 | |||
| 87 | static int cswift_init(void); | ||
| 88 | static int cswift_finish(void); | ||
| 89 | |||
| 90 | /* BIGNUM stuff */ | ||
| 91 | static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 92 | const BIGNUM *m, BN_CTX *ctx); | ||
| 93 | static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 94 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | ||
| 95 | const BIGNUM *iqmp, BN_CTX *ctx); | ||
| 96 | |||
| 97 | /* RSA stuff */ | ||
| 98 | static int cswift_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa); | ||
| 99 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | ||
| 100 | static int cswift_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 101 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 102 | |||
| 103 | /* DSA stuff */ | ||
| 104 | static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa); | ||
| 105 | static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, | ||
| 106 | DSA_SIG *sig, DSA *dsa); | ||
| 107 | |||
| 108 | /* DH stuff */ | ||
| 109 | /* This function is alised to mod_exp (with the DH and mont dropped). */ | ||
| 110 | static int cswift_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 111 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 112 | |||
| 113 | |||
| 114 | /* Our internal RSA_METHOD that we provide pointers to */ | ||
| 115 | static RSA_METHOD cswift_rsa = | ||
| 116 | { | ||
| 117 | "CryptoSwift RSA method", | ||
| 118 | NULL, | ||
| 119 | NULL, | ||
| 120 | NULL, | ||
| 121 | NULL, | ||
| 122 | cswift_rsa_mod_exp, | ||
| 123 | cswift_mod_exp_mont, | ||
| 124 | NULL, | ||
| 125 | NULL, | ||
| 126 | 0, | ||
| 127 | NULL, | ||
| 128 | NULL, | ||
| 129 | NULL | ||
| 130 | }; | ||
| 131 | |||
| 132 | /* Our internal DSA_METHOD that we provide pointers to */ | ||
| 133 | static DSA_METHOD cswift_dsa = | ||
| 134 | { | ||
| 135 | "CryptoSwift DSA method", | ||
| 136 | cswift_dsa_sign, | ||
| 137 | NULL, /* dsa_sign_setup */ | ||
| 138 | cswift_dsa_verify, | ||
| 139 | NULL, /* dsa_mod_exp */ | ||
| 140 | NULL, /* bn_mod_exp */ | ||
| 141 | NULL, /* init */ | ||
| 142 | NULL, /* finish */ | ||
| 143 | 0, /* flags */ | ||
| 144 | NULL /* app_data */ | ||
| 145 | }; | ||
| 146 | |||
| 147 | /* Our internal DH_METHOD that we provide pointers to */ | ||
| 148 | static DH_METHOD cswift_dh = | ||
| 149 | { | ||
| 150 | "CryptoSwift DH method", | ||
| 151 | NULL, | ||
| 152 | NULL, | ||
| 153 | cswift_mod_exp_dh, | ||
| 154 | NULL, | ||
| 155 | NULL, | ||
| 156 | 0, | ||
| 157 | NULL | ||
| 158 | }; | ||
| 159 | |||
| 160 | /* Our ENGINE structure. */ | ||
| 161 | static ENGINE engine_cswift = | ||
| 162 | { | ||
| 163 | "cswift", | ||
| 164 | "CryptoSwift hardware engine support", | ||
| 165 | &cswift_rsa, | ||
| 166 | &cswift_dsa, | ||
| 167 | &cswift_dh, | ||
| 168 | NULL, | ||
| 169 | cswift_mod_exp, | ||
| 170 | cswift_mod_exp_crt, | ||
| 171 | cswift_init, | ||
| 172 | cswift_finish, | ||
| 173 | NULL, /* no ctrl() */ | ||
| 174 | NULL, /* no load_privkey() */ | ||
| 175 | NULL, /* no load_pubkey() */ | ||
| 176 | 0, /* no flags */ | ||
| 177 | 0, 0, /* no references */ | ||
| 178 | NULL, NULL /* unlinked */ | ||
| 179 | }; | ||
| 180 | |||
| 181 | /* As this is only ever called once, there's no need for locking | ||
| 182 | * (indeed - the lock will already be held by our caller!!!) */ | ||
| 183 | ENGINE *ENGINE_cswift() | ||
| 184 | { | ||
| 185 | RSA_METHOD *meth1; | ||
| 186 | DH_METHOD *meth2; | ||
| 187 | |||
| 188 | /* We know that the "PKCS1_SSLeay()" functions hook properly | ||
| 189 | * to the cswift-specific mod_exp and mod_exp_crt so we use | ||
| 190 | * those functions. NB: We don't use ENGINE_openssl() or | ||
| 191 | * anything "more generic" because something like the RSAref | ||
| 192 | * code may not hook properly, and if you own one of these | ||
| 193 | * cards then you have the right to do RSA operations on it | ||
| 194 | * anyway! */ | ||
| 195 | meth1 = RSA_PKCS1_SSLeay(); | ||
| 196 | cswift_rsa.rsa_pub_enc = meth1->rsa_pub_enc; | ||
| 197 | cswift_rsa.rsa_pub_dec = meth1->rsa_pub_dec; | ||
| 198 | cswift_rsa.rsa_priv_enc = meth1->rsa_priv_enc; | ||
| 199 | cswift_rsa.rsa_priv_dec = meth1->rsa_priv_dec; | ||
| 200 | |||
| 201 | /* Much the same for Diffie-Hellman */ | ||
| 202 | meth2 = DH_OpenSSL(); | ||
| 203 | cswift_dh.generate_key = meth2->generate_key; | ||
| 204 | cswift_dh.compute_key = meth2->compute_key; | ||
| 205 | return &engine_cswift; | ||
| 206 | } | ||
| 207 | |||
| 208 | /* This is a process-global DSO handle used for loading and unloading | ||
| 209 | * the CryptoSwift library. NB: This is only set (or unset) during an | ||
| 210 | * init() or finish() call (reference counts permitting) and they're | ||
| 211 | * operating with global locks, so this should be thread-safe | ||
| 212 | * implicitly. */ | ||
| 213 | static DSO *cswift_dso = NULL; | ||
| 214 | |||
| 215 | /* These are the function pointers that are (un)set when the library has | ||
| 216 | * successfully (un)loaded. */ | ||
| 217 | t_swAcquireAccContext *p_CSwift_AcquireAccContext = NULL; | ||
| 218 | t_swAttachKeyParam *p_CSwift_AttachKeyParam = NULL; | ||
| 219 | t_swSimpleRequest *p_CSwift_SimpleRequest = NULL; | ||
| 220 | t_swReleaseAccContext *p_CSwift_ReleaseAccContext = NULL; | ||
| 221 | |||
| 222 | /* Used in the DSO operations. */ | ||
| 223 | static const char *CSWIFT_LIBNAME = "swift"; | ||
| 224 | static const char *CSWIFT_F1 = "swAcquireAccContext"; | ||
| 225 | static const char *CSWIFT_F2 = "swAttachKeyParam"; | ||
| 226 | static const char *CSWIFT_F3 = "swSimpleRequest"; | ||
| 227 | static const char *CSWIFT_F4 = "swReleaseAccContext"; | ||
| 228 | |||
| 229 | |||
| 230 | /* CryptoSwift library functions and mechanics - these are used by the | ||
| 231 | * higher-level functions further down. NB: As and where there's no | ||
| 232 | * error checking, take a look lower down where these functions are | ||
| 233 | * called, the checking and error handling is probably down there. */ | ||
| 234 | |||
| 235 | /* utility function to obtain a context */ | ||
| 236 | static int get_context(SW_CONTEXT_HANDLE *hac) | ||
| 237 | { | ||
| 238 | SW_STATUS status; | ||
| 239 | |||
| 240 | status = p_CSwift_AcquireAccContext(hac); | ||
| 241 | if(status != SW_OK) | ||
| 242 | return 0; | ||
| 243 | return 1; | ||
| 244 | } | ||
| 245 | |||
| 246 | /* similarly to release one. */ | ||
| 247 | static void release_context(SW_CONTEXT_HANDLE hac) | ||
| 248 | { | ||
| 249 | p_CSwift_ReleaseAccContext(hac); | ||
| 250 | } | ||
| 251 | |||
| 252 | /* (de)initialisation functions. */ | ||
| 253 | static int cswift_init() | ||
| 254 | { | ||
| 255 | SW_CONTEXT_HANDLE hac; | ||
| 256 | t_swAcquireAccContext *p1; | ||
| 257 | t_swAttachKeyParam *p2; | ||
| 258 | t_swSimpleRequest *p3; | ||
| 259 | t_swReleaseAccContext *p4; | ||
| 260 | |||
| 261 | if(cswift_dso != NULL) | ||
| 262 | { | ||
| 263 | ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_ALREADY_LOADED); | ||
| 264 | goto err; | ||
| 265 | } | ||
| 266 | /* Attempt to load libswift.so/swift.dll/whatever. */ | ||
| 267 | cswift_dso = DSO_load(NULL, CSWIFT_LIBNAME, NULL, | ||
| 268 | DSO_FLAG_NAME_TRANSLATION); | ||
| 269 | if(cswift_dso == NULL) | ||
| 270 | { | ||
| 271 | ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_DSO_FAILURE); | ||
| 272 | goto err; | ||
| 273 | } | ||
| 274 | if(!(p1 = (t_swAcquireAccContext *) | ||
| 275 | DSO_bind_func(cswift_dso, CSWIFT_F1)) || | ||
| 276 | !(p2 = (t_swAttachKeyParam *) | ||
| 277 | DSO_bind_func(cswift_dso, CSWIFT_F2)) || | ||
| 278 | !(p3 = (t_swSimpleRequest *) | ||
| 279 | DSO_bind_func(cswift_dso, CSWIFT_F3)) || | ||
| 280 | !(p4 = (t_swReleaseAccContext *) | ||
| 281 | DSO_bind_func(cswift_dso, CSWIFT_F4))) | ||
| 282 | { | ||
| 283 | ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_DSO_FAILURE); | ||
| 284 | goto err; | ||
| 285 | } | ||
| 286 | /* Copy the pointers */ | ||
| 287 | p_CSwift_AcquireAccContext = p1; | ||
| 288 | p_CSwift_AttachKeyParam = p2; | ||
| 289 | p_CSwift_SimpleRequest = p3; | ||
| 290 | p_CSwift_ReleaseAccContext = p4; | ||
| 291 | /* Try and get a context - if not, we may have a DSO but no | ||
| 292 | * accelerator! */ | ||
| 293 | if(!get_context(&hac)) | ||
| 294 | { | ||
| 295 | ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_UNIT_FAILURE); | ||
| 296 | goto err; | ||
| 297 | } | ||
| 298 | release_context(hac); | ||
| 299 | /* Everything's fine. */ | ||
| 300 | return 1; | ||
| 301 | err: | ||
| 302 | if(cswift_dso) | ||
| 303 | DSO_free(cswift_dso); | ||
| 304 | p_CSwift_AcquireAccContext = NULL; | ||
| 305 | p_CSwift_AttachKeyParam = NULL; | ||
| 306 | p_CSwift_SimpleRequest = NULL; | ||
| 307 | p_CSwift_ReleaseAccContext = NULL; | ||
| 308 | return 0; | ||
| 309 | } | ||
| 310 | |||
| 311 | static int cswift_finish() | ||
| 312 | { | ||
| 313 | if(cswift_dso == NULL) | ||
| 314 | { | ||
| 315 | ENGINEerr(ENGINE_F_CSWIFT_FINISH,ENGINE_R_NOT_LOADED); | ||
| 316 | return 0; | ||
| 317 | } | ||
| 318 | if(!DSO_free(cswift_dso)) | ||
| 319 | { | ||
| 320 | ENGINEerr(ENGINE_F_CSWIFT_FINISH,ENGINE_R_DSO_FAILURE); | ||
| 321 | return 0; | ||
| 322 | } | ||
| 323 | cswift_dso = NULL; | ||
| 324 | p_CSwift_AcquireAccContext = NULL; | ||
| 325 | p_CSwift_AttachKeyParam = NULL; | ||
| 326 | p_CSwift_SimpleRequest = NULL; | ||
| 327 | p_CSwift_ReleaseAccContext = NULL; | ||
| 328 | return 1; | ||
| 329 | } | ||
| 330 | |||
| 331 | /* Un petit mod_exp */ | ||
| 332 | static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 333 | const BIGNUM *m, BN_CTX *ctx) | ||
| 334 | { | ||
| 335 | /* I need somewhere to store temporary serialised values for | ||
| 336 | * use with the CryptoSwift API calls. A neat cheat - I'll use | ||
| 337 | * BIGNUMs from the BN_CTX but access their arrays directly as | ||
| 338 | * byte arrays <grin>. This way I don't have to clean anything | ||
| 339 | * up. */ | ||
| 340 | BIGNUM *modulus; | ||
| 341 | BIGNUM *exponent; | ||
| 342 | BIGNUM *argument; | ||
| 343 | BIGNUM *result; | ||
| 344 | SW_STATUS sw_status; | ||
| 345 | SW_LARGENUMBER arg, res; | ||
| 346 | SW_PARAM sw_param; | ||
| 347 | SW_CONTEXT_HANDLE hac; | ||
| 348 | int to_return, acquired; | ||
| 349 | |||
| 350 | modulus = exponent = argument = result = NULL; | ||
| 351 | to_return = 0; /* expect failure */ | ||
| 352 | acquired = 0; | ||
| 353 | |||
| 354 | if(!get_context(&hac)) | ||
| 355 | { | ||
| 356 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_GET_HANDLE_FAILED); | ||
| 357 | goto err; | ||
| 358 | } | ||
| 359 | acquired = 1; | ||
| 360 | /* Prepare the params */ | ||
| 361 | modulus = BN_CTX_get(ctx); | ||
| 362 | exponent = BN_CTX_get(ctx); | ||
| 363 | argument = BN_CTX_get(ctx); | ||
| 364 | result = BN_CTX_get(ctx); | ||
| 365 | if(!modulus || !exponent || !argument || !result) | ||
| 366 | { | ||
| 367 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_BN_CTX_FULL); | ||
| 368 | goto err; | ||
| 369 | } | ||
| 370 | if(!bn_wexpand(modulus, m->top) || !bn_wexpand(exponent, p->top) || | ||
| 371 | !bn_wexpand(argument, a->top) || !bn_wexpand(result, m->top)) | ||
| 372 | { | ||
| 373 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_BN_EXPAND_FAIL); | ||
| 374 | goto err; | ||
| 375 | } | ||
| 376 | sw_param.type = SW_ALG_EXP; | ||
| 377 | sw_param.up.exp.modulus.nbytes = BN_bn2bin(m, | ||
| 378 | (unsigned char *)modulus->d); | ||
| 379 | sw_param.up.exp.modulus.value = (unsigned char *)modulus->d; | ||
| 380 | sw_param.up.exp.exponent.nbytes = BN_bn2bin(p, | ||
| 381 | (unsigned char *)exponent->d); | ||
| 382 | sw_param.up.exp.exponent.value = (unsigned char *)exponent->d; | ||
| 383 | /* Attach the key params */ | ||
| 384 | sw_status = p_CSwift_AttachKeyParam(hac, &sw_param); | ||
| 385 | switch(sw_status) | ||
| 386 | { | ||
| 387 | case SW_OK: | ||
| 388 | break; | ||
| 389 | case SW_ERR_INPUT_SIZE: | ||
| 390 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP, | ||
| 391 | ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL); | ||
| 392 | goto err; | ||
| 393 | default: | ||
| 394 | { | ||
| 395 | char tmpbuf[20]; | ||
| 396 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_REQUEST_FAILED); | ||
| 397 | sprintf(tmpbuf, "%ld", sw_status); | ||
| 398 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | ||
| 399 | } | ||
| 400 | goto err; | ||
| 401 | } | ||
| 402 | /* Prepare the argument and response */ | ||
| 403 | arg.nbytes = BN_bn2bin(a, (unsigned char *)argument->d); | ||
| 404 | arg.value = (unsigned char *)argument->d; | ||
| 405 | res.nbytes = BN_num_bytes(m); | ||
| 406 | memset(result->d, 0, res.nbytes); | ||
| 407 | res.value = (unsigned char *)result->d; | ||
| 408 | /* Perform the operation */ | ||
| 409 | if((sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_MODEXP, &arg, 1, | ||
| 410 | &res, 1)) != SW_OK) | ||
| 411 | { | ||
| 412 | char tmpbuf[20]; | ||
| 413 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_REQUEST_FAILED); | ||
| 414 | sprintf(tmpbuf, "%ld", sw_status); | ||
| 415 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | ||
| 416 | goto err; | ||
| 417 | } | ||
| 418 | /* Convert the response */ | ||
| 419 | BN_bin2bn((unsigned char *)result->d, res.nbytes, r); | ||
| 420 | to_return = 1; | ||
| 421 | err: | ||
| 422 | if(acquired) | ||
| 423 | release_context(hac); | ||
| 424 | if(modulus) ctx->tos--; | ||
| 425 | if(exponent) ctx->tos--; | ||
| 426 | if(argument) ctx->tos--; | ||
| 427 | if(result) ctx->tos--; | ||
| 428 | return to_return; | ||
| 429 | } | ||
| 430 | |||
| 431 | /* Un petit mod_exp chinois */ | ||
| 432 | static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 433 | const BIGNUM *q, const BIGNUM *dmp1, | ||
| 434 | const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx) | ||
| 435 | { | ||
| 436 | SW_STATUS sw_status; | ||
| 437 | SW_LARGENUMBER arg, res; | ||
| 438 | SW_PARAM sw_param; | ||
| 439 | SW_CONTEXT_HANDLE hac; | ||
| 440 | BIGNUM *rsa_p = NULL; | ||
| 441 | BIGNUM *rsa_q = NULL; | ||
| 442 | BIGNUM *rsa_dmp1 = NULL; | ||
| 443 | BIGNUM *rsa_dmq1 = NULL; | ||
| 444 | BIGNUM *rsa_iqmp = NULL; | ||
| 445 | BIGNUM *argument = NULL; | ||
| 446 | BIGNUM *result = NULL; | ||
| 447 | int to_return = 0; /* expect failure */ | ||
| 448 | int acquired = 0; | ||
| 449 | |||
| 450 | if(!get_context(&hac)) | ||
| 451 | { | ||
| 452 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_GET_HANDLE_FAILED); | ||
| 453 | goto err; | ||
| 454 | } | ||
| 455 | acquired = 1; | ||
| 456 | /* Prepare the params */ | ||
| 457 | rsa_p = BN_CTX_get(ctx); | ||
| 458 | rsa_q = BN_CTX_get(ctx); | ||
| 459 | rsa_dmp1 = BN_CTX_get(ctx); | ||
| 460 | rsa_dmq1 = BN_CTX_get(ctx); | ||
| 461 | rsa_iqmp = BN_CTX_get(ctx); | ||
| 462 | argument = BN_CTX_get(ctx); | ||
| 463 | result = BN_CTX_get(ctx); | ||
| 464 | if(!rsa_p || !rsa_q || !rsa_dmp1 || !rsa_dmq1 || !rsa_iqmp || | ||
| 465 | !argument || !result) | ||
| 466 | { | ||
| 467 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_BN_CTX_FULL); | ||
| 468 | goto err; | ||
| 469 | } | ||
| 470 | if(!bn_wexpand(rsa_p, p->top) || !bn_wexpand(rsa_q, q->top) || | ||
| 471 | !bn_wexpand(rsa_dmp1, dmp1->top) || | ||
| 472 | !bn_wexpand(rsa_dmq1, dmq1->top) || | ||
| 473 | !bn_wexpand(rsa_iqmp, iqmp->top) || | ||
| 474 | !bn_wexpand(argument, a->top) || | ||
| 475 | !bn_wexpand(result, p->top + q->top)) | ||
| 476 | { | ||
| 477 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_BN_EXPAND_FAIL); | ||
| 478 | goto err; | ||
| 479 | } | ||
| 480 | sw_param.type = SW_ALG_CRT; | ||
| 481 | sw_param.up.crt.p.nbytes = BN_bn2bin(p, (unsigned char *)rsa_p->d); | ||
| 482 | sw_param.up.crt.p.value = (unsigned char *)rsa_p->d; | ||
| 483 | sw_param.up.crt.q.nbytes = BN_bn2bin(q, (unsigned char *)rsa_q->d); | ||
| 484 | sw_param.up.crt.q.value = (unsigned char *)rsa_q->d; | ||
| 485 | sw_param.up.crt.dmp1.nbytes = BN_bn2bin(dmp1, | ||
| 486 | (unsigned char *)rsa_dmp1->d); | ||
| 487 | sw_param.up.crt.dmp1.value = (unsigned char *)rsa_dmp1->d; | ||
| 488 | sw_param.up.crt.dmq1.nbytes = BN_bn2bin(dmq1, | ||
| 489 | (unsigned char *)rsa_dmq1->d); | ||
| 490 | sw_param.up.crt.dmq1.value = (unsigned char *)rsa_dmq1->d; | ||
| 491 | sw_param.up.crt.iqmp.nbytes = BN_bn2bin(iqmp, | ||
| 492 | (unsigned char *)rsa_iqmp->d); | ||
| 493 | sw_param.up.crt.iqmp.value = (unsigned char *)rsa_iqmp->d; | ||
| 494 | /* Attach the key params */ | ||
| 495 | sw_status = p_CSwift_AttachKeyParam(hac, &sw_param); | ||
| 496 | switch(sw_status) | ||
| 497 | { | ||
| 498 | case SW_OK: | ||
| 499 | break; | ||
| 500 | case SW_ERR_INPUT_SIZE: | ||
| 501 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT, | ||
| 502 | ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL); | ||
| 503 | goto err; | ||
| 504 | default: | ||
| 505 | { | ||
| 506 | char tmpbuf[20]; | ||
| 507 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_REQUEST_FAILED); | ||
| 508 | sprintf(tmpbuf, "%ld", sw_status); | ||
| 509 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | ||
| 510 | } | ||
| 511 | goto err; | ||
| 512 | } | ||
| 513 | /* Prepare the argument and response */ | ||
| 514 | arg.nbytes = BN_bn2bin(a, (unsigned char *)argument->d); | ||
| 515 | arg.value = (unsigned char *)argument->d; | ||
| 516 | res.nbytes = 2 * BN_num_bytes(p); | ||
| 517 | memset(result->d, 0, res.nbytes); | ||
| 518 | res.value = (unsigned char *)result->d; | ||
| 519 | /* Perform the operation */ | ||
| 520 | if((sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_MODEXP_CRT, &arg, 1, | ||
| 521 | &res, 1)) != SW_OK) | ||
| 522 | { | ||
| 523 | char tmpbuf[20]; | ||
| 524 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_REQUEST_FAILED); | ||
| 525 | sprintf(tmpbuf, "%ld", sw_status); | ||
| 526 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | ||
| 527 | goto err; | ||
| 528 | } | ||
| 529 | /* Convert the response */ | ||
| 530 | BN_bin2bn((unsigned char *)result->d, res.nbytes, r); | ||
| 531 | to_return = 1; | ||
| 532 | err: | ||
| 533 | if(acquired) | ||
| 534 | release_context(hac); | ||
| 535 | if(rsa_p) ctx->tos--; | ||
| 536 | if(rsa_q) ctx->tos--; | ||
| 537 | if(rsa_dmp1) ctx->tos--; | ||
| 538 | if(rsa_dmq1) ctx->tos--; | ||
| 539 | if(rsa_iqmp) ctx->tos--; | ||
| 540 | if(argument) ctx->tos--; | ||
| 541 | if(result) ctx->tos--; | ||
| 542 | return to_return; | ||
| 543 | } | ||
| 544 | |||
| 545 | static int cswift_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | ||
| 546 | { | ||
| 547 | BN_CTX *ctx; | ||
| 548 | int to_return = 0; | ||
| 549 | |||
| 550 | if((ctx = BN_CTX_new()) == NULL) | ||
| 551 | goto err; | ||
| 552 | if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) | ||
| 553 | { | ||
| 554 | ENGINEerr(ENGINE_F_CSWIFT_RSA_MOD_EXP,ENGINE_R_MISSING_KEY_COMPONENTS); | ||
| 555 | goto err; | ||
| 556 | } | ||
| 557 | to_return = cswift_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1, | ||
| 558 | rsa->dmq1, rsa->iqmp, ctx); | ||
| 559 | err: | ||
| 560 | if(ctx) | ||
| 561 | BN_CTX_free(ctx); | ||
| 562 | return to_return; | ||
| 563 | } | ||
| 564 | |||
| 565 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | ||
| 566 | static int cswift_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 567 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | ||
| 568 | { | ||
| 569 | return cswift_mod_exp(r, a, p, m, ctx); | ||
| 570 | } | ||
| 571 | |||
| 572 | static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) | ||
| 573 | { | ||
| 574 | SW_CONTEXT_HANDLE hac; | ||
| 575 | SW_PARAM sw_param; | ||
| 576 | SW_STATUS sw_status; | ||
| 577 | SW_LARGENUMBER arg, res; | ||
| 578 | unsigned char *ptr; | ||
| 579 | BN_CTX *ctx; | ||
| 580 | BIGNUM *dsa_p = NULL; | ||
| 581 | BIGNUM *dsa_q = NULL; | ||
| 582 | BIGNUM *dsa_g = NULL; | ||
| 583 | BIGNUM *dsa_key = NULL; | ||
| 584 | BIGNUM *result = NULL; | ||
| 585 | DSA_SIG *to_return = NULL; | ||
| 586 | int acquired = 0; | ||
| 587 | |||
| 588 | if((ctx = BN_CTX_new()) == NULL) | ||
| 589 | goto err; | ||
| 590 | if(!get_context(&hac)) | ||
| 591 | { | ||
| 592 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_GET_HANDLE_FAILED); | ||
| 593 | goto err; | ||
| 594 | } | ||
| 595 | acquired = 1; | ||
| 596 | /* Prepare the params */ | ||
| 597 | dsa_p = BN_CTX_get(ctx); | ||
| 598 | dsa_q = BN_CTX_get(ctx); | ||
| 599 | dsa_g = BN_CTX_get(ctx); | ||
| 600 | dsa_key = BN_CTX_get(ctx); | ||
| 601 | result = BN_CTX_get(ctx); | ||
| 602 | if(!dsa_p || !dsa_q || !dsa_g || !dsa_key || !result) | ||
| 603 | { | ||
| 604 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_BN_CTX_FULL); | ||
| 605 | goto err; | ||
| 606 | } | ||
| 607 | if(!bn_wexpand(dsa_p, dsa->p->top) || | ||
| 608 | !bn_wexpand(dsa_q, dsa->q->top) || | ||
| 609 | !bn_wexpand(dsa_g, dsa->g->top) || | ||
| 610 | !bn_wexpand(dsa_key, dsa->priv_key->top) || | ||
| 611 | !bn_wexpand(result, dsa->p->top)) | ||
| 612 | { | ||
| 613 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_BN_EXPAND_FAIL); | ||
| 614 | goto err; | ||
| 615 | } | ||
| 616 | sw_param.type = SW_ALG_DSA; | ||
| 617 | sw_param.up.dsa.p.nbytes = BN_bn2bin(dsa->p, | ||
| 618 | (unsigned char *)dsa_p->d); | ||
| 619 | sw_param.up.dsa.p.value = (unsigned char *)dsa_p->d; | ||
| 620 | sw_param.up.dsa.q.nbytes = BN_bn2bin(dsa->q, | ||
| 621 | (unsigned char *)dsa_q->d); | ||
| 622 | sw_param.up.dsa.q.value = (unsigned char *)dsa_q->d; | ||
| 623 | sw_param.up.dsa.g.nbytes = BN_bn2bin(dsa->g, | ||
| 624 | (unsigned char *)dsa_g->d); | ||
| 625 | sw_param.up.dsa.g.value = (unsigned char *)dsa_g->d; | ||
| 626 | sw_param.up.dsa.key.nbytes = BN_bn2bin(dsa->priv_key, | ||
| 627 | (unsigned char *)dsa_key->d); | ||
| 628 | sw_param.up.dsa.key.value = (unsigned char *)dsa_key->d; | ||
| 629 | /* Attach the key params */ | ||
| 630 | sw_status = p_CSwift_AttachKeyParam(hac, &sw_param); | ||
| 631 | switch(sw_status) | ||
| 632 | { | ||
| 633 | case SW_OK: | ||
| 634 | break; | ||
| 635 | case SW_ERR_INPUT_SIZE: | ||
| 636 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN, | ||
| 637 | ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL); | ||
| 638 | goto err; | ||
| 639 | default: | ||
| 640 | { | ||
| 641 | char tmpbuf[20]; | ||
| 642 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_REQUEST_FAILED); | ||
| 643 | sprintf(tmpbuf, "%ld", sw_status); | ||
| 644 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | ||
| 645 | } | ||
| 646 | goto err; | ||
| 647 | } | ||
| 648 | /* Prepare the argument and response */ | ||
| 649 | arg.nbytes = dlen; | ||
| 650 | arg.value = (unsigned char *)dgst; | ||
| 651 | res.nbytes = BN_num_bytes(dsa->p); | ||
| 652 | memset(result->d, 0, res.nbytes); | ||
| 653 | res.value = (unsigned char *)result->d; | ||
| 654 | /* Perform the operation */ | ||
| 655 | sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_DSS_SIGN, &arg, 1, | ||
| 656 | &res, 1); | ||
| 657 | if(sw_status != SW_OK) | ||
| 658 | { | ||
| 659 | char tmpbuf[20]; | ||
| 660 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_REQUEST_FAILED); | ||
| 661 | sprintf(tmpbuf, "%ld", sw_status); | ||
| 662 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | ||
| 663 | goto err; | ||
| 664 | } | ||
| 665 | /* Convert the response */ | ||
| 666 | ptr = (unsigned char *)result->d; | ||
| 667 | if((to_return = DSA_SIG_new()) == NULL) | ||
| 668 | goto err; | ||
| 669 | to_return->r = BN_bin2bn((unsigned char *)result->d, 20, NULL); | ||
| 670 | to_return->s = BN_bin2bn((unsigned char *)result->d + 20, 20, NULL); | ||
| 671 | |||
| 672 | err: | ||
| 673 | if(acquired) | ||
| 674 | release_context(hac); | ||
| 675 | if(dsa_p) ctx->tos--; | ||
| 676 | if(dsa_q) ctx->tos--; | ||
| 677 | if(dsa_g) ctx->tos--; | ||
| 678 | if(dsa_key) ctx->tos--; | ||
| 679 | if(result) ctx->tos--; | ||
| 680 | if(ctx) | ||
| 681 | BN_CTX_free(ctx); | ||
| 682 | return to_return; | ||
| 683 | } | ||
| 684 | |||
| 685 | static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, | ||
| 686 | DSA_SIG *sig, DSA *dsa) | ||
| 687 | { | ||
| 688 | SW_CONTEXT_HANDLE hac; | ||
| 689 | SW_PARAM sw_param; | ||
| 690 | SW_STATUS sw_status; | ||
| 691 | SW_LARGENUMBER arg[2], res; | ||
| 692 | unsigned long sig_result; | ||
| 693 | BN_CTX *ctx; | ||
| 694 | BIGNUM *dsa_p = NULL; | ||
| 695 | BIGNUM *dsa_q = NULL; | ||
| 696 | BIGNUM *dsa_g = NULL; | ||
| 697 | BIGNUM *dsa_key = NULL; | ||
| 698 | BIGNUM *argument = NULL; | ||
| 699 | int to_return = -1; | ||
| 700 | int acquired = 0; | ||
| 701 | |||
| 702 | if((ctx = BN_CTX_new()) == NULL) | ||
| 703 | goto err; | ||
| 704 | if(!get_context(&hac)) | ||
| 705 | { | ||
| 706 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_GET_HANDLE_FAILED); | ||
| 707 | goto err; | ||
| 708 | } | ||
| 709 | acquired = 1; | ||
| 710 | /* Prepare the params */ | ||
| 711 | dsa_p = BN_CTX_get(ctx); | ||
| 712 | dsa_q = BN_CTX_get(ctx); | ||
| 713 | dsa_g = BN_CTX_get(ctx); | ||
| 714 | dsa_key = BN_CTX_get(ctx); | ||
| 715 | argument = BN_CTX_get(ctx); | ||
| 716 | if(!dsa_p || !dsa_q || !dsa_g || !dsa_key || !argument) | ||
| 717 | { | ||
| 718 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_BN_CTX_FULL); | ||
| 719 | goto err; | ||
| 720 | } | ||
| 721 | if(!bn_wexpand(dsa_p, dsa->p->top) || | ||
| 722 | !bn_wexpand(dsa_q, dsa->q->top) || | ||
| 723 | !bn_wexpand(dsa_g, dsa->g->top) || | ||
| 724 | !bn_wexpand(dsa_key, dsa->pub_key->top) || | ||
| 725 | !bn_wexpand(argument, 40)) | ||
| 726 | { | ||
| 727 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_BN_EXPAND_FAIL); | ||
| 728 | goto err; | ||
| 729 | } | ||
| 730 | sw_param.type = SW_ALG_DSA; | ||
| 731 | sw_param.up.dsa.p.nbytes = BN_bn2bin(dsa->p, | ||
| 732 | (unsigned char *)dsa_p->d); | ||
| 733 | sw_param.up.dsa.p.value = (unsigned char *)dsa_p->d; | ||
| 734 | sw_param.up.dsa.q.nbytes = BN_bn2bin(dsa->q, | ||
| 735 | (unsigned char *)dsa_q->d); | ||
| 736 | sw_param.up.dsa.q.value = (unsigned char *)dsa_q->d; | ||
| 737 | sw_param.up.dsa.g.nbytes = BN_bn2bin(dsa->g, | ||
| 738 | (unsigned char *)dsa_g->d); | ||
| 739 | sw_param.up.dsa.g.value = (unsigned char *)dsa_g->d; | ||
| 740 | sw_param.up.dsa.key.nbytes = BN_bn2bin(dsa->pub_key, | ||
| 741 | (unsigned char *)dsa_key->d); | ||
| 742 | sw_param.up.dsa.key.value = (unsigned char *)dsa_key->d; | ||
| 743 | /* Attach the key params */ | ||
| 744 | sw_status = p_CSwift_AttachKeyParam(hac, &sw_param); | ||
| 745 | switch(sw_status) | ||
| 746 | { | ||
| 747 | case SW_OK: | ||
| 748 | break; | ||
| 749 | case SW_ERR_INPUT_SIZE: | ||
| 750 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY, | ||
| 751 | ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL); | ||
| 752 | goto err; | ||
| 753 | default: | ||
| 754 | { | ||
| 755 | char tmpbuf[20]; | ||
| 756 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_REQUEST_FAILED); | ||
| 757 | sprintf(tmpbuf, "%ld", sw_status); | ||
| 758 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | ||
| 759 | } | ||
| 760 | goto err; | ||
| 761 | } | ||
| 762 | /* Prepare the argument and response */ | ||
| 763 | arg[0].nbytes = dgst_len; | ||
| 764 | arg[0].value = (unsigned char *)dgst; | ||
| 765 | arg[1].nbytes = 40; | ||
| 766 | arg[1].value = (unsigned char *)argument->d; | ||
| 767 | memset(arg[1].value, 0, 40); | ||
| 768 | BN_bn2bin(sig->r, arg[1].value + 20 - BN_num_bytes(sig->r)); | ||
| 769 | BN_bn2bin(sig->s, arg[1].value + 40 - BN_num_bytes(sig->s)); | ||
| 770 | res.nbytes = 4; /* unsigned long */ | ||
| 771 | res.value = (unsigned char *)(&sig_result); | ||
| 772 | /* Perform the operation */ | ||
| 773 | sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_DSS_VERIFY, arg, 2, | ||
| 774 | &res, 1); | ||
| 775 | if(sw_status != SW_OK) | ||
| 776 | { | ||
| 777 | char tmpbuf[20]; | ||
| 778 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_REQUEST_FAILED); | ||
| 779 | sprintf(tmpbuf, "%ld", sw_status); | ||
| 780 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | ||
| 781 | goto err; | ||
| 782 | } | ||
| 783 | /* Convert the response */ | ||
| 784 | to_return = ((sig_result == 0) ? 0 : 1); | ||
| 785 | |||
| 786 | err: | ||
| 787 | if(acquired) | ||
| 788 | release_context(hac); | ||
| 789 | if(dsa_p) ctx->tos--; | ||
| 790 | if(dsa_q) ctx->tos--; | ||
| 791 | if(dsa_g) ctx->tos--; | ||
| 792 | if(dsa_key) ctx->tos--; | ||
| 793 | if(argument) ctx->tos--; | ||
| 794 | if(ctx) | ||
| 795 | BN_CTX_free(ctx); | ||
| 796 | return to_return; | ||
| 797 | } | ||
| 798 | |||
| 799 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ | ||
| 800 | static int cswift_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 801 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | ||
| 802 | { | ||
| 803 | return cswift_mod_exp(r, a, p, m, ctx); | ||
| 804 | } | ||
| 805 | |||
| 806 | #endif /* !NO_HW_CSWIFT */ | ||
| 807 | #endif /* !NO_HW */ | ||
diff --git a/src/lib/libssl/src/crypto/engine/hw_ncipher.c b/src/lib/libssl/src/crypto/engine/hw_ncipher.c new file mode 100644 index 0000000000..41f5900676 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/hw_ncipher.c | |||
| @@ -0,0 +1,1019 @@ | |||
| 1 | /* crypto/engine/hw_ncipher.c -*- mode: C; c-file-style: "eay" -*- */ | ||
| 2 | /* Written by Richard Levitte (richard@levitte.org), Geoff Thorpe | ||
| 3 | * (geoff@geoffthorpe.net) and Dr Stephen N Henson (shenson@bigfoot.com) | ||
| 4 | * for the OpenSSL project 2000. | ||
| 5 | */ | ||
| 6 | /* ==================================================================== | ||
| 7 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 8 | * | ||
| 9 | * Redistribution and use in source and binary forms, with or without | ||
| 10 | * modification, are permitted provided that the following conditions | ||
| 11 | * are met: | ||
| 12 | * | ||
| 13 | * 1. Redistributions of source code must retain the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer. | ||
| 15 | * | ||
| 16 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 17 | * notice, this list of conditions and the following disclaimer in | ||
| 18 | * the documentation and/or other materials provided with the | ||
| 19 | * distribution. | ||
| 20 | * | ||
| 21 | * 3. All advertising materials mentioning features or use of this | ||
| 22 | * software must display the following acknowledgment: | ||
| 23 | * "This product includes software developed by the OpenSSL Project | ||
| 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 25 | * | ||
| 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 27 | * endorse or promote products derived from this software without | ||
| 28 | * prior written permission. For written permission, please contact | ||
| 29 | * licensing@OpenSSL.org. | ||
| 30 | * | ||
| 31 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 32 | * nor may "OpenSSL" appear in their names without prior written | ||
| 33 | * permission of the OpenSSL Project. | ||
| 34 | * | ||
| 35 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 36 | * acknowledgment: | ||
| 37 | * "This product includes software developed by the OpenSSL Project | ||
| 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 39 | * | ||
| 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 52 | * ==================================================================== | ||
| 53 | * | ||
| 54 | * This product includes cryptographic software written by Eric Young | ||
| 55 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 56 | * Hudson (tjh@cryptsoft.com). | ||
| 57 | * | ||
| 58 | */ | ||
| 59 | |||
| 60 | #include <stdio.h> | ||
| 61 | #include <openssl/crypto.h> | ||
| 62 | #include <openssl/pem.h> | ||
| 63 | #include "cryptlib.h" | ||
| 64 | #include <openssl/dso.h> | ||
| 65 | #include "engine_int.h" | ||
| 66 | #include <openssl/engine.h> | ||
| 67 | |||
| 68 | #ifndef NO_HW | ||
| 69 | #ifndef NO_HW_NCIPHER | ||
| 70 | |||
| 71 | /* Attribution notice: nCipher have said several times that it's OK for | ||
| 72 | * us to implement a general interface to their boxes, and recently declared | ||
| 73 | * their HWCryptoHook to be public, and therefore available for us to use. | ||
| 74 | * Thanks, nCipher. | ||
| 75 | * | ||
| 76 | * The hwcryptohook.h included here is from May 2000. | ||
| 77 | * [Richard Levitte] | ||
| 78 | */ | ||
| 79 | #ifdef FLAT_INC | ||
| 80 | #include "hwcryptohook.h" | ||
| 81 | #else | ||
| 82 | #include "vendor_defns/hwcryptohook.h" | ||
| 83 | #endif | ||
| 84 | |||
| 85 | static int hwcrhk_init(void); | ||
| 86 | static int hwcrhk_finish(void); | ||
| 87 | static int hwcrhk_ctrl(int cmd, long i, void *p, void (*f)()); | ||
| 88 | |||
| 89 | /* Functions to handle mutexes */ | ||
| 90 | static int hwcrhk_mutex_init(HWCryptoHook_Mutex*, HWCryptoHook_CallerContext*); | ||
| 91 | static int hwcrhk_mutex_lock(HWCryptoHook_Mutex*); | ||
| 92 | static void hwcrhk_mutex_unlock(HWCryptoHook_Mutex*); | ||
| 93 | static void hwcrhk_mutex_destroy(HWCryptoHook_Mutex*); | ||
| 94 | |||
| 95 | /* BIGNUM stuff */ | ||
| 96 | static int hwcrhk_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 97 | const BIGNUM *m, BN_CTX *ctx); | ||
| 98 | |||
| 99 | /* RSA stuff */ | ||
| 100 | static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa); | ||
| 101 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | ||
| 102 | static int hwcrhk_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 103 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 104 | |||
| 105 | /* DH stuff */ | ||
| 106 | /* This function is alised to mod_exp (with the DH and mont dropped). */ | ||
| 107 | static int hwcrhk_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 108 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 109 | |||
| 110 | /* RAND stuff */ | ||
| 111 | static int hwcrhk_rand_bytes(unsigned char *buf, int num); | ||
| 112 | static int hwcrhk_rand_status(void); | ||
| 113 | |||
| 114 | /* KM stuff */ | ||
| 115 | static EVP_PKEY *hwcrhk_load_privkey(const char *key_id, | ||
| 116 | const char *passphrase); | ||
| 117 | static EVP_PKEY *hwcrhk_load_pubkey(const char *key_id, | ||
| 118 | const char *passphrase); | ||
| 119 | static void hwcrhk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, | ||
| 120 | int index,long argl, void *argp); | ||
| 121 | |||
| 122 | /* Interaction stuff */ | ||
| 123 | static int hwcrhk_get_pass(const char *prompt_info, | ||
| 124 | int *len_io, char *buf, | ||
| 125 | HWCryptoHook_PassphraseContext *ppctx, | ||
| 126 | HWCryptoHook_CallerContext *cactx); | ||
| 127 | static void hwcrhk_log_message(void *logstream, const char *message); | ||
| 128 | |||
| 129 | /* Our internal RSA_METHOD that we provide pointers to */ | ||
| 130 | static RSA_METHOD hwcrhk_rsa = | ||
| 131 | { | ||
| 132 | "nCipher RSA method", | ||
| 133 | NULL, | ||
| 134 | NULL, | ||
| 135 | NULL, | ||
| 136 | NULL, | ||
| 137 | hwcrhk_rsa_mod_exp, | ||
| 138 | hwcrhk_mod_exp_mont, | ||
| 139 | NULL, | ||
| 140 | NULL, | ||
| 141 | 0, | ||
| 142 | NULL, | ||
| 143 | NULL, | ||
| 144 | NULL | ||
| 145 | }; | ||
| 146 | |||
| 147 | /* Our internal DH_METHOD that we provide pointers to */ | ||
| 148 | static DH_METHOD hwcrhk_dh = | ||
| 149 | { | ||
| 150 | "nCipher DH method", | ||
| 151 | NULL, | ||
| 152 | NULL, | ||
| 153 | hwcrhk_mod_exp_dh, | ||
| 154 | NULL, | ||
| 155 | NULL, | ||
| 156 | 0, | ||
| 157 | NULL | ||
| 158 | }; | ||
| 159 | |||
| 160 | static RAND_METHOD hwcrhk_rand = | ||
| 161 | { | ||
| 162 | /* "nCipher RAND method", */ | ||
| 163 | NULL, | ||
| 164 | hwcrhk_rand_bytes, | ||
| 165 | NULL, | ||
| 166 | NULL, | ||
| 167 | hwcrhk_rand_bytes, | ||
| 168 | hwcrhk_rand_status, | ||
| 169 | }; | ||
| 170 | |||
| 171 | /* Our ENGINE structure. */ | ||
| 172 | static ENGINE engine_hwcrhk = | ||
| 173 | { | ||
| 174 | "chil", | ||
| 175 | "nCipher hardware engine support", | ||
| 176 | &hwcrhk_rsa, | ||
| 177 | NULL, | ||
| 178 | &hwcrhk_dh, | ||
| 179 | &hwcrhk_rand, | ||
| 180 | hwcrhk_mod_exp, | ||
| 181 | NULL, | ||
| 182 | hwcrhk_init, | ||
| 183 | hwcrhk_finish, | ||
| 184 | hwcrhk_ctrl, | ||
| 185 | hwcrhk_load_privkey, | ||
| 186 | hwcrhk_load_pubkey, | ||
| 187 | 0, /* no flags */ | ||
| 188 | 0, 0, /* no references */ | ||
| 189 | NULL, NULL /* unlinked */ | ||
| 190 | }; | ||
| 191 | |||
| 192 | /* Internal stuff for HWCryptoHook */ | ||
| 193 | |||
| 194 | /* Some structures needed for proper use of thread locks */ | ||
| 195 | /* hwcryptohook.h has some typedefs that turn struct HWCryptoHook_MutexValue | ||
| 196 | into HWCryptoHook_Mutex */ | ||
| 197 | struct HWCryptoHook_MutexValue | ||
| 198 | { | ||
| 199 | int lockid; | ||
| 200 | }; | ||
| 201 | |||
| 202 | /* hwcryptohook.h has some typedefs that turn | ||
| 203 | struct HWCryptoHook_PassphraseContextValue | ||
| 204 | into HWCryptoHook_PassphraseContext */ | ||
| 205 | struct HWCryptoHook_PassphraseContextValue | ||
| 206 | { | ||
| 207 | void *any; | ||
| 208 | }; | ||
| 209 | |||
| 210 | /* hwcryptohook.h has some typedefs that turn | ||
| 211 | struct HWCryptoHook_CallerContextValue | ||
| 212 | into HWCryptoHook_CallerContext */ | ||
| 213 | struct HWCryptoHook_CallerContextValue | ||
| 214 | { | ||
| 215 | void *any; | ||
| 216 | }; | ||
| 217 | |||
| 218 | /* The MPI structure in HWCryptoHook is pretty compatible with OpenSSL | ||
| 219 | BIGNUM's, so lets define a couple of conversion macros */ | ||
| 220 | #define BN2MPI(mp, bn) \ | ||
| 221 | {mp.size = bn->top * sizeof(BN_ULONG); mp.buf = (unsigned char *)bn->d;} | ||
| 222 | #define MPI2BN(bn, mp) \ | ||
| 223 | {mp.size = bn->dmax * sizeof(BN_ULONG); mp.buf = (unsigned char *)bn->d;} | ||
| 224 | |||
| 225 | #if 0 /* Card and password management is not yet supported */ | ||
| 226 | /* HWCryptoHook callbacks. insert_card() and get_pass() are not yet | ||
| 227 | defined, because we haven't quite decided on the proper form yet. | ||
| 228 | log_message() just adds an entry in the error stack. I don't know | ||
| 229 | if that's good or bad... */ | ||
| 230 | static int insert_card(const char *prompt_info, | ||
| 231 | const char *wrong_info, | ||
| 232 | HWCryptoHook_PassphraseContext *ppctx, | ||
| 233 | HWCryptoHook_CallerContext *cactx); | ||
| 234 | static int get_pass(const char *prompt_info, | ||
| 235 | int *len_io, char *buf, | ||
| 236 | HWCryptoHook_PassphraseContext *ppctx, | ||
| 237 | HWCryptoHook_CallerContext *cactx); | ||
| 238 | #endif | ||
| 239 | |||
| 240 | static BIO *logstream = NULL; | ||
| 241 | static pem_password_cb *password_callback = NULL; | ||
| 242 | #if 0 | ||
| 243 | static void *password_callback_userdata = NULL; | ||
| 244 | #endif | ||
| 245 | static int disable_mutex_callbacks = 0; | ||
| 246 | |||
| 247 | /* Stuff to pass to the HWCryptoHook library */ | ||
| 248 | static HWCryptoHook_InitInfo hwcrhk_globals = { | ||
| 249 | 0, /* Flags */ | ||
| 250 | &logstream, /* logstream */ | ||
| 251 | sizeof(BN_ULONG), /* limbsize */ | ||
| 252 | 0, /* mslimb first: false for BNs */ | ||
| 253 | -1, /* msbyte first: use native */ | ||
| 254 | 0, /* Max mutexes, 0 = no small limit */ | ||
| 255 | 0, /* Max simultaneous, 0 = default */ | ||
| 256 | |||
| 257 | /* The next few are mutex stuff: we write wrapper functions | ||
| 258 | around the OS mutex functions. We initialise them to 0 | ||
| 259 | here, and change that to actual function pointers in hwcrhk_init() | ||
| 260 | if dynamic locks are supported (that is, if the application | ||
| 261 | programmer has made sure of setting up callbacks bafore starting | ||
| 262 | this engine) *and* if disable_mutex_callbacks hasn't been set by | ||
| 263 | a call to ENGINE_ctrl(ENGINE_CTRL_CHIL_NO_LOCKING). */ | ||
| 264 | sizeof(HWCryptoHook_Mutex), | ||
| 265 | 0, | ||
| 266 | 0, | ||
| 267 | 0, | ||
| 268 | 0, | ||
| 269 | |||
| 270 | /* The next few are condvar stuff: we write wrapper functions | ||
| 271 | round the OS functions. Currently not implemented and not | ||
| 272 | and absolute necessity even in threaded programs, therefore | ||
| 273 | 0'ed. Will hopefully be implemented some day, since it | ||
| 274 | enhances the efficiency of HWCryptoHook. */ | ||
| 275 | 0, /* sizeof(HWCryptoHook_CondVar), */ | ||
| 276 | 0, /* hwcrhk_cv_init, */ | ||
| 277 | 0, /* hwcrhk_cv_wait, */ | ||
| 278 | 0, /* hwcrhk_cv_signal, */ | ||
| 279 | 0, /* hwcrhk_cv_broadcast, */ | ||
| 280 | 0, /* hwcrhk_cv_destroy, */ | ||
| 281 | |||
| 282 | hwcrhk_get_pass, /* pass phrase */ | ||
| 283 | 0, /* insert_card, */ /* insert a card */ | ||
| 284 | hwcrhk_log_message /* Log message */ | ||
| 285 | }; | ||
| 286 | |||
| 287 | |||
| 288 | /* Now, to our own code */ | ||
| 289 | |||
| 290 | /* As this is only ever called once, there's no need for locking | ||
| 291 | * (indeed - the lock will already be held by our caller!!!) */ | ||
| 292 | ENGINE *ENGINE_ncipher() | ||
| 293 | { | ||
| 294 | RSA_METHOD *meth1; | ||
| 295 | DH_METHOD *meth2; | ||
| 296 | |||
| 297 | /* We know that the "PKCS1_SSLeay()" functions hook properly | ||
| 298 | * to the cswift-specific mod_exp and mod_exp_crt so we use | ||
| 299 | * those functions. NB: We don't use ENGINE_openssl() or | ||
| 300 | * anything "more generic" because something like the RSAref | ||
| 301 | * code may not hook properly, and if you own one of these | ||
| 302 | * cards then you have the right to do RSA operations on it | ||
| 303 | * anyway! */ | ||
| 304 | meth1 = RSA_PKCS1_SSLeay(); | ||
| 305 | hwcrhk_rsa.rsa_pub_enc = meth1->rsa_pub_enc; | ||
| 306 | hwcrhk_rsa.rsa_pub_dec = meth1->rsa_pub_dec; | ||
| 307 | hwcrhk_rsa.rsa_priv_enc = meth1->rsa_priv_enc; | ||
| 308 | hwcrhk_rsa.rsa_priv_dec = meth1->rsa_priv_dec; | ||
| 309 | |||
| 310 | /* Much the same for Diffie-Hellman */ | ||
| 311 | meth2 = DH_OpenSSL(); | ||
| 312 | hwcrhk_dh.generate_key = meth2->generate_key; | ||
| 313 | hwcrhk_dh.compute_key = meth2->compute_key; | ||
| 314 | return &engine_hwcrhk; | ||
| 315 | } | ||
| 316 | |||
| 317 | /* This is a process-global DSO handle used for loading and unloading | ||
| 318 | * the HWCryptoHook library. NB: This is only set (or unset) during an | ||
| 319 | * init() or finish() call (reference counts permitting) and they're | ||
| 320 | * operating with global locks, so this should be thread-safe | ||
| 321 | * implicitly. */ | ||
| 322 | static DSO *hwcrhk_dso = NULL; | ||
| 323 | static HWCryptoHook_ContextHandle hwcrhk_context = 0; | ||
| 324 | static int hndidx = -1; /* Index for KM handle. Not really used yet. */ | ||
| 325 | |||
| 326 | /* These are the function pointers that are (un)set when the library has | ||
| 327 | * successfully (un)loaded. */ | ||
| 328 | static HWCryptoHook_Init_t *p_hwcrhk_Init = NULL; | ||
| 329 | static HWCryptoHook_Finish_t *p_hwcrhk_Finish = NULL; | ||
| 330 | static HWCryptoHook_ModExp_t *p_hwcrhk_ModExp = NULL; | ||
| 331 | static HWCryptoHook_RSA_t *p_hwcrhk_RSA = NULL; | ||
| 332 | static HWCryptoHook_RandomBytes_t *p_hwcrhk_RandomBytes = NULL; | ||
| 333 | static HWCryptoHook_RSALoadKey_t *p_hwcrhk_RSALoadKey = NULL; | ||
| 334 | static HWCryptoHook_RSAGetPublicKey_t *p_hwcrhk_RSAGetPublicKey = NULL; | ||
| 335 | static HWCryptoHook_RSAUnloadKey_t *p_hwcrhk_RSAUnloadKey = NULL; | ||
| 336 | static HWCryptoHook_ModExpCRT_t *p_hwcrhk_ModExpCRT = NULL; | ||
| 337 | |||
| 338 | /* Used in the DSO operations. */ | ||
| 339 | static const char *HWCRHK_LIBNAME = "nfhwcrhk"; | ||
| 340 | static const char *n_hwcrhk_Init = "HWCryptoHook_Init"; | ||
| 341 | static const char *n_hwcrhk_Finish = "HWCryptoHook_Finish"; | ||
| 342 | static const char *n_hwcrhk_ModExp = "HWCryptoHook_ModExp"; | ||
| 343 | static const char *n_hwcrhk_RSA = "HWCryptoHook_RSA"; | ||
| 344 | static const char *n_hwcrhk_RandomBytes = "HWCryptoHook_RandomBytes"; | ||
| 345 | static const char *n_hwcrhk_RSALoadKey = "HWCryptoHook_RSALoadKey"; | ||
| 346 | static const char *n_hwcrhk_RSAGetPublicKey = "HWCryptoHook_RSAGetPublicKey"; | ||
| 347 | static const char *n_hwcrhk_RSAUnloadKey = "HWCryptoHook_RSAUnloadKey"; | ||
| 348 | static const char *n_hwcrhk_ModExpCRT = "HWCryptoHook_ModExpCRT"; | ||
| 349 | |||
| 350 | /* HWCryptoHook library functions and mechanics - these are used by the | ||
| 351 | * higher-level functions further down. NB: As and where there's no | ||
| 352 | * error checking, take a look lower down where these functions are | ||
| 353 | * called, the checking and error handling is probably down there. */ | ||
| 354 | |||
| 355 | /* utility function to obtain a context */ | ||
| 356 | static int get_context(HWCryptoHook_ContextHandle *hac) | ||
| 357 | { | ||
| 358 | char tempbuf[1024]; | ||
| 359 | HWCryptoHook_ErrMsgBuf rmsg; | ||
| 360 | |||
| 361 | rmsg.buf = tempbuf; | ||
| 362 | rmsg.size = 1024; | ||
| 363 | |||
| 364 | *hac = p_hwcrhk_Init(&hwcrhk_globals, sizeof(hwcrhk_globals), &rmsg, | ||
| 365 | NULL); | ||
| 366 | if (!*hac) | ||
| 367 | return 0; | ||
| 368 | return 1; | ||
| 369 | } | ||
| 370 | |||
| 371 | /* similarly to release one. */ | ||
| 372 | static void release_context(HWCryptoHook_ContextHandle hac) | ||
| 373 | { | ||
| 374 | p_hwcrhk_Finish(hac); | ||
| 375 | } | ||
| 376 | |||
| 377 | /* (de)initialisation functions. */ | ||
| 378 | static int hwcrhk_init() | ||
| 379 | { | ||
| 380 | HWCryptoHook_Init_t *p1; | ||
| 381 | HWCryptoHook_Finish_t *p2; | ||
| 382 | HWCryptoHook_ModExp_t *p3; | ||
| 383 | HWCryptoHook_RSA_t *p4; | ||
| 384 | HWCryptoHook_RSALoadKey_t *p5; | ||
| 385 | HWCryptoHook_RSAGetPublicKey_t *p6; | ||
| 386 | HWCryptoHook_RSAUnloadKey_t *p7; | ||
| 387 | HWCryptoHook_RandomBytes_t *p8; | ||
| 388 | HWCryptoHook_ModExpCRT_t *p9; | ||
| 389 | |||
| 390 | if(hwcrhk_dso != NULL) | ||
| 391 | { | ||
| 392 | ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_ALREADY_LOADED); | ||
| 393 | goto err; | ||
| 394 | } | ||
| 395 | /* Attempt to load libnfhwcrhk.so/nfhwcrhk.dll/whatever. */ | ||
| 396 | hwcrhk_dso = DSO_load(NULL, HWCRHK_LIBNAME, NULL, | ||
| 397 | DSO_FLAG_NAME_TRANSLATION); | ||
| 398 | if(hwcrhk_dso == NULL) | ||
| 399 | { | ||
| 400 | ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_DSO_FAILURE); | ||
| 401 | goto err; | ||
| 402 | } | ||
| 403 | if(!(p1 = (HWCryptoHook_Init_t *) | ||
| 404 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_Init)) || | ||
| 405 | !(p2 = (HWCryptoHook_Finish_t *) | ||
| 406 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_Finish)) || | ||
| 407 | !(p3 = (HWCryptoHook_ModExp_t *) | ||
| 408 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_ModExp)) || | ||
| 409 | !(p4 = (HWCryptoHook_RSA_t *) | ||
| 410 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSA)) || | ||
| 411 | !(p5 = (HWCryptoHook_RSALoadKey_t *) | ||
| 412 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSALoadKey)) || | ||
| 413 | !(p6 = (HWCryptoHook_RSAGetPublicKey_t *) | ||
| 414 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSAGetPublicKey)) || | ||
| 415 | !(p7 = (HWCryptoHook_RSAUnloadKey_t *) | ||
| 416 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSAUnloadKey)) || | ||
| 417 | !(p8 = (HWCryptoHook_RandomBytes_t *) | ||
| 418 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RandomBytes)) || | ||
| 419 | !(p9 = (HWCryptoHook_ModExpCRT_t *) | ||
| 420 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_ModExpCRT))) | ||
| 421 | { | ||
| 422 | ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_DSO_FAILURE); | ||
| 423 | goto err; | ||
| 424 | } | ||
| 425 | /* Copy the pointers */ | ||
| 426 | p_hwcrhk_Init = p1; | ||
| 427 | p_hwcrhk_Finish = p2; | ||
| 428 | p_hwcrhk_ModExp = p3; | ||
| 429 | p_hwcrhk_RSA = p4; | ||
| 430 | p_hwcrhk_RSALoadKey = p5; | ||
| 431 | p_hwcrhk_RSAGetPublicKey = p6; | ||
| 432 | p_hwcrhk_RSAUnloadKey = p7; | ||
| 433 | p_hwcrhk_RandomBytes = p8; | ||
| 434 | p_hwcrhk_ModExpCRT = p9; | ||
| 435 | |||
| 436 | /* Check if the application decided to support dynamic locks, | ||
| 437 | and if it does, use them. */ | ||
| 438 | if (disable_mutex_callbacks == 0 && | ||
| 439 | CRYPTO_get_dynlock_create_callback() != NULL && | ||
| 440 | CRYPTO_get_dynlock_lock_callback() != NULL && | ||
| 441 | CRYPTO_get_dynlock_destroy_callback() != NULL) | ||
| 442 | { | ||
| 443 | hwcrhk_globals.mutex_init = hwcrhk_mutex_init; | ||
| 444 | hwcrhk_globals.mutex_acquire = hwcrhk_mutex_lock; | ||
| 445 | hwcrhk_globals.mutex_release = hwcrhk_mutex_unlock; | ||
| 446 | hwcrhk_globals.mutex_destroy = hwcrhk_mutex_destroy; | ||
| 447 | } | ||
| 448 | |||
| 449 | /* Try and get a context - if not, we may have a DSO but no | ||
| 450 | * accelerator! */ | ||
| 451 | if(!get_context(&hwcrhk_context)) | ||
| 452 | { | ||
| 453 | ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_UNIT_FAILURE); | ||
| 454 | goto err; | ||
| 455 | } | ||
| 456 | /* Everything's fine. */ | ||
| 457 | if (hndidx == -1) | ||
| 458 | hndidx = RSA_get_ex_new_index(0, | ||
| 459 | "nFast HWCryptoHook RSA key handle", | ||
| 460 | NULL, NULL, hwcrhk_ex_free); | ||
| 461 | return 1; | ||
| 462 | err: | ||
| 463 | if(hwcrhk_dso) | ||
| 464 | DSO_free(hwcrhk_dso); | ||
| 465 | hwcrhk_dso = NULL; | ||
| 466 | p_hwcrhk_Init = NULL; | ||
| 467 | p_hwcrhk_Finish = NULL; | ||
| 468 | p_hwcrhk_ModExp = NULL; | ||
| 469 | p_hwcrhk_RSA = NULL; | ||
| 470 | p_hwcrhk_RSALoadKey = NULL; | ||
| 471 | p_hwcrhk_RSAGetPublicKey = NULL; | ||
| 472 | p_hwcrhk_RSAUnloadKey = NULL; | ||
| 473 | p_hwcrhk_ModExpCRT = NULL; | ||
| 474 | p_hwcrhk_RandomBytes = NULL; | ||
| 475 | return 0; | ||
| 476 | } | ||
| 477 | |||
| 478 | static int hwcrhk_finish() | ||
| 479 | { | ||
| 480 | int to_return = 1; | ||
| 481 | if(hwcrhk_dso == NULL) | ||
| 482 | { | ||
| 483 | ENGINEerr(ENGINE_F_HWCRHK_FINISH,ENGINE_R_NOT_LOADED); | ||
| 484 | to_return = 0; | ||
| 485 | goto err; | ||
| 486 | } | ||
| 487 | release_context(hwcrhk_context); | ||
| 488 | if(!DSO_free(hwcrhk_dso)) | ||
| 489 | { | ||
| 490 | ENGINEerr(ENGINE_F_HWCRHK_FINISH,ENGINE_R_DSO_FAILURE); | ||
| 491 | to_return = 0; | ||
| 492 | goto err; | ||
| 493 | } | ||
| 494 | err: | ||
| 495 | if (logstream) | ||
| 496 | BIO_free(logstream); | ||
| 497 | hwcrhk_dso = NULL; | ||
| 498 | p_hwcrhk_Init = NULL; | ||
| 499 | p_hwcrhk_Finish = NULL; | ||
| 500 | p_hwcrhk_ModExp = NULL; | ||
| 501 | p_hwcrhk_RSA = NULL; | ||
| 502 | p_hwcrhk_RSALoadKey = NULL; | ||
| 503 | p_hwcrhk_RSAGetPublicKey = NULL; | ||
| 504 | p_hwcrhk_RSAUnloadKey = NULL; | ||
| 505 | p_hwcrhk_ModExpCRT = NULL; | ||
| 506 | p_hwcrhk_RandomBytes = NULL; | ||
| 507 | return to_return; | ||
| 508 | } | ||
| 509 | |||
| 510 | static int hwcrhk_ctrl(int cmd, long i, void *p, void (*f)()) | ||
| 511 | { | ||
| 512 | int to_return = 1; | ||
| 513 | |||
| 514 | switch(cmd) | ||
| 515 | { | ||
| 516 | case ENGINE_CTRL_SET_LOGSTREAM: | ||
| 517 | { | ||
| 518 | BIO *bio = (BIO *)p; | ||
| 519 | |||
| 520 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 521 | if (logstream) | ||
| 522 | { | ||
| 523 | BIO_free(logstream); | ||
| 524 | logstream = NULL; | ||
| 525 | } | ||
| 526 | if (CRYPTO_add(&bio->references,1,CRYPTO_LOCK_BIO) > 1) | ||
| 527 | logstream = bio; | ||
| 528 | else | ||
| 529 | ENGINEerr(ENGINE_F_HWCRHK_CTRL,ENGINE_R_BIO_WAS_FREED); | ||
| 530 | } | ||
| 531 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 532 | break; | ||
| 533 | case ENGINE_CTRL_SET_PASSWORD_CALLBACK: | ||
| 534 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 535 | password_callback = (pem_password_cb *)f; | ||
| 536 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 537 | break; | ||
| 538 | /* this enables or disables the "SimpleForkCheck" flag used in the | ||
| 539 | * initialisation structure. */ | ||
| 540 | case ENGINE_CTRL_CHIL_SET_FORKCHECK: | ||
| 541 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 542 | if(i) | ||
| 543 | hwcrhk_globals.flags |= | ||
| 544 | HWCryptoHook_InitFlags_SimpleForkCheck; | ||
| 545 | else | ||
| 546 | hwcrhk_globals.flags &= | ||
| 547 | ~HWCryptoHook_InitFlags_SimpleForkCheck; | ||
| 548 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 549 | break; | ||
| 550 | /* This will prevent the initialisation function from "installing" | ||
| 551 | * the mutex-handling callbacks, even if they are available from | ||
| 552 | * within the library (or were provided to the library from the | ||
| 553 | * calling application). This is to remove any baggage for | ||
| 554 | * applications not using multithreading. */ | ||
| 555 | case ENGINE_CTRL_CHIL_NO_LOCKING: | ||
| 556 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 557 | disable_mutex_callbacks = 1; | ||
| 558 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 559 | break; | ||
| 560 | |||
| 561 | /* The command isn't understood by this engine */ | ||
| 562 | default: | ||
| 563 | ENGINEerr(ENGINE_F_HWCRHK_CTRL, | ||
| 564 | ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED); | ||
| 565 | to_return = 0; | ||
| 566 | break; | ||
| 567 | } | ||
| 568 | |||
| 569 | return to_return; | ||
| 570 | } | ||
| 571 | |||
| 572 | static EVP_PKEY *hwcrhk_load_privkey(const char *key_id, | ||
| 573 | const char *passphrase) | ||
| 574 | { | ||
| 575 | RSA *rtmp = NULL; | ||
| 576 | EVP_PKEY *res = NULL; | ||
| 577 | HWCryptoHook_MPI e, n; | ||
| 578 | HWCryptoHook_RSAKeyHandle *hptr; | ||
| 579 | HWCryptoHook_ErrMsgBuf rmsg; | ||
| 580 | |||
| 581 | if(!hwcrhk_context) | ||
| 582 | { | ||
| 583 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY, | ||
| 584 | ENGINE_R_NOT_INITIALISED); | ||
| 585 | goto err; | ||
| 586 | } | ||
| 587 | hptr = OPENSSL_malloc(sizeof(HWCryptoHook_RSAKeyHandle)); | ||
| 588 | if (!hptr) | ||
| 589 | { | ||
| 590 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY, | ||
| 591 | ERR_R_MALLOC_FAILURE); | ||
| 592 | goto err; | ||
| 593 | } | ||
| 594 | if (p_hwcrhk_RSALoadKey(hwcrhk_context, key_id, hptr, | ||
| 595 | &rmsg, NULL)) | ||
| 596 | { | ||
| 597 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY, | ||
| 598 | ENGINE_R_CHIL_ERROR); | ||
| 599 | ERR_add_error_data(1,rmsg.buf); | ||
| 600 | goto err; | ||
| 601 | } | ||
| 602 | if (!*hptr) | ||
| 603 | { | ||
| 604 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY, | ||
| 605 | ENGINE_R_NO_KEY); | ||
| 606 | goto err; | ||
| 607 | } | ||
| 608 | rtmp = RSA_new_method(&engine_hwcrhk); | ||
| 609 | RSA_set_ex_data(rtmp, hndidx, (char *)hptr); | ||
| 610 | rtmp->e = BN_new(); | ||
| 611 | rtmp->n = BN_new(); | ||
| 612 | rtmp->flags |= RSA_FLAG_EXT_PKEY; | ||
| 613 | MPI2BN(rtmp->e, e); | ||
| 614 | MPI2BN(rtmp->n, n); | ||
| 615 | if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg) | ||
| 616 | != HWCRYPTOHOOK_ERROR_MPISIZE) | ||
| 617 | { | ||
| 618 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PUBKEY,ENGINE_R_CHIL_ERROR); | ||
| 619 | ERR_add_error_data(1,rmsg.buf); | ||
| 620 | goto err; | ||
| 621 | } | ||
| 622 | |||
| 623 | bn_expand2(rtmp->e, e.size/sizeof(BN_ULONG)); | ||
| 624 | bn_expand2(rtmp->n, n.size/sizeof(BN_ULONG)); | ||
| 625 | MPI2BN(rtmp->e, e); | ||
| 626 | MPI2BN(rtmp->n, n); | ||
| 627 | |||
| 628 | if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg)) | ||
| 629 | { | ||
| 630 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PUBKEY, | ||
| 631 | ENGINE_R_CHIL_ERROR); | ||
| 632 | ERR_add_error_data(1,rmsg.buf); | ||
| 633 | goto err; | ||
| 634 | } | ||
| 635 | rtmp->e->top = e.size / sizeof(BN_ULONG); | ||
| 636 | bn_fix_top(rtmp->e); | ||
| 637 | rtmp->n->top = n.size / sizeof(BN_ULONG); | ||
| 638 | bn_fix_top(rtmp->n); | ||
| 639 | |||
| 640 | res = EVP_PKEY_new(); | ||
| 641 | EVP_PKEY_assign_RSA(res, rtmp); | ||
| 642 | |||
| 643 | return res; | ||
| 644 | err: | ||
| 645 | if (res) | ||
| 646 | EVP_PKEY_free(res); | ||
| 647 | if (rtmp) | ||
| 648 | RSA_free(rtmp); | ||
| 649 | return NULL; | ||
| 650 | } | ||
| 651 | |||
| 652 | static EVP_PKEY *hwcrhk_load_pubkey(const char *key_id, const char *passphrase) | ||
| 653 | { | ||
| 654 | EVP_PKEY *res = hwcrhk_load_privkey(key_id, passphrase); | ||
| 655 | |||
| 656 | if (res) | ||
| 657 | switch(res->type) | ||
| 658 | { | ||
| 659 | case EVP_PKEY_RSA: | ||
| 660 | { | ||
| 661 | RSA *rsa = NULL; | ||
| 662 | |||
| 663 | CRYPTO_w_lock(CRYPTO_LOCK_EVP_PKEY); | ||
| 664 | rsa = res->pkey.rsa; | ||
| 665 | res->pkey.rsa = RSA_new(); | ||
| 666 | res->pkey.rsa->n = rsa->n; | ||
| 667 | res->pkey.rsa->e = rsa->e; | ||
| 668 | CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY); | ||
| 669 | RSA_free(rsa); | ||
| 670 | } | ||
| 671 | default: | ||
| 672 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PUBKEY, | ||
| 673 | ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED); | ||
| 674 | goto err; | ||
| 675 | } | ||
| 676 | |||
| 677 | return res; | ||
| 678 | err: | ||
| 679 | if (res) | ||
| 680 | EVP_PKEY_free(res); | ||
| 681 | return NULL; | ||
| 682 | } | ||
| 683 | |||
| 684 | /* A little mod_exp */ | ||
| 685 | static int hwcrhk_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 686 | const BIGNUM *m, BN_CTX *ctx) | ||
| 687 | { | ||
| 688 | char tempbuf[1024]; | ||
| 689 | HWCryptoHook_ErrMsgBuf rmsg; | ||
| 690 | /* Since HWCryptoHook_MPI is pretty compatible with BIGNUM's, | ||
| 691 | we use them directly, plus a little macro magic. We only | ||
| 692 | thing we need to make sure of is that enough space is allocated. */ | ||
| 693 | HWCryptoHook_MPI m_a, m_p, m_n, m_r; | ||
| 694 | int to_return, ret; | ||
| 695 | |||
| 696 | to_return = 0; /* expect failure */ | ||
| 697 | rmsg.buf = tempbuf; | ||
| 698 | rmsg.size = 1024; | ||
| 699 | |||
| 700 | if(!hwcrhk_context) | ||
| 701 | { | ||
| 702 | ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_NOT_INITIALISED); | ||
| 703 | goto err; | ||
| 704 | } | ||
| 705 | /* Prepare the params */ | ||
| 706 | bn_expand2(r, m->top); /* Check for error !! */ | ||
| 707 | BN2MPI(m_a, a); | ||
| 708 | BN2MPI(m_p, p); | ||
| 709 | BN2MPI(m_n, m); | ||
| 710 | MPI2BN(r, m_r); | ||
| 711 | |||
| 712 | /* Perform the operation */ | ||
| 713 | ret = p_hwcrhk_ModExp(hwcrhk_context, m_a, m_p, m_n, &m_r, &rmsg); | ||
| 714 | |||
| 715 | /* Convert the response */ | ||
| 716 | r->top = m_r.size / sizeof(BN_ULONG); | ||
| 717 | bn_fix_top(r); | ||
| 718 | |||
| 719 | if (ret < 0) | ||
| 720 | { | ||
| 721 | /* FIXME: When this error is returned, HWCryptoHook is | ||
| 722 | telling us that falling back to software computation | ||
| 723 | might be a good thing. */ | ||
| 724 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) | ||
| 725 | { | ||
| 726 | ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_REQUEST_FALLBACK); | ||
| 727 | } | ||
| 728 | else | ||
| 729 | { | ||
| 730 | ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_REQUEST_FAILED); | ||
| 731 | } | ||
| 732 | ERR_add_error_data(1,rmsg.buf); | ||
| 733 | goto err; | ||
| 734 | } | ||
| 735 | |||
| 736 | to_return = 1; | ||
| 737 | err: | ||
| 738 | return to_return; | ||
| 739 | } | ||
| 740 | |||
| 741 | static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa) | ||
| 742 | { | ||
| 743 | char tempbuf[1024]; | ||
| 744 | HWCryptoHook_ErrMsgBuf rmsg; | ||
| 745 | HWCryptoHook_RSAKeyHandle *hptr; | ||
| 746 | int to_return = 0, ret; | ||
| 747 | |||
| 748 | if(!hwcrhk_context) | ||
| 749 | { | ||
| 750 | ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_NOT_INITIALISED); | ||
| 751 | goto err; | ||
| 752 | } | ||
| 753 | |||
| 754 | /* This provides support for nForce keys. Since that's opaque data | ||
| 755 | all we do is provide a handle to the proper key and let HWCryptoHook | ||
| 756 | take care of the rest. */ | ||
| 757 | if ((hptr = (HWCryptoHook_RSAKeyHandle *) RSA_get_ex_data(rsa, hndidx)) | ||
| 758 | != NULL) | ||
| 759 | { | ||
| 760 | HWCryptoHook_MPI m_a, m_r; | ||
| 761 | |||
| 762 | if(!rsa->n) | ||
| 763 | { | ||
| 764 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP, | ||
| 765 | ENGINE_R_MISSING_KEY_COMPONENTS); | ||
| 766 | goto err; | ||
| 767 | } | ||
| 768 | |||
| 769 | rmsg.buf = tempbuf; | ||
| 770 | rmsg.size = 1024; | ||
| 771 | |||
| 772 | /* Prepare the params */ | ||
| 773 | bn_expand2(r, rsa->n->top); /* Check for error !! */ | ||
| 774 | BN2MPI(m_a, I); | ||
| 775 | MPI2BN(r, m_r); | ||
| 776 | |||
| 777 | /* Perform the operation */ | ||
| 778 | ret = p_hwcrhk_RSA(m_a, *hptr, &m_r, &rmsg); | ||
| 779 | |||
| 780 | /* Convert the response */ | ||
| 781 | r->top = m_r.size / sizeof(BN_ULONG); | ||
| 782 | bn_fix_top(r); | ||
| 783 | |||
| 784 | if (ret < 0) | ||
| 785 | { | ||
| 786 | /* FIXME: When this error is returned, HWCryptoHook is | ||
| 787 | telling us that falling back to software computation | ||
| 788 | might be a good thing. */ | ||
| 789 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) | ||
| 790 | { | ||
| 791 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP,ENGINE_R_REQUEST_FALLBACK); | ||
| 792 | } | ||
| 793 | else | ||
| 794 | { | ||
| 795 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP,ENGINE_R_REQUEST_FAILED); | ||
| 796 | } | ||
| 797 | ERR_add_error_data(1,rmsg.buf); | ||
| 798 | goto err; | ||
| 799 | } | ||
| 800 | } | ||
| 801 | else | ||
| 802 | { | ||
| 803 | HWCryptoHook_MPI m_a, m_p, m_q, m_dmp1, m_dmq1, m_iqmp, m_r; | ||
| 804 | |||
| 805 | if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) | ||
| 806 | { | ||
| 807 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP, | ||
| 808 | ENGINE_R_MISSING_KEY_COMPONENTS); | ||
| 809 | goto err; | ||
| 810 | } | ||
| 811 | |||
| 812 | rmsg.buf = tempbuf; | ||
| 813 | rmsg.size = 1024; | ||
| 814 | |||
| 815 | /* Prepare the params */ | ||
| 816 | bn_expand2(r, rsa->n->top); /* Check for error !! */ | ||
| 817 | BN2MPI(m_a, I); | ||
| 818 | BN2MPI(m_p, rsa->p); | ||
| 819 | BN2MPI(m_q, rsa->q); | ||
| 820 | BN2MPI(m_dmp1, rsa->dmp1); | ||
| 821 | BN2MPI(m_dmq1, rsa->dmq1); | ||
| 822 | BN2MPI(m_iqmp, rsa->iqmp); | ||
| 823 | MPI2BN(r, m_r); | ||
| 824 | |||
| 825 | /* Perform the operation */ | ||
| 826 | ret = p_hwcrhk_ModExpCRT(hwcrhk_context, m_a, m_p, m_q, | ||
| 827 | m_dmp1, m_dmq1, m_iqmp, &m_r, NULL); | ||
| 828 | |||
| 829 | /* Convert the response */ | ||
| 830 | r->top = m_r.size / sizeof(BN_ULONG); | ||
| 831 | bn_fix_top(r); | ||
| 832 | |||
| 833 | if (ret < 0) | ||
| 834 | { | ||
| 835 | /* FIXME: When this error is returned, HWCryptoHook is | ||
| 836 | telling us that falling back to software computation | ||
| 837 | might be a good thing. */ | ||
| 838 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) | ||
| 839 | { | ||
| 840 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP,ENGINE_R_REQUEST_FALLBACK); | ||
| 841 | } | ||
| 842 | else | ||
| 843 | { | ||
| 844 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP,ENGINE_R_REQUEST_FAILED); | ||
| 845 | } | ||
| 846 | ERR_add_error_data(1,rmsg.buf); | ||
| 847 | goto err; | ||
| 848 | } | ||
| 849 | } | ||
| 850 | /* If we're here, we must be here with some semblance of success :-) */ | ||
| 851 | to_return = 1; | ||
| 852 | err: | ||
| 853 | return to_return; | ||
| 854 | } | ||
| 855 | |||
| 856 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | ||
| 857 | static int hwcrhk_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 858 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | ||
| 859 | { | ||
| 860 | return hwcrhk_mod_exp(r, a, p, m, ctx); | ||
| 861 | } | ||
| 862 | |||
| 863 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ | ||
| 864 | static int hwcrhk_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 865 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | ||
| 866 | { | ||
| 867 | return hwcrhk_mod_exp(r, a, p, m, ctx); | ||
| 868 | } | ||
| 869 | |||
| 870 | /* Random bytes are good */ | ||
| 871 | static int hwcrhk_rand_bytes(unsigned char *buf, int num) | ||
| 872 | { | ||
| 873 | char tempbuf[1024]; | ||
| 874 | HWCryptoHook_ErrMsgBuf rmsg; | ||
| 875 | int to_return = 0; /* assume failure */ | ||
| 876 | int ret; | ||
| 877 | |||
| 878 | rmsg.buf = tempbuf; | ||
| 879 | rmsg.size = 1024; | ||
| 880 | |||
| 881 | if(!hwcrhk_context) | ||
| 882 | { | ||
| 883 | ENGINEerr(ENGINE_F_HWCRHK_RAND_BYTES,ENGINE_R_NOT_INITIALISED); | ||
| 884 | goto err; | ||
| 885 | } | ||
| 886 | |||
| 887 | ret = p_hwcrhk_RandomBytes(hwcrhk_context, buf, num, &rmsg); | ||
| 888 | if (ret < 0) | ||
| 889 | { | ||
| 890 | /* FIXME: When this error is returned, HWCryptoHook is | ||
| 891 | telling us that falling back to software computation | ||
| 892 | might be a good thing. */ | ||
| 893 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) | ||
| 894 | { | ||
| 895 | ENGINEerr(ENGINE_F_HWCRHK_RAND_BYTES,ENGINE_R_REQUEST_FALLBACK); | ||
| 896 | } | ||
| 897 | else | ||
| 898 | { | ||
| 899 | ENGINEerr(ENGINE_F_HWCRHK_RAND_BYTES,ENGINE_R_REQUEST_FAILED); | ||
| 900 | } | ||
| 901 | ERR_add_error_data(1,rmsg.buf); | ||
| 902 | goto err; | ||
| 903 | } | ||
| 904 | to_return = 1; | ||
| 905 | err: | ||
| 906 | return to_return; | ||
| 907 | } | ||
| 908 | |||
| 909 | static int hwcrhk_rand_status(void) | ||
| 910 | { | ||
| 911 | return 1; | ||
| 912 | } | ||
| 913 | |||
| 914 | /* This cleans up an RSA KM key, called when ex_data is freed */ | ||
| 915 | |||
| 916 | static void hwcrhk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, | ||
| 917 | int index,long argl, void *argp) | ||
| 918 | { | ||
| 919 | char tempbuf[1024]; | ||
| 920 | HWCryptoHook_ErrMsgBuf rmsg; | ||
| 921 | HWCryptoHook_RSAKeyHandle *hptr; | ||
| 922 | int ret; | ||
| 923 | |||
| 924 | rmsg.buf = tempbuf; | ||
| 925 | rmsg.size = 1024; | ||
| 926 | |||
| 927 | hptr = (HWCryptoHook_RSAKeyHandle *) item; | ||
| 928 | if(!hptr) return; | ||
| 929 | ret = p_hwcrhk_RSAUnloadKey(*hptr, NULL); | ||
| 930 | OPENSSL_free(hptr); | ||
| 931 | } | ||
| 932 | |||
| 933 | /* Mutex calls: since the HWCryptoHook model closely follows the POSIX model | ||
| 934 | * these just wrap the POSIX functions and add some logging. | ||
| 935 | */ | ||
| 936 | |||
| 937 | static int hwcrhk_mutex_init(HWCryptoHook_Mutex* mt, | ||
| 938 | HWCryptoHook_CallerContext *cactx) | ||
| 939 | { | ||
| 940 | mt->lockid = CRYPTO_get_new_dynlockid(); | ||
| 941 | if (mt->lockid == 0) | ||
| 942 | return 0; | ||
| 943 | return 1; | ||
| 944 | } | ||
| 945 | |||
| 946 | static int hwcrhk_mutex_lock(HWCryptoHook_Mutex *mt) | ||
| 947 | { | ||
| 948 | CRYPTO_w_lock(mt->lockid); | ||
| 949 | return 1; | ||
| 950 | } | ||
| 951 | |||
| 952 | void hwcrhk_mutex_unlock(HWCryptoHook_Mutex * mt) | ||
| 953 | { | ||
| 954 | CRYPTO_w_unlock(mt->lockid); | ||
| 955 | } | ||
| 956 | |||
| 957 | static void hwcrhk_mutex_destroy(HWCryptoHook_Mutex *mt) | ||
| 958 | { | ||
| 959 | CRYPTO_destroy_dynlockid(mt->lockid); | ||
| 960 | } | ||
| 961 | |||
| 962 | static int hwcrhk_get_pass(const char *prompt_info, | ||
| 963 | int *len_io, char *buf, | ||
| 964 | HWCryptoHook_PassphraseContext *ppctx, | ||
| 965 | HWCryptoHook_CallerContext *cactx) | ||
| 966 | { | ||
| 967 | int l = 0; | ||
| 968 | char prompt[1024]; | ||
| 969 | |||
| 970 | if (password_callback == NULL) | ||
| 971 | { | ||
| 972 | ENGINEerr(ENGINE_F_HWCRHK_GET_PASS,ENGINE_R_NO_CALLBACK); | ||
| 973 | return -1; | ||
| 974 | } | ||
| 975 | if (prompt_info) | ||
| 976 | { | ||
| 977 | strncpy(prompt, "Card: \"", sizeof(prompt)); | ||
| 978 | l += 5; | ||
| 979 | strncpy(prompt + l, prompt_info, sizeof(prompt) - l); | ||
| 980 | l += strlen(prompt_info); | ||
| 981 | if (l + 2 < sizeof(prompt)) | ||
| 982 | { | ||
| 983 | strncpy(prompt + l, "\"\n", sizeof(prompt) - l); | ||
| 984 | l += 2; | ||
| 985 | } | ||
| 986 | } | ||
| 987 | if (l < sizeof(prompt) - 1) | ||
| 988 | { | ||
| 989 | strncpy(prompt, "Enter Passphrase <enter to cancel>:", | ||
| 990 | sizeof(prompt) - l); | ||
| 991 | l += 35; | ||
| 992 | } | ||
| 993 | prompt[l] = '\0'; | ||
| 994 | |||
| 995 | /* I know, passing on the prompt instead of the user data *is* | ||
| 996 | a bad thing. However, that's all we have right now. | ||
| 997 | -- Richard Levitte */ | ||
| 998 | *len_io = password_callback(buf, *len_io, 0, prompt); | ||
| 999 | if(!*len_io) | ||
| 1000 | return -1; | ||
| 1001 | return 0; | ||
| 1002 | } | ||
| 1003 | |||
| 1004 | static void hwcrhk_log_message(void *logstream, const char *message) | ||
| 1005 | { | ||
| 1006 | BIO *lstream = NULL; | ||
| 1007 | |||
| 1008 | CRYPTO_w_lock(CRYPTO_LOCK_BIO); | ||
| 1009 | if (logstream) | ||
| 1010 | lstream=*(BIO **)logstream; | ||
| 1011 | if (lstream) | ||
| 1012 | { | ||
| 1013 | BIO_write(lstream, message, strlen(message)); | ||
| 1014 | } | ||
| 1015 | CRYPTO_w_unlock(CRYPTO_LOCK_BIO); | ||
| 1016 | } | ||
| 1017 | |||
| 1018 | #endif /* !NO_HW_NCIPHER */ | ||
| 1019 | #endif /* !NO_HW */ | ||
diff --git a/src/lib/libssl/src/crypto/engine/vendor_defns/atalla.h b/src/lib/libssl/src/crypto/engine/vendor_defns/atalla.h new file mode 100644 index 0000000000..8111649c54 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/vendor_defns/atalla.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | /* This header declares the necessary definitions for using the exponentiation | ||
| 2 | * acceleration capabilities of Atalla cards. The only cryptographic operation | ||
| 3 | * is performed by "ASI_RSAPrivateKeyOpFn" and this takes a structure that | ||
| 4 | * defines an "RSA private key". However, it is really only performing a | ||
| 5 | * regular mod_exp using the supplied modulus and exponent - no CRT form is | ||
| 6 | * being used. Hence, it is a generic mod_exp function in disguise, and we use | ||
| 7 | * it as such. | ||
| 8 | * | ||
| 9 | * Thanks to the people at Atalla for letting me know these definitions are | ||
| 10 | * fine and that they can be reproduced here. | ||
| 11 | * | ||
| 12 | * Geoff. | ||
| 13 | */ | ||
| 14 | |||
| 15 | typedef struct ItemStr | ||
| 16 | { | ||
| 17 | unsigned char *data; | ||
| 18 | int len; | ||
| 19 | } Item; | ||
| 20 | |||
| 21 | typedef struct RSAPrivateKeyStr | ||
| 22 | { | ||
| 23 | void *reserved; | ||
| 24 | Item version; | ||
| 25 | Item modulus; | ||
| 26 | Item publicExponent; | ||
| 27 | Item privateExponent; | ||
| 28 | Item prime[2]; | ||
| 29 | Item exponent[2]; | ||
| 30 | Item coefficient; | ||
| 31 | } RSAPrivateKey; | ||
| 32 | |||
| 33 | /* Predeclare the function pointer types that we dynamically load from the DSO. | ||
| 34 | * These use the same names and form that Ben's original support code had (in | ||
| 35 | * crypto/bn/bn_exp.c) unless of course I've inadvertently changed the style | ||
| 36 | * somewhere along the way! | ||
| 37 | */ | ||
| 38 | |||
| 39 | typedef int tfnASI_GetPerformanceStatistics(int reset_flag, | ||
| 40 | unsigned int *ret_buf); | ||
| 41 | |||
| 42 | typedef int tfnASI_GetHardwareConfig(long card_num, unsigned int *ret_buf); | ||
| 43 | |||
| 44 | typedef int tfnASI_RSAPrivateKeyOpFn(RSAPrivateKey * rsaKey, | ||
| 45 | unsigned char *output, | ||
| 46 | unsigned char *input, | ||
| 47 | unsigned int modulus_len); | ||
| 48 | |||
| 49 | /* These are the static string constants for the DSO file name and the function | ||
| 50 | * symbol names to bind to. Regrettably, the DSO name on *nix appears to be | ||
| 51 | * "atasi.so" rather than something more consistent like "libatasi.so". At the | ||
| 52 | * time of writing, I'm not sure what the file name on win32 is but clearly | ||
| 53 | * native name translation is not possible (eg libatasi.so on *nix, and | ||
| 54 | * atasi.dll on win32). For the purposes of testing, I have created a symbollic | ||
| 55 | * link called "libatasi.so" so that we can use native name-translation - a | ||
| 56 | * better solution will be needed. */ | ||
| 57 | static const char *ATALLA_LIBNAME = "atasi"; | ||
| 58 | static const char *ATALLA_F1 = "ASI_GetHardwareConfig"; | ||
| 59 | static const char *ATALLA_F2 = "ASI_RSAPrivateKeyOpFn"; | ||
| 60 | static const char *ATALLA_F3 = "ASI_GetPerformanceStatistics"; | ||
| 61 | |||
diff --git a/src/lib/libssl/src/crypto/engine/vendor_defns/cswift.h b/src/lib/libssl/src/crypto/engine/vendor_defns/cswift.h new file mode 100644 index 0000000000..0af14a1a92 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/vendor_defns/cswift.h | |||
| @@ -0,0 +1,213 @@ | |||
| 1 | /* Attribution notice: Rainbow have generously allowed me to reproduce | ||
| 2 | * the necessary definitions here from their API. This means the support | ||
| 3 | * can build independently of whether application builders have the | ||
| 4 | * API or hardware. This will allow developers to easily produce software | ||
| 5 | * that has latent hardware support for any users that have accelertors | ||
| 6 | * installed, without the developers themselves needing anything extra. | ||
| 7 | * | ||
| 8 | * I have only clipped the parts from the CryptoSwift header files that | ||
| 9 | * are (or seem) relevant to the CryptoSwift support code. This is | ||
| 10 | * simply to keep the file sizes reasonable. | ||
| 11 | * [Geoff] | ||
| 12 | */ | ||
| 13 | |||
| 14 | |||
| 15 | /* NB: These type widths do *not* seem right in general, in particular | ||
| 16 | * they're not terribly friendly to 64-bit architectures (unsigned long) | ||
| 17 | * will be 64-bit on IA-64 for a start. I'm leaving these alone as they | ||
| 18 | * agree with Rainbow's API and this will only be called into question | ||
| 19 | * on platforms with Rainbow support anyway! ;-) */ | ||
| 20 | |||
| 21 | #ifdef __cplusplus | ||
| 22 | extern "C" { | ||
| 23 | #endif /* __cplusplus */ | ||
| 24 | |||
| 25 | typedef long SW_STATUS; /* status */ | ||
| 26 | typedef unsigned char SW_BYTE; /* 8 bit byte */ | ||
| 27 | typedef unsigned short SW_U16; /* 16 bit number */ | ||
| 28 | #if defined(_IRIX) | ||
| 29 | #include <sgidefs.h> | ||
| 30 | typedef __uint32_t SW_U32; | ||
| 31 | #else | ||
| 32 | typedef unsigned long SW_U32; /* 32 bit integer */ | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #if defined(WIN32) | ||
| 36 | typedef struct _SW_U64 { | ||
| 37 | SW_U32 low32; | ||
| 38 | SW_U32 high32; | ||
| 39 | } SW_U64; /* 64 bit integer */ | ||
| 40 | #elif defined(MAC) | ||
| 41 | typedef longlong SW_U64 | ||
| 42 | #else /* Unix variants */ | ||
| 43 | typedef struct _SW_U64 { | ||
| 44 | SW_U32 low32; | ||
| 45 | SW_U32 high32; | ||
| 46 | } SW_U64; /* 64 bit integer */ | ||
| 47 | #endif | ||
| 48 | |||
| 49 | /* status codes */ | ||
| 50 | #define SW_OK (0L) | ||
| 51 | #define SW_ERR_BASE (-10000L) | ||
| 52 | #define SW_ERR_NO_CARD (SW_ERR_BASE-1) /* The Card is not present */ | ||
| 53 | #define SW_ERR_CARD_NOT_READY (SW_ERR_BASE-2) /* The card has not powered */ | ||
| 54 | /* up yet */ | ||
| 55 | #define SW_ERR_TIME_OUT (SW_ERR_BASE-3) /* Execution of a command */ | ||
| 56 | /* time out */ | ||
| 57 | #define SW_ERR_NO_EXECUTE (SW_ERR_BASE-4) /* The Card failed to */ | ||
| 58 | /* execute the command */ | ||
| 59 | #define SW_ERR_INPUT_NULL_PTR (SW_ERR_BASE-5) /* a required pointer is */ | ||
| 60 | /* NULL */ | ||
| 61 | #define SW_ERR_INPUT_SIZE (SW_ERR_BASE-6) /* size is invalid, too */ | ||
| 62 | /* small, too large. */ | ||
| 63 | #define SW_ERR_INVALID_HANDLE (SW_ERR_BASE-7) /* Invalid SW_ACC_CONTEXT */ | ||
| 64 | /* handle */ | ||
| 65 | #define SW_ERR_PENDING (SW_ERR_BASE-8) /* A request is already out- */ | ||
| 66 | /* standing at this */ | ||
| 67 | /* context handle */ | ||
| 68 | #define SW_ERR_AVAILABLE (SW_ERR_BASE-9) /* A result is available. */ | ||
| 69 | #define SW_ERR_NO_PENDING (SW_ERR_BASE-10)/* No request is pending. */ | ||
| 70 | #define SW_ERR_NO_MEMORY (SW_ERR_BASE-11)/* Not enough memory */ | ||
| 71 | #define SW_ERR_BAD_ALGORITHM (SW_ERR_BASE-12)/* Invalid algorithm type */ | ||
| 72 | /* in SW_PARAM structure */ | ||
| 73 | #define SW_ERR_MISSING_KEY (SW_ERR_BASE-13)/* No key is associated with */ | ||
| 74 | /* context. */ | ||
| 75 | /* swAttachKeyParam() is */ | ||
| 76 | /* not called. */ | ||
| 77 | #define SW_ERR_KEY_CMD_MISMATCH \ | ||
| 78 | (SW_ERR_BASE-14)/* Cannot perform requested */ | ||
| 79 | /* SW_COMMAND_CODE since */ | ||
| 80 | /* key attached via */ | ||
| 81 | /* swAttachKeyParam() */ | ||
| 82 | /* cannot be used for this*/ | ||
| 83 | /* SW_COMMAND_CODE. */ | ||
| 84 | #define SW_ERR_NOT_IMPLEMENTED \ | ||
| 85 | (SW_ERR_BASE-15)/* Not implemented */ | ||
| 86 | #define SW_ERR_BAD_COMMAND (SW_ERR_BASE-16)/* Bad command code */ | ||
| 87 | #define SW_ERR_BAD_ITEM_SIZE (SW_ERR_BASE-17)/* too small or too large in */ | ||
| 88 | /* the "initems" or */ | ||
| 89 | /* "outitems". */ | ||
| 90 | #define SW_ERR_BAD_ACCNUM (SW_ERR_BASE-18)/* Bad accelerator number */ | ||
| 91 | #define SW_ERR_SELFTEST_FAIL (SW_ERR_BASE-19)/* At least one of the self */ | ||
| 92 | /* test fail, look at the */ | ||
| 93 | /* selfTestBitmap in */ | ||
| 94 | /* SW_ACCELERATOR_INFO for*/ | ||
| 95 | /* details. */ | ||
| 96 | #define SW_ERR_MISALIGN (SW_ERR_BASE-20)/* Certain alogrithms require*/ | ||
| 97 | /* key materials aligned */ | ||
| 98 | /* in certain order, e.g. */ | ||
| 99 | /* 128 bit for CRT */ | ||
| 100 | #define SW_ERR_OUTPUT_NULL_PTR \ | ||
| 101 | (SW_ERR_BASE-21)/* a required pointer is */ | ||
| 102 | /* NULL */ | ||
| 103 | #define SW_ERR_OUTPUT_SIZE \ | ||
| 104 | (SW_ERR_BASE-22)/* size is invalid, too */ | ||
| 105 | /* small, too large. */ | ||
| 106 | #define SW_ERR_FIRMWARE_CHECKSUM \ | ||
| 107 | (SW_ERR_BASE-23)/* firmware checksum mismatch*/ | ||
| 108 | /* download failed. */ | ||
| 109 | #define SW_ERR_UNKNOWN_FIRMWARE \ | ||
| 110 | (SW_ERR_BASE-24)/* unknown firmware error */ | ||
| 111 | #define SW_ERR_INTERRUPT (SW_ERR_BASE-25)/* request is abort when */ | ||
| 112 | /* it's waiting to be */ | ||
| 113 | /* completed. */ | ||
| 114 | #define SW_ERR_NVWRITE_FAIL (SW_ERR_BASE-26)/* error in writing to Non- */ | ||
| 115 | /* volatile memory */ | ||
| 116 | #define SW_ERR_NVWRITE_RANGE (SW_ERR_BASE-27)/* out of range error in */ | ||
| 117 | /* writing to NV memory */ | ||
| 118 | #define SW_ERR_RNG_ERROR (SW_ERR_BASE-28)/* Random Number Generation */ | ||
| 119 | /* failure */ | ||
| 120 | #define SW_ERR_DSS_FAILURE (SW_ERR_BASE-29)/* DSS Sign or Verify failure*/ | ||
| 121 | #define SW_ERR_MODEXP_FAILURE (SW_ERR_BASE-30)/* Failure in various math */ | ||
| 122 | /* calculations */ | ||
| 123 | #define SW_ERR_ONBOARD_MEMORY (SW_ERR_BASE-31)/* Error in accessing on - */ | ||
| 124 | /* board memory */ | ||
| 125 | #define SW_ERR_FIRMWARE_VERSION \ | ||
| 126 | (SW_ERR_BASE-32)/* Wrong version in firmware */ | ||
| 127 | /* update */ | ||
| 128 | #define SW_ERR_ZERO_WORKING_ACCELERATOR \ | ||
| 129 | (SW_ERR_BASE-44)/* All accelerators are bad */ | ||
| 130 | |||
| 131 | |||
| 132 | /* algorithm type */ | ||
| 133 | #define SW_ALG_CRT 1 | ||
| 134 | #define SW_ALG_EXP 2 | ||
| 135 | #define SW_ALG_DSA 3 | ||
| 136 | #define SW_ALG_NVDATA 4 | ||
| 137 | |||
| 138 | /* command code */ | ||
| 139 | #define SW_CMD_MODEXP_CRT 1 /* perform Modular Exponentiation using */ | ||
| 140 | /* Chinese Remainder Theorem (CRT) */ | ||
| 141 | #define SW_CMD_MODEXP 2 /* perform Modular Exponentiation */ | ||
| 142 | #define SW_CMD_DSS_SIGN 3 /* perform DSS sign */ | ||
| 143 | #define SW_CMD_DSS_VERIFY 4 /* perform DSS verify */ | ||
| 144 | #define SW_CMD_RAND 5 /* perform random number generation */ | ||
| 145 | #define SW_CMD_NVREAD 6 /* perform read to nonvolatile RAM */ | ||
| 146 | #define SW_CMD_NVWRITE 7 /* perform write to nonvolatile RAM */ | ||
| 147 | |||
| 148 | typedef SW_U32 SW_ALGTYPE; /* alogrithm type */ | ||
| 149 | typedef SW_U32 SW_STATE; /* state */ | ||
| 150 | typedef SW_U32 SW_COMMAND_CODE; /* command code */ | ||
| 151 | typedef SW_U32 SW_COMMAND_BITMAP[4]; /* bitmap */ | ||
| 152 | |||
| 153 | typedef struct _SW_LARGENUMBER { | ||
| 154 | SW_U32 nbytes; /* number of bytes in the buffer "value" */ | ||
| 155 | SW_BYTE* value; /* the large integer as a string of */ | ||
| 156 | /* bytes in network (big endian) order */ | ||
| 157 | } SW_LARGENUMBER; | ||
| 158 | |||
| 159 | typedef struct _SW_CRT { | ||
| 160 | SW_LARGENUMBER p; /* prime number p */ | ||
| 161 | SW_LARGENUMBER q; /* prime number q */ | ||
| 162 | SW_LARGENUMBER dmp1; /* exponent1 */ | ||
| 163 | SW_LARGENUMBER dmq1; /* exponent2 */ | ||
| 164 | SW_LARGENUMBER iqmp; /* CRT coefficient */ | ||
| 165 | } SW_CRT; | ||
| 166 | |||
| 167 | typedef struct _SW_EXP { | ||
| 168 | SW_LARGENUMBER modulus; /* modulus */ | ||
| 169 | SW_LARGENUMBER exponent;/* exponent */ | ||
| 170 | } SW_EXP; | ||
| 171 | |||
| 172 | typedef struct _SW_DSA { | ||
| 173 | SW_LARGENUMBER p; /* */ | ||
| 174 | SW_LARGENUMBER q; /* */ | ||
| 175 | SW_LARGENUMBER g; /* */ | ||
| 176 | SW_LARGENUMBER key; /* private/public key */ | ||
| 177 | } SW_DSA; | ||
| 178 | |||
| 179 | typedef struct _SW_NVDATA { | ||
| 180 | SW_U32 accnum; /* accelerator board number */ | ||
| 181 | SW_U32 offset; /* offset in byte */ | ||
| 182 | } SW_NVDATA; | ||
| 183 | |||
| 184 | typedef struct _SW_PARAM { | ||
| 185 | SW_ALGTYPE type; /* type of the alogrithm */ | ||
| 186 | union { | ||
| 187 | SW_CRT crt; | ||
| 188 | SW_EXP exp; | ||
| 189 | SW_DSA dsa; | ||
| 190 | SW_NVDATA nvdata; | ||
| 191 | } up; | ||
| 192 | } SW_PARAM; | ||
| 193 | |||
| 194 | typedef SW_U32 SW_CONTEXT_HANDLE; /* opaque context handle */ | ||
| 195 | |||
| 196 | |||
| 197 | /* Now the OpenSSL bits, these function types are the for the function | ||
| 198 | * pointers that will bound into the Rainbow shared libraries. */ | ||
| 199 | typedef SW_STATUS t_swAcquireAccContext(SW_CONTEXT_HANDLE *hac); | ||
| 200 | typedef SW_STATUS t_swAttachKeyParam(SW_CONTEXT_HANDLE hac, | ||
| 201 | SW_PARAM *key_params); | ||
| 202 | typedef SW_STATUS t_swSimpleRequest(SW_CONTEXT_HANDLE hac, | ||
| 203 | SW_COMMAND_CODE cmd, | ||
| 204 | SW_LARGENUMBER pin[], | ||
| 205 | SW_U32 pin_count, | ||
| 206 | SW_LARGENUMBER pout[], | ||
| 207 | SW_U32 pout_count); | ||
| 208 | typedef SW_STATUS t_swReleaseAccContext(SW_CONTEXT_HANDLE hac); | ||
| 209 | |||
| 210 | #ifdef __cplusplus | ||
| 211 | } | ||
| 212 | #endif /* __cplusplus */ | ||
| 213 | |||
diff --git a/src/lib/libssl/src/crypto/err/Makefile.ssl b/src/lib/libssl/src/crypto/err/Makefile.ssl index fb74e4eb13..cf94f406e4 100644 --- a/src/lib/libssl/src/crypto/err/Makefile.ssl +++ b/src/lib/libssl/src/crypto/err/Makefile.ssl | |||
| @@ -83,24 +83,28 @@ err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | |||
| 83 | err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 83 | err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 84 | err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 84 | err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 85 | err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 85 | err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 86 | err.o: ../../include/openssl/stack.h ../cryptlib.h | 86 | err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 87 | err.o: ../cryptlib.h | ||
| 87 | err_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 88 | err_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 88 | err_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 89 | err_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 89 | err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 90 | err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 90 | err_all.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 91 | err_all.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 91 | err_all.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 92 | err_all.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 92 | err_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 93 | err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h |
| 93 | err_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 94 | err_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 94 | err_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 95 | err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
| 95 | err_all.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 96 | err_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 96 | err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 97 | err_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 97 | err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 98 | err_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 98 | err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h | 99 | err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 99 | err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | 100 | err_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 100 | err_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 101 | err_all.o: ../../include/openssl/opensslv.h ../../include/openssl/pem2.h |
| 101 | err_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 102 | err_all.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h |
| 102 | err_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 103 | err_all.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 103 | err_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 104 | err_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 105 | err_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 106 | err_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 107 | err_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 104 | err_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 108 | err_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 105 | err_all.o: ../../include/openssl/x509v3.h | 109 | err_all.o: ../../include/openssl/x509v3.h |
| 106 | err_prn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 110 | err_prn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| @@ -108,4 +112,5 @@ err_prn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | |||
| 108 | err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 112 | err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 109 | err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 113 | err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 110 | err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 114 | err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 111 | err_prn.o: ../../include/openssl/stack.h ../cryptlib.h | 115 | err_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 116 | err_prn.o: ../cryptlib.h | ||
diff --git a/src/lib/libssl/src/crypto/err/err.c b/src/lib/libssl/src/crypto/err/err.c index eb8c76aa0b..99272e437c 100644 --- a/src/lib/libssl/src/crypto/err/err.c +++ b/src/lib/libssl/src/crypto/err/err.c | |||
| @@ -116,8 +116,8 @@ | |||
| 116 | #include <openssl/crypto.h> | 116 | #include <openssl/crypto.h> |
| 117 | #include "cryptlib.h" | 117 | #include "cryptlib.h" |
| 118 | #include <openssl/buffer.h> | 118 | #include <openssl/buffer.h> |
| 119 | #include <openssl/bio.h> | ||
| 119 | #include <openssl/err.h> | 120 | #include <openssl/err.h> |
| 120 | #include <openssl/crypto.h> | ||
| 121 | 121 | ||
| 122 | 122 | ||
| 123 | static LHASH *error_hash=NULL; | 123 | static LHASH *error_hash=NULL; |
| @@ -137,6 +137,7 @@ static ERR_STRING_DATA ERR_str_libraries[]= | |||
| 137 | {ERR_PACK(ERR_LIB_SYS,0,0) ,"system library"}, | 137 | {ERR_PACK(ERR_LIB_SYS,0,0) ,"system library"}, |
| 138 | {ERR_PACK(ERR_LIB_BN,0,0) ,"bignum routines"}, | 138 | {ERR_PACK(ERR_LIB_BN,0,0) ,"bignum routines"}, |
| 139 | {ERR_PACK(ERR_LIB_RSA,0,0) ,"rsa routines"}, | 139 | {ERR_PACK(ERR_LIB_RSA,0,0) ,"rsa routines"}, |
| 140 | {ERR_PACK(ERR_LIB_DSA,0,0) ,"dsa routines"}, | ||
| 140 | {ERR_PACK(ERR_LIB_DH,0,0) ,"Diffie-Hellman routines"}, | 141 | {ERR_PACK(ERR_LIB_DH,0,0) ,"Diffie-Hellman routines"}, |
| 141 | {ERR_PACK(ERR_LIB_EVP,0,0) ,"digital envelope routines"}, | 142 | {ERR_PACK(ERR_LIB_EVP,0,0) ,"digital envelope routines"}, |
| 142 | {ERR_PACK(ERR_LIB_BUF,0,0) ,"memory buffer routines"}, | 143 | {ERR_PACK(ERR_LIB_BUF,0,0) ,"memory buffer routines"}, |
| @@ -155,6 +156,8 @@ static ERR_STRING_DATA ERR_str_libraries[]= | |||
| 155 | {ERR_PACK(ERR_LIB_X509V3,0,0) ,"X509 V3 routines"}, | 156 | {ERR_PACK(ERR_LIB_X509V3,0,0) ,"X509 V3 routines"}, |
| 156 | {ERR_PACK(ERR_LIB_PKCS12,0,0) ,"PKCS12 routines"}, | 157 | {ERR_PACK(ERR_LIB_PKCS12,0,0) ,"PKCS12 routines"}, |
| 157 | {ERR_PACK(ERR_LIB_RAND,0,0) ,"random number generator"}, | 158 | {ERR_PACK(ERR_LIB_RAND,0,0) ,"random number generator"}, |
| 159 | {ERR_PACK(ERR_LIB_DSO,0,0) ,"DSO support routines"}, | ||
| 160 | {ERR_PACK(ERR_LIB_ENGINE,0,0) ,"engine routines"}, | ||
| 158 | {0,NULL}, | 161 | {0,NULL}, |
| 159 | }; | 162 | }; |
| 160 | 163 | ||
| @@ -205,6 +208,8 @@ static ERR_STRING_DATA ERR_str_reasons[]= | |||
| 205 | {ERR_R_EXPECTING_AN_ASN1_SEQUENCE ,"expecting an asn1 sequence"}, | 208 | {ERR_R_EXPECTING_AN_ASN1_SEQUENCE ,"expecting an asn1 sequence"}, |
| 206 | {ERR_R_ASN1_LENGTH_MISMATCH ,"asn1 length mismatch"}, | 209 | {ERR_R_ASN1_LENGTH_MISMATCH ,"asn1 length mismatch"}, |
| 207 | {ERR_R_MISSING_ASN1_EOS ,"missing asn1 eos"}, | 210 | {ERR_R_MISSING_ASN1_EOS ,"missing asn1 eos"}, |
| 211 | {ERR_R_DSO_LIB ,"DSO lib"}, | ||
| 212 | {ERR_R_ENGINE_LIB ,"ENGINE lib"}, | ||
| 208 | 213 | ||
| 209 | {0,NULL}, | 214 | {0,NULL}, |
| 210 | }; | 215 | }; |
| @@ -225,7 +230,7 @@ static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1]; | |||
| 225 | 230 | ||
| 226 | static void build_SYS_str_reasons() | 231 | static void build_SYS_str_reasons() |
| 227 | { | 232 | { |
| 228 | /* Malloc cannot be used here, use static storage instead */ | 233 | /* OPENSSL_malloc cannot be used here, use static storage instead */ |
| 229 | static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON]; | 234 | static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON]; |
| 230 | int i; | 235 | int i; |
| 231 | 236 | ||
| @@ -262,7 +267,7 @@ static void build_SYS_str_reasons() | |||
| 262 | if (((p)->err_data[i] != NULL) && \ | 267 | if (((p)->err_data[i] != NULL) && \ |
| 263 | (p)->err_data_flags[i] & ERR_TXT_MALLOCED) \ | 268 | (p)->err_data_flags[i] & ERR_TXT_MALLOCED) \ |
| 264 | { \ | 269 | { \ |
| 265 | Free((p)->err_data[i]); \ | 270 | OPENSSL_free((p)->err_data[i]); \ |
| 266 | (p)->err_data[i]=NULL; \ | 271 | (p)->err_data[i]=NULL; \ |
| 267 | } \ | 272 | } \ |
| 268 | (p)->err_data_flags[i]=0; | 273 | (p)->err_data_flags[i]=0; |
| @@ -278,7 +283,7 @@ static void ERR_STATE_free(ERR_STATE *s) | |||
| 278 | { | 283 | { |
| 279 | err_clear_data(s,i); | 284 | err_clear_data(s,i); |
| 280 | } | 285 | } |
| 281 | Free(s); | 286 | OPENSSL_free(s); |
| 282 | } | 287 | } |
| 283 | 288 | ||
| 284 | void ERR_load_ERR_strings(void) | 289 | void ERR_load_ERR_strings(void) |
| @@ -475,13 +480,11 @@ static unsigned long get_error_values(int inc, const char **file, int *line, | |||
| 475 | return(ret); | 480 | return(ret); |
| 476 | } | 481 | } |
| 477 | 482 | ||
| 478 | /* BAD for multi-threaded, uses a local buffer if ret == NULL */ | 483 | void ERR_error_string_n(unsigned long e, char *buf, size_t len) |
| 479 | char *ERR_error_string(unsigned long e, char *ret) | ||
| 480 | { | 484 | { |
| 481 | static char buf[256]; | 485 | char lsbuf[64], fsbuf[64], rsbuf[64]; |
| 482 | const char *ls,*fs,*rs; | 486 | const char *ls,*fs,*rs; |
| 483 | unsigned long l,f,r; | 487 | unsigned long l,f,r; |
| 484 | int i; | ||
| 485 | 488 | ||
| 486 | l=ERR_GET_LIB(e); | 489 | l=ERR_GET_LIB(e); |
| 487 | f=ERR_GET_FUNC(e); | 490 | f=ERR_GET_FUNC(e); |
| @@ -491,21 +494,50 @@ char *ERR_error_string(unsigned long e, char *ret) | |||
| 491 | fs=ERR_func_error_string(e); | 494 | fs=ERR_func_error_string(e); |
| 492 | rs=ERR_reason_error_string(e); | 495 | rs=ERR_reason_error_string(e); |
| 493 | 496 | ||
| 494 | if (ret == NULL) ret=buf; | 497 | if (ls == NULL) |
| 495 | 498 | BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); | |
| 496 | sprintf(&(ret[0]),"error:%08lX:",e); | ||
| 497 | i=strlen(ret); | ||
| 498 | if (ls == NULL) | ||
| 499 | sprintf(&(ret[i]),":lib(%lu) ",l); | ||
| 500 | else sprintf(&(ret[i]),"%s",ls); | ||
| 501 | i=strlen(ret); | ||
| 502 | if (fs == NULL) | 499 | if (fs == NULL) |
| 503 | sprintf(&(ret[i]),":func(%lu) ",f); | 500 | BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); |
| 504 | else sprintf(&(ret[i]),":%s",fs); | ||
| 505 | i=strlen(ret); | ||
| 506 | if (rs == NULL) | 501 | if (rs == NULL) |
| 507 | sprintf(&(ret[i]),":reason(%lu)",r); | 502 | BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); |
| 508 | else sprintf(&(ret[i]),":%s",rs); | 503 | |
| 504 | BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, | ||
| 505 | fs?fs:fsbuf, rs?rs:rsbuf); | ||
| 506 | if (strlen(buf) == len-1) | ||
| 507 | { | ||
| 508 | /* output may be truncated; make sure we always have 5 | ||
| 509 | * colon-separated fields, i.e. 4 colons ... */ | ||
| 510 | #define NUM_COLONS 4 | ||
| 511 | if (len > NUM_COLONS) /* ... if possible */ | ||
| 512 | { | ||
| 513 | int i; | ||
| 514 | char *s = buf; | ||
| 515 | |||
| 516 | for (i = 0; i < NUM_COLONS; i++) | ||
| 517 | { | ||
| 518 | char *colon = strchr(s, ':'); | ||
| 519 | if (colon == NULL || colon > &buf[len-1] - NUM_COLONS + i) | ||
| 520 | { | ||
| 521 | /* set colon no. i at last possible position | ||
| 522 | * (buf[len-1] is the terminating 0)*/ | ||
| 523 | colon = &buf[len-1] - NUM_COLONS + i; | ||
| 524 | *colon = ':'; | ||
| 525 | } | ||
| 526 | s = colon + 1; | ||
| 527 | } | ||
| 528 | } | ||
| 529 | } | ||
| 530 | } | ||
| 531 | |||
| 532 | /* BAD for multi-threading: uses a local buffer if ret == NULL */ | ||
| 533 | /* ERR_error_string_n should be used instead for ret != NULL | ||
| 534 | * as ERR_error_string cannot know how large the buffer is */ | ||
| 535 | char *ERR_error_string(unsigned long e, char *ret) | ||
| 536 | { | ||
| 537 | static char buf[256]; | ||
| 538 | |||
| 539 | if (ret == NULL) ret=buf; | ||
| 540 | ERR_error_string_n(e, ret, 256); | ||
| 509 | 541 | ||
| 510 | return(ret); | 542 | return(ret); |
| 511 | } | 543 | } |
| @@ -515,6 +547,7 @@ LHASH *ERR_get_string_table(void) | |||
| 515 | return(error_hash); | 547 | return(error_hash); |
| 516 | } | 548 | } |
| 517 | 549 | ||
| 550 | /* not thread-safe */ | ||
| 518 | LHASH *ERR_get_err_state_table(void) | 551 | LHASH *ERR_get_err_state_table(void) |
| 519 | { | 552 | { |
| 520 | return(thread_hash); | 553 | return(thread_hash); |
| @@ -527,7 +560,7 @@ const char *ERR_lib_error_string(unsigned long e) | |||
| 527 | 560 | ||
| 528 | l=ERR_GET_LIB(e); | 561 | l=ERR_GET_LIB(e); |
| 529 | 562 | ||
| 530 | CRYPTO_r_lock(CRYPTO_LOCK_ERR_HASH); | 563 | CRYPTO_w_lock(CRYPTO_LOCK_ERR_HASH); |
| 531 | 564 | ||
| 532 | if (error_hash != NULL) | 565 | if (error_hash != NULL) |
| 533 | { | 566 | { |
| @@ -535,7 +568,7 @@ const char *ERR_lib_error_string(unsigned long e) | |||
| 535 | p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d); | 568 | p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d); |
| 536 | } | 569 | } |
| 537 | 570 | ||
| 538 | CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH); | 571 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH); |
| 539 | 572 | ||
| 540 | return((p == NULL)?NULL:p->string); | 573 | return((p == NULL)?NULL:p->string); |
| 541 | } | 574 | } |
| @@ -548,7 +581,7 @@ const char *ERR_func_error_string(unsigned long e) | |||
| 548 | l=ERR_GET_LIB(e); | 581 | l=ERR_GET_LIB(e); |
| 549 | f=ERR_GET_FUNC(e); | 582 | f=ERR_GET_FUNC(e); |
| 550 | 583 | ||
| 551 | CRYPTO_r_lock(CRYPTO_LOCK_ERR_HASH); | 584 | CRYPTO_w_lock(CRYPTO_LOCK_ERR_HASH); |
| 552 | 585 | ||
| 553 | if (error_hash != NULL) | 586 | if (error_hash != NULL) |
| 554 | { | 587 | { |
| @@ -556,7 +589,7 @@ const char *ERR_func_error_string(unsigned long e) | |||
| 556 | p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d); | 589 | p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d); |
| 557 | } | 590 | } |
| 558 | 591 | ||
| 559 | CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH); | 592 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH); |
| 560 | 593 | ||
| 561 | return((p == NULL)?NULL:p->string); | 594 | return((p == NULL)?NULL:p->string); |
| 562 | } | 595 | } |
| @@ -569,7 +602,7 @@ const char *ERR_reason_error_string(unsigned long e) | |||
| 569 | l=ERR_GET_LIB(e); | 602 | l=ERR_GET_LIB(e); |
| 570 | r=ERR_GET_REASON(e); | 603 | r=ERR_GET_REASON(e); |
| 571 | 604 | ||
| 572 | CRYPTO_r_lock(CRYPTO_LOCK_ERR_HASH); | 605 | CRYPTO_w_lock(CRYPTO_LOCK_ERR_HASH); |
| 573 | 606 | ||
| 574 | if (error_hash != NULL) | 607 | if (error_hash != NULL) |
| 575 | { | 608 | { |
| @@ -582,7 +615,7 @@ const char *ERR_reason_error_string(unsigned long e) | |||
| 582 | } | 615 | } |
| 583 | } | 616 | } |
| 584 | 617 | ||
| 585 | CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH); | 618 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH); |
| 586 | 619 | ||
| 587 | return((p == NULL)?NULL:p->string); | 620 | return((p == NULL)?NULL:p->string); |
| 588 | } | 621 | } |
| @@ -613,7 +646,7 @@ static int pid_cmp(ERR_STATE *a, ERR_STATE *b) | |||
| 613 | 646 | ||
| 614 | void ERR_remove_state(unsigned long pid) | 647 | void ERR_remove_state(unsigned long pid) |
| 615 | { | 648 | { |
| 616 | ERR_STATE *p,tmp; | 649 | ERR_STATE *p = NULL,tmp; |
| 617 | 650 | ||
| 618 | if (thread_hash == NULL) | 651 | if (thread_hash == NULL) |
| 619 | return; | 652 | return; |
| @@ -621,7 +654,16 @@ void ERR_remove_state(unsigned long pid) | |||
| 621 | pid=(unsigned long)CRYPTO_thread_id(); | 654 | pid=(unsigned long)CRYPTO_thread_id(); |
| 622 | tmp.pid=pid; | 655 | tmp.pid=pid; |
| 623 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); | 656 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); |
| 624 | p=(ERR_STATE *)lh_delete(thread_hash,&tmp); | 657 | if (thread_hash) |
| 658 | { | ||
| 659 | p=(ERR_STATE *)lh_delete(thread_hash,&tmp); | ||
| 660 | if (lh_num_items(thread_hash) == 0) | ||
| 661 | { | ||
| 662 | /* make sure we don't leak memory */ | ||
| 663 | lh_free(thread_hash); | ||
| 664 | thread_hash = NULL; | ||
| 665 | } | ||
| 666 | } | ||
| 625 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); | 667 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); |
| 626 | 668 | ||
| 627 | if (p != NULL) ERR_STATE_free(p); | 669 | if (p != NULL) ERR_STATE_free(p); |
| @@ -630,39 +672,25 @@ void ERR_remove_state(unsigned long pid) | |||
| 630 | ERR_STATE *ERR_get_state(void) | 672 | ERR_STATE *ERR_get_state(void) |
| 631 | { | 673 | { |
| 632 | static ERR_STATE fallback; | 674 | static ERR_STATE fallback; |
| 633 | ERR_STATE *ret=NULL,tmp,*tmpp; | 675 | ERR_STATE *ret=NULL,tmp,*tmpp=NULL; |
| 676 | int thread_state_exists; | ||
| 634 | int i; | 677 | int i; |
| 635 | unsigned long pid; | 678 | unsigned long pid; |
| 636 | 679 | ||
| 637 | pid=(unsigned long)CRYPTO_thread_id(); | 680 | pid=(unsigned long)CRYPTO_thread_id(); |
| 638 | 681 | ||
| 639 | CRYPTO_r_lock(CRYPTO_LOCK_ERR); | 682 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); |
| 640 | if (thread_hash == NULL) | 683 | if (thread_hash != NULL) |
| 641 | { | ||
| 642 | CRYPTO_r_unlock(CRYPTO_LOCK_ERR); | ||
| 643 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); | ||
| 644 | if (thread_hash == NULL) | ||
| 645 | { | ||
| 646 | MemCheck_off(); | ||
| 647 | thread_hash=lh_new(pid_hash,pid_cmp); | ||
| 648 | MemCheck_on(); | ||
| 649 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); | ||
| 650 | if (thread_hash == NULL) return(&fallback); | ||
| 651 | } | ||
| 652 | else | ||
| 653 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); | ||
| 654 | } | ||
| 655 | else | ||
| 656 | { | 684 | { |
| 657 | tmp.pid=pid; | 685 | tmp.pid=pid; |
| 658 | ret=(ERR_STATE *)lh_retrieve(thread_hash,&tmp); | 686 | ret=(ERR_STATE *)lh_retrieve(thread_hash,&tmp); |
| 659 | CRYPTO_r_unlock(CRYPTO_LOCK_ERR); | ||
| 660 | } | 687 | } |
| 688 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); | ||
| 661 | 689 | ||
| 662 | /* ret == the error state, if NULL, make a new one */ | 690 | /* ret == the error state, if NULL, make a new one */ |
| 663 | if (ret == NULL) | 691 | if (ret == NULL) |
| 664 | { | 692 | { |
| 665 | ret=(ERR_STATE *)Malloc(sizeof(ERR_STATE)); | 693 | ret=(ERR_STATE *)OPENSSL_malloc(sizeof(ERR_STATE)); |
| 666 | if (ret == NULL) return(&fallback); | 694 | if (ret == NULL) return(&fallback); |
| 667 | ret->pid=pid; | 695 | ret->pid=pid; |
| 668 | ret->top=0; | 696 | ret->top=0; |
| @@ -672,9 +700,29 @@ ERR_STATE *ERR_get_state(void) | |||
| 672 | ret->err_data[i]=NULL; | 700 | ret->err_data[i]=NULL; |
| 673 | ret->err_data_flags[i]=0; | 701 | ret->err_data_flags[i]=0; |
| 674 | } | 702 | } |
| 703 | |||
| 675 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); | 704 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); |
| 676 | tmpp=(ERR_STATE *)lh_insert(thread_hash,ret); | 705 | |
| 706 | /* no entry yet in thread_hash for current thread - | ||
| 707 | * thus, it may have changed since we last looked at it */ | ||
| 708 | if (thread_hash == NULL) | ||
| 709 | thread_hash = lh_new(pid_hash, pid_cmp); | ||
| 710 | if (thread_hash == NULL) | ||
| 711 | thread_state_exists = 0; /* allocation error */ | ||
| 712 | else | ||
| 713 | { | ||
| 714 | tmpp=(ERR_STATE *)lh_insert(thread_hash,ret); | ||
| 715 | thread_state_exists = 1; | ||
| 716 | } | ||
| 717 | |||
| 677 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); | 718 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); |
| 719 | |||
| 720 | if (!thread_state_exists) | ||
| 721 | { | ||
| 722 | ERR_STATE_free(ret); /* could not insert it */ | ||
| 723 | return(&fallback); | ||
| 724 | } | ||
| 725 | |||
| 678 | if (tmpp != NULL) /* old entry - should not happen */ | 726 | if (tmpp != NULL) /* old entry - should not happen */ |
| 679 | { | 727 | { |
| 680 | ERR_STATE_free(tmpp); | 728 | ERR_STATE_free(tmpp); |
| @@ -712,7 +760,7 @@ void ERR_add_error_data(int num, ...) | |||
| 712 | char *str,*p,*a; | 760 | char *str,*p,*a; |
| 713 | 761 | ||
| 714 | s=64; | 762 | s=64; |
| 715 | str=Malloc(s+1); | 763 | str=OPENSSL_malloc(s+1); |
| 716 | if (str == NULL) return; | 764 | if (str == NULL) return; |
| 717 | str[0]='\0'; | 765 | str[0]='\0'; |
| 718 | 766 | ||
| @@ -728,10 +776,10 @@ void ERR_add_error_data(int num, ...) | |||
| 728 | if (n > s) | 776 | if (n > s) |
| 729 | { | 777 | { |
| 730 | s=n+20; | 778 | s=n+20; |
| 731 | p=Realloc(str,s+1); | 779 | p=OPENSSL_realloc(str,s+1); |
| 732 | if (p == NULL) | 780 | if (p == NULL) |
| 733 | { | 781 | { |
| 734 | Free(str); | 782 | OPENSSL_free(str); |
| 735 | return; | 783 | return; |
| 736 | } | 784 | } |
| 737 | else | 785 | else |
diff --git a/src/lib/libssl/src/crypto/err/err.h b/src/lib/libssl/src/crypto/err/err.h index 15bafbff43..7388a4a937 100644 --- a/src/lib/libssl/src/crypto/err/err.h +++ b/src/lib/libssl/src/crypto/err/err.h | |||
| @@ -59,12 +59,20 @@ | |||
| 59 | #ifndef HEADER_ERR_H | 59 | #ifndef HEADER_ERR_H |
| 60 | #define HEADER_ERR_H | 60 | #define HEADER_ERR_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifndef NO_FP_API | 62 | #ifndef NO_FP_API |
| 67 | #include <stdio.h> | 63 | #include <stdio.h> |
| 64 | #include <stdlib.h> | ||
| 65 | #endif | ||
| 66 | |||
| 67 | #ifndef NO_BIO | ||
| 68 | #include <openssl/bio.h> | ||
| 69 | #endif | ||
| 70 | #ifndef NO_LHASH | ||
| 71 | #include <openssl/lhash.h> | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #ifdef __cplusplus | ||
| 75 | extern "C" { | ||
| 68 | #endif | 76 | #endif |
| 69 | 77 | ||
| 70 | /* The following is a bit of a trick to help the object files only contain | 78 | /* The following is a bit of a trick to help the object files only contain |
| @@ -123,6 +131,8 @@ typedef struct err_state_st | |||
| 123 | #define ERR_LIB_X509V3 34 | 131 | #define ERR_LIB_X509V3 34 |
| 124 | #define ERR_LIB_PKCS12 35 | 132 | #define ERR_LIB_PKCS12 35 |
| 125 | #define ERR_LIB_RAND 36 | 133 | #define ERR_LIB_RAND 36 |
| 134 | #define ERR_LIB_DSO 37 | ||
| 135 | #define ERR_LIB_ENGINE 38 | ||
| 126 | 136 | ||
| 127 | #define ERR_LIB_USER 128 | 137 | #define ERR_LIB_USER 128 |
| 128 | 138 | ||
| @@ -151,6 +161,8 @@ typedef struct err_state_st | |||
| 151 | #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__) | 161 | #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__) |
| 152 | #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__) | 162 | #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__) |
| 153 | #define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),ERR_file_name,__LINE__) | 163 | #define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),ERR_file_name,__LINE__) |
| 164 | #define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),ERR_file_name,__LINE__) | ||
| 165 | #define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),ERR_file_name,__LINE__) | ||
| 154 | 166 | ||
| 155 | /* Borland C seems too stupid to be able to shift and do longs in | 167 | /* Borland C seems too stupid to be able to shift and do longs in |
| 156 | * the pre-processor :-( */ | 168 | * the pre-processor :-( */ |
| @@ -199,6 +211,8 @@ typedef struct err_state_st | |||
| 199 | #define ERR_R_BIO_LIB ERR_LIB_BIO | 211 | #define ERR_R_BIO_LIB ERR_LIB_BIO |
| 200 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 | 212 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 |
| 201 | #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 | 213 | #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 |
| 214 | #define ERR_R_DSO_LIB ERR_LIB_DSO | ||
| 215 | #define ERR_R_ENGINE_LIB ERR_LIB_ENGINE | ||
| 202 | 216 | ||
| 203 | /* fatal error */ | 217 | /* fatal error */ |
| 204 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) | 218 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) |
| @@ -230,13 +244,14 @@ unsigned long ERR_peek_error_line_data(const char **file,int *line, | |||
| 230 | const char **data,int *flags); | 244 | const char **data,int *flags); |
| 231 | void ERR_clear_error(void ); | 245 | void ERR_clear_error(void ); |
| 232 | char *ERR_error_string(unsigned long e,char *buf); | 246 | char *ERR_error_string(unsigned long e,char *buf); |
| 247 | void ERR_error_string_n(unsigned long e, char *buf, size_t len); | ||
| 233 | const char *ERR_lib_error_string(unsigned long e); | 248 | const char *ERR_lib_error_string(unsigned long e); |
| 234 | const char *ERR_func_error_string(unsigned long e); | 249 | const char *ERR_func_error_string(unsigned long e); |
| 235 | const char *ERR_reason_error_string(unsigned long e); | 250 | const char *ERR_reason_error_string(unsigned long e); |
| 236 | #ifndef NO_FP_API | 251 | #ifndef NO_FP_API |
| 237 | void ERR_print_errors_fp(FILE *fp); | 252 | void ERR_print_errors_fp(FILE *fp); |
| 238 | #endif | 253 | #endif |
| 239 | #ifdef HEADER_BIO_H | 254 | #ifndef NO_BIO |
| 240 | void ERR_print_errors(BIO *bp); | 255 | void ERR_print_errors(BIO *bp); |
| 241 | void ERR_add_error_data(int num, ...); | 256 | void ERR_add_error_data(int num, ...); |
| 242 | #endif | 257 | #endif |
| @@ -248,15 +263,13 @@ void ERR_free_strings(void); | |||
| 248 | void ERR_remove_state(unsigned long pid); /* if zero we look it up */ | 263 | void ERR_remove_state(unsigned long pid); /* if zero we look it up */ |
| 249 | ERR_STATE *ERR_get_state(void); | 264 | ERR_STATE *ERR_get_state(void); |
| 250 | 265 | ||
| 251 | #ifdef HEADER_LHASH_H | 266 | #ifndef NO_LHASH |
| 252 | LHASH *ERR_get_string_table(void ); | 267 | LHASH *ERR_get_string_table(void); |
| 253 | LHASH *ERR_get_err_state_table(void ); | 268 | LHASH *ERR_get_err_state_table(void); /* even less thread-safe than |
| 254 | #else | 269 | * ERR_get_string_table :-) */ |
| 255 | char *ERR_get_string_table(void ); | ||
| 256 | char *ERR_get_err_state_table(void ); | ||
| 257 | #endif | 270 | #endif |
| 258 | 271 | ||
| 259 | int ERR_get_next_error_library(void ); | 272 | int ERR_get_next_error_library(void); |
| 260 | 273 | ||
| 261 | #ifdef __cplusplus | 274 | #ifdef __cplusplus |
| 262 | } | 275 | } |
diff --git a/src/lib/libssl/src/crypto/err/err_all.c b/src/lib/libssl/src/crypto/err/err_all.c index 10c463b389..b8315d8272 100644 --- a/src/lib/libssl/src/crypto/err/err_all.c +++ b/src/lib/libssl/src/crypto/err/err_all.c | |||
| @@ -81,6 +81,8 @@ | |||
| 81 | #include <openssl/conf.h> | 81 | #include <openssl/conf.h> |
| 82 | #include <openssl/pkcs12.h> | 82 | #include <openssl/pkcs12.h> |
| 83 | #include <openssl/rand.h> | 83 | #include <openssl/rand.h> |
| 84 | #include <openssl/dso.h> | ||
| 85 | #include <openssl/engine.h> | ||
| 84 | #include <openssl/err.h> | 86 | #include <openssl/err.h> |
| 85 | 87 | ||
| 86 | void ERR_load_crypto_strings(void) | 88 | void ERR_load_crypto_strings(void) |
| @@ -118,5 +120,7 @@ void ERR_load_crypto_strings(void) | |||
| 118 | ERR_load_PKCS7_strings(); | 120 | ERR_load_PKCS7_strings(); |
| 119 | ERR_load_PKCS12_strings(); | 121 | ERR_load_PKCS12_strings(); |
| 120 | ERR_load_RAND_strings(); | 122 | ERR_load_RAND_strings(); |
| 123 | ERR_load_DSO_strings(); | ||
| 124 | ERR_load_ENGINE_strings(); | ||
| 121 | #endif | 125 | #endif |
| 122 | } | 126 | } |
diff --git a/src/lib/libssl/src/crypto/err/err_prn.c b/src/lib/libssl/src/crypto/err/err_prn.c index 0999ff214b..6f60b016c3 100644 --- a/src/lib/libssl/src/crypto/err/err_prn.c +++ b/src/lib/libssl/src/crypto/err/err_prn.c | |||
| @@ -76,7 +76,8 @@ void ERR_print_errors_fp(FILE *fp) | |||
| 76 | es=CRYPTO_thread_id(); | 76 | es=CRYPTO_thread_id(); |
| 77 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) | 77 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) |
| 78 | { | 78 | { |
| 79 | fprintf(fp,"%lu:%s:%s:%d:%s\n",es,ERR_error_string(l,buf), | 79 | ERR_error_string_n(l, buf, sizeof buf); |
| 80 | fprintf(fp,"%lu:%s:%s:%d:%s\n",es,buf, | ||
| 80 | file,line,(flags&ERR_TXT_STRING)?data:""); | 81 | file,line,(flags&ERR_TXT_STRING)?data:""); |
| 81 | } | 82 | } |
| 82 | } | 83 | } |
| @@ -94,7 +95,8 @@ void ERR_print_errors(BIO *bp) | |||
| 94 | es=CRYPTO_thread_id(); | 95 | es=CRYPTO_thread_id(); |
| 95 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) | 96 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) |
| 96 | { | 97 | { |
| 97 | sprintf(buf2,"%lu:%s:%s:%d:",es,ERR_error_string(l,buf), | 98 | ERR_error_string_n(l, buf, sizeof buf); |
| 99 | sprintf(buf2,"%lu:%s:%s:%d:",es,buf, | ||
| 98 | file,line); | 100 | file,line); |
| 99 | BIO_write(bp,buf2,strlen(buf2)); | 101 | BIO_write(bp,buf2,strlen(buf2)); |
| 100 | if (flags & ERR_TXT_STRING) | 102 | if (flags & ERR_TXT_STRING) |
diff --git a/src/lib/libssl/src/crypto/err/openssl.ec b/src/lib/libssl/src/crypto/err/openssl.ec index e132ba3182..861d680e07 100644 --- a/src/lib/libssl/src/crypto/err/openssl.ec +++ b/src/lib/libssl/src/crypto/err/openssl.ec | |||
| @@ -3,6 +3,7 @@ L CRYPTO crypto/crypto.h crypto/cpt_err.c | |||
| 3 | L BN crypto/bn/bn.h crypto/bn/bn_err.c | 3 | L BN crypto/bn/bn.h crypto/bn/bn_err.c |
| 4 | L RSA crypto/rsa/rsa.h crypto/rsa/rsa_err.c | 4 | L RSA crypto/rsa/rsa.h crypto/rsa/rsa_err.c |
| 5 | L DSA crypto/dsa/dsa.h crypto/dsa/dsa_err.c | 5 | L DSA crypto/dsa/dsa.h crypto/dsa/dsa_err.c |
| 6 | L DSO crypto/dso/dso.h crypto/dso/dso_err.c | ||
| 6 | L DH crypto/dh/dh.h crypto/dh/dh_err.c | 7 | L DH crypto/dh/dh.h crypto/dh/dh_err.c |
| 7 | L EVP crypto/evp/evp.h crypto/evp/evp_err.c | 8 | L EVP crypto/evp/evp.h crypto/evp/evp_err.c |
| 8 | L BUF crypto/buffer/buffer.h crypto/buffer/buf_err.c | 9 | L BUF crypto/buffer/buffer.h crypto/buffer/buf_err.c |
| @@ -22,6 +23,7 @@ L RSAREF rsaref/rsaref.h rsaref/rsar_err.c | |||
| 22 | L SSL ssl/ssl.h ssl/ssl_err.c | 23 | L SSL ssl/ssl.h ssl/ssl_err.c |
| 23 | L COMP crypto/comp/comp.h crypto/comp/comp_err.c | 24 | L COMP crypto/comp/comp.h crypto/comp/comp_err.c |
| 24 | L RAND crypto/rand/rand.h crypto/rand/rand_err.c | 25 | L RAND crypto/rand/rand.h crypto/rand/rand_err.c |
| 26 | L ENGINE crypto/engine/engine.h crypto/engine/engine_err.c | ||
| 25 | 27 | ||
| 26 | 28 | ||
| 27 | F RSAREF_F_RSA_BN2BIN | 29 | F RSAREF_F_RSA_BN2BIN |
diff --git a/src/lib/libssl/src/crypto/evp/Makefile.ssl b/src/lib/libssl/src/crypto/evp/Makefile.ssl index c763b5ccd6..ad39fcc9e7 100644 --- a/src/lib/libssl/src/crypto/evp/Makefile.ssl +++ b/src/lib/libssl/src/crypto/evp/Makefile.ssl | |||
| @@ -23,32 +23,22 @@ APPS= | |||
| 23 | 23 | ||
| 24 | LIB=$(TOP)/libcrypto.a | 24 | LIB=$(TOP)/libcrypto.a |
| 25 | LIBSRC= encode.c digest.c evp_enc.c evp_key.c \ | 25 | LIBSRC= encode.c digest.c evp_enc.c evp_key.c \ |
| 26 | e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c \ | 26 | e_des.c e_bf.c e_idea.c e_des3.c \ |
| 27 | e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c \ | 27 | e_rc4.c names.c \ |
| 28 | e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c \ | 28 | e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ |
| 29 | e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c \ | 29 | m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \ |
| 30 | e_ecb_r2.c e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c \ | 30 | m_dss.c m_dss1.c m_mdc2.c m_ripemd.c \ |
| 31 | e_ecb_bf.c e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c \ | ||
| 32 | e_ecb_c.c e_cbc_c.c e_cfb_c.c e_ofb_c.c \ | ||
| 33 | e_ecb_r5.c e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c \ | ||
| 34 | m_null.c m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c m_dss1.c m_mdc2.c \ | ||
| 35 | m_ripemd.c \ | ||
| 36 | p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ | 31 | p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ |
| 37 | bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \ | 32 | bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \ |
| 38 | c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \ | 33 | c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \ |
| 39 | evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c | 34 | evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c |
| 40 | 35 | ||
| 41 | LIBOBJ= encode.o digest.o evp_enc.o evp_key.o \ | 36 | LIBOBJ= encode.o digest.o evp_enc.o evp_key.o \ |
| 42 | e_ecb_d.o e_cbc_d.o e_cfb_d.o e_ofb_d.o \ | 37 | e_des.o e_bf.o e_idea.o e_des3.o \ |
| 43 | e_ecb_i.o e_cbc_i.o e_cfb_i.o e_ofb_i.o \ | 38 | e_rc4.o names.o \ |
| 44 | e_ecb_3d.o e_cbc_3d.o e_rc4.o names.o \ | 39 | e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \ |
| 45 | e_cfb_3d.o e_ofb_3d.o e_xcbc_d.o \ | 40 | m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \ |
| 46 | e_ecb_r2.o e_cbc_r2.o e_cfb_r2.o e_ofb_r2.o \ | 41 | m_dss.o m_dss1.o m_mdc2.o m_ripemd.o \ |
| 47 | e_ecb_bf.o e_cbc_bf.o e_cfb_bf.o e_ofb_bf.o \ | ||
| 48 | e_ecb_c.o e_cbc_c.o e_cfb_c.o e_ofb_c.o \ | ||
| 49 | e_ecb_r5.o e_cbc_r5.o e_cfb_r5.o e_ofb_r5.o \ | ||
| 50 | m_null.o m_md2.o m_md5.o m_sha.o m_sha1.o m_dss.o m_dss1.o m_mdc2.o \ | ||
| 51 | m_ripemd.o \ | ||
| 52 | p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \ | 42 | p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \ |
| 53 | bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \ | 43 | bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \ |
| 54 | c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \ | 44 | c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \ |
| @@ -114,14 +104,16 @@ bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 114 | bio_b64.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 104 | bio_b64.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 115 | bio_b64.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 105 | bio_b64.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 116 | bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 106 | bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 117 | bio_b64.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 107 | bio_b64.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 108 | bio_b64.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 118 | bio_b64.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 109 | bio_b64.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 119 | bio_b64.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 110 | bio_b64.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 120 | bio_b64.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 111 | bio_b64.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 121 | bio_b64.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 112 | bio_b64.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 122 | bio_b64.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 113 | bio_b64.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 123 | bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 114 | bio_b64.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 124 | bio_b64.o: ../../include/openssl/stack.h ../cryptlib.h | 115 | bio_b64.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 116 | bio_b64.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 125 | bio_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 117 | bio_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 126 | bio_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 118 | bio_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 127 | bio_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 119 | bio_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -129,14 +121,16 @@ bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 129 | bio_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 121 | bio_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 130 | bio_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 122 | bio_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 131 | bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 123 | bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 132 | bio_enc.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 124 | bio_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 125 | bio_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 133 | bio_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 126 | bio_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 134 | bio_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 127 | bio_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 135 | bio_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 128 | bio_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 136 | bio_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 129 | bio_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 137 | bio_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 130 | bio_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 138 | bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 131 | bio_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 139 | bio_enc.o: ../../include/openssl/stack.h ../cryptlib.h | 132 | bio_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 133 | bio_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 140 | bio_md.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 134 | bio_md.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 141 | bio_md.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 135 | bio_md.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 142 | bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 136 | bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -144,14 +138,16 @@ bio_md.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 144 | bio_md.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 138 | bio_md.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 145 | bio_md.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 139 | bio_md.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 146 | bio_md.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 140 | bio_md.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 147 | bio_md.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 141 | bio_md.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 142 | bio_md.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 148 | bio_md.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 143 | bio_md.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 149 | bio_md.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 144 | bio_md.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 150 | bio_md.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 145 | bio_md.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 151 | bio_md.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 146 | bio_md.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 152 | bio_md.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 147 | bio_md.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 153 | bio_md.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 148 | bio_md.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 154 | bio_md.o: ../../include/openssl/stack.h ../cryptlib.h | 149 | bio_md.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 150 | bio_md.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 155 | bio_ok.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 151 | bio_ok.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 156 | bio_ok.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 152 | bio_ok.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 157 | bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 153 | bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -159,14 +155,16 @@ bio_ok.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 159 | bio_ok.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 155 | bio_ok.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 160 | bio_ok.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 156 | bio_ok.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 161 | bio_ok.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 157 | bio_ok.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 162 | bio_ok.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 158 | bio_ok.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 159 | bio_ok.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 163 | bio_ok.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 160 | bio_ok.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 164 | bio_ok.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 161 | bio_ok.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 165 | bio_ok.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 162 | bio_ok.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 166 | bio_ok.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 163 | bio_ok.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 167 | bio_ok.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 164 | bio_ok.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 168 | bio_ok.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 165 | bio_ok.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 169 | bio_ok.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 166 | bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 167 | bio_ok.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 170 | bio_ok.o: ../cryptlib.h | 168 | bio_ok.o: ../cryptlib.h |
| 171 | c_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 169 | c_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 172 | c_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 170 | c_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -175,14 +173,16 @@ c_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 175 | c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 173 | c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 176 | c_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 174 | c_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 177 | c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 175 | c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 178 | c_all.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 176 | c_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 177 | c_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 179 | c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 178 | c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 180 | c_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 179 | c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 181 | c_all.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 180 | c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 182 | c_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 181 | c_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 183 | c_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 182 | c_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 184 | c_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 183 | c_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 185 | c_all.o: ../../include/openssl/stack.h ../cryptlib.h | 184 | c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 185 | c_all.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 186 | c_allc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 186 | c_allc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 187 | c_allc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 187 | c_allc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 188 | c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 188 | c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -190,15 +190,17 @@ c_allc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 190 | c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 190 | c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 191 | c_allc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 191 | c_allc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 192 | c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 192 | c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 193 | c_allc.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 193 | c_allc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 194 | c_allc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 194 | c_allc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 195 | c_allc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 195 | c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 196 | c_allc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 196 | c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 197 | c_allc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 197 | c_allc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 198 | c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h |
| 198 | c_allc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 199 | c_allc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 199 | c_allc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 200 | c_allc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 200 | c_allc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 201 | c_allc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 201 | c_allc.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 202 | c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 203 | c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 202 | c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 204 | c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 203 | c_alld.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 205 | c_alld.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 204 | c_alld.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 206 | c_alld.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -207,15 +209,17 @@ c_alld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 207 | c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 209 | c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 208 | c_alld.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 210 | c_alld.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 209 | c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 211 | c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 210 | c_alld.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 212 | c_alld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 213 | c_alld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 211 | c_alld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 214 | c_alld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 212 | c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 215 | c_alld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 213 | c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h | 216 | c_alld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 214 | c_alld.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 217 | c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h |
| 215 | c_alld.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 218 | c_alld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 216 | c_alld.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 219 | c_alld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 217 | c_alld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 220 | c_alld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 218 | c_alld.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 221 | c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 222 | c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 219 | c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 223 | c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 220 | digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 224 | digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 221 | digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 225 | digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -224,329 +228,101 @@ digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 224 | digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 228 | digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 225 | digest.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 229 | digest.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 226 | digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 230 | digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 227 | digest.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 231 | digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 232 | digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 228 | digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 233 | digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 229 | digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 234 | digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 230 | digest.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 235 | digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 231 | digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 236 | digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 232 | digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 237 | digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 233 | digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 238 | digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 234 | digest.o: ../../include/openssl/stack.h ../cryptlib.h | 239 | digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 235 | e_cbc_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 240 | digest.o: ../../include/openssl/symhacks.h ../cryptlib.h |
| 236 | e_cbc_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 241 | e_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 237 | e_cbc_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 242 | e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 238 | e_cbc_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 243 | e_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 239 | e_cbc_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 244 | e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 240 | e_cbc_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 245 | e_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 241 | e_cbc_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 246 | e_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 242 | e_cbc_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 247 | e_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 243 | e_cbc_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 248 | e_bf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 244 | e_cbc_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 249 | e_bf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 245 | e_cbc_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 250 | e_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 246 | e_cbc_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 251 | e_bf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 247 | e_cbc_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 252 | e_bf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 248 | e_cbc_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 253 | e_bf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 249 | e_cbc_3d.o: ../../include/openssl/stack.h ../cryptlib.h | 254 | e_bf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 250 | e_cbc_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 255 | e_bf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 251 | e_cbc_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 256 | e_bf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 252 | e_cbc_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 257 | e_bf.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h |
| 253 | e_cbc_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 258 | e_cast.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 254 | e_cbc_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 259 | e_cast.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 255 | e_cbc_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 260 | e_cast.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 256 | e_cbc_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 261 | e_cast.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 257 | e_cbc_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 262 | e_cast.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 258 | e_cbc_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 263 | e_cast.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 259 | e_cbc_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 264 | e_cast.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 260 | e_cbc_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 265 | e_cast.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 261 | e_cbc_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 266 | e_cast.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 262 | e_cbc_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 267 | e_cast.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 263 | e_cbc_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 268 | e_cast.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 264 | e_cbc_bf.o: ../../include/openssl/stack.h ../cryptlib.h | 269 | e_cast.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 265 | e_cbc_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 270 | e_cast.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 266 | e_cbc_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 271 | e_cast.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 267 | e_cbc_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 272 | e_cast.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 268 | e_cbc_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 273 | e_cast.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 269 | e_cbc_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 274 | e_cast.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h |
| 270 | e_cbc_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 275 | e_des.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 271 | e_cbc_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 276 | e_des.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 272 | e_cbc_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 277 | e_des.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 273 | e_cbc_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 278 | e_des.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 274 | e_cbc_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 279 | e_des.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 275 | e_cbc_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 280 | e_des.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 276 | e_cbc_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 281 | e_des.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 277 | e_cbc_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 282 | e_des.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 278 | e_cbc_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 283 | e_des.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 279 | e_cbc_c.o: ../../include/openssl/stack.h ../cryptlib.h | 284 | e_des.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 280 | e_cbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 285 | e_des.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 281 | e_cbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 286 | e_des.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 282 | e_cbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 287 | e_des.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 283 | e_cbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 288 | e_des.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 284 | e_cbc_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 289 | e_des.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 285 | e_cbc_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 290 | e_des.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 286 | e_cbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 291 | e_des.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h |
| 287 | e_cbc_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 292 | e_des3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 288 | e_cbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 293 | e_des3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 289 | e_cbc_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 294 | e_des3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 290 | e_cbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 295 | e_des3.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 291 | e_cbc_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 296 | e_des3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 292 | e_cbc_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 297 | e_des3.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 293 | e_cbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 298 | e_des3.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 294 | e_cbc_d.o: ../../include/openssl/stack.h ../cryptlib.h | 299 | e_des3.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 295 | e_cbc_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 300 | e_des3.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 296 | e_cbc_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 301 | e_des3.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 297 | e_cbc_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 302 | e_des3.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 298 | e_cbc_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 303 | e_des3.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 299 | e_cbc_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 304 | e_des3.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 300 | e_cbc_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 305 | e_des3.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 301 | e_cbc_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 306 | e_des3.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 302 | e_cbc_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 307 | e_des3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 303 | e_cbc_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 308 | e_des3.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h |
| 304 | e_cbc_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 309 | e_idea.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 305 | e_cbc_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 310 | e_idea.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 306 | e_cbc_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 311 | e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 307 | e_cbc_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 312 | e_idea.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 308 | e_cbc_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 313 | e_idea.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 309 | e_cbc_i.o: ../../include/openssl/stack.h ../cryptlib.h | 314 | e_idea.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 310 | e_cbc_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 315 | e_idea.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 311 | e_cbc_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 316 | e_idea.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 312 | e_cbc_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 317 | e_idea.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 313 | e_cbc_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 318 | e_idea.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 314 | e_cbc_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 319 | e_idea.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 315 | e_cbc_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 320 | e_idea.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 316 | e_cbc_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 321 | e_idea.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 317 | e_cbc_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 322 | e_idea.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 318 | e_cbc_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 323 | e_idea.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 319 | e_cbc_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 324 | e_idea.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 320 | e_cbc_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 325 | e_idea.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h |
| 321 | e_cbc_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 322 | e_cbc_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 323 | e_cbc_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 324 | e_cbc_r2.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 325 | e_cbc_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 326 | e_cbc_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 327 | e_cbc_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 328 | e_cbc_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 329 | e_cbc_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 330 | e_cbc_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 331 | e_cbc_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 332 | e_cbc_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 333 | e_cbc_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 334 | e_cbc_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 335 | e_cbc_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 336 | e_cbc_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 337 | e_cbc_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 338 | e_cbc_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 339 | e_cbc_r5.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 340 | e_cfb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 341 | e_cfb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 342 | e_cfb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 343 | e_cfb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 344 | e_cfb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 345 | e_cfb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 346 | e_cfb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 347 | e_cfb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 348 | e_cfb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 349 | e_cfb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 350 | e_cfb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 351 | e_cfb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 352 | e_cfb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 353 | e_cfb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 354 | e_cfb_3d.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 355 | e_cfb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 356 | e_cfb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 357 | e_cfb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 358 | e_cfb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 359 | e_cfb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 360 | e_cfb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 361 | e_cfb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 362 | e_cfb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 363 | e_cfb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 364 | e_cfb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 365 | e_cfb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 366 | e_cfb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 367 | e_cfb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 368 | e_cfb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 369 | e_cfb_bf.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 370 | e_cfb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 371 | e_cfb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 372 | e_cfb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 373 | e_cfb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 374 | e_cfb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 375 | e_cfb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 376 | e_cfb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 377 | e_cfb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 378 | e_cfb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 379 | e_cfb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 380 | e_cfb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 381 | e_cfb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 382 | e_cfb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 383 | e_cfb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 384 | e_cfb_c.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 385 | e_cfb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 386 | e_cfb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 387 | e_cfb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 388 | e_cfb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 389 | e_cfb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 390 | e_cfb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 391 | e_cfb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 392 | e_cfb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 393 | e_cfb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 394 | e_cfb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 395 | e_cfb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 396 | e_cfb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 397 | e_cfb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 398 | e_cfb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 399 | e_cfb_d.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 400 | e_cfb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 401 | e_cfb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 402 | e_cfb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 403 | e_cfb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 404 | e_cfb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 405 | e_cfb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 406 | e_cfb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 407 | e_cfb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 408 | e_cfb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 409 | e_cfb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 410 | e_cfb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 411 | e_cfb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 412 | e_cfb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 413 | e_cfb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 414 | e_cfb_i.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 415 | e_cfb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 416 | e_cfb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 417 | e_cfb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 418 | e_cfb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 419 | e_cfb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 420 | e_cfb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 421 | e_cfb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 422 | e_cfb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 423 | e_cfb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 424 | e_cfb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 425 | e_cfb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 426 | e_cfb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 427 | e_cfb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 428 | e_cfb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 429 | e_cfb_r2.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 430 | e_cfb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 431 | e_cfb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 432 | e_cfb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 433 | e_cfb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 434 | e_cfb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 435 | e_cfb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 436 | e_cfb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 437 | e_cfb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 438 | e_cfb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 439 | e_cfb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 440 | e_cfb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 441 | e_cfb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 442 | e_cfb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 443 | e_cfb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 444 | e_cfb_r5.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 445 | e_ecb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 446 | e_ecb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 447 | e_ecb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 448 | e_ecb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 449 | e_ecb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 450 | e_ecb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 451 | e_ecb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 452 | e_ecb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 453 | e_ecb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 454 | e_ecb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 455 | e_ecb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 456 | e_ecb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 457 | e_ecb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 458 | e_ecb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 459 | e_ecb_3d.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 460 | e_ecb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 461 | e_ecb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 462 | e_ecb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 463 | e_ecb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 464 | e_ecb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 465 | e_ecb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 466 | e_ecb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 467 | e_ecb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 468 | e_ecb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 469 | e_ecb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 470 | e_ecb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 471 | e_ecb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 472 | e_ecb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 473 | e_ecb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 474 | e_ecb_bf.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 475 | e_ecb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 476 | e_ecb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 477 | e_ecb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 478 | e_ecb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 479 | e_ecb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 480 | e_ecb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 481 | e_ecb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 482 | e_ecb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 483 | e_ecb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 484 | e_ecb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 485 | e_ecb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 486 | e_ecb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 487 | e_ecb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 488 | e_ecb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 489 | e_ecb_c.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 490 | e_ecb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 491 | e_ecb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 492 | e_ecb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 493 | e_ecb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 494 | e_ecb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 495 | e_ecb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 496 | e_ecb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 497 | e_ecb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 498 | e_ecb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 499 | e_ecb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 500 | e_ecb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 501 | e_ecb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 502 | e_ecb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 503 | e_ecb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 504 | e_ecb_d.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 505 | e_ecb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 506 | e_ecb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 507 | e_ecb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 508 | e_ecb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 509 | e_ecb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 510 | e_ecb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 511 | e_ecb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 512 | e_ecb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 513 | e_ecb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 514 | e_ecb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 515 | e_ecb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 516 | e_ecb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 517 | e_ecb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 518 | e_ecb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 519 | e_ecb_i.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 520 | e_ecb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 521 | e_ecb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 522 | e_ecb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 523 | e_ecb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 524 | e_ecb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 525 | e_ecb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 526 | e_ecb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 527 | e_ecb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 528 | e_ecb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 529 | e_ecb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 530 | e_ecb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 531 | e_ecb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 532 | e_ecb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 533 | e_ecb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 534 | e_ecb_r2.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 535 | e_ecb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 536 | e_ecb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 537 | e_ecb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 538 | e_ecb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 539 | e_ecb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 540 | e_ecb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 541 | e_ecb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 542 | e_ecb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 543 | e_ecb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 544 | e_ecb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 545 | e_ecb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 546 | e_ecb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 547 | e_ecb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 548 | e_ecb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 549 | e_ecb_r5.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 550 | e_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 326 | e_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 551 | e_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 327 | e_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 552 | e_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 328 | e_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -554,119 +330,33 @@ e_null.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 554 | e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 330 | e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 555 | e_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 331 | e_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 556 | e_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 332 | e_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 557 | e_null.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 333 | e_null.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 334 | e_null.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 558 | e_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 335 | e_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 559 | e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 336 | e_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 560 | e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 337 | e_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 561 | e_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 338 | e_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 562 | e_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 339 | e_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 563 | e_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 340 | e_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 564 | e_null.o: ../../include/openssl/stack.h ../cryptlib.h | 341 | e_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 565 | e_ofb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 342 | e_null.o: ../../include/openssl/symhacks.h ../cryptlib.h |
| 566 | e_ofb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 343 | e_rc2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 567 | e_ofb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 344 | e_rc2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 568 | e_ofb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 345 | e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 569 | e_ofb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 346 | e_rc2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 570 | e_ofb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 347 | e_rc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 571 | e_ofb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 348 | e_rc2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 572 | e_ofb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 349 | e_rc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 573 | e_ofb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 350 | e_rc2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 574 | e_ofb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 351 | e_rc2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 575 | e_ofb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 352 | e_rc2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 576 | e_ofb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 353 | e_rc2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 577 | e_ofb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 354 | e_rc2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 578 | e_ofb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 355 | e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 579 | e_ofb_3d.o: ../../include/openssl/stack.h ../cryptlib.h | 356 | e_rc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 580 | e_ofb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 357 | e_rc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 581 | e_ofb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 358 | e_rc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 582 | e_ofb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 359 | e_rc2.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h |
| 583 | e_ofb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 584 | e_ofb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 585 | e_ofb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 586 | e_ofb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 587 | e_ofb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 588 | e_ofb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 589 | e_ofb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 590 | e_ofb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 591 | e_ofb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 592 | e_ofb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 593 | e_ofb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 594 | e_ofb_bf.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 595 | e_ofb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 596 | e_ofb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 597 | e_ofb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 598 | e_ofb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 599 | e_ofb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 600 | e_ofb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 601 | e_ofb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 602 | e_ofb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 603 | e_ofb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 604 | e_ofb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 605 | e_ofb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 606 | e_ofb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 607 | e_ofb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 608 | e_ofb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 609 | e_ofb_c.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 610 | e_ofb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 611 | e_ofb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 612 | e_ofb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 613 | e_ofb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 614 | e_ofb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 615 | e_ofb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 616 | e_ofb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 617 | e_ofb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 618 | e_ofb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 619 | e_ofb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 620 | e_ofb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 621 | e_ofb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 622 | e_ofb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 623 | e_ofb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 624 | e_ofb_d.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 625 | e_ofb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 626 | e_ofb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 627 | e_ofb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 628 | e_ofb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 629 | e_ofb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 630 | e_ofb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 631 | e_ofb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 632 | e_ofb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 633 | e_ofb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 634 | e_ofb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 635 | e_ofb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 636 | e_ofb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 637 | e_ofb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 638 | e_ofb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 639 | e_ofb_i.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 640 | e_ofb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 641 | e_ofb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 642 | e_ofb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 643 | e_ofb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 644 | e_ofb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 645 | e_ofb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 646 | e_ofb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 647 | e_ofb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 648 | e_ofb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 649 | e_ofb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 650 | e_ofb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 651 | e_ofb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 652 | e_ofb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 653 | e_ofb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 654 | e_ofb_r2.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 655 | e_ofb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 656 | e_ofb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 657 | e_ofb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 658 | e_ofb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 659 | e_ofb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 660 | e_ofb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 661 | e_ofb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 662 | e_ofb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 663 | e_ofb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 664 | e_ofb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 665 | e_ofb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | ||
| 666 | e_ofb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 667 | e_ofb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 668 | e_ofb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 669 | e_ofb_r5.o: ../../include/openssl/stack.h ../cryptlib.h | ||
| 670 | e_rc4.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 360 | e_rc4.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 671 | e_rc4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 361 | e_rc4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 672 | e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 362 | e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -674,14 +364,33 @@ e_rc4.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 674 | e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 364 | e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 675 | e_rc4.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 365 | e_rc4.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 676 | e_rc4.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 366 | e_rc4.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 677 | e_rc4.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 367 | e_rc4.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 368 | e_rc4.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 678 | e_rc4.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 369 | e_rc4.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 679 | e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 370 | e_rc4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 680 | e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 371 | e_rc4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 681 | e_rc4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 372 | e_rc4.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 682 | e_rc4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 373 | e_rc4.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 683 | e_rc4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 374 | e_rc4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 684 | e_rc4.o: ../../include/openssl/stack.h ../cryptlib.h | 375 | e_rc4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 376 | e_rc4.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 377 | e_rc5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 378 | e_rc5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 379 | e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 380 | e_rc5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 381 | e_rc5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 382 | e_rc5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 383 | e_rc5.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 384 | e_rc5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 385 | e_rc5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 386 | e_rc5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 387 | e_rc5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 388 | e_rc5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 389 | e_rc5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 390 | e_rc5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 391 | e_rc5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 392 | e_rc5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 393 | e_rc5.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h | ||
| 685 | e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 394 | e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 686 | e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 395 | e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 687 | e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 396 | e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -689,14 +398,17 @@ e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 689 | e_xcbc_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 398 | e_xcbc_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 690 | e_xcbc_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 399 | e_xcbc_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 691 | e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 400 | e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 692 | e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 401 | e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 402 | e_xcbc_d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 693 | e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 403 | e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 694 | e_xcbc_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 404 | e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 405 | e_xcbc_d.o: ../../include/openssl/opensslconf.h | ||
| 695 | e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 406 | e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h |
| 696 | e_xcbc_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 407 | e_xcbc_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 697 | e_xcbc_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 408 | e_xcbc_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 698 | e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 409 | e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 699 | e_xcbc_d.o: ../../include/openssl/stack.h ../cryptlib.h | 410 | e_xcbc_d.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 411 | e_xcbc_d.o: ../cryptlib.h | ||
| 700 | encode.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 412 | encode.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 701 | encode.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 413 | encode.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 702 | encode.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 414 | encode.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -704,14 +416,16 @@ encode.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 704 | encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 416 | encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 705 | encode.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 417 | encode.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 706 | encode.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 418 | encode.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 707 | encode.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 419 | encode.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 420 | encode.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 708 | encode.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 421 | encode.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 709 | encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 422 | encode.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 710 | encode.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 423 | encode.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 711 | encode.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 424 | encode.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 712 | encode.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 425 | encode.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 713 | encode.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 426 | encode.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 714 | encode.o: ../../include/openssl/stack.h ../cryptlib.h | 427 | encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 428 | encode.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 715 | evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 429 | evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 716 | evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 430 | evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 717 | evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 431 | evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -719,28 +433,32 @@ evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 719 | evp_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 433 | evp_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 720 | evp_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 434 | evp_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 721 | evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 435 | evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 722 | evp_enc.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 436 | evp_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 437 | evp_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 723 | evp_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 438 | evp_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 724 | evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 439 | evp_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 725 | evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 440 | evp_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 726 | evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 441 | evp_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 727 | evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 442 | evp_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 728 | evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 443 | evp_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 729 | evp_enc.o: ../../include/openssl/stack.h ../cryptlib.h | 444 | evp_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 445 | evp_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h | ||
| 730 | evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 446 | evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 731 | evp_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 447 | evp_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 732 | evp_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | 448 | evp_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h |
| 733 | evp_err.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 449 | evp_err.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 734 | evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 450 | evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 735 | evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 451 | evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 736 | evp_err.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 452 | evp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 453 | evp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 737 | evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 454 | evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 738 | evp_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 455 | evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 739 | evp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 456 | evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 740 | evp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 457 | evp_err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 741 | evp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 458 | evp_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 742 | evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 459 | evp_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 743 | evp_err.o: ../../include/openssl/stack.h | 460 | evp_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 461 | evp_err.o: ../../include/openssl/symhacks.h | ||
| 744 | evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 462 | evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 745 | evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 463 | evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 746 | evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 464 | evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -748,14 +466,16 @@ evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 748 | evp_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 466 | evp_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 749 | evp_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 467 | evp_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 750 | evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 468 | evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 751 | evp_key.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 469 | evp_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 470 | evp_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 752 | evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 471 | evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 753 | evp_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 472 | evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 754 | evp_key.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 473 | evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 755 | evp_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 474 | evp_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 756 | evp_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 475 | evp_key.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 757 | evp_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 476 | evp_key.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 758 | evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 477 | evp_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 478 | evp_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 759 | evp_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 479 | evp_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 760 | evp_key.o: ../cryptlib.h | 480 | evp_key.o: ../cryptlib.h |
| 761 | evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 481 | evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -765,14 +485,16 @@ evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 765 | evp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 485 | evp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 766 | evp_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 486 | evp_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 767 | evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 487 | evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 768 | evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 488 | evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 489 | evp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 769 | evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 490 | evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 770 | evp_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 491 | evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 771 | evp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 492 | evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 772 | evp_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 493 | evp_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 773 | evp_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 494 | evp_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 774 | evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 495 | evp_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 775 | evp_lib.o: ../../include/openssl/stack.h ../cryptlib.h | 496 | evp_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 497 | evp_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 776 | evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 498 | evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 777 | evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 499 | evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 778 | evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 500 | evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -780,14 +502,16 @@ evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 780 | evp_pbe.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 502 | evp_pbe.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 781 | evp_pbe.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 503 | evp_pbe.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 782 | evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 504 | evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 783 | evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 505 | evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 506 | evp_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 784 | evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 507 | evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 785 | evp_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 508 | evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 786 | evp_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 509 | evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 787 | evp_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 510 | evp_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 788 | evp_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 511 | evp_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 789 | evp_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 512 | evp_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 790 | evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 513 | evp_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 514 | evp_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 791 | evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 515 | evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 792 | evp_pbe.o: ../cryptlib.h | 516 | evp_pbe.o: ../cryptlib.h |
| 793 | evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 517 | evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -797,16 +521,19 @@ evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 797 | evp_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 521 | evp_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 798 | evp_pkey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 522 | evp_pkey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 799 | evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 523 | evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 800 | evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 524 | evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 525 | evp_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 801 | evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 526 | evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 802 | evp_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 527 | evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 528 | evp_pkey.o: ../../include/openssl/opensslconf.h | ||
| 803 | evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 529 | evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 804 | evp_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 530 | evp_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 805 | evp_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 531 | evp_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 806 | evp_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 532 | evp_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 807 | evp_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 533 | evp_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 808 | evp_pkey.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 534 | evp_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 809 | evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 535 | evp_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 536 | evp_pkey.o: ../cryptlib.h | ||
| 810 | m_dss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 537 | m_dss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 811 | m_dss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 538 | m_dss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 812 | m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 539 | m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -814,14 +541,16 @@ m_dss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 814 | m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 541 | m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 815 | m_dss.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 542 | m_dss.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 816 | m_dss.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 543 | m_dss.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 817 | m_dss.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 544 | m_dss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 545 | m_dss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 818 | m_dss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 546 | m_dss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 819 | m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 547 | m_dss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 820 | m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 548 | m_dss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 821 | m_dss.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 549 | m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 822 | m_dss.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 550 | m_dss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 823 | m_dss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 551 | m_dss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 824 | m_dss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 552 | m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 553 | m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 825 | m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 554 | m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 826 | m_dss.o: ../cryptlib.h | 555 | m_dss.o: ../cryptlib.h |
| 827 | m_dss1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 556 | m_dss1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -831,14 +560,16 @@ m_dss1.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 831 | m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 560 | m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 832 | m_dss1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 561 | m_dss1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 833 | m_dss1.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 562 | m_dss1.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 834 | m_dss1.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 563 | m_dss1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 564 | m_dss1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 835 | m_dss1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 565 | m_dss1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 836 | m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 566 | m_dss1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 837 | m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 567 | m_dss1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 838 | m_dss1.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 568 | m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 839 | m_dss1.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 569 | m_dss1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 840 | m_dss1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 570 | m_dss1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 841 | m_dss1.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 571 | m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 572 | m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 842 | m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 573 | m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 843 | m_dss1.o: ../cryptlib.h | 574 | m_dss1.o: ../cryptlib.h |
| 844 | m_md2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 575 | m_md2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -848,16 +579,37 @@ m_md2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 848 | m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 579 | m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 849 | m_md2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 580 | m_md2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 850 | m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 581 | m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 851 | m_md2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 582 | m_md2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 583 | m_md2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 852 | m_md2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 584 | m_md2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 853 | m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 585 | m_md2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 854 | m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 586 | m_md2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 855 | m_md2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 587 | m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 856 | m_md2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 588 | m_md2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 857 | m_md2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 589 | m_md2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 858 | m_md2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 590 | m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 591 | m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 859 | m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 592 | m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 860 | m_md2.o: ../cryptlib.h | 593 | m_md2.o: ../cryptlib.h |
| 594 | m_md4.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 595 | m_md4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 596 | m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 597 | m_md4.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 598 | m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 599 | m_md4.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 600 | m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 601 | m_md4.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 602 | m_md4.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 603 | m_md4.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 604 | m_md4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 605 | m_md4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 606 | m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 607 | m_md4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 608 | m_md4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 609 | m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 610 | m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 611 | m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 612 | m_md4.o: ../cryptlib.h | ||
| 861 | m_md5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 613 | m_md5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 862 | m_md5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 614 | m_md5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 863 | m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 615 | m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -865,14 +617,16 @@ m_md5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 865 | m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 617 | m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 866 | m_md5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 618 | m_md5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 867 | m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 619 | m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 868 | m_md5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 620 | m_md5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 621 | m_md5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 869 | m_md5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 622 | m_md5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 870 | m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 623 | m_md5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 871 | m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 624 | m_md5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 872 | m_md5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 625 | m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 873 | m_md5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 626 | m_md5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 874 | m_md5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 627 | m_md5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 875 | m_md5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 628 | m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 629 | m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 876 | m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 630 | m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 877 | m_md5.o: ../cryptlib.h | 631 | m_md5.o: ../cryptlib.h |
| 878 | m_mdc2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 632 | m_mdc2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -882,14 +636,16 @@ m_mdc2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 882 | m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 636 | m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 883 | m_mdc2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 637 | m_mdc2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 884 | m_mdc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 638 | m_mdc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 885 | m_mdc2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 639 | m_mdc2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 640 | m_mdc2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 886 | m_mdc2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 641 | m_mdc2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 887 | m_mdc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 642 | m_mdc2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 888 | m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 643 | m_mdc2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 889 | m_mdc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 644 | m_mdc2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 890 | m_mdc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 645 | m_mdc2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 891 | m_mdc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 646 | m_mdc2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 892 | m_mdc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 647 | m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 648 | m_mdc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 893 | m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 649 | m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 894 | m_mdc2.o: ../cryptlib.h | 650 | m_mdc2.o: ../cryptlib.h |
| 895 | m_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 651 | m_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -899,14 +655,16 @@ m_null.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 899 | m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 655 | m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 900 | m_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 656 | m_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 901 | m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 657 | m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 902 | m_null.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 658 | m_null.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 659 | m_null.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 903 | m_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 660 | m_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 904 | m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 661 | m_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 905 | m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 662 | m_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 906 | m_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 663 | m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 907 | m_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 664 | m_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 908 | m_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 665 | m_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 909 | m_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 666 | m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 667 | m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 910 | m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 668 | m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 911 | m_null.o: ../cryptlib.h | 669 | m_null.o: ../cryptlib.h |
| 912 | m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 670 | m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -916,16 +674,18 @@ m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 916 | m_ripemd.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 674 | m_ripemd.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 917 | m_ripemd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 675 | m_ripemd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 918 | m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 676 | m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 919 | m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 677 | m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 678 | m_ripemd.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 920 | m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 679 | m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 921 | m_ripemd.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 680 | m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 681 | m_ripemd.o: ../../include/openssl/opensslconf.h | ||
| 922 | m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 682 | m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 923 | m_ripemd.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 683 | m_ripemd.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 924 | m_ripemd.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 684 | m_ripemd.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 925 | m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 685 | m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 926 | m_ripemd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 686 | m_ripemd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 927 | m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 687 | m_ripemd.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 928 | m_ripemd.o: ../cryptlib.h | 688 | m_ripemd.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 929 | m_sha.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 689 | m_sha.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 930 | m_sha.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 690 | m_sha.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 931 | m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 691 | m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -933,14 +693,16 @@ m_sha.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 933 | m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 693 | m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 934 | m_sha.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 694 | m_sha.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 935 | m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 695 | m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 936 | m_sha.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 696 | m_sha.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 697 | m_sha.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 937 | m_sha.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 698 | m_sha.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 938 | m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 699 | m_sha.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 939 | m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 700 | m_sha.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 940 | m_sha.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 701 | m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 941 | m_sha.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 702 | m_sha.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 942 | m_sha.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 703 | m_sha.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 943 | m_sha.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 704 | m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 705 | m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 944 | m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 706 | m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 945 | m_sha.o: ../cryptlib.h | 707 | m_sha.o: ../cryptlib.h |
| 946 | m_sha1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 708 | m_sha1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -950,14 +712,16 @@ m_sha1.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 950 | m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 712 | m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 951 | m_sha1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 713 | m_sha1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 952 | m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 714 | m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 953 | m_sha1.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 715 | m_sha1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 716 | m_sha1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 954 | m_sha1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 717 | m_sha1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 955 | m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 718 | m_sha1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 956 | m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 719 | m_sha1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 957 | m_sha1.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 720 | m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 958 | m_sha1.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 721 | m_sha1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 959 | m_sha1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 722 | m_sha1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 960 | m_sha1.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 723 | m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 724 | m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 961 | m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 725 | m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 962 | m_sha1.o: ../cryptlib.h | 726 | m_sha1.o: ../cryptlib.h |
| 963 | names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 727 | names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -967,14 +731,16 @@ names.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 967 | names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 731 | names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 968 | names.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 732 | names.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 969 | names.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 733 | names.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 970 | names.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 734 | names.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 735 | names.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 971 | names.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 736 | names.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 972 | names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 737 | names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 973 | names.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 738 | names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 974 | names.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 739 | names.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 975 | names.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 740 | names.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 976 | names.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 741 | names.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 977 | names.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 742 | names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 743 | names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 978 | names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 744 | names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 979 | names.o: ../cryptlib.h | 745 | names.o: ../cryptlib.h |
| 980 | p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 746 | p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -984,14 +750,16 @@ p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 984 | p5_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 750 | p5_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 985 | p5_crpt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 751 | p5_crpt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 986 | p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 752 | p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 987 | p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 753 | p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 754 | p5_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 988 | p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 755 | p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 989 | p5_crpt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 756 | p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 990 | p5_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 757 | p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 991 | p5_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 758 | p5_crpt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 992 | p5_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 759 | p5_crpt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 993 | p5_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 760 | p5_crpt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 994 | p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 761 | p5_crpt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 762 | p5_crpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 995 | p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 763 | p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 996 | p5_crpt.o: ../cryptlib.h | 764 | p5_crpt.o: ../cryptlib.h |
| 997 | p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 765 | p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -1002,16 +770,17 @@ p5_crpt2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | |||
| 1002 | p5_crpt2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 770 | p5_crpt2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 1003 | p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 771 | p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 1004 | p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h | 772 | p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h |
| 1005 | p5_crpt2.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 773 | p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1006 | p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 774 | p5_crpt2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1007 | p5_crpt2.o: ../../include/openssl/opensslconf.h | 775 | p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 776 | p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 1008 | p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 777 | p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1009 | p5_crpt2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 778 | p5_crpt2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1010 | p5_crpt2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 779 | p5_crpt2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1011 | p5_crpt2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 780 | p5_crpt2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1012 | p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 781 | p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 1013 | p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 782 | p5_crpt2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 1014 | p5_crpt2.o: ../cryptlib.h | 783 | p5_crpt2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1015 | p_dec.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 784 | p_dec.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 1016 | p_dec.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 785 | p_dec.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 1017 | p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 786 | p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -1019,15 +788,17 @@ p_dec.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 1019 | p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 788 | p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 1020 | p_dec.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 789 | p_dec.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 1021 | p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 790 | p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 1022 | p_dec.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 791 | p_dec.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 792 | p_dec.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 1023 | p_dec.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 793 | p_dec.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 1024 | p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 794 | p_dec.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 1025 | p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 795 | p_dec.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 1026 | p_dec.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 796 | p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h |
| 1027 | p_dec.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 797 | p_dec.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1028 | p_dec.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 798 | p_dec.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1029 | p_dec.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 799 | p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1030 | p_dec.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 800 | p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 801 | p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1031 | p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 802 | p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1032 | p_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 803 | p_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 1033 | p_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 804 | p_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -1036,15 +807,17 @@ p_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 1036 | p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 807 | p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 1037 | p_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 808 | p_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 1038 | p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 809 | p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 1039 | p_enc.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 810 | p_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 811 | p_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 1040 | p_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 812 | p_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 1041 | p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 813 | p_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 1042 | p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 814 | p_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 1043 | p_enc.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 815 | p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h |
| 1044 | p_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 816 | p_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1045 | p_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 817 | p_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1046 | p_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 818 | p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1047 | p_enc.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 819 | p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 820 | p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1048 | p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 821 | p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1049 | p_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 822 | p_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 1050 | p_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 823 | p_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| @@ -1054,14 +827,16 @@ p_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 1054 | p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 827 | p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 1055 | p_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 828 | p_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 1056 | p_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 829 | p_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 1057 | p_lib.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 830 | p_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 1058 | p_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 831 | p_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 1059 | p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 832 | p_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 1060 | p_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 833 | p_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 1061 | p_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 834 | p_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1062 | p_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 835 | p_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1063 | p_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 836 | p_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1064 | p_lib.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 837 | p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 838 | p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 839 | p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1065 | p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 840 | p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1066 | p_open.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 841 | p_open.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 1067 | p_open.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 842 | p_open.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -1070,14 +845,16 @@ p_open.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 1070 | p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 845 | p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 1071 | p_open.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 846 | p_open.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 1072 | p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 847 | p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 1073 | p_open.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 848 | p_open.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 849 | p_open.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 1074 | p_open.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 850 | p_open.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 1075 | p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 851 | p_open.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 1076 | p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 852 | p_open.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 1077 | p_open.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 853 | p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 1078 | p_open.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 854 | p_open.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 1079 | p_open.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 855 | p_open.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 1080 | p_open.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 856 | p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 857 | p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 1081 | p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 858 | p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 1082 | p_open.o: ../cryptlib.h | 859 | p_open.o: ../cryptlib.h |
| 1083 | p_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 860 | p_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -1087,15 +864,17 @@ p_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 1087 | p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 864 | p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 1088 | p_seal.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 865 | p_seal.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 1089 | p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 866 | p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 1090 | p_seal.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 867 | p_seal.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 868 | p_seal.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 1091 | p_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 869 | p_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 1092 | p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 870 | p_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 1093 | p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 871 | p_seal.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 1094 | p_seal.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 872 | p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h |
| 1095 | p_seal.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 873 | p_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1096 | p_seal.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 874 | p_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1097 | p_seal.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 875 | p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1098 | p_seal.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 876 | p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 877 | p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 1099 | p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 878 | p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 1100 | p_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 879 | p_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 1101 | p_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 880 | p_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -1104,14 +883,16 @@ p_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 1104 | p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 883 | p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 1105 | p_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 884 | p_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 1106 | p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 885 | p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 1107 | p_sign.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 886 | p_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 887 | p_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 1108 | p_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 888 | p_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 1109 | p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 889 | p_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 1110 | p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 890 | p_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 1111 | p_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 891 | p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 1112 | p_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 892 | p_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 1113 | p_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 893 | p_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 1114 | p_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 894 | p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 895 | p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 1115 | p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 896 | p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 1116 | p_sign.o: ../cryptlib.h | 897 | p_sign.o: ../cryptlib.h |
| 1117 | p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 898 | p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -1121,13 +902,15 @@ p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 1121 | p_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 902 | p_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 1122 | p_verify.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 903 | p_verify.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 1123 | p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 904 | p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 1124 | p_verify.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 905 | p_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 906 | p_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 1125 | p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 907 | p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 1126 | p_verify.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 908 | p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 909 | p_verify.o: ../../include/openssl/opensslconf.h | ||
| 1127 | p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 910 | p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 1128 | p_verify.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 911 | p_verify.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 1129 | p_verify.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 912 | p_verify.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 1130 | p_verify.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 913 | p_verify.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 1131 | p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 914 | p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 1132 | p_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 915 | p_verify.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 1133 | p_verify.o: ../cryptlib.h | 916 | p_verify.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/evp/bio_b64.c b/src/lib/libssl/src/crypto/evp/bio_b64.c index bd5e24f993..af6fa2ae8f 100644 --- a/src/lib/libssl/src/crypto/evp/bio_b64.c +++ b/src/lib/libssl/src/crypto/evp/bio_b64.c | |||
| @@ -62,14 +62,14 @@ | |||
| 62 | #include <openssl/buffer.h> | 62 | #include <openssl/buffer.h> |
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | 64 | ||
| 65 | static int b64_write(BIO *h,char *buf,int num); | 65 | static int b64_write(BIO *h, const char *buf, int num); |
| 66 | static int b64_read(BIO *h,char *buf,int size); | 66 | static int b64_read(BIO *h, char *buf, int size); |
| 67 | /*static int b64_puts(BIO *h,char *str); */ | 67 | /*static int b64_puts(BIO *h, const char *str); */ |
| 68 | /*static int b64_gets(BIO *h,char *str,int size); */ | 68 | /*static int b64_gets(BIO *h, char *str, int size); */ |
| 69 | static long b64_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 69 | static long b64_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 70 | static int b64_new(BIO *h); | 70 | static int b64_new(BIO *h); |
| 71 | static int b64_free(BIO *data); | 71 | static int b64_free(BIO *data); |
| 72 | static long b64_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 72 | static long b64_callback_ctrl(BIO *h,int cmd,bio_info_cb *fp); |
| 73 | #define B64_BLOCK_SIZE 1024 | 73 | #define B64_BLOCK_SIZE 1024 |
| 74 | #define B64_BLOCK_SIZE2 768 | 74 | #define B64_BLOCK_SIZE2 768 |
| 75 | #define B64_NONE 0 | 75 | #define B64_NONE 0 |
| @@ -113,7 +113,7 @@ static int b64_new(BIO *bi) | |||
| 113 | { | 113 | { |
| 114 | BIO_B64_CTX *ctx; | 114 | BIO_B64_CTX *ctx; |
| 115 | 115 | ||
| 116 | ctx=(BIO_B64_CTX *)Malloc(sizeof(BIO_B64_CTX)); | 116 | ctx=(BIO_B64_CTX *)OPENSSL_malloc(sizeof(BIO_B64_CTX)); |
| 117 | if (ctx == NULL) return(0); | 117 | if (ctx == NULL) return(0); |
| 118 | 118 | ||
| 119 | ctx->buf_len=0; | 119 | ctx->buf_len=0; |
| @@ -133,7 +133,7 @@ static int b64_new(BIO *bi) | |||
| 133 | static int b64_free(BIO *a) | 133 | static int b64_free(BIO *a) |
| 134 | { | 134 | { |
| 135 | if (a == NULL) return(0); | 135 | if (a == NULL) return(0); |
| 136 | Free(a->ptr); | 136 | OPENSSL_free(a->ptr); |
| 137 | a->ptr=NULL; | 137 | a->ptr=NULL; |
| 138 | a->init=0; | 138 | a->init=0; |
| 139 | a->flags=0; | 139 | a->flags=0; |
| @@ -340,7 +340,7 @@ static int b64_read(BIO *b, char *out, int outl) | |||
| 340 | return((ret == 0)?ret_code:ret); | 340 | return((ret == 0)?ret_code:ret); |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | static int b64_write(BIO *b, char *in, int inl) | 343 | static int b64_write(BIO *b, const char *in, int inl) |
| 344 | { | 344 | { |
| 345 | int ret=inl,n,i; | 345 | int ret=inl,n,i; |
| 346 | BIO_B64_CTX *ctx; | 346 | BIO_B64_CTX *ctx; |
| @@ -370,10 +370,11 @@ static int b64_write(BIO *b, char *in, int inl) | |||
| 370 | n-=i; | 370 | n-=i; |
| 371 | } | 371 | } |
| 372 | /* at this point all pending data has been written */ | 372 | /* at this point all pending data has been written */ |
| 373 | ctx->buf_off=0; | ||
| 374 | ctx->buf_len=0; | ||
| 373 | 375 | ||
| 374 | if ((in == NULL) || (inl <= 0)) return(0); | 376 | if ((in == NULL) || (inl <= 0)) return(0); |
| 375 | 377 | ||
| 376 | ctx->buf_off=0; | ||
| 377 | while (inl > 0) | 378 | while (inl > 0) |
| 378 | { | 379 | { |
| 379 | n=(inl > B64_BLOCK_SIZE)?B64_BLOCK_SIZE:inl; | 380 | n=(inl > B64_BLOCK_SIZE)?B64_BLOCK_SIZE:inl; |
| @@ -383,14 +384,20 @@ static int b64_write(BIO *b, char *in, int inl) | |||
| 383 | if (ctx->tmp_len > 0) | 384 | if (ctx->tmp_len > 0) |
| 384 | { | 385 | { |
| 385 | n=3-ctx->tmp_len; | 386 | n=3-ctx->tmp_len; |
| 387 | /* There's a teoretical possibility for this */ | ||
| 388 | if (n > inl) | ||
| 389 | n=inl; | ||
| 386 | memcpy(&(ctx->tmp[ctx->tmp_len]),in,n); | 390 | memcpy(&(ctx->tmp[ctx->tmp_len]),in,n); |
| 387 | ctx->tmp_len+=n; | 391 | ctx->tmp_len+=n; |
| 388 | n=ctx->tmp_len; | 392 | if (ctx->tmp_len < 3) |
| 389 | if (n < 3) | ||
| 390 | break; | 393 | break; |
| 391 | ctx->buf_len=EVP_EncodeBlock( | 394 | ctx->buf_len=EVP_EncodeBlock( |
| 392 | (unsigned char *)ctx->buf, | 395 | (unsigned char *)ctx->buf, |
| 393 | (unsigned char *)ctx->tmp,n); | 396 | (unsigned char *)ctx->tmp, |
| 397 | ctx->tmp_len); | ||
| 398 | /* Since we're now done using the temporary | ||
| 399 | buffer, the length should be 0'd */ | ||
| 400 | ctx->tmp_len=0; | ||
| 394 | } | 401 | } |
| 395 | else | 402 | else |
| 396 | { | 403 | { |
| @@ -434,7 +441,7 @@ static int b64_write(BIO *b, char *in, int inl) | |||
| 434 | return(ret); | 441 | return(ret); |
| 435 | } | 442 | } |
| 436 | 443 | ||
| 437 | static long b64_ctrl(BIO *b, int cmd, long num, char *ptr) | 444 | static long b64_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 438 | { | 445 | { |
| 439 | BIO_B64_CTX *ctx; | 446 | BIO_B64_CTX *ctx; |
| 440 | long ret=1; | 447 | long ret=1; |
| @@ -524,7 +531,7 @@ again: | |||
| 524 | return(ret); | 531 | return(ret); |
| 525 | } | 532 | } |
| 526 | 533 | ||
| 527 | static long b64_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 534 | static long b64_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 528 | { | 535 | { |
| 529 | long ret=1; | 536 | long ret=1; |
| 530 | 537 | ||
diff --git a/src/lib/libssl/src/crypto/evp/bio_enc.c b/src/lib/libssl/src/crypto/evp/bio_enc.c index 629bf4b95d..831c71a2b5 100644 --- a/src/lib/libssl/src/crypto/evp/bio_enc.c +++ b/src/lib/libssl/src/crypto/evp/bio_enc.c | |||
| @@ -62,14 +62,14 @@ | |||
| 62 | #include <openssl/buffer.h> | 62 | #include <openssl/buffer.h> |
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | 64 | ||
| 65 | static int enc_write(BIO *h,char *buf,int num); | 65 | static int enc_write(BIO *h, const char *buf, int num); |
| 66 | static int enc_read(BIO *h,char *buf,int size); | 66 | static int enc_read(BIO *h, char *buf, int size); |
| 67 | /*static int enc_puts(BIO *h,char *str); */ | 67 | /*static int enc_puts(BIO *h, const char *str); */ |
| 68 | /*static int enc_gets(BIO *h,char *str,int size); */ | 68 | /*static int enc_gets(BIO *h, char *str, int size); */ |
| 69 | static long enc_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 69 | static long enc_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 70 | static int enc_new(BIO *h); | 70 | static int enc_new(BIO *h); |
| 71 | static int enc_free(BIO *data); | 71 | static int enc_free(BIO *data); |
| 72 | static long enc_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 72 | static long enc_callback_ctrl(BIO *h, int cmd, bio_info_cb *fps); |
| 73 | #define ENC_BLOCK_SIZE (1024*4) | 73 | #define ENC_BLOCK_SIZE (1024*4) |
| 74 | 74 | ||
| 75 | typedef struct enc_struct | 75 | typedef struct enc_struct |
| @@ -105,7 +105,7 @@ static int enc_new(BIO *bi) | |||
| 105 | { | 105 | { |
| 106 | BIO_ENC_CTX *ctx; | 106 | BIO_ENC_CTX *ctx; |
| 107 | 107 | ||
| 108 | ctx=(BIO_ENC_CTX *)Malloc(sizeof(BIO_ENC_CTX)); | 108 | ctx=(BIO_ENC_CTX *)OPENSSL_malloc(sizeof(BIO_ENC_CTX)); |
| 109 | EVP_CIPHER_CTX_init(&ctx->cipher); | 109 | EVP_CIPHER_CTX_init(&ctx->cipher); |
| 110 | if (ctx == NULL) return(0); | 110 | if (ctx == NULL) return(0); |
| 111 | 111 | ||
| @@ -129,7 +129,7 @@ static int enc_free(BIO *a) | |||
| 129 | b=(BIO_ENC_CTX *)a->ptr; | 129 | b=(BIO_ENC_CTX *)a->ptr; |
| 130 | EVP_CIPHER_CTX_cleanup(&(b->cipher)); | 130 | EVP_CIPHER_CTX_cleanup(&(b->cipher)); |
| 131 | memset(a->ptr,0,sizeof(BIO_ENC_CTX)); | 131 | memset(a->ptr,0,sizeof(BIO_ENC_CTX)); |
| 132 | Free(a->ptr); | 132 | OPENSSL_free(a->ptr); |
| 133 | a->ptr=NULL; | 133 | a->ptr=NULL; |
| 134 | a->init=0; | 134 | a->init=0; |
| 135 | a->flags=0; | 135 | a->flags=0; |
| @@ -224,7 +224,7 @@ static int enc_read(BIO *b, char *out, int outl) | |||
| 224 | return((ret == 0)?ctx->cont:ret); | 224 | return((ret == 0)?ctx->cont:ret); |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | static int enc_write(BIO *b, char *in, int inl) | 227 | static int enc_write(BIO *b, const char *in, int inl) |
| 228 | { | 228 | { |
| 229 | int ret=0,n,i; | 229 | int ret=0,n,i; |
| 230 | BIO_ENC_CTX *ctx; | 230 | BIO_ENC_CTX *ctx; |
| @@ -279,7 +279,7 @@ static int enc_write(BIO *b, char *in, int inl) | |||
| 279 | return(ret); | 279 | return(ret); |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | static long enc_ctrl(BIO *b, int cmd, long num, char *ptr) | 282 | static long enc_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 283 | { | 283 | { |
| 284 | BIO *dbio; | 284 | BIO *dbio; |
| 285 | BIO_ENC_CTX *ctx,*dctx; | 285 | BIO_ENC_CTX *ctx,*dctx; |
| @@ -370,7 +370,7 @@ again: | |||
| 370 | return(ret); | 370 | return(ret); |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | static long enc_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 373 | static long enc_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 374 | { | 374 | { |
| 375 | long ret=1; | 375 | long ret=1; |
| 376 | 376 | ||
diff --git a/src/lib/libssl/src/crypto/evp/bio_md.c b/src/lib/libssl/src/crypto/evp/bio_md.c index aef928dd8f..2373c247d8 100644 --- a/src/lib/libssl/src/crypto/evp/bio_md.c +++ b/src/lib/libssl/src/crypto/evp/bio_md.c | |||
| @@ -65,14 +65,14 @@ | |||
| 65 | /* BIO_put and BIO_get both add to the digest, | 65 | /* BIO_put and BIO_get both add to the digest, |
| 66 | * BIO_gets returns the digest */ | 66 | * BIO_gets returns the digest */ |
| 67 | 67 | ||
| 68 | static int md_write(BIO *h,char *buf,int num); | 68 | static int md_write(BIO *h, char const *buf, int num); |
| 69 | static int md_read(BIO *h,char *buf,int size); | 69 | static int md_read(BIO *h, char *buf, int size); |
| 70 | /*static int md_puts(BIO *h,char *str); */ | 70 | /*static int md_puts(BIO *h, const char *str); */ |
| 71 | static int md_gets(BIO *h,char *str,int size); | 71 | static int md_gets(BIO *h, char *str, int size); |
| 72 | static long md_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 72 | static long md_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 73 | static int md_new(BIO *h); | 73 | static int md_new(BIO *h); |
| 74 | static int md_free(BIO *data); | 74 | static int md_free(BIO *data); |
| 75 | static long md_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 75 | static long md_callback_ctrl(BIO *h,int cmd,bio_info_cb *fp); |
| 76 | 76 | ||
| 77 | static BIO_METHOD methods_md= | 77 | static BIO_METHOD methods_md= |
| 78 | { | 78 | { |
| @@ -96,7 +96,7 @@ static int md_new(BIO *bi) | |||
| 96 | { | 96 | { |
| 97 | EVP_MD_CTX *ctx; | 97 | EVP_MD_CTX *ctx; |
| 98 | 98 | ||
| 99 | ctx=(EVP_MD_CTX *)Malloc(sizeof(EVP_MD_CTX)); | 99 | ctx=(EVP_MD_CTX *)OPENSSL_malloc(sizeof(EVP_MD_CTX)); |
| 100 | if (ctx == NULL) return(0); | 100 | if (ctx == NULL) return(0); |
| 101 | 101 | ||
| 102 | bi->init=0; | 102 | bi->init=0; |
| @@ -108,7 +108,7 @@ static int md_new(BIO *bi) | |||
| 108 | static int md_free(BIO *a) | 108 | static int md_free(BIO *a) |
| 109 | { | 109 | { |
| 110 | if (a == NULL) return(0); | 110 | if (a == NULL) return(0); |
| 111 | Free(a->ptr); | 111 | OPENSSL_free(a->ptr); |
| 112 | a->ptr=NULL; | 112 | a->ptr=NULL; |
| 113 | a->init=0; | 113 | a->init=0; |
| 114 | a->flags=0; | 114 | a->flags=0; |
| @@ -139,7 +139,7 @@ static int md_read(BIO *b, char *out, int outl) | |||
| 139 | return(ret); | 139 | return(ret); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static int md_write(BIO *b, char *in, int inl) | 142 | static int md_write(BIO *b, const char *in, int inl) |
| 143 | { | 143 | { |
| 144 | int ret=0; | 144 | int ret=0; |
| 145 | EVP_MD_CTX *ctx; | 145 | EVP_MD_CTX *ctx; |
| @@ -162,7 +162,7 @@ static int md_write(BIO *b, char *in, int inl) | |||
| 162 | return(ret); | 162 | return(ret); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | static long md_ctrl(BIO *b, int cmd, long num, char *ptr) | 165 | static long md_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 166 | { | 166 | { |
| 167 | EVP_MD_CTX *ctx,*dctx,**pctx; | 167 | EVP_MD_CTX *ctx,*dctx,**pctx; |
| 168 | const EVP_MD **ppmd; | 168 | const EVP_MD **ppmd; |
| @@ -223,7 +223,7 @@ static long md_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 223 | return(ret); | 223 | return(ret); |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | static long md_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 226 | static long md_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 227 | { | 227 | { |
| 228 | long ret=1; | 228 | long ret=1; |
| 229 | 229 | ||
diff --git a/src/lib/libssl/src/crypto/evp/bio_ok.c b/src/lib/libssl/src/crypto/evp/bio_ok.c index e6ff5f2cdb..e617ce1d43 100644 --- a/src/lib/libssl/src/crypto/evp/bio_ok.c +++ b/src/lib/libssl/src/crypto/evp/bio_ok.c | |||
| @@ -125,12 +125,12 @@ | |||
| 125 | #include <openssl/evp.h> | 125 | #include <openssl/evp.h> |
| 126 | #include <openssl/rand.h> | 126 | #include <openssl/rand.h> |
| 127 | 127 | ||
| 128 | static int ok_write(BIO *h,char *buf,int num); | 128 | static int ok_write(BIO *h, const char *buf, int num); |
| 129 | static int ok_read(BIO *h,char *buf,int size); | 129 | static int ok_read(BIO *h, char *buf, int size); |
| 130 | static long ok_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 130 | static long ok_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 131 | static int ok_new(BIO *h); | 131 | static int ok_new(BIO *h); |
| 132 | static int ok_free(BIO *data); | 132 | static int ok_free(BIO *data); |
| 133 | static long ok_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 133 | static long ok_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); |
| 134 | 134 | ||
| 135 | static void sig_out(BIO* b); | 135 | static void sig_out(BIO* b); |
| 136 | static void sig_in(BIO* b); | 136 | static void sig_in(BIO* b); |
| @@ -187,7 +187,7 @@ static int ok_new(BIO *bi) | |||
| 187 | { | 187 | { |
| 188 | BIO_OK_CTX *ctx; | 188 | BIO_OK_CTX *ctx; |
| 189 | 189 | ||
| 190 | ctx=(BIO_OK_CTX *)Malloc(sizeof(BIO_OK_CTX)); | 190 | ctx=(BIO_OK_CTX *)OPENSSL_malloc(sizeof(BIO_OK_CTX)); |
| 191 | if (ctx == NULL) return(0); | 191 | if (ctx == NULL) return(0); |
| 192 | 192 | ||
| 193 | ctx->buf_len=0; | 193 | ctx->buf_len=0; |
| @@ -209,7 +209,7 @@ static int ok_free(BIO *a) | |||
| 209 | { | 209 | { |
| 210 | if (a == NULL) return(0); | 210 | if (a == NULL) return(0); |
| 211 | memset(a->ptr,0,sizeof(BIO_OK_CTX)); | 211 | memset(a->ptr,0,sizeof(BIO_OK_CTX)); |
| 212 | Free(a->ptr); | 212 | OPENSSL_free(a->ptr); |
| 213 | a->ptr=NULL; | 213 | a->ptr=NULL; |
| 214 | a->init=0; | 214 | a->init=0; |
| 215 | a->flags=0; | 215 | a->flags=0; |
| @@ -287,7 +287,7 @@ static int ok_read(BIO *b, char *out, int outl) | |||
| 287 | return(ret); | 287 | return(ret); |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | static int ok_write(BIO *b, char *in, int inl) | 290 | static int ok_write(BIO *b, const char *in, int inl) |
| 291 | { | 291 | { |
| 292 | int ret=0,n,i; | 292 | int ret=0,n,i; |
| 293 | BIO_OK_CTX *ctx; | 293 | BIO_OK_CTX *ctx; |
| @@ -345,7 +345,7 @@ static int ok_write(BIO *b, char *in, int inl) | |||
| 345 | return(ret); | 345 | return(ret); |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | static long ok_ctrl(BIO *b, int cmd, long num, char *ptr) | 348 | static long ok_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 349 | { | 349 | { |
| 350 | BIO_OK_CTX *ctx; | 350 | BIO_OK_CTX *ctx; |
| 351 | EVP_MD *md; | 351 | EVP_MD *md; |
| @@ -431,7 +431,7 @@ static long ok_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 431 | return(ret); | 431 | return(ret); |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | static long ok_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 434 | static long ok_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 435 | { | 435 | { |
| 436 | long ret=1; | 436 | long ret=1; |
| 437 | 437 | ||
diff --git a/src/lib/libssl/src/crypto/evp/c_alld.c b/src/lib/libssl/src/crypto/evp/c_alld.c index febe51a3ee..bbf059eb85 100644 --- a/src/lib/libssl/src/crypto/evp/c_alld.c +++ b/src/lib/libssl/src/crypto/evp/c_alld.c | |||
| @@ -67,6 +67,9 @@ void OpenSSL_add_all_digests(void) | |||
| 67 | #ifndef NO_MD2 | 67 | #ifndef NO_MD2 |
| 68 | EVP_add_digest(EVP_md2()); | 68 | EVP_add_digest(EVP_md2()); |
| 69 | #endif | 69 | #endif |
| 70 | #ifndef NO_MD4 | ||
| 71 | EVP_add_digest(EVP_md4()); | ||
| 72 | #endif | ||
| 70 | #ifndef NO_MD5 | 73 | #ifndef NO_MD5 |
| 71 | EVP_add_digest(EVP_md5()); | 74 | EVP_add_digest(EVP_md5()); |
| 72 | EVP_add_digest_alias(SN_md5,"ssl2-md5"); | 75 | EVP_add_digest_alias(SN_md5,"ssl2-md5"); |
diff --git a/src/lib/libssl/src/crypto/evp/e_bf.c b/src/lib/libssl/src/crypto/evp/e_bf.c new file mode 100644 index 0000000000..72047f64da --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_bf.c | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | /* crypto/evp/e_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BF | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include "evp_locl.h" | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 67 | const unsigned char *iv, int enc); | ||
| 68 | |||
| 69 | IMPLEMENT_BLOCK_CIPHER(bf, bf_ks, BF, bf_ks, NID_bf, 8, 16, 8, | ||
| 70 | 0, bf_init_key, NULL, | ||
| 71 | EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) | ||
| 72 | |||
| 73 | static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 74 | const unsigned char *iv, int enc) | ||
| 75 | { | ||
| 76 | BF_set_key(&(ctx->c.bf_ks),EVP_CIPHER_CTX_key_length(ctx),key); | ||
| 77 | return 1; | ||
| 78 | } | ||
| 79 | |||
| 80 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cast.c b/src/lib/libssl/src/crypto/evp/e_cast.c new file mode 100644 index 0000000000..e5af7fb4ed --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cast.c | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | /* crypto/evp/e_cast.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include "evp_locl.h" | ||
| 66 | |||
| 67 | static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 68 | const unsigned char *iv,int enc); | ||
| 69 | |||
| 70 | IMPLEMENT_BLOCK_CIPHER(cast5, cast_ks, CAST, cast_ks, | ||
| 71 | NID_cast5, 8, EVP_CAST5_KEY_SIZE, 8, | ||
| 72 | EVP_CIPH_VARIABLE_LENGTH, cast_init_key, NULL, | ||
| 73 | EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) | ||
| 74 | |||
| 75 | static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 76 | const unsigned char *iv, int enc) | ||
| 77 | { | ||
| 78 | CAST_set_key(&(ctx->c.cast_ks),EVP_CIPHER_CTX_key_length(ctx),key); | ||
| 79 | return 1; | ||
| 80 | } | ||
| 81 | |||
| 82 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_3d.c b/src/lib/libssl/src/crypto/evp/e_cbc_3d.c index 5d16b865c5..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cbc_3d.c +++ b/src/lib/libssl/src/crypto/evp/e_cbc_3d.c | |||
| @@ -1,151 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cbc_3d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void des_cbc_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_cbc_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void des_cbc_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | static EVP_CIPHER d_cbc_ede_cipher2= | ||
| 72 | { | ||
| 73 | NID_des_ede_cbc, | ||
| 74 | 8,16,8, | ||
| 75 | des_cbc_ede_init_key, | ||
| 76 | des_cbc_ede_cipher, | ||
| 77 | NULL, | ||
| 78 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 79 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 80 | EVP_CIPHER_set_asn1_iv, | ||
| 81 | EVP_CIPHER_get_asn1_iv, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static EVP_CIPHER d_cbc_ede_cipher3= | ||
| 85 | { | ||
| 86 | NID_des_ede3_cbc, | ||
| 87 | 8,24,8, | ||
| 88 | des_cbc_ede3_init_key, | ||
| 89 | des_cbc_ede_cipher, | ||
| 90 | NULL, | ||
| 91 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 92 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 93 | EVP_CIPHER_set_asn1_iv, | ||
| 94 | EVP_CIPHER_get_asn1_iv, | ||
| 95 | }; | ||
| 96 | |||
| 97 | EVP_CIPHER *EVP_des_ede_cbc(void) | ||
| 98 | { | ||
| 99 | return(&d_cbc_ede_cipher2); | ||
| 100 | } | ||
| 101 | |||
| 102 | EVP_CIPHER *EVP_des_ede3_cbc(void) | ||
| 103 | { | ||
| 104 | return(&d_cbc_ede_cipher3); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void des_cbc_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 108 | unsigned char *iv, int enc) | ||
| 109 | { | ||
| 110 | des_cblock *deskey = (des_cblock *)key; | ||
| 111 | |||
| 112 | if (iv != NULL) | ||
| 113 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 114 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 115 | |||
| 116 | if (deskey != NULL) | ||
| 117 | { | ||
| 118 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 119 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 120 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 121 | (char *)ctx->c.des_ede.ks1, | ||
| 122 | sizeof(ctx->c.des_ede.ks1)); | ||
| 123 | } | ||
| 124 | } | ||
| 125 | |||
| 126 | static void des_cbc_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 127 | unsigned char *iv, int enc) | ||
| 128 | { | ||
| 129 | des_cblock *deskey = (des_cblock *)key; | ||
| 130 | |||
| 131 | if (iv != NULL) | ||
| 132 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 133 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 134 | |||
| 135 | if (deskey != NULL) | ||
| 136 | { | ||
| 137 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 138 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 139 | des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3); | ||
| 140 | } | ||
| 141 | } | ||
| 142 | |||
| 143 | static void des_cbc_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 144 | unsigned char *in, unsigned int inl) | ||
| 145 | { | ||
| 146 | des_ede3_cbc_encrypt(in,out,inl, ctx->c.des_ede.ks1, | ||
| 147 | ctx->c.des_ede.ks2,ctx->c.des_ede.ks3, | ||
| 148 | (des_cblock *) &(ctx->iv[0]), | ||
| 149 | ctx->encrypt); | ||
| 150 | } | ||
| 151 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_bf.c b/src/lib/libssl/src/crypto/evp/e_cbc_bf.c index 9bcba3c516..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cbc_bf.c +++ b/src/lib/libssl/src/crypto/evp/e_cbc_bf.c | |||
| @@ -1,106 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cbc_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BF | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | static EVP_CIPHER bfish_cbc_cipher= | ||
| 70 | { | ||
| 71 | NID_bf_cbc, | ||
| 72 | 8,EVP_BLOWFISH_KEY_SIZE,8, | ||
| 73 | bf_cbc_init_key, | ||
| 74 | bf_cbc_cipher, | ||
| 75 | NULL, | ||
| 76 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), | ||
| 78 | EVP_CIPHER_set_asn1_iv, | ||
| 79 | EVP_CIPHER_get_asn1_iv, | ||
| 80 | }; | ||
| 81 | |||
| 82 | EVP_CIPHER *EVP_bf_cbc(void) | ||
| 83 | { | ||
| 84 | return(&bfish_cbc_cipher); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 88 | unsigned char *iv, int enc) | ||
| 89 | { | ||
| 90 | if (iv != NULL) | ||
| 91 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 92 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 93 | if (key != NULL) | ||
| 94 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | ||
| 95 | } | ||
| 96 | |||
| 97 | static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 98 | unsigned char *in, unsigned int inl) | ||
| 99 | { | ||
| 100 | BF_cbc_encrypt( | ||
| 101 | in,out,(long)inl, | ||
| 102 | &(ctx->c.bf_ks),&(ctx->iv[0]), | ||
| 103 | ctx->encrypt); | ||
| 104 | } | ||
| 105 | |||
| 106 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_c.c b/src/lib/libssl/src/crypto/evp/e_cbc_c.c index 6845b0b44c..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cbc_c.c +++ b/src/lib/libssl/src/crypto/evp/e_cbc_c.c | |||
| @@ -1,107 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cbc_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void cast_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void cast_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER cast5_cbc_cipher= | ||
| 71 | { | ||
| 72 | NID_cast5_cbc, | ||
| 73 | 8,EVP_CAST5_KEY_SIZE,8, | ||
| 74 | cast_cbc_init_key, | ||
| 75 | cast_cbc_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_cast5_cbc(void) | ||
| 84 | { | ||
| 85 | return(&cast5_cbc_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void cast_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | if (iv != NULL) | ||
| 92 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 93 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 94 | if (key != NULL) | ||
| 95 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | ||
| 96 | } | ||
| 97 | |||
| 98 | static void cast_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 99 | unsigned char *in, unsigned int inl) | ||
| 100 | { | ||
| 101 | CAST_cbc_encrypt( | ||
| 102 | in,out,(long)inl, | ||
| 103 | &(ctx->c.cast_ks),&(ctx->iv[0]), | ||
| 104 | ctx->encrypt); | ||
| 105 | } | ||
| 106 | |||
| 107 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_d.c b/src/lib/libssl/src/crypto/evp/e_cbc_d.c index 5b4e5b8601..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cbc_d.c +++ b/src/lib/libssl/src/crypto/evp/e_cbc_d.c | |||
| @@ -1,106 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cbc_d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void des_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | static EVP_CIPHER d_cbc_cipher= | ||
| 70 | { | ||
| 71 | NID_des_cbc, | ||
| 72 | 8,8,8, | ||
| 73 | des_cbc_init_key, | ||
| 74 | des_cbc_cipher, | ||
| 75 | NULL, | ||
| 76 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)), | ||
| 78 | EVP_CIPHER_set_asn1_iv, | ||
| 79 | EVP_CIPHER_get_asn1_iv, | ||
| 80 | }; | ||
| 81 | |||
| 82 | EVP_CIPHER *EVP_des_cbc(void) | ||
| 83 | { | ||
| 84 | return(&d_cbc_cipher); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void des_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 88 | unsigned char *iv, int enc) | ||
| 89 | { | ||
| 90 | des_cblock *deskey = (des_cblock *)key; | ||
| 91 | |||
| 92 | if (iv != NULL) | ||
| 93 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 94 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 95 | if (deskey != NULL) | ||
| 96 | des_set_key_unchecked(deskey,ctx->c.des_ks); | ||
| 97 | } | ||
| 98 | |||
| 99 | static void des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 100 | unsigned char *in, unsigned int inl) | ||
| 101 | { | ||
| 102 | des_ncbc_encrypt(in,out,inl,ctx->c.des_ks, | ||
| 103 | (des_cblock *)&(ctx->iv[0]), | ||
| 104 | ctx->encrypt); | ||
| 105 | } | ||
| 106 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_i.c b/src/lib/libssl/src/crypto/evp/e_cbc_i.c index 34b44aa21f..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cbc_i.c +++ b/src/lib/libssl/src/crypto/evp/e_cbc_i.c | |||
| @@ -1,119 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cbc_i.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void idea_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER i_cbc_cipher= | ||
| 71 | { | ||
| 72 | NID_idea_cbc, | ||
| 73 | 8,16,8, | ||
| 74 | idea_cbc_init_key, | ||
| 75 | idea_cbc_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_idea_cbc(void) | ||
| 84 | { | ||
| 85 | return(&i_cbc_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void idea_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | if (iv != NULL) | ||
| 92 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 93 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 94 | if (key != NULL) | ||
| 95 | { | ||
| 96 | if (enc) | ||
| 97 | idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 98 | else | ||
| 99 | { | ||
| 100 | IDEA_KEY_SCHEDULE tmp; | ||
| 101 | |||
| 102 | idea_set_encrypt_key(key,&tmp); | ||
| 103 | idea_set_decrypt_key(&tmp,&(ctx->c.idea_ks)); | ||
| 104 | memset((unsigned char *)&tmp,0, | ||
| 105 | sizeof(IDEA_KEY_SCHEDULE)); | ||
| 106 | } | ||
| 107 | } | ||
| 108 | } | ||
| 109 | |||
| 110 | static void idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 111 | unsigned char *in, unsigned int inl) | ||
| 112 | { | ||
| 113 | idea_cbc_encrypt( | ||
| 114 | in,out,(long)inl, | ||
| 115 | &(ctx->c.idea_ks),&(ctx->iv[0]), | ||
| 116 | ctx->encrypt); | ||
| 117 | } | ||
| 118 | |||
| 119 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_r2.c b/src/lib/libssl/src/crypto/evp/e_cbc_r2.c index 9dfada4ea6..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cbc_r2.c +++ b/src/lib/libssl/src/crypto/evp/e_cbc_r2.c | |||
| @@ -1,216 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cbc_r2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static int rc2_meth_to_magic(const EVP_CIPHER *e); | ||
| 71 | static EVP_CIPHER *rc2_magic_to_meth(int i); | ||
| 72 | static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | ||
| 73 | static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | ||
| 74 | |||
| 75 | #define RC2_40_MAGIC 0xa0 | ||
| 76 | #define RC2_64_MAGIC 0x78 | ||
| 77 | #define RC2_128_MAGIC 0x3a | ||
| 78 | |||
| 79 | static EVP_CIPHER r2_cbc_cipher= | ||
| 80 | { | ||
| 81 | NID_rc2_cbc, | ||
| 82 | 8,EVP_RC2_KEY_SIZE,8, | ||
| 83 | rc2_cbc_init_key, | ||
| 84 | rc2_cbc_cipher, | ||
| 85 | NULL, | ||
| 86 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 87 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 88 | rc2_set_asn1_type_and_iv, | ||
| 89 | rc2_get_asn1_type_and_iv, | ||
| 90 | }; | ||
| 91 | |||
| 92 | static EVP_CIPHER r2_64_cbc_cipher= | ||
| 93 | { | ||
| 94 | NID_rc2_64_cbc, | ||
| 95 | 8,8 /* 64 bit */,8, | ||
| 96 | rc2_cbc_init_key, | ||
| 97 | rc2_cbc_cipher, | ||
| 98 | NULL, | ||
| 99 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 100 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 101 | rc2_set_asn1_type_and_iv, | ||
| 102 | rc2_get_asn1_type_and_iv, | ||
| 103 | }; | ||
| 104 | |||
| 105 | static EVP_CIPHER r2_40_cbc_cipher= | ||
| 106 | { | ||
| 107 | NID_rc2_40_cbc, | ||
| 108 | 8,5 /* 40 bit */,8, | ||
| 109 | rc2_cbc_init_key, | ||
| 110 | rc2_cbc_cipher, | ||
| 111 | NULL, | ||
| 112 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 113 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 114 | rc2_set_asn1_type_and_iv, | ||
| 115 | rc2_get_asn1_type_and_iv, | ||
| 116 | }; | ||
| 117 | |||
| 118 | EVP_CIPHER *EVP_rc2_cbc(void) | ||
| 119 | { | ||
| 120 | return(&r2_cbc_cipher); | ||
| 121 | } | ||
| 122 | |||
| 123 | EVP_CIPHER *EVP_rc2_64_cbc(void) | ||
| 124 | { | ||
| 125 | return(&r2_64_cbc_cipher); | ||
| 126 | } | ||
| 127 | |||
| 128 | EVP_CIPHER *EVP_rc2_40_cbc(void) | ||
| 129 | { | ||
| 130 | return(&r2_40_cbc_cipher); | ||
| 131 | } | ||
| 132 | |||
| 133 | static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 134 | unsigned char *iv, int enc) | ||
| 135 | { | ||
| 136 | if (iv != NULL) | ||
| 137 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 138 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 139 | if (key != NULL) | ||
| 140 | RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx), | ||
| 141 | key,EVP_CIPHER_CTX_key_length(ctx)*8); | ||
| 142 | } | ||
| 143 | |||
| 144 | static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 145 | unsigned char *in, unsigned int inl) | ||
| 146 | { | ||
| 147 | RC2_cbc_encrypt( | ||
| 148 | in,out,(long)inl, | ||
| 149 | &(ctx->c.rc2_ks),&(ctx->iv[0]), | ||
| 150 | ctx->encrypt); | ||
| 151 | } | ||
| 152 | |||
| 153 | static int rc2_meth_to_magic(const EVP_CIPHER *e) | ||
| 154 | { | ||
| 155 | int i; | ||
| 156 | |||
| 157 | i=EVP_CIPHER_key_length(e); | ||
| 158 | if (i == 16) return(RC2_128_MAGIC); | ||
| 159 | else if (i == 8) return(RC2_64_MAGIC); | ||
| 160 | else if (i == 5) return(RC2_40_MAGIC); | ||
| 161 | else return(0); | ||
| 162 | } | ||
| 163 | |||
| 164 | static EVP_CIPHER *rc2_magic_to_meth(int i) | ||
| 165 | { | ||
| 166 | if (i == RC2_128_MAGIC) return(EVP_rc2_cbc()); | ||
| 167 | else if (i == RC2_64_MAGIC) return(EVP_rc2_64_cbc()); | ||
| 168 | else if (i == RC2_40_MAGIC) return(EVP_rc2_40_cbc()); | ||
| 169 | else | ||
| 170 | { | ||
| 171 | EVPerr(EVP_F_RC2_MAGIC_TO_METH,EVP_R_UNSUPPORTED_KEY_SIZE); | ||
| 172 | return(NULL); | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | ||
| 177 | { | ||
| 178 | long num=0; | ||
| 179 | int i=0,l; | ||
| 180 | EVP_CIPHER *e; | ||
| 181 | |||
| 182 | if (type != NULL) | ||
| 183 | { | ||
| 184 | l=EVP_CIPHER_CTX_iv_length(c); | ||
| 185 | i=ASN1_TYPE_get_int_octetstring(type,&num,c->oiv,l); | ||
| 186 | if (i != l) | ||
| 187 | return(-1); | ||
| 188 | else if (i > 0) | ||
| 189 | memcpy(c->iv,c->oiv,l); | ||
| 190 | e=rc2_magic_to_meth((int)num); | ||
| 191 | if (e == NULL) | ||
| 192 | return(-1); | ||
| 193 | if (e != EVP_CIPHER_CTX_cipher(c)) | ||
| 194 | { | ||
| 195 | EVP_CIPHER_CTX_cipher(c)=e; | ||
| 196 | rc2_cbc_init_key(c,NULL,NULL,1); | ||
| 197 | } | ||
| 198 | } | ||
| 199 | return(i); | ||
| 200 | } | ||
| 201 | |||
| 202 | static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | ||
| 203 | { | ||
| 204 | long num; | ||
| 205 | int i=0,j; | ||
| 206 | |||
| 207 | if (type != NULL) | ||
| 208 | { | ||
| 209 | num=rc2_meth_to_magic(EVP_CIPHER_CTX_cipher(c)); | ||
| 210 | j=EVP_CIPHER_CTX_iv_length(c); | ||
| 211 | i=ASN1_TYPE_set_int_octetstring(type,num,c->oiv,j); | ||
| 212 | } | ||
| 213 | return(i); | ||
| 214 | } | ||
| 215 | |||
| 216 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_r5.c b/src/lib/libssl/src/crypto/evp/e_cbc_r5.c index cea3fe333a..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cbc_r5.c +++ b/src/lib/libssl/src/crypto/evp/e_cbc_r5.c | |||
| @@ -1,108 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cbc_r5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER rc5_32_12_16_cbc_cipher= | ||
| 71 | { | ||
| 72 | NID_rc5_cbc, | ||
| 73 | 8,EVP_RC5_32_12_16_KEY_SIZE,8, | ||
| 74 | r_32_12_16_cbc_init_key, | ||
| 75 | r_32_12_16_cbc_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)), | ||
| 79 | NULL, | ||
| 80 | NULL, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_rc5_32_12_16_cbc(void) | ||
| 84 | { | ||
| 85 | return(&rc5_32_12_16_cbc_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | if (iv != NULL) | ||
| 92 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 93 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 94 | if (key != NULL) | ||
| 95 | RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE, | ||
| 96 | key,RC5_12_ROUNDS); | ||
| 97 | } | ||
| 98 | |||
| 99 | static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 100 | unsigned char *in, unsigned int inl) | ||
| 101 | { | ||
| 102 | RC5_32_cbc_encrypt( | ||
| 103 | in,out,(long)inl, | ||
| 104 | &(ctx->c.rc5_ks),&(ctx->iv[0]), | ||
| 105 | ctx->encrypt); | ||
| 106 | } | ||
| 107 | |||
| 108 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_3d.c b/src/lib/libssl/src/crypto/evp/e_cfb_3d.c index b364bd4e31..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cfb_3d.c +++ b/src/lib/libssl/src/crypto/evp/e_cfb_3d.c | |||
| @@ -1,155 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cfb_3d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void des_ede_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ede3_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | static EVP_CIPHER d_ede_cfb_cipher2= | ||
| 72 | { | ||
| 73 | NID_des_ede_cfb64, | ||
| 74 | 1,16,8, | ||
| 75 | des_ede_cfb_init_key, | ||
| 76 | des_ede_cfb_cipher, | ||
| 77 | NULL, | ||
| 78 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 79 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 80 | EVP_CIPHER_set_asn1_iv, | ||
| 81 | EVP_CIPHER_get_asn1_iv, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static EVP_CIPHER d_ede3_cfb_cipher3= | ||
| 85 | { | ||
| 86 | NID_des_ede3_cfb64, | ||
| 87 | 1,24,8, | ||
| 88 | des_ede3_cfb_init_key, | ||
| 89 | des_ede_cfb_cipher, | ||
| 90 | NULL, | ||
| 91 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 92 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 93 | EVP_CIPHER_set_asn1_iv, | ||
| 94 | EVP_CIPHER_get_asn1_iv, | ||
| 95 | }; | ||
| 96 | |||
| 97 | EVP_CIPHER *EVP_des_ede_cfb(void) | ||
| 98 | { | ||
| 99 | return(&d_ede_cfb_cipher2); | ||
| 100 | } | ||
| 101 | |||
| 102 | EVP_CIPHER *EVP_des_ede3_cfb(void) | ||
| 103 | { | ||
| 104 | return(&d_ede3_cfb_cipher3); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void des_ede_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 108 | unsigned char *iv, int enc) | ||
| 109 | { | ||
| 110 | des_cblock *deskey = (des_cblock *)key; | ||
| 111 | |||
| 112 | ctx->num=0; | ||
| 113 | |||
| 114 | if (iv != NULL) | ||
| 115 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 116 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 117 | if (deskey != NULL) | ||
| 118 | { | ||
| 119 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 120 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 121 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 122 | (char *)ctx->c.des_ede.ks1, | ||
| 123 | sizeof(ctx->c.des_ede.ks1)); | ||
| 124 | } | ||
| 125 | } | ||
| 126 | |||
| 127 | static void des_ede3_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 128 | unsigned char *iv, int enc) | ||
| 129 | { | ||
| 130 | des_cblock *deskey = (des_cblock *)key; | ||
| 131 | |||
| 132 | ctx->num=0; | ||
| 133 | |||
| 134 | if (iv != NULL) | ||
| 135 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 136 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 137 | if (deskey != NULL) | ||
| 138 | { | ||
| 139 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 140 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 141 | des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | static void des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 146 | unsigned char *in, unsigned int inl) | ||
| 147 | { | ||
| 148 | des_ede3_cfb64_encrypt(in,out,(long)inl, | ||
| 149 | ctx->c.des_ede.ks1, | ||
| 150 | ctx->c.des_ede.ks2, | ||
| 151 | ctx->c.des_ede.ks3, | ||
| 152 | (des_cblock*)&(ctx->iv[0]), | ||
| 153 | &ctx->num,ctx->encrypt); | ||
| 154 | } | ||
| 155 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_bf.c b/src/lib/libssl/src/crypto/evp/e_cfb_bf.c index 63e1e624ea..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cfb_bf.c +++ b/src/lib/libssl/src/crypto/evp/e_cfb_bf.c | |||
| @@ -1,108 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cfb_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BF | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | static EVP_CIPHER bfish_cfb_cipher= | ||
| 70 | { | ||
| 71 | NID_bf_cfb64, | ||
| 72 | 1,EVP_BLOWFISH_KEY_SIZE,8, | ||
| 73 | bf_cfb_init_key, | ||
| 74 | bf_cfb_cipher, | ||
| 75 | NULL, | ||
| 76 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), | ||
| 78 | EVP_CIPHER_set_asn1_iv, | ||
| 79 | EVP_CIPHER_get_asn1_iv, | ||
| 80 | }; | ||
| 81 | |||
| 82 | EVP_CIPHER *EVP_bf_cfb(void) | ||
| 83 | { | ||
| 84 | return(&bfish_cfb_cipher); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 88 | unsigned char *iv, int enc) | ||
| 89 | { | ||
| 90 | ctx->num=0; | ||
| 91 | |||
| 92 | if (iv != NULL) | ||
| 93 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 94 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 95 | if (key != NULL) | ||
| 96 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | ||
| 97 | } | ||
| 98 | |||
| 99 | static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 100 | unsigned char *in, unsigned int inl) | ||
| 101 | { | ||
| 102 | BF_cfb64_encrypt( | ||
| 103 | in,out, | ||
| 104 | (long)inl, &(ctx->c.bf_ks), | ||
| 105 | &(ctx->iv[0]), | ||
| 106 | &ctx->num,ctx->encrypt); | ||
| 107 | } | ||
| 108 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_c.c b/src/lib/libssl/src/crypto/evp/e_cfb_c.c index f04bac034b..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cfb_c.c +++ b/src/lib/libssl/src/crypto/evp/e_cfb_c.c | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cfb_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER cast5_cfb_cipher= | ||
| 71 | { | ||
| 72 | NID_cast5_cfb64, | ||
| 73 | 1,EVP_CAST5_KEY_SIZE,8, | ||
| 74 | cast_cfb_init_key, | ||
| 75 | cast_cfb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_cast5_cfb(void) | ||
| 84 | { | ||
| 85 | return(&cast5_cfb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | ctx->num=0; | ||
| 92 | |||
| 93 | if (iv != NULL) | ||
| 94 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 95 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 96 | if (key != NULL) | ||
| 97 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | ||
| 98 | } | ||
| 99 | |||
| 100 | static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 101 | unsigned char *in, unsigned int inl) | ||
| 102 | { | ||
| 103 | CAST_cfb64_encrypt( | ||
| 104 | in,out, | ||
| 105 | (long)inl, &(ctx->c.cast_ks), | ||
| 106 | &(ctx->iv[0]), | ||
| 107 | &ctx->num,ctx->encrypt); | ||
| 108 | } | ||
| 109 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_d.c b/src/lib/libssl/src/crypto/evp/e_cfb_d.c index 9e1714bd15..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cfb_d.c +++ b/src/lib/libssl/src/crypto/evp/e_cfb_d.c | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cfb_d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/evp.h> | ||
| 62 | #include <openssl/objects.h> | ||
| 63 | |||
| 64 | #ifndef NO_DES | ||
| 65 | static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | static EVP_CIPHER d_cfb_cipher= | ||
| 70 | { | ||
| 71 | NID_des_cfb64, | ||
| 72 | 1,8,8, | ||
| 73 | des_cfb_init_key, | ||
| 74 | des_cfb_cipher, | ||
| 75 | NULL, | ||
| 76 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)), | ||
| 78 | EVP_CIPHER_set_asn1_iv, | ||
| 79 | EVP_CIPHER_get_asn1_iv, | ||
| 80 | }; | ||
| 81 | |||
| 82 | EVP_CIPHER *EVP_des_cfb(void) | ||
| 83 | { | ||
| 84 | return(&d_cfb_cipher); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 88 | unsigned char *iv, int enc) | ||
| 89 | { | ||
| 90 | des_cblock *deskey = (des_cblock *)key; | ||
| 91 | |||
| 92 | ctx->num=0; | ||
| 93 | |||
| 94 | if (iv != NULL) | ||
| 95 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 96 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 97 | if (deskey != NULL) | ||
| 98 | des_set_key_unchecked(deskey,ctx->c.des_ks); | ||
| 99 | } | ||
| 100 | |||
| 101 | static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 102 | unsigned char *in, unsigned int inl) | ||
| 103 | { | ||
| 104 | des_cfb64_encrypt( | ||
| 105 | in,out, | ||
| 106 | (long)inl, ctx->c.des_ks, | ||
| 107 | (des_cblock *)&(ctx->iv[0]), | ||
| 108 | &ctx->num,ctx->encrypt); | ||
| 109 | } | ||
| 110 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_i.c b/src/lib/libssl/src/crypto/evp/e_cfb_i.c index 31c76c6dac..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cfb_i.c +++ b/src/lib/libssl/src/crypto/evp/e_cfb_i.c | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cfb_i.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void idea_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void idea_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER i_cfb_cipher= | ||
| 71 | { | ||
| 72 | NID_idea_cfb64, | ||
| 73 | 1,IDEA_KEY_LENGTH,IDEA_BLOCK, | ||
| 74 | idea_cfb_init_key, | ||
| 75 | idea_cfb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_idea_cfb(void) | ||
| 84 | { | ||
| 85 | return(&i_cfb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void idea_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | ctx->num=0; | ||
| 92 | |||
| 93 | if (iv != NULL) | ||
| 94 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 95 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 96 | if (key != NULL) | ||
| 97 | idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 98 | } | ||
| 99 | |||
| 100 | static void idea_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 101 | unsigned char *in, unsigned int inl) | ||
| 102 | { | ||
| 103 | idea_cfb64_encrypt( | ||
| 104 | in,out,(long)inl, | ||
| 105 | &(ctx->c.idea_ks),&(ctx->iv[0]), | ||
| 106 | &ctx->num,ctx->encrypt); | ||
| 107 | } | ||
| 108 | |||
| 109 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_r2.c b/src/lib/libssl/src/crypto/evp/e_cfb_r2.c index 32dd77eb7c..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cfb_r2.c +++ b/src/lib/libssl/src/crypto/evp/e_cfb_r2.c | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cfb_r2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void rc2_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void rc2_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER r2_cfb_cipher= | ||
| 71 | { | ||
| 72 | NID_rc2_cfb64, | ||
| 73 | 1,EVP_RC2_KEY_SIZE,8, | ||
| 74 | rc2_cfb_init_key, | ||
| 75 | rc2_cfb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_rc2_cfb(void) | ||
| 84 | { | ||
| 85 | return(&r2_cfb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void rc2_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | ctx->num=0; | ||
| 92 | |||
| 93 | if (iv != NULL) | ||
| 94 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 95 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 96 | if (key != NULL) | ||
| 97 | RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx), | ||
| 98 | key,EVP_CIPHER_CTX_key_length(ctx)*8); | ||
| 99 | } | ||
| 100 | |||
| 101 | static void rc2_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 102 | unsigned char *in, unsigned int inl) | ||
| 103 | { | ||
| 104 | RC2_cfb64_encrypt( | ||
| 105 | in,out, | ||
| 106 | (long)inl, &(ctx->c.rc2_ks), | ||
| 107 | &(ctx->iv[0]), | ||
| 108 | &ctx->num,ctx->encrypt); | ||
| 109 | } | ||
| 110 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_r5.c b/src/lib/libssl/src/crypto/evp/e_cfb_r5.c index 8e79728946..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_cfb_r5.c +++ b/src/lib/libssl/src/crypto/evp/e_cfb_r5.c | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | /* crypto/evp/e_cfb_r5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void rc5_32_12_16_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void rc5_32_12_16_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER rc5_cfb_cipher= | ||
| 71 | { | ||
| 72 | NID_rc5_cfb64, | ||
| 73 | 1,EVP_RC5_32_12_16_KEY_SIZE,8, | ||
| 74 | rc5_32_12_16_cfb_init_key, | ||
| 75 | rc5_32_12_16_cfb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_rc5_32_12_16_cfb(void) | ||
| 84 | { | ||
| 85 | return(&rc5_cfb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void rc5_32_12_16_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | ctx->num=0; | ||
| 92 | |||
| 93 | if (iv != NULL) | ||
| 94 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 95 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 96 | if (key != NULL) | ||
| 97 | RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key, | ||
| 98 | RC5_12_ROUNDS); | ||
| 99 | } | ||
| 100 | |||
| 101 | static void rc5_32_12_16_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 102 | unsigned char *in, unsigned int inl) | ||
| 103 | { | ||
| 104 | RC5_32_cfb64_encrypt( | ||
| 105 | in,out, | ||
| 106 | (long)inl, &(ctx->c.rc5_ks), | ||
| 107 | &(ctx->iv[0]), | ||
| 108 | &ctx->num,ctx->encrypt); | ||
| 109 | } | ||
| 110 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_des.c b/src/lib/libssl/src/crypto/evp/e_des.c new file mode 100644 index 0000000000..f4e998b81c --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_des.c | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | /* crypto/evp/e_des.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | #include "evp_locl.h" | ||
| 65 | |||
| 66 | static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 67 | const unsigned char *iv, int enc); | ||
| 68 | |||
| 69 | /* Because of various casts and different names can't use IMPLEMENT_BLOCK_CIPHER */ | ||
| 70 | |||
| 71 | static int des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 72 | const unsigned char *in, unsigned int inl) | ||
| 73 | { | ||
| 74 | BLOCK_CIPHER_ecb_loop() | ||
| 75 | des_ecb_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), ctx->c.des_ks, ctx->encrypt); | ||
| 76 | return 1; | ||
| 77 | } | ||
| 78 | |||
| 79 | static int des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 80 | const unsigned char *in, unsigned int inl) | ||
| 81 | { | ||
| 82 | des_ofb64_encrypt(in, out, (long)inl, ctx->c.des_ks, (des_cblock *)ctx->iv, &ctx->num); | ||
| 83 | return 1; | ||
| 84 | } | ||
| 85 | |||
| 86 | static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 87 | const unsigned char *in, unsigned int inl) | ||
| 88 | { | ||
| 89 | des_ncbc_encrypt(in, out, (long)inl, ctx->c.des_ks, | ||
| 90 | (des_cblock *)ctx->iv, ctx->encrypt); | ||
| 91 | return 1; | ||
| 92 | } | ||
| 93 | |||
| 94 | static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 95 | const unsigned char *in, unsigned int inl) | ||
| 96 | { | ||
| 97 | des_cfb64_encrypt(in, out, (long)inl, ctx->c.des_ks, | ||
| 98 | (des_cblock *)ctx->iv, &ctx->num, ctx->encrypt); | ||
| 99 | return 1; | ||
| 100 | } | ||
| 101 | |||
| 102 | BLOCK_CIPHER_defs(des, des_ks, NID_des, 8, 8, 8, | ||
| 103 | 0, des_init_key, NULL, | ||
| 104 | EVP_CIPHER_set_asn1_iv, | ||
| 105 | EVP_CIPHER_get_asn1_iv, | ||
| 106 | NULL) | ||
| 107 | |||
| 108 | |||
| 109 | static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 110 | const unsigned char *iv, int enc) | ||
| 111 | { | ||
| 112 | des_cblock *deskey = (des_cblock *)key; | ||
| 113 | |||
| 114 | des_set_key_unchecked(deskey,ctx->c.des_ks); | ||
| 115 | return 1; | ||
| 116 | } | ||
| 117 | |||
| 118 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_des3.c b/src/lib/libssl/src/crypto/evp/e_des3.c new file mode 100644 index 0000000000..a9aba4ae70 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_des3.c | |||
| @@ -0,0 +1,165 @@ | |||
| 1 | /* crypto/evp/e_des3.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | #include "evp_locl.h" | ||
| 65 | |||
| 66 | static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 67 | const unsigned char *iv,int enc); | ||
| 68 | |||
| 69 | static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 70 | const unsigned char *iv,int enc); | ||
| 71 | |||
| 72 | /* Because of various casts and different args can't use IMPLEMENT_BLOCK_CIPHER */ | ||
| 73 | |||
| 74 | static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 75 | const unsigned char *in, unsigned int inl) | ||
| 76 | { | ||
| 77 | BLOCK_CIPHER_ecb_loop() | ||
| 78 | des_ecb3_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), | ||
| 79 | ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, | ||
| 80 | ctx->encrypt); | ||
| 81 | return 1; | ||
| 82 | } | ||
| 83 | |||
| 84 | static int des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 85 | const unsigned char *in, unsigned int inl) | ||
| 86 | { | ||
| 87 | des_ede3_ofb64_encrypt(in, out, (long)inl, | ||
| 88 | ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, | ||
| 89 | (des_cblock *)ctx->iv, &ctx->num); | ||
| 90 | return 1; | ||
| 91 | } | ||
| 92 | |||
| 93 | static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 94 | const unsigned char *in, unsigned int inl) | ||
| 95 | { | ||
| 96 | des_ede3_cbc_encrypt(in, out, (long)inl, | ||
| 97 | ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, | ||
| 98 | (des_cblock *)ctx->iv, ctx->encrypt); | ||
| 99 | return 1; | ||
| 100 | } | ||
| 101 | |||
| 102 | static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 103 | const unsigned char *in, unsigned int inl) | ||
| 104 | { | ||
| 105 | des_ede3_cfb64_encrypt(in, out, (long)inl, | ||
| 106 | ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, | ||
| 107 | (des_cblock *)ctx->iv, &ctx->num, ctx->encrypt); | ||
| 108 | return 1; | ||
| 109 | } | ||
| 110 | |||
| 111 | #define NID_des_ede_ecb NID_des_ede | ||
| 112 | |||
| 113 | BLOCK_CIPHER_defs(des_ede, des_ede, NID_des_ede, 8, 16, 8, | ||
| 114 | 0, des_ede_init_key, NULL, | ||
| 115 | EVP_CIPHER_set_asn1_iv, | ||
| 116 | EVP_CIPHER_get_asn1_iv, | ||
| 117 | NULL) | ||
| 118 | |||
| 119 | #define NID_des_ede3_ecb NID_des_ede3 | ||
| 120 | #define des_ede3_cfb_cipher des_ede_cfb_cipher | ||
| 121 | #define des_ede3_ofb_cipher des_ede_ofb_cipher | ||
| 122 | #define des_ede3_cbc_cipher des_ede_cbc_cipher | ||
| 123 | #define des_ede3_ecb_cipher des_ede_ecb_cipher | ||
| 124 | |||
| 125 | BLOCK_CIPHER_defs(des_ede3, des_ede, NID_des_ede3, 8, 24, 8, | ||
| 126 | 0, des_ede3_init_key, NULL, | ||
| 127 | EVP_CIPHER_set_asn1_iv, | ||
| 128 | EVP_CIPHER_get_asn1_iv, | ||
| 129 | NULL) | ||
| 130 | |||
| 131 | static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 132 | const unsigned char *iv, int enc) | ||
| 133 | { | ||
| 134 | des_cblock *deskey = (des_cblock *)key; | ||
| 135 | |||
| 136 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 137 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 138 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 139 | (char *)ctx->c.des_ede.ks1, | ||
| 140 | sizeof(ctx->c.des_ede.ks1)); | ||
| 141 | return 1; | ||
| 142 | } | ||
| 143 | |||
| 144 | static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 145 | const unsigned char *iv, int enc) | ||
| 146 | { | ||
| 147 | des_cblock *deskey = (des_cblock *)key; | ||
| 148 | |||
| 149 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 150 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 151 | des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3); | ||
| 152 | |||
| 153 | return 1; | ||
| 154 | } | ||
| 155 | |||
| 156 | EVP_CIPHER *EVP_des_ede(void) | ||
| 157 | { | ||
| 158 | return &des_ede_ecb; | ||
| 159 | } | ||
| 160 | |||
| 161 | EVP_CIPHER *EVP_des_ede3(void) | ||
| 162 | { | ||
| 163 | return &des_ede3_ecb; | ||
| 164 | } | ||
| 165 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_3d.c b/src/lib/libssl/src/crypto/evp/e_ecb_3d.c index 806e971d36..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ecb_3d.c +++ b/src/lib/libssl/src/crypto/evp/e_ecb_3d.c | |||
| @@ -1,158 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ecb_3d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void des_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | static EVP_CIPHER d_ede_cipher2= | ||
| 72 | { | ||
| 73 | NID_des_ede, | ||
| 74 | 8,16,0, | ||
| 75 | des_ede_init_key, | ||
| 76 | des_ede_cipher, | ||
| 77 | NULL, | ||
| 78 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 79 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 80 | NULL, | ||
| 81 | NULL, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static EVP_CIPHER d_ede3_cipher3= | ||
| 85 | { | ||
| 86 | NID_des_ede3, | ||
| 87 | 8,24,0, | ||
| 88 | des_ede3_init_key, | ||
| 89 | des_ede_cipher, | ||
| 90 | NULL, | ||
| 91 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 92 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 93 | NULL, | ||
| 94 | }; | ||
| 95 | |||
| 96 | EVP_CIPHER *EVP_des_ede(void) | ||
| 97 | { | ||
| 98 | return(&d_ede_cipher2); | ||
| 99 | } | ||
| 100 | |||
| 101 | EVP_CIPHER *EVP_des_ede3(void) | ||
| 102 | { | ||
| 103 | return(&d_ede3_cipher3); | ||
| 104 | } | ||
| 105 | |||
| 106 | static void des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 107 | unsigned char *iv, int enc) | ||
| 108 | { | ||
| 109 | des_cblock *deskey = (des_cblock *)key; | ||
| 110 | |||
| 111 | if (deskey != NULL) | ||
| 112 | { | ||
| 113 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 114 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 115 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 116 | (char *)ctx->c.des_ede.ks1, | ||
| 117 | sizeof(ctx->c.des_ede.ks1)); | ||
| 118 | } | ||
| 119 | } | ||
| 120 | |||
| 121 | static void des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 122 | unsigned char *iv, int enc) | ||
| 123 | { | ||
| 124 | des_cblock *deskey = (des_cblock *)key; | ||
| 125 | |||
| 126 | if (deskey != NULL) | ||
| 127 | { | ||
| 128 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 129 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 130 | des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3); | ||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 134 | static void des_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 135 | unsigned char *in, unsigned int inl) | ||
| 136 | { | ||
| 137 | unsigned int i; | ||
| 138 | des_cblock *output /* = (des_cblock *)out */; | ||
| 139 | des_cblock *input /* = (des_cblock *)in */; | ||
| 140 | |||
| 141 | if (inl < 8) return; | ||
| 142 | inl-=8; | ||
| 143 | for (i=0; i<=inl; i+=8) | ||
| 144 | { | ||
| 145 | output = (des_cblock *)(out + i); | ||
| 146 | input = (des_cblock *)(in + i); | ||
| 147 | |||
| 148 | des_ecb3_encrypt(input,output, | ||
| 149 | ctx->c.des_ede.ks1, | ||
| 150 | ctx->c.des_ede.ks2, | ||
| 151 | ctx->c.des_ede.ks3, | ||
| 152 | ctx->encrypt); | ||
| 153 | |||
| 154 | /* output++; */ | ||
| 155 | /* input++; */ | ||
| 156 | } | ||
| 157 | } | ||
| 158 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_bf.c b/src/lib/libssl/src/crypto/evp/e_ecb_bf.c index 334736d253..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ecb_bf.c +++ b/src/lib/libssl/src/crypto/evp/e_ecb_bf.c | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ecb_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BF | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | static EVP_CIPHER bfish_ecb_cipher= | ||
| 70 | { | ||
| 71 | NID_bf_ecb, | ||
| 72 | 8,EVP_BLOWFISH_KEY_SIZE,0, | ||
| 73 | bf_ecb_init_key, | ||
| 74 | bf_ecb_cipher, | ||
| 75 | NULL, | ||
| 76 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), | ||
| 78 | NULL, | ||
| 79 | NULL, | ||
| 80 | }; | ||
| 81 | |||
| 82 | EVP_CIPHER *EVP_bf_ecb(void) | ||
| 83 | { | ||
| 84 | return(&bfish_ecb_cipher); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 88 | unsigned char *iv, int enc) | ||
| 89 | { | ||
| 90 | if (key != NULL) | ||
| 91 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 95 | unsigned char *in, unsigned int inl) | ||
| 96 | { | ||
| 97 | unsigned int i; | ||
| 98 | |||
| 99 | if (inl < 8) return; | ||
| 100 | inl-=8; | ||
| 101 | for (i=0; i<=inl; i+=8) | ||
| 102 | { | ||
| 103 | BF_ecb_encrypt( | ||
| 104 | &(in[i]),&(out[i]), | ||
| 105 | &(ctx->c.bf_ks),ctx->encrypt); | ||
| 106 | } | ||
| 107 | } | ||
| 108 | |||
| 109 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_c.c b/src/lib/libssl/src/crypto/evp/e_ecb_c.c index ad14e203cb..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ecb_c.c +++ b/src/lib/libssl/src/crypto/evp/e_ecb_c.c | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ecb_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER cast5_ecb_cipher= | ||
| 71 | { | ||
| 72 | NID_cast5_ecb, | ||
| 73 | 8,EVP_CAST5_KEY_SIZE,0, | ||
| 74 | cast_ecb_init_key, | ||
| 75 | cast_ecb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), | ||
| 79 | NULL, | ||
| 80 | NULL, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_cast5_ecb(void) | ||
| 84 | { | ||
| 85 | return(&cast5_ecb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | if (key != NULL) | ||
| 92 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | ||
| 93 | } | ||
| 94 | |||
| 95 | static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 96 | unsigned char *in, unsigned int inl) | ||
| 97 | { | ||
| 98 | unsigned int i; | ||
| 99 | |||
| 100 | if (inl < 8) return; | ||
| 101 | inl-=8; | ||
| 102 | for (i=0; i<=inl; i+=8) | ||
| 103 | { | ||
| 104 | CAST_ecb_encrypt( | ||
| 105 | &(in[i]),&(out[i]), | ||
| 106 | &(ctx->c.cast_ks),ctx->encrypt); | ||
| 107 | } | ||
| 108 | } | ||
| 109 | |||
| 110 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_d.c b/src/lib/libssl/src/crypto/evp/e_ecb_d.c index c11bef55ef..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ecb_d.c +++ b/src/lib/libssl/src/crypto/evp/e_ecb_d.c | |||
| @@ -1,118 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ecb_d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void des_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | static EVP_CIPHER d_ecb_cipher= | ||
| 70 | { | ||
| 71 | NID_des_ecb, | ||
| 72 | 8,8,0, | ||
| 73 | des_ecb_init_key, | ||
| 74 | des_ecb_cipher, | ||
| 75 | NULL, | ||
| 76 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)), | ||
| 78 | NULL, | ||
| 79 | NULL, | ||
| 80 | }; | ||
| 81 | |||
| 82 | EVP_CIPHER *EVP_des_ecb(void) | ||
| 83 | { | ||
| 84 | return(&d_ecb_cipher); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void des_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 88 | unsigned char *iv, int enc) | ||
| 89 | { | ||
| 90 | des_cblock *deskey = (des_cblock *)key; | ||
| 91 | |||
| 92 | if (deskey != NULL) | ||
| 93 | des_set_key_unchecked(deskey,ctx->c.des_ks); | ||
| 94 | } | ||
| 95 | |||
| 96 | static void des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 97 | unsigned char *in, unsigned int inl) | ||
| 98 | { | ||
| 99 | unsigned int i; | ||
| 100 | des_cblock *output /* = (des_cblock *)out */; | ||
| 101 | des_cblock *input /* = (des_cblock *)in */; | ||
| 102 | |||
| 103 | if (inl < 8) return; | ||
| 104 | inl-=8; | ||
| 105 | for (i=0; i<=inl; i+=8) | ||
| 106 | { | ||
| 107 | /* Either this ... */ | ||
| 108 | output = (des_cblock *)(out + i); | ||
| 109 | input = (des_cblock *)(in + i); | ||
| 110 | |||
| 111 | des_ecb_encrypt(input,output,ctx->c.des_ks,ctx->encrypt); | ||
| 112 | |||
| 113 | /* ... or this. */ | ||
| 114 | /* output++; */ | ||
| 115 | /* input++; */ | ||
| 116 | } | ||
| 117 | } | ||
| 118 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_i.c b/src/lib/libssl/src/crypto/evp/e_ecb_i.c index 50a3da1bba..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ecb_i.c +++ b/src/lib/libssl/src/crypto/evp/e_ecb_i.c | |||
| @@ -1,121 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ecb_i.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void idea_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER i_ecb_cipher= | ||
| 71 | { | ||
| 72 | NID_idea_ecb, | ||
| 73 | 8,16,0, | ||
| 74 | idea_ecb_init_key, | ||
| 75 | idea_ecb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)), | ||
| 79 | NULL, | ||
| 80 | NULL, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_idea_ecb(void) | ||
| 84 | { | ||
| 85 | return(&i_ecb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void idea_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | if (key != NULL) | ||
| 92 | { | ||
| 93 | if (enc) | ||
| 94 | idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 95 | else | ||
| 96 | { | ||
| 97 | IDEA_KEY_SCHEDULE tmp; | ||
| 98 | |||
| 99 | idea_set_encrypt_key(key,&tmp); | ||
| 100 | idea_set_decrypt_key(&tmp, &(ctx->c.idea_ks)); | ||
| 101 | memset((unsigned char *)&tmp,0, | ||
| 102 | sizeof(IDEA_KEY_SCHEDULE)); | ||
| 103 | } | ||
| 104 | } | ||
| 105 | } | ||
| 106 | |||
| 107 | static void idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 108 | unsigned char *in, unsigned int inl) | ||
| 109 | { | ||
| 110 | unsigned int i; | ||
| 111 | |||
| 112 | if (inl < 8) return; | ||
| 113 | inl-=8; | ||
| 114 | for (i=0; i<=inl; i+=8) | ||
| 115 | { | ||
| 116 | idea_ecb_encrypt( | ||
| 117 | &(in[i]),&(out[i]),&(ctx->c.idea_ks)); | ||
| 118 | } | ||
| 119 | } | ||
| 120 | |||
| 121 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_r2.c b/src/lib/libssl/src/crypto/evp/e_ecb_r2.c index 3c2330130d..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ecb_r2.c +++ b/src/lib/libssl/src/crypto/evp/e_ecb_r2.c | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ecb_r2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void rc2_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER r2_ecb_cipher= | ||
| 71 | { | ||
| 72 | NID_rc2_ecb, | ||
| 73 | 8,EVP_RC2_KEY_SIZE,0, | ||
| 74 | rc2_ecb_init_key, | ||
| 75 | rc2_ecb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 79 | NULL, | ||
| 80 | NULL, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_rc2_ecb(void) | ||
| 84 | { | ||
| 85 | return(&r2_ecb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void rc2_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | if (key != NULL) | ||
| 92 | RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx), | ||
| 93 | key,EVP_CIPHER_CTX_key_length(ctx)*8); | ||
| 94 | } | ||
| 95 | |||
| 96 | static void rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 97 | unsigned char *in, unsigned int inl) | ||
| 98 | { | ||
| 99 | unsigned int i; | ||
| 100 | |||
| 101 | if (inl < 8) return; | ||
| 102 | inl-=8; | ||
| 103 | for (i=0; i<=inl; i+=8) | ||
| 104 | { | ||
| 105 | RC2_ecb_encrypt( | ||
| 106 | &(in[i]),&(out[i]), | ||
| 107 | &(ctx->c.rc2_ks),ctx->encrypt); | ||
| 108 | } | ||
| 109 | } | ||
| 110 | |||
| 111 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_r5.c b/src/lib/libssl/src/crypto/evp/e_ecb_r5.c index ef43ce34bf..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ecb_r5.c +++ b/src/lib/libssl/src/crypto/evp/e_ecb_r5.c | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ecb_r5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void rc5_32_12_16_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void rc5_32_12_16_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER rc5_ecb_cipher= | ||
| 71 | { | ||
| 72 | NID_rc5_ecb, | ||
| 73 | 8,EVP_RC5_32_12_16_KEY_SIZE,0, | ||
| 74 | rc5_32_12_16_ecb_init_key, | ||
| 75 | rc5_32_12_16_ecb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)), | ||
| 79 | NULL, | ||
| 80 | NULL, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_rc5_32_12_16_ecb(void) | ||
| 84 | { | ||
| 85 | return(&rc5_ecb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void rc5_32_12_16_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | if (key != NULL) | ||
| 92 | RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key, | ||
| 93 | RC5_12_ROUNDS); | ||
| 94 | } | ||
| 95 | |||
| 96 | static void rc5_32_12_16_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 97 | unsigned char *in, unsigned int inl) | ||
| 98 | { | ||
| 99 | unsigned int i; | ||
| 100 | |||
| 101 | if (inl < 8) return; | ||
| 102 | inl-=8; | ||
| 103 | for (i=0; i<=inl; i+=8) | ||
| 104 | { | ||
| 105 | RC5_32_ecb_encrypt( | ||
| 106 | &(in[i]),&(out[i]), | ||
| 107 | &(ctx->c.rc5_ks),ctx->encrypt); | ||
| 108 | } | ||
| 109 | } | ||
| 110 | |||
| 111 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_idea.c b/src/lib/libssl/src/crypto/evp/e_idea.c new file mode 100644 index 0000000000..8d3c88deb7 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_idea.c | |||
| @@ -0,0 +1,112 @@ | |||
| 1 | /* crypto/evp/e_idea.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include "evp_locl.h" | ||
| 66 | |||
| 67 | static int idea_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 68 | const unsigned char *iv,int enc); | ||
| 69 | |||
| 70 | /* NB idea_ecb_encrypt doesn't take an 'encrypt' argument so we treat it as a special | ||
| 71 | * case | ||
| 72 | */ | ||
| 73 | |||
| 74 | static int idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 75 | const unsigned char *in, unsigned int inl) | ||
| 76 | { | ||
| 77 | BLOCK_CIPHER_ecb_loop() | ||
| 78 | idea_ecb_encrypt(in + i, out + i, &ctx->c.idea_ks); | ||
| 79 | return 1; | ||
| 80 | } | ||
| 81 | |||
| 82 | /* Can't use IMPLEMENT_BLOCK_CIPHER because idea_ecb_encrypt is different */ | ||
| 83 | |||
| 84 | BLOCK_CIPHER_func_cbc(idea, idea, idea_ks) | ||
| 85 | BLOCK_CIPHER_func_ofb(idea, idea, idea_ks) | ||
| 86 | BLOCK_CIPHER_func_cfb(idea, idea, idea_ks) | ||
| 87 | |||
| 88 | BLOCK_CIPHER_defs(idea, idea_ks, NID_idea, 8, 16, 8, | ||
| 89 | 0, idea_init_key, NULL, | ||
| 90 | EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) | ||
| 91 | |||
| 92 | static int idea_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 93 | const unsigned char *iv, int enc) | ||
| 94 | { | ||
| 95 | if(!enc) { | ||
| 96 | if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_OFB_MODE) enc = 1; | ||
| 97 | else if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_CFB_MODE) enc = 1; | ||
| 98 | } | ||
| 99 | if (enc) idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 100 | else | ||
| 101 | { | ||
| 102 | IDEA_KEY_SCHEDULE tmp; | ||
| 103 | |||
| 104 | idea_set_encrypt_key(key,&tmp); | ||
| 105 | idea_set_decrypt_key(&tmp,&(ctx->c.idea_ks)); | ||
| 106 | memset((unsigned char *)&tmp,0, | ||
| 107 | sizeof(IDEA_KEY_SCHEDULE)); | ||
| 108 | } | ||
| 109 | return 1; | ||
| 110 | } | ||
| 111 | |||
| 112 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_null.c b/src/lib/libssl/src/crypto/evp/e_null.c index 0a62c10aa9..e0702cf818 100644 --- a/src/lib/libssl/src/crypto/evp/e_null.c +++ b/src/lib/libssl/src/crypto/evp/e_null.c | |||
| @@ -61,20 +61,22 @@ | |||
| 61 | #include <openssl/evp.h> | 61 | #include <openssl/evp.h> |
| 62 | #include <openssl/objects.h> | 62 | #include <openssl/objects.h> |
| 63 | 63 | ||
| 64 | static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 64 | static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 65 | unsigned char *iv,int enc); | 65 | const unsigned char *iv,int enc); |
| 66 | static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 66 | static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 67 | unsigned char *in, unsigned int inl); | 67 | const unsigned char *in, unsigned int inl); |
| 68 | static EVP_CIPHER n_cipher= | 68 | static EVP_CIPHER n_cipher= |
| 69 | { | 69 | { |
| 70 | NID_undef, | 70 | NID_undef, |
| 71 | 1,0,0, | 71 | 1,0,0, |
| 72 | 0, | ||
| 72 | null_init_key, | 73 | null_init_key, |
| 73 | null_cipher, | 74 | null_cipher, |
| 74 | NULL, | 75 | NULL, |
| 75 | 0, | 76 | 0, |
| 76 | NULL, | 77 | NULL, |
| 77 | NULL, | 78 | NULL, |
| 79 | NULL | ||
| 78 | }; | 80 | }; |
| 79 | 81 | ||
| 80 | EVP_CIPHER *EVP_enc_null(void) | 82 | EVP_CIPHER *EVP_enc_null(void) |
| @@ -82,16 +84,18 @@ EVP_CIPHER *EVP_enc_null(void) | |||
| 82 | return(&n_cipher); | 84 | return(&n_cipher); |
| 83 | } | 85 | } |
| 84 | 86 | ||
| 85 | static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 87 | static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 86 | unsigned char *iv, int enc) | 88 | const unsigned char *iv, int enc) |
| 87 | { | 89 | { |
| 88 | memset(&(ctx->c),0,sizeof(ctx->c)); | 90 | memset(&(ctx->c),0,sizeof(ctx->c)); |
| 91 | return 1; | ||
| 89 | } | 92 | } |
| 90 | 93 | ||
| 91 | static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 94 | static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 92 | unsigned char *in, unsigned int inl) | 95 | const unsigned char *in, unsigned int inl) |
| 93 | { | 96 | { |
| 94 | if (in != out) | 97 | if (in != out) |
| 95 | memcpy((char *)out,(char *)in,(int)inl); | 98 | memcpy((char *)out,(char *)in,(int)inl); |
| 99 | return 1; | ||
| 96 | } | 100 | } |
| 97 | 101 | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_3d.c b/src/lib/libssl/src/crypto/evp/e_ofb_3d.c index d1a33e2ecd..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ofb_3d.c +++ b/src/lib/libssl/src/crypto/evp/e_ofb_3d.c | |||
| @@ -1,152 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ofb_3d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void des_ede_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ede3_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | static EVP_CIPHER d_ede_ofb_cipher2= | ||
| 72 | { | ||
| 73 | NID_des_ede_ofb64, | ||
| 74 | 1,16,8, | ||
| 75 | des_ede_ofb_init_key, | ||
| 76 | des_ede_ofb_cipher, | ||
| 77 | NULL, | ||
| 78 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 79 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 80 | EVP_CIPHER_set_asn1_iv, | ||
| 81 | EVP_CIPHER_get_asn1_iv, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static EVP_CIPHER d_ede3_ofb_cipher3= | ||
| 85 | { | ||
| 86 | NID_des_ede3_ofb64, | ||
| 87 | 1,24,8, | ||
| 88 | des_ede3_ofb_init_key, | ||
| 89 | des_ede_ofb_cipher, | ||
| 90 | NULL, | ||
| 91 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 92 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 93 | EVP_CIPHER_set_asn1_iv, | ||
| 94 | EVP_CIPHER_get_asn1_iv, | ||
| 95 | }; | ||
| 96 | |||
| 97 | EVP_CIPHER *EVP_des_ede_ofb(void) | ||
| 98 | { | ||
| 99 | return(&d_ede_ofb_cipher2); | ||
| 100 | } | ||
| 101 | |||
| 102 | EVP_CIPHER *EVP_des_ede3_ofb(void) | ||
| 103 | { | ||
| 104 | return(&d_ede3_ofb_cipher3); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void des_ede_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 108 | unsigned char *iv, int enc) | ||
| 109 | { | ||
| 110 | des_cblock *deskey = (des_cblock *)key; | ||
| 111 | |||
| 112 | ctx->num=0; | ||
| 113 | |||
| 114 | if (iv != NULL) | ||
| 115 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 116 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 117 | if (deskey != NULL) | ||
| 118 | { | ||
| 119 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 120 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 121 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 122 | (char *)ctx->c.des_ede.ks1, | ||
| 123 | sizeof(ctx->c.des_ede.ks1)); | ||
| 124 | } | ||
| 125 | } | ||
| 126 | |||
| 127 | static void des_ede3_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 128 | unsigned char *iv, int enc) | ||
| 129 | { | ||
| 130 | des_cblock *deskey = (des_cblock *)key; | ||
| 131 | |||
| 132 | ctx->num=0; | ||
| 133 | |||
| 134 | if (iv != NULL) | ||
| 135 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 136 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 137 | if (deskey != NULL) | ||
| 138 | { | ||
| 139 | des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1); | ||
| 140 | des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2); | ||
| 141 | des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | static void des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 146 | unsigned char *in, unsigned int inl) | ||
| 147 | { | ||
| 148 | des_ede3_ofb64_encrypt(in,out,inl,ctx->c.des_ede.ks1, | ||
| 149 | ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, | ||
| 150 | (des_cblock *)&(ctx->iv[0]),&ctx->num); | ||
| 151 | } | ||
| 152 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_bf.c b/src/lib/libssl/src/crypto/evp/e_ofb_bf.c index c82154b549..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ofb_bf.c +++ b/src/lib/libssl/src/crypto/evp/e_ofb_bf.c | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ofb_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BF | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void bf_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | static EVP_CIPHER bfish_ofb_cipher= | ||
| 70 | { | ||
| 71 | NID_bf_ofb64, | ||
| 72 | 1,EVP_BLOWFISH_KEY_SIZE,8, | ||
| 73 | bf_ofb_init_key, | ||
| 74 | bf_ofb_cipher, | ||
| 75 | NULL, | ||
| 76 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), | ||
| 78 | EVP_CIPHER_set_asn1_iv, | ||
| 79 | EVP_CIPHER_get_asn1_iv, | ||
| 80 | }; | ||
| 81 | |||
| 82 | EVP_CIPHER *EVP_bf_ofb(void) | ||
| 83 | { | ||
| 84 | return(&bfish_ofb_cipher); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void bf_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 88 | unsigned char *iv, int enc) | ||
| 89 | { | ||
| 90 | ctx->num=0; | ||
| 91 | |||
| 92 | if (iv != NULL) | ||
| 93 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 94 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 95 | if (key != NULL) | ||
| 96 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | ||
| 97 | } | ||
| 98 | |||
| 99 | static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 100 | unsigned char *in, unsigned int inl) | ||
| 101 | { | ||
| 102 | BF_ofb64_encrypt( | ||
| 103 | in,out, | ||
| 104 | (long)inl, &(ctx->c.bf_ks), | ||
| 105 | &(ctx->iv[0]), | ||
| 106 | &ctx->num); | ||
| 107 | } | ||
| 108 | |||
| 109 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_c.c b/src/lib/libssl/src/crypto/evp/e_ofb_c.c index 971043de4c..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ofb_c.c +++ b/src/lib/libssl/src/crypto/evp/e_ofb_c.c | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ofb_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER cast5_ofb_cipher= | ||
| 71 | { | ||
| 72 | NID_cast5_ofb64, | ||
| 73 | 1,EVP_CAST5_KEY_SIZE,8, | ||
| 74 | cast_ofb_init_key, | ||
| 75 | cast_ofb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_cast5_ofb(void) | ||
| 84 | { | ||
| 85 | return(&cast5_ofb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | ctx->num=0; | ||
| 92 | |||
| 93 | if (iv != NULL) | ||
| 94 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 95 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 96 | if (key != NULL) | ||
| 97 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | ||
| 98 | } | ||
| 99 | |||
| 100 | static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 101 | unsigned char *in, unsigned int inl) | ||
| 102 | { | ||
| 103 | CAST_ofb64_encrypt( | ||
| 104 | in,out, | ||
| 105 | (long)inl, &(ctx->c.cast_ks), | ||
| 106 | &(ctx->iv[0]), | ||
| 107 | &ctx->num); | ||
| 108 | } | ||
| 109 | |||
| 110 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_d.c b/src/lib/libssl/src/crypto/evp/e_ofb_d.c index d51ce230f4..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ofb_d.c +++ b/src/lib/libssl/src/crypto/evp/e_ofb_d.c | |||
| @@ -1,107 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ofb_d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DES | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | static void des_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | static EVP_CIPHER d_ofb_cipher= | ||
| 70 | { | ||
| 71 | NID_des_ofb64, | ||
| 72 | 1,8,8, | ||
| 73 | des_ofb_init_key, | ||
| 74 | des_ofb_cipher, | ||
| 75 | NULL, | ||
| 76 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)), | ||
| 78 | EVP_CIPHER_set_asn1_iv, | ||
| 79 | EVP_CIPHER_get_asn1_iv, | ||
| 80 | }; | ||
| 81 | |||
| 82 | EVP_CIPHER *EVP_des_ofb(void) | ||
| 83 | { | ||
| 84 | return(&d_ofb_cipher); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void des_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 88 | unsigned char *iv, int enc) | ||
| 89 | { | ||
| 90 | des_cblock *deskey = (des_cblock *)key; | ||
| 91 | |||
| 92 | ctx->num=0; | ||
| 93 | |||
| 94 | if (iv != NULL) | ||
| 95 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 96 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 97 | if (deskey != NULL) | ||
| 98 | des_set_key_unchecked(deskey,ctx->c.des_ks); | ||
| 99 | } | ||
| 100 | |||
| 101 | static void des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 102 | unsigned char *in, unsigned int inl) | ||
| 103 | { | ||
| 104 | des_ofb64_encrypt(in,out,inl,ctx->c.des_ks, | ||
| 105 | (des_cblock *)&(ctx->iv[0]),&ctx->num); | ||
| 106 | } | ||
| 107 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_i.c b/src/lib/libssl/src/crypto/evp/e_ofb_i.c index 389206ef36..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ofb_i.c +++ b/src/lib/libssl/src/crypto/evp/e_ofb_i.c | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ofb_i.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER i_ofb_cipher= | ||
| 71 | { | ||
| 72 | NID_idea_ofb64, | ||
| 73 | 1,IDEA_KEY_LENGTH,IDEA_BLOCK, | ||
| 74 | idea_ofb_init_key, | ||
| 75 | idea_ofb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_idea_ofb(void) | ||
| 84 | { | ||
| 85 | return(&i_ofb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | ctx->num=0; | ||
| 92 | |||
| 93 | if (iv != NULL) | ||
| 94 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 95 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 96 | if (key != NULL) | ||
| 97 | idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 98 | } | ||
| 99 | |||
| 100 | static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 101 | unsigned char *in, unsigned int inl) | ||
| 102 | { | ||
| 103 | idea_ofb64_encrypt( | ||
| 104 | in,out,(long)inl, | ||
| 105 | &(ctx->c.idea_ks),&(ctx->iv[0]), | ||
| 106 | &ctx->num); | ||
| 107 | } | ||
| 108 | |||
| 109 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_r2.c b/src/lib/libssl/src/crypto/evp/e_ofb_r2.c index 60ae3d4507..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ofb_r2.c +++ b/src/lib/libssl/src/crypto/evp/e_ofb_r2.c | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ofb_r2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void rc2_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER r2_ofb_cipher= | ||
| 71 | { | ||
| 72 | NID_rc2_ofb64, | ||
| 73 | 1,EVP_RC2_KEY_SIZE,8, | ||
| 74 | rc2_ofb_init_key, | ||
| 75 | rc2_ofb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_rc2_ofb(void) | ||
| 84 | { | ||
| 85 | return(&r2_ofb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void rc2_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | ctx->num=0; | ||
| 92 | |||
| 93 | if (iv != NULL) | ||
| 94 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 95 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 96 | if (key != NULL) | ||
| 97 | RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx), | ||
| 98 | key,EVP_CIPHER_CTX_key_length(ctx)*8); | ||
| 99 | } | ||
| 100 | |||
| 101 | static void rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 102 | unsigned char *in, unsigned int inl) | ||
| 103 | { | ||
| 104 | RC2_ofb64_encrypt( | ||
| 105 | in,out, | ||
| 106 | (long)inl, &(ctx->c.rc2_ks), | ||
| 107 | &(ctx->iv[0]), | ||
| 108 | &ctx->num); | ||
| 109 | } | ||
| 110 | |||
| 111 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_r5.c b/src/lib/libssl/src/crypto/evp/e_ofb_r5.c index 30136824eb..e69de29bb2 100644 --- a/src/lib/libssl/src/crypto/evp/e_ofb_r5.c +++ b/src/lib/libssl/src/crypto/evp/e_ofb_r5.c | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* crypto/evp/e_ofb_r5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | |||
| 66 | static void rc5_32_12_16_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 67 | unsigned char *iv,int enc); | ||
| 68 | static void rc5_32_12_16_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 69 | unsigned char *in, unsigned int inl); | ||
| 70 | static EVP_CIPHER rc5_ofb_cipher= | ||
| 71 | { | ||
| 72 | NID_rc5_ofb64, | ||
| 73 | 1,EVP_RC5_32_12_16_KEY_SIZE,8, | ||
| 74 | rc5_32_12_16_ofb_init_key, | ||
| 75 | rc5_32_12_16_ofb_cipher, | ||
| 76 | NULL, | ||
| 77 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)), | ||
| 79 | EVP_CIPHER_set_asn1_iv, | ||
| 80 | EVP_CIPHER_get_asn1_iv, | ||
| 81 | }; | ||
| 82 | |||
| 83 | EVP_CIPHER *EVP_rc5_32_12_16_ofb(void) | ||
| 84 | { | ||
| 85 | return(&rc5_ofb_cipher); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void rc5_32_12_16_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 89 | unsigned char *iv, int enc) | ||
| 90 | { | ||
| 91 | ctx->num=0; | ||
| 92 | |||
| 93 | if (iv != NULL) | ||
| 94 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 95 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 96 | if (key != NULL) | ||
| 97 | RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key, | ||
| 98 | RC5_12_ROUNDS); | ||
| 99 | } | ||
| 100 | |||
| 101 | static void rc5_32_12_16_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 102 | unsigned char *in, unsigned int inl) | ||
| 103 | { | ||
| 104 | RC5_32_ofb64_encrypt( | ||
| 105 | in,out, | ||
| 106 | (long)inl, &(ctx->c.rc5_ks), | ||
| 107 | &(ctx->iv[0]), | ||
| 108 | &ctx->num); | ||
| 109 | } | ||
| 110 | |||
| 111 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_rc2.c b/src/lib/libssl/src/crypto/evp/e_rc2.c new file mode 100644 index 0000000000..3955c3ef84 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_rc2.c | |||
| @@ -0,0 +1,222 @@ | |||
| 1 | /* crypto/evp/e_rc2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include "evp_locl.h" | ||
| 66 | |||
| 67 | static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 68 | const unsigned char *iv,int enc); | ||
| 69 | static int rc2_meth_to_magic(EVP_CIPHER_CTX *ctx); | ||
| 70 | static int rc2_magic_to_meth(int i); | ||
| 71 | static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | ||
| 72 | static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | ||
| 73 | static int rc2_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr); | ||
| 74 | |||
| 75 | IMPLEMENT_BLOCK_CIPHER(rc2, rc2.ks, RC2, rc2, NID_rc2, | ||
| 76 | 8, | ||
| 77 | EVP_RC2_KEY_SIZE, 8, | ||
| 78 | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | ||
| 79 | rc2_init_key, NULL, | ||
| 80 | rc2_set_asn1_type_and_iv, rc2_get_asn1_type_and_iv, | ||
| 81 | rc2_ctrl) | ||
| 82 | |||
| 83 | #define RC2_40_MAGIC 0xa0 | ||
| 84 | #define RC2_64_MAGIC 0x78 | ||
| 85 | #define RC2_128_MAGIC 0x3a | ||
| 86 | |||
| 87 | static EVP_CIPHER r2_64_cbc_cipher= | ||
| 88 | { | ||
| 89 | NID_rc2_64_cbc, | ||
| 90 | 8,8 /* 64 bit */,8, | ||
| 91 | EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | ||
| 92 | rc2_init_key, | ||
| 93 | rc2_cbc_cipher, | ||
| 94 | NULL, | ||
| 95 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 96 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2)), | ||
| 97 | rc2_set_asn1_type_and_iv, | ||
| 98 | rc2_get_asn1_type_and_iv, | ||
| 99 | rc2_ctrl, | ||
| 100 | NULL | ||
| 101 | }; | ||
| 102 | |||
| 103 | static EVP_CIPHER r2_40_cbc_cipher= | ||
| 104 | { | ||
| 105 | NID_rc2_40_cbc, | ||
| 106 | 8,5 /* 40 bit */,8, | ||
| 107 | EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | ||
| 108 | rc2_init_key, | ||
| 109 | rc2_cbc_cipher, | ||
| 110 | NULL, | ||
| 111 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 112 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2)), | ||
| 113 | rc2_set_asn1_type_and_iv, | ||
| 114 | rc2_get_asn1_type_and_iv, | ||
| 115 | rc2_ctrl, | ||
| 116 | NULL | ||
| 117 | }; | ||
| 118 | |||
| 119 | EVP_CIPHER *EVP_rc2_64_cbc(void) | ||
| 120 | { | ||
| 121 | return(&r2_64_cbc_cipher); | ||
| 122 | } | ||
| 123 | |||
| 124 | EVP_CIPHER *EVP_rc2_40_cbc(void) | ||
| 125 | { | ||
| 126 | return(&r2_40_cbc_cipher); | ||
| 127 | } | ||
| 128 | |||
| 129 | static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 130 | const unsigned char *iv, int enc) | ||
| 131 | { | ||
| 132 | RC2_set_key(&(ctx->c.rc2.ks),EVP_CIPHER_CTX_key_length(ctx), | ||
| 133 | key,ctx->c.rc2.key_bits); | ||
| 134 | return 1; | ||
| 135 | } | ||
| 136 | |||
| 137 | static int rc2_meth_to_magic(EVP_CIPHER_CTX *e) | ||
| 138 | { | ||
| 139 | int i; | ||
| 140 | |||
| 141 | EVP_CIPHER_CTX_ctrl(e, EVP_CTRL_GET_RC2_KEY_BITS, 0, &i); | ||
| 142 | if (i == 128) return(RC2_128_MAGIC); | ||
| 143 | else if (i == 64) return(RC2_64_MAGIC); | ||
| 144 | else if (i == 40) return(RC2_40_MAGIC); | ||
| 145 | else return(0); | ||
| 146 | } | ||
| 147 | |||
| 148 | static int rc2_magic_to_meth(int i) | ||
| 149 | { | ||
| 150 | if (i == RC2_128_MAGIC) return 128; | ||
| 151 | else if (i == RC2_64_MAGIC) return 64; | ||
| 152 | else if (i == RC2_40_MAGIC) return 40; | ||
| 153 | else | ||
| 154 | { | ||
| 155 | EVPerr(EVP_F_RC2_MAGIC_TO_METH,EVP_R_UNSUPPORTED_KEY_SIZE); | ||
| 156 | return(0); | ||
| 157 | } | ||
| 158 | } | ||
| 159 | |||
| 160 | static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | ||
| 161 | { | ||
| 162 | long num=0; | ||
| 163 | int i=0,l; | ||
| 164 | int key_bits; | ||
| 165 | unsigned char iv[EVP_MAX_IV_LENGTH]; | ||
| 166 | |||
| 167 | if (type != NULL) | ||
| 168 | { | ||
| 169 | l=EVP_CIPHER_CTX_iv_length(c); | ||
| 170 | i=ASN1_TYPE_get_int_octetstring(type,&num,iv,l); | ||
| 171 | if (i != l) | ||
| 172 | return(-1); | ||
| 173 | key_bits =rc2_magic_to_meth((int)num); | ||
| 174 | if (!key_bits) | ||
| 175 | return(-1); | ||
| 176 | if(i > 0) EVP_CipherInit(c, NULL, NULL, iv, -1); | ||
| 177 | EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_RC2_KEY_BITS, key_bits, NULL); | ||
| 178 | EVP_CIPHER_CTX_set_key_length(c, key_bits / 8); | ||
| 179 | } | ||
| 180 | return(i); | ||
| 181 | } | ||
| 182 | |||
| 183 | static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | ||
| 184 | { | ||
| 185 | long num; | ||
| 186 | int i=0,j; | ||
| 187 | |||
| 188 | if (type != NULL) | ||
| 189 | { | ||
| 190 | num=rc2_meth_to_magic(c); | ||
| 191 | j=EVP_CIPHER_CTX_iv_length(c); | ||
| 192 | i=ASN1_TYPE_set_int_octetstring(type,num,c->oiv,j); | ||
| 193 | } | ||
| 194 | return(i); | ||
| 195 | } | ||
| 196 | |||
| 197 | static int rc2_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | ||
| 198 | { | ||
| 199 | switch(type) { | ||
| 200 | |||
| 201 | case EVP_CTRL_INIT: | ||
| 202 | c->c.rc2.key_bits = EVP_CIPHER_CTX_key_length(c) * 8; | ||
| 203 | return 1; | ||
| 204 | |||
| 205 | case EVP_CTRL_GET_RC2_KEY_BITS: | ||
| 206 | *(int *)ptr = c->c.rc2.key_bits; | ||
| 207 | return 1; | ||
| 208 | |||
| 209 | |||
| 210 | case EVP_CTRL_SET_RC2_KEY_BITS: | ||
| 211 | if(arg > 0) { | ||
| 212 | c->c.rc2.key_bits = arg; | ||
| 213 | return 1; | ||
| 214 | } | ||
| 215 | return 0; | ||
| 216 | |||
| 217 | default: | ||
| 218 | return -1; | ||
| 219 | } | ||
| 220 | } | ||
| 221 | |||
| 222 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_rc4.c b/src/lib/libssl/src/crypto/evp/e_rc4.c index c7e58a75cc..1c1e3b3857 100644 --- a/src/lib/libssl/src/crypto/evp/e_rc4.c +++ b/src/lib/libssl/src/crypto/evp/e_rc4.c | |||
| @@ -63,14 +63,15 @@ | |||
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 65 | 65 | ||
| 66 | static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 66 | static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 67 | unsigned char *iv,int enc); | 67 | const unsigned char *iv,int enc); |
| 68 | static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 68 | static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 69 | unsigned char *in, unsigned int inl); | 69 | const unsigned char *in, unsigned int inl); |
| 70 | static EVP_CIPHER r4_cipher= | 70 | static EVP_CIPHER r4_cipher= |
| 71 | { | 71 | { |
| 72 | NID_rc4, | 72 | NID_rc4, |
| 73 | 1,EVP_RC4_KEY_SIZE,0, | 73 | 1,EVP_RC4_KEY_SIZE,0, |
| 74 | EVP_CIPH_VARIABLE_LENGTH, | ||
| 74 | rc4_init_key, | 75 | rc4_init_key, |
| 75 | rc4_cipher, | 76 | rc4_cipher, |
| 76 | NULL, | 77 | NULL, |
| @@ -78,14 +79,22 @@ static EVP_CIPHER r4_cipher= | |||
| 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)), | 79 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)), |
| 79 | NULL, | 80 | NULL, |
| 80 | NULL, | 81 | NULL, |
| 82 | NULL | ||
| 81 | }; | 83 | }; |
| 82 | 84 | ||
| 83 | static EVP_CIPHER r4_40_cipher= | 85 | static EVP_CIPHER r4_40_cipher= |
| 84 | { | 86 | { |
| 85 | NID_rc4_40, | 87 | NID_rc4_40, |
| 86 | 1,5 /* 40 bit */,0, | 88 | 1,5 /* 40 bit */,0, |
| 89 | EVP_CIPH_VARIABLE_LENGTH, | ||
| 87 | rc4_init_key, | 90 | rc4_init_key, |
| 88 | rc4_cipher, | 91 | rc4_cipher, |
| 92 | NULL, | ||
| 93 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 94 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)), | ||
| 95 | NULL, | ||
| 96 | NULL, | ||
| 97 | NULL | ||
| 89 | }; | 98 | }; |
| 90 | 99 | ||
| 91 | EVP_CIPHER *EVP_rc4(void) | 100 | EVP_CIPHER *EVP_rc4(void) |
| @@ -98,18 +107,19 @@ EVP_CIPHER *EVP_rc4_40(void) | |||
| 98 | return(&r4_40_cipher); | 107 | return(&r4_40_cipher); |
| 99 | } | 108 | } |
| 100 | 109 | ||
| 101 | static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 110 | static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 102 | unsigned char *iv, int enc) | 111 | const unsigned char *iv, int enc) |
| 103 | { | 112 | { |
| 104 | if (key != NULL) | 113 | memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx)); |
| 105 | memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx)); | ||
| 106 | RC4_set_key(&(ctx->c.rc4.ks),EVP_CIPHER_CTX_key_length(ctx), | 114 | RC4_set_key(&(ctx->c.rc4.ks),EVP_CIPHER_CTX_key_length(ctx), |
| 107 | ctx->c.rc4.key); | 115 | ctx->c.rc4.key); |
| 116 | return 1; | ||
| 108 | } | 117 | } |
| 109 | 118 | ||
| 110 | static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 119 | static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 111 | unsigned char *in, unsigned int inl) | 120 | const unsigned char *in, unsigned int inl) |
| 112 | { | 121 | { |
| 113 | RC4(&(ctx->c.rc4.ks),inl,in,out); | 122 | RC4(&(ctx->c.rc4.ks),inl,in,out); |
| 123 | return 1; | ||
| 114 | } | 124 | } |
| 115 | #endif | 125 | #endif |
diff --git a/src/lib/libssl/src/crypto/evp/e_rc5.c b/src/lib/libssl/src/crypto/evp/e_rc5.c new file mode 100644 index 0000000000..5885f1826b --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_rc5.c | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | /* crypto/evp/e_rc5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include "evp_locl.h" | ||
| 66 | |||
| 67 | static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 68 | const unsigned char *iv,int enc); | ||
| 69 | static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr); | ||
| 70 | |||
| 71 | IMPLEMENT_BLOCK_CIPHER(rc5_32_12_16, rc5.ks, RC5_32, rc5, NID_rc5, | ||
| 72 | 8, EVP_RC5_32_12_16_KEY_SIZE, 8, | ||
| 73 | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | ||
| 74 | r_32_12_16_init_key, NULL, | ||
| 75 | NULL, NULL, rc5_ctrl) | ||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | ||
| 80 | { | ||
| 81 | switch(type) { | ||
| 82 | |||
| 83 | case EVP_CTRL_INIT: | ||
| 84 | c->c.rc5.rounds = RC5_12_ROUNDS; | ||
| 85 | return 1; | ||
| 86 | |||
| 87 | case EVP_CTRL_GET_RC5_ROUNDS: | ||
| 88 | *(int *)ptr = c->c.rc5.rounds; | ||
| 89 | return 1; | ||
| 90 | |||
| 91 | |||
| 92 | case EVP_CTRL_SET_RC5_ROUNDS: | ||
| 93 | switch(arg) { | ||
| 94 | case RC5_8_ROUNDS: | ||
| 95 | case RC5_12_ROUNDS: | ||
| 96 | case RC5_16_ROUNDS: | ||
| 97 | c->c.rc5.rounds = arg; | ||
| 98 | return 1; | ||
| 99 | |||
| 100 | default: | ||
| 101 | EVPerr(EVP_F_RC5_CTRL, EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS); | ||
| 102 | return 0; | ||
| 103 | } | ||
| 104 | |||
| 105 | default: | ||
| 106 | return -1; | ||
| 107 | } | ||
| 108 | } | ||
| 109 | |||
| 110 | static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 111 | const unsigned char *iv, int enc) | ||
| 112 | { | ||
| 113 | RC5_32_set_key(&(ctx->c.rc5.ks),EVP_CIPHER_CTX_key_length(ctx), | ||
| 114 | key,ctx->c.rc5.rounds); | ||
| 115 | return 1; | ||
| 116 | } | ||
| 117 | |||
| 118 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_xcbc_d.c b/src/lib/libssl/src/crypto/evp/e_xcbc_d.c index 7568fad4ff..e5b15acc7d 100644 --- a/src/lib/libssl/src/crypto/evp/e_xcbc_d.c +++ b/src/lib/libssl/src/crypto/evp/e_xcbc_d.c | |||
| @@ -62,14 +62,15 @@ | |||
| 62 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 64 | 64 | ||
| 65 | static void desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 65 | static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 66 | unsigned char *iv,int enc); | 66 | const unsigned char *iv,int enc); |
| 67 | static void desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 67 | static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 68 | unsigned char *in, unsigned int inl); | 68 | const unsigned char *in, unsigned int inl); |
| 69 | static EVP_CIPHER d_xcbc_cipher= | 69 | static EVP_CIPHER d_xcbc_cipher= |
| 70 | { | 70 | { |
| 71 | NID_desx_cbc, | 71 | NID_desx_cbc, |
| 72 | 8,24,8, | 72 | 8,24,8, |
| 73 | EVP_CIPH_CBC_MODE, | ||
| 73 | desx_cbc_init_key, | 74 | desx_cbc_init_key, |
| 74 | desx_cbc_cipher, | 75 | desx_cbc_cipher, |
| 75 | NULL, | 76 | NULL, |
| @@ -77,6 +78,7 @@ static EVP_CIPHER d_xcbc_cipher= | |||
| 77 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.desx_cbc)), | 78 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.desx_cbc)), |
| 78 | EVP_CIPHER_set_asn1_iv, | 79 | EVP_CIPHER_set_asn1_iv, |
| 79 | EVP_CIPHER_get_asn1_iv, | 80 | EVP_CIPHER_get_asn1_iv, |
| 81 | NULL | ||
| 80 | }; | 82 | }; |
| 81 | 83 | ||
| 82 | EVP_CIPHER *EVP_desx_cbc(void) | 84 | EVP_CIPHER *EVP_desx_cbc(void) |
| @@ -84,29 +86,26 @@ EVP_CIPHER *EVP_desx_cbc(void) | |||
| 84 | return(&d_xcbc_cipher); | 86 | return(&d_xcbc_cipher); |
| 85 | } | 87 | } |
| 86 | 88 | ||
| 87 | static void desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 89 | static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 88 | unsigned char *iv, int enc) | 90 | const unsigned char *iv, int enc) |
| 89 | { | 91 | { |
| 90 | des_cblock *deskey = (des_cblock *)key; | 92 | des_cblock *deskey = (des_cblock *)key; |
| 91 | 93 | ||
| 92 | if (iv != NULL) | 94 | des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks); |
| 93 | memcpy(&(ctx->oiv[0]),iv,8); | 95 | memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8); |
| 94 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | 96 | memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8); |
| 95 | if (deskey != NULL) | 97 | |
| 96 | { | 98 | return 1; |
| 97 | des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks); | ||
| 98 | memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8); | ||
| 99 | memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8); | ||
| 100 | } | ||
| 101 | } | 99 | } |
| 102 | 100 | ||
| 103 | static void desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 101 | static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 104 | unsigned char *in, unsigned int inl) | 102 | const unsigned char *in, unsigned int inl) |
| 105 | { | 103 | { |
| 106 | des_xcbc_encrypt(in,out,inl,ctx->c.desx_cbc.ks, | 104 | des_xcbc_encrypt(in,out,inl,ctx->c.desx_cbc.ks, |
| 107 | (des_cblock *)&(ctx->iv[0]), | 105 | (des_cblock *)&(ctx->iv[0]), |
| 108 | &ctx->c.desx_cbc.inw, | 106 | &ctx->c.desx_cbc.inw, |
| 109 | &ctx->c.desx_cbc.outw, | 107 | &ctx->c.desx_cbc.outw, |
| 110 | ctx->encrypt); | 108 | ctx->encrypt); |
| 109 | return 1; | ||
| 111 | } | 110 | } |
| 112 | #endif | 111 | #endif |
diff --git a/src/lib/libssl/src/crypto/evp/encode.c b/src/lib/libssl/src/crypto/evp/encode.c index 14a4cb11f6..6ff9c1783c 100644 --- a/src/lib/libssl/src/crypto/evp/encode.c +++ b/src/lib/libssl/src/crypto/evp/encode.c | |||
| @@ -292,7 +292,17 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
| 292 | /* If we are at the end of input and it looks like a | 292 | /* If we are at the end of input and it looks like a |
| 293 | * line, process it. */ | 293 | * line, process it. */ |
| 294 | if (((i+1) == inl) && (((n&3) == 0) || eof)) | 294 | if (((i+1) == inl) && (((n&3) == 0) || eof)) |
| 295 | { | ||
| 295 | v=B64_EOF; | 296 | v=B64_EOF; |
| 297 | /* In case things were given us in really small | ||
| 298 | records (so two '=' were given in separate | ||
| 299 | updates), eof may contain the incorrect number | ||
| 300 | of ending bytes to skip, so let's redo the count */ | ||
| 301 | eof = 0; | ||
| 302 | if (d[n-1] == '=') eof++; | ||
| 303 | if (d[n-2] == '=') eof++; | ||
| 304 | /* There will never be more than two '=' */ | ||
| 305 | } | ||
| 296 | 306 | ||
| 297 | if ((v == B64_EOF) || (n >= 64)) | 307 | if ((v == B64_EOF) || (n >= 64)) |
| 298 | { | 308 | { |
diff --git a/src/lib/libssl/src/crypto/evp/evp.h b/src/lib/libssl/src/crypto/evp/evp.h index 54215b0905..f5b938d2f8 100644 --- a/src/lib/libssl/src/crypto/evp/evp.h +++ b/src/lib/libssl/src/crypto/evp/evp.h | |||
| @@ -59,13 +59,23 @@ | |||
| 59 | #ifndef HEADER_ENVELOPE_H | 59 | #ifndef HEADER_ENVELOPE_H |
| 60 | #define HEADER_ENVELOPE_H | 60 | #define HEADER_ENVELOPE_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | 62 | #ifdef OPENSSL_ALGORITHM_DEFINES |
| 63 | extern "C" { | 63 | # include <openssl/opensslconf.h> |
| 64 | #else | ||
| 65 | # define OPENSSL_ALGORITHM_DEFINES | ||
| 66 | # include <openssl/opensslconf.h> | ||
| 67 | # undef OPENSSL_ALGORITHM_DEFINES | ||
| 64 | #endif | 68 | #endif |
| 65 | 69 | ||
| 70 | #ifndef NO_BIO | ||
| 71 | #include <openssl/bio.h> | ||
| 72 | #endif | ||
| 66 | #ifndef NO_MD2 | 73 | #ifndef NO_MD2 |
| 67 | #include <openssl/md2.h> | 74 | #include <openssl/md2.h> |
| 68 | #endif | 75 | #endif |
| 76 | #ifndef NO_MD4 | ||
| 77 | #include <openssl/md4.h> | ||
| 78 | #endif | ||
| 69 | #ifndef NO_MD5 | 79 | #ifndef NO_MD5 |
| 70 | #include <openssl/md5.h> | 80 | #include <openssl/md5.h> |
| 71 | #endif | 81 | #endif |
| @@ -147,6 +157,10 @@ extern "C" { | |||
| 147 | #define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 | 157 | #define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 |
| 148 | #define EVP_PKEY_DH NID_dhKeyAgreement | 158 | #define EVP_PKEY_DH NID_dhKeyAgreement |
| 149 | 159 | ||
| 160 | #ifdef __cplusplus | ||
| 161 | extern "C" { | ||
| 162 | #endif | ||
| 163 | |||
| 150 | /* Type needs to be a bit field | 164 | /* Type needs to be a bit field |
| 151 | * Sub-type needs to be for variations on the method, as in, can it do | 165 | * Sub-type needs to be for variations on the method, as in, can it do |
| 152 | * arbitrary encryption.... */ | 166 | * arbitrary encryption.... */ |
| @@ -168,7 +182,7 @@ typedef struct evp_pkey_st | |||
| 168 | #endif | 182 | #endif |
| 169 | } pkey; | 183 | } pkey; |
| 170 | int save_parameters; | 184 | int save_parameters; |
| 171 | STACK /*X509_ATTRIBUTE*/ *attributes; /* [ 0 ] */ | 185 | STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ |
| 172 | } EVP_PKEY; | 186 | } EVP_PKEY; |
| 173 | 187 | ||
| 174 | #define EVP_PKEY_MO_SIGN 0x0001 | 188 | #define EVP_PKEY_MO_SIGN 0x0001 |
| @@ -298,6 +312,9 @@ typedef struct env_md_ctx_st | |||
| 298 | #ifndef NO_MD5 | 312 | #ifndef NO_MD5 |
| 299 | MD5_CTX md5; | 313 | MD5_CTX md5; |
| 300 | #endif | 314 | #endif |
| 315 | #ifndef NO_MD4 | ||
| 316 | MD4_CTX md4; | ||
| 317 | #endif | ||
| 301 | #ifndef NO_RIPEMD | 318 | #ifndef NO_RIPEMD |
| 302 | RIPEMD160_CTX ripemd160; | 319 | RIPEMD160_CTX ripemd160; |
| 303 | #endif | 320 | #endif |
| @@ -310,21 +327,57 @@ typedef struct env_md_ctx_st | |||
| 310 | } md; | 327 | } md; |
| 311 | } EVP_MD_CTX; | 328 | } EVP_MD_CTX; |
| 312 | 329 | ||
| 313 | typedef struct evp_cipher_st | 330 | typedef struct evp_cipher_st EVP_CIPHER; |
| 331 | typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; | ||
| 332 | |||
| 333 | struct evp_cipher_st | ||
| 314 | { | 334 | { |
| 315 | int nid; | 335 | int nid; |
| 316 | int block_size; | 336 | int block_size; |
| 317 | int key_len; | 337 | int key_len; /* Default value for variable length ciphers */ |
| 318 | int iv_len; | 338 | int iv_len; |
| 319 | void (*init)(); /* init for encryption */ | 339 | unsigned long flags; /* Various flags */ |
| 320 | void (*do_cipher)(); /* encrypt data */ | 340 | int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 321 | void (*cleanup)(); /* used by cipher method */ | 341 | const unsigned char *iv, int enc); /* init key */ |
| 342 | int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 343 | const unsigned char *in, unsigned int inl);/* encrypt/decrypt data */ | ||
| 344 | int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */ | ||
| 322 | int ctx_size; /* how big the ctx needs to be */ | 345 | int ctx_size; /* how big the ctx needs to be */ |
| 323 | /* int set_asn1_parameters(EVP_CIPHER_CTX,ASN1_TYPE *); */ | 346 | int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */ |
| 324 | int (*set_asn1_parameters)(); /* Populate a ASN1_TYPE with parameters */ | 347 | int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */ |
| 325 | /* int get_asn1_parameters(EVP_CIPHER_CTX,ASN1_TYPE *); */ | 348 | int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */ |
| 326 | int (*get_asn1_parameters)(); /* Get parameters from a ASN1_TYPE */ | 349 | void *app_data; /* Application data */ |
| 327 | } EVP_CIPHER; | 350 | }; |
| 351 | |||
| 352 | /* Values for cipher flags */ | ||
| 353 | |||
| 354 | /* Modes for ciphers */ | ||
| 355 | |||
| 356 | #define EVP_CIPH_STREAM_CIPHER 0x0 | ||
| 357 | #define EVP_CIPH_ECB_MODE 0x1 | ||
| 358 | #define EVP_CIPH_CBC_MODE 0x2 | ||
| 359 | #define EVP_CIPH_CFB_MODE 0x3 | ||
| 360 | #define EVP_CIPH_OFB_MODE 0x4 | ||
| 361 | #define EVP_CIPH_MODE 0x7 | ||
| 362 | /* Set if variable length cipher */ | ||
| 363 | #define EVP_CIPH_VARIABLE_LENGTH 0x8 | ||
| 364 | /* Set if the iv handling should be done by the cipher itself */ | ||
| 365 | #define EVP_CIPH_CUSTOM_IV 0x10 | ||
| 366 | /* Set if the cipher's init() function should be called if key is NULL */ | ||
| 367 | #define EVP_CIPH_ALWAYS_CALL_INIT 0x20 | ||
| 368 | /* Call ctrl() to init cipher parameters */ | ||
| 369 | #define EVP_CIPH_CTRL_INIT 0x40 | ||
| 370 | /* Don't use standard key length function */ | ||
| 371 | #define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 | ||
| 372 | |||
| 373 | /* ctrl() values */ | ||
| 374 | |||
| 375 | #define EVP_CTRL_INIT 0x0 | ||
| 376 | #define EVP_CTRL_SET_KEY_LENGTH 0x1 | ||
| 377 | #define EVP_CTRL_GET_RC2_KEY_BITS 0x2 | ||
| 378 | #define EVP_CTRL_SET_RC2_KEY_BITS 0x3 | ||
| 379 | #define EVP_CTRL_GET_RC5_ROUNDS 0x4 | ||
| 380 | #define EVP_CTRL_SET_RC5_ROUNDS 0x5 | ||
| 328 | 381 | ||
| 329 | typedef struct evp_cipher_info_st | 382 | typedef struct evp_cipher_info_st |
| 330 | { | 383 | { |
| @@ -332,7 +385,7 @@ typedef struct evp_cipher_info_st | |||
| 332 | unsigned char iv[EVP_MAX_IV_LENGTH]; | 385 | unsigned char iv[EVP_MAX_IV_LENGTH]; |
| 333 | } EVP_CIPHER_INFO; | 386 | } EVP_CIPHER_INFO; |
| 334 | 387 | ||
| 335 | typedef struct evp_cipher_ctx_st | 388 | struct evp_cipher_ctx_st |
| 336 | { | 389 | { |
| 337 | const EVP_CIPHER *cipher; | 390 | const EVP_CIPHER *cipher; |
| 338 | int encrypt; /* encrypt or decrypt */ | 391 | int encrypt; /* encrypt or decrypt */ |
| @@ -343,7 +396,8 @@ typedef struct evp_cipher_ctx_st | |||
| 343 | unsigned char buf[EVP_MAX_IV_LENGTH]; /* saved partial block */ | 396 | unsigned char buf[EVP_MAX_IV_LENGTH]; /* saved partial block */ |
| 344 | int num; /* used by cfb/ofb mode */ | 397 | int num; /* used by cfb/ofb mode */ |
| 345 | 398 | ||
| 346 | char *app_data; /* application stuff */ | 399 | void *app_data; /* application stuff */ |
| 400 | int key_len; /* May change for variable length cipher */ | ||
| 347 | union { | 401 | union { |
| 348 | #ifndef NO_RC4 | 402 | #ifndef NO_RC4 |
| 349 | struct | 403 | struct |
| @@ -371,10 +425,16 @@ typedef struct evp_cipher_ctx_st | |||
| 371 | IDEA_KEY_SCHEDULE idea_ks;/* key schedule */ | 425 | IDEA_KEY_SCHEDULE idea_ks;/* key schedule */ |
| 372 | #endif | 426 | #endif |
| 373 | #ifndef NO_RC2 | 427 | #ifndef NO_RC2 |
| 374 | RC2_KEY rc2_ks;/* key schedule */ | 428 | struct { |
| 429 | int key_bits; /* effective key bits */ | ||
| 430 | RC2_KEY ks;/* key schedule */ | ||
| 431 | } rc2; | ||
| 375 | #endif | 432 | #endif |
| 376 | #ifndef NO_RC5 | 433 | #ifndef NO_RC5 |
| 377 | RC5_32_KEY rc5_ks;/* key schedule */ | 434 | struct { |
| 435 | int rounds; /* number of rounds */ | ||
| 436 | RC5_32_KEY ks;/* key schedule */ | ||
| 437 | } rc5; | ||
| 378 | #endif | 438 | #endif |
| 379 | #ifndef NO_BF | 439 | #ifndef NO_BF |
| 380 | BF_KEY bf_ks;/* key schedule */ | 440 | BF_KEY bf_ks;/* key schedule */ |
| @@ -383,7 +443,7 @@ typedef struct evp_cipher_ctx_st | |||
| 383 | CAST_KEY cast_ks;/* key schedule */ | 443 | CAST_KEY cast_ks;/* key schedule */ |
| 384 | #endif | 444 | #endif |
| 385 | } c; | 445 | } c; |
| 386 | } EVP_CIPHER_CTX; | 446 | }; |
| 387 | 447 | ||
| 388 | typedef struct evp_Encode_Ctx_st | 448 | typedef struct evp_Encode_Ctx_st |
| 389 | { | 449 | { |
| @@ -430,15 +490,19 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | |||
| 430 | #define EVP_CIPHER_block_size(e) ((e)->block_size) | 490 | #define EVP_CIPHER_block_size(e) ((e)->block_size) |
| 431 | #define EVP_CIPHER_key_length(e) ((e)->key_len) | 491 | #define EVP_CIPHER_key_length(e) ((e)->key_len) |
| 432 | #define EVP_CIPHER_iv_length(e) ((e)->iv_len) | 492 | #define EVP_CIPHER_iv_length(e) ((e)->iv_len) |
| 493 | #define EVP_CIPHER_flags(e) ((e)->flags) | ||
| 494 | #define EVP_CIPHER_mode(e) ((e)->flags) & EVP_CIPH_MODE) | ||
| 433 | 495 | ||
| 434 | #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) | 496 | #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) |
| 435 | #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) | 497 | #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) |
| 436 | #define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size) | 498 | #define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size) |
| 437 | #define EVP_CIPHER_CTX_key_length(e) ((e)->cipher->key_len) | 499 | #define EVP_CIPHER_CTX_key_length(e) ((e)->key_len) |
| 438 | #define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len) | 500 | #define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len) |
| 439 | #define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) | 501 | #define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) |
| 440 | #define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d)) | 502 | #define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d)) |
| 441 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) | 503 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) |
| 504 | #define EVP_CIPHER_CTX_flags(e) ((e)->cipher->flags) | ||
| 505 | #define EVP_CIPHER_CTX_mode(e) ((e)->cipher->flags & EVP_CIPH_MODE) | ||
| 442 | 506 | ||
| 443 | #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) | 507 | #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) |
| 444 | #define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) | 508 | #define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) |
| @@ -486,21 +550,21 @@ int EVP_BytesToKey(const EVP_CIPHER *type,EVP_MD *md,unsigned char *salt, | |||
| 486 | unsigned char *data, int datal, int count, | 550 | unsigned char *data, int datal, int count, |
| 487 | unsigned char *key,unsigned char *iv); | 551 | unsigned char *key,unsigned char *iv); |
| 488 | 552 | ||
| 489 | void EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, | 553 | int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, |
| 490 | unsigned char *key, unsigned char *iv); | 554 | unsigned char *key, unsigned char *iv); |
| 491 | void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 555 | int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 492 | int *outl, unsigned char *in, int inl); | 556 | int *outl, unsigned char *in, int inl); |
| 493 | void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); | 557 | int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); |
| 494 | 558 | ||
| 495 | void EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, | 559 | int EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, |
| 496 | unsigned char *key, unsigned char *iv); | 560 | unsigned char *key, unsigned char *iv); |
| 497 | void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 561 | int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 498 | int *outl, unsigned char *in, int inl); | 562 | int *outl, unsigned char *in, int inl); |
| 499 | int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); | 563 | int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); |
| 500 | 564 | ||
| 501 | void EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, | 565 | int EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, |
| 502 | unsigned char *key,unsigned char *iv,int enc); | 566 | unsigned char *key,unsigned char *iv,int enc); |
| 503 | void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 567 | int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 504 | int *outl, unsigned char *in, int inl); | 568 | int *outl, unsigned char *in, int inl); |
| 505 | int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); | 569 | int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); |
| 506 | 570 | ||
| @@ -534,9 +598,11 @@ int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); | |||
| 534 | void ERR_load_EVP_strings(void ); | 598 | void ERR_load_EVP_strings(void ); |
| 535 | 599 | ||
| 536 | void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); | 600 | void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); |
| 537 | void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); | 601 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); |
| 602 | int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); | ||
| 603 | int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); | ||
| 538 | 604 | ||
| 539 | #ifdef HEADER_BIO_H | 605 | #ifndef NO_BIO |
| 540 | BIO_METHOD *BIO_f_md(void); | 606 | BIO_METHOD *BIO_f_md(void); |
| 541 | BIO_METHOD *BIO_f_base64(void); | 607 | BIO_METHOD *BIO_f_base64(void); |
| 542 | BIO_METHOD *BIO_f_cipher(void); | 608 | BIO_METHOD *BIO_f_cipher(void); |
| @@ -547,6 +613,7 @@ void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,unsigned char *k, | |||
| 547 | 613 | ||
| 548 | EVP_MD *EVP_md_null(void); | 614 | EVP_MD *EVP_md_null(void); |
| 549 | EVP_MD *EVP_md2(void); | 615 | EVP_MD *EVP_md2(void); |
| 616 | EVP_MD *EVP_md4(void); | ||
| 550 | EVP_MD *EVP_md5(void); | 617 | EVP_MD *EVP_md5(void); |
| 551 | EVP_MD *EVP_sha(void); | 618 | EVP_MD *EVP_sha(void); |
| 552 | EVP_MD *EVP_sha1(void); | 619 | EVP_MD *EVP_sha1(void); |
| @@ -683,6 +750,9 @@ void EVP_PBE_cleanup(void); | |||
| 683 | 750 | ||
| 684 | /* Function codes. */ | 751 | /* Function codes. */ |
| 685 | #define EVP_F_D2I_PKEY 100 | 752 | #define EVP_F_D2I_PKEY 100 |
| 753 | #define EVP_F_EVP_CIPHERINIT 123 | ||
| 754 | #define EVP_F_EVP_CIPHER_CTX_CTRL 124 | ||
| 755 | #define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 | ||
| 686 | #define EVP_F_EVP_DECRYPTFINAL 101 | 756 | #define EVP_F_EVP_DECRYPTFINAL 101 |
| 687 | #define EVP_F_EVP_MD_CTX_COPY 110 | 757 | #define EVP_F_EVP_MD_CTX_COPY 110 |
| 688 | #define EVP_F_EVP_OPENINIT 102 | 758 | #define EVP_F_EVP_OPENINIT 102 |
| @@ -703,12 +773,15 @@ void EVP_PBE_cleanup(void); | |||
| 703 | #define EVP_F_PKCS5_PBE_KEYIVGEN 117 | 773 | #define EVP_F_PKCS5_PBE_KEYIVGEN 117 |
| 704 | #define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 | 774 | #define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 |
| 705 | #define EVP_F_RC2_MAGIC_TO_METH 109 | 775 | #define EVP_F_RC2_MAGIC_TO_METH 109 |
| 776 | #define EVP_F_RC5_CTRL 125 | ||
| 706 | 777 | ||
| 707 | /* Reason codes. */ | 778 | /* Reason codes. */ |
| 708 | #define EVP_R_BAD_DECRYPT 100 | 779 | #define EVP_R_BAD_DECRYPT 100 |
| 709 | #define EVP_R_BN_DECODE_ERROR 112 | 780 | #define EVP_R_BN_DECODE_ERROR 112 |
| 710 | #define EVP_R_BN_PUBKEY_ERROR 113 | 781 | #define EVP_R_BN_PUBKEY_ERROR 113 |
| 711 | #define EVP_R_CIPHER_PARAMETER_ERROR 122 | 782 | #define EVP_R_CIPHER_PARAMETER_ERROR 122 |
| 783 | #define EVP_R_CTRL_NOT_IMPLEMENTED 132 | ||
| 784 | #define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133 | ||
| 712 | #define EVP_R_DECODE_ERROR 114 | 785 | #define EVP_R_DECODE_ERROR 114 |
| 713 | #define EVP_R_DIFFERENT_KEY_TYPES 101 | 786 | #define EVP_R_DIFFERENT_KEY_TYPES 101 |
| 714 | #define EVP_R_ENCODE_ERROR 115 | 787 | #define EVP_R_ENCODE_ERROR 115 |
| @@ -716,16 +789,20 @@ void EVP_PBE_cleanup(void); | |||
| 716 | #define EVP_R_EXPECTING_AN_RSA_KEY 127 | 789 | #define EVP_R_EXPECTING_AN_RSA_KEY 127 |
| 717 | #define EVP_R_EXPECTING_A_DH_KEY 128 | 790 | #define EVP_R_EXPECTING_A_DH_KEY 128 |
| 718 | #define EVP_R_EXPECTING_A_DSA_KEY 129 | 791 | #define EVP_R_EXPECTING_A_DSA_KEY 129 |
| 792 | #define EVP_R_INITIALIZATION_ERROR 134 | ||
| 719 | #define EVP_R_INPUT_NOT_INITIALIZED 111 | 793 | #define EVP_R_INPUT_NOT_INITIALIZED 111 |
| 794 | #define EVP_R_INVALID_KEY_LENGTH 130 | ||
| 720 | #define EVP_R_IV_TOO_LARGE 102 | 795 | #define EVP_R_IV_TOO_LARGE 102 |
| 721 | #define EVP_R_KEYGEN_FAILURE 120 | 796 | #define EVP_R_KEYGEN_FAILURE 120 |
| 722 | #define EVP_R_MISSING_PARAMETERS 103 | 797 | #define EVP_R_MISSING_PARAMETERS 103 |
| 798 | #define EVP_R_NO_CIPHER_SET 131 | ||
| 723 | #define EVP_R_NO_DSA_PARAMETERS 116 | 799 | #define EVP_R_NO_DSA_PARAMETERS 116 |
| 724 | #define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104 | 800 | #define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104 |
| 725 | #define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 | 801 | #define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 |
| 726 | #define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117 | 802 | #define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117 |
| 727 | #define EVP_R_PUBLIC_KEY_NOT_RSA 106 | 803 | #define EVP_R_PUBLIC_KEY_NOT_RSA 106 |
| 728 | #define EVP_R_UNKNOWN_PBE_ALGORITHM 121 | 804 | #define EVP_R_UNKNOWN_PBE_ALGORITHM 121 |
| 805 | #define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS 135 | ||
| 729 | #define EVP_R_UNSUPPORTED_CIPHER 107 | 806 | #define EVP_R_UNSUPPORTED_CIPHER 107 |
| 730 | #define EVP_R_UNSUPPORTED_KEYLENGTH 123 | 807 | #define EVP_R_UNSUPPORTED_KEYLENGTH 123 |
| 731 | #define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124 | 808 | #define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124 |
diff --git a/src/lib/libssl/src/crypto/evp/evp_enc.c b/src/lib/libssl/src/crypto/evp/evp_enc.c index 5299a65b6a..e2687f9879 100644 --- a/src/lib/libssl/src/crypto/evp/evp_enc.c +++ b/src/lib/libssl/src/crypto/evp/evp_enc.c | |||
| @@ -59,6 +59,8 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 61 | #include <openssl/evp.h> | 61 | #include <openssl/evp.h> |
| 62 | #include <openssl/err.h> | ||
| 63 | #include "evp_locl.h" | ||
| 62 | 64 | ||
| 63 | const char *EVP_version="EVP" OPENSSL_VERSION_PTEXT; | 65 | const char *EVP_version="EVP" OPENSSL_VERSION_PTEXT; |
| 64 | 66 | ||
| @@ -68,55 +70,84 @@ void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) | |||
| 68 | /* ctx->cipher=NULL; */ | 70 | /* ctx->cipher=NULL; */ |
| 69 | } | 71 | } |
| 70 | 72 | ||
| 71 | void EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *data, | 73 | int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, |
| 72 | unsigned char *key, unsigned char *iv, int enc) | 74 | unsigned char *key, unsigned char *iv, int enc) |
| 73 | { | 75 | { |
| 74 | if (enc) | 76 | if(enc && (enc != -1)) enc = 1; |
| 75 | EVP_EncryptInit(ctx,data,key,iv); | 77 | if (cipher) { |
| 76 | else | 78 | ctx->cipher=cipher; |
| 77 | EVP_DecryptInit(ctx,data,key,iv); | 79 | ctx->key_len = cipher->key_len; |
| 80 | if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT) { | ||
| 81 | if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL)) { | ||
| 82 | EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_INITIALIZATION_ERROR); | ||
| 83 | return 0; | ||
| 84 | } | ||
| 85 | } | ||
| 86 | } else if(!ctx->cipher) { | ||
| 87 | EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_NO_CIPHER_SET); | ||
| 88 | return 0; | ||
| 78 | } | 89 | } |
| 90 | if(!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV)) { | ||
| 91 | switch(EVP_CIPHER_CTX_mode(ctx)) { | ||
| 92 | |||
| 93 | case EVP_CIPH_STREAM_CIPHER: | ||
| 94 | case EVP_CIPH_ECB_MODE: | ||
| 95 | break; | ||
| 96 | |||
| 97 | case EVP_CIPH_CFB_MODE: | ||
| 98 | case EVP_CIPH_OFB_MODE: | ||
| 79 | 99 | ||
| 80 | void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 100 | ctx->num = 0; |
| 101 | |||
| 102 | case EVP_CIPH_CBC_MODE: | ||
| 103 | |||
| 104 | if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx)); | ||
| 105 | memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx)); | ||
| 106 | break; | ||
| 107 | |||
| 108 | default: | ||
| 109 | return 0; | ||
| 110 | break; | ||
| 111 | } | ||
| 112 | } | ||
| 113 | |||
| 114 | if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) { | ||
| 115 | if(!ctx->cipher->init(ctx,key,iv,enc)) return 0; | ||
| 116 | } | ||
| 117 | if(enc != -1) ctx->encrypt=enc; | ||
| 118 | ctx->buf_len=0; | ||
| 119 | return 1; | ||
| 120 | } | ||
| 121 | |||
| 122 | int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | ||
| 81 | unsigned char *in, int inl) | 123 | unsigned char *in, int inl) |
| 82 | { | 124 | { |
| 83 | if (ctx->encrypt) | 125 | if (ctx->encrypt) |
| 84 | EVP_EncryptUpdate(ctx,out,outl,in,inl); | 126 | return EVP_EncryptUpdate(ctx,out,outl,in,inl); |
| 85 | else EVP_DecryptUpdate(ctx,out,outl,in,inl); | 127 | else return EVP_DecryptUpdate(ctx,out,outl,in,inl); |
| 86 | } | 128 | } |
| 87 | 129 | ||
| 88 | int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 130 | int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| 89 | { | 131 | { |
| 90 | if (ctx->encrypt) | 132 | if (ctx->encrypt) |
| 91 | { | 133 | return EVP_EncryptFinal(ctx,out,outl); |
| 92 | EVP_EncryptFinal(ctx,out,outl); | ||
| 93 | return(1); | ||
| 94 | } | ||
| 95 | else return(EVP_DecryptFinal(ctx,out,outl)); | 134 | else return(EVP_DecryptFinal(ctx,out,outl)); |
| 96 | } | 135 | } |
| 97 | 136 | ||
| 98 | void EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | 137 | int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, |
| 99 | unsigned char *key, unsigned char *iv) | 138 | unsigned char *key, unsigned char *iv) |
| 100 | { | 139 | { |
| 101 | if (cipher != NULL) | 140 | return EVP_CipherInit(ctx, cipher, key, iv, 1); |
| 102 | ctx->cipher=cipher; | ||
| 103 | ctx->cipher->init(ctx,key,iv,1); | ||
| 104 | ctx->encrypt=1; | ||
| 105 | ctx->buf_len=0; | ||
| 106 | } | 141 | } |
| 107 | 142 | ||
| 108 | void EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | 143 | int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, |
| 109 | unsigned char *key, unsigned char *iv) | 144 | unsigned char *key, unsigned char *iv) |
| 110 | { | 145 | { |
| 111 | if (cipher != NULL) | 146 | return EVP_CipherInit(ctx, cipher, key, iv, 0); |
| 112 | ctx->cipher=cipher; | ||
| 113 | ctx->cipher->init(ctx,key,iv,0); | ||
| 114 | ctx->encrypt=0; | ||
| 115 | ctx->buf_len=0; | ||
| 116 | } | 147 | } |
| 117 | 148 | ||
| 118 | 149 | ||
| 119 | void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 150 | int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
| 120 | unsigned char *in, int inl) | 151 | unsigned char *in, int inl) |
| 121 | { | 152 | { |
| 122 | int i,j,bl; | 153 | int i,j,bl; |
| @@ -124,20 +155,20 @@ void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
| 124 | i=ctx->buf_len; | 155 | i=ctx->buf_len; |
| 125 | bl=ctx->cipher->block_size; | 156 | bl=ctx->cipher->block_size; |
| 126 | *outl=0; | 157 | *outl=0; |
| 127 | if ((inl == 0) && (i != bl)) return; | 158 | if ((inl == 0) && (i != bl)) return 1; |
| 128 | if (i != 0) | 159 | if (i != 0) |
| 129 | { | 160 | { |
| 130 | if (i+inl < bl) | 161 | if (i+inl < bl) |
| 131 | { | 162 | { |
| 132 | memcpy(&(ctx->buf[i]),in,inl); | 163 | memcpy(&(ctx->buf[i]),in,inl); |
| 133 | ctx->buf_len+=inl; | 164 | ctx->buf_len+=inl; |
| 134 | return; | 165 | return 1; |
| 135 | } | 166 | } |
| 136 | else | 167 | else |
| 137 | { | 168 | { |
| 138 | j=bl-i; | 169 | j=bl-i; |
| 139 | if (j != 0) memcpy(&(ctx->buf[i]),in,j); | 170 | if (j != 0) memcpy(&(ctx->buf[i]),in,j); |
| 140 | ctx->cipher->do_cipher(ctx,out,ctx->buf,bl); | 171 | if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0; |
| 141 | inl-=j; | 172 | inl-=j; |
| 142 | in+=j; | 173 | in+=j; |
| 143 | out+=bl; | 174 | out+=bl; |
| @@ -148,16 +179,17 @@ void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
| 148 | inl-=i; | 179 | inl-=i; |
| 149 | if (inl > 0) | 180 | if (inl > 0) |
| 150 | { | 181 | { |
| 151 | ctx->cipher->do_cipher(ctx,out,in,inl); | 182 | if(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0; |
| 152 | *outl+=inl; | 183 | *outl+=inl; |
| 153 | } | 184 | } |
| 154 | 185 | ||
| 155 | if (i != 0) | 186 | if (i != 0) |
| 156 | memcpy(ctx->buf,&(in[inl]),i); | 187 | memcpy(ctx->buf,&(in[inl]),i); |
| 157 | ctx->buf_len=i; | 188 | ctx->buf_len=i; |
| 189 | return 1; | ||
| 158 | } | 190 | } |
| 159 | 191 | ||
| 160 | void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 192 | int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| 161 | { | 193 | { |
| 162 | int i,n,b,bl; | 194 | int i,n,b,bl; |
| 163 | 195 | ||
| @@ -165,24 +197,25 @@ void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 165 | if (b == 1) | 197 | if (b == 1) |
| 166 | { | 198 | { |
| 167 | *outl=0; | 199 | *outl=0; |
| 168 | return; | 200 | return 1; |
| 169 | } | 201 | } |
| 170 | bl=ctx->buf_len; | 202 | bl=ctx->buf_len; |
| 171 | n=b-bl; | 203 | n=b-bl; |
| 172 | for (i=bl; i<b; i++) | 204 | for (i=bl; i<b; i++) |
| 173 | ctx->buf[i]=n; | 205 | ctx->buf[i]=n; |
| 174 | ctx->cipher->do_cipher(ctx,out,ctx->buf,b); | 206 | if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,b)) return 0; |
| 175 | *outl=b; | 207 | *outl=b; |
| 208 | return 1; | ||
| 176 | } | 209 | } |
| 177 | 210 | ||
| 178 | void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 211 | int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
| 179 | unsigned char *in, int inl) | 212 | unsigned char *in, int inl) |
| 180 | { | 213 | { |
| 181 | int b,bl,n; | 214 | int b,bl,n; |
| 182 | int keep_last=0; | 215 | int keep_last=0; |
| 183 | 216 | ||
| 184 | *outl=0; | 217 | *outl=0; |
| 185 | if (inl == 0) return; | 218 | if (inl == 0) return 1; |
| 186 | 219 | ||
| 187 | b=ctx->cipher->block_size; | 220 | b=ctx->cipher->block_size; |
| 188 | if (b > 1) | 221 | if (b > 1) |
| @@ -197,13 +230,13 @@ void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
| 197 | memcpy(&(ctx->buf[bl]),in,inl); | 230 | memcpy(&(ctx->buf[bl]),in,inl); |
| 198 | ctx->buf_len=b; | 231 | ctx->buf_len=b; |
| 199 | *outl=0; | 232 | *outl=0; |
| 200 | return; | 233 | return 1; |
| 201 | } | 234 | } |
| 202 | keep_last=1; | 235 | keep_last=1; |
| 203 | inl-=b; /* don't do the last block */ | 236 | inl-=b; /* don't do the last block */ |
| 204 | } | 237 | } |
| 205 | } | 238 | } |
| 206 | EVP_EncryptUpdate(ctx,out,outl,in,inl); | 239 | if(!EVP_EncryptUpdate(ctx,out,outl,in,inl)) return 0; |
| 207 | 240 | ||
| 208 | /* if we have 'decrypted' a multiple of block size, make sure | 241 | /* if we have 'decrypted' a multiple of block size, make sure |
| 209 | * we have a copy of this last block */ | 242 | * we have a copy of this last block */ |
| @@ -218,6 +251,7 @@ void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
| 218 | #endif | 251 | #endif |
| 219 | ctx->buf_len=b; | 252 | ctx->buf_len=b; |
| 220 | } | 253 | } |
| 254 | return 1; | ||
| 221 | } | 255 | } |
| 222 | 256 | ||
| 223 | int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 257 | int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| @@ -234,7 +268,7 @@ int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 234 | EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_WRONG_FINAL_BLOCK_LENGTH); | 268 | EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_WRONG_FINAL_BLOCK_LENGTH); |
| 235 | return(0); | 269 | return(0); |
| 236 | } | 270 | } |
| 237 | EVP_EncryptUpdate(ctx,ctx->buf,&n,ctx->buf,0); | 271 | if(!EVP_EncryptUpdate(ctx,ctx->buf,&n,ctx->buf,0)) return 0; |
| 238 | if (n != b) | 272 | if (n != b) |
| 239 | return(0); | 273 | return(0); |
| 240 | n=ctx->buf[b-1]; | 274 | n=ctx->buf[b-1]; |
| @@ -261,10 +295,47 @@ int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 261 | return(1); | 295 | return(1); |
| 262 | } | 296 | } |
| 263 | 297 | ||
| 264 | void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) | 298 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) |
| 265 | { | 299 | { |
| 266 | if ((c->cipher != NULL) && (c->cipher->cleanup != NULL)) | 300 | if ((c->cipher != NULL) && (c->cipher->cleanup != NULL)) |
| 267 | c->cipher->cleanup(c); | 301 | { |
| 302 | if(!c->cipher->cleanup(c)) return 0; | ||
| 303 | } | ||
| 268 | memset(c,0,sizeof(EVP_CIPHER_CTX)); | 304 | memset(c,0,sizeof(EVP_CIPHER_CTX)); |
| 305 | return 1; | ||
| 306 | } | ||
| 307 | |||
| 308 | int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen) | ||
| 309 | { | ||
| 310 | if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH) | ||
| 311 | return EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_KEY_LENGTH, keylen, NULL); | ||
| 312 | if(c->key_len == keylen) return 1; | ||
| 313 | if((keylen > 0) && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH)) | ||
| 314 | { | ||
| 315 | c->key_len = keylen; | ||
| 316 | return 1; | ||
| 317 | } | ||
| 318 | EVPerr(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,EVP_R_INVALID_KEY_LENGTH); | ||
| 319 | return 0; | ||
| 320 | } | ||
| 321 | |||
| 322 | int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) | ||
| 323 | { | ||
| 324 | int ret; | ||
| 325 | if(!ctx->cipher) { | ||
| 326 | EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_NO_CIPHER_SET); | ||
| 327 | return 0; | ||
| 328 | } | ||
| 329 | |||
| 330 | if(!ctx->cipher->ctrl) { | ||
| 331 | EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_CTRL_NOT_IMPLEMENTED); | ||
| 332 | return 0; | ||
| 269 | } | 333 | } |
| 270 | 334 | ||
| 335 | ret = ctx->cipher->ctrl(ctx, type, arg, ptr); | ||
| 336 | if(ret == -1) { | ||
| 337 | EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED); | ||
| 338 | return 0; | ||
| 339 | } | ||
| 340 | return ret; | ||
| 341 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/evp_err.c b/src/lib/libssl/src/crypto/evp/evp_err.c index fc149cbb1a..a01412a07c 100644 --- a/src/lib/libssl/src/crypto/evp/evp_err.c +++ b/src/lib/libssl/src/crypto/evp/evp_err.c | |||
| @@ -67,6 +67,9 @@ | |||
| 67 | static ERR_STRING_DATA EVP_str_functs[]= | 67 | static ERR_STRING_DATA EVP_str_functs[]= |
| 68 | { | 68 | { |
| 69 | {ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"}, | 69 | {ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"}, |
| 70 | {ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"}, | ||
| 71 | {ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_CTRL,0), "EVP_CIPHER_CTX_ctrl"}, | ||
| 72 | {ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,0), "EVP_CIPHER_CTX_set_key_length"}, | ||
| 70 | {ERR_PACK(0,EVP_F_EVP_DECRYPTFINAL,0), "EVP_DecryptFinal"}, | 73 | {ERR_PACK(0,EVP_F_EVP_DECRYPTFINAL,0), "EVP_DecryptFinal"}, |
| 71 | {ERR_PACK(0,EVP_F_EVP_MD_CTX_COPY,0), "EVP_MD_CTX_copy"}, | 74 | {ERR_PACK(0,EVP_F_EVP_MD_CTX_COPY,0), "EVP_MD_CTX_copy"}, |
| 72 | {ERR_PACK(0,EVP_F_EVP_OPENINIT,0), "EVP_OpenInit"}, | 75 | {ERR_PACK(0,EVP_F_EVP_OPENINIT,0), "EVP_OpenInit"}, |
| @@ -87,6 +90,7 @@ static ERR_STRING_DATA EVP_str_functs[]= | |||
| 87 | {ERR_PACK(0,EVP_F_PKCS5_PBE_KEYIVGEN,0), "PKCS5_PBE_keyivgen"}, | 90 | {ERR_PACK(0,EVP_F_PKCS5_PBE_KEYIVGEN,0), "PKCS5_PBE_keyivgen"}, |
| 88 | {ERR_PACK(0,EVP_F_PKCS5_V2_PBE_KEYIVGEN,0), "PKCS5_v2_PBE_keyivgen"}, | 91 | {ERR_PACK(0,EVP_F_PKCS5_V2_PBE_KEYIVGEN,0), "PKCS5_v2_PBE_keyivgen"}, |
| 89 | {ERR_PACK(0,EVP_F_RC2_MAGIC_TO_METH,0), "RC2_MAGIC_TO_METH"}, | 92 | {ERR_PACK(0,EVP_F_RC2_MAGIC_TO_METH,0), "RC2_MAGIC_TO_METH"}, |
| 93 | {ERR_PACK(0,EVP_F_RC5_CTRL,0), "RC5_CTRL"}, | ||
| 90 | {0,NULL} | 94 | {0,NULL} |
| 91 | }; | 95 | }; |
| 92 | 96 | ||
| @@ -96,6 +100,8 @@ static ERR_STRING_DATA EVP_str_reasons[]= | |||
| 96 | {EVP_R_BN_DECODE_ERROR ,"bn decode error"}, | 100 | {EVP_R_BN_DECODE_ERROR ,"bn decode error"}, |
| 97 | {EVP_R_BN_PUBKEY_ERROR ,"bn pubkey error"}, | 101 | {EVP_R_BN_PUBKEY_ERROR ,"bn pubkey error"}, |
| 98 | {EVP_R_CIPHER_PARAMETER_ERROR ,"cipher parameter error"}, | 102 | {EVP_R_CIPHER_PARAMETER_ERROR ,"cipher parameter error"}, |
| 103 | {EVP_R_CTRL_NOT_IMPLEMENTED ,"ctrl not implemented"}, | ||
| 104 | {EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED ,"ctrl operation not implemented"}, | ||
| 99 | {EVP_R_DECODE_ERROR ,"decode error"}, | 105 | {EVP_R_DECODE_ERROR ,"decode error"}, |
| 100 | {EVP_R_DIFFERENT_KEY_TYPES ,"different key types"}, | 106 | {EVP_R_DIFFERENT_KEY_TYPES ,"different key types"}, |
| 101 | {EVP_R_ENCODE_ERROR ,"encode error"}, | 107 | {EVP_R_ENCODE_ERROR ,"encode error"}, |
| @@ -103,16 +109,20 @@ static ERR_STRING_DATA EVP_str_reasons[]= | |||
| 103 | {EVP_R_EXPECTING_AN_RSA_KEY ,"expecting an rsa key"}, | 109 | {EVP_R_EXPECTING_AN_RSA_KEY ,"expecting an rsa key"}, |
| 104 | {EVP_R_EXPECTING_A_DH_KEY ,"expecting a dh key"}, | 110 | {EVP_R_EXPECTING_A_DH_KEY ,"expecting a dh key"}, |
| 105 | {EVP_R_EXPECTING_A_DSA_KEY ,"expecting a dsa key"}, | 111 | {EVP_R_EXPECTING_A_DSA_KEY ,"expecting a dsa key"}, |
| 112 | {EVP_R_INITIALIZATION_ERROR ,"initialization error"}, | ||
| 106 | {EVP_R_INPUT_NOT_INITIALIZED ,"input not initialized"}, | 113 | {EVP_R_INPUT_NOT_INITIALIZED ,"input not initialized"}, |
| 114 | {EVP_R_INVALID_KEY_LENGTH ,"invalid key length"}, | ||
| 107 | {EVP_R_IV_TOO_LARGE ,"iv too large"}, | 115 | {EVP_R_IV_TOO_LARGE ,"iv too large"}, |
| 108 | {EVP_R_KEYGEN_FAILURE ,"keygen failure"}, | 116 | {EVP_R_KEYGEN_FAILURE ,"keygen failure"}, |
| 109 | {EVP_R_MISSING_PARAMETERS ,"missing parameters"}, | 117 | {EVP_R_MISSING_PARAMETERS ,"missing parameters"}, |
| 118 | {EVP_R_NO_CIPHER_SET ,"no cipher set"}, | ||
| 110 | {EVP_R_NO_DSA_PARAMETERS ,"no dsa parameters"}, | 119 | {EVP_R_NO_DSA_PARAMETERS ,"no dsa parameters"}, |
| 111 | {EVP_R_NO_SIGN_FUNCTION_CONFIGURED ,"no sign function configured"}, | 120 | {EVP_R_NO_SIGN_FUNCTION_CONFIGURED ,"no sign function configured"}, |
| 112 | {EVP_R_NO_VERIFY_FUNCTION_CONFIGURED ,"no verify function configured"}, | 121 | {EVP_R_NO_VERIFY_FUNCTION_CONFIGURED ,"no verify function configured"}, |
| 113 | {EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE ,"pkcs8 unknown broken type"}, | 122 | {EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE ,"pkcs8 unknown broken type"}, |
| 114 | {EVP_R_PUBLIC_KEY_NOT_RSA ,"public key not rsa"}, | 123 | {EVP_R_PUBLIC_KEY_NOT_RSA ,"public key not rsa"}, |
| 115 | {EVP_R_UNKNOWN_PBE_ALGORITHM ,"unknown pbe algorithm"}, | 124 | {EVP_R_UNKNOWN_PBE_ALGORITHM ,"unknown pbe algorithm"}, |
| 125 | {EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS ,"unsuported number of rounds"}, | ||
| 116 | {EVP_R_UNSUPPORTED_CIPHER ,"unsupported cipher"}, | 126 | {EVP_R_UNSUPPORTED_CIPHER ,"unsupported cipher"}, |
| 117 | {EVP_R_UNSUPPORTED_KEYLENGTH ,"unsupported keylength"}, | 127 | {EVP_R_UNSUPPORTED_KEYLENGTH ,"unsupported keylength"}, |
| 118 | {EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION,"unsupported key derivation function"}, | 128 | {EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION,"unsupported key derivation function"}, |
diff --git a/src/lib/libssl/src/crypto/evp/evp_key.c b/src/lib/libssl/src/crypto/evp/evp_key.c index 667c21cca8..09b72bf4bd 100644 --- a/src/lib/libssl/src/crypto/evp/evp_key.c +++ b/src/lib/libssl/src/crypto/evp/evp_key.c | |||
| @@ -116,7 +116,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, EVP_MD *md, unsigned char *salt, | |||
| 116 | EVP_DigestUpdate(&c,&(md_buf[0]),mds); | 116 | EVP_DigestUpdate(&c,&(md_buf[0]),mds); |
| 117 | EVP_DigestUpdate(&c,data,datal); | 117 | EVP_DigestUpdate(&c,data,datal); |
| 118 | if (salt != NULL) | 118 | if (salt != NULL) |
| 119 | EVP_DigestUpdate(&c,salt,8); | 119 | EVP_DigestUpdate(&c,salt,PKCS5_SALT_LEN); |
| 120 | EVP_DigestFinal(&c,&(md_buf[0]),&mds); | 120 | EVP_DigestFinal(&c,&(md_buf[0]),&mds); |
| 121 | 121 | ||
| 122 | for (i=1; i<(unsigned int)count; i++) | 122 | for (i=1; i<(unsigned int)count; i++) |
diff --git a/src/lib/libssl/src/crypto/evp/evp_locl.h b/src/lib/libssl/src/crypto/evp/evp_locl.h new file mode 100644 index 0000000000..ce49d5b7d8 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/evp_locl.h | |||
| @@ -0,0 +1,168 @@ | |||
| 1 | /* evp_locl.h */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* Macros to code block cipher wrappers */ | ||
| 60 | |||
| 61 | /* Wrapper functions for each cipher mode */ | ||
| 62 | |||
| 63 | #define BLOCK_CIPHER_ecb_loop() \ | ||
| 64 | unsigned int i; \ | ||
| 65 | if(inl < 8) return 1;\ | ||
| 66 | inl -= 8; \ | ||
| 67 | for(i=0; i <= inl; i+=8) \ | ||
| 68 | |||
| 69 | #define BLOCK_CIPHER_func_ecb(cname, cprefix, kname) \ | ||
| 70 | static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ | ||
| 71 | {\ | ||
| 72 | BLOCK_CIPHER_ecb_loop() \ | ||
| 73 | cprefix##_ecb_encrypt(in + i, out + i, &ctx->c.kname, ctx->encrypt);\ | ||
| 74 | return 1;\ | ||
| 75 | } | ||
| 76 | |||
| 77 | #define BLOCK_CIPHER_func_ofb(cname, cprefix, kname) \ | ||
| 78 | static int cname##_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ | ||
| 79 | {\ | ||
| 80 | cprefix##_ofb64_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, &ctx->num);\ | ||
| 81 | return 1;\ | ||
| 82 | } | ||
| 83 | |||
| 84 | #define BLOCK_CIPHER_func_cbc(cname, cprefix, kname) \ | ||
| 85 | static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ | ||
| 86 | {\ | ||
| 87 | cprefix##_cbc_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, ctx->encrypt);\ | ||
| 88 | return 1;\ | ||
| 89 | } | ||
| 90 | |||
| 91 | #define BLOCK_CIPHER_func_cfb(cname, cprefix, kname) \ | ||
| 92 | static int cname##_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ | ||
| 93 | {\ | ||
| 94 | cprefix##_cfb64_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, &ctx->num, ctx->encrypt);\ | ||
| 95 | return 1;\ | ||
| 96 | } | ||
| 97 | |||
| 98 | #define BLOCK_CIPHER_all_funcs(cname, cprefix, kname) \ | ||
| 99 | BLOCK_CIPHER_func_cbc(cname, cprefix, kname) \ | ||
| 100 | BLOCK_CIPHER_func_cfb(cname, cprefix, kname) \ | ||
| 101 | BLOCK_CIPHER_func_ecb(cname, cprefix, kname) \ | ||
| 102 | BLOCK_CIPHER_func_ofb(cname, cprefix, kname) | ||
| 103 | |||
| 104 | #define BLOCK_CIPHER_defs(cname, kstruct, \ | ||
| 105 | nid, block_size, key_len, iv_len, flags,\ | ||
| 106 | init_key, cleanup, set_asn1, get_asn1, ctrl)\ | ||
| 107 | static EVP_CIPHER cname##_cbc = {\ | ||
| 108 | nid##_cbc, block_size, key_len, iv_len, \ | ||
| 109 | flags | EVP_CIPH_CBC_MODE,\ | ||
| 110 | init_key,\ | ||
| 111 | cname##_cbc_cipher,\ | ||
| 112 | cleanup,\ | ||
| 113 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\ | ||
| 114 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\ | ||
| 115 | set_asn1, get_asn1,\ | ||
| 116 | ctrl, \ | ||
| 117 | NULL \ | ||
| 118 | };\ | ||
| 119 | EVP_CIPHER *EVP_##cname##_cbc(void) { return &cname##_cbc; }\ | ||
| 120 | static EVP_CIPHER cname##_cfb = {\ | ||
| 121 | nid##_cfb64, 1, key_len, iv_len, \ | ||
| 122 | flags | EVP_CIPH_CFB_MODE,\ | ||
| 123 | init_key,\ | ||
| 124 | cname##_cfb_cipher,\ | ||
| 125 | cleanup,\ | ||
| 126 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\ | ||
| 127 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\ | ||
| 128 | set_asn1, get_asn1,\ | ||
| 129 | ctrl,\ | ||
| 130 | NULL \ | ||
| 131 | };\ | ||
| 132 | EVP_CIPHER *EVP_##cname##_cfb(void) { return &cname##_cfb; }\ | ||
| 133 | static EVP_CIPHER cname##_ofb = {\ | ||
| 134 | nid##_ofb64, 1, key_len, iv_len, \ | ||
| 135 | flags | EVP_CIPH_OFB_MODE,\ | ||
| 136 | init_key,\ | ||
| 137 | cname##_ofb_cipher,\ | ||
| 138 | cleanup,\ | ||
| 139 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\ | ||
| 140 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\ | ||
| 141 | set_asn1, get_asn1,\ | ||
| 142 | ctrl,\ | ||
| 143 | NULL \ | ||
| 144 | };\ | ||
| 145 | EVP_CIPHER *EVP_##cname##_ofb(void) { return &cname##_ofb; }\ | ||
| 146 | static EVP_CIPHER cname##_ecb = {\ | ||
| 147 | nid##_ecb, block_size, key_len, iv_len, \ | ||
| 148 | flags | EVP_CIPH_ECB_MODE,\ | ||
| 149 | init_key,\ | ||
| 150 | cname##_ecb_cipher,\ | ||
| 151 | cleanup,\ | ||
| 152 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\ | ||
| 153 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\ | ||
| 154 | set_asn1, get_asn1,\ | ||
| 155 | ctrl,\ | ||
| 156 | NULL \ | ||
| 157 | };\ | ||
| 158 | EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; } | ||
| 159 | |||
| 160 | |||
| 161 | |||
| 162 | #define IMPLEMENT_BLOCK_CIPHER(cname, kname, cprefix, kstruct, \ | ||
| 163 | nid, block_size, key_len, iv_len, flags, \ | ||
| 164 | init_key, cleanup, set_asn1, get_asn1, ctrl) \ | ||
| 165 | BLOCK_CIPHER_all_funcs(cname, cprefix, kname) \ | ||
| 166 | BLOCK_CIPHER_defs(cname, kstruct, nid, block_size, key_len, iv_len, flags,\ | ||
| 167 | init_key, cleanup, set_asn1, get_asn1, ctrl) | ||
| 168 | |||
diff --git a/src/lib/libssl/src/crypto/evp/evp_pbe.c b/src/lib/libssl/src/crypto/evp/evp_pbe.c index 353c3ad667..224a422b12 100644 --- a/src/lib/libssl/src/crypto/evp/evp_pbe.c +++ b/src/lib/libssl/src/crypto/evp/evp_pbe.c | |||
| @@ -92,7 +92,8 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, | |||
| 92 | ERR_add_error_data(2, "TYPE=", obj_tmp); | 92 | ERR_add_error_data(2, "TYPE=", obj_tmp); |
| 93 | return 0; | 93 | return 0; |
| 94 | } | 94 | } |
| 95 | if (passlen == -1) passlen = strlen(pass); | 95 | if(!pass) passlen = 0; |
| 96 | else if (passlen == -1) passlen = strlen(pass); | ||
| 96 | pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i); | 97 | pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i); |
| 97 | i = (*pbetmp->keygen)(ctx, pass, passlen, param, pbetmp->cipher, | 98 | i = (*pbetmp->keygen)(ctx, pass, passlen, param, pbetmp->cipher, |
| 98 | pbetmp->md, en_de); | 99 | pbetmp->md, en_de); |
| @@ -103,8 +104,9 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, | |||
| 103 | return 1; | 104 | return 1; |
| 104 | } | 105 | } |
| 105 | 106 | ||
| 106 | static int pbe_cmp (EVP_PBE_CTL **pbe1, EVP_PBE_CTL **pbe2) | 107 | static int pbe_cmp(const char * const *a, const char * const *b) |
| 107 | { | 108 | { |
| 109 | EVP_PBE_CTL **pbe1 = (EVP_PBE_CTL **) a, **pbe2 = (EVP_PBE_CTL **)b; | ||
| 108 | return ((*pbe1)->pbe_nid - (*pbe2)->pbe_nid); | 110 | return ((*pbe1)->pbe_nid - (*pbe2)->pbe_nid); |
| 109 | } | 111 | } |
| 110 | 112 | ||
| @@ -114,8 +116,8 @@ int EVP_PBE_alg_add (int nid, EVP_CIPHER *cipher, EVP_MD *md, | |||
| 114 | EVP_PBE_KEYGEN *keygen) | 116 | EVP_PBE_KEYGEN *keygen) |
| 115 | { | 117 | { |
| 116 | EVP_PBE_CTL *pbe_tmp; | 118 | EVP_PBE_CTL *pbe_tmp; |
| 117 | if (!pbe_algs) pbe_algs = sk_new (pbe_cmp); | 119 | if (!pbe_algs) pbe_algs = sk_new(pbe_cmp); |
| 118 | if (!(pbe_tmp = (EVP_PBE_CTL*) Malloc (sizeof(EVP_PBE_CTL)))) { | 120 | if (!(pbe_tmp = (EVP_PBE_CTL*) OPENSSL_malloc (sizeof(EVP_PBE_CTL)))) { |
| 119 | EVPerr(EVP_F_EVP_PBE_ALG_ADD,ERR_R_MALLOC_FAILURE); | 121 | EVPerr(EVP_F_EVP_PBE_ALG_ADD,ERR_R_MALLOC_FAILURE); |
| 120 | return 0; | 122 | return 0; |
| 121 | } | 123 | } |
| @@ -129,6 +131,6 @@ int EVP_PBE_alg_add (int nid, EVP_CIPHER *cipher, EVP_MD *md, | |||
| 129 | 131 | ||
| 130 | void EVP_PBE_cleanup(void) | 132 | void EVP_PBE_cleanup(void) |
| 131 | { | 133 | { |
| 132 | sk_pop_free(pbe_algs, FreeFunc); | 134 | sk_pop_free(pbe_algs, OPENSSL_freeFunc); |
| 133 | pbe_algs = NULL; | 135 | pbe_algs = NULL; |
| 134 | } | 136 | } |
diff --git a/src/lib/libssl/src/crypto/evp/evp_pkey.c b/src/lib/libssl/src/crypto/evp/evp_pkey.c index 4ab091fa56..8df2874f3c 100644 --- a/src/lib/libssl/src/crypto/evp/evp_pkey.c +++ b/src/lib/libssl/src/crypto/evp/evp_pkey.c | |||
| @@ -76,7 +76,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) | |||
| 76 | DSA *dsa = NULL; | 76 | DSA *dsa = NULL; |
| 77 | ASN1_INTEGER *privkey; | 77 | ASN1_INTEGER *privkey; |
| 78 | ASN1_TYPE *t1, *t2, *param = NULL; | 78 | ASN1_TYPE *t1, *t2, *param = NULL; |
| 79 | STACK *ndsa = NULL; | 79 | STACK_OF(ASN1_TYPE) *ndsa = NULL; |
| 80 | BN_CTX *ctx = NULL; | 80 | BN_CTX *ctx = NULL; |
| 81 | int plen; | 81 | int plen; |
| 82 | #endif | 82 | #endif |
| @@ -119,13 +119,13 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) | |||
| 119 | 119 | ||
| 120 | /* Check for broken DSA PKCS#8, UGH! */ | 120 | /* Check for broken DSA PKCS#8, UGH! */ |
| 121 | if(*p == (V_ASN1_SEQUENCE|V_ASN1_CONSTRUCTED)) { | 121 | if(*p == (V_ASN1_SEQUENCE|V_ASN1_CONSTRUCTED)) { |
| 122 | if(!(ndsa = ASN1_seq_unpack(p, pkeylen, | 122 | if(!(ndsa = ASN1_seq_unpack_ASN1_TYPE(p, pkeylen, |
| 123 | (char *(*)())d2i_ASN1_TYPE, | 123 | d2i_ASN1_TYPE, |
| 124 | ASN1_TYPE_free))) { | 124 | ASN1_TYPE_free))) { |
| 125 | EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); | 125 | EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); |
| 126 | goto dsaerr; | 126 | goto dsaerr; |
| 127 | } | 127 | } |
| 128 | if(sk_num(ndsa) != 2 ) { | 128 | if(sk_ASN1_TYPE_num(ndsa) != 2 ) { |
| 129 | EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); | 129 | EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); |
| 130 | goto dsaerr; | 130 | goto dsaerr; |
| 131 | } | 131 | } |
| @@ -134,8 +134,8 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) | |||
| 134 | * SEQUENCE {pub_key, priv_key} | 134 | * SEQUENCE {pub_key, priv_key} |
| 135 | */ | 135 | */ |
| 136 | 136 | ||
| 137 | t1 = (ASN1_TYPE *)sk_value(ndsa, 0); | 137 | t1 = sk_ASN1_TYPE_value(ndsa, 0); |
| 138 | t2 = (ASN1_TYPE *)sk_value(ndsa, 1); | 138 | t2 = sk_ASN1_TYPE_value(ndsa, 1); |
| 139 | if(t1->type == V_ASN1_SEQUENCE) { | 139 | if(t1->type == V_ASN1_SEQUENCE) { |
| 140 | p8->broken = PKCS8_EMBEDDED_PARAM; | 140 | p8->broken = PKCS8_EMBEDDED_PARAM; |
| 141 | param = t1; | 141 | param = t1; |
| @@ -193,12 +193,12 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) | |||
| 193 | 193 | ||
| 194 | EVP_PKEY_assign_DSA(pkey, dsa); | 194 | EVP_PKEY_assign_DSA(pkey, dsa); |
| 195 | BN_CTX_free (ctx); | 195 | BN_CTX_free (ctx); |
| 196 | if(ndsa) sk_pop_free(ndsa, ASN1_TYPE_free); | 196 | if(ndsa) sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); |
| 197 | else ASN1_INTEGER_free(privkey); | 197 | else ASN1_INTEGER_free(privkey); |
| 198 | break; | 198 | break; |
| 199 | dsaerr: | 199 | dsaerr: |
| 200 | BN_CTX_free (ctx); | 200 | BN_CTX_free (ctx); |
| 201 | sk_pop_free(ndsa, ASN1_TYPE_free); | 201 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); |
| 202 | DSA_free(dsa); | 202 | DSA_free(dsa); |
| 203 | EVP_PKEY_free(pkey); | 203 | EVP_PKEY_free(pkey); |
| 204 | return NULL; | 204 | return NULL; |
| @@ -302,12 +302,13 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 302 | ASN1_STRING *params; | 302 | ASN1_STRING *params; |
| 303 | ASN1_INTEGER *prkey; | 303 | ASN1_INTEGER *prkey; |
| 304 | ASN1_TYPE *ttmp; | 304 | ASN1_TYPE *ttmp; |
| 305 | STACK *ndsa; | 305 | STACK_OF(ASN1_TYPE) *ndsa; |
| 306 | unsigned char *p, *q; | 306 | unsigned char *p, *q; |
| 307 | int len; | 307 | int len; |
| 308 | |||
| 308 | p8->pkeyalg->algorithm = OBJ_nid2obj(NID_dsa); | 309 | p8->pkeyalg->algorithm = OBJ_nid2obj(NID_dsa); |
| 309 | len = i2d_DSAparams (pkey->pkey.dsa, NULL); | 310 | len = i2d_DSAparams (pkey->pkey.dsa, NULL); |
| 310 | if (!(p = Malloc(len))) { | 311 | if (!(p = OPENSSL_malloc(len))) { |
| 311 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 312 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 312 | PKCS8_PRIV_KEY_INFO_free (p8); | 313 | PKCS8_PRIV_KEY_INFO_free (p8); |
| 313 | return 0; | 314 | return 0; |
| @@ -316,7 +317,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 316 | i2d_DSAparams (pkey->pkey.dsa, &q); | 317 | i2d_DSAparams (pkey->pkey.dsa, &q); |
| 317 | params = ASN1_STRING_new(); | 318 | params = ASN1_STRING_new(); |
| 318 | ASN1_STRING_set(params, p, len); | 319 | ASN1_STRING_set(params, p, len); |
| 319 | Free(p); | 320 | OPENSSL_free(p); |
| 320 | /* Get private key into integer */ | 321 | /* Get private key into integer */ |
| 321 | if (!(prkey = BN_to_ASN1_INTEGER (pkey->pkey.dsa->priv_key, NULL))) { | 322 | if (!(prkey = BN_to_ASN1_INTEGER (pkey->pkey.dsa->priv_key, NULL))) { |
| 322 | EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); | 323 | EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); |
| @@ -345,7 +346,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 345 | 346 | ||
| 346 | p8->pkeyalg->parameter->value.sequence = params; | 347 | p8->pkeyalg->parameter->value.sequence = params; |
| 347 | p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; | 348 | p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; |
| 348 | ndsa = sk_new_null(); | 349 | ndsa = sk_ASN1_TYPE_new_null(); |
| 349 | ttmp = ASN1_TYPE_new(); | 350 | ttmp = ASN1_TYPE_new(); |
| 350 | if (!(ttmp->value.integer = BN_to_ASN1_INTEGER (pkey->pkey.dsa->pub_key, NULL))) { | 351 | if (!(ttmp->value.integer = BN_to_ASN1_INTEGER (pkey->pkey.dsa->pub_key, NULL))) { |
| 351 | EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); | 352 | EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); |
| @@ -353,53 +354,53 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 353 | return 0; | 354 | return 0; |
| 354 | } | 355 | } |
| 355 | ttmp->type = V_ASN1_INTEGER; | 356 | ttmp->type = V_ASN1_INTEGER; |
| 356 | sk_push(ndsa, (char *)ttmp); | 357 | sk_ASN1_TYPE_push(ndsa, ttmp); |
| 357 | 358 | ||
| 358 | ttmp = ASN1_TYPE_new(); | 359 | ttmp = ASN1_TYPE_new(); |
| 359 | ttmp->value.integer = prkey; | 360 | ttmp->value.integer = prkey; |
| 360 | ttmp->type = V_ASN1_INTEGER; | 361 | ttmp->type = V_ASN1_INTEGER; |
| 361 | sk_push(ndsa, (char *)ttmp); | 362 | sk_ASN1_TYPE_push(ndsa, ttmp); |
| 362 | 363 | ||
| 363 | p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); | 364 | p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); |
| 364 | 365 | ||
| 365 | if (!ASN1_seq_pack(ndsa, i2d_ASN1_TYPE, | 366 | if (!ASN1_seq_pack_ASN1_TYPE(ndsa, i2d_ASN1_TYPE, |
| 366 | &p8->pkey->value.octet_string->data, | 367 | &p8->pkey->value.octet_string->data, |
| 367 | &p8->pkey->value.octet_string->length)) { | 368 | &p8->pkey->value.octet_string->length)) { |
| 368 | 369 | ||
| 369 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 370 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 370 | sk_pop_free(ndsa, ASN1_TYPE_free); | 371 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); |
| 371 | M_ASN1_INTEGER_free(prkey); | 372 | M_ASN1_INTEGER_free(prkey); |
| 372 | return 0; | 373 | return 0; |
| 373 | } | 374 | } |
| 374 | sk_pop_free(ndsa, ASN1_TYPE_free); | 375 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); |
| 375 | break; | 376 | break; |
| 376 | 377 | ||
| 377 | case PKCS8_EMBEDDED_PARAM: | 378 | case PKCS8_EMBEDDED_PARAM: |
| 378 | 379 | ||
| 379 | p8->pkeyalg->parameter->type = V_ASN1_NULL; | 380 | p8->pkeyalg->parameter->type = V_ASN1_NULL; |
| 380 | ndsa = sk_new_null(); | 381 | ndsa = sk_ASN1_TYPE_new_null(); |
| 381 | ttmp = ASN1_TYPE_new(); | 382 | ttmp = ASN1_TYPE_new(); |
| 382 | ttmp->value.sequence = params; | 383 | ttmp->value.sequence = params; |
| 383 | ttmp->type = V_ASN1_SEQUENCE; | 384 | ttmp->type = V_ASN1_SEQUENCE; |
| 384 | sk_push(ndsa, (char *)ttmp); | 385 | sk_ASN1_TYPE_push(ndsa, ttmp); |
| 385 | 386 | ||
| 386 | ttmp = ASN1_TYPE_new(); | 387 | ttmp = ASN1_TYPE_new(); |
| 387 | ttmp->value.integer = prkey; | 388 | ttmp->value.integer = prkey; |
| 388 | ttmp->type = V_ASN1_INTEGER; | 389 | ttmp->type = V_ASN1_INTEGER; |
| 389 | sk_push(ndsa, (char *)ttmp); | 390 | sk_ASN1_TYPE_push(ndsa, ttmp); |
| 390 | 391 | ||
| 391 | p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); | 392 | p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); |
| 392 | 393 | ||
| 393 | if (!ASN1_seq_pack(ndsa, i2d_ASN1_TYPE, | 394 | if (!ASN1_seq_pack_ASN1_TYPE(ndsa, i2d_ASN1_TYPE, |
| 394 | &p8->pkey->value.octet_string->data, | 395 | &p8->pkey->value.octet_string->data, |
| 395 | &p8->pkey->value.octet_string->length)) { | 396 | &p8->pkey->value.octet_string->length)) { |
| 396 | 397 | ||
| 397 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 398 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 398 | sk_pop_free(ndsa, ASN1_TYPE_free); | 399 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); |
| 399 | M_ASN1_INTEGER_free (prkey); | 400 | M_ASN1_INTEGER_free (prkey); |
| 400 | return 0; | 401 | return 0; |
| 401 | } | 402 | } |
| 402 | sk_pop_free(ndsa, ASN1_TYPE_free); | 403 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); |
| 403 | break; | 404 | break; |
| 404 | } | 405 | } |
| 405 | return 1; | 406 | return 1; |
diff --git a/src/lib/libssl/src/crypto/evp/m_md4.c b/src/lib/libssl/src/crypto/evp/m_md4.c new file mode 100644 index 0000000000..6a24ceb86d --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/m_md4.c | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* crypto/evp/m_md4.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_MD4 | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | #include <openssl/x509.h> | ||
| 65 | |||
| 66 | static EVP_MD md4_md= | ||
| 67 | { | ||
| 68 | NID_md4, | ||
| 69 | 0, | ||
| 70 | MD4_DIGEST_LENGTH, | ||
| 71 | MD4_Init, | ||
| 72 | MD4_Update, | ||
| 73 | MD4_Final, | ||
| 74 | EVP_PKEY_RSA_method, | ||
| 75 | MD4_CBLOCK, | ||
| 76 | sizeof(EVP_MD *)+sizeof(MD4_CTX), | ||
| 77 | }; | ||
| 78 | |||
| 79 | EVP_MD *EVP_md4(void) | ||
| 80 | { | ||
| 81 | return(&md4_md); | ||
| 82 | } | ||
| 83 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/p5_crpt.c b/src/lib/libssl/src/crypto/evp/p5_crpt.c index e3dae52d4d..6bfa2c5acb 100644 --- a/src/lib/libssl/src/crypto/evp/p5_crpt.c +++ b/src/lib/libssl/src/crypto/evp/p5_crpt.c | |||
| @@ -125,6 +125,9 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, | |||
| 125 | salt = pbe->salt->data; | 125 | salt = pbe->salt->data; |
| 126 | saltlen = pbe->salt->length; | 126 | saltlen = pbe->salt->length; |
| 127 | 127 | ||
| 128 | if(!pass) passlen = 0; | ||
| 129 | else if(passlen == -1) passlen = strlen(pass); | ||
| 130 | |||
| 128 | EVP_DigestInit (&ctx, md); | 131 | EVP_DigestInit (&ctx, md); |
| 129 | EVP_DigestUpdate (&ctx, pass, passlen); | 132 | EVP_DigestUpdate (&ctx, pass, passlen); |
| 130 | EVP_DigestUpdate (&ctx, salt, saltlen); | 133 | EVP_DigestUpdate (&ctx, salt, saltlen); |
diff --git a/src/lib/libssl/src/crypto/evp/p5_crpt2.c b/src/lib/libssl/src/crypto/evp/p5_crpt2.c index 27a2c518be..717fad68ca 100644 --- a/src/lib/libssl/src/crypto/evp/p5_crpt2.c +++ b/src/lib/libssl/src/crypto/evp/p5_crpt2.c | |||
| @@ -86,7 +86,8 @@ int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, | |||
| 86 | HMAC_CTX hctx; | 86 | HMAC_CTX hctx; |
| 87 | p = out; | 87 | p = out; |
| 88 | tkeylen = keylen; | 88 | tkeylen = keylen; |
| 89 | if(passlen == -1) passlen = strlen(pass); | 89 | if(!pass) passlen = 0; |
| 90 | else if(passlen == -1) passlen = strlen(pass); | ||
| 90 | while(tkeylen) { | 91 | while(tkeylen) { |
| 91 | if(tkeylen > SHA_DIGEST_LENGTH) cplen = SHA_DIGEST_LENGTH; | 92 | if(tkeylen > SHA_DIGEST_LENGTH) cplen = SHA_DIGEST_LENGTH; |
| 92 | else cplen = tkeylen; | 93 | else cplen = tkeylen; |
diff --git a/src/lib/libssl/src/crypto/evp/p_lib.c b/src/lib/libssl/src/crypto/evp/p_lib.c index 4cb387f8de..62398ed74d 100644 --- a/src/lib/libssl/src/crypto/evp/p_lib.c +++ b/src/lib/libssl/src/crypto/evp/p_lib.c | |||
| @@ -180,7 +180,7 @@ EVP_PKEY *EVP_PKEY_new(void) | |||
| 180 | { | 180 | { |
| 181 | EVP_PKEY *ret; | 181 | EVP_PKEY *ret; |
| 182 | 182 | ||
| 183 | ret=(EVP_PKEY *)Malloc(sizeof(EVP_PKEY)); | 183 | ret=(EVP_PKEY *)OPENSSL_malloc(sizeof(EVP_PKEY)); |
| 184 | if (ret == NULL) | 184 | if (ret == NULL) |
| 185 | { | 185 | { |
| 186 | EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE); | 186 | EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -302,7 +302,7 @@ void EVP_PKEY_free(EVP_PKEY *x) | |||
| 302 | } | 302 | } |
| 303 | #endif | 303 | #endif |
| 304 | EVP_PKEY_free_it(x); | 304 | EVP_PKEY_free_it(x); |
| 305 | Free(x); | 305 | OPENSSL_free(x); |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | static void EVP_PKEY_free_it(EVP_PKEY *x) | 308 | static void EVP_PKEY_free_it(EVP_PKEY *x) |
diff --git a/src/lib/libssl/src/crypto/evp/p_open.c b/src/lib/libssl/src/crypto/evp/p_open.c index b9ca7892c2..2760c00fec 100644 --- a/src/lib/libssl/src/crypto/evp/p_open.c +++ b/src/lib/libssl/src/crypto/evp/p_open.c | |||
| @@ -68,37 +68,41 @@ int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char *ek, | |||
| 68 | { | 68 | { |
| 69 | unsigned char *key=NULL; | 69 | unsigned char *key=NULL; |
| 70 | int i,size=0,ret=0; | 70 | int i,size=0,ret=0; |
| 71 | 71 | ||
| 72 | if(type) { | ||
| 73 | EVP_CIPHER_CTX_init(ctx); | ||
| 74 | if(!EVP_DecryptInit(ctx,type,NULL,NULL)) return 0; | ||
| 75 | } | ||
| 76 | |||
| 77 | if(!priv) return 1; | ||
| 78 | |||
| 72 | if (priv->type != EVP_PKEY_RSA) | 79 | if (priv->type != EVP_PKEY_RSA) |
| 73 | { | 80 | { |
| 74 | EVPerr(EVP_F_EVP_OPENINIT,EVP_R_PUBLIC_KEY_NOT_RSA); | 81 | EVPerr(EVP_F_EVP_OPENINIT,EVP_R_PUBLIC_KEY_NOT_RSA); |
| 75 | ret= -1; | ||
| 76 | goto err; | 82 | goto err; |
| 77 | } | 83 | } |
| 78 | 84 | ||
| 79 | size=RSA_size(priv->pkey.rsa); | 85 | size=RSA_size(priv->pkey.rsa); |
| 80 | key=(unsigned char *)Malloc(size+2); | 86 | key=(unsigned char *)OPENSSL_malloc(size+2); |
| 81 | if (key == NULL) | 87 | if (key == NULL) |
| 82 | { | 88 | { |
| 83 | /* ERROR */ | 89 | /* ERROR */ |
| 84 | EVPerr(EVP_F_EVP_OPENINIT,ERR_R_MALLOC_FAILURE); | 90 | EVPerr(EVP_F_EVP_OPENINIT,ERR_R_MALLOC_FAILURE); |
| 85 | ret= -1; | ||
| 86 | goto err; | 91 | goto err; |
| 87 | } | 92 | } |
| 88 | 93 | ||
| 89 | i=EVP_PKEY_decrypt(key,ek,ekl,priv); | 94 | i=EVP_PKEY_decrypt(key,ek,ekl,priv); |
| 90 | if (i != type->key_len) | 95 | if ((i <= 0) || !EVP_CIPHER_CTX_set_key_length(ctx, i)) |
| 91 | { | 96 | { |
| 92 | /* ERROR */ | 97 | /* ERROR */ |
| 93 | goto err; | 98 | goto err; |
| 94 | } | 99 | } |
| 100 | if(!EVP_DecryptInit(ctx,NULL,key,iv)) goto err; | ||
| 95 | 101 | ||
| 96 | EVP_CIPHER_CTX_init(ctx); | ||
| 97 | EVP_DecryptInit(ctx,type,key,iv); | ||
| 98 | ret=1; | 102 | ret=1; |
| 99 | err: | 103 | err: |
| 100 | if (key != NULL) memset(key,0,size); | 104 | if (key != NULL) memset(key,0,size); |
| 101 | Free(key); | 105 | OPENSSL_free(key); |
| 102 | return(ret); | 106 | return(ret); |
| 103 | } | 107 | } |
| 104 | 108 | ||
diff --git a/src/lib/libssl/src/crypto/evp/p_seal.c b/src/lib/libssl/src/crypto/evp/p_seal.c index d449e892bf..2fd1d7e0c2 100644 --- a/src/lib/libssl/src/crypto/evp/p_seal.c +++ b/src/lib/libssl/src/crypto/evp/p_seal.c | |||
| @@ -72,18 +72,21 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, | |||
| 72 | unsigned char key[EVP_MAX_KEY_LENGTH]; | 72 | unsigned char key[EVP_MAX_KEY_LENGTH]; |
| 73 | int i; | 73 | int i; |
| 74 | 74 | ||
| 75 | if(type) { | ||
| 76 | EVP_CIPHER_CTX_init(ctx); | ||
| 77 | if(!EVP_EncryptInit(ctx,type,NULL,NULL)) return 0; | ||
| 78 | } | ||
| 75 | if (npubk <= 0) return(0); | 79 | if (npubk <= 0) return(0); |
| 76 | if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) <= 0) | 80 | if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) <= 0) |
| 77 | return(0); | 81 | return(0); |
| 78 | if (type->iv_len > 0) | 82 | if (EVP_CIPHER_CTX_iv_length(ctx)) |
| 79 | RAND_pseudo_bytes(iv,type->iv_len); | 83 | RAND_pseudo_bytes(iv,EVP_CIPHER_CTX_iv_length(ctx)); |
| 80 | 84 | ||
| 81 | EVP_CIPHER_CTX_init(ctx); | 85 | if(!EVP_EncryptInit(ctx,NULL,key,iv)) return 0; |
| 82 | EVP_EncryptInit(ctx,type,key,iv); | ||
| 83 | 86 | ||
| 84 | for (i=0; i<npubk; i++) | 87 | for (i=0; i<npubk; i++) |
| 85 | { | 88 | { |
| 86 | ekl[i]=EVP_PKEY_encrypt(ek[i],key,EVP_CIPHER_key_length(type), | 89 | ekl[i]=EVP_PKEY_encrypt(ek[i],key,EVP_CIPHER_CTX_key_length(ctx), |
| 87 | pubk[i]); | 90 | pubk[i]); |
| 88 | if (ekl[i] <= 0) return(-1); | 91 | if (ekl[i] <= 0) return(-1); |
| 89 | } | 92 | } |
diff --git a/src/lib/libssl/src/crypto/ex_data.c b/src/lib/libssl/src/crypto/ex_data.c index a057dd3b68..1ee88da2a8 100644 --- a/src/lib/libssl/src/crypto/ex_data.c +++ b/src/lib/libssl/src/crypto/ex_data.c | |||
| @@ -77,7 +77,7 @@ int CRYPTO_get_ex_new_index(int idx, STACK_OF(CRYPTO_EX_DATA_FUNCS) **skp, long | |||
| 77 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE); | 77 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE); |
| 78 | goto err; | 78 | goto err; |
| 79 | } | 79 | } |
| 80 | a=(CRYPTO_EX_DATA_FUNCS *)Malloc(sizeof(CRYPTO_EX_DATA_FUNCS)); | 80 | a=(CRYPTO_EX_DATA_FUNCS *)OPENSSL_malloc(sizeof(CRYPTO_EX_DATA_FUNCS)); |
| 81 | if (a == NULL) | 81 | if (a == NULL) |
| 82 | { | 82 | { |
| 83 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE); | 83 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE); |
| @@ -93,7 +93,7 @@ int CRYPTO_get_ex_new_index(int idx, STACK_OF(CRYPTO_EX_DATA_FUNCS) **skp, long | |||
| 93 | if (!sk_CRYPTO_EX_DATA_FUNCS_push(*skp,NULL)) | 93 | if (!sk_CRYPTO_EX_DATA_FUNCS_push(*skp,NULL)) |
| 94 | { | 94 | { |
| 95 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE); | 95 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE); |
| 96 | Free(a); | 96 | OPENSSL_free(a); |
| 97 | goto err; | 97 | goto err; |
| 98 | } | 98 | } |
| 99 | } | 99 | } |
diff --git a/src/lib/libssl/src/crypto/hmac/Makefile.ssl b/src/lib/libssl/src/crypto/hmac/Makefile.ssl index 04b1b9be98..cf57311973 100644 --- a/src/lib/libssl/src/crypto/hmac/Makefile.ssl +++ b/src/lib/libssl/src/crypto/hmac/Makefile.ssl | |||
| @@ -85,10 +85,11 @@ hmac.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 85 | hmac.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 85 | hmac.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 86 | hmac.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h | 86 | hmac.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h |
| 87 | hmac.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 87 | hmac.o: ../../include/openssl/idea.h ../../include/openssl/md2.h |
| 88 | hmac.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 88 | hmac.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 89 | hmac.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 89 | hmac.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 90 | hmac.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 90 | hmac.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h | 91 | hmac.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h |
| 91 | hmac.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 92 | hmac.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 92 | hmac.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 93 | hmac.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 93 | hmac.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 94 | hmac.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 94 | hmac.o: ../../include/openssl/stack.h | 95 | hmac.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
diff --git a/src/lib/libssl/src/crypto/hmac/hmac.h b/src/lib/libssl/src/crypto/hmac/hmac.h index 223eeda7f3..328bad2608 100644 --- a/src/lib/libssl/src/crypto/hmac/hmac.h +++ b/src/lib/libssl/src/crypto/hmac/hmac.h | |||
| @@ -58,10 +58,6 @@ | |||
| 58 | #ifndef HEADER_HMAC_H | 58 | #ifndef HEADER_HMAC_H |
| 59 | #define HEADER_HMAC_H | 59 | #define HEADER_HMAC_H |
| 60 | 60 | ||
| 61 | #ifdef __cplusplus | ||
| 62 | extern "C" { | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #ifdef NO_HMAC | 61 | #ifdef NO_HMAC |
| 66 | #error HMAC is disabled. | 62 | #error HMAC is disabled. |
| 67 | #endif | 63 | #endif |
| @@ -70,6 +66,10 @@ extern "C" { | |||
| 70 | 66 | ||
| 71 | #define HMAC_MAX_MD_CBLOCK 64 | 67 | #define HMAC_MAX_MD_CBLOCK 64 |
| 72 | 68 | ||
| 69 | #ifdef __cplusplus | ||
| 70 | extern "C" { | ||
| 71 | #endif | ||
| 72 | |||
| 73 | typedef struct hmac_ctx_st | 73 | typedef struct hmac_ctx_st |
| 74 | { | 74 | { |
| 75 | const EVP_MD *md; | 75 | const EVP_MD *md; |
diff --git a/src/lib/libssl/src/crypto/idea/idea.h b/src/lib/libssl/src/crypto/idea/idea.h index ae32f5692e..f14adf8398 100644 --- a/src/lib/libssl/src/crypto/idea/idea.h +++ b/src/lib/libssl/src/crypto/idea/idea.h | |||
| @@ -59,10 +59,6 @@ | |||
| 59 | #ifndef HEADER_IDEA_H | 59 | #ifndef HEADER_IDEA_H |
| 60 | #define HEADER_IDEA_H | 60 | #define HEADER_IDEA_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_IDEA | 62 | #ifdef NO_IDEA |
| 67 | #error IDEA is disabled. | 63 | #error IDEA is disabled. |
| 68 | #endif | 64 | #endif |
| @@ -74,22 +70,26 @@ extern "C" { | |||
| 74 | #define IDEA_BLOCK 8 | 70 | #define IDEA_BLOCK 8 |
| 75 | #define IDEA_KEY_LENGTH 16 | 71 | #define IDEA_KEY_LENGTH 16 |
| 76 | 72 | ||
| 73 | #ifdef __cplusplus | ||
| 74 | extern "C" { | ||
| 75 | #endif | ||
| 76 | |||
| 77 | typedef struct idea_key_st | 77 | typedef struct idea_key_st |
| 78 | { | 78 | { |
| 79 | IDEA_INT data[9][6]; | 79 | IDEA_INT data[9][6]; |
| 80 | } IDEA_KEY_SCHEDULE; | 80 | } IDEA_KEY_SCHEDULE; |
| 81 | 81 | ||
| 82 | const char *idea_options(void); | 82 | const char *idea_options(void); |
| 83 | void idea_ecb_encrypt(unsigned char *in, unsigned char *out, | 83 | void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, |
| 84 | IDEA_KEY_SCHEDULE *ks); | 84 | IDEA_KEY_SCHEDULE *ks); |
| 85 | void idea_set_encrypt_key(unsigned char *key, IDEA_KEY_SCHEDULE *ks); | 85 | void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); |
| 86 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); | 86 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); |
| 87 | void idea_cbc_encrypt(unsigned char *in, unsigned char *out, | 87 | void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, |
| 88 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); | 88 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); |
| 89 | void idea_cfb64_encrypt(unsigned char *in, unsigned char *out, | 89 | void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, |
| 90 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, | 90 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, |
| 91 | int *num,int enc); | 91 | int *num,int enc); |
| 92 | void idea_ofb64_encrypt(unsigned char *in, unsigned char *out, | 92 | void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, |
| 93 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); | 93 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); |
| 94 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); | 94 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); |
| 95 | #ifdef __cplusplus | 95 | #ifdef __cplusplus |
diff --git a/src/lib/libssl/src/crypto/install.com b/src/lib/libssl/src/crypto/install.com index 44cfc4e89a..ea97665471 100644 --- a/src/lib/libssl/src/crypto/install.com +++ b/src/lib/libssl/src/crypto/install.com | |||
| @@ -32,14 +32,14 @@ $ IF F$PARSE("WRK_SSLALIB:") .EQS. "" THEN - | |||
| 32 | $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - | 32 | $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - |
| 33 | CREATE/DIR/LOG WRK_SSLINCLUDE: | 33 | CREATE/DIR/LOG WRK_SSLINCLUDE: |
| 34 | $ | 34 | $ |
| 35 | $ SDIRS := ,MD2,MD5,SHA,MDC2,HMAC,RIPEMD,- | 35 | $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- |
| 36 | DES,RC2,RC4,RC5,IDEA,BF,CAST,- | 36 | DES,RC2,RC4,RC5,IDEA,BF,CAST,- |
| 37 | BN,RSA,DSA,DH,- | 37 | BN,RSA,DSA,DH,DSO,ENGINE,- |
| 38 | BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- | 38 | BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- |
| 39 | EVP,ASN1,PEM,X509,X509V3,- | 39 | EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP |
| 40 | CONF,TXT_DB,PKCS7,PKCS12,COMP | 40 | $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h |
| 41 | $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h | ||
| 42 | $ EXHEADER_MD2 := md2.h | 41 | $ EXHEADER_MD2 := md2.h |
| 42 | $ EXHEADER_MD4 := md4.h | ||
| 43 | $ EXHEADER_MD5 := md5.h | 43 | $ EXHEADER_MD5 := md5.h |
| 44 | $ EXHEADER_SHA := sha.h | 44 | $ EXHEADER_SHA := sha.h |
| 45 | $ EXHEADER_MDC2 := mdc2.h | 45 | $ EXHEADER_MDC2 := mdc2.h |
| @@ -56,19 +56,21 @@ $ EXHEADER_BN := bn.h | |||
| 56 | $ EXHEADER_RSA := rsa.h | 56 | $ EXHEADER_RSA := rsa.h |
| 57 | $ EXHEADER_DSA := dsa.h | 57 | $ EXHEADER_DSA := dsa.h |
| 58 | $ EXHEADER_DH := dh.h | 58 | $ EXHEADER_DH := dh.h |
| 59 | $ EXHEADER_DSO := dso.h | ||
| 60 | $ EXHEADER_ENGINE := engine.h | ||
| 59 | $ EXHEADER_BUFFER := buffer.h | 61 | $ EXHEADER_BUFFER := buffer.h |
| 60 | $ EXHEADER_BIO := bio.h | 62 | $ EXHEADER_BIO := bio.h |
| 61 | $ EXHEADER_STACK := stack.h,safestack.h | 63 | $ EXHEADER_STACK := stack.h,safestack.h |
| 62 | $ EXHEADER_LHASH := lhash.h | 64 | $ EXHEADER_LHASH := lhash.h |
| 63 | $ EXHEADER_RAND := rand.h | 65 | $ EXHEADER_RAND := rand.h |
| 64 | $ EXHEADER_ERR := err.h | 66 | $ EXHEADER_ERR := err.h |
| 65 | $ EXHEADER_OBJECTS := objects.h | 67 | $ EXHEADER_OBJECTS := objects.h,obj_mac.h |
| 66 | $ EXHEADER_EVP := evp.h | 68 | $ EXHEADER_EVP := evp.h |
| 67 | $ EXHEADER_ASN1 := asn1.h,asn1_mac.h | 69 | $ EXHEADER_ASN1 := asn1.h,asn1_mac.h |
| 68 | $ EXHEADER_PEM := pem.h,pem2.h | 70 | $ EXHEADER_PEM := pem.h,pem2.h |
| 69 | $ EXHEADER_X509 := x509.h,x509_vfy.h | 71 | $ EXHEADER_X509 := x509.h,x509_vfy.h |
| 70 | $ EXHEADER_X509V3 := x509v3.h | 72 | $ EXHEADER_X509V3 := x509v3.h |
| 71 | $ EXHEADER_CONF := conf.h | 73 | $ EXHEADER_CONF := conf.h,conf_api.h |
| 72 | $ EXHEADER_TXT_DB := txt_db.h | 74 | $ EXHEADER_TXT_DB := txt_db.h |
| 73 | $ EXHEADER_PKCS7 := pkcs7.h | 75 | $ EXHEADER_PKCS7 := pkcs7.h |
| 74 | $ EXHEADER_PKCS12 := pkcs12.h | 76 | $ EXHEADER_PKCS12 := pkcs12.h |
diff --git a/src/lib/libssl/src/crypto/lhash/Makefile.ssl b/src/lib/libssl/src/crypto/lhash/Makefile.ssl index eef4000460..6c3d442e22 100644 --- a/src/lib/libssl/src/crypto/lhash/Makefile.ssl +++ b/src/lib/libssl/src/crypto/lhash/Makefile.ssl | |||
| @@ -83,7 +83,9 @@ lh_stats.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | |||
| 83 | lh_stats.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 83 | lh_stats.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 84 | lh_stats.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 84 | lh_stats.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 85 | lh_stats.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 85 | lh_stats.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 86 | lh_stats.o: ../../include/openssl/stack.h ../cryptlib.h | 86 | lh_stats.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 87 | lhash.o: ../../include/openssl/crypto.h ../../include/openssl/lhash.h | 87 | lh_stats.o: ../cryptlib.h |
| 88 | lhash.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 88 | lhash.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h |
| 89 | lhash.o: ../../include/openssl/stack.h | 89 | lhash.o: ../../include/openssl/lhash.h ../../include/openssl/opensslv.h |
| 90 | lhash.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 91 | lhash.o: ../../include/openssl/symhacks.h | ||
diff --git a/src/lib/libssl/src/crypto/lhash/lh_stats.c b/src/lib/libssl/src/crypto/lhash/lh_stats.c index 80b931c12b..ee0600060e 100644 --- a/src/lib/libssl/src/crypto/lhash/lh_stats.c +++ b/src/lib/libssl/src/crypto/lhash/lh_stats.c | |||
| @@ -63,9 +63,12 @@ | |||
| 63 | * and things should work as expected */ | 63 | * and things should work as expected */ |
| 64 | #include "cryptlib.h" | 64 | #include "cryptlib.h" |
| 65 | 65 | ||
| 66 | #ifndef NO_BIO | ||
| 67 | #include <openssl/bio.h> | ||
| 68 | #endif | ||
| 66 | #include <openssl/lhash.h> | 69 | #include <openssl/lhash.h> |
| 67 | 70 | ||
| 68 | #ifndef HEADER_BIO_H | 71 | #ifdef NO_BIO |
| 69 | 72 | ||
| 70 | void lh_stats(LHASH *lh, FILE *out) | 73 | void lh_stats(LHASH *lh, FILE *out) |
| 71 | { | 74 | { |
diff --git a/src/lib/libssl/src/crypto/lhash/lh_test.c b/src/lib/libssl/src/crypto/lhash/lh_test.c index 08138b52c3..6008781e57 100644 --- a/src/lib/libssl/src/crypto/lhash/lh_test.c +++ b/src/lib/libssl/src/crypto/lhash/lh_test.c | |||
| @@ -77,7 +77,7 @@ main() | |||
| 77 | if (buf[0] == '\0') break; | 77 | if (buf[0] == '\0') break; |
| 78 | buf[256]='\0'; | 78 | buf[256]='\0'; |
| 79 | i=strlen(buf); | 79 | i=strlen(buf); |
| 80 | p=Malloc(i+1); | 80 | p=OPENSSL_malloc(i+1); |
| 81 | memcpy(p,buf,i+1); | 81 | memcpy(p,buf,i+1); |
| 82 | lh_insert(conf,p); | 82 | lh_insert(conf,p); |
| 83 | } | 83 | } |
diff --git a/src/lib/libssl/src/crypto/lhash/lhash.c b/src/lib/libssl/src/crypto/lhash/lhash.c index 7eb92a18bc..7da14620a4 100644 --- a/src/lib/libssl/src/crypto/lhash/lhash.c +++ b/src/lib/libssl/src/crypto/lhash/lhash.c | |||
| @@ -116,9 +116,9 @@ LHASH *lh_new(unsigned long (*h)(), int (*c)()) | |||
| 116 | LHASH *ret; | 116 | LHASH *ret; |
| 117 | int i; | 117 | int i; |
| 118 | 118 | ||
| 119 | if ((ret=(LHASH *)Malloc(sizeof(LHASH))) == NULL) | 119 | if ((ret=(LHASH *)OPENSSL_malloc(sizeof(LHASH))) == NULL) |
| 120 | goto err0; | 120 | goto err0; |
| 121 | if ((ret->b=(LHASH_NODE **)Malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL) | 121 | if ((ret->b=(LHASH_NODE **)OPENSSL_malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL) |
| 122 | goto err1; | 122 | goto err1; |
| 123 | for (i=0; i<MIN_NODES; i++) | 123 | for (i=0; i<MIN_NODES; i++) |
| 124 | ret->b[i]=NULL; | 124 | ret->b[i]=NULL; |
| @@ -149,7 +149,7 @@ LHASH *lh_new(unsigned long (*h)(), int (*c)()) | |||
| 149 | ret->error=0; | 149 | ret->error=0; |
| 150 | return(ret); | 150 | return(ret); |
| 151 | err1: | 151 | err1: |
| 152 | Free(ret); | 152 | OPENSSL_free(ret); |
| 153 | err0: | 153 | err0: |
| 154 | return(NULL); | 154 | return(NULL); |
| 155 | } | 155 | } |
| @@ -168,12 +168,12 @@ void lh_free(LHASH *lh) | |||
| 168 | while (n != NULL) | 168 | while (n != NULL) |
| 169 | { | 169 | { |
| 170 | nn=n->next; | 170 | nn=n->next; |
| 171 | Free(n); | 171 | OPENSSL_free(n); |
| 172 | n=nn; | 172 | n=nn; |
| 173 | } | 173 | } |
| 174 | } | 174 | } |
| 175 | Free(lh->b); | 175 | OPENSSL_free(lh->b); |
| 176 | Free(lh); | 176 | OPENSSL_free(lh); |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | void *lh_insert(LHASH *lh, void *data) | 179 | void *lh_insert(LHASH *lh, void *data) |
| @@ -190,7 +190,7 @@ void *lh_insert(LHASH *lh, void *data) | |||
| 190 | 190 | ||
| 191 | if (*rn == NULL) | 191 | if (*rn == NULL) |
| 192 | { | 192 | { |
| 193 | if ((nn=(LHASH_NODE *)Malloc(sizeof(LHASH_NODE))) == NULL) | 193 | if ((nn=(LHASH_NODE *)OPENSSL_malloc(sizeof(LHASH_NODE))) == NULL) |
| 194 | { | 194 | { |
| 195 | lh->error++; | 195 | lh->error++; |
| 196 | return(NULL); | 196 | return(NULL); |
| @@ -233,7 +233,7 @@ void *lh_delete(LHASH *lh, void *data) | |||
| 233 | nn= *rn; | 233 | nn= *rn; |
| 234 | *rn=nn->next; | 234 | *rn=nn->next; |
| 235 | ret=nn->data; | 235 | ret=nn->data; |
| 236 | Free(nn); | 236 | OPENSSL_free(nn); |
| 237 | lh->num_delete++; | 237 | lh->num_delete++; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| @@ -329,7 +329,7 @@ static void expand(LHASH *lh) | |||
| 329 | if ((lh->p) >= lh->pmax) | 329 | if ((lh->p) >= lh->pmax) |
| 330 | { | 330 | { |
| 331 | j=(int)lh->num_alloc_nodes*2; | 331 | j=(int)lh->num_alloc_nodes*2; |
| 332 | n=(LHASH_NODE **)Realloc(lh->b, | 332 | n=(LHASH_NODE **)OPENSSL_realloc(lh->b, |
| 333 | (unsigned int)sizeof(LHASH_NODE *)*j); | 333 | (unsigned int)sizeof(LHASH_NODE *)*j); |
| 334 | if (n == NULL) | 334 | if (n == NULL) |
| 335 | { | 335 | { |
| @@ -357,7 +357,7 @@ static void contract(LHASH *lh) | |||
| 357 | lh->b[lh->p+lh->pmax-1]=NULL; /* 24/07-92 - eay - weird but :-( */ | 357 | lh->b[lh->p+lh->pmax-1]=NULL; /* 24/07-92 - eay - weird but :-( */ |
| 358 | if (lh->p == 0) | 358 | if (lh->p == 0) |
| 359 | { | 359 | { |
| 360 | n=(LHASH_NODE **)Realloc(lh->b, | 360 | n=(LHASH_NODE **)OPENSSL_realloc(lh->b, |
| 361 | (unsigned int)(sizeof(LHASH_NODE *)*lh->pmax)); | 361 | (unsigned int)(sizeof(LHASH_NODE *)*lh->pmax)); |
| 362 | if (n == NULL) | 362 | if (n == NULL) |
| 363 | { | 363 | { |
diff --git a/src/lib/libssl/src/crypto/lhash/lhash.h b/src/lib/libssl/src/crypto/lhash/lhash.h index d315fd9c6d..b8ff021906 100644 --- a/src/lib/libssl/src/crypto/lhash/lhash.h +++ b/src/lib/libssl/src/crypto/lhash/lhash.h | |||
| @@ -63,14 +63,18 @@ | |||
| 63 | #ifndef HEADER_LHASH_H | 63 | #ifndef HEADER_LHASH_H |
| 64 | #define HEADER_LHASH_H | 64 | #define HEADER_LHASH_H |
| 65 | 65 | ||
| 66 | #ifdef __cplusplus | ||
| 67 | extern "C" { | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #ifndef NO_FP_API | 66 | #ifndef NO_FP_API |
| 71 | #include <stdio.h> | 67 | #include <stdio.h> |
| 72 | #endif | 68 | #endif |
| 73 | 69 | ||
| 70 | #ifndef NO_BIO | ||
| 71 | #include <openssl/bio.h> | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #ifdef __cplusplus | ||
| 75 | extern "C" { | ||
| 76 | #endif | ||
| 77 | |||
| 74 | typedef struct lhash_node_st | 78 | typedef struct lhash_node_st |
| 75 | { | 79 | { |
| 76 | void *data; | 80 | void *data; |
| @@ -132,7 +136,7 @@ void lh_node_stats(LHASH *lh, FILE *out); | |||
| 132 | void lh_node_usage_stats(LHASH *lh, FILE *out); | 136 | void lh_node_usage_stats(LHASH *lh, FILE *out); |
| 133 | #endif | 137 | #endif |
| 134 | 138 | ||
| 135 | #ifdef HEADER_BIO_H | 139 | #ifndef NO_BIO |
| 136 | void lh_stats_bio(LHASH *lh, BIO *out); | 140 | void lh_stats_bio(LHASH *lh, BIO *out); |
| 137 | void lh_node_stats_bio(LHASH *lh, BIO *out); | 141 | void lh_node_stats_bio(LHASH *lh, BIO *out); |
| 138 | void lh_node_usage_stats_bio(LHASH *lh, BIO *out); | 142 | void lh_node_usage_stats_bio(LHASH *lh, BIO *out); |
diff --git a/src/lib/libssl/src/crypto/md2/Makefile.ssl b/src/lib/libssl/src/crypto/md2/Makefile.ssl index eab615a5be..d46c73a9b9 100644 --- a/src/lib/libssl/src/crypto/md2/Makefile.ssl +++ b/src/lib/libssl/src/crypto/md2/Makefile.ssl | |||
| @@ -83,6 +83,7 @@ md2_dgst.o: ../../include/openssl/opensslv.h | |||
| 83 | md2_one.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 83 | md2_one.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 84 | md2_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 84 | md2_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 85 | md2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 85 | md2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 86 | md2_one.o: ../../include/openssl/md2.h ../../include/openssl/opensslconf.h | 86 | md2_one.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 87 | md2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 87 | md2_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 88 | md2_one.o: ../../include/openssl/stack.h ../cryptlib.h | 88 | md2_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 89 | md2_one.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
diff --git a/src/lib/libssl/src/crypto/md2/md2.h b/src/lib/libssl/src/crypto/md2/md2.h index 582bffb859..a00bd162b3 100644 --- a/src/lib/libssl/src/crypto/md2/md2.h +++ b/src/lib/libssl/src/crypto/md2/md2.h | |||
| @@ -59,10 +59,6 @@ | |||
| 59 | #ifndef HEADER_MD2_H | 59 | #ifndef HEADER_MD2_H |
| 60 | #define HEADER_MD2_H | 60 | #define HEADER_MD2_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_MD2 | 62 | #ifdef NO_MD2 |
| 67 | #error MD2 is disabled. | 63 | #error MD2 is disabled. |
| 68 | #endif | 64 | #endif |
| @@ -71,6 +67,10 @@ extern "C" { | |||
| 71 | #define MD2_BLOCK 16 | 67 | #define MD2_BLOCK 16 |
| 72 | #include <openssl/opensslconf.h> /* MD2_INT */ | 68 | #include <openssl/opensslconf.h> /* MD2_INT */ |
| 73 | 69 | ||
| 70 | #ifdef __cplusplus | ||
| 71 | extern "C" { | ||
| 72 | #endif | ||
| 73 | |||
| 74 | typedef struct MD2state_st | 74 | typedef struct MD2state_st |
| 75 | { | 75 | { |
| 76 | int num; | 76 | int num; |
diff --git a/src/lib/libssl/src/crypto/md4/Makefile.ssl b/src/lib/libssl/src/crypto/md4/Makefile.ssl new file mode 100644 index 0000000000..5341bf5b46 --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/Makefile.ssl | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/md4/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= md4 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | CPP= $(CC) -E | ||
| 9 | INCLUDES= | ||
| 10 | CFLAG=-g | ||
| 11 | INSTALL_PREFIX= | ||
| 12 | OPENSSLDIR= /usr/local/ssl | ||
| 13 | INSTALLTOP=/usr/local/ssl | ||
| 14 | MAKE= make -f Makefile.ssl | ||
| 15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) | ||
| 16 | MAKEFILE= Makefile.ssl | ||
| 17 | AR= ar r | ||
| 18 | |||
| 19 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 20 | |||
| 21 | GENERAL=Makefile | ||
| 22 | TEST=md4test.c | ||
| 23 | APPS=md4.c | ||
| 24 | |||
| 25 | LIB=$(TOP)/libcrypto.a | ||
| 26 | LIBSRC=md4_dgst.c md4_one.c | ||
| 27 | LIBOBJ=md4_dgst.o md4_one.o | ||
| 28 | |||
| 29 | SRC= $(LIBSRC) | ||
| 30 | |||
| 31 | EXHEADER= md4.h | ||
| 32 | HEADER= md4_locl.h $(EXHEADER) | ||
| 33 | |||
| 34 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 35 | |||
| 36 | top: | ||
| 37 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 38 | |||
| 39 | all: lib | ||
| 40 | |||
| 41 | lib: $(LIBOBJ) | ||
| 42 | $(AR) $(LIB) $(LIBOBJ) | ||
| 43 | $(RANLIB) $(LIB) | ||
| 44 | @touch lib | ||
| 45 | |||
| 46 | files: | ||
| 47 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 48 | |||
| 49 | links: | ||
| 50 | @$(TOP)/util/point.sh Makefile.ssl Makefile | ||
| 51 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
| 52 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
| 53 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
| 54 | |||
| 55 | install: | ||
| 56 | @for i in $(EXHEADER) ; \ | ||
| 57 | do \ | ||
| 58 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 59 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 60 | done; | ||
| 61 | |||
| 62 | tags: | ||
| 63 | ctags $(SRC) | ||
| 64 | |||
| 65 | tests: | ||
| 66 | |||
| 67 | lint: | ||
| 68 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 69 | |||
| 70 | depend: | ||
| 71 | $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) | ||
| 72 | |||
| 73 | dclean: | ||
| 74 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 75 | mv -f Makefile.new $(MAKEFILE) | ||
| 76 | |||
| 77 | clean: | ||
| 78 | rm -f asm/mx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 81 | |||
| 82 | md4_dgst.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h | ||
| 83 | md4_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md4_locl.h | ||
| 84 | md4_one.o: ../../include/openssl/md4.h | ||
diff --git a/src/lib/libssl/src/crypto/md4/md4.c b/src/lib/libssl/src/crypto/md4/md4.c new file mode 100644 index 0000000000..e4b0aac011 --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/md4.c | |||
| @@ -0,0 +1,127 @@ | |||
| 1 | /* crypto/md4/md4.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <stdlib.h> | ||
| 61 | #include <openssl/md4.h> | ||
| 62 | |||
| 63 | #define BUFSIZE 1024*16 | ||
| 64 | |||
| 65 | void do_fp(FILE *f); | ||
| 66 | void pt(unsigned char *md); | ||
| 67 | #ifndef _OSD_POSIX | ||
| 68 | int read(int, void *, unsigned int); | ||
| 69 | #endif | ||
| 70 | |||
| 71 | int main(int argc, char **argv) | ||
| 72 | { | ||
| 73 | int i,err=0; | ||
| 74 | FILE *IN; | ||
| 75 | |||
| 76 | if (argc == 1) | ||
| 77 | { | ||
| 78 | do_fp(stdin); | ||
| 79 | } | ||
| 80 | else | ||
| 81 | { | ||
| 82 | for (i=1; i<argc; i++) | ||
| 83 | { | ||
| 84 | IN=fopen(argv[i],"r"); | ||
| 85 | if (IN == NULL) | ||
| 86 | { | ||
| 87 | perror(argv[i]); | ||
| 88 | err++; | ||
| 89 | continue; | ||
| 90 | } | ||
| 91 | printf("MD4(%s)= ",argv[i]); | ||
| 92 | do_fp(IN); | ||
| 93 | fclose(IN); | ||
| 94 | } | ||
| 95 | } | ||
| 96 | exit(err); | ||
| 97 | } | ||
| 98 | |||
| 99 | void do_fp(FILE *f) | ||
| 100 | { | ||
| 101 | MD4_CTX c; | ||
| 102 | unsigned char md[MD4_DIGEST_LENGTH]; | ||
| 103 | int fd; | ||
| 104 | int i; | ||
| 105 | static unsigned char buf[BUFSIZE]; | ||
| 106 | |||
| 107 | fd=fileno(f); | ||
| 108 | MD4_Init(&c); | ||
| 109 | for (;;) | ||
| 110 | { | ||
| 111 | i=read(fd,buf,BUFSIZE); | ||
| 112 | if (i <= 0) break; | ||
| 113 | MD4_Update(&c,buf,(unsigned long)i); | ||
| 114 | } | ||
| 115 | MD4_Final(&(md[0]),&c); | ||
| 116 | pt(md); | ||
| 117 | } | ||
| 118 | |||
| 119 | void pt(unsigned char *md) | ||
| 120 | { | ||
| 121 | int i; | ||
| 122 | |||
| 123 | for (i=0; i<MD4_DIGEST_LENGTH; i++) | ||
| 124 | printf("%02x",md[i]); | ||
| 125 | printf("\n"); | ||
| 126 | } | ||
| 127 | |||
diff --git a/src/lib/libssl/src/crypto/md4/md4.h b/src/lib/libssl/src/crypto/md4/md4.h new file mode 100644 index 0000000000..c794e186db --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/md4.h | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | /* crypto/md4/md4.h */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_MD4_H | ||
| 60 | #define HEADER_MD4_H | ||
| 61 | |||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_MD4 | ||
| 67 | #error MD4 is disabled. | ||
| 68 | #endif | ||
| 69 | |||
| 70 | /* | ||
| 71 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 72 | * ! MD4_LONG has to be at least 32 bits wide. If it's wider, then ! | ||
| 73 | * ! MD4_LONG_LOG2 has to be defined along. ! | ||
| 74 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 75 | */ | ||
| 76 | |||
| 77 | #if defined(WIN16) || defined(__LP32__) | ||
| 78 | #define MD4_LONG unsigned long | ||
| 79 | #elif defined(_CRAY) || defined(__ILP64__) | ||
| 80 | #define MD4_LONG unsigned long | ||
| 81 | #define MD4_LONG_LOG2 3 | ||
| 82 | /* | ||
| 83 | * _CRAY note. I could declare short, but I have no idea what impact | ||
| 84 | * does it have on performance on none-T3E machines. I could declare | ||
| 85 | * int, but at least on C90 sizeof(int) can be chosen at compile time. | ||
| 86 | * So I've chosen long... | ||
| 87 | * <appro@fy.chalmers.se> | ||
| 88 | */ | ||
| 89 | #else | ||
| 90 | #define MD4_LONG unsigned int | ||
| 91 | #endif | ||
| 92 | |||
| 93 | #define MD4_CBLOCK 64 | ||
| 94 | #define MD4_LBLOCK (MD4_CBLOCK/4) | ||
| 95 | #define MD4_DIGEST_LENGTH 16 | ||
| 96 | |||
| 97 | typedef struct MD4state_st | ||
| 98 | { | ||
| 99 | MD4_LONG A,B,C,D; | ||
| 100 | MD4_LONG Nl,Nh; | ||
| 101 | MD4_LONG data[MD4_LBLOCK]; | ||
| 102 | int num; | ||
| 103 | } MD4_CTX; | ||
| 104 | |||
| 105 | void MD4_Init(MD4_CTX *c); | ||
| 106 | void MD4_Update(MD4_CTX *c, const void *data, unsigned long len); | ||
| 107 | void MD4_Final(unsigned char *md, MD4_CTX *c); | ||
| 108 | unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md); | ||
| 109 | void MD4_Transform(MD4_CTX *c, const unsigned char *b); | ||
| 110 | #ifdef __cplusplus | ||
| 111 | } | ||
| 112 | #endif | ||
| 113 | |||
| 114 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/md4/md4_dgst.c b/src/lib/libssl/src/crypto/md4/md4_dgst.c new file mode 100644 index 0000000000..81488ae2e2 --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/md4_dgst.c | |||
| @@ -0,0 +1,285 @@ | |||
| 1 | /* crypto/md4/md4_dgst.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "md4_locl.h" | ||
| 61 | #include <openssl/opensslv.h> | ||
| 62 | |||
| 63 | const char *MD4_version="MD4" OPENSSL_VERSION_PTEXT; | ||
| 64 | |||
| 65 | /* Implemented from RFC1186 The MD4 Message-Digest Algorithm | ||
| 66 | */ | ||
| 67 | |||
| 68 | #define INIT_DATA_A (unsigned long)0x67452301L | ||
| 69 | #define INIT_DATA_B (unsigned long)0xefcdab89L | ||
| 70 | #define INIT_DATA_C (unsigned long)0x98badcfeL | ||
| 71 | #define INIT_DATA_D (unsigned long)0x10325476L | ||
| 72 | |||
| 73 | void MD4_Init(MD4_CTX *c) | ||
| 74 | { | ||
| 75 | c->A=INIT_DATA_A; | ||
| 76 | c->B=INIT_DATA_B; | ||
| 77 | c->C=INIT_DATA_C; | ||
| 78 | c->D=INIT_DATA_D; | ||
| 79 | c->Nl=0; | ||
| 80 | c->Nh=0; | ||
| 81 | c->num=0; | ||
| 82 | } | ||
| 83 | |||
| 84 | #ifndef md4_block_host_order | ||
| 85 | void md4_block_host_order (MD4_CTX *c, const void *data, int num) | ||
| 86 | { | ||
| 87 | const MD4_LONG *X=data; | ||
| 88 | register unsigned long A,B,C,D; | ||
| 89 | /* | ||
| 90 | * In case you wonder why A-D are declared as long and not | ||
| 91 | * as MD4_LONG. Doing so results in slight performance | ||
| 92 | * boost on LP64 architectures. The catch is we don't | ||
| 93 | * really care if 32 MSBs of a 64-bit register get polluted | ||
| 94 | * with eventual overflows as we *save* only 32 LSBs in | ||
| 95 | * *either* case. Now declaring 'em long excuses the compiler | ||
| 96 | * from keeping 32 MSBs zeroed resulting in 13% performance | ||
| 97 | * improvement under SPARC Solaris7/64 and 5% under AlphaLinux. | ||
| 98 | * Well, to be honest it should say that this *prevents* | ||
| 99 | * performance degradation. | ||
| 100 | * | ||
| 101 | * <appro@fy.chalmers.se> | ||
| 102 | */ | ||
| 103 | |||
| 104 | A=c->A; | ||
| 105 | B=c->B; | ||
| 106 | C=c->C; | ||
| 107 | D=c->D; | ||
| 108 | |||
| 109 | for (;num--;X+=HASH_LBLOCK) | ||
| 110 | { | ||
| 111 | /* Round 0 */ | ||
| 112 | R0(A,B,C,D,X[ 0], 3,0); | ||
| 113 | R0(D,A,B,C,X[ 1], 7,0); | ||
| 114 | R0(C,D,A,B,X[ 2],11,0); | ||
| 115 | R0(B,C,D,A,X[ 3],19,0); | ||
| 116 | R0(A,B,C,D,X[ 4], 3,0); | ||
| 117 | R0(D,A,B,C,X[ 5], 7,0); | ||
| 118 | R0(C,D,A,B,X[ 6],11,0); | ||
| 119 | R0(B,C,D,A,X[ 7],19,0); | ||
| 120 | R0(A,B,C,D,X[ 8], 3,0); | ||
| 121 | R0(D,A,B,C,X[ 9], 7,0); | ||
| 122 | R0(C,D,A,B,X[10],11,0); | ||
| 123 | R0(B,C,D,A,X[11],19,0); | ||
| 124 | R0(A,B,C,D,X[12], 3,0); | ||
| 125 | R0(D,A,B,C,X[13], 7,0); | ||
| 126 | R0(C,D,A,B,X[14],11,0); | ||
| 127 | R0(B,C,D,A,X[15],19,0); | ||
| 128 | /* Round 1 */ | ||
| 129 | R1(A,B,C,D,X[ 0], 3,0x5A827999L); | ||
| 130 | R1(D,A,B,C,X[ 4], 5,0x5A827999L); | ||
| 131 | R1(C,D,A,B,X[ 8], 9,0x5A827999L); | ||
| 132 | R1(B,C,D,A,X[12],13,0x5A827999L); | ||
| 133 | R1(A,B,C,D,X[ 1], 3,0x5A827999L); | ||
| 134 | R1(D,A,B,C,X[ 5], 5,0x5A827999L); | ||
| 135 | R1(C,D,A,B,X[ 9], 9,0x5A827999L); | ||
| 136 | R1(B,C,D,A,X[13],13,0x5A827999L); | ||
| 137 | R1(A,B,C,D,X[ 2], 3,0x5A827999L); | ||
| 138 | R1(D,A,B,C,X[ 6], 5,0x5A827999L); | ||
| 139 | R1(C,D,A,B,X[10], 9,0x5A827999L); | ||
| 140 | R1(B,C,D,A,X[14],13,0x5A827999L); | ||
| 141 | R1(A,B,C,D,X[ 3], 3,0x5A827999L); | ||
| 142 | R1(D,A,B,C,X[ 7], 5,0x5A827999L); | ||
| 143 | R1(C,D,A,B,X[11], 9,0x5A827999L); | ||
| 144 | R1(B,C,D,A,X[15],13,0x5A827999L); | ||
| 145 | /* Round 2 */ | ||
| 146 | R2(A,B,C,D,X[ 0], 3,0x6ED9EBA1); | ||
| 147 | R2(D,A,B,C,X[ 8], 9,0x6ED9EBA1); | ||
| 148 | R2(C,D,A,B,X[ 4],11,0x6ED9EBA1); | ||
| 149 | R2(B,C,D,A,X[12],15,0x6ED9EBA1); | ||
| 150 | R2(A,B,C,D,X[ 2], 3,0x6ED9EBA1); | ||
| 151 | R2(D,A,B,C,X[10], 9,0x6ED9EBA1); | ||
| 152 | R2(C,D,A,B,X[ 6],11,0x6ED9EBA1); | ||
| 153 | R2(B,C,D,A,X[14],15,0x6ED9EBA1); | ||
| 154 | R2(A,B,C,D,X[ 1], 3,0x6ED9EBA1); | ||
| 155 | R2(D,A,B,C,X[ 9], 9,0x6ED9EBA1); | ||
| 156 | R2(C,D,A,B,X[ 5],11,0x6ED9EBA1); | ||
| 157 | R2(B,C,D,A,X[13],15,0x6ED9EBA1); | ||
| 158 | R2(A,B,C,D,X[ 3], 3,0x6ED9EBA1); | ||
| 159 | R2(D,A,B,C,X[11], 9,0x6ED9EBA1); | ||
| 160 | R2(C,D,A,B,X[ 7],11,0x6ED9EBA1); | ||
| 161 | R2(B,C,D,A,X[15],15,0x6ED9EBA1); | ||
| 162 | |||
| 163 | A = c->A += A; | ||
| 164 | B = c->B += B; | ||
| 165 | C = c->C += C; | ||
| 166 | D = c->D += D; | ||
| 167 | } | ||
| 168 | } | ||
| 169 | #endif | ||
| 170 | |||
| 171 | #ifndef md4_block_data_order | ||
| 172 | #ifdef X | ||
| 173 | #undef X | ||
| 174 | #endif | ||
| 175 | void md4_block_data_order (MD4_CTX *c, const void *data_, int num) | ||
| 176 | { | ||
| 177 | const unsigned char *data=data_; | ||
| 178 | register unsigned long A,B,C,D,l; | ||
| 179 | /* | ||
| 180 | * In case you wonder why A-D are declared as long and not | ||
| 181 | * as MD4_LONG. Doing so results in slight performance | ||
| 182 | * boost on LP64 architectures. The catch is we don't | ||
| 183 | * really care if 32 MSBs of a 64-bit register get polluted | ||
| 184 | * with eventual overflows as we *save* only 32 LSBs in | ||
| 185 | * *either* case. Now declaring 'em long excuses the compiler | ||
| 186 | * from keeping 32 MSBs zeroed resulting in 13% performance | ||
| 187 | * improvement under SPARC Solaris7/64 and 5% under AlphaLinux. | ||
| 188 | * Well, to be honest it should say that this *prevents* | ||
| 189 | * performance degradation. | ||
| 190 | * | ||
| 191 | * <appro@fy.chalmers.se> | ||
| 192 | */ | ||
| 193 | #ifndef MD32_XARRAY | ||
| 194 | /* See comment in crypto/sha/sha_locl.h for details. */ | ||
| 195 | unsigned long XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7, | ||
| 196 | XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15; | ||
| 197 | # define X(i) XX##i | ||
| 198 | #else | ||
| 199 | MD4_LONG XX[MD4_LBLOCK]; | ||
| 200 | # define X(i) XX[i] | ||
| 201 | #endif | ||
| 202 | |||
| 203 | A=c->A; | ||
| 204 | B=c->B; | ||
| 205 | C=c->C; | ||
| 206 | D=c->D; | ||
| 207 | |||
| 208 | for (;num--;) | ||
| 209 | { | ||
| 210 | HOST_c2l(data,l); X( 0)=l; HOST_c2l(data,l); X( 1)=l; | ||
| 211 | /* Round 0 */ | ||
| 212 | R0(A,B,C,D,X( 0), 3,0); HOST_c2l(data,l); X( 2)=l; | ||
| 213 | R0(D,A,B,C,X( 1), 7,0); HOST_c2l(data,l); X( 3)=l; | ||
| 214 | R0(C,D,A,B,X( 2),11,0); HOST_c2l(data,l); X( 4)=l; | ||
| 215 | R0(B,C,D,A,X( 3),19,0); HOST_c2l(data,l); X( 5)=l; | ||
| 216 | R0(A,B,C,D,X( 4), 3,0); HOST_c2l(data,l); X( 6)=l; | ||
| 217 | R0(D,A,B,C,X( 5), 7,0); HOST_c2l(data,l); X( 7)=l; | ||
| 218 | R0(C,D,A,B,X( 6),11,0); HOST_c2l(data,l); X( 8)=l; | ||
| 219 | R0(B,C,D,A,X( 7),19,0); HOST_c2l(data,l); X( 9)=l; | ||
| 220 | R0(A,B,C,D,X( 8), 3,0); HOST_c2l(data,l); X(10)=l; | ||
| 221 | R0(D,A,B,C,X( 9), 7,0); HOST_c2l(data,l); X(11)=l; | ||
| 222 | R0(C,D,A,B,X(10),11,0); HOST_c2l(data,l); X(12)=l; | ||
| 223 | R0(B,C,D,A,X(11),19,0); HOST_c2l(data,l); X(13)=l; | ||
| 224 | R0(A,B,C,D,X(12), 3,0); HOST_c2l(data,l); X(14)=l; | ||
| 225 | R0(D,A,B,C,X(13), 7,0); HOST_c2l(data,l); X(15)=l; | ||
| 226 | R0(C,D,A,B,X(14),11,0); | ||
| 227 | R0(B,C,D,A,X(15),19,0); | ||
| 228 | /* Round 1 */ | ||
| 229 | R1(A,B,C,D,X( 0), 3,0x5A827999L); | ||
| 230 | R1(D,A,B,C,X( 4), 5,0x5A827999L); | ||
| 231 | R1(C,D,A,B,X( 8), 9,0x5A827999L); | ||
| 232 | R1(B,C,D,A,X(12),13,0x5A827999L); | ||
| 233 | R1(A,B,C,D,X( 1), 3,0x5A827999L); | ||
| 234 | R1(D,A,B,C,X( 5), 5,0x5A827999L); | ||
| 235 | R1(C,D,A,B,X( 9), 9,0x5A827999L); | ||
| 236 | R1(B,C,D,A,X(13),13,0x5A827999L); | ||
| 237 | R1(A,B,C,D,X( 2), 3,0x5A827999L); | ||
| 238 | R1(D,A,B,C,X( 6), 5,0x5A827999L); | ||
| 239 | R1(C,D,A,B,X(10), 9,0x5A827999L); | ||
| 240 | R1(B,C,D,A,X(14),13,0x5A827999L); | ||
| 241 | R1(A,B,C,D,X( 3), 3,0x5A827999L); | ||
| 242 | R1(D,A,B,C,X( 7), 5,0x5A827999L); | ||
| 243 | R1(C,D,A,B,X(11), 9,0x5A827999L); | ||
| 244 | R1(B,C,D,A,X(15),13,0x5A827999L); | ||
| 245 | /* Round 2 */ | ||
| 246 | R2(A,B,C,D,X( 0), 3,0x6ED9EBA1L); | ||
| 247 | R2(D,A,B,C,X( 8), 9,0x6ED9EBA1L); | ||
| 248 | R2(C,D,A,B,X( 4),11,0x6ED9EBA1L); | ||
| 249 | R2(B,C,D,A,X(12),15,0x6ED9EBA1L); | ||
| 250 | R2(A,B,C,D,X( 2), 3,0x6ED9EBA1L); | ||
| 251 | R2(D,A,B,C,X(10), 9,0x6ED9EBA1L); | ||
| 252 | R2(C,D,A,B,X( 6),11,0x6ED9EBA1L); | ||
| 253 | R2(B,C,D,A,X(14),15,0x6ED9EBA1L); | ||
| 254 | R2(A,B,C,D,X( 1), 3,0x6ED9EBA1L); | ||
| 255 | R2(D,A,B,C,X( 9), 9,0x6ED9EBA1L); | ||
| 256 | R2(C,D,A,B,X( 5),11,0x6ED9EBA1L); | ||
| 257 | R2(B,C,D,A,X(13),15,0x6ED9EBA1L); | ||
| 258 | R2(A,B,C,D,X( 3), 3,0x6ED9EBA1L); | ||
| 259 | R2(D,A,B,C,X(11), 9,0x6ED9EBA1L); | ||
| 260 | R2(C,D,A,B,X( 7),11,0x6ED9EBA1L); | ||
| 261 | R2(B,C,D,A,X(15),15,0x6ED9EBA1L); | ||
| 262 | |||
| 263 | A = c->A += A; | ||
| 264 | B = c->B += B; | ||
| 265 | C = c->C += C; | ||
| 266 | D = c->D += D; | ||
| 267 | } | ||
| 268 | } | ||
| 269 | #endif | ||
| 270 | |||
| 271 | #ifdef undef | ||
| 272 | int printit(unsigned long *l) | ||
| 273 | { | ||
| 274 | int i,ii; | ||
| 275 | |||
| 276 | for (i=0; i<2; i++) | ||
| 277 | { | ||
| 278 | for (ii=0; ii<8; ii++) | ||
| 279 | { | ||
| 280 | fprintf(stderr,"%08lx ",l[i*8+ii]); | ||
| 281 | } | ||
| 282 | fprintf(stderr,"\n"); | ||
| 283 | } | ||
| 284 | } | ||
| 285 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/md4/md4_locl.h b/src/lib/libssl/src/crypto/md4/md4_locl.h new file mode 100644 index 0000000000..0a2b39018d --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/md4_locl.h | |||
| @@ -0,0 +1,154 @@ | |||
| 1 | /* crypto/md4/md4_locl.h */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdlib.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <openssl/opensslconf.h> | ||
| 62 | #include <openssl/md4.h> | ||
| 63 | |||
| 64 | #ifndef MD4_LONG_LOG2 | ||
| 65 | #define MD4_LONG_LOG2 2 /* default to 32 bits */ | ||
| 66 | #endif | ||
| 67 | |||
| 68 | void md4_block_host_order (MD4_CTX *c, const void *p,int num); | ||
| 69 | void md4_block_data_order (MD4_CTX *c, const void *p,int num); | ||
| 70 | |||
| 71 | #if defined(__i386) || defined(_M_IX86) || defined(__INTEL__) | ||
| 72 | /* | ||
| 73 | * *_block_host_order is expected to handle aligned data while | ||
| 74 | * *_block_data_order - unaligned. As algorithm and host (x86) | ||
| 75 | * are in this case of the same "endianness" these two are | ||
| 76 | * otherwise indistinguishable. But normally you don't want to | ||
| 77 | * call the same function because unaligned access in places | ||
| 78 | * where alignment is expected is usually a "Bad Thing". Indeed, | ||
| 79 | * on RISCs you get punished with BUS ERROR signal or *severe* | ||
| 80 | * performance degradation. Intel CPUs are in turn perfectly | ||
| 81 | * capable of loading unaligned data without such drastic side | ||
| 82 | * effect. Yes, they say it's slower than aligned load, but no | ||
| 83 | * exception is generated and therefore performance degradation | ||
| 84 | * is *incomparable* with RISCs. What we should weight here is | ||
| 85 | * costs of unaligned access against costs of aligning data. | ||
| 86 | * According to my measurements allowing unaligned access results | ||
| 87 | * in ~9% performance improvement on Pentium II operating at | ||
| 88 | * 266MHz. I won't be surprised if the difference will be higher | ||
| 89 | * on faster systems:-) | ||
| 90 | * | ||
| 91 | * <appro@fy.chalmers.se> | ||
| 92 | */ | ||
| 93 | #define md4_block_data_order md4_block_host_order | ||
| 94 | #endif | ||
| 95 | |||
| 96 | #define DATA_ORDER_IS_LITTLE_ENDIAN | ||
| 97 | |||
| 98 | #define HASH_LONG MD4_LONG | ||
| 99 | #define HASH_LONG_LOG2 MD4_LONG_LOG2 | ||
| 100 | #define HASH_CTX MD4_CTX | ||
| 101 | #define HASH_CBLOCK MD4_CBLOCK | ||
| 102 | #define HASH_LBLOCK MD4_LBLOCK | ||
| 103 | #define HASH_UPDATE MD4_Update | ||
| 104 | #define HASH_TRANSFORM MD4_Transform | ||
| 105 | #define HASH_FINAL MD4_Final | ||
| 106 | #define HASH_MAKE_STRING(c,s) do { \ | ||
| 107 | unsigned long ll; \ | ||
| 108 | ll=(c)->A; HOST_l2c(ll,(s)); \ | ||
| 109 | ll=(c)->B; HOST_l2c(ll,(s)); \ | ||
| 110 | ll=(c)->C; HOST_l2c(ll,(s)); \ | ||
| 111 | ll=(c)->D; HOST_l2c(ll,(s)); \ | ||
| 112 | } while (0) | ||
| 113 | #define HASH_BLOCK_HOST_ORDER md4_block_host_order | ||
| 114 | #if !defined(L_ENDIAN) || defined(md4_block_data_order) | ||
| 115 | #define HASH_BLOCK_DATA_ORDER md4_block_data_order | ||
| 116 | /* | ||
| 117 | * Little-endians (Intel and Alpha) feel better without this. | ||
| 118 | * It looks like memcpy does better job than generic | ||
| 119 | * md4_block_data_order on copying-n-aligning input data. | ||
| 120 | * But frankly speaking I didn't expect such result on Alpha. | ||
| 121 | * On the other hand I've got this with egcs-1.0.2 and if | ||
| 122 | * program is compiled with another (better?) compiler it | ||
| 123 | * might turn out other way around. | ||
| 124 | * | ||
| 125 | * <appro@fy.chalmers.se> | ||
| 126 | */ | ||
| 127 | #endif | ||
| 128 | |||
| 129 | #include "md32_common.h" | ||
| 130 | |||
| 131 | /* | ||
| 132 | #define F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) | ||
| 133 | #define G(x,y,z) (((x) & (y)) | ((x) & ((z))) | ((y) & ((z)))) | ||
| 134 | */ | ||
| 135 | |||
| 136 | /* As pointed out by Wei Dai <weidai@eskimo.com>, the above can be | ||
| 137 | * simplified to the code below. Wei attributes these optimizations | ||
| 138 | * to Peter Gutmann's SHS code, and he attributes it to Rich Schroeppel. | ||
| 139 | */ | ||
| 140 | #define F(b,c,d) ((((c) ^ (d)) & (b)) ^ (d)) | ||
| 141 | #define G(b,c,d) (((b) & (c)) | ((b) & (d)) | ((c) & (d))) | ||
| 142 | #define H(b,c,d) ((b) ^ (c) ^ (d)) | ||
| 143 | |||
| 144 | #define R0(a,b,c,d,k,s,t) { \ | ||
| 145 | a+=((k)+(t)+F((b),(c),(d))); \ | ||
| 146 | a=ROTATE(a,s); }; | ||
| 147 | |||
| 148 | #define R1(a,b,c,d,k,s,t) { \ | ||
| 149 | a+=((k)+(t)+G((b),(c),(d))); \ | ||
| 150 | a=ROTATE(a,s); };\ | ||
| 151 | |||
| 152 | #define R2(a,b,c,d,k,s,t) { \ | ||
| 153 | a+=((k)+(t)+H((b),(c),(d))); \ | ||
| 154 | a=ROTATE(a,s); }; | ||
diff --git a/src/lib/libssl/src/crypto/md4/md4_one.c b/src/lib/libssl/src/crypto/md4/md4_one.c new file mode 100644 index 0000000000..87a995d38d --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/md4_one.c | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | /* crypto/md4/md4_one.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <openssl/md4.h> | ||
| 62 | |||
| 63 | #ifdef CHARSET_EBCDIC | ||
| 64 | #include <openssl/ebcdic.h> | ||
| 65 | #endif | ||
| 66 | |||
| 67 | unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md) | ||
| 68 | { | ||
| 69 | MD4_CTX c; | ||
| 70 | static unsigned char m[MD4_DIGEST_LENGTH]; | ||
| 71 | |||
| 72 | if (md == NULL) md=m; | ||
| 73 | MD4_Init(&c); | ||
| 74 | #ifndef CHARSET_EBCDIC | ||
| 75 | MD4_Update(&c,d,n); | ||
| 76 | #else | ||
| 77 | { | ||
| 78 | char temp[1024]; | ||
| 79 | unsigned long chunk; | ||
| 80 | |||
| 81 | while (n > 0) | ||
| 82 | { | ||
| 83 | chunk = (n > sizeof(temp)) ? sizeof(temp) : n; | ||
| 84 | ebcdic2ascii(temp, d, chunk); | ||
| 85 | MD4_Update(&c,temp,chunk); | ||
| 86 | n -= chunk; | ||
| 87 | d += chunk; | ||
| 88 | } | ||
| 89 | } | ||
| 90 | #endif | ||
| 91 | MD4_Final(md,&c); | ||
| 92 | memset(&c,0,sizeof(c)); /* security consideration */ | ||
| 93 | return(md); | ||
| 94 | } | ||
| 95 | |||
diff --git a/src/lib/libssl/src/crypto/md4/md4s.cpp b/src/lib/libssl/src/crypto/md4/md4s.cpp new file mode 100644 index 0000000000..c0ec97fc9f --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/md4s.cpp | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | // | ||
| 2 | // gettsc.inl | ||
| 3 | // | ||
| 4 | // gives access to the Pentium's (secret) cycle counter | ||
| 5 | // | ||
| 6 | // This software was written by Leonard Janke (janke@unixg.ubc.ca) | ||
| 7 | // in 1996-7 and is entered, by him, into the public domain. | ||
| 8 | |||
| 9 | #if defined(__WATCOMC__) | ||
| 10 | void GetTSC(unsigned long&); | ||
| 11 | #pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax]; | ||
| 12 | #elif defined(__GNUC__) | ||
| 13 | inline | ||
| 14 | void GetTSC(unsigned long& tsc) | ||
| 15 | { | ||
| 16 | asm volatile(".byte 15, 49\n\t" | ||
| 17 | : "=eax" (tsc) | ||
| 18 | : | ||
| 19 | : "%edx", "%eax"); | ||
| 20 | } | ||
| 21 | #elif defined(_MSC_VER) | ||
| 22 | inline | ||
| 23 | void GetTSC(unsigned long& tsc) | ||
| 24 | { | ||
| 25 | unsigned long a; | ||
| 26 | __asm _emit 0fh | ||
| 27 | __asm _emit 31h | ||
| 28 | __asm mov a, eax; | ||
| 29 | tsc=a; | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #include <stdio.h> | ||
| 34 | #include <stdlib.h> | ||
| 35 | #include <openssl/md4.h> | ||
| 36 | |||
| 37 | extern "C" { | ||
| 38 | void md4_block_x86(MD4_CTX *ctx, unsigned char *buffer,int num); | ||
| 39 | } | ||
| 40 | |||
| 41 | void main(int argc,char *argv[]) | ||
| 42 | { | ||
| 43 | unsigned char buffer[64*256]; | ||
| 44 | MD4_CTX ctx; | ||
| 45 | unsigned long s1,s2,e1,e2; | ||
| 46 | unsigned char k[16]; | ||
| 47 | unsigned long data[2]; | ||
| 48 | unsigned char iv[8]; | ||
| 49 | int i,num=0,numm; | ||
| 50 | int j=0; | ||
| 51 | |||
| 52 | if (argc >= 2) | ||
| 53 | num=atoi(argv[1]); | ||
| 54 | |||
| 55 | if (num == 0) num=16; | ||
| 56 | if (num > 250) num=16; | ||
| 57 | numm=num+2; | ||
| 58 | num*=64; | ||
| 59 | numm*=64; | ||
| 60 | |||
| 61 | for (j=0; j<6; j++) | ||
| 62 | { | ||
| 63 | for (i=0; i<10; i++) /**/ | ||
| 64 | { | ||
| 65 | md4_block_x86(&ctx,buffer,numm); | ||
| 66 | GetTSC(s1); | ||
| 67 | md4_block_x86(&ctx,buffer,numm); | ||
| 68 | GetTSC(e1); | ||
| 69 | GetTSC(s2); | ||
| 70 | md4_block_x86(&ctx,buffer,num); | ||
| 71 | GetTSC(e2); | ||
| 72 | md4_block_x86(&ctx,buffer,num); | ||
| 73 | } | ||
| 74 | printf("md4 (%d bytes) %d %d (%.2f)\n",num, | ||
| 75 | e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2); | ||
| 76 | } | ||
| 77 | } | ||
| 78 | |||
diff --git a/src/lib/libssl/src/crypto/md4/md4test.c b/src/lib/libssl/src/crypto/md4/md4test.c new file mode 100644 index 0000000000..97e6e21efd --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/md4test.c | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | /* crypto/md4/md4test.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <stdlib.h> | ||
| 62 | |||
| 63 | #ifdef NO_MD4 | ||
| 64 | int main(int argc, char *argv[]) | ||
| 65 | { | ||
| 66 | printf("No MD4 support\n"); | ||
| 67 | return(0); | ||
| 68 | } | ||
| 69 | #else | ||
| 70 | #include <openssl/md4.h> | ||
| 71 | |||
| 72 | static char *test[]={ | ||
| 73 | "", | ||
| 74 | "a", | ||
| 75 | "abc", | ||
| 76 | "message digest", | ||
| 77 | "abcdefghijklmnopqrstuvwxyz", | ||
| 78 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", | ||
| 79 | "12345678901234567890123456789012345678901234567890123456789012345678901234567890", | ||
| 80 | NULL, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static char *ret[]={ | ||
| 84 | "31d6cfe0d16ae931b73c59d7e0c089c0", | ||
| 85 | "bde52cb31de33e46245e05fbdbd6fb24", | ||
| 86 | "a448017aaf21d8525fc10ae87aa6729d", | ||
| 87 | "d9130a8164549fe818874806e1c7014b", | ||
| 88 | "d79e1c308aa5bbcdeea8ed63df412da9", | ||
| 89 | "043f8582f241db351ce627e153e7f0e4", | ||
| 90 | "e33b4ddc9c38f2199c3e7b164fcc0536", | ||
| 91 | }; | ||
| 92 | |||
| 93 | static char *pt(unsigned char *md); | ||
| 94 | int main(int argc, char *argv[]) | ||
| 95 | { | ||
| 96 | int i,err=0; | ||
| 97 | unsigned char **P,**R; | ||
| 98 | char *p; | ||
| 99 | |||
| 100 | P=(unsigned char **)test; | ||
| 101 | R=(unsigned char **)ret; | ||
| 102 | i=1; | ||
| 103 | while (*P != NULL) | ||
| 104 | { | ||
| 105 | p=pt(MD4(&(P[0][0]),(unsigned long)strlen((char *)*P),NULL)); | ||
| 106 | if (strcmp(p,(char *)*R) != 0) | ||
| 107 | { | ||
| 108 | printf("error calculating MD4 on '%s'\n",*P); | ||
| 109 | printf("got %s instead of %s\n",p,*R); | ||
| 110 | err++; | ||
| 111 | } | ||
| 112 | else | ||
| 113 | printf("test %d ok\n",i); | ||
| 114 | i++; | ||
| 115 | R++; | ||
| 116 | P++; | ||
| 117 | } | ||
| 118 | exit(err); | ||
| 119 | return(0); | ||
| 120 | } | ||
| 121 | |||
| 122 | static char *pt(unsigned char *md) | ||
| 123 | { | ||
| 124 | int i; | ||
| 125 | static char buf[80]; | ||
| 126 | |||
| 127 | for (i=0; i<MD4_DIGEST_LENGTH; i++) | ||
| 128 | sprintf(&(buf[i*2]),"%02x",md[i]); | ||
| 129 | return(buf); | ||
| 130 | } | ||
| 131 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/md5/Makefile.ssl b/src/lib/libssl/src/crypto/md5/Makefile.ssl index 45fbd04239..e8d0cced7f 100644 --- a/src/lib/libssl/src/crypto/md5/Makefile.ssl +++ b/src/lib/libssl/src/crypto/md5/Makefile.ssl | |||
| @@ -30,7 +30,7 @@ ASFLAGS=$(CFLAGS) | |||
| 30 | 30 | ||
| 31 | GENERAL=Makefile | 31 | GENERAL=Makefile |
| 32 | TEST=md5test.c | 32 | TEST=md5test.c |
| 33 | APPS=md5.c | 33 | APPS= |
| 34 | 34 | ||
| 35 | LIB=$(TOP)/libcrypto.a | 35 | LIB=$(TOP)/libcrypto.a |
| 36 | LIBSRC=md5_dgst.c md5_one.c | 36 | LIBSRC=md5_dgst.c md5_one.c |
diff --git a/src/lib/libssl/src/crypto/mdc2/Makefile.ssl b/src/lib/libssl/src/crypto/mdc2/Makefile.ssl index 7c28103350..da11c4edea 100644 --- a/src/lib/libssl/src/crypto/mdc2/Makefile.ssl +++ b/src/lib/libssl/src/crypto/mdc2/Makefile.ssl | |||
| @@ -81,9 +81,10 @@ clean: | |||
| 81 | mdc2_one.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 81 | mdc2_one.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 82 | mdc2_one.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 82 | mdc2_one.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 83 | mdc2_one.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 83 | mdc2_one.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 84 | mdc2_one.o: ../../include/openssl/err.h ../../include/openssl/mdc2.h | 84 | mdc2_one.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 85 | mdc2_one.o: ../../include/openssl/opensslconf.h | 85 | mdc2_one.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h |
| 86 | mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 86 | mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 87 | mdc2_one.o: ../../include/openssl/stack.h ../cryptlib.h | 87 | mdc2_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 88 | mdc2_one.o: ../cryptlib.h | ||
| 88 | mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h | 89 | mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h |
| 89 | mdc2dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h | 90 | mdc2dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h |
diff --git a/src/lib/libssl/src/crypto/mdc2/mdc2.h b/src/lib/libssl/src/crypto/mdc2/mdc2.h index 00acd707cd..5da8da72f5 100644 --- a/src/lib/libssl/src/crypto/mdc2/mdc2.h +++ b/src/lib/libssl/src/crypto/mdc2/mdc2.h | |||
| @@ -59,12 +59,12 @@ | |||
| 59 | #ifndef HEADER_MDC2_H | 59 | #ifndef HEADER_MDC2_H |
| 60 | #define HEADER_MDC2_H | 60 | #define HEADER_MDC2_H |
| 61 | 61 | ||
| 62 | #include <openssl/des.h> | ||
| 63 | |||
| 62 | #ifdef __cplusplus | 64 | #ifdef __cplusplus |
| 63 | extern "C" { | 65 | extern "C" { |
| 64 | #endif | 66 | #endif |
| 65 | 67 | ||
| 66 | #include <openssl/des.h> | ||
| 67 | |||
| 68 | #ifdef NO_MDC2 | 68 | #ifdef NO_MDC2 |
| 69 | #error MDC2 is disabled. | 69 | #error MDC2 is disabled. |
| 70 | #endif | 70 | #endif |
diff --git a/src/lib/libssl/src/crypto/mem.c b/src/lib/libssl/src/crypto/mem.c index 5a661e5f45..3b5b2bbc68 100644 --- a/src/lib/libssl/src/crypto/mem.c +++ b/src/lib/libssl/src/crypto/mem.c | |||
| @@ -80,20 +80,23 @@ static void (*free_func)(void *) = free; | |||
| 80 | /* may be changed as long as `allow_customize_debug' is set */ | 80 | /* may be changed as long as `allow_customize_debug' is set */ |
| 81 | /* XXX use correct function pointer types */ | 81 | /* XXX use correct function pointer types */ |
| 82 | #ifdef CRYPTO_MDEBUG | 82 | #ifdef CRYPTO_MDEBUG |
| 83 | /* use default functions from mem_dbg.c */ | 83 | /* use default functions from mem_dbg.c */ |
| 84 | static void (*malloc_debug_func)()= (void (*)())CRYPTO_dbg_malloc; | 84 | static void (*malloc_debug_func)(void *,int,const char *,int,int) |
| 85 | static void (*realloc_debug_func)()= (void (*)())CRYPTO_dbg_realloc; | 85 | = CRYPTO_dbg_malloc; |
| 86 | static void (*free_debug_func)()= (void (*)())CRYPTO_dbg_free; | 86 | static void (*realloc_debug_func)(void *,void *,int,const char *,int,int) |
| 87 | static void (*set_debug_options_func)()= (void (*)())CRYPTO_dbg_set_options; | 87 | = CRYPTO_dbg_realloc; |
| 88 | static long (*get_debug_options_func)()= (long (*)())CRYPTO_dbg_get_options; | 88 | static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free; |
| 89 | static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options; | ||
| 90 | static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options; | ||
| 89 | #else | 91 | #else |
| 90 | /* applications can use CRYPTO_malloc_debug_init() to select above case | 92 | /* applications can use CRYPTO_malloc_debug_init() to select above case |
| 91 | * at run-time */ | 93 | * at run-time */ |
| 92 | static void (*malloc_debug_func)()= NULL; | 94 | static void (*malloc_debug_func)(void *,int,const char *,int,int) = NULL; |
| 93 | static void (*realloc_debug_func)()= NULL; | 95 | static void (*realloc_debug_func)(void *,void *,int,const char *,int,int) |
| 94 | static void (*free_debug_func)()= NULL; | 96 | = NULL; |
| 95 | static void (*set_debug_options_func)()= NULL; | 97 | static void (*free_debug_func)(void *,int) = NULL; |
| 96 | static long (*get_debug_options_func)()= NULL; | 98 | static void (*set_debug_options_func)(long) = NULL; |
| 99 | static long (*get_debug_options_func)(void) = NULL; | ||
| 97 | #endif | 100 | #endif |
| 98 | 101 | ||
| 99 | 102 | ||
| @@ -123,7 +126,11 @@ int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*f)(void *)) | |||
| 123 | return 1; | 126 | return 1; |
| 124 | } | 127 | } |
| 125 | 128 | ||
| 126 | int CRYPTO_set_mem_debug_functions(void (*m)(), void (*r)(), void (*f)(),void (*so)(),long (*go)()) | 129 | int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int), |
| 130 | void (*r)(void *,void *,int,const char *,int,int), | ||
| 131 | void (*f)(void *,int), | ||
| 132 | void (*so)(long), | ||
| 133 | long (*go)(void)) | ||
| 127 | { | 134 | { |
| 128 | if (!allow_customize_debug) | 135 | if (!allow_customize_debug) |
| 129 | return 0; | 136 | return 0; |
| @@ -149,7 +156,11 @@ void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)) | |||
| 149 | if (f != NULL) *f=free_locked_func; | 156 | if (f != NULL) *f=free_locked_func; |
| 150 | } | 157 | } |
| 151 | 158 | ||
| 152 | void CRYPTO_get_mem_debug_functions(void (**m)(), void (**r)(), void (**f)(),void (**so)(),long (**go)()) | 159 | void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int), |
| 160 | void (**r)(void *,void *,int,const char *,int,int), | ||
| 161 | void (**f)(void *,int), | ||
| 162 | void (**so)(long), | ||
| 163 | long (**go)(void)) | ||
| 153 | { | 164 | { |
| 154 | if (m != NULL) *m=malloc_debug_func; | 165 | if (m != NULL) *m=malloc_debug_func; |
| 155 | if (r != NULL) *r=realloc_debug_func; | 166 | if (r != NULL) *r=realloc_debug_func; |
| @@ -161,7 +172,7 @@ void CRYPTO_get_mem_debug_functions(void (**m)(), void (**r)(), void (**f)(),voi | |||
| 161 | 172 | ||
| 162 | void *CRYPTO_malloc_locked(int num, const char *file, int line) | 173 | void *CRYPTO_malloc_locked(int num, const char *file, int line) |
| 163 | { | 174 | { |
| 164 | char *ret = NULL; | 175 | void *ret = NULL; |
| 165 | 176 | ||
| 166 | allow_customize = 0; | 177 | allow_customize = 0; |
| 167 | if (malloc_debug_func != NULL) | 178 | if (malloc_debug_func != NULL) |
| @@ -193,7 +204,7 @@ void CRYPTO_free_locked(void *str) | |||
| 193 | 204 | ||
| 194 | void *CRYPTO_malloc(int num, const char *file, int line) | 205 | void *CRYPTO_malloc(int num, const char *file, int line) |
| 195 | { | 206 | { |
| 196 | char *ret = NULL; | 207 | void *ret = NULL; |
| 197 | 208 | ||
| 198 | allow_customize = 0; | 209 | allow_customize = 0; |
| 199 | if (malloc_debug_func != NULL) | 210 | if (malloc_debug_func != NULL) |
| @@ -213,7 +224,7 @@ void *CRYPTO_malloc(int num, const char *file, int line) | |||
| 213 | 224 | ||
| 214 | void *CRYPTO_realloc(void *str, int num, const char *file, int line) | 225 | void *CRYPTO_realloc(void *str, int num, const char *file, int line) |
| 215 | { | 226 | { |
| 216 | char *ret = NULL; | 227 | void *ret = NULL; |
| 217 | 228 | ||
| 218 | if (realloc_debug_func != NULL) | 229 | if (realloc_debug_func != NULL) |
| 219 | realloc_debug_func(str, NULL, num, file, line, 0); | 230 | realloc_debug_func(str, NULL, num, file, line, 0); |
| @@ -241,8 +252,8 @@ void CRYPTO_free(void *str) | |||
| 241 | 252 | ||
| 242 | void *CRYPTO_remalloc(void *a, int num, const char *file, int line) | 253 | void *CRYPTO_remalloc(void *a, int num, const char *file, int line) |
| 243 | { | 254 | { |
| 244 | if (a != NULL) Free(a); | 255 | if (a != NULL) OPENSSL_free(a); |
| 245 | a=(char *)Malloc(num); | 256 | a=(char *)OPENSSL_malloc(num); |
| 246 | return(a); | 257 | return(a); |
| 247 | } | 258 | } |
| 248 | 259 | ||
diff --git a/src/lib/libssl/src/crypto/mem_dbg.c b/src/lib/libssl/src/crypto/mem_dbg.c index a399485300..866c53e73a 100644 --- a/src/lib/libssl/src/crypto/mem_dbg.c +++ b/src/lib/libssl/src/crypto/mem_dbg.c | |||
| @@ -108,7 +108,7 @@ static LHASH *amih=NULL; /* hash-table with those app_mem_info_st's | |||
| 108 | typedef struct mem_st | 108 | typedef struct mem_st |
| 109 | /* memory-block description */ | 109 | /* memory-block description */ |
| 110 | { | 110 | { |
| 111 | char *addr; | 111 | void *addr; |
| 112 | int num; | 112 | int num; |
| 113 | const char *file; | 113 | const char *file; |
| 114 | int line; | 114 | int line; |
| @@ -221,7 +221,7 @@ long CRYPTO_dbg_get_options(void) | |||
| 221 | 221 | ||
| 222 | static int mem_cmp(MEM *a, MEM *b) | 222 | static int mem_cmp(MEM *a, MEM *b) |
| 223 | { | 223 | { |
| 224 | return(a->addr - b->addr); | 224 | return((char *)a->addr - (char *)b->addr); |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | static unsigned long mem_hash(MEM *a) | 227 | static unsigned long mem_hash(MEM *a) |
| @@ -279,7 +279,7 @@ static APP_INFO *pop_info() | |||
| 279 | ret->next = NULL; | 279 | ret->next = NULL; |
| 280 | if (next != NULL) | 280 | if (next != NULL) |
| 281 | next->references--; | 281 | next->references--; |
| 282 | Free(ret); | 282 | OPENSSL_free(ret); |
| 283 | } | 283 | } |
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| @@ -295,7 +295,7 @@ int CRYPTO_push_info_(const char *info, const char *file, int line) | |||
| 295 | { | 295 | { |
| 296 | MemCheck_off(); /* obtains CRYPTO_LOCK_MALLOC2 */ | 296 | MemCheck_off(); /* obtains CRYPTO_LOCK_MALLOC2 */ |
| 297 | 297 | ||
| 298 | if ((ami = (APP_INFO *)Malloc(sizeof(APP_INFO))) == NULL) | 298 | if ((ami = (APP_INFO *)OPENSSL_malloc(sizeof(APP_INFO))) == NULL) |
| 299 | { | 299 | { |
| 300 | ret=0; | 300 | ret=0; |
| 301 | goto err; | 301 | goto err; |
| @@ -304,7 +304,7 @@ int CRYPTO_push_info_(const char *info, const char *file, int line) | |||
| 304 | { | 304 | { |
| 305 | if ((amih=lh_new(app_info_hash,app_info_cmp)) == NULL) | 305 | if ((amih=lh_new(app_info_hash,app_info_cmp)) == NULL) |
| 306 | { | 306 | { |
| 307 | Free(ami); | 307 | OPENSSL_free(ami); |
| 308 | ret=0; | 308 | ret=0; |
| 309 | goto err; | 309 | goto err; |
| 310 | } | 310 | } |
| @@ -386,9 +386,9 @@ void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, | |||
| 386 | if (is_MemCheck_on()) | 386 | if (is_MemCheck_on()) |
| 387 | { | 387 | { |
| 388 | MemCheck_off(); /* obtains CRYPTO_LOCK_MALLOC2 */ | 388 | MemCheck_off(); /* obtains CRYPTO_LOCK_MALLOC2 */ |
| 389 | if ((m=(MEM *)Malloc(sizeof(MEM))) == NULL) | 389 | if ((m=(MEM *)OPENSSL_malloc(sizeof(MEM))) == NULL) |
| 390 | { | 390 | { |
| 391 | Free(addr); | 391 | OPENSSL_free(addr); |
| 392 | MemCheck_on(); /* releases CRYPTO_LOCK_MALLOC2 */ | 392 | MemCheck_on(); /* releases CRYPTO_LOCK_MALLOC2 */ |
| 393 | return; | 393 | return; |
| 394 | } | 394 | } |
| @@ -396,8 +396,8 @@ void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, | |||
| 396 | { | 396 | { |
| 397 | if ((mh=lh_new(mem_hash,mem_cmp)) == NULL) | 397 | if ((mh=lh_new(mem_hash,mem_cmp)) == NULL) |
| 398 | { | 398 | { |
| 399 | Free(addr); | 399 | OPENSSL_free(addr); |
| 400 | Free(m); | 400 | OPENSSL_free(m); |
| 401 | addr=NULL; | 401 | addr=NULL; |
| 402 | goto err; | 402 | goto err; |
| 403 | } | 403 | } |
| @@ -445,7 +445,7 @@ void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, | |||
| 445 | { | 445 | { |
| 446 | mm->app_info->references--; | 446 | mm->app_info->references--; |
| 447 | } | 447 | } |
| 448 | Free(mm); | 448 | OPENSSL_free(mm); |
| 449 | } | 449 | } |
| 450 | err: | 450 | err: |
| 451 | MemCheck_on(); /* releases CRYPTO_LOCK_MALLOC2 */ | 451 | MemCheck_on(); /* releases CRYPTO_LOCK_MALLOC2 */ |
| @@ -481,7 +481,7 @@ void CRYPTO_dbg_free(void *addr, int before_p) | |||
| 481 | { | 481 | { |
| 482 | mp->app_info->references--; | 482 | mp->app_info->references--; |
| 483 | } | 483 | } |
| 484 | Free(mp); | 484 | OPENSSL_free(mp); |
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | MemCheck_on(); /* releases CRYPTO_LOCK_MALLOC2 */ | 487 | MemCheck_on(); /* releases CRYPTO_LOCK_MALLOC2 */ |
| @@ -696,32 +696,6 @@ void CRYPTO_mem_leaks(BIO *b) | |||
| 696 | #endif | 696 | #endif |
| 697 | } | 697 | } |
| 698 | 698 | ||
| 699 | union void_fn_to_char_u | ||
| 700 | { | ||
| 701 | char *char_p; | ||
| 702 | void (*fn_p)(); | ||
| 703 | }; | ||
| 704 | |||
| 705 | static void cb_leak(MEM *m, char *cb) | ||
| 706 | { | ||
| 707 | union void_fn_to_char_u mem_callback; | ||
| 708 | |||
| 709 | mem_callback.char_p=cb; | ||
| 710 | mem_callback.fn_p(m->order,m->file,m->line,m->num,m->addr); | ||
| 711 | } | ||
| 712 | |||
| 713 | void CRYPTO_mem_leaks_cb(void (*cb)()) | ||
| 714 | { | ||
| 715 | union void_fn_to_char_u mem_cb; | ||
| 716 | |||
| 717 | if (mh == NULL) return; | ||
| 718 | CRYPTO_w_lock(CRYPTO_LOCK_MALLOC2); | ||
| 719 | mem_cb.fn_p=cb; | ||
| 720 | lh_doall_arg(mh,(void (*)())cb_leak,mem_cb.char_p); | ||
| 721 | mem_cb.char_p=NULL; | ||
| 722 | CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC2); | ||
| 723 | } | ||
| 724 | |||
| 725 | #ifndef NO_FP_API | 699 | #ifndef NO_FP_API |
| 726 | void CRYPTO_mem_leaks_fp(FILE *fp) | 700 | void CRYPTO_mem_leaks_fp(FILE *fp) |
| 727 | { | 701 | { |
| @@ -736,3 +710,21 @@ void CRYPTO_mem_leaks_fp(FILE *fp) | |||
| 736 | } | 710 | } |
| 737 | #endif | 711 | #endif |
| 738 | 712 | ||
| 713 | |||
| 714 | |||
| 715 | /* FIXME: We really don't allow much to the callback. For example, it has | ||
| 716 | no chance of reaching the info stack for the item it processes. Should | ||
| 717 | it really be this way? -- Richard Levitte */ | ||
| 718 | static void cb_leak(MEM *m, | ||
| 719 | void (**cb)(unsigned long, const char *, int, int, void *)) | ||
| 720 | { | ||
| 721 | (**cb)(m->order,m->file,m->line,m->num,m->addr); | ||
| 722 | } | ||
| 723 | |||
| 724 | void CRYPTO_mem_leaks_cb(void (*cb)(unsigned long, const char *, int, int, void *)) | ||
| 725 | { | ||
| 726 | if (mh == NULL) return; | ||
| 727 | CRYPTO_w_lock(CRYPTO_LOCK_MALLOC2); | ||
| 728 | lh_doall_arg(mh,(void (*)())cb_leak,(void *)&cb); | ||
| 729 | CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC2); | ||
| 730 | } | ||
diff --git a/src/lib/libssl/src/crypto/objects/Makefile.ssl b/src/lib/libssl/src/crypto/objects/Makefile.ssl index f05e15df96..bdb7aa94dc 100644 --- a/src/lib/libssl/src/crypto/objects/Makefile.ssl +++ b/src/lib/libssl/src/crypto/objects/Makefile.ssl | |||
| @@ -27,7 +27,7 @@ LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o | |||
| 27 | 27 | ||
| 28 | SRC= $(LIBSRC) | 28 | SRC= $(LIBSRC) |
| 29 | 29 | ||
| 30 | EXHEADER= objects.h | 30 | EXHEADER= objects.h obj_mac.h |
| 31 | HEADER= $(EXHEADER) obj_dat.h | 31 | HEADER= $(EXHEADER) obj_dat.h |
| 32 | 32 | ||
| 33 | ALL= $(GENERAL) $(SRC) $(HEADER) | 33 | ALL= $(GENERAL) $(SRC) $(HEADER) |
| @@ -80,27 +80,32 @@ clean: | |||
| 80 | 80 | ||
| 81 | o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 81 | o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 82 | o_names.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 82 | o_names.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h |
| 83 | o_names.o: ../../include/openssl/lhash.h ../../include/openssl/objects.h | 83 | o_names.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 84 | o_names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 84 | o_names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 85 | o_names.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 85 | o_names.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 86 | o_names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 86 | obj_dat.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 87 | obj_dat.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 87 | obj_dat.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 88 | obj_dat.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 88 | obj_dat.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 89 | obj_dat.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 89 | obj_dat.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 90 | obj_dat.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 90 | obj_dat.o: ../../include/openssl/lhash.h ../../include/openssl/objects.h | 91 | obj_dat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 91 | obj_dat.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 92 | obj_dat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 92 | obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 93 | obj_dat.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 94 | obj_dat.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 93 | obj_dat.o: ../cryptlib.h obj_dat.h | 95 | obj_dat.o: ../cryptlib.h obj_dat.h |
| 94 | obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 96 | obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 95 | obj_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 97 | obj_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h |
| 96 | obj_err.o: ../../include/openssl/err.h ../../include/openssl/objects.h | 98 | obj_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 99 | obj_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 97 | obj_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 100 | obj_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 98 | obj_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 101 | obj_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 102 | obj_err.o: ../../include/openssl/symhacks.h | ||
| 99 | obj_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 103 | obj_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 100 | obj_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 104 | obj_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 101 | obj_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 105 | obj_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 102 | obj_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 106 | obj_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 103 | obj_lib.o: ../../include/openssl/lhash.h ../../include/openssl/objects.h | 107 | obj_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 104 | obj_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 108 | obj_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 105 | obj_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 109 | obj_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 110 | obj_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 106 | obj_lib.o: ../cryptlib.h | 111 | obj_lib.o: ../cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/objects/o_names.c b/src/lib/libssl/src/crypto/objects/o_names.c index d9389a5e5a..dca988230e 100644 --- a/src/lib/libssl/src/crypto/objects/o_names.c +++ b/src/lib/libssl/src/crypto/objects/o_names.c | |||
| @@ -36,8 +36,9 @@ int OBJ_NAME_init(void) | |||
| 36 | return(names_lh != NULL); | 36 | return(names_lh != NULL); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | int OBJ_NAME_new_index(unsigned long (*hash_func)(), int (*cmp_func)(), | 39 | int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), |
| 40 | void (*free_func)()) | 40 | int (*cmp_func)(const void *, const void *), |
| 41 | void (*free_func)(const char *, int, const char *)) | ||
| 41 | { | 42 | { |
| 42 | int ret; | 43 | int ret; |
| 43 | int i; | 44 | int i; |
| @@ -59,7 +60,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(), int (*cmp_func)(), | |||
| 59 | for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++) | 60 | for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++) |
| 60 | { | 61 | { |
| 61 | MemCheck_off(); | 62 | MemCheck_off(); |
| 62 | name_funcs = Malloc(sizeof(NAME_FUNCS)); | 63 | name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); |
| 63 | name_funcs->hash_func = lh_strhash; | 64 | name_funcs->hash_func = lh_strhash; |
| 64 | name_funcs->cmp_func = (int (*)())strcmp; | 65 | name_funcs->cmp_func = (int (*)())strcmp; |
| 65 | name_funcs->free_func = 0; /* NULL is often declared to | 66 | name_funcs->free_func = 0; /* NULL is often declared to |
| @@ -156,7 +157,7 @@ int OBJ_NAME_add(const char *name, int type, const char *data) | |||
| 156 | alias=type&OBJ_NAME_ALIAS; | 157 | alias=type&OBJ_NAME_ALIAS; |
| 157 | type&= ~OBJ_NAME_ALIAS; | 158 | type&= ~OBJ_NAME_ALIAS; |
| 158 | 159 | ||
| 159 | onp=(OBJ_NAME *)Malloc(sizeof(OBJ_NAME)); | 160 | onp=(OBJ_NAME *)OPENSSL_malloc(sizeof(OBJ_NAME)); |
| 160 | if (onp == NULL) | 161 | if (onp == NULL) |
| 161 | { | 162 | { |
| 162 | /* ERROR */ | 163 | /* ERROR */ |
| @@ -181,7 +182,7 @@ int OBJ_NAME_add(const char *name, int type, const char *data) | |||
| 181 | sk_NAME_FUNCS_value(name_funcs_stack,ret->type) | 182 | sk_NAME_FUNCS_value(name_funcs_stack,ret->type) |
| 182 | ->free_func(ret->name,ret->type,ret->data); | 183 | ->free_func(ret->name,ret->type,ret->data); |
| 183 | } | 184 | } |
| 184 | Free(ret); | 185 | OPENSSL_free(ret); |
| 185 | } | 186 | } |
| 186 | else | 187 | else |
| 187 | { | 188 | { |
| @@ -216,7 +217,7 @@ int OBJ_NAME_remove(const char *name, int type) | |||
| 216 | sk_NAME_FUNCS_value(name_funcs_stack,ret->type) | 217 | sk_NAME_FUNCS_value(name_funcs_stack,ret->type) |
| 217 | ->free_func(ret->name,ret->type,ret->data); | 218 | ->free_func(ret->name,ret->type,ret->data); |
| 218 | } | 219 | } |
| 219 | Free(ret); | 220 | OPENSSL_free(ret); |
| 220 | return(1); | 221 | return(1); |
| 221 | } | 222 | } |
| 222 | else | 223 | else |
| @@ -238,7 +239,7 @@ static void names_lh_free(OBJ_NAME *onp, int type) | |||
| 238 | 239 | ||
| 239 | static void name_funcs_free(NAME_FUNCS *ptr) | 240 | static void name_funcs_free(NAME_FUNCS *ptr) |
| 240 | { | 241 | { |
| 241 | Free(ptr); | 242 | OPENSSL_free(ptr); |
| 242 | } | 243 | } |
| 243 | 244 | ||
| 244 | void OBJ_NAME_cleanup(int type) | 245 | void OBJ_NAME_cleanup(int type) |
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.c b/src/lib/libssl/src/crypto/objects/obj_dat.c index da6df3762a..4b1bb9583a 100644 --- a/src/lib/libssl/src/crypto/objects/obj_dat.c +++ b/src/lib/libssl/src/crypto/objects/obj_dat.c | |||
| @@ -79,9 +79,9 @@ static ASN1_OBJECT *ln_objs[1]; | |||
| 79 | static ASN1_OBJECT *obj_objs[1]; | 79 | static ASN1_OBJECT *obj_objs[1]; |
| 80 | #endif | 80 | #endif |
| 81 | 81 | ||
| 82 | static int sn_cmp(ASN1_OBJECT **a, ASN1_OBJECT **b); | 82 | static int sn_cmp(const void *a, const void *b); |
| 83 | static int ln_cmp(ASN1_OBJECT **a, ASN1_OBJECT **b); | 83 | static int ln_cmp(const void *a, const void *b); |
| 84 | static int obj_cmp(ASN1_OBJECT **a, ASN1_OBJECT **b); | 84 | static int obj_cmp(const void *a, const void *b); |
| 85 | #define ADDED_DATA 0 | 85 | #define ADDED_DATA 0 |
| 86 | #define ADDED_SNAME 1 | 86 | #define ADDED_SNAME 1 |
| 87 | #define ADDED_LNAME 2 | 87 | #define ADDED_LNAME 2 |
| @@ -96,11 +96,17 @@ typedef struct added_obj_st | |||
| 96 | static int new_nid=NUM_NID; | 96 | static int new_nid=NUM_NID; |
| 97 | static LHASH *added=NULL; | 97 | static LHASH *added=NULL; |
| 98 | 98 | ||
| 99 | static int sn_cmp(ASN1_OBJECT **ap, ASN1_OBJECT **bp) | 99 | static int sn_cmp(const void *a, const void *b) |
| 100 | { return(strcmp((*ap)->sn,(*bp)->sn)); } | 100 | { |
| 101 | const ASN1_OBJECT * const *ap = a, * const *bp = b; | ||
| 102 | return(strcmp((*ap)->sn,(*bp)->sn)); | ||
| 103 | } | ||
| 101 | 104 | ||
| 102 | static int ln_cmp(ASN1_OBJECT **ap, ASN1_OBJECT **bp) | 105 | static int ln_cmp(const void *a, const void *b) |
| 103 | { return(strcmp((*ap)->ln,(*bp)->ln)); } | 106 | { |
| 107 | const ASN1_OBJECT * const *ap = a, * const *bp = b; | ||
| 108 | return(strcmp((*ap)->ln,(*bp)->ln)); | ||
| 109 | } | ||
| 104 | 110 | ||
| 105 | static unsigned long add_hash(ADDED_OBJ *ca) | 111 | static unsigned long add_hash(ADDED_OBJ *ca) |
| 106 | { | 112 | { |
| @@ -128,7 +134,8 @@ static unsigned long add_hash(ADDED_OBJ *ca) | |||
| 128 | ret=a->nid; | 134 | ret=a->nid; |
| 129 | break; | 135 | break; |
| 130 | default: | 136 | default: |
| 131 | abort(); | 137 | /* abort(); */ |
| 138 | return 0; | ||
| 132 | } | 139 | } |
| 133 | ret&=0x3fffffffL; | 140 | ret&=0x3fffffffL; |
| 134 | ret|=ca->type<<30L; | 141 | ret|=ca->type<<30L; |
| @@ -161,7 +168,8 @@ static int add_cmp(ADDED_OBJ *ca, ADDED_OBJ *cb) | |||
| 161 | case ADDED_NID: | 168 | case ADDED_NID: |
| 162 | return(a->nid-b->nid); | 169 | return(a->nid-b->nid); |
| 163 | default: | 170 | default: |
| 164 | abort(); | 171 | /* abort(); */ |
| 172 | return 0; | ||
| 165 | } | 173 | } |
| 166 | return(1); /* should not get here */ | 174 | return(1); /* should not get here */ |
| 167 | } | 175 | } |
| @@ -188,7 +196,7 @@ static void cleanup3(ADDED_OBJ *a) | |||
| 188 | { | 196 | { |
| 189 | if (--a->obj->nid == 0) | 197 | if (--a->obj->nid == 0) |
| 190 | ASN1_OBJECT_free(a->obj); | 198 | ASN1_OBJECT_free(a->obj); |
| 191 | Free(a); | 199 | OPENSSL_free(a); |
| 192 | } | 200 | } |
| 193 | 201 | ||
| 194 | void OBJ_cleanup(void) | 202 | void OBJ_cleanup(void) |
| @@ -220,13 +228,13 @@ int OBJ_add_object(ASN1_OBJECT *obj) | |||
| 220 | if (added == NULL) | 228 | if (added == NULL) |
| 221 | if (!init_added()) return(0); | 229 | if (!init_added()) return(0); |
| 222 | if ((o=OBJ_dup(obj)) == NULL) goto err; | 230 | if ((o=OBJ_dup(obj)) == NULL) goto err; |
| 223 | ao[ADDED_NID]=(ADDED_OBJ *)Malloc(sizeof(ADDED_OBJ)); | 231 | ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); |
| 224 | if ((o->length != 0) && (obj->data != NULL)) | 232 | if ((o->length != 0) && (obj->data != NULL)) |
| 225 | ao[ADDED_DATA]=(ADDED_OBJ *)Malloc(sizeof(ADDED_OBJ)); | 233 | ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); |
| 226 | if (o->sn != NULL) | 234 | if (o->sn != NULL) |
| 227 | ao[ADDED_SNAME]=(ADDED_OBJ *)Malloc(sizeof(ADDED_OBJ)); | 235 | ao[ADDED_SNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); |
| 228 | if (o->ln != NULL) | 236 | if (o->ln != NULL) |
| 229 | ao[ADDED_LNAME]=(ADDED_OBJ *)Malloc(sizeof(ADDED_OBJ)); | 237 | ao[ADDED_LNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); |
| 230 | 238 | ||
| 231 | for (i=ADDED_DATA; i<=ADDED_NID; i++) | 239 | for (i=ADDED_DATA; i<=ADDED_NID; i++) |
| 232 | { | 240 | { |
| @@ -237,7 +245,7 @@ int OBJ_add_object(ASN1_OBJECT *obj) | |||
| 237 | aop=(ADDED_OBJ *)lh_insert(added,ao[i]); | 245 | aop=(ADDED_OBJ *)lh_insert(added,ao[i]); |
| 238 | /* memory leak, buit should not normally matter */ | 246 | /* memory leak, buit should not normally matter */ |
| 239 | if (aop != NULL) | 247 | if (aop != NULL) |
| 240 | Free(aop); | 248 | OPENSSL_free(aop); |
| 241 | } | 249 | } |
| 242 | } | 250 | } |
| 243 | o->flags&= ~(ASN1_OBJECT_FLAG_DYNAMIC|ASN1_OBJECT_FLAG_DYNAMIC_STRINGS| | 251 | o->flags&= ~(ASN1_OBJECT_FLAG_DYNAMIC|ASN1_OBJECT_FLAG_DYNAMIC_STRINGS| |
| @@ -246,8 +254,8 @@ int OBJ_add_object(ASN1_OBJECT *obj) | |||
| 246 | return(o->nid); | 254 | return(o->nid); |
| 247 | err: | 255 | err: |
| 248 | for (i=ADDED_DATA; i<=ADDED_NID; i++) | 256 | for (i=ADDED_DATA; i<=ADDED_NID; i++) |
| 249 | if (ao[i] != NULL) Free(ao[i]); | 257 | if (ao[i] != NULL) OPENSSL_free(ao[i]); |
| 250 | if (o != NULL) Free(o); | 258 | if (o != NULL) OPENSSL_free(o); |
| 251 | return(NID_undef); | 259 | return(NID_undef); |
| 252 | } | 260 | } |
| 253 | 261 | ||
| @@ -365,7 +373,7 @@ int OBJ_obj2nid(ASN1_OBJECT *a) | |||
| 365 | if (adp != NULL) return (adp->obj->nid); | 373 | if (adp != NULL) return (adp->obj->nid); |
| 366 | } | 374 | } |
| 367 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&a,(char *)obj_objs,NUM_OBJ, | 375 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&a,(char *)obj_objs,NUM_OBJ, |
| 368 | sizeof(ASN1_OBJECT *),(int (*)())obj_cmp); | 376 | sizeof(ASN1_OBJECT *),obj_cmp); |
| 369 | if (op == NULL) | 377 | if (op == NULL) |
| 370 | return(NID_undef); | 378 | return(NID_undef); |
| 371 | return((*op)->nid); | 379 | return((*op)->nid); |
| @@ -400,7 +408,7 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) | |||
| 400 | /* Work out total size */ | 408 | /* Work out total size */ |
| 401 | j = ASN1_object_size(0,i,V_ASN1_OBJECT); | 409 | j = ASN1_object_size(0,i,V_ASN1_OBJECT); |
| 402 | 410 | ||
| 403 | if((buf=(unsigned char *)Malloc(j)) == NULL) return NULL; | 411 | if((buf=(unsigned char *)OPENSSL_malloc(j)) == NULL) return NULL; |
| 404 | 412 | ||
| 405 | p = buf; | 413 | p = buf; |
| 406 | /* Write out tag+length */ | 414 | /* Write out tag+length */ |
| @@ -410,7 +418,7 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) | |||
| 410 | 418 | ||
| 411 | p=buf; | 419 | p=buf; |
| 412 | op=d2i_ASN1_OBJECT(NULL,&p,i); | 420 | op=d2i_ASN1_OBJECT(NULL,&p,i); |
| 413 | Free(buf); | 421 | OPENSSL_free(buf); |
| 414 | return op; | 422 | return op; |
| 415 | } | 423 | } |
| 416 | 424 | ||
| @@ -504,7 +512,7 @@ int OBJ_ln2nid(const char *s) | |||
| 504 | if (adp != NULL) return (adp->obj->nid); | 512 | if (adp != NULL) return (adp->obj->nid); |
| 505 | } | 513 | } |
| 506 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)ln_objs,NUM_LN, | 514 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)ln_objs,NUM_LN, |
| 507 | sizeof(ASN1_OBJECT *),(int (*)())ln_cmp); | 515 | sizeof(ASN1_OBJECT *),ln_cmp); |
| 508 | if (op == NULL) return(NID_undef); | 516 | if (op == NULL) return(NID_undef); |
| 509 | return((*op)->nid); | 517 | return((*op)->nid); |
| 510 | } | 518 | } |
| @@ -523,23 +531,23 @@ int OBJ_sn2nid(const char *s) | |||
| 523 | if (adp != NULL) return (adp->obj->nid); | 531 | if (adp != NULL) return (adp->obj->nid); |
| 524 | } | 532 | } |
| 525 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)sn_objs,NUM_SN, | 533 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)sn_objs,NUM_SN, |
| 526 | sizeof(ASN1_OBJECT *),(int (*)())sn_cmp); | 534 | sizeof(ASN1_OBJECT *),sn_cmp); |
| 527 | if (op == NULL) return(NID_undef); | 535 | if (op == NULL) return(NID_undef); |
| 528 | return((*op)->nid); | 536 | return((*op)->nid); |
| 529 | } | 537 | } |
| 530 | 538 | ||
| 531 | static int obj_cmp(ASN1_OBJECT **ap, ASN1_OBJECT **bp) | 539 | static int obj_cmp(const void *ap, const void *bp) |
| 532 | { | 540 | { |
| 533 | int j; | 541 | int j; |
| 534 | ASN1_OBJECT *a= *ap; | 542 | ASN1_OBJECT *a= *(ASN1_OBJECT **)ap; |
| 535 | ASN1_OBJECT *b= *bp; | 543 | ASN1_OBJECT *b= *(ASN1_OBJECT **)bp; |
| 536 | 544 | ||
| 537 | j=(a->length - b->length); | 545 | j=(a->length - b->length); |
| 538 | if (j) return(j); | 546 | if (j) return(j); |
| 539 | return(memcmp(a->data,b->data,a->length)); | 547 | return(memcmp(a->data,b->data,a->length)); |
| 540 | } | 548 | } |
| 541 | 549 | ||
| 542 | char *OBJ_bsearch(char *key, char *base, int num, int size, int (*cmp)()) | 550 | char *OBJ_bsearch(char *key, char *base, int num, int size, int (*cmp)(const void *, const void *)) |
| 543 | { | 551 | { |
| 544 | int l,h,i,c; | 552 | int l,h,i,c; |
| 545 | char *p; | 553 | char *p; |
| @@ -631,7 +639,7 @@ int OBJ_create(char *oid, char *sn, char *ln) | |||
| 631 | i=a2d_ASN1_OBJECT(NULL,0,oid,-1); | 639 | i=a2d_ASN1_OBJECT(NULL,0,oid,-1); |
| 632 | if (i <= 0) return(0); | 640 | if (i <= 0) return(0); |
| 633 | 641 | ||
| 634 | if ((buf=(unsigned char *)Malloc(i)) == NULL) | 642 | if ((buf=(unsigned char *)OPENSSL_malloc(i)) == NULL) |
| 635 | { | 643 | { |
| 636 | OBJerr(OBJ_F_OBJ_CREATE,OBJ_R_MALLOC_FAILURE); | 644 | OBJerr(OBJ_F_OBJ_CREATE,OBJ_R_MALLOC_FAILURE); |
| 637 | return(0); | 645 | return(0); |
| @@ -643,7 +651,7 @@ int OBJ_create(char *oid, char *sn, char *ln) | |||
| 643 | ok=OBJ_add_object(op); | 651 | ok=OBJ_add_object(op); |
| 644 | err: | 652 | err: |
| 645 | ASN1_OBJECT_free(op); | 653 | ASN1_OBJECT_free(op); |
| 646 | Free(buf); | 654 | OPENSSL_free(buf); |
| 647 | return(ok); | 655 | return(ok); |
| 648 | } | 656 | } |
| 649 | 657 | ||
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.h.src b/src/lib/libssl/src/crypto/objects/obj_dat.h.src new file mode 100644 index 0000000000..f0d824141c --- /dev/null +++ b/src/lib/libssl/src/crypto/objects/obj_dat.h.src | |||
| @@ -0,0 +1,2208 @@ | |||
| 1 | /* lib/obj/obj_dat.h */ | ||
| 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* THIS FILE IS GENERATED FROM Objects.h by obj_dat.pl via the | ||
| 60 | * following command: | ||
| 61 | * perl obj_dat.pl objects.h obj_dat.h | ||
| 62 | */ | ||
| 63 | |||
| 64 | #define NUM_NID 393 | ||
| 65 | #define NUM_SN 392 | ||
| 66 | #define NUM_LN 392 | ||
| 67 | #define NUM_OBJ 366 | ||
| 68 | |||
| 69 | static unsigned char lvalues[2896]={ | ||
| 70 | 0x00, /* [ 0] OBJ_undef */ | ||
| 71 | 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ | ||
| 72 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ | ||
| 73 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 14] OBJ_md2 */ | ||
| 74 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x05, /* [ 22] OBJ_md5 */ | ||
| 75 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04, /* [ 30] OBJ_rc4 */ | ||
| 76 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,/* [ 38] OBJ_rsaEncryption */ | ||
| 77 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,/* [ 47] OBJ_md2WithRSAEncryption */ | ||
| 78 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,/* [ 56] OBJ_md5WithRSAEncryption */ | ||
| 79 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x01,/* [ 65] OBJ_pbeWithMD2AndDES_CBC */ | ||
| 80 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x03,/* [ 74] OBJ_pbeWithMD5AndDES_CBC */ | ||
| 81 | 0x55, /* [ 83] OBJ_X500 */ | ||
| 82 | 0x55,0x04, /* [ 84] OBJ_X509 */ | ||
| 83 | 0x55,0x04,0x03, /* [ 86] OBJ_commonName */ | ||
| 84 | 0x55,0x04,0x06, /* [ 89] OBJ_countryName */ | ||
| 85 | 0x55,0x04,0x07, /* [ 92] OBJ_localityName */ | ||
| 86 | 0x55,0x04,0x08, /* [ 95] OBJ_stateOrProvinceName */ | ||
| 87 | 0x55,0x04,0x0A, /* [ 98] OBJ_organizationName */ | ||
| 88 | 0x55,0x04,0x0B, /* [101] OBJ_organizationalUnitName */ | ||
| 89 | 0x55,0x08,0x01,0x01, /* [104] OBJ_rsa */ | ||
| 90 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07, /* [108] OBJ_pkcs7 */ | ||
| 91 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x01,/* [116] OBJ_pkcs7_data */ | ||
| 92 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x02,/* [125] OBJ_pkcs7_signed */ | ||
| 93 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x03,/* [134] OBJ_pkcs7_enveloped */ | ||
| 94 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x04,/* [143] OBJ_pkcs7_signedAndEnveloped */ | ||
| 95 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x05,/* [152] OBJ_pkcs7_digest */ | ||
| 96 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x06,/* [161] OBJ_pkcs7_encrypted */ | ||
| 97 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03, /* [170] OBJ_pkcs3 */ | ||
| 98 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03,0x01,/* [178] OBJ_dhKeyAgreement */ | ||
| 99 | 0x2B,0x0E,0x03,0x02,0x06, /* [187] OBJ_des_ecb */ | ||
| 100 | 0x2B,0x0E,0x03,0x02,0x09, /* [192] OBJ_des_cfb64 */ | ||
| 101 | 0x2B,0x0E,0x03,0x02,0x07, /* [197] OBJ_des_cbc */ | ||
| 102 | 0x2B,0x0E,0x03,0x02,0x11, /* [202] OBJ_des_ede */ | ||
| 103 | 0x2B,0x06,0x01,0x04,0x01,0x81,0x3C,0x07,0x01,0x01,0x02,/* [207] OBJ_idea_cbc */ | ||
| 104 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x02, /* [218] OBJ_rc2_cbc */ | ||
| 105 | 0x2B,0x0E,0x03,0x02,0x12, /* [226] OBJ_sha */ | ||
| 106 | 0x2B,0x0E,0x03,0x02,0x0F, /* [231] OBJ_shaWithRSAEncryption */ | ||
| 107 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x07, /* [236] OBJ_des_ede3_cbc */ | ||
| 108 | 0x2B,0x0E,0x03,0x02,0x08, /* [244] OBJ_des_ofb64 */ | ||
| 109 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09, /* [249] OBJ_pkcs9 */ | ||
| 110 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x01,/* [257] OBJ_pkcs9_emailAddress */ | ||
| 111 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x02,/* [266] OBJ_pkcs9_unstructuredName */ | ||
| 112 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x03,/* [275] OBJ_pkcs9_contentType */ | ||
| 113 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x04,/* [284] OBJ_pkcs9_messageDigest */ | ||
| 114 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x05,/* [293] OBJ_pkcs9_signingTime */ | ||
| 115 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x06,/* [302] OBJ_pkcs9_countersignature */ | ||
| 116 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x07,/* [311] OBJ_pkcs9_challengePassword */ | ||
| 117 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x08,/* [320] OBJ_pkcs9_unstructuredAddress */ | ||
| 118 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x09,/* [329] OBJ_pkcs9_extCertAttributes */ | ||
| 119 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42, /* [338] OBJ_netscape */ | ||
| 120 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01, /* [345] OBJ_netscape_cert_extension */ | ||
| 121 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02, /* [353] OBJ_netscape_data_type */ | ||
| 122 | 0x2B,0x0E,0x03,0x02,0x1A, /* [361] OBJ_sha1 */ | ||
| 123 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,/* [366] OBJ_sha1WithRSAEncryption */ | ||
| 124 | 0x2B,0x0E,0x03,0x02,0x0D, /* [375] OBJ_dsaWithSHA */ | ||
| 125 | 0x2B,0x0E,0x03,0x02,0x0C, /* [380] OBJ_dsa_2 */ | ||
| 126 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0B,/* [385] OBJ_pbeWithSHA1AndRC2_CBC */ | ||
| 127 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0C,/* [394] OBJ_id_pbkdf2 */ | ||
| 128 | 0x2B,0x0E,0x03,0x02,0x1B, /* [403] OBJ_dsaWithSHA1_2 */ | ||
| 129 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x01,/* [408] OBJ_netscape_cert_type */ | ||
| 130 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x02,/* [417] OBJ_netscape_base_url */ | ||
| 131 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x03,/* [426] OBJ_netscape_revocation_url */ | ||
| 132 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x04,/* [435] OBJ_netscape_ca_revocation_url */ | ||
| 133 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x07,/* [444] OBJ_netscape_renewal_url */ | ||
| 134 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x08,/* [453] OBJ_netscape_ca_policy_url */ | ||
| 135 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0C,/* [462] OBJ_netscape_ssl_server_name */ | ||
| 136 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0D,/* [471] OBJ_netscape_comment */ | ||
| 137 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02,0x05,/* [480] OBJ_netscape_cert_sequence */ | ||
| 138 | 0x55,0x1D, /* [489] OBJ_id_ce */ | ||
| 139 | 0x55,0x1D,0x0E, /* [491] OBJ_subject_key_identifier */ | ||
| 140 | 0x55,0x1D,0x0F, /* [494] OBJ_key_usage */ | ||
| 141 | 0x55,0x1D,0x10, /* [497] OBJ_private_key_usage_period */ | ||
| 142 | 0x55,0x1D,0x11, /* [500] OBJ_subject_alt_name */ | ||
| 143 | 0x55,0x1D,0x12, /* [503] OBJ_issuer_alt_name */ | ||
| 144 | 0x55,0x1D,0x13, /* [506] OBJ_basic_constraints */ | ||
| 145 | 0x55,0x1D,0x14, /* [509] OBJ_crl_number */ | ||
| 146 | 0x55,0x1D,0x20, /* [512] OBJ_certificate_policies */ | ||
| 147 | 0x55,0x1D,0x23, /* [515] OBJ_authority_key_identifier */ | ||
| 148 | 0x2B,0x06,0x01,0x04,0x01,0x97,0x55,0x01,0x02,/* [518] OBJ_bf_cbc */ | ||
| 149 | 0x55,0x08,0x03,0x65, /* [527] OBJ_mdc2 */ | ||
| 150 | 0x55,0x08,0x03,0x64, /* [531] OBJ_mdc2WithRSA */ | ||
| 151 | 0x55,0x04,0x2A, /* [535] OBJ_givenName */ | ||
| 152 | 0x55,0x04,0x04, /* [538] OBJ_surname */ | ||
| 153 | 0x55,0x04,0x2B, /* [541] OBJ_initials */ | ||
| 154 | 0x55,0x04,0x2D, /* [544] OBJ_uniqueIdentifier */ | ||
| 155 | 0x55,0x1D,0x1F, /* [547] OBJ_crl_distribution_points */ | ||
| 156 | 0x2B,0x0E,0x03,0x02,0x03, /* [550] OBJ_md5WithRSA */ | ||
| 157 | 0x55,0x04,0x05, /* [555] OBJ_serialNumber */ | ||
| 158 | 0x55,0x04,0x0C, /* [558] OBJ_title */ | ||
| 159 | 0x55,0x04,0x0D, /* [561] OBJ_description */ | ||
| 160 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0A,/* [564] OBJ_cast5_cbc */ | ||
| 161 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0C,/* [573] OBJ_pbeWithMD5AndCast5_CBC */ | ||
| 162 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x03, /* [582] OBJ_dsaWithSHA1 */ | ||
| 163 | 0x2B,0x0E,0x03,0x02,0x1D, /* [589] OBJ_sha1WithRSA */ | ||
| 164 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x01, /* [594] OBJ_dsa */ | ||
| 165 | 0x2B,0x24,0x03,0x02,0x01, /* [601] OBJ_ripemd160 */ | ||
| 166 | 0x2B,0x24,0x03,0x03,0x01,0x02, /* [606] OBJ_ripemd160WithRSA */ | ||
| 167 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x08, /* [612] OBJ_rc5_cbc */ | ||
| 168 | 0x29,0x01,0x01,0x85,0x1A,0x01, /* [620] OBJ_rle_compression */ | ||
| 169 | 0x29,0x01,0x01,0x85,0x1A,0x02, /* [626] OBJ_zlib_compression */ | ||
| 170 | 0x55,0x1D,0x25, /* [632] OBJ_ext_key_usage */ | ||
| 171 | 0x2B,0x06,0x01,0x05,0x05,0x07, /* [635] OBJ_id_pkix */ | ||
| 172 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03, /* [641] OBJ_id_kp */ | ||
| 173 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x01, /* [648] OBJ_server_auth */ | ||
| 174 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x02, /* [656] OBJ_client_auth */ | ||
| 175 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x03, /* [664] OBJ_code_sign */ | ||
| 176 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x04, /* [672] OBJ_email_protect */ | ||
| 177 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x08, /* [680] OBJ_time_stamp */ | ||
| 178 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x15,/* [688] OBJ_ms_code_ind */ | ||
| 179 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x16,/* [698] OBJ_ms_code_com */ | ||
| 180 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x01,/* [708] OBJ_ms_ctl_sign */ | ||
| 181 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x03,/* [718] OBJ_ms_sgc */ | ||
| 182 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x04,/* [728] OBJ_ms_efs */ | ||
| 183 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x04,0x01,/* [738] OBJ_ns_sgc */ | ||
| 184 | 0x55,0x1D,0x1B, /* [747] OBJ_delta_crl */ | ||
| 185 | 0x55,0x1D,0x15, /* [750] OBJ_crl_reason */ | ||
| 186 | 0x55,0x1D,0x18, /* [753] OBJ_invalidity_date */ | ||
| 187 | 0x2B,0x65,0x01,0x04,0x01, /* [756] OBJ_sxnet */ | ||
| 188 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x01,/* [761] OBJ_pbe_WithSHA1And128BitRC4 */ | ||
| 189 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x02,/* [771] OBJ_pbe_WithSHA1And40BitRC4 */ | ||
| 190 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x03,/* [781] OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC */ | ||
| 191 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x04,/* [791] OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC */ | ||
| 192 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x05,/* [801] OBJ_pbe_WithSHA1And128BitRC2_CBC */ | ||
| 193 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x06,/* [811] OBJ_pbe_WithSHA1And40BitRC2_CBC */ | ||
| 194 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x01,/* [821] OBJ_keyBag */ | ||
| 195 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x02,/* [832] OBJ_pkcs8ShroudedKeyBag */ | ||
| 196 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x03,/* [843] OBJ_certBag */ | ||
| 197 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x04,/* [854] OBJ_crlBag */ | ||
| 198 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x05,/* [865] OBJ_secretBag */ | ||
| 199 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x06,/* [876] OBJ_safeContentsBag */ | ||
| 200 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x14,/* [887] OBJ_friendlyName */ | ||
| 201 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x15,/* [896] OBJ_localKeyID */ | ||
| 202 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x01,/* [905] OBJ_x509Certificate */ | ||
| 203 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x02,/* [915] OBJ_sdsiCertificate */ | ||
| 204 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x17,0x01,/* [925] OBJ_x509Crl */ | ||
| 205 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0D,/* [935] OBJ_pbes2 */ | ||
| 206 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0E,/* [944] OBJ_pbmac1 */ | ||
| 207 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x07, /* [953] OBJ_hmacWithSHA1 */ | ||
| 208 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x01, /* [961] OBJ_id_qt_cps */ | ||
| 209 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x02, /* [969] OBJ_id_qt_unotice */ | ||
| 210 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0F,/* [977] OBJ_SMIMECapabilities */ | ||
| 211 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x04,/* [986] OBJ_pbeWithMD2AndRC2_CBC */ | ||
| 212 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x06,/* [995] OBJ_pbeWithMD5AndRC2_CBC */ | ||
| 213 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0A,/* [1004] OBJ_pbeWithSHA1AndDES_CBC */ | ||
| 214 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x0E,/* [1013] OBJ_ms_ext_req */ | ||
| 215 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0E,/* [1023] OBJ_ext_req */ | ||
| 216 | 0x55,0x04,0x29, /* [1032] OBJ_name */ | ||
| 217 | 0x55,0x04,0x2E, /* [1035] OBJ_dnQualifier */ | ||
| 218 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01, /* [1038] OBJ_id_pe */ | ||
| 219 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30, /* [1045] OBJ_id_ad */ | ||
| 220 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x01, /* [1052] OBJ_info_access */ | ||
| 221 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01, /* [1060] OBJ_ad_OCSP */ | ||
| 222 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x02, /* [1068] OBJ_ad_ca_issuers */ | ||
| 223 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x09, /* [1076] OBJ_OCSP_sign */ | ||
| 224 | 0x28, /* [1084] OBJ_iso */ | ||
| 225 | 0x2A, /* [1085] OBJ_member_body */ | ||
| 226 | 0x2A,0x86,0x48, /* [1086] OBJ_ISO_US */ | ||
| 227 | 0x2A,0x86,0x48,0xCE,0x38, /* [1089] OBJ_X9_57 */ | ||
| 228 | 0x2A,0x86,0x48,0xCE,0x38,0x04, /* [1094] OBJ_X9cm */ | ||
| 229 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01, /* [1100] OBJ_pkcs1 */ | ||
| 230 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05, /* [1108] OBJ_pkcs5 */ | ||
| 231 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,/* [1116] OBJ_SMIME */ | ||
| 232 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,/* [1125] OBJ_id_smime_mod */ | ||
| 233 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,/* [1135] OBJ_id_smime_ct */ | ||
| 234 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,/* [1145] OBJ_id_smime_aa */ | ||
| 235 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,/* [1155] OBJ_id_smime_alg */ | ||
| 236 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,/* [1165] OBJ_id_smime_cd */ | ||
| 237 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,/* [1175] OBJ_id_smime_spq */ | ||
| 238 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,/* [1185] OBJ_id_smime_cti */ | ||
| 239 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x01,/* [1195] OBJ_id_smime_mod_cms */ | ||
| 240 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x02,/* [1206] OBJ_id_smime_mod_ess */ | ||
| 241 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x03,/* [1217] OBJ_id_smime_mod_oid */ | ||
| 242 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x04,/* [1228] OBJ_id_smime_mod_msg_v3 */ | ||
| 243 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x05,/* [1239] OBJ_id_smime_mod_ets_eSignature_88 */ | ||
| 244 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x06,/* [1250] OBJ_id_smime_mod_ets_eSignature_97 */ | ||
| 245 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x07,/* [1261] OBJ_id_smime_mod_ets_eSigPolicy_88 */ | ||
| 246 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x08,/* [1272] OBJ_id_smime_mod_ets_eSigPolicy_97 */ | ||
| 247 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x01,/* [1283] OBJ_id_smime_ct_receipt */ | ||
| 248 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x02,/* [1294] OBJ_id_smime_ct_authData */ | ||
| 249 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x03,/* [1305] OBJ_id_smime_ct_publishCert */ | ||
| 250 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x04,/* [1316] OBJ_id_smime_ct_TSTInfo */ | ||
| 251 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x05,/* [1327] OBJ_id_smime_ct_TDTInfo */ | ||
| 252 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x06,/* [1338] OBJ_id_smime_ct_contentInfo */ | ||
| 253 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x07,/* [1349] OBJ_id_smime_ct_DVCSRequestData */ | ||
| 254 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x08,/* [1360] OBJ_id_smime_ct_DVCSResponseData */ | ||
| 255 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x01,/* [1371] OBJ_id_smime_aa_receiptRequest */ | ||
| 256 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x02,/* [1382] OBJ_id_smime_aa_securityLabel */ | ||
| 257 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x03,/* [1393] OBJ_id_smime_aa_mlExpandHistory */ | ||
| 258 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x04,/* [1404] OBJ_id_smime_aa_contentHint */ | ||
| 259 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x05,/* [1415] OBJ_id_smime_aa_msgSigDigest */ | ||
| 260 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x06,/* [1426] OBJ_id_smime_aa_encapContentType */ | ||
| 261 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x07,/* [1437] OBJ_id_smime_aa_contentIdentifier */ | ||
| 262 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x08,/* [1448] OBJ_id_smime_aa_macValue */ | ||
| 263 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x09,/* [1459] OBJ_id_smime_aa_equivalentLabels */ | ||
| 264 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0A,/* [1470] OBJ_id_smime_aa_contentReference */ | ||
| 265 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0B,/* [1481] OBJ_id_smime_aa_encrypKeyPref */ | ||
| 266 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0C,/* [1492] OBJ_id_smime_aa_signingCertificate */ | ||
| 267 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0D,/* [1503] OBJ_id_smime_aa_smimeEncryptCerts */ | ||
| 268 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0E,/* [1514] OBJ_id_smime_aa_timeStampToken */ | ||
| 269 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0F,/* [1525] OBJ_id_smime_aa_ets_sigPolicyId */ | ||
| 270 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x10,/* [1536] OBJ_id_smime_aa_ets_commitmentType */ | ||
| 271 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x11,/* [1547] OBJ_id_smime_aa_ets_signerLocation */ | ||
| 272 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x12,/* [1558] OBJ_id_smime_aa_ets_signerAttr */ | ||
| 273 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x13,/* [1569] OBJ_id_smime_aa_ets_otherSigCert */ | ||
| 274 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x14,/* [1580] OBJ_id_smime_aa_ets_contentTimestamp */ | ||
| 275 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x15,/* [1591] OBJ_id_smime_aa_ets_CertificateRefs */ | ||
| 276 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x16,/* [1602] OBJ_id_smime_aa_ets_RevocationRefs */ | ||
| 277 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x17,/* [1613] OBJ_id_smime_aa_ets_certValues */ | ||
| 278 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x18,/* [1624] OBJ_id_smime_aa_ets_revocationValues */ | ||
| 279 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x19,/* [1635] OBJ_id_smime_aa_ets_escTimeStamp */ | ||
| 280 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1A,/* [1646] OBJ_id_smime_aa_ets_certCRLTimestamp */ | ||
| 281 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1B,/* [1657] OBJ_id_smime_aa_ets_archiveTimeStamp */ | ||
| 282 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1C,/* [1668] OBJ_id_smime_aa_signatureType */ | ||
| 283 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1D,/* [1679] OBJ_id_smime_aa_dvcs_dvc */ | ||
| 284 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x01,/* [1690] OBJ_id_smime_alg_ESDHwith3DES */ | ||
| 285 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x02,/* [1701] OBJ_id_smime_alg_ESDHwithRC2 */ | ||
| 286 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x03,/* [1712] OBJ_id_smime_alg_3DESwrap */ | ||
| 287 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x04,/* [1723] OBJ_id_smime_alg_RC2wrap */ | ||
| 288 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x05,/* [1734] OBJ_id_smime_alg_ESDH */ | ||
| 289 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x06,/* [1745] OBJ_id_smime_alg_CMS3DESwrap */ | ||
| 290 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x07,/* [1756] OBJ_id_smime_alg_CMSRC2wrap */ | ||
| 291 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,0x01,/* [1767] OBJ_id_smime_cd_ldap */ | ||
| 292 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x01,/* [1778] OBJ_id_smime_spq_ets_sqt_uri */ | ||
| 293 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x02,/* [1789] OBJ_id_smime_spq_ets_sqt_unotice */ | ||
| 294 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x01,/* [1800] OBJ_id_smime_cti_ets_proofOfOrigin */ | ||
| 295 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x02,/* [1811] OBJ_id_smime_cti_ets_proofOfReceipt */ | ||
| 296 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x03,/* [1822] OBJ_id_smime_cti_ets_proofOfDelivery */ | ||
| 297 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x04,/* [1833] OBJ_id_smime_cti_ets_proofOfSender */ | ||
| 298 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x05,/* [1844] OBJ_id_smime_cti_ets_proofOfApproval */ | ||
| 299 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x06,/* [1855] OBJ_id_smime_cti_ets_proofOfCreation */ | ||
| 300 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x04, /* [1866] OBJ_md4 */ | ||
| 301 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00, /* [1874] OBJ_id_pkix_mod */ | ||
| 302 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02, /* [1881] OBJ_id_qt */ | ||
| 303 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04, /* [1888] OBJ_id_it */ | ||
| 304 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05, /* [1895] OBJ_id_pkip */ | ||
| 305 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06, /* [1902] OBJ_id_alg */ | ||
| 306 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07, /* [1909] OBJ_id_cmc */ | ||
| 307 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x08, /* [1916] OBJ_id_on */ | ||
| 308 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09, /* [1923] OBJ_id_pda */ | ||
| 309 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A, /* [1930] OBJ_id_aca */ | ||
| 310 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0B, /* [1937] OBJ_id_qcs */ | ||
| 311 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C, /* [1944] OBJ_id_cct */ | ||
| 312 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x01, /* [1951] OBJ_id_pkix1_explicit_88 */ | ||
| 313 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x02, /* [1959] OBJ_id_pkix1_implicit_88 */ | ||
| 314 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x03, /* [1967] OBJ_id_pkix1_explicit_93 */ | ||
| 315 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x04, /* [1975] OBJ_id_pkix1_implicit_93 */ | ||
| 316 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x05, /* [1983] OBJ_id_mod_crmf */ | ||
| 317 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x06, /* [1991] OBJ_id_mod_cmc */ | ||
| 318 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x07, /* [1999] OBJ_id_mod_kea_profile_88 */ | ||
| 319 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x08, /* [2007] OBJ_id_mod_kea_profile_93 */ | ||
| 320 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x09, /* [2015] OBJ_id_mod_cmp */ | ||
| 321 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0A, /* [2023] OBJ_id_mod_qualified_cert_88 */ | ||
| 322 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0B, /* [2031] OBJ_id_mod_qualified_cert_93 */ | ||
| 323 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0C, /* [2039] OBJ_id_mod_attribute_cert */ | ||
| 324 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0D, /* [2047] OBJ_id_mod_timestamp_protocol */ | ||
| 325 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0E, /* [2055] OBJ_id_mod_ocsp */ | ||
| 326 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0F, /* [2063] OBJ_id_mod_dvcs */ | ||
| 327 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x10, /* [2071] OBJ_id_mod_cmp2000 */ | ||
| 328 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x02, /* [2079] OBJ_biometricInfo */ | ||
| 329 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x03, /* [2087] OBJ_qcStatements */ | ||
| 330 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x04, /* [2095] OBJ_ac_auditEntity */ | ||
| 331 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x05, /* [2103] OBJ_ac_targeting */ | ||
| 332 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x06, /* [2111] OBJ_aaControls */ | ||
| 333 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x07, /* [2119] OBJ_sbqp_ipAddrBlock */ | ||
| 334 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x08, /* [2127] OBJ_sbqp_autonomousSysNum */ | ||
| 335 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x09, /* [2135] OBJ_sbqp_routerIdentifier */ | ||
| 336 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x03, /* [2143] OBJ_textNotice */ | ||
| 337 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x05, /* [2151] OBJ_ipsecEndSystem */ | ||
| 338 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x06, /* [2159] OBJ_ipsecTunnel */ | ||
| 339 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x07, /* [2167] OBJ_ipsecUser */ | ||
| 340 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x0A, /* [2175] OBJ_dvcs */ | ||
| 341 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x01, /* [2183] OBJ_id_it_caProtEncCert */ | ||
| 342 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x02, /* [2191] OBJ_id_it_signKeyPairTypes */ | ||
| 343 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x03, /* [2199] OBJ_id_it_encKeyPairTypes */ | ||
| 344 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x04, /* [2207] OBJ_id_it_preferredSymmAlg */ | ||
| 345 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x05, /* [2215] OBJ_id_it_caKeyUpdateInfo */ | ||
| 346 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x06, /* [2223] OBJ_id_it_currentCRL */ | ||
| 347 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x07, /* [2231] OBJ_id_it_unsupportedOIDs */ | ||
| 348 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x08, /* [2239] OBJ_id_it_subscriptionRequest */ | ||
| 349 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x09, /* [2247] OBJ_id_it_subscriptionResponse */ | ||
| 350 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0A, /* [2255] OBJ_id_it_keyPairParamReq */ | ||
| 351 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0B, /* [2263] OBJ_id_it_keyPairParamRep */ | ||
| 352 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0C, /* [2271] OBJ_id_it_revPassphrase */ | ||
| 353 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0D, /* [2279] OBJ_id_it_implicitConfirm */ | ||
| 354 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0E, /* [2287] OBJ_id_it_confirmWaitTime */ | ||
| 355 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0F, /* [2295] OBJ_id_it_origPKIMessage */ | ||
| 356 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01, /* [2303] OBJ_id_regCtrl */ | ||
| 357 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02, /* [2311] OBJ_id_regInfo */ | ||
| 358 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x01,/* [2319] OBJ_id_regCtrl_regToken */ | ||
| 359 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x02,/* [2328] OBJ_id_regCtrl_authenticator */ | ||
| 360 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x03,/* [2337] OBJ_id_regCtrl_pkiPublicationInfo */ | ||
| 361 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x04,/* [2346] OBJ_id_regCtrl_pkiArchiveOptions */ | ||
| 362 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x05,/* [2355] OBJ_id_regCtrl_oldCertID */ | ||
| 363 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x06,/* [2364] OBJ_id_regCtrl_protocolEncrKey */ | ||
| 364 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x01,/* [2373] OBJ_id_regInfo_utf8Pairs */ | ||
| 365 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x02,/* [2382] OBJ_id_regInfo_certReq */ | ||
| 366 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x01, /* [2391] OBJ_id_alg_des40 */ | ||
| 367 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x02, /* [2399] OBJ_id_alg_noSignature */ | ||
| 368 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x03, /* [2407] OBJ_id_alg_dh_sig_hmac_sha1 */ | ||
| 369 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x04, /* [2415] OBJ_id_alg_dh_pop */ | ||
| 370 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x01, /* [2423] OBJ_id_cmc_statusInfo */ | ||
| 371 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x02, /* [2431] OBJ_id_cmc_identification */ | ||
| 372 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x03, /* [2439] OBJ_id_cmc_identityProof */ | ||
| 373 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x04, /* [2447] OBJ_id_cmc_dataReturn */ | ||
| 374 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x05, /* [2455] OBJ_id_cmc_transactionId */ | ||
| 375 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x06, /* [2463] OBJ_id_cmc_senderNonce */ | ||
| 376 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x07, /* [2471] OBJ_id_cmc_recipientNonce */ | ||
| 377 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x08, /* [2479] OBJ_id_cmc_addExtensions */ | ||
| 378 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x09, /* [2487] OBJ_id_cmc_encryptedPOP */ | ||
| 379 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0A, /* [2495] OBJ_id_cmc_decryptedPOP */ | ||
| 380 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0B, /* [2503] OBJ_id_cmc_lraPOPWitness */ | ||
| 381 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0F, /* [2511] OBJ_id_cmc_getCert */ | ||
| 382 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x10, /* [2519] OBJ_id_cmc_getCRL */ | ||
| 383 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x11, /* [2527] OBJ_id_cmc_revokeRequest */ | ||
| 384 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x12, /* [2535] OBJ_id_cmc_regInfo */ | ||
| 385 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x13, /* [2543] OBJ_id_cmc_responseInfo */ | ||
| 386 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x15, /* [2551] OBJ_id_cmc_queryPending */ | ||
| 387 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x16, /* [2559] OBJ_id_cmc_popLinkRandom */ | ||
| 388 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x17, /* [2567] OBJ_id_cmc_popLinkWitness */ | ||
| 389 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x18, /* [2575] OBJ_id_cmc_confirmCertAcceptance */ | ||
| 390 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x08,0x01, /* [2583] OBJ_id_on_personalData */ | ||
| 391 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x01, /* [2591] OBJ_id_pda_dateOfBirth */ | ||
| 392 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x02, /* [2599] OBJ_id_pda_placeOfBirth */ | ||
| 393 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x03, /* [2607] OBJ_id_pda_pseudonym */ | ||
| 394 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x04, /* [2615] OBJ_id_pda_gender */ | ||
| 395 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x05, /* [2623] OBJ_id_pda_countryOfCitizenship */ | ||
| 396 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x06, /* [2631] OBJ_id_pda_countryOfResidence */ | ||
| 397 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x01, /* [2639] OBJ_id_aca_authenticationInfo */ | ||
| 398 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x02, /* [2647] OBJ_id_aca_accessIdentity */ | ||
| 399 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x03, /* [2655] OBJ_id_aca_chargingIdentity */ | ||
| 400 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x04, /* [2663] OBJ_id_aca_group */ | ||
| 401 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x05, /* [2671] OBJ_id_aca_role */ | ||
| 402 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0B,0x01, /* [2679] OBJ_id_qcs_pkixQCSyntax_v1 */ | ||
| 403 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x01, /* [2687] OBJ_id_cct_crs */ | ||
| 404 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x02, /* [2695] OBJ_id_cct_PKIData */ | ||
| 405 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x03, /* [2703] OBJ_id_cct_PKIResponse */ | ||
| 406 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x03, /* [2711] OBJ_ad_timeStamping */ | ||
| 407 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x04, /* [2719] OBJ_ad_dvcs */ | ||
| 408 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x01,/* [2727] OBJ_id_pkix_OCSP_basic */ | ||
| 409 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x02,/* [2736] OBJ_id_pkix_OCSP_Nonce */ | ||
| 410 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x03,/* [2745] OBJ_id_pkix_OCSP_CrlID */ | ||
| 411 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x04,/* [2754] OBJ_id_pkix_OCSP_acceptableResponses */ | ||
| 412 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x05,/* [2763] OBJ_id_pkix_OCSP_noCheck */ | ||
| 413 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x06,/* [2772] OBJ_id_pkix_OCSP_archiveCutoff */ | ||
| 414 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x07,/* [2781] OBJ_id_pkix_OCSP_serviceLocator */ | ||
| 415 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x08,/* [2790] OBJ_id_pkix_OCSP_extendedStatus */ | ||
| 416 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x09,/* [2799] OBJ_id_pkix_OCSP_valid */ | ||
| 417 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0A,/* [2808] OBJ_id_pkix_OCSP_path */ | ||
| 418 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0B,/* [2817] OBJ_id_pkix_OCSP_trustRoot */ | ||
| 419 | 0x2B,0x0E,0x03,0x02, /* [2826] OBJ_algorithm */ | ||
| 420 | 0x2B,0x0E,0x03,0x02,0x0B, /* [2830] OBJ_rsaSignature */ | ||
| 421 | 0x55,0x08, /* [2835] OBJ_X500algorithms */ | ||
| 422 | 0x2B, /* [2837] OBJ_org */ | ||
| 423 | 0x2B,0x06, /* [2838] OBJ_dod */ | ||
| 424 | 0x2B,0x06,0x01, /* [2840] OBJ_iana */ | ||
| 425 | 0x2B,0x06,0x01,0x01, /* [2843] OBJ_Directory */ | ||
| 426 | 0x2B,0x06,0x01,0x02, /* [2847] OBJ_Management */ | ||
| 427 | 0x2B,0x06,0x01,0x03, /* [2851] OBJ_Experimental */ | ||
| 428 | 0x2B,0x06,0x01,0x04, /* [2855] OBJ_Private */ | ||
| 429 | 0x2B,0x06,0x01,0x05, /* [2859] OBJ_Security */ | ||
| 430 | 0x2B,0x06,0x01,0x06, /* [2863] OBJ_SNMPv2 */ | ||
| 431 | 0x2B,0x06,0x01,0x07, /* [2867] OBJ_Mail */ | ||
| 432 | 0x01, /* [2871] OBJ_Enterprises */ | ||
| 433 | 0xBA,0x82,0x58, /* [2872] OBJ_dcObject */ | ||
| 434 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,/* [2875] OBJ_domainComponent */ | ||
| 435 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0D,/* [2885] OBJ_Domain */ | ||
| 436 | }; | ||
| 437 | |||
| 438 | static ASN1_OBJECT nid_objs[NUM_NID]={ | ||
| 439 | {"UNDEF","undefined",NID_undef,1,&(lvalues[0]),0}, | ||
| 440 | {"rsadsi","RSA Data Security, Inc.",NID_rsadsi,6,&(lvalues[1]),0}, | ||
| 441 | {"pkcs","RSA Data Security, Inc. PKCS",NID_pkcs,7,&(lvalues[7]),0}, | ||
| 442 | {"MD2","md2",NID_md2,8,&(lvalues[14]),0}, | ||
| 443 | {"MD5","md5",NID_md5,8,&(lvalues[22]),0}, | ||
| 444 | {"RC4","rc4",NID_rc4,8,&(lvalues[30]),0}, | ||
| 445 | {"rsaEncryption","rsaEncryption",NID_rsaEncryption,9,&(lvalues[38]),0}, | ||
| 446 | {"RSA-MD2","md2WithRSAEncryption",NID_md2WithRSAEncryption,9, | ||
| 447 | &(lvalues[47]),0}, | ||
| 448 | {"RSA-MD5","md5WithRSAEncryption",NID_md5WithRSAEncryption,9, | ||
| 449 | &(lvalues[56]),0}, | ||
| 450 | {"PBE-MD2-DES","pbeWithMD2AndDES-CBC",NID_pbeWithMD2AndDES_CBC,9, | ||
| 451 | &(lvalues[65]),0}, | ||
| 452 | {"PBE-MD5-DES","pbeWithMD5AndDES-CBC",NID_pbeWithMD5AndDES_CBC,9, | ||
| 453 | &(lvalues[74]),0}, | ||
| 454 | {"X500","directory services (X.500)",NID_X500,1,&(lvalues[83]),0}, | ||
| 455 | {"X509","X509",NID_X509,2,&(lvalues[84]),0}, | ||
| 456 | {"CN","commonName",NID_commonName,3,&(lvalues[86]),0}, | ||
| 457 | {"C","countryName",NID_countryName,3,&(lvalues[89]),0}, | ||
| 458 | {"L","localityName",NID_localityName,3,&(lvalues[92]),0}, | ||
| 459 | {"ST","stateOrProvinceName",NID_stateOrProvinceName,3,&(lvalues[95]),0}, | ||
| 460 | {"O","organizationName",NID_organizationName,3,&(lvalues[98]),0}, | ||
| 461 | {"OU","organizationalUnitName",NID_organizationalUnitName,3, | ||
| 462 | &(lvalues[101]),0}, | ||
| 463 | {"RSA","rsa",NID_rsa,4,&(lvalues[104]),0}, | ||
| 464 | {"pkcs7","pkcs7",NID_pkcs7,8,&(lvalues[108]),0}, | ||
| 465 | {"pkcs7-data","pkcs7-data",NID_pkcs7_data,9,&(lvalues[116]),0}, | ||
| 466 | {"pkcs7-signedData","pkcs7-signedData",NID_pkcs7_signed,9, | ||
| 467 | &(lvalues[125]),0}, | ||
| 468 | {"pkcs7-envelopedData","pkcs7-envelopedData",NID_pkcs7_enveloped,9, | ||
| 469 | &(lvalues[134]),0}, | ||
| 470 | {"pkcs7-signedAndEnvelopedData","pkcs7-signedAndEnvelopedData", | ||
| 471 | NID_pkcs7_signedAndEnveloped,9,&(lvalues[143]),0}, | ||
| 472 | {"pkcs7-digestData","pkcs7-digestData",NID_pkcs7_digest,9, | ||
| 473 | &(lvalues[152]),0}, | ||
| 474 | {"pkcs7-encryptedData","pkcs7-encryptedData",NID_pkcs7_encrypted,9, | ||
| 475 | &(lvalues[161]),0}, | ||
| 476 | {"pkcs3","pkcs3",NID_pkcs3,8,&(lvalues[170]),0}, | ||
| 477 | {"dhKeyAgreement","dhKeyAgreement",NID_dhKeyAgreement,9, | ||
| 478 | &(lvalues[178]),0}, | ||
| 479 | {"DES-ECB","des-ecb",NID_des_ecb,5,&(lvalues[187]),0}, | ||
| 480 | {"DES-CFB","des-cfb",NID_des_cfb64,5,&(lvalues[192]),0}, | ||
| 481 | {"DES-CBC","des-cbc",NID_des_cbc,5,&(lvalues[197]),0}, | ||
| 482 | {"DES-EDE","des-ede",NID_des_ede,5,&(lvalues[202]),0}, | ||
| 483 | {"DES-EDE3","des-ede3",NID_des_ede3,0,NULL}, | ||
| 484 | {"IDEA-CBC","idea-cbc",NID_idea_cbc,11,&(lvalues[207]),0}, | ||
| 485 | {"IDEA-CFB","idea-cfb",NID_idea_cfb64,0,NULL}, | ||
| 486 | {"IDEA-ECB","idea-ecb",NID_idea_ecb,0,NULL}, | ||
| 487 | {"RC2-CBC","rc2-cbc",NID_rc2_cbc,8,&(lvalues[218]),0}, | ||
| 488 | {"RC2-ECB","rc2-ecb",NID_rc2_ecb,0,NULL}, | ||
| 489 | {"RC2-CFB","rc2-cfb",NID_rc2_cfb64,0,NULL}, | ||
| 490 | {"RC2-OFB","rc2-ofb",NID_rc2_ofb64,0,NULL}, | ||
| 491 | {"SHA","sha",NID_sha,5,&(lvalues[226]),0}, | ||
| 492 | {"RSA-SHA","shaWithRSAEncryption",NID_shaWithRSAEncryption,5, | ||
| 493 | &(lvalues[231]),0}, | ||
| 494 | {"DES-EDE-CBC","des-ede-cbc",NID_des_ede_cbc,0,NULL}, | ||
| 495 | {"DES-EDE3-CBC","des-ede3-cbc",NID_des_ede3_cbc,8,&(lvalues[236]),0}, | ||
| 496 | {"DES-OFB","des-ofb",NID_des_ofb64,5,&(lvalues[244]),0}, | ||
| 497 | {"IDEA-OFB","idea-ofb",NID_idea_ofb64,0,NULL}, | ||
| 498 | {"pkcs9","pkcs9",NID_pkcs9,8,&(lvalues[249]),0}, | ||
| 499 | {"Email","emailAddress",NID_pkcs9_emailAddress,9,&(lvalues[257]),0}, | ||
| 500 | {"unstructuredName","unstructuredName",NID_pkcs9_unstructuredName,9, | ||
| 501 | &(lvalues[266]),0}, | ||
| 502 | {"contentType","contentType",NID_pkcs9_contentType,9,&(lvalues[275]),0}, | ||
| 503 | {"messageDigest","messageDigest",NID_pkcs9_messageDigest,9, | ||
| 504 | &(lvalues[284]),0}, | ||
| 505 | {"signingTime","signingTime",NID_pkcs9_signingTime,9,&(lvalues[293]),0}, | ||
| 506 | {"countersignature","countersignature",NID_pkcs9_countersignature,9, | ||
| 507 | &(lvalues[302]),0}, | ||
| 508 | {"challengePassword","challengePassword",NID_pkcs9_challengePassword, | ||
| 509 | 9,&(lvalues[311]),0}, | ||
| 510 | {"unstructuredAddress","unstructuredAddress", | ||
| 511 | NID_pkcs9_unstructuredAddress,9,&(lvalues[320]),0}, | ||
| 512 | {"extendedCertificateAttributes","extendedCertificateAttributes", | ||
| 513 | NID_pkcs9_extCertAttributes,9,&(lvalues[329]),0}, | ||
| 514 | {"Netscape","Netscape Communications Corp.",NID_netscape,7, | ||
| 515 | &(lvalues[338]),0}, | ||
| 516 | {"nsCertExt","Netscape Certificate Extension", | ||
| 517 | NID_netscape_cert_extension,8,&(lvalues[345]),0}, | ||
| 518 | {"nsDataType","Netscape Data Type",NID_netscape_data_type,8, | ||
| 519 | &(lvalues[353]),0}, | ||
| 520 | {"DES-EDE-CFB","des-ede-cfb",NID_des_ede_cfb64,0,NULL}, | ||
| 521 | {"DES-EDE3-CFB","des-ede3-cfb",NID_des_ede3_cfb64,0,NULL}, | ||
| 522 | {"DES-EDE-OFB","des-ede-ofb",NID_des_ede_ofb64,0,NULL}, | ||
| 523 | {"DES-EDE3-OFB","des-ede3-ofb",NID_des_ede3_ofb64,0,NULL}, | ||
| 524 | {"SHA1","sha1",NID_sha1,5,&(lvalues[361]),0}, | ||
| 525 | {"RSA-SHA1","sha1WithRSAEncryption",NID_sha1WithRSAEncryption,9, | ||
| 526 | &(lvalues[366]),0}, | ||
| 527 | {"DSA-SHA","dsaWithSHA",NID_dsaWithSHA,5,&(lvalues[375]),0}, | ||
| 528 | {"DSA-old","dsaEncryption-old",NID_dsa_2,5,&(lvalues[380]),0}, | ||
| 529 | {"PBE-SHA1-RC2-64","pbeWithSHA1AndRC2-CBC",NID_pbeWithSHA1AndRC2_CBC, | ||
| 530 | 9,&(lvalues[385]),0}, | ||
| 531 | {"PBKDF2","PBKDF2",NID_id_pbkdf2,9,&(lvalues[394]),0}, | ||
| 532 | {"DSA-SHA1-old","dsaWithSHA1-old",NID_dsaWithSHA1_2,5,&(lvalues[403]),0}, | ||
| 533 | {"nsCertType","Netscape Cert Type",NID_netscape_cert_type,9, | ||
| 534 | &(lvalues[408]),0}, | ||
| 535 | {"nsBaseUrl","Netscape Base Url",NID_netscape_base_url,9, | ||
| 536 | &(lvalues[417]),0}, | ||
| 537 | {"nsRevocationUrl","Netscape Revocation Url", | ||
| 538 | NID_netscape_revocation_url,9,&(lvalues[426]),0}, | ||
| 539 | {"nsCaRevocationUrl","Netscape CA Revocation Url", | ||
| 540 | NID_netscape_ca_revocation_url,9,&(lvalues[435]),0}, | ||
| 541 | {"nsRenewalUrl","Netscape Renewal Url",NID_netscape_renewal_url,9, | ||
| 542 | &(lvalues[444]),0}, | ||
| 543 | {"nsCaPolicyUrl","Netscape CA Policy Url",NID_netscape_ca_policy_url, | ||
| 544 | 9,&(lvalues[453]),0}, | ||
| 545 | {"nsSslServerName","Netscape SSL Server Name", | ||
| 546 | NID_netscape_ssl_server_name,9,&(lvalues[462]),0}, | ||
| 547 | {"nsComment","Netscape Comment",NID_netscape_comment,9,&(lvalues[471]),0}, | ||
| 548 | {"nsCertSequence","Netscape Certificate Sequence", | ||
| 549 | NID_netscape_cert_sequence,9,&(lvalues[480]),0}, | ||
| 550 | {"DESX-CBC","desx-cbc",NID_desx_cbc,0,NULL}, | ||
| 551 | {"id-ce","id-ce",NID_id_ce,2,&(lvalues[489]),0}, | ||
| 552 | {"subjectKeyIdentifier","X509v3 Subject Key Identifier", | ||
| 553 | NID_subject_key_identifier,3,&(lvalues[491]),0}, | ||
| 554 | {"keyUsage","X509v3 Key Usage",NID_key_usage,3,&(lvalues[494]),0}, | ||
| 555 | {"privateKeyUsagePeriod","X509v3 Private Key Usage Period", | ||
| 556 | NID_private_key_usage_period,3,&(lvalues[497]),0}, | ||
| 557 | {"subjectAltName","X509v3 Subject Alternative Name", | ||
| 558 | NID_subject_alt_name,3,&(lvalues[500]),0}, | ||
| 559 | {"issuerAltName","X509v3 Issuer Alternative Name",NID_issuer_alt_name, | ||
| 560 | 3,&(lvalues[503]),0}, | ||
| 561 | {"basicConstraints","X509v3 Basic Constraints",NID_basic_constraints, | ||
| 562 | 3,&(lvalues[506]),0}, | ||
| 563 | {"crlNumber","X509v3 CRL Number",NID_crl_number,3,&(lvalues[509]),0}, | ||
| 564 | {"certificatePolicies","X509v3 Certificate Policies", | ||
| 565 | NID_certificate_policies,3,&(lvalues[512]),0}, | ||
| 566 | {"authorityKeyIdentifier","X509v3 Authority Key Identifier", | ||
| 567 | NID_authority_key_identifier,3,&(lvalues[515]),0}, | ||
| 568 | {"BF-CBC","bf-cbc",NID_bf_cbc,9,&(lvalues[518]),0}, | ||
| 569 | {"BF-ECB","bf-ecb",NID_bf_ecb,0,NULL}, | ||
| 570 | {"BF-CFB","bf-cfb",NID_bf_cfb64,0,NULL}, | ||
| 571 | {"BF-OFB","bf-ofb",NID_bf_ofb64,0,NULL}, | ||
| 572 | {"MDC2","mdc2",NID_mdc2,4,&(lvalues[527]),0}, | ||
| 573 | {"RSA-MDC2","mdc2WithRSA",NID_mdc2WithRSA,4,&(lvalues[531]),0}, | ||
| 574 | {"RC4-40","rc4-40",NID_rc4_40,0,NULL}, | ||
| 575 | {"RC2-40-CBC","rc2-40-cbc",NID_rc2_40_cbc,0,NULL}, | ||
| 576 | {"G","givenName",NID_givenName,3,&(lvalues[535]),0}, | ||
| 577 | {"S","surname",NID_surname,3,&(lvalues[538]),0}, | ||
| 578 | {"I","initials",NID_initials,3,&(lvalues[541]),0}, | ||
| 579 | {"UID","uniqueIdentifier",NID_uniqueIdentifier,3,&(lvalues[544]),0}, | ||
| 580 | {"crlDistributionPoints","X509v3 CRL Distribution Points", | ||
| 581 | NID_crl_distribution_points,3,&(lvalues[547]),0}, | ||
| 582 | {"RSA-NP-MD5","md5WithRSA",NID_md5WithRSA,5,&(lvalues[550]),0}, | ||
| 583 | {"SN","serialNumber",NID_serialNumber,3,&(lvalues[555]),0}, | ||
| 584 | {"T","title",NID_title,3,&(lvalues[558]),0}, | ||
| 585 | {"D","description",NID_description,3,&(lvalues[561]),0}, | ||
| 586 | {"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[564]),0}, | ||
| 587 | {"CAST5-ECB","cast5-ecb",NID_cast5_ecb,0,NULL}, | ||
| 588 | {"CAST5-CFB","cast5-cfb",NID_cast5_cfb64,0,NULL}, | ||
| 589 | {"CAST5-OFB","cast5-ofb",NID_cast5_ofb64,0,NULL}, | ||
| 590 | {"pbeWithMD5AndCast5CBC","pbeWithMD5AndCast5CBC", | ||
| 591 | NID_pbeWithMD5AndCast5_CBC,9,&(lvalues[573]),0}, | ||
| 592 | {"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[582]),0}, | ||
| 593 | {"MD5-SHA1","md5-sha1",NID_md5_sha1,0,NULL}, | ||
| 594 | {"RSA-SHA1-2","sha1WithRSA",NID_sha1WithRSA,5,&(lvalues[589]),0}, | ||
| 595 | {"DSA","dsaEncryption",NID_dsa,7,&(lvalues[594]),0}, | ||
| 596 | {"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[601]),0}, | ||
| 597 | {NULL,NULL,NID_undef,0,NULL}, | ||
| 598 | {"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6, | ||
| 599 | &(lvalues[606]),0}, | ||
| 600 | {"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[612]),0}, | ||
| 601 | {"RC5-ECB","rc5-ecb",NID_rc5_ecb,0,NULL}, | ||
| 602 | {"RC5-CFB","rc5-cfb",NID_rc5_cfb64,0,NULL}, | ||
| 603 | {"RC5-OFB","rc5-ofb",NID_rc5_ofb64,0,NULL}, | ||
| 604 | {"RLE","run length compression",NID_rle_compression,6,&(lvalues[620]),0}, | ||
| 605 | {"ZLIB","zlib compression",NID_zlib_compression,6,&(lvalues[626]),0}, | ||
| 606 | {"extendedKeyUsage","X509v3 Extended Key Usage",NID_ext_key_usage,3, | ||
| 607 | &(lvalues[632]),0}, | ||
| 608 | {"PKIX","PKIX",NID_id_pkix,6,&(lvalues[635]),0}, | ||
| 609 | {"id-kp","id-kp",NID_id_kp,7,&(lvalues[641]),0}, | ||
| 610 | {"serverAuth","TLS Web Server Authentication",NID_server_auth,8, | ||
| 611 | &(lvalues[648]),0}, | ||
| 612 | {"clientAuth","TLS Web Client Authentication",NID_client_auth,8, | ||
| 613 | &(lvalues[656]),0}, | ||
| 614 | {"codeSigning","Code Signing",NID_code_sign,8,&(lvalues[664]),0}, | ||
| 615 | {"emailProtection","E-mail Protection",NID_email_protect,8, | ||
| 616 | &(lvalues[672]),0}, | ||
| 617 | {"timeStamping","Time Stamping",NID_time_stamp,8,&(lvalues[680]),0}, | ||
| 618 | {"msCodeInd","Microsoft Individual Code Signing",NID_ms_code_ind,10, | ||
| 619 | &(lvalues[688]),0}, | ||
| 620 | {"msCodeCom","Microsoft Commercial Code Signing",NID_ms_code_com,10, | ||
| 621 | &(lvalues[698]),0}, | ||
| 622 | {"msCTLSign","Microsoft Trust List Signing",NID_ms_ctl_sign,10, | ||
| 623 | &(lvalues[708]),0}, | ||
| 624 | {"msSGC","Microsoft Server Gated Crypto",NID_ms_sgc,10,&(lvalues[718]),0}, | ||
| 625 | {"msEFS","Microsoft Encrypted File System",NID_ms_efs,10, | ||
| 626 | &(lvalues[728]),0}, | ||
| 627 | {"nsSGC","Netscape Server Gated Crypto",NID_ns_sgc,9,&(lvalues[738]),0}, | ||
| 628 | {"deltaCRL","X509v3 Delta CRL Indicator",NID_delta_crl,3, | ||
| 629 | &(lvalues[747]),0}, | ||
| 630 | {"CRLReason","X509v3 CRL Reason Code",NID_crl_reason,3,&(lvalues[750]),0}, | ||
| 631 | {"invalidityDate","Invalidity Date",NID_invalidity_date,3, | ||
| 632 | &(lvalues[753]),0}, | ||
| 633 | {"SXNetID","Strong Extranet ID",NID_sxnet,5,&(lvalues[756]),0}, | ||
| 634 | {"PBE-SHA1-RC4-128","pbeWithSHA1And128BitRC4", | ||
| 635 | NID_pbe_WithSHA1And128BitRC4,10,&(lvalues[761]),0}, | ||
| 636 | {"PBE-SHA1-RC4-40","pbeWithSHA1And40BitRC4", | ||
| 637 | NID_pbe_WithSHA1And40BitRC4,10,&(lvalues[771]),0}, | ||
| 638 | {"PBE-SHA1-3DES","pbeWithSHA1And3-KeyTripleDES-CBC", | ||
| 639 | NID_pbe_WithSHA1And3_Key_TripleDES_CBC,10,&(lvalues[781]),0}, | ||
| 640 | {"PBE-SHA1-2DES","pbeWithSHA1And2-KeyTripleDES-CBC", | ||
| 641 | NID_pbe_WithSHA1And2_Key_TripleDES_CBC,10,&(lvalues[791]),0}, | ||
| 642 | {"PBE-SHA1-RC2-128","pbeWithSHA1And128BitRC2-CBC", | ||
| 643 | NID_pbe_WithSHA1And128BitRC2_CBC,10,&(lvalues[801]),0}, | ||
| 644 | {"PBE-SHA1-RC2-40","pbeWithSHA1And40BitRC2-CBC", | ||
| 645 | NID_pbe_WithSHA1And40BitRC2_CBC,10,&(lvalues[811]),0}, | ||
| 646 | {"keyBag","keyBag",NID_keyBag,11,&(lvalues[821]),0}, | ||
| 647 | {"pkcs8ShroudedKeyBag","pkcs8ShroudedKeyBag",NID_pkcs8ShroudedKeyBag, | ||
| 648 | 11,&(lvalues[832]),0}, | ||
| 649 | {"certBag","certBag",NID_certBag,11,&(lvalues[843]),0}, | ||
| 650 | {"crlBag","crlBag",NID_crlBag,11,&(lvalues[854]),0}, | ||
| 651 | {"secretBag","secretBag",NID_secretBag,11,&(lvalues[865]),0}, | ||
| 652 | {"safeContentsBag","safeContentsBag",NID_safeContentsBag,11, | ||
| 653 | &(lvalues[876]),0}, | ||
| 654 | {"friendlyName","friendlyName",NID_friendlyName,9,&(lvalues[887]),0}, | ||
| 655 | {"localKeyID","localKeyID",NID_localKeyID,9,&(lvalues[896]),0}, | ||
| 656 | {"x509Certificate","x509Certificate",NID_x509Certificate,10, | ||
| 657 | &(lvalues[905]),0}, | ||
| 658 | {"sdsiCertificate","sdsiCertificate",NID_sdsiCertificate,10, | ||
| 659 | &(lvalues[915]),0}, | ||
| 660 | {"x509Crl","x509Crl",NID_x509Crl,10,&(lvalues[925]),0}, | ||
| 661 | {"PBES2","PBES2",NID_pbes2,9,&(lvalues[935]),0}, | ||
| 662 | {"PBMAC1","PBMAC1",NID_pbmac1,9,&(lvalues[944]),0}, | ||
| 663 | {"hmacWithSHA1","hmacWithSHA1",NID_hmacWithSHA1,8,&(lvalues[953]),0}, | ||
| 664 | {"id-qt-cps","Policy Qualifier CPS",NID_id_qt_cps,8,&(lvalues[961]),0}, | ||
| 665 | {"id-qt-unotice","Policy Qualifier User Notice",NID_id_qt_unotice,8, | ||
| 666 | &(lvalues[969]),0}, | ||
| 667 | {"RC2-64-CBC","rc2-64-cbc",NID_rc2_64_cbc,0,NULL}, | ||
| 668 | {"SMIME-CAPS","S/MIME Capabilities",NID_SMIMECapabilities,9, | ||
| 669 | &(lvalues[977]),0}, | ||
| 670 | {"PBE-MD2-RC2-64","pbeWithMD2AndRC2-CBC",NID_pbeWithMD2AndRC2_CBC,9, | ||
| 671 | &(lvalues[986]),0}, | ||
| 672 | {"PBE-MD5-RC2-64","pbeWithMD5AndRC2-CBC",NID_pbeWithMD5AndRC2_CBC,9, | ||
| 673 | &(lvalues[995]),0}, | ||
| 674 | {"PBE-SHA1-DES","pbeWithSHA1AndDES-CBC",NID_pbeWithSHA1AndDES_CBC,9, | ||
| 675 | &(lvalues[1004]),0}, | ||
| 676 | {"msExtReq","Microsoft Extension Request",NID_ms_ext_req,10, | ||
| 677 | &(lvalues[1013]),0}, | ||
| 678 | {"extReq","Extension Request",NID_ext_req,9,&(lvalues[1023]),0}, | ||
| 679 | {"name","name",NID_name,3,&(lvalues[1032]),0}, | ||
| 680 | {"dnQualifier","dnQualifier",NID_dnQualifier,3,&(lvalues[1035]),0}, | ||
| 681 | {"id-pe","id-pe",NID_id_pe,7,&(lvalues[1038]),0}, | ||
| 682 | {"id-ad","id-ad",NID_id_ad,7,&(lvalues[1045]),0}, | ||
| 683 | {"authorityInfoAccess","Authority Information Access",NID_info_access, | ||
| 684 | 8,&(lvalues[1052]),0}, | ||
| 685 | {"OCSP","OCSP",NID_ad_OCSP,8,&(lvalues[1060]),0}, | ||
| 686 | {"caIssuers","CA Issuers",NID_ad_ca_issuers,8,&(lvalues[1068]),0}, | ||
| 687 | {"OCSPSigning","OCSP Signing",NID_OCSP_sign,8,&(lvalues[1076]),0}, | ||
| 688 | {"ISO","iso",NID_iso,1,&(lvalues[1084]),0}, | ||
| 689 | {"member-body","ISO Member Body",NID_member_body,1,&(lvalues[1085]),0}, | ||
| 690 | {"ISO-US","ISO US Member Body",NID_ISO_US,3,&(lvalues[1086]),0}, | ||
| 691 | {"X9-57","X9.57",NID_X9_57,5,&(lvalues[1089]),0}, | ||
| 692 | {"X9cm","X9.57 CM ?",NID_X9cm,6,&(lvalues[1094]),0}, | ||
| 693 | {"pkcs1","pkcs1",NID_pkcs1,8,&(lvalues[1100]),0}, | ||
| 694 | {"pkcs5","pkcs5",NID_pkcs5,8,&(lvalues[1108]),0}, | ||
| 695 | {"SMIME","S/MIME",NID_SMIME,9,&(lvalues[1116]),0}, | ||
| 696 | {"id-smime-mod","id-smime-mod",NID_id_smime_mod,10,&(lvalues[1125]),0}, | ||
| 697 | {"id-smime-ct","id-smime-ct",NID_id_smime_ct,10,&(lvalues[1135]),0}, | ||
| 698 | {"id-smime-aa","id-smime-aa",NID_id_smime_aa,10,&(lvalues[1145]),0}, | ||
| 699 | {"id-smime-alg","id-smime-alg",NID_id_smime_alg,10,&(lvalues[1155]),0}, | ||
| 700 | {"id-smime-cd","id-smime-cd",NID_id_smime_cd,10,&(lvalues[1165]),0}, | ||
| 701 | {"id-smime-spq","id-smime-spq",NID_id_smime_spq,10,&(lvalues[1175]),0}, | ||
| 702 | {"id-smime-cti","id-smime-cti",NID_id_smime_cti,10,&(lvalues[1185]),0}, | ||
| 703 | {"id-smime-mod-cms","id-smime-mod-cms",NID_id_smime_mod_cms,11, | ||
| 704 | &(lvalues[1195]),0}, | ||
| 705 | {"id-smime-mod-ess","id-smime-mod-ess",NID_id_smime_mod_ess,11, | ||
| 706 | &(lvalues[1206]),0}, | ||
| 707 | {"id-smime-mod-oid","id-smime-mod-oid",NID_id_smime_mod_oid,11, | ||
| 708 | &(lvalues[1217]),0}, | ||
| 709 | {"id-smime-mod-msg-v3","id-smime-mod-msg-v3",NID_id_smime_mod_msg_v3, | ||
| 710 | 11,&(lvalues[1228]),0}, | ||
| 711 | {"id-smime-mod-ets-eSignature-88","id-smime-mod-ets-eSignature-88", | ||
| 712 | NID_id_smime_mod_ets_eSignature_88,11,&(lvalues[1239]),0}, | ||
| 713 | {"id-smime-mod-ets-eSignature-97","id-smime-mod-ets-eSignature-97", | ||
| 714 | NID_id_smime_mod_ets_eSignature_97,11,&(lvalues[1250]),0}, | ||
| 715 | {"id-smime-mod-ets-eSigPolicy-88","id-smime-mod-ets-eSigPolicy-88", | ||
| 716 | NID_id_smime_mod_ets_eSigPolicy_88,11,&(lvalues[1261]),0}, | ||
| 717 | {"id-smime-mod-ets-eSigPolicy-97","id-smime-mod-ets-eSigPolicy-97", | ||
| 718 | NID_id_smime_mod_ets_eSigPolicy_97,11,&(lvalues[1272]),0}, | ||
| 719 | {"id-smime-ct-receipt","id-smime-ct-receipt",NID_id_smime_ct_receipt, | ||
| 720 | 11,&(lvalues[1283]),0}, | ||
| 721 | {"id-smime-ct-authData","id-smime-ct-authData", | ||
| 722 | NID_id_smime_ct_authData,11,&(lvalues[1294]),0}, | ||
| 723 | {"id-smime-ct-publishCert","id-smime-ct-publishCert", | ||
| 724 | NID_id_smime_ct_publishCert,11,&(lvalues[1305]),0}, | ||
| 725 | {"id-smime-ct-TSTInfo","id-smime-ct-TSTInfo",NID_id_smime_ct_TSTInfo, | ||
| 726 | 11,&(lvalues[1316]),0}, | ||
| 727 | {"id-smime-ct-TDTInfo","id-smime-ct-TDTInfo",NID_id_smime_ct_TDTInfo, | ||
| 728 | 11,&(lvalues[1327]),0}, | ||
| 729 | {"id-smime-ct-contentInfo","id-smime-ct-contentInfo", | ||
| 730 | NID_id_smime_ct_contentInfo,11,&(lvalues[1338]),0}, | ||
| 731 | {"id-smime-ct-DVCSRequestData","id-smime-ct-DVCSRequestData", | ||
| 732 | NID_id_smime_ct_DVCSRequestData,11,&(lvalues[1349]),0}, | ||
| 733 | {"id-smime-ct-DVCSResponseData","id-smime-ct-DVCSResponseData", | ||
| 734 | NID_id_smime_ct_DVCSResponseData,11,&(lvalues[1360]),0}, | ||
| 735 | {"id-smime-aa-receiptRequest","id-smime-aa-receiptRequest", | ||
| 736 | NID_id_smime_aa_receiptRequest,11,&(lvalues[1371]),0}, | ||
| 737 | {"id-smime-aa-securityLabel","id-smime-aa-securityLabel", | ||
| 738 | NID_id_smime_aa_securityLabel,11,&(lvalues[1382]),0}, | ||
| 739 | {"id-smime-aa-mlExpandHistory","id-smime-aa-mlExpandHistory", | ||
| 740 | NID_id_smime_aa_mlExpandHistory,11,&(lvalues[1393]),0}, | ||
| 741 | {"id-smime-aa-contentHint","id-smime-aa-contentHint", | ||
| 742 | NID_id_smime_aa_contentHint,11,&(lvalues[1404]),0}, | ||
| 743 | {"id-smime-aa-msgSigDigest","id-smime-aa-msgSigDigest", | ||
| 744 | NID_id_smime_aa_msgSigDigest,11,&(lvalues[1415]),0}, | ||
| 745 | {"id-smime-aa-encapContentType","id-smime-aa-encapContentType", | ||
| 746 | NID_id_smime_aa_encapContentType,11,&(lvalues[1426]),0}, | ||
| 747 | {"id-smime-aa-contentIdentifier","id-smime-aa-contentIdentifier", | ||
| 748 | NID_id_smime_aa_contentIdentifier,11,&(lvalues[1437]),0}, | ||
| 749 | {"id-smime-aa-macValue","id-smime-aa-macValue", | ||
| 750 | NID_id_smime_aa_macValue,11,&(lvalues[1448]),0}, | ||
| 751 | {"id-smime-aa-equivalentLabels","id-smime-aa-equivalentLabels", | ||
| 752 | NID_id_smime_aa_equivalentLabels,11,&(lvalues[1459]),0}, | ||
| 753 | {"id-smime-aa-contentReference","id-smime-aa-contentReference", | ||
| 754 | NID_id_smime_aa_contentReference,11,&(lvalues[1470]),0}, | ||
| 755 | {"id-smime-aa-encrypKeyPref","id-smime-aa-encrypKeyPref", | ||
| 756 | NID_id_smime_aa_encrypKeyPref,11,&(lvalues[1481]),0}, | ||
| 757 | {"id-smime-aa-signingCertificate","id-smime-aa-signingCertificate", | ||
| 758 | NID_id_smime_aa_signingCertificate,11,&(lvalues[1492]),0}, | ||
| 759 | {"id-smime-aa-smimeEncryptCerts","id-smime-aa-smimeEncryptCerts", | ||
| 760 | NID_id_smime_aa_smimeEncryptCerts,11,&(lvalues[1503]),0}, | ||
| 761 | {"id-smime-aa-timeStampToken","id-smime-aa-timeStampToken", | ||
| 762 | NID_id_smime_aa_timeStampToken,11,&(lvalues[1514]),0}, | ||
| 763 | {"id-smime-aa-ets-sigPolicyId","id-smime-aa-ets-sigPolicyId", | ||
| 764 | NID_id_smime_aa_ets_sigPolicyId,11,&(lvalues[1525]),0}, | ||
| 765 | {"id-smime-aa-ets-commitmentType","id-smime-aa-ets-commitmentType", | ||
| 766 | NID_id_smime_aa_ets_commitmentType,11,&(lvalues[1536]),0}, | ||
| 767 | {"id-smime-aa-ets-signerLocation","id-smime-aa-ets-signerLocation", | ||
| 768 | NID_id_smime_aa_ets_signerLocation,11,&(lvalues[1547]),0}, | ||
| 769 | {"id-smime-aa-ets-signerAttr","id-smime-aa-ets-signerAttr", | ||
| 770 | NID_id_smime_aa_ets_signerAttr,11,&(lvalues[1558]),0}, | ||
| 771 | {"id-smime-aa-ets-otherSigCert","id-smime-aa-ets-otherSigCert", | ||
| 772 | NID_id_smime_aa_ets_otherSigCert,11,&(lvalues[1569]),0}, | ||
| 773 | {"id-smime-aa-ets-contentTimestamp", | ||
| 774 | "id-smime-aa-ets-contentTimestamp", | ||
| 775 | NID_id_smime_aa_ets_contentTimestamp,11,&(lvalues[1580]),0}, | ||
| 776 | {"id-smime-aa-ets-CertificateRefs","id-smime-aa-ets-CertificateRefs", | ||
| 777 | NID_id_smime_aa_ets_CertificateRefs,11,&(lvalues[1591]),0}, | ||
| 778 | {"id-smime-aa-ets-RevocationRefs","id-smime-aa-ets-RevocationRefs", | ||
| 779 | NID_id_smime_aa_ets_RevocationRefs,11,&(lvalues[1602]),0}, | ||
| 780 | {"id-smime-aa-ets-certValues","id-smime-aa-ets-certValues", | ||
| 781 | NID_id_smime_aa_ets_certValues,11,&(lvalues[1613]),0}, | ||
| 782 | {"id-smime-aa-ets-revocationValues", | ||
| 783 | "id-smime-aa-ets-revocationValues", | ||
| 784 | NID_id_smime_aa_ets_revocationValues,11,&(lvalues[1624]),0}, | ||
| 785 | {"id-smime-aa-ets-escTimeStamp","id-smime-aa-ets-escTimeStamp", | ||
| 786 | NID_id_smime_aa_ets_escTimeStamp,11,&(lvalues[1635]),0}, | ||
| 787 | {"id-smime-aa-ets-certCRLTimestamp", | ||
| 788 | "id-smime-aa-ets-certCRLTimestamp", | ||
| 789 | NID_id_smime_aa_ets_certCRLTimestamp,11,&(lvalues[1646]),0}, | ||
| 790 | {"id-smime-aa-ets-archiveTimeStamp", | ||
| 791 | "id-smime-aa-ets-archiveTimeStamp", | ||
| 792 | NID_id_smime_aa_ets_archiveTimeStamp,11,&(lvalues[1657]),0}, | ||
| 793 | {"id-smime-aa-signatureType","id-smime-aa-signatureType", | ||
| 794 | NID_id_smime_aa_signatureType,11,&(lvalues[1668]),0}, | ||
| 795 | {"id-smime-aa-dvcs-dvc","id-smime-aa-dvcs-dvc", | ||
| 796 | NID_id_smime_aa_dvcs_dvc,11,&(lvalues[1679]),0}, | ||
| 797 | {"id-smime-alg-ESDHwith3DES","id-smime-alg-ESDHwith3DES", | ||
| 798 | NID_id_smime_alg_ESDHwith3DES,11,&(lvalues[1690]),0}, | ||
| 799 | {"id-smime-alg-ESDHwithRC2","id-smime-alg-ESDHwithRC2", | ||
| 800 | NID_id_smime_alg_ESDHwithRC2,11,&(lvalues[1701]),0}, | ||
| 801 | {"id-smime-alg-3DESwrap","id-smime-alg-3DESwrap", | ||
| 802 | NID_id_smime_alg_3DESwrap,11,&(lvalues[1712]),0}, | ||
| 803 | {"id-smime-alg-RC2wrap","id-smime-alg-RC2wrap", | ||
| 804 | NID_id_smime_alg_RC2wrap,11,&(lvalues[1723]),0}, | ||
| 805 | {"id-smime-alg-ESDH","id-smime-alg-ESDH",NID_id_smime_alg_ESDH,11, | ||
| 806 | &(lvalues[1734]),0}, | ||
| 807 | {"id-smime-alg-CMS3DESwrap","id-smime-alg-CMS3DESwrap", | ||
| 808 | NID_id_smime_alg_CMS3DESwrap,11,&(lvalues[1745]),0}, | ||
| 809 | {"id-smime-alg-CMSRC2wrap","id-smime-alg-CMSRC2wrap", | ||
| 810 | NID_id_smime_alg_CMSRC2wrap,11,&(lvalues[1756]),0}, | ||
| 811 | {"id-smime-cd-ldap","id-smime-cd-ldap",NID_id_smime_cd_ldap,11, | ||
| 812 | &(lvalues[1767]),0}, | ||
| 813 | {"id-smime-spq-ets-sqt-uri","id-smime-spq-ets-sqt-uri", | ||
| 814 | NID_id_smime_spq_ets_sqt_uri,11,&(lvalues[1778]),0}, | ||
| 815 | {"id-smime-spq-ets-sqt-unotice","id-smime-spq-ets-sqt-unotice", | ||
| 816 | NID_id_smime_spq_ets_sqt_unotice,11,&(lvalues[1789]),0}, | ||
| 817 | {"id-smime-cti-ets-proofOfOrigin","id-smime-cti-ets-proofOfOrigin", | ||
| 818 | NID_id_smime_cti_ets_proofOfOrigin,11,&(lvalues[1800]),0}, | ||
| 819 | {"id-smime-cti-ets-proofOfReceipt","id-smime-cti-ets-proofOfReceipt", | ||
| 820 | NID_id_smime_cti_ets_proofOfReceipt,11,&(lvalues[1811]),0}, | ||
| 821 | {"id-smime-cti-ets-proofOfDelivery", | ||
| 822 | "id-smime-cti-ets-proofOfDelivery", | ||
| 823 | NID_id_smime_cti_ets_proofOfDelivery,11,&(lvalues[1822]),0}, | ||
| 824 | {"id-smime-cti-ets-proofOfSender","id-smime-cti-ets-proofOfSender", | ||
| 825 | NID_id_smime_cti_ets_proofOfSender,11,&(lvalues[1833]),0}, | ||
| 826 | {"id-smime-cti-ets-proofOfApproval", | ||
| 827 | "id-smime-cti-ets-proofOfApproval", | ||
| 828 | NID_id_smime_cti_ets_proofOfApproval,11,&(lvalues[1844]),0}, | ||
| 829 | {"id-smime-cti-ets-proofOfCreation", | ||
| 830 | "id-smime-cti-ets-proofOfCreation", | ||
| 831 | NID_id_smime_cti_ets_proofOfCreation,11,&(lvalues[1855]),0}, | ||
| 832 | {"MD4","md4",NID_md4,8,&(lvalues[1866]),0}, | ||
| 833 | {"id-pkix-mod","id-pkix-mod",NID_id_pkix_mod,7,&(lvalues[1874]),0}, | ||
| 834 | {"id-qt","id-qt",NID_id_qt,7,&(lvalues[1881]),0}, | ||
| 835 | {"id-it","id-it",NID_id_it,7,&(lvalues[1888]),0}, | ||
| 836 | {"id-pkip","id-pkip",NID_id_pkip,7,&(lvalues[1895]),0}, | ||
| 837 | {"id-alg","id-alg",NID_id_alg,7,&(lvalues[1902]),0}, | ||
| 838 | {"id-cmc","id-cmc",NID_id_cmc,7,&(lvalues[1909]),0}, | ||
| 839 | {"id-on","id-on",NID_id_on,7,&(lvalues[1916]),0}, | ||
| 840 | {"id-pda","id-pda",NID_id_pda,7,&(lvalues[1923]),0}, | ||
| 841 | {"id-aca","id-aca",NID_id_aca,7,&(lvalues[1930]),0}, | ||
| 842 | {"id-qcs","id-qcs",NID_id_qcs,7,&(lvalues[1937]),0}, | ||
| 843 | {"id-cct","id-cct",NID_id_cct,7,&(lvalues[1944]),0}, | ||
| 844 | {"id-pkix1-explicit-88","id-pkix1-explicit-88", | ||
| 845 | NID_id_pkix1_explicit_88,8,&(lvalues[1951]),0}, | ||
| 846 | {"id-pkix1-implicit-88","id-pkix1-implicit-88", | ||
| 847 | NID_id_pkix1_implicit_88,8,&(lvalues[1959]),0}, | ||
| 848 | {"id-pkix1-explicit-93","id-pkix1-explicit-93", | ||
| 849 | NID_id_pkix1_explicit_93,8,&(lvalues[1967]),0}, | ||
| 850 | {"id-pkix1-implicit-93","id-pkix1-implicit-93", | ||
| 851 | NID_id_pkix1_implicit_93,8,&(lvalues[1975]),0}, | ||
| 852 | {"id-mod-crmf","id-mod-crmf",NID_id_mod_crmf,8,&(lvalues[1983]),0}, | ||
| 853 | {"id-mod-cmc","id-mod-cmc",NID_id_mod_cmc,8,&(lvalues[1991]),0}, | ||
| 854 | {"id-mod-kea-profile-88","id-mod-kea-profile-88", | ||
| 855 | NID_id_mod_kea_profile_88,8,&(lvalues[1999]),0}, | ||
| 856 | {"id-mod-kea-profile-93","id-mod-kea-profile-93", | ||
| 857 | NID_id_mod_kea_profile_93,8,&(lvalues[2007]),0}, | ||
| 858 | {"id-mod-cmp","id-mod-cmp",NID_id_mod_cmp,8,&(lvalues[2015]),0}, | ||
| 859 | {"id-mod-qualified-cert-88","id-mod-qualified-cert-88", | ||
| 860 | NID_id_mod_qualified_cert_88,8,&(lvalues[2023]),0}, | ||
| 861 | {"id-mod-qualified-cert-93","id-mod-qualified-cert-93", | ||
| 862 | NID_id_mod_qualified_cert_93,8,&(lvalues[2031]),0}, | ||
| 863 | {"id-mod-attribute-cert","id-mod-attribute-cert", | ||
| 864 | NID_id_mod_attribute_cert,8,&(lvalues[2039]),0}, | ||
| 865 | {"id-mod-timestamp-protocol","id-mod-timestamp-protocol", | ||
| 866 | NID_id_mod_timestamp_protocol,8,&(lvalues[2047]),0}, | ||
| 867 | {"id-mod-ocsp","id-mod-ocsp",NID_id_mod_ocsp,8,&(lvalues[2055]),0}, | ||
| 868 | {"id-mod-dvcs","id-mod-dvcs",NID_id_mod_dvcs,8,&(lvalues[2063]),0}, | ||
| 869 | {"id-mod-cmp2000","id-mod-cmp2000",NID_id_mod_cmp2000,8, | ||
| 870 | &(lvalues[2071]),0}, | ||
| 871 | {"biometricInfo","Biometric Info",NID_biometricInfo,8,&(lvalues[2079]),0}, | ||
| 872 | {"qcStatements","qcStatements",NID_qcStatements,8,&(lvalues[2087]),0}, | ||
| 873 | {"ac-auditEntity","ac-auditEntity",NID_ac_auditEntity,8, | ||
| 874 | &(lvalues[2095]),0}, | ||
| 875 | {"ac-targeting","ac-targeting",NID_ac_targeting,8,&(lvalues[2103]),0}, | ||
| 876 | {"aaControls","aaControls",NID_aaControls,8,&(lvalues[2111]),0}, | ||
| 877 | {"sbqp-ipAddrBlock","sbqp-ipAddrBlock",NID_sbqp_ipAddrBlock,8, | ||
| 878 | &(lvalues[2119]),0}, | ||
| 879 | {"sbqp-autonomousSysNum","sbqp-autonomousSysNum", | ||
| 880 | NID_sbqp_autonomousSysNum,8,&(lvalues[2127]),0}, | ||
| 881 | {"sbqp-routerIdentifier","sbqp-routerIdentifier", | ||
| 882 | NID_sbqp_routerIdentifier,8,&(lvalues[2135]),0}, | ||
| 883 | {"textNotice","textNotice",NID_textNotice,8,&(lvalues[2143]),0}, | ||
| 884 | {"ipsecEndSystem","IPSec End System",NID_ipsecEndSystem,8, | ||
| 885 | &(lvalues[2151]),0}, | ||
| 886 | {"ipsecTunnel","IPSec Tunnel",NID_ipsecTunnel,8,&(lvalues[2159]),0}, | ||
| 887 | {"ipsecUser","IPSec User",NID_ipsecUser,8,&(lvalues[2167]),0}, | ||
| 888 | {"DVCS","dvcs",NID_dvcs,8,&(lvalues[2175]),0}, | ||
| 889 | {"id-it-caProtEncCert","id-it-caProtEncCert",NID_id_it_caProtEncCert, | ||
| 890 | 8,&(lvalues[2183]),0}, | ||
| 891 | {"id-it-signKeyPairTypes","id-it-signKeyPairTypes", | ||
| 892 | NID_id_it_signKeyPairTypes,8,&(lvalues[2191]),0}, | ||
| 893 | {"id-it-encKeyPairTypes","id-it-encKeyPairTypes", | ||
| 894 | NID_id_it_encKeyPairTypes,8,&(lvalues[2199]),0}, | ||
| 895 | {"id-it-preferredSymmAlg","id-it-preferredSymmAlg", | ||
| 896 | NID_id_it_preferredSymmAlg,8,&(lvalues[2207]),0}, | ||
| 897 | {"id-it-caKeyUpdateInfo","id-it-caKeyUpdateInfo", | ||
| 898 | NID_id_it_caKeyUpdateInfo,8,&(lvalues[2215]),0}, | ||
| 899 | {"id-it-currentCRL","id-it-currentCRL",NID_id_it_currentCRL,8, | ||
| 900 | &(lvalues[2223]),0}, | ||
| 901 | {"id-it-unsupportedOIDs","id-it-unsupportedOIDs", | ||
| 902 | NID_id_it_unsupportedOIDs,8,&(lvalues[2231]),0}, | ||
| 903 | {"id-it-subscriptionRequest","id-it-subscriptionRequest", | ||
| 904 | NID_id_it_subscriptionRequest,8,&(lvalues[2239]),0}, | ||
| 905 | {"id-it-subscriptionResponse","id-it-subscriptionResponse", | ||
| 906 | NID_id_it_subscriptionResponse,8,&(lvalues[2247]),0}, | ||
| 907 | {"id-it-keyPairParamReq","id-it-keyPairParamReq", | ||
| 908 | NID_id_it_keyPairParamReq,8,&(lvalues[2255]),0}, | ||
| 909 | {"id-it-keyPairParamRep","id-it-keyPairParamRep", | ||
| 910 | NID_id_it_keyPairParamRep,8,&(lvalues[2263]),0}, | ||
| 911 | {"id-it-revPassphrase","id-it-revPassphrase",NID_id_it_revPassphrase, | ||
| 912 | 8,&(lvalues[2271]),0}, | ||
| 913 | {"id-it-implicitConfirm","id-it-implicitConfirm", | ||
| 914 | NID_id_it_implicitConfirm,8,&(lvalues[2279]),0}, | ||
| 915 | {"id-it-confirmWaitTime","id-it-confirmWaitTime", | ||
| 916 | NID_id_it_confirmWaitTime,8,&(lvalues[2287]),0}, | ||
| 917 | {"id-it-origPKIMessage","id-it-origPKIMessage", | ||
| 918 | NID_id_it_origPKIMessage,8,&(lvalues[2295]),0}, | ||
| 919 | {"id-regCtrl","id-regCtrl",NID_id_regCtrl,8,&(lvalues[2303]),0}, | ||
| 920 | {"id-regInfo","id-regInfo",NID_id_regInfo,8,&(lvalues[2311]),0}, | ||
| 921 | {"id-regCtrl-regToken","id-regCtrl-regToken",NID_id_regCtrl_regToken, | ||
| 922 | 9,&(lvalues[2319]),0}, | ||
| 923 | {"id-regCtrl-authenticator","id-regCtrl-authenticator", | ||
| 924 | NID_id_regCtrl_authenticator,9,&(lvalues[2328]),0}, | ||
| 925 | {"id-regCtrl-pkiPublicationInfo","id-regCtrl-pkiPublicationInfo", | ||
| 926 | NID_id_regCtrl_pkiPublicationInfo,9,&(lvalues[2337]),0}, | ||
| 927 | {"id-regCtrl-pkiArchiveOptions","id-regCtrl-pkiArchiveOptions", | ||
| 928 | NID_id_regCtrl_pkiArchiveOptions,9,&(lvalues[2346]),0}, | ||
| 929 | {"id-regCtrl-oldCertID","id-regCtrl-oldCertID", | ||
| 930 | NID_id_regCtrl_oldCertID,9,&(lvalues[2355]),0}, | ||
| 931 | {"id-regCtrl-protocolEncrKey","id-regCtrl-protocolEncrKey", | ||
| 932 | NID_id_regCtrl_protocolEncrKey,9,&(lvalues[2364]),0}, | ||
| 933 | {"id-regInfo-utf8Pairs","id-regInfo-utf8Pairs", | ||
| 934 | NID_id_regInfo_utf8Pairs,9,&(lvalues[2373]),0}, | ||
| 935 | {"id-regInfo-certReq","id-regInfo-certReq",NID_id_regInfo_certReq,9, | ||
| 936 | &(lvalues[2382]),0}, | ||
| 937 | {"id-alg-des40","id-alg-des40",NID_id_alg_des40,8,&(lvalues[2391]),0}, | ||
| 938 | {"id-alg-noSignature","id-alg-noSignature",NID_id_alg_noSignature,8, | ||
| 939 | &(lvalues[2399]),0}, | ||
| 940 | {"id-alg-dh-sig-hmac-sha1","id-alg-dh-sig-hmac-sha1", | ||
| 941 | NID_id_alg_dh_sig_hmac_sha1,8,&(lvalues[2407]),0}, | ||
| 942 | {"id-alg-dh-pop","id-alg-dh-pop",NID_id_alg_dh_pop,8,&(lvalues[2415]),0}, | ||
| 943 | {"id-cmc-statusInfo","id-cmc-statusInfo",NID_id_cmc_statusInfo,8, | ||
| 944 | &(lvalues[2423]),0}, | ||
| 945 | {"id-cmc-identification","id-cmc-identification", | ||
| 946 | NID_id_cmc_identification,8,&(lvalues[2431]),0}, | ||
| 947 | {"id-cmc-identityProof","id-cmc-identityProof", | ||
| 948 | NID_id_cmc_identityProof,8,&(lvalues[2439]),0}, | ||
| 949 | {"id-cmc-dataReturn","id-cmc-dataReturn",NID_id_cmc_dataReturn,8, | ||
| 950 | &(lvalues[2447]),0}, | ||
| 951 | {"id-cmc-transactionId","id-cmc-transactionId", | ||
| 952 | NID_id_cmc_transactionId,8,&(lvalues[2455]),0}, | ||
| 953 | {"id-cmc-senderNonce","id-cmc-senderNonce",NID_id_cmc_senderNonce,8, | ||
| 954 | &(lvalues[2463]),0}, | ||
| 955 | {"id-cmc-recipientNonce","id-cmc-recipientNonce", | ||
| 956 | NID_id_cmc_recipientNonce,8,&(lvalues[2471]),0}, | ||
| 957 | {"id-cmc-addExtensions","id-cmc-addExtensions", | ||
| 958 | NID_id_cmc_addExtensions,8,&(lvalues[2479]),0}, | ||
| 959 | {"id-cmc-encryptedPOP","id-cmc-encryptedPOP",NID_id_cmc_encryptedPOP, | ||
| 960 | 8,&(lvalues[2487]),0}, | ||
| 961 | {"id-cmc-decryptedPOP","id-cmc-decryptedPOP",NID_id_cmc_decryptedPOP, | ||
| 962 | 8,&(lvalues[2495]),0}, | ||
| 963 | {"id-cmc-lraPOPWitness","id-cmc-lraPOPWitness", | ||
| 964 | NID_id_cmc_lraPOPWitness,8,&(lvalues[2503]),0}, | ||
| 965 | {"id-cmc-getCert","id-cmc-getCert",NID_id_cmc_getCert,8, | ||
| 966 | &(lvalues[2511]),0}, | ||
| 967 | {"id-cmc-getCRL","id-cmc-getCRL",NID_id_cmc_getCRL,8,&(lvalues[2519]),0}, | ||
| 968 | {"id-cmc-revokeRequest","id-cmc-revokeRequest", | ||
| 969 | NID_id_cmc_revokeRequest,8,&(lvalues[2527]),0}, | ||
| 970 | {"id-cmc-regInfo","id-cmc-regInfo",NID_id_cmc_regInfo,8, | ||
| 971 | &(lvalues[2535]),0}, | ||
| 972 | {"id-cmc-responseInfo","id-cmc-responseInfo",NID_id_cmc_responseInfo, | ||
| 973 | 8,&(lvalues[2543]),0}, | ||
| 974 | {"id-cmc-queryPending","id-cmc-queryPending",NID_id_cmc_queryPending, | ||
| 975 | 8,&(lvalues[2551]),0}, | ||
| 976 | {"id-cmc-popLinkRandom","id-cmc-popLinkRandom", | ||
| 977 | NID_id_cmc_popLinkRandom,8,&(lvalues[2559]),0}, | ||
| 978 | {"id-cmc-popLinkWitness","id-cmc-popLinkWitness", | ||
| 979 | NID_id_cmc_popLinkWitness,8,&(lvalues[2567]),0}, | ||
| 980 | {"id-cmc-confirmCertAcceptance","id-cmc-confirmCertAcceptance", | ||
| 981 | NID_id_cmc_confirmCertAcceptance,8,&(lvalues[2575]),0}, | ||
| 982 | {"id-on-personalData","id-on-personalData",NID_id_on_personalData,8, | ||
| 983 | &(lvalues[2583]),0}, | ||
| 984 | {"id-pda-dateOfBirth","id-pda-dateOfBirth",NID_id_pda_dateOfBirth,8, | ||
| 985 | &(lvalues[2591]),0}, | ||
| 986 | {"id-pda-placeOfBirth","id-pda-placeOfBirth",NID_id_pda_placeOfBirth, | ||
| 987 | 8,&(lvalues[2599]),0}, | ||
| 988 | {"id-pda-pseudonym","id-pda-pseudonym",NID_id_pda_pseudonym,8, | ||
| 989 | &(lvalues[2607]),0}, | ||
| 990 | {"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2615]),0}, | ||
| 991 | {"id-pda-countryOfCitizenship","id-pda-countryOfCitizenship", | ||
| 992 | NID_id_pda_countryOfCitizenship,8,&(lvalues[2623]),0}, | ||
| 993 | {"id-pda-countryOfResidence","id-pda-countryOfResidence", | ||
| 994 | NID_id_pda_countryOfResidence,8,&(lvalues[2631]),0}, | ||
| 995 | {"id-aca-authenticationInfo","id-aca-authenticationInfo", | ||
| 996 | NID_id_aca_authenticationInfo,8,&(lvalues[2639]),0}, | ||
| 997 | {"id-aca-accessIdentity","id-aca-accessIdentity", | ||
| 998 | NID_id_aca_accessIdentity,8,&(lvalues[2647]),0}, | ||
| 999 | {"id-aca-chargingIdentity","id-aca-chargingIdentity", | ||
| 1000 | NID_id_aca_chargingIdentity,8,&(lvalues[2655]),0}, | ||
| 1001 | {"id-aca-group","id-aca-group",NID_id_aca_group,8,&(lvalues[2663]),0}, | ||
| 1002 | {"id-aca-role","id-aca-role",NID_id_aca_role,8,&(lvalues[2671]),0}, | ||
| 1003 | {"id-qcs-pkixQCSyntax-v1","id-qcs-pkixQCSyntax-v1", | ||
| 1004 | NID_id_qcs_pkixQCSyntax_v1,8,&(lvalues[2679]),0}, | ||
| 1005 | {"id-cct-crs","id-cct-crs",NID_id_cct_crs,8,&(lvalues[2687]),0}, | ||
| 1006 | {"id-cct-PKIData","id-cct-PKIData",NID_id_cct_PKIData,8, | ||
| 1007 | &(lvalues[2695]),0}, | ||
| 1008 | {"id-cct-PKIResponse","id-cct-PKIResponse",NID_id_cct_PKIResponse,8, | ||
| 1009 | &(lvalues[2703]),0}, | ||
| 1010 | {"ad_timestamping","AD Time Stamping",NID_ad_timeStamping,8, | ||
| 1011 | &(lvalues[2711]),0}, | ||
| 1012 | {"AD_DVCS","ad dvcs",NID_ad_dvcs,8,&(lvalues[2719]),0}, | ||
| 1013 | {"basicOCSPResponse","Basic OCSP Response",NID_id_pkix_OCSP_basic,9, | ||
| 1014 | &(lvalues[2727]),0}, | ||
| 1015 | {"Nonce","OCSP Nonce",NID_id_pkix_OCSP_Nonce,9,&(lvalues[2736]),0}, | ||
| 1016 | {"CrlID","OCSP CRL ID",NID_id_pkix_OCSP_CrlID,9,&(lvalues[2745]),0}, | ||
| 1017 | {"acceptableResponses","Acceptable OCSP Responses", | ||
| 1018 | NID_id_pkix_OCSP_acceptableResponses,9,&(lvalues[2754]),0}, | ||
| 1019 | {"noCheck","noCheck",NID_id_pkix_OCSP_noCheck,9,&(lvalues[2763]),0}, | ||
| 1020 | {"archiveCutoff","OCSP Archive Cutoff",NID_id_pkix_OCSP_archiveCutoff, | ||
| 1021 | 9,&(lvalues[2772]),0}, | ||
| 1022 | {"serviceLocator","OCSP Service Locator", | ||
| 1023 | NID_id_pkix_OCSP_serviceLocator,9,&(lvalues[2781]),0}, | ||
| 1024 | {"extendedStatus","Extended OCSP Status", | ||
| 1025 | NID_id_pkix_OCSP_extendedStatus,9,&(lvalues[2790]),0}, | ||
| 1026 | {"valid","valid",NID_id_pkix_OCSP_valid,9,&(lvalues[2799]),0}, | ||
| 1027 | {"path","path",NID_id_pkix_OCSP_path,9,&(lvalues[2808]),0}, | ||
| 1028 | {"trustRoot","Trust Root",NID_id_pkix_OCSP_trustRoot,9, | ||
| 1029 | &(lvalues[2817]),0}, | ||
| 1030 | {"algorithm","algorithm",NID_algorithm,4,&(lvalues[2826]),0}, | ||
| 1031 | {"rsaSignature","rsaSignature",NID_rsaSignature,5,&(lvalues[2830]),0}, | ||
| 1032 | {"X500algorithms","directory services - algorithms", | ||
| 1033 | NID_X500algorithms,2,&(lvalues[2835]),0}, | ||
| 1034 | {"ORG","org",NID_org,1,&(lvalues[2837]),0}, | ||
| 1035 | {"DOD","dod",NID_dod,2,&(lvalues[2838]),0}, | ||
| 1036 | {"IANA","iana",NID_iana,3,&(lvalues[2840]),0}, | ||
| 1037 | {"directory","Directory",NID_Directory,4,&(lvalues[2843]),0}, | ||
| 1038 | {"mgmt","Management",NID_Management,4,&(lvalues[2847]),0}, | ||
| 1039 | {"experimental","Experimental",NID_Experimental,4,&(lvalues[2851]),0}, | ||
| 1040 | {"private","Private",NID_Private,4,&(lvalues[2855]),0}, | ||
| 1041 | {"security","Security",NID_Security,4,&(lvalues[2859]),0}, | ||
| 1042 | {"snmpv2","SNMPv2",NID_SNMPv2,4,&(lvalues[2863]),0}, | ||
| 1043 | {"mail","Mail",NID_Mail,4,&(lvalues[2867]),0}, | ||
| 1044 | {"enterprises","Enterprises",NID_Enterprises,1,&(lvalues[2871]),0}, | ||
| 1045 | {"dcobject","dcObject",NID_dcObject,3,&(lvalues[2872]),0}, | ||
| 1046 | {"DC","domainComponent",NID_domainComponent,10,&(lvalues[2875]),0}, | ||
| 1047 | {"domain","Domain",NID_Domain,10,&(lvalues[2885]),0}, | ||
| 1048 | }; | ||
| 1049 | |||
| 1050 | static ASN1_OBJECT *sn_objs[NUM_SN]={ | ||
| 1051 | &(nid_objs[364]),/* "AD_DVCS" */ | ||
| 1052 | &(nid_objs[91]),/* "BF-CBC" */ | ||
| 1053 | &(nid_objs[93]),/* "BF-CFB" */ | ||
| 1054 | &(nid_objs[92]),/* "BF-ECB" */ | ||
| 1055 | &(nid_objs[94]),/* "BF-OFB" */ | ||
| 1056 | &(nid_objs[14]),/* "C" */ | ||
| 1057 | &(nid_objs[108]),/* "CAST5-CBC" */ | ||
| 1058 | &(nid_objs[110]),/* "CAST5-CFB" */ | ||
| 1059 | &(nid_objs[109]),/* "CAST5-ECB" */ | ||
| 1060 | &(nid_objs[111]),/* "CAST5-OFB" */ | ||
| 1061 | &(nid_objs[13]),/* "CN" */ | ||
| 1062 | &(nid_objs[141]),/* "CRLReason" */ | ||
| 1063 | &(nid_objs[367]),/* "CrlID" */ | ||
| 1064 | &(nid_objs[107]),/* "D" */ | ||
| 1065 | &(nid_objs[391]),/* "DC" */ | ||
| 1066 | &(nid_objs[31]),/* "DES-CBC" */ | ||
| 1067 | &(nid_objs[30]),/* "DES-CFB" */ | ||
| 1068 | &(nid_objs[29]),/* "DES-ECB" */ | ||
| 1069 | &(nid_objs[32]),/* "DES-EDE" */ | ||
| 1070 | &(nid_objs[43]),/* "DES-EDE-CBC" */ | ||
| 1071 | &(nid_objs[60]),/* "DES-EDE-CFB" */ | ||
| 1072 | &(nid_objs[62]),/* "DES-EDE-OFB" */ | ||
| 1073 | &(nid_objs[33]),/* "DES-EDE3" */ | ||
| 1074 | &(nid_objs[44]),/* "DES-EDE3-CBC" */ | ||
| 1075 | &(nid_objs[61]),/* "DES-EDE3-CFB" */ | ||
| 1076 | &(nid_objs[63]),/* "DES-EDE3-OFB" */ | ||
| 1077 | &(nid_objs[45]),/* "DES-OFB" */ | ||
| 1078 | &(nid_objs[80]),/* "DESX-CBC" */ | ||
| 1079 | &(nid_objs[380]),/* "DOD" */ | ||
| 1080 | &(nid_objs[116]),/* "DSA" */ | ||
| 1081 | &(nid_objs[66]),/* "DSA-SHA" */ | ||
| 1082 | &(nid_objs[113]),/* "DSA-SHA1" */ | ||
| 1083 | &(nid_objs[70]),/* "DSA-SHA1-old" */ | ||
| 1084 | &(nid_objs[67]),/* "DSA-old" */ | ||
| 1085 | &(nid_objs[297]),/* "DVCS" */ | ||
| 1086 | &(nid_objs[48]),/* "Email" */ | ||
| 1087 | &(nid_objs[99]),/* "G" */ | ||
| 1088 | &(nid_objs[101]),/* "I" */ | ||
| 1089 | &(nid_objs[381]),/* "IANA" */ | ||
| 1090 | &(nid_objs[34]),/* "IDEA-CBC" */ | ||
| 1091 | &(nid_objs[35]),/* "IDEA-CFB" */ | ||
| 1092 | &(nid_objs[36]),/* "IDEA-ECB" */ | ||
| 1093 | &(nid_objs[46]),/* "IDEA-OFB" */ | ||
| 1094 | &(nid_objs[181]),/* "ISO" */ | ||
| 1095 | &(nid_objs[183]),/* "ISO-US" */ | ||
| 1096 | &(nid_objs[15]),/* "L" */ | ||
| 1097 | &(nid_objs[ 3]),/* "MD2" */ | ||
| 1098 | &(nid_objs[257]),/* "MD4" */ | ||
| 1099 | &(nid_objs[ 4]),/* "MD5" */ | ||
| 1100 | &(nid_objs[114]),/* "MD5-SHA1" */ | ||
| 1101 | &(nid_objs[95]),/* "MDC2" */ | ||
| 1102 | &(nid_objs[57]),/* "Netscape" */ | ||
| 1103 | &(nid_objs[366]),/* "Nonce" */ | ||
| 1104 | &(nid_objs[17]),/* "O" */ | ||
| 1105 | &(nid_objs[178]),/* "OCSP" */ | ||
| 1106 | &(nid_objs[180]),/* "OCSPSigning" */ | ||
| 1107 | &(nid_objs[379]),/* "ORG" */ | ||
| 1108 | &(nid_objs[18]),/* "OU" */ | ||
| 1109 | &(nid_objs[ 9]),/* "PBE-MD2-DES" */ | ||
| 1110 | &(nid_objs[168]),/* "PBE-MD2-RC2-64" */ | ||
| 1111 | &(nid_objs[10]),/* "PBE-MD5-DES" */ | ||
| 1112 | &(nid_objs[169]),/* "PBE-MD5-RC2-64" */ | ||
| 1113 | &(nid_objs[147]),/* "PBE-SHA1-2DES" */ | ||
| 1114 | &(nid_objs[146]),/* "PBE-SHA1-3DES" */ | ||
| 1115 | &(nid_objs[170]),/* "PBE-SHA1-DES" */ | ||
| 1116 | &(nid_objs[148]),/* "PBE-SHA1-RC2-128" */ | ||
| 1117 | &(nid_objs[149]),/* "PBE-SHA1-RC2-40" */ | ||
| 1118 | &(nid_objs[68]),/* "PBE-SHA1-RC2-64" */ | ||
| 1119 | &(nid_objs[144]),/* "PBE-SHA1-RC4-128" */ | ||
| 1120 | &(nid_objs[145]),/* "PBE-SHA1-RC4-40" */ | ||
| 1121 | &(nid_objs[161]),/* "PBES2" */ | ||
| 1122 | &(nid_objs[69]),/* "PBKDF2" */ | ||
| 1123 | &(nid_objs[162]),/* "PBMAC1" */ | ||
| 1124 | &(nid_objs[127]),/* "PKIX" */ | ||
| 1125 | &(nid_objs[98]),/* "RC2-40-CBC" */ | ||
| 1126 | &(nid_objs[166]),/* "RC2-64-CBC" */ | ||
| 1127 | &(nid_objs[37]),/* "RC2-CBC" */ | ||
| 1128 | &(nid_objs[39]),/* "RC2-CFB" */ | ||
| 1129 | &(nid_objs[38]),/* "RC2-ECB" */ | ||
| 1130 | &(nid_objs[40]),/* "RC2-OFB" */ | ||
| 1131 | &(nid_objs[ 5]),/* "RC4" */ | ||
| 1132 | &(nid_objs[97]),/* "RC4-40" */ | ||
| 1133 | &(nid_objs[120]),/* "RC5-CBC" */ | ||
| 1134 | &(nid_objs[122]),/* "RC5-CFB" */ | ||
| 1135 | &(nid_objs[121]),/* "RC5-ECB" */ | ||
| 1136 | &(nid_objs[123]),/* "RC5-OFB" */ | ||
| 1137 | &(nid_objs[117]),/* "RIPEMD160" */ | ||
| 1138 | &(nid_objs[124]),/* "RLE" */ | ||
| 1139 | &(nid_objs[19]),/* "RSA" */ | ||
| 1140 | &(nid_objs[ 7]),/* "RSA-MD2" */ | ||
| 1141 | &(nid_objs[ 8]),/* "RSA-MD5" */ | ||
| 1142 | &(nid_objs[96]),/* "RSA-MDC2" */ | ||
| 1143 | &(nid_objs[104]),/* "RSA-NP-MD5" */ | ||
| 1144 | &(nid_objs[119]),/* "RSA-RIPEMD160" */ | ||
| 1145 | &(nid_objs[42]),/* "RSA-SHA" */ | ||
| 1146 | &(nid_objs[65]),/* "RSA-SHA1" */ | ||
| 1147 | &(nid_objs[115]),/* "RSA-SHA1-2" */ | ||
| 1148 | &(nid_objs[100]),/* "S" */ | ||
| 1149 | &(nid_objs[41]),/* "SHA" */ | ||
| 1150 | &(nid_objs[64]),/* "SHA1" */ | ||
| 1151 | &(nid_objs[188]),/* "SMIME" */ | ||
| 1152 | &(nid_objs[167]),/* "SMIME-CAPS" */ | ||
| 1153 | &(nid_objs[105]),/* "SN" */ | ||
| 1154 | &(nid_objs[16]),/* "ST" */ | ||
| 1155 | &(nid_objs[143]),/* "SXNetID" */ | ||
| 1156 | &(nid_objs[106]),/* "T" */ | ||
| 1157 | &(nid_objs[102]),/* "UID" */ | ||
| 1158 | &(nid_objs[ 0]),/* "UNDEF" */ | ||
| 1159 | &(nid_objs[11]),/* "X500" */ | ||
| 1160 | &(nid_objs[378]),/* "X500algorithms" */ | ||
| 1161 | &(nid_objs[12]),/* "X509" */ | ||
| 1162 | &(nid_objs[184]),/* "X9-57" */ | ||
| 1163 | &(nid_objs[185]),/* "X9cm" */ | ||
| 1164 | &(nid_objs[125]),/* "ZLIB" */ | ||
| 1165 | &(nid_objs[289]),/* "aaControls" */ | ||
| 1166 | &(nid_objs[287]),/* "ac-auditEntity" */ | ||
| 1167 | &(nid_objs[288]),/* "ac-targeting" */ | ||
| 1168 | &(nid_objs[368]),/* "acceptableResponses" */ | ||
| 1169 | &(nid_objs[363]),/* "ad_timestamping" */ | ||
| 1170 | &(nid_objs[376]),/* "algorithm" */ | ||
| 1171 | &(nid_objs[370]),/* "archiveCutoff" */ | ||
| 1172 | &(nid_objs[177]),/* "authorityInfoAccess" */ | ||
| 1173 | &(nid_objs[90]),/* "authorityKeyIdentifier" */ | ||
| 1174 | &(nid_objs[87]),/* "basicConstraints" */ | ||
| 1175 | &(nid_objs[365]),/* "basicOCSPResponse" */ | ||
| 1176 | &(nid_objs[285]),/* "biometricInfo" */ | ||
| 1177 | &(nid_objs[179]),/* "caIssuers" */ | ||
| 1178 | &(nid_objs[152]),/* "certBag" */ | ||
| 1179 | &(nid_objs[89]),/* "certificatePolicies" */ | ||
| 1180 | &(nid_objs[54]),/* "challengePassword" */ | ||
| 1181 | &(nid_objs[130]),/* "clientAuth" */ | ||
| 1182 | &(nid_objs[131]),/* "codeSigning" */ | ||
| 1183 | &(nid_objs[50]),/* "contentType" */ | ||
| 1184 | &(nid_objs[53]),/* "countersignature" */ | ||
| 1185 | &(nid_objs[153]),/* "crlBag" */ | ||
| 1186 | &(nid_objs[103]),/* "crlDistributionPoints" */ | ||
| 1187 | &(nid_objs[88]),/* "crlNumber" */ | ||
| 1188 | &(nid_objs[390]),/* "dcobject" */ | ||
| 1189 | &(nid_objs[140]),/* "deltaCRL" */ | ||
| 1190 | &(nid_objs[28]),/* "dhKeyAgreement" */ | ||
| 1191 | &(nid_objs[382]),/* "directory" */ | ||
| 1192 | &(nid_objs[174]),/* "dnQualifier" */ | ||
| 1193 | &(nid_objs[392]),/* "domain" */ | ||
| 1194 | &(nid_objs[132]),/* "emailProtection" */ | ||
| 1195 | &(nid_objs[389]),/* "enterprises" */ | ||
| 1196 | &(nid_objs[384]),/* "experimental" */ | ||
| 1197 | &(nid_objs[172]),/* "extReq" */ | ||
| 1198 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ | ||
| 1199 | &(nid_objs[126]),/* "extendedKeyUsage" */ | ||
| 1200 | &(nid_objs[372]),/* "extendedStatus" */ | ||
| 1201 | &(nid_objs[156]),/* "friendlyName" */ | ||
| 1202 | &(nid_objs[163]),/* "hmacWithSHA1" */ | ||
| 1203 | &(nid_objs[266]),/* "id-aca" */ | ||
| 1204 | &(nid_objs[355]),/* "id-aca-accessIdentity" */ | ||
| 1205 | &(nid_objs[354]),/* "id-aca-authenticationInfo" */ | ||
| 1206 | &(nid_objs[356]),/* "id-aca-chargingIdentity" */ | ||
| 1207 | &(nid_objs[357]),/* "id-aca-group" */ | ||
| 1208 | &(nid_objs[358]),/* "id-aca-role" */ | ||
| 1209 | &(nid_objs[176]),/* "id-ad" */ | ||
| 1210 | &(nid_objs[262]),/* "id-alg" */ | ||
| 1211 | &(nid_objs[323]),/* "id-alg-des40" */ | ||
| 1212 | &(nid_objs[326]),/* "id-alg-dh-pop" */ | ||
| 1213 | &(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */ | ||
| 1214 | &(nid_objs[324]),/* "id-alg-noSignature" */ | ||
| 1215 | &(nid_objs[268]),/* "id-cct" */ | ||
| 1216 | &(nid_objs[361]),/* "id-cct-PKIData" */ | ||
| 1217 | &(nid_objs[362]),/* "id-cct-PKIResponse" */ | ||
| 1218 | &(nid_objs[360]),/* "id-cct-crs" */ | ||
| 1219 | &(nid_objs[81]),/* "id-ce" */ | ||
| 1220 | &(nid_objs[263]),/* "id-cmc" */ | ||
| 1221 | &(nid_objs[334]),/* "id-cmc-addExtensions" */ | ||
| 1222 | &(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */ | ||
| 1223 | &(nid_objs[330]),/* "id-cmc-dataReturn" */ | ||
| 1224 | &(nid_objs[336]),/* "id-cmc-decryptedPOP" */ | ||
| 1225 | &(nid_objs[335]),/* "id-cmc-encryptedPOP" */ | ||
| 1226 | &(nid_objs[339]),/* "id-cmc-getCRL" */ | ||
| 1227 | &(nid_objs[338]),/* "id-cmc-getCert" */ | ||
| 1228 | &(nid_objs[328]),/* "id-cmc-identification" */ | ||
| 1229 | &(nid_objs[329]),/* "id-cmc-identityProof" */ | ||
| 1230 | &(nid_objs[337]),/* "id-cmc-lraPOPWitness" */ | ||
| 1231 | &(nid_objs[344]),/* "id-cmc-popLinkRandom" */ | ||
| 1232 | &(nid_objs[345]),/* "id-cmc-popLinkWitness" */ | ||
| 1233 | &(nid_objs[343]),/* "id-cmc-queryPending" */ | ||
| 1234 | &(nid_objs[333]),/* "id-cmc-recipientNonce" */ | ||
| 1235 | &(nid_objs[341]),/* "id-cmc-regInfo" */ | ||
| 1236 | &(nid_objs[342]),/* "id-cmc-responseInfo" */ | ||
| 1237 | &(nid_objs[340]),/* "id-cmc-revokeRequest" */ | ||
| 1238 | &(nid_objs[332]),/* "id-cmc-senderNonce" */ | ||
| 1239 | &(nid_objs[327]),/* "id-cmc-statusInfo" */ | ||
| 1240 | &(nid_objs[331]),/* "id-cmc-transactionId" */ | ||
| 1241 | &(nid_objs[260]),/* "id-it" */ | ||
| 1242 | &(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */ | ||
| 1243 | &(nid_objs[298]),/* "id-it-caProtEncCert" */ | ||
| 1244 | &(nid_objs[311]),/* "id-it-confirmWaitTime" */ | ||
| 1245 | &(nid_objs[303]),/* "id-it-currentCRL" */ | ||
| 1246 | &(nid_objs[300]),/* "id-it-encKeyPairTypes" */ | ||
| 1247 | &(nid_objs[310]),/* "id-it-implicitConfirm" */ | ||
| 1248 | &(nid_objs[308]),/* "id-it-keyPairParamRep" */ | ||
| 1249 | &(nid_objs[307]),/* "id-it-keyPairParamReq" */ | ||
| 1250 | &(nid_objs[312]),/* "id-it-origPKIMessage" */ | ||
| 1251 | &(nid_objs[301]),/* "id-it-preferredSymmAlg" */ | ||
| 1252 | &(nid_objs[309]),/* "id-it-revPassphrase" */ | ||
| 1253 | &(nid_objs[299]),/* "id-it-signKeyPairTypes" */ | ||
| 1254 | &(nid_objs[305]),/* "id-it-subscriptionRequest" */ | ||
| 1255 | &(nid_objs[306]),/* "id-it-subscriptionResponse" */ | ||
| 1256 | &(nid_objs[304]),/* "id-it-unsupportedOIDs" */ | ||
| 1257 | &(nid_objs[128]),/* "id-kp" */ | ||
| 1258 | &(nid_objs[280]),/* "id-mod-attribute-cert" */ | ||
| 1259 | &(nid_objs[274]),/* "id-mod-cmc" */ | ||
| 1260 | &(nid_objs[277]),/* "id-mod-cmp" */ | ||
| 1261 | &(nid_objs[284]),/* "id-mod-cmp2000" */ | ||
| 1262 | &(nid_objs[273]),/* "id-mod-crmf" */ | ||
| 1263 | &(nid_objs[283]),/* "id-mod-dvcs" */ | ||
| 1264 | &(nid_objs[275]),/* "id-mod-kea-profile-88" */ | ||
| 1265 | &(nid_objs[276]),/* "id-mod-kea-profile-93" */ | ||
| 1266 | &(nid_objs[282]),/* "id-mod-ocsp" */ | ||
| 1267 | &(nid_objs[278]),/* "id-mod-qualified-cert-88" */ | ||
| 1268 | &(nid_objs[279]),/* "id-mod-qualified-cert-93" */ | ||
| 1269 | &(nid_objs[281]),/* "id-mod-timestamp-protocol" */ | ||
| 1270 | &(nid_objs[264]),/* "id-on" */ | ||
| 1271 | &(nid_objs[347]),/* "id-on-personalData" */ | ||
| 1272 | &(nid_objs[265]),/* "id-pda" */ | ||
| 1273 | &(nid_objs[352]),/* "id-pda-countryOfCitizenship" */ | ||
| 1274 | &(nid_objs[353]),/* "id-pda-countryOfResidence" */ | ||
| 1275 | &(nid_objs[348]),/* "id-pda-dateOfBirth" */ | ||
| 1276 | &(nid_objs[351]),/* "id-pda-gender" */ | ||
| 1277 | &(nid_objs[349]),/* "id-pda-placeOfBirth" */ | ||
| 1278 | &(nid_objs[350]),/* "id-pda-pseudonym" */ | ||
| 1279 | &(nid_objs[175]),/* "id-pe" */ | ||
| 1280 | &(nid_objs[261]),/* "id-pkip" */ | ||
| 1281 | &(nid_objs[258]),/* "id-pkix-mod" */ | ||
| 1282 | &(nid_objs[269]),/* "id-pkix1-explicit-88" */ | ||
| 1283 | &(nid_objs[271]),/* "id-pkix1-explicit-93" */ | ||
| 1284 | &(nid_objs[270]),/* "id-pkix1-implicit-88" */ | ||
| 1285 | &(nid_objs[272]),/* "id-pkix1-implicit-93" */ | ||
| 1286 | &(nid_objs[267]),/* "id-qcs" */ | ||
| 1287 | &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ | ||
| 1288 | &(nid_objs[259]),/* "id-qt" */ | ||
| 1289 | &(nid_objs[164]),/* "id-qt-cps" */ | ||
| 1290 | &(nid_objs[165]),/* "id-qt-unotice" */ | ||
| 1291 | &(nid_objs[313]),/* "id-regCtrl" */ | ||
| 1292 | &(nid_objs[316]),/* "id-regCtrl-authenticator" */ | ||
| 1293 | &(nid_objs[319]),/* "id-regCtrl-oldCertID" */ | ||
| 1294 | &(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */ | ||
| 1295 | &(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */ | ||
| 1296 | &(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */ | ||
| 1297 | &(nid_objs[315]),/* "id-regCtrl-regToken" */ | ||
| 1298 | &(nid_objs[314]),/* "id-regInfo" */ | ||
| 1299 | &(nid_objs[322]),/* "id-regInfo-certReq" */ | ||
| 1300 | &(nid_objs[321]),/* "id-regInfo-utf8Pairs" */ | ||
| 1301 | &(nid_objs[191]),/* "id-smime-aa" */ | ||
| 1302 | &(nid_objs[215]),/* "id-smime-aa-contentHint" */ | ||
| 1303 | &(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */ | ||
| 1304 | &(nid_objs[221]),/* "id-smime-aa-contentReference" */ | ||
| 1305 | &(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */ | ||
| 1306 | &(nid_objs[217]),/* "id-smime-aa-encapContentType" */ | ||
| 1307 | &(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */ | ||
| 1308 | &(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */ | ||
| 1309 | &(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */ | ||
| 1310 | &(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */ | ||
| 1311 | &(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */ | ||
| 1312 | &(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */ | ||
| 1313 | &(nid_objs[234]),/* "id-smime-aa-ets-certValues" */ | ||
| 1314 | &(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */ | ||
| 1315 | &(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */ | ||
| 1316 | &(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */ | ||
| 1317 | &(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */ | ||
| 1318 | &(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */ | ||
| 1319 | &(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */ | ||
| 1320 | &(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */ | ||
| 1321 | &(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */ | ||
| 1322 | &(nid_objs[219]),/* "id-smime-aa-macValue" */ | ||
| 1323 | &(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */ | ||
| 1324 | &(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */ | ||
| 1325 | &(nid_objs[212]),/* "id-smime-aa-receiptRequest" */ | ||
| 1326 | &(nid_objs[213]),/* "id-smime-aa-securityLabel" */ | ||
| 1327 | &(nid_objs[239]),/* "id-smime-aa-signatureType" */ | ||
| 1328 | &(nid_objs[223]),/* "id-smime-aa-signingCertificate" */ | ||
| 1329 | &(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */ | ||
| 1330 | &(nid_objs[225]),/* "id-smime-aa-timeStampToken" */ | ||
| 1331 | &(nid_objs[192]),/* "id-smime-alg" */ | ||
| 1332 | &(nid_objs[243]),/* "id-smime-alg-3DESwrap" */ | ||
| 1333 | &(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */ | ||
| 1334 | &(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */ | ||
| 1335 | &(nid_objs[245]),/* "id-smime-alg-ESDH" */ | ||
| 1336 | &(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */ | ||
| 1337 | &(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */ | ||
| 1338 | &(nid_objs[244]),/* "id-smime-alg-RC2wrap" */ | ||
| 1339 | &(nid_objs[193]),/* "id-smime-cd" */ | ||
| 1340 | &(nid_objs[248]),/* "id-smime-cd-ldap" */ | ||
| 1341 | &(nid_objs[190]),/* "id-smime-ct" */ | ||
| 1342 | &(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */ | ||
| 1343 | &(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */ | ||
| 1344 | &(nid_objs[208]),/* "id-smime-ct-TDTInfo" */ | ||
| 1345 | &(nid_objs[207]),/* "id-smime-ct-TSTInfo" */ | ||
| 1346 | &(nid_objs[205]),/* "id-smime-ct-authData" */ | ||
| 1347 | &(nid_objs[209]),/* "id-smime-ct-contentInfo" */ | ||
| 1348 | &(nid_objs[206]),/* "id-smime-ct-publishCert" */ | ||
| 1349 | &(nid_objs[204]),/* "id-smime-ct-receipt" */ | ||
| 1350 | &(nid_objs[195]),/* "id-smime-cti" */ | ||
| 1351 | &(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */ | ||
| 1352 | &(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */ | ||
| 1353 | &(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */ | ||
| 1354 | &(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */ | ||
| 1355 | &(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */ | ||
| 1356 | &(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */ | ||
| 1357 | &(nid_objs[189]),/* "id-smime-mod" */ | ||
| 1358 | &(nid_objs[196]),/* "id-smime-mod-cms" */ | ||
| 1359 | &(nid_objs[197]),/* "id-smime-mod-ess" */ | ||
| 1360 | &(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */ | ||
| 1361 | &(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */ | ||
| 1362 | &(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */ | ||
| 1363 | &(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */ | ||
| 1364 | &(nid_objs[199]),/* "id-smime-mod-msg-v3" */ | ||
| 1365 | &(nid_objs[198]),/* "id-smime-mod-oid" */ | ||
| 1366 | &(nid_objs[194]),/* "id-smime-spq" */ | ||
| 1367 | &(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */ | ||
| 1368 | &(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */ | ||
| 1369 | &(nid_objs[142]),/* "invalidityDate" */ | ||
| 1370 | &(nid_objs[294]),/* "ipsecEndSystem" */ | ||
| 1371 | &(nid_objs[295]),/* "ipsecTunnel" */ | ||
| 1372 | &(nid_objs[296]),/* "ipsecUser" */ | ||
| 1373 | &(nid_objs[86]),/* "issuerAltName" */ | ||
| 1374 | &(nid_objs[150]),/* "keyBag" */ | ||
| 1375 | &(nid_objs[83]),/* "keyUsage" */ | ||
| 1376 | &(nid_objs[157]),/* "localKeyID" */ | ||
| 1377 | &(nid_objs[388]),/* "mail" */ | ||
| 1378 | &(nid_objs[182]),/* "member-body" */ | ||
| 1379 | &(nid_objs[51]),/* "messageDigest" */ | ||
| 1380 | &(nid_objs[383]),/* "mgmt" */ | ||
| 1381 | &(nid_objs[136]),/* "msCTLSign" */ | ||
| 1382 | &(nid_objs[135]),/* "msCodeCom" */ | ||
| 1383 | &(nid_objs[134]),/* "msCodeInd" */ | ||
| 1384 | &(nid_objs[138]),/* "msEFS" */ | ||
| 1385 | &(nid_objs[171]),/* "msExtReq" */ | ||
| 1386 | &(nid_objs[137]),/* "msSGC" */ | ||
| 1387 | &(nid_objs[173]),/* "name" */ | ||
| 1388 | &(nid_objs[369]),/* "noCheck" */ | ||
| 1389 | &(nid_objs[72]),/* "nsBaseUrl" */ | ||
| 1390 | &(nid_objs[76]),/* "nsCaPolicyUrl" */ | ||
| 1391 | &(nid_objs[74]),/* "nsCaRevocationUrl" */ | ||
| 1392 | &(nid_objs[58]),/* "nsCertExt" */ | ||
| 1393 | &(nid_objs[79]),/* "nsCertSequence" */ | ||
| 1394 | &(nid_objs[71]),/* "nsCertType" */ | ||
| 1395 | &(nid_objs[78]),/* "nsComment" */ | ||
| 1396 | &(nid_objs[59]),/* "nsDataType" */ | ||
| 1397 | &(nid_objs[75]),/* "nsRenewalUrl" */ | ||
| 1398 | &(nid_objs[73]),/* "nsRevocationUrl" */ | ||
| 1399 | &(nid_objs[139]),/* "nsSGC" */ | ||
| 1400 | &(nid_objs[77]),/* "nsSslServerName" */ | ||
| 1401 | &(nid_objs[374]),/* "path" */ | ||
| 1402 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ | ||
| 1403 | &(nid_objs[ 2]),/* "pkcs" */ | ||
| 1404 | &(nid_objs[186]),/* "pkcs1" */ | ||
| 1405 | &(nid_objs[27]),/* "pkcs3" */ | ||
| 1406 | &(nid_objs[187]),/* "pkcs5" */ | ||
| 1407 | &(nid_objs[20]),/* "pkcs7" */ | ||
| 1408 | &(nid_objs[21]),/* "pkcs7-data" */ | ||
| 1409 | &(nid_objs[25]),/* "pkcs7-digestData" */ | ||
| 1410 | &(nid_objs[26]),/* "pkcs7-encryptedData" */ | ||
| 1411 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ | ||
| 1412 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ | ||
| 1413 | &(nid_objs[22]),/* "pkcs7-signedData" */ | ||
| 1414 | &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ | ||
| 1415 | &(nid_objs[47]),/* "pkcs9" */ | ||
| 1416 | &(nid_objs[385]),/* "private" */ | ||
| 1417 | &(nid_objs[84]),/* "privateKeyUsagePeriod" */ | ||
| 1418 | &(nid_objs[286]),/* "qcStatements" */ | ||
| 1419 | &(nid_objs[ 6]),/* "rsaEncryption" */ | ||
| 1420 | &(nid_objs[377]),/* "rsaSignature" */ | ||
| 1421 | &(nid_objs[ 1]),/* "rsadsi" */ | ||
| 1422 | &(nid_objs[155]),/* "safeContentsBag" */ | ||
| 1423 | &(nid_objs[291]),/* "sbqp-autonomousSysNum" */ | ||
| 1424 | &(nid_objs[290]),/* "sbqp-ipAddrBlock" */ | ||
| 1425 | &(nid_objs[292]),/* "sbqp-routerIdentifier" */ | ||
| 1426 | &(nid_objs[159]),/* "sdsiCertificate" */ | ||
| 1427 | &(nid_objs[154]),/* "secretBag" */ | ||
| 1428 | &(nid_objs[386]),/* "security" */ | ||
| 1429 | &(nid_objs[129]),/* "serverAuth" */ | ||
| 1430 | &(nid_objs[371]),/* "serviceLocator" */ | ||
| 1431 | &(nid_objs[52]),/* "signingTime" */ | ||
| 1432 | &(nid_objs[387]),/* "snmpv2" */ | ||
| 1433 | &(nid_objs[85]),/* "subjectAltName" */ | ||
| 1434 | &(nid_objs[82]),/* "subjectKeyIdentifier" */ | ||
| 1435 | &(nid_objs[293]),/* "textNotice" */ | ||
| 1436 | &(nid_objs[133]),/* "timeStamping" */ | ||
| 1437 | &(nid_objs[375]),/* "trustRoot" */ | ||
| 1438 | &(nid_objs[55]),/* "unstructuredAddress" */ | ||
| 1439 | &(nid_objs[49]),/* "unstructuredName" */ | ||
| 1440 | &(nid_objs[373]),/* "valid" */ | ||
| 1441 | &(nid_objs[158]),/* "x509Certificate" */ | ||
| 1442 | &(nid_objs[160]),/* "x509Crl" */ | ||
| 1443 | }; | ||
| 1444 | |||
| 1445 | static ASN1_OBJECT *ln_objs[NUM_LN]={ | ||
| 1446 | &(nid_objs[363]),/* "AD Time Stamping" */ | ||
| 1447 | &(nid_objs[368]),/* "Acceptable OCSP Responses" */ | ||
| 1448 | &(nid_objs[177]),/* "Authority Information Access" */ | ||
| 1449 | &(nid_objs[365]),/* "Basic OCSP Response" */ | ||
| 1450 | &(nid_objs[285]),/* "Biometric Info" */ | ||
| 1451 | &(nid_objs[179]),/* "CA Issuers" */ | ||
| 1452 | &(nid_objs[131]),/* "Code Signing" */ | ||
| 1453 | &(nid_objs[382]),/* "Directory" */ | ||
| 1454 | &(nid_objs[392]),/* "Domain" */ | ||
| 1455 | &(nid_objs[132]),/* "E-mail Protection" */ | ||
| 1456 | &(nid_objs[389]),/* "Enterprises" */ | ||
| 1457 | &(nid_objs[384]),/* "Experimental" */ | ||
| 1458 | &(nid_objs[372]),/* "Extended OCSP Status" */ | ||
| 1459 | &(nid_objs[172]),/* "Extension Request" */ | ||
| 1460 | &(nid_objs[294]),/* "IPSec End System" */ | ||
| 1461 | &(nid_objs[295]),/* "IPSec Tunnel" */ | ||
| 1462 | &(nid_objs[296]),/* "IPSec User" */ | ||
| 1463 | &(nid_objs[182]),/* "ISO Member Body" */ | ||
| 1464 | &(nid_objs[183]),/* "ISO US Member Body" */ | ||
| 1465 | &(nid_objs[142]),/* "Invalidity Date" */ | ||
| 1466 | &(nid_objs[388]),/* "Mail" */ | ||
| 1467 | &(nid_objs[383]),/* "Management" */ | ||
| 1468 | &(nid_objs[135]),/* "Microsoft Commercial Code Signing" */ | ||
| 1469 | &(nid_objs[138]),/* "Microsoft Encrypted File System" */ | ||
| 1470 | &(nid_objs[171]),/* "Microsoft Extension Request" */ | ||
| 1471 | &(nid_objs[134]),/* "Microsoft Individual Code Signing" */ | ||
| 1472 | &(nid_objs[137]),/* "Microsoft Server Gated Crypto" */ | ||
| 1473 | &(nid_objs[136]),/* "Microsoft Trust List Signing" */ | ||
| 1474 | &(nid_objs[72]),/* "Netscape Base Url" */ | ||
| 1475 | &(nid_objs[76]),/* "Netscape CA Policy Url" */ | ||
| 1476 | &(nid_objs[74]),/* "Netscape CA Revocation Url" */ | ||
| 1477 | &(nid_objs[71]),/* "Netscape Cert Type" */ | ||
| 1478 | &(nid_objs[58]),/* "Netscape Certificate Extension" */ | ||
| 1479 | &(nid_objs[79]),/* "Netscape Certificate Sequence" */ | ||
| 1480 | &(nid_objs[78]),/* "Netscape Comment" */ | ||
| 1481 | &(nid_objs[57]),/* "Netscape Communications Corp." */ | ||
| 1482 | &(nid_objs[59]),/* "Netscape Data Type" */ | ||
| 1483 | &(nid_objs[75]),/* "Netscape Renewal Url" */ | ||
| 1484 | &(nid_objs[73]),/* "Netscape Revocation Url" */ | ||
| 1485 | &(nid_objs[77]),/* "Netscape SSL Server Name" */ | ||
| 1486 | &(nid_objs[139]),/* "Netscape Server Gated Crypto" */ | ||
| 1487 | &(nid_objs[178]),/* "OCSP" */ | ||
| 1488 | &(nid_objs[370]),/* "OCSP Archive Cutoff" */ | ||
| 1489 | &(nid_objs[367]),/* "OCSP CRL ID" */ | ||
| 1490 | &(nid_objs[366]),/* "OCSP Nonce" */ | ||
| 1491 | &(nid_objs[371]),/* "OCSP Service Locator" */ | ||
| 1492 | &(nid_objs[180]),/* "OCSP Signing" */ | ||
| 1493 | &(nid_objs[161]),/* "PBES2" */ | ||
| 1494 | &(nid_objs[69]),/* "PBKDF2" */ | ||
| 1495 | &(nid_objs[162]),/* "PBMAC1" */ | ||
| 1496 | &(nid_objs[127]),/* "PKIX" */ | ||
| 1497 | &(nid_objs[164]),/* "Policy Qualifier CPS" */ | ||
| 1498 | &(nid_objs[165]),/* "Policy Qualifier User Notice" */ | ||
| 1499 | &(nid_objs[385]),/* "Private" */ | ||
| 1500 | &(nid_objs[ 1]),/* "RSA Data Security, Inc." */ | ||
| 1501 | &(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */ | ||
| 1502 | &(nid_objs[188]),/* "S/MIME" */ | ||
| 1503 | &(nid_objs[167]),/* "S/MIME Capabilities" */ | ||
| 1504 | &(nid_objs[387]),/* "SNMPv2" */ | ||
| 1505 | &(nid_objs[386]),/* "Security" */ | ||
| 1506 | &(nid_objs[143]),/* "Strong Extranet ID" */ | ||
| 1507 | &(nid_objs[130]),/* "TLS Web Client Authentication" */ | ||
| 1508 | &(nid_objs[129]),/* "TLS Web Server Authentication" */ | ||
| 1509 | &(nid_objs[133]),/* "Time Stamping" */ | ||
| 1510 | &(nid_objs[375]),/* "Trust Root" */ | ||
| 1511 | &(nid_objs[12]),/* "X509" */ | ||
| 1512 | &(nid_objs[90]),/* "X509v3 Authority Key Identifier" */ | ||
| 1513 | &(nid_objs[87]),/* "X509v3 Basic Constraints" */ | ||
| 1514 | &(nid_objs[103]),/* "X509v3 CRL Distribution Points" */ | ||
| 1515 | &(nid_objs[88]),/* "X509v3 CRL Number" */ | ||
| 1516 | &(nid_objs[141]),/* "X509v3 CRL Reason Code" */ | ||
| 1517 | &(nid_objs[89]),/* "X509v3 Certificate Policies" */ | ||
| 1518 | &(nid_objs[140]),/* "X509v3 Delta CRL Indicator" */ | ||
| 1519 | &(nid_objs[126]),/* "X509v3 Extended Key Usage" */ | ||
| 1520 | &(nid_objs[86]),/* "X509v3 Issuer Alternative Name" */ | ||
| 1521 | &(nid_objs[83]),/* "X509v3 Key Usage" */ | ||
| 1522 | &(nid_objs[84]),/* "X509v3 Private Key Usage Period" */ | ||
| 1523 | &(nid_objs[85]),/* "X509v3 Subject Alternative Name" */ | ||
| 1524 | &(nid_objs[82]),/* "X509v3 Subject Key Identifier" */ | ||
| 1525 | &(nid_objs[184]),/* "X9.57" */ | ||
| 1526 | &(nid_objs[185]),/* "X9.57 CM ?" */ | ||
| 1527 | &(nid_objs[289]),/* "aaControls" */ | ||
| 1528 | &(nid_objs[287]),/* "ac-auditEntity" */ | ||
| 1529 | &(nid_objs[288]),/* "ac-targeting" */ | ||
| 1530 | &(nid_objs[364]),/* "ad dvcs" */ | ||
| 1531 | &(nid_objs[376]),/* "algorithm" */ | ||
| 1532 | &(nid_objs[91]),/* "bf-cbc" */ | ||
| 1533 | &(nid_objs[93]),/* "bf-cfb" */ | ||
| 1534 | &(nid_objs[92]),/* "bf-ecb" */ | ||
| 1535 | &(nid_objs[94]),/* "bf-ofb" */ | ||
| 1536 | &(nid_objs[108]),/* "cast5-cbc" */ | ||
| 1537 | &(nid_objs[110]),/* "cast5-cfb" */ | ||
| 1538 | &(nid_objs[109]),/* "cast5-ecb" */ | ||
| 1539 | &(nid_objs[111]),/* "cast5-ofb" */ | ||
| 1540 | &(nid_objs[152]),/* "certBag" */ | ||
| 1541 | &(nid_objs[54]),/* "challengePassword" */ | ||
| 1542 | &(nid_objs[13]),/* "commonName" */ | ||
| 1543 | &(nid_objs[50]),/* "contentType" */ | ||
| 1544 | &(nid_objs[53]),/* "countersignature" */ | ||
| 1545 | &(nid_objs[14]),/* "countryName" */ | ||
| 1546 | &(nid_objs[153]),/* "crlBag" */ | ||
| 1547 | &(nid_objs[390]),/* "dcObject" */ | ||
| 1548 | &(nid_objs[31]),/* "des-cbc" */ | ||
| 1549 | &(nid_objs[30]),/* "des-cfb" */ | ||
| 1550 | &(nid_objs[29]),/* "des-ecb" */ | ||
| 1551 | &(nid_objs[32]),/* "des-ede" */ | ||
| 1552 | &(nid_objs[43]),/* "des-ede-cbc" */ | ||
| 1553 | &(nid_objs[60]),/* "des-ede-cfb" */ | ||
| 1554 | &(nid_objs[62]),/* "des-ede-ofb" */ | ||
| 1555 | &(nid_objs[33]),/* "des-ede3" */ | ||
| 1556 | &(nid_objs[44]),/* "des-ede3-cbc" */ | ||
| 1557 | &(nid_objs[61]),/* "des-ede3-cfb" */ | ||
| 1558 | &(nid_objs[63]),/* "des-ede3-ofb" */ | ||
| 1559 | &(nid_objs[45]),/* "des-ofb" */ | ||
| 1560 | &(nid_objs[107]),/* "description" */ | ||
| 1561 | &(nid_objs[80]),/* "desx-cbc" */ | ||
| 1562 | &(nid_objs[28]),/* "dhKeyAgreement" */ | ||
| 1563 | &(nid_objs[11]),/* "directory services (X.500)" */ | ||
| 1564 | &(nid_objs[378]),/* "directory services - algorithms" */ | ||
| 1565 | &(nid_objs[174]),/* "dnQualifier" */ | ||
| 1566 | &(nid_objs[380]),/* "dod" */ | ||
| 1567 | &(nid_objs[391]),/* "domainComponent" */ | ||
| 1568 | &(nid_objs[116]),/* "dsaEncryption" */ | ||
| 1569 | &(nid_objs[67]),/* "dsaEncryption-old" */ | ||
| 1570 | &(nid_objs[66]),/* "dsaWithSHA" */ | ||
| 1571 | &(nid_objs[113]),/* "dsaWithSHA1" */ | ||
| 1572 | &(nid_objs[70]),/* "dsaWithSHA1-old" */ | ||
| 1573 | &(nid_objs[297]),/* "dvcs" */ | ||
| 1574 | &(nid_objs[48]),/* "emailAddress" */ | ||
| 1575 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ | ||
| 1576 | &(nid_objs[156]),/* "friendlyName" */ | ||
| 1577 | &(nid_objs[99]),/* "givenName" */ | ||
| 1578 | &(nid_objs[163]),/* "hmacWithSHA1" */ | ||
| 1579 | &(nid_objs[381]),/* "iana" */ | ||
| 1580 | &(nid_objs[266]),/* "id-aca" */ | ||
| 1581 | &(nid_objs[355]),/* "id-aca-accessIdentity" */ | ||
| 1582 | &(nid_objs[354]),/* "id-aca-authenticationInfo" */ | ||
| 1583 | &(nid_objs[356]),/* "id-aca-chargingIdentity" */ | ||
| 1584 | &(nid_objs[357]),/* "id-aca-group" */ | ||
| 1585 | &(nid_objs[358]),/* "id-aca-role" */ | ||
| 1586 | &(nid_objs[176]),/* "id-ad" */ | ||
| 1587 | &(nid_objs[262]),/* "id-alg" */ | ||
| 1588 | &(nid_objs[323]),/* "id-alg-des40" */ | ||
| 1589 | &(nid_objs[326]),/* "id-alg-dh-pop" */ | ||
| 1590 | &(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */ | ||
| 1591 | &(nid_objs[324]),/* "id-alg-noSignature" */ | ||
| 1592 | &(nid_objs[268]),/* "id-cct" */ | ||
| 1593 | &(nid_objs[361]),/* "id-cct-PKIData" */ | ||
| 1594 | &(nid_objs[362]),/* "id-cct-PKIResponse" */ | ||
| 1595 | &(nid_objs[360]),/* "id-cct-crs" */ | ||
| 1596 | &(nid_objs[81]),/* "id-ce" */ | ||
| 1597 | &(nid_objs[263]),/* "id-cmc" */ | ||
| 1598 | &(nid_objs[334]),/* "id-cmc-addExtensions" */ | ||
| 1599 | &(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */ | ||
| 1600 | &(nid_objs[330]),/* "id-cmc-dataReturn" */ | ||
| 1601 | &(nid_objs[336]),/* "id-cmc-decryptedPOP" */ | ||
| 1602 | &(nid_objs[335]),/* "id-cmc-encryptedPOP" */ | ||
| 1603 | &(nid_objs[339]),/* "id-cmc-getCRL" */ | ||
| 1604 | &(nid_objs[338]),/* "id-cmc-getCert" */ | ||
| 1605 | &(nid_objs[328]),/* "id-cmc-identification" */ | ||
| 1606 | &(nid_objs[329]),/* "id-cmc-identityProof" */ | ||
| 1607 | &(nid_objs[337]),/* "id-cmc-lraPOPWitness" */ | ||
| 1608 | &(nid_objs[344]),/* "id-cmc-popLinkRandom" */ | ||
| 1609 | &(nid_objs[345]),/* "id-cmc-popLinkWitness" */ | ||
| 1610 | &(nid_objs[343]),/* "id-cmc-queryPending" */ | ||
| 1611 | &(nid_objs[333]),/* "id-cmc-recipientNonce" */ | ||
| 1612 | &(nid_objs[341]),/* "id-cmc-regInfo" */ | ||
| 1613 | &(nid_objs[342]),/* "id-cmc-responseInfo" */ | ||
| 1614 | &(nid_objs[340]),/* "id-cmc-revokeRequest" */ | ||
| 1615 | &(nid_objs[332]),/* "id-cmc-senderNonce" */ | ||
| 1616 | &(nid_objs[327]),/* "id-cmc-statusInfo" */ | ||
| 1617 | &(nid_objs[331]),/* "id-cmc-transactionId" */ | ||
| 1618 | &(nid_objs[260]),/* "id-it" */ | ||
| 1619 | &(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */ | ||
| 1620 | &(nid_objs[298]),/* "id-it-caProtEncCert" */ | ||
| 1621 | &(nid_objs[311]),/* "id-it-confirmWaitTime" */ | ||
| 1622 | &(nid_objs[303]),/* "id-it-currentCRL" */ | ||
| 1623 | &(nid_objs[300]),/* "id-it-encKeyPairTypes" */ | ||
| 1624 | &(nid_objs[310]),/* "id-it-implicitConfirm" */ | ||
| 1625 | &(nid_objs[308]),/* "id-it-keyPairParamRep" */ | ||
| 1626 | &(nid_objs[307]),/* "id-it-keyPairParamReq" */ | ||
| 1627 | &(nid_objs[312]),/* "id-it-origPKIMessage" */ | ||
| 1628 | &(nid_objs[301]),/* "id-it-preferredSymmAlg" */ | ||
| 1629 | &(nid_objs[309]),/* "id-it-revPassphrase" */ | ||
| 1630 | &(nid_objs[299]),/* "id-it-signKeyPairTypes" */ | ||
| 1631 | &(nid_objs[305]),/* "id-it-subscriptionRequest" */ | ||
| 1632 | &(nid_objs[306]),/* "id-it-subscriptionResponse" */ | ||
| 1633 | &(nid_objs[304]),/* "id-it-unsupportedOIDs" */ | ||
| 1634 | &(nid_objs[128]),/* "id-kp" */ | ||
| 1635 | &(nid_objs[280]),/* "id-mod-attribute-cert" */ | ||
| 1636 | &(nid_objs[274]),/* "id-mod-cmc" */ | ||
| 1637 | &(nid_objs[277]),/* "id-mod-cmp" */ | ||
| 1638 | &(nid_objs[284]),/* "id-mod-cmp2000" */ | ||
| 1639 | &(nid_objs[273]),/* "id-mod-crmf" */ | ||
| 1640 | &(nid_objs[283]),/* "id-mod-dvcs" */ | ||
| 1641 | &(nid_objs[275]),/* "id-mod-kea-profile-88" */ | ||
| 1642 | &(nid_objs[276]),/* "id-mod-kea-profile-93" */ | ||
| 1643 | &(nid_objs[282]),/* "id-mod-ocsp" */ | ||
| 1644 | &(nid_objs[278]),/* "id-mod-qualified-cert-88" */ | ||
| 1645 | &(nid_objs[279]),/* "id-mod-qualified-cert-93" */ | ||
| 1646 | &(nid_objs[281]),/* "id-mod-timestamp-protocol" */ | ||
| 1647 | &(nid_objs[264]),/* "id-on" */ | ||
| 1648 | &(nid_objs[347]),/* "id-on-personalData" */ | ||
| 1649 | &(nid_objs[265]),/* "id-pda" */ | ||
| 1650 | &(nid_objs[352]),/* "id-pda-countryOfCitizenship" */ | ||
| 1651 | &(nid_objs[353]),/* "id-pda-countryOfResidence" */ | ||
| 1652 | &(nid_objs[348]),/* "id-pda-dateOfBirth" */ | ||
| 1653 | &(nid_objs[351]),/* "id-pda-gender" */ | ||
| 1654 | &(nid_objs[349]),/* "id-pda-placeOfBirth" */ | ||
| 1655 | &(nid_objs[350]),/* "id-pda-pseudonym" */ | ||
| 1656 | &(nid_objs[175]),/* "id-pe" */ | ||
| 1657 | &(nid_objs[261]),/* "id-pkip" */ | ||
| 1658 | &(nid_objs[258]),/* "id-pkix-mod" */ | ||
| 1659 | &(nid_objs[269]),/* "id-pkix1-explicit-88" */ | ||
| 1660 | &(nid_objs[271]),/* "id-pkix1-explicit-93" */ | ||
| 1661 | &(nid_objs[270]),/* "id-pkix1-implicit-88" */ | ||
| 1662 | &(nid_objs[272]),/* "id-pkix1-implicit-93" */ | ||
| 1663 | &(nid_objs[267]),/* "id-qcs" */ | ||
| 1664 | &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ | ||
| 1665 | &(nid_objs[259]),/* "id-qt" */ | ||
| 1666 | &(nid_objs[313]),/* "id-regCtrl" */ | ||
| 1667 | &(nid_objs[316]),/* "id-regCtrl-authenticator" */ | ||
| 1668 | &(nid_objs[319]),/* "id-regCtrl-oldCertID" */ | ||
| 1669 | &(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */ | ||
| 1670 | &(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */ | ||
| 1671 | &(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */ | ||
| 1672 | &(nid_objs[315]),/* "id-regCtrl-regToken" */ | ||
| 1673 | &(nid_objs[314]),/* "id-regInfo" */ | ||
| 1674 | &(nid_objs[322]),/* "id-regInfo-certReq" */ | ||
| 1675 | &(nid_objs[321]),/* "id-regInfo-utf8Pairs" */ | ||
| 1676 | &(nid_objs[191]),/* "id-smime-aa" */ | ||
| 1677 | &(nid_objs[215]),/* "id-smime-aa-contentHint" */ | ||
| 1678 | &(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */ | ||
| 1679 | &(nid_objs[221]),/* "id-smime-aa-contentReference" */ | ||
| 1680 | &(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */ | ||
| 1681 | &(nid_objs[217]),/* "id-smime-aa-encapContentType" */ | ||
| 1682 | &(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */ | ||
| 1683 | &(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */ | ||
| 1684 | &(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */ | ||
| 1685 | &(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */ | ||
| 1686 | &(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */ | ||
| 1687 | &(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */ | ||
| 1688 | &(nid_objs[234]),/* "id-smime-aa-ets-certValues" */ | ||
| 1689 | &(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */ | ||
| 1690 | &(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */ | ||
| 1691 | &(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */ | ||
| 1692 | &(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */ | ||
| 1693 | &(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */ | ||
| 1694 | &(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */ | ||
| 1695 | &(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */ | ||
| 1696 | &(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */ | ||
| 1697 | &(nid_objs[219]),/* "id-smime-aa-macValue" */ | ||
| 1698 | &(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */ | ||
| 1699 | &(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */ | ||
| 1700 | &(nid_objs[212]),/* "id-smime-aa-receiptRequest" */ | ||
| 1701 | &(nid_objs[213]),/* "id-smime-aa-securityLabel" */ | ||
| 1702 | &(nid_objs[239]),/* "id-smime-aa-signatureType" */ | ||
| 1703 | &(nid_objs[223]),/* "id-smime-aa-signingCertificate" */ | ||
| 1704 | &(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */ | ||
| 1705 | &(nid_objs[225]),/* "id-smime-aa-timeStampToken" */ | ||
| 1706 | &(nid_objs[192]),/* "id-smime-alg" */ | ||
| 1707 | &(nid_objs[243]),/* "id-smime-alg-3DESwrap" */ | ||
| 1708 | &(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */ | ||
| 1709 | &(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */ | ||
| 1710 | &(nid_objs[245]),/* "id-smime-alg-ESDH" */ | ||
| 1711 | &(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */ | ||
| 1712 | &(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */ | ||
| 1713 | &(nid_objs[244]),/* "id-smime-alg-RC2wrap" */ | ||
| 1714 | &(nid_objs[193]),/* "id-smime-cd" */ | ||
| 1715 | &(nid_objs[248]),/* "id-smime-cd-ldap" */ | ||
| 1716 | &(nid_objs[190]),/* "id-smime-ct" */ | ||
| 1717 | &(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */ | ||
| 1718 | &(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */ | ||
| 1719 | &(nid_objs[208]),/* "id-smime-ct-TDTInfo" */ | ||
| 1720 | &(nid_objs[207]),/* "id-smime-ct-TSTInfo" */ | ||
| 1721 | &(nid_objs[205]),/* "id-smime-ct-authData" */ | ||
| 1722 | &(nid_objs[209]),/* "id-smime-ct-contentInfo" */ | ||
| 1723 | &(nid_objs[206]),/* "id-smime-ct-publishCert" */ | ||
| 1724 | &(nid_objs[204]),/* "id-smime-ct-receipt" */ | ||
| 1725 | &(nid_objs[195]),/* "id-smime-cti" */ | ||
| 1726 | &(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */ | ||
| 1727 | &(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */ | ||
| 1728 | &(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */ | ||
| 1729 | &(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */ | ||
| 1730 | &(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */ | ||
| 1731 | &(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */ | ||
| 1732 | &(nid_objs[189]),/* "id-smime-mod" */ | ||
| 1733 | &(nid_objs[196]),/* "id-smime-mod-cms" */ | ||
| 1734 | &(nid_objs[197]),/* "id-smime-mod-ess" */ | ||
| 1735 | &(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */ | ||
| 1736 | &(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */ | ||
| 1737 | &(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */ | ||
| 1738 | &(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */ | ||
| 1739 | &(nid_objs[199]),/* "id-smime-mod-msg-v3" */ | ||
| 1740 | &(nid_objs[198]),/* "id-smime-mod-oid" */ | ||
| 1741 | &(nid_objs[194]),/* "id-smime-spq" */ | ||
| 1742 | &(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */ | ||
| 1743 | &(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */ | ||
| 1744 | &(nid_objs[34]),/* "idea-cbc" */ | ||
| 1745 | &(nid_objs[35]),/* "idea-cfb" */ | ||
| 1746 | &(nid_objs[36]),/* "idea-ecb" */ | ||
| 1747 | &(nid_objs[46]),/* "idea-ofb" */ | ||
| 1748 | &(nid_objs[101]),/* "initials" */ | ||
| 1749 | &(nid_objs[181]),/* "iso" */ | ||
| 1750 | &(nid_objs[150]),/* "keyBag" */ | ||
| 1751 | &(nid_objs[157]),/* "localKeyID" */ | ||
| 1752 | &(nid_objs[15]),/* "localityName" */ | ||
| 1753 | &(nid_objs[ 3]),/* "md2" */ | ||
| 1754 | &(nid_objs[ 7]),/* "md2WithRSAEncryption" */ | ||
| 1755 | &(nid_objs[257]),/* "md4" */ | ||
| 1756 | &(nid_objs[ 4]),/* "md5" */ | ||
| 1757 | &(nid_objs[114]),/* "md5-sha1" */ | ||
| 1758 | &(nid_objs[104]),/* "md5WithRSA" */ | ||
| 1759 | &(nid_objs[ 8]),/* "md5WithRSAEncryption" */ | ||
| 1760 | &(nid_objs[95]),/* "mdc2" */ | ||
| 1761 | &(nid_objs[96]),/* "mdc2WithRSA" */ | ||
| 1762 | &(nid_objs[51]),/* "messageDigest" */ | ||
| 1763 | &(nid_objs[173]),/* "name" */ | ||
| 1764 | &(nid_objs[369]),/* "noCheck" */ | ||
| 1765 | &(nid_objs[379]),/* "org" */ | ||
| 1766 | &(nid_objs[17]),/* "organizationName" */ | ||
| 1767 | &(nid_objs[18]),/* "organizationalUnitName" */ | ||
| 1768 | &(nid_objs[374]),/* "path" */ | ||
| 1769 | &(nid_objs[ 9]),/* "pbeWithMD2AndDES-CBC" */ | ||
| 1770 | &(nid_objs[168]),/* "pbeWithMD2AndRC2-CBC" */ | ||
| 1771 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ | ||
| 1772 | &(nid_objs[10]),/* "pbeWithMD5AndDES-CBC" */ | ||
| 1773 | &(nid_objs[169]),/* "pbeWithMD5AndRC2-CBC" */ | ||
| 1774 | &(nid_objs[148]),/* "pbeWithSHA1And128BitRC2-CBC" */ | ||
| 1775 | &(nid_objs[144]),/* "pbeWithSHA1And128BitRC4" */ | ||
| 1776 | &(nid_objs[147]),/* "pbeWithSHA1And2-KeyTripleDES-CBC" */ | ||
| 1777 | &(nid_objs[146]),/* "pbeWithSHA1And3-KeyTripleDES-CBC" */ | ||
| 1778 | &(nid_objs[149]),/* "pbeWithSHA1And40BitRC2-CBC" */ | ||
| 1779 | &(nid_objs[145]),/* "pbeWithSHA1And40BitRC4" */ | ||
| 1780 | &(nid_objs[170]),/* "pbeWithSHA1AndDES-CBC" */ | ||
| 1781 | &(nid_objs[68]),/* "pbeWithSHA1AndRC2-CBC" */ | ||
| 1782 | &(nid_objs[186]),/* "pkcs1" */ | ||
| 1783 | &(nid_objs[27]),/* "pkcs3" */ | ||
| 1784 | &(nid_objs[187]),/* "pkcs5" */ | ||
| 1785 | &(nid_objs[20]),/* "pkcs7" */ | ||
| 1786 | &(nid_objs[21]),/* "pkcs7-data" */ | ||
| 1787 | &(nid_objs[25]),/* "pkcs7-digestData" */ | ||
| 1788 | &(nid_objs[26]),/* "pkcs7-encryptedData" */ | ||
| 1789 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ | ||
| 1790 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ | ||
| 1791 | &(nid_objs[22]),/* "pkcs7-signedData" */ | ||
| 1792 | &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ | ||
| 1793 | &(nid_objs[47]),/* "pkcs9" */ | ||
| 1794 | &(nid_objs[286]),/* "qcStatements" */ | ||
| 1795 | &(nid_objs[98]),/* "rc2-40-cbc" */ | ||
| 1796 | &(nid_objs[166]),/* "rc2-64-cbc" */ | ||
| 1797 | &(nid_objs[37]),/* "rc2-cbc" */ | ||
| 1798 | &(nid_objs[39]),/* "rc2-cfb" */ | ||
| 1799 | &(nid_objs[38]),/* "rc2-ecb" */ | ||
| 1800 | &(nid_objs[40]),/* "rc2-ofb" */ | ||
| 1801 | &(nid_objs[ 5]),/* "rc4" */ | ||
| 1802 | &(nid_objs[97]),/* "rc4-40" */ | ||
| 1803 | &(nid_objs[120]),/* "rc5-cbc" */ | ||
| 1804 | &(nid_objs[122]),/* "rc5-cfb" */ | ||
| 1805 | &(nid_objs[121]),/* "rc5-ecb" */ | ||
| 1806 | &(nid_objs[123]),/* "rc5-ofb" */ | ||
| 1807 | &(nid_objs[117]),/* "ripemd160" */ | ||
| 1808 | &(nid_objs[119]),/* "ripemd160WithRSA" */ | ||
| 1809 | &(nid_objs[19]),/* "rsa" */ | ||
| 1810 | &(nid_objs[ 6]),/* "rsaEncryption" */ | ||
| 1811 | &(nid_objs[377]),/* "rsaSignature" */ | ||
| 1812 | &(nid_objs[124]),/* "run length compression" */ | ||
| 1813 | &(nid_objs[155]),/* "safeContentsBag" */ | ||
| 1814 | &(nid_objs[291]),/* "sbqp-autonomousSysNum" */ | ||
| 1815 | &(nid_objs[290]),/* "sbqp-ipAddrBlock" */ | ||
| 1816 | &(nid_objs[292]),/* "sbqp-routerIdentifier" */ | ||
| 1817 | &(nid_objs[159]),/* "sdsiCertificate" */ | ||
| 1818 | &(nid_objs[154]),/* "secretBag" */ | ||
| 1819 | &(nid_objs[105]),/* "serialNumber" */ | ||
| 1820 | &(nid_objs[41]),/* "sha" */ | ||
| 1821 | &(nid_objs[64]),/* "sha1" */ | ||
| 1822 | &(nid_objs[115]),/* "sha1WithRSA" */ | ||
| 1823 | &(nid_objs[65]),/* "sha1WithRSAEncryption" */ | ||
| 1824 | &(nid_objs[42]),/* "shaWithRSAEncryption" */ | ||
| 1825 | &(nid_objs[52]),/* "signingTime" */ | ||
| 1826 | &(nid_objs[16]),/* "stateOrProvinceName" */ | ||
| 1827 | &(nid_objs[100]),/* "surname" */ | ||
| 1828 | &(nid_objs[293]),/* "textNotice" */ | ||
| 1829 | &(nid_objs[106]),/* "title" */ | ||
| 1830 | &(nid_objs[ 0]),/* "undefined" */ | ||
| 1831 | &(nid_objs[102]),/* "uniqueIdentifier" */ | ||
| 1832 | &(nid_objs[55]),/* "unstructuredAddress" */ | ||
| 1833 | &(nid_objs[49]),/* "unstructuredName" */ | ||
| 1834 | &(nid_objs[373]),/* "valid" */ | ||
| 1835 | &(nid_objs[158]),/* "x509Certificate" */ | ||
| 1836 | &(nid_objs[160]),/* "x509Crl" */ | ||
| 1837 | &(nid_objs[125]),/* "zlib compression" */ | ||
| 1838 | }; | ||
| 1839 | |||
| 1840 | static ASN1_OBJECT *obj_objs[NUM_OBJ]={ | ||
| 1841 | &(nid_objs[ 0]),/* OBJ_undef 0 */ | ||
| 1842 | &(nid_objs[389]),/* OBJ_Enterprises 1 */ | ||
| 1843 | &(nid_objs[181]),/* OBJ_iso 1 */ | ||
| 1844 | &(nid_objs[182]),/* OBJ_member_body 1 2 */ | ||
| 1845 | &(nid_objs[379]),/* OBJ_org 1 3 */ | ||
| 1846 | &(nid_objs[11]),/* OBJ_X500 2 5 */ | ||
| 1847 | &(nid_objs[380]),/* OBJ_dod 1 3 6 */ | ||
| 1848 | &(nid_objs[12]),/* OBJ_X509 2 5 4 */ | ||
| 1849 | &(nid_objs[378]),/* OBJ_X500algorithms 2 5 8 */ | ||
| 1850 | &(nid_objs[81]),/* OBJ_id_ce 2 5 29 */ | ||
| 1851 | &(nid_objs[183]),/* OBJ_ISO_US 1 2 840 */ | ||
| 1852 | &(nid_objs[381]),/* OBJ_iana 1 3 6 1 */ | ||
| 1853 | &(nid_objs[13]),/* OBJ_commonName 2 5 4 3 */ | ||
| 1854 | &(nid_objs[100]),/* OBJ_surname 2 5 4 4 */ | ||
| 1855 | &(nid_objs[105]),/* OBJ_serialNumber 2 5 4 5 */ | ||
| 1856 | &(nid_objs[14]),/* OBJ_countryName 2 5 4 6 */ | ||
| 1857 | &(nid_objs[15]),/* OBJ_localityName 2 5 4 7 */ | ||
| 1858 | &(nid_objs[16]),/* OBJ_stateOrProvinceName 2 5 4 8 */ | ||
| 1859 | &(nid_objs[17]),/* OBJ_organizationName 2 5 4 10 */ | ||
| 1860 | &(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */ | ||
| 1861 | &(nid_objs[106]),/* OBJ_title 2 5 4 12 */ | ||
| 1862 | &(nid_objs[107]),/* OBJ_description 2 5 4 13 */ | ||
| 1863 | &(nid_objs[173]),/* OBJ_name 2 5 4 41 */ | ||
| 1864 | &(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */ | ||
| 1865 | &(nid_objs[101]),/* OBJ_initials 2 5 4 43 */ | ||
| 1866 | &(nid_objs[102]),/* OBJ_uniqueIdentifier 2 5 4 45 */ | ||
| 1867 | &(nid_objs[174]),/* OBJ_dnQualifier 2 5 4 46 */ | ||
| 1868 | &(nid_objs[82]),/* OBJ_subject_key_identifier 2 5 29 14 */ | ||
| 1869 | &(nid_objs[83]),/* OBJ_key_usage 2 5 29 15 */ | ||
| 1870 | &(nid_objs[84]),/* OBJ_private_key_usage_period 2 5 29 16 */ | ||
| 1871 | &(nid_objs[85]),/* OBJ_subject_alt_name 2 5 29 17 */ | ||
| 1872 | &(nid_objs[86]),/* OBJ_issuer_alt_name 2 5 29 18 */ | ||
| 1873 | &(nid_objs[87]),/* OBJ_basic_constraints 2 5 29 19 */ | ||
| 1874 | &(nid_objs[88]),/* OBJ_crl_number 2 5 29 20 */ | ||
| 1875 | &(nid_objs[141]),/* OBJ_crl_reason 2 5 29 21 */ | ||
| 1876 | &(nid_objs[142]),/* OBJ_invalidity_date 2 5 29 24 */ | ||
| 1877 | &(nid_objs[140]),/* OBJ_delta_crl 2 5 29 27 */ | ||
| 1878 | &(nid_objs[103]),/* OBJ_crl_distribution_points 2 5 29 31 */ | ||
| 1879 | &(nid_objs[89]),/* OBJ_certificate_policies 2 5 29 32 */ | ||
| 1880 | &(nid_objs[90]),/* OBJ_authority_key_identifier 2 5 29 35 */ | ||
| 1881 | &(nid_objs[126]),/* OBJ_ext_key_usage 2 5 29 37 */ | ||
| 1882 | &(nid_objs[390]),/* OBJ_dcObject 1466 344 */ | ||
| 1883 | &(nid_objs[382]),/* OBJ_Directory 1 3 6 1 1 */ | ||
| 1884 | &(nid_objs[383]),/* OBJ_Management 1 3 6 1 2 */ | ||
| 1885 | &(nid_objs[384]),/* OBJ_Experimental 1 3 6 1 3 */ | ||
| 1886 | &(nid_objs[385]),/* OBJ_Private 1 3 6 1 4 */ | ||
| 1887 | &(nid_objs[386]),/* OBJ_Security 1 3 6 1 5 */ | ||
| 1888 | &(nid_objs[387]),/* OBJ_SNMPv2 1 3 6 1 6 */ | ||
| 1889 | &(nid_objs[388]),/* OBJ_Mail 1 3 6 1 7 */ | ||
| 1890 | &(nid_objs[376]),/* OBJ_algorithm 1 3 14 3 2 */ | ||
| 1891 | &(nid_objs[19]),/* OBJ_rsa 2 5 8 1 1 */ | ||
| 1892 | &(nid_objs[96]),/* OBJ_mdc2WithRSA 2 5 8 3 100 */ | ||
| 1893 | &(nid_objs[95]),/* OBJ_mdc2 2 5 8 3 101 */ | ||
| 1894 | &(nid_objs[184]),/* OBJ_X9_57 1 2 840 10040 */ | ||
| 1895 | &(nid_objs[104]),/* OBJ_md5WithRSA 1 3 14 3 2 3 */ | ||
| 1896 | &(nid_objs[29]),/* OBJ_des_ecb 1 3 14 3 2 6 */ | ||
| 1897 | &(nid_objs[31]),/* OBJ_des_cbc 1 3 14 3 2 7 */ | ||
| 1898 | &(nid_objs[45]),/* OBJ_des_ofb64 1 3 14 3 2 8 */ | ||
| 1899 | &(nid_objs[30]),/* OBJ_des_cfb64 1 3 14 3 2 9 */ | ||
| 1900 | &(nid_objs[377]),/* OBJ_rsaSignature 1 3 14 3 2 11 */ | ||
| 1901 | &(nid_objs[67]),/* OBJ_dsa_2 1 3 14 3 2 12 */ | ||
| 1902 | &(nid_objs[66]),/* OBJ_dsaWithSHA 1 3 14 3 2 13 */ | ||
| 1903 | &(nid_objs[42]),/* OBJ_shaWithRSAEncryption 1 3 14 3 2 15 */ | ||
| 1904 | &(nid_objs[32]),/* OBJ_des_ede 1 3 14 3 2 17 */ | ||
| 1905 | &(nid_objs[41]),/* OBJ_sha 1 3 14 3 2 18 */ | ||
| 1906 | &(nid_objs[64]),/* OBJ_sha1 1 3 14 3 2 26 */ | ||
| 1907 | &(nid_objs[70]),/* OBJ_dsaWithSHA1_2 1 3 14 3 2 27 */ | ||
| 1908 | &(nid_objs[115]),/* OBJ_sha1WithRSA 1 3 14 3 2 29 */ | ||
| 1909 | &(nid_objs[117]),/* OBJ_ripemd160 1 3 36 3 2 1 */ | ||
| 1910 | &(nid_objs[143]),/* OBJ_sxnet 1 3 101 1 4 1 */ | ||
| 1911 | &(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666 1 */ | ||
| 1912 | &(nid_objs[125]),/* OBJ_zlib_compression 1 1 1 1 666 2 */ | ||
| 1913 | &(nid_objs[ 1]),/* OBJ_rsadsi 1 2 840 113549 */ | ||
| 1914 | &(nid_objs[185]),/* OBJ_X9cm 1 2 840 10040 4 */ | ||
| 1915 | &(nid_objs[127]),/* OBJ_id_pkix 1 3 6 1 5 5 7 */ | ||
| 1916 | &(nid_objs[119]),/* OBJ_ripemd160WithRSA 1 3 36 3 3 1 2 */ | ||
| 1917 | &(nid_objs[ 2]),/* OBJ_pkcs 1 2 840 113549 1 */ | ||
| 1918 | &(nid_objs[116]),/* OBJ_dsa 1 2 840 10040 4 1 */ | ||
| 1919 | &(nid_objs[113]),/* OBJ_dsaWithSHA1 1 2 840 10040 4 3 */ | ||
| 1920 | &(nid_objs[258]),/* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */ | ||
| 1921 | &(nid_objs[175]),/* OBJ_id_pe 1 3 6 1 5 5 7 1 */ | ||
| 1922 | &(nid_objs[259]),/* OBJ_id_qt 1 3 6 1 5 5 7 2 */ | ||
| 1923 | &(nid_objs[128]),/* OBJ_id_kp 1 3 6 1 5 5 7 3 */ | ||
| 1924 | &(nid_objs[260]),/* OBJ_id_it 1 3 6 1 5 5 7 4 */ | ||
| 1925 | &(nid_objs[261]),/* OBJ_id_pkip 1 3 6 1 5 5 7 5 */ | ||
| 1926 | &(nid_objs[262]),/* OBJ_id_alg 1 3 6 1 5 5 7 6 */ | ||
| 1927 | &(nid_objs[263]),/* OBJ_id_cmc 1 3 6 1 5 5 7 7 */ | ||
| 1928 | &(nid_objs[264]),/* OBJ_id_on 1 3 6 1 5 5 7 8 */ | ||
| 1929 | &(nid_objs[265]),/* OBJ_id_pda 1 3 6 1 5 5 7 9 */ | ||
| 1930 | &(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */ | ||
| 1931 | &(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */ | ||
| 1932 | &(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */ | ||
| 1933 | &(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */ | ||
| 1934 | &(nid_objs[57]),/* OBJ_netscape 2 16 840 1 113730 */ | ||
| 1935 | &(nid_objs[186]),/* OBJ_pkcs1 1 2 840 113549 1 1 */ | ||
| 1936 | &(nid_objs[27]),/* OBJ_pkcs3 1 2 840 113549 1 3 */ | ||
| 1937 | &(nid_objs[187]),/* OBJ_pkcs5 1 2 840 113549 1 5 */ | ||
| 1938 | &(nid_objs[20]),/* OBJ_pkcs7 1 2 840 113549 1 7 */ | ||
| 1939 | &(nid_objs[47]),/* OBJ_pkcs9 1 2 840 113549 1 9 */ | ||
| 1940 | &(nid_objs[ 3]),/* OBJ_md2 1 2 840 113549 2 2 */ | ||
| 1941 | &(nid_objs[257]),/* OBJ_md4 1 2 840 113549 2 4 */ | ||
| 1942 | &(nid_objs[ 4]),/* OBJ_md5 1 2 840 113549 2 5 */ | ||
| 1943 | &(nid_objs[163]),/* OBJ_hmacWithSHA1 1 2 840 113549 2 7 */ | ||
| 1944 | &(nid_objs[37]),/* OBJ_rc2_cbc 1 2 840 113549 3 2 */ | ||
| 1945 | &(nid_objs[ 5]),/* OBJ_rc4 1 2 840 113549 3 4 */ | ||
| 1946 | &(nid_objs[44]),/* OBJ_des_ede3_cbc 1 2 840 113549 3 7 */ | ||
| 1947 | &(nid_objs[120]),/* OBJ_rc5_cbc 1 2 840 113549 3 8 */ | ||
| 1948 | &(nid_objs[269]),/* OBJ_id_pkix1_explicit_88 1 3 6 1 5 5 7 0 1 */ | ||
| 1949 | &(nid_objs[270]),/* OBJ_id_pkix1_implicit_88 1 3 6 1 5 5 7 0 2 */ | ||
| 1950 | &(nid_objs[271]),/* OBJ_id_pkix1_explicit_93 1 3 6 1 5 5 7 0 3 */ | ||
| 1951 | &(nid_objs[272]),/* OBJ_id_pkix1_implicit_93 1 3 6 1 5 5 7 0 4 */ | ||
| 1952 | &(nid_objs[273]),/* OBJ_id_mod_crmf 1 3 6 1 5 5 7 0 5 */ | ||
| 1953 | &(nid_objs[274]),/* OBJ_id_mod_cmc 1 3 6 1 5 5 7 0 6 */ | ||
| 1954 | &(nid_objs[275]),/* OBJ_id_mod_kea_profile_88 1 3 6 1 5 5 7 0 7 */ | ||
| 1955 | &(nid_objs[276]),/* OBJ_id_mod_kea_profile_93 1 3 6 1 5 5 7 0 8 */ | ||
| 1956 | &(nid_objs[277]),/* OBJ_id_mod_cmp 1 3 6 1 5 5 7 0 9 */ | ||
| 1957 | &(nid_objs[278]),/* OBJ_id_mod_qualified_cert_88 1 3 6 1 5 5 7 0 10 */ | ||
| 1958 | &(nid_objs[279]),/* OBJ_id_mod_qualified_cert_93 1 3 6 1 5 5 7 0 11 */ | ||
| 1959 | &(nid_objs[280]),/* OBJ_id_mod_attribute_cert 1 3 6 1 5 5 7 0 12 */ | ||
| 1960 | &(nid_objs[281]),/* OBJ_id_mod_timestamp_protocol 1 3 6 1 5 5 7 0 13 */ | ||
| 1961 | &(nid_objs[282]),/* OBJ_id_mod_ocsp 1 3 6 1 5 5 7 0 14 */ | ||
| 1962 | &(nid_objs[283]),/* OBJ_id_mod_dvcs 1 3 6 1 5 5 7 0 15 */ | ||
| 1963 | &(nid_objs[284]),/* OBJ_id_mod_cmp2000 1 3 6 1 5 5 7 0 16 */ | ||
| 1964 | &(nid_objs[177]),/* OBJ_info_access 1 3 6 1 5 5 7 1 1 */ | ||
| 1965 | &(nid_objs[285]),/* OBJ_biometricInfo 1 3 6 1 5 5 7 1 2 */ | ||
| 1966 | &(nid_objs[286]),/* OBJ_qcStatements 1 3 6 1 5 5 7 1 3 */ | ||
| 1967 | &(nid_objs[287]),/* OBJ_ac_auditEntity 1 3 6 1 5 5 7 1 4 */ | ||
| 1968 | &(nid_objs[288]),/* OBJ_ac_targeting 1 3 6 1 5 5 7 1 5 */ | ||
| 1969 | &(nid_objs[289]),/* OBJ_aaControls 1 3 6 1 5 5 7 1 6 */ | ||
| 1970 | &(nid_objs[290]),/* OBJ_sbqp_ipAddrBlock 1 3 6 1 5 5 7 1 7 */ | ||
| 1971 | &(nid_objs[291]),/* OBJ_sbqp_autonomousSysNum 1 3 6 1 5 5 7 1 8 */ | ||
| 1972 | &(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */ | ||
| 1973 | &(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */ | ||
| 1974 | &(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */ | ||
| 1975 | &(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */ | ||
| 1976 | &(nid_objs[129]),/* OBJ_server_auth 1 3 6 1 5 5 7 3 1 */ | ||
| 1977 | &(nid_objs[130]),/* OBJ_client_auth 1 3 6 1 5 5 7 3 2 */ | ||
| 1978 | &(nid_objs[131]),/* OBJ_code_sign 1 3 6 1 5 5 7 3 3 */ | ||
| 1979 | &(nid_objs[132]),/* OBJ_email_protect 1 3 6 1 5 5 7 3 4 */ | ||
| 1980 | &(nid_objs[294]),/* OBJ_ipsecEndSystem 1 3 6 1 5 5 7 3 5 */ | ||
| 1981 | &(nid_objs[295]),/* OBJ_ipsecTunnel 1 3 6 1 5 5 7 3 6 */ | ||
| 1982 | &(nid_objs[296]),/* OBJ_ipsecUser 1 3 6 1 5 5 7 3 7 */ | ||
| 1983 | &(nid_objs[133]),/* OBJ_time_stamp 1 3 6 1 5 5 7 3 8 */ | ||
| 1984 | &(nid_objs[180]),/* OBJ_OCSP_sign 1 3 6 1 5 5 7 3 9 */ | ||
| 1985 | &(nid_objs[297]),/* OBJ_dvcs 1 3 6 1 5 5 7 3 10 */ | ||
| 1986 | &(nid_objs[298]),/* OBJ_id_it_caProtEncCert 1 3 6 1 5 5 7 4 1 */ | ||
| 1987 | &(nid_objs[299]),/* OBJ_id_it_signKeyPairTypes 1 3 6 1 5 5 7 4 2 */ | ||
| 1988 | &(nid_objs[300]),/* OBJ_id_it_encKeyPairTypes 1 3 6 1 5 5 7 4 3 */ | ||
| 1989 | &(nid_objs[301]),/* OBJ_id_it_preferredSymmAlg 1 3 6 1 5 5 7 4 4 */ | ||
| 1990 | &(nid_objs[302]),/* OBJ_id_it_caKeyUpdateInfo 1 3 6 1 5 5 7 4 5 */ | ||
| 1991 | &(nid_objs[303]),/* OBJ_id_it_currentCRL 1 3 6 1 5 5 7 4 6 */ | ||
| 1992 | &(nid_objs[304]),/* OBJ_id_it_unsupportedOIDs 1 3 6 1 5 5 7 4 7 */ | ||
| 1993 | &(nid_objs[305]),/* OBJ_id_it_subscriptionRequest 1 3 6 1 5 5 7 4 8 */ | ||
| 1994 | &(nid_objs[306]),/* OBJ_id_it_subscriptionResponse 1 3 6 1 5 5 7 4 9 */ | ||
| 1995 | &(nid_objs[307]),/* OBJ_id_it_keyPairParamReq 1 3 6 1 5 5 7 4 10 */ | ||
| 1996 | &(nid_objs[308]),/* OBJ_id_it_keyPairParamRep 1 3 6 1 5 5 7 4 11 */ | ||
| 1997 | &(nid_objs[309]),/* OBJ_id_it_revPassphrase 1 3 6 1 5 5 7 4 12 */ | ||
| 1998 | &(nid_objs[310]),/* OBJ_id_it_implicitConfirm 1 3 6 1 5 5 7 4 13 */ | ||
| 1999 | &(nid_objs[311]),/* OBJ_id_it_confirmWaitTime 1 3 6 1 5 5 7 4 14 */ | ||
| 2000 | &(nid_objs[312]),/* OBJ_id_it_origPKIMessage 1 3 6 1 5 5 7 4 15 */ | ||
| 2001 | &(nid_objs[313]),/* OBJ_id_regCtrl 1 3 6 1 5 5 7 5 1 */ | ||
| 2002 | &(nid_objs[314]),/* OBJ_id_regInfo 1 3 6 1 5 5 7 5 2 */ | ||
| 2003 | &(nid_objs[323]),/* OBJ_id_alg_des40 1 3 6 1 5 5 7 6 1 */ | ||
| 2004 | &(nid_objs[324]),/* OBJ_id_alg_noSignature 1 3 6 1 5 5 7 6 2 */ | ||
| 2005 | &(nid_objs[325]),/* OBJ_id_alg_dh_sig_hmac_sha1 1 3 6 1 5 5 7 6 3 */ | ||
| 2006 | &(nid_objs[326]),/* OBJ_id_alg_dh_pop 1 3 6 1 5 5 7 6 4 */ | ||
| 2007 | &(nid_objs[327]),/* OBJ_id_cmc_statusInfo 1 3 6 1 5 5 7 7 1 */ | ||
| 2008 | &(nid_objs[328]),/* OBJ_id_cmc_identification 1 3 6 1 5 5 7 7 2 */ | ||
| 2009 | &(nid_objs[329]),/* OBJ_id_cmc_identityProof 1 3 6 1 5 5 7 7 3 */ | ||
| 2010 | &(nid_objs[330]),/* OBJ_id_cmc_dataReturn 1 3 6 1 5 5 7 7 4 */ | ||
| 2011 | &(nid_objs[331]),/* OBJ_id_cmc_transactionId 1 3 6 1 5 5 7 7 5 */ | ||
| 2012 | &(nid_objs[332]),/* OBJ_id_cmc_senderNonce 1 3 6 1 5 5 7 7 6 */ | ||
| 2013 | &(nid_objs[333]),/* OBJ_id_cmc_recipientNonce 1 3 6 1 5 5 7 7 7 */ | ||
| 2014 | &(nid_objs[334]),/* OBJ_id_cmc_addExtensions 1 3 6 1 5 5 7 7 8 */ | ||
| 2015 | &(nid_objs[335]),/* OBJ_id_cmc_encryptedPOP 1 3 6 1 5 5 7 7 9 */ | ||
| 2016 | &(nid_objs[336]),/* OBJ_id_cmc_decryptedPOP 1 3 6 1 5 5 7 7 10 */ | ||
| 2017 | &(nid_objs[337]),/* OBJ_id_cmc_lraPOPWitness 1 3 6 1 5 5 7 7 11 */ | ||
| 2018 | &(nid_objs[338]),/* OBJ_id_cmc_getCert 1 3 6 1 5 5 7 7 15 */ | ||
| 2019 | &(nid_objs[339]),/* OBJ_id_cmc_getCRL 1 3 6 1 5 5 7 7 16 */ | ||
| 2020 | &(nid_objs[340]),/* OBJ_id_cmc_revokeRequest 1 3 6 1 5 5 7 7 17 */ | ||
| 2021 | &(nid_objs[341]),/* OBJ_id_cmc_regInfo 1 3 6 1 5 5 7 7 18 */ | ||
| 2022 | &(nid_objs[342]),/* OBJ_id_cmc_responseInfo 1 3 6 1 5 5 7 7 19 */ | ||
| 2023 | &(nid_objs[343]),/* OBJ_id_cmc_queryPending 1 3 6 1 5 5 7 7 21 */ | ||
| 2024 | &(nid_objs[344]),/* OBJ_id_cmc_popLinkRandom 1 3 6 1 5 5 7 7 22 */ | ||
| 2025 | &(nid_objs[345]),/* OBJ_id_cmc_popLinkWitness 1 3 6 1 5 5 7 7 23 */ | ||
| 2026 | &(nid_objs[346]),/* OBJ_id_cmc_confirmCertAcceptance 1 3 6 1 5 5 7 7 24 */ | ||
| 2027 | &(nid_objs[347]),/* OBJ_id_on_personalData 1 3 6 1 5 5 7 8 1 */ | ||
| 2028 | &(nid_objs[348]),/* OBJ_id_pda_dateOfBirth 1 3 6 1 5 5 7 9 1 */ | ||
| 2029 | &(nid_objs[349]),/* OBJ_id_pda_placeOfBirth 1 3 6 1 5 5 7 9 2 */ | ||
| 2030 | &(nid_objs[350]),/* OBJ_id_pda_pseudonym 1 3 6 1 5 5 7 9 3 */ | ||
| 2031 | &(nid_objs[351]),/* OBJ_id_pda_gender 1 3 6 1 5 5 7 9 4 */ | ||
| 2032 | &(nid_objs[352]),/* OBJ_id_pda_countryOfCitizenship 1 3 6 1 5 5 7 9 5 */ | ||
| 2033 | &(nid_objs[353]),/* OBJ_id_pda_countryOfResidence 1 3 6 1 5 5 7 9 6 */ | ||
| 2034 | &(nid_objs[354]),/* OBJ_id_aca_authenticationInfo 1 3 6 1 5 5 7 10 1 */ | ||
| 2035 | &(nid_objs[355]),/* OBJ_id_aca_accessIdentity 1 3 6 1 5 5 7 10 2 */ | ||
| 2036 | &(nid_objs[356]),/* OBJ_id_aca_chargingIdentity 1 3 6 1 5 5 7 10 3 */ | ||
| 2037 | &(nid_objs[357]),/* OBJ_id_aca_group 1 3 6 1 5 5 7 10 4 */ | ||
| 2038 | &(nid_objs[358]),/* OBJ_id_aca_role 1 3 6 1 5 5 7 10 5 */ | ||
| 2039 | &(nid_objs[359]),/* OBJ_id_qcs_pkixQCSyntax_v1 1 3 6 1 5 5 7 11 1 */ | ||
| 2040 | &(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */ | ||
| 2041 | &(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */ | ||
| 2042 | &(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */ | ||
| 2043 | &(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */ | ||
| 2044 | &(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */ | ||
| 2045 | &(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */ | ||
| 2046 | &(nid_objs[364]),/* OBJ_ad_dvcs 1 3 6 1 5 5 7 48 4 */ | ||
| 2047 | &(nid_objs[58]),/* OBJ_netscape_cert_extension 2 16 840 1 113730 1 */ | ||
| 2048 | &(nid_objs[59]),/* OBJ_netscape_data_type 2 16 840 1 113730 2 */ | ||
| 2049 | &(nid_objs[108]),/* OBJ_cast5_cbc 1 2 840 113533 7 66 10 */ | ||
| 2050 | &(nid_objs[112]),/* OBJ_pbeWithMD5AndCast5_CBC 1 2 840 113533 7 66 12 */ | ||
| 2051 | &(nid_objs[ 6]),/* OBJ_rsaEncryption 1 2 840 113549 1 1 1 */ | ||
| 2052 | &(nid_objs[ 7]),/* OBJ_md2WithRSAEncryption 1 2 840 113549 1 1 2 */ | ||
| 2053 | &(nid_objs[ 8]),/* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */ | ||
| 2054 | &(nid_objs[65]),/* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */ | ||
| 2055 | &(nid_objs[28]),/* OBJ_dhKeyAgreement 1 2 840 113549 1 3 1 */ | ||
| 2056 | &(nid_objs[ 9]),/* OBJ_pbeWithMD2AndDES_CBC 1 2 840 113549 1 5 1 */ | ||
| 2057 | &(nid_objs[10]),/* OBJ_pbeWithMD5AndDES_CBC 1 2 840 113549 1 5 3 */ | ||
| 2058 | &(nid_objs[168]),/* OBJ_pbeWithMD2AndRC2_CBC 1 2 840 113549 1 5 4 */ | ||
| 2059 | &(nid_objs[169]),/* OBJ_pbeWithMD5AndRC2_CBC 1 2 840 113549 1 5 6 */ | ||
| 2060 | &(nid_objs[170]),/* OBJ_pbeWithSHA1AndDES_CBC 1 2 840 113549 1 5 10 */ | ||
| 2061 | &(nid_objs[68]),/* OBJ_pbeWithSHA1AndRC2_CBC 1 2 840 113549 1 5 11 */ | ||
| 2062 | &(nid_objs[69]),/* OBJ_id_pbkdf2 1 2 840 113549 1 5 12 */ | ||
| 2063 | &(nid_objs[161]),/* OBJ_pbes2 1 2 840 113549 1 5 13 */ | ||
| 2064 | &(nid_objs[162]),/* OBJ_pbmac1 1 2 840 113549 1 5 14 */ | ||
| 2065 | &(nid_objs[21]),/* OBJ_pkcs7_data 1 2 840 113549 1 7 1 */ | ||
| 2066 | &(nid_objs[22]),/* OBJ_pkcs7_signed 1 2 840 113549 1 7 2 */ | ||
| 2067 | &(nid_objs[23]),/* OBJ_pkcs7_enveloped 1 2 840 113549 1 7 3 */ | ||
| 2068 | &(nid_objs[24]),/* OBJ_pkcs7_signedAndEnveloped 1 2 840 113549 1 7 4 */ | ||
| 2069 | &(nid_objs[25]),/* OBJ_pkcs7_digest 1 2 840 113549 1 7 5 */ | ||
| 2070 | &(nid_objs[26]),/* OBJ_pkcs7_encrypted 1 2 840 113549 1 7 6 */ | ||
| 2071 | &(nid_objs[48]),/* OBJ_pkcs9_emailAddress 1 2 840 113549 1 9 1 */ | ||
| 2072 | &(nid_objs[49]),/* OBJ_pkcs9_unstructuredName 1 2 840 113549 1 9 2 */ | ||
| 2073 | &(nid_objs[50]),/* OBJ_pkcs9_contentType 1 2 840 113549 1 9 3 */ | ||
| 2074 | &(nid_objs[51]),/* OBJ_pkcs9_messageDigest 1 2 840 113549 1 9 4 */ | ||
| 2075 | &(nid_objs[52]),/* OBJ_pkcs9_signingTime 1 2 840 113549 1 9 5 */ | ||
| 2076 | &(nid_objs[53]),/* OBJ_pkcs9_countersignature 1 2 840 113549 1 9 6 */ | ||
| 2077 | &(nid_objs[54]),/* OBJ_pkcs9_challengePassword 1 2 840 113549 1 9 7 */ | ||
| 2078 | &(nid_objs[55]),/* OBJ_pkcs9_unstructuredAddress 1 2 840 113549 1 9 8 */ | ||
| 2079 | &(nid_objs[56]),/* OBJ_pkcs9_extCertAttributes 1 2 840 113549 1 9 9 */ | ||
| 2080 | &(nid_objs[172]),/* OBJ_ext_req 1 2 840 113549 1 9 14 */ | ||
| 2081 | &(nid_objs[167]),/* OBJ_SMIMECapabilities 1 2 840 113549 1 9 15 */ | ||
| 2082 | &(nid_objs[188]),/* OBJ_SMIME 1 2 840 113549 1 9 16 */ | ||
| 2083 | &(nid_objs[156]),/* OBJ_friendlyName 1 2 840 113549 1 9 20 */ | ||
| 2084 | &(nid_objs[157]),/* OBJ_localKeyID 1 2 840 113549 1 9 21 */ | ||
| 2085 | &(nid_objs[91]),/* OBJ_bf_cbc 1 3 6 1 4 1 3029 1 2 */ | ||
| 2086 | &(nid_objs[315]),/* OBJ_id_regCtrl_regToken 1 3 6 1 5 5 7 5 1 1 */ | ||
| 2087 | &(nid_objs[316]),/* OBJ_id_regCtrl_authenticator 1 3 6 1 5 5 7 5 1 2 */ | ||
| 2088 | &(nid_objs[317]),/* OBJ_id_regCtrl_pkiPublicationInfo 1 3 6 1 5 5 7 5 1 3 */ | ||
| 2089 | &(nid_objs[318]),/* OBJ_id_regCtrl_pkiArchiveOptions 1 3 6 1 5 5 7 5 1 4 */ | ||
| 2090 | &(nid_objs[319]),/* OBJ_id_regCtrl_oldCertID 1 3 6 1 5 5 7 5 1 5 */ | ||
| 2091 | &(nid_objs[320]),/* OBJ_id_regCtrl_protocolEncrKey 1 3 6 1 5 5 7 5 1 6 */ | ||
| 2092 | &(nid_objs[321]),/* OBJ_id_regInfo_utf8Pairs 1 3 6 1 5 5 7 5 2 1 */ | ||
| 2093 | &(nid_objs[322]),/* OBJ_id_regInfo_certReq 1 3 6 1 5 5 7 5 2 2 */ | ||
| 2094 | &(nid_objs[365]),/* OBJ_id_pkix_OCSP_basic 1 3 6 1 5 5 7 48 1 1 */ | ||
| 2095 | &(nid_objs[366]),/* OBJ_id_pkix_OCSP_Nonce 1 3 6 1 5 5 7 48 1 2 */ | ||
| 2096 | &(nid_objs[367]),/* OBJ_id_pkix_OCSP_CrlID 1 3 6 1 5 5 7 48 1 3 */ | ||
| 2097 | &(nid_objs[368]),/* OBJ_id_pkix_OCSP_acceptableResponses 1 3 6 1 5 5 7 48 1 4 */ | ||
| 2098 | &(nid_objs[369]),/* OBJ_id_pkix_OCSP_noCheck 1 3 6 1 5 5 7 48 1 5 */ | ||
| 2099 | &(nid_objs[370]),/* OBJ_id_pkix_OCSP_archiveCutoff 1 3 6 1 5 5 7 48 1 6 */ | ||
| 2100 | &(nid_objs[371]),/* OBJ_id_pkix_OCSP_serviceLocator 1 3 6 1 5 5 7 48 1 7 */ | ||
| 2101 | &(nid_objs[372]),/* OBJ_id_pkix_OCSP_extendedStatus 1 3 6 1 5 5 7 48 1 8 */ | ||
| 2102 | &(nid_objs[373]),/* OBJ_id_pkix_OCSP_valid 1 3 6 1 5 5 7 48 1 9 */ | ||
| 2103 | &(nid_objs[374]),/* OBJ_id_pkix_OCSP_path 1 3 6 1 5 5 7 48 1 10 */ | ||
| 2104 | &(nid_objs[375]),/* OBJ_id_pkix_OCSP_trustRoot 1 3 6 1 5 5 7 48 1 11 */ | ||
| 2105 | &(nid_objs[71]),/* OBJ_netscape_cert_type 2 16 840 1 113730 1 1 */ | ||
| 2106 | &(nid_objs[72]),/* OBJ_netscape_base_url 2 16 840 1 113730 1 2 */ | ||
| 2107 | &(nid_objs[73]),/* OBJ_netscape_revocation_url 2 16 840 1 113730 1 3 */ | ||
| 2108 | &(nid_objs[74]),/* OBJ_netscape_ca_revocation_url 2 16 840 1 113730 1 4 */ | ||
| 2109 | &(nid_objs[75]),/* OBJ_netscape_renewal_url 2 16 840 1 113730 1 7 */ | ||
| 2110 | &(nid_objs[76]),/* OBJ_netscape_ca_policy_url 2 16 840 1 113730 1 8 */ | ||
| 2111 | &(nid_objs[77]),/* OBJ_netscape_ssl_server_name 2 16 840 1 113730 1 12 */ | ||
| 2112 | &(nid_objs[78]),/* OBJ_netscape_comment 2 16 840 1 113730 1 13 */ | ||
| 2113 | &(nid_objs[79]),/* OBJ_netscape_cert_sequence 2 16 840 1 113730 2 5 */ | ||
| 2114 | &(nid_objs[139]),/* OBJ_ns_sgc 2 16 840 1 113730 4 1 */ | ||
| 2115 | &(nid_objs[391]),/* OBJ_domainComponent 0 9 2342 19200300 100 1 25 */ | ||
| 2116 | &(nid_objs[392]),/* OBJ_Domain 0 9 2342 19200300 100 4 13 */ | ||
| 2117 | &(nid_objs[189]),/* OBJ_id_smime_mod 1 2 840 113549 1 9 16 0 */ | ||
| 2118 | &(nid_objs[190]),/* OBJ_id_smime_ct 1 2 840 113549 1 9 16 1 */ | ||
| 2119 | &(nid_objs[191]),/* OBJ_id_smime_aa 1 2 840 113549 1 9 16 2 */ | ||
| 2120 | &(nid_objs[192]),/* OBJ_id_smime_alg 1 2 840 113549 1 9 16 3 */ | ||
| 2121 | &(nid_objs[193]),/* OBJ_id_smime_cd 1 2 840 113549 1 9 16 4 */ | ||
| 2122 | &(nid_objs[194]),/* OBJ_id_smime_spq 1 2 840 113549 1 9 16 5 */ | ||
| 2123 | &(nid_objs[195]),/* OBJ_id_smime_cti 1 2 840 113549 1 9 16 6 */ | ||
| 2124 | &(nid_objs[158]),/* OBJ_x509Certificate 1 2 840 113549 1 9 22 1 */ | ||
| 2125 | &(nid_objs[159]),/* OBJ_sdsiCertificate 1 2 840 113549 1 9 22 2 */ | ||
| 2126 | &(nid_objs[160]),/* OBJ_x509Crl 1 2 840 113549 1 9 23 1 */ | ||
| 2127 | &(nid_objs[144]),/* OBJ_pbe_WithSHA1And128BitRC4 1 2 840 113549 1 12 1 1 */ | ||
| 2128 | &(nid_objs[145]),/* OBJ_pbe_WithSHA1And40BitRC4 1 2 840 113549 1 12 1 2 */ | ||
| 2129 | &(nid_objs[146]),/* OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC 1 2 840 113549 1 12 1 3 */ | ||
| 2130 | &(nid_objs[147]),/* OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC 1 2 840 113549 1 12 1 4 */ | ||
| 2131 | &(nid_objs[148]),/* OBJ_pbe_WithSHA1And128BitRC2_CBC 1 2 840 113549 1 12 1 5 */ | ||
| 2132 | &(nid_objs[149]),/* OBJ_pbe_WithSHA1And40BitRC2_CBC 1 2 840 113549 1 12 1 6 */ | ||
| 2133 | &(nid_objs[171]),/* OBJ_ms_ext_req 1 3 6 1 4 1 311 2 1 14 */ | ||
| 2134 | &(nid_objs[134]),/* OBJ_ms_code_ind 1 3 6 1 4 1 311 2 1 21 */ | ||
| 2135 | &(nid_objs[135]),/* OBJ_ms_code_com 1 3 6 1 4 1 311 2 1 22 */ | ||
| 2136 | &(nid_objs[136]),/* OBJ_ms_ctl_sign 1 3 6 1 4 1 311 10 3 1 */ | ||
| 2137 | &(nid_objs[137]),/* OBJ_ms_sgc 1 3 6 1 4 1 311 10 3 3 */ | ||
| 2138 | &(nid_objs[138]),/* OBJ_ms_efs 1 3 6 1 4 1 311 10 3 4 */ | ||
| 2139 | &(nid_objs[196]),/* OBJ_id_smime_mod_cms 1 2 840 113549 1 9 16 0 1 */ | ||
| 2140 | &(nid_objs[197]),/* OBJ_id_smime_mod_ess 1 2 840 113549 1 9 16 0 2 */ | ||
| 2141 | &(nid_objs[198]),/* OBJ_id_smime_mod_oid 1 2 840 113549 1 9 16 0 3 */ | ||
| 2142 | &(nid_objs[199]),/* OBJ_id_smime_mod_msg_v3 1 2 840 113549 1 9 16 0 4 */ | ||
| 2143 | &(nid_objs[200]),/* OBJ_id_smime_mod_ets_eSignature_88 1 2 840 113549 1 9 16 0 5 */ | ||
| 2144 | &(nid_objs[201]),/* OBJ_id_smime_mod_ets_eSignature_97 1 2 840 113549 1 9 16 0 6 */ | ||
| 2145 | &(nid_objs[202]),/* OBJ_id_smime_mod_ets_eSigPolicy_88 1 2 840 113549 1 9 16 0 7 */ | ||
| 2146 | &(nid_objs[203]),/* OBJ_id_smime_mod_ets_eSigPolicy_97 1 2 840 113549 1 9 16 0 8 */ | ||
| 2147 | &(nid_objs[204]),/* OBJ_id_smime_ct_receipt 1 2 840 113549 1 9 16 1 1 */ | ||
| 2148 | &(nid_objs[205]),/* OBJ_id_smime_ct_authData 1 2 840 113549 1 9 16 1 2 */ | ||
| 2149 | &(nid_objs[206]),/* OBJ_id_smime_ct_publishCert 1 2 840 113549 1 9 16 1 3 */ | ||
| 2150 | &(nid_objs[207]),/* OBJ_id_smime_ct_TSTInfo 1 2 840 113549 1 9 16 1 4 */ | ||
| 2151 | &(nid_objs[208]),/* OBJ_id_smime_ct_TDTInfo 1 2 840 113549 1 9 16 1 5 */ | ||
| 2152 | &(nid_objs[209]),/* OBJ_id_smime_ct_contentInfo 1 2 840 113549 1 9 16 1 6 */ | ||
| 2153 | &(nid_objs[210]),/* OBJ_id_smime_ct_DVCSRequestData 1 2 840 113549 1 9 16 1 7 */ | ||
| 2154 | &(nid_objs[211]),/* OBJ_id_smime_ct_DVCSResponseData 1 2 840 113549 1 9 16 1 8 */ | ||
| 2155 | &(nid_objs[212]),/* OBJ_id_smime_aa_receiptRequest 1 2 840 113549 1 9 16 2 1 */ | ||
| 2156 | &(nid_objs[213]),/* OBJ_id_smime_aa_securityLabel 1 2 840 113549 1 9 16 2 2 */ | ||
| 2157 | &(nid_objs[214]),/* OBJ_id_smime_aa_mlExpandHistory 1 2 840 113549 1 9 16 2 3 */ | ||
| 2158 | &(nid_objs[215]),/* OBJ_id_smime_aa_contentHint 1 2 840 113549 1 9 16 2 4 */ | ||
| 2159 | &(nid_objs[216]),/* OBJ_id_smime_aa_msgSigDigest 1 2 840 113549 1 9 16 2 5 */ | ||
| 2160 | &(nid_objs[217]),/* OBJ_id_smime_aa_encapContentType 1 2 840 113549 1 9 16 2 6 */ | ||
| 2161 | &(nid_objs[218]),/* OBJ_id_smime_aa_contentIdentifier 1 2 840 113549 1 9 16 2 7 */ | ||
| 2162 | &(nid_objs[219]),/* OBJ_id_smime_aa_macValue 1 2 840 113549 1 9 16 2 8 */ | ||
| 2163 | &(nid_objs[220]),/* OBJ_id_smime_aa_equivalentLabels 1 2 840 113549 1 9 16 2 9 */ | ||
| 2164 | &(nid_objs[221]),/* OBJ_id_smime_aa_contentReference 1 2 840 113549 1 9 16 2 10 */ | ||
| 2165 | &(nid_objs[222]),/* OBJ_id_smime_aa_encrypKeyPref 1 2 840 113549 1 9 16 2 11 */ | ||
| 2166 | &(nid_objs[223]),/* OBJ_id_smime_aa_signingCertificate 1 2 840 113549 1 9 16 2 12 */ | ||
| 2167 | &(nid_objs[224]),/* OBJ_id_smime_aa_smimeEncryptCerts 1 2 840 113549 1 9 16 2 13 */ | ||
| 2168 | &(nid_objs[225]),/* OBJ_id_smime_aa_timeStampToken 1 2 840 113549 1 9 16 2 14 */ | ||
| 2169 | &(nid_objs[226]),/* OBJ_id_smime_aa_ets_sigPolicyId 1 2 840 113549 1 9 16 2 15 */ | ||
| 2170 | &(nid_objs[227]),/* OBJ_id_smime_aa_ets_commitmentType 1 2 840 113549 1 9 16 2 16 */ | ||
| 2171 | &(nid_objs[228]),/* OBJ_id_smime_aa_ets_signerLocation 1 2 840 113549 1 9 16 2 17 */ | ||
| 2172 | &(nid_objs[229]),/* OBJ_id_smime_aa_ets_signerAttr 1 2 840 113549 1 9 16 2 18 */ | ||
| 2173 | &(nid_objs[230]),/* OBJ_id_smime_aa_ets_otherSigCert 1 2 840 113549 1 9 16 2 19 */ | ||
| 2174 | &(nid_objs[231]),/* OBJ_id_smime_aa_ets_contentTimestamp 1 2 840 113549 1 9 16 2 20 */ | ||
| 2175 | &(nid_objs[232]),/* OBJ_id_smime_aa_ets_CertificateRefs 1 2 840 113549 1 9 16 2 21 */ | ||
| 2176 | &(nid_objs[233]),/* OBJ_id_smime_aa_ets_RevocationRefs 1 2 840 113549 1 9 16 2 22 */ | ||
| 2177 | &(nid_objs[234]),/* OBJ_id_smime_aa_ets_certValues 1 2 840 113549 1 9 16 2 23 */ | ||
| 2178 | &(nid_objs[235]),/* OBJ_id_smime_aa_ets_revocationValues 1 2 840 113549 1 9 16 2 24 */ | ||
| 2179 | &(nid_objs[236]),/* OBJ_id_smime_aa_ets_escTimeStamp 1 2 840 113549 1 9 16 2 25 */ | ||
| 2180 | &(nid_objs[237]),/* OBJ_id_smime_aa_ets_certCRLTimestamp 1 2 840 113549 1 9 16 2 26 */ | ||
| 2181 | &(nid_objs[238]),/* OBJ_id_smime_aa_ets_archiveTimeStamp 1 2 840 113549 1 9 16 2 27 */ | ||
| 2182 | &(nid_objs[239]),/* OBJ_id_smime_aa_signatureType 1 2 840 113549 1 9 16 2 28 */ | ||
| 2183 | &(nid_objs[240]),/* OBJ_id_smime_aa_dvcs_dvc 1 2 840 113549 1 9 16 2 29 */ | ||
| 2184 | &(nid_objs[241]),/* OBJ_id_smime_alg_ESDHwith3DES 1 2 840 113549 1 9 16 3 1 */ | ||
| 2185 | &(nid_objs[242]),/* OBJ_id_smime_alg_ESDHwithRC2 1 2 840 113549 1 9 16 3 2 */ | ||
| 2186 | &(nid_objs[243]),/* OBJ_id_smime_alg_3DESwrap 1 2 840 113549 1 9 16 3 3 */ | ||
| 2187 | &(nid_objs[244]),/* OBJ_id_smime_alg_RC2wrap 1 2 840 113549 1 9 16 3 4 */ | ||
| 2188 | &(nid_objs[245]),/* OBJ_id_smime_alg_ESDH 1 2 840 113549 1 9 16 3 5 */ | ||
| 2189 | &(nid_objs[246]),/* OBJ_id_smime_alg_CMS3DESwrap 1 2 840 113549 1 9 16 3 6 */ | ||
| 2190 | &(nid_objs[247]),/* OBJ_id_smime_alg_CMSRC2wrap 1 2 840 113549 1 9 16 3 7 */ | ||
| 2191 | &(nid_objs[248]),/* OBJ_id_smime_cd_ldap 1 2 840 113549 1 9 16 4 1 */ | ||
| 2192 | &(nid_objs[249]),/* OBJ_id_smime_spq_ets_sqt_uri 1 2 840 113549 1 9 16 5 1 */ | ||
| 2193 | &(nid_objs[250]),/* OBJ_id_smime_spq_ets_sqt_unotice 1 2 840 113549 1 9 16 5 2 */ | ||
| 2194 | &(nid_objs[251]),/* OBJ_id_smime_cti_ets_proofOfOrigin 1 2 840 113549 1 9 16 6 1 */ | ||
| 2195 | &(nid_objs[252]),/* OBJ_id_smime_cti_ets_proofOfReceipt 1 2 840 113549 1 9 16 6 2 */ | ||
| 2196 | &(nid_objs[253]),/* OBJ_id_smime_cti_ets_proofOfDelivery 1 2 840 113549 1 9 16 6 3 */ | ||
| 2197 | &(nid_objs[254]),/* OBJ_id_smime_cti_ets_proofOfSender 1 2 840 113549 1 9 16 6 4 */ | ||
| 2198 | &(nid_objs[255]),/* OBJ_id_smime_cti_ets_proofOfApproval 1 2 840 113549 1 9 16 6 5 */ | ||
| 2199 | &(nid_objs[256]),/* OBJ_id_smime_cti_ets_proofOfCreation 1 2 840 113549 1 9 16 6 6 */ | ||
| 2200 | &(nid_objs[150]),/* OBJ_keyBag 1 2 840 113549 1 12 10 1 1 */ | ||
| 2201 | &(nid_objs[151]),/* OBJ_pkcs8ShroudedKeyBag 1 2 840 113549 1 12 10 1 2 */ | ||
| 2202 | &(nid_objs[152]),/* OBJ_certBag 1 2 840 113549 1 12 10 1 3 */ | ||
| 2203 | &(nid_objs[153]),/* OBJ_crlBag 1 2 840 113549 1 12 10 1 4 */ | ||
| 2204 | &(nid_objs[154]),/* OBJ_secretBag 1 2 840 113549 1 12 10 1 5 */ | ||
| 2205 | &(nid_objs[155]),/* OBJ_safeContentsBag 1 2 840 113549 1 12 10 1 6 */ | ||
| 2206 | &(nid_objs[34]),/* OBJ_idea_cbc 1 3 6 1 4 1 188 7 1 1 2 */ | ||
| 2207 | }; | ||
| 2208 | |||
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.pl b/src/lib/libssl/src/crypto/objects/obj_dat.pl index e6e3c3b9c0..11066df680 100644 --- a/src/lib/libssl/src/crypto/objects/obj_dat.pl +++ b/src/lib/libssl/src/crypto/objects/obj_dat.pl | |||
| @@ -46,10 +46,28 @@ while (<IN>) | |||
| 46 | next unless /^\#define\s+(\S+)\s+(.*)$/; | 46 | next unless /^\#define\s+(\S+)\s+(.*)$/; |
| 47 | $v=$1; | 47 | $v=$1; |
| 48 | $d=$2; | 48 | $d=$2; |
| 49 | $d =~ s/^\"//; | ||
| 50 | $d =~ s/\"$//; | ||
| 49 | if ($v =~ /^SN_(.*)$/) | 51 | if ($v =~ /^SN_(.*)$/) |
| 50 | { $sn{$1}=$d; } | 52 | { |
| 53 | if(defined $snames{$d}) | ||
| 54 | { | ||
| 55 | print "WARNING: Duplicate short name \"$d\"\n"; | ||
| 56 | } | ||
| 57 | else | ||
| 58 | { $snames{$d} = "X"; } | ||
| 59 | $sn{$1}=$d; | ||
| 60 | } | ||
| 51 | elsif ($v =~ /^LN_(.*)$/) | 61 | elsif ($v =~ /^LN_(.*)$/) |
| 52 | { $ln{$1}=$d; } | 62 | { |
| 63 | if(defined $lnames{$d}) | ||
| 64 | { | ||
| 65 | print "WARNING: Duplicate long name \"$d\"\n"; | ||
| 66 | } | ||
| 67 | else | ||
| 68 | { $lnames{$d} = "X"; } | ||
| 69 | $ln{$1}=$d; | ||
| 70 | } | ||
| 53 | elsif ($v =~ /^NID_(.*)$/) | 71 | elsif ($v =~ /^NID_(.*)$/) |
| 54 | { $nid{$d}=$1; } | 72 | { $nid{$d}=$1; } |
| 55 | elsif ($v =~ /^OBJ_(.*)$/) | 73 | elsif ($v =~ /^OBJ_(.*)$/) |
| @@ -78,11 +96,20 @@ for ($i=0; $i<$n; $i++) | |||
| 78 | { | 96 | { |
| 79 | $sn=defined($sn{$nid{$i}})?"$sn{$nid{$i}}":"NULL"; | 97 | $sn=defined($sn{$nid{$i}})?"$sn{$nid{$i}}":"NULL"; |
| 80 | $ln=defined($ln{$nid{$i}})?"$ln{$nid{$i}}":"NULL"; | 98 | $ln=defined($ln{$nid{$i}})?"$ln{$nid{$i}}":"NULL"; |
| 81 | $sn=$ln if ($sn eq "NULL"); | 99 | |
| 82 | $ln=$sn if ($ln eq "NULL"); | 100 | if ($sn eq "NULL") { |
| 101 | $sn=$ln; | ||
| 102 | $sn{$nid{$i}} = $ln; | ||
| 103 | } | ||
| 104 | |||
| 105 | if ($ln eq "NULL") { | ||
| 106 | $ln=$sn; | ||
| 107 | $ln{$nid{$i}} = $sn; | ||
| 108 | } | ||
| 109 | |||
| 83 | $out ="{"; | 110 | $out ="{"; |
| 84 | $out.=$sn; | 111 | $out.="\"$sn\""; |
| 85 | $out.=",".$ln; | 112 | $out.=","."\"$ln\""; |
| 86 | $out.=",NID_$nid{$i},"; | 113 | $out.=",NID_$nid{$i},"; |
| 87 | if (defined($obj{$nid{$i}})) | 114 | if (defined($obj{$nid{$i}})) |
| 88 | { | 115 | { |
| @@ -117,13 +144,13 @@ for ($i=0; $i<$n; $i++) | |||
| 117 | @a=grep(defined($sn{$nid{$_}}),0 .. $n); | 144 | @a=grep(defined($sn{$nid{$_}}),0 .. $n); |
| 118 | foreach (sort { $sn{$nid{$a}} cmp $sn{$nid{$b}} } @a) | 145 | foreach (sort { $sn{$nid{$a}} cmp $sn{$nid{$b}} } @a) |
| 119 | { | 146 | { |
| 120 | push(@sn,sprintf("&(nid_objs[%2d]),/* $sn{$nid{$_}} */\n",$_)); | 147 | push(@sn,sprintf("&(nid_objs[%2d]),/* \"$sn{$nid{$_}}\" */\n",$_)); |
| 121 | } | 148 | } |
| 122 | 149 | ||
| 123 | @a=grep(defined($ln{$nid{$_}}),0 .. $n); | 150 | @a=grep(defined($ln{$nid{$_}}),0 .. $n); |
| 124 | foreach (sort { $ln{$nid{$a}} cmp $ln{$nid{$b}} } @a) | 151 | foreach (sort { $ln{$nid{$a}} cmp $ln{$nid{$b}} } @a) |
| 125 | { | 152 | { |
| 126 | push(@ln,sprintf("&(nid_objs[%2d]),/* $ln{$nid{$_}} */\n",$_)); | 153 | push(@ln,sprintf("&(nid_objs[%2d]),/* \"$ln{$nid{$_}}\" */\n",$_)); |
| 127 | } | 154 | } |
| 128 | 155 | ||
| 129 | @a=grep(defined($obj{$nid{$_}}),0 .. $n); | 156 | @a=grep(defined($obj{$nid{$_}}),0 .. $n); |
diff --git a/src/lib/libssl/src/crypto/objects/obj_lib.c b/src/lib/libssl/src/crypto/objects/obj_lib.c index 1a1ba0fc06..0c71639eba 100644 --- a/src/lib/libssl/src/crypto/objects/obj_lib.c +++ b/src/lib/libssl/src/crypto/objects/obj_lib.c | |||
| @@ -78,7 +78,7 @@ ASN1_OBJECT *OBJ_dup(ASN1_OBJECT *o) | |||
| 78 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_ASN1_LIB); | 78 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_ASN1_LIB); |
| 79 | return(NULL); | 79 | return(NULL); |
| 80 | } | 80 | } |
| 81 | r->data=Malloc(o->length); | 81 | r->data=OPENSSL_malloc(o->length); |
| 82 | if (r->data == NULL) | 82 | if (r->data == NULL) |
| 83 | goto err; | 83 | goto err; |
| 84 | memcpy(r->data,o->data,o->length); | 84 | memcpy(r->data,o->data,o->length); |
| @@ -88,7 +88,7 @@ ASN1_OBJECT *OBJ_dup(ASN1_OBJECT *o) | |||
| 88 | if (o->ln != NULL) | 88 | if (o->ln != NULL) |
| 89 | { | 89 | { |
| 90 | i=strlen(o->ln)+1; | 90 | i=strlen(o->ln)+1; |
| 91 | r->ln=ln=Malloc(i); | 91 | r->ln=ln=OPENSSL_malloc(i); |
| 92 | if (r->ln == NULL) goto err; | 92 | if (r->ln == NULL) goto err; |
| 93 | memcpy(ln,o->ln,i); | 93 | memcpy(ln,o->ln,i); |
| 94 | } | 94 | } |
| @@ -98,7 +98,7 @@ ASN1_OBJECT *OBJ_dup(ASN1_OBJECT *o) | |||
| 98 | char *s; | 98 | char *s; |
| 99 | 99 | ||
| 100 | i=strlen(o->sn)+1; | 100 | i=strlen(o->sn)+1; |
| 101 | r->sn=s=Malloc(i); | 101 | r->sn=s=OPENSSL_malloc(i); |
| 102 | if (r->sn == NULL) goto err; | 102 | if (r->sn == NULL) goto err; |
| 103 | memcpy(s,o->sn,i); | 103 | memcpy(s,o->sn,i); |
| 104 | } | 104 | } |
| @@ -109,9 +109,9 @@ err: | |||
| 109 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_MALLOC_FAILURE); | 109 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_MALLOC_FAILURE); |
| 110 | if (r != NULL) | 110 | if (r != NULL) |
| 111 | { | 111 | { |
| 112 | if (ln != NULL) Free(ln); | 112 | if (ln != NULL) OPENSSL_free(ln); |
| 113 | if (r->data != NULL) Free(r->data); | 113 | if (r->data != NULL) OPENSSL_free(r->data); |
| 114 | Free(r); | 114 | OPENSSL_free(r); |
| 115 | } | 115 | } |
| 116 | return(NULL); | 116 | return(NULL); |
| 117 | } | 117 | } |
diff --git a/src/lib/libssl/src/crypto/objects/obj_mac.h b/src/lib/libssl/src/crypto/objects/obj_mac.h new file mode 100644 index 0000000000..401b1e5a1b --- /dev/null +++ b/src/lib/libssl/src/crypto/objects/obj_mac.h | |||
| @@ -0,0 +1,1798 @@ | |||
| 1 | /* lib/obj/obj_mac.h */ | ||
| 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
| 60 | * following command: | ||
| 61 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
| 62 | */ | ||
| 63 | |||
| 64 | #define SN_undef "UNDEF" | ||
| 65 | #define LN_undef "undefined" | ||
| 66 | #define NID_undef 0 | ||
| 67 | #define OBJ_undef 0L | ||
| 68 | |||
| 69 | #define SN_iso "ISO" | ||
| 70 | #define LN_iso "iso" | ||
| 71 | #define NID_iso 181 | ||
| 72 | #define OBJ_iso 1L | ||
| 73 | |||
| 74 | #define SN_member_body "member-body" | ||
| 75 | #define LN_member_body "ISO Member Body" | ||
| 76 | #define NID_member_body 182 | ||
| 77 | #define OBJ_member_body OBJ_iso,2L | ||
| 78 | |||
| 79 | #define SN_ISO_US "ISO-US" | ||
| 80 | #define LN_ISO_US "ISO US Member Body" | ||
| 81 | #define NID_ISO_US 183 | ||
| 82 | #define OBJ_ISO_US OBJ_member_body,840L | ||
| 83 | |||
| 84 | #define SN_X9_57 "X9-57" | ||
| 85 | #define LN_X9_57 "X9.57" | ||
| 86 | #define NID_X9_57 184 | ||
| 87 | #define OBJ_X9_57 OBJ_ISO_US,10040L | ||
| 88 | |||
| 89 | #define SN_X9cm "X9cm" | ||
| 90 | #define LN_X9cm "X9.57 CM ?" | ||
| 91 | #define NID_X9cm 185 | ||
| 92 | #define OBJ_X9cm OBJ_X9_57,4L | ||
| 93 | |||
| 94 | #define SN_dsa "DSA" | ||
| 95 | #define LN_dsa "dsaEncryption" | ||
| 96 | #define NID_dsa 116 | ||
| 97 | #define OBJ_dsa OBJ_X9cm,1L | ||
| 98 | |||
| 99 | #define SN_dsaWithSHA1 "DSA-SHA1" | ||
| 100 | #define LN_dsaWithSHA1 "dsaWithSHA1" | ||
| 101 | #define NID_dsaWithSHA1 113 | ||
| 102 | #define OBJ_dsaWithSHA1 OBJ_X9cm,3L | ||
| 103 | |||
| 104 | #define SN_cast5_cbc "CAST5-CBC" | ||
| 105 | #define LN_cast5_cbc "cast5-cbc" | ||
| 106 | #define NID_cast5_cbc 108 | ||
| 107 | #define OBJ_cast5_cbc OBJ_ISO_US,113533L,7L,66L,10L | ||
| 108 | |||
| 109 | #define SN_cast5_ecb "CAST5-ECB" | ||
| 110 | #define LN_cast5_ecb "cast5-ecb" | ||
| 111 | #define NID_cast5_ecb 109 | ||
| 112 | |||
| 113 | #define SN_cast5_cfb64 "CAST5-CFB" | ||
| 114 | #define LN_cast5_cfb64 "cast5-cfb" | ||
| 115 | #define NID_cast5_cfb64 110 | ||
| 116 | |||
| 117 | #define SN_cast5_ofb64 "CAST5-OFB" | ||
| 118 | #define LN_cast5_ofb64 "cast5-ofb" | ||
| 119 | #define NID_cast5_ofb64 111 | ||
| 120 | |||
| 121 | #define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" | ||
| 122 | #define NID_pbeWithMD5AndCast5_CBC 112 | ||
| 123 | #define OBJ_pbeWithMD5AndCast5_CBC OBJ_ISO_US,113533L,7L,66L,12L | ||
| 124 | |||
| 125 | #define SN_rsadsi "rsadsi" | ||
| 126 | #define LN_rsadsi "RSA Data Security, Inc." | ||
| 127 | #define NID_rsadsi 1 | ||
| 128 | #define OBJ_rsadsi OBJ_ISO_US,113549L | ||
| 129 | |||
| 130 | #define SN_pkcs "pkcs" | ||
| 131 | #define LN_pkcs "RSA Data Security, Inc. PKCS" | ||
| 132 | #define NID_pkcs 2 | ||
| 133 | #define OBJ_pkcs OBJ_rsadsi,1L | ||
| 134 | |||
| 135 | #define SN_pkcs1 "pkcs1" | ||
| 136 | #define NID_pkcs1 186 | ||
| 137 | #define OBJ_pkcs1 OBJ_pkcs,1L | ||
| 138 | |||
| 139 | #define LN_rsaEncryption "rsaEncryption" | ||
| 140 | #define NID_rsaEncryption 6 | ||
| 141 | #define OBJ_rsaEncryption OBJ_pkcs1,1L | ||
| 142 | |||
| 143 | #define SN_md2WithRSAEncryption "RSA-MD2" | ||
| 144 | #define LN_md2WithRSAEncryption "md2WithRSAEncryption" | ||
| 145 | #define NID_md2WithRSAEncryption 7 | ||
| 146 | #define OBJ_md2WithRSAEncryption OBJ_pkcs1,2L | ||
| 147 | |||
| 148 | #define SN_md5WithRSAEncryption "RSA-MD5" | ||
| 149 | #define LN_md5WithRSAEncryption "md5WithRSAEncryption" | ||
| 150 | #define NID_md5WithRSAEncryption 8 | ||
| 151 | #define OBJ_md5WithRSAEncryption OBJ_pkcs1,4L | ||
| 152 | |||
| 153 | #define SN_sha1WithRSAEncryption "RSA-SHA1" | ||
| 154 | #define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" | ||
| 155 | #define NID_sha1WithRSAEncryption 65 | ||
| 156 | #define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L | ||
| 157 | |||
| 158 | #define SN_pkcs3 "pkcs3" | ||
| 159 | #define NID_pkcs3 27 | ||
| 160 | #define OBJ_pkcs3 OBJ_pkcs,3L | ||
| 161 | |||
| 162 | #define LN_dhKeyAgreement "dhKeyAgreement" | ||
| 163 | #define NID_dhKeyAgreement 28 | ||
| 164 | #define OBJ_dhKeyAgreement OBJ_pkcs3,1L | ||
| 165 | |||
| 166 | #define SN_pkcs5 "pkcs5" | ||
| 167 | #define NID_pkcs5 187 | ||
| 168 | #define OBJ_pkcs5 OBJ_pkcs,5L | ||
| 169 | |||
| 170 | #define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" | ||
| 171 | #define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" | ||
| 172 | #define NID_pbeWithMD2AndDES_CBC 9 | ||
| 173 | #define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs5,1L | ||
| 174 | |||
| 175 | #define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" | ||
| 176 | #define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" | ||
| 177 | #define NID_pbeWithMD5AndDES_CBC 10 | ||
| 178 | #define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs5,3L | ||
| 179 | |||
| 180 | #define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" | ||
| 181 | #define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" | ||
| 182 | #define NID_pbeWithMD2AndRC2_CBC 168 | ||
| 183 | #define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs5,4L | ||
| 184 | |||
| 185 | #define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" | ||
| 186 | #define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" | ||
| 187 | #define NID_pbeWithMD5AndRC2_CBC 169 | ||
| 188 | #define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs5,6L | ||
| 189 | |||
| 190 | #define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" | ||
| 191 | #define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" | ||
| 192 | #define NID_pbeWithSHA1AndDES_CBC 170 | ||
| 193 | #define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs5,10L | ||
| 194 | |||
| 195 | #define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" | ||
| 196 | #define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" | ||
| 197 | #define NID_pbeWithSHA1AndRC2_CBC 68 | ||
| 198 | #define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs5,11L | ||
| 199 | |||
| 200 | #define LN_id_pbkdf2 "PBKDF2" | ||
| 201 | #define NID_id_pbkdf2 69 | ||
| 202 | #define OBJ_id_pbkdf2 OBJ_pkcs5,12L | ||
| 203 | |||
| 204 | #define LN_pbes2 "PBES2" | ||
| 205 | #define NID_pbes2 161 | ||
| 206 | #define OBJ_pbes2 OBJ_pkcs5,13L | ||
| 207 | |||
| 208 | #define LN_pbmac1 "PBMAC1" | ||
| 209 | #define NID_pbmac1 162 | ||
| 210 | #define OBJ_pbmac1 OBJ_pkcs5,14L | ||
| 211 | |||
| 212 | #define SN_pkcs7 "pkcs7" | ||
| 213 | #define NID_pkcs7 20 | ||
| 214 | #define OBJ_pkcs7 OBJ_pkcs,7L | ||
| 215 | |||
| 216 | #define LN_pkcs7_data "pkcs7-data" | ||
| 217 | #define NID_pkcs7_data 21 | ||
| 218 | #define OBJ_pkcs7_data OBJ_pkcs7,1L | ||
| 219 | |||
| 220 | #define LN_pkcs7_signed "pkcs7-signedData" | ||
| 221 | #define NID_pkcs7_signed 22 | ||
| 222 | #define OBJ_pkcs7_signed OBJ_pkcs7,2L | ||
| 223 | |||
| 224 | #define LN_pkcs7_enveloped "pkcs7-envelopedData" | ||
| 225 | #define NID_pkcs7_enveloped 23 | ||
| 226 | #define OBJ_pkcs7_enveloped OBJ_pkcs7,3L | ||
| 227 | |||
| 228 | #define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" | ||
| 229 | #define NID_pkcs7_signedAndEnveloped 24 | ||
| 230 | #define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L | ||
| 231 | |||
| 232 | #define LN_pkcs7_digest "pkcs7-digestData" | ||
| 233 | #define NID_pkcs7_digest 25 | ||
| 234 | #define OBJ_pkcs7_digest OBJ_pkcs7,5L | ||
| 235 | |||
| 236 | #define LN_pkcs7_encrypted "pkcs7-encryptedData" | ||
| 237 | #define NID_pkcs7_encrypted 26 | ||
| 238 | #define OBJ_pkcs7_encrypted OBJ_pkcs7,6L | ||
| 239 | |||
| 240 | #define SN_pkcs9 "pkcs9" | ||
| 241 | #define NID_pkcs9 47 | ||
| 242 | #define OBJ_pkcs9 OBJ_pkcs,9L | ||
| 243 | |||
| 244 | #define SN_pkcs9_emailAddress "Email" | ||
| 245 | #define LN_pkcs9_emailAddress "emailAddress" | ||
| 246 | #define NID_pkcs9_emailAddress 48 | ||
| 247 | #define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L | ||
| 248 | |||
| 249 | #define LN_pkcs9_unstructuredName "unstructuredName" | ||
| 250 | #define NID_pkcs9_unstructuredName 49 | ||
| 251 | #define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L | ||
| 252 | |||
| 253 | #define LN_pkcs9_contentType "contentType" | ||
| 254 | #define NID_pkcs9_contentType 50 | ||
| 255 | #define OBJ_pkcs9_contentType OBJ_pkcs9,3L | ||
| 256 | |||
| 257 | #define LN_pkcs9_messageDigest "messageDigest" | ||
| 258 | #define NID_pkcs9_messageDigest 51 | ||
| 259 | #define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L | ||
| 260 | |||
| 261 | #define LN_pkcs9_signingTime "signingTime" | ||
| 262 | #define NID_pkcs9_signingTime 52 | ||
| 263 | #define OBJ_pkcs9_signingTime OBJ_pkcs9,5L | ||
| 264 | |||
| 265 | #define LN_pkcs9_countersignature "countersignature" | ||
| 266 | #define NID_pkcs9_countersignature 53 | ||
| 267 | #define OBJ_pkcs9_countersignature OBJ_pkcs9,6L | ||
| 268 | |||
| 269 | #define LN_pkcs9_challengePassword "challengePassword" | ||
| 270 | #define NID_pkcs9_challengePassword 54 | ||
| 271 | #define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L | ||
| 272 | |||
| 273 | #define LN_pkcs9_unstructuredAddress "unstructuredAddress" | ||
| 274 | #define NID_pkcs9_unstructuredAddress 55 | ||
| 275 | #define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L | ||
| 276 | |||
| 277 | #define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" | ||
| 278 | #define NID_pkcs9_extCertAttributes 56 | ||
| 279 | #define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L | ||
| 280 | |||
| 281 | #define SN_ext_req "extReq" | ||
| 282 | #define LN_ext_req "Extension Request" | ||
| 283 | #define NID_ext_req 172 | ||
| 284 | #define OBJ_ext_req OBJ_pkcs9,14L | ||
| 285 | |||
| 286 | #define SN_SMIMECapabilities "SMIME-CAPS" | ||
| 287 | #define LN_SMIMECapabilities "S/MIME Capabilities" | ||
| 288 | #define NID_SMIMECapabilities 167 | ||
| 289 | #define OBJ_SMIMECapabilities OBJ_pkcs9,15L | ||
| 290 | |||
| 291 | #define SN_SMIME "SMIME" | ||
| 292 | #define LN_SMIME "S/MIME" | ||
| 293 | #define NID_SMIME 188 | ||
| 294 | #define OBJ_SMIME OBJ_pkcs9,16L | ||
| 295 | |||
| 296 | #define SN_id_smime_mod "id-smime-mod" | ||
| 297 | #define NID_id_smime_mod 189 | ||
| 298 | #define OBJ_id_smime_mod OBJ_SMIME,0L | ||
| 299 | |||
| 300 | #define SN_id_smime_ct "id-smime-ct" | ||
| 301 | #define NID_id_smime_ct 190 | ||
| 302 | #define OBJ_id_smime_ct OBJ_SMIME,1L | ||
| 303 | |||
| 304 | #define SN_id_smime_aa "id-smime-aa" | ||
| 305 | #define NID_id_smime_aa 191 | ||
| 306 | #define OBJ_id_smime_aa OBJ_SMIME,2L | ||
| 307 | |||
| 308 | #define SN_id_smime_alg "id-smime-alg" | ||
| 309 | #define NID_id_smime_alg 192 | ||
| 310 | #define OBJ_id_smime_alg OBJ_SMIME,3L | ||
| 311 | |||
| 312 | #define SN_id_smime_cd "id-smime-cd" | ||
| 313 | #define NID_id_smime_cd 193 | ||
| 314 | #define OBJ_id_smime_cd OBJ_SMIME,4L | ||
| 315 | |||
| 316 | #define SN_id_smime_spq "id-smime-spq" | ||
| 317 | #define NID_id_smime_spq 194 | ||
| 318 | #define OBJ_id_smime_spq OBJ_SMIME,5L | ||
| 319 | |||
| 320 | #define SN_id_smime_cti "id-smime-cti" | ||
| 321 | #define NID_id_smime_cti 195 | ||
| 322 | #define OBJ_id_smime_cti OBJ_SMIME,6L | ||
| 323 | |||
| 324 | #define SN_id_smime_mod_cms "id-smime-mod-cms" | ||
| 325 | #define NID_id_smime_mod_cms 196 | ||
| 326 | #define OBJ_id_smime_mod_cms OBJ_id_smime_mod,1L | ||
| 327 | |||
| 328 | #define SN_id_smime_mod_ess "id-smime-mod-ess" | ||
| 329 | #define NID_id_smime_mod_ess 197 | ||
| 330 | #define OBJ_id_smime_mod_ess OBJ_id_smime_mod,2L | ||
| 331 | |||
| 332 | #define SN_id_smime_mod_oid "id-smime-mod-oid" | ||
| 333 | #define NID_id_smime_mod_oid 198 | ||
| 334 | #define OBJ_id_smime_mod_oid OBJ_id_smime_mod,3L | ||
| 335 | |||
| 336 | #define SN_id_smime_mod_msg_v3 "id-smime-mod-msg-v3" | ||
| 337 | #define NID_id_smime_mod_msg_v3 199 | ||
| 338 | #define OBJ_id_smime_mod_msg_v3 OBJ_id_smime_mod,4L | ||
| 339 | |||
| 340 | #define SN_id_smime_mod_ets_eSignature_88 "id-smime-mod-ets-eSignature-88" | ||
| 341 | #define NID_id_smime_mod_ets_eSignature_88 200 | ||
| 342 | #define OBJ_id_smime_mod_ets_eSignature_88 OBJ_id_smime_mod,5L | ||
| 343 | |||
| 344 | #define SN_id_smime_mod_ets_eSignature_97 "id-smime-mod-ets-eSignature-97" | ||
| 345 | #define NID_id_smime_mod_ets_eSignature_97 201 | ||
| 346 | #define OBJ_id_smime_mod_ets_eSignature_97 OBJ_id_smime_mod,6L | ||
| 347 | |||
| 348 | #define SN_id_smime_mod_ets_eSigPolicy_88 "id-smime-mod-ets-eSigPolicy-88" | ||
| 349 | #define NID_id_smime_mod_ets_eSigPolicy_88 202 | ||
| 350 | #define OBJ_id_smime_mod_ets_eSigPolicy_88 OBJ_id_smime_mod,7L | ||
| 351 | |||
| 352 | #define SN_id_smime_mod_ets_eSigPolicy_97 "id-smime-mod-ets-eSigPolicy-97" | ||
| 353 | #define NID_id_smime_mod_ets_eSigPolicy_97 203 | ||
| 354 | #define OBJ_id_smime_mod_ets_eSigPolicy_97 OBJ_id_smime_mod,8L | ||
| 355 | |||
| 356 | #define SN_id_smime_ct_receipt "id-smime-ct-receipt" | ||
| 357 | #define NID_id_smime_ct_receipt 204 | ||
| 358 | #define OBJ_id_smime_ct_receipt OBJ_id_smime_ct,1L | ||
| 359 | |||
| 360 | #define SN_id_smime_ct_authData "id-smime-ct-authData" | ||
| 361 | #define NID_id_smime_ct_authData 205 | ||
| 362 | #define OBJ_id_smime_ct_authData OBJ_id_smime_ct,2L | ||
| 363 | |||
| 364 | #define SN_id_smime_ct_publishCert "id-smime-ct-publishCert" | ||
| 365 | #define NID_id_smime_ct_publishCert 206 | ||
| 366 | #define OBJ_id_smime_ct_publishCert OBJ_id_smime_ct,3L | ||
| 367 | |||
| 368 | #define SN_id_smime_ct_TSTInfo "id-smime-ct-TSTInfo" | ||
| 369 | #define NID_id_smime_ct_TSTInfo 207 | ||
| 370 | #define OBJ_id_smime_ct_TSTInfo OBJ_id_smime_ct,4L | ||
| 371 | |||
| 372 | #define SN_id_smime_ct_TDTInfo "id-smime-ct-TDTInfo" | ||
| 373 | #define NID_id_smime_ct_TDTInfo 208 | ||
| 374 | #define OBJ_id_smime_ct_TDTInfo OBJ_id_smime_ct,5L | ||
| 375 | |||
| 376 | #define SN_id_smime_ct_contentInfo "id-smime-ct-contentInfo" | ||
| 377 | #define NID_id_smime_ct_contentInfo 209 | ||
| 378 | #define OBJ_id_smime_ct_contentInfo OBJ_id_smime_ct,6L | ||
| 379 | |||
| 380 | #define SN_id_smime_ct_DVCSRequestData "id-smime-ct-DVCSRequestData" | ||
| 381 | #define NID_id_smime_ct_DVCSRequestData 210 | ||
| 382 | #define OBJ_id_smime_ct_DVCSRequestData OBJ_id_smime_ct,7L | ||
| 383 | |||
| 384 | #define SN_id_smime_ct_DVCSResponseData "id-smime-ct-DVCSResponseData" | ||
| 385 | #define NID_id_smime_ct_DVCSResponseData 211 | ||
| 386 | #define OBJ_id_smime_ct_DVCSResponseData OBJ_id_smime_ct,8L | ||
| 387 | |||
| 388 | #define SN_id_smime_aa_receiptRequest "id-smime-aa-receiptRequest" | ||
| 389 | #define NID_id_smime_aa_receiptRequest 212 | ||
| 390 | #define OBJ_id_smime_aa_receiptRequest OBJ_id_smime_aa,1L | ||
| 391 | |||
| 392 | #define SN_id_smime_aa_securityLabel "id-smime-aa-securityLabel" | ||
| 393 | #define NID_id_smime_aa_securityLabel 213 | ||
| 394 | #define OBJ_id_smime_aa_securityLabel OBJ_id_smime_aa,2L | ||
| 395 | |||
| 396 | #define SN_id_smime_aa_mlExpandHistory "id-smime-aa-mlExpandHistory" | ||
| 397 | #define NID_id_smime_aa_mlExpandHistory 214 | ||
| 398 | #define OBJ_id_smime_aa_mlExpandHistory OBJ_id_smime_aa,3L | ||
| 399 | |||
| 400 | #define SN_id_smime_aa_contentHint "id-smime-aa-contentHint" | ||
| 401 | #define NID_id_smime_aa_contentHint 215 | ||
| 402 | #define OBJ_id_smime_aa_contentHint OBJ_id_smime_aa,4L | ||
| 403 | |||
| 404 | #define SN_id_smime_aa_msgSigDigest "id-smime-aa-msgSigDigest" | ||
| 405 | #define NID_id_smime_aa_msgSigDigest 216 | ||
| 406 | #define OBJ_id_smime_aa_msgSigDigest OBJ_id_smime_aa,5L | ||
| 407 | |||
| 408 | #define SN_id_smime_aa_encapContentType "id-smime-aa-encapContentType" | ||
| 409 | #define NID_id_smime_aa_encapContentType 217 | ||
| 410 | #define OBJ_id_smime_aa_encapContentType OBJ_id_smime_aa,6L | ||
| 411 | |||
| 412 | #define SN_id_smime_aa_contentIdentifier "id-smime-aa-contentIdentifier" | ||
| 413 | #define NID_id_smime_aa_contentIdentifier 218 | ||
| 414 | #define OBJ_id_smime_aa_contentIdentifier OBJ_id_smime_aa,7L | ||
| 415 | |||
| 416 | #define SN_id_smime_aa_macValue "id-smime-aa-macValue" | ||
| 417 | #define NID_id_smime_aa_macValue 219 | ||
| 418 | #define OBJ_id_smime_aa_macValue OBJ_id_smime_aa,8L | ||
| 419 | |||
| 420 | #define SN_id_smime_aa_equivalentLabels "id-smime-aa-equivalentLabels" | ||
| 421 | #define NID_id_smime_aa_equivalentLabels 220 | ||
| 422 | #define OBJ_id_smime_aa_equivalentLabels OBJ_id_smime_aa,9L | ||
| 423 | |||
| 424 | #define SN_id_smime_aa_contentReference "id-smime-aa-contentReference" | ||
| 425 | #define NID_id_smime_aa_contentReference 221 | ||
| 426 | #define OBJ_id_smime_aa_contentReference OBJ_id_smime_aa,10L | ||
| 427 | |||
| 428 | #define SN_id_smime_aa_encrypKeyPref "id-smime-aa-encrypKeyPref" | ||
| 429 | #define NID_id_smime_aa_encrypKeyPref 222 | ||
| 430 | #define OBJ_id_smime_aa_encrypKeyPref OBJ_id_smime_aa,11L | ||
| 431 | |||
| 432 | #define SN_id_smime_aa_signingCertificate "id-smime-aa-signingCertificate" | ||
| 433 | #define NID_id_smime_aa_signingCertificate 223 | ||
| 434 | #define OBJ_id_smime_aa_signingCertificate OBJ_id_smime_aa,12L | ||
| 435 | |||
| 436 | #define SN_id_smime_aa_smimeEncryptCerts "id-smime-aa-smimeEncryptCerts" | ||
| 437 | #define NID_id_smime_aa_smimeEncryptCerts 224 | ||
| 438 | #define OBJ_id_smime_aa_smimeEncryptCerts OBJ_id_smime_aa,13L | ||
| 439 | |||
| 440 | #define SN_id_smime_aa_timeStampToken "id-smime-aa-timeStampToken" | ||
| 441 | #define NID_id_smime_aa_timeStampToken 225 | ||
| 442 | #define OBJ_id_smime_aa_timeStampToken OBJ_id_smime_aa,14L | ||
| 443 | |||
| 444 | #define SN_id_smime_aa_ets_sigPolicyId "id-smime-aa-ets-sigPolicyId" | ||
| 445 | #define NID_id_smime_aa_ets_sigPolicyId 226 | ||
| 446 | #define OBJ_id_smime_aa_ets_sigPolicyId OBJ_id_smime_aa,15L | ||
| 447 | |||
| 448 | #define SN_id_smime_aa_ets_commitmentType "id-smime-aa-ets-commitmentType" | ||
| 449 | #define NID_id_smime_aa_ets_commitmentType 227 | ||
| 450 | #define OBJ_id_smime_aa_ets_commitmentType OBJ_id_smime_aa,16L | ||
| 451 | |||
| 452 | #define SN_id_smime_aa_ets_signerLocation "id-smime-aa-ets-signerLocation" | ||
| 453 | #define NID_id_smime_aa_ets_signerLocation 228 | ||
| 454 | #define OBJ_id_smime_aa_ets_signerLocation OBJ_id_smime_aa,17L | ||
| 455 | |||
| 456 | #define SN_id_smime_aa_ets_signerAttr "id-smime-aa-ets-signerAttr" | ||
| 457 | #define NID_id_smime_aa_ets_signerAttr 229 | ||
| 458 | #define OBJ_id_smime_aa_ets_signerAttr OBJ_id_smime_aa,18L | ||
| 459 | |||
| 460 | #define SN_id_smime_aa_ets_otherSigCert "id-smime-aa-ets-otherSigCert" | ||
| 461 | #define NID_id_smime_aa_ets_otherSigCert 230 | ||
| 462 | #define OBJ_id_smime_aa_ets_otherSigCert OBJ_id_smime_aa,19L | ||
| 463 | |||
| 464 | #define SN_id_smime_aa_ets_contentTimestamp "id-smime-aa-ets-contentTimestamp" | ||
| 465 | #define NID_id_smime_aa_ets_contentTimestamp 231 | ||
| 466 | #define OBJ_id_smime_aa_ets_contentTimestamp OBJ_id_smime_aa,20L | ||
| 467 | |||
| 468 | #define SN_id_smime_aa_ets_CertificateRefs "id-smime-aa-ets-CertificateRefs" | ||
| 469 | #define NID_id_smime_aa_ets_CertificateRefs 232 | ||
| 470 | #define OBJ_id_smime_aa_ets_CertificateRefs OBJ_id_smime_aa,21L | ||
| 471 | |||
| 472 | #define SN_id_smime_aa_ets_RevocationRefs "id-smime-aa-ets-RevocationRefs" | ||
| 473 | #define NID_id_smime_aa_ets_RevocationRefs 233 | ||
| 474 | #define OBJ_id_smime_aa_ets_RevocationRefs OBJ_id_smime_aa,22L | ||
| 475 | |||
| 476 | #define SN_id_smime_aa_ets_certValues "id-smime-aa-ets-certValues" | ||
| 477 | #define NID_id_smime_aa_ets_certValues 234 | ||
| 478 | #define OBJ_id_smime_aa_ets_certValues OBJ_id_smime_aa,23L | ||
| 479 | |||
| 480 | #define SN_id_smime_aa_ets_revocationValues "id-smime-aa-ets-revocationValues" | ||
| 481 | #define NID_id_smime_aa_ets_revocationValues 235 | ||
| 482 | #define OBJ_id_smime_aa_ets_revocationValues OBJ_id_smime_aa,24L | ||
| 483 | |||
| 484 | #define SN_id_smime_aa_ets_escTimeStamp "id-smime-aa-ets-escTimeStamp" | ||
| 485 | #define NID_id_smime_aa_ets_escTimeStamp 236 | ||
| 486 | #define OBJ_id_smime_aa_ets_escTimeStamp OBJ_id_smime_aa,25L | ||
| 487 | |||
| 488 | #define SN_id_smime_aa_ets_certCRLTimestamp "id-smime-aa-ets-certCRLTimestamp" | ||
| 489 | #define NID_id_smime_aa_ets_certCRLTimestamp 237 | ||
| 490 | #define OBJ_id_smime_aa_ets_certCRLTimestamp OBJ_id_smime_aa,26L | ||
| 491 | |||
| 492 | #define SN_id_smime_aa_ets_archiveTimeStamp "id-smime-aa-ets-archiveTimeStamp" | ||
| 493 | #define NID_id_smime_aa_ets_archiveTimeStamp 238 | ||
| 494 | #define OBJ_id_smime_aa_ets_archiveTimeStamp OBJ_id_smime_aa,27L | ||
| 495 | |||
| 496 | #define SN_id_smime_aa_signatureType "id-smime-aa-signatureType" | ||
| 497 | #define NID_id_smime_aa_signatureType 239 | ||
| 498 | #define OBJ_id_smime_aa_signatureType OBJ_id_smime_aa,28L | ||
| 499 | |||
| 500 | #define SN_id_smime_aa_dvcs_dvc "id-smime-aa-dvcs-dvc" | ||
| 501 | #define NID_id_smime_aa_dvcs_dvc 240 | ||
| 502 | #define OBJ_id_smime_aa_dvcs_dvc OBJ_id_smime_aa,29L | ||
| 503 | |||
| 504 | #define SN_id_smime_alg_ESDHwith3DES "id-smime-alg-ESDHwith3DES" | ||
| 505 | #define NID_id_smime_alg_ESDHwith3DES 241 | ||
| 506 | #define OBJ_id_smime_alg_ESDHwith3DES OBJ_id_smime_alg,1L | ||
| 507 | |||
| 508 | #define SN_id_smime_alg_ESDHwithRC2 "id-smime-alg-ESDHwithRC2" | ||
| 509 | #define NID_id_smime_alg_ESDHwithRC2 242 | ||
| 510 | #define OBJ_id_smime_alg_ESDHwithRC2 OBJ_id_smime_alg,2L | ||
| 511 | |||
| 512 | #define SN_id_smime_alg_3DESwrap "id-smime-alg-3DESwrap" | ||
| 513 | #define NID_id_smime_alg_3DESwrap 243 | ||
| 514 | #define OBJ_id_smime_alg_3DESwrap OBJ_id_smime_alg,3L | ||
| 515 | |||
| 516 | #define SN_id_smime_alg_RC2wrap "id-smime-alg-RC2wrap" | ||
| 517 | #define NID_id_smime_alg_RC2wrap 244 | ||
| 518 | #define OBJ_id_smime_alg_RC2wrap OBJ_id_smime_alg,4L | ||
| 519 | |||
| 520 | #define SN_id_smime_alg_ESDH "id-smime-alg-ESDH" | ||
| 521 | #define NID_id_smime_alg_ESDH 245 | ||
| 522 | #define OBJ_id_smime_alg_ESDH OBJ_id_smime_alg,5L | ||
| 523 | |||
| 524 | #define SN_id_smime_alg_CMS3DESwrap "id-smime-alg-CMS3DESwrap" | ||
| 525 | #define NID_id_smime_alg_CMS3DESwrap 246 | ||
| 526 | #define OBJ_id_smime_alg_CMS3DESwrap OBJ_id_smime_alg,6L | ||
| 527 | |||
| 528 | #define SN_id_smime_alg_CMSRC2wrap "id-smime-alg-CMSRC2wrap" | ||
| 529 | #define NID_id_smime_alg_CMSRC2wrap 247 | ||
| 530 | #define OBJ_id_smime_alg_CMSRC2wrap OBJ_id_smime_alg,7L | ||
| 531 | |||
| 532 | #define SN_id_smime_cd_ldap "id-smime-cd-ldap" | ||
| 533 | #define NID_id_smime_cd_ldap 248 | ||
| 534 | #define OBJ_id_smime_cd_ldap OBJ_id_smime_cd,1L | ||
| 535 | |||
| 536 | #define SN_id_smime_spq_ets_sqt_uri "id-smime-spq-ets-sqt-uri" | ||
| 537 | #define NID_id_smime_spq_ets_sqt_uri 249 | ||
| 538 | #define OBJ_id_smime_spq_ets_sqt_uri OBJ_id_smime_spq,1L | ||
| 539 | |||
| 540 | #define SN_id_smime_spq_ets_sqt_unotice "id-smime-spq-ets-sqt-unotice" | ||
| 541 | #define NID_id_smime_spq_ets_sqt_unotice 250 | ||
| 542 | #define OBJ_id_smime_spq_ets_sqt_unotice OBJ_id_smime_spq,2L | ||
| 543 | |||
| 544 | #define SN_id_smime_cti_ets_proofOfOrigin "id-smime-cti-ets-proofOfOrigin" | ||
| 545 | #define NID_id_smime_cti_ets_proofOfOrigin 251 | ||
| 546 | #define OBJ_id_smime_cti_ets_proofOfOrigin OBJ_id_smime_cti,1L | ||
| 547 | |||
| 548 | #define SN_id_smime_cti_ets_proofOfReceipt "id-smime-cti-ets-proofOfReceipt" | ||
| 549 | #define NID_id_smime_cti_ets_proofOfReceipt 252 | ||
| 550 | #define OBJ_id_smime_cti_ets_proofOfReceipt OBJ_id_smime_cti,2L | ||
| 551 | |||
| 552 | #define SN_id_smime_cti_ets_proofOfDelivery "id-smime-cti-ets-proofOfDelivery" | ||
| 553 | #define NID_id_smime_cti_ets_proofOfDelivery 253 | ||
| 554 | #define OBJ_id_smime_cti_ets_proofOfDelivery OBJ_id_smime_cti,3L | ||
| 555 | |||
| 556 | #define SN_id_smime_cti_ets_proofOfSender "id-smime-cti-ets-proofOfSender" | ||
| 557 | #define NID_id_smime_cti_ets_proofOfSender 254 | ||
| 558 | #define OBJ_id_smime_cti_ets_proofOfSender OBJ_id_smime_cti,4L | ||
| 559 | |||
| 560 | #define SN_id_smime_cti_ets_proofOfApproval "id-smime-cti-ets-proofOfApproval" | ||
| 561 | #define NID_id_smime_cti_ets_proofOfApproval 255 | ||
| 562 | #define OBJ_id_smime_cti_ets_proofOfApproval OBJ_id_smime_cti,5L | ||
| 563 | |||
| 564 | #define SN_id_smime_cti_ets_proofOfCreation "id-smime-cti-ets-proofOfCreation" | ||
| 565 | #define NID_id_smime_cti_ets_proofOfCreation 256 | ||
| 566 | #define OBJ_id_smime_cti_ets_proofOfCreation OBJ_id_smime_cti,6L | ||
| 567 | |||
| 568 | #define LN_friendlyName "friendlyName" | ||
| 569 | #define NID_friendlyName 156 | ||
| 570 | #define OBJ_friendlyName OBJ_pkcs9,20L | ||
| 571 | |||
| 572 | #define LN_localKeyID "localKeyID" | ||
| 573 | #define NID_localKeyID 157 | ||
| 574 | #define OBJ_localKeyID OBJ_pkcs9,21L | ||
| 575 | |||
| 576 | #define OBJ_certTypes OBJ_pkcs9,22L | ||
| 577 | |||
| 578 | #define LN_x509Certificate "x509Certificate" | ||
| 579 | #define NID_x509Certificate 158 | ||
| 580 | #define OBJ_x509Certificate OBJ_certTypes,1L | ||
| 581 | |||
| 582 | #define LN_sdsiCertificate "sdsiCertificate" | ||
| 583 | #define NID_sdsiCertificate 159 | ||
| 584 | #define OBJ_sdsiCertificate OBJ_certTypes,2L | ||
| 585 | |||
| 586 | #define OBJ_crlTypes OBJ_pkcs9,23L | ||
| 587 | |||
| 588 | #define LN_x509Crl "x509Crl" | ||
| 589 | #define NID_x509Crl 160 | ||
| 590 | #define OBJ_x509Crl OBJ_crlTypes,1L | ||
| 591 | |||
| 592 | #define OBJ_pkcs12 OBJ_pkcs,12L | ||
| 593 | |||
| 594 | #define OBJ_pkcs12_pbeids OBJ_pkcs12,1L | ||
| 595 | |||
| 596 | #define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" | ||
| 597 | #define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" | ||
| 598 | #define NID_pbe_WithSHA1And128BitRC4 144 | ||
| 599 | #define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids,1L | ||
| 600 | |||
| 601 | #define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" | ||
| 602 | #define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" | ||
| 603 | #define NID_pbe_WithSHA1And40BitRC4 145 | ||
| 604 | #define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids,2L | ||
| 605 | |||
| 606 | #define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" | ||
| 607 | #define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" | ||
| 608 | #define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 | ||
| 609 | #define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids,3L | ||
| 610 | |||
| 611 | #define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" | ||
| 612 | #define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" | ||
| 613 | #define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 | ||
| 614 | #define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids,4L | ||
| 615 | |||
| 616 | #define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" | ||
| 617 | #define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" | ||
| 618 | #define NID_pbe_WithSHA1And128BitRC2_CBC 148 | ||
| 619 | #define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids,5L | ||
| 620 | |||
| 621 | #define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" | ||
| 622 | #define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" | ||
| 623 | #define NID_pbe_WithSHA1And40BitRC2_CBC 149 | ||
| 624 | #define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids,6L | ||
| 625 | |||
| 626 | #define OBJ_pkcs12_Version1 OBJ_pkcs12,10L | ||
| 627 | |||
| 628 | #define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1,1L | ||
| 629 | |||
| 630 | #define LN_keyBag "keyBag" | ||
| 631 | #define NID_keyBag 150 | ||
| 632 | #define OBJ_keyBag OBJ_pkcs12_BagIds,1L | ||
| 633 | |||
| 634 | #define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" | ||
| 635 | #define NID_pkcs8ShroudedKeyBag 151 | ||
| 636 | #define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds,2L | ||
| 637 | |||
| 638 | #define LN_certBag "certBag" | ||
| 639 | #define NID_certBag 152 | ||
| 640 | #define OBJ_certBag OBJ_pkcs12_BagIds,3L | ||
| 641 | |||
| 642 | #define LN_crlBag "crlBag" | ||
| 643 | #define NID_crlBag 153 | ||
| 644 | #define OBJ_crlBag OBJ_pkcs12_BagIds,4L | ||
| 645 | |||
| 646 | #define LN_secretBag "secretBag" | ||
| 647 | #define NID_secretBag 154 | ||
| 648 | #define OBJ_secretBag OBJ_pkcs12_BagIds,5L | ||
| 649 | |||
| 650 | #define LN_safeContentsBag "safeContentsBag" | ||
| 651 | #define NID_safeContentsBag 155 | ||
| 652 | #define OBJ_safeContentsBag OBJ_pkcs12_BagIds,6L | ||
| 653 | |||
| 654 | #define SN_md2 "MD2" | ||
| 655 | #define LN_md2 "md2" | ||
| 656 | #define NID_md2 3 | ||
| 657 | #define OBJ_md2 OBJ_rsadsi,2L,2L | ||
| 658 | |||
| 659 | #define SN_md4 "MD4" | ||
| 660 | #define LN_md4 "md4" | ||
| 661 | #define NID_md4 257 | ||
| 662 | #define OBJ_md4 OBJ_rsadsi,2L,4L | ||
| 663 | |||
| 664 | #define SN_md5 "MD5" | ||
| 665 | #define LN_md5 "md5" | ||
| 666 | #define NID_md5 4 | ||
| 667 | #define OBJ_md5 OBJ_rsadsi,2L,5L | ||
| 668 | |||
| 669 | #define SN_md5_sha1 "MD5-SHA1" | ||
| 670 | #define LN_md5_sha1 "md5-sha1" | ||
| 671 | #define NID_md5_sha1 114 | ||
| 672 | |||
| 673 | #define LN_hmacWithSHA1 "hmacWithSHA1" | ||
| 674 | #define NID_hmacWithSHA1 163 | ||
| 675 | #define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L | ||
| 676 | |||
| 677 | #define SN_rc2_cbc "RC2-CBC" | ||
| 678 | #define LN_rc2_cbc "rc2-cbc" | ||
| 679 | #define NID_rc2_cbc 37 | ||
| 680 | #define OBJ_rc2_cbc OBJ_rsadsi,3L,2L | ||
| 681 | |||
| 682 | #define SN_rc2_ecb "RC2-ECB" | ||
| 683 | #define LN_rc2_ecb "rc2-ecb" | ||
| 684 | #define NID_rc2_ecb 38 | ||
| 685 | |||
| 686 | #define SN_rc2_cfb64 "RC2-CFB" | ||
| 687 | #define LN_rc2_cfb64 "rc2-cfb" | ||
| 688 | #define NID_rc2_cfb64 39 | ||
| 689 | |||
| 690 | #define SN_rc2_ofb64 "RC2-OFB" | ||
| 691 | #define LN_rc2_ofb64 "rc2-ofb" | ||
| 692 | #define NID_rc2_ofb64 40 | ||
| 693 | |||
| 694 | #define SN_rc2_40_cbc "RC2-40-CBC" | ||
| 695 | #define LN_rc2_40_cbc "rc2-40-cbc" | ||
| 696 | #define NID_rc2_40_cbc 98 | ||
| 697 | |||
| 698 | #define SN_rc2_64_cbc "RC2-64-CBC" | ||
| 699 | #define LN_rc2_64_cbc "rc2-64-cbc" | ||
| 700 | #define NID_rc2_64_cbc 166 | ||
| 701 | |||
| 702 | #define SN_rc4 "RC4" | ||
| 703 | #define LN_rc4 "rc4" | ||
| 704 | #define NID_rc4 5 | ||
| 705 | #define OBJ_rc4 OBJ_rsadsi,3L,4L | ||
| 706 | |||
| 707 | #define SN_rc4_40 "RC4-40" | ||
| 708 | #define LN_rc4_40 "rc4-40" | ||
| 709 | #define NID_rc4_40 97 | ||
| 710 | |||
| 711 | #define SN_des_ede3_cbc "DES-EDE3-CBC" | ||
| 712 | #define LN_des_ede3_cbc "des-ede3-cbc" | ||
| 713 | #define NID_des_ede3_cbc 44 | ||
| 714 | #define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L | ||
| 715 | |||
| 716 | #define SN_rc5_cbc "RC5-CBC" | ||
| 717 | #define LN_rc5_cbc "rc5-cbc" | ||
| 718 | #define NID_rc5_cbc 120 | ||
| 719 | #define OBJ_rc5_cbc OBJ_rsadsi,3L,8L | ||
| 720 | |||
| 721 | #define SN_rc5_ecb "RC5-ECB" | ||
| 722 | #define LN_rc5_ecb "rc5-ecb" | ||
| 723 | #define NID_rc5_ecb 121 | ||
| 724 | |||
| 725 | #define SN_rc5_cfb64 "RC5-CFB" | ||
| 726 | #define LN_rc5_cfb64 "rc5-cfb" | ||
| 727 | #define NID_rc5_cfb64 122 | ||
| 728 | |||
| 729 | #define SN_rc5_ofb64 "RC5-OFB" | ||
| 730 | #define LN_rc5_ofb64 "rc5-ofb" | ||
| 731 | #define NID_rc5_ofb64 123 | ||
| 732 | |||
| 733 | #define SN_ms_ext_req "msExtReq" | ||
| 734 | #define LN_ms_ext_req "Microsoft Extension Request" | ||
| 735 | #define NID_ms_ext_req 171 | ||
| 736 | #define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L | ||
| 737 | |||
| 738 | #define SN_ms_code_ind "msCodeInd" | ||
| 739 | #define LN_ms_code_ind "Microsoft Individual Code Signing" | ||
| 740 | #define NID_ms_code_ind 134 | ||
| 741 | #define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L | ||
| 742 | |||
| 743 | #define SN_ms_code_com "msCodeCom" | ||
| 744 | #define LN_ms_code_com "Microsoft Commercial Code Signing" | ||
| 745 | #define NID_ms_code_com 135 | ||
| 746 | #define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L | ||
| 747 | |||
| 748 | #define SN_ms_ctl_sign "msCTLSign" | ||
| 749 | #define LN_ms_ctl_sign "Microsoft Trust List Signing" | ||
| 750 | #define NID_ms_ctl_sign 136 | ||
| 751 | #define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L | ||
| 752 | |||
| 753 | #define SN_ms_sgc "msSGC" | ||
| 754 | #define LN_ms_sgc "Microsoft Server Gated Crypto" | ||
| 755 | #define NID_ms_sgc 137 | ||
| 756 | #define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L | ||
| 757 | |||
| 758 | #define SN_ms_efs "msEFS" | ||
| 759 | #define LN_ms_efs "Microsoft Encrypted File System" | ||
| 760 | #define NID_ms_efs 138 | ||
| 761 | #define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L | ||
| 762 | |||
| 763 | #define SN_idea_cbc "IDEA-CBC" | ||
| 764 | #define LN_idea_cbc "idea-cbc" | ||
| 765 | #define NID_idea_cbc 34 | ||
| 766 | #define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L | ||
| 767 | |||
| 768 | #define SN_idea_ecb "IDEA-ECB" | ||
| 769 | #define LN_idea_ecb "idea-ecb" | ||
| 770 | #define NID_idea_ecb 36 | ||
| 771 | |||
| 772 | #define SN_idea_cfb64 "IDEA-CFB" | ||
| 773 | #define LN_idea_cfb64 "idea-cfb" | ||
| 774 | #define NID_idea_cfb64 35 | ||
| 775 | |||
| 776 | #define SN_idea_ofb64 "IDEA-OFB" | ||
| 777 | #define LN_idea_ofb64 "idea-ofb" | ||
| 778 | #define NID_idea_ofb64 46 | ||
| 779 | |||
| 780 | #define SN_bf_cbc "BF-CBC" | ||
| 781 | #define LN_bf_cbc "bf-cbc" | ||
| 782 | #define NID_bf_cbc 91 | ||
| 783 | #define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L | ||
| 784 | |||
| 785 | #define SN_bf_ecb "BF-ECB" | ||
| 786 | #define LN_bf_ecb "bf-ecb" | ||
| 787 | #define NID_bf_ecb 92 | ||
| 788 | |||
| 789 | #define SN_bf_cfb64 "BF-CFB" | ||
| 790 | #define LN_bf_cfb64 "bf-cfb" | ||
| 791 | #define NID_bf_cfb64 93 | ||
| 792 | |||
| 793 | #define SN_bf_ofb64 "BF-OFB" | ||
| 794 | #define LN_bf_ofb64 "bf-ofb" | ||
| 795 | #define NID_bf_ofb64 94 | ||
| 796 | |||
| 797 | #define SN_id_pkix "PKIX" | ||
| 798 | #define NID_id_pkix 127 | ||
| 799 | #define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L | ||
| 800 | |||
| 801 | #define SN_id_pkix_mod "id-pkix-mod" | ||
| 802 | #define NID_id_pkix_mod 258 | ||
| 803 | #define OBJ_id_pkix_mod OBJ_id_pkix,0L | ||
| 804 | |||
| 805 | #define SN_id_pe "id-pe" | ||
| 806 | #define NID_id_pe 175 | ||
| 807 | #define OBJ_id_pe OBJ_id_pkix,1L | ||
| 808 | |||
| 809 | #define SN_id_qt "id-qt" | ||
| 810 | #define NID_id_qt 259 | ||
| 811 | #define OBJ_id_qt OBJ_id_pkix,2L | ||
| 812 | |||
| 813 | #define SN_id_kp "id-kp" | ||
| 814 | #define NID_id_kp 128 | ||
| 815 | #define OBJ_id_kp OBJ_id_pkix,3L | ||
| 816 | |||
| 817 | #define SN_id_it "id-it" | ||
| 818 | #define NID_id_it 260 | ||
| 819 | #define OBJ_id_it OBJ_id_pkix,4L | ||
| 820 | |||
| 821 | #define SN_id_pkip "id-pkip" | ||
| 822 | #define NID_id_pkip 261 | ||
| 823 | #define OBJ_id_pkip OBJ_id_pkix,5L | ||
| 824 | |||
| 825 | #define SN_id_alg "id-alg" | ||
| 826 | #define NID_id_alg 262 | ||
| 827 | #define OBJ_id_alg OBJ_id_pkix,6L | ||
| 828 | |||
| 829 | #define SN_id_cmc "id-cmc" | ||
| 830 | #define NID_id_cmc 263 | ||
| 831 | #define OBJ_id_cmc OBJ_id_pkix,7L | ||
| 832 | |||
| 833 | #define SN_id_on "id-on" | ||
| 834 | #define NID_id_on 264 | ||
| 835 | #define OBJ_id_on OBJ_id_pkix,8L | ||
| 836 | |||
| 837 | #define SN_id_pda "id-pda" | ||
| 838 | #define NID_id_pda 265 | ||
| 839 | #define OBJ_id_pda OBJ_id_pkix,9L | ||
| 840 | |||
| 841 | #define SN_id_aca "id-aca" | ||
| 842 | #define NID_id_aca 266 | ||
| 843 | #define OBJ_id_aca OBJ_id_pkix,10L | ||
| 844 | |||
| 845 | #define SN_id_qcs "id-qcs" | ||
| 846 | #define NID_id_qcs 267 | ||
| 847 | #define OBJ_id_qcs OBJ_id_pkix,11L | ||
| 848 | |||
| 849 | #define SN_id_cct "id-cct" | ||
| 850 | #define NID_id_cct 268 | ||
| 851 | #define OBJ_id_cct OBJ_id_pkix,12L | ||
| 852 | |||
| 853 | #define SN_id_ad "id-ad" | ||
| 854 | #define NID_id_ad 176 | ||
| 855 | #define OBJ_id_ad OBJ_id_pkix,48L | ||
| 856 | |||
| 857 | #define SN_id_pkix1_explicit_88 "id-pkix1-explicit-88" | ||
| 858 | #define NID_id_pkix1_explicit_88 269 | ||
| 859 | #define OBJ_id_pkix1_explicit_88 OBJ_id_pkix_mod,1L | ||
| 860 | |||
| 861 | #define SN_id_pkix1_implicit_88 "id-pkix1-implicit-88" | ||
| 862 | #define NID_id_pkix1_implicit_88 270 | ||
| 863 | #define OBJ_id_pkix1_implicit_88 OBJ_id_pkix_mod,2L | ||
| 864 | |||
| 865 | #define SN_id_pkix1_explicit_93 "id-pkix1-explicit-93" | ||
| 866 | #define NID_id_pkix1_explicit_93 271 | ||
| 867 | #define OBJ_id_pkix1_explicit_93 OBJ_id_pkix_mod,3L | ||
| 868 | |||
| 869 | #define SN_id_pkix1_implicit_93 "id-pkix1-implicit-93" | ||
| 870 | #define NID_id_pkix1_implicit_93 272 | ||
| 871 | #define OBJ_id_pkix1_implicit_93 OBJ_id_pkix_mod,4L | ||
| 872 | |||
| 873 | #define SN_id_mod_crmf "id-mod-crmf" | ||
| 874 | #define NID_id_mod_crmf 273 | ||
| 875 | #define OBJ_id_mod_crmf OBJ_id_pkix_mod,5L | ||
| 876 | |||
| 877 | #define SN_id_mod_cmc "id-mod-cmc" | ||
| 878 | #define NID_id_mod_cmc 274 | ||
| 879 | #define OBJ_id_mod_cmc OBJ_id_pkix_mod,6L | ||
| 880 | |||
| 881 | #define SN_id_mod_kea_profile_88 "id-mod-kea-profile-88" | ||
| 882 | #define NID_id_mod_kea_profile_88 275 | ||
| 883 | #define OBJ_id_mod_kea_profile_88 OBJ_id_pkix_mod,7L | ||
| 884 | |||
| 885 | #define SN_id_mod_kea_profile_93 "id-mod-kea-profile-93" | ||
| 886 | #define NID_id_mod_kea_profile_93 276 | ||
| 887 | #define OBJ_id_mod_kea_profile_93 OBJ_id_pkix_mod,8L | ||
| 888 | |||
| 889 | #define SN_id_mod_cmp "id-mod-cmp" | ||
| 890 | #define NID_id_mod_cmp 277 | ||
| 891 | #define OBJ_id_mod_cmp OBJ_id_pkix_mod,9L | ||
| 892 | |||
| 893 | #define SN_id_mod_qualified_cert_88 "id-mod-qualified-cert-88" | ||
| 894 | #define NID_id_mod_qualified_cert_88 278 | ||
| 895 | #define OBJ_id_mod_qualified_cert_88 OBJ_id_pkix_mod,10L | ||
| 896 | |||
| 897 | #define SN_id_mod_qualified_cert_93 "id-mod-qualified-cert-93" | ||
| 898 | #define NID_id_mod_qualified_cert_93 279 | ||
| 899 | #define OBJ_id_mod_qualified_cert_93 OBJ_id_pkix_mod,11L | ||
| 900 | |||
| 901 | #define SN_id_mod_attribute_cert "id-mod-attribute-cert" | ||
| 902 | #define NID_id_mod_attribute_cert 280 | ||
| 903 | #define OBJ_id_mod_attribute_cert OBJ_id_pkix_mod,12L | ||
| 904 | |||
| 905 | #define SN_id_mod_timestamp_protocol "id-mod-timestamp-protocol" | ||
| 906 | #define NID_id_mod_timestamp_protocol 281 | ||
| 907 | #define OBJ_id_mod_timestamp_protocol OBJ_id_pkix_mod,13L | ||
| 908 | |||
| 909 | #define SN_id_mod_ocsp "id-mod-ocsp" | ||
| 910 | #define NID_id_mod_ocsp 282 | ||
| 911 | #define OBJ_id_mod_ocsp OBJ_id_pkix_mod,14L | ||
| 912 | |||
| 913 | #define SN_id_mod_dvcs "id-mod-dvcs" | ||
| 914 | #define NID_id_mod_dvcs 283 | ||
| 915 | #define OBJ_id_mod_dvcs OBJ_id_pkix_mod,15L | ||
| 916 | |||
| 917 | #define SN_id_mod_cmp2000 "id-mod-cmp2000" | ||
| 918 | #define NID_id_mod_cmp2000 284 | ||
| 919 | #define OBJ_id_mod_cmp2000 OBJ_id_pkix_mod,16L | ||
| 920 | |||
| 921 | #define SN_info_access "authorityInfoAccess" | ||
| 922 | #define LN_info_access "Authority Information Access" | ||
| 923 | #define NID_info_access 177 | ||
| 924 | #define OBJ_info_access OBJ_id_pe,1L | ||
| 925 | |||
| 926 | #define SN_biometricInfo "biometricInfo" | ||
| 927 | #define LN_biometricInfo "Biometric Info" | ||
| 928 | #define NID_biometricInfo 285 | ||
| 929 | #define OBJ_biometricInfo OBJ_id_pe,2L | ||
| 930 | |||
| 931 | #define SN_qcStatements "qcStatements" | ||
| 932 | #define NID_qcStatements 286 | ||
| 933 | #define OBJ_qcStatements OBJ_id_pe,3L | ||
| 934 | |||
| 935 | #define SN_ac_auditEntity "ac-auditEntity" | ||
| 936 | #define NID_ac_auditEntity 287 | ||
| 937 | #define OBJ_ac_auditEntity OBJ_id_pe,4L | ||
| 938 | |||
| 939 | #define SN_ac_targeting "ac-targeting" | ||
| 940 | #define NID_ac_targeting 288 | ||
| 941 | #define OBJ_ac_targeting OBJ_id_pe,5L | ||
| 942 | |||
| 943 | #define SN_aaControls "aaControls" | ||
| 944 | #define NID_aaControls 289 | ||
| 945 | #define OBJ_aaControls OBJ_id_pe,6L | ||
| 946 | |||
| 947 | #define SN_sbqp_ipAddrBlock "sbqp-ipAddrBlock" | ||
| 948 | #define NID_sbqp_ipAddrBlock 290 | ||
| 949 | #define OBJ_sbqp_ipAddrBlock OBJ_id_pe,7L | ||
| 950 | |||
| 951 | #define SN_sbqp_autonomousSysNum "sbqp-autonomousSysNum" | ||
| 952 | #define NID_sbqp_autonomousSysNum 291 | ||
| 953 | #define OBJ_sbqp_autonomousSysNum OBJ_id_pe,8L | ||
| 954 | |||
| 955 | #define SN_sbqp_routerIdentifier "sbqp-routerIdentifier" | ||
| 956 | #define NID_sbqp_routerIdentifier 292 | ||
| 957 | #define OBJ_sbqp_routerIdentifier OBJ_id_pe,9L | ||
| 958 | |||
| 959 | #define SN_id_qt_cps "id-qt-cps" | ||
| 960 | #define LN_id_qt_cps "Policy Qualifier CPS" | ||
| 961 | #define NID_id_qt_cps 164 | ||
| 962 | #define OBJ_id_qt_cps OBJ_id_qt,1L | ||
| 963 | |||
| 964 | #define SN_id_qt_unotice "id-qt-unotice" | ||
| 965 | #define LN_id_qt_unotice "Policy Qualifier User Notice" | ||
| 966 | #define NID_id_qt_unotice 165 | ||
| 967 | #define OBJ_id_qt_unotice OBJ_id_qt,2L | ||
| 968 | |||
| 969 | #define SN_textNotice "textNotice" | ||
| 970 | #define NID_textNotice 293 | ||
| 971 | #define OBJ_textNotice OBJ_id_qt,3L | ||
| 972 | |||
| 973 | #define SN_server_auth "serverAuth" | ||
| 974 | #define LN_server_auth "TLS Web Server Authentication" | ||
| 975 | #define NID_server_auth 129 | ||
| 976 | #define OBJ_server_auth OBJ_id_kp,1L | ||
| 977 | |||
| 978 | #define SN_client_auth "clientAuth" | ||
| 979 | #define LN_client_auth "TLS Web Client Authentication" | ||
| 980 | #define NID_client_auth 130 | ||
| 981 | #define OBJ_client_auth OBJ_id_kp,2L | ||
| 982 | |||
| 983 | #define SN_code_sign "codeSigning" | ||
| 984 | #define LN_code_sign "Code Signing" | ||
| 985 | #define NID_code_sign 131 | ||
| 986 | #define OBJ_code_sign OBJ_id_kp,3L | ||
| 987 | |||
| 988 | #define SN_email_protect "emailProtection" | ||
| 989 | #define LN_email_protect "E-mail Protection" | ||
| 990 | #define NID_email_protect 132 | ||
| 991 | #define OBJ_email_protect OBJ_id_kp,4L | ||
| 992 | |||
| 993 | #define SN_ipsecEndSystem "ipsecEndSystem" | ||
| 994 | #define LN_ipsecEndSystem "IPSec End System" | ||
| 995 | #define NID_ipsecEndSystem 294 | ||
| 996 | #define OBJ_ipsecEndSystem OBJ_id_kp,5L | ||
| 997 | |||
| 998 | #define SN_ipsecTunnel "ipsecTunnel" | ||
| 999 | #define LN_ipsecTunnel "IPSec Tunnel" | ||
| 1000 | #define NID_ipsecTunnel 295 | ||
| 1001 | #define OBJ_ipsecTunnel OBJ_id_kp,6L | ||
| 1002 | |||
| 1003 | #define SN_ipsecUser "ipsecUser" | ||
| 1004 | #define LN_ipsecUser "IPSec User" | ||
| 1005 | #define NID_ipsecUser 296 | ||
| 1006 | #define OBJ_ipsecUser OBJ_id_kp,7L | ||
| 1007 | |||
| 1008 | #define SN_time_stamp "timeStamping" | ||
| 1009 | #define LN_time_stamp "Time Stamping" | ||
| 1010 | #define NID_time_stamp 133 | ||
| 1011 | #define OBJ_time_stamp OBJ_id_kp,8L | ||
| 1012 | |||
| 1013 | #define SN_OCSP_sign "OCSPSigning" | ||
| 1014 | #define LN_OCSP_sign "OCSP Signing" | ||
| 1015 | #define NID_OCSP_sign 180 | ||
| 1016 | #define OBJ_OCSP_sign OBJ_id_kp,9L | ||
| 1017 | |||
| 1018 | #define SN_dvcs "DVCS" | ||
| 1019 | #define LN_dvcs "dvcs" | ||
| 1020 | #define NID_dvcs 297 | ||
| 1021 | #define OBJ_dvcs OBJ_id_kp,10L | ||
| 1022 | |||
| 1023 | #define SN_id_it_caProtEncCert "id-it-caProtEncCert" | ||
| 1024 | #define NID_id_it_caProtEncCert 298 | ||
| 1025 | #define OBJ_id_it_caProtEncCert OBJ_id_it,1L | ||
| 1026 | |||
| 1027 | #define SN_id_it_signKeyPairTypes "id-it-signKeyPairTypes" | ||
| 1028 | #define NID_id_it_signKeyPairTypes 299 | ||
| 1029 | #define OBJ_id_it_signKeyPairTypes OBJ_id_it,2L | ||
| 1030 | |||
| 1031 | #define SN_id_it_encKeyPairTypes "id-it-encKeyPairTypes" | ||
| 1032 | #define NID_id_it_encKeyPairTypes 300 | ||
| 1033 | #define OBJ_id_it_encKeyPairTypes OBJ_id_it,3L | ||
| 1034 | |||
| 1035 | #define SN_id_it_preferredSymmAlg "id-it-preferredSymmAlg" | ||
| 1036 | #define NID_id_it_preferredSymmAlg 301 | ||
| 1037 | #define OBJ_id_it_preferredSymmAlg OBJ_id_it,4L | ||
| 1038 | |||
| 1039 | #define SN_id_it_caKeyUpdateInfo "id-it-caKeyUpdateInfo" | ||
| 1040 | #define NID_id_it_caKeyUpdateInfo 302 | ||
| 1041 | #define OBJ_id_it_caKeyUpdateInfo OBJ_id_it,5L | ||
| 1042 | |||
| 1043 | #define SN_id_it_currentCRL "id-it-currentCRL" | ||
| 1044 | #define NID_id_it_currentCRL 303 | ||
| 1045 | #define OBJ_id_it_currentCRL OBJ_id_it,6L | ||
| 1046 | |||
| 1047 | #define SN_id_it_unsupportedOIDs "id-it-unsupportedOIDs" | ||
| 1048 | #define NID_id_it_unsupportedOIDs 304 | ||
| 1049 | #define OBJ_id_it_unsupportedOIDs OBJ_id_it,7L | ||
| 1050 | |||
| 1051 | #define SN_id_it_subscriptionRequest "id-it-subscriptionRequest" | ||
| 1052 | #define NID_id_it_subscriptionRequest 305 | ||
| 1053 | #define OBJ_id_it_subscriptionRequest OBJ_id_it,8L | ||
| 1054 | |||
| 1055 | #define SN_id_it_subscriptionResponse "id-it-subscriptionResponse" | ||
| 1056 | #define NID_id_it_subscriptionResponse 306 | ||
| 1057 | #define OBJ_id_it_subscriptionResponse OBJ_id_it,9L | ||
| 1058 | |||
| 1059 | #define SN_id_it_keyPairParamReq "id-it-keyPairParamReq" | ||
| 1060 | #define NID_id_it_keyPairParamReq 307 | ||
| 1061 | #define OBJ_id_it_keyPairParamReq OBJ_id_it,10L | ||
| 1062 | |||
| 1063 | #define SN_id_it_keyPairParamRep "id-it-keyPairParamRep" | ||
| 1064 | #define NID_id_it_keyPairParamRep 308 | ||
| 1065 | #define OBJ_id_it_keyPairParamRep OBJ_id_it,11L | ||
| 1066 | |||
| 1067 | #define SN_id_it_revPassphrase "id-it-revPassphrase" | ||
| 1068 | #define NID_id_it_revPassphrase 309 | ||
| 1069 | #define OBJ_id_it_revPassphrase OBJ_id_it,12L | ||
| 1070 | |||
| 1071 | #define SN_id_it_implicitConfirm "id-it-implicitConfirm" | ||
| 1072 | #define NID_id_it_implicitConfirm 310 | ||
| 1073 | #define OBJ_id_it_implicitConfirm OBJ_id_it,13L | ||
| 1074 | |||
| 1075 | #define SN_id_it_confirmWaitTime "id-it-confirmWaitTime" | ||
| 1076 | #define NID_id_it_confirmWaitTime 311 | ||
| 1077 | #define OBJ_id_it_confirmWaitTime OBJ_id_it,14L | ||
| 1078 | |||
| 1079 | #define SN_id_it_origPKIMessage "id-it-origPKIMessage" | ||
| 1080 | #define NID_id_it_origPKIMessage 312 | ||
| 1081 | #define OBJ_id_it_origPKIMessage OBJ_id_it,15L | ||
| 1082 | |||
| 1083 | #define SN_id_regCtrl "id-regCtrl" | ||
| 1084 | #define NID_id_regCtrl 313 | ||
| 1085 | #define OBJ_id_regCtrl OBJ_id_pkip,1L | ||
| 1086 | |||
| 1087 | #define SN_id_regInfo "id-regInfo" | ||
| 1088 | #define NID_id_regInfo 314 | ||
| 1089 | #define OBJ_id_regInfo OBJ_id_pkip,2L | ||
| 1090 | |||
| 1091 | #define SN_id_regCtrl_regToken "id-regCtrl-regToken" | ||
| 1092 | #define NID_id_regCtrl_regToken 315 | ||
| 1093 | #define OBJ_id_regCtrl_regToken OBJ_id_regCtrl,1L | ||
| 1094 | |||
| 1095 | #define SN_id_regCtrl_authenticator "id-regCtrl-authenticator" | ||
| 1096 | #define NID_id_regCtrl_authenticator 316 | ||
| 1097 | #define OBJ_id_regCtrl_authenticator OBJ_id_regCtrl,2L | ||
| 1098 | |||
| 1099 | #define SN_id_regCtrl_pkiPublicationInfo "id-regCtrl-pkiPublicationInfo" | ||
| 1100 | #define NID_id_regCtrl_pkiPublicationInfo 317 | ||
| 1101 | #define OBJ_id_regCtrl_pkiPublicationInfo OBJ_id_regCtrl,3L | ||
| 1102 | |||
| 1103 | #define SN_id_regCtrl_pkiArchiveOptions "id-regCtrl-pkiArchiveOptions" | ||
| 1104 | #define NID_id_regCtrl_pkiArchiveOptions 318 | ||
| 1105 | #define OBJ_id_regCtrl_pkiArchiveOptions OBJ_id_regCtrl,4L | ||
| 1106 | |||
| 1107 | #define SN_id_regCtrl_oldCertID "id-regCtrl-oldCertID" | ||
| 1108 | #define NID_id_regCtrl_oldCertID 319 | ||
| 1109 | #define OBJ_id_regCtrl_oldCertID OBJ_id_regCtrl,5L | ||
| 1110 | |||
| 1111 | #define SN_id_regCtrl_protocolEncrKey "id-regCtrl-protocolEncrKey" | ||
| 1112 | #define NID_id_regCtrl_protocolEncrKey 320 | ||
| 1113 | #define OBJ_id_regCtrl_protocolEncrKey OBJ_id_regCtrl,6L | ||
| 1114 | |||
| 1115 | #define SN_id_regInfo_utf8Pairs "id-regInfo-utf8Pairs" | ||
| 1116 | #define NID_id_regInfo_utf8Pairs 321 | ||
| 1117 | #define OBJ_id_regInfo_utf8Pairs OBJ_id_regInfo,1L | ||
| 1118 | |||
| 1119 | #define SN_id_regInfo_certReq "id-regInfo-certReq" | ||
| 1120 | #define NID_id_regInfo_certReq 322 | ||
| 1121 | #define OBJ_id_regInfo_certReq OBJ_id_regInfo,2L | ||
| 1122 | |||
| 1123 | #define SN_id_alg_des40 "id-alg-des40" | ||
| 1124 | #define NID_id_alg_des40 323 | ||
| 1125 | #define OBJ_id_alg_des40 OBJ_id_alg,1L | ||
| 1126 | |||
| 1127 | #define SN_id_alg_noSignature "id-alg-noSignature" | ||
| 1128 | #define NID_id_alg_noSignature 324 | ||
| 1129 | #define OBJ_id_alg_noSignature OBJ_id_alg,2L | ||
| 1130 | |||
| 1131 | #define SN_id_alg_dh_sig_hmac_sha1 "id-alg-dh-sig-hmac-sha1" | ||
| 1132 | #define NID_id_alg_dh_sig_hmac_sha1 325 | ||
| 1133 | #define OBJ_id_alg_dh_sig_hmac_sha1 OBJ_id_alg,3L | ||
| 1134 | |||
| 1135 | #define SN_id_alg_dh_pop "id-alg-dh-pop" | ||
| 1136 | #define NID_id_alg_dh_pop 326 | ||
| 1137 | #define OBJ_id_alg_dh_pop OBJ_id_alg,4L | ||
| 1138 | |||
| 1139 | #define SN_id_cmc_statusInfo "id-cmc-statusInfo" | ||
| 1140 | #define NID_id_cmc_statusInfo 327 | ||
| 1141 | #define OBJ_id_cmc_statusInfo OBJ_id_cmc,1L | ||
| 1142 | |||
| 1143 | #define SN_id_cmc_identification "id-cmc-identification" | ||
| 1144 | #define NID_id_cmc_identification 328 | ||
| 1145 | #define OBJ_id_cmc_identification OBJ_id_cmc,2L | ||
| 1146 | |||
| 1147 | #define SN_id_cmc_identityProof "id-cmc-identityProof" | ||
| 1148 | #define NID_id_cmc_identityProof 329 | ||
| 1149 | #define OBJ_id_cmc_identityProof OBJ_id_cmc,3L | ||
| 1150 | |||
| 1151 | #define SN_id_cmc_dataReturn "id-cmc-dataReturn" | ||
| 1152 | #define NID_id_cmc_dataReturn 330 | ||
| 1153 | #define OBJ_id_cmc_dataReturn OBJ_id_cmc,4L | ||
| 1154 | |||
| 1155 | #define SN_id_cmc_transactionId "id-cmc-transactionId" | ||
| 1156 | #define NID_id_cmc_transactionId 331 | ||
| 1157 | #define OBJ_id_cmc_transactionId OBJ_id_cmc,5L | ||
| 1158 | |||
| 1159 | #define SN_id_cmc_senderNonce "id-cmc-senderNonce" | ||
| 1160 | #define NID_id_cmc_senderNonce 332 | ||
| 1161 | #define OBJ_id_cmc_senderNonce OBJ_id_cmc,6L | ||
| 1162 | |||
| 1163 | #define SN_id_cmc_recipientNonce "id-cmc-recipientNonce" | ||
| 1164 | #define NID_id_cmc_recipientNonce 333 | ||
| 1165 | #define OBJ_id_cmc_recipientNonce OBJ_id_cmc,7L | ||
| 1166 | |||
| 1167 | #define SN_id_cmc_addExtensions "id-cmc-addExtensions" | ||
| 1168 | #define NID_id_cmc_addExtensions 334 | ||
| 1169 | #define OBJ_id_cmc_addExtensions OBJ_id_cmc,8L | ||
| 1170 | |||
| 1171 | #define SN_id_cmc_encryptedPOP "id-cmc-encryptedPOP" | ||
| 1172 | #define NID_id_cmc_encryptedPOP 335 | ||
| 1173 | #define OBJ_id_cmc_encryptedPOP OBJ_id_cmc,9L | ||
| 1174 | |||
| 1175 | #define SN_id_cmc_decryptedPOP "id-cmc-decryptedPOP" | ||
| 1176 | #define NID_id_cmc_decryptedPOP 336 | ||
| 1177 | #define OBJ_id_cmc_decryptedPOP OBJ_id_cmc,10L | ||
| 1178 | |||
| 1179 | #define SN_id_cmc_lraPOPWitness "id-cmc-lraPOPWitness" | ||
| 1180 | #define NID_id_cmc_lraPOPWitness 337 | ||
| 1181 | #define OBJ_id_cmc_lraPOPWitness OBJ_id_cmc,11L | ||
| 1182 | |||
| 1183 | #define SN_id_cmc_getCert "id-cmc-getCert" | ||
| 1184 | #define NID_id_cmc_getCert 338 | ||
| 1185 | #define OBJ_id_cmc_getCert OBJ_id_cmc,15L | ||
| 1186 | |||
| 1187 | #define SN_id_cmc_getCRL "id-cmc-getCRL" | ||
| 1188 | #define NID_id_cmc_getCRL 339 | ||
| 1189 | #define OBJ_id_cmc_getCRL OBJ_id_cmc,16L | ||
| 1190 | |||
| 1191 | #define SN_id_cmc_revokeRequest "id-cmc-revokeRequest" | ||
| 1192 | #define NID_id_cmc_revokeRequest 340 | ||
| 1193 | #define OBJ_id_cmc_revokeRequest OBJ_id_cmc,17L | ||
| 1194 | |||
| 1195 | #define SN_id_cmc_regInfo "id-cmc-regInfo" | ||
| 1196 | #define NID_id_cmc_regInfo 341 | ||
| 1197 | #define OBJ_id_cmc_regInfo OBJ_id_cmc,18L | ||
| 1198 | |||
| 1199 | #define SN_id_cmc_responseInfo "id-cmc-responseInfo" | ||
| 1200 | #define NID_id_cmc_responseInfo 342 | ||
| 1201 | #define OBJ_id_cmc_responseInfo OBJ_id_cmc,19L | ||
| 1202 | |||
| 1203 | #define SN_id_cmc_queryPending "id-cmc-queryPending" | ||
| 1204 | #define NID_id_cmc_queryPending 343 | ||
| 1205 | #define OBJ_id_cmc_queryPending OBJ_id_cmc,21L | ||
| 1206 | |||
| 1207 | #define SN_id_cmc_popLinkRandom "id-cmc-popLinkRandom" | ||
| 1208 | #define NID_id_cmc_popLinkRandom 344 | ||
| 1209 | #define OBJ_id_cmc_popLinkRandom OBJ_id_cmc,22L | ||
| 1210 | |||
| 1211 | #define SN_id_cmc_popLinkWitness "id-cmc-popLinkWitness" | ||
| 1212 | #define NID_id_cmc_popLinkWitness 345 | ||
| 1213 | #define OBJ_id_cmc_popLinkWitness OBJ_id_cmc,23L | ||
| 1214 | |||
| 1215 | #define SN_id_cmc_confirmCertAcceptance "id-cmc-confirmCertAcceptance" | ||
| 1216 | #define NID_id_cmc_confirmCertAcceptance 346 | ||
| 1217 | #define OBJ_id_cmc_confirmCertAcceptance OBJ_id_cmc,24L | ||
| 1218 | |||
| 1219 | #define SN_id_on_personalData "id-on-personalData" | ||
| 1220 | #define NID_id_on_personalData 347 | ||
| 1221 | #define OBJ_id_on_personalData OBJ_id_on,1L | ||
| 1222 | |||
| 1223 | #define SN_id_pda_dateOfBirth "id-pda-dateOfBirth" | ||
| 1224 | #define NID_id_pda_dateOfBirth 348 | ||
| 1225 | #define OBJ_id_pda_dateOfBirth OBJ_id_pda,1L | ||
| 1226 | |||
| 1227 | #define SN_id_pda_placeOfBirth "id-pda-placeOfBirth" | ||
| 1228 | #define NID_id_pda_placeOfBirth 349 | ||
| 1229 | #define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L | ||
| 1230 | |||
| 1231 | #define SN_id_pda_pseudonym "id-pda-pseudonym" | ||
| 1232 | #define NID_id_pda_pseudonym 350 | ||
| 1233 | #define OBJ_id_pda_pseudonym OBJ_id_pda,3L | ||
| 1234 | |||
| 1235 | #define SN_id_pda_gender "id-pda-gender" | ||
| 1236 | #define NID_id_pda_gender 351 | ||
| 1237 | #define OBJ_id_pda_gender OBJ_id_pda,4L | ||
| 1238 | |||
| 1239 | #define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship" | ||
| 1240 | #define NID_id_pda_countryOfCitizenship 352 | ||
| 1241 | #define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,5L | ||
| 1242 | |||
| 1243 | #define SN_id_pda_countryOfResidence "id-pda-countryOfResidence" | ||
| 1244 | #define NID_id_pda_countryOfResidence 353 | ||
| 1245 | #define OBJ_id_pda_countryOfResidence OBJ_id_pda,6L | ||
| 1246 | |||
| 1247 | #define SN_id_aca_authenticationInfo "id-aca-authenticationInfo" | ||
| 1248 | #define NID_id_aca_authenticationInfo 354 | ||
| 1249 | #define OBJ_id_aca_authenticationInfo OBJ_id_aca,1L | ||
| 1250 | |||
| 1251 | #define SN_id_aca_accessIdentity "id-aca-accessIdentity" | ||
| 1252 | #define NID_id_aca_accessIdentity 355 | ||
| 1253 | #define OBJ_id_aca_accessIdentity OBJ_id_aca,2L | ||
| 1254 | |||
| 1255 | #define SN_id_aca_chargingIdentity "id-aca-chargingIdentity" | ||
| 1256 | #define NID_id_aca_chargingIdentity 356 | ||
| 1257 | #define OBJ_id_aca_chargingIdentity OBJ_id_aca,3L | ||
| 1258 | |||
| 1259 | #define SN_id_aca_group "id-aca-group" | ||
| 1260 | #define NID_id_aca_group 357 | ||
| 1261 | #define OBJ_id_aca_group OBJ_id_aca,4L | ||
| 1262 | |||
| 1263 | #define SN_id_aca_role "id-aca-role" | ||
| 1264 | #define NID_id_aca_role 358 | ||
| 1265 | #define OBJ_id_aca_role OBJ_id_aca,5L | ||
| 1266 | |||
| 1267 | #define SN_id_qcs_pkixQCSyntax_v1 "id-qcs-pkixQCSyntax-v1" | ||
| 1268 | #define NID_id_qcs_pkixQCSyntax_v1 359 | ||
| 1269 | #define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L | ||
| 1270 | |||
| 1271 | #define SN_id_cct_crs "id-cct-crs" | ||
| 1272 | #define NID_id_cct_crs 360 | ||
| 1273 | #define OBJ_id_cct_crs OBJ_id_cct,1L | ||
| 1274 | |||
| 1275 | #define SN_id_cct_PKIData "id-cct-PKIData" | ||
| 1276 | #define NID_id_cct_PKIData 361 | ||
| 1277 | #define OBJ_id_cct_PKIData OBJ_id_cct,2L | ||
| 1278 | |||
| 1279 | #define SN_id_cct_PKIResponse "id-cct-PKIResponse" | ||
| 1280 | #define NID_id_cct_PKIResponse 362 | ||
| 1281 | #define OBJ_id_cct_PKIResponse OBJ_id_cct,3L | ||
| 1282 | |||
| 1283 | #define SN_ad_OCSP "OCSP" | ||
| 1284 | #define LN_ad_OCSP "OCSP" | ||
| 1285 | #define NID_ad_OCSP 178 | ||
| 1286 | #define OBJ_ad_OCSP OBJ_id_ad,1L | ||
| 1287 | |||
| 1288 | #define SN_ad_ca_issuers "caIssuers" | ||
| 1289 | #define LN_ad_ca_issuers "CA Issuers" | ||
| 1290 | #define NID_ad_ca_issuers 179 | ||
| 1291 | #define OBJ_ad_ca_issuers OBJ_id_ad,2L | ||
| 1292 | |||
| 1293 | #define SN_ad_timeStamping "ad_timestamping" | ||
| 1294 | #define LN_ad_timeStamping "AD Time Stamping" | ||
| 1295 | #define NID_ad_timeStamping 363 | ||
| 1296 | #define OBJ_ad_timeStamping OBJ_id_ad,3L | ||
| 1297 | |||
| 1298 | #define SN_ad_dvcs "AD_DVCS" | ||
| 1299 | #define LN_ad_dvcs "ad dvcs" | ||
| 1300 | #define NID_ad_dvcs 364 | ||
| 1301 | #define OBJ_ad_dvcs OBJ_id_ad,4L | ||
| 1302 | |||
| 1303 | #define OBJ_id_pkix_OCSP OBJ_ad_OCSP | ||
| 1304 | |||
| 1305 | #define SN_id_pkix_OCSP_basic "basicOCSPResponse" | ||
| 1306 | #define LN_id_pkix_OCSP_basic "Basic OCSP Response" | ||
| 1307 | #define NID_id_pkix_OCSP_basic 365 | ||
| 1308 | #define OBJ_id_pkix_OCSP_basic OBJ_id_pkix_OCSP,1L | ||
| 1309 | |||
| 1310 | #define SN_id_pkix_OCSP_Nonce "Nonce" | ||
| 1311 | #define LN_id_pkix_OCSP_Nonce "OCSP Nonce" | ||
| 1312 | #define NID_id_pkix_OCSP_Nonce 366 | ||
| 1313 | #define OBJ_id_pkix_OCSP_Nonce OBJ_id_pkix_OCSP,2L | ||
| 1314 | |||
| 1315 | #define SN_id_pkix_OCSP_CrlID "CrlID" | ||
| 1316 | #define LN_id_pkix_OCSP_CrlID "OCSP CRL ID" | ||
| 1317 | #define NID_id_pkix_OCSP_CrlID 367 | ||
| 1318 | #define OBJ_id_pkix_OCSP_CrlID OBJ_id_pkix_OCSP,3L | ||
| 1319 | |||
| 1320 | #define SN_id_pkix_OCSP_acceptableResponses "acceptableResponses" | ||
| 1321 | #define LN_id_pkix_OCSP_acceptableResponses "Acceptable OCSP Responses" | ||
| 1322 | #define NID_id_pkix_OCSP_acceptableResponses 368 | ||
| 1323 | #define OBJ_id_pkix_OCSP_acceptableResponses OBJ_id_pkix_OCSP,4L | ||
| 1324 | |||
| 1325 | #define SN_id_pkix_OCSP_noCheck "noCheck" | ||
| 1326 | #define NID_id_pkix_OCSP_noCheck 369 | ||
| 1327 | #define OBJ_id_pkix_OCSP_noCheck OBJ_id_pkix_OCSP,5L | ||
| 1328 | |||
| 1329 | #define SN_id_pkix_OCSP_archiveCutoff "archiveCutoff" | ||
| 1330 | #define LN_id_pkix_OCSP_archiveCutoff "OCSP Archive Cutoff" | ||
| 1331 | #define NID_id_pkix_OCSP_archiveCutoff 370 | ||
| 1332 | #define OBJ_id_pkix_OCSP_archiveCutoff OBJ_id_pkix_OCSP,6L | ||
| 1333 | |||
| 1334 | #define SN_id_pkix_OCSP_serviceLocator "serviceLocator" | ||
| 1335 | #define LN_id_pkix_OCSP_serviceLocator "OCSP Service Locator" | ||
| 1336 | #define NID_id_pkix_OCSP_serviceLocator 371 | ||
| 1337 | #define OBJ_id_pkix_OCSP_serviceLocator OBJ_id_pkix_OCSP,7L | ||
| 1338 | |||
| 1339 | #define SN_id_pkix_OCSP_extendedStatus "extendedStatus" | ||
| 1340 | #define LN_id_pkix_OCSP_extendedStatus "Extended OCSP Status" | ||
| 1341 | #define NID_id_pkix_OCSP_extendedStatus 372 | ||
| 1342 | #define OBJ_id_pkix_OCSP_extendedStatus OBJ_id_pkix_OCSP,8L | ||
| 1343 | |||
| 1344 | #define SN_id_pkix_OCSP_valid "valid" | ||
| 1345 | #define NID_id_pkix_OCSP_valid 373 | ||
| 1346 | #define OBJ_id_pkix_OCSP_valid OBJ_id_pkix_OCSP,9L | ||
| 1347 | |||
| 1348 | #define SN_id_pkix_OCSP_path "path" | ||
| 1349 | #define NID_id_pkix_OCSP_path 374 | ||
| 1350 | #define OBJ_id_pkix_OCSP_path OBJ_id_pkix_OCSP,10L | ||
| 1351 | |||
| 1352 | #define SN_id_pkix_OCSP_trustRoot "trustRoot" | ||
| 1353 | #define LN_id_pkix_OCSP_trustRoot "Trust Root" | ||
| 1354 | #define NID_id_pkix_OCSP_trustRoot 375 | ||
| 1355 | #define OBJ_id_pkix_OCSP_trustRoot OBJ_id_pkix_OCSP,11L | ||
| 1356 | |||
| 1357 | #define SN_algorithm "algorithm" | ||
| 1358 | #define LN_algorithm "algorithm" | ||
| 1359 | #define NID_algorithm 376 | ||
| 1360 | #define OBJ_algorithm 1L,3L,14L,3L,2L | ||
| 1361 | |||
| 1362 | #define SN_md5WithRSA "RSA-NP-MD5" | ||
| 1363 | #define LN_md5WithRSA "md5WithRSA" | ||
| 1364 | #define NID_md5WithRSA 104 | ||
| 1365 | #define OBJ_md5WithRSA OBJ_algorithm,3L | ||
| 1366 | |||
| 1367 | #define SN_des_ecb "DES-ECB" | ||
| 1368 | #define LN_des_ecb "des-ecb" | ||
| 1369 | #define NID_des_ecb 29 | ||
| 1370 | #define OBJ_des_ecb OBJ_algorithm,6L | ||
| 1371 | |||
| 1372 | #define SN_des_cbc "DES-CBC" | ||
| 1373 | #define LN_des_cbc "des-cbc" | ||
| 1374 | #define NID_des_cbc 31 | ||
| 1375 | #define OBJ_des_cbc OBJ_algorithm,7L | ||
| 1376 | |||
| 1377 | #define SN_des_ofb64 "DES-OFB" | ||
| 1378 | #define LN_des_ofb64 "des-ofb" | ||
| 1379 | #define NID_des_ofb64 45 | ||
| 1380 | #define OBJ_des_ofb64 OBJ_algorithm,8L | ||
| 1381 | |||
| 1382 | #define SN_des_cfb64 "DES-CFB" | ||
| 1383 | #define LN_des_cfb64 "des-cfb" | ||
| 1384 | #define NID_des_cfb64 30 | ||
| 1385 | #define OBJ_des_cfb64 OBJ_algorithm,9L | ||
| 1386 | |||
| 1387 | #define SN_rsaSignature "rsaSignature" | ||
| 1388 | #define NID_rsaSignature 377 | ||
| 1389 | #define OBJ_rsaSignature OBJ_algorithm,11L | ||
| 1390 | |||
| 1391 | #define SN_dsa_2 "DSA-old" | ||
| 1392 | #define LN_dsa_2 "dsaEncryption-old" | ||
| 1393 | #define NID_dsa_2 67 | ||
| 1394 | #define OBJ_dsa_2 OBJ_algorithm,12L | ||
| 1395 | |||
| 1396 | #define SN_dsaWithSHA "DSA-SHA" | ||
| 1397 | #define LN_dsaWithSHA "dsaWithSHA" | ||
| 1398 | #define NID_dsaWithSHA 66 | ||
| 1399 | #define OBJ_dsaWithSHA OBJ_algorithm,13L | ||
| 1400 | |||
| 1401 | #define SN_shaWithRSAEncryption "RSA-SHA" | ||
| 1402 | #define LN_shaWithRSAEncryption "shaWithRSAEncryption" | ||
| 1403 | #define NID_shaWithRSAEncryption 42 | ||
| 1404 | #define OBJ_shaWithRSAEncryption OBJ_algorithm,15L | ||
| 1405 | |||
| 1406 | #define SN_des_ede "DES-EDE" | ||
| 1407 | #define LN_des_ede "des-ede" | ||
| 1408 | #define NID_des_ede 32 | ||
| 1409 | #define OBJ_des_ede OBJ_algorithm,17L | ||
| 1410 | |||
| 1411 | #define SN_des_ede3 "DES-EDE3" | ||
| 1412 | #define LN_des_ede3 "des-ede3" | ||
| 1413 | #define NID_des_ede3 33 | ||
| 1414 | |||
| 1415 | #define SN_des_ede_cbc "DES-EDE-CBC" | ||
| 1416 | #define LN_des_ede_cbc "des-ede-cbc" | ||
| 1417 | #define NID_des_ede_cbc 43 | ||
| 1418 | |||
| 1419 | #define SN_des_ede_cfb64 "DES-EDE-CFB" | ||
| 1420 | #define LN_des_ede_cfb64 "des-ede-cfb" | ||
| 1421 | #define NID_des_ede_cfb64 60 | ||
| 1422 | |||
| 1423 | #define SN_des_ede3_cfb64 "DES-EDE3-CFB" | ||
| 1424 | #define LN_des_ede3_cfb64 "des-ede3-cfb" | ||
| 1425 | #define NID_des_ede3_cfb64 61 | ||
| 1426 | |||
| 1427 | #define SN_des_ede_ofb64 "DES-EDE-OFB" | ||
| 1428 | #define LN_des_ede_ofb64 "des-ede-ofb" | ||
| 1429 | #define NID_des_ede_ofb64 62 | ||
| 1430 | |||
| 1431 | #define SN_des_ede3_ofb64 "DES-EDE3-OFB" | ||
| 1432 | #define LN_des_ede3_ofb64 "des-ede3-ofb" | ||
| 1433 | #define NID_des_ede3_ofb64 63 | ||
| 1434 | |||
| 1435 | #define SN_desx_cbc "DESX-CBC" | ||
| 1436 | #define LN_desx_cbc "desx-cbc" | ||
| 1437 | #define NID_desx_cbc 80 | ||
| 1438 | |||
| 1439 | #define SN_sha "SHA" | ||
| 1440 | #define LN_sha "sha" | ||
| 1441 | #define NID_sha 41 | ||
| 1442 | #define OBJ_sha OBJ_algorithm,18L | ||
| 1443 | |||
| 1444 | #define SN_sha1 "SHA1" | ||
| 1445 | #define LN_sha1 "sha1" | ||
| 1446 | #define NID_sha1 64 | ||
| 1447 | #define OBJ_sha1 OBJ_algorithm,26L | ||
| 1448 | |||
| 1449 | #define SN_dsaWithSHA1_2 "DSA-SHA1-old" | ||
| 1450 | #define LN_dsaWithSHA1_2 "dsaWithSHA1-old" | ||
| 1451 | #define NID_dsaWithSHA1_2 70 | ||
| 1452 | #define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L | ||
| 1453 | |||
| 1454 | #define SN_sha1WithRSA "RSA-SHA1-2" | ||
| 1455 | #define LN_sha1WithRSA "sha1WithRSA" | ||
| 1456 | #define NID_sha1WithRSA 115 | ||
| 1457 | #define OBJ_sha1WithRSA OBJ_algorithm,29L | ||
| 1458 | |||
| 1459 | #define SN_ripemd160 "RIPEMD160" | ||
| 1460 | #define LN_ripemd160 "ripemd160" | ||
| 1461 | #define NID_ripemd160 117 | ||
| 1462 | #define OBJ_ripemd160 1L,3L,36L,3L,2L,1L | ||
| 1463 | |||
| 1464 | #define SN_ripemd160WithRSA "RSA-RIPEMD160" | ||
| 1465 | #define LN_ripemd160WithRSA "ripemd160WithRSA" | ||
| 1466 | #define NID_ripemd160WithRSA 119 | ||
| 1467 | #define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L | ||
| 1468 | |||
| 1469 | #define SN_sxnet "SXNetID" | ||
| 1470 | #define LN_sxnet "Strong Extranet ID" | ||
| 1471 | #define NID_sxnet 143 | ||
| 1472 | #define OBJ_sxnet 1L,3L,101L,1L,4L,1L | ||
| 1473 | |||
| 1474 | #define SN_X500 "X500" | ||
| 1475 | #define LN_X500 "directory services (X.500)" | ||
| 1476 | #define NID_X500 11 | ||
| 1477 | #define OBJ_X500 2L,5L | ||
| 1478 | |||
| 1479 | #define SN_X509 "X509" | ||
| 1480 | #define NID_X509 12 | ||
| 1481 | #define OBJ_X509 OBJ_X500,4L | ||
| 1482 | |||
| 1483 | #define SN_commonName "CN" | ||
| 1484 | #define LN_commonName "commonName" | ||
| 1485 | #define NID_commonName 13 | ||
| 1486 | #define OBJ_commonName OBJ_X509,3L | ||
| 1487 | |||
| 1488 | #define SN_surname "S" | ||
| 1489 | #define LN_surname "surname" | ||
| 1490 | #define NID_surname 100 | ||
| 1491 | #define OBJ_surname OBJ_X509,4L | ||
| 1492 | |||
| 1493 | #define SN_serialNumber "SN" | ||
| 1494 | #define LN_serialNumber "serialNumber" | ||
| 1495 | #define NID_serialNumber 105 | ||
| 1496 | #define OBJ_serialNumber OBJ_X509,5L | ||
| 1497 | |||
| 1498 | #define SN_countryName "C" | ||
| 1499 | #define LN_countryName "countryName" | ||
| 1500 | #define NID_countryName 14 | ||
| 1501 | #define OBJ_countryName OBJ_X509,6L | ||
| 1502 | |||
| 1503 | #define SN_localityName "L" | ||
| 1504 | #define LN_localityName "localityName" | ||
| 1505 | #define NID_localityName 15 | ||
| 1506 | #define OBJ_localityName OBJ_X509,7L | ||
| 1507 | |||
| 1508 | #define SN_stateOrProvinceName "ST" | ||
| 1509 | #define LN_stateOrProvinceName "stateOrProvinceName" | ||
| 1510 | #define NID_stateOrProvinceName 16 | ||
| 1511 | #define OBJ_stateOrProvinceName OBJ_X509,8L | ||
| 1512 | |||
| 1513 | #define SN_organizationName "O" | ||
| 1514 | #define LN_organizationName "organizationName" | ||
| 1515 | #define NID_organizationName 17 | ||
| 1516 | #define OBJ_organizationName OBJ_X509,10L | ||
| 1517 | |||
| 1518 | #define SN_organizationalUnitName "OU" | ||
| 1519 | #define LN_organizationalUnitName "organizationalUnitName" | ||
| 1520 | #define NID_organizationalUnitName 18 | ||
| 1521 | #define OBJ_organizationalUnitName OBJ_X509,11L | ||
| 1522 | |||
| 1523 | #define SN_title "T" | ||
| 1524 | #define LN_title "title" | ||
| 1525 | #define NID_title 106 | ||
| 1526 | #define OBJ_title OBJ_X509,12L | ||
| 1527 | |||
| 1528 | #define SN_description "D" | ||
| 1529 | #define LN_description "description" | ||
| 1530 | #define NID_description 107 | ||
| 1531 | #define OBJ_description OBJ_X509,13L | ||
| 1532 | |||
| 1533 | #define SN_name "name" | ||
| 1534 | #define LN_name "name" | ||
| 1535 | #define NID_name 173 | ||
| 1536 | #define OBJ_name OBJ_X509,41L | ||
| 1537 | |||
| 1538 | #define SN_givenName "G" | ||
| 1539 | #define LN_givenName "givenName" | ||
| 1540 | #define NID_givenName 99 | ||
| 1541 | #define OBJ_givenName OBJ_X509,42L | ||
| 1542 | |||
| 1543 | #define SN_initials "I" | ||
| 1544 | #define LN_initials "initials" | ||
| 1545 | #define NID_initials 101 | ||
| 1546 | #define OBJ_initials OBJ_X509,43L | ||
| 1547 | |||
| 1548 | #define SN_uniqueIdentifier "UID" | ||
| 1549 | #define LN_uniqueIdentifier "uniqueIdentifier" | ||
| 1550 | #define NID_uniqueIdentifier 102 | ||
| 1551 | #define OBJ_uniqueIdentifier OBJ_X509,45L | ||
| 1552 | |||
| 1553 | #define SN_dnQualifier "dnQualifier" | ||
| 1554 | #define LN_dnQualifier "dnQualifier" | ||
| 1555 | #define NID_dnQualifier 174 | ||
| 1556 | #define OBJ_dnQualifier OBJ_X509,46L | ||
| 1557 | |||
| 1558 | #define SN_X500algorithms "X500algorithms" | ||
| 1559 | #define LN_X500algorithms "directory services - algorithms" | ||
| 1560 | #define NID_X500algorithms 378 | ||
| 1561 | #define OBJ_X500algorithms OBJ_X500,8L | ||
| 1562 | |||
| 1563 | #define SN_rsa "RSA" | ||
| 1564 | #define LN_rsa "rsa" | ||
| 1565 | #define NID_rsa 19 | ||
| 1566 | #define OBJ_rsa OBJ_X500algorithms,1L,1L | ||
| 1567 | |||
| 1568 | #define SN_mdc2WithRSA "RSA-MDC2" | ||
| 1569 | #define LN_mdc2WithRSA "mdc2WithRSA" | ||
| 1570 | #define NID_mdc2WithRSA 96 | ||
| 1571 | #define OBJ_mdc2WithRSA OBJ_X500algorithms,3L,100L | ||
| 1572 | |||
| 1573 | #define SN_mdc2 "MDC2" | ||
| 1574 | #define LN_mdc2 "mdc2" | ||
| 1575 | #define NID_mdc2 95 | ||
| 1576 | #define OBJ_mdc2 OBJ_X500algorithms,3L,101L | ||
| 1577 | |||
| 1578 | #define SN_id_ce "id-ce" | ||
| 1579 | #define NID_id_ce 81 | ||
| 1580 | #define OBJ_id_ce OBJ_X500,29L | ||
| 1581 | |||
| 1582 | #define SN_subject_key_identifier "subjectKeyIdentifier" | ||
| 1583 | #define LN_subject_key_identifier "X509v3 Subject Key Identifier" | ||
| 1584 | #define NID_subject_key_identifier 82 | ||
| 1585 | #define OBJ_subject_key_identifier OBJ_id_ce,14L | ||
| 1586 | |||
| 1587 | #define SN_key_usage "keyUsage" | ||
| 1588 | #define LN_key_usage "X509v3 Key Usage" | ||
| 1589 | #define NID_key_usage 83 | ||
| 1590 | #define OBJ_key_usage OBJ_id_ce,15L | ||
| 1591 | |||
| 1592 | #define SN_private_key_usage_period "privateKeyUsagePeriod" | ||
| 1593 | #define LN_private_key_usage_period "X509v3 Private Key Usage Period" | ||
| 1594 | #define NID_private_key_usage_period 84 | ||
| 1595 | #define OBJ_private_key_usage_period OBJ_id_ce,16L | ||
| 1596 | |||
| 1597 | #define SN_subject_alt_name "subjectAltName" | ||
| 1598 | #define LN_subject_alt_name "X509v3 Subject Alternative Name" | ||
| 1599 | #define NID_subject_alt_name 85 | ||
| 1600 | #define OBJ_subject_alt_name OBJ_id_ce,17L | ||
| 1601 | |||
| 1602 | #define SN_issuer_alt_name "issuerAltName" | ||
| 1603 | #define LN_issuer_alt_name "X509v3 Issuer Alternative Name" | ||
| 1604 | #define NID_issuer_alt_name 86 | ||
| 1605 | #define OBJ_issuer_alt_name OBJ_id_ce,18L | ||
| 1606 | |||
| 1607 | #define SN_basic_constraints "basicConstraints" | ||
| 1608 | #define LN_basic_constraints "X509v3 Basic Constraints" | ||
| 1609 | #define NID_basic_constraints 87 | ||
| 1610 | #define OBJ_basic_constraints OBJ_id_ce,19L | ||
| 1611 | |||
| 1612 | #define SN_crl_number "crlNumber" | ||
| 1613 | #define LN_crl_number "X509v3 CRL Number" | ||
| 1614 | #define NID_crl_number 88 | ||
| 1615 | #define OBJ_crl_number OBJ_id_ce,20L | ||
| 1616 | |||
| 1617 | #define SN_crl_reason "CRLReason" | ||
| 1618 | #define LN_crl_reason "X509v3 CRL Reason Code" | ||
| 1619 | #define NID_crl_reason 141 | ||
| 1620 | #define OBJ_crl_reason OBJ_id_ce,21L | ||
| 1621 | |||
| 1622 | #define SN_invalidity_date "invalidityDate" | ||
| 1623 | #define LN_invalidity_date "Invalidity Date" | ||
| 1624 | #define NID_invalidity_date 142 | ||
| 1625 | #define OBJ_invalidity_date OBJ_id_ce,24L | ||
| 1626 | |||
| 1627 | #define SN_delta_crl "deltaCRL" | ||
| 1628 | #define LN_delta_crl "X509v3 Delta CRL Indicator" | ||
| 1629 | #define NID_delta_crl 140 | ||
| 1630 | #define OBJ_delta_crl OBJ_id_ce,27L | ||
| 1631 | |||
| 1632 | #define SN_crl_distribution_points "crlDistributionPoints" | ||
| 1633 | #define LN_crl_distribution_points "X509v3 CRL Distribution Points" | ||
| 1634 | #define NID_crl_distribution_points 103 | ||
| 1635 | #define OBJ_crl_distribution_points OBJ_id_ce,31L | ||
| 1636 | |||
| 1637 | #define SN_certificate_policies "certificatePolicies" | ||
| 1638 | #define LN_certificate_policies "X509v3 Certificate Policies" | ||
| 1639 | #define NID_certificate_policies 89 | ||
| 1640 | #define OBJ_certificate_policies OBJ_id_ce,32L | ||
| 1641 | |||
| 1642 | #define SN_authority_key_identifier "authorityKeyIdentifier" | ||
| 1643 | #define LN_authority_key_identifier "X509v3 Authority Key Identifier" | ||
| 1644 | #define NID_authority_key_identifier 90 | ||
| 1645 | #define OBJ_authority_key_identifier OBJ_id_ce,35L | ||
| 1646 | |||
| 1647 | #define SN_ext_key_usage "extendedKeyUsage" | ||
| 1648 | #define LN_ext_key_usage "X509v3 Extended Key Usage" | ||
| 1649 | #define NID_ext_key_usage 126 | ||
| 1650 | #define OBJ_ext_key_usage OBJ_id_ce,37L | ||
| 1651 | |||
| 1652 | #define SN_netscape "Netscape" | ||
| 1653 | #define LN_netscape "Netscape Communications Corp." | ||
| 1654 | #define NID_netscape 57 | ||
| 1655 | #define OBJ_netscape 2L,16L,840L,1L,113730L | ||
| 1656 | |||
| 1657 | #define SN_netscape_cert_extension "nsCertExt" | ||
| 1658 | #define LN_netscape_cert_extension "Netscape Certificate Extension" | ||
| 1659 | #define NID_netscape_cert_extension 58 | ||
| 1660 | #define OBJ_netscape_cert_extension OBJ_netscape,1L | ||
| 1661 | |||
| 1662 | #define SN_netscape_data_type "nsDataType" | ||
| 1663 | #define LN_netscape_data_type "Netscape Data Type" | ||
| 1664 | #define NID_netscape_data_type 59 | ||
| 1665 | #define OBJ_netscape_data_type OBJ_netscape,2L | ||
| 1666 | |||
| 1667 | #define SN_netscape_cert_type "nsCertType" | ||
| 1668 | #define LN_netscape_cert_type "Netscape Cert Type" | ||
| 1669 | #define NID_netscape_cert_type 71 | ||
| 1670 | #define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L | ||
| 1671 | |||
| 1672 | #define SN_netscape_base_url "nsBaseUrl" | ||
| 1673 | #define LN_netscape_base_url "Netscape Base Url" | ||
| 1674 | #define NID_netscape_base_url 72 | ||
| 1675 | #define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L | ||
| 1676 | |||
| 1677 | #define SN_netscape_revocation_url "nsRevocationUrl" | ||
| 1678 | #define LN_netscape_revocation_url "Netscape Revocation Url" | ||
| 1679 | #define NID_netscape_revocation_url 73 | ||
| 1680 | #define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L | ||
| 1681 | |||
| 1682 | #define SN_netscape_ca_revocation_url "nsCaRevocationUrl" | ||
| 1683 | #define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" | ||
| 1684 | #define NID_netscape_ca_revocation_url 74 | ||
| 1685 | #define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L | ||
| 1686 | |||
| 1687 | #define SN_netscape_renewal_url "nsRenewalUrl" | ||
| 1688 | #define LN_netscape_renewal_url "Netscape Renewal Url" | ||
| 1689 | #define NID_netscape_renewal_url 75 | ||
| 1690 | #define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L | ||
| 1691 | |||
| 1692 | #define SN_netscape_ca_policy_url "nsCaPolicyUrl" | ||
| 1693 | #define LN_netscape_ca_policy_url "Netscape CA Policy Url" | ||
| 1694 | #define NID_netscape_ca_policy_url 76 | ||
| 1695 | #define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L | ||
| 1696 | |||
| 1697 | #define SN_netscape_ssl_server_name "nsSslServerName" | ||
| 1698 | #define LN_netscape_ssl_server_name "Netscape SSL Server Name" | ||
| 1699 | #define NID_netscape_ssl_server_name 77 | ||
| 1700 | #define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L | ||
| 1701 | |||
| 1702 | #define SN_netscape_comment "nsComment" | ||
| 1703 | #define LN_netscape_comment "Netscape Comment" | ||
| 1704 | #define NID_netscape_comment 78 | ||
| 1705 | #define OBJ_netscape_comment OBJ_netscape_cert_extension,13L | ||
| 1706 | |||
| 1707 | #define SN_netscape_cert_sequence "nsCertSequence" | ||
| 1708 | #define LN_netscape_cert_sequence "Netscape Certificate Sequence" | ||
| 1709 | #define NID_netscape_cert_sequence 79 | ||
| 1710 | #define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L | ||
| 1711 | |||
| 1712 | #define SN_ns_sgc "nsSGC" | ||
| 1713 | #define LN_ns_sgc "Netscape Server Gated Crypto" | ||
| 1714 | #define NID_ns_sgc 139 | ||
| 1715 | #define OBJ_ns_sgc OBJ_netscape,4L,1L | ||
| 1716 | |||
| 1717 | #define SN_org "ORG" | ||
| 1718 | #define LN_org "org" | ||
| 1719 | #define NID_org 379 | ||
| 1720 | #define OBJ_org OBJ_iso,3L | ||
| 1721 | |||
| 1722 | #define SN_dod "DOD" | ||
| 1723 | #define LN_dod "dod" | ||
| 1724 | #define NID_dod 380 | ||
| 1725 | #define OBJ_dod OBJ_org,6L | ||
| 1726 | |||
| 1727 | #define SN_iana "IANA" | ||
| 1728 | #define LN_iana "iana" | ||
| 1729 | #define NID_iana 381 | ||
| 1730 | #define OBJ_iana OBJ_dod,1L | ||
| 1731 | |||
| 1732 | #define OBJ_internet OBJ_iana | ||
| 1733 | |||
| 1734 | #define SN_Directory "directory" | ||
| 1735 | #define LN_Directory "Directory" | ||
| 1736 | #define NID_Directory 382 | ||
| 1737 | #define OBJ_Directory OBJ_internet,1L | ||
| 1738 | |||
| 1739 | #define SN_Management "mgmt" | ||
| 1740 | #define LN_Management "Management" | ||
| 1741 | #define NID_Management 383 | ||
| 1742 | #define OBJ_Management OBJ_internet,2L | ||
| 1743 | |||
| 1744 | #define SN_Experimental "experimental" | ||
| 1745 | #define LN_Experimental "Experimental" | ||
| 1746 | #define NID_Experimental 384 | ||
| 1747 | #define OBJ_Experimental OBJ_internet,3L | ||
| 1748 | |||
| 1749 | #define SN_Private "private" | ||
| 1750 | #define LN_Private "Private" | ||
| 1751 | #define NID_Private 385 | ||
| 1752 | #define OBJ_Private OBJ_internet,4L | ||
| 1753 | |||
| 1754 | #define SN_Security "security" | ||
| 1755 | #define LN_Security "Security" | ||
| 1756 | #define NID_Security 386 | ||
| 1757 | #define OBJ_Security OBJ_internet,5L | ||
| 1758 | |||
| 1759 | #define SN_SNMPv2 "snmpv2" | ||
| 1760 | #define LN_SNMPv2 "SNMPv2" | ||
| 1761 | #define NID_SNMPv2 387 | ||
| 1762 | #define OBJ_SNMPv2 OBJ_internet,6L | ||
| 1763 | |||
| 1764 | #define SN_Mail "mail" | ||
| 1765 | #define LN_Mail "Mail" | ||
| 1766 | #define NID_Mail 388 | ||
| 1767 | #define OBJ_Mail OBJ_internet,7L | ||
| 1768 | |||
| 1769 | #define SN_Enterprises "enterprises" | ||
| 1770 | #define LN_Enterprises "Enterprises" | ||
| 1771 | #define NID_Enterprises 389 | ||
| 1772 | #define OBJ_Enterprises OBJ_private,1L | ||
| 1773 | |||
| 1774 | #define SN_dcObject "dcobject" | ||
| 1775 | #define LN_dcObject "dcObject" | ||
| 1776 | #define NID_dcObject 390 | ||
| 1777 | #define OBJ_dcObject OBJ_enterprises,1466L,344L | ||
| 1778 | |||
| 1779 | #define SN_domainComponent "DC" | ||
| 1780 | #define LN_domainComponent "domainComponent" | ||
| 1781 | #define NID_domainComponent 391 | ||
| 1782 | #define OBJ_domainComponent 0L,9L,2342L,19200300L,100L,1L,25L | ||
| 1783 | |||
| 1784 | #define SN_Domain "domain" | ||
| 1785 | #define LN_Domain "Domain" | ||
| 1786 | #define NID_Domain 392 | ||
| 1787 | #define OBJ_Domain 0L,9L,2342L,19200300L,100L,4L,13L | ||
| 1788 | |||
| 1789 | #define SN_rle_compression "RLE" | ||
| 1790 | #define LN_rle_compression "run length compression" | ||
| 1791 | #define NID_rle_compression 124 | ||
| 1792 | #define OBJ_rle_compression 1L,1L,1L,1L,666L,1L | ||
| 1793 | |||
| 1794 | #define SN_zlib_compression "ZLIB" | ||
| 1795 | #define LN_zlib_compression "zlib compression" | ||
| 1796 | #define NID_zlib_compression 125 | ||
| 1797 | #define OBJ_zlib_compression 1L,1L,1L,1L,666L,2L | ||
| 1798 | |||
diff --git a/src/lib/libssl/src/crypto/objects/obj_mac.num b/src/lib/libssl/src/crypto/objects/obj_mac.num new file mode 100644 index 0000000000..d73a51370f --- /dev/null +++ b/src/lib/libssl/src/crypto/objects/obj_mac.num | |||
| @@ -0,0 +1,392 @@ | |||
| 1 | undef 0 | ||
| 2 | rsadsi 1 | ||
| 3 | pkcs 2 | ||
| 4 | md2 3 | ||
| 5 | md5 4 | ||
| 6 | rc4 5 | ||
| 7 | rsaEncryption 6 | ||
| 8 | md2WithRSAEncryption 7 | ||
| 9 | md5WithRSAEncryption 8 | ||
| 10 | pbeWithMD2AndDES_CBC 9 | ||
| 11 | pbeWithMD5AndDES_CBC 10 | ||
| 12 | X500 11 | ||
| 13 | X509 12 | ||
| 14 | commonName 13 | ||
| 15 | countryName 14 | ||
| 16 | localityName 15 | ||
| 17 | stateOrProvinceName 16 | ||
| 18 | organizationName 17 | ||
| 19 | organizationalUnitName 18 | ||
| 20 | rsa 19 | ||
| 21 | pkcs7 20 | ||
| 22 | pkcs7_data 21 | ||
| 23 | pkcs7_signed 22 | ||
| 24 | pkcs7_enveloped 23 | ||
| 25 | pkcs7_signedAndEnveloped 24 | ||
| 26 | pkcs7_digest 25 | ||
| 27 | pkcs7_encrypted 26 | ||
| 28 | pkcs3 27 | ||
| 29 | dhKeyAgreement 28 | ||
| 30 | des_ecb 29 | ||
| 31 | des_cfb64 30 | ||
| 32 | des_cbc 31 | ||
| 33 | des_ede 32 | ||
| 34 | des_ede3 33 | ||
| 35 | idea_cbc 34 | ||
| 36 | idea_cfb64 35 | ||
| 37 | idea_ecb 36 | ||
| 38 | rc2_cbc 37 | ||
| 39 | rc2_ecb 38 | ||
| 40 | rc2_cfb64 39 | ||
| 41 | rc2_ofb64 40 | ||
| 42 | sha 41 | ||
| 43 | shaWithRSAEncryption 42 | ||
| 44 | des_ede_cbc 43 | ||
| 45 | des_ede3_cbc 44 | ||
| 46 | des_ofb64 45 | ||
| 47 | idea_ofb64 46 | ||
| 48 | pkcs9 47 | ||
| 49 | pkcs9_emailAddress 48 | ||
| 50 | pkcs9_unstructuredName 49 | ||
| 51 | pkcs9_contentType 50 | ||
| 52 | pkcs9_messageDigest 51 | ||
| 53 | pkcs9_signingTime 52 | ||
| 54 | pkcs9_countersignature 53 | ||
| 55 | pkcs9_challengePassword 54 | ||
| 56 | pkcs9_unstructuredAddress 55 | ||
| 57 | pkcs9_extCertAttributes 56 | ||
| 58 | netscape 57 | ||
| 59 | netscape_cert_extension 58 | ||
| 60 | netscape_data_type 59 | ||
| 61 | des_ede_cfb64 60 | ||
| 62 | des_ede3_cfb64 61 | ||
| 63 | des_ede_ofb64 62 | ||
| 64 | des_ede3_ofb64 63 | ||
| 65 | sha1 64 | ||
| 66 | sha1WithRSAEncryption 65 | ||
| 67 | dsaWithSHA 66 | ||
| 68 | dsa_2 67 | ||
| 69 | pbeWithSHA1AndRC2_CBC 68 | ||
| 70 | id_pbkdf2 69 | ||
| 71 | dsaWithSHA1_2 70 | ||
| 72 | netscape_cert_type 71 | ||
| 73 | netscape_base_url 72 | ||
| 74 | netscape_revocation_url 73 | ||
| 75 | netscape_ca_revocation_url 74 | ||
| 76 | netscape_renewal_url 75 | ||
| 77 | netscape_ca_policy_url 76 | ||
| 78 | netscape_ssl_server_name 77 | ||
| 79 | netscape_comment 78 | ||
| 80 | netscape_cert_sequence 79 | ||
| 81 | desx_cbc 80 | ||
| 82 | id_ce 81 | ||
| 83 | subject_key_identifier 82 | ||
| 84 | key_usage 83 | ||
| 85 | private_key_usage_period 84 | ||
| 86 | subject_alt_name 85 | ||
| 87 | issuer_alt_name 86 | ||
| 88 | basic_constraints 87 | ||
| 89 | crl_number 88 | ||
| 90 | certificate_policies 89 | ||
| 91 | authority_key_identifier 90 | ||
| 92 | bf_cbc 91 | ||
| 93 | bf_ecb 92 | ||
| 94 | bf_cfb64 93 | ||
| 95 | bf_ofb64 94 | ||
| 96 | mdc2 95 | ||
| 97 | mdc2WithRSA 96 | ||
| 98 | rc4_40 97 | ||
| 99 | rc2_40_cbc 98 | ||
| 100 | givenName 99 | ||
| 101 | surname 100 | ||
| 102 | initials 101 | ||
| 103 | uniqueIdentifier 102 | ||
| 104 | crl_distribution_points 103 | ||
| 105 | md5WithRSA 104 | ||
| 106 | serialNumber 105 | ||
| 107 | title 106 | ||
| 108 | description 107 | ||
| 109 | cast5_cbc 108 | ||
| 110 | cast5_ecb 109 | ||
| 111 | cast5_cfb64 110 | ||
| 112 | cast5_ofb64 111 | ||
| 113 | pbeWithMD5AndCast5_CBC 112 | ||
| 114 | dsaWithSHA1 113 | ||
| 115 | md5_sha1 114 | ||
| 116 | sha1WithRSA 115 | ||
| 117 | dsa 116 | ||
| 118 | ripemd160 117 | ||
| 119 | ripemd160WithRSA 119 | ||
| 120 | rc5_cbc 120 | ||
| 121 | rc5_ecb 121 | ||
| 122 | rc5_cfb64 122 | ||
| 123 | rc5_ofb64 123 | ||
| 124 | rle_compression 124 | ||
| 125 | zlib_compression 125 | ||
| 126 | ext_key_usage 126 | ||
| 127 | id_pkix 127 | ||
| 128 | id_kp 128 | ||
| 129 | server_auth 129 | ||
| 130 | client_auth 130 | ||
| 131 | code_sign 131 | ||
| 132 | email_protect 132 | ||
| 133 | time_stamp 133 | ||
| 134 | ms_code_ind 134 | ||
| 135 | ms_code_com 135 | ||
| 136 | ms_ctl_sign 136 | ||
| 137 | ms_sgc 137 | ||
| 138 | ms_efs 138 | ||
| 139 | ns_sgc 139 | ||
| 140 | delta_crl 140 | ||
| 141 | crl_reason 141 | ||
| 142 | invalidity_date 142 | ||
| 143 | sxnet 143 | ||
| 144 | pbe_WithSHA1And128BitRC4 144 | ||
| 145 | pbe_WithSHA1And40BitRC4 145 | ||
| 146 | pbe_WithSHA1And3_Key_TripleDES_CBC 146 | ||
| 147 | pbe_WithSHA1And2_Key_TripleDES_CBC 147 | ||
| 148 | pbe_WithSHA1And128BitRC2_CBC 148 | ||
| 149 | pbe_WithSHA1And40BitRC2_CBC 149 | ||
| 150 | keyBag 150 | ||
| 151 | pkcs8ShroudedKeyBag 151 | ||
| 152 | certBag 152 | ||
| 153 | crlBag 153 | ||
| 154 | secretBag 154 | ||
| 155 | safeContentsBag 155 | ||
| 156 | friendlyName 156 | ||
| 157 | localKeyID 157 | ||
| 158 | x509Certificate 158 | ||
| 159 | sdsiCertificate 159 | ||
| 160 | x509Crl 160 | ||
| 161 | pbes2 161 | ||
| 162 | pbmac1 162 | ||
| 163 | hmacWithSHA1 163 | ||
| 164 | id_qt_cps 164 | ||
| 165 | id_qt_unotice 165 | ||
| 166 | rc2_64_cbc 166 | ||
| 167 | SMIMECapabilities 167 | ||
| 168 | pbeWithMD2AndRC2_CBC 168 | ||
| 169 | pbeWithMD5AndRC2_CBC 169 | ||
| 170 | pbeWithSHA1AndDES_CBC 170 | ||
| 171 | ms_ext_req 171 | ||
| 172 | ext_req 172 | ||
| 173 | name 173 | ||
| 174 | dnQualifier 174 | ||
| 175 | id_pe 175 | ||
| 176 | id_ad 176 | ||
| 177 | info_access 177 | ||
| 178 | ad_OCSP 178 | ||
| 179 | ad_ca_issuers 179 | ||
| 180 | OCSP_sign 180 | ||
| 181 | iso 181 | ||
| 182 | member_body 182 | ||
| 183 | ISO_US 183 | ||
| 184 | X9_57 184 | ||
| 185 | X9cm 185 | ||
| 186 | pkcs1 186 | ||
| 187 | pkcs5 187 | ||
| 188 | SMIME 188 | ||
| 189 | id_smime_mod 189 | ||
| 190 | id_smime_ct 190 | ||
| 191 | id_smime_aa 191 | ||
| 192 | id_smime_alg 192 | ||
| 193 | id_smime_cd 193 | ||
| 194 | id_smime_spq 194 | ||
| 195 | id_smime_cti 195 | ||
| 196 | id_smime_mod_cms 196 | ||
| 197 | id_smime_mod_ess 197 | ||
| 198 | id_smime_mod_oid 198 | ||
| 199 | id_smime_mod_msg_v3 199 | ||
| 200 | id_smime_mod_ets_eSignature_88 200 | ||
| 201 | id_smime_mod_ets_eSignature_97 201 | ||
| 202 | id_smime_mod_ets_eSigPolicy_88 202 | ||
| 203 | id_smime_mod_ets_eSigPolicy_97 203 | ||
| 204 | id_smime_ct_receipt 204 | ||
| 205 | id_smime_ct_authData 205 | ||
| 206 | id_smime_ct_publishCert 206 | ||
| 207 | id_smime_ct_TSTInfo 207 | ||
| 208 | id_smime_ct_TDTInfo 208 | ||
| 209 | id_smime_ct_contentInfo 209 | ||
| 210 | id_smime_ct_DVCSRequestData 210 | ||
| 211 | id_smime_ct_DVCSResponseData 211 | ||
| 212 | id_smime_aa_receiptRequest 212 | ||
| 213 | id_smime_aa_securityLabel 213 | ||
| 214 | id_smime_aa_mlExpandHistory 214 | ||
| 215 | id_smime_aa_contentHint 215 | ||
| 216 | id_smime_aa_msgSigDigest 216 | ||
| 217 | id_smime_aa_encapContentType 217 | ||
| 218 | id_smime_aa_contentIdentifier 218 | ||
| 219 | id_smime_aa_macValue 219 | ||
| 220 | id_smime_aa_equivalentLabels 220 | ||
| 221 | id_smime_aa_contentReference 221 | ||
| 222 | id_smime_aa_encrypKeyPref 222 | ||
| 223 | id_smime_aa_signingCertificate 223 | ||
| 224 | id_smime_aa_smimeEncryptCerts 224 | ||
| 225 | id_smime_aa_timeStampToken 225 | ||
| 226 | id_smime_aa_ets_sigPolicyId 226 | ||
| 227 | id_smime_aa_ets_commitmentType 227 | ||
| 228 | id_smime_aa_ets_signerLocation 228 | ||
| 229 | id_smime_aa_ets_signerAttr 229 | ||
| 230 | id_smime_aa_ets_otherSigCert 230 | ||
| 231 | id_smime_aa_ets_contentTimestamp 231 | ||
| 232 | id_smime_aa_ets_CertificateRefs 232 | ||
| 233 | id_smime_aa_ets_RevocationRefs 233 | ||
| 234 | id_smime_aa_ets_certValues 234 | ||
| 235 | id_smime_aa_ets_revocationValues 235 | ||
| 236 | id_smime_aa_ets_escTimeStamp 236 | ||
| 237 | id_smime_aa_ets_certCRLTimestamp 237 | ||
| 238 | id_smime_aa_ets_archiveTimeStamp 238 | ||
| 239 | id_smime_aa_signatureType 239 | ||
| 240 | id_smime_aa_dvcs_dvc 240 | ||
| 241 | id_smime_alg_ESDHwith3DES 241 | ||
| 242 | id_smime_alg_ESDHwithRC2 242 | ||
| 243 | id_smime_alg_3DESwrap 243 | ||
| 244 | id_smime_alg_RC2wrap 244 | ||
| 245 | id_smime_alg_ESDH 245 | ||
| 246 | id_smime_alg_CMS3DESwrap 246 | ||
| 247 | id_smime_alg_CMSRC2wrap 247 | ||
| 248 | id_smime_cd_ldap 248 | ||
| 249 | id_smime_spq_ets_sqt_uri 249 | ||
| 250 | id_smime_spq_ets_sqt_unotice 250 | ||
| 251 | id_smime_cti_ets_proofOfOrigin 251 | ||
| 252 | id_smime_cti_ets_proofOfReceipt 252 | ||
| 253 | id_smime_cti_ets_proofOfDelivery 253 | ||
| 254 | id_smime_cti_ets_proofOfSender 254 | ||
| 255 | id_smime_cti_ets_proofOfApproval 255 | ||
| 256 | id_smime_cti_ets_proofOfCreation 256 | ||
| 257 | md4 257 | ||
| 258 | id_pkix_mod 258 | ||
| 259 | id_qt 259 | ||
| 260 | id_it 260 | ||
| 261 | id_pkip 261 | ||
| 262 | id_alg 262 | ||
| 263 | id_cmc 263 | ||
| 264 | id_on 264 | ||
| 265 | id_pda 265 | ||
| 266 | id_aca 266 | ||
| 267 | id_qcs 267 | ||
| 268 | id_cct 268 | ||
| 269 | id_pkix1_explicit_88 269 | ||
| 270 | id_pkix1_implicit_88 270 | ||
| 271 | id_pkix1_explicit_93 271 | ||
| 272 | id_pkix1_implicit_93 272 | ||
| 273 | id_mod_crmf 273 | ||
| 274 | id_mod_cmc 274 | ||
| 275 | id_mod_kea_profile_88 275 | ||
| 276 | id_mod_kea_profile_93 276 | ||
| 277 | id_mod_cmp 277 | ||
| 278 | id_mod_qualified_cert_88 278 | ||
| 279 | id_mod_qualified_cert_93 279 | ||
| 280 | id_mod_attribute_cert 280 | ||
| 281 | id_mod_timestamp_protocol 281 | ||
| 282 | id_mod_ocsp 282 | ||
| 283 | id_mod_dvcs 283 | ||
| 284 | id_mod_cmp2000 284 | ||
| 285 | biometricInfo 285 | ||
| 286 | qcStatements 286 | ||
| 287 | ac_auditEntity 287 | ||
| 288 | ac_targeting 288 | ||
| 289 | aaControls 289 | ||
| 290 | sbqp_ipAddrBlock 290 | ||
| 291 | sbqp_autonomousSysNum 291 | ||
| 292 | sbqp_routerIdentifier 292 | ||
| 293 | textNotice 293 | ||
| 294 | ipsecEndSystem 294 | ||
| 295 | ipsecTunnel 295 | ||
| 296 | ipsecUser 296 | ||
| 297 | dvcs 297 | ||
| 298 | id_it_caProtEncCert 298 | ||
| 299 | id_it_signKeyPairTypes 299 | ||
| 300 | id_it_encKeyPairTypes 300 | ||
| 301 | id_it_preferredSymmAlg 301 | ||
| 302 | id_it_caKeyUpdateInfo 302 | ||
| 303 | id_it_currentCRL 303 | ||
| 304 | id_it_unsupportedOIDs 304 | ||
| 305 | id_it_subscriptionRequest 305 | ||
| 306 | id_it_subscriptionResponse 306 | ||
| 307 | id_it_keyPairParamReq 307 | ||
| 308 | id_it_keyPairParamRep 308 | ||
| 309 | id_it_revPassphrase 309 | ||
| 310 | id_it_implicitConfirm 310 | ||
| 311 | id_it_confirmWaitTime 311 | ||
| 312 | id_it_origPKIMessage 312 | ||
| 313 | id_regCtrl 313 | ||
| 314 | id_regInfo 314 | ||
| 315 | id_regCtrl_regToken 315 | ||
| 316 | id_regCtrl_authenticator 316 | ||
| 317 | id_regCtrl_pkiPublicationInfo 317 | ||
| 318 | id_regCtrl_pkiArchiveOptions 318 | ||
| 319 | id_regCtrl_oldCertID 319 | ||
| 320 | id_regCtrl_protocolEncrKey 320 | ||
| 321 | id_regInfo_utf8Pairs 321 | ||
| 322 | id_regInfo_certReq 322 | ||
| 323 | id_alg_des40 323 | ||
| 324 | id_alg_noSignature 324 | ||
| 325 | id_alg_dh_sig_hmac_sha1 325 | ||
| 326 | id_alg_dh_pop 326 | ||
| 327 | id_cmc_statusInfo 327 | ||
| 328 | id_cmc_identification 328 | ||
| 329 | id_cmc_identityProof 329 | ||
| 330 | id_cmc_dataReturn 330 | ||
| 331 | id_cmc_transactionId 331 | ||
| 332 | id_cmc_senderNonce 332 | ||
| 333 | id_cmc_recipientNonce 333 | ||
| 334 | id_cmc_addExtensions 334 | ||
| 335 | id_cmc_encryptedPOP 335 | ||
| 336 | id_cmc_decryptedPOP 336 | ||
| 337 | id_cmc_lraPOPWitness 337 | ||
| 338 | id_cmc_getCert 338 | ||
| 339 | id_cmc_getCRL 339 | ||
| 340 | id_cmc_revokeRequest 340 | ||
| 341 | id_cmc_regInfo 341 | ||
| 342 | id_cmc_responseInfo 342 | ||
| 343 | id_cmc_queryPending 343 | ||
| 344 | id_cmc_popLinkRandom 344 | ||
| 345 | id_cmc_popLinkWitness 345 | ||
| 346 | id_cmc_confirmCertAcceptance 346 | ||
| 347 | id_on_personalData 347 | ||
| 348 | id_pda_dateOfBirth 348 | ||
| 349 | id_pda_placeOfBirth 349 | ||
| 350 | id_pda_pseudonym 350 | ||
| 351 | id_pda_gender 351 | ||
| 352 | id_pda_countryOfCitizenship 352 | ||
| 353 | id_pda_countryOfResidence 353 | ||
| 354 | id_aca_authenticationInfo 354 | ||
| 355 | id_aca_accessIdentity 355 | ||
| 356 | id_aca_chargingIdentity 356 | ||
| 357 | id_aca_group 357 | ||
| 358 | id_aca_role 358 | ||
| 359 | id_qcs_pkixQCSyntax_v1 359 | ||
| 360 | id_cct_crs 360 | ||
| 361 | id_cct_PKIData 361 | ||
| 362 | id_cct_PKIResponse 362 | ||
| 363 | ad_timeStamping 363 | ||
| 364 | ad_dvcs 364 | ||
| 365 | id_pkix_OCSP_basic 365 | ||
| 366 | id_pkix_OCSP_Nonce 366 | ||
| 367 | id_pkix_OCSP_CrlID 367 | ||
| 368 | id_pkix_OCSP_acceptableResponses 368 | ||
| 369 | id_pkix_OCSP_noCheck 369 | ||
| 370 | id_pkix_OCSP_archiveCutoff 370 | ||
| 371 | id_pkix_OCSP_serviceLocator 371 | ||
| 372 | id_pkix_OCSP_extendedStatus 372 | ||
| 373 | id_pkix_OCSP_valid 373 | ||
| 374 | id_pkix_OCSP_path 374 | ||
| 375 | id_pkix_OCSP_trustRoot 375 | ||
| 376 | algorithm 376 | ||
| 377 | rsaSignature 377 | ||
| 378 | X500algorithms 378 | ||
| 379 | org 379 | ||
| 380 | dod 380 | ||
| 381 | iana 381 | ||
| 382 | Directory 382 | ||
| 383 | Management 383 | ||
| 384 | Experimental 384 | ||
| 385 | Private 385 | ||
| 386 | Security 386 | ||
| 387 | SNMPv2 387 | ||
| 388 | Mail 388 | ||
| 389 | Enterprises 389 | ||
| 390 | dcObject 390 | ||
| 391 | domainComponent 391 | ||
| 392 | Domain 392 | ||
diff --git a/src/lib/libssl/src/crypto/objects/objects.README b/src/lib/libssl/src/crypto/objects/objects.README new file mode 100644 index 0000000000..4d745508d8 --- /dev/null +++ b/src/lib/libssl/src/crypto/objects/objects.README | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | objects.txt syntax | ||
| 2 | ------------------ | ||
| 3 | |||
| 4 | To cover all the naming hacks that were previously in objects.h needed some | ||
| 5 | kind of hacks in objects.txt. | ||
| 6 | |||
| 7 | The basic syntax for adding an object is as follows: | ||
| 8 | |||
| 9 | 1 2 3 4 : shortName : Long Name | ||
| 10 | |||
| 11 | If the long name doesn't contain spaces, or no short name | ||
| 12 | exists, the long name is used as basis for the base name | ||
| 13 | in C. Otherwise, the short name is used. | ||
| 14 | |||
| 15 | The base name (let's call it 'base') will then be used to | ||
| 16 | create the C macros SN_base, LN_base, NID_base and OBJ_base. | ||
| 17 | |||
| 18 | Note that if the base name contains spaces, dashes or periods, | ||
| 19 | those will be converte to underscore. | ||
| 20 | |||
| 21 | Then there are some extra commands: | ||
| 22 | |||
| 23 | !Alias foo 1 2 3 4 | ||
| 24 | |||
| 25 | This juts makes a name foo for an OID. The C macro | ||
| 26 | OBJ_foo will be created as a result. | ||
| 27 | |||
| 28 | !Cname foo | ||
| 29 | |||
| 30 | This makes sure that the name foo will be used as base name | ||
| 31 | in C. | ||
| 32 | |||
| 33 | !module foo | ||
| 34 | 1 2 3 4 : shortName : Long Name | ||
| 35 | !global | ||
| 36 | |||
| 37 | The !module command was meant to define a kind of modularity. | ||
| 38 | What it does is to make sure the module name is prepended | ||
| 39 | to the base name. !global turns this off. This construction | ||
| 40 | is not recursive. | ||
| 41 | |||
| 42 | Lines starting with # are treated as comments, as well as any line starting | ||
| 43 | with ! and not matching the commands above. | ||
| 44 | |||
diff --git a/src/lib/libssl/src/crypto/objects/objects.h b/src/lib/libssl/src/crypto/objects/objects.h index 95c8a21568..c099e2e84e 100644 --- a/src/lib/libssl/src/crypto/objects/objects.h +++ b/src/lib/libssl/src/crypto/objects/objects.h | |||
| @@ -59,10 +59,11 @@ | |||
| 59 | #ifndef HEADER_OBJECTS_H | 59 | #ifndef HEADER_OBJECTS_H |
| 60 | #define HEADER_OBJECTS_H | 60 | #define HEADER_OBJECTS_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | 62 | #define USE_OBJ_MAC |
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | 63 | ||
| 64 | #ifdef USE_OBJ_MAC | ||
| 65 | #include <openssl/obj_mac.h> | ||
| 66 | #else | ||
| 66 | #define SN_undef "UNDEF" | 67 | #define SN_undef "UNDEF" |
| 67 | #define LN_undef "undefined" | 68 | #define LN_undef "undefined" |
| 68 | #define NID_undef 0 | 69 | #define NID_undef 0 |
| @@ -953,6 +954,7 @@ extern "C" { | |||
| 953 | #define LN_OCSP_sign "OCSP Signing" | 954 | #define LN_OCSP_sign "OCSP Signing" |
| 954 | #define NID_OCSP_sign 180 | 955 | #define NID_OCSP_sign 180 |
| 955 | #define OBJ_OCSP_sign OBJ_id_kp,9L | 956 | #define OBJ_OCSP_sign OBJ_id_kp,9L |
| 957 | #endif /* USE_OBJ_MAC */ | ||
| 956 | 958 | ||
| 957 | #include <openssl/bio.h> | 959 | #include <openssl/bio.h> |
| 958 | #include <openssl/asn1.h> | 960 | #include <openssl/asn1.h> |
| @@ -967,6 +969,10 @@ extern "C" { | |||
| 967 | #define OBJ_NAME_ALIAS 0x8000 | 969 | #define OBJ_NAME_ALIAS 0x8000 |
| 968 | 970 | ||
| 969 | 971 | ||
| 972 | #ifdef __cplusplus | ||
| 973 | extern "C" { | ||
| 974 | #endif | ||
| 975 | |||
| 970 | typedef struct obj_name_st | 976 | typedef struct obj_name_st |
| 971 | { | 977 | { |
| 972 | int type; | 978 | int type; |
| @@ -979,8 +985,8 @@ typedef struct obj_name_st | |||
| 979 | 985 | ||
| 980 | 986 | ||
| 981 | int OBJ_NAME_init(void); | 987 | int OBJ_NAME_init(void); |
| 982 | int OBJ_NAME_new_index(unsigned long (*hash_func)(),int (*cmp_func)(), | 988 | int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),int (*cmp_func)(const void *, const void *), |
| 983 | void (*free_func)()); | 989 | void (*free_func)(const char *, int, const char *)); |
| 984 | const char *OBJ_NAME_get(const char *name,int type); | 990 | const char *OBJ_NAME_get(const char *name,int type); |
| 985 | int OBJ_NAME_add(const char *name,int type,const char *data); | 991 | int OBJ_NAME_add(const char *name,int type,const char *data); |
| 986 | int OBJ_NAME_remove(const char *name,int type); | 992 | int OBJ_NAME_remove(const char *name,int type); |
| @@ -997,7 +1003,7 @@ int OBJ_txt2nid(char *s); | |||
| 997 | int OBJ_ln2nid(const char *s); | 1003 | int OBJ_ln2nid(const char *s); |
| 998 | int OBJ_sn2nid(const char *s); | 1004 | int OBJ_sn2nid(const char *s); |
| 999 | int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b); | 1005 | int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b); |
| 1000 | char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)()); | 1006 | char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)(const void *, const void *)); |
| 1001 | 1007 | ||
| 1002 | void ERR_load_OBJ_strings(void ); | 1008 | void ERR_load_OBJ_strings(void ); |
| 1003 | 1009 | ||
diff --git a/src/lib/libssl/src/crypto/objects/objects.pl b/src/lib/libssl/src/crypto/objects/objects.pl new file mode 100644 index 0000000000..c956bbb841 --- /dev/null +++ b/src/lib/libssl/src/crypto/objects/objects.pl | |||
| @@ -0,0 +1,224 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]"; | ||
| 4 | $max_nid=0; | ||
| 5 | $o=0; | ||
| 6 | while(<NUMIN>) | ||
| 7 | { | ||
| 8 | chop; | ||
| 9 | $o++; | ||
| 10 | s/#.*$//; | ||
| 11 | next if /^\s*$/; | ||
| 12 | ($Cname,$mynum) = split; | ||
| 13 | if (defined($nidn{$mynum})) | ||
| 14 | { die "$ARGV[1]:$o:There's already an object with NID ",$mynum," on line ",$order{$mynum},"\n"; } | ||
| 15 | $nid{$Cname} = $mynum; | ||
| 16 | $nidn{$mynum} = $Cname; | ||
| 17 | $order{$mynum} = $o; | ||
| 18 | $max_nid = $mynum if $mynum > $max_nid; | ||
| 19 | } | ||
| 20 | close NUMIN; | ||
| 21 | |||
| 22 | open (IN,"$ARGV[0]") || die "Can't open input file $ARGV[0]"; | ||
| 23 | $Cname=""; | ||
| 24 | $o=0; | ||
| 25 | while (<IN>) | ||
| 26 | { | ||
| 27 | chop; | ||
| 28 | $o++; | ||
| 29 | if (/^!module\s+(.*)$/) | ||
| 30 | { | ||
| 31 | $module = $1."-"; | ||
| 32 | $module =~ s/\./_/g; | ||
| 33 | $module =~ s/-/_/g; | ||
| 34 | } | ||
| 35 | if (/^!global$/) | ||
| 36 | { $module = ""; } | ||
| 37 | if (/^!Cname\s+(.*)$/) | ||
| 38 | { $Cname = $1; } | ||
| 39 | if (/^!Alias\s+(.+?)\s+(.*)$/) | ||
| 40 | { | ||
| 41 | $Cname = $module.$1; | ||
| 42 | $myoid = $2; | ||
| 43 | $myoid = &process_oid($myoid); | ||
| 44 | $Cname =~ s/-/_/g; | ||
| 45 | $ordern{$o} = $Cname; | ||
| 46 | $order{$Cname} = $o; | ||
| 47 | $obj{$Cname} = $myoid; | ||
| 48 | $_ = ""; | ||
| 49 | $Cname = ""; | ||
| 50 | } | ||
| 51 | s/!.*$//; | ||
| 52 | s/#.*$//; | ||
| 53 | next if /^\s*$/; | ||
| 54 | ($myoid,$mysn,$myln) = split ':'; | ||
| 55 | $mysn =~ s/^\s*//; | ||
| 56 | $mysn =~ s/\s*$//; | ||
| 57 | $myln =~ s/^\s*//; | ||
| 58 | $myln =~ s/\s*$//; | ||
| 59 | $myoid =~ s/^\s*//; | ||
| 60 | $myoid =~ s/\s*$//; | ||
| 61 | if ($myoid ne "") | ||
| 62 | { | ||
| 63 | $myoid = &process_oid($myoid); | ||
| 64 | } | ||
| 65 | |||
| 66 | if ($Cname eq "" && !($myln =~ / /)) | ||
| 67 | { | ||
| 68 | $Cname = $myln; | ||
| 69 | $Cname =~ s/\./_/g; | ||
| 70 | $Cname =~ s/-/_/g; | ||
| 71 | if ($Cname ne "" && defined($ln{$module.$Cname})) | ||
| 72 | { die "objects.txt:$o:There's already an object with long name ",$ln{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
| 73 | } | ||
| 74 | if ($Cname eq "") | ||
| 75 | { | ||
| 76 | $Cname = $mysn; | ||
| 77 | $Cname =~ s/-/_/g; | ||
| 78 | if ($Cname ne "" && defined($sn{$module.$Cname})) | ||
| 79 | { die "objects.txt:$o:There's already an object with short name ",$sn{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
| 80 | } | ||
| 81 | if ($Cname eq "") | ||
| 82 | { | ||
| 83 | $Cname = $myln; | ||
| 84 | $Cname =~ s/-/_/g; | ||
| 85 | $Cname =~ s/\./_/g; | ||
| 86 | $Cname =~ s/ /_/g; | ||
| 87 | if ($Cname ne "" && defined($ln{$module.$Cname})) | ||
| 88 | { die "objects.txt:$o:There's already an object with long name ",$ln{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
| 89 | } | ||
| 90 | $Cname =~ s/\./_/g; | ||
| 91 | $Cname =~ s/-/_/g; | ||
| 92 | $Cname = $module.$Cname; | ||
| 93 | $ordern{$o} = $Cname; | ||
| 94 | $order{$Cname} = $o; | ||
| 95 | $sn{$Cname} = $mysn; | ||
| 96 | $ln{$Cname} = $myln; | ||
| 97 | $obj{$Cname} = $myoid; | ||
| 98 | if (!defined($nid{$Cname})) | ||
| 99 | { | ||
| 100 | $max_nid++; | ||
| 101 | $nid{$Cname} = $max_nid; | ||
| 102 | $nidn{$max_nid} = $Cname; | ||
| 103 | } | ||
| 104 | $Cname=""; | ||
| 105 | } | ||
| 106 | close IN; | ||
| 107 | |||
| 108 | open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; | ||
| 109 | foreach (sort { $a <=> $b } keys %nidn) | ||
| 110 | { | ||
| 111 | print NUMOUT $nidn{$_},"\t\t",$_,"\n"; | ||
| 112 | } | ||
| 113 | close NUMOUT; | ||
| 114 | |||
| 115 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; | ||
| 116 | print OUT <<'EOF'; | ||
| 117 | /* lib/obj/obj_mac.h */ | ||
| 118 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
| 119 | * All rights reserved. | ||
| 120 | * | ||
| 121 | * This package is an SSL implementation written | ||
| 122 | * by Eric Young (eay@cryptsoft.com). | ||
| 123 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 124 | * | ||
| 125 | * This library is free for commercial and non-commercial use as long as | ||
| 126 | * the following conditions are aheared to. The following conditions | ||
| 127 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 128 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 129 | * included with this distribution is covered by the same copyright terms | ||
| 130 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 131 | * | ||
| 132 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 133 | * the code are not to be removed. | ||
| 134 | * If this package is used in a product, Eric Young should be given attribution | ||
| 135 | * as the author of the parts of the library used. | ||
| 136 | * This can be in the form of a textual message at program startup or | ||
| 137 | * in documentation (online or textual) provided with the package. | ||
| 138 | * | ||
| 139 | * Redistribution and use in source and binary forms, with or without | ||
| 140 | * modification, are permitted provided that the following conditions | ||
| 141 | * are met: | ||
| 142 | * 1. Redistributions of source code must retain the copyright | ||
| 143 | * notice, this list of conditions and the following disclaimer. | ||
| 144 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 145 | * notice, this list of conditions and the following disclaimer in the | ||
| 146 | * documentation and/or other materials provided with the distribution. | ||
| 147 | * 3. All advertising materials mentioning features or use of this software | ||
| 148 | * must display the following acknowledgement: | ||
| 149 | * "This product includes cryptographic software written by | ||
| 150 | * Eric Young (eay@cryptsoft.com)" | ||
| 151 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 152 | * being used are not cryptographic related :-). | ||
| 153 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 154 | * the apps directory (application code) you must include an acknowledgement: | ||
| 155 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 156 | * | ||
| 157 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 158 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 159 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 160 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 161 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 162 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 163 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 164 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 165 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 166 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 167 | * SUCH DAMAGE. | ||
| 168 | * | ||
| 169 | * The licence and distribution terms for any publically available version or | ||
| 170 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 171 | * copied and put under another distribution licence | ||
| 172 | * [including the GNU Public Licence.] | ||
| 173 | */ | ||
| 174 | |||
| 175 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
| 176 | * following command: | ||
| 177 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
| 178 | */ | ||
| 179 | |||
| 180 | #define SN_undef "UNDEF" | ||
| 181 | #define LN_undef "undefined" | ||
| 182 | #define NID_undef 0 | ||
| 183 | #define OBJ_undef 0L | ||
| 184 | |||
| 185 | EOF | ||
| 186 | |||
| 187 | foreach (sort { $a <=> $b } keys %ordern) | ||
| 188 | { | ||
| 189 | $Cname=$ordern{$_}; | ||
| 190 | print OUT "#define SN_",$Cname,"\t\t\"",$sn{$Cname},"\"\n" if $sn{$Cname} ne ""; | ||
| 191 | print OUT "#define LN_",$Cname,"\t\t\"",$ln{$Cname},"\"\n" if $ln{$Cname} ne ""; | ||
| 192 | print OUT "#define NID_",$Cname,"\t\t",$nid{$Cname},"\n" if $nid{$Cname} ne ""; | ||
| 193 | print OUT "#define OBJ_",$Cname,"\t\t",$obj{$Cname},"\n" if $obj{$Cname} ne ""; | ||
| 194 | print OUT "\n"; | ||
| 195 | } | ||
| 196 | |||
| 197 | close OUT; | ||
| 198 | |||
| 199 | sub process_oid | ||
| 200 | { | ||
| 201 | local($oid)=@_; | ||
| 202 | local(@a,$oid_pref); | ||
| 203 | |||
| 204 | @a = split(/\s+/,$myoid); | ||
| 205 | $pref_oid = ""; | ||
| 206 | $pref_sep = ""; | ||
| 207 | if (!($a[0] =~ /^[0-9]+$/)) | ||
| 208 | { | ||
| 209 | $a[0] =~ s/-/_/g; | ||
| 210 | $pref_oid = "OBJ_" . $a[0]; | ||
| 211 | $pref_sep = ","; | ||
| 212 | shift @a; | ||
| 213 | } | ||
| 214 | $oids = join('L,',@a) . "L"; | ||
| 215 | if ($oids ne "L") | ||
| 216 | { | ||
| 217 | $oids = $pref_oid . $pref_sep . $oids; | ||
| 218 | } | ||
| 219 | else | ||
| 220 | { | ||
| 221 | $oids = $pref_oid; | ||
| 222 | } | ||
| 223 | return($oids); | ||
| 224 | } | ||
diff --git a/src/lib/libssl/src/crypto/objects/objects.txt b/src/lib/libssl/src/crypto/objects/objects.txt index cb276e90e9..3d443cf884 100644 --- a/src/lib/libssl/src/crypto/objects/objects.txt +++ b/src/lib/libssl/src/crypto/objects/objects.txt | |||
| @@ -1,40 +1,593 @@ | |||
| 1 | 1 2 : ISO member bodies | 1 | 1 : ISO : iso |
| 2 | 1 2 840 : US (ANSI) | 2 | |
| 3 | 1 2 840 113549 : rsadsi : RSA Data Security, Inc. | 3 | iso 2 : member-body : ISO Member Body |
| 4 | 1 2 840 113549 1 : pkcs : RSA Data Security, Inc. PKCS | 4 | |
| 5 | 1 2 840 113549 1 1 1 : rsaEncryption | 5 | member-body 840 : ISO-US : ISO US Member Body |
| 6 | 1 2 840 113549 1 1 2 : md2withRSAEncryption | 6 | ISO-US 10040 : X9-57 : X9.57 |
| 7 | 1 2 840 113549 1 1 4 : md5withRSAEncryption | 7 | X9-57 4 : X9cm : X9.57 CM ? |
| 8 | 1 2 840 113549 1 7 : pkcs-7 | 8 | |
| 9 | 1 2 840 113549 1 7 1 : pkcs-7-data | 9 | !Cname dsa |
| 10 | 1 2 840 113549 1 7 2 : pkcs-7-signedData | 10 | X9cm 1 : DSA : dsaEncryption |
| 11 | 1 2 840 113549 1 7 3 : pkcs-7-envelopedData | 11 | X9cm 3 : DSA-SHA1 : dsaWithSHA1 |
| 12 | 1 2 840 113549 1 7 4 : pkcs-7-signedAndEnvelopedData | 12 | |
| 13 | 1 2 840 113549 1 7 5 : pkcs-7-digestData | 13 | ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc |
| 14 | 1 2 840 113549 1 7 6 : pkcs-7-encryptedData | 14 | : CAST5-ECB : cast5-ecb |
| 15 | 1 2 840 113549 2 2 : md2 | 15 | !Cname cast5-cfb64 |
| 16 | 1 2 840 113549 2 4 : md4 | 16 | : CAST5-CFB : cast5-cfb |
| 17 | 1 2 840 113549 2 5 : md5 | 17 | !Cname cast5-ofb64 |
| 18 | 1 2 840 113549 3 4 : rc4 | 18 | : CAST5-OFB : cast5-ofb |
| 19 | 1 2 840 113549 5 1 : pbeWithMD2AndDES_CBC | 19 | !Cname pbeWithMD5AndCast5-CBC |
| 20 | 1 2 840 113549 5 3 : pbeWithMD5AndDES_CBC | 20 | ISO-US 113533 7 66 12 : : pbeWithMD5AndCast5CBC |
| 21 | 2 5 : X500 : directory services (X.500) | 21 | |
| 22 | 2 5 4 : X509 | 22 | ISO-US 113549 : rsadsi : RSA Data Security, Inc. |
| 23 | 2 5 4 3 : commonName | 23 | |
| 24 | 2 5 4 6 : countryName | 24 | rsadsi 1 : pkcs : RSA Data Security, Inc. PKCS |
| 25 | 2 5 4 7 : localityName | 25 | |
| 26 | 2 5 4 8 : stateOrProvinceName | 26 | pkcs 1 : pkcs1 |
| 27 | 2 5 4 10 : organizationName | 27 | pkcs1 1 : : rsaEncryption |
| 28 | 2 5 4 11 : organizationalUnitName | 28 | pkcs1 2 : RSA-MD2 : md2WithRSAEncryption |
| 29 | 2 5 8 : directory services - algorithms | 29 | pkcs1 4 : RSA-MD5 : md5WithRSAEncryption |
| 30 | 2 5 8 1 1 : rsa | 30 | pkcs1 5 : RSA-SHA1 : sha1WithRSAEncryption |
| 31 | 31 | ||
| 32 | algorithm 18 : sha | 32 | pkcs 3 : pkcs3 |
| 33 | encryptionAlgorithm 1 : rsa | 33 | pkcs3 1 : : dhKeyAgreement |
| 34 | |||
| 35 | pkcs 5 : pkcs5 | ||
| 36 | pkcs5 1 : PBE-MD2-DES : pbeWithMD2AndDES-CBC | ||
| 37 | pkcs5 3 : PBE-MD5-DES : pbeWithMD5AndDES-CBC | ||
| 38 | pkcs5 4 : PBE-MD2-RC2-64 : pbeWithMD2AndRC2-CBC | ||
| 39 | pkcs5 6 : PBE-MD5-RC2-64 : pbeWithMD5AndRC2-CBC | ||
| 40 | pkcs5 10 : PBE-SHA1-DES : pbeWithSHA1AndDES-CBC | ||
| 41 | pkcs5 11 : PBE-SHA1-RC2-64 : pbeWithSHA1AndRC2-CBC | ||
| 42 | !Cname id_pbkdf2 | ||
| 43 | pkcs5 12 : : PBKDF2 | ||
| 44 | !Cname pbes2 | ||
| 45 | pkcs5 13 : : PBES2 | ||
| 46 | !Cname pbmac1 | ||
| 47 | pkcs5 14 : : PBMAC1 | ||
| 48 | |||
| 49 | pkcs 7 : pkcs7 | ||
| 50 | pkcs7 1 : : pkcs7-data | ||
| 51 | !Cname pkcs7-signed | ||
| 52 | pkcs7 2 : : pkcs7-signedData | ||
| 53 | !Cname pkcs7-enveloped | ||
| 54 | pkcs7 3 : : pkcs7-envelopedData | ||
| 55 | !Cname pkcs7-signedAndEnveloped | ||
| 56 | pkcs7 4 : : pkcs7-signedAndEnvelopedData | ||
| 57 | !Cname pkcs7-digest | ||
| 58 | pkcs7 5 : : pkcs7-digestData | ||
| 59 | !Cname pkcs7-encrypted | ||
| 60 | pkcs7 6 : : pkcs7-encryptedData | ||
| 61 | |||
| 62 | pkcs 9 : pkcs9 | ||
| 63 | !module pkcs9 | ||
| 64 | pkcs9 1 : Email : emailAddress | ||
| 65 | pkcs9 2 : : unstructuredName | ||
| 66 | pkcs9 3 : : contentType | ||
| 67 | pkcs9 4 : : messageDigest | ||
| 68 | pkcs9 5 : : signingTime | ||
| 69 | pkcs9 6 : : countersignature | ||
| 70 | pkcs9 7 : : challengePassword | ||
| 71 | pkcs9 8 : : unstructuredAddress | ||
| 72 | !Cname extCertAttributes | ||
| 73 | pkcs9 9 : : extendedCertificateAttributes | ||
| 74 | !global | ||
| 75 | |||
| 76 | !Cname ext-req | ||
| 77 | pkcs9 14 : extReq : Extension Request | ||
| 78 | |||
| 79 | !Cname SMIMECapabilities | ||
| 80 | pkcs9 15 : SMIME-CAPS : S/MIME Capabilities | ||
| 81 | |||
| 82 | # S/MIME | ||
| 83 | !Cname SMIME | ||
| 84 | pkcs9 16 : SMIME : S/MIME | ||
| 85 | SMIME 0 : id-smime-mod | ||
| 86 | SMIME 1 : id-smime-ct | ||
| 87 | SMIME 2 : id-smime-aa | ||
| 88 | SMIME 3 : id-smime-alg | ||
| 89 | SMIME 4 : id-smime-cd | ||
| 90 | SMIME 5 : id-smime-spq | ||
| 91 | SMIME 6 : id-smime-cti | ||
| 92 | |||
| 93 | # S/MIME Modules | ||
| 94 | id-smime-mod 1 : id-smime-mod-cms | ||
| 95 | id-smime-mod 2 : id-smime-mod-ess | ||
| 96 | id-smime-mod 3 : id-smime-mod-oid | ||
| 97 | id-smime-mod 4 : id-smime-mod-msg-v3 | ||
| 98 | id-smime-mod 5 : id-smime-mod-ets-eSignature-88 | ||
| 99 | id-smime-mod 6 : id-smime-mod-ets-eSignature-97 | ||
| 100 | id-smime-mod 7 : id-smime-mod-ets-eSigPolicy-88 | ||
| 101 | id-smime-mod 8 : id-smime-mod-ets-eSigPolicy-97 | ||
| 102 | |||
| 103 | # S/MIME Content Types | ||
| 104 | id-smime-ct 1 : id-smime-ct-receipt | ||
| 105 | id-smime-ct 2 : id-smime-ct-authData | ||
| 106 | id-smime-ct 3 : id-smime-ct-publishCert | ||
| 107 | id-smime-ct 4 : id-smime-ct-TSTInfo | ||
| 108 | id-smime-ct 5 : id-smime-ct-TDTInfo | ||
| 109 | id-smime-ct 6 : id-smime-ct-contentInfo | ||
| 110 | id-smime-ct 7 : id-smime-ct-DVCSRequestData | ||
| 111 | id-smime-ct 8 : id-smime-ct-DVCSResponseData | ||
| 112 | |||
| 113 | # S/MIME Attributes | ||
| 114 | id-smime-aa 1 : id-smime-aa-receiptRequest | ||
| 115 | id-smime-aa 2 : id-smime-aa-securityLabel | ||
| 116 | id-smime-aa 3 : id-smime-aa-mlExpandHistory | ||
| 117 | id-smime-aa 4 : id-smime-aa-contentHint | ||
| 118 | id-smime-aa 5 : id-smime-aa-msgSigDigest | ||
| 119 | # obsolete | ||
| 120 | id-smime-aa 6 : id-smime-aa-encapContentType | ||
| 121 | id-smime-aa 7 : id-smime-aa-contentIdentifier | ||
| 122 | # obsolete | ||
| 123 | id-smime-aa 8 : id-smime-aa-macValue | ||
| 124 | id-smime-aa 9 : id-smime-aa-equivalentLabels | ||
| 125 | id-smime-aa 10 : id-smime-aa-contentReference | ||
| 126 | id-smime-aa 11 : id-smime-aa-encrypKeyPref | ||
| 127 | id-smime-aa 12 : id-smime-aa-signingCertificate | ||
| 128 | id-smime-aa 13 : id-smime-aa-smimeEncryptCerts | ||
| 129 | id-smime-aa 14 : id-smime-aa-timeStampToken | ||
| 130 | id-smime-aa 15 : id-smime-aa-ets-sigPolicyId | ||
| 131 | id-smime-aa 16 : id-smime-aa-ets-commitmentType | ||
| 132 | id-smime-aa 17 : id-smime-aa-ets-signerLocation | ||
| 133 | id-smime-aa 18 : id-smime-aa-ets-signerAttr | ||
| 134 | id-smime-aa 19 : id-smime-aa-ets-otherSigCert | ||
| 135 | id-smime-aa 20 : id-smime-aa-ets-contentTimestamp | ||
| 136 | id-smime-aa 21 : id-smime-aa-ets-CertificateRefs | ||
| 137 | id-smime-aa 22 : id-smime-aa-ets-RevocationRefs | ||
| 138 | id-smime-aa 23 : id-smime-aa-ets-certValues | ||
| 139 | id-smime-aa 24 : id-smime-aa-ets-revocationValues | ||
| 140 | id-smime-aa 25 : id-smime-aa-ets-escTimeStamp | ||
| 141 | id-smime-aa 26 : id-smime-aa-ets-certCRLTimestamp | ||
| 142 | id-smime-aa 27 : id-smime-aa-ets-archiveTimeStamp | ||
| 143 | id-smime-aa 28 : id-smime-aa-signatureType | ||
| 144 | id-smime-aa 29 : id-smime-aa-dvcs-dvc | ||
| 145 | |||
| 146 | # S/MIME Algorithm Identifiers | ||
| 147 | # obsolete | ||
| 148 | id-smime-alg 1 : id-smime-alg-ESDHwith3DES | ||
| 149 | # obsolete | ||
| 150 | id-smime-alg 2 : id-smime-alg-ESDHwithRC2 | ||
| 151 | # obsolete | ||
| 152 | id-smime-alg 3 : id-smime-alg-3DESwrap | ||
| 153 | # obsolete | ||
| 154 | id-smime-alg 4 : id-smime-alg-RC2wrap | ||
| 155 | id-smime-alg 5 : id-smime-alg-ESDH | ||
| 156 | id-smime-alg 6 : id-smime-alg-CMS3DESwrap | ||
| 157 | id-smime-alg 7 : id-smime-alg-CMSRC2wrap | ||
| 158 | |||
| 159 | # S/MIME Certificate Distribution | ||
| 160 | id-smime-cd 1 : id-smime-cd-ldap | ||
| 161 | |||
| 162 | # S/MIME Signature Policy Qualifier | ||
| 163 | id-smime-spq 1 : id-smime-spq-ets-sqt-uri | ||
| 164 | id-smime-spq 2 : id-smime-spq-ets-sqt-unotice | ||
| 165 | |||
| 166 | # S/MIME Commitment Type Identifier | ||
| 167 | id-smime-cti 1 : id-smime-cti-ets-proofOfOrigin | ||
| 168 | id-smime-cti 2 : id-smime-cti-ets-proofOfReceipt | ||
| 169 | id-smime-cti 3 : id-smime-cti-ets-proofOfDelivery | ||
| 170 | id-smime-cti 4 : id-smime-cti-ets-proofOfSender | ||
| 171 | id-smime-cti 5 : id-smime-cti-ets-proofOfApproval | ||
| 172 | id-smime-cti 6 : id-smime-cti-ets-proofOfCreation | ||
| 173 | |||
| 174 | pkcs9 20 : : friendlyName | ||
| 175 | pkcs9 21 : : localKeyID | ||
| 176 | !Alias certTypes pkcs9 22 | ||
| 177 | certTypes 1 : : x509Certificate | ||
| 178 | certTypes 2 : : sdsiCertificate | ||
| 179 | !Alias crlTypes pkcs9 23 | ||
| 180 | crlTypes 1 : : x509Crl | ||
| 181 | |||
| 182 | !Alias pkcs12 pkcs 12 | ||
| 183 | !Alias pkcs12-pbeids pkcs12 1 | ||
| 184 | |||
| 185 | !Cname pbe-WithSHA1And128BitRC4 | ||
| 186 | pkcs12-pbeids 1 : PBE-SHA1-RC4-128 : pbeWithSHA1And128BitRC4 | ||
| 187 | !Cname pbe-WithSHA1And40BitRC4 | ||
| 188 | pkcs12-pbeids 2 : PBE-SHA1-RC4-40 : pbeWithSHA1And40BitRC4 | ||
| 189 | !Cname pbe-WithSHA1And3_Key_TripleDES-CBC | ||
| 190 | pkcs12-pbeids 3 : PBE-SHA1-3DES : pbeWithSHA1And3-KeyTripleDES-CBC | ||
| 191 | !Cname pbe-WithSHA1And2_Key_TripleDES-CBC | ||
| 192 | pkcs12-pbeids 4 : PBE-SHA1-2DES : pbeWithSHA1And2-KeyTripleDES-CBC | ||
| 193 | !Cname pbe-WithSHA1And128BitRC2-CBC | ||
| 194 | pkcs12-pbeids 5 : PBE-SHA1-RC2-128 : pbeWithSHA1And128BitRC2-CBC | ||
| 195 | !Cname pbe-WithSHA1And40BitRC2-CBC | ||
| 196 | pkcs12-pbeids 6 : PBE-SHA1-RC2-40 : pbeWithSHA1And40BitRC2-CBC | ||
| 197 | |||
| 198 | !Alias pkcs12-Version1 pkcs12 10 | ||
| 199 | !Alias pkcs12-BagIds pkcs12-Version1 1 | ||
| 200 | pkcs12-BagIds 1 : : keyBag | ||
| 201 | pkcs12-BagIds 2 : : pkcs8ShroudedKeyBag | ||
| 202 | pkcs12-BagIds 3 : : certBag | ||
| 203 | pkcs12-BagIds 4 : : crlBag | ||
| 204 | pkcs12-BagIds 5 : : secretBag | ||
| 205 | pkcs12-BagIds 6 : : safeContentsBag | ||
| 206 | |||
| 207 | rsadsi 2 2 : MD2 : md2 | ||
| 208 | rsadsi 2 4 : MD4 : md4 | ||
| 209 | rsadsi 2 5 : MD5 : md5 | ||
| 210 | : MD5-SHA1 : md5-sha1 | ||
| 211 | rsadsi 2 7 : : hmacWithSHA1 | ||
| 212 | rsadsi 3 2 : RC2-CBC : rc2-cbc | ||
| 213 | : RC2-ECB : rc2-ecb | ||
| 214 | !Cname rc2-cfb64 | ||
| 215 | : RC2-CFB : rc2-cfb | ||
| 216 | !Cname rc2-ofb64 | ||
| 217 | : RC2-OFB : rc2-ofb | ||
| 218 | : RC2-40-CBC : rc2-40-cbc | ||
| 219 | : RC2-64-CBC : rc2-64-cbc | ||
| 220 | rsadsi 3 4 : RC4 : rc4 | ||
| 221 | : RC4-40 : rc4-40 | ||
| 222 | rsadsi 3 7 : DES-EDE3-CBC : des-ede3-cbc | ||
| 223 | rsadsi 3 8 : RC5-CBC : rc5-cbc | ||
| 224 | : RC5-ECB : rc5-ecb | ||
| 225 | !Cname rc5-cfb64 | ||
| 226 | : RC5-CFB : rc5-cfb | ||
| 227 | !Cname rc5-ofb64 | ||
| 228 | : RC5-OFB : rc5-ofb | ||
| 229 | |||
| 230 | !Cname ms-ext-req | ||
| 231 | 1 3 6 1 4 1 311 2 1 14 : msExtReq : Microsoft Extension Request | ||
| 232 | !Cname ms-code-ind | ||
| 233 | 1 3 6 1 4 1 311 2 1 21 : msCodeInd : Microsoft Individual Code Signing | ||
| 234 | !Cname ms-code-com | ||
| 235 | 1 3 6 1 4 1 311 2 1 22 : msCodeCom : Microsoft Commercial Code Signing | ||
| 236 | !Cname ms-ctl-sign | ||
| 237 | 1 3 6 1 4 1 311 10 3 1 : msCTLSign : Microsoft Trust List Signing | ||
| 238 | !Cname ms-sgc | ||
| 239 | 1 3 6 1 4 1 311 10 3 3 : msSGC : Microsoft Server Gated Crypto | ||
| 240 | !Cname ms-efs | ||
| 241 | 1 3 6 1 4 1 311 10 3 4 : msEFS : Microsoft Encrypted File System | ||
| 242 | |||
| 243 | 1 3 6 1 4 1 188 7 1 1 2 : IDEA-CBC : idea-cbc | ||
| 244 | : IDEA-ECB : idea-ecb | ||
| 245 | !Cname idea-cfb64 | ||
| 246 | : IDEA-CFB : idea-cfb | ||
| 247 | !Cname idea-ofb64 | ||
| 248 | : IDEA-OFB : idea-ofb | ||
| 249 | |||
| 250 | 1 3 6 1 4 1 3029 1 2 : BF-CBC : bf-cbc | ||
| 251 | : BF-ECB : bf-ecb | ||
| 252 | !Cname bf-cfb64 | ||
| 253 | : BF-CFB : bf-cfb | ||
| 254 | !Cname bf-ofb64 | ||
| 255 | : BF-OFB : bf-ofb | ||
| 256 | |||
| 257 | !Cname id-pkix | ||
| 258 | 1 3 6 1 5 5 7 : PKIX | ||
| 259 | |||
| 260 | # PKIX Arcs | ||
| 261 | id-pkix 0 : id-pkix-mod | ||
| 262 | id-pkix 1 : id-pe | ||
| 263 | id-pkix 2 : id-qt | ||
| 264 | id-pkix 3 : id-kp | ||
| 265 | id-pkix 4 : id-it | ||
| 266 | id-pkix 5 : id-pkip | ||
| 267 | id-pkix 6 : id-alg | ||
| 268 | id-pkix 7 : id-cmc | ||
| 269 | id-pkix 8 : id-on | ||
| 270 | id-pkix 9 : id-pda | ||
| 271 | id-pkix 10 : id-aca | ||
| 272 | id-pkix 11 : id-qcs | ||
| 273 | id-pkix 12 : id-cct | ||
| 274 | id-pkix 48 : id-ad | ||
| 275 | |||
| 276 | # PKIX Modules | ||
| 277 | id-pkix-mod 1 : id-pkix1-explicit-88 | ||
| 278 | id-pkix-mod 2 : id-pkix1-implicit-88 | ||
| 279 | id-pkix-mod 3 : id-pkix1-explicit-93 | ||
| 280 | id-pkix-mod 4 : id-pkix1-implicit-93 | ||
| 281 | id-pkix-mod 5 : id-mod-crmf | ||
| 282 | id-pkix-mod 6 : id-mod-cmc | ||
| 283 | id-pkix-mod 7 : id-mod-kea-profile-88 | ||
| 284 | id-pkix-mod 8 : id-mod-kea-profile-93 | ||
| 285 | id-pkix-mod 9 : id-mod-cmp | ||
| 286 | id-pkix-mod 10 : id-mod-qualified-cert-88 | ||
| 287 | id-pkix-mod 11 : id-mod-qualified-cert-93 | ||
| 288 | id-pkix-mod 12 : id-mod-attribute-cert | ||
| 289 | id-pkix-mod 13 : id-mod-timestamp-protocol | ||
| 290 | id-pkix-mod 14 : id-mod-ocsp | ||
| 291 | id-pkix-mod 15 : id-mod-dvcs | ||
| 292 | id-pkix-mod 16 : id-mod-cmp2000 | ||
| 293 | |||
| 294 | # PKIX Private Extensions | ||
| 295 | !Cname info-access | ||
| 296 | id-pe 1 : authorityInfoAccess : Authority Information Access | ||
| 297 | id-pe 2 : biometricInfo : Biometric Info | ||
| 298 | id-pe 3 : qcStatements | ||
| 299 | id-pe 4 : ac-auditEntity | ||
| 300 | id-pe 5 : ac-targeting | ||
| 301 | id-pe 6 : aaControls | ||
| 302 | id-pe 7 : sbqp-ipAddrBlock | ||
| 303 | id-pe 8 : sbqp-autonomousSysNum | ||
| 304 | id-pe 9 : sbqp-routerIdentifier | ||
| 305 | |||
| 306 | # PKIX policyQualifiers for Internet policy qualifiers | ||
| 307 | id-qt 1 : id-qt-cps : Policy Qualifier CPS | ||
| 308 | id-qt 2 : id-qt-unotice : Policy Qualifier User Notice | ||
| 309 | id-qt 3 : textNotice | ||
| 310 | |||
| 311 | # PKIX key purpose identifiers | ||
| 312 | !Cname server-auth | ||
| 313 | id-kp 1 : serverAuth : TLS Web Server Authentication | ||
| 314 | !Cname client-auth | ||
| 315 | id-kp 2 : clientAuth : TLS Web Client Authentication | ||
| 316 | !Cname code-sign | ||
| 317 | id-kp 3 : codeSigning : Code Signing | ||
| 318 | !Cname email-protect | ||
| 319 | id-kp 4 : emailProtection : E-mail Protection | ||
| 320 | id-kp 5 : ipsecEndSystem : IPSec End System | ||
| 321 | id-kp 6 : ipsecTunnel : IPSec Tunnel | ||
| 322 | id-kp 7 : ipsecUser : IPSec User | ||
| 323 | !Cname time-stamp | ||
| 324 | id-kp 8 : timeStamping : Time Stamping | ||
| 325 | # From OCSP spec RFC2560 | ||
| 326 | !Cname OCSP-sign | ||
| 327 | id-kp 9 : OCSPSigning : OCSP Signing | ||
| 328 | id-kp 10 : DVCS : dvcs | ||
| 329 | |||
| 330 | # CMP information types | ||
| 331 | id-it 1 : id-it-caProtEncCert | ||
| 332 | id-it 2 : id-it-signKeyPairTypes | ||
| 333 | id-it 3 : id-it-encKeyPairTypes | ||
| 334 | id-it 4 : id-it-preferredSymmAlg | ||
| 335 | id-it 5 : id-it-caKeyUpdateInfo | ||
| 336 | id-it 6 : id-it-currentCRL | ||
| 337 | id-it 7 : id-it-unsupportedOIDs | ||
| 338 | # obsolete | ||
| 339 | id-it 8 : id-it-subscriptionRequest | ||
| 340 | # obsolete | ||
| 341 | id-it 9 : id-it-subscriptionResponse | ||
| 342 | id-it 10 : id-it-keyPairParamReq | ||
| 343 | id-it 11 : id-it-keyPairParamRep | ||
| 344 | id-it 12 : id-it-revPassphrase | ||
| 345 | id-it 13 : id-it-implicitConfirm | ||
| 346 | id-it 14 : id-it-confirmWaitTime | ||
| 347 | id-it 15 : id-it-origPKIMessage | ||
| 348 | |||
| 349 | # CRMF registration | ||
| 350 | id-pkip 1 : id-regCtrl | ||
| 351 | id-pkip 2 : id-regInfo | ||
| 352 | |||
| 353 | # CRMF registration controls | ||
| 354 | id-regCtrl 1 : id-regCtrl-regToken | ||
| 355 | id-regCtrl 2 : id-regCtrl-authenticator | ||
| 356 | id-regCtrl 3 : id-regCtrl-pkiPublicationInfo | ||
| 357 | id-regCtrl 4 : id-regCtrl-pkiArchiveOptions | ||
| 358 | id-regCtrl 5 : id-regCtrl-oldCertID | ||
| 359 | id-regCtrl 6 : id-regCtrl-protocolEncrKey | ||
| 360 | |||
| 361 | # CRMF registration information | ||
| 362 | id-regInfo 1 : id-regInfo-utf8Pairs | ||
| 363 | id-regInfo 2 : id-regInfo-certReq | ||
| 364 | |||
| 365 | # algorithms | ||
| 366 | id-alg 1 : id-alg-des40 | ||
| 367 | id-alg 2 : id-alg-noSignature | ||
| 368 | id-alg 3 : id-alg-dh-sig-hmac-sha1 | ||
| 369 | id-alg 4 : id-alg-dh-pop | ||
| 370 | |||
| 371 | # CMC controls | ||
| 372 | id-cmc 1 : id-cmc-statusInfo | ||
| 373 | id-cmc 2 : id-cmc-identification | ||
| 374 | id-cmc 3 : id-cmc-identityProof | ||
| 375 | id-cmc 4 : id-cmc-dataReturn | ||
| 376 | id-cmc 5 : id-cmc-transactionId | ||
| 377 | id-cmc 6 : id-cmc-senderNonce | ||
| 378 | id-cmc 7 : id-cmc-recipientNonce | ||
| 379 | id-cmc 8 : id-cmc-addExtensions | ||
| 380 | id-cmc 9 : id-cmc-encryptedPOP | ||
| 381 | id-cmc 10 : id-cmc-decryptedPOP | ||
| 382 | id-cmc 11 : id-cmc-lraPOPWitness | ||
| 383 | id-cmc 15 : id-cmc-getCert | ||
| 384 | id-cmc 16 : id-cmc-getCRL | ||
| 385 | id-cmc 17 : id-cmc-revokeRequest | ||
| 386 | id-cmc 18 : id-cmc-regInfo | ||
| 387 | id-cmc 19 : id-cmc-responseInfo | ||
| 388 | id-cmc 21 : id-cmc-queryPending | ||
| 389 | id-cmc 22 : id-cmc-popLinkRandom | ||
| 390 | id-cmc 23 : id-cmc-popLinkWitness | ||
| 391 | id-cmc 24 : id-cmc-confirmCertAcceptance | ||
| 392 | |||
| 393 | # other names | ||
| 394 | id-on 1 : id-on-personalData | ||
| 395 | |||
| 396 | # personal data attributes | ||
| 397 | id-pda 1 : id-pda-dateOfBirth | ||
| 398 | id-pda 2 : id-pda-placeOfBirth | ||
| 399 | id-pda 3 : id-pda-pseudonym | ||
| 400 | id-pda 4 : id-pda-gender | ||
| 401 | id-pda 5 : id-pda-countryOfCitizenship | ||
| 402 | id-pda 6 : id-pda-countryOfResidence | ||
| 403 | |||
| 404 | # attribute certificate attributes | ||
| 405 | id-aca 1 : id-aca-authenticationInfo | ||
| 406 | id-aca 2 : id-aca-accessIdentity | ||
| 407 | id-aca 3 : id-aca-chargingIdentity | ||
| 408 | id-aca 4 : id-aca-group | ||
| 409 | id-aca 5 : id-aca-role | ||
| 410 | |||
| 411 | # qualified certificate statements | ||
| 412 | id-qcs 1 : id-qcs-pkixQCSyntax-v1 | ||
| 413 | |||
| 414 | # CMC content types | ||
| 415 | id-cct 1 : id-cct-crs | ||
| 416 | id-cct 2 : id-cct-PKIData | ||
| 417 | id-cct 3 : id-cct-PKIResponse | ||
| 418 | |||
| 419 | # access descriptors for authority info access extension | ||
| 420 | !Cname ad-OCSP | ||
| 421 | id-ad 1 : OCSP : OCSP | ||
| 422 | !Cname ad-ca-issuers | ||
| 423 | id-ad 2 : caIssuers : CA Issuers | ||
| 424 | !Cname ad-timeStamping | ||
| 425 | id-ad 3 : ad_timestamping : AD Time Stamping | ||
| 426 | !Cname ad-dvcs | ||
| 427 | id-ad 4 : AD_DVCS : ad dvcs | ||
| 428 | |||
| 429 | |||
| 430 | !Alias id-pkix-OCSP ad-OCSP | ||
| 431 | !module id-pkix-OCSP | ||
| 432 | !Cname basic | ||
| 433 | id-pkix-OCSP 1 : basicOCSPResponse : Basic OCSP Response | ||
| 434 | id-pkix-OCSP 2 : Nonce : OCSP Nonce | ||
| 435 | id-pkix-OCSP 3 : CrlID : OCSP CRL ID | ||
| 436 | id-pkix-OCSP 4 : acceptableResponses : Acceptable OCSP Responses | ||
| 437 | id-pkix-OCSP 5 : noCheck | ||
| 438 | id-pkix-OCSP 6 : archiveCutoff : OCSP Archive Cutoff | ||
| 439 | id-pkix-OCSP 7 : serviceLocator : OCSP Service Locator | ||
| 440 | id-pkix-OCSP 8 : extendedStatus : Extended OCSP Status | ||
| 441 | id-pkix-OCSP 9 : valid | ||
| 442 | id-pkix-OCSP 10 : path | ||
| 443 | id-pkix-OCSP 11 : trustRoot : Trust Root | ||
| 444 | !global | ||
| 445 | |||
| 446 | 1 3 14 3 2 : algorithm : algorithm | ||
| 447 | algorithm 3 : RSA-NP-MD5 : md5WithRSA | ||
| 448 | algorithm 6 : DES-ECB : des-ecb | ||
| 449 | algorithm 7 : DES-CBC : des-cbc | ||
| 450 | !Cname des-ofb64 | ||
| 451 | algorithm 8 : DES-OFB : des-ofb | ||
| 452 | !Cname des-cfb64 | ||
| 453 | algorithm 9 : DES-CFB : des-cfb | ||
| 34 | algorithm 11 : rsaSignature | 454 | algorithm 11 : rsaSignature |
| 455 | !Cname dsa-2 | ||
| 456 | algorithm 12 : DSA-old : dsaEncryption-old | ||
| 457 | algorithm 13 : DSA-SHA : dsaWithSHA | ||
| 458 | algorithm 15 : RSA-SHA : shaWithRSAEncryption | ||
| 459 | algorithm 17 : DES-EDE : des-ede | ||
| 460 | : DES-EDE3 : des-ede3 | ||
| 461 | : DES-EDE-CBC : des-ede-cbc | ||
| 462 | !Cname des-ede-cfb64 | ||
| 463 | : DES-EDE-CFB : des-ede-cfb | ||
| 464 | !Cname des-ede3-cfb64 | ||
| 465 | : DES-EDE3-CFB : des-ede3-cfb | ||
| 466 | !Cname des-ede-ofb64 | ||
| 467 | : DES-EDE-OFB : des-ede-ofb | ||
| 468 | !Cname des-ede3-ofb64 | ||
| 469 | : DES-EDE3-OFB : des-ede3-ofb | ||
| 470 | : DESX-CBC : desx-cbc | ||
| 471 | algorithm 18 : SHA : sha | ||
| 472 | algorithm 26 : SHA1 : sha1 | ||
| 473 | !Cname dsaWithSHA1-2 | ||
| 474 | algorithm 27 : DSA-SHA1-old : dsaWithSHA1-old | ||
| 475 | algorithm 29 : RSA-SHA1-2 : sha1WithRSA | ||
| 476 | |||
| 477 | 1 3 36 3 2 1 : RIPEMD160 : ripemd160 | ||
| 478 | 1 3 36 3 3 1 2 : RSA-RIPEMD160 : ripemd160WithRSA | ||
| 479 | |||
| 480 | !Cname sxnet | ||
| 481 | 1 3 101 1 4 1 : SXNetID : Strong Extranet ID | ||
| 482 | |||
| 483 | 2 5 : X500 : directory services (X.500) | ||
| 484 | |||
| 485 | X500 4 : X509 | ||
| 486 | X509 3 : CN : commonName | ||
| 487 | X509 4 : S : surname | ||
| 488 | X509 5 : SN : serialNumber | ||
| 489 | X509 6 : C : countryName | ||
| 490 | X509 7 : L : localityName | ||
| 491 | X509 8 : ST : stateOrProvinceName | ||
| 492 | X509 10 : O : organizationName | ||
| 493 | X509 11 : OU : organizationalUnitName | ||
| 494 | X509 12 : T : title | ||
| 495 | X509 13 : D : description | ||
| 496 | X509 41 : name : name | ||
| 497 | X509 42 : G : givenName | ||
| 498 | X509 43 : I : initials | ||
| 499 | X509 45 : UID : uniqueIdentifier | ||
| 500 | X509 46 : dnQualifier : dnQualifier | ||
| 501 | |||
| 502 | X500 8 : X500algorithms : directory services - algorithms | ||
| 503 | X500algorithms 1 1 : RSA : rsa | ||
| 504 | X500algorithms 3 100 : RSA-MDC2 : mdc2WithRSA | ||
| 505 | X500algorithms 3 101 : MDC2 : mdc2 | ||
| 506 | |||
| 507 | X500 29 : id-ce | ||
| 508 | !Cname subject-key-identifier | ||
| 509 | id-ce 14 : subjectKeyIdentifier : X509v3 Subject Key Identifier | ||
| 510 | !Cname key-usage | ||
| 511 | id-ce 15 : keyUsage : X509v3 Key Usage | ||
| 512 | !Cname private-key-usage-period | ||
| 513 | id-ce 16 : privateKeyUsagePeriod : X509v3 Private Key Usage Period | ||
| 514 | !Cname subject-alt-name | ||
| 515 | id-ce 17 : subjectAltName : X509v3 Subject Alternative Name | ||
| 516 | !Cname issuer-alt-name | ||
| 517 | id-ce 18 : issuerAltName : X509v3 Issuer Alternative Name | ||
| 518 | !Cname basic-constraints | ||
| 519 | id-ce 19 : basicConstraints : X509v3 Basic Constraints | ||
| 520 | !Cname crl-number | ||
| 521 | id-ce 20 : crlNumber : X509v3 CRL Number | ||
| 522 | !Cname crl-reason | ||
| 523 | id-ce 21 : CRLReason : X509v3 CRL Reason Code | ||
| 524 | !Cname invalidity-date | ||
| 525 | id-ce 24 : invalidityDate : Invalidity Date | ||
| 526 | !Cname delta-crl | ||
| 527 | id-ce 27 : deltaCRL : X509v3 Delta CRL Indicator | ||
| 528 | !Cname crl-distribution-points | ||
| 529 | id-ce 31 : crlDistributionPoints : X509v3 CRL Distribution Points | ||
| 530 | !Cname certificate-policies | ||
| 531 | id-ce 32 : certificatePolicies : X509v3 Certificate Policies | ||
| 532 | !Cname authority-key-identifier | ||
| 533 | id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier | ||
| 534 | !Cname ext-key-usage | ||
| 535 | id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage | ||
| 536 | |||
| 537 | !Cname netscape | ||
| 538 | 2 16 840 1 113730 : Netscape : Netscape Communications Corp. | ||
| 539 | !Cname netscape-cert-extension | ||
| 540 | netscape 1 : nsCertExt : Netscape Certificate Extension | ||
| 541 | !Cname netscape-data-type | ||
| 542 | netscape 2 : nsDataType : Netscape Data Type | ||
| 543 | !Cname netscape-cert-type | ||
| 544 | netscape-cert-extension 1 : nsCertType : Netscape Cert Type | ||
| 545 | !Cname netscape-base-url | ||
| 546 | netscape-cert-extension 2 : nsBaseUrl : Netscape Base Url | ||
| 547 | !Cname netscape-revocation-url | ||
| 548 | netscape-cert-extension 3 : nsRevocationUrl : Netscape Revocation Url | ||
| 549 | !Cname netscape-ca-revocation-url | ||
| 550 | netscape-cert-extension 4 : nsCaRevocationUrl : Netscape CA Revocation Url | ||
| 551 | !Cname netscape-renewal-url | ||
| 552 | netscape-cert-extension 7 : nsRenewalUrl : Netscape Renewal Url | ||
| 553 | !Cname netscape-ca-policy-url | ||
| 554 | netscape-cert-extension 8 : nsCaPolicyUrl : Netscape CA Policy Url | ||
| 555 | !Cname netscape-ssl-server-name | ||
| 556 | netscape-cert-extension 12 : nsSslServerName : Netscape SSL Server Name | ||
| 557 | !Cname netscape-comment | ||
| 558 | netscape-cert-extension 13 : nsComment : Netscape Comment | ||
| 559 | !Cname netscape-cert-sequence | ||
| 560 | netscape-data-type 5 : nsCertSequence : Netscape Certificate Sequence | ||
| 561 | !Cname ns-sgc | ||
| 562 | netscape 4 1 : nsSGC : Netscape Server Gated Crypto | ||
| 563 | |||
| 564 | # iso(1) | ||
| 565 | iso 3 : ORG : org | ||
| 566 | org 6 : DOD : dod | ||
| 567 | dod 1 : IANA : iana | ||
| 568 | !Alias internet iana | ||
| 569 | |||
| 570 | internet 1 : directory : Directory | ||
| 571 | internet 2 : mgmt : Management | ||
| 572 | internet 3 : experimental : Experimental | ||
| 573 | internet 4 : private : Private | ||
| 574 | internet 5 : security : Security | ||
| 575 | internet 6 : snmpv2 : SNMPv2 | ||
| 576 | internet 7 : mail : Mail | ||
| 577 | |||
| 578 | private 1 : enterprises : Enterprises | ||
| 579 | |||
| 580 | # RFC 2247 | ||
| 581 | enterprises 1466 344 : dcobject : dcObject | ||
| 582 | |||
| 583 | # Stray OIDs we don't know the full name of each step for | ||
| 584 | # RFC 2247 | ||
| 585 | 0 9 2342 19200300 100 1 25 : DC : domainComponent | ||
| 586 | 0 9 2342 19200300 100 4 13 : domain : Domain | ||
| 587 | |||
| 588 | # What the hell are these OIDs, really? | ||
| 589 | !Cname rle-compression | ||
| 590 | 1 1 1 1 666 1 : RLE : run length compression | ||
| 591 | !Cname zlib-compression | ||
| 592 | 1 1 1 1 666 2 : ZLIB : zlib compression | ||
| 35 | 593 | ||
| 36 | algorithm 6 : desECB | ||
| 37 | algorithm 7 : desCBC | ||
| 38 | algorithm 8 : desOFB | ||
| 39 | algorithm 9 : desCFB | ||
| 40 | algorithm 17 : desEDE2 | ||
diff --git a/src/lib/libssl/src/crypto/opensslv.h b/src/lib/libssl/src/crypto/opensslv.h index 55ec97389f..6b5aedeea6 100644 --- a/src/lib/libssl/src/crypto/opensslv.h +++ b/src/lib/libssl/src/crypto/opensslv.h | |||
| @@ -25,8 +25,61 @@ | |||
| 25 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for | 25 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for |
| 26 | * major minor fix final patch/beta) | 26 | * major minor fix final patch/beta) |
| 27 | */ | 27 | */ |
| 28 | #define OPENSSL_VERSION_NUMBER 0x0090581fL | 28 | #define OPENSSL_VERSION_NUMBER 0x0090600fL |
| 29 | #define OPENSSL_VERSION_TEXT "OpenSSL 0.9.5a 1 Apr 2000" | 29 | #define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6 [engine] 24 Sep 2000" |
| 30 | #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT | 30 | #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT |
| 31 | 31 | ||
| 32 | |||
| 33 | /* The macros below are to be used for shared library (.so, .dll, ...) | ||
| 34 | * versioning. That kind of versioning works a bit differently between | ||
| 35 | * operating systems. The most usual scheme is to set a major and a minor | ||
| 36 | * number, and have the runtime loader check that the major number is equal | ||
| 37 | * to what it was at application link time, while the minor number has to | ||
| 38 | * be greater or equal to what it was at application link time. With this | ||
| 39 | * scheme, the version number is usually part of the file name, like this: | ||
| 40 | * | ||
| 41 | * libcrypto.so.0.9 | ||
| 42 | * | ||
| 43 | * Some unixen also make a softlink with the major verson number only: | ||
| 44 | * | ||
| 45 | * libcrypto.so.0 | ||
| 46 | * | ||
| 47 | * On True64 it works a little bit differently. There, the shared library | ||
| 48 | * version is stored in the file, and is actually a series of versions, | ||
| 49 | * separated by colons. The rightmost version present in the library when | ||
| 50 | * linking an application is stored in the application to be matched at | ||
| 51 | * run time. When the application is run, a check is done to see if the | ||
| 52 | * library version stored in the application matches any of the versions | ||
| 53 | * in the version string of the library itself. | ||
| 54 | * This version string can be constructed in any way, depending on what | ||
| 55 | * kind of matching is desired. However, to implement the same scheme as | ||
| 56 | * the one used in the other unixen, all compatible versions, from lowest | ||
| 57 | * to highest, should be part of the string. Consecutive builds would | ||
| 58 | * give the following versions strings: | ||
| 59 | * | ||
| 60 | * 3.0 | ||
| 61 | * 3.0:3.1 | ||
| 62 | * 3.0:3.1:3.2 | ||
| 63 | * 4.0 | ||
| 64 | * 4.0:4.1 | ||
| 65 | * | ||
| 66 | * Notice how version 4 is completely incompatible with version, and | ||
| 67 | * therefore give the breach you can see. | ||
| 68 | * | ||
| 69 | * There may be other schemes as well that I haven't yet discovered. | ||
| 70 | * | ||
| 71 | * So, here's the way it works here: first of all, the library version | ||
| 72 | * number doesn't need at all to match the overall OpenSSL version. | ||
| 73 | * However, it's nice and more understandable if it actually does. | ||
| 74 | * The current library version is stored in the macro SHLIB_VERSION_NUMBER, | ||
| 75 | * which is just a piece of text in the format "M.m.e" (Major, minor, edit). | ||
| 76 | * For the sake of True64 and any other OS that behaves in similar ways, | ||
| 77 | * we need to keep a history of version numbers, which is done in the | ||
| 78 | * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and | ||
| 79 | * should only keep the versions that are binary compatible with the current. | ||
| 80 | */ | ||
| 81 | #define SHLIB_VERSION_HISTORY "" | ||
| 82 | #define SHLIB_VERSION_NUMBER "0.9.6" | ||
| 83 | |||
| 84 | |||
| 32 | #endif /* HEADER_OPENSSLV_H */ | 85 | #endif /* HEADER_OPENSSLV_H */ |
diff --git a/src/lib/libssl/src/crypto/pem/Makefile.ssl b/src/lib/libssl/src/crypto/pem/Makefile.ssl index b95b2b615a..97af8255a3 100644 --- a/src/lib/libssl/src/crypto/pem/Makefile.ssl +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pem/pem.h b/src/lib/libssl/src/crypto/pem/pem.h index e4bae0b4aa..6d3c446577 100644 --- a/src/lib/libssl/src/crypto/pem/pem.h +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pem/pem2.h b/src/lib/libssl/src/crypto/pem/pem2.h index 4a016aacd2..4e484bcd82 100644 --- a/src/lib/libssl/src/crypto/pem/pem2.h +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pem/pem_info.c b/src/lib/libssl/src/crypto/pem/pem_info.c index b65239a920..1c5c6dea00 100644 --- a/src/lib/libssl/src/crypto/pem/pem_info.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pem/pem_lib.c b/src/lib/libssl/src/crypto/pem/pem_lib.c index b5e0a650f8..a17c3ed57f 100644 --- a/src/lib/libssl/src/crypto/pem/pem_lib.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pem/pem_seal.c b/src/lib/libssl/src/crypto/pem/pem_seal.c index 126e29d375..2a6c513348 100644 --- a/src/lib/libssl/src/crypto/pem/pem_seal.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pem/pem_sign.c b/src/lib/libssl/src/crypto/pem/pem_sign.c index aabafb702d..42d598dd78 100644 --- a/src/lib/libssl/src/crypto/pem/pem_sign.c +++ b/src/lib/libssl/src/crypto/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 | ||
diff --git a/src/lib/libssl/src/crypto/pkcs12/Makefile.ssl b/src/lib/libssl/src/crypto/pkcs12/Makefile.ssl index 5716f608b6..67869f204f 100644 --- a/src/lib/libssl/src/crypto/pkcs12/Makefile.ssl +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_add.c b/src/lib/libssl/src/crypto/pkcs12/p12_add.c index d045cbba8d..b563656895 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_add.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_attr.c b/src/lib/libssl/src/crypto/pkcs12/p12_attr.c index f559351d18..f1a210b5d2 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_attr.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_bags.c b/src/lib/libssl/src/crypto/pkcs12/p12_bags.c index c358b06735..56547ef933 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_bags.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_crt.c b/src/lib/libssl/src/crypto/pkcs12/p12_crt.c index ee8aed54c7..a8f7b48882 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_crt.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_decr.c b/src/lib/libssl/src/crypto/pkcs12/p12_decr.c index 4be44eac50..8cd7e2f414 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_decr.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_key.c b/src/lib/libssl/src/crypto/pkcs12/p12_key.c index b364671ed2..b042dcf05c 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_key.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_kiss.c b/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c index ee257ffbad..1fbbd6c99f 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_lib.c b/src/lib/libssl/src/crypto/pkcs12/p12_lib.c index 7ca9c14908..7d464e3a32 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_lib.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_mac.c b/src/lib/libssl/src/crypto/pkcs12/p12_mac.c index f5ab0d6464..fbd1eca24f 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_mac.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_mutl.c b/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c index 369257ed4c..13d866da51 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_npas.c b/src/lib/libssl/src/crypto/pkcs12/p12_npas.c index ee71707e2c..84e31a7f21 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_npas.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_sbag.c b/src/lib/libssl/src/crypto/pkcs12/p12_sbag.c index 1b3addece1..64ac32ee6f 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_sbag.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/p12_utl.c b/src/lib/libssl/src/crypto/pkcs12/p12_utl.c index 2adcbc95e1..17f41b4549 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_utl.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/pkcs12/pkcs12.h b/src/lib/libssl/src/crypto/pkcs12/pkcs12.h index dad356c00f..502fceff95 100644 --- a/src/lib/libssl/src/crypto/pkcs12/pkcs12.h +++ b/src/lib/libssl/src/crypto/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, |
diff --git a/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl b/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl index 0e508386e8..6cd18b671e 100644 --- a/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl +++ b/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl | |||
| @@ -99,12 +99,14 @@ clean: | |||
| 99 | 99 | ||
| 100 | pk7_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 100 | pk7_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 101 | pk7_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 101 | pk7_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 102 | pk7_attr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | 102 | pk7_attr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 103 | pk7_attr.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 103 | pk7_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 104 | pk7_attr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 104 | pk7_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 105 | pk7_attr.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 105 | pk7_attr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 106 | pk7_attr.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 106 | pk7_attr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 107 | pk7_attr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 107 | pk7_attr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 108 | pk7_attr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 109 | pk7_attr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 108 | pk7_attr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 110 | pk7_attr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 109 | pk7_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 111 | pk7_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h |
| 110 | pk7_attr.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 112 | pk7_attr.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h |
| @@ -112,26 +114,29 @@ pk7_attr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | |||
| 112 | pk7_attr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 114 | pk7_attr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 113 | pk7_attr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 115 | pk7_attr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 114 | pk7_attr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 116 | pk7_attr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 115 | pk7_attr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 117 | pk7_attr.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 118 | pk7_attr.o: ../../include/openssl/x509_vfy.h | ||
| 116 | pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 119 | pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 117 | pk7_doit.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 120 | pk7_doit.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 118 | pk7_doit.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 121 | pk7_doit.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 119 | pk7_doit.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 122 | pk7_doit.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 120 | pk7_doit.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 123 | pk7_doit.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 121 | pk7_doit.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 124 | pk7_doit.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 122 | pk7_doit.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 125 | pk7_doit.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 123 | pk7_doit.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 126 | pk7_doit.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 124 | pk7_doit.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 127 | pk7_doit.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 128 | pk7_doit.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 125 | pk7_doit.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 129 | pk7_doit.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 126 | pk7_doit.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 130 | pk7_doit.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 131 | pk7_doit.o: ../../include/openssl/opensslconf.h | ||
| 127 | pk7_doit.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 132 | pk7_doit.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 128 | pk7_doit.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 133 | pk7_doit.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 129 | pk7_doit.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 134 | pk7_doit.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 130 | pk7_doit.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 135 | pk7_doit.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 131 | pk7_doit.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 136 | pk7_doit.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 132 | pk7_doit.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 137 | pk7_doit.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 133 | pk7_doit.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 138 | pk7_doit.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 134 | pk7_doit.o: ../cryptlib.h | 139 | pk7_doit.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 135 | pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 140 | pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 136 | pk7_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 141 | pk7_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 137 | pk7_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 142 | pk7_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -139,14 +144,16 @@ pk7_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 139 | pk7_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 144 | pk7_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 140 | pk7_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 145 | pk7_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 141 | pk7_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 146 | pk7_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 142 | pk7_lib.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 147 | pk7_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 148 | pk7_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 143 | pk7_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 149 | pk7_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 144 | pk7_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 150 | pk7_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 145 | pk7_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 151 | pk7_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 146 | pk7_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 152 | pk7_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 147 | pk7_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 153 | pk7_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 148 | pk7_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 154 | pk7_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 149 | pk7_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 155 | pk7_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 156 | pk7_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 150 | pk7_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 157 | pk7_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 151 | pk7_lib.o: ../cryptlib.h | 158 | pk7_lib.o: ../cryptlib.h |
| 152 | pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 159 | pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -156,47 +163,55 @@ pk7_mime.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 156 | pk7_mime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 163 | pk7_mime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 157 | pk7_mime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 164 | pk7_mime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 158 | pk7_mime.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 165 | pk7_mime.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 159 | pk7_mime.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 166 | pk7_mime.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 167 | pk7_mime.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 160 | pk7_mime.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 168 | pk7_mime.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 161 | pk7_mime.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 169 | pk7_mime.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 170 | pk7_mime.o: ../../include/openssl/opensslconf.h | ||
| 162 | pk7_mime.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 171 | pk7_mime.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 163 | pk7_mime.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 172 | pk7_mime.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 164 | pk7_mime.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 173 | pk7_mime.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 165 | pk7_mime.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 174 | pk7_mime.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 166 | pk7_mime.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 175 | pk7_mime.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 167 | pk7_mime.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 176 | pk7_mime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 168 | pk7_mime.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 177 | pk7_mime.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 178 | pk7_mime.o: ../cryptlib.h | ||
| 169 | pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 179 | pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 170 | pk7_smime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 180 | pk7_smime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 171 | pk7_smime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 181 | pk7_smime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 172 | pk7_smime.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 182 | pk7_smime.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 173 | pk7_smime.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 183 | pk7_smime.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 174 | pk7_smime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 184 | pk7_smime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 175 | pk7_smime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 185 | pk7_smime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 176 | pk7_smime.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 186 | pk7_smime.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 177 | pk7_smime.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 187 | pk7_smime.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 188 | pk7_smime.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 178 | pk7_smime.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 189 | pk7_smime.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 179 | pk7_smime.o: ../../include/openssl/objects.h | 190 | pk7_smime.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 180 | pk7_smime.o: ../../include/openssl/opensslconf.h | 191 | pk7_smime.o: ../../include/openssl/opensslconf.h |
| 181 | pk7_smime.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 192 | pk7_smime.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 182 | pk7_smime.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 193 | pk7_smime.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 183 | pk7_smime.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 194 | pk7_smime.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 184 | pk7_smime.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 195 | pk7_smime.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 185 | pk7_smime.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 196 | pk7_smime.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 186 | pk7_smime.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 197 | pk7_smime.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 187 | pk7_smime.o: ../../include/openssl/x509v3.h ../cryptlib.h | 198 | pk7_smime.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 199 | pk7_smime.o: ../cryptlib.h | ||
| 188 | pkcs7err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 200 | pkcs7err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 189 | pkcs7err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 201 | pkcs7err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 190 | pkcs7err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | 202 | pkcs7err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 191 | pkcs7err.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 203 | pkcs7err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 192 | pkcs7err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 204 | pkcs7err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 193 | pkcs7err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 205 | pkcs7err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 194 | pkcs7err.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 206 | pkcs7err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 195 | pkcs7err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 207 | pkcs7err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 208 | pkcs7err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 209 | pkcs7err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 196 | pkcs7err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 210 | pkcs7err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 197 | pkcs7err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 211 | pkcs7err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 198 | pkcs7err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 212 | pkcs7err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 199 | pkcs7err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 213 | pkcs7err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 200 | pkcs7err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 214 | pkcs7err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 201 | pkcs7err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 215 | pkcs7err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 202 | pkcs7err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 216 | pkcs7err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 217 | pkcs7err.o: ../../include/openssl/x509_vfy.h | ||
diff --git a/src/lib/libssl/src/crypto/pkcs7/bio_ber.c b/src/lib/libssl/src/crypto/pkcs7/bio_ber.c index 4803966fd2..5447e69818 100644 --- a/src/lib/libssl/src/crypto/pkcs7/bio_ber.c +++ b/src/lib/libssl/src/crypto/pkcs7/bio_ber.c | |||
| @@ -128,7 +128,7 @@ static int ber_new(BIO *bi) | |||
| 128 | { | 128 | { |
| 129 | BIO_BER_CTX *ctx; | 129 | BIO_BER_CTX *ctx; |
| 130 | 130 | ||
| 131 | ctx=(BIO_BER_CTX *)Malloc(sizeof(BIO_BER_CTX)); | 131 | ctx=(BIO_BER_CTX *)OPENSSL_malloc(sizeof(BIO_BER_CTX)); |
| 132 | if (ctx == NULL) return(0); | 132 | if (ctx == NULL) return(0); |
| 133 | 133 | ||
| 134 | memset((char *)ctx,0,sizeof(BIO_BER_CTX)); | 134 | memset((char *)ctx,0,sizeof(BIO_BER_CTX)); |
| @@ -146,7 +146,7 @@ static int ber_free(BIO *a) | |||
| 146 | if (a == NULL) return(0); | 146 | if (a == NULL) return(0); |
| 147 | b=(BIO_BER_CTX *)a->ptr; | 147 | b=(BIO_BER_CTX *)a->ptr; |
| 148 | memset(a->ptr,0,sizeof(BIO_BER_CTX)); | 148 | memset(a->ptr,0,sizeof(BIO_BER_CTX)); |
| 149 | Free(a->ptr); | 149 | OPENSSL_free(a->ptr); |
| 150 | a->ptr=NULL; | 150 | a->ptr=NULL; |
| 151 | a->init=0; | 151 | a->init=0; |
| 152 | a->flags=0; | 152 | a->flags=0; |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c b/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c index 3b9c0fe3f2..6ae264cbf9 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c | |||
| @@ -12,22 +12,24 @@ | |||
| 12 | #include <openssl/asn1.h> | 12 | #include <openssl/asn1.h> |
| 13 | #include <openssl/pem.h> | 13 | #include <openssl/pem.h> |
| 14 | #include <openssl/pkcs7.h> | 14 | #include <openssl/pkcs7.h> |
| 15 | #include <openssl/x509.h> | ||
| 15 | #include <openssl/err.h> | 16 | #include <openssl/err.h> |
| 16 | 17 | ||
| 17 | int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK *cap) | 18 | int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK_OF(X509_ALGOR) *cap) |
| 18 | { | 19 | { |
| 19 | ASN1_STRING *seq; | 20 | ASN1_STRING *seq; |
| 20 | unsigned char *p, *pp; | 21 | unsigned char *p, *pp; |
| 21 | int len; | 22 | int len; |
| 22 | len=i2d_ASN1_SET(cap,NULL,i2d_X509_ALGOR, V_ASN1_SEQUENCE, | 23 | len=i2d_ASN1_SET_OF_X509_ALGOR(cap,NULL,i2d_X509_ALGOR, |
| 23 | V_ASN1_UNIVERSAL, IS_SEQUENCE); | 24 | V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, |
| 24 | if(!(pp=(unsigned char *)Malloc(len))) { | 25 | IS_SEQUENCE); |
| 26 | if(!(pp=(unsigned char *)OPENSSL_malloc(len))) { | ||
| 25 | PKCS7err(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP,ERR_R_MALLOC_FAILURE); | 27 | PKCS7err(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP,ERR_R_MALLOC_FAILURE); |
| 26 | return 0; | 28 | return 0; |
| 27 | } | 29 | } |
| 28 | p=pp; | 30 | p=pp; |
| 29 | i2d_ASN1_SET(cap,&p,i2d_X509_ALGOR, V_ASN1_SEQUENCE, | 31 | i2d_ASN1_SET_OF_X509_ALGOR(cap,&p,i2d_X509_ALGOR, V_ASN1_SEQUENCE, |
| 30 | V_ASN1_UNIVERSAL, IS_SEQUENCE); | 32 | V_ASN1_UNIVERSAL, IS_SEQUENCE); |
| 31 | if(!(seq = ASN1_STRING_new())) { | 33 | if(!(seq = ASN1_STRING_new())) { |
| 32 | PKCS7err(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP,ERR_R_MALLOC_FAILURE); | 34 | PKCS7err(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP,ERR_R_MALLOC_FAILURE); |
| 33 | return 0; | 35 | return 0; |
| @@ -36,27 +38,29 @@ int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK *cap) | |||
| 36 | PKCS7err(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP,ERR_R_MALLOC_FAILURE); | 38 | PKCS7err(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP,ERR_R_MALLOC_FAILURE); |
| 37 | return 0; | 39 | return 0; |
| 38 | } | 40 | } |
| 39 | Free (pp); | 41 | OPENSSL_free (pp); |
| 40 | return PKCS7_add_signed_attribute(si, NID_SMIMECapabilities, | 42 | return PKCS7_add_signed_attribute(si, NID_SMIMECapabilities, |
| 41 | V_ASN1_SEQUENCE, seq); | 43 | V_ASN1_SEQUENCE, seq); |
| 42 | } | 44 | } |
| 43 | 45 | ||
| 44 | STACK *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si) | 46 | STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si) |
| 45 | { | 47 | { |
| 46 | ASN1_TYPE *cap; | 48 | ASN1_TYPE *cap; |
| 47 | unsigned char *p; | 49 | unsigned char *p; |
| 48 | cap = PKCS7_get_signed_attribute(si, NID_SMIMECapabilities); | 50 | cap = PKCS7_get_signed_attribute(si, NID_SMIMECapabilities); |
| 49 | if (!cap) return NULL; | 51 | if (!cap) return NULL; |
| 50 | p = cap->value.sequence->data; | 52 | p = cap->value.sequence->data; |
| 51 | return d2i_ASN1_SET (NULL, &p, cap->value.sequence->length, | 53 | return d2i_ASN1_SET_OF_X509_ALGOR(NULL, &p, |
| 52 | (char *(*)())d2i_X509_ALGOR, X509_ALGOR_free, V_ASN1_SEQUENCE, | 54 | cap->value.sequence->length, |
| 53 | V_ASN1_UNIVERSAL); | 55 | d2i_X509_ALGOR, X509_ALGOR_free, |
| 56 | V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); | ||
| 54 | } | 57 | } |
| 55 | 58 | ||
| 56 | /* Basic smime-capabilities OID and optional integer arg */ | 59 | /* Basic smime-capabilities OID and optional integer arg */ |
| 57 | int PKCS7_simple_smimecap(STACK *sk, int nid, int arg) | 60 | int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg) |
| 58 | { | 61 | { |
| 59 | X509_ALGOR *alg; | 62 | X509_ALGOR *alg; |
| 63 | |||
| 60 | if(!(alg = X509_ALGOR_new())) { | 64 | if(!(alg = X509_ALGOR_new())) { |
| 61 | PKCS7err(PKCS7_F_PKCS7_SIMPLE_SMIMECAP,ERR_R_MALLOC_FAILURE); | 65 | PKCS7err(PKCS7_F_PKCS7_SIMPLE_SMIMECAP,ERR_R_MALLOC_FAILURE); |
| 62 | return 0; | 66 | return 0; |
| @@ -80,6 +84,6 @@ int PKCS7_simple_smimecap(STACK *sk, int nid, int arg) | |||
| 80 | alg->parameter->value.integer = nbit; | 84 | alg->parameter->value.integer = nbit; |
| 81 | alg->parameter->type = V_ASN1_INTEGER; | 85 | alg->parameter->type = V_ASN1_INTEGER; |
| 82 | } | 86 | } |
| 83 | sk_push (sk, (char *)alg); | 87 | sk_X509_ALGOR_push (sk, alg); |
| 84 | return 1; | 88 | return 1; |
| 85 | } | 89 | } |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c index 4ab24a86f5..099e9651c1 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c | |||
| @@ -189,7 +189,7 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) | |||
| 189 | EVP_PKEY_free(pkey); | 189 | EVP_PKEY_free(pkey); |
| 190 | if (max < jj) max=jj; | 190 | if (max < jj) max=jj; |
| 191 | } | 191 | } |
| 192 | if ((tmp=(unsigned char *)Malloc(max)) == NULL) | 192 | if ((tmp=(unsigned char *)OPENSSL_malloc(max)) == NULL) |
| 193 | { | 193 | { |
| 194 | PKCS7err(PKCS7_F_PKCS7_DATAINIT,ERR_R_MALLOC_FAILURE); | 194 | PKCS7err(PKCS7_F_PKCS7_DATAINIT,ERR_R_MALLOC_FAILURE); |
| 195 | goto err; | 195 | goto err; |
| @@ -203,12 +203,12 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) | |||
| 203 | if (jj <= 0) | 203 | if (jj <= 0) |
| 204 | { | 204 | { |
| 205 | PKCS7err(PKCS7_F_PKCS7_DATAINIT,ERR_R_EVP_LIB); | 205 | PKCS7err(PKCS7_F_PKCS7_DATAINIT,ERR_R_EVP_LIB); |
| 206 | Free(tmp); | 206 | OPENSSL_free(tmp); |
| 207 | goto err; | 207 | goto err; |
| 208 | } | 208 | } |
| 209 | M_ASN1_OCTET_STRING_set(ri->enc_key,tmp,jj); | 209 | M_ASN1_OCTET_STRING_set(ri->enc_key,tmp,jj); |
| 210 | } | 210 | } |
| 211 | Free(tmp); | 211 | OPENSSL_free(tmp); |
| 212 | memset(key, 0, keylen); | 212 | memset(key, 0, keylen); |
| 213 | 213 | ||
| 214 | if (out == NULL) | 214 | if (out == NULL) |
| @@ -265,13 +265,6 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) | |||
| 265 | STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL; | 265 | STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL; |
| 266 | X509_ALGOR *xalg=NULL; | 266 | X509_ALGOR *xalg=NULL; |
| 267 | PKCS7_RECIP_INFO *ri=NULL; | 267 | PKCS7_RECIP_INFO *ri=NULL; |
| 268 | #ifndef NO_RC2 | ||
| 269 | char is_rc2 = 0; | ||
| 270 | #endif | ||
| 271 | /* EVP_PKEY *pkey; */ | ||
| 272 | #if 0 | ||
| 273 | X509_STORE_CTX s_ctx; | ||
| 274 | #endif | ||
| 275 | 268 | ||
| 276 | i=OBJ_obj2nid(p7->type); | 269 | i=OBJ_obj2nid(p7->type); |
| 277 | p7->state=PKCS7_S_HEADER; | 270 | p7->state=PKCS7_S_HEADER; |
| @@ -312,16 +305,6 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) | |||
| 312 | goto err; | 305 | goto err; |
| 313 | } | 306 | } |
| 314 | 307 | ||
| 315 | if(EVP_CIPHER_nid(evp_cipher) == NID_rc2_cbc) | ||
| 316 | { | ||
| 317 | #ifndef NO_RC2 | ||
| 318 | is_rc2 = 1; | ||
| 319 | #else | ||
| 320 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE); | ||
| 321 | goto err; | ||
| 322 | #endif | ||
| 323 | } | ||
| 324 | |||
| 325 | /* We will be checking the signature */ | 308 | /* We will be checking the signature */ |
| 326 | if (md_sk != NULL) | 309 | if (md_sk != NULL) |
| 327 | { | 310 | { |
| @@ -391,7 +374,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) | |||
| 391 | } | 374 | } |
| 392 | 375 | ||
| 393 | jj=EVP_PKEY_size(pkey); | 376 | jj=EVP_PKEY_size(pkey); |
| 394 | tmp=(unsigned char *)Malloc(jj+10); | 377 | tmp=(unsigned char *)OPENSSL_malloc(jj+10); |
| 395 | if (tmp == NULL) | 378 | if (tmp == NULL) |
| 396 | { | 379 | { |
| 397 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,ERR_R_MALLOC_FAILURE); | 380 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,ERR_R_MALLOC_FAILURE); |
| @@ -413,24 +396,18 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) | |||
| 413 | return(NULL); | 396 | return(NULL); |
| 414 | 397 | ||
| 415 | if (jj != EVP_CIPHER_CTX_key_length(evp_ctx)) { | 398 | if (jj != EVP_CIPHER_CTX_key_length(evp_ctx)) { |
| 416 | /* HACK: some S/MIME clients don't use the same key | 399 | /* Some S/MIME clients don't use the same key |
| 417 | * and effective key length. The key length is | 400 | * and effective key length. The key length is |
| 418 | * determined by the size of the decrypted RSA key. | 401 | * determined by the size of the decrypted RSA key. |
| 419 | * So we hack things to manually set the RC2 key | ||
| 420 | * because we currently can't do this with the EVP | ||
| 421 | * interface. | ||
| 422 | */ | 402 | */ |
| 423 | #ifndef NO_RC2 | 403 | if(!EVP_CIPHER_CTX_set_key_length(evp_ctx, jj)) |
| 424 | if(is_rc2) RC2_set_key(&(evp_ctx->c.rc2_ks),jj, tmp, | ||
| 425 | EVP_CIPHER_CTX_key_length(evp_ctx)*8); | ||
| 426 | else | ||
| 427 | #endif | ||
| 428 | { | 404 | { |
| 429 | PKCS7err(PKCS7_F_PKCS7_DATADECODE, | 405 | PKCS7err(PKCS7_F_PKCS7_DATADECODE, |
| 430 | PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH); | 406 | PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH); |
| 431 | goto err; | 407 | goto err; |
| 432 | } | 408 | } |
| 433 | } else EVP_CipherInit(evp_ctx,NULL,tmp,NULL,0); | 409 | } |
| 410 | EVP_CipherInit(evp_ctx,NULL,tmp,NULL,0); | ||
| 434 | 411 | ||
| 435 | memset(tmp,0,jj); | 412 | memset(tmp,0,jj); |
| 436 | 413 | ||
| @@ -479,7 +456,7 @@ err: | |||
| 479 | out=NULL; | 456 | out=NULL; |
| 480 | } | 457 | } |
| 481 | if (tmp != NULL) | 458 | if (tmp != NULL) |
| 482 | Free(tmp); | 459 | OPENSSL_free(tmp); |
| 483 | return(out); | 460 | return(out); |
| 484 | } | 461 | } |
| 485 | 462 | ||
| @@ -557,7 +534,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
| 557 | if (EVP_MD_CTX_type(mdc) == j) | 534 | if (EVP_MD_CTX_type(mdc) == j) |
| 558 | break; | 535 | break; |
| 559 | else | 536 | else |
| 560 | btmp=btmp->next_bio; | 537 | btmp=BIO_next(btmp); |
| 561 | } | 538 | } |
| 562 | 539 | ||
| 563 | /* We now have the EVP_MD_CTX, lets do the | 540 | /* We now have the EVP_MD_CTX, lets do the |
| @@ -601,13 +578,13 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
| 601 | x=i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,NULL, | 578 | x=i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,NULL, |
| 602 | i2d_X509_ATTRIBUTE, | 579 | i2d_X509_ATTRIBUTE, |
| 603 | V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET); | 580 | V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET); |
| 604 | pp=(unsigned char *)Malloc(x); | 581 | pp=(unsigned char *)OPENSSL_malloc(x); |
| 605 | p=pp; | 582 | p=pp; |
| 606 | i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,&p, | 583 | i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,&p, |
| 607 | i2d_X509_ATTRIBUTE, | 584 | i2d_X509_ATTRIBUTE, |
| 608 | V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET); | 585 | V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET); |
| 609 | EVP_SignUpdate(&ctx_tmp,pp,x); | 586 | EVP_SignUpdate(&ctx_tmp,pp,x); |
| 610 | Free(pp); | 587 | OPENSSL_free(pp); |
| 611 | pp=NULL; | 588 | pp=NULL; |
| 612 | } | 589 | } |
| 613 | 590 | ||
| @@ -650,7 +627,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
| 650 | (unsigned char *)buf_mem->data,buf_mem->length); | 627 | (unsigned char *)buf_mem->data,buf_mem->length); |
| 651 | #endif | 628 | #endif |
| 652 | } | 629 | } |
| 653 | if (pp != NULL) Free(pp); | 630 | if (pp != NULL) OPENSSL_free(pp); |
| 654 | pp=NULL; | 631 | pp=NULL; |
| 655 | 632 | ||
| 656 | ret=1; | 633 | ret=1; |
| @@ -749,7 +726,7 @@ int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, | |||
| 749 | } | 726 | } |
| 750 | if (EVP_MD_CTX_type(mdc) == md_type) | 727 | if (EVP_MD_CTX_type(mdc) == md_type) |
| 751 | break; | 728 | break; |
| 752 | btmp=btmp->next_bio; | 729 | btmp=BIO_next(btmp); |
| 753 | } | 730 | } |
| 754 | 731 | ||
| 755 | /* mdc is the digest ctx that we want, unless there are attributes, | 732 | /* mdc is the digest ctx that we want, unless there are attributes, |
| @@ -795,13 +772,13 @@ for (ii=0; ii<md_len; ii++) printf("%02X",md_dat[ii]); printf(" calc\n"); | |||
| 795 | */ | 772 | */ |
| 796 | i=i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,NULL,i2d_X509_ATTRIBUTE, | 773 | i=i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,NULL,i2d_X509_ATTRIBUTE, |
| 797 | V_ASN1_SET,V_ASN1_UNIVERSAL, IS_SEQUENCE); | 774 | V_ASN1_SET,V_ASN1_UNIVERSAL, IS_SEQUENCE); |
| 798 | pp=Malloc(i); | 775 | pp=OPENSSL_malloc(i); |
| 799 | p=pp; | 776 | p=pp; |
| 800 | i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,&p,i2d_X509_ATTRIBUTE, | 777 | i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,&p,i2d_X509_ATTRIBUTE, |
| 801 | V_ASN1_SET,V_ASN1_UNIVERSAL, IS_SEQUENCE); | 778 | V_ASN1_SET,V_ASN1_UNIVERSAL, IS_SEQUENCE); |
| 802 | EVP_VerifyUpdate(&mdc_tmp,pp,i); | 779 | EVP_VerifyUpdate(&mdc_tmp,pp,i); |
| 803 | 780 | ||
| 804 | Free(pp); | 781 | OPENSSL_free(pp); |
| 805 | } | 782 | } |
| 806 | 783 | ||
| 807 | os=si->enc_digest; | 784 | os=si->enc_digest; |
| @@ -932,7 +909,7 @@ static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype, | |||
| 932 | 909 | ||
| 933 | if (*sk == NULL) | 910 | if (*sk == NULL) |
| 934 | { | 911 | { |
| 935 | *sk = sk_X509_ATTRIBUTE_new(NULL); | 912 | *sk = sk_X509_ATTRIBUTE_new_null(); |
| 936 | new_attrib: | 913 | new_attrib: |
| 937 | attr=X509_ATTRIBUTE_create(nid,atrtype,value); | 914 | attr=X509_ATTRIBUTE_create(nid,atrtype,value); |
| 938 | sk_X509_ATTRIBUTE_push(*sk,attr); | 915 | sk_X509_ATTRIBUTE_push(*sk,attr); |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c b/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c index 734643be28..994473c0bd 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c | |||
| @@ -70,16 +70,21 @@ | |||
| 70 | */ | 70 | */ |
| 71 | 71 | ||
| 72 | typedef struct { | 72 | typedef struct { |
| 73 | char *name; /* Name of line e.g. "content-type" */ | ||
| 74 | char *value; /* Value of line e.g. "text/plain" */ | ||
| 75 | STACK /* MIME_PARAM */ *params; /* Zero or more parameters */ | ||
| 76 | } MIME_HEADER; | ||
| 77 | |||
| 78 | typedef struct { | ||
| 79 | char *param_name; /* Param name e.g. "micalg" */ | 73 | char *param_name; /* Param name e.g. "micalg" */ |
| 80 | char *param_value; /* Param value e.g. "sha1" */ | 74 | char *param_value; /* Param value e.g. "sha1" */ |
| 81 | } MIME_PARAM; | 75 | } MIME_PARAM; |
| 82 | 76 | ||
| 77 | DECLARE_STACK_OF(MIME_PARAM) | ||
| 78 | IMPLEMENT_STACK_OF(MIME_PARAM) | ||
| 79 | |||
| 80 | typedef struct { | ||
| 81 | char *name; /* Name of line e.g. "content-type" */ | ||
| 82 | char *value; /* Value of line e.g. "text/plain" */ | ||
| 83 | STACK_OF(MIME_PARAM) *params; /* Zero or more parameters */ | ||
| 84 | } MIME_HEADER; | ||
| 85 | |||
| 86 | DECLARE_STACK_OF(MIME_HEADER) | ||
| 87 | IMPLEMENT_STACK_OF(MIME_HEADER) | ||
| 83 | 88 | ||
| 84 | static int B64_write_PKCS7(BIO *bio, PKCS7 *p7); | 89 | static int B64_write_PKCS7(BIO *bio, PKCS7 *p7); |
| 85 | static PKCS7 *B64_read_PKCS7(BIO *bio); | 90 | static PKCS7 *B64_read_PKCS7(BIO *bio); |
| @@ -88,14 +93,16 @@ static char * strip_start(char *name); | |||
| 88 | static char * strip_end(char *name); | 93 | static char * strip_end(char *name); |
| 89 | static MIME_HEADER *mime_hdr_new(char *name, char *value); | 94 | static MIME_HEADER *mime_hdr_new(char *name, char *value); |
| 90 | static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value); | 95 | static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value); |
| 91 | static STACK *mime_parse_hdr(BIO *bio); | 96 | static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio); |
| 92 | static int mime_hdr_cmp(MIME_HEADER **a, MIME_HEADER **b); | 97 | static int mime_hdr_cmp(const MIME_HEADER * const *a, |
| 93 | static int mime_param_cmp(MIME_PARAM **a, MIME_PARAM **b); | 98 | const MIME_HEADER * const *b); |
| 99 | static int mime_param_cmp(const MIME_PARAM * const *a, | ||
| 100 | const MIME_PARAM * const *b); | ||
| 94 | static void mime_param_free(MIME_PARAM *param); | 101 | static void mime_param_free(MIME_PARAM *param); |
| 95 | static int mime_bound_check(char *line, int linelen, char *bound, int blen); | 102 | static int mime_bound_check(char *line, int linelen, char *bound, int blen); |
| 96 | static int multi_split(BIO *bio, char *bound, STACK **ret); | 103 | static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret); |
| 97 | static int iscrlf(char c); | 104 | static int iscrlf(char c); |
| 98 | static MIME_HEADER *mime_hdr_find(STACK *hdrs, char *name); | 105 | static MIME_HEADER *mime_hdr_find(STACK_OF(MIME_HEADER) *hdrs, char *name); |
| 99 | static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name); | 106 | static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name); |
| 100 | static void mime_hdr_free(MIME_HEADER *hdr); | 107 | static void mime_hdr_free(MIME_HEADER *hdr); |
| 101 | 108 | ||
| @@ -163,7 +170,7 @@ int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags) | |||
| 163 | BIO_printf(bio, "micalg=sha1 ; boundary=\"----%s\"\n\n", bound); | 170 | BIO_printf(bio, "micalg=sha1 ; boundary=\"----%s\"\n\n", bound); |
| 164 | BIO_printf(bio, "This is an S/MIME signed message\n\n"); | 171 | BIO_printf(bio, "This is an S/MIME signed message\n\n"); |
| 165 | /* Now write out the first part */ | 172 | /* Now write out the first part */ |
| 166 | BIO_printf(bio, "------%s\r\n", bound); | 173 | BIO_printf(bio, "------%s\n", bound); |
| 167 | if(flags & PKCS7_TEXT) BIO_printf(bio, "Content-Type: text/plain\n\n"); | 174 | if(flags & PKCS7_TEXT) BIO_printf(bio, "Content-Type: text/plain\n\n"); |
| 168 | while((i = BIO_read(data, linebuf, MAX_SMLEN)) > 0) | 175 | while((i = BIO_read(data, linebuf, MAX_SMLEN)) > 0) |
| 169 | BIO_write(bio, linebuf, i); | 176 | BIO_write(bio, linebuf, i); |
| @@ -196,8 +203,8 @@ int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags) | |||
| 196 | PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont) | 203 | PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont) |
| 197 | { | 204 | { |
| 198 | BIO *p7in; | 205 | BIO *p7in; |
| 199 | STACK *headers = NULL; | 206 | STACK_OF(MIME_HEADER) *headers = NULL; |
| 200 | STACK *parts = NULL; | 207 | STACK_OF(BIO) *parts = NULL; |
| 201 | MIME_HEADER *hdr; | 208 | MIME_HEADER *hdr; |
| 202 | MIME_PARAM *prm; | 209 | MIME_PARAM *prm; |
| 203 | PKCS7 *p7; | 210 | PKCS7 *p7; |
| @@ -211,7 +218,7 @@ PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont) | |||
| 211 | } | 218 | } |
| 212 | 219 | ||
| 213 | if(!(hdr = mime_hdr_find(headers, "content-type")) || !hdr->value) { | 220 | if(!(hdr = mime_hdr_find(headers, "content-type")) || !hdr->value) { |
| 214 | sk_pop_free(headers, mime_hdr_free); | 221 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 215 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_CONTENT_TYPE); | 222 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_CONTENT_TYPE); |
| 216 | return NULL; | 223 | return NULL; |
| 217 | } | 224 | } |
| @@ -222,24 +229,24 @@ PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont) | |||
| 222 | /* Split into two parts */ | 229 | /* Split into two parts */ |
| 223 | prm = mime_param_find(hdr, "boundary"); | 230 | prm = mime_param_find(hdr, "boundary"); |
| 224 | if(!prm || !prm->param_value) { | 231 | if(!prm || !prm->param_value) { |
| 225 | sk_pop_free(headers, mime_hdr_free); | 232 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 226 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_MULTIPART_BOUNDARY); | 233 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_MULTIPART_BOUNDARY); |
| 227 | return NULL; | 234 | return NULL; |
| 228 | } | 235 | } |
| 229 | ret = multi_split(bio, prm->param_value, &parts); | 236 | ret = multi_split(bio, prm->param_value, &parts); |
| 230 | sk_pop_free(headers, mime_hdr_free); | 237 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 231 | if(!ret || (sk_num(parts) != 2) ) { | 238 | if(!ret || (sk_BIO_num(parts) != 2) ) { |
| 232 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_MULTIPART_BODY_FAILURE); | 239 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_MULTIPART_BODY_FAILURE); |
| 233 | sk_pop_free(parts, (stkfree)BIO_free); | 240 | sk_BIO_pop_free(parts, BIO_vfree); |
| 234 | return NULL; | 241 | return NULL; |
| 235 | } | 242 | } |
| 236 | 243 | ||
| 237 | /* Parse the signature piece */ | 244 | /* Parse the signature piece */ |
| 238 | p7in = (BIO *)sk_value(parts, 1); | 245 | p7in = sk_BIO_value(parts, 1); |
| 239 | 246 | ||
| 240 | if (!(headers = mime_parse_hdr(p7in))) { | 247 | if (!(headers = mime_parse_hdr(p7in))) { |
| 241 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_MIME_SIG_PARSE_ERROR); | 248 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_MIME_SIG_PARSE_ERROR); |
| 242 | sk_pop_free(parts, (stkfree)BIO_free); | 249 | sk_BIO_pop_free(parts, BIO_vfree); |
| 243 | return NULL; | 250 | return NULL; |
| 244 | } | 251 | } |
| 245 | 252 | ||
| @@ -247,32 +254,32 @@ PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont) | |||
| 247 | 254 | ||
| 248 | if(!(hdr = mime_hdr_find(headers, "content-type")) || | 255 | if(!(hdr = mime_hdr_find(headers, "content-type")) || |
| 249 | !hdr->value) { | 256 | !hdr->value) { |
| 250 | sk_pop_free(headers, mime_hdr_free); | 257 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 251 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_SIG_CONTENT_TYPE); | 258 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_SIG_CONTENT_TYPE); |
| 252 | return NULL; | 259 | return NULL; |
| 253 | } | 260 | } |
| 254 | 261 | ||
| 255 | if(strcmp(hdr->value, "application/x-pkcs7-signature") && | 262 | if(strcmp(hdr->value, "application/x-pkcs7-signature") && |
| 256 | strcmp(hdr->value, "application/pkcs7-signature")) { | 263 | strcmp(hdr->value, "application/pkcs7-signature")) { |
| 257 | sk_pop_free(headers, mime_hdr_free); | 264 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 258 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_SIG_INVALID_MIME_TYPE); | 265 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_SIG_INVALID_MIME_TYPE); |
| 259 | ERR_add_error_data(2, "type: ", hdr->value); | 266 | ERR_add_error_data(2, "type: ", hdr->value); |
| 260 | sk_pop_free(parts, (stkfree)BIO_free); | 267 | sk_BIO_pop_free(parts, BIO_vfree); |
| 261 | return NULL; | 268 | return NULL; |
| 262 | } | 269 | } |
| 263 | sk_pop_free(headers, mime_hdr_free); | 270 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 264 | /* Read in PKCS#7 */ | 271 | /* Read in PKCS#7 */ |
| 265 | if(!(p7 = B64_read_PKCS7(p7in))) { | 272 | if(!(p7 = B64_read_PKCS7(p7in))) { |
| 266 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_PKCS7_SIG_PARSE_ERROR); | 273 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_PKCS7_SIG_PARSE_ERROR); |
| 267 | sk_pop_free(parts, (stkfree)BIO_free); | 274 | sk_BIO_pop_free(parts, BIO_vfree); |
| 268 | return NULL; | 275 | return NULL; |
| 269 | } | 276 | } |
| 270 | 277 | ||
| 271 | if(bcont) { | 278 | if(bcont) { |
| 272 | *bcont = (BIO *)sk_value(parts, 0); | 279 | *bcont = sk_BIO_value(parts, 0); |
| 273 | BIO_free(p7in); | 280 | BIO_free(p7in); |
| 274 | sk_free(parts); | 281 | sk_BIO_free(parts); |
| 275 | } else sk_pop_free(parts, (stkfree)BIO_free); | 282 | } else sk_BIO_pop_free(parts, BIO_vfree); |
| 276 | return p7; | 283 | return p7; |
| 277 | } | 284 | } |
| 278 | 285 | ||
| @@ -282,11 +289,11 @@ PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont) | |||
| 282 | strcmp (hdr->value, "application/pkcs7-mime")) { | 289 | strcmp (hdr->value, "application/pkcs7-mime")) { |
| 283 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_INVALID_MIME_TYPE); | 290 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_INVALID_MIME_TYPE); |
| 284 | ERR_add_error_data(2, "type: ", hdr->value); | 291 | ERR_add_error_data(2, "type: ", hdr->value); |
| 285 | sk_pop_free(headers, mime_hdr_free); | 292 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 286 | return NULL; | 293 | return NULL; |
| 287 | } | 294 | } |
| 288 | 295 | ||
| 289 | sk_pop_free(headers, mime_hdr_free); | 296 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 290 | 297 | ||
| 291 | if(!(p7 = B64_read_PKCS7(bio))) { | 298 | if(!(p7 = B64_read_PKCS7(bio))) { |
| 292 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_PKCS7_PARSE_ERROR); | 299 | PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_PKCS7_PARSE_ERROR); |
| @@ -325,24 +332,25 @@ int SMIME_text(BIO *in, BIO *out) | |||
| 325 | { | 332 | { |
| 326 | char iobuf[4096]; | 333 | char iobuf[4096]; |
| 327 | int len; | 334 | int len; |
| 328 | STACK *headers; | 335 | STACK_OF(MIME_HEADER) *headers; |
| 329 | MIME_HEADER *hdr; | 336 | MIME_HEADER *hdr; |
| 337 | |||
| 330 | if (!(headers = mime_parse_hdr(in))) { | 338 | if (!(headers = mime_parse_hdr(in))) { |
| 331 | PKCS7err(PKCS7_F_SMIME_TEXT,PKCS7_R_MIME_PARSE_ERROR); | 339 | PKCS7err(PKCS7_F_SMIME_TEXT,PKCS7_R_MIME_PARSE_ERROR); |
| 332 | return 0; | 340 | return 0; |
| 333 | } | 341 | } |
| 334 | if(!(hdr = mime_hdr_find(headers, "content-type")) || !hdr->value) { | 342 | if(!(hdr = mime_hdr_find(headers, "content-type")) || !hdr->value) { |
| 335 | PKCS7err(PKCS7_F_SMIME_TEXT,PKCS7_R_MIME_NO_CONTENT_TYPE); | 343 | PKCS7err(PKCS7_F_SMIME_TEXT,PKCS7_R_MIME_NO_CONTENT_TYPE); |
| 336 | sk_pop_free(headers, mime_hdr_free); | 344 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 337 | return 0; | 345 | return 0; |
| 338 | } | 346 | } |
| 339 | if (strcmp (hdr->value, "text/plain")) { | 347 | if (strcmp (hdr->value, "text/plain")) { |
| 340 | PKCS7err(PKCS7_F_SMIME_TEXT,PKCS7_R_INVALID_MIME_TYPE); | 348 | PKCS7err(PKCS7_F_SMIME_TEXT,PKCS7_R_INVALID_MIME_TYPE); |
| 341 | ERR_add_error_data(2, "type: ", hdr->value); | 349 | ERR_add_error_data(2, "type: ", hdr->value); |
| 342 | sk_pop_free(headers, mime_hdr_free); | 350 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 343 | return 0; | 351 | return 0; |
| 344 | } | 352 | } |
| 345 | sk_pop_free(headers, mime_hdr_free); | 353 | sk_MIME_HEADER_pop_free(headers, mime_hdr_free); |
| 346 | while ((len = BIO_read(in, iobuf, sizeof(iobuf))) > 0) | 354 | while ((len = BIO_read(in, iobuf, sizeof(iobuf))) > 0) |
| 347 | BIO_write(out, iobuf, len); | 355 | BIO_write(out, iobuf, len); |
| 348 | return 1; | 356 | return 1; |
| @@ -352,18 +360,19 @@ int SMIME_text(BIO *in, BIO *out) | |||
| 352 | * canonical parts in a STACK of bios | 360 | * canonical parts in a STACK of bios |
| 353 | */ | 361 | */ |
| 354 | 362 | ||
| 355 | static int multi_split(BIO *bio, char *bound, STACK **ret) | 363 | static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret) |
| 356 | { | 364 | { |
| 357 | char linebuf[MAX_SMLEN]; | 365 | char linebuf[MAX_SMLEN]; |
| 358 | int len, blen; | 366 | int len, blen; |
| 359 | BIO *bpart = NULL; | 367 | BIO *bpart = NULL; |
| 360 | STACK *parts; | 368 | STACK_OF(BIO) *parts; |
| 361 | char state, part, first; | 369 | char state, part, first; |
| 370 | |||
| 362 | blen = strlen(bound); | 371 | blen = strlen(bound); |
| 363 | part = 0; | 372 | part = 0; |
| 364 | state = 0; | 373 | state = 0; |
| 365 | first = 1; | 374 | first = 1; |
| 366 | parts = sk_new(NULL); | 375 | parts = sk_BIO_new_null(); |
| 367 | *ret = parts; | 376 | *ret = parts; |
| 368 | while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { | 377 | while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { |
| 369 | state = mime_bound_check(linebuf, len, bound, blen); | 378 | state = mime_bound_check(linebuf, len, bound, blen); |
| @@ -371,12 +380,12 @@ static int multi_split(BIO *bio, char *bound, STACK **ret) | |||
| 371 | first = 1; | 380 | first = 1; |
| 372 | part++; | 381 | part++; |
| 373 | } else if(state == 2) { | 382 | } else if(state == 2) { |
| 374 | sk_push(parts, (char *)bpart); | 383 | sk_BIO_push(parts, bpart); |
| 375 | return 1; | 384 | return 1; |
| 376 | } else if(part) { | 385 | } else if(part) { |
| 377 | if(first) { | 386 | if(first) { |
| 378 | first = 0; | 387 | first = 0; |
| 379 | if(bpart) sk_push(parts, (char *)bpart); | 388 | if(bpart) sk_BIO_push(parts, bpart); |
| 380 | bpart = BIO_new(BIO_s_mem()); | 389 | bpart = BIO_new(BIO_s_mem()); |
| 381 | 390 | ||
| 382 | } else BIO_write(bpart, "\r\n", 2); | 391 | } else BIO_write(bpart, "\r\n", 2); |
| @@ -405,15 +414,16 @@ static int iscrlf(char c) | |||
| 405 | #define MIME_COMMENT 6 | 414 | #define MIME_COMMENT 6 |
| 406 | 415 | ||
| 407 | 416 | ||
| 408 | static STACK *mime_parse_hdr(BIO *bio) | 417 | static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio) |
| 409 | { | 418 | { |
| 410 | char *p, *q, c; | 419 | char *p, *q, c; |
| 411 | char *ntmp; | 420 | char *ntmp; |
| 412 | char linebuf[MAX_SMLEN]; | 421 | char linebuf[MAX_SMLEN]; |
| 413 | MIME_HEADER *mhdr = NULL; | 422 | MIME_HEADER *mhdr = NULL; |
| 414 | STACK *headers; | 423 | STACK_OF(MIME_HEADER) *headers; |
| 415 | int len, state, save_state = 0; | 424 | int len, state, save_state = 0; |
| 416 | headers = sk_new(mime_hdr_cmp); | 425 | |
| 426 | headers = sk_MIME_HEADER_new(mime_hdr_cmp); | ||
| 417 | while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { | 427 | while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { |
| 418 | /* If whitespace at line start then continuation line */ | 428 | /* If whitespace at line start then continuation line */ |
| 419 | if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME; | 429 | if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME; |
| @@ -441,7 +451,7 @@ static STACK *mime_parse_hdr(BIO *bio) | |||
| 441 | mime_debug("Found End Value\n"); | 451 | mime_debug("Found End Value\n"); |
| 442 | *p = 0; | 452 | *p = 0; |
| 443 | mhdr = mime_hdr_new(ntmp, strip_ends(q)); | 453 | mhdr = mime_hdr_new(ntmp, strip_ends(q)); |
| 444 | sk_push(headers, (char *)mhdr); | 454 | sk_MIME_HEADER_push(headers, mhdr); |
| 445 | ntmp = NULL; | 455 | ntmp = NULL; |
| 446 | q = p + 1; | 456 | q = p + 1; |
| 447 | state = MIME_NAME; | 457 | state = MIME_NAME; |
| @@ -493,7 +503,7 @@ static STACK *mime_parse_hdr(BIO *bio) | |||
| 493 | 503 | ||
| 494 | if(state == MIME_TYPE) { | 504 | if(state == MIME_TYPE) { |
| 495 | mhdr = mime_hdr_new(ntmp, strip_ends(q)); | 505 | mhdr = mime_hdr_new(ntmp, strip_ends(q)); |
| 496 | sk_push(headers, (char *)mhdr); | 506 | sk_MIME_HEADER_push(headers, mhdr); |
| 497 | } else if(state == MIME_VALUE) | 507 | } else if(state == MIME_VALUE) |
| 498 | mime_hdr_addparam(mhdr, ntmp, strip_ends(q)); | 508 | mime_hdr_addparam(mhdr, ntmp, strip_ends(q)); |
| 499 | if(p == linebuf) break; /* Blank line means end of headers */ | 509 | if(p == linebuf) break; /* Blank line means end of headers */ |
| @@ -569,11 +579,11 @@ static MIME_HEADER *mime_hdr_new(char *name, char *value) | |||
| 569 | } | 579 | } |
| 570 | } | 580 | } |
| 571 | } else tmpval = NULL; | 581 | } else tmpval = NULL; |
| 572 | mhdr = (MIME_HEADER *) Malloc(sizeof(MIME_HEADER)); | 582 | mhdr = (MIME_HEADER *) OPENSSL_malloc(sizeof(MIME_HEADER)); |
| 573 | if(!mhdr) return NULL; | 583 | if(!mhdr) return NULL; |
| 574 | mhdr->name = tmpname; | 584 | mhdr->name = tmpname; |
| 575 | mhdr->value = tmpval; | 585 | mhdr->value = tmpval; |
| 576 | if(!(mhdr->params = sk_new(mime_param_cmp))) return NULL; | 586 | if(!(mhdr->params = sk_MIME_PARAM_new(mime_param_cmp))) return NULL; |
| 577 | return mhdr; | 587 | return mhdr; |
| 578 | } | 588 | } |
| 579 | 589 | ||
| @@ -598,34 +608,36 @@ static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value) | |||
| 598 | if(!tmpval) return 0; | 608 | if(!tmpval) return 0; |
| 599 | } else tmpval = NULL; | 609 | } else tmpval = NULL; |
| 600 | /* Parameter values are case sensitive so leave as is */ | 610 | /* Parameter values are case sensitive so leave as is */ |
| 601 | mparam = (MIME_PARAM *) Malloc(sizeof(MIME_PARAM)); | 611 | mparam = (MIME_PARAM *) OPENSSL_malloc(sizeof(MIME_PARAM)); |
| 602 | if(!mparam) return 0; | 612 | if(!mparam) return 0; |
| 603 | mparam->param_name = tmpname; | 613 | mparam->param_name = tmpname; |
| 604 | mparam->param_value = tmpval; | 614 | mparam->param_value = tmpval; |
| 605 | sk_push(mhdr->params, (char *)mparam); | 615 | sk_MIME_PARAM_push(mhdr->params, mparam); |
| 606 | return 1; | 616 | return 1; |
| 607 | } | 617 | } |
| 608 | 618 | ||
| 609 | static int mime_hdr_cmp(MIME_HEADER **a, MIME_HEADER **b) | 619 | static int mime_hdr_cmp(const MIME_HEADER * const *a, |
| 620 | const MIME_HEADER * const *b) | ||
| 610 | { | 621 | { |
| 611 | return(strcmp((*a)->name, (*b)->name)); | 622 | return(strcmp((*a)->name, (*b)->name)); |
| 612 | } | 623 | } |
| 613 | 624 | ||
| 614 | static int mime_param_cmp(MIME_PARAM **a, MIME_PARAM **b) | 625 | static int mime_param_cmp(const MIME_PARAM * const *a, |
| 626 | const MIME_PARAM * const *b) | ||
| 615 | { | 627 | { |
| 616 | return(strcmp((*a)->param_name, (*b)->param_name)); | 628 | return(strcmp((*a)->param_name, (*b)->param_name)); |
| 617 | } | 629 | } |
| 618 | 630 | ||
| 619 | /* Find a header with a given name (if possible) */ | 631 | /* Find a header with a given name (if possible) */ |
| 620 | 632 | ||
| 621 | static MIME_HEADER *mime_hdr_find(STACK *hdrs, char *name) | 633 | static MIME_HEADER *mime_hdr_find(STACK_OF(MIME_HEADER) *hdrs, char *name) |
| 622 | { | 634 | { |
| 623 | MIME_HEADER htmp; | 635 | MIME_HEADER htmp; |
| 624 | int idx; | 636 | int idx; |
| 625 | htmp.name = name; | 637 | htmp.name = name; |
| 626 | idx = sk_find(hdrs, (char *)&htmp); | 638 | idx = sk_MIME_HEADER_find(hdrs, &htmp); |
| 627 | if(idx < 0) return NULL; | 639 | if(idx < 0) return NULL; |
| 628 | return (MIME_HEADER *)sk_value(hdrs, idx); | 640 | return sk_MIME_HEADER_value(hdrs, idx); |
| 629 | } | 641 | } |
| 630 | 642 | ||
| 631 | static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name) | 643 | static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name) |
| @@ -633,24 +645,24 @@ static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name) | |||
| 633 | MIME_PARAM param; | 645 | MIME_PARAM param; |
| 634 | int idx; | 646 | int idx; |
| 635 | param.param_name = name; | 647 | param.param_name = name; |
| 636 | idx = sk_find(hdr->params, (char *)¶m); | 648 | idx = sk_MIME_PARAM_find(hdr->params, ¶m); |
| 637 | if(idx < 0) return NULL; | 649 | if(idx < 0) return NULL; |
| 638 | return (MIME_PARAM *)sk_value(hdr->params, idx); | 650 | return sk_MIME_PARAM_value(hdr->params, idx); |
| 639 | } | 651 | } |
| 640 | 652 | ||
| 641 | static void mime_hdr_free(MIME_HEADER *hdr) | 653 | static void mime_hdr_free(MIME_HEADER *hdr) |
| 642 | { | 654 | { |
| 643 | if(hdr->name) Free(hdr->name); | 655 | if(hdr->name) OPENSSL_free(hdr->name); |
| 644 | if(hdr->value) Free(hdr->value); | 656 | if(hdr->value) OPENSSL_free(hdr->value); |
| 645 | if(hdr->params) sk_pop_free(hdr->params, mime_param_free); | 657 | if(hdr->params) sk_MIME_PARAM_pop_free(hdr->params, mime_param_free); |
| 646 | Free(hdr); | 658 | OPENSSL_free(hdr); |
| 647 | } | 659 | } |
| 648 | 660 | ||
| 649 | static void mime_param_free(MIME_PARAM *param) | 661 | static void mime_param_free(MIME_PARAM *param) |
| 650 | { | 662 | { |
| 651 | if(param->param_name) Free(param->param_name); | 663 | if(param->param_name) OPENSSL_free(param->param_name); |
| 652 | if(param->param_value) Free(param->param_value); | 664 | if(param->param_value) OPENSSL_free(param->param_value); |
| 653 | Free(param); | 665 | OPENSSL_free(param); |
| 654 | } | 666 | } |
| 655 | 667 | ||
| 656 | /* Check for a multipart boundary. Returns: | 668 | /* Check for a multipart boundary. Returns: |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c b/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c index b41f42ed04..d716f9faeb 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c | |||
| @@ -64,12 +64,12 @@ | |||
| 64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
| 65 | 65 | ||
| 66 | PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, | 66 | PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, |
| 67 | BIO *data, int flags) | 67 | BIO *data, int flags) |
| 68 | { | 68 | { |
| 69 | PKCS7 *p7; | 69 | PKCS7 *p7; |
| 70 | PKCS7_SIGNER_INFO *si; | 70 | PKCS7_SIGNER_INFO *si; |
| 71 | BIO *p7bio; | 71 | BIO *p7bio; |
| 72 | STACK *smcap; | 72 | STACK_OF(X509_ALGOR) *smcap; |
| 73 | int i; | 73 | int i; |
| 74 | 74 | ||
| 75 | if(!X509_check_private_key(signcert, pkey)) { | 75 | if(!X509_check_private_key(signcert, pkey)) { |
| @@ -109,7 +109,9 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, | |||
| 109 | PKCS7_add_signed_attribute(si, NID_pkcs9_contentType, | 109 | PKCS7_add_signed_attribute(si, NID_pkcs9_contentType, |
| 110 | V_ASN1_OBJECT, OBJ_nid2obj(NID_pkcs7_data)); | 110 | V_ASN1_OBJECT, OBJ_nid2obj(NID_pkcs7_data)); |
| 111 | /* Add SMIMECapabilities */ | 111 | /* Add SMIMECapabilities */ |
| 112 | if(!(smcap = sk_new(NULL))) { | 112 | if(!(flags & PKCS7_NOSMIMECAP)) |
| 113 | { | ||
| 114 | if(!(smcap = sk_X509_ALGOR_new_null())) { | ||
| 113 | PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE); | 115 | PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE); |
| 114 | return NULL; | 116 | return NULL; |
| 115 | } | 117 | } |
| @@ -127,7 +129,8 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, | |||
| 127 | PKCS7_simple_smimecap (smcap, NID_rc2_cbc, 40); | 129 | PKCS7_simple_smimecap (smcap, NID_rc2_cbc, 40); |
| 128 | #endif | 130 | #endif |
| 129 | PKCS7_add_attrib_smimecap (si, smcap); | 131 | PKCS7_add_attrib_smimecap (si, smcap); |
| 130 | sk_pop_free(smcap, X509_ALGOR_free); | 132 | sk_X509_ALGOR_pop_free(smcap, X509_ALGOR_free); |
| 133 | } | ||
| 131 | } | 134 | } |
| 132 | 135 | ||
| 133 | if(flags & PKCS7_DETACHED)PKCS7_set_detached(p7, 1); | 136 | if(flags & PKCS7_DETACHED)PKCS7_set_detached(p7, 1); |
| @@ -150,7 +153,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, | |||
| 150 | PKCS7_SIGNER_INFO *si; | 153 | PKCS7_SIGNER_INFO *si; |
| 151 | X509_STORE_CTX cert_ctx; | 154 | X509_STORE_CTX cert_ctx; |
| 152 | char buf[4096]; | 155 | char buf[4096]; |
| 153 | int i, j=0; | 156 | int i, j=0, k; |
| 154 | BIO *p7bio; | 157 | BIO *p7bio; |
| 155 | BIO *tmpout; | 158 | BIO *tmpout; |
| 156 | 159 | ||
| @@ -169,12 +172,17 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, | |||
| 169 | PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_NO_CONTENT); | 172 | PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_NO_CONTENT); |
| 170 | return 0; | 173 | return 0; |
| 171 | } | 174 | } |
| 175 | #if 0 | ||
| 176 | /* NB: this test commented out because some versions of Netscape | ||
| 177 | * illegally include zero length content when signing data. | ||
| 178 | */ | ||
| 172 | 179 | ||
| 173 | /* Check for data and content: two sets of data */ | 180 | /* Check for data and content: two sets of data */ |
| 174 | if(!PKCS7_get_detached(p7) && indata) { | 181 | if(!PKCS7_get_detached(p7) && indata) { |
| 175 | PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_CONTENT_AND_DATA_PRESENT); | 182 | PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_CONTENT_AND_DATA_PRESENT); |
| 176 | return 0; | 183 | return 0; |
| 177 | } | 184 | } |
| 185 | #endif | ||
| 178 | 186 | ||
| 179 | sinfos = PKCS7_get_signer_info(p7); | 187 | sinfos = PKCS7_get_signer_info(p7); |
| 180 | 188 | ||
| @@ -190,8 +198,8 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, | |||
| 190 | 198 | ||
| 191 | /* Now verify the certificates */ | 199 | /* Now verify the certificates */ |
| 192 | 200 | ||
| 193 | if (!(flags & PKCS7_NOVERIFY)) for (i = 0; i < sk_X509_num(signers); i++) { | 201 | if (!(flags & PKCS7_NOVERIFY)) for (k = 0; k < sk_X509_num(signers); k++) { |
| 194 | signer = sk_X509_value (signers, i); | 202 | signer = sk_X509_value (signers, k); |
| 195 | if (!(flags & PKCS7_NOCHAIN)) { | 203 | if (!(flags & PKCS7_NOCHAIN)) { |
| 196 | X509_STORE_CTX_init(&cert_ctx, store, signer, | 204 | X509_STORE_CTX_init(&cert_ctx, store, signer, |
| 197 | p7->d.sign->cert); | 205 | p7->d.sign->cert); |
| @@ -282,7 +290,7 @@ STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags) | |||
| 282 | PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_WRONG_CONTENT_TYPE); | 290 | PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_WRONG_CONTENT_TYPE); |
| 283 | return NULL; | 291 | return NULL; |
| 284 | } | 292 | } |
| 285 | if(!(signers = sk_X509_new(NULL))) { | 293 | if(!(signers = sk_X509_new_null())) { |
| 286 | PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,ERR_R_MALLOC_FAILURE); | 294 | PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,ERR_R_MALLOC_FAILURE); |
| 287 | return NULL; | 295 | return NULL; |
| 288 | } | 296 | } |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pkcs7.h b/src/lib/libssl/src/crypto/pkcs7/pkcs7.h index 3ec725d226..1b817e605d 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pkcs7.h +++ b/src/lib/libssl/src/crypto/pkcs7/pkcs7.h | |||
| @@ -59,15 +59,13 @@ | |||
| 59 | #ifndef HEADER_PKCS7_H | 59 | #ifndef HEADER_PKCS7_H |
| 60 | #define HEADER_PKCS7_H | 60 | #define HEADER_PKCS7_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
| 67 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
| 68 | 64 | ||
| 69 | #ifdef VMS | 65 | #include <openssl/symhacks.h> |
| 70 | #include <openssl/vms_idhacks.h> | 66 | |
| 67 | #ifdef __cplusplus | ||
| 68 | extern "C" { | ||
| 71 | #endif | 69 | #endif |
| 72 | 70 | ||
| 73 | #ifdef WIN32 | 71 | #ifdef WIN32 |
| @@ -210,9 +208,16 @@ typedef struct pkcs7_st | |||
| 210 | 208 | ||
| 211 | /* NID_pkcs7_encrypted */ | 209 | /* NID_pkcs7_encrypted */ |
| 212 | PKCS7_ENCRYPT *encrypted; | 210 | PKCS7_ENCRYPT *encrypted; |
| 211 | |||
| 212 | /* Anything else */ | ||
| 213 | ASN1_TYPE *other; | ||
| 213 | } d; | 214 | } d; |
| 214 | } PKCS7; | 215 | } PKCS7; |
| 215 | 216 | ||
| 217 | DECLARE_STACK_OF(PKCS7) | ||
| 218 | DECLARE_ASN1_SET_OF(PKCS7) | ||
| 219 | DECLARE_PKCS12_STACK_OF(PKCS7) | ||
| 220 | |||
| 216 | #define PKCS7_OP_SET_DETACHED_SIGNATURE 1 | 221 | #define PKCS7_OP_SET_DETACHED_SIGNATURE 1 |
| 217 | #define PKCS7_OP_GET_DETACHED_SIGNATURE 2 | 222 | #define PKCS7_OP_GET_DETACHED_SIGNATURE 2 |
| 218 | 223 | ||
| @@ -240,15 +245,16 @@ typedef struct pkcs7_st | |||
| 240 | 245 | ||
| 241 | /* S/MIME related flags */ | 246 | /* S/MIME related flags */ |
| 242 | 247 | ||
| 243 | #define PKCS7_TEXT 0x1 | 248 | #define PKCS7_TEXT 0x1 |
| 244 | #define PKCS7_NOCERTS 0x2 | 249 | #define PKCS7_NOCERTS 0x2 |
| 245 | #define PKCS7_NOSIGS 0x4 | 250 | #define PKCS7_NOSIGS 0x4 |
| 246 | #define PKCS7_NOCHAIN 0x8 | 251 | #define PKCS7_NOCHAIN 0x8 |
| 247 | #define PKCS7_NOINTERN 0x10 | 252 | #define PKCS7_NOINTERN 0x10 |
| 248 | #define PKCS7_NOVERIFY 0x20 | 253 | #define PKCS7_NOVERIFY 0x20 |
| 249 | #define PKCS7_DETACHED 0x40 | 254 | #define PKCS7_DETACHED 0x40 |
| 250 | #define PKCS7_BINARY 0x80 | 255 | #define PKCS7_BINARY 0x80 |
| 251 | #define PKCS7_NOATTR 0x100 | 256 | #define PKCS7_NOATTR 0x100 |
| 257 | #define PKCS7_NOSMIMECAP 0x200 | ||
| 252 | 258 | ||
| 253 | /* Flags: for compatibility with older code */ | 259 | /* Flags: for compatibility with older code */ |
| 254 | 260 | ||
| @@ -402,9 +408,10 @@ PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, EVP_CIPHER *cipher, | |||
| 402 | int flags); | 408 | int flags); |
| 403 | int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); | 409 | int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); |
| 404 | 410 | ||
| 405 | int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK *cap); | 411 | int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, |
| 406 | STACK *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si); | 412 | STACK_OF(X509_ALGOR) *cap); |
| 407 | int PKCS7_simple_smimecap(STACK *sk, int nid, int arg); | 413 | STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si); |
| 414 | int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg); | ||
| 408 | 415 | ||
| 409 | int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags); | 416 | int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags); |
| 410 | PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont); | 417 | PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont); |
diff --git a/src/lib/libssl/src/crypto/rand/Makefile.ssl b/src/lib/libssl/src/crypto/rand/Makefile.ssl index be8eea34a2..5f6199a35f 100644 --- a/src/lib/libssl/src/crypto/rand/Makefile.ssl +++ b/src/lib/libssl/src/crypto/rand/Makefile.ssl | |||
| @@ -22,8 +22,8 @@ TEST= randtest.c | |||
| 22 | APPS= | 22 | APPS= |
| 23 | 23 | ||
| 24 | LIB=$(TOP)/libcrypto.a | 24 | LIB=$(TOP)/libcrypto.a |
| 25 | LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c | 25 | LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c rand_win.c |
| 26 | LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o | 26 | LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o rand_win.o |
| 27 | 27 | ||
| 28 | SRC= $(LIBSRC) | 28 | SRC= $(LIBSRC) |
| 29 | 29 | ||
| @@ -78,15 +78,45 @@ clean: | |||
| 78 | 78 | ||
| 79 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 79 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 80 | 80 | ||
| 81 | md_rand.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 81 | md_rand.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h |
| 82 | md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 82 | md_rand.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 83 | md_rand.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 83 | md_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 84 | md_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 84 | md_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h | 85 | md_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h |
| 85 | md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 86 | md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 87 | md_rand.o: ../../include/openssl/symhacks.h rand_lcl.h | ||
| 86 | rand_egd.o: ../../include/openssl/opensslconf.h ../../include/openssl/rand.h | 88 | rand_egd.o: ../../include/openssl/opensslconf.h ../../include/openssl/rand.h |
| 87 | rand_err.o: ../../include/openssl/err.h ../../include/openssl/rand.h | 89 | rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h |
| 88 | rand_lib.o: ../../include/openssl/rand.h | 90 | rand_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 91 | rand_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 92 | rand_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 93 | rand_err.o: ../../include/openssl/symhacks.h | ||
| 94 | rand_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 95 | rand_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 96 | rand_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 97 | rand_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
| 98 | rand_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 99 | rand_lib.o: ../../include/openssl/engine.h ../../include/openssl/evp.h | ||
| 100 | rand_lib.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | ||
| 101 | rand_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 102 | rand_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 103 | rand_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 104 | rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 105 | rand_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 106 | rand_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 107 | rand_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 108 | rand_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 109 | rand_lib.o: ../../include/openssl/symhacks.h | ||
| 110 | rand_win.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 111 | rand_win.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | ||
| 112 | rand_win.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 113 | rand_win.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 114 | rand_win.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 115 | rand_win.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 116 | rand_win.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 117 | rand_win.o: ../cryptlib.h rand_lcl.h | ||
| 89 | randfile.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 118 | randfile.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 90 | randfile.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h | 119 | randfile.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h |
| 91 | randfile.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 120 | randfile.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 92 | randfile.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 121 | randfile.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 122 | randfile.o: ../../include/openssl/symhacks.h | ||
diff --git a/src/lib/libssl/src/crypto/rand/md_rand.c b/src/lib/libssl/src/crypto/rand/md_rand.c index da4258c479..d167dea77d 100644 --- a/src/lib/libssl/src/crypto/rand/md_rand.c +++ b/src/lib/libssl/src/crypto/rand/md_rand.c | |||
| @@ -109,9 +109,7 @@ | |||
| 109 | * | 109 | * |
| 110 | */ | 110 | */ |
| 111 | 111 | ||
| 112 | #define ENTROPY_NEEDED 16 /* require 128 bits = 16 bytes of randomness */ | 112 | #ifdef MD_RAND_DEBUG |
| 113 | |||
| 114 | #ifndef MD_RAND_DEBUG | ||
| 115 | # ifndef NDEBUG | 113 | # ifndef NDEBUG |
| 116 | # define NDEBUG | 114 | # define NDEBUG |
| 117 | # endif | 115 | # endif |
| @@ -119,75 +117,20 @@ | |||
| 119 | 117 | ||
| 120 | #include <assert.h> | 118 | #include <assert.h> |
| 121 | #include <stdio.h> | 119 | #include <stdio.h> |
| 122 | #include <time.h> | ||
| 123 | #include <string.h> | 120 | #include <string.h> |
| 124 | 121 | ||
| 125 | #include "openssl/e_os.h" | 122 | #include "openssl/e_os.h" |
| 126 | 123 | ||
| 124 | #include <openssl/rand.h> | ||
| 125 | #include "rand_lcl.h" | ||
| 126 | |||
| 127 | #include <openssl/crypto.h> | 127 | #include <openssl/crypto.h> |
| 128 | #include <openssl/err.h> | 128 | #include <openssl/err.h> |
| 129 | 129 | ||
| 130 | #if !defined(USE_MD5_RAND) && !defined(USE_SHA1_RAND) && !defined(USE_MDC2_RAND) && !defined(USE_MD2_RAND) | ||
| 131 | #if !defined(NO_SHA) && !defined(NO_SHA1) | ||
| 132 | #define USE_SHA1_RAND | ||
| 133 | #elif !defined(NO_MD5) | ||
| 134 | #define USE_MD5_RAND | ||
| 135 | #elif !defined(NO_MDC2) && !defined(NO_DES) | ||
| 136 | #define USE_MDC2_RAND | ||
| 137 | #elif !defined(NO_MD2) | ||
| 138 | #define USE_MD2_RAND | ||
| 139 | #else | ||
| 140 | #error No message digest algorithm available | ||
| 141 | #endif | ||
| 142 | #endif | ||
| 143 | |||
| 144 | /* Changed how the state buffer used. I now attempt to 'wrap' such | ||
| 145 | * that I don't run over the same locations the next time go through | ||
| 146 | * the 1023 bytes - many thanks to | ||
| 147 | * Robert J. LeBlanc <rjl@renaissoft.com> for his comments | ||
| 148 | */ | ||
| 149 | |||
| 150 | #if defined(USE_MD5_RAND) | ||
| 151 | #include <openssl/md5.h> | ||
| 152 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH | ||
| 153 | #define MD_CTX MD5_CTX | ||
| 154 | #define MD_Init(a) MD5_Init(a) | ||
| 155 | #define MD_Update(a,b,c) MD5_Update(a,b,c) | ||
| 156 | #define MD_Final(a,b) MD5_Final(a,b) | ||
| 157 | #define MD(a,b,c) MD5(a,b,c) | ||
| 158 | #elif defined(USE_SHA1_RAND) | ||
| 159 | #include <openssl/sha.h> | ||
| 160 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH | ||
| 161 | #define MD_CTX SHA_CTX | ||
| 162 | #define MD_Init(a) SHA1_Init(a) | ||
| 163 | #define MD_Update(a,b,c) SHA1_Update(a,b,c) | ||
| 164 | #define MD_Final(a,b) SHA1_Final(a,b) | ||
| 165 | #define MD(a,b,c) SHA1(a,b,c) | ||
| 166 | #elif defined(USE_MDC2_RAND) | ||
| 167 | #include <openssl/mdc2.h> | ||
| 168 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH | ||
| 169 | #define MD_CTX MDC2_CTX | ||
| 170 | #define MD_Init(a) MDC2_Init(a) | ||
| 171 | #define MD_Update(a,b,c) MDC2_Update(a,b,c) | ||
| 172 | #define MD_Final(a,b) MDC2_Final(a,b) | ||
| 173 | #define MD(a,b,c) MDC2(a,b,c) | ||
| 174 | #elif defined(USE_MD2_RAND) | ||
| 175 | #include <openssl/md2.h> | ||
| 176 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH | ||
| 177 | #define MD_CTX MD2_CTX | ||
| 178 | #define MD_Init(a) MD2_Init(a) | ||
| 179 | #define MD_Update(a,b,c) MD2_Update(a,b,c) | ||
| 180 | #define MD_Final(a,b) MD2_Final(a,b) | ||
| 181 | #define MD(a,b,c) MD2(a,b,c) | ||
| 182 | #endif | ||
| 183 | |||
| 184 | #include <openssl/rand.h> | ||
| 185 | |||
| 186 | #ifdef BN_DEBUG | 130 | #ifdef BN_DEBUG |
| 187 | # define PREDICT | 131 | # define PREDICT |
| 188 | #endif | 132 | #endif |
| 189 | 133 | ||
| 190 | /* #define NORAND 1 */ | ||
| 191 | /* #define PREDICT 1 */ | 134 | /* #define PREDICT 1 */ |
| 192 | 135 | ||
| 193 | #define STATE_SIZE 1023 | 136 | #define STATE_SIZE 1023 |
| @@ -198,6 +141,11 @@ static long md_count[2]={0,0}; | |||
| 198 | static double entropy=0; | 141 | static double entropy=0; |
| 199 | static int initialized=0; | 142 | static int initialized=0; |
| 200 | 143 | ||
| 144 | /* This should be set to 1 only when ssleay_rand_add() is called inside | ||
| 145 | an already locked state, so it doesn't try to lock and thereby cause | ||
| 146 | a hang. And it should always be reset back to 0 before unlocking. */ | ||
| 147 | static int add_do_not_lock=0; | ||
| 148 | |||
| 201 | #ifdef PREDICT | 149 | #ifdef PREDICT |
| 202 | int rand_predictable=0; | 150 | int rand_predictable=0; |
| 203 | #endif | 151 | #endif |
| @@ -234,6 +182,7 @@ static void ssleay_rand_cleanup(void) | |||
| 234 | md_count[0]=0; | 182 | md_count[0]=0; |
| 235 | md_count[1]=0; | 183 | md_count[1]=0; |
| 236 | entropy=0; | 184 | entropy=0; |
| 185 | initialized=0; | ||
| 237 | } | 186 | } |
| 238 | 187 | ||
| 239 | static void ssleay_rand_add(const void *buf, int num, double add) | 188 | static void ssleay_rand_add(const void *buf, int num, double add) |
| @@ -243,10 +192,6 @@ static void ssleay_rand_add(const void *buf, int num, double add) | |||
| 243 | unsigned char local_md[MD_DIGEST_LENGTH]; | 192 | unsigned char local_md[MD_DIGEST_LENGTH]; |
| 244 | MD_CTX m; | 193 | MD_CTX m; |
| 245 | 194 | ||
| 246 | #ifdef NORAND | ||
| 247 | return; | ||
| 248 | #endif | ||
| 249 | |||
| 250 | /* | 195 | /* |
| 251 | * (Based on the rand(3) manpage) | 196 | * (Based on the rand(3) manpage) |
| 252 | * | 197 | * |
| @@ -262,7 +207,7 @@ static void ssleay_rand_add(const void *buf, int num, double add) | |||
| 262 | * hash function. | 207 | * hash function. |
| 263 | */ | 208 | */ |
| 264 | 209 | ||
| 265 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | 210 | if (!add_do_not_lock) CRYPTO_w_lock(CRYPTO_LOCK_RAND); |
| 266 | st_idx=state_index; | 211 | st_idx=state_index; |
| 267 | 212 | ||
| 268 | /* use our own copies of the counters so that even | 213 | /* use our own copies of the counters so that even |
| @@ -294,7 +239,7 @@ static void ssleay_rand_add(const void *buf, int num, double add) | |||
| 294 | 239 | ||
| 295 | md_count[1] += (num / MD_DIGEST_LENGTH) + (num % MD_DIGEST_LENGTH > 0); | 240 | md_count[1] += (num / MD_DIGEST_LENGTH) + (num % MD_DIGEST_LENGTH > 0); |
| 296 | 241 | ||
| 297 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | 242 | if (!add_do_not_lock) CRYPTO_w_unlock(CRYPTO_LOCK_RAND); |
| 298 | 243 | ||
| 299 | for (i=0; i<num; i+=MD_DIGEST_LENGTH) | 244 | for (i=0; i<num; i+=MD_DIGEST_LENGTH) |
| 300 | { | 245 | { |
| @@ -336,7 +281,7 @@ static void ssleay_rand_add(const void *buf, int num, double add) | |||
| 336 | } | 281 | } |
| 337 | memset((char *)&m,0,sizeof(m)); | 282 | memset((char *)&m,0,sizeof(m)); |
| 338 | 283 | ||
| 339 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | 284 | if (!add_do_not_lock) CRYPTO_w_lock(CRYPTO_LOCK_RAND); |
| 340 | /* Don't just copy back local_md into md -- this could mean that | 285 | /* Don't just copy back local_md into md -- this could mean that |
| 341 | * other thread's seeding remains without effect (except for | 286 | * other thread's seeding remains without effect (except for |
| 342 | * the incremented counter). By XORing it we keep at least as | 287 | * the incremented counter). By XORing it we keep at least as |
| @@ -347,9 +292,9 @@ static void ssleay_rand_add(const void *buf, int num, double add) | |||
| 347 | } | 292 | } |
| 348 | if (entropy < ENTROPY_NEEDED) /* stop counting when we have enough */ | 293 | if (entropy < ENTROPY_NEEDED) /* stop counting when we have enough */ |
| 349 | entropy += add; | 294 | entropy += add; |
| 350 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | 295 | if (!add_do_not_lock) CRYPTO_w_unlock(CRYPTO_LOCK_RAND); |
| 351 | 296 | ||
| 352 | #ifndef THREADS | 297 | #if !defined(THREADS) && !defined(WIN32) |
| 353 | assert(md_c[1] == md_count[1]); | 298 | assert(md_c[1] == md_count[1]); |
| 354 | #endif | 299 | #endif |
| 355 | } | 300 | } |
| @@ -359,58 +304,9 @@ static void ssleay_rand_seed(const void *buf, int num) | |||
| 359 | ssleay_rand_add(buf, num, num); | 304 | ssleay_rand_add(buf, num, num); |
| 360 | } | 305 | } |
| 361 | 306 | ||
| 362 | static void ssleay_rand_initialize(void) | ||
| 363 | { | ||
| 364 | unsigned long l; | ||
| 365 | #ifndef GETPID_IS_MEANINGLESS | ||
| 366 | pid_t curr_pid = getpid(); | ||
| 367 | #endif | ||
| 368 | #ifdef DEVRANDOM | ||
| 369 | FILE *fh; | ||
| 370 | #endif | ||
| 371 | |||
| 372 | #ifdef NORAND | ||
| 373 | return; | ||
| 374 | #endif | ||
| 375 | |||
| 376 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 377 | /* put in some default random data, we need more than just this */ | ||
| 378 | #ifndef GETPID_IS_MEANINGLESS | ||
| 379 | l=curr_pid; | ||
| 380 | RAND_add(&l,sizeof(l),0); | ||
| 381 | l=getuid(); | ||
| 382 | RAND_add(&l,sizeof(l),0); | ||
| 383 | #endif | ||
| 384 | l=time(NULL); | ||
| 385 | RAND_add(&l,sizeof(l),0); | ||
| 386 | |||
| 387 | #ifdef DEVRANDOM | ||
| 388 | /* Use a random entropy pool device. Linux, FreeBSD and OpenBSD | ||
| 389 | * have this. Use /dev/urandom if you can as /dev/random may block | ||
| 390 | * if it runs out of random entries. */ | ||
| 391 | |||
| 392 | if ((fh = fopen(DEVRANDOM, "r")) != NULL) | ||
| 393 | { | ||
| 394 | unsigned char tmpbuf[ENTROPY_NEEDED]; | ||
| 395 | int n; | ||
| 396 | |||
| 397 | setvbuf(fh, NULL, _IONBF, 0); | ||
| 398 | n=fread((unsigned char *)tmpbuf,1,ENTROPY_NEEDED,fh); | ||
| 399 | fclose(fh); | ||
| 400 | RAND_add(tmpbuf,sizeof tmpbuf,n); | ||
| 401 | memset(tmpbuf,0,n); | ||
| 402 | } | ||
| 403 | #endif | ||
| 404 | #ifdef PURIFY | ||
| 405 | memset(state,0,STATE_SIZE); | ||
| 406 | memset(md,0,MD_DIGEST_LENGTH); | ||
| 407 | #endif | ||
| 408 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 409 | initialized=1; | ||
| 410 | } | ||
| 411 | |||
| 412 | static int ssleay_rand_bytes(unsigned char *buf, int num) | 307 | static int ssleay_rand_bytes(unsigned char *buf, int num) |
| 413 | { | 308 | { |
| 309 | static volatile int stirred_pool = 0; | ||
| 414 | int i,j,k,st_num,st_idx; | 310 | int i,j,k,st_num,st_idx; |
| 415 | int ok; | 311 | int ok; |
| 416 | long md_c[2]; | 312 | long md_c[2]; |
| @@ -419,6 +315,7 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) | |||
| 419 | #ifndef GETPID_IS_MEANINGLESS | 315 | #ifndef GETPID_IS_MEANINGLESS |
| 420 | pid_t curr_pid = getpid(); | 316 | pid_t curr_pid = getpid(); |
| 421 | #endif | 317 | #endif |
| 318 | int do_stir_pool = 0; | ||
| 422 | 319 | ||
| 423 | #ifdef PREDICT | 320 | #ifdef PREDICT |
| 424 | if (rand_predictable) | 321 | if (rand_predictable) |
| @@ -450,11 +347,17 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) | |||
| 450 | * global 'md'. | 347 | * global 'md'. |
| 451 | */ | 348 | */ |
| 452 | 349 | ||
| 453 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 454 | |||
| 455 | if (!initialized) | 350 | if (!initialized) |
| 456 | ssleay_rand_initialize(); | 351 | RAND_poll(); |
| 352 | |||
| 353 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 354 | add_do_not_lock = 1; /* Since we call ssleay_rand_add while in | ||
| 355 | this locked state. */ | ||
| 457 | 356 | ||
| 357 | initialized = 1; | ||
| 358 | if (!stirred_pool) | ||
| 359 | do_stir_pool = 1; | ||
| 360 | |||
| 458 | ok = (entropy >= ENTROPY_NEEDED); | 361 | ok = (entropy >= ENTROPY_NEEDED); |
| 459 | if (!ok) | 362 | if (!ok) |
| 460 | { | 363 | { |
| @@ -464,12 +367,42 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) | |||
| 464 | * Once we've had enough initial seeding we don't bother to | 367 | * Once we've had enough initial seeding we don't bother to |
| 465 | * adjust the entropy count, though, because we're not ambitious | 368 | * adjust the entropy count, though, because we're not ambitious |
| 466 | * to provide *information-theoretic* randomness. | 369 | * to provide *information-theoretic* randomness. |
| 370 | * | ||
| 371 | * NOTE: This approach fails if the program forks before | ||
| 372 | * we have enough entropy. Entropy should be collected | ||
| 373 | * in a separate input pool and be transferred to the | ||
| 374 | * output pool only when the entropy limit has been reached. | ||
| 467 | */ | 375 | */ |
| 468 | entropy -= num; | 376 | entropy -= num; |
| 469 | if (entropy < 0) | 377 | if (entropy < 0) |
| 470 | entropy = 0; | 378 | entropy = 0; |
| 471 | } | 379 | } |
| 472 | 380 | ||
| 381 | if (do_stir_pool) | ||
| 382 | { | ||
| 383 | /* Our output function chains only half of 'md', so we better | ||
| 384 | * make sure that the required entropy gets 'evenly distributed' | ||
| 385 | * through 'state', our randomness pool. The input function | ||
| 386 | * (ssleay_rand_add) chains all of 'md', which makes it more | ||
| 387 | * suitable for this purpose. | ||
| 388 | */ | ||
| 389 | |||
| 390 | int n = STATE_SIZE; /* so that the complete pool gets accessed */ | ||
| 391 | while (n > 0) | ||
| 392 | { | ||
| 393 | #if MD_DIGEST_LENGTH > 20 | ||
| 394 | # error "Please adjust DUMMY_SEED." | ||
| 395 | #endif | ||
| 396 | #define DUMMY_SEED "...................." /* at least MD_DIGEST_LENGTH */ | ||
| 397 | /* Note that the seed does not matter, it's just that | ||
| 398 | * ssleay_rand_add expects to have something to hash. */ | ||
| 399 | ssleay_rand_add(DUMMY_SEED, MD_DIGEST_LENGTH, 0.0); | ||
| 400 | n -= MD_DIGEST_LENGTH; | ||
| 401 | } | ||
| 402 | if (ok) | ||
| 403 | stirred_pool = 1; | ||
| 404 | } | ||
| 405 | |||
| 473 | st_idx=state_index; | 406 | st_idx=state_index; |
| 474 | st_num=state_num; | 407 | st_num=state_num; |
| 475 | md_c[0] = md_count[0]; | 408 | md_c[0] = md_count[0]; |
| @@ -484,6 +417,9 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) | |||
| 484 | * are now ours (but other threads may use them too) */ | 417 | * are now ours (but other threads may use them too) */ |
| 485 | 418 | ||
| 486 | md_count[0] += 1; | 419 | md_count[0] += 1; |
| 420 | |||
| 421 | add_do_not_lock = 0; /* If this would ever be forgotten, we can | ||
| 422 | expect any evil god to eat our souls. */ | ||
| 487 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | 423 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); |
| 488 | 424 | ||
| 489 | while (num > 0) | 425 | while (num > 0) |
| @@ -536,6 +472,8 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) | |||
| 536 | else | 472 | else |
| 537 | { | 473 | { |
| 538 | RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED); | 474 | RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED); |
| 475 | ERR_add_error_data(1, "You need to read the OpenSSL FAQ, " | ||
| 476 | "http://www.openssl.org/support/faq.html"); | ||
| 539 | return(0); | 477 | return(0); |
| 540 | } | 478 | } |
| 541 | } | 479 | } |
| @@ -561,152 +499,13 @@ static int ssleay_rand_status(void) | |||
| 561 | { | 499 | { |
| 562 | int ret; | 500 | int ret; |
| 563 | 501 | ||
| 564 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 565 | |||
| 566 | if (!initialized) | 502 | if (!initialized) |
| 567 | ssleay_rand_initialize(); | 503 | RAND_poll(); |
| 568 | ret = entropy >= ENTROPY_NEEDED; | ||
| 569 | 504 | ||
| 505 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 506 | initialized = 1; | ||
| 507 | ret = entropy >= ENTROPY_NEEDED; | ||
| 570 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | 508 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); |
| 571 | 509 | ||
| 572 | return ret; | 510 | return ret; |
| 573 | } | 511 | } |
| 574 | |||
| 575 | #ifdef WINDOWS | ||
| 576 | #include <windows.h> | ||
| 577 | #include <openssl/rand.h> | ||
| 578 | |||
| 579 | int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam) | ||
| 580 | { | ||
| 581 | double add_entropy=0; | ||
| 582 | SYSTEMTIME t; | ||
| 583 | |||
| 584 | switch (iMsg) | ||
| 585 | { | ||
| 586 | case WM_KEYDOWN: | ||
| 587 | { | ||
| 588 | static WPARAM key; | ||
| 589 | if (key != wParam) | ||
| 590 | add_entropy = 0.05; | ||
| 591 | key = wParam; | ||
| 592 | } | ||
| 593 | break; | ||
| 594 | case WM_MOUSEMOVE: | ||
| 595 | { | ||
| 596 | static int lastx,lasty,lastdx,lastdy; | ||
| 597 | int x,y,dx,dy; | ||
| 598 | |||
| 599 | x=LOWORD(lParam); | ||
| 600 | y=HIWORD(lParam); | ||
| 601 | dx=lastx-x; | ||
| 602 | dy=lasty-y; | ||
| 603 | if (dx != 0 && dy != 0 && dx-lastdx != 0 && dy-lastdy != 0) | ||
| 604 | add_entropy=.2; | ||
| 605 | lastx=x, lasty=y; | ||
| 606 | lastdx=dx, lastdy=dy; | ||
| 607 | } | ||
| 608 | break; | ||
| 609 | } | ||
| 610 | |||
| 611 | GetSystemTime(&t); | ||
| 612 | RAND_add(&iMsg, sizeof(iMsg), add_entropy); | ||
| 613 | RAND_add(&wParam, sizeof(wParam), 0); | ||
| 614 | RAND_add(&lParam, sizeof(lParam), 0); | ||
| 615 | RAND_add(&t, sizeof(t), 0); | ||
| 616 | |||
| 617 | return (RAND_status()); | ||
| 618 | } | ||
| 619 | |||
| 620 | /***************************************************************************** | ||
| 621 | * Initialisation function for the SSL random generator. Takes the contents | ||
| 622 | * of the screen as random seed. | ||
| 623 | * | ||
| 624 | * Created 960901 by Gertjan van Oosten, gertjan@West.NL, West Consulting B.V. | ||
| 625 | * | ||
| 626 | * Code adapted from | ||
| 627 | * <URL:http://www.microsoft.com/kb/developr/win_dk/q97193.htm>; | ||
| 628 | * the original copyright message is: | ||
| 629 | * | ||
| 630 | * (C) Copyright Microsoft Corp. 1993. All rights reserved. | ||
| 631 | * | ||
| 632 | * You have a royalty-free right to use, modify, reproduce and | ||
| 633 | * distribute the Sample Files (and/or any modified version) in | ||
| 634 | * any way you find useful, provided that you agree that | ||
| 635 | * Microsoft has no warranty obligations or liability for any | ||
| 636 | * Sample Application Files which are modified. | ||
| 637 | */ | ||
| 638 | /* | ||
| 639 | * I have modified the loading of bytes via RAND_seed() mechanism since | ||
| 640 | * the original would have been very very CPU intensive since RAND_seed() | ||
| 641 | * does an MD5 per 16 bytes of input. The cost to digest 16 bytes is the same | ||
| 642 | * as that to digest 56 bytes. So under the old system, a screen of | ||
| 643 | * 1024*768*256 would have been CPU cost of approximately 49,000 56 byte MD5 | ||
| 644 | * digests or digesting 2.7 mbytes. What I have put in place would | ||
| 645 | * be 48 16k MD5 digests, or effectively 48*16+48 MD5 bytes or 816 kbytes | ||
| 646 | * or about 3.5 times as much. | ||
| 647 | * - eric | ||
| 648 | */ | ||
| 649 | void RAND_screen(void) | ||
| 650 | { | ||
| 651 | HDC hScrDC; /* screen DC */ | ||
| 652 | HDC hMemDC; /* memory DC */ | ||
| 653 | HBITMAP hBitmap; /* handle for our bitmap */ | ||
| 654 | HBITMAP hOldBitmap; /* handle for previous bitmap */ | ||
| 655 | BITMAP bm; /* bitmap properties */ | ||
| 656 | unsigned int size; /* size of bitmap */ | ||
| 657 | char *bmbits; /* contents of bitmap */ | ||
| 658 | int w; /* screen width */ | ||
| 659 | int h; /* screen height */ | ||
| 660 | int y; /* y-coordinate of screen lines to grab */ | ||
| 661 | int n = 16; /* number of screen lines to grab at a time */ | ||
| 662 | |||
| 663 | /* Create a screen DC and a memory DC compatible to screen DC */ | ||
| 664 | hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL); | ||
| 665 | hMemDC = CreateCompatibleDC(hScrDC); | ||
| 666 | |||
| 667 | /* Get screen resolution */ | ||
| 668 | w = GetDeviceCaps(hScrDC, HORZRES); | ||
| 669 | h = GetDeviceCaps(hScrDC, VERTRES); | ||
| 670 | |||
| 671 | /* Create a bitmap compatible with the screen DC */ | ||
| 672 | hBitmap = CreateCompatibleBitmap(hScrDC, w, n); | ||
| 673 | |||
| 674 | /* Select new bitmap into memory DC */ | ||
| 675 | hOldBitmap = SelectObject(hMemDC, hBitmap); | ||
| 676 | |||
| 677 | /* Get bitmap properties */ | ||
| 678 | GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm); | ||
| 679 | size = (unsigned int)bm.bmWidthBytes * bm.bmHeight * bm.bmPlanes; | ||
| 680 | |||
| 681 | bmbits = Malloc(size); | ||
| 682 | if (bmbits) { | ||
| 683 | /* Now go through the whole screen, repeatedly grabbing n lines */ | ||
| 684 | for (y = 0; y < h-n; y += n) | ||
| 685 | { | ||
| 686 | unsigned char md[MD_DIGEST_LENGTH]; | ||
| 687 | |||
| 688 | /* Bitblt screen DC to memory DC */ | ||
| 689 | BitBlt(hMemDC, 0, 0, w, n, hScrDC, 0, y, SRCCOPY); | ||
| 690 | |||
| 691 | /* Copy bitmap bits from memory DC to bmbits */ | ||
| 692 | GetBitmapBits(hBitmap, size, bmbits); | ||
| 693 | |||
| 694 | /* Get the MD5 of the bitmap */ | ||
| 695 | MD(bmbits,size,md); | ||
| 696 | |||
| 697 | /* Seed the random generator with the MD5 digest */ | ||
| 698 | RAND_seed(md, MD_DIGEST_LENGTH); | ||
| 699 | } | ||
| 700 | |||
| 701 | Free(bmbits); | ||
| 702 | } | ||
| 703 | |||
| 704 | /* Select old bitmap back into memory DC */ | ||
| 705 | hBitmap = SelectObject(hMemDC, hOldBitmap); | ||
| 706 | |||
| 707 | /* Clean up */ | ||
| 708 | DeleteObject(hBitmap); | ||
| 709 | DeleteDC(hMemDC); | ||
| 710 | DeleteDC(hScrDC); | ||
| 711 | } | ||
| 712 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/rand/rand.h b/src/lib/libssl/src/crypto/rand/rand.h index 2973ee90e4..eb9c8c034d 100644 --- a/src/lib/libssl/src/crypto/rand/rand.h +++ b/src/lib/libssl/src/crypto/rand/rand.h | |||
| @@ -77,7 +77,9 @@ typedef struct rand_meth_st | |||
| 77 | extern int rand_predictable; | 77 | extern int rand_predictable; |
| 78 | #endif | 78 | #endif |
| 79 | 79 | ||
| 80 | void RAND_set_rand_method(RAND_METHOD *meth); | 80 | struct engine_st; |
| 81 | |||
| 82 | int RAND_set_rand_method(struct engine_st *meth); | ||
| 81 | RAND_METHOD *RAND_get_rand_method(void ); | 83 | RAND_METHOD *RAND_get_rand_method(void ); |
| 82 | RAND_METHOD *RAND_SSLeay(void); | 84 | RAND_METHOD *RAND_SSLeay(void); |
| 83 | void RAND_cleanup(void ); | 85 | void RAND_cleanup(void ); |
| @@ -90,12 +92,28 @@ int RAND_write_file(const char *file); | |||
| 90 | const char *RAND_file_name(char *file,int num); | 92 | const char *RAND_file_name(char *file,int num); |
| 91 | int RAND_status(void); | 93 | int RAND_status(void); |
| 92 | int RAND_egd(const char *path); | 94 | int RAND_egd(const char *path); |
| 95 | int RAND_egd_bytes(const char *path,int bytes); | ||
| 96 | void ERR_load_RAND_strings(void); | ||
| 97 | int RAND_poll(void); | ||
| 98 | |||
| 99 | #ifdef __cplusplus | ||
| 100 | } | ||
| 101 | #endif | ||
| 102 | |||
| 93 | #if defined(WINDOWS) || defined(WIN32) | 103 | #if defined(WINDOWS) || defined(WIN32) |
| 94 | #include <windows.h> | 104 | #include <windows.h> |
| 105 | |||
| 106 | #ifdef __cplusplus | ||
| 107 | extern "C" { | ||
| 108 | #endif | ||
| 109 | |||
| 95 | void RAND_screen(void); | 110 | void RAND_screen(void); |
| 96 | int RAND_event(UINT, WPARAM, LPARAM); | 111 | int RAND_event(UINT, WPARAM, LPARAM); |
| 112 | |||
| 113 | #ifdef __cplusplus | ||
| 114 | } | ||
| 115 | #endif | ||
| 97 | #endif | 116 | #endif |
| 98 | void ERR_load_RAND_strings(void); | ||
| 99 | 117 | ||
| 100 | /* BEGIN ERROR CODES */ | 118 | /* BEGIN ERROR CODES */ |
| 101 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 119 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
| @@ -110,8 +128,5 @@ void ERR_load_RAND_strings(void); | |||
| 110 | /* Reason codes. */ | 128 | /* Reason codes. */ |
| 111 | #define RAND_R_PRNG_NOT_SEEDED 100 | 129 | #define RAND_R_PRNG_NOT_SEEDED 100 |
| 112 | 130 | ||
| 113 | #ifdef __cplusplus | ||
| 114 | } | ||
| 115 | #endif | ||
| 116 | #endif | 131 | #endif |
| 117 | 132 | ||
diff --git a/src/lib/libssl/src/crypto/rand/rand_egd.c b/src/lib/libssl/src/crypto/rand/rand_egd.c index 380c7828c3..02a0d86fa3 100644 --- a/src/lib/libssl/src/crypto/rand/rand_egd.c +++ b/src/lib/libssl/src/crypto/rand/rand_egd.c | |||
| @@ -64,6 +64,11 @@ int RAND_egd(const char *path) | |||
| 64 | { | 64 | { |
| 65 | return(-1); | 65 | return(-1); |
| 66 | } | 66 | } |
| 67 | |||
| 68 | int RAND_egd_bytes(const char *path,int bytes) | ||
| 69 | { | ||
| 70 | return(-1); | ||
| 71 | } | ||
| 67 | #else | 72 | #else |
| 68 | #include <openssl/opensslconf.h> | 73 | #include <openssl/opensslconf.h> |
| 69 | #include OPENSSL_UNISTD | 74 | #include OPENSSL_UNISTD |
| @@ -107,4 +112,56 @@ int RAND_egd(const char *path) | |||
| 107 | if (fd != -1) close(fd); | 112 | if (fd != -1) close(fd); |
| 108 | return(ret); | 113 | return(ret); |
| 109 | } | 114 | } |
| 115 | |||
| 116 | int RAND_egd_bytes(const char *path,int bytes) | ||
| 117 | { | ||
| 118 | int ret = 0; | ||
| 119 | struct sockaddr_un addr; | ||
| 120 | int len, num; | ||
| 121 | int fd = -1; | ||
| 122 | unsigned char buf[255]; | ||
| 123 | |||
| 124 | memset(&addr, 0, sizeof(addr)); | ||
| 125 | addr.sun_family = AF_UNIX; | ||
| 126 | if (strlen(path) > sizeof(addr.sun_path)) | ||
| 127 | return (-1); | ||
| 128 | strcpy(addr.sun_path,path); | ||
| 129 | len = offsetof(struct sockaddr_un, sun_path) + strlen(path); | ||
| 130 | fd = socket(AF_UNIX, SOCK_STREAM, 0); | ||
| 131 | if (fd == -1) return (-1); | ||
| 132 | if (connect(fd, (struct sockaddr *)&addr, len) == -1) goto err; | ||
| 133 | |||
| 134 | while(bytes > 0) | ||
| 135 | { | ||
| 136 | buf[0] = 1; | ||
| 137 | buf[1] = bytes < 255 ? bytes : 255; | ||
| 138 | write(fd, buf, 2); | ||
| 139 | if (read(fd, buf, 1) != 1) | ||
| 140 | { | ||
| 141 | ret=-1; | ||
| 142 | goto err; | ||
| 143 | } | ||
| 144 | if(buf[0] == 0) | ||
| 145 | goto err; | ||
| 146 | num = read(fd, buf, buf[0]); | ||
| 147 | if (num < 1) | ||
| 148 | { | ||
| 149 | ret=-1; | ||
| 150 | goto err; | ||
| 151 | } | ||
| 152 | RAND_seed(buf, num); | ||
| 153 | if (RAND_status() != 1) | ||
| 154 | { | ||
| 155 | ret=-1; | ||
| 156 | goto err; | ||
| 157 | } | ||
| 158 | ret += num; | ||
| 159 | bytes-=num; | ||
| 160 | } | ||
| 161 | err: | ||
| 162 | if (fd != -1) close(fd); | ||
| 163 | return(ret); | ||
| 164 | } | ||
| 165 | |||
| 166 | |||
| 110 | #endif | 167 | #endif |
diff --git a/src/lib/libssl/src/crypto/rand/rand_lcl.h b/src/lib/libssl/src/crypto/rand/rand_lcl.h new file mode 100644 index 0000000000..120e9366d2 --- /dev/null +++ b/src/lib/libssl/src/crypto/rand/rand_lcl.h | |||
| @@ -0,0 +1,184 @@ | |||
| 1 | /* crypto/rand/md_rand.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | /* ==================================================================== | ||
| 59 | * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. | ||
| 60 | * | ||
| 61 | * Redistribution and use in source and binary forms, with or without | ||
| 62 | * modification, are permitted provided that the following conditions | ||
| 63 | * are met: | ||
| 64 | * | ||
| 65 | * 1. Redistributions of source code must retain the above copyright | ||
| 66 | * notice, this list of conditions and the following disclaimer. | ||
| 67 | * | ||
| 68 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 69 | * notice, this list of conditions and the following disclaimer in | ||
| 70 | * the documentation and/or other materials provided with the | ||
| 71 | * distribution. | ||
| 72 | * | ||
| 73 | * 3. All advertising materials mentioning features or use of this | ||
| 74 | * software must display the following acknowledgment: | ||
| 75 | * "This product includes software developed by the OpenSSL Project | ||
| 76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 77 | * | ||
| 78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 79 | * endorse or promote products derived from this software without | ||
| 80 | * prior written permission. For written permission, please contact | ||
| 81 | * openssl-core@openssl.org. | ||
| 82 | * | ||
| 83 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 84 | * nor may "OpenSSL" appear in their names without prior written | ||
| 85 | * permission of the OpenSSL Project. | ||
| 86 | * | ||
| 87 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 88 | * acknowledgment: | ||
| 89 | * "This product includes software developed by the OpenSSL Project | ||
| 90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 91 | * | ||
| 92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 103 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 104 | * ==================================================================== | ||
| 105 | * | ||
| 106 | * This product includes cryptographic software written by Eric Young | ||
| 107 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 108 | * Hudson (tjh@cryptsoft.com). | ||
| 109 | * | ||
| 110 | */ | ||
| 111 | |||
| 112 | #ifndef HEADER_RAND_LCL_H | ||
| 113 | #define HEADER_RAND_LCL_H | ||
| 114 | |||
| 115 | #define ENTROPY_NEEDED 20 /* require 160 bits = 20 bytes of randomness */ | ||
| 116 | |||
| 117 | |||
| 118 | #if !defined(USE_MD5_RAND) && !defined(USE_SHA1_RAND) && !defined(USE_MDC2_RAND) && !defined(USE_MD2_RAND) | ||
| 119 | #if !defined(NO_SHA) && !defined(NO_SHA1) | ||
| 120 | #define USE_SHA1_RAND | ||
| 121 | #elif !defined(NO_MD5) | ||
| 122 | #define USE_MD5_RAND | ||
| 123 | #elif !defined(NO_MDC2) && !defined(NO_DES) | ||
| 124 | #define USE_MDC2_RAND | ||
| 125 | #elif !defined(NO_MD2) | ||
| 126 | #define USE_MD2_RAND | ||
| 127 | #else | ||
| 128 | #error No message digest algorithm available | ||
| 129 | #endif | ||
| 130 | #endif | ||
| 131 | |||
| 132 | #if defined(USE_MD5_RAND) | ||
| 133 | #include <openssl/md5.h> | ||
| 134 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH | ||
| 135 | #define MD(a,b,c) MD5(a,b,c) | ||
| 136 | #elif defined(USE_SHA1_RAND) | ||
| 137 | #include <openssl/sha.h> | ||
| 138 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH | ||
| 139 | #define MD(a,b,c) SHA1(a,b,c) | ||
| 140 | #elif defined(USE_MDC2_RAND) | ||
| 141 | #include <openssl/mdc2.h> | ||
| 142 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH | ||
| 143 | #define MD(a,b,c) MDC2(a,b,c) | ||
| 144 | #elif defined(USE_MD2_RAND) | ||
| 145 | #include <openssl/md2.h> | ||
| 146 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH | ||
| 147 | #define MD(a,b,c) MD2(a,b,c) | ||
| 148 | #endif | ||
| 149 | #if defined(USE_MD5_RAND) | ||
| 150 | #include <openssl/md5.h> | ||
| 151 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH | ||
| 152 | #define MD_CTX MD5_CTX | ||
| 153 | #define MD_Init(a) MD5_Init(a) | ||
| 154 | #define MD_Update(a,b,c) MD5_Update(a,b,c) | ||
| 155 | #define MD_Final(a,b) MD5_Final(a,b) | ||
| 156 | #define MD(a,b,c) MD5(a,b,c) | ||
| 157 | #elif defined(USE_SHA1_RAND) | ||
| 158 | #include <openssl/sha.h> | ||
| 159 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH | ||
| 160 | #define MD_CTX SHA_CTX | ||
| 161 | #define MD_Init(a) SHA1_Init(a) | ||
| 162 | #define MD_Update(a,b,c) SHA1_Update(a,b,c) | ||
| 163 | #define MD_Final(a,b) SHA1_Final(a,b) | ||
| 164 | #define MD(a,b,c) SHA1(a,b,c) | ||
| 165 | #elif defined(USE_MDC2_RAND) | ||
| 166 | #include <openssl/mdc2.h> | ||
| 167 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH | ||
| 168 | #define MD_CTX MDC2_CTX | ||
| 169 | #define MD_Init(a) MDC2_Init(a) | ||
| 170 | #define MD_Update(a,b,c) MDC2_Update(a,b,c) | ||
| 171 | #define MD_Final(a,b) MDC2_Final(a,b) | ||
| 172 | #define MD(a,b,c) MDC2(a,b,c) | ||
| 173 | #elif defined(USE_MD2_RAND) | ||
| 174 | #include <openssl/md2.h> | ||
| 175 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH | ||
| 176 | #define MD_CTX MD2_CTX | ||
| 177 | #define MD_Init(a) MD2_Init(a) | ||
| 178 | #define MD_Update(a,b,c) MD2_Update(a,b,c) | ||
| 179 | #define MD_Final(a,b) MD2_Final(a,b) | ||
| 180 | #define MD(a,b,c) MD2(a,b,c) | ||
| 181 | #endif | ||
| 182 | |||
| 183 | |||
| 184 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/rand/rand_lib.c b/src/lib/libssl/src/crypto/rand/rand_lib.c index 7da74aab0e..57eff0f132 100644 --- a/src/lib/libssl/src/crypto/rand/rand_lib.c +++ b/src/lib/libssl/src/crypto/rand/rand_lib.c | |||
| @@ -59,59 +59,78 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <time.h> | 60 | #include <time.h> |
| 61 | #include <openssl/rand.h> | 61 | #include <openssl/rand.h> |
| 62 | #include <openssl/engine.h> | ||
| 62 | 63 | ||
| 63 | #ifdef NO_RAND | 64 | static ENGINE *rand_engine=NULL; |
| 64 | static RAND_METHOD *rand_meth=NULL; | ||
| 65 | #else | ||
| 66 | extern RAND_METHOD rand_ssleay_meth; | ||
| 67 | static RAND_METHOD *rand_meth= &rand_ssleay_meth; | ||
| 68 | #endif | ||
| 69 | 65 | ||
| 66 | #if 0 | ||
| 70 | void RAND_set_rand_method(RAND_METHOD *meth) | 67 | void RAND_set_rand_method(RAND_METHOD *meth) |
| 71 | { | 68 | { |
| 72 | rand_meth=meth; | 69 | rand_meth=meth; |
| 73 | } | 70 | } |
| 71 | #else | ||
| 72 | int RAND_set_rand_method(ENGINE *engine) | ||
| 73 | { | ||
| 74 | ENGINE *mtmp; | ||
| 75 | mtmp = rand_engine; | ||
| 76 | if (!ENGINE_init(engine)) | ||
| 77 | return 0; | ||
| 78 | rand_engine = engine; | ||
| 79 | /* SHOULD ERROR CHECK THIS!!! */ | ||
| 80 | ENGINE_finish(mtmp); | ||
| 81 | return 1; | ||
| 82 | } | ||
| 83 | #endif | ||
| 74 | 84 | ||
| 75 | RAND_METHOD *RAND_get_rand_method(void) | 85 | RAND_METHOD *RAND_get_rand_method(void) |
| 76 | { | 86 | { |
| 77 | return(rand_meth); | 87 | if (rand_engine == NULL |
| 88 | && (rand_engine = ENGINE_get_default_RAND()) == NULL) | ||
| 89 | return NULL; | ||
| 90 | return ENGINE_get_RAND(rand_engine); | ||
| 78 | } | 91 | } |
| 79 | 92 | ||
| 80 | void RAND_cleanup(void) | 93 | void RAND_cleanup(void) |
| 81 | { | 94 | { |
| 82 | if (rand_meth != NULL) | 95 | RAND_METHOD *meth = RAND_get_rand_method(); |
| 83 | rand_meth->cleanup(); | 96 | if (meth && meth->cleanup) |
| 97 | meth->cleanup(); | ||
| 84 | } | 98 | } |
| 85 | 99 | ||
| 86 | void RAND_seed(const void *buf, int num) | 100 | void RAND_seed(const void *buf, int num) |
| 87 | { | 101 | { |
| 88 | if (rand_meth != NULL) | 102 | RAND_METHOD *meth = RAND_get_rand_method(); |
| 89 | rand_meth->seed(buf,num); | 103 | if (meth && meth->seed) |
| 104 | meth->seed(buf,num); | ||
| 90 | } | 105 | } |
| 91 | 106 | ||
| 92 | void RAND_add(const void *buf, int num, double entropy) | 107 | void RAND_add(const void *buf, int num, double entropy) |
| 93 | { | 108 | { |
| 94 | if (rand_meth != NULL) | 109 | RAND_METHOD *meth = RAND_get_rand_method(); |
| 95 | rand_meth->add(buf,num,entropy); | 110 | if (meth && meth->add) |
| 111 | meth->add(buf,num,entropy); | ||
| 96 | } | 112 | } |
| 97 | 113 | ||
| 98 | int RAND_bytes(unsigned char *buf, int num) | 114 | int RAND_bytes(unsigned char *buf, int num) |
| 99 | { | 115 | { |
| 100 | if (rand_meth != NULL) | 116 | RAND_METHOD *meth = RAND_get_rand_method(); |
| 101 | return rand_meth->bytes(buf,num); | 117 | if (meth && meth->bytes) |
| 118 | return meth->bytes(buf,num); | ||
| 102 | return(-1); | 119 | return(-1); |
| 103 | } | 120 | } |
| 104 | 121 | ||
| 105 | int RAND_pseudo_bytes(unsigned char *buf, int num) | 122 | int RAND_pseudo_bytes(unsigned char *buf, int num) |
| 106 | { | 123 | { |
| 107 | if (rand_meth != NULL) | 124 | RAND_METHOD *meth = RAND_get_rand_method(); |
| 108 | return rand_meth->pseudorand(buf,num); | 125 | if (meth && meth->pseudorand) |
| 126 | return meth->pseudorand(buf,num); | ||
| 109 | return(-1); | 127 | return(-1); |
| 110 | } | 128 | } |
| 111 | 129 | ||
| 112 | int RAND_status(void) | 130 | int RAND_status(void) |
| 113 | { | 131 | { |
| 114 | if (rand_meth != NULL) | 132 | RAND_METHOD *meth = RAND_get_rand_method(); |
| 115 | return rand_meth->status(); | 133 | if (meth && meth->status) |
| 134 | return meth->status(); | ||
| 116 | return 0; | 135 | return 0; |
| 117 | } | 136 | } |
diff --git a/src/lib/libssl/src/crypto/rand/rand_win.c b/src/lib/libssl/src/crypto/rand/rand_win.c new file mode 100644 index 0000000000..9f2dcff9a9 --- /dev/null +++ b/src/lib/libssl/src/crypto/rand/rand_win.c | |||
| @@ -0,0 +1,732 @@ | |||
| 1 | /* crypto/rand/rand_win.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | /* ==================================================================== | ||
| 59 | * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. | ||
| 60 | * | ||
| 61 | * Redistribution and use in source and binary forms, with or without | ||
| 62 | * modification, are permitted provided that the following conditions | ||
| 63 | * are met: | ||
| 64 | * | ||
| 65 | * 1. Redistributions of source code must retain the above copyright | ||
| 66 | * notice, this list of conditions and the following disclaimer. | ||
| 67 | * | ||
| 68 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 69 | * notice, this list of conditions and the following disclaimer in | ||
| 70 | * the documentation and/or other materials provided with the | ||
| 71 | * distribution. | ||
| 72 | * | ||
| 73 | * 3. All advertising materials mentioning features or use of this | ||
| 74 | * software must display the following acknowledgment: | ||
| 75 | * "This product includes software developed by the OpenSSL Project | ||
| 76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 77 | * | ||
| 78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 79 | * endorse or promote products derived from this software without | ||
| 80 | * prior written permission. For written permission, please contact | ||
| 81 | * openssl-core@openssl.org. | ||
| 82 | * | ||
| 83 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 84 | * nor may "OpenSSL" appear in their names without prior written | ||
| 85 | * permission of the OpenSSL Project. | ||
| 86 | * | ||
| 87 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 88 | * acknowledgment: | ||
| 89 | * "This product includes software developed by the OpenSSL Project | ||
| 90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 91 | * | ||
| 92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 103 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 104 | * ==================================================================== | ||
| 105 | * | ||
| 106 | * This product includes cryptographic software written by Eric Young | ||
| 107 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 108 | * Hudson (tjh@cryptsoft.com). | ||
| 109 | * | ||
| 110 | */ | ||
| 111 | |||
| 112 | #include "cryptlib.h" | ||
| 113 | #include <openssl/rand.h> | ||
| 114 | #include "rand_lcl.h" | ||
| 115 | |||
| 116 | #if defined(WINDOWS) || defined(WIN32) | ||
| 117 | #include <windows.h> | ||
| 118 | #ifndef _WIN32_WINNT | ||
| 119 | # define _WIN32_WINNT 0x0400 | ||
| 120 | #endif | ||
| 121 | #include <wincrypt.h> | ||
| 122 | #include <tlhelp32.h> | ||
| 123 | |||
| 124 | /* Intel hardware RNG CSP -- available from | ||
| 125 | * http://developer.intel.com/design/security/rng/redist_license.htm | ||
| 126 | */ | ||
| 127 | #define PROV_INTEL_SEC 22 | ||
| 128 | #define INTEL_DEF_PROV "Intel Hardware Cryptographic Service Provider" | ||
| 129 | |||
| 130 | static void readtimer(void); | ||
| 131 | static void readscreen(void); | ||
| 132 | |||
| 133 | /* It appears like CURSORINFO, PCURSORINFO and LPCURSORINFO are only defined | ||
| 134 | when WINVER is 0x0500 and up, which currently only happens on Win2000. | ||
| 135 | Unfortunately, those are typedefs, so they're a little bit difficult to | ||
| 136 | detect properly. On the other hand, the macro CURSOR_SHOWING is defined | ||
| 137 | within the same conditional, so it can be use to detect the absence of said | ||
| 138 | typedefs. */ | ||
| 139 | |||
| 140 | #ifndef CURSOR_SHOWING | ||
| 141 | /* | ||
| 142 | * Information about the global cursor. | ||
| 143 | */ | ||
| 144 | typedef struct tagCURSORINFO | ||
| 145 | { | ||
| 146 | DWORD cbSize; | ||
| 147 | DWORD flags; | ||
| 148 | HCURSOR hCursor; | ||
| 149 | POINT ptScreenPos; | ||
| 150 | } CURSORINFO, *PCURSORINFO, *LPCURSORINFO; | ||
| 151 | |||
| 152 | #define CURSOR_SHOWING 0x00000001 | ||
| 153 | #endif /* CURSOR_SHOWING */ | ||
| 154 | |||
| 155 | typedef BOOL (WINAPI *CRYPTACQUIRECONTEXT)(HCRYPTPROV *, LPCTSTR, LPCTSTR, | ||
| 156 | DWORD, DWORD); | ||
| 157 | typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV, DWORD, BYTE *); | ||
| 158 | typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV, DWORD); | ||
| 159 | |||
| 160 | typedef HWND (WINAPI *GETFOREGROUNDWINDOW)(VOID); | ||
| 161 | typedef BOOL (WINAPI *GETCURSORINFO)(PCURSORINFO); | ||
| 162 | typedef DWORD (WINAPI *GETQUEUESTATUS)(UINT); | ||
| 163 | |||
| 164 | typedef HANDLE (WINAPI *CREATETOOLHELP32SNAPSHOT)(DWORD, DWORD); | ||
| 165 | typedef BOOL (WINAPI *HEAP32FIRST)(LPHEAPENTRY32, DWORD, DWORD); | ||
| 166 | typedef BOOL (WINAPI *HEAP32NEXT)(LPHEAPENTRY32); | ||
| 167 | typedef BOOL (WINAPI *HEAP32LIST)(HANDLE, LPHEAPLIST32); | ||
| 168 | typedef BOOL (WINAPI *PROCESS32)(HANDLE, LPPROCESSENTRY32); | ||
| 169 | typedef BOOL (WINAPI *THREAD32)(HANDLE, LPTHREADENTRY32); | ||
| 170 | typedef BOOL (WINAPI *MODULE32)(HANDLE, LPMODULEENTRY32); | ||
| 171 | |||
| 172 | #include <lmcons.h> | ||
| 173 | #include <lmstats.h> | ||
| 174 | #if 1 /* The NET API is Unicode only. It requires the use of the UNICODE | ||
| 175 | * macro. When UNICODE is defined LPTSTR becomes LPWSTR. LMSTR was | ||
| 176 | * was added to the Platform SDK to allow the NET API to be used in | ||
| 177 | * non-Unicode applications provided that Unicode strings were still | ||
| 178 | * used for input. LMSTR is defined as LPWSTR. | ||
| 179 | */ | ||
| 180 | typedef NET_API_STATUS (NET_API_FUNCTION * NETSTATGET) | ||
| 181 | (LPWSTR, LPWSTR, DWORD, DWORD, LPBYTE*); | ||
| 182 | typedef NET_API_STATUS (NET_API_FUNCTION * NETFREE)(LPBYTE); | ||
| 183 | #endif /* 1 */ | ||
| 184 | |||
| 185 | int RAND_poll(void) | ||
| 186 | { | ||
| 187 | MEMORYSTATUS m; | ||
| 188 | HCRYPTPROV hProvider = 0; | ||
| 189 | BYTE buf[64]; | ||
| 190 | DWORD w; | ||
| 191 | HWND h; | ||
| 192 | |||
| 193 | HMODULE advapi, kernel, user, netapi; | ||
| 194 | CRYPTACQUIRECONTEXT acquire = 0; | ||
| 195 | CRYPTGENRANDOM gen = 0; | ||
| 196 | CRYPTRELEASECONTEXT release = 0; | ||
| 197 | #if 1 /* There was previously a problem with NETSTATGET. Currently, this | ||
| 198 | * section is still experimental, but if all goes well, this conditional | ||
| 199 | * will be removed | ||
| 200 | */ | ||
| 201 | NETSTATGET netstatget = 0; | ||
| 202 | NETFREE netfree = 0; | ||
| 203 | #endif /* 1 */ | ||
| 204 | |||
| 205 | /* Determine the OS version we are on so we can turn off things | ||
| 206 | * that do not work properly. | ||
| 207 | */ | ||
| 208 | OSVERSIONINFO osverinfo ; | ||
| 209 | osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ; | ||
| 210 | GetVersionEx( &osverinfo ) ; | ||
| 211 | |||
| 212 | /* load functions dynamically - not available on all systems */ | ||
| 213 | advapi = LoadLibrary("ADVAPI32.DLL"); | ||
| 214 | kernel = LoadLibrary("KERNEL32.DLL"); | ||
| 215 | user = LoadLibrary("USER32.DLL"); | ||
| 216 | netapi = LoadLibrary("NETAPI32.DLL"); | ||
| 217 | |||
| 218 | #if 1 /* There was previously a problem with NETSTATGET. Currently, this | ||
| 219 | * section is still experimental, but if all goes well, this conditional | ||
| 220 | * will be removed | ||
| 221 | */ | ||
| 222 | if (netapi) | ||
| 223 | { | ||
| 224 | netstatget = (NETSTATGET) GetProcAddress(netapi,"NetStatisticsGet"); | ||
| 225 | netfree = (NETFREE) GetProcAddress(netapi,"NetApiBufferFree"); | ||
| 226 | } | ||
| 227 | |||
| 228 | if (netstatget && netfree) | ||
| 229 | { | ||
| 230 | LPBYTE outbuf; | ||
| 231 | /* NetStatisticsGet() is a Unicode only function | ||
| 232 | * STAT_WORKSTATION_0 contains 45 fields and STAT_SERVER_0 | ||
| 233 | * contains 17 fields. We treat each field as a source of | ||
| 234 | * one byte of entropy. | ||
| 235 | */ | ||
| 236 | |||
| 237 | if (netstatget(NULL, L"LanmanWorkstation", 0, 0, &outbuf) == 0) | ||
| 238 | { | ||
| 239 | RAND_add(outbuf, sizeof(STAT_WORKSTATION_0), 45); | ||
| 240 | netfree(outbuf); | ||
| 241 | } | ||
| 242 | if (netstatget(NULL, L"LanmanServer", 0, 0, &outbuf) == 0) | ||
| 243 | { | ||
| 244 | RAND_add(outbuf, sizeof(STAT_SERVER_0), 17); | ||
| 245 | netfree(outbuf); | ||
| 246 | } | ||
| 247 | } | ||
| 248 | |||
| 249 | if (netapi) | ||
| 250 | FreeLibrary(netapi); | ||
| 251 | #endif /* 1 */ | ||
| 252 | |||
| 253 | /* It appears like this can cause an exception deep within ADVAPI32.DLL | ||
| 254 | * at random times on Windows 2000. Reported by Jeffrey Altman. | ||
| 255 | * Only use it on NT. | ||
| 256 | */ | ||
| 257 | if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT && | ||
| 258 | osverinfo.dwMajorVersion < 5) | ||
| 259 | { | ||
| 260 | /* Read Performance Statistics from NT/2000 registry | ||
| 261 | * The size of the performance data can vary from call | ||
| 262 | * to call so we must guess the size of the buffer to use | ||
| 263 | * and increase its size if we get an ERROR_MORE_DATA | ||
| 264 | * return instead of ERROR_SUCCESS. | ||
| 265 | */ | ||
| 266 | LONG rc=ERROR_MORE_DATA; | ||
| 267 | char * buf=NULL; | ||
| 268 | DWORD bufsz=0; | ||
| 269 | DWORD length; | ||
| 270 | |||
| 271 | while (rc == ERROR_MORE_DATA) | ||
| 272 | { | ||
| 273 | buf = realloc(buf,bufsz+8192); | ||
| 274 | if (!buf) | ||
| 275 | break; | ||
| 276 | bufsz += 8192; | ||
| 277 | |||
| 278 | length = bufsz; | ||
| 279 | rc = RegQueryValueEx(HKEY_PERFORMANCE_DATA, "Global", | ||
| 280 | NULL, NULL, buf, &length); | ||
| 281 | } | ||
| 282 | if (rc == ERROR_SUCCESS) | ||
| 283 | { | ||
| 284 | /* For entropy count assume only least significant | ||
| 285 | * byte of each DWORD is random. | ||
| 286 | */ | ||
| 287 | RAND_add(&length, sizeof(length), 0); | ||
| 288 | RAND_add(buf, length, length / 4.0); | ||
| 289 | } | ||
| 290 | if (buf) | ||
| 291 | free(buf); | ||
| 292 | } | ||
| 293 | |||
| 294 | if (advapi) | ||
| 295 | { | ||
| 296 | acquire = (CRYPTACQUIRECONTEXT) GetProcAddress(advapi, | ||
| 297 | "CryptAcquireContextA"); | ||
| 298 | gen = (CRYPTGENRANDOM) GetProcAddress(advapi, | ||
| 299 | "CryptGenRandom"); | ||
| 300 | release = (CRYPTRELEASECONTEXT) GetProcAddress(advapi, | ||
| 301 | "CryptReleaseContext"); | ||
| 302 | } | ||
| 303 | |||
| 304 | if (acquire && gen && release) | ||
| 305 | { | ||
| 306 | /* poll the CryptoAPI PRNG */ | ||
| 307 | /* The CryptoAPI returns sizeof(buf) bytes of randomness */ | ||
| 308 | if (acquire(&hProvider, 0, 0, PROV_RSA_FULL, | ||
| 309 | CRYPT_VERIFYCONTEXT)) | ||
| 310 | { | ||
| 311 | if (gen(hProvider, sizeof(buf), buf) != 0) | ||
| 312 | { | ||
| 313 | RAND_add(buf, sizeof(buf), sizeof(buf)); | ||
| 314 | #ifdef DEBUG | ||
| 315 | printf("randomness from PROV_RSA_FULL\n"); | ||
| 316 | #endif | ||
| 317 | } | ||
| 318 | release(hProvider, 0); | ||
| 319 | } | ||
| 320 | |||
| 321 | /* poll the Pentium PRG with CryptoAPI */ | ||
| 322 | if (acquire(&hProvider, 0, INTEL_DEF_PROV, PROV_INTEL_SEC, 0)) | ||
| 323 | { | ||
| 324 | if (gen(hProvider, sizeof(buf), buf) != 0) | ||
| 325 | { | ||
| 326 | RAND_add(buf, sizeof(buf), sizeof(buf)); | ||
| 327 | #ifdef DEBUG | ||
| 328 | printf("randomness from PROV_INTEL_SEC\n"); | ||
| 329 | #endif | ||
| 330 | } | ||
| 331 | release(hProvider, 0); | ||
| 332 | } | ||
| 333 | } | ||
| 334 | |||
| 335 | if (advapi) | ||
| 336 | FreeLibrary(advapi); | ||
| 337 | |||
| 338 | /* timer data */ | ||
| 339 | readtimer(); | ||
| 340 | |||
| 341 | /* memory usage statistics */ | ||
| 342 | GlobalMemoryStatus(&m); | ||
| 343 | RAND_add(&m, sizeof(m), 1); | ||
| 344 | |||
| 345 | /* process ID */ | ||
| 346 | w = GetCurrentProcessId(); | ||
| 347 | RAND_add(&w, sizeof(w), 1); | ||
| 348 | |||
| 349 | if (user) | ||
| 350 | { | ||
| 351 | GETCURSORINFO cursor; | ||
| 352 | GETFOREGROUNDWINDOW win; | ||
| 353 | GETQUEUESTATUS queue; | ||
| 354 | |||
| 355 | win = (GETFOREGROUNDWINDOW) GetProcAddress(user, "GetForegroundWindow"); | ||
| 356 | cursor = (GETCURSORINFO) GetProcAddress(user, "GetCursorInfo"); | ||
| 357 | queue = (GETQUEUESTATUS) GetProcAddress(user, "GetQueueStatus"); | ||
| 358 | |||
| 359 | if (win) | ||
| 360 | { | ||
| 361 | /* window handle */ | ||
| 362 | h = win(); | ||
| 363 | RAND_add(&h, sizeof(h), 0); | ||
| 364 | } | ||
| 365 | if (cursor) | ||
| 366 | { | ||
| 367 | /* unfortunately, its not safe to call GetCursorInfo() | ||
| 368 | * on NT4 even though it exists in SP3 (or SP6) and | ||
| 369 | * higher. | ||
| 370 | */ | ||
| 371 | if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT && | ||
| 372 | osverinfo.dwMajorVersion < 5) | ||
| 373 | cursor = 0; | ||
| 374 | } | ||
| 375 | if (cursor) | ||
| 376 | { | ||
| 377 | /* cursor position */ | ||
| 378 | /* assume 2 bytes of entropy */ | ||
| 379 | CURSORINFO ci; | ||
| 380 | ci.cbSize = sizeof(CURSORINFO); | ||
| 381 | if (cursor(&ci)) | ||
| 382 | RAND_add(&ci, ci.cbSize, 2); | ||
| 383 | } | ||
| 384 | |||
| 385 | if (queue) | ||
| 386 | { | ||
| 387 | /* message queue status */ | ||
| 388 | /* assume 1 byte of entropy */ | ||
| 389 | w = queue(QS_ALLEVENTS); | ||
| 390 | RAND_add(&w, sizeof(w), 1); | ||
| 391 | } | ||
| 392 | |||
| 393 | FreeLibrary(user); | ||
| 394 | } | ||
| 395 | |||
| 396 | /* Toolhelp32 snapshot: enumerate processes, threads, modules and heap | ||
| 397 | * http://msdn.microsoft.com/library/psdk/winbase/toolhelp_5pfd.htm | ||
| 398 | * (Win 9x and 2000 only, not available on NT) | ||
| 399 | * | ||
| 400 | * This seeding method was proposed in Peter Gutmann, Software | ||
| 401 | * Generation of Practically Strong Random Numbers, | ||
| 402 | * http://www.usenix.org/publications/library/proceedings/sec98/gutmann.html | ||
| 403 | * revised version at http://www.cryptoengines.com/~peter/06_random.pdf | ||
| 404 | * (The assignment of entropy estimates below is arbitrary, but based | ||
| 405 | * on Peter's analysis the full poll appears to be safe. Additional | ||
| 406 | * interactive seeding is encouraged.) | ||
| 407 | */ | ||
| 408 | |||
| 409 | if (kernel) | ||
| 410 | { | ||
| 411 | CREATETOOLHELP32SNAPSHOT snap; | ||
| 412 | HANDLE handle; | ||
| 413 | |||
| 414 | HEAP32FIRST heap_first; | ||
| 415 | HEAP32NEXT heap_next; | ||
| 416 | HEAP32LIST heaplist_first, heaplist_next; | ||
| 417 | PROCESS32 process_first, process_next; | ||
| 418 | THREAD32 thread_first, thread_next; | ||
| 419 | MODULE32 module_first, module_next; | ||
| 420 | |||
| 421 | HEAPLIST32 hlist; | ||
| 422 | HEAPENTRY32 hentry; | ||
| 423 | PROCESSENTRY32 p; | ||
| 424 | THREADENTRY32 t; | ||
| 425 | MODULEENTRY32 m; | ||
| 426 | |||
| 427 | snap = (CREATETOOLHELP32SNAPSHOT) | ||
| 428 | GetProcAddress(kernel, "CreateToolhelp32Snapshot"); | ||
| 429 | heap_first = (HEAP32FIRST) GetProcAddress(kernel, "Heap32First"); | ||
| 430 | heap_next = (HEAP32NEXT) GetProcAddress(kernel, "Heap32Next"); | ||
| 431 | heaplist_first = (HEAP32LIST) GetProcAddress(kernel, "Heap32ListFirst"); | ||
| 432 | heaplist_next = (HEAP32LIST) GetProcAddress(kernel, "Heap32ListNext"); | ||
| 433 | process_first = (PROCESS32) GetProcAddress(kernel, "Process32First"); | ||
| 434 | process_next = (PROCESS32) GetProcAddress(kernel, "Process32Next"); | ||
| 435 | thread_first = (THREAD32) GetProcAddress(kernel, "Thread32First"); | ||
| 436 | thread_next = (THREAD32) GetProcAddress(kernel, "Thread32Next"); | ||
| 437 | module_first = (MODULE32) GetProcAddress(kernel, "Module32First"); | ||
| 438 | module_next = (MODULE32) GetProcAddress(kernel, "Module32Next"); | ||
| 439 | |||
| 440 | if (snap && heap_first && heap_next && heaplist_first && | ||
| 441 | heaplist_next && process_first && process_next && | ||
| 442 | thread_first && thread_next && module_first && | ||
| 443 | module_next && (handle = snap(TH32CS_SNAPALL,0)) | ||
| 444 | != NULL) | ||
| 445 | { | ||
| 446 | /* heap list and heap walking */ | ||
| 447 | /* HEAPLIST32 contains 3 fields that will change with | ||
| 448 | * each entry. Consider each field a source of 1 byte | ||
| 449 | * of entropy. | ||
| 450 | * HEAPENTRY32 contains 5 fields that will change with | ||
| 451 | * each entry. Consider each field a source of 1 byte | ||
| 452 | * of entropy. | ||
| 453 | */ | ||
| 454 | hlist.dwSize = sizeof(HEAPLIST32); | ||
| 455 | if (heaplist_first(handle, &hlist)) | ||
| 456 | do | ||
| 457 | { | ||
| 458 | RAND_add(&hlist, hlist.dwSize, 3); | ||
| 459 | hentry.dwSize = sizeof(HEAPENTRY32); | ||
| 460 | if (heap_first(&hentry, | ||
| 461 | hlist.th32ProcessID, | ||
| 462 | hlist.th32HeapID)) | ||
| 463 | { | ||
| 464 | int entrycnt = 50; | ||
| 465 | do | ||
| 466 | RAND_add(&hentry, | ||
| 467 | hentry.dwSize, 5); | ||
| 468 | while (heap_next(&hentry) | ||
| 469 | && --entrycnt > 0); | ||
| 470 | } | ||
| 471 | } while (heaplist_next(handle, | ||
| 472 | &hlist)); | ||
| 473 | |||
| 474 | /* process walking */ | ||
| 475 | /* PROCESSENTRY32 contains 9 fields that will change | ||
| 476 | * with each entry. Consider each field a source of | ||
| 477 | * 1 byte of entropy. | ||
| 478 | */ | ||
| 479 | p.dwSize = sizeof(PROCESSENTRY32); | ||
| 480 | if (process_first(handle, &p)) | ||
| 481 | do | ||
| 482 | RAND_add(&p, p.dwSize, 9); | ||
| 483 | while (process_next(handle, &p)); | ||
| 484 | |||
| 485 | /* thread walking */ | ||
| 486 | /* THREADENTRY32 contains 6 fields that will change | ||
| 487 | * with each entry. Consider each field a source of | ||
| 488 | * 1 byte of entropy. | ||
| 489 | */ | ||
| 490 | t.dwSize = sizeof(THREADENTRY32); | ||
| 491 | if (thread_first(handle, &t)) | ||
| 492 | do | ||
| 493 | RAND_add(&t, t.dwSize, 6); | ||
| 494 | while (thread_next(handle, &t)); | ||
| 495 | |||
| 496 | /* module walking */ | ||
| 497 | /* MODULEENTRY32 contains 9 fields that will change | ||
| 498 | * with each entry. Consider each field a source of | ||
| 499 | * 1 byte of entropy. | ||
| 500 | */ | ||
| 501 | m.dwSize = sizeof(MODULEENTRY32); | ||
| 502 | if (module_first(handle, &m)) | ||
| 503 | do | ||
| 504 | RAND_add(&m, m.dwSize, 9); | ||
| 505 | while (module_next(handle, &m)); | ||
| 506 | |||
| 507 | CloseHandle(handle); | ||
| 508 | } | ||
| 509 | |||
| 510 | FreeLibrary(kernel); | ||
| 511 | } | ||
| 512 | |||
| 513 | #ifdef DEBUG | ||
| 514 | printf("Exiting RAND_poll\n"); | ||
| 515 | #endif | ||
| 516 | |||
| 517 | return(1); | ||
| 518 | } | ||
| 519 | |||
| 520 | int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam) | ||
| 521 | { | ||
| 522 | double add_entropy=0; | ||
| 523 | |||
| 524 | switch (iMsg) | ||
| 525 | { | ||
| 526 | case WM_KEYDOWN: | ||
| 527 | { | ||
| 528 | static WPARAM key; | ||
| 529 | if (key != wParam) | ||
| 530 | add_entropy = 0.05; | ||
| 531 | key = wParam; | ||
| 532 | } | ||
| 533 | break; | ||
| 534 | case WM_MOUSEMOVE: | ||
| 535 | { | ||
| 536 | static int lastx,lasty,lastdx,lastdy; | ||
| 537 | int x,y,dx,dy; | ||
| 538 | |||
| 539 | x=LOWORD(lParam); | ||
| 540 | y=HIWORD(lParam); | ||
| 541 | dx=lastx-x; | ||
| 542 | dy=lasty-y; | ||
| 543 | if (dx != 0 && dy != 0 && dx-lastdx != 0 && dy-lastdy != 0) | ||
| 544 | add_entropy=.2; | ||
| 545 | lastx=x, lasty=y; | ||
| 546 | lastdx=dx, lastdy=dy; | ||
| 547 | } | ||
| 548 | break; | ||
| 549 | } | ||
| 550 | |||
| 551 | readtimer(); | ||
| 552 | RAND_add(&iMsg, sizeof(iMsg), add_entropy); | ||
| 553 | RAND_add(&wParam, sizeof(wParam), 0); | ||
| 554 | RAND_add(&lParam, sizeof(lParam), 0); | ||
| 555 | |||
| 556 | return (RAND_status()); | ||
| 557 | } | ||
| 558 | |||
| 559 | |||
| 560 | void RAND_screen(void) /* function available for backward compatibility */ | ||
| 561 | { | ||
| 562 | RAND_poll(); | ||
| 563 | readscreen(); | ||
| 564 | } | ||
| 565 | |||
| 566 | |||
| 567 | /* feed timing information to the PRNG */ | ||
| 568 | static void readtimer(void) | ||
| 569 | { | ||
| 570 | DWORD w; | ||
| 571 | LARGE_INTEGER l; | ||
| 572 | static int have_perfc = 1; | ||
| 573 | #ifndef __GNUC__ | ||
| 574 | static int have_tsc = 1; | ||
| 575 | DWORD cyclecount; | ||
| 576 | |||
| 577 | if (have_tsc) { | ||
| 578 | __try { | ||
| 579 | __asm { | ||
| 580 | rdtsc | ||
| 581 | mov cyclecount, eax | ||
| 582 | } | ||
| 583 | RAND_add(&cyclecount, sizeof(cyclecount), 1); | ||
| 584 | } __except(EXCEPTION_EXECUTE_HANDLER) { | ||
| 585 | have_tsc = 0; | ||
| 586 | } | ||
| 587 | } | ||
| 588 | #else | ||
| 589 | # define have_tsc 0 | ||
| 590 | #endif | ||
| 591 | |||
| 592 | if (have_perfc) { | ||
| 593 | if (QueryPerformanceCounter(&l) == 0) | ||
| 594 | have_perfc = 0; | ||
| 595 | else | ||
| 596 | RAND_add(&l, sizeof(l), 0); | ||
| 597 | } | ||
| 598 | |||
| 599 | if (!have_tsc && !have_perfc) { | ||
| 600 | w = GetTickCount(); | ||
| 601 | RAND_add(&w, sizeof(w), 0); | ||
| 602 | } | ||
| 603 | } | ||
| 604 | |||
| 605 | /* feed screen contents to PRNG */ | ||
| 606 | /***************************************************************************** | ||
| 607 | * | ||
| 608 | * Created 960901 by Gertjan van Oosten, gertjan@West.NL, West Consulting B.V. | ||
| 609 | * | ||
| 610 | * Code adapted from | ||
| 611 | * <URL:http://www.microsoft.com/kb/developr/win_dk/q97193.htm>; | ||
| 612 | * the original copyright message is: | ||
| 613 | * | ||
| 614 | * (C) Copyright Microsoft Corp. 1993. All rights reserved. | ||
| 615 | * | ||
| 616 | * You have a royalty-free right to use, modify, reproduce and | ||
| 617 | * distribute the Sample Files (and/or any modified version) in | ||
| 618 | * any way you find useful, provided that you agree that | ||
| 619 | * Microsoft has no warranty obligations or liability for any | ||
| 620 | * Sample Application Files which are modified. | ||
| 621 | */ | ||
| 622 | |||
| 623 | static void readscreen(void) | ||
| 624 | { | ||
| 625 | HDC hScrDC; /* screen DC */ | ||
| 626 | HDC hMemDC; /* memory DC */ | ||
| 627 | HBITMAP hBitmap; /* handle for our bitmap */ | ||
| 628 | HBITMAP hOldBitmap; /* handle for previous bitmap */ | ||
| 629 | BITMAP bm; /* bitmap properties */ | ||
| 630 | unsigned int size; /* size of bitmap */ | ||
| 631 | char *bmbits; /* contents of bitmap */ | ||
| 632 | int w; /* screen width */ | ||
| 633 | int h; /* screen height */ | ||
| 634 | int y; /* y-coordinate of screen lines to grab */ | ||
| 635 | int n = 16; /* number of screen lines to grab at a time */ | ||
| 636 | |||
| 637 | /* Create a screen DC and a memory DC compatible to screen DC */ | ||
| 638 | hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL); | ||
| 639 | hMemDC = CreateCompatibleDC(hScrDC); | ||
| 640 | |||
| 641 | /* Get screen resolution */ | ||
| 642 | w = GetDeviceCaps(hScrDC, HORZRES); | ||
| 643 | h = GetDeviceCaps(hScrDC, VERTRES); | ||
| 644 | |||
| 645 | /* Create a bitmap compatible with the screen DC */ | ||
| 646 | hBitmap = CreateCompatibleBitmap(hScrDC, w, n); | ||
| 647 | |||
| 648 | /* Select new bitmap into memory DC */ | ||
| 649 | hOldBitmap = SelectObject(hMemDC, hBitmap); | ||
| 650 | |||
| 651 | /* Get bitmap properties */ | ||
| 652 | GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm); | ||
| 653 | size = (unsigned int)bm.bmWidthBytes * bm.bmHeight * bm.bmPlanes; | ||
| 654 | |||
| 655 | bmbits = OPENSSL_malloc(size); | ||
| 656 | if (bmbits) { | ||
| 657 | /* Now go through the whole screen, repeatedly grabbing n lines */ | ||
| 658 | for (y = 0; y < h-n; y += n) | ||
| 659 | { | ||
| 660 | unsigned char md[MD_DIGEST_LENGTH]; | ||
| 661 | |||
| 662 | /* Bitblt screen DC to memory DC */ | ||
| 663 | BitBlt(hMemDC, 0, 0, w, n, hScrDC, 0, y, SRCCOPY); | ||
| 664 | |||
| 665 | /* Copy bitmap bits from memory DC to bmbits */ | ||
| 666 | GetBitmapBits(hBitmap, size, bmbits); | ||
| 667 | |||
| 668 | /* Get the hash of the bitmap */ | ||
| 669 | MD(bmbits,size,md); | ||
| 670 | |||
| 671 | /* Seed the random generator with the hash value */ | ||
| 672 | RAND_add(md, MD_DIGEST_LENGTH, 0); | ||
| 673 | } | ||
| 674 | |||
| 675 | OPENSSL_free(bmbits); | ||
| 676 | } | ||
| 677 | |||
| 678 | /* Select old bitmap back into memory DC */ | ||
| 679 | hBitmap = SelectObject(hMemDC, hOldBitmap); | ||
| 680 | |||
| 681 | /* Clean up */ | ||
| 682 | DeleteObject(hBitmap); | ||
| 683 | DeleteDC(hMemDC); | ||
| 684 | DeleteDC(hScrDC); | ||
| 685 | } | ||
| 686 | |||
| 687 | #else /* Unix version */ | ||
| 688 | |||
| 689 | #include <time.h> | ||
| 690 | |||
| 691 | int RAND_poll(void) | ||
| 692 | { | ||
| 693 | unsigned long l; | ||
| 694 | pid_t curr_pid = getpid(); | ||
| 695 | #ifdef DEVRANDOM | ||
| 696 | FILE *fh; | ||
| 697 | #endif | ||
| 698 | |||
| 699 | #ifdef DEVRANDOM | ||
| 700 | /* Use a random entropy pool device. Linux, FreeBSD and OpenBSD | ||
| 701 | * have this. Use /dev/urandom if you can as /dev/random may block | ||
| 702 | * if it runs out of random entries. */ | ||
| 703 | |||
| 704 | if ((fh = fopen(DEVRANDOM, "r")) != NULL) | ||
| 705 | { | ||
| 706 | unsigned char tmpbuf[ENTROPY_NEEDED]; | ||
| 707 | int n; | ||
| 708 | |||
| 709 | setvbuf(fh, NULL, _IONBF, 0); | ||
| 710 | n=fread((unsigned char *)tmpbuf,1,ENTROPY_NEEDED,fh); | ||
| 711 | fclose(fh); | ||
| 712 | RAND_add(tmpbuf,sizeof tmpbuf,n); | ||
| 713 | memset(tmpbuf,0,n); | ||
| 714 | } | ||
| 715 | #endif | ||
| 716 | |||
| 717 | /* put in some default random data, we need more than just this */ | ||
| 718 | l=curr_pid; | ||
| 719 | RAND_add(&l,sizeof(l),0); | ||
| 720 | l=getuid(); | ||
| 721 | RAND_add(&l,sizeof(l),0); | ||
| 722 | |||
| 723 | l=time(NULL); | ||
| 724 | RAND_add(&l,sizeof(l),0); | ||
| 725 | |||
| 726 | #ifdef DEVRANDOM | ||
| 727 | return 1; | ||
| 728 | #endif | ||
| 729 | return 0; | ||
| 730 | } | ||
| 731 | |||
| 732 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/rand/randfile.c b/src/lib/libssl/src/crypto/rand/randfile.c index c6ff27be0e..29718bdb9d 100644 --- a/src/lib/libssl/src/crypto/rand/randfile.c +++ b/src/lib/libssl/src/crypto/rand/randfile.c | |||
| @@ -61,8 +61,6 @@ | |||
| 61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
| 62 | #include <string.h> | 62 | #include <string.h> |
| 63 | 63 | ||
| 64 | #include "openssl/e_os.h" | ||
| 65 | |||
| 66 | #ifdef VMS | 64 | #ifdef VMS |
| 67 | #include <unixio.h> | 65 | #include <unixio.h> |
| 68 | #endif | 66 | #endif |
| @@ -75,6 +73,7 @@ | |||
| 75 | # include <sys/stat.h> | 73 | # include <sys/stat.h> |
| 76 | #endif | 74 | #endif |
| 77 | 75 | ||
| 76 | #include <openssl/e_os.h> | ||
| 78 | #include <openssl/crypto.h> | 77 | #include <openssl/crypto.h> |
| 79 | #include <openssl/rand.h> | 78 | #include <openssl/rand.h> |
| 80 | 79 | ||
| @@ -139,7 +138,7 @@ err: | |||
| 139 | int RAND_write_file(const char *file) | 138 | int RAND_write_file(const char *file) |
| 140 | { | 139 | { |
| 141 | unsigned char buf[BUFSIZE]; | 140 | unsigned char buf[BUFSIZE]; |
| 142 | int i,ret=0,err=0; | 141 | int i,ret=0,rand_err=0; |
| 143 | FILE *out = NULL; | 142 | FILE *out = NULL; |
| 144 | int n; | 143 | int n; |
| 145 | struct stat sb; | 144 | struct stat sb; |
| @@ -156,18 +155,18 @@ int RAND_write_file(const char *file) | |||
| 156 | } | 155 | } |
| 157 | } | 156 | } |
| 158 | 157 | ||
| 159 | #if defined(O_CREAT) && defined(O_EXCL) && !defined(WIN32) | 158 | #if defined(O_CREAT) && !defined(WIN32) |
| 160 | /* For some reason Win32 can't write to files created this way */ | 159 | /* For some reason Win32 can't write to files created this way */ |
| 161 | 160 | ||
| 162 | /* chmod(..., 0600) is too late to protect the file, | 161 | /* chmod(..., 0600) is too late to protect the file, |
| 163 | * permissions should be restrictive from the start */ | 162 | * permissions should be restrictive from the start */ |
| 164 | int fd = open(file, O_CREAT | O_EXCL, 0600); | 163 | int fd = open(file, O_CREAT, 0600); |
| 165 | if (fd != -1) | 164 | if (fd != -1) |
| 166 | out = fdopen(fd, "wb"); | 165 | out = fdopen(fd, "wb"); |
| 167 | #endif | 166 | #endif |
| 168 | if (out == NULL) | 167 | if (out == NULL) |
| 169 | out = fopen(file,"wb"); | 168 | out = fopen(file,"wb"); |
| 170 | if (out == NULL) goto err; | 169 | if (out == NULL) goto err; |
| 171 | 170 | ||
| 172 | #ifndef NO_CHMOD | 171 | #ifndef NO_CHMOD |
| 173 | chmod(file,0600); | 172 | chmod(file,0600); |
| @@ -178,7 +177,7 @@ int RAND_write_file(const char *file) | |||
| 178 | i=(n > BUFSIZE)?BUFSIZE:n; | 177 | i=(n > BUFSIZE)?BUFSIZE:n; |
| 179 | n-=BUFSIZE; | 178 | n-=BUFSIZE; |
| 180 | if (RAND_bytes(buf,i) <= 0) | 179 | if (RAND_bytes(buf,i) <= 0) |
| 181 | err=1; | 180 | rand_err=1; |
| 182 | i=fwrite(buf,1,i,out); | 181 | i=fwrite(buf,1,i,out); |
| 183 | if (i <= 0) | 182 | if (i <= 0) |
| 184 | { | 183 | { |
| @@ -194,7 +193,7 @@ int RAND_write_file(const char *file) | |||
| 194 | { | 193 | { |
| 195 | char *tmpf; | 194 | char *tmpf; |
| 196 | 195 | ||
| 197 | tmpf = Malloc(strlen(file) + 4); /* to add ";-1" and a nul */ | 196 | tmpf = OPENSSL_malloc(strlen(file) + 4); /* to add ";-1" and a nul */ |
| 198 | if (tmpf) | 197 | if (tmpf) |
| 199 | { | 198 | { |
| 200 | strcpy(tmpf, file); | 199 | strcpy(tmpf, file); |
| @@ -211,7 +210,7 @@ int RAND_write_file(const char *file) | |||
| 211 | fclose(out); | 210 | fclose(out); |
| 212 | memset(buf,0,BUFSIZE); | 211 | memset(buf,0,BUFSIZE); |
| 213 | err: | 212 | err: |
| 214 | return(err ? -1 : ret); | 213 | return (rand_err ? -1 : ret); |
| 215 | } | 214 | } |
| 216 | 215 | ||
| 217 | const char *RAND_file_name(char *buf, int size) | 216 | const char *RAND_file_name(char *buf, int size) |
diff --git a/src/lib/libssl/src/crypto/rc2/rc2.h b/src/lib/libssl/src/crypto/rc2/rc2.h index 9571efb755..076c0a067c 100644 --- a/src/lib/libssl/src/crypto/rc2/rc2.h +++ b/src/lib/libssl/src/crypto/rc2/rc2.h | |||
| @@ -59,10 +59,6 @@ | |||
| 59 | #ifndef HEADER_RC2_H | 59 | #ifndef HEADER_RC2_H |
| 60 | #define HEADER_RC2_H | 60 | #define HEADER_RC2_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_RC2 | 62 | #ifdef NO_RC2 |
| 67 | #error RC2 is disabled. | 63 | #error RC2 is disabled. |
| 68 | #endif | 64 | #endif |
| @@ -74,23 +70,29 @@ extern "C" { | |||
| 74 | #define RC2_BLOCK 8 | 70 | #define RC2_BLOCK 8 |
| 75 | #define RC2_KEY_LENGTH 16 | 71 | #define RC2_KEY_LENGTH 16 |
| 76 | 72 | ||
| 73 | #ifdef __cplusplus | ||
| 74 | extern "C" { | ||
| 75 | #endif | ||
| 76 | |||
| 77 | typedef struct rc2_key_st | 77 | typedef struct rc2_key_st |
| 78 | { | 78 | { |
| 79 | RC2_INT data[64]; | 79 | RC2_INT data[64]; |
| 80 | } RC2_KEY; | 80 | } RC2_KEY; |
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | void RC2_set_key(RC2_KEY *key, int len, unsigned char *data,int bits); | 83 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); |
| 84 | void RC2_ecb_encrypt(unsigned char *in,unsigned char *out,RC2_KEY *key, | 84 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, |
| 85 | int enc); | 85 | int enc); |
| 86 | void RC2_encrypt(unsigned long *data,RC2_KEY *key); | 86 | void RC2_encrypt(unsigned long *data,RC2_KEY *key); |
| 87 | void RC2_decrypt(unsigned long *data,RC2_KEY *key); | 87 | void RC2_decrypt(unsigned long *data,RC2_KEY *key); |
| 88 | void RC2_cbc_encrypt(unsigned char *in, unsigned char *out, long length, | 88 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, |
| 89 | RC2_KEY *ks, unsigned char *iv, int enc); | 89 | RC2_KEY *ks, unsigned char *iv, int enc); |
| 90 | void RC2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, | 90 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, |
| 91 | RC2_KEY *schedule, unsigned char *ivec, int *num, int enc); | 91 | long length, RC2_KEY *schedule, unsigned char *ivec, |
| 92 | void RC2_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, | 92 | int *num, int enc); |
| 93 | RC2_KEY *schedule, unsigned char *ivec, int *num); | 93 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, |
| 94 | long length, RC2_KEY *schedule, unsigned char *ivec, | ||
| 95 | int *num); | ||
| 94 | 96 | ||
| 95 | #ifdef __cplusplus | 97 | #ifdef __cplusplus |
| 96 | } | 98 | } |
diff --git a/src/lib/libssl/src/crypto/rc2/rc2_cbc.c b/src/lib/libssl/src/crypto/rc2/rc2_cbc.c index 1202184e85..74f48d3d87 100644 --- a/src/lib/libssl/src/crypto/rc2/rc2_cbc.c +++ b/src/lib/libssl/src/crypto/rc2/rc2_cbc.c | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | #include <openssl/rc2.h> | 59 | #include <openssl/rc2.h> |
| 60 | #include "rc2_locl.h" | 60 | #include "rc2_locl.h" |
| 61 | 61 | ||
| 62 | void RC2_cbc_encrypt(unsigned char *in, unsigned char *out, long length, | 62 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, |
| 63 | RC2_KEY *ks, unsigned char *iv, int encrypt) | 63 | RC2_KEY *ks, unsigned char *iv, int encrypt) |
| 64 | { | 64 | { |
| 65 | register unsigned long tin0,tin1; | 65 | register unsigned long tin0,tin1; |
diff --git a/src/lib/libssl/src/crypto/rc2/rc2_ecb.c b/src/lib/libssl/src/crypto/rc2/rc2_ecb.c index 7d77b9186c..d3e8c2718a 100644 --- a/src/lib/libssl/src/crypto/rc2/rc2_ecb.c +++ b/src/lib/libssl/src/crypto/rc2/rc2_ecb.c | |||
| @@ -70,8 +70,8 @@ const char *RC2_version="RC2" OPENSSL_VERSION_PTEXT; | |||
| 70 | * Date: 11 Feb 1996 06:45:03 GMT | 70 | * Date: 11 Feb 1996 06:45:03 GMT |
| 71 | */ | 71 | */ |
| 72 | 72 | ||
| 73 | void RC2_ecb_encrypt(unsigned char *in, unsigned char *out, RC2_KEY *ks, | 73 | void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, RC2_KEY *ks, |
| 74 | int encrypt) | 74 | int encrypt) |
| 75 | { | 75 | { |
| 76 | unsigned long l,d[2]; | 76 | unsigned long l,d[2]; |
| 77 | 77 | ||
diff --git a/src/lib/libssl/src/crypto/rc2/rc2_skey.c b/src/lib/libssl/src/crypto/rc2/rc2_skey.c index 7143c4e591..cab3080c73 100644 --- a/src/lib/libssl/src/crypto/rc2/rc2_skey.c +++ b/src/lib/libssl/src/crypto/rc2/rc2_skey.c | |||
| @@ -90,7 +90,7 @@ static unsigned char key_table[256]={ | |||
| 90 | * BSAFE uses the 'retarded' version. What I previously shipped is | 90 | * BSAFE uses the 'retarded' version. What I previously shipped is |
| 91 | * the same as specifying 1024 for the 'bits' parameter. Bsafe uses | 91 | * the same as specifying 1024 for the 'bits' parameter. Bsafe uses |
| 92 | * a version where the bits parameter is the same as len*8 */ | 92 | * a version where the bits parameter is the same as len*8 */ |
| 93 | void RC2_set_key(RC2_KEY *key, int len, unsigned char *data, int bits) | 93 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) |
| 94 | { | 94 | { |
| 95 | int i,j; | 95 | int i,j; |
| 96 | unsigned char *k; | 96 | unsigned char *k; |
diff --git a/src/lib/libssl/src/crypto/rc2/rc2cfb64.c b/src/lib/libssl/src/crypto/rc2/rc2cfb64.c index 5e3fa07d90..b3a0158a6e 100644 --- a/src/lib/libssl/src/crypto/rc2/rc2cfb64.c +++ b/src/lib/libssl/src/crypto/rc2/rc2cfb64.c | |||
| @@ -64,8 +64,9 @@ | |||
| 64 | * 64bit block we have used is contained in *num; | 64 | * 64bit block we have used is contained in *num; |
| 65 | */ | 65 | */ |
| 66 | 66 | ||
| 67 | void RC2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, | 67 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, |
| 68 | RC2_KEY *schedule, unsigned char *ivec, int *num, int encrypt) | 68 | long length, RC2_KEY *schedule, unsigned char *ivec, |
| 69 | int *num, int encrypt) | ||
| 69 | { | 70 | { |
| 70 | register unsigned long v0,v1,t; | 71 | register unsigned long v0,v1,t; |
| 71 | register int n= *num; | 72 | register int n= *num; |
diff --git a/src/lib/libssl/src/crypto/rc2/rc2ofb64.c b/src/lib/libssl/src/crypto/rc2/rc2ofb64.c index 42cdd40cdd..9e297867ed 100644 --- a/src/lib/libssl/src/crypto/rc2/rc2ofb64.c +++ b/src/lib/libssl/src/crypto/rc2/rc2ofb64.c | |||
| @@ -63,8 +63,9 @@ | |||
| 63 | * used. The extra state information to record how much of the | 63 | * used. The extra state information to record how much of the |
| 64 | * 64bit block we have used is contained in *num; | 64 | * 64bit block we have used is contained in *num; |
| 65 | */ | 65 | */ |
| 66 | void RC2_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, | 66 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, |
| 67 | RC2_KEY *schedule, unsigned char *ivec, int *num) | 67 | long length, RC2_KEY *schedule, unsigned char *ivec, |
| 68 | int *num) | ||
| 68 | { | 69 | { |
| 69 | register unsigned long v0,v1,t; | 70 | register unsigned long v0,v1,t; |
| 70 | register int n= *num; | 71 | register int n= *num; |
diff --git a/src/lib/libssl/src/crypto/rc4/rc4.h b/src/lib/libssl/src/crypto/rc4/rc4.h index 8556dddab0..40251024a4 100644 --- a/src/lib/libssl/src/crypto/rc4/rc4.h +++ b/src/lib/libssl/src/crypto/rc4/rc4.h | |||
| @@ -59,16 +59,16 @@ | |||
| 59 | #ifndef HEADER_RC4_H | 59 | #ifndef HEADER_RC4_H |
| 60 | #define HEADER_RC4_H | 60 | #define HEADER_RC4_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_RC4 | 62 | #ifdef NO_RC4 |
| 67 | #error RC4 is disabled. | 63 | #error RC4 is disabled. |
| 68 | #endif | 64 | #endif |
| 69 | 65 | ||
| 70 | #include <openssl/opensslconf.h> /* RC4_INT */ | 66 | #include <openssl/opensslconf.h> /* RC4_INT */ |
| 71 | 67 | ||
| 68 | #ifdef __cplusplus | ||
| 69 | extern "C" { | ||
| 70 | #endif | ||
| 71 | |||
| 72 | typedef struct rc4_key_st | 72 | typedef struct rc4_key_st |
| 73 | { | 73 | { |
| 74 | RC4_INT x,y; | 74 | RC4_INT x,y; |
diff --git a/src/lib/libssl/src/crypto/rc5/rc5.h b/src/lib/libssl/src/crypto/rc5/rc5.h index 38e901502b..fc4cea5e36 100644 --- a/src/lib/libssl/src/crypto/rc5/rc5.h +++ b/src/lib/libssl/src/crypto/rc5/rc5.h | |||
| @@ -93,18 +93,21 @@ typedef struct rc5_key_st | |||
| 93 | } RC5_32_KEY; | 93 | } RC5_32_KEY; |
| 94 | 94 | ||
| 95 | 95 | ||
| 96 | void RC5_32_set_key(RC5_32_KEY *key, int len, unsigned char *data, | 96 | void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, |
| 97 | int rounds); | 97 | int rounds); |
| 98 | void RC5_32_ecb_encrypt(unsigned char *in,unsigned char *out,RC5_32_KEY *key, | 98 | void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key, |
| 99 | int enc); | 99 | int enc); |
| 100 | void RC5_32_encrypt(unsigned long *data,RC5_32_KEY *key); | 100 | void RC5_32_encrypt(unsigned long *data,RC5_32_KEY *key); |
| 101 | void RC5_32_decrypt(unsigned long *data,RC5_32_KEY *key); | 101 | void RC5_32_decrypt(unsigned long *data,RC5_32_KEY *key); |
| 102 | void RC5_32_cbc_encrypt(unsigned char *in, unsigned char *out, long length, | 102 | void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out, |
| 103 | RC5_32_KEY *ks, unsigned char *iv, int enc); | 103 | long length, RC5_32_KEY *ks, unsigned char *iv, |
| 104 | void RC5_32_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, | 104 | int enc); |
| 105 | RC5_32_KEY *schedule, unsigned char *ivec, int *num, int enc); | 105 | void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out, |
| 106 | void RC5_32_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, | 106 | long length, RC5_32_KEY *schedule, |
| 107 | RC5_32_KEY *schedule, unsigned char *ivec, int *num); | 107 | unsigned char *ivec, int *num, int enc); |
| 108 | void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, | ||
| 109 | long length, RC5_32_KEY *schedule, | ||
| 110 | unsigned char *ivec, int *num); | ||
| 108 | 111 | ||
| 109 | #ifdef __cplusplus | 112 | #ifdef __cplusplus |
| 110 | } | 113 | } |
diff --git a/src/lib/libssl/src/crypto/ripemd/Makefile.ssl b/src/lib/libssl/src/crypto/ripemd/Makefile.ssl index 6ada9f067b..de01a953ec 100644 --- a/src/lib/libssl/src/crypto/ripemd/Makefile.ssl +++ b/src/lib/libssl/src/crypto/ripemd/Makefile.ssl | |||
| @@ -22,7 +22,7 @@ CFLAGS= $(INCLUDES) $(CFLAG) | |||
| 22 | 22 | ||
| 23 | GENERAL=Makefile | 23 | GENERAL=Makefile |
| 24 | TEST=rmdtest.c | 24 | TEST=rmdtest.c |
| 25 | APPS=rmd160.c | 25 | APPS= |
| 26 | 26 | ||
| 27 | LIB=$(TOP)/libcrypto.a | 27 | LIB=$(TOP)/libcrypto.a |
| 28 | LIBSRC=rmd_dgst.c rmd_one.c | 28 | LIBSRC=rmd_dgst.c rmd_one.c |
diff --git a/src/lib/libssl/src/crypto/rsa/Makefile.ssl b/src/lib/libssl/src/crypto/rsa/Makefile.ssl index 7b3960e70d..c159eedafe 100644 --- a/src/lib/libssl/src/crypto/rsa/Makefile.ssl +++ b/src/lib/libssl/src/crypto/rsa/Makefile.ssl | |||
| @@ -80,64 +80,97 @@ clean: | |||
| 80 | 80 | ||
| 81 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 81 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 82 | 82 | ||
| 83 | rsa_chk.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 83 | rsa_chk.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 84 | rsa_chk.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 84 | rsa_chk.o: ../../include/openssl/crypto.h ../../include/openssl/err.h |
| 85 | rsa_chk.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 85 | rsa_chk.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h | 86 | rsa_chk.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h |
| 86 | rsa_chk.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 87 | rsa_chk.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 87 | rsa_eay.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 88 | rsa_chk.o: ../../include/openssl/symhacks.h |
| 88 | rsa_eay.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 89 | rsa_eay.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 90 | rsa_eay.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 91 | rsa_eay.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 92 | rsa_eay.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 93 | rsa_eay.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 89 | rsa_eay.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 94 | rsa_eay.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 90 | rsa_eay.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 95 | rsa_eay.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
| 96 | rsa_eay.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 97 | rsa_eay.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 98 | rsa_eay.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 99 | rsa_eay.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 100 | rsa_eay.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 91 | rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 101 | rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 102 | rsa_eay.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 103 | rsa_eay.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 92 | rsa_eay.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 104 | rsa_eay.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 93 | rsa_eay.o: ../../include/openssl/stack.h ../cryptlib.h | 105 | rsa_eay.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 94 | rsa_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 106 | rsa_eay.o: ../../include/openssl/symhacks.h ../cryptlib.h |
| 95 | rsa_err.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 107 | rsa_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 108 | rsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/err.h | ||
| 109 | rsa_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 96 | rsa_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h | 110 | rsa_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h |
| 97 | rsa_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 111 | rsa_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 112 | rsa_err.o: ../../include/openssl/symhacks.h | ||
| 98 | rsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 113 | rsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 99 | rsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 114 | rsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 100 | rsa_gen.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 115 | rsa_gen.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 101 | rsa_gen.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 116 | rsa_gen.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 102 | rsa_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h | 117 | rsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 103 | rsa_gen.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 118 | rsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 119 | rsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 104 | rsa_gen.o: ../cryptlib.h | 120 | rsa_gen.o: ../cryptlib.h |
| 105 | rsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 121 | rsa_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 106 | rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 122 | rsa_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 123 | rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 124 | rsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 125 | rsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 107 | rsa_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 126 | rsa_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 108 | rsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 127 | rsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
| 109 | rsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 128 | rsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 129 | rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 130 | rsa_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 131 | rsa_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 132 | rsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 133 | rsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | ||
| 134 | rsa_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 135 | rsa_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 110 | rsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 136 | rsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 111 | rsa_lib.o: ../../include/openssl/stack.h ../cryptlib.h | 137 | rsa_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 138 | rsa_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 112 | rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 139 | rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 113 | rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 140 | rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 114 | rsa_none.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 141 | rsa_none.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 115 | rsa_none.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 142 | rsa_none.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 143 | rsa_none.o: ../../include/openssl/opensslconf.h | ||
| 116 | rsa_none.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 144 | rsa_none.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 117 | rsa_none.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 145 | rsa_none.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 118 | rsa_none.o: ../../include/openssl/stack.h ../cryptlib.h | 146 | rsa_none.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 147 | rsa_none.o: ../cryptlib.h | ||
| 119 | rsa_null.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 148 | rsa_null.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 120 | rsa_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 149 | rsa_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 121 | rsa_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 150 | rsa_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 122 | rsa_null.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 151 | rsa_null.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 152 | rsa_null.o: ../../include/openssl/opensslconf.h | ||
| 123 | rsa_null.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 153 | rsa_null.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 124 | rsa_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 154 | rsa_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 125 | rsa_null.o: ../../include/openssl/stack.h ../cryptlib.h | 155 | rsa_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 156 | rsa_null.o: ../cryptlib.h | ||
| 126 | rsa_oaep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 157 | rsa_oaep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 127 | rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 158 | rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 128 | rsa_oaep.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 159 | rsa_oaep.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 129 | rsa_oaep.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 160 | rsa_oaep.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 161 | rsa_oaep.o: ../../include/openssl/opensslconf.h | ||
| 130 | rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 162 | rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h |
| 131 | rsa_oaep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 163 | rsa_oaep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 132 | rsa_oaep.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 164 | rsa_oaep.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 133 | rsa_oaep.o: ../cryptlib.h | 165 | rsa_oaep.o: ../../include/openssl/symhacks.h ../cryptlib.h |
| 134 | rsa_pk1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 166 | rsa_pk1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 135 | rsa_pk1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 167 | rsa_pk1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 136 | rsa_pk1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 168 | rsa_pk1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 137 | rsa_pk1.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 169 | rsa_pk1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 138 | rsa_pk1.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 170 | rsa_pk1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 139 | rsa_pk1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 171 | rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h |
| 140 | rsa_pk1.o: ../../include/openssl/stack.h ../cryptlib.h | 172 | rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 173 | rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
| 141 | rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 174 | rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 142 | rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 175 | rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 143 | rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 176 | rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -145,37 +178,43 @@ rsa_saos.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 145 | rsa_saos.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 178 | rsa_saos.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 146 | rsa_saos.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 179 | rsa_saos.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 147 | rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 180 | rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 148 | rsa_saos.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 181 | rsa_saos.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 182 | rsa_saos.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 149 | rsa_saos.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 183 | rsa_saos.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 150 | rsa_saos.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 184 | rsa_saos.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 185 | rsa_saos.o: ../../include/openssl/opensslconf.h | ||
| 151 | rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 186 | rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 152 | rsa_saos.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 187 | rsa_saos.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 153 | rsa_saos.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 188 | rsa_saos.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 154 | rsa_saos.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 189 | rsa_saos.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 155 | rsa_saos.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 190 | rsa_saos.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 156 | rsa_saos.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 191 | rsa_saos.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 157 | rsa_saos.o: ../cryptlib.h | 192 | rsa_saos.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 158 | rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 193 | rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 159 | rsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 194 | rsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 160 | rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 195 | rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 161 | rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 196 | rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 162 | rsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 197 | rsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 163 | rsa_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 198 | rsa_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 164 | rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 199 | rsa_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
| 165 | rsa_sign.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 200 | rsa_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 166 | rsa_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 201 | rsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 202 | rsa_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 203 | rsa_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 167 | rsa_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 204 | rsa_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 168 | rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 205 | rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 169 | rsa_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 206 | rsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h |
| 170 | rsa_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 207 | rsa_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 171 | rsa_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 208 | rsa_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 172 | rsa_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 209 | rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 210 | rsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 173 | rsa_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 211 | rsa_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 174 | rsa_sign.o: ../cryptlib.h | 212 | rsa_sign.o: ../cryptlib.h |
| 175 | rsa_ssl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 213 | rsa_ssl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 176 | rsa_ssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 214 | rsa_ssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 177 | rsa_ssl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 215 | rsa_ssl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 178 | rsa_ssl.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h | 216 | rsa_ssl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 179 | rsa_ssl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h | 217 | rsa_ssl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 180 | rsa_ssl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 218 | rsa_ssl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h |
| 181 | rsa_ssl.o: ../../include/openssl/stack.h ../cryptlib.h | 219 | rsa_ssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 220 | rsa_ssl.o: ../../include/openssl/symhacks.h ../cryptlib.h | ||
diff --git a/src/lib/libssl/src/crypto/rsa/rsa.h b/src/lib/libssl/src/crypto/rsa/rsa.h index f9f9b5cfe9..bda636a365 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa.h +++ b/src/lib/libssl/src/crypto/rsa/rsa.h | |||
| @@ -59,10 +59,9 @@ | |||
| 59 | #ifndef HEADER_RSA_H | 59 | #ifndef HEADER_RSA_H |
| 60 | #define HEADER_RSA_H | 60 | #define HEADER_RSA_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | 62 | #ifndef NO_BIO |
| 63 | extern "C" { | 63 | #include <openssl/bio.h> |
| 64 | #endif | 64 | #endif |
| 65 | |||
| 66 | #include <openssl/bn.h> | 65 | #include <openssl/bn.h> |
| 67 | #include <openssl/crypto.h> | 66 | #include <openssl/crypto.h> |
| 68 | 67 | ||
| @@ -70,6 +69,10 @@ extern "C" { | |||
| 70 | #error RSA is disabled. | 69 | #error RSA is disabled. |
| 71 | #endif | 70 | #endif |
| 72 | 71 | ||
| 72 | #ifdef __cplusplus | ||
| 73 | extern "C" { | ||
| 74 | #endif | ||
| 75 | |||
| 73 | typedef struct rsa_st RSA; | 76 | typedef struct rsa_st RSA; |
| 74 | 77 | ||
| 75 | typedef struct rsa_meth_st | 78 | typedef struct rsa_meth_st |
| @@ -111,7 +114,11 @@ struct rsa_st | |||
| 111 | * this is passed instead of aEVP_PKEY, it is set to 0 */ | 114 | * this is passed instead of aEVP_PKEY, it is set to 0 */ |
| 112 | int pad; | 115 | int pad; |
| 113 | int version; | 116 | int version; |
| 117 | #if 0 | ||
| 114 | RSA_METHOD *meth; | 118 | RSA_METHOD *meth; |
| 119 | #else | ||
| 120 | struct engine_st *engine; | ||
| 121 | #endif | ||
| 115 | BIGNUM *n; | 122 | BIGNUM *n; |
| 116 | BIGNUM *e; | 123 | BIGNUM *e; |
| 117 | BIGNUM *d; | 124 | BIGNUM *d; |
| @@ -165,7 +172,11 @@ struct rsa_st | |||
| 165 | #define RSA_get_app_data(s) RSA_get_ex_data(s,0) | 172 | #define RSA_get_app_data(s) RSA_get_ex_data(s,0) |
| 166 | 173 | ||
| 167 | RSA * RSA_new(void); | 174 | RSA * RSA_new(void); |
| 175 | #if 0 | ||
| 168 | RSA * RSA_new_method(RSA_METHOD *method); | 176 | RSA * RSA_new_method(RSA_METHOD *method); |
| 177 | #else | ||
| 178 | RSA * RSA_new_method(struct engine_st *engine); | ||
| 179 | #endif | ||
| 169 | int RSA_size(RSA *); | 180 | int RSA_size(RSA *); |
| 170 | RSA * RSA_generate_key(int bits, unsigned long e,void | 181 | RSA * RSA_generate_key(int bits, unsigned long e,void |
| 171 | (*callback)(int,int,void *),void *cb_arg); | 182 | (*callback)(int,int,void *),void *cb_arg); |
| @@ -183,10 +194,14 @@ void RSA_free (RSA *r); | |||
| 183 | 194 | ||
| 184 | int RSA_flags(RSA *r); | 195 | int RSA_flags(RSA *r); |
| 185 | 196 | ||
| 186 | void RSA_set_default_method(RSA_METHOD *meth); | 197 | void RSA_set_default_openssl_method(RSA_METHOD *meth); |
| 187 | RSA_METHOD *RSA_get_default_method(void); | 198 | RSA_METHOD *RSA_get_default_openssl_method(void); |
| 188 | RSA_METHOD *RSA_get_method(RSA *rsa); | 199 | RSA_METHOD *RSA_get_method(RSA *rsa); |
| 200 | #if 0 | ||
| 189 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth); | 201 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth); |
| 202 | #else | ||
| 203 | int RSA_set_method(RSA *rsa, struct engine_st *engine); | ||
| 204 | #endif | ||
| 190 | 205 | ||
| 191 | /* This function needs the memory locking malloc callbacks to be installed */ | 206 | /* This function needs the memory locking malloc callbacks to be installed */ |
| 192 | int RSA_memory_lock(RSA *r); | 207 | int RSA_memory_lock(RSA *r); |
| @@ -209,10 +224,14 @@ int i2d_RSAPrivateKey(RSA *a, unsigned char **pp); | |||
| 209 | int RSA_print_fp(FILE *fp, RSA *r,int offset); | 224 | int RSA_print_fp(FILE *fp, RSA *r,int offset); |
| 210 | #endif | 225 | #endif |
| 211 | 226 | ||
| 212 | #ifdef HEADER_BIO_H | 227 | #ifndef NO_BIO |
| 213 | int RSA_print(BIO *bp, RSA *r,int offset); | 228 | int RSA_print(BIO *bp, RSA *r,int offset); |
| 214 | #endif | 229 | #endif |
| 215 | 230 | ||
| 231 | int i2d_RSA_NET(RSA *a, unsigned char **pp, int (*cb)(), int sgckey); | ||
| 232 | RSA *d2i_RSA_NET(RSA **a, unsigned char **pp, long length, int (*cb)(), int sgckey); | ||
| 233 | RSA *d2i_RSA_NET_2(RSA **a, unsigned char **pp, long length, int (*cb)(), int sgckey); | ||
| 234 | |||
| 216 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()); | 235 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()); |
| 217 | RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()); | 236 | RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()); |
| 218 | /* Naughty internal function required elsewhere, to handle a MS structure | 237 | /* Naughty internal function required elsewhere, to handle a MS structure |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_eay.c b/src/lib/libssl/src/crypto/rsa/rsa_eay.c index b7d2460754..8b8a1e279a 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_eay.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_eay.c | |||
| @@ -61,6 +61,7 @@ | |||
| 61 | #include <openssl/bn.h> | 61 | #include <openssl/bn.h> |
| 62 | #include <openssl/rsa.h> | 62 | #include <openssl/rsa.h> |
| 63 | #include <openssl/rand.h> | 63 | #include <openssl/rand.h> |
| 64 | #include <openssl/engine.h> | ||
| 64 | 65 | ||
| 65 | #ifndef RSA_NULL | 66 | #ifndef RSA_NULL |
| 66 | 67 | ||
| @@ -97,16 +98,18 @@ RSA_METHOD *RSA_PKCS1_SSLeay(void) | |||
| 97 | static int RSA_eay_public_encrypt(int flen, unsigned char *from, | 98 | static int RSA_eay_public_encrypt(int flen, unsigned char *from, |
| 98 | unsigned char *to, RSA *rsa, int padding) | 99 | unsigned char *to, RSA *rsa, int padding) |
| 99 | { | 100 | { |
| 101 | const RSA_METHOD *meth; | ||
| 100 | BIGNUM f,ret; | 102 | BIGNUM f,ret; |
| 101 | int i,j,k,num=0,r= -1; | 103 | int i,j,k,num=0,r= -1; |
| 102 | unsigned char *buf=NULL; | 104 | unsigned char *buf=NULL; |
| 103 | BN_CTX *ctx=NULL; | 105 | BN_CTX *ctx=NULL; |
| 104 | 106 | ||
| 107 | meth = ENGINE_get_RSA(rsa->engine); | ||
| 105 | BN_init(&f); | 108 | BN_init(&f); |
| 106 | BN_init(&ret); | 109 | BN_init(&ret); |
| 107 | if ((ctx=BN_CTX_new()) == NULL) goto err; | 110 | if ((ctx=BN_CTX_new()) == NULL) goto err; |
| 108 | num=BN_num_bytes(rsa->n); | 111 | num=BN_num_bytes(rsa->n); |
| 109 | if ((buf=(unsigned char *)Malloc(num)) == NULL) | 112 | if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) |
| 110 | { | 113 | { |
| 111 | RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT,ERR_R_MALLOC_FAILURE); | 114 | RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT,ERR_R_MALLOC_FAILURE); |
| 112 | goto err; | 115 | goto err; |
| @@ -143,7 +146,7 @@ static int RSA_eay_public_encrypt(int flen, unsigned char *from, | |||
| 143 | goto err; | 146 | goto err; |
| 144 | } | 147 | } |
| 145 | 148 | ||
| 146 | if (!rsa->meth->bn_mod_exp(&ret,&f,rsa->e,rsa->n,ctx, | 149 | if (!meth->bn_mod_exp(&ret,&f,rsa->e,rsa->n,ctx, |
| 147 | rsa->_method_mod_n)) goto err; | 150 | rsa->_method_mod_n)) goto err; |
| 148 | 151 | ||
| 149 | /* put in leading 0 bytes if the number is less than the | 152 | /* put in leading 0 bytes if the number is less than the |
| @@ -161,7 +164,7 @@ err: | |||
| 161 | if (buf != NULL) | 164 | if (buf != NULL) |
| 162 | { | 165 | { |
| 163 | memset(buf,0,num); | 166 | memset(buf,0,num); |
| 164 | Free(buf); | 167 | OPENSSL_free(buf); |
| 165 | } | 168 | } |
| 166 | return(r); | 169 | return(r); |
| 167 | } | 170 | } |
| @@ -169,17 +172,19 @@ err: | |||
| 169 | static int RSA_eay_private_encrypt(int flen, unsigned char *from, | 172 | static int RSA_eay_private_encrypt(int flen, unsigned char *from, |
| 170 | unsigned char *to, RSA *rsa, int padding) | 173 | unsigned char *to, RSA *rsa, int padding) |
| 171 | { | 174 | { |
| 175 | const RSA_METHOD *meth; | ||
| 172 | BIGNUM f,ret; | 176 | BIGNUM f,ret; |
| 173 | int i,j,k,num=0,r= -1; | 177 | int i,j,k,num=0,r= -1; |
| 174 | unsigned char *buf=NULL; | 178 | unsigned char *buf=NULL; |
| 175 | BN_CTX *ctx=NULL; | 179 | BN_CTX *ctx=NULL; |
| 176 | 180 | ||
| 181 | meth = ENGINE_get_RSA(rsa->engine); | ||
| 177 | BN_init(&f); | 182 | BN_init(&f); |
| 178 | BN_init(&ret); | 183 | BN_init(&ret); |
| 179 | 184 | ||
| 180 | if ((ctx=BN_CTX_new()) == NULL) goto err; | 185 | if ((ctx=BN_CTX_new()) == NULL) goto err; |
| 181 | num=BN_num_bytes(rsa->n); | 186 | num=BN_num_bytes(rsa->n); |
| 182 | if ((buf=(unsigned char *)Malloc(num)) == NULL) | 187 | if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) |
| 183 | { | 188 | { |
| 184 | RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT,ERR_R_MALLOC_FAILURE); | 189 | RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT,ERR_R_MALLOC_FAILURE); |
| 185 | goto err; | 190 | goto err; |
| @@ -213,10 +218,10 @@ static int RSA_eay_private_encrypt(int flen, unsigned char *from, | |||
| 213 | (rsa->dmp1 != NULL) && | 218 | (rsa->dmp1 != NULL) && |
| 214 | (rsa->dmq1 != NULL) && | 219 | (rsa->dmq1 != NULL) && |
| 215 | (rsa->iqmp != NULL)) ) | 220 | (rsa->iqmp != NULL)) ) |
| 216 | { if (!rsa->meth->rsa_mod_exp(&ret,&f,rsa)) goto err; } | 221 | { if (!meth->rsa_mod_exp(&ret,&f,rsa)) goto err; } |
| 217 | else | 222 | else |
| 218 | { | 223 | { |
| 219 | if (!rsa->meth->bn_mod_exp(&ret,&f,rsa->d,rsa->n,ctx,NULL)) goto err; | 224 | if (!meth->bn_mod_exp(&ret,&f,rsa->d,rsa->n,ctx,NULL)) goto err; |
| 220 | } | 225 | } |
| 221 | 226 | ||
| 222 | if (rsa->flags & RSA_FLAG_BLINDING) | 227 | if (rsa->flags & RSA_FLAG_BLINDING) |
| @@ -237,7 +242,7 @@ err: | |||
| 237 | if (buf != NULL) | 242 | if (buf != NULL) |
| 238 | { | 243 | { |
| 239 | memset(buf,0,num); | 244 | memset(buf,0,num); |
| 240 | Free(buf); | 245 | OPENSSL_free(buf); |
| 241 | } | 246 | } |
| 242 | return(r); | 247 | return(r); |
| 243 | } | 248 | } |
| @@ -245,12 +250,14 @@ err: | |||
| 245 | static int RSA_eay_private_decrypt(int flen, unsigned char *from, | 250 | static int RSA_eay_private_decrypt(int flen, unsigned char *from, |
| 246 | unsigned char *to, RSA *rsa, int padding) | 251 | unsigned char *to, RSA *rsa, int padding) |
| 247 | { | 252 | { |
| 253 | const RSA_METHOD *meth; | ||
| 248 | BIGNUM f,ret; | 254 | BIGNUM f,ret; |
| 249 | int j,num=0,r= -1; | 255 | int j,num=0,r= -1; |
| 250 | unsigned char *p; | 256 | unsigned char *p; |
| 251 | unsigned char *buf=NULL; | 257 | unsigned char *buf=NULL; |
| 252 | BN_CTX *ctx=NULL; | 258 | BN_CTX *ctx=NULL; |
| 253 | 259 | ||
| 260 | meth = ENGINE_get_RSA(rsa->engine); | ||
| 254 | BN_init(&f); | 261 | BN_init(&f); |
| 255 | BN_init(&ret); | 262 | BN_init(&ret); |
| 256 | ctx=BN_CTX_new(); | 263 | ctx=BN_CTX_new(); |
| @@ -258,7 +265,7 @@ static int RSA_eay_private_decrypt(int flen, unsigned char *from, | |||
| 258 | 265 | ||
| 259 | num=BN_num_bytes(rsa->n); | 266 | num=BN_num_bytes(rsa->n); |
| 260 | 267 | ||
| 261 | if ((buf=(unsigned char *)Malloc(num)) == NULL) | 268 | if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) |
| 262 | { | 269 | { |
| 263 | RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT,ERR_R_MALLOC_FAILURE); | 270 | RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT,ERR_R_MALLOC_FAILURE); |
| 264 | goto err; | 271 | goto err; |
| @@ -287,10 +294,10 @@ static int RSA_eay_private_decrypt(int flen, unsigned char *from, | |||
| 287 | (rsa->dmp1 != NULL) && | 294 | (rsa->dmp1 != NULL) && |
| 288 | (rsa->dmq1 != NULL) && | 295 | (rsa->dmq1 != NULL) && |
| 289 | (rsa->iqmp != NULL)) ) | 296 | (rsa->iqmp != NULL)) ) |
| 290 | { if (!rsa->meth->rsa_mod_exp(&ret,&f,rsa)) goto err; } | 297 | { if (!meth->rsa_mod_exp(&ret,&f,rsa)) goto err; } |
| 291 | else | 298 | else |
| 292 | { | 299 | { |
| 293 | if (!rsa->meth->bn_mod_exp(&ret,&f,rsa->d,rsa->n,ctx,NULL)) | 300 | if (!meth->bn_mod_exp(&ret,&f,rsa->d,rsa->n,ctx,NULL)) |
| 294 | goto err; | 301 | goto err; |
| 295 | } | 302 | } |
| 296 | 303 | ||
| @@ -330,7 +337,7 @@ err: | |||
| 330 | if (buf != NULL) | 337 | if (buf != NULL) |
| 331 | { | 338 | { |
| 332 | memset(buf,0,num); | 339 | memset(buf,0,num); |
| 333 | Free(buf); | 340 | OPENSSL_free(buf); |
| 334 | } | 341 | } |
| 335 | return(r); | 342 | return(r); |
| 336 | } | 343 | } |
| @@ -338,19 +345,21 @@ err: | |||
| 338 | static int RSA_eay_public_decrypt(int flen, unsigned char *from, | 345 | static int RSA_eay_public_decrypt(int flen, unsigned char *from, |
| 339 | unsigned char *to, RSA *rsa, int padding) | 346 | unsigned char *to, RSA *rsa, int padding) |
| 340 | { | 347 | { |
| 348 | const RSA_METHOD *meth; | ||
| 341 | BIGNUM f,ret; | 349 | BIGNUM f,ret; |
| 342 | int i,num=0,r= -1; | 350 | int i,num=0,r= -1; |
| 343 | unsigned char *p; | 351 | unsigned char *p; |
| 344 | unsigned char *buf=NULL; | 352 | unsigned char *buf=NULL; |
| 345 | BN_CTX *ctx=NULL; | 353 | BN_CTX *ctx=NULL; |
| 346 | 354 | ||
| 355 | meth = ENGINE_get_RSA(rsa->engine); | ||
| 347 | BN_init(&f); | 356 | BN_init(&f); |
| 348 | BN_init(&ret); | 357 | BN_init(&ret); |
| 349 | ctx=BN_CTX_new(); | 358 | ctx=BN_CTX_new(); |
| 350 | if (ctx == NULL) goto err; | 359 | if (ctx == NULL) goto err; |
| 351 | 360 | ||
| 352 | num=BN_num_bytes(rsa->n); | 361 | num=BN_num_bytes(rsa->n); |
| 353 | buf=(unsigned char *)Malloc(num); | 362 | buf=(unsigned char *)OPENSSL_malloc(num); |
| 354 | if (buf == NULL) | 363 | if (buf == NULL) |
| 355 | { | 364 | { |
| 356 | RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT,ERR_R_MALLOC_FAILURE); | 365 | RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT,ERR_R_MALLOC_FAILURE); |
| @@ -374,7 +383,7 @@ static int RSA_eay_public_decrypt(int flen, unsigned char *from, | |||
| 374 | goto err; | 383 | goto err; |
| 375 | } | 384 | } |
| 376 | 385 | ||
| 377 | if (!rsa->meth->bn_mod_exp(&ret,&f,rsa->e,rsa->n,ctx, | 386 | if (!meth->bn_mod_exp(&ret,&f,rsa->e,rsa->n,ctx, |
| 378 | rsa->_method_mod_n)) goto err; | 387 | rsa->_method_mod_n)) goto err; |
| 379 | 388 | ||
| 380 | p=buf; | 389 | p=buf; |
| @@ -402,17 +411,19 @@ err: | |||
| 402 | if (buf != NULL) | 411 | if (buf != NULL) |
| 403 | { | 412 | { |
| 404 | memset(buf,0,num); | 413 | memset(buf,0,num); |
| 405 | Free(buf); | 414 | OPENSSL_free(buf); |
| 406 | } | 415 | } |
| 407 | return(r); | 416 | return(r); |
| 408 | } | 417 | } |
| 409 | 418 | ||
| 410 | static int RSA_eay_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | 419 | static int RSA_eay_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) |
| 411 | { | 420 | { |
| 421 | const RSA_METHOD *meth; | ||
| 412 | BIGNUM r1,m1; | 422 | BIGNUM r1,m1; |
| 413 | int ret=0; | 423 | int ret=0; |
| 414 | BN_CTX *ctx; | 424 | BN_CTX *ctx; |
| 415 | 425 | ||
| 426 | meth = ENGINE_get_RSA(rsa->engine); | ||
| 416 | if ((ctx=BN_CTX_new()) == NULL) goto err; | 427 | if ((ctx=BN_CTX_new()) == NULL) goto err; |
| 417 | BN_init(&m1); | 428 | BN_init(&m1); |
| 418 | BN_init(&r1); | 429 | BN_init(&r1); |
| @@ -436,11 +447,11 @@ static int RSA_eay_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | |||
| 436 | } | 447 | } |
| 437 | 448 | ||
| 438 | if (!BN_mod(&r1,I,rsa->q,ctx)) goto err; | 449 | if (!BN_mod(&r1,I,rsa->q,ctx)) goto err; |
| 439 | if (!rsa->meth->bn_mod_exp(&m1,&r1,rsa->dmq1,rsa->q,ctx, | 450 | if (!meth->bn_mod_exp(&m1,&r1,rsa->dmq1,rsa->q,ctx, |
| 440 | rsa->_method_mod_q)) goto err; | 451 | rsa->_method_mod_q)) goto err; |
| 441 | 452 | ||
| 442 | if (!BN_mod(&r1,I,rsa->p,ctx)) goto err; | 453 | if (!BN_mod(&r1,I,rsa->p,ctx)) goto err; |
| 443 | if (!rsa->meth->bn_mod_exp(r0,&r1,rsa->dmp1,rsa->p,ctx, | 454 | if (!meth->bn_mod_exp(r0,&r1,rsa->dmp1,rsa->p,ctx, |
| 444 | rsa->_method_mod_p)) goto err; | 455 | rsa->_method_mod_p)) goto err; |
| 445 | 456 | ||
| 446 | if (!BN_sub(r0,r0,&m1)) goto err; | 457 | if (!BN_sub(r0,r0,&m1)) goto err; |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_gen.c b/src/lib/libssl/src/crypto/rsa/rsa_gen.c index 95e636d3f0..00c25adbc5 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_gen.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_gen.c | |||
| @@ -95,7 +95,7 @@ RSA *RSA_generate_key(int bits, unsigned long e_value, | |||
| 95 | * unsigned long can be larger */ | 95 | * unsigned long can be larger */ |
| 96 | for (i=0; i<sizeof(unsigned long)*8; i++) | 96 | for (i=0; i<sizeof(unsigned long)*8; i++) |
| 97 | { | 97 | { |
| 98 | if (e_value & (1<<i)) | 98 | if (e_value & (1UL<<i)) |
| 99 | BN_set_bit(rsa->e,i); | 99 | BN_set_bit(rsa->e,i); |
| 100 | } | 100 | } |
| 101 | #else | 101 | #else |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_lib.c b/src/lib/libssl/src/crypto/rsa/rsa_lib.c index 074a4f5074..5e1e8fcdf3 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_lib.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_lib.c | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | #include <openssl/lhash.h> | 62 | #include <openssl/lhash.h> |
| 63 | #include <openssl/bn.h> | 63 | #include <openssl/bn.h> |
| 64 | #include <openssl/rsa.h> | 64 | #include <openssl/rsa.h> |
| 65 | #include <openssl/engine.h> | ||
| 65 | 66 | ||
| 66 | const char *RSA_version="RSA" OPENSSL_VERSION_PTEXT; | 67 | const char *RSA_version="RSA" OPENSSL_VERSION_PTEXT; |
| 67 | 68 | ||
| @@ -74,21 +75,49 @@ RSA *RSA_new(void) | |||
| 74 | return(RSA_new_method(NULL)); | 75 | return(RSA_new_method(NULL)); |
| 75 | } | 76 | } |
| 76 | 77 | ||
| 77 | void RSA_set_default_method(RSA_METHOD *meth) | 78 | void RSA_set_default_openssl_method(RSA_METHOD *meth) |
| 78 | { | 79 | { |
| 79 | default_RSA_meth=meth; | 80 | ENGINE *e; |
| 81 | /* We'll need to notify the "openssl" ENGINE of this | ||
| 82 | * change too. We won't bother locking things down at | ||
| 83 | * our end as there was never any locking in these | ||
| 84 | * functions! */ | ||
| 85 | if(default_RSA_meth != meth) | ||
| 86 | { | ||
| 87 | default_RSA_meth = meth; | ||
| 88 | e = ENGINE_by_id("openssl"); | ||
| 89 | if(e) | ||
| 90 | { | ||
| 91 | ENGINE_set_RSA(e, meth); | ||
| 92 | ENGINE_free(e); | ||
| 93 | } | ||
| 94 | } | ||
| 80 | } | 95 | } |
| 81 | 96 | ||
| 82 | RSA_METHOD *RSA_get_default_method(void) | 97 | RSA_METHOD *RSA_get_default_openssl_method(void) |
| 83 | { | 98 | { |
| 99 | if (default_RSA_meth == NULL) | ||
| 100 | { | ||
| 101 | #ifdef RSA_NULL | ||
| 102 | default_RSA_meth=RSA_null_method(); | ||
| 103 | #else | ||
| 104 | #ifdef RSAref | ||
| 105 | default_RSA_meth=RSA_PKCS1_RSAref(); | ||
| 106 | #else | ||
| 107 | default_RSA_meth=RSA_PKCS1_SSLeay(); | ||
| 108 | #endif | ||
| 109 | #endif | ||
| 110 | } | ||
| 111 | |||
| 84 | return default_RSA_meth; | 112 | return default_RSA_meth; |
| 85 | } | 113 | } |
| 86 | 114 | ||
| 87 | RSA_METHOD *RSA_get_method(RSA *rsa) | 115 | RSA_METHOD *RSA_get_method(RSA *rsa) |
| 88 | { | 116 | { |
| 89 | return rsa->meth; | 117 | return ENGINE_get_RSA(rsa->engine); |
| 90 | } | 118 | } |
| 91 | 119 | ||
| 120 | #if 0 | ||
| 92 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth) | 121 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth) |
| 93 | { | 122 | { |
| 94 | RSA_METHOD *mtmp; | 123 | RSA_METHOD *mtmp; |
| @@ -98,34 +127,52 @@ RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth) | |||
| 98 | if (meth->init) meth->init(rsa); | 127 | if (meth->init) meth->init(rsa); |
| 99 | return mtmp; | 128 | return mtmp; |
| 100 | } | 129 | } |
| 130 | #else | ||
| 131 | int RSA_set_method(RSA *rsa, ENGINE *engine) | ||
| 132 | { | ||
| 133 | ENGINE *mtmp; | ||
| 134 | RSA_METHOD *meth; | ||
| 135 | mtmp = rsa->engine; | ||
| 136 | meth = ENGINE_get_RSA(mtmp); | ||
| 137 | if (!ENGINE_init(engine)) | ||
| 138 | return 0; | ||
| 139 | if (meth->finish) meth->finish(rsa); | ||
| 140 | rsa->engine = engine; | ||
| 141 | meth = ENGINE_get_RSA(engine); | ||
| 142 | if (meth->init) meth->init(rsa); | ||
| 143 | /* SHOULD ERROR CHECK THIS!!! */ | ||
| 144 | ENGINE_finish(mtmp); | ||
| 145 | return 1; | ||
| 146 | } | ||
| 147 | #endif | ||
| 101 | 148 | ||
| 149 | #if 0 | ||
| 102 | RSA *RSA_new_method(RSA_METHOD *meth) | 150 | RSA *RSA_new_method(RSA_METHOD *meth) |
| 151 | #else | ||
| 152 | RSA *RSA_new_method(ENGINE *engine) | ||
| 153 | #endif | ||
| 103 | { | 154 | { |
| 155 | RSA_METHOD *meth; | ||
| 104 | RSA *ret; | 156 | RSA *ret; |
| 105 | 157 | ||
| 106 | if (default_RSA_meth == NULL) | 158 | ret=(RSA *)OPENSSL_malloc(sizeof(RSA)); |
| 107 | { | ||
| 108 | #ifdef RSA_NULL | ||
| 109 | default_RSA_meth=RSA_null_method(); | ||
| 110 | #else | ||
| 111 | #ifdef RSAref | ||
| 112 | default_RSA_meth=RSA_PKCS1_RSAref(); | ||
| 113 | #else | ||
| 114 | default_RSA_meth=RSA_PKCS1_SSLeay(); | ||
| 115 | #endif | ||
| 116 | #endif | ||
| 117 | } | ||
| 118 | ret=(RSA *)Malloc(sizeof(RSA)); | ||
| 119 | if (ret == NULL) | 159 | if (ret == NULL) |
| 120 | { | 160 | { |
| 121 | RSAerr(RSA_F_RSA_NEW_METHOD,ERR_R_MALLOC_FAILURE); | 161 | RSAerr(RSA_F_RSA_NEW_METHOD,ERR_R_MALLOC_FAILURE); |
| 122 | return(NULL); | 162 | return(NULL); |
| 123 | } | 163 | } |
| 124 | 164 | ||
| 125 | if (meth == NULL) | 165 | if (engine == NULL) |
| 126 | ret->meth=default_RSA_meth; | 166 | { |
| 167 | if((ret->engine=ENGINE_get_default_RSA()) == NULL) | ||
| 168 | { | ||
| 169 | OPENSSL_free(ret); | ||
| 170 | return NULL; | ||
| 171 | } | ||
| 172 | } | ||
| 127 | else | 173 | else |
| 128 | ret->meth=meth; | 174 | ret->engine=engine; |
| 175 | meth = ENGINE_get_RSA(ret->engine); | ||
| 129 | 176 | ||
| 130 | ret->pad=0; | 177 | ret->pad=0; |
| 131 | ret->version=0; | 178 | ret->version=0; |
| @@ -143,10 +190,10 @@ RSA *RSA_new_method(RSA_METHOD *meth) | |||
| 143 | ret->_method_mod_q=NULL; | 190 | ret->_method_mod_q=NULL; |
| 144 | ret->blinding=NULL; | 191 | ret->blinding=NULL; |
| 145 | ret->bignum_data=NULL; | 192 | ret->bignum_data=NULL; |
| 146 | ret->flags=ret->meth->flags; | 193 | ret->flags=meth->flags; |
| 147 | if ((ret->meth->init != NULL) && !ret->meth->init(ret)) | 194 | if ((meth->init != NULL) && !meth->init(ret)) |
| 148 | { | 195 | { |
| 149 | Free(ret); | 196 | OPENSSL_free(ret); |
| 150 | ret=NULL; | 197 | ret=NULL; |
| 151 | } | 198 | } |
| 152 | else | 199 | else |
| @@ -156,6 +203,7 @@ RSA *RSA_new_method(RSA_METHOD *meth) | |||
| 156 | 203 | ||
| 157 | void RSA_free(RSA *r) | 204 | void RSA_free(RSA *r) |
| 158 | { | 205 | { |
| 206 | RSA_METHOD *meth; | ||
| 159 | int i; | 207 | int i; |
| 160 | 208 | ||
| 161 | if (r == NULL) return; | 209 | if (r == NULL) return; |
| @@ -175,8 +223,10 @@ void RSA_free(RSA *r) | |||
| 175 | 223 | ||
| 176 | CRYPTO_free_ex_data(rsa_meth,r,&r->ex_data); | 224 | CRYPTO_free_ex_data(rsa_meth,r,&r->ex_data); |
| 177 | 225 | ||
| 178 | if (r->meth->finish != NULL) | 226 | meth = ENGINE_get_RSA(r->engine); |
| 179 | r->meth->finish(r); | 227 | if (meth->finish != NULL) |
| 228 | meth->finish(r); | ||
| 229 | ENGINE_finish(r->engine); | ||
| 180 | 230 | ||
| 181 | if (r->n != NULL) BN_clear_free(r->n); | 231 | if (r->n != NULL) BN_clear_free(r->n); |
| 182 | if (r->e != NULL) BN_clear_free(r->e); | 232 | if (r->e != NULL) BN_clear_free(r->e); |
| @@ -187,8 +237,8 @@ void RSA_free(RSA *r) | |||
| 187 | if (r->dmq1 != NULL) BN_clear_free(r->dmq1); | 237 | if (r->dmq1 != NULL) BN_clear_free(r->dmq1); |
| 188 | if (r->iqmp != NULL) BN_clear_free(r->iqmp); | 238 | if (r->iqmp != NULL) BN_clear_free(r->iqmp); |
| 189 | if (r->blinding != NULL) BN_BLINDING_free(r->blinding); | 239 | if (r->blinding != NULL) BN_BLINDING_free(r->blinding); |
| 190 | if (r->bignum_data != NULL) Free_locked(r->bignum_data); | 240 | if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data); |
| 191 | Free(r); | 241 | OPENSSL_free(r); |
| 192 | } | 242 | } |
| 193 | 243 | ||
| 194 | int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 244 | int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
| @@ -217,30 +267,34 @@ int RSA_size(RSA *r) | |||
| 217 | int RSA_public_encrypt(int flen, unsigned char *from, unsigned char *to, | 267 | int RSA_public_encrypt(int flen, unsigned char *from, unsigned char *to, |
| 218 | RSA *rsa, int padding) | 268 | RSA *rsa, int padding) |
| 219 | { | 269 | { |
| 220 | return(rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding)); | 270 | return(ENGINE_get_RSA(rsa->engine)->rsa_pub_enc(flen, |
| 271 | from, to, rsa, padding)); | ||
| 221 | } | 272 | } |
| 222 | 273 | ||
| 223 | int RSA_private_encrypt(int flen, unsigned char *from, unsigned char *to, | 274 | int RSA_private_encrypt(int flen, unsigned char *from, unsigned char *to, |
| 224 | RSA *rsa, int padding) | 275 | RSA *rsa, int padding) |
| 225 | { | 276 | { |
| 226 | return(rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding)); | 277 | return(ENGINE_get_RSA(rsa->engine)->rsa_priv_enc(flen, |
| 278 | from, to, rsa, padding)); | ||
| 227 | } | 279 | } |
| 228 | 280 | ||
| 229 | int RSA_private_decrypt(int flen, unsigned char *from, unsigned char *to, | 281 | int RSA_private_decrypt(int flen, unsigned char *from, unsigned char *to, |
| 230 | RSA *rsa, int padding) | 282 | RSA *rsa, int padding) |
| 231 | { | 283 | { |
| 232 | return(rsa->meth->rsa_priv_dec(flen, from, to, rsa, padding)); | 284 | return(ENGINE_get_RSA(rsa->engine)->rsa_priv_dec(flen, |
| 285 | from, to, rsa, padding)); | ||
| 233 | } | 286 | } |
| 234 | 287 | ||
| 235 | int RSA_public_decrypt(int flen, unsigned char *from, unsigned char *to, | 288 | int RSA_public_decrypt(int flen, unsigned char *from, unsigned char *to, |
| 236 | RSA *rsa, int padding) | 289 | RSA *rsa, int padding) |
| 237 | { | 290 | { |
| 238 | return(rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding)); | 291 | return(ENGINE_get_RSA(rsa->engine)->rsa_pub_dec(flen, |
| 292 | from, to, rsa, padding)); | ||
| 239 | } | 293 | } |
| 240 | 294 | ||
| 241 | int RSA_flags(RSA *r) | 295 | int RSA_flags(RSA *r) |
| 242 | { | 296 | { |
| 243 | return((r == NULL)?0:r->meth->flags); | 297 | return((r == NULL)?0:ENGINE_get_RSA(r->engine)->flags); |
| 244 | } | 298 | } |
| 245 | 299 | ||
| 246 | void RSA_blinding_off(RSA *rsa) | 300 | void RSA_blinding_off(RSA *rsa) |
| @@ -274,7 +328,8 @@ int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx) | |||
| 274 | if (!BN_rand(A,BN_num_bits(rsa->n)-1,1,0)) goto err; | 328 | if (!BN_rand(A,BN_num_bits(rsa->n)-1,1,0)) goto err; |
| 275 | if ((Ai=BN_mod_inverse(NULL,A,rsa->n,ctx)) == NULL) goto err; | 329 | if ((Ai=BN_mod_inverse(NULL,A,rsa->n,ctx)) == NULL) goto err; |
| 276 | 330 | ||
| 277 | if (!rsa->meth->bn_mod_exp(A,A,rsa->e,rsa->n,ctx,rsa->_method_mod_n)) | 331 | if (!ENGINE_get_RSA(rsa->engine)->bn_mod_exp(A,A, |
| 332 | rsa->e,rsa->n,ctx,rsa->_method_mod_n)) | ||
| 278 | goto err; | 333 | goto err; |
| 279 | rsa->blinding=BN_BLINDING_new(A,Ai,rsa->n); | 334 | rsa->blinding=BN_BLINDING_new(A,Ai,rsa->n); |
| 280 | rsa->flags|=RSA_FLAG_BLINDING; | 335 | rsa->flags|=RSA_FLAG_BLINDING; |
| @@ -305,7 +360,7 @@ int RSA_memory_lock(RSA *r) | |||
| 305 | j=1; | 360 | j=1; |
| 306 | for (i=0; i<6; i++) | 361 | for (i=0; i<6; i++) |
| 307 | j+= (*t[i])->top; | 362 | j+= (*t[i])->top; |
| 308 | if ((p=Malloc_locked((off+j)*sizeof(BN_ULONG))) == NULL) | 363 | if ((p=OPENSSL_malloc_locked((off+j)*sizeof(BN_ULONG))) == NULL) |
| 309 | { | 364 | { |
| 310 | RSAerr(RSA_F_MEMORY_LOCK,ERR_R_MALLOC_FAILURE); | 365 | RSAerr(RSA_F_MEMORY_LOCK,ERR_R_MALLOC_FAILURE); |
| 311 | return(0); | 366 | return(0); |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c index 1465c01f4f..fd0b7f361f 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c | |||
| @@ -34,7 +34,7 @@ int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, | |||
| 34 | return (0); | 34 | return (0); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | dbmask = Malloc(emlen - SHA_DIGEST_LENGTH); | 37 | dbmask = OPENSSL_malloc(emlen - SHA_DIGEST_LENGTH); |
| 38 | if (dbmask == NULL) | 38 | if (dbmask == NULL) |
| 39 | { | 39 | { |
| 40 | RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, ERR_R_MALLOC_FAILURE); | 40 | RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, ERR_R_MALLOC_FAILURE); |
| @@ -66,7 +66,7 @@ int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, | |||
| 66 | for (i = 0; i < SHA_DIGEST_LENGTH; i++) | 66 | for (i = 0; i < SHA_DIGEST_LENGTH; i++) |
| 67 | seed[i] ^= seedmask[i]; | 67 | seed[i] ^= seedmask[i]; |
| 68 | 68 | ||
| 69 | Free(dbmask); | 69 | OPENSSL_free(dbmask); |
| 70 | return (1); | 70 | return (1); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| @@ -86,7 +86,7 @@ int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, | |||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | dblen = num - SHA_DIGEST_LENGTH; | 88 | dblen = num - SHA_DIGEST_LENGTH; |
| 89 | db = Malloc(dblen); | 89 | db = OPENSSL_malloc(dblen); |
| 90 | if (db == NULL) | 90 | if (db == NULL) |
| 91 | { | 91 | { |
| 92 | RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, ERR_R_MALLOC_FAILURE); | 92 | RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, ERR_R_MALLOC_FAILURE); |
| @@ -128,7 +128,7 @@ int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, | |||
| 128 | memcpy(to, db + i, mlen); | 128 | memcpy(to, db + i, mlen); |
| 129 | } | 129 | } |
| 130 | } | 130 | } |
| 131 | Free(db); | 131 | OPENSSL_free(db); |
| 132 | return (mlen); | 132 | return (mlen); |
| 133 | } | 133 | } |
| 134 | 134 | ||
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_saos.c b/src/lib/libssl/src/crypto/rsa/rsa_saos.c index 61efb0b00f..c77f4381ff 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_saos.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_saos.c | |||
| @@ -81,7 +81,7 @@ int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len, | |||
| 81 | RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY); | 81 | RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY); |
| 82 | return(0); | 82 | return(0); |
| 83 | } | 83 | } |
| 84 | s=(unsigned char *)Malloc((unsigned int)j+1); | 84 | s=(unsigned char *)OPENSSL_malloc((unsigned int)j+1); |
| 85 | if (s == NULL) | 85 | if (s == NULL) |
| 86 | { | 86 | { |
| 87 | RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,ERR_R_MALLOC_FAILURE); | 87 | RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,ERR_R_MALLOC_FAILURE); |
| @@ -96,7 +96,7 @@ int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len, | |||
| 96 | *siglen=i; | 96 | *siglen=i; |
| 97 | 97 | ||
| 98 | memset(s,0,(unsigned int)j+1); | 98 | memset(s,0,(unsigned int)j+1); |
| 99 | Free(s); | 99 | OPENSSL_free(s); |
| 100 | return(ret); | 100 | return(ret); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| @@ -114,7 +114,7 @@ int RSA_verify_ASN1_OCTET_STRING(int dtype, unsigned char *m, | |||
| 114 | return(0); | 114 | return(0); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | s=(unsigned char *)Malloc((unsigned int)siglen); | 117 | s=(unsigned char *)OPENSSL_malloc((unsigned int)siglen); |
| 118 | if (s == NULL) | 118 | if (s == NULL) |
| 119 | { | 119 | { |
| 120 | RSAerr(RSA_F_RSA_VERIFY_ASN1_OCTET_STRING,ERR_R_MALLOC_FAILURE); | 120 | RSAerr(RSA_F_RSA_VERIFY_ASN1_OCTET_STRING,ERR_R_MALLOC_FAILURE); |
| @@ -138,7 +138,7 @@ int RSA_verify_ASN1_OCTET_STRING(int dtype, unsigned char *m, | |||
| 138 | err: | 138 | err: |
| 139 | if (sig != NULL) M_ASN1_OCTET_STRING_free(sig); | 139 | if (sig != NULL) M_ASN1_OCTET_STRING_free(sig); |
| 140 | memset(s,0,(unsigned int)siglen); | 140 | memset(s,0,(unsigned int)siglen); |
| 141 | Free(s); | 141 | OPENSSL_free(s); |
| 142 | return(ret); | 142 | return(ret); |
| 143 | } | 143 | } |
| 144 | 144 | ||
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_sign.c b/src/lib/libssl/src/crypto/rsa/rsa_sign.c index 05bb7fb74a..cf00876292 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_sign.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_sign.c | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | #include <openssl/rsa.h> | 62 | #include <openssl/rsa.h> |
| 63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 64 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
| 65 | #include <openssl/engine.h> | ||
| 65 | 66 | ||
| 66 | /* Size of an SSL signature: MD5+SHA1 */ | 67 | /* Size of an SSL signature: MD5+SHA1 */ |
| 67 | #define SSL_SIG_LENGTH 36 | 68 | #define SSL_SIG_LENGTH 36 |
| @@ -76,7 +77,8 @@ int RSA_sign(int type, unsigned char *m, unsigned int m_len, | |||
| 76 | X509_ALGOR algor; | 77 | X509_ALGOR algor; |
| 77 | ASN1_OCTET_STRING digest; | 78 | ASN1_OCTET_STRING digest; |
| 78 | if(rsa->flags & RSA_FLAG_SIGN_VER) | 79 | if(rsa->flags & RSA_FLAG_SIGN_VER) |
| 79 | return rsa->meth->rsa_sign(type, m, m_len, sigret, siglen, rsa); | 80 | return ENGINE_get_RSA(rsa->engine)->rsa_sign(type, |
| 81 | m, m_len, sigret, siglen, rsa); | ||
| 80 | /* Special case: SSL signature, just check the length */ | 82 | /* Special case: SSL signature, just check the length */ |
| 81 | if(type == NID_md5_sha1) { | 83 | if(type == NID_md5_sha1) { |
| 82 | if(m_len != SSL_SIG_LENGTH) { | 84 | if(m_len != SSL_SIG_LENGTH) { |
| @@ -115,7 +117,7 @@ int RSA_sign(int type, unsigned char *m, unsigned int m_len, | |||
| 115 | return(0); | 117 | return(0); |
| 116 | } | 118 | } |
| 117 | if(type != NID_md5_sha1) { | 119 | if(type != NID_md5_sha1) { |
| 118 | s=(unsigned char *)Malloc((unsigned int)j+1); | 120 | s=(unsigned char *)OPENSSL_malloc((unsigned int)j+1); |
| 119 | if (s == NULL) | 121 | if (s == NULL) |
| 120 | { | 122 | { |
| 121 | RSAerr(RSA_F_RSA_SIGN,ERR_R_MALLOC_FAILURE); | 123 | RSAerr(RSA_F_RSA_SIGN,ERR_R_MALLOC_FAILURE); |
| @@ -132,7 +134,7 @@ int RSA_sign(int type, unsigned char *m, unsigned int m_len, | |||
| 132 | 134 | ||
| 133 | if(type != NID_md5_sha1) { | 135 | if(type != NID_md5_sha1) { |
| 134 | memset(s,0,(unsigned int)j+1); | 136 | memset(s,0,(unsigned int)j+1); |
| 135 | Free(s); | 137 | OPENSSL_free(s); |
| 136 | } | 138 | } |
| 137 | return(ret); | 139 | return(ret); |
| 138 | } | 140 | } |
| @@ -151,9 +153,10 @@ int RSA_verify(int dtype, unsigned char *m, unsigned int m_len, | |||
| 151 | } | 153 | } |
| 152 | 154 | ||
| 153 | if(rsa->flags & RSA_FLAG_SIGN_VER) | 155 | if(rsa->flags & RSA_FLAG_SIGN_VER) |
| 154 | return rsa->meth->rsa_verify(dtype, m, m_len, sigbuf, siglen, rsa); | 156 | return ENGINE_get_RSA(rsa->engine)->rsa_verify(dtype, |
| 157 | m, m_len, sigbuf, siglen, rsa); | ||
| 155 | 158 | ||
| 156 | s=(unsigned char *)Malloc((unsigned int)siglen); | 159 | s=(unsigned char *)OPENSSL_malloc((unsigned int)siglen); |
| 157 | if (s == NULL) | 160 | if (s == NULL) |
| 158 | { | 161 | { |
| 159 | RSAerr(RSA_F_RSA_VERIFY,ERR_R_MALLOC_FAILURE); | 162 | RSAerr(RSA_F_RSA_VERIFY,ERR_R_MALLOC_FAILURE); |
| @@ -215,7 +218,7 @@ int RSA_verify(int dtype, unsigned char *m, unsigned int m_len, | |||
| 215 | err: | 218 | err: |
| 216 | if (sig != NULL) X509_SIG_free(sig); | 219 | if (sig != NULL) X509_SIG_free(sig); |
| 217 | memset(s,0,(unsigned int)siglen); | 220 | memset(s,0,(unsigned int)siglen); |
| 218 | Free(s); | 221 | OPENSSL_free(s); |
| 219 | return(ret); | 222 | return(ret); |
| 220 | } | 223 | } |
| 221 | 224 | ||
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_ssl.c b/src/lib/libssl/src/crypto/rsa/rsa_ssl.c index 81a857c813..482f4a8273 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_ssl.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_ssl.c | |||
| @@ -134,7 +134,7 @@ int RSA_padding_check_SSLv23(unsigned char *to, int tlen, unsigned char *from, | |||
| 134 | { | 134 | { |
| 135 | if (p[k] != 0x03) break; | 135 | if (p[k] != 0x03) break; |
| 136 | } | 136 | } |
| 137 | if (k == 0) | 137 | if (k == -1) |
| 138 | { | 138 | { |
| 139 | RSAerr(RSA_F_RSA_PADDING_CHECK_SSLV23,RSA_R_SSLV3_ROLLBACK_ATTACK); | 139 | RSAerr(RSA_F_RSA_PADDING_CHECK_SSLV23,RSA_R_SSLV3_ROLLBACK_ATTACK); |
| 140 | return(-1); | 140 | return(-1); |
diff --git a/src/lib/libssl/src/crypto/stack/Makefile.ssl b/src/lib/libssl/src/crypto/stack/Makefile.ssl index 64a93b33ac..86ed928750 100644 --- a/src/lib/libssl/src/crypto/stack/Makefile.ssl +++ b/src/lib/libssl/src/crypto/stack/Makefile.ssl | |||
| @@ -81,6 +81,7 @@ clean: | |||
| 81 | stack.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 81 | stack.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 82 | stack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 82 | stack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
| 83 | stack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 83 | stack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 84 | stack.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 84 | stack.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 85 | stack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 85 | stack.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 86 | stack.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 86 | stack.o: ../cryptlib.h | 87 | stack.o: ../cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/stack/safestack.h b/src/lib/libssl/src/crypto/stack/safestack.h index 38934981e3..9fa63e1be5 100644 --- a/src/lib/libssl/src/crypto/stack/safestack.h +++ b/src/lib/libssl/src/crypto/stack/safestack.h | |||
| @@ -57,73 +57,1078 @@ | |||
| 57 | 57 | ||
| 58 | #include <openssl/stack.h> | 58 | #include <openssl/stack.h> |
| 59 | 59 | ||
| 60 | #define STACK_OF(type) STACK_##type | 60 | #ifdef DEBUG_SAFESTACK |
| 61 | |||
| 62 | #define STACK_OF(type) struct stack_st_##type | ||
| 63 | #define PREDECLARE_STACK_OF(type) STACK_OF(type); | ||
| 61 | 64 | ||
| 62 | #define DECLARE_STACK_OF(type) \ | 65 | #define DECLARE_STACK_OF(type) \ |
| 63 | typedef struct stack_st_##type \ | 66 | STACK_OF(type) \ |
| 64 | { \ | 67 | { \ |
| 65 | STACK stack; \ | 68 | STACK stack; \ |
| 66 | } STACK_OF(type); \ | 69 | }; |
| 67 | STACK_OF(type) *sk_##type##_new(int (*cmp)(type **,type **)); \ | 70 | |
| 68 | STACK_OF(type) *sk_##type##_new_null(void); \ | 71 | #define IMPLEMENT_STACK_OF(type) /* nada (obsolete in new safestack approach)*/ |
| 69 | void sk_##type##_free(STACK_OF(type) *sk); \ | 72 | |
| 70 | int sk_##type##_num(const STACK_OF(type) *sk); \ | 73 | /* SKM_sk_... stack macros are internal to safestack.h: |
| 71 | type *sk_##type##_value(const STACK_OF(type) *sk,int n); \ | 74 | * never use them directly, use sk_<type>_... instead */ |
| 72 | type *sk_##type##_set(STACK_OF(type) *sk,int n,type *v); \ | 75 | #define SKM_sk_new(type, cmp) \ |
| 73 | void sk_##type##_zero(STACK_OF(type) *sk); \ | 76 | ((STACK_OF(type) * (*)(int (*)(const type * const *, const type * const *)))sk_new)(cmp) |
| 74 | int sk_##type##_push(STACK_OF(type) *sk,type *v); \ | 77 | #define SKM_sk_new_null(type) \ |
| 75 | int sk_##type##_unshift(STACK_OF(type) *sk,type *v); \ | 78 | ((STACK_OF(type) * (*)(void))sk_new_null)() |
| 76 | int sk_##type##_find(STACK_OF(type) *sk,type *v); \ | 79 | #define SKM_sk_free(type, st) \ |
| 77 | type *sk_##type##_delete(STACK_OF(type) *sk,int n); \ | 80 | ((void (*)(STACK_OF(type) *))sk_free)(st) |
| 78 | void sk_##type##_delete_ptr(STACK_OF(type) *sk,type *v); \ | 81 | #define SKM_sk_num(type, st) \ |
| 79 | int sk_##type##_insert(STACK_OF(type) *sk,type *v,int n); \ | 82 | ((int (*)(const STACK_OF(type) *))sk_num)(st) |
| 80 | int (*sk_##type##_set_cmp_func(STACK_OF(type) *sk, \ | 83 | #define SKM_sk_value(type, st,i) \ |
| 81 | int (*cmp)(type **,type **)))(type **,type **); \ | 84 | ((type * (*)(const STACK_OF(type) *, int))sk_value)(st, i) |
| 82 | STACK_OF(type) *sk_##type##_dup(STACK_OF(type) *sk); \ | 85 | #define SKM_sk_set(type, st,i,val) \ |
| 83 | void sk_##type##_pop_free(STACK_OF(type) *sk,void (*func)(type *)); \ | 86 | ((type * (*)(STACK_OF(type) *, int, type *))sk_set)(st, i, val) |
| 84 | type *sk_##type##_shift(STACK_OF(type) *sk); \ | 87 | #define SKM_sk_zero(type, st) \ |
| 85 | type *sk_##type##_pop(STACK_OF(type) *sk); \ | 88 | ((void (*)(STACK_OF(type) *))sk_zero)(st) |
| 86 | void sk_##type##_sort(STACK_OF(type) *sk); | 89 | #define SKM_sk_push(type, st,val) \ |
| 87 | 90 | ((int (*)(STACK_OF(type) *, type *))sk_push)(st, val) | |
| 88 | #define IMPLEMENT_STACK_OF(type) \ | 91 | #define SKM_sk_unshift(type, st,val) \ |
| 89 | STACK_OF(type) *sk_##type##_new(int (*cmp)(type **,type **)) \ | 92 | ((int (*)(STACK_OF(type) *, type *))sk_unshift)(st, val) |
| 90 | { return (STACK_OF(type) *)sk_new(cmp); } \ | 93 | #define SKM_sk_find(type, st,val) \ |
| 91 | STACK_OF(type) *sk_##type##_new_null() \ | 94 | ((int (*)(STACK_OF(type) *, type *))sk_find)(st, val) |
| 92 | { return (STACK_OF(type) *)sk_new_null(); } \ | 95 | #define SKM_sk_delete(type, st,i) \ |
| 93 | void sk_##type##_free(STACK_OF(type) *sk) \ | 96 | ((type * (*)(STACK_OF(type) *, int))sk_delete)(st, i) |
| 94 | { sk_free((STACK *)sk); } \ | 97 | #define SKM_sk_delete_ptr(type, st,ptr) \ |
| 95 | int sk_##type##_num(const STACK_OF(type) *sk) \ | 98 | ((type * (*)(STACK_OF(type) *, type *))sk_delete_ptr)(st, ptr) |
| 96 | { return M_sk_num((const STACK *)sk); } \ | 99 | #define SKM_sk_insert(type, st,val,i) \ |
| 97 | type *sk_##type##_value(const STACK_OF(type) *sk,int n) \ | 100 | ((int (*)(STACK_OF(type) *, type *, int))sk_insert)(st, val, i) |
| 98 | { return (type *)sk_value((STACK *)sk,n); } \ | 101 | #define SKM_sk_set_cmp_func(type, st,cmp) \ |
| 99 | type *sk_##type##_set(STACK_OF(type) *sk,int n,type *v) \ | 102 | ((int (*(*)(STACK_OF(type) *, int (*)(const type * const *, const type * const *))) \ |
| 100 | { return (type *)(sk_set((STACK *)sk,n,(char *)v)); } \ | 103 | (const type * const *, const type * const *))sk_set_cmp_func)\ |
| 101 | void sk_##type##_zero(STACK_OF(type) *sk) \ | 104 | (st, cmp) |
| 102 | { sk_zero((STACK *)sk); } \ | 105 | #define SKM_sk_dup(type, st) \ |
| 103 | int sk_##type##_push(STACK_OF(type) *sk,type *v) \ | 106 | ((STACK_OF(type) *(*)(STACK_OF(type) *))sk_dup)(st) |
| 104 | { return sk_push((STACK *)sk,(char *)v); } \ | 107 | #define SKM_sk_pop_free(type, st,free_func) \ |
| 105 | int sk_##type##_unshift(STACK_OF(type) *sk,type *v) \ | 108 | ((void (*)(STACK_OF(type) *, void (*)(type *)))sk_pop_free)\ |
| 106 | { return sk_unshift((STACK *)sk,(char *)v); } \ | 109 | (st, free_func) |
| 107 | int sk_##type##_find(STACK_OF(type) *sk,type *v) \ | 110 | #define SKM_sk_shift(type, st) \ |
| 108 | { return sk_find((STACK *)sk,(char *)v); } \ | 111 | ((type * (*)(STACK_OF(type) *))sk_shift)(st) |
| 109 | type *sk_##type##_delete(STACK_OF(type) *sk,int n) \ | 112 | #define SKM_sk_pop(type, st) \ |
| 110 | { return (type *)sk_delete((STACK *)sk,n); } \ | 113 | ((type * (*)(STACK_OF(type) *))sk_pop)(st) |
| 111 | void sk_##type##_delete_ptr(STACK_OF(type) *sk,type *v) \ | 114 | #define SKM_sk_sort(type, st) \ |
| 112 | { sk_delete_ptr((STACK *)sk,(char *)v); } \ | 115 | ((void (*)(STACK_OF(type) *))sk_sort)(st) |
| 113 | int sk_##type##_insert(STACK_OF(type) *sk,type *v,int n) \ | 116 | |
| 114 | { return sk_insert((STACK *)sk,(char *)v,n); } \ | 117 | #define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
| 115 | int (*sk_##type##_set_cmp_func(STACK_OF(type) *sk, \ | 118 | ((STACK_OF(type) * (*) (STACK_OF(type) **,unsigned char **, long , \ |
| 116 | int (*cmp)(type **,type **)))(type **,type **) \ | 119 | type *(*)(type **, unsigned char **,long), \ |
| 117 | { return (int (*)(type **,type **))sk_set_cmp_func((STACK *)sk,cmp); } \ | 120 | void (*)(type *), int ,int )) d2i_ASN1_SET) \ |
| 118 | STACK_OF(type) *sk_##type##_dup(STACK_OF(type) *sk) \ | 121 | (st,pp,length, d2i_func, free_func, ex_tag,ex_class) |
| 119 | { return (STACK_OF(type) *)sk_dup((STACK *)sk); } \ | 122 | #define SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
| 120 | void sk_##type##_pop_free(STACK_OF(type) *sk,void (*func)(type *)) \ | 123 | ((int (*)(STACK_OF(type) *,unsigned char **, \ |
| 121 | { sk_pop_free((STACK *)sk,func); } \ | 124 | int (*)(type *,unsigned char **), int , int , int)) i2d_ASN1_SET) \ |
| 122 | type *sk_##type##_shift(STACK_OF(type) *sk) \ | 125 | (st,pp,i2d_func,ex_tag,ex_class,is_set) |
| 123 | { return (type *)sk_shift((STACK *)sk); } \ | 126 | |
| 124 | type *sk_##type##_pop(STACK_OF(type) *sk) \ | 127 | #define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \ |
| 125 | { return (type *)sk_pop((STACK *)sk); } \ | 128 | ((unsigned char *(*)(STACK_OF(type) *, \ |
| 126 | void sk_##type##_sort(STACK_OF(type) *sk) \ | 129 | int (*)(type *,unsigned char **), unsigned char **,int *)) ASN1_seq_pack) \ |
| 127 | { sk_sort((STACK *)sk); } | 130 | (st, i2d_func, buf, len) |
| 128 | 131 | #define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \ | |
| 129 | #endif /* ndef HEADER_SAFESTACK_H */ | 132 | ((STACK_OF(type) * (*)(unsigned char *,int, \ |
| 133 | type *(*)(type **,unsigned char **, long), \ | ||
| 134 | void (*)(type *)))ASN1_seq_unpack) \ | ||
| 135 | (buf,len,d2i_func, free_func) | ||
| 136 | |||
| 137 | #define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ | ||
| 138 | ((STACK_OF(type) * (*)(X509_ALGOR *, \ | ||
| 139 | type *(*)(type **, unsigned char **, long), void (*)(type *), \ | ||
| 140 | const char *, int, \ | ||
| 141 | ASN1_STRING *, int))PKCS12_decrypt_d2i) \ | ||
| 142 | (algor,d2i_func,free_func,pass,passlen,oct,seq) | ||
| 143 | |||
| 144 | #else | ||
| 145 | |||
| 146 | #define STACK_OF(type) STACK | ||
| 147 | #define PREDECLARE_STACK_OF(type) /* nada */ | ||
| 148 | #define DECLARE_STACK_OF(type) /* nada */ | ||
| 149 | #define IMPLEMENT_STACK_OF(type) /* nada */ | ||
| 150 | |||
| 151 | #define SKM_sk_new(type, cmp) \ | ||
| 152 | sk_new((int (*)(const char * const *, const char * const *))(cmp)) | ||
| 153 | #define SKM_sk_new_null(type) \ | ||
| 154 | sk_new_null() | ||
| 155 | #define SKM_sk_free(type, st) \ | ||
| 156 | sk_free(st) | ||
| 157 | #define SKM_sk_num(type, st) \ | ||
| 158 | sk_num(st) | ||
| 159 | #define SKM_sk_value(type, st,i) \ | ||
| 160 | ((type *)sk_value(st, i)) | ||
| 161 | #define SKM_sk_set(type, st,i,val) \ | ||
| 162 | ((type *)sk_set(st, i,(char *)val)) | ||
| 163 | #define SKM_sk_zero(type, st) \ | ||
| 164 | sk_zero(st) | ||
| 165 | #define SKM_sk_push(type, st,val) \ | ||
| 166 | sk_push(st, (char *)val) | ||
| 167 | #define SKM_sk_unshift(type, st,val) \ | ||
| 168 | sk_unshift(st, val) | ||
| 169 | #define SKM_sk_find(type, st,val) \ | ||
| 170 | sk_find(st, (char *)val) | ||
| 171 | #define SKM_sk_delete(type, st,i) \ | ||
| 172 | ((type *)sk_delete(st, i)) | ||
| 173 | #define SKM_sk_delete_ptr(type, st,ptr) \ | ||
| 174 | ((type *)sk_delete_ptr(st,(char *)ptr)) | ||
| 175 | #define SKM_sk_insert(type, st,val,i) \ | ||
| 176 | sk_insert(st, (char *)val, i) | ||
| 177 | #define SKM_sk_set_cmp_func(type, st,cmp) \ | ||
| 178 | ((int (*)(const type * const *,const type * const *)) \ | ||
| 179 | sk_set_cmp_func(st, (int (*)(const char * const *, const char * const *))(cmp))) | ||
| 180 | #define SKM_sk_dup(type, st) \ | ||
| 181 | sk_dup(st) | ||
| 182 | #define SKM_sk_pop_free(type, st,free_func) \ | ||
| 183 | sk_pop_free(st, (void (*)(void *))free_func) | ||
| 184 | #define SKM_sk_shift(type, st) \ | ||
| 185 | ((type *)sk_shift(st)) | ||
| 186 | #define SKM_sk_pop(type, st) \ | ||
| 187 | ((type *)sk_pop(st)) | ||
| 188 | #define SKM_sk_sort(type, st) \ | ||
| 189 | sk_sort(st) | ||
| 190 | |||
| 191 | #define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 192 | d2i_ASN1_SET(st,pp,length, (char *(*)())d2i_func, (void (*)(void *))free_func, ex_tag,ex_class) | ||
| 193 | #define SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 194 | i2d_ASN1_SET(st,pp,i2d_func,ex_tag,ex_class,is_set) | ||
| 195 | |||
| 196 | #define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \ | ||
| 197 | ASN1_seq_pack(st, i2d_func, buf, len) | ||
| 198 | #define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \ | ||
| 199 | ASN1_seq_unpack(buf,len,(char *(*)())d2i_func, (void(*)(void *))free_func) | ||
| 200 | |||
| 201 | #define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ | ||
| 202 | ((STACK *)PKCS12_decrypt_d2i(algor,(char *(*)())d2i_func, (void(*)(void *))free_func,pass,passlen,oct,seq)) | ||
| 203 | |||
| 204 | #endif | ||
| 205 | |||
| 206 | /* This block of defines is updated by util/mkstack.pl, please do not touch! */ | ||
| 207 | #define sk_ACCESS_DESCRIPTION_new(st) SKM_sk_new(ACCESS_DESCRIPTION, (st)) | ||
| 208 | #define sk_ACCESS_DESCRIPTION_new_null() SKM_sk_new_null(ACCESS_DESCRIPTION) | ||
| 209 | #define sk_ACCESS_DESCRIPTION_free(st) SKM_sk_free(ACCESS_DESCRIPTION, (st)) | ||
| 210 | #define sk_ACCESS_DESCRIPTION_num(st) SKM_sk_num(ACCESS_DESCRIPTION, (st)) | ||
| 211 | #define sk_ACCESS_DESCRIPTION_value(st, i) SKM_sk_value(ACCESS_DESCRIPTION, (st), (i)) | ||
| 212 | #define sk_ACCESS_DESCRIPTION_set(st, i, val) SKM_sk_set(ACCESS_DESCRIPTION, (st), (i), (val)) | ||
| 213 | #define sk_ACCESS_DESCRIPTION_zero(st) SKM_sk_zero(ACCESS_DESCRIPTION, (st)) | ||
| 214 | #define sk_ACCESS_DESCRIPTION_push(st, val) SKM_sk_push(ACCESS_DESCRIPTION, (st), (val)) | ||
| 215 | #define sk_ACCESS_DESCRIPTION_unshift(st, val) SKM_sk_unshift(ACCESS_DESCRIPTION, (st), (val)) | ||
| 216 | #define sk_ACCESS_DESCRIPTION_find(st, val) SKM_sk_find(ACCESS_DESCRIPTION, (st), (val)) | ||
| 217 | #define sk_ACCESS_DESCRIPTION_delete(st, i) SKM_sk_delete(ACCESS_DESCRIPTION, (st), (i)) | ||
| 218 | #define sk_ACCESS_DESCRIPTION_delete_ptr(st, ptr) SKM_sk_delete_ptr(ACCESS_DESCRIPTION, (st), (ptr)) | ||
| 219 | #define sk_ACCESS_DESCRIPTION_insert(st, val, i) SKM_sk_insert(ACCESS_DESCRIPTION, (st), (val), (i)) | ||
| 220 | #define sk_ACCESS_DESCRIPTION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ACCESS_DESCRIPTION, (st), (cmp)) | ||
| 221 | #define sk_ACCESS_DESCRIPTION_dup(st) SKM_sk_dup(ACCESS_DESCRIPTION, st) | ||
| 222 | #define sk_ACCESS_DESCRIPTION_pop_free(st, free_func) SKM_sk_pop_free(ACCESS_DESCRIPTION, (st), (free_func)) | ||
| 223 | #define sk_ACCESS_DESCRIPTION_shift(st) SKM_sk_shift(ACCESS_DESCRIPTION, (st)) | ||
| 224 | #define sk_ACCESS_DESCRIPTION_pop(st) SKM_sk_pop(ACCESS_DESCRIPTION, (st)) | ||
| 225 | #define sk_ACCESS_DESCRIPTION_sort(st) SKM_sk_sort(ACCESS_DESCRIPTION, (st)) | ||
| 226 | |||
| 227 | #define sk_ASN1_INTEGER_new(st) SKM_sk_new(ASN1_INTEGER, (st)) | ||
| 228 | #define sk_ASN1_INTEGER_new_null() SKM_sk_new_null(ASN1_INTEGER) | ||
| 229 | #define sk_ASN1_INTEGER_free(st) SKM_sk_free(ASN1_INTEGER, (st)) | ||
| 230 | #define sk_ASN1_INTEGER_num(st) SKM_sk_num(ASN1_INTEGER, (st)) | ||
| 231 | #define sk_ASN1_INTEGER_value(st, i) SKM_sk_value(ASN1_INTEGER, (st), (i)) | ||
| 232 | #define sk_ASN1_INTEGER_set(st, i, val) SKM_sk_set(ASN1_INTEGER, (st), (i), (val)) | ||
| 233 | #define sk_ASN1_INTEGER_zero(st) SKM_sk_zero(ASN1_INTEGER, (st)) | ||
| 234 | #define sk_ASN1_INTEGER_push(st, val) SKM_sk_push(ASN1_INTEGER, (st), (val)) | ||
| 235 | #define sk_ASN1_INTEGER_unshift(st, val) SKM_sk_unshift(ASN1_INTEGER, (st), (val)) | ||
| 236 | #define sk_ASN1_INTEGER_find(st, val) SKM_sk_find(ASN1_INTEGER, (st), (val)) | ||
| 237 | #define sk_ASN1_INTEGER_delete(st, i) SKM_sk_delete(ASN1_INTEGER, (st), (i)) | ||
| 238 | #define sk_ASN1_INTEGER_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_INTEGER, (st), (ptr)) | ||
| 239 | #define sk_ASN1_INTEGER_insert(st, val, i) SKM_sk_insert(ASN1_INTEGER, (st), (val), (i)) | ||
| 240 | #define sk_ASN1_INTEGER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_INTEGER, (st), (cmp)) | ||
| 241 | #define sk_ASN1_INTEGER_dup(st) SKM_sk_dup(ASN1_INTEGER, st) | ||
| 242 | #define sk_ASN1_INTEGER_pop_free(st, free_func) SKM_sk_pop_free(ASN1_INTEGER, (st), (free_func)) | ||
| 243 | #define sk_ASN1_INTEGER_shift(st) SKM_sk_shift(ASN1_INTEGER, (st)) | ||
| 244 | #define sk_ASN1_INTEGER_pop(st) SKM_sk_pop(ASN1_INTEGER, (st)) | ||
| 245 | #define sk_ASN1_INTEGER_sort(st) SKM_sk_sort(ASN1_INTEGER, (st)) | ||
| 246 | |||
| 247 | #define sk_ASN1_OBJECT_new(st) SKM_sk_new(ASN1_OBJECT, (st)) | ||
| 248 | #define sk_ASN1_OBJECT_new_null() SKM_sk_new_null(ASN1_OBJECT) | ||
| 249 | #define sk_ASN1_OBJECT_free(st) SKM_sk_free(ASN1_OBJECT, (st)) | ||
| 250 | #define sk_ASN1_OBJECT_num(st) SKM_sk_num(ASN1_OBJECT, (st)) | ||
| 251 | #define sk_ASN1_OBJECT_value(st, i) SKM_sk_value(ASN1_OBJECT, (st), (i)) | ||
| 252 | #define sk_ASN1_OBJECT_set(st, i, val) SKM_sk_set(ASN1_OBJECT, (st), (i), (val)) | ||
| 253 | #define sk_ASN1_OBJECT_zero(st) SKM_sk_zero(ASN1_OBJECT, (st)) | ||
| 254 | #define sk_ASN1_OBJECT_push(st, val) SKM_sk_push(ASN1_OBJECT, (st), (val)) | ||
| 255 | #define sk_ASN1_OBJECT_unshift(st, val) SKM_sk_unshift(ASN1_OBJECT, (st), (val)) | ||
| 256 | #define sk_ASN1_OBJECT_find(st, val) SKM_sk_find(ASN1_OBJECT, (st), (val)) | ||
| 257 | #define sk_ASN1_OBJECT_delete(st, i) SKM_sk_delete(ASN1_OBJECT, (st), (i)) | ||
| 258 | #define sk_ASN1_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_OBJECT, (st), (ptr)) | ||
| 259 | #define sk_ASN1_OBJECT_insert(st, val, i) SKM_sk_insert(ASN1_OBJECT, (st), (val), (i)) | ||
| 260 | #define sk_ASN1_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_OBJECT, (st), (cmp)) | ||
| 261 | #define sk_ASN1_OBJECT_dup(st) SKM_sk_dup(ASN1_OBJECT, st) | ||
| 262 | #define sk_ASN1_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(ASN1_OBJECT, (st), (free_func)) | ||
| 263 | #define sk_ASN1_OBJECT_shift(st) SKM_sk_shift(ASN1_OBJECT, (st)) | ||
| 264 | #define sk_ASN1_OBJECT_pop(st) SKM_sk_pop(ASN1_OBJECT, (st)) | ||
| 265 | #define sk_ASN1_OBJECT_sort(st) SKM_sk_sort(ASN1_OBJECT, (st)) | ||
| 266 | |||
| 267 | #define sk_ASN1_STRING_TABLE_new(st) SKM_sk_new(ASN1_STRING_TABLE, (st)) | ||
| 268 | #define sk_ASN1_STRING_TABLE_new_null() SKM_sk_new_null(ASN1_STRING_TABLE) | ||
| 269 | #define sk_ASN1_STRING_TABLE_free(st) SKM_sk_free(ASN1_STRING_TABLE, (st)) | ||
| 270 | #define sk_ASN1_STRING_TABLE_num(st) SKM_sk_num(ASN1_STRING_TABLE, (st)) | ||
| 271 | #define sk_ASN1_STRING_TABLE_value(st, i) SKM_sk_value(ASN1_STRING_TABLE, (st), (i)) | ||
| 272 | #define sk_ASN1_STRING_TABLE_set(st, i, val) SKM_sk_set(ASN1_STRING_TABLE, (st), (i), (val)) | ||
| 273 | #define sk_ASN1_STRING_TABLE_zero(st) SKM_sk_zero(ASN1_STRING_TABLE, (st)) | ||
| 274 | #define sk_ASN1_STRING_TABLE_push(st, val) SKM_sk_push(ASN1_STRING_TABLE, (st), (val)) | ||
| 275 | #define sk_ASN1_STRING_TABLE_unshift(st, val) SKM_sk_unshift(ASN1_STRING_TABLE, (st), (val)) | ||
| 276 | #define sk_ASN1_STRING_TABLE_find(st, val) SKM_sk_find(ASN1_STRING_TABLE, (st), (val)) | ||
| 277 | #define sk_ASN1_STRING_TABLE_delete(st, i) SKM_sk_delete(ASN1_STRING_TABLE, (st), (i)) | ||
| 278 | #define sk_ASN1_STRING_TABLE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_STRING_TABLE, (st), (ptr)) | ||
| 279 | #define sk_ASN1_STRING_TABLE_insert(st, val, i) SKM_sk_insert(ASN1_STRING_TABLE, (st), (val), (i)) | ||
| 280 | #define sk_ASN1_STRING_TABLE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_STRING_TABLE, (st), (cmp)) | ||
| 281 | #define sk_ASN1_STRING_TABLE_dup(st) SKM_sk_dup(ASN1_STRING_TABLE, st) | ||
| 282 | #define sk_ASN1_STRING_TABLE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_STRING_TABLE, (st), (free_func)) | ||
| 283 | #define sk_ASN1_STRING_TABLE_shift(st) SKM_sk_shift(ASN1_STRING_TABLE, (st)) | ||
| 284 | #define sk_ASN1_STRING_TABLE_pop(st) SKM_sk_pop(ASN1_STRING_TABLE, (st)) | ||
| 285 | #define sk_ASN1_STRING_TABLE_sort(st) SKM_sk_sort(ASN1_STRING_TABLE, (st)) | ||
| 286 | |||
| 287 | #define sk_ASN1_TYPE_new(st) SKM_sk_new(ASN1_TYPE, (st)) | ||
| 288 | #define sk_ASN1_TYPE_new_null() SKM_sk_new_null(ASN1_TYPE) | ||
| 289 | #define sk_ASN1_TYPE_free(st) SKM_sk_free(ASN1_TYPE, (st)) | ||
| 290 | #define sk_ASN1_TYPE_num(st) SKM_sk_num(ASN1_TYPE, (st)) | ||
| 291 | #define sk_ASN1_TYPE_value(st, i) SKM_sk_value(ASN1_TYPE, (st), (i)) | ||
| 292 | #define sk_ASN1_TYPE_set(st, i, val) SKM_sk_set(ASN1_TYPE, (st), (i), (val)) | ||
| 293 | #define sk_ASN1_TYPE_zero(st) SKM_sk_zero(ASN1_TYPE, (st)) | ||
| 294 | #define sk_ASN1_TYPE_push(st, val) SKM_sk_push(ASN1_TYPE, (st), (val)) | ||
| 295 | #define sk_ASN1_TYPE_unshift(st, val) SKM_sk_unshift(ASN1_TYPE, (st), (val)) | ||
| 296 | #define sk_ASN1_TYPE_find(st, val) SKM_sk_find(ASN1_TYPE, (st), (val)) | ||
| 297 | #define sk_ASN1_TYPE_delete(st, i) SKM_sk_delete(ASN1_TYPE, (st), (i)) | ||
| 298 | #define sk_ASN1_TYPE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_TYPE, (st), (ptr)) | ||
| 299 | #define sk_ASN1_TYPE_insert(st, val, i) SKM_sk_insert(ASN1_TYPE, (st), (val), (i)) | ||
| 300 | #define sk_ASN1_TYPE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_TYPE, (st), (cmp)) | ||
| 301 | #define sk_ASN1_TYPE_dup(st) SKM_sk_dup(ASN1_TYPE, st) | ||
| 302 | #define sk_ASN1_TYPE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_TYPE, (st), (free_func)) | ||
| 303 | #define sk_ASN1_TYPE_shift(st) SKM_sk_shift(ASN1_TYPE, (st)) | ||
| 304 | #define sk_ASN1_TYPE_pop(st) SKM_sk_pop(ASN1_TYPE, (st)) | ||
| 305 | #define sk_ASN1_TYPE_sort(st) SKM_sk_sort(ASN1_TYPE, (st)) | ||
| 306 | |||
| 307 | #define sk_BIO_new(st) SKM_sk_new(BIO, (st)) | ||
| 308 | #define sk_BIO_new_null() SKM_sk_new_null(BIO) | ||
| 309 | #define sk_BIO_free(st) SKM_sk_free(BIO, (st)) | ||
| 310 | #define sk_BIO_num(st) SKM_sk_num(BIO, (st)) | ||
| 311 | #define sk_BIO_value(st, i) SKM_sk_value(BIO, (st), (i)) | ||
| 312 | #define sk_BIO_set(st, i, val) SKM_sk_set(BIO, (st), (i), (val)) | ||
| 313 | #define sk_BIO_zero(st) SKM_sk_zero(BIO, (st)) | ||
| 314 | #define sk_BIO_push(st, val) SKM_sk_push(BIO, (st), (val)) | ||
| 315 | #define sk_BIO_unshift(st, val) SKM_sk_unshift(BIO, (st), (val)) | ||
| 316 | #define sk_BIO_find(st, val) SKM_sk_find(BIO, (st), (val)) | ||
| 317 | #define sk_BIO_delete(st, i) SKM_sk_delete(BIO, (st), (i)) | ||
| 318 | #define sk_BIO_delete_ptr(st, ptr) SKM_sk_delete_ptr(BIO, (st), (ptr)) | ||
| 319 | #define sk_BIO_insert(st, val, i) SKM_sk_insert(BIO, (st), (val), (i)) | ||
| 320 | #define sk_BIO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BIO, (st), (cmp)) | ||
| 321 | #define sk_BIO_dup(st) SKM_sk_dup(BIO, st) | ||
| 322 | #define sk_BIO_pop_free(st, free_func) SKM_sk_pop_free(BIO, (st), (free_func)) | ||
| 323 | #define sk_BIO_shift(st) SKM_sk_shift(BIO, (st)) | ||
| 324 | #define sk_BIO_pop(st) SKM_sk_pop(BIO, (st)) | ||
| 325 | #define sk_BIO_sort(st) SKM_sk_sort(BIO, (st)) | ||
| 326 | |||
| 327 | #define sk_CONF_VALUE_new(st) SKM_sk_new(CONF_VALUE, (st)) | ||
| 328 | #define sk_CONF_VALUE_new_null() SKM_sk_new_null(CONF_VALUE) | ||
| 329 | #define sk_CONF_VALUE_free(st) SKM_sk_free(CONF_VALUE, (st)) | ||
| 330 | #define sk_CONF_VALUE_num(st) SKM_sk_num(CONF_VALUE, (st)) | ||
| 331 | #define sk_CONF_VALUE_value(st, i) SKM_sk_value(CONF_VALUE, (st), (i)) | ||
| 332 | #define sk_CONF_VALUE_set(st, i, val) SKM_sk_set(CONF_VALUE, (st), (i), (val)) | ||
| 333 | #define sk_CONF_VALUE_zero(st) SKM_sk_zero(CONF_VALUE, (st)) | ||
| 334 | #define sk_CONF_VALUE_push(st, val) SKM_sk_push(CONF_VALUE, (st), (val)) | ||
| 335 | #define sk_CONF_VALUE_unshift(st, val) SKM_sk_unshift(CONF_VALUE, (st), (val)) | ||
| 336 | #define sk_CONF_VALUE_find(st, val) SKM_sk_find(CONF_VALUE, (st), (val)) | ||
| 337 | #define sk_CONF_VALUE_delete(st, i) SKM_sk_delete(CONF_VALUE, (st), (i)) | ||
| 338 | #define sk_CONF_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_VALUE, (st), (ptr)) | ||
| 339 | #define sk_CONF_VALUE_insert(st, val, i) SKM_sk_insert(CONF_VALUE, (st), (val), (i)) | ||
| 340 | #define sk_CONF_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_VALUE, (st), (cmp)) | ||
| 341 | #define sk_CONF_VALUE_dup(st) SKM_sk_dup(CONF_VALUE, st) | ||
| 342 | #define sk_CONF_VALUE_pop_free(st, free_func) SKM_sk_pop_free(CONF_VALUE, (st), (free_func)) | ||
| 343 | #define sk_CONF_VALUE_shift(st) SKM_sk_shift(CONF_VALUE, (st)) | ||
| 344 | #define sk_CONF_VALUE_pop(st) SKM_sk_pop(CONF_VALUE, (st)) | ||
| 345 | #define sk_CONF_VALUE_sort(st) SKM_sk_sort(CONF_VALUE, (st)) | ||
| 346 | |||
| 347 | #define sk_CRYPTO_EX_DATA_FUNCS_new(st) SKM_sk_new(CRYPTO_EX_DATA_FUNCS, (st)) | ||
| 348 | #define sk_CRYPTO_EX_DATA_FUNCS_new_null() SKM_sk_new_null(CRYPTO_EX_DATA_FUNCS) | ||
| 349 | #define sk_CRYPTO_EX_DATA_FUNCS_free(st) SKM_sk_free(CRYPTO_EX_DATA_FUNCS, (st)) | ||
| 350 | #define sk_CRYPTO_EX_DATA_FUNCS_num(st) SKM_sk_num(CRYPTO_EX_DATA_FUNCS, (st)) | ||
| 351 | #define sk_CRYPTO_EX_DATA_FUNCS_value(st, i) SKM_sk_value(CRYPTO_EX_DATA_FUNCS, (st), (i)) | ||
| 352 | #define sk_CRYPTO_EX_DATA_FUNCS_set(st, i, val) SKM_sk_set(CRYPTO_EX_DATA_FUNCS, (st), (i), (val)) | ||
| 353 | #define sk_CRYPTO_EX_DATA_FUNCS_zero(st) SKM_sk_zero(CRYPTO_EX_DATA_FUNCS, (st)) | ||
| 354 | #define sk_CRYPTO_EX_DATA_FUNCS_push(st, val) SKM_sk_push(CRYPTO_EX_DATA_FUNCS, (st), (val)) | ||
| 355 | #define sk_CRYPTO_EX_DATA_FUNCS_unshift(st, val) SKM_sk_unshift(CRYPTO_EX_DATA_FUNCS, (st), (val)) | ||
| 356 | #define sk_CRYPTO_EX_DATA_FUNCS_find(st, val) SKM_sk_find(CRYPTO_EX_DATA_FUNCS, (st), (val)) | ||
| 357 | #define sk_CRYPTO_EX_DATA_FUNCS_delete(st, i) SKM_sk_delete(CRYPTO_EX_DATA_FUNCS, (st), (i)) | ||
| 358 | #define sk_CRYPTO_EX_DATA_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_EX_DATA_FUNCS, (st), (ptr)) | ||
| 359 | #define sk_CRYPTO_EX_DATA_FUNCS_insert(st, val, i) SKM_sk_insert(CRYPTO_EX_DATA_FUNCS, (st), (val), (i)) | ||
| 360 | #define sk_CRYPTO_EX_DATA_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_EX_DATA_FUNCS, (st), (cmp)) | ||
| 361 | #define sk_CRYPTO_EX_DATA_FUNCS_dup(st) SKM_sk_dup(CRYPTO_EX_DATA_FUNCS, st) | ||
| 362 | #define sk_CRYPTO_EX_DATA_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_EX_DATA_FUNCS, (st), (free_func)) | ||
| 363 | #define sk_CRYPTO_EX_DATA_FUNCS_shift(st) SKM_sk_shift(CRYPTO_EX_DATA_FUNCS, (st)) | ||
| 364 | #define sk_CRYPTO_EX_DATA_FUNCS_pop(st) SKM_sk_pop(CRYPTO_EX_DATA_FUNCS, (st)) | ||
| 365 | #define sk_CRYPTO_EX_DATA_FUNCS_sort(st) SKM_sk_sort(CRYPTO_EX_DATA_FUNCS, (st)) | ||
| 366 | |||
| 367 | #define sk_CRYPTO_dynlock_new(st) SKM_sk_new(CRYPTO_dynlock, (st)) | ||
| 368 | #define sk_CRYPTO_dynlock_new_null() SKM_sk_new_null(CRYPTO_dynlock) | ||
| 369 | #define sk_CRYPTO_dynlock_free(st) SKM_sk_free(CRYPTO_dynlock, (st)) | ||
| 370 | #define sk_CRYPTO_dynlock_num(st) SKM_sk_num(CRYPTO_dynlock, (st)) | ||
| 371 | #define sk_CRYPTO_dynlock_value(st, i) SKM_sk_value(CRYPTO_dynlock, (st), (i)) | ||
| 372 | #define sk_CRYPTO_dynlock_set(st, i, val) SKM_sk_set(CRYPTO_dynlock, (st), (i), (val)) | ||
| 373 | #define sk_CRYPTO_dynlock_zero(st) SKM_sk_zero(CRYPTO_dynlock, (st)) | ||
| 374 | #define sk_CRYPTO_dynlock_push(st, val) SKM_sk_push(CRYPTO_dynlock, (st), (val)) | ||
| 375 | #define sk_CRYPTO_dynlock_unshift(st, val) SKM_sk_unshift(CRYPTO_dynlock, (st), (val)) | ||
| 376 | #define sk_CRYPTO_dynlock_find(st, val) SKM_sk_find(CRYPTO_dynlock, (st), (val)) | ||
| 377 | #define sk_CRYPTO_dynlock_delete(st, i) SKM_sk_delete(CRYPTO_dynlock, (st), (i)) | ||
| 378 | #define sk_CRYPTO_dynlock_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_dynlock, (st), (ptr)) | ||
| 379 | #define sk_CRYPTO_dynlock_insert(st, val, i) SKM_sk_insert(CRYPTO_dynlock, (st), (val), (i)) | ||
| 380 | #define sk_CRYPTO_dynlock_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_dynlock, (st), (cmp)) | ||
| 381 | #define sk_CRYPTO_dynlock_dup(st) SKM_sk_dup(CRYPTO_dynlock, st) | ||
| 382 | #define sk_CRYPTO_dynlock_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_dynlock, (st), (free_func)) | ||
| 383 | #define sk_CRYPTO_dynlock_shift(st) SKM_sk_shift(CRYPTO_dynlock, (st)) | ||
| 384 | #define sk_CRYPTO_dynlock_pop(st) SKM_sk_pop(CRYPTO_dynlock, (st)) | ||
| 385 | #define sk_CRYPTO_dynlock_sort(st) SKM_sk_sort(CRYPTO_dynlock, (st)) | ||
| 386 | |||
| 387 | #define sk_DIST_POINT_new(st) SKM_sk_new(DIST_POINT, (st)) | ||
| 388 | #define sk_DIST_POINT_new_null() SKM_sk_new_null(DIST_POINT) | ||
| 389 | #define sk_DIST_POINT_free(st) SKM_sk_free(DIST_POINT, (st)) | ||
| 390 | #define sk_DIST_POINT_num(st) SKM_sk_num(DIST_POINT, (st)) | ||
| 391 | #define sk_DIST_POINT_value(st, i) SKM_sk_value(DIST_POINT, (st), (i)) | ||
| 392 | #define sk_DIST_POINT_set(st, i, val) SKM_sk_set(DIST_POINT, (st), (i), (val)) | ||
| 393 | #define sk_DIST_POINT_zero(st) SKM_sk_zero(DIST_POINT, (st)) | ||
| 394 | #define sk_DIST_POINT_push(st, val) SKM_sk_push(DIST_POINT, (st), (val)) | ||
| 395 | #define sk_DIST_POINT_unshift(st, val) SKM_sk_unshift(DIST_POINT, (st), (val)) | ||
| 396 | #define sk_DIST_POINT_find(st, val) SKM_sk_find(DIST_POINT, (st), (val)) | ||
| 397 | #define sk_DIST_POINT_delete(st, i) SKM_sk_delete(DIST_POINT, (st), (i)) | ||
| 398 | #define sk_DIST_POINT_delete_ptr(st, ptr) SKM_sk_delete_ptr(DIST_POINT, (st), (ptr)) | ||
| 399 | #define sk_DIST_POINT_insert(st, val, i) SKM_sk_insert(DIST_POINT, (st), (val), (i)) | ||
| 400 | #define sk_DIST_POINT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(DIST_POINT, (st), (cmp)) | ||
| 401 | #define sk_DIST_POINT_dup(st) SKM_sk_dup(DIST_POINT, st) | ||
| 402 | #define sk_DIST_POINT_pop_free(st, free_func) SKM_sk_pop_free(DIST_POINT, (st), (free_func)) | ||
| 403 | #define sk_DIST_POINT_shift(st) SKM_sk_shift(DIST_POINT, (st)) | ||
| 404 | #define sk_DIST_POINT_pop(st) SKM_sk_pop(DIST_POINT, (st)) | ||
| 405 | #define sk_DIST_POINT_sort(st) SKM_sk_sort(DIST_POINT, (st)) | ||
| 406 | |||
| 407 | #define sk_GENERAL_NAME_new(st) SKM_sk_new(GENERAL_NAME, (st)) | ||
| 408 | #define sk_GENERAL_NAME_new_null() SKM_sk_new_null(GENERAL_NAME) | ||
| 409 | #define sk_GENERAL_NAME_free(st) SKM_sk_free(GENERAL_NAME, (st)) | ||
| 410 | #define sk_GENERAL_NAME_num(st) SKM_sk_num(GENERAL_NAME, (st)) | ||
| 411 | #define sk_GENERAL_NAME_value(st, i) SKM_sk_value(GENERAL_NAME, (st), (i)) | ||
| 412 | #define sk_GENERAL_NAME_set(st, i, val) SKM_sk_set(GENERAL_NAME, (st), (i), (val)) | ||
| 413 | #define sk_GENERAL_NAME_zero(st) SKM_sk_zero(GENERAL_NAME, (st)) | ||
| 414 | #define sk_GENERAL_NAME_push(st, val) SKM_sk_push(GENERAL_NAME, (st), (val)) | ||
| 415 | #define sk_GENERAL_NAME_unshift(st, val) SKM_sk_unshift(GENERAL_NAME, (st), (val)) | ||
| 416 | #define sk_GENERAL_NAME_find(st, val) SKM_sk_find(GENERAL_NAME, (st), (val)) | ||
| 417 | #define sk_GENERAL_NAME_delete(st, i) SKM_sk_delete(GENERAL_NAME, (st), (i)) | ||
| 418 | #define sk_GENERAL_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAME, (st), (ptr)) | ||
| 419 | #define sk_GENERAL_NAME_insert(st, val, i) SKM_sk_insert(GENERAL_NAME, (st), (val), (i)) | ||
| 420 | #define sk_GENERAL_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAME, (st), (cmp)) | ||
| 421 | #define sk_GENERAL_NAME_dup(st) SKM_sk_dup(GENERAL_NAME, st) | ||
| 422 | #define sk_GENERAL_NAME_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAME, (st), (free_func)) | ||
| 423 | #define sk_GENERAL_NAME_shift(st) SKM_sk_shift(GENERAL_NAME, (st)) | ||
| 424 | #define sk_GENERAL_NAME_pop(st) SKM_sk_pop(GENERAL_NAME, (st)) | ||
| 425 | #define sk_GENERAL_NAME_sort(st) SKM_sk_sort(GENERAL_NAME, (st)) | ||
| 426 | |||
| 427 | #define sk_MIME_HEADER_new(st) SKM_sk_new(MIME_HEADER, (st)) | ||
| 428 | #define sk_MIME_HEADER_new_null() SKM_sk_new_null(MIME_HEADER) | ||
| 429 | #define sk_MIME_HEADER_free(st) SKM_sk_free(MIME_HEADER, (st)) | ||
| 430 | #define sk_MIME_HEADER_num(st) SKM_sk_num(MIME_HEADER, (st)) | ||
| 431 | #define sk_MIME_HEADER_value(st, i) SKM_sk_value(MIME_HEADER, (st), (i)) | ||
| 432 | #define sk_MIME_HEADER_set(st, i, val) SKM_sk_set(MIME_HEADER, (st), (i), (val)) | ||
| 433 | #define sk_MIME_HEADER_zero(st) SKM_sk_zero(MIME_HEADER, (st)) | ||
| 434 | #define sk_MIME_HEADER_push(st, val) SKM_sk_push(MIME_HEADER, (st), (val)) | ||
| 435 | #define sk_MIME_HEADER_unshift(st, val) SKM_sk_unshift(MIME_HEADER, (st), (val)) | ||
| 436 | #define sk_MIME_HEADER_find(st, val) SKM_sk_find(MIME_HEADER, (st), (val)) | ||
| 437 | #define sk_MIME_HEADER_delete(st, i) SKM_sk_delete(MIME_HEADER, (st), (i)) | ||
| 438 | #define sk_MIME_HEADER_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_HEADER, (st), (ptr)) | ||
| 439 | #define sk_MIME_HEADER_insert(st, val, i) SKM_sk_insert(MIME_HEADER, (st), (val), (i)) | ||
| 440 | #define sk_MIME_HEADER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_HEADER, (st), (cmp)) | ||
| 441 | #define sk_MIME_HEADER_dup(st) SKM_sk_dup(MIME_HEADER, st) | ||
| 442 | #define sk_MIME_HEADER_pop_free(st, free_func) SKM_sk_pop_free(MIME_HEADER, (st), (free_func)) | ||
| 443 | #define sk_MIME_HEADER_shift(st) SKM_sk_shift(MIME_HEADER, (st)) | ||
| 444 | #define sk_MIME_HEADER_pop(st) SKM_sk_pop(MIME_HEADER, (st)) | ||
| 445 | #define sk_MIME_HEADER_sort(st) SKM_sk_sort(MIME_HEADER, (st)) | ||
| 446 | |||
| 447 | #define sk_MIME_PARAM_new(st) SKM_sk_new(MIME_PARAM, (st)) | ||
| 448 | #define sk_MIME_PARAM_new_null() SKM_sk_new_null(MIME_PARAM) | ||
| 449 | #define sk_MIME_PARAM_free(st) SKM_sk_free(MIME_PARAM, (st)) | ||
| 450 | #define sk_MIME_PARAM_num(st) SKM_sk_num(MIME_PARAM, (st)) | ||
| 451 | #define sk_MIME_PARAM_value(st, i) SKM_sk_value(MIME_PARAM, (st), (i)) | ||
| 452 | #define sk_MIME_PARAM_set(st, i, val) SKM_sk_set(MIME_PARAM, (st), (i), (val)) | ||
| 453 | #define sk_MIME_PARAM_zero(st) SKM_sk_zero(MIME_PARAM, (st)) | ||
| 454 | #define sk_MIME_PARAM_push(st, val) SKM_sk_push(MIME_PARAM, (st), (val)) | ||
| 455 | #define sk_MIME_PARAM_unshift(st, val) SKM_sk_unshift(MIME_PARAM, (st), (val)) | ||
| 456 | #define sk_MIME_PARAM_find(st, val) SKM_sk_find(MIME_PARAM, (st), (val)) | ||
| 457 | #define sk_MIME_PARAM_delete(st, i) SKM_sk_delete(MIME_PARAM, (st), (i)) | ||
| 458 | #define sk_MIME_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_PARAM, (st), (ptr)) | ||
| 459 | #define sk_MIME_PARAM_insert(st, val, i) SKM_sk_insert(MIME_PARAM, (st), (val), (i)) | ||
| 460 | #define sk_MIME_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_PARAM, (st), (cmp)) | ||
| 461 | #define sk_MIME_PARAM_dup(st) SKM_sk_dup(MIME_PARAM, st) | ||
| 462 | #define sk_MIME_PARAM_pop_free(st, free_func) SKM_sk_pop_free(MIME_PARAM, (st), (free_func)) | ||
| 463 | #define sk_MIME_PARAM_shift(st) SKM_sk_shift(MIME_PARAM, (st)) | ||
| 464 | #define sk_MIME_PARAM_pop(st) SKM_sk_pop(MIME_PARAM, (st)) | ||
| 465 | #define sk_MIME_PARAM_sort(st) SKM_sk_sort(MIME_PARAM, (st)) | ||
| 466 | |||
| 467 | #define sk_NAME_FUNCS_new(st) SKM_sk_new(NAME_FUNCS, (st)) | ||
| 468 | #define sk_NAME_FUNCS_new_null() SKM_sk_new_null(NAME_FUNCS) | ||
| 469 | #define sk_NAME_FUNCS_free(st) SKM_sk_free(NAME_FUNCS, (st)) | ||
| 470 | #define sk_NAME_FUNCS_num(st) SKM_sk_num(NAME_FUNCS, (st)) | ||
| 471 | #define sk_NAME_FUNCS_value(st, i) SKM_sk_value(NAME_FUNCS, (st), (i)) | ||
| 472 | #define sk_NAME_FUNCS_set(st, i, val) SKM_sk_set(NAME_FUNCS, (st), (i), (val)) | ||
| 473 | #define sk_NAME_FUNCS_zero(st) SKM_sk_zero(NAME_FUNCS, (st)) | ||
| 474 | #define sk_NAME_FUNCS_push(st, val) SKM_sk_push(NAME_FUNCS, (st), (val)) | ||
| 475 | #define sk_NAME_FUNCS_unshift(st, val) SKM_sk_unshift(NAME_FUNCS, (st), (val)) | ||
| 476 | #define sk_NAME_FUNCS_find(st, val) SKM_sk_find(NAME_FUNCS, (st), (val)) | ||
| 477 | #define sk_NAME_FUNCS_delete(st, i) SKM_sk_delete(NAME_FUNCS, (st), (i)) | ||
| 478 | #define sk_NAME_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(NAME_FUNCS, (st), (ptr)) | ||
| 479 | #define sk_NAME_FUNCS_insert(st, val, i) SKM_sk_insert(NAME_FUNCS, (st), (val), (i)) | ||
| 480 | #define sk_NAME_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(NAME_FUNCS, (st), (cmp)) | ||
| 481 | #define sk_NAME_FUNCS_dup(st) SKM_sk_dup(NAME_FUNCS, st) | ||
| 482 | #define sk_NAME_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(NAME_FUNCS, (st), (free_func)) | ||
| 483 | #define sk_NAME_FUNCS_shift(st) SKM_sk_shift(NAME_FUNCS, (st)) | ||
| 484 | #define sk_NAME_FUNCS_pop(st) SKM_sk_pop(NAME_FUNCS, (st)) | ||
| 485 | #define sk_NAME_FUNCS_sort(st) SKM_sk_sort(NAME_FUNCS, (st)) | ||
| 486 | |||
| 487 | #define sk_PKCS12_SAFEBAG_new(st) SKM_sk_new(PKCS12_SAFEBAG, (st)) | ||
| 488 | #define sk_PKCS12_SAFEBAG_new_null() SKM_sk_new_null(PKCS12_SAFEBAG) | ||
| 489 | #define sk_PKCS12_SAFEBAG_free(st) SKM_sk_free(PKCS12_SAFEBAG, (st)) | ||
| 490 | #define sk_PKCS12_SAFEBAG_num(st) SKM_sk_num(PKCS12_SAFEBAG, (st)) | ||
| 491 | #define sk_PKCS12_SAFEBAG_value(st, i) SKM_sk_value(PKCS12_SAFEBAG, (st), (i)) | ||
| 492 | #define sk_PKCS12_SAFEBAG_set(st, i, val) SKM_sk_set(PKCS12_SAFEBAG, (st), (i), (val)) | ||
| 493 | #define sk_PKCS12_SAFEBAG_zero(st) SKM_sk_zero(PKCS12_SAFEBAG, (st)) | ||
| 494 | #define sk_PKCS12_SAFEBAG_push(st, val) SKM_sk_push(PKCS12_SAFEBAG, (st), (val)) | ||
| 495 | #define sk_PKCS12_SAFEBAG_unshift(st, val) SKM_sk_unshift(PKCS12_SAFEBAG, (st), (val)) | ||
| 496 | #define sk_PKCS12_SAFEBAG_find(st, val) SKM_sk_find(PKCS12_SAFEBAG, (st), (val)) | ||
| 497 | #define sk_PKCS12_SAFEBAG_delete(st, i) SKM_sk_delete(PKCS12_SAFEBAG, (st), (i)) | ||
| 498 | #define sk_PKCS12_SAFEBAG_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS12_SAFEBAG, (st), (ptr)) | ||
| 499 | #define sk_PKCS12_SAFEBAG_insert(st, val, i) SKM_sk_insert(PKCS12_SAFEBAG, (st), (val), (i)) | ||
| 500 | #define sk_PKCS12_SAFEBAG_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS12_SAFEBAG, (st), (cmp)) | ||
| 501 | #define sk_PKCS12_SAFEBAG_dup(st) SKM_sk_dup(PKCS12_SAFEBAG, st) | ||
| 502 | #define sk_PKCS12_SAFEBAG_pop_free(st, free_func) SKM_sk_pop_free(PKCS12_SAFEBAG, (st), (free_func)) | ||
| 503 | #define sk_PKCS12_SAFEBAG_shift(st) SKM_sk_shift(PKCS12_SAFEBAG, (st)) | ||
| 504 | #define sk_PKCS12_SAFEBAG_pop(st) SKM_sk_pop(PKCS12_SAFEBAG, (st)) | ||
| 505 | #define sk_PKCS12_SAFEBAG_sort(st) SKM_sk_sort(PKCS12_SAFEBAG, (st)) | ||
| 506 | |||
| 507 | #define sk_PKCS7_new(st) SKM_sk_new(PKCS7, (st)) | ||
| 508 | #define sk_PKCS7_new_null() SKM_sk_new_null(PKCS7) | ||
| 509 | #define sk_PKCS7_free(st) SKM_sk_free(PKCS7, (st)) | ||
| 510 | #define sk_PKCS7_num(st) SKM_sk_num(PKCS7, (st)) | ||
| 511 | #define sk_PKCS7_value(st, i) SKM_sk_value(PKCS7, (st), (i)) | ||
| 512 | #define sk_PKCS7_set(st, i, val) SKM_sk_set(PKCS7, (st), (i), (val)) | ||
| 513 | #define sk_PKCS7_zero(st) SKM_sk_zero(PKCS7, (st)) | ||
| 514 | #define sk_PKCS7_push(st, val) SKM_sk_push(PKCS7, (st), (val)) | ||
| 515 | #define sk_PKCS7_unshift(st, val) SKM_sk_unshift(PKCS7, (st), (val)) | ||
| 516 | #define sk_PKCS7_find(st, val) SKM_sk_find(PKCS7, (st), (val)) | ||
| 517 | #define sk_PKCS7_delete(st, i) SKM_sk_delete(PKCS7, (st), (i)) | ||
| 518 | #define sk_PKCS7_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7, (st), (ptr)) | ||
| 519 | #define sk_PKCS7_insert(st, val, i) SKM_sk_insert(PKCS7, (st), (val), (i)) | ||
| 520 | #define sk_PKCS7_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7, (st), (cmp)) | ||
| 521 | #define sk_PKCS7_dup(st) SKM_sk_dup(PKCS7, st) | ||
| 522 | #define sk_PKCS7_pop_free(st, free_func) SKM_sk_pop_free(PKCS7, (st), (free_func)) | ||
| 523 | #define sk_PKCS7_shift(st) SKM_sk_shift(PKCS7, (st)) | ||
| 524 | #define sk_PKCS7_pop(st) SKM_sk_pop(PKCS7, (st)) | ||
| 525 | #define sk_PKCS7_sort(st) SKM_sk_sort(PKCS7, (st)) | ||
| 526 | |||
| 527 | #define sk_PKCS7_RECIP_INFO_new(st) SKM_sk_new(PKCS7_RECIP_INFO, (st)) | ||
| 528 | #define sk_PKCS7_RECIP_INFO_new_null() SKM_sk_new_null(PKCS7_RECIP_INFO) | ||
| 529 | #define sk_PKCS7_RECIP_INFO_free(st) SKM_sk_free(PKCS7_RECIP_INFO, (st)) | ||
| 530 | #define sk_PKCS7_RECIP_INFO_num(st) SKM_sk_num(PKCS7_RECIP_INFO, (st)) | ||
| 531 | #define sk_PKCS7_RECIP_INFO_value(st, i) SKM_sk_value(PKCS7_RECIP_INFO, (st), (i)) | ||
| 532 | #define sk_PKCS7_RECIP_INFO_set(st, i, val) SKM_sk_set(PKCS7_RECIP_INFO, (st), (i), (val)) | ||
| 533 | #define sk_PKCS7_RECIP_INFO_zero(st) SKM_sk_zero(PKCS7_RECIP_INFO, (st)) | ||
| 534 | #define sk_PKCS7_RECIP_INFO_push(st, val) SKM_sk_push(PKCS7_RECIP_INFO, (st), (val)) | ||
| 535 | #define sk_PKCS7_RECIP_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_RECIP_INFO, (st), (val)) | ||
| 536 | #define sk_PKCS7_RECIP_INFO_find(st, val) SKM_sk_find(PKCS7_RECIP_INFO, (st), (val)) | ||
| 537 | #define sk_PKCS7_RECIP_INFO_delete(st, i) SKM_sk_delete(PKCS7_RECIP_INFO, (st), (i)) | ||
| 538 | #define sk_PKCS7_RECIP_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_RECIP_INFO, (st), (ptr)) | ||
| 539 | #define sk_PKCS7_RECIP_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_RECIP_INFO, (st), (val), (i)) | ||
| 540 | #define sk_PKCS7_RECIP_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_RECIP_INFO, (st), (cmp)) | ||
| 541 | #define sk_PKCS7_RECIP_INFO_dup(st) SKM_sk_dup(PKCS7_RECIP_INFO, st) | ||
| 542 | #define sk_PKCS7_RECIP_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_RECIP_INFO, (st), (free_func)) | ||
| 543 | #define sk_PKCS7_RECIP_INFO_shift(st) SKM_sk_shift(PKCS7_RECIP_INFO, (st)) | ||
| 544 | #define sk_PKCS7_RECIP_INFO_pop(st) SKM_sk_pop(PKCS7_RECIP_INFO, (st)) | ||
| 545 | #define sk_PKCS7_RECIP_INFO_sort(st) SKM_sk_sort(PKCS7_RECIP_INFO, (st)) | ||
| 546 | |||
| 547 | #define sk_PKCS7_SIGNER_INFO_new(st) SKM_sk_new(PKCS7_SIGNER_INFO, (st)) | ||
| 548 | #define sk_PKCS7_SIGNER_INFO_new_null() SKM_sk_new_null(PKCS7_SIGNER_INFO) | ||
| 549 | #define sk_PKCS7_SIGNER_INFO_free(st) SKM_sk_free(PKCS7_SIGNER_INFO, (st)) | ||
| 550 | #define sk_PKCS7_SIGNER_INFO_num(st) SKM_sk_num(PKCS7_SIGNER_INFO, (st)) | ||
| 551 | #define sk_PKCS7_SIGNER_INFO_value(st, i) SKM_sk_value(PKCS7_SIGNER_INFO, (st), (i)) | ||
| 552 | #define sk_PKCS7_SIGNER_INFO_set(st, i, val) SKM_sk_set(PKCS7_SIGNER_INFO, (st), (i), (val)) | ||
| 553 | #define sk_PKCS7_SIGNER_INFO_zero(st) SKM_sk_zero(PKCS7_SIGNER_INFO, (st)) | ||
| 554 | #define sk_PKCS7_SIGNER_INFO_push(st, val) SKM_sk_push(PKCS7_SIGNER_INFO, (st), (val)) | ||
| 555 | #define sk_PKCS7_SIGNER_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_SIGNER_INFO, (st), (val)) | ||
| 556 | #define sk_PKCS7_SIGNER_INFO_find(st, val) SKM_sk_find(PKCS7_SIGNER_INFO, (st), (val)) | ||
| 557 | #define sk_PKCS7_SIGNER_INFO_delete(st, i) SKM_sk_delete(PKCS7_SIGNER_INFO, (st), (i)) | ||
| 558 | #define sk_PKCS7_SIGNER_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_SIGNER_INFO, (st), (ptr)) | ||
| 559 | #define sk_PKCS7_SIGNER_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_SIGNER_INFO, (st), (val), (i)) | ||
| 560 | #define sk_PKCS7_SIGNER_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_SIGNER_INFO, (st), (cmp)) | ||
| 561 | #define sk_PKCS7_SIGNER_INFO_dup(st) SKM_sk_dup(PKCS7_SIGNER_INFO, st) | ||
| 562 | #define sk_PKCS7_SIGNER_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_SIGNER_INFO, (st), (free_func)) | ||
| 563 | #define sk_PKCS7_SIGNER_INFO_shift(st) SKM_sk_shift(PKCS7_SIGNER_INFO, (st)) | ||
| 564 | #define sk_PKCS7_SIGNER_INFO_pop(st) SKM_sk_pop(PKCS7_SIGNER_INFO, (st)) | ||
| 565 | #define sk_PKCS7_SIGNER_INFO_sort(st) SKM_sk_sort(PKCS7_SIGNER_INFO, (st)) | ||
| 566 | |||
| 567 | #define sk_POLICYINFO_new(st) SKM_sk_new(POLICYINFO, (st)) | ||
| 568 | #define sk_POLICYINFO_new_null() SKM_sk_new_null(POLICYINFO) | ||
| 569 | #define sk_POLICYINFO_free(st) SKM_sk_free(POLICYINFO, (st)) | ||
| 570 | #define sk_POLICYINFO_num(st) SKM_sk_num(POLICYINFO, (st)) | ||
| 571 | #define sk_POLICYINFO_value(st, i) SKM_sk_value(POLICYINFO, (st), (i)) | ||
| 572 | #define sk_POLICYINFO_set(st, i, val) SKM_sk_set(POLICYINFO, (st), (i), (val)) | ||
| 573 | #define sk_POLICYINFO_zero(st) SKM_sk_zero(POLICYINFO, (st)) | ||
| 574 | #define sk_POLICYINFO_push(st, val) SKM_sk_push(POLICYINFO, (st), (val)) | ||
| 575 | #define sk_POLICYINFO_unshift(st, val) SKM_sk_unshift(POLICYINFO, (st), (val)) | ||
| 576 | #define sk_POLICYINFO_find(st, val) SKM_sk_find(POLICYINFO, (st), (val)) | ||
| 577 | #define sk_POLICYINFO_delete(st, i) SKM_sk_delete(POLICYINFO, (st), (i)) | ||
| 578 | #define sk_POLICYINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYINFO, (st), (ptr)) | ||
| 579 | #define sk_POLICYINFO_insert(st, val, i) SKM_sk_insert(POLICYINFO, (st), (val), (i)) | ||
| 580 | #define sk_POLICYINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYINFO, (st), (cmp)) | ||
| 581 | #define sk_POLICYINFO_dup(st) SKM_sk_dup(POLICYINFO, st) | ||
| 582 | #define sk_POLICYINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYINFO, (st), (free_func)) | ||
| 583 | #define sk_POLICYINFO_shift(st) SKM_sk_shift(POLICYINFO, (st)) | ||
| 584 | #define sk_POLICYINFO_pop(st) SKM_sk_pop(POLICYINFO, (st)) | ||
| 585 | #define sk_POLICYINFO_sort(st) SKM_sk_sort(POLICYINFO, (st)) | ||
| 586 | |||
| 587 | #define sk_POLICYQUALINFO_new(st) SKM_sk_new(POLICYQUALINFO, (st)) | ||
| 588 | #define sk_POLICYQUALINFO_new_null() SKM_sk_new_null(POLICYQUALINFO) | ||
| 589 | #define sk_POLICYQUALINFO_free(st) SKM_sk_free(POLICYQUALINFO, (st)) | ||
| 590 | #define sk_POLICYQUALINFO_num(st) SKM_sk_num(POLICYQUALINFO, (st)) | ||
| 591 | #define sk_POLICYQUALINFO_value(st, i) SKM_sk_value(POLICYQUALINFO, (st), (i)) | ||
| 592 | #define sk_POLICYQUALINFO_set(st, i, val) SKM_sk_set(POLICYQUALINFO, (st), (i), (val)) | ||
| 593 | #define sk_POLICYQUALINFO_zero(st) SKM_sk_zero(POLICYQUALINFO, (st)) | ||
| 594 | #define sk_POLICYQUALINFO_push(st, val) SKM_sk_push(POLICYQUALINFO, (st), (val)) | ||
| 595 | #define sk_POLICYQUALINFO_unshift(st, val) SKM_sk_unshift(POLICYQUALINFO, (st), (val)) | ||
| 596 | #define sk_POLICYQUALINFO_find(st, val) SKM_sk_find(POLICYQUALINFO, (st), (val)) | ||
| 597 | #define sk_POLICYQUALINFO_delete(st, i) SKM_sk_delete(POLICYQUALINFO, (st), (i)) | ||
| 598 | #define sk_POLICYQUALINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYQUALINFO, (st), (ptr)) | ||
| 599 | #define sk_POLICYQUALINFO_insert(st, val, i) SKM_sk_insert(POLICYQUALINFO, (st), (val), (i)) | ||
| 600 | #define sk_POLICYQUALINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYQUALINFO, (st), (cmp)) | ||
| 601 | #define sk_POLICYQUALINFO_dup(st) SKM_sk_dup(POLICYQUALINFO, st) | ||
| 602 | #define sk_POLICYQUALINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYQUALINFO, (st), (free_func)) | ||
| 603 | #define sk_POLICYQUALINFO_shift(st) SKM_sk_shift(POLICYQUALINFO, (st)) | ||
| 604 | #define sk_POLICYQUALINFO_pop(st) SKM_sk_pop(POLICYQUALINFO, (st)) | ||
| 605 | #define sk_POLICYQUALINFO_sort(st) SKM_sk_sort(POLICYQUALINFO, (st)) | ||
| 606 | |||
| 607 | #define sk_SSL_CIPHER_new(st) SKM_sk_new(SSL_CIPHER, (st)) | ||
| 608 | #define sk_SSL_CIPHER_new_null() SKM_sk_new_null(SSL_CIPHER) | ||
| 609 | #define sk_SSL_CIPHER_free(st) SKM_sk_free(SSL_CIPHER, (st)) | ||
| 610 | #define sk_SSL_CIPHER_num(st) SKM_sk_num(SSL_CIPHER, (st)) | ||
| 611 | #define sk_SSL_CIPHER_value(st, i) SKM_sk_value(SSL_CIPHER, (st), (i)) | ||
| 612 | #define sk_SSL_CIPHER_set(st, i, val) SKM_sk_set(SSL_CIPHER, (st), (i), (val)) | ||
| 613 | #define sk_SSL_CIPHER_zero(st) SKM_sk_zero(SSL_CIPHER, (st)) | ||
| 614 | #define sk_SSL_CIPHER_push(st, val) SKM_sk_push(SSL_CIPHER, (st), (val)) | ||
| 615 | #define sk_SSL_CIPHER_unshift(st, val) SKM_sk_unshift(SSL_CIPHER, (st), (val)) | ||
| 616 | #define sk_SSL_CIPHER_find(st, val) SKM_sk_find(SSL_CIPHER, (st), (val)) | ||
| 617 | #define sk_SSL_CIPHER_delete(st, i) SKM_sk_delete(SSL_CIPHER, (st), (i)) | ||
| 618 | #define sk_SSL_CIPHER_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_CIPHER, (st), (ptr)) | ||
| 619 | #define sk_SSL_CIPHER_insert(st, val, i) SKM_sk_insert(SSL_CIPHER, (st), (val), (i)) | ||
| 620 | #define sk_SSL_CIPHER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_CIPHER, (st), (cmp)) | ||
| 621 | #define sk_SSL_CIPHER_dup(st) SKM_sk_dup(SSL_CIPHER, st) | ||
| 622 | #define sk_SSL_CIPHER_pop_free(st, free_func) SKM_sk_pop_free(SSL_CIPHER, (st), (free_func)) | ||
| 623 | #define sk_SSL_CIPHER_shift(st) SKM_sk_shift(SSL_CIPHER, (st)) | ||
| 624 | #define sk_SSL_CIPHER_pop(st) SKM_sk_pop(SSL_CIPHER, (st)) | ||
| 625 | #define sk_SSL_CIPHER_sort(st) SKM_sk_sort(SSL_CIPHER, (st)) | ||
| 626 | |||
| 627 | #define sk_SSL_COMP_new(st) SKM_sk_new(SSL_COMP, (st)) | ||
| 628 | #define sk_SSL_COMP_new_null() SKM_sk_new_null(SSL_COMP) | ||
| 629 | #define sk_SSL_COMP_free(st) SKM_sk_free(SSL_COMP, (st)) | ||
| 630 | #define sk_SSL_COMP_num(st) SKM_sk_num(SSL_COMP, (st)) | ||
| 631 | #define sk_SSL_COMP_value(st, i) SKM_sk_value(SSL_COMP, (st), (i)) | ||
| 632 | #define sk_SSL_COMP_set(st, i, val) SKM_sk_set(SSL_COMP, (st), (i), (val)) | ||
| 633 | #define sk_SSL_COMP_zero(st) SKM_sk_zero(SSL_COMP, (st)) | ||
| 634 | #define sk_SSL_COMP_push(st, val) SKM_sk_push(SSL_COMP, (st), (val)) | ||
| 635 | #define sk_SSL_COMP_unshift(st, val) SKM_sk_unshift(SSL_COMP, (st), (val)) | ||
| 636 | #define sk_SSL_COMP_find(st, val) SKM_sk_find(SSL_COMP, (st), (val)) | ||
| 637 | #define sk_SSL_COMP_delete(st, i) SKM_sk_delete(SSL_COMP, (st), (i)) | ||
| 638 | #define sk_SSL_COMP_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_COMP, (st), (ptr)) | ||
| 639 | #define sk_SSL_COMP_insert(st, val, i) SKM_sk_insert(SSL_COMP, (st), (val), (i)) | ||
| 640 | #define sk_SSL_COMP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_COMP, (st), (cmp)) | ||
| 641 | #define sk_SSL_COMP_dup(st) SKM_sk_dup(SSL_COMP, st) | ||
| 642 | #define sk_SSL_COMP_pop_free(st, free_func) SKM_sk_pop_free(SSL_COMP, (st), (free_func)) | ||
| 643 | #define sk_SSL_COMP_shift(st) SKM_sk_shift(SSL_COMP, (st)) | ||
| 644 | #define sk_SSL_COMP_pop(st) SKM_sk_pop(SSL_COMP, (st)) | ||
| 645 | #define sk_SSL_COMP_sort(st) SKM_sk_sort(SSL_COMP, (st)) | ||
| 646 | |||
| 647 | #define sk_SXNETID_new(st) SKM_sk_new(SXNETID, (st)) | ||
| 648 | #define sk_SXNETID_new_null() SKM_sk_new_null(SXNETID) | ||
| 649 | #define sk_SXNETID_free(st) SKM_sk_free(SXNETID, (st)) | ||
| 650 | #define sk_SXNETID_num(st) SKM_sk_num(SXNETID, (st)) | ||
| 651 | #define sk_SXNETID_value(st, i) SKM_sk_value(SXNETID, (st), (i)) | ||
| 652 | #define sk_SXNETID_set(st, i, val) SKM_sk_set(SXNETID, (st), (i), (val)) | ||
| 653 | #define sk_SXNETID_zero(st) SKM_sk_zero(SXNETID, (st)) | ||
| 654 | #define sk_SXNETID_push(st, val) SKM_sk_push(SXNETID, (st), (val)) | ||
| 655 | #define sk_SXNETID_unshift(st, val) SKM_sk_unshift(SXNETID, (st), (val)) | ||
| 656 | #define sk_SXNETID_find(st, val) SKM_sk_find(SXNETID, (st), (val)) | ||
| 657 | #define sk_SXNETID_delete(st, i) SKM_sk_delete(SXNETID, (st), (i)) | ||
| 658 | #define sk_SXNETID_delete_ptr(st, ptr) SKM_sk_delete_ptr(SXNETID, (st), (ptr)) | ||
| 659 | #define sk_SXNETID_insert(st, val, i) SKM_sk_insert(SXNETID, (st), (val), (i)) | ||
| 660 | #define sk_SXNETID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SXNETID, (st), (cmp)) | ||
| 661 | #define sk_SXNETID_dup(st) SKM_sk_dup(SXNETID, st) | ||
| 662 | #define sk_SXNETID_pop_free(st, free_func) SKM_sk_pop_free(SXNETID, (st), (free_func)) | ||
| 663 | #define sk_SXNETID_shift(st) SKM_sk_shift(SXNETID, (st)) | ||
| 664 | #define sk_SXNETID_pop(st) SKM_sk_pop(SXNETID, (st)) | ||
| 665 | #define sk_SXNETID_sort(st) SKM_sk_sort(SXNETID, (st)) | ||
| 666 | |||
| 667 | #define sk_X509_new(st) SKM_sk_new(X509, (st)) | ||
| 668 | #define sk_X509_new_null() SKM_sk_new_null(X509) | ||
| 669 | #define sk_X509_free(st) SKM_sk_free(X509, (st)) | ||
| 670 | #define sk_X509_num(st) SKM_sk_num(X509, (st)) | ||
| 671 | #define sk_X509_value(st, i) SKM_sk_value(X509, (st), (i)) | ||
| 672 | #define sk_X509_set(st, i, val) SKM_sk_set(X509, (st), (i), (val)) | ||
| 673 | #define sk_X509_zero(st) SKM_sk_zero(X509, (st)) | ||
| 674 | #define sk_X509_push(st, val) SKM_sk_push(X509, (st), (val)) | ||
| 675 | #define sk_X509_unshift(st, val) SKM_sk_unshift(X509, (st), (val)) | ||
| 676 | #define sk_X509_find(st, val) SKM_sk_find(X509, (st), (val)) | ||
| 677 | #define sk_X509_delete(st, i) SKM_sk_delete(X509, (st), (i)) | ||
| 678 | #define sk_X509_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509, (st), (ptr)) | ||
| 679 | #define sk_X509_insert(st, val, i) SKM_sk_insert(X509, (st), (val), (i)) | ||
| 680 | #define sk_X509_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509, (st), (cmp)) | ||
| 681 | #define sk_X509_dup(st) SKM_sk_dup(X509, st) | ||
| 682 | #define sk_X509_pop_free(st, free_func) SKM_sk_pop_free(X509, (st), (free_func)) | ||
| 683 | #define sk_X509_shift(st) SKM_sk_shift(X509, (st)) | ||
| 684 | #define sk_X509_pop(st) SKM_sk_pop(X509, (st)) | ||
| 685 | #define sk_X509_sort(st) SKM_sk_sort(X509, (st)) | ||
| 686 | |||
| 687 | #define sk_X509V3_EXT_METHOD_new(st) SKM_sk_new(X509V3_EXT_METHOD, (st)) | ||
| 688 | #define sk_X509V3_EXT_METHOD_new_null() SKM_sk_new_null(X509V3_EXT_METHOD) | ||
| 689 | #define sk_X509V3_EXT_METHOD_free(st) SKM_sk_free(X509V3_EXT_METHOD, (st)) | ||
| 690 | #define sk_X509V3_EXT_METHOD_num(st) SKM_sk_num(X509V3_EXT_METHOD, (st)) | ||
| 691 | #define sk_X509V3_EXT_METHOD_value(st, i) SKM_sk_value(X509V3_EXT_METHOD, (st), (i)) | ||
| 692 | #define sk_X509V3_EXT_METHOD_set(st, i, val) SKM_sk_set(X509V3_EXT_METHOD, (st), (i), (val)) | ||
| 693 | #define sk_X509V3_EXT_METHOD_zero(st) SKM_sk_zero(X509V3_EXT_METHOD, (st)) | ||
| 694 | #define sk_X509V3_EXT_METHOD_push(st, val) SKM_sk_push(X509V3_EXT_METHOD, (st), (val)) | ||
| 695 | #define sk_X509V3_EXT_METHOD_unshift(st, val) SKM_sk_unshift(X509V3_EXT_METHOD, (st), (val)) | ||
| 696 | #define sk_X509V3_EXT_METHOD_find(st, val) SKM_sk_find(X509V3_EXT_METHOD, (st), (val)) | ||
| 697 | #define sk_X509V3_EXT_METHOD_delete(st, i) SKM_sk_delete(X509V3_EXT_METHOD, (st), (i)) | ||
| 698 | #define sk_X509V3_EXT_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509V3_EXT_METHOD, (st), (ptr)) | ||
| 699 | #define sk_X509V3_EXT_METHOD_insert(st, val, i) SKM_sk_insert(X509V3_EXT_METHOD, (st), (val), (i)) | ||
| 700 | #define sk_X509V3_EXT_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509V3_EXT_METHOD, (st), (cmp)) | ||
| 701 | #define sk_X509V3_EXT_METHOD_dup(st) SKM_sk_dup(X509V3_EXT_METHOD, st) | ||
| 702 | #define sk_X509V3_EXT_METHOD_pop_free(st, free_func) SKM_sk_pop_free(X509V3_EXT_METHOD, (st), (free_func)) | ||
| 703 | #define sk_X509V3_EXT_METHOD_shift(st) SKM_sk_shift(X509V3_EXT_METHOD, (st)) | ||
| 704 | #define sk_X509V3_EXT_METHOD_pop(st) SKM_sk_pop(X509V3_EXT_METHOD, (st)) | ||
| 705 | #define sk_X509V3_EXT_METHOD_sort(st) SKM_sk_sort(X509V3_EXT_METHOD, (st)) | ||
| 706 | |||
| 707 | #define sk_X509_ALGOR_new(st) SKM_sk_new(X509_ALGOR, (st)) | ||
| 708 | #define sk_X509_ALGOR_new_null() SKM_sk_new_null(X509_ALGOR) | ||
| 709 | #define sk_X509_ALGOR_free(st) SKM_sk_free(X509_ALGOR, (st)) | ||
| 710 | #define sk_X509_ALGOR_num(st) SKM_sk_num(X509_ALGOR, (st)) | ||
| 711 | #define sk_X509_ALGOR_value(st, i) SKM_sk_value(X509_ALGOR, (st), (i)) | ||
| 712 | #define sk_X509_ALGOR_set(st, i, val) SKM_sk_set(X509_ALGOR, (st), (i), (val)) | ||
| 713 | #define sk_X509_ALGOR_zero(st) SKM_sk_zero(X509_ALGOR, (st)) | ||
| 714 | #define sk_X509_ALGOR_push(st, val) SKM_sk_push(X509_ALGOR, (st), (val)) | ||
| 715 | #define sk_X509_ALGOR_unshift(st, val) SKM_sk_unshift(X509_ALGOR, (st), (val)) | ||
| 716 | #define sk_X509_ALGOR_find(st, val) SKM_sk_find(X509_ALGOR, (st), (val)) | ||
| 717 | #define sk_X509_ALGOR_delete(st, i) SKM_sk_delete(X509_ALGOR, (st), (i)) | ||
| 718 | #define sk_X509_ALGOR_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ALGOR, (st), (ptr)) | ||
| 719 | #define sk_X509_ALGOR_insert(st, val, i) SKM_sk_insert(X509_ALGOR, (st), (val), (i)) | ||
| 720 | #define sk_X509_ALGOR_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ALGOR, (st), (cmp)) | ||
| 721 | #define sk_X509_ALGOR_dup(st) SKM_sk_dup(X509_ALGOR, st) | ||
| 722 | #define sk_X509_ALGOR_pop_free(st, free_func) SKM_sk_pop_free(X509_ALGOR, (st), (free_func)) | ||
| 723 | #define sk_X509_ALGOR_shift(st) SKM_sk_shift(X509_ALGOR, (st)) | ||
| 724 | #define sk_X509_ALGOR_pop(st) SKM_sk_pop(X509_ALGOR, (st)) | ||
| 725 | #define sk_X509_ALGOR_sort(st) SKM_sk_sort(X509_ALGOR, (st)) | ||
| 726 | |||
| 727 | #define sk_X509_ATTRIBUTE_new(st) SKM_sk_new(X509_ATTRIBUTE, (st)) | ||
| 728 | #define sk_X509_ATTRIBUTE_new_null() SKM_sk_new_null(X509_ATTRIBUTE) | ||
| 729 | #define sk_X509_ATTRIBUTE_free(st) SKM_sk_free(X509_ATTRIBUTE, (st)) | ||
| 730 | #define sk_X509_ATTRIBUTE_num(st) SKM_sk_num(X509_ATTRIBUTE, (st)) | ||
| 731 | #define sk_X509_ATTRIBUTE_value(st, i) SKM_sk_value(X509_ATTRIBUTE, (st), (i)) | ||
| 732 | #define sk_X509_ATTRIBUTE_set(st, i, val) SKM_sk_set(X509_ATTRIBUTE, (st), (i), (val)) | ||
| 733 | #define sk_X509_ATTRIBUTE_zero(st) SKM_sk_zero(X509_ATTRIBUTE, (st)) | ||
| 734 | #define sk_X509_ATTRIBUTE_push(st, val) SKM_sk_push(X509_ATTRIBUTE, (st), (val)) | ||
| 735 | #define sk_X509_ATTRIBUTE_unshift(st, val) SKM_sk_unshift(X509_ATTRIBUTE, (st), (val)) | ||
| 736 | #define sk_X509_ATTRIBUTE_find(st, val) SKM_sk_find(X509_ATTRIBUTE, (st), (val)) | ||
| 737 | #define sk_X509_ATTRIBUTE_delete(st, i) SKM_sk_delete(X509_ATTRIBUTE, (st), (i)) | ||
| 738 | #define sk_X509_ATTRIBUTE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ATTRIBUTE, (st), (ptr)) | ||
| 739 | #define sk_X509_ATTRIBUTE_insert(st, val, i) SKM_sk_insert(X509_ATTRIBUTE, (st), (val), (i)) | ||
| 740 | #define sk_X509_ATTRIBUTE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ATTRIBUTE, (st), (cmp)) | ||
| 741 | #define sk_X509_ATTRIBUTE_dup(st) SKM_sk_dup(X509_ATTRIBUTE, st) | ||
| 742 | #define sk_X509_ATTRIBUTE_pop_free(st, free_func) SKM_sk_pop_free(X509_ATTRIBUTE, (st), (free_func)) | ||
| 743 | #define sk_X509_ATTRIBUTE_shift(st) SKM_sk_shift(X509_ATTRIBUTE, (st)) | ||
| 744 | #define sk_X509_ATTRIBUTE_pop(st) SKM_sk_pop(X509_ATTRIBUTE, (st)) | ||
| 745 | #define sk_X509_ATTRIBUTE_sort(st) SKM_sk_sort(X509_ATTRIBUTE, (st)) | ||
| 746 | |||
| 747 | #define sk_X509_CRL_new(st) SKM_sk_new(X509_CRL, (st)) | ||
| 748 | #define sk_X509_CRL_new_null() SKM_sk_new_null(X509_CRL) | ||
| 749 | #define sk_X509_CRL_free(st) SKM_sk_free(X509_CRL, (st)) | ||
| 750 | #define sk_X509_CRL_num(st) SKM_sk_num(X509_CRL, (st)) | ||
| 751 | #define sk_X509_CRL_value(st, i) SKM_sk_value(X509_CRL, (st), (i)) | ||
| 752 | #define sk_X509_CRL_set(st, i, val) SKM_sk_set(X509_CRL, (st), (i), (val)) | ||
| 753 | #define sk_X509_CRL_zero(st) SKM_sk_zero(X509_CRL, (st)) | ||
| 754 | #define sk_X509_CRL_push(st, val) SKM_sk_push(X509_CRL, (st), (val)) | ||
| 755 | #define sk_X509_CRL_unshift(st, val) SKM_sk_unshift(X509_CRL, (st), (val)) | ||
| 756 | #define sk_X509_CRL_find(st, val) SKM_sk_find(X509_CRL, (st), (val)) | ||
| 757 | #define sk_X509_CRL_delete(st, i) SKM_sk_delete(X509_CRL, (st), (i)) | ||
| 758 | #define sk_X509_CRL_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_CRL, (st), (ptr)) | ||
| 759 | #define sk_X509_CRL_insert(st, val, i) SKM_sk_insert(X509_CRL, (st), (val), (i)) | ||
| 760 | #define sk_X509_CRL_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_CRL, (st), (cmp)) | ||
| 761 | #define sk_X509_CRL_dup(st) SKM_sk_dup(X509_CRL, st) | ||
| 762 | #define sk_X509_CRL_pop_free(st, free_func) SKM_sk_pop_free(X509_CRL, (st), (free_func)) | ||
| 763 | #define sk_X509_CRL_shift(st) SKM_sk_shift(X509_CRL, (st)) | ||
| 764 | #define sk_X509_CRL_pop(st) SKM_sk_pop(X509_CRL, (st)) | ||
| 765 | #define sk_X509_CRL_sort(st) SKM_sk_sort(X509_CRL, (st)) | ||
| 766 | |||
| 767 | #define sk_X509_EXTENSION_new(st) SKM_sk_new(X509_EXTENSION, (st)) | ||
| 768 | #define sk_X509_EXTENSION_new_null() SKM_sk_new_null(X509_EXTENSION) | ||
| 769 | #define sk_X509_EXTENSION_free(st) SKM_sk_free(X509_EXTENSION, (st)) | ||
| 770 | #define sk_X509_EXTENSION_num(st) SKM_sk_num(X509_EXTENSION, (st)) | ||
| 771 | #define sk_X509_EXTENSION_value(st, i) SKM_sk_value(X509_EXTENSION, (st), (i)) | ||
| 772 | #define sk_X509_EXTENSION_set(st, i, val) SKM_sk_set(X509_EXTENSION, (st), (i), (val)) | ||
| 773 | #define sk_X509_EXTENSION_zero(st) SKM_sk_zero(X509_EXTENSION, (st)) | ||
| 774 | #define sk_X509_EXTENSION_push(st, val) SKM_sk_push(X509_EXTENSION, (st), (val)) | ||
| 775 | #define sk_X509_EXTENSION_unshift(st, val) SKM_sk_unshift(X509_EXTENSION, (st), (val)) | ||
| 776 | #define sk_X509_EXTENSION_find(st, val) SKM_sk_find(X509_EXTENSION, (st), (val)) | ||
| 777 | #define sk_X509_EXTENSION_delete(st, i) SKM_sk_delete(X509_EXTENSION, (st), (i)) | ||
| 778 | #define sk_X509_EXTENSION_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_EXTENSION, (st), (ptr)) | ||
| 779 | #define sk_X509_EXTENSION_insert(st, val, i) SKM_sk_insert(X509_EXTENSION, (st), (val), (i)) | ||
| 780 | #define sk_X509_EXTENSION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_EXTENSION, (st), (cmp)) | ||
| 781 | #define sk_X509_EXTENSION_dup(st) SKM_sk_dup(X509_EXTENSION, st) | ||
| 782 | #define sk_X509_EXTENSION_pop_free(st, free_func) SKM_sk_pop_free(X509_EXTENSION, (st), (free_func)) | ||
| 783 | #define sk_X509_EXTENSION_shift(st) SKM_sk_shift(X509_EXTENSION, (st)) | ||
| 784 | #define sk_X509_EXTENSION_pop(st) SKM_sk_pop(X509_EXTENSION, (st)) | ||
| 785 | #define sk_X509_EXTENSION_sort(st) SKM_sk_sort(X509_EXTENSION, (st)) | ||
| 786 | |||
| 787 | #define sk_X509_INFO_new(st) SKM_sk_new(X509_INFO, (st)) | ||
| 788 | #define sk_X509_INFO_new_null() SKM_sk_new_null(X509_INFO) | ||
| 789 | #define sk_X509_INFO_free(st) SKM_sk_free(X509_INFO, (st)) | ||
| 790 | #define sk_X509_INFO_num(st) SKM_sk_num(X509_INFO, (st)) | ||
| 791 | #define sk_X509_INFO_value(st, i) SKM_sk_value(X509_INFO, (st), (i)) | ||
| 792 | #define sk_X509_INFO_set(st, i, val) SKM_sk_set(X509_INFO, (st), (i), (val)) | ||
| 793 | #define sk_X509_INFO_zero(st) SKM_sk_zero(X509_INFO, (st)) | ||
| 794 | #define sk_X509_INFO_push(st, val) SKM_sk_push(X509_INFO, (st), (val)) | ||
| 795 | #define sk_X509_INFO_unshift(st, val) SKM_sk_unshift(X509_INFO, (st), (val)) | ||
| 796 | #define sk_X509_INFO_find(st, val) SKM_sk_find(X509_INFO, (st), (val)) | ||
| 797 | #define sk_X509_INFO_delete(st, i) SKM_sk_delete(X509_INFO, (st), (i)) | ||
| 798 | #define sk_X509_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_INFO, (st), (ptr)) | ||
| 799 | #define sk_X509_INFO_insert(st, val, i) SKM_sk_insert(X509_INFO, (st), (val), (i)) | ||
| 800 | #define sk_X509_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_INFO, (st), (cmp)) | ||
| 801 | #define sk_X509_INFO_dup(st) SKM_sk_dup(X509_INFO, st) | ||
| 802 | #define sk_X509_INFO_pop_free(st, free_func) SKM_sk_pop_free(X509_INFO, (st), (free_func)) | ||
| 803 | #define sk_X509_INFO_shift(st) SKM_sk_shift(X509_INFO, (st)) | ||
| 804 | #define sk_X509_INFO_pop(st) SKM_sk_pop(X509_INFO, (st)) | ||
| 805 | #define sk_X509_INFO_sort(st) SKM_sk_sort(X509_INFO, (st)) | ||
| 806 | |||
| 807 | #define sk_X509_LOOKUP_new(st) SKM_sk_new(X509_LOOKUP, (st)) | ||
| 808 | #define sk_X509_LOOKUP_new_null() SKM_sk_new_null(X509_LOOKUP) | ||
| 809 | #define sk_X509_LOOKUP_free(st) SKM_sk_free(X509_LOOKUP, (st)) | ||
| 810 | #define sk_X509_LOOKUP_num(st) SKM_sk_num(X509_LOOKUP, (st)) | ||
| 811 | #define sk_X509_LOOKUP_value(st, i) SKM_sk_value(X509_LOOKUP, (st), (i)) | ||
| 812 | #define sk_X509_LOOKUP_set(st, i, val) SKM_sk_set(X509_LOOKUP, (st), (i), (val)) | ||
| 813 | #define sk_X509_LOOKUP_zero(st) SKM_sk_zero(X509_LOOKUP, (st)) | ||
| 814 | #define sk_X509_LOOKUP_push(st, val) SKM_sk_push(X509_LOOKUP, (st), (val)) | ||
| 815 | #define sk_X509_LOOKUP_unshift(st, val) SKM_sk_unshift(X509_LOOKUP, (st), (val)) | ||
| 816 | #define sk_X509_LOOKUP_find(st, val) SKM_sk_find(X509_LOOKUP, (st), (val)) | ||
| 817 | #define sk_X509_LOOKUP_delete(st, i) SKM_sk_delete(X509_LOOKUP, (st), (i)) | ||
| 818 | #define sk_X509_LOOKUP_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_LOOKUP, (st), (ptr)) | ||
| 819 | #define sk_X509_LOOKUP_insert(st, val, i) SKM_sk_insert(X509_LOOKUP, (st), (val), (i)) | ||
| 820 | #define sk_X509_LOOKUP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_LOOKUP, (st), (cmp)) | ||
| 821 | #define sk_X509_LOOKUP_dup(st) SKM_sk_dup(X509_LOOKUP, st) | ||
| 822 | #define sk_X509_LOOKUP_pop_free(st, free_func) SKM_sk_pop_free(X509_LOOKUP, (st), (free_func)) | ||
| 823 | #define sk_X509_LOOKUP_shift(st) SKM_sk_shift(X509_LOOKUP, (st)) | ||
| 824 | #define sk_X509_LOOKUP_pop(st) SKM_sk_pop(X509_LOOKUP, (st)) | ||
| 825 | #define sk_X509_LOOKUP_sort(st) SKM_sk_sort(X509_LOOKUP, (st)) | ||
| 826 | |||
| 827 | #define sk_X509_NAME_new(st) SKM_sk_new(X509_NAME, (st)) | ||
| 828 | #define sk_X509_NAME_new_null() SKM_sk_new_null(X509_NAME) | ||
| 829 | #define sk_X509_NAME_free(st) SKM_sk_free(X509_NAME, (st)) | ||
| 830 | #define sk_X509_NAME_num(st) SKM_sk_num(X509_NAME, (st)) | ||
| 831 | #define sk_X509_NAME_value(st, i) SKM_sk_value(X509_NAME, (st), (i)) | ||
| 832 | #define sk_X509_NAME_set(st, i, val) SKM_sk_set(X509_NAME, (st), (i), (val)) | ||
| 833 | #define sk_X509_NAME_zero(st) SKM_sk_zero(X509_NAME, (st)) | ||
| 834 | #define sk_X509_NAME_push(st, val) SKM_sk_push(X509_NAME, (st), (val)) | ||
| 835 | #define sk_X509_NAME_unshift(st, val) SKM_sk_unshift(X509_NAME, (st), (val)) | ||
| 836 | #define sk_X509_NAME_find(st, val) SKM_sk_find(X509_NAME, (st), (val)) | ||
| 837 | #define sk_X509_NAME_delete(st, i) SKM_sk_delete(X509_NAME, (st), (i)) | ||
| 838 | #define sk_X509_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME, (st), (ptr)) | ||
| 839 | #define sk_X509_NAME_insert(st, val, i) SKM_sk_insert(X509_NAME, (st), (val), (i)) | ||
| 840 | #define sk_X509_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME, (st), (cmp)) | ||
| 841 | #define sk_X509_NAME_dup(st) SKM_sk_dup(X509_NAME, st) | ||
| 842 | #define sk_X509_NAME_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME, (st), (free_func)) | ||
| 843 | #define sk_X509_NAME_shift(st) SKM_sk_shift(X509_NAME, (st)) | ||
| 844 | #define sk_X509_NAME_pop(st) SKM_sk_pop(X509_NAME, (st)) | ||
| 845 | #define sk_X509_NAME_sort(st) SKM_sk_sort(X509_NAME, (st)) | ||
| 846 | |||
| 847 | #define sk_X509_NAME_ENTRY_new(st) SKM_sk_new(X509_NAME_ENTRY, (st)) | ||
| 848 | #define sk_X509_NAME_ENTRY_new_null() SKM_sk_new_null(X509_NAME_ENTRY) | ||
| 849 | #define sk_X509_NAME_ENTRY_free(st) SKM_sk_free(X509_NAME_ENTRY, (st)) | ||
| 850 | #define sk_X509_NAME_ENTRY_num(st) SKM_sk_num(X509_NAME_ENTRY, (st)) | ||
| 851 | #define sk_X509_NAME_ENTRY_value(st, i) SKM_sk_value(X509_NAME_ENTRY, (st), (i)) | ||
| 852 | #define sk_X509_NAME_ENTRY_set(st, i, val) SKM_sk_set(X509_NAME_ENTRY, (st), (i), (val)) | ||
| 853 | #define sk_X509_NAME_ENTRY_zero(st) SKM_sk_zero(X509_NAME_ENTRY, (st)) | ||
| 854 | #define sk_X509_NAME_ENTRY_push(st, val) SKM_sk_push(X509_NAME_ENTRY, (st), (val)) | ||
| 855 | #define sk_X509_NAME_ENTRY_unshift(st, val) SKM_sk_unshift(X509_NAME_ENTRY, (st), (val)) | ||
| 856 | #define sk_X509_NAME_ENTRY_find(st, val) SKM_sk_find(X509_NAME_ENTRY, (st), (val)) | ||
| 857 | #define sk_X509_NAME_ENTRY_delete(st, i) SKM_sk_delete(X509_NAME_ENTRY, (st), (i)) | ||
| 858 | #define sk_X509_NAME_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME_ENTRY, (st), (ptr)) | ||
| 859 | #define sk_X509_NAME_ENTRY_insert(st, val, i) SKM_sk_insert(X509_NAME_ENTRY, (st), (val), (i)) | ||
| 860 | #define sk_X509_NAME_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME_ENTRY, (st), (cmp)) | ||
| 861 | #define sk_X509_NAME_ENTRY_dup(st) SKM_sk_dup(X509_NAME_ENTRY, st) | ||
| 862 | #define sk_X509_NAME_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME_ENTRY, (st), (free_func)) | ||
| 863 | #define sk_X509_NAME_ENTRY_shift(st) SKM_sk_shift(X509_NAME_ENTRY, (st)) | ||
| 864 | #define sk_X509_NAME_ENTRY_pop(st) SKM_sk_pop(X509_NAME_ENTRY, (st)) | ||
| 865 | #define sk_X509_NAME_ENTRY_sort(st) SKM_sk_sort(X509_NAME_ENTRY, (st)) | ||
| 866 | |||
| 867 | #define sk_X509_OBJECT_new(st) SKM_sk_new(X509_OBJECT, (st)) | ||
| 868 | #define sk_X509_OBJECT_new_null() SKM_sk_new_null(X509_OBJECT) | ||
| 869 | #define sk_X509_OBJECT_free(st) SKM_sk_free(X509_OBJECT, (st)) | ||
| 870 | #define sk_X509_OBJECT_num(st) SKM_sk_num(X509_OBJECT, (st)) | ||
| 871 | #define sk_X509_OBJECT_value(st, i) SKM_sk_value(X509_OBJECT, (st), (i)) | ||
| 872 | #define sk_X509_OBJECT_set(st, i, val) SKM_sk_set(X509_OBJECT, (st), (i), (val)) | ||
| 873 | #define sk_X509_OBJECT_zero(st) SKM_sk_zero(X509_OBJECT, (st)) | ||
| 874 | #define sk_X509_OBJECT_push(st, val) SKM_sk_push(X509_OBJECT, (st), (val)) | ||
| 875 | #define sk_X509_OBJECT_unshift(st, val) SKM_sk_unshift(X509_OBJECT, (st), (val)) | ||
| 876 | #define sk_X509_OBJECT_find(st, val) SKM_sk_find(X509_OBJECT, (st), (val)) | ||
| 877 | #define sk_X509_OBJECT_delete(st, i) SKM_sk_delete(X509_OBJECT, (st), (i)) | ||
| 878 | #define sk_X509_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_OBJECT, (st), (ptr)) | ||
| 879 | #define sk_X509_OBJECT_insert(st, val, i) SKM_sk_insert(X509_OBJECT, (st), (val), (i)) | ||
| 880 | #define sk_X509_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_OBJECT, (st), (cmp)) | ||
| 881 | #define sk_X509_OBJECT_dup(st) SKM_sk_dup(X509_OBJECT, st) | ||
| 882 | #define sk_X509_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(X509_OBJECT, (st), (free_func)) | ||
| 883 | #define sk_X509_OBJECT_shift(st) SKM_sk_shift(X509_OBJECT, (st)) | ||
| 884 | #define sk_X509_OBJECT_pop(st) SKM_sk_pop(X509_OBJECT, (st)) | ||
| 885 | #define sk_X509_OBJECT_sort(st) SKM_sk_sort(X509_OBJECT, (st)) | ||
| 886 | |||
| 887 | #define sk_X509_PURPOSE_new(st) SKM_sk_new(X509_PURPOSE, (st)) | ||
| 888 | #define sk_X509_PURPOSE_new_null() SKM_sk_new_null(X509_PURPOSE) | ||
| 889 | #define sk_X509_PURPOSE_free(st) SKM_sk_free(X509_PURPOSE, (st)) | ||
| 890 | #define sk_X509_PURPOSE_num(st) SKM_sk_num(X509_PURPOSE, (st)) | ||
| 891 | #define sk_X509_PURPOSE_value(st, i) SKM_sk_value(X509_PURPOSE, (st), (i)) | ||
| 892 | #define sk_X509_PURPOSE_set(st, i, val) SKM_sk_set(X509_PURPOSE, (st), (i), (val)) | ||
| 893 | #define sk_X509_PURPOSE_zero(st) SKM_sk_zero(X509_PURPOSE, (st)) | ||
| 894 | #define sk_X509_PURPOSE_push(st, val) SKM_sk_push(X509_PURPOSE, (st), (val)) | ||
| 895 | #define sk_X509_PURPOSE_unshift(st, val) SKM_sk_unshift(X509_PURPOSE, (st), (val)) | ||
| 896 | #define sk_X509_PURPOSE_find(st, val) SKM_sk_find(X509_PURPOSE, (st), (val)) | ||
| 897 | #define sk_X509_PURPOSE_delete(st, i) SKM_sk_delete(X509_PURPOSE, (st), (i)) | ||
| 898 | #define sk_X509_PURPOSE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_PURPOSE, (st), (ptr)) | ||
| 899 | #define sk_X509_PURPOSE_insert(st, val, i) SKM_sk_insert(X509_PURPOSE, (st), (val), (i)) | ||
| 900 | #define sk_X509_PURPOSE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_PURPOSE, (st), (cmp)) | ||
| 901 | #define sk_X509_PURPOSE_dup(st) SKM_sk_dup(X509_PURPOSE, st) | ||
| 902 | #define sk_X509_PURPOSE_pop_free(st, free_func) SKM_sk_pop_free(X509_PURPOSE, (st), (free_func)) | ||
| 903 | #define sk_X509_PURPOSE_shift(st) SKM_sk_shift(X509_PURPOSE, (st)) | ||
| 904 | #define sk_X509_PURPOSE_pop(st) SKM_sk_pop(X509_PURPOSE, (st)) | ||
| 905 | #define sk_X509_PURPOSE_sort(st) SKM_sk_sort(X509_PURPOSE, (st)) | ||
| 906 | |||
| 907 | #define sk_X509_REVOKED_new(st) SKM_sk_new(X509_REVOKED, (st)) | ||
| 908 | #define sk_X509_REVOKED_new_null() SKM_sk_new_null(X509_REVOKED) | ||
| 909 | #define sk_X509_REVOKED_free(st) SKM_sk_free(X509_REVOKED, (st)) | ||
| 910 | #define sk_X509_REVOKED_num(st) SKM_sk_num(X509_REVOKED, (st)) | ||
| 911 | #define sk_X509_REVOKED_value(st, i) SKM_sk_value(X509_REVOKED, (st), (i)) | ||
| 912 | #define sk_X509_REVOKED_set(st, i, val) SKM_sk_set(X509_REVOKED, (st), (i), (val)) | ||
| 913 | #define sk_X509_REVOKED_zero(st) SKM_sk_zero(X509_REVOKED, (st)) | ||
| 914 | #define sk_X509_REVOKED_push(st, val) SKM_sk_push(X509_REVOKED, (st), (val)) | ||
| 915 | #define sk_X509_REVOKED_unshift(st, val) SKM_sk_unshift(X509_REVOKED, (st), (val)) | ||
| 916 | #define sk_X509_REVOKED_find(st, val) SKM_sk_find(X509_REVOKED, (st), (val)) | ||
| 917 | #define sk_X509_REVOKED_delete(st, i) SKM_sk_delete(X509_REVOKED, (st), (i)) | ||
| 918 | #define sk_X509_REVOKED_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_REVOKED, (st), (ptr)) | ||
| 919 | #define sk_X509_REVOKED_insert(st, val, i) SKM_sk_insert(X509_REVOKED, (st), (val), (i)) | ||
| 920 | #define sk_X509_REVOKED_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_REVOKED, (st), (cmp)) | ||
| 921 | #define sk_X509_REVOKED_dup(st) SKM_sk_dup(X509_REVOKED, st) | ||
| 922 | #define sk_X509_REVOKED_pop_free(st, free_func) SKM_sk_pop_free(X509_REVOKED, (st), (free_func)) | ||
| 923 | #define sk_X509_REVOKED_shift(st) SKM_sk_shift(X509_REVOKED, (st)) | ||
| 924 | #define sk_X509_REVOKED_pop(st) SKM_sk_pop(X509_REVOKED, (st)) | ||
| 925 | #define sk_X509_REVOKED_sort(st) SKM_sk_sort(X509_REVOKED, (st)) | ||
| 926 | |||
| 927 | #define sk_X509_TRUST_new(st) SKM_sk_new(X509_TRUST, (st)) | ||
| 928 | #define sk_X509_TRUST_new_null() SKM_sk_new_null(X509_TRUST) | ||
| 929 | #define sk_X509_TRUST_free(st) SKM_sk_free(X509_TRUST, (st)) | ||
| 930 | #define sk_X509_TRUST_num(st) SKM_sk_num(X509_TRUST, (st)) | ||
| 931 | #define sk_X509_TRUST_value(st, i) SKM_sk_value(X509_TRUST, (st), (i)) | ||
| 932 | #define sk_X509_TRUST_set(st, i, val) SKM_sk_set(X509_TRUST, (st), (i), (val)) | ||
| 933 | #define sk_X509_TRUST_zero(st) SKM_sk_zero(X509_TRUST, (st)) | ||
| 934 | #define sk_X509_TRUST_push(st, val) SKM_sk_push(X509_TRUST, (st), (val)) | ||
| 935 | #define sk_X509_TRUST_unshift(st, val) SKM_sk_unshift(X509_TRUST, (st), (val)) | ||
| 936 | #define sk_X509_TRUST_find(st, val) SKM_sk_find(X509_TRUST, (st), (val)) | ||
| 937 | #define sk_X509_TRUST_delete(st, i) SKM_sk_delete(X509_TRUST, (st), (i)) | ||
| 938 | #define sk_X509_TRUST_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_TRUST, (st), (ptr)) | ||
| 939 | #define sk_X509_TRUST_insert(st, val, i) SKM_sk_insert(X509_TRUST, (st), (val), (i)) | ||
| 940 | #define sk_X509_TRUST_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_TRUST, (st), (cmp)) | ||
| 941 | #define sk_X509_TRUST_dup(st) SKM_sk_dup(X509_TRUST, st) | ||
| 942 | #define sk_X509_TRUST_pop_free(st, free_func) SKM_sk_pop_free(X509_TRUST, (st), (free_func)) | ||
| 943 | #define sk_X509_TRUST_shift(st) SKM_sk_shift(X509_TRUST, (st)) | ||
| 944 | #define sk_X509_TRUST_pop(st) SKM_sk_pop(X509_TRUST, (st)) | ||
| 945 | #define sk_X509_TRUST_sort(st) SKM_sk_sort(X509_TRUST, (st)) | ||
| 946 | |||
| 947 | #define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 948 | SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 949 | #define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 950 | SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 951 | #define ASN1_seq_pack_ACCESS_DESCRIPTION(st, i2d_func, buf, len) \ | ||
| 952 | SKM_ASN1_seq_pack(ACCESS_DESCRIPTION, (st), (i2d_func), (buf), (len)) | ||
| 953 | #define ASN1_seq_unpack_ACCESS_DESCRIPTION(buf, len, d2i_func, free_func) \ | ||
| 954 | SKM_ASN1_seq_unpack(ACCESS_DESCRIPTION, (buf), (len), (d2i_func), (free_func)) | ||
| 955 | |||
| 956 | #define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 957 | SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 958 | #define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 959 | SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 960 | #define ASN1_seq_pack_ASN1_INTEGER(st, i2d_func, buf, len) \ | ||
| 961 | SKM_ASN1_seq_pack(ASN1_INTEGER, (st), (i2d_func), (buf), (len)) | ||
| 962 | #define ASN1_seq_unpack_ASN1_INTEGER(buf, len, d2i_func, free_func) \ | ||
| 963 | SKM_ASN1_seq_unpack(ASN1_INTEGER, (buf), (len), (d2i_func), (free_func)) | ||
| 964 | |||
| 965 | #define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 966 | SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 967 | #define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 968 | SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 969 | #define ASN1_seq_pack_ASN1_OBJECT(st, i2d_func, buf, len) \ | ||
| 970 | SKM_ASN1_seq_pack(ASN1_OBJECT, (st), (i2d_func), (buf), (len)) | ||
| 971 | #define ASN1_seq_unpack_ASN1_OBJECT(buf, len, d2i_func, free_func) \ | ||
| 972 | SKM_ASN1_seq_unpack(ASN1_OBJECT, (buf), (len), (d2i_func), (free_func)) | ||
| 973 | |||
| 974 | #define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 975 | SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 976 | #define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 977 | SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 978 | #define ASN1_seq_pack_ASN1_TYPE(st, i2d_func, buf, len) \ | ||
| 979 | SKM_ASN1_seq_pack(ASN1_TYPE, (st), (i2d_func), (buf), (len)) | ||
| 980 | #define ASN1_seq_unpack_ASN1_TYPE(buf, len, d2i_func, free_func) \ | ||
| 981 | SKM_ASN1_seq_unpack(ASN1_TYPE, (buf), (len), (d2i_func), (free_func)) | ||
| 982 | |||
| 983 | #define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 984 | SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 985 | #define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 986 | SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 987 | #define ASN1_seq_pack_DIST_POINT(st, i2d_func, buf, len) \ | ||
| 988 | SKM_ASN1_seq_pack(DIST_POINT, (st), (i2d_func), (buf), (len)) | ||
| 989 | #define ASN1_seq_unpack_DIST_POINT(buf, len, d2i_func, free_func) \ | ||
| 990 | SKM_ASN1_seq_unpack(DIST_POINT, (buf), (len), (d2i_func), (free_func)) | ||
| 991 | |||
| 992 | #define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 993 | SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 994 | #define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 995 | SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 996 | #define ASN1_seq_pack_GENERAL_NAME(st, i2d_func, buf, len) \ | ||
| 997 | SKM_ASN1_seq_pack(GENERAL_NAME, (st), (i2d_func), (buf), (len)) | ||
| 998 | #define ASN1_seq_unpack_GENERAL_NAME(buf, len, d2i_func, free_func) \ | ||
| 999 | SKM_ASN1_seq_unpack(GENERAL_NAME, (buf), (len), (d2i_func), (free_func)) | ||
| 1000 | |||
| 1001 | #define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1002 | SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1003 | #define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1004 | SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1005 | #define ASN1_seq_pack_PKCS12_SAFEBAG(st, i2d_func, buf, len) \ | ||
| 1006 | SKM_ASN1_seq_pack(PKCS12_SAFEBAG, (st), (i2d_func), (buf), (len)) | ||
| 1007 | #define ASN1_seq_unpack_PKCS12_SAFEBAG(buf, len, d2i_func, free_func) \ | ||
| 1008 | SKM_ASN1_seq_unpack(PKCS12_SAFEBAG, (buf), (len), (d2i_func), (free_func)) | ||
| 1009 | |||
| 1010 | #define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1011 | SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1012 | #define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1013 | SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1014 | #define ASN1_seq_pack_PKCS7(st, i2d_func, buf, len) \ | ||
| 1015 | SKM_ASN1_seq_pack(PKCS7, (st), (i2d_func), (buf), (len)) | ||
| 1016 | #define ASN1_seq_unpack_PKCS7(buf, len, d2i_func, free_func) \ | ||
| 1017 | SKM_ASN1_seq_unpack(PKCS7, (buf), (len), (d2i_func), (free_func)) | ||
| 1018 | |||
| 1019 | #define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1020 | SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1021 | #define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1022 | SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1023 | #define ASN1_seq_pack_PKCS7_RECIP_INFO(st, i2d_func, buf, len) \ | ||
| 1024 | SKM_ASN1_seq_pack(PKCS7_RECIP_INFO, (st), (i2d_func), (buf), (len)) | ||
| 1025 | #define ASN1_seq_unpack_PKCS7_RECIP_INFO(buf, len, d2i_func, free_func) \ | ||
| 1026 | SKM_ASN1_seq_unpack(PKCS7_RECIP_INFO, (buf), (len), (d2i_func), (free_func)) | ||
| 1027 | |||
| 1028 | #define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1029 | SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1030 | #define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1031 | SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1032 | #define ASN1_seq_pack_PKCS7_SIGNER_INFO(st, i2d_func, buf, len) \ | ||
| 1033 | SKM_ASN1_seq_pack(PKCS7_SIGNER_INFO, (st), (i2d_func), (buf), (len)) | ||
| 1034 | #define ASN1_seq_unpack_PKCS7_SIGNER_INFO(buf, len, d2i_func, free_func) \ | ||
| 1035 | SKM_ASN1_seq_unpack(PKCS7_SIGNER_INFO, (buf), (len), (d2i_func), (free_func)) | ||
| 1036 | |||
| 1037 | #define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1038 | SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1039 | #define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1040 | SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1041 | #define ASN1_seq_pack_POLICYINFO(st, i2d_func, buf, len) \ | ||
| 1042 | SKM_ASN1_seq_pack(POLICYINFO, (st), (i2d_func), (buf), (len)) | ||
| 1043 | #define ASN1_seq_unpack_POLICYINFO(buf, len, d2i_func, free_func) \ | ||
| 1044 | SKM_ASN1_seq_unpack(POLICYINFO, (buf), (len), (d2i_func), (free_func)) | ||
| 1045 | |||
| 1046 | #define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1047 | SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1048 | #define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1049 | SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1050 | #define ASN1_seq_pack_POLICYQUALINFO(st, i2d_func, buf, len) \ | ||
| 1051 | SKM_ASN1_seq_pack(POLICYQUALINFO, (st), (i2d_func), (buf), (len)) | ||
| 1052 | #define ASN1_seq_unpack_POLICYQUALINFO(buf, len, d2i_func, free_func) \ | ||
| 1053 | SKM_ASN1_seq_unpack(POLICYQUALINFO, (buf), (len), (d2i_func), (free_func)) | ||
| 1054 | |||
| 1055 | #define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1056 | SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1057 | #define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1058 | SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1059 | #define ASN1_seq_pack_SXNETID(st, i2d_func, buf, len) \ | ||
| 1060 | SKM_ASN1_seq_pack(SXNETID, (st), (i2d_func), (buf), (len)) | ||
| 1061 | #define ASN1_seq_unpack_SXNETID(buf, len, d2i_func, free_func) \ | ||
| 1062 | SKM_ASN1_seq_unpack(SXNETID, (buf), (len), (d2i_func), (free_func)) | ||
| 1063 | |||
| 1064 | #define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1065 | SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1066 | #define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1067 | SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1068 | #define ASN1_seq_pack_X509(st, i2d_func, buf, len) \ | ||
| 1069 | SKM_ASN1_seq_pack(X509, (st), (i2d_func), (buf), (len)) | ||
| 1070 | #define ASN1_seq_unpack_X509(buf, len, d2i_func, free_func) \ | ||
| 1071 | SKM_ASN1_seq_unpack(X509, (buf), (len), (d2i_func), (free_func)) | ||
| 1072 | |||
| 1073 | #define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1074 | SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1075 | #define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1076 | SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1077 | #define ASN1_seq_pack_X509_ALGOR(st, i2d_func, buf, len) \ | ||
| 1078 | SKM_ASN1_seq_pack(X509_ALGOR, (st), (i2d_func), (buf), (len)) | ||
| 1079 | #define ASN1_seq_unpack_X509_ALGOR(buf, len, d2i_func, free_func) \ | ||
| 1080 | SKM_ASN1_seq_unpack(X509_ALGOR, (buf), (len), (d2i_func), (free_func)) | ||
| 1081 | |||
| 1082 | #define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1083 | SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1084 | #define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1085 | SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1086 | #define ASN1_seq_pack_X509_ATTRIBUTE(st, i2d_func, buf, len) \ | ||
| 1087 | SKM_ASN1_seq_pack(X509_ATTRIBUTE, (st), (i2d_func), (buf), (len)) | ||
| 1088 | #define ASN1_seq_unpack_X509_ATTRIBUTE(buf, len, d2i_func, free_func) \ | ||
| 1089 | SKM_ASN1_seq_unpack(X509_ATTRIBUTE, (buf), (len), (d2i_func), (free_func)) | ||
| 1090 | |||
| 1091 | #define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1092 | SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1093 | #define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1094 | SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1095 | #define ASN1_seq_pack_X509_CRL(st, i2d_func, buf, len) \ | ||
| 1096 | SKM_ASN1_seq_pack(X509_CRL, (st), (i2d_func), (buf), (len)) | ||
| 1097 | #define ASN1_seq_unpack_X509_CRL(buf, len, d2i_func, free_func) \ | ||
| 1098 | SKM_ASN1_seq_unpack(X509_CRL, (buf), (len), (d2i_func), (free_func)) | ||
| 1099 | |||
| 1100 | #define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1101 | SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1102 | #define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1103 | SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1104 | #define ASN1_seq_pack_X509_EXTENSION(st, i2d_func, buf, len) \ | ||
| 1105 | SKM_ASN1_seq_pack(X509_EXTENSION, (st), (i2d_func), (buf), (len)) | ||
| 1106 | #define ASN1_seq_unpack_X509_EXTENSION(buf, len, d2i_func, free_func) \ | ||
| 1107 | SKM_ASN1_seq_unpack(X509_EXTENSION, (buf), (len), (d2i_func), (free_func)) | ||
| 1108 | |||
| 1109 | #define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1110 | SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1111 | #define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1112 | SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1113 | #define ASN1_seq_pack_X509_NAME_ENTRY(st, i2d_func, buf, len) \ | ||
| 1114 | SKM_ASN1_seq_pack(X509_NAME_ENTRY, (st), (i2d_func), (buf), (len)) | ||
| 1115 | #define ASN1_seq_unpack_X509_NAME_ENTRY(buf, len, d2i_func, free_func) \ | ||
| 1116 | SKM_ASN1_seq_unpack(X509_NAME_ENTRY, (buf), (len), (d2i_func), (free_func)) | ||
| 1117 | |||
| 1118 | #define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | ||
| 1119 | SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 1120 | #define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | ||
| 1121 | SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 1122 | #define ASN1_seq_pack_X509_REVOKED(st, i2d_func, buf, len) \ | ||
| 1123 | SKM_ASN1_seq_pack(X509_REVOKED, (st), (i2d_func), (buf), (len)) | ||
| 1124 | #define ASN1_seq_unpack_X509_REVOKED(buf, len, d2i_func, free_func) \ | ||
| 1125 | SKM_ASN1_seq_unpack(X509_REVOKED, (buf), (len), (d2i_func), (free_func)) | ||
| 1126 | |||
| 1127 | #define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \ | ||
| 1128 | SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) | ||
| 1129 | |||
| 1130 | #define PKCS12_decrypt_d2i_PKCS7(algor, d2i_func, free_func, pass, passlen, oct, seq) \ | ||
| 1131 | SKM_PKCS12_decrypt_d2i(PKCS7, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) | ||
| 1132 | /* End of util/mkstack.pl block, you may now edit :-) */ | ||
| 1133 | |||
| 1134 | #endif /* !defined HEADER_SAFESTACK_H */ | ||
diff --git a/src/lib/libssl/src/crypto/stack/stack.c b/src/lib/libssl/src/crypto/stack/stack.c index 58e9126339..02857f0446 100644 --- a/src/lib/libssl/src/crypto/stack/stack.c +++ b/src/lib/libssl/src/crypto/stack/stack.c | |||
| @@ -74,12 +74,12 @@ | |||
| 74 | 74 | ||
| 75 | const char *STACK_version="Stack" OPENSSL_VERSION_PTEXT; | 75 | const char *STACK_version="Stack" OPENSSL_VERSION_PTEXT; |
| 76 | 76 | ||
| 77 | #define FP_ICC (int (*)(const void *,const void *)) | ||
| 78 | #include <errno.h> | 77 | #include <errno.h> |
| 79 | 78 | ||
| 80 | int (*sk_set_cmp_func(STACK *sk, int (*c)()))(void) | 79 | int (*sk_set_cmp_func(STACK *sk, int (*c)(const char * const *,const char * const *))) |
| 80 | (const char * const *, const char * const *) | ||
| 81 | { | 81 | { |
| 82 | int (*old)()=sk->comp; | 82 | int (*old)(const char * const *,const char * const *)=sk->comp; |
| 83 | 83 | ||
| 84 | if (sk->comp != c) | 84 | if (sk->comp != c) |
| 85 | sk->sorted=0; | 85 | sk->sorted=0; |
| @@ -94,7 +94,7 @@ STACK *sk_dup(STACK *sk) | |||
| 94 | char **s; | 94 | char **s; |
| 95 | 95 | ||
| 96 | if ((ret=sk_new(sk->comp)) == NULL) goto err; | 96 | if ((ret=sk_new(sk->comp)) == NULL) goto err; |
| 97 | s=(char **)Realloc((char *)ret->data, | 97 | s=(char **)OPENSSL_realloc((char *)ret->data, |
| 98 | (unsigned int)sizeof(char *)*sk->num_alloc); | 98 | (unsigned int)sizeof(char *)*sk->num_alloc); |
| 99 | if (s == NULL) goto err; | 99 | if (s == NULL) goto err; |
| 100 | ret->data=s; | 100 | ret->data=s; |
| @@ -109,14 +109,19 @@ err: | |||
| 109 | return(NULL); | 109 | return(NULL); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | STACK *sk_new(int (*c)()) | 112 | STACK *sk_new_null(void) |
| 113 | { | ||
| 114 | return sk_new((int (*)(const char * const *, const char * const *))0); | ||
| 115 | } | ||
| 116 | |||
| 117 | STACK *sk_new(int (*c)(const char * const *, const char * const *)) | ||
| 113 | { | 118 | { |
| 114 | STACK *ret; | 119 | STACK *ret; |
| 115 | int i; | 120 | int i; |
| 116 | 121 | ||
| 117 | if ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL) | 122 | if ((ret=(STACK *)OPENSSL_malloc(sizeof(STACK))) == NULL) |
| 118 | goto err0; | 123 | goto err0; |
| 119 | if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL) | 124 | if ((ret->data=(char **)OPENSSL_malloc(sizeof(char *)*MIN_NODES)) == NULL) |
| 120 | goto err1; | 125 | goto err1; |
| 121 | for (i=0; i<MIN_NODES; i++) | 126 | for (i=0; i<MIN_NODES; i++) |
| 122 | ret->data[i]=NULL; | 127 | ret->data[i]=NULL; |
| @@ -126,7 +131,7 @@ STACK *sk_new(int (*c)()) | |||
| 126 | ret->sorted=0; | 131 | ret->sorted=0; |
| 127 | return(ret); | 132 | return(ret); |
| 128 | err1: | 133 | err1: |
| 129 | Free(ret); | 134 | OPENSSL_free(ret); |
| 130 | err0: | 135 | err0: |
| 131 | return(NULL); | 136 | return(NULL); |
| 132 | } | 137 | } |
| @@ -138,7 +143,7 @@ int sk_insert(STACK *st, char *data, int loc) | |||
| 138 | if(st == NULL) return 0; | 143 | if(st == NULL) return 0; |
| 139 | if (st->num_alloc <= st->num+1) | 144 | if (st->num_alloc <= st->num+1) |
| 140 | { | 145 | { |
| 141 | s=(char **)Realloc((char *)st->data, | 146 | s=(char **)OPENSSL_realloc((char *)st->data, |
| 142 | (unsigned int)sizeof(char *)*st->num_alloc*2); | 147 | (unsigned int)sizeof(char *)*st->num_alloc*2); |
| 143 | if (s == NULL) | 148 | if (s == NULL) |
| 144 | return(0); | 149 | return(0); |
| @@ -207,7 +212,7 @@ int sk_find(STACK *st, char *data) | |||
| 207 | { | 212 | { |
| 208 | char **r; | 213 | char **r; |
| 209 | int i; | 214 | int i; |
| 210 | int (*comp_func)(); | 215 | int (*comp_func)(const void *,const void *); |
| 211 | if(st == NULL) return -1; | 216 | if(st == NULL) return -1; |
| 212 | 217 | ||
| 213 | if (st->comp == NULL) | 218 | if (st->comp == NULL) |
| @@ -219,13 +224,24 @@ int sk_find(STACK *st, char *data) | |||
| 219 | } | 224 | } |
| 220 | sk_sort(st); | 225 | sk_sort(st); |
| 221 | if (data == NULL) return(-1); | 226 | if (data == NULL) return(-1); |
| 222 | comp_func=(int (*)())st->comp; | 227 | /* This (and the "qsort" below) are the two places in OpenSSL |
| 228 | * where we need to convert from our standard (type **,type **) | ||
| 229 | * compare callback type to the (void *,void *) type required by | ||
| 230 | * bsearch. However, the "data" it is being called(back) with are | ||
| 231 | * not (type *) pointers, but the *pointers* to (type *) pointers, | ||
| 232 | * so we get our extra level of pointer dereferencing that way. */ | ||
| 233 | comp_func=(int (*)(const void *,const void *))(st->comp); | ||
| 223 | r=(char **)bsearch(&data,(char *)st->data, | 234 | r=(char **)bsearch(&data,(char *)st->data, |
| 224 | st->num,sizeof(char *),FP_ICC comp_func); | 235 | st->num,sizeof(char *), comp_func); |
| 225 | if (r == NULL) return(-1); | 236 | if (r == NULL) return(-1); |
| 226 | i=(int)(r-st->data); | 237 | i=(int)(r-st->data); |
| 227 | for ( ; i>0; i--) | 238 | for ( ; i>0; i--) |
| 228 | if ((*st->comp)(&(st->data[i-1]),&data) < 0) | 239 | /* This needs a cast because the type being pointed to from |
| 240 | * the "&" expressions are (char *) rather than (const char *). | ||
| 241 | * For an explanation, read: | ||
| 242 | * http://www.eskimo.com/~scs/C-faq/q11.10.html :-) */ | ||
| 243 | if ((*st->comp)((const char * const *)&(st->data[i-1]), | ||
| 244 | (const char * const *)&data) < 0) | ||
| 229 | break; | 245 | break; |
| 230 | return(i); | 246 | return(i); |
| 231 | } | 247 | } |
| @@ -262,7 +278,7 @@ void sk_zero(STACK *st) | |||
| 262 | st->num=0; | 278 | st->num=0; |
| 263 | } | 279 | } |
| 264 | 280 | ||
| 265 | void sk_pop_free(STACK *st, void (*func)()) | 281 | void sk_pop_free(STACK *st, void (*func)(void *)) |
| 266 | { | 282 | { |
| 267 | int i; | 283 | int i; |
| 268 | 284 | ||
| @@ -276,17 +292,17 @@ void sk_pop_free(STACK *st, void (*func)()) | |||
| 276 | void sk_free(STACK *st) | 292 | void sk_free(STACK *st) |
| 277 | { | 293 | { |
| 278 | if (st == NULL) return; | 294 | if (st == NULL) return; |
| 279 | if (st->data != NULL) Free(st->data); | 295 | if (st->data != NULL) OPENSSL_free(st->data); |
| 280 | Free(st); | 296 | OPENSSL_free(st); |
| 281 | } | 297 | } |
| 282 | 298 | ||
| 283 | int sk_num(STACK *st) | 299 | int sk_num(const STACK *st) |
| 284 | { | 300 | { |
| 285 | if(st == NULL) return -1; | 301 | if(st == NULL) return -1; |
| 286 | return st->num; | 302 | return st->num; |
| 287 | } | 303 | } |
| 288 | 304 | ||
| 289 | char *sk_value(STACK *st, int i) | 305 | char *sk_value(const STACK *st, int i) |
| 290 | { | 306 | { |
| 291 | if(st == NULL) return NULL; | 307 | if(st == NULL) return NULL; |
| 292 | return st->data[i]; | 308 | return st->data[i]; |
| @@ -299,13 +315,18 @@ char *sk_set(STACK *st, int i, char *value) | |||
| 299 | } | 315 | } |
| 300 | 316 | ||
| 301 | void sk_sort(STACK *st) | 317 | void sk_sort(STACK *st) |
| 302 | { | ||
| 303 | if (!st->sorted) | ||
| 304 | { | 318 | { |
| 305 | int (*comp_func)(); | 319 | if (!st->sorted) |
| 306 | 320 | { | |
| 307 | comp_func=(int (*)())st->comp; | 321 | int (*comp_func)(const void *,const void *); |
| 308 | qsort(st->data,st->num,sizeof(char *),FP_ICC comp_func); | 322 | |
| 309 | st->sorted=1; | 323 | /* same comment as in sk_find ... previously st->comp was declared |
| 324 | * as a (void*,void*) callback type, but this made the population | ||
| 325 | * of the callback pointer illogical - our callbacks compare | ||
| 326 | * type** with type**, so we leave the casting until absolutely | ||
| 327 | * necessary (ie. "now"). */ | ||
| 328 | comp_func=(int (*)(const void *,const void *))(st->comp); | ||
| 329 | qsort(st->data,st->num,sizeof(char *), comp_func); | ||
| 330 | st->sorted=1; | ||
| 331 | } | ||
| 310 | } | 332 | } |
| 311 | } | ||
diff --git a/src/lib/libssl/src/crypto/stack/stack.h b/src/lib/libssl/src/crypto/stack/stack.h index a615d9b4c9..8b436ca4b9 100644 --- a/src/lib/libssl/src/crypto/stack/stack.h +++ b/src/lib/libssl/src/crypto/stack/stack.h | |||
| @@ -70,23 +70,21 @@ typedef struct stack_st | |||
| 70 | int sorted; | 70 | int sorted; |
| 71 | 71 | ||
| 72 | int num_alloc; | 72 | int num_alloc; |
| 73 | int (*comp)(); | 73 | int (*comp)(const char * const *, const char * const *); |
| 74 | } STACK; | 74 | } STACK; |
| 75 | 75 | ||
| 76 | |||
| 77 | #define sk_new_null() sk_new(NULL) | ||
| 78 | |||
| 79 | #define M_sk_num(sk) ((sk) ? (sk)->num:-1) | 76 | #define M_sk_num(sk) ((sk) ? (sk)->num:-1) |
| 80 | #define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) | 77 | #define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) |
| 81 | 78 | ||
| 82 | int sk_num(STACK *); | 79 | int sk_num(const STACK *); |
| 83 | char *sk_value(STACK *, int); | 80 | char *sk_value(const STACK *, int); |
| 84 | 81 | ||
| 85 | char *sk_set(STACK *, int, char *); | 82 | char *sk_set(STACK *, int, char *); |
| 86 | 83 | ||
| 87 | STACK *sk_new(int (*cmp)()); | 84 | STACK *sk_new(int (*cmp)(const char * const *, const char * const *)); |
| 85 | STACK *sk_new_null(void); | ||
| 88 | void sk_free(STACK *); | 86 | void sk_free(STACK *); |
| 89 | void sk_pop_free(STACK *st, void (*func)()); | 87 | void sk_pop_free(STACK *st, void (*func)(void *)); |
| 90 | int sk_insert(STACK *sk,char *data,int where); | 88 | int sk_insert(STACK *sk,char *data,int where); |
| 91 | char *sk_delete(STACK *st,int loc); | 89 | char *sk_delete(STACK *st,int loc); |
| 92 | char *sk_delete_ptr(STACK *st, char *p); | 90 | char *sk_delete_ptr(STACK *st, char *p); |
| @@ -96,7 +94,9 @@ int sk_unshift(STACK *st,char *data); | |||
| 96 | char *sk_shift(STACK *st); | 94 | char *sk_shift(STACK *st); |
| 97 | char *sk_pop(STACK *st); | 95 | char *sk_pop(STACK *st); |
| 98 | void sk_zero(STACK *st); | 96 | void sk_zero(STACK *st); |
| 99 | int (*sk_set_cmp_func(STACK *sk, int (*c)()))(); | 97 | int (*sk_set_cmp_func(STACK *sk, int (*c)(const char * const *, |
| 98 | const char * const *))) | ||
| 99 | (const char * const *, const char * const *); | ||
| 100 | STACK *sk_dup(STACK *st); | 100 | STACK *sk_dup(STACK *st); |
| 101 | void sk_sort(STACK *st); | 101 | void sk_sort(STACK *st); |
| 102 | 102 | ||
diff --git a/src/lib/libssl/src/crypto/symhacks.h b/src/lib/libssl/src/crypto/symhacks.h new file mode 100644 index 0000000000..358ad355bb --- /dev/null +++ b/src/lib/libssl/src/crypto/symhacks.h | |||
| @@ -0,0 +1,154 @@ | |||
| 1 | /* ==================================================================== | ||
| 2 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 3 | * | ||
| 4 | * Redistribution and use in source and binary forms, with or without | ||
| 5 | * modification, are permitted provided that the following conditions | ||
| 6 | * are met: | ||
| 7 | * | ||
| 8 | * 1. Redistributions of source code must retain the above copyright | ||
| 9 | * notice, this list of conditions and the following disclaimer. | ||
| 10 | * | ||
| 11 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer in | ||
| 13 | * the documentation and/or other materials provided with the | ||
| 14 | * distribution. | ||
| 15 | * | ||
| 16 | * 3. All advertising materials mentioning features or use of this | ||
| 17 | * software must display the following acknowledgment: | ||
| 18 | * "This product includes software developed by the OpenSSL Project | ||
| 19 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 20 | * | ||
| 21 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 22 | * endorse or promote products derived from this software without | ||
| 23 | * prior written permission. For written permission, please contact | ||
| 24 | * openssl-core@openssl.org. | ||
| 25 | * | ||
| 26 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 27 | * nor may "OpenSSL" appear in their names without prior written | ||
| 28 | * permission of the OpenSSL Project. | ||
| 29 | * | ||
| 30 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 31 | * acknowledgment: | ||
| 32 | * "This product includes software developed by the OpenSSL Project | ||
| 33 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 34 | * | ||
| 35 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 36 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 37 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 38 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 39 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 40 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 41 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 42 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 43 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 44 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 45 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 46 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 47 | * ==================================================================== | ||
| 48 | * | ||
| 49 | * This product includes cryptographic software written by Eric Young | ||
| 50 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 51 | * Hudson (tjh@cryptsoft.com). | ||
| 52 | * | ||
| 53 | */ | ||
| 54 | |||
| 55 | #ifndef HEADER_SYMHACKS_H | ||
| 56 | #define HEADER_SYMHACKS_H | ||
| 57 | |||
| 58 | /* Hacks to solve the problem with linkers incapable of handling very long | ||
| 59 | symbol names. In the case of VMS, the limit is 31 characters on VMS for | ||
| 60 | VAX. */ | ||
| 61 | #ifdef VMS | ||
| 62 | |||
| 63 | /* Hack a long name in crypto/asn1/a_mbstr.c */ | ||
| 64 | #undef ASN1_STRING_set_default_mask_asc | ||
| 65 | #define ASN1_STRING_set_default_mask_asc ASN1_STRING_set_def_mask_asc | ||
| 66 | |||
| 67 | #if 0 /* No longer needed, since safestack macro magic does the job */ | ||
| 68 | /* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) */ | ||
| 69 | #undef i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO | ||
| 70 | #define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO i2d_ASN1_SET_OF_PKCS7_SIGINF | ||
| 71 | #undef d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO | ||
| 72 | #define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO d2i_ASN1_SET_OF_PKCS7_SIGINF | ||
| 73 | #endif | ||
| 74 | |||
| 75 | #if 0 /* No longer needed, since safestack macro magic does the job */ | ||
| 76 | /* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) */ | ||
| 77 | #undef i2d_ASN1_SET_OF_PKCS7_RECIP_INFO | ||
| 78 | #define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO i2d_ASN1_SET_OF_PKCS7_RECINF | ||
| 79 | #undef d2i_ASN1_SET_OF_PKCS7_RECIP_INFO | ||
| 80 | #define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO d2i_ASN1_SET_OF_PKCS7_RECINF | ||
| 81 | #endif | ||
| 82 | |||
| 83 | #if 0 /* No longer needed, since safestack macro magic does the job */ | ||
| 84 | /* Hack the names created with DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) */ | ||
| 85 | #undef i2d_ASN1_SET_OF_ACCESS_DESCRIPTION | ||
| 86 | #define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION i2d_ASN1_SET_OF_ACC_DESC | ||
| 87 | #undef d2i_ASN1_SET_OF_ACCESS_DESCRIPTION | ||
| 88 | #define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION d2i_ASN1_SET_OF_ACC_DESC | ||
| 89 | #endif | ||
| 90 | |||
| 91 | /* Hack the names created with DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE) */ | ||
| 92 | #undef PEM_read_NETSCAPE_CERT_SEQUENCE | ||
| 93 | #define PEM_read_NETSCAPE_CERT_SEQUENCE PEM_read_NS_CERT_SEQ | ||
| 94 | #undef PEM_write_NETSCAPE_CERT_SEQUENCE | ||
| 95 | #define PEM_write_NETSCAPE_CERT_SEQUENCE PEM_write_NS_CERT_SEQ | ||
| 96 | #undef PEM_read_bio_NETSCAPE_CERT_SEQUENCE | ||
| 97 | #define PEM_read_bio_NETSCAPE_CERT_SEQUENCE PEM_read_bio_NS_CERT_SEQ | ||
| 98 | #undef PEM_write_bio_NETSCAPE_CERT_SEQUENCE | ||
| 99 | #define PEM_write_bio_NETSCAPE_CERT_SEQUENCE PEM_write_bio_NS_CERT_SEQ | ||
| 100 | #undef PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE | ||
| 101 | #define PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE PEM_write_cb_bio_NS_CERT_SEQ | ||
| 102 | |||
| 103 | /* Hack the names created with DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO) */ | ||
| 104 | #undef PEM_read_PKCS8_PRIV_KEY_INFO | ||
| 105 | #define PEM_read_PKCS8_PRIV_KEY_INFO PEM_read_P8_PRIV_KEY_INFO | ||
| 106 | #undef PEM_write_PKCS8_PRIV_KEY_INFO | ||
| 107 | #define PEM_write_PKCS8_PRIV_KEY_INFO PEM_write_P8_PRIV_KEY_INFO | ||
| 108 | #undef PEM_read_bio_PKCS8_PRIV_KEY_INFO | ||
| 109 | #define PEM_read_bio_PKCS8_PRIV_KEY_INFO PEM_read_bio_P8_PRIV_KEY_INFO | ||
| 110 | #undef PEM_write_bio_PKCS8_PRIV_KEY_INFO | ||
| 111 | #define PEM_write_bio_PKCS8_PRIV_KEY_INFO PEM_write_bio_P8_PRIV_KEY_INFO | ||
| 112 | #undef PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO | ||
| 113 | #define PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO PEM_wrt_cb_bio_P8_PRIV_KEY_INFO | ||
| 114 | |||
| 115 | /* Hack other PEM names */ | ||
| 116 | #undef PEM_write_bio_PKCS8PrivateKey_nid | ||
| 117 | #define PEM_write_bio_PKCS8PrivateKey_nid PEM_write_bio_PKCS8PrivKey_nid | ||
| 118 | |||
| 119 | /* Hack some long X509 names */ | ||
| 120 | #undef X509_REVOKED_get_ext_by_critical | ||
| 121 | #define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic | ||
| 122 | |||
| 123 | /* Hack some long CRYPTO names */ | ||
| 124 | #define CRYPTO_set_dynlock_destroy_callback CRYPTO_set_dynlock_destroy_cb | ||
| 125 | #define CRYPTO_set_dynlock_create_callback CRYPTO_set_dynlock_create_cb | ||
| 126 | #define CRYPTO_set_dynlock_lock_callback CRYPTO_set_dynlock_lock_cb | ||
| 127 | #define CRYPTO_get_dynlock_lock_callback CRYPTO_get_dynlock_lock_cb | ||
| 128 | #define CRYPTO_get_dynlock_destroy_callback CRYPTO_get_dynlock_destroy_cb | ||
| 129 | #define CRYPTO_get_dynlock_create_callback CRYPTO_get_dynlock_create_cb | ||
| 130 | |||
| 131 | /* Hack some long SSL names */ | ||
| 132 | #define SSL_CTX_set_default_verify_paths SSL_CTX_set_def_verify_paths | ||
| 133 | #define SSL_get_ex_data_X509_STORE_CTX_idx SSL_get_ex_d_X509_STORE_CTX_idx | ||
| 134 | #define SSL_add_file_cert_subjects_to_stack SSL_add_file_cert_subjs_to_stk | ||
| 135 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_subjs_to_stk | ||
| 136 | #define SSL_CTX_use_certificate_chain_file SSL_CTX_use_cert_chain_file | ||
| 137 | #define SSL_CTX_set_cert_verify_callback SSL_CTX_set_cert_verify_cb | ||
| 138 | #define SSL_CTX_set_default_passwd_cb_userdata SSL_CTX_set_def_passwd_cb_ud | ||
| 139 | |||
| 140 | /* Hack some long ENGINE names */ | ||
| 141 | #define ENGINE_get_default_BN_mod_exp_crt ENGINE_get_def_BN_mod_exp_crt | ||
| 142 | #define ENGINE_set_default_BN_mod_exp_crt ENGINE_set_def_BN_mod_exp_crt | ||
| 143 | |||
| 144 | #endif /* defined VMS */ | ||
| 145 | |||
| 146 | |||
| 147 | /* Case insensiteve linking causes problems.... */ | ||
| 148 | #if defined(WIN16) || defined(VMS) | ||
| 149 | #undef ERR_load_CRYPTO_strings | ||
| 150 | #define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings | ||
| 151 | #endif | ||
| 152 | |||
| 153 | |||
| 154 | #endif /* ! defined HEADER_VMS_IDHACKS_H */ | ||
diff --git a/src/lib/libssl/src/crypto/threads/mttest.c b/src/lib/libssl/src/crypto/threads/mttest.c index 24713a3157..100165948c 100644 --- a/src/lib/libssl/src/crypto/threads/mttest.c +++ b/src/lib/libssl/src/crypto/threads/mttest.c | |||
| @@ -699,7 +699,7 @@ void thread_setup(void) | |||
| 699 | { | 699 | { |
| 700 | int i; | 700 | int i; |
| 701 | 701 | ||
| 702 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(HANDLE)); | 702 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE)); |
| 703 | for (i=0; i<CRYPTO_num_locks(); i++) | 703 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 704 | { | 704 | { |
| 705 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); | 705 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); |
| @@ -716,7 +716,7 @@ void thread_cleanup(void) | |||
| 716 | CRYPTO_set_locking_callback(NULL); | 716 | CRYPTO_set_locking_callback(NULL); |
| 717 | for (i=0; i<CRYPTO_num_locks(); i++) | 717 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 718 | CloseHandle(lock_cs[i]); | 718 | CloseHandle(lock_cs[i]); |
| 719 | Free(lock_cs); | 719 | OPENSSL_free(lock_cs); |
| 720 | } | 720 | } |
| 721 | 721 | ||
| 722 | void win32_locking_callback(int mode, int type, char *file, int line) | 722 | void win32_locking_callback(int mode, int type, char *file, int line) |
| @@ -794,8 +794,8 @@ void thread_setup(void) | |||
| 794 | { | 794 | { |
| 795 | int i; | 795 | int i; |
| 796 | 796 | ||
| 797 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(mutex_t)); | 797 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(mutex_t)); |
| 798 | lock_count=Malloc(CRYPTO_num_locks() * sizeof(long)); | 798 | lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); |
| 799 | for (i=0; i<CRYPTO_num_locks(); i++) | 799 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 800 | { | 800 | { |
| 801 | lock_count[i]=0; | 801 | lock_count[i]=0; |
| @@ -821,8 +821,8 @@ void thread_cleanup(void) | |||
| 821 | mutex_destroy(&(lock_cs[i])); | 821 | mutex_destroy(&(lock_cs[i])); |
| 822 | fprintf(stderr,"%8ld:%s\n",lock_count[i],CRYPTO_get_lock_name(i)); | 822 | fprintf(stderr,"%8ld:%s\n",lock_count[i],CRYPTO_get_lock_name(i)); |
| 823 | } | 823 | } |
| 824 | Free(lock_cs); | 824 | OPENSSL_free(lock_cs); |
| 825 | Free(lock_count); | 825 | OPENSSL_free(lock_count); |
| 826 | 826 | ||
| 827 | fprintf(stderr,"done cleanup\n"); | 827 | fprintf(stderr,"done cleanup\n"); |
| 828 | 828 | ||
| @@ -919,7 +919,7 @@ void thread_setup(void) | |||
| 919 | arena=usinit(filename); | 919 | arena=usinit(filename); |
| 920 | unlink(filename); | 920 | unlink(filename); |
| 921 | 921 | ||
| 922 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(usema_t *)); | 922 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *)); |
| 923 | for (i=0; i<CRYPTO_num_locks(); i++) | 923 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 924 | { | 924 | { |
| 925 | lock_cs[i]=usnewsema(arena,1); | 925 | lock_cs[i]=usnewsema(arena,1); |
| @@ -942,7 +942,7 @@ void thread_cleanup(void) | |||
| 942 | usdumpsema(lock_cs[i],stdout,buf); | 942 | usdumpsema(lock_cs[i],stdout,buf); |
| 943 | usfreesema(lock_cs[i],arena); | 943 | usfreesema(lock_cs[i],arena); |
| 944 | } | 944 | } |
| 945 | Free(lock_cs); | 945 | OPENSSL_free(lock_cs); |
| 946 | } | 946 | } |
| 947 | 947 | ||
| 948 | void irix_locking_callback(int mode, int type, char *file, int line) | 948 | void irix_locking_callback(int mode, int type, char *file, int line) |
| @@ -1002,8 +1002,8 @@ void thread_setup(void) | |||
| 1002 | { | 1002 | { |
| 1003 | int i; | 1003 | int i; |
| 1004 | 1004 | ||
| 1005 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); | 1005 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); |
| 1006 | lock_count=Malloc(CRYPTO_num_locks() * sizeof(long)); | 1006 | lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); |
| 1007 | for (i=0; i<CRYPTO_num_locks(); i++) | 1007 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 1008 | { | 1008 | { |
| 1009 | lock_count[i]=0; | 1009 | lock_count[i]=0; |
| @@ -1026,8 +1026,8 @@ void thread_cleanup(void) | |||
| 1026 | fprintf(stderr,"%8ld:%s\n",lock_count[i], | 1026 | fprintf(stderr,"%8ld:%s\n",lock_count[i], |
| 1027 | CRYPTO_get_lock_name(i)); | 1027 | CRYPTO_get_lock_name(i)); |
| 1028 | } | 1028 | } |
| 1029 | Free(lock_cs); | 1029 | OPENSSL_free(lock_cs); |
| 1030 | Free(lock_count); | 1030 | OPENSSL_free(lock_count); |
| 1031 | 1031 | ||
| 1032 | fprintf(stderr,"done cleanup\n"); | 1032 | fprintf(stderr,"done cleanup\n"); |
| 1033 | } | 1033 | } |
diff --git a/src/lib/libssl/src/crypto/threads/th-lock.c b/src/lib/libssl/src/crypto/threads/th-lock.c index 3ee978060c..553d2218de 100644 --- a/src/lib/libssl/src/crypto/threads/th-lock.c +++ b/src/lib/libssl/src/crypto/threads/th-lock.c | |||
| @@ -113,7 +113,7 @@ void CRYPTO_thread_setup(void) | |||
| 113 | { | 113 | { |
| 114 | int i; | 114 | int i; |
| 115 | 115 | ||
| 116 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(HANDLE)); | 116 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE)); |
| 117 | for (i=0; i<CRYPTO_num_locks(); i++) | 117 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 118 | { | 118 | { |
| 119 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); | 119 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); |
| @@ -131,7 +131,7 @@ static void CRYPTO_thread_cleanup(void) | |||
| 131 | CRYPTO_set_locking_callback(NULL); | 131 | CRYPTO_set_locking_callback(NULL); |
| 132 | for (i=0; i<CRYPTO_num_locks(); i++) | 132 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 133 | CloseHandle(lock_cs[i]); | 133 | CloseHandle(lock_cs[i]); |
| 134 | Free(lock_cs); | 134 | OPENSSL_free(lock_cs); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | void win32_locking_callback(int mode, int type, char *file, int line) | 137 | void win32_locking_callback(int mode, int type, char *file, int line) |
| @@ -164,11 +164,11 @@ void CRYPTO_thread_setup(void) | |||
| 164 | int i; | 164 | int i; |
| 165 | 165 | ||
| 166 | #ifdef USE_MUTEX | 166 | #ifdef USE_MUTEX |
| 167 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(mutex_t)); | 167 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(mutex_t)); |
| 168 | #else | 168 | #else |
| 169 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(rwlock_t)); | 169 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(rwlock_t)); |
| 170 | #endif | 170 | #endif |
| 171 | lock_count=Malloc(CRYPTO_num_locks() * sizeof(long)); | 171 | lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); |
| 172 | for (i=0; i<CRYPTO_num_locks(); i++) | 172 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 173 | { | 173 | { |
| 174 | lock_count[i]=0; | 174 | lock_count[i]=0; |
| @@ -196,8 +196,8 @@ void CRYPTO_thread_cleanup(void) | |||
| 196 | rwlock_destroy(&(lock_cs[i])); | 196 | rwlock_destroy(&(lock_cs[i])); |
| 197 | #endif | 197 | #endif |
| 198 | } | 198 | } |
| 199 | Free(lock_cs); | 199 | OPENSSL_free(lock_cs); |
| 200 | Free(lock_count); | 200 | OPENSSL_free(lock_count); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | void solaris_locking_callback(int mode, int type, char *file, int line) | 203 | void solaris_locking_callback(int mode, int type, char *file, int line) |
| @@ -267,7 +267,7 @@ void CRYPTO_thread_setup(void) | |||
| 267 | arena=usinit(filename); | 267 | arena=usinit(filename); |
| 268 | unlink(filename); | 268 | unlink(filename); |
| 269 | 269 | ||
| 270 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(usema_t *)); | 270 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *)); |
| 271 | for (i=0; i<CRYPTO_num_locks(); i++) | 271 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 272 | { | 272 | { |
| 273 | lock_cs[i]=usnewsema(arena,1); | 273 | lock_cs[i]=usnewsema(arena,1); |
| @@ -290,7 +290,7 @@ void CRYPTO_thread_cleanup(void) | |||
| 290 | usdumpsema(lock_cs[i],stdout,buf); | 290 | usdumpsema(lock_cs[i],stdout,buf); |
| 291 | usfreesema(lock_cs[i],arena); | 291 | usfreesema(lock_cs[i],arena); |
| 292 | } | 292 | } |
| 293 | Free(lock_cs); | 293 | OPENSSL_free(lock_cs); |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | void irix_locking_callback(int mode, int type, char *file, int line) | 296 | void irix_locking_callback(int mode, int type, char *file, int line) |
| @@ -324,8 +324,8 @@ void CRYPTO_thread_setup(void) | |||
| 324 | { | 324 | { |
| 325 | int i; | 325 | int i; |
| 326 | 326 | ||
| 327 | lock_cs=Malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); | 327 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); |
| 328 | lock_count=Malloc(CRYPTO_num_locks() * sizeof(long)); | 328 | lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); |
| 329 | for (i=0; i<CRYPTO_num_locks(); i++) | 329 | for (i=0; i<CRYPTO_num_locks(); i++) |
| 330 | { | 330 | { |
| 331 | lock_count[i]=0; | 331 | lock_count[i]=0; |
| @@ -345,8 +345,8 @@ void thread_cleanup(void) | |||
| 345 | { | 345 | { |
| 346 | pthread_mutex_destroy(&(lock_cs[i])); | 346 | pthread_mutex_destroy(&(lock_cs[i])); |
| 347 | } | 347 | } |
| 348 | Free(lock_cs); | 348 | OPENSSL_free(lock_cs); |
| 349 | Free(lock_count); | 349 | OPENSSL_free(lock_count); |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | void pthreads_locking_callback(int mode, int type, char *file, | 352 | void pthreads_locking_callback(int mode, int type, char *file, |
diff --git a/src/lib/libssl/src/crypto/tmdiff.c b/src/lib/libssl/src/crypto/tmdiff.c index 0ad8a9ed8d..7773928666 100644 --- a/src/lib/libssl/src/crypto/tmdiff.c +++ b/src/lib/libssl/src/crypto/tmdiff.c | |||
| @@ -134,7 +134,7 @@ char *ms_time_new(void) | |||
| 134 | { | 134 | { |
| 135 | MS_TM *ret; | 135 | MS_TM *ret; |
| 136 | 136 | ||
| 137 | ret=(MS_TM *)Malloc(sizeof(MS_TM)); | 137 | ret=(MS_TM *)OPENSSL_malloc(sizeof(MS_TM)); |
| 138 | if (ret == NULL) | 138 | if (ret == NULL) |
| 139 | return(NULL); | 139 | return(NULL); |
| 140 | memset(ret,0,sizeof(MS_TM)); | 140 | memset(ret,0,sizeof(MS_TM)); |
| @@ -147,7 +147,7 @@ char *ms_time_new(void) | |||
| 147 | void ms_time_free(char *a) | 147 | void ms_time_free(char *a) |
| 148 | { | 148 | { |
| 149 | if (a != NULL) | 149 | if (a != NULL) |
| 150 | Free(a); | 150 | OPENSSL_free(a); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | void ms_time_get(char *a) | 153 | void ms_time_get(char *a) |
diff --git a/src/lib/libssl/src/crypto/txt_db/Makefile.ssl b/src/lib/libssl/src/crypto/txt_db/Makefile.ssl index a631dce6f2..cb54d53323 100644 --- a/src/lib/libssl/src/crypto/txt_db/Makefile.ssl +++ b/src/lib/libssl/src/crypto/txt_db/Makefile.ssl | |||
| @@ -83,5 +83,5 @@ txt_db.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | |||
| 83 | txt_db.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 83 | txt_db.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 84 | txt_db.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 84 | txt_db.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
| 85 | txt_db.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 85 | txt_db.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
| 86 | txt_db.o: ../../include/openssl/stack.h ../../include/openssl/txt_db.h | 86 | txt_db.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 87 | txt_db.o: ../cryptlib.h | 87 | txt_db.o: ../../include/openssl/txt_db.h ../cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/txt_db/txt_db.c b/src/lib/libssl/src/crypto/txt_db/txt_db.c index 33acc81f3f..3b04fe280c 100644 --- a/src/lib/libssl/src/crypto/txt_db/txt_db.c +++ b/src/lib/libssl/src/crypto/txt_db/txt_db.c | |||
| @@ -83,16 +83,16 @@ TXT_DB *TXT_DB_read(BIO *in, int num) | |||
| 83 | if ((buf=BUF_MEM_new()) == NULL) goto err; | 83 | if ((buf=BUF_MEM_new()) == NULL) goto err; |
| 84 | if (!BUF_MEM_grow(buf,size)) goto err; | 84 | if (!BUF_MEM_grow(buf,size)) goto err; |
| 85 | 85 | ||
| 86 | if ((ret=(TXT_DB *)Malloc(sizeof(TXT_DB))) == NULL) | 86 | if ((ret=(TXT_DB *)OPENSSL_malloc(sizeof(TXT_DB))) == NULL) |
| 87 | goto err; | 87 | goto err; |
| 88 | ret->num_fields=num; | 88 | ret->num_fields=num; |
| 89 | ret->index=NULL; | 89 | ret->index=NULL; |
| 90 | ret->qual=NULL; | 90 | ret->qual=NULL; |
| 91 | if ((ret->data=sk_new_null()) == NULL) | 91 | if ((ret->data=sk_new_null()) == NULL) |
| 92 | goto err; | 92 | goto err; |
| 93 | if ((ret->index=(LHASH **)Malloc(sizeof(LHASH *)*num)) == NULL) | 93 | if ((ret->index=(LHASH **)OPENSSL_malloc(sizeof(LHASH *)*num)) == NULL) |
| 94 | goto err; | 94 | goto err; |
| 95 | if ((ret->qual=(int (**)())Malloc(sizeof(int (**)())*num)) == NULL) | 95 | if ((ret->qual=(int (**)())OPENSSL_malloc(sizeof(int (**)())*num)) == NULL) |
| 96 | goto err; | 96 | goto err; |
| 97 | for (i=0; i<num; i++) | 97 | for (i=0; i<num; i++) |
| 98 | { | 98 | { |
| @@ -122,7 +122,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num) | |||
| 122 | else | 122 | else |
| 123 | { | 123 | { |
| 124 | buf->data[offset-1]='\0'; /* blat the '\n' */ | 124 | buf->data[offset-1]='\0'; /* blat the '\n' */ |
| 125 | p=(char *)Malloc(add+offset); | 125 | p=(char *)OPENSSL_malloc(add+offset); |
| 126 | offset=0; | 126 | offset=0; |
| 127 | } | 127 | } |
| 128 | pp=(char **)p; | 128 | pp=(char **)p; |
| @@ -177,12 +177,12 @@ err: | |||
| 177 | if (er) | 177 | if (er) |
| 178 | { | 178 | { |
| 179 | #if !defined(NO_STDIO) && !defined(WIN16) | 179 | #if !defined(NO_STDIO) && !defined(WIN16) |
| 180 | if (er == 1) fprintf(stderr,"Malloc failure\n"); | 180 | if (er == 1) fprintf(stderr,"OPENSSL_malloc failure\n"); |
| 181 | #endif | 181 | #endif |
| 182 | if (ret->data != NULL) sk_free(ret->data); | 182 | if (ret->data != NULL) sk_free(ret->data); |
| 183 | if (ret->index != NULL) Free(ret->index); | 183 | if (ret->index != NULL) OPENSSL_free(ret->index); |
| 184 | if (ret->qual != NULL) Free(ret->qual); | 184 | if (ret->qual != NULL) OPENSSL_free(ret->qual); |
| 185 | if (ret != NULL) Free(ret); | 185 | if (ret != NULL) OPENSSL_free(ret); |
| 186 | return(NULL); | 186 | return(NULL); |
| 187 | } | 187 | } |
| 188 | else | 188 | else |
| @@ -349,10 +349,10 @@ void TXT_DB_free(TXT_DB *db) | |||
| 349 | { | 349 | { |
| 350 | for (i=db->num_fields-1; i>=0; i--) | 350 | for (i=db->num_fields-1; i>=0; i--) |
| 351 | if (db->index[i] != NULL) lh_free(db->index[i]); | 351 | if (db->index[i] != NULL) lh_free(db->index[i]); |
| 352 | Free(db->index); | 352 | OPENSSL_free(db->index); |
| 353 | } | 353 | } |
| 354 | if (db->qual != NULL) | 354 | if (db->qual != NULL) |
| 355 | Free(db->qual); | 355 | OPENSSL_free(db->qual); |
| 356 | if (db->data != NULL) | 356 | if (db->data != NULL) |
| 357 | { | 357 | { |
| 358 | for (i=sk_num(db->data)-1; i>=0; i--) | 358 | for (i=sk_num(db->data)-1; i>=0; i--) |
| @@ -364,7 +364,7 @@ void TXT_DB_free(TXT_DB *db) | |||
| 364 | if (max == NULL) /* new row */ | 364 | if (max == NULL) /* new row */ |
| 365 | { | 365 | { |
| 366 | for (n=0; n<db->num_fields; n++) | 366 | for (n=0; n<db->num_fields; n++) |
| 367 | if (p[n] != NULL) Free(p[n]); | 367 | if (p[n] != NULL) OPENSSL_free(p[n]); |
| 368 | } | 368 | } |
| 369 | else | 369 | else |
| 370 | { | 370 | { |
| @@ -372,12 +372,12 @@ void TXT_DB_free(TXT_DB *db) | |||
| 372 | { | 372 | { |
| 373 | if (((p[n] < (char *)p) || (p[n] > max)) | 373 | if (((p[n] < (char *)p) || (p[n] > max)) |
| 374 | && (p[n] != NULL)) | 374 | && (p[n] != NULL)) |
| 375 | Free(p[n]); | 375 | OPENSSL_free(p[n]); |
| 376 | } | 376 | } |
| 377 | } | 377 | } |
| 378 | Free(sk_value(db->data,i)); | 378 | OPENSSL_free(sk_value(db->data,i)); |
| 379 | } | 379 | } |
| 380 | sk_free(db->data); | 380 | sk_free(db->data); |
| 381 | } | 381 | } |
| 382 | Free(db); | 382 | OPENSSL_free(db); |
| 383 | } | 383 | } |
diff --git a/src/lib/libssl/src/crypto/txt_db/txt_db.h b/src/lib/libssl/src/crypto/txt_db/txt_db.h index 58b9de1353..342533d40d 100644 --- a/src/lib/libssl/src/crypto/txt_db/txt_db.h +++ b/src/lib/libssl/src/crypto/txt_db/txt_db.h | |||
| @@ -59,10 +59,9 @@ | |||
| 59 | #ifndef HEADER_TXT_DB_H | 59 | #ifndef HEADER_TXT_DB_H |
| 60 | #define HEADER_TXT_DB_H | 60 | #define HEADER_TXT_DB_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | 62 | #ifndef NO_BIO |
| 63 | extern "C" { | 63 | #include <openssl/bio.h> |
| 64 | #endif | 64 | #endif |
| 65 | |||
| 66 | #include <openssl/stack.h> | 65 | #include <openssl/stack.h> |
| 67 | #include <openssl/lhash.h> | 66 | #include <openssl/lhash.h> |
| 68 | 67 | ||
| @@ -73,6 +72,10 @@ extern "C" { | |||
| 73 | #define DB_ERROR_NO_INDEX 4 | 72 | #define DB_ERROR_NO_INDEX 4 |
| 74 | #define DB_ERROR_INSERT_INDEX_CLASH 5 | 73 | #define DB_ERROR_INSERT_INDEX_CLASH 5 |
| 75 | 74 | ||
| 75 | #ifdef __cplusplus | ||
| 76 | extern "C" { | ||
| 77 | #endif | ||
| 78 | |||
| 76 | typedef struct txt_db_st | 79 | typedef struct txt_db_st |
| 77 | { | 80 | { |
| 78 | int num_fields; | 81 | int num_fields; |
| @@ -85,7 +88,7 @@ typedef struct txt_db_st | |||
| 85 | char **arg_row; | 88 | char **arg_row; |
| 86 | } TXT_DB; | 89 | } TXT_DB; |
| 87 | 90 | ||
| 88 | #ifdef HEADER_BIO_H | 91 | #ifndef NO_BIO |
| 89 | TXT_DB *TXT_DB_read(BIO *in, int num); | 92 | TXT_DB *TXT_DB_read(BIO *in, int num); |
| 90 | long TXT_DB_write(BIO *out, TXT_DB *db); | 93 | long TXT_DB_write(BIO *out, TXT_DB *db); |
| 91 | #else | 94 | #else |
diff --git a/src/lib/libssl/src/crypto/x509/Makefile.ssl b/src/lib/libssl/src/crypto/x509/Makefile.ssl index 48937b43af..4619693733 100644 --- a/src/lib/libssl/src/crypto/x509/Makefile.ssl +++ b/src/lib/libssl/src/crypto/x509/Makefile.ssl | |||
| @@ -96,15 +96,17 @@ by_dir.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | |||
| 96 | by_dir.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 96 | by_dir.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 97 | by_dir.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 97 | by_dir.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 98 | by_dir.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 98 | by_dir.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 99 | by_dir.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 99 | by_dir.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 100 | by_dir.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 100 | by_dir.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 101 | by_dir.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 101 | by_dir.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 102 | by_dir.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 102 | by_dir.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 103 | by_dir.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 103 | by_dir.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 104 | by_dir.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 104 | by_dir.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 105 | by_dir.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 105 | by_dir.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 106 | by_dir.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 106 | by_dir.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 107 | by_dir.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 107 | by_dir.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 108 | by_dir.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 109 | by_dir.o: ../cryptlib.h | ||
| 108 | by_file.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 110 | by_file.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 109 | by_file.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 111 | by_file.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 110 | by_file.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 112 | by_file.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -113,52 +115,60 @@ by_file.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | |||
| 113 | by_file.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 115 | by_file.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 114 | by_file.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 116 | by_file.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 115 | by_file.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 117 | by_file.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 116 | by_file.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 118 | by_file.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 117 | by_file.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 119 | by_file.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 120 | by_file.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 118 | by_file.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 121 | by_file.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 119 | by_file.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | 122 | by_file.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h |
| 120 | by_file.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 123 | by_file.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 121 | by_file.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 124 | by_file.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 122 | by_file.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 125 | by_file.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 123 | by_file.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 126 | by_file.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 124 | by_file.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 127 | by_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 125 | by_file.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 128 | by_file.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 129 | by_file.o: ../cryptlib.h | ||
| 126 | x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 130 | x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 127 | x509_att.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 131 | x509_att.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 128 | x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 132 | x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 129 | x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 133 | x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 130 | x509_att.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 134 | x509_att.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 131 | x509_att.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 135 | x509_att.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 132 | x509_att.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 136 | x509_att.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 133 | x509_att.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 137 | x509_att.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 134 | x509_att.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 138 | x509_att.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 139 | x509_att.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 135 | x509_att.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 140 | x509_att.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 136 | x509_att.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 141 | x509_att.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 142 | x509_att.o: ../../include/openssl/opensslconf.h | ||
| 137 | x509_att.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 143 | x509_att.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 138 | x509_att.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 144 | x509_att.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 139 | x509_att.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 145 | x509_att.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 140 | x509_att.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 146 | x509_att.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 141 | x509_att.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 147 | x509_att.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 142 | x509_att.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 148 | x509_att.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 143 | x509_att.o: ../../include/openssl/x509v3.h ../cryptlib.h | 149 | x509_att.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 150 | x509_att.o: ../cryptlib.h | ||
| 144 | x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 151 | x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 145 | x509_cmp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 152 | x509_cmp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 146 | x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 153 | x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 147 | x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 154 | x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 148 | x509_cmp.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 155 | x509_cmp.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 149 | x509_cmp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 156 | x509_cmp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 150 | x509_cmp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 157 | x509_cmp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 151 | x509_cmp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 158 | x509_cmp.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 152 | x509_cmp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 159 | x509_cmp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 160 | x509_cmp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 153 | x509_cmp.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 161 | x509_cmp.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 154 | x509_cmp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 162 | x509_cmp.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 163 | x509_cmp.o: ../../include/openssl/opensslconf.h | ||
| 155 | x509_cmp.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 164 | x509_cmp.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 156 | x509_cmp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 165 | x509_cmp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 157 | x509_cmp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 166 | x509_cmp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 158 | x509_cmp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 167 | x509_cmp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 159 | x509_cmp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 168 | x509_cmp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 160 | x509_cmp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 169 | x509_cmp.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 161 | x509_cmp.o: ../../include/openssl/x509v3.h ../cryptlib.h | 170 | x509_cmp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 171 | x509_cmp.o: ../cryptlib.h | ||
| 162 | x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 172 | x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 163 | x509_d2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 173 | x509_d2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 164 | x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 174 | x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -166,14 +176,16 @@ x509_d2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 166 | x509_d2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 176 | x509_d2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 167 | x509_d2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 177 | x509_d2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 168 | x509_d2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 178 | x509_d2.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 169 | x509_d2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 179 | x509_d2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 180 | x509_d2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 170 | x509_d2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 181 | x509_d2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 171 | x509_d2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 182 | x509_d2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 172 | x509_d2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 183 | x509_d2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 173 | x509_d2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 184 | x509_d2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 174 | x509_d2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 185 | x509_d2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 175 | x509_d2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 186 | x509_d2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 176 | x509_d2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 187 | x509_d2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 188 | x509_d2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 177 | x509_d2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 189 | x509_d2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 178 | x509_d2.o: ../cryptlib.h | 190 | x509_d2.o: ../cryptlib.h |
| 179 | x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 191 | x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -183,49 +195,57 @@ x509_def.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 183 | x509_def.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 195 | x509_def.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 184 | x509_def.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 196 | x509_def.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 185 | x509_def.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 197 | x509_def.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 186 | x509_def.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 198 | x509_def.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 199 | x509_def.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 187 | x509_def.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 200 | x509_def.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 188 | x509_def.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 201 | x509_def.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 202 | x509_def.o: ../../include/openssl/opensslconf.h | ||
| 189 | x509_def.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 203 | x509_def.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 190 | x509_def.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 204 | x509_def.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 191 | x509_def.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 205 | x509_def.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 192 | x509_def.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 206 | x509_def.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 193 | x509_def.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 207 | x509_def.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 194 | x509_def.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 208 | x509_def.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 195 | x509_def.o: ../cryptlib.h | 209 | x509_def.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 196 | x509_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 210 | x509_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 197 | x509_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 211 | x509_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 198 | x509_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | 212 | x509_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 199 | x509_err.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 213 | x509_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 200 | x509_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 214 | x509_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 201 | x509_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 215 | x509_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 202 | x509_err.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 216 | x509_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 203 | x509_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 217 | x509_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 218 | x509_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 219 | x509_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 204 | x509_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 220 | x509_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 205 | x509_err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 221 | x509_err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 206 | x509_err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 222 | x509_err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 207 | x509_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 223 | x509_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 208 | x509_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 224 | x509_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 209 | x509_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 225 | x509_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 210 | x509_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 226 | x509_err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 227 | x509_err.o: ../../include/openssl/x509_vfy.h | ||
| 211 | x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 228 | x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 212 | x509_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 229 | x509_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 213 | x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 230 | x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 214 | x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 231 | x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 215 | x509_ext.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 232 | x509_ext.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 216 | x509_ext.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 233 | x509_ext.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 217 | x509_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 234 | x509_ext.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 218 | x509_ext.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 235 | x509_ext.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 219 | x509_ext.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 236 | x509_ext.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 237 | x509_ext.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 220 | x509_ext.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 238 | x509_ext.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 221 | x509_ext.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 239 | x509_ext.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 240 | x509_ext.o: ../../include/openssl/opensslconf.h | ||
| 222 | x509_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 241 | x509_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 223 | x509_ext.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 242 | x509_ext.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 224 | x509_ext.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 243 | x509_ext.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 225 | x509_ext.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 244 | x509_ext.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 226 | x509_ext.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 245 | x509_ext.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 227 | x509_ext.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 246 | x509_ext.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 228 | x509_ext.o: ../../include/openssl/x509v3.h ../cryptlib.h | 247 | x509_ext.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 248 | x509_ext.o: ../cryptlib.h | ||
| 229 | x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 249 | x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 230 | x509_lu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 250 | x509_lu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 231 | x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 251 | x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -234,15 +254,17 @@ x509_lu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | |||
| 234 | x509_lu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 254 | x509_lu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 235 | x509_lu.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 255 | x509_lu.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 236 | x509_lu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 256 | x509_lu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 237 | x509_lu.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 257 | x509_lu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 238 | x509_lu.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 258 | x509_lu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 259 | x509_lu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 239 | x509_lu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 260 | x509_lu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 240 | x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 261 | x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 241 | x509_lu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 262 | x509_lu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 242 | x509_lu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 263 | x509_lu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 243 | x509_lu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 264 | x509_lu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 244 | x509_lu.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 265 | x509_lu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 245 | x509_lu.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 266 | x509_lu.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 267 | x509_lu.o: ../cryptlib.h | ||
| 246 | x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 268 | x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 247 | x509_obj.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 269 | x509_obj.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 248 | x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 270 | x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -251,16 +273,17 @@ x509_obj.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | |||
| 251 | x509_obj.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 273 | x509_obj.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 252 | x509_obj.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 274 | x509_obj.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 253 | x509_obj.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 275 | x509_obj.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 254 | x509_obj.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 276 | x509_obj.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 255 | x509_obj.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 277 | x509_obj.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 278 | x509_obj.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 256 | x509_obj.o: ../../include/openssl/opensslconf.h | 279 | x509_obj.o: ../../include/openssl/opensslconf.h |
| 257 | x509_obj.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 280 | x509_obj.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 258 | x509_obj.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 281 | x509_obj.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 259 | x509_obj.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 282 | x509_obj.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 260 | x509_obj.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 283 | x509_obj.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 261 | x509_obj.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 284 | x509_obj.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 262 | x509_obj.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 285 | x509_obj.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 263 | x509_obj.o: ../cryptlib.h | 286 | x509_obj.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 264 | x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 287 | x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 265 | x509_r2x.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 288 | x509_r2x.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 266 | x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 289 | x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -268,16 +291,18 @@ x509_r2x.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 268 | x509_r2x.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 291 | x509_r2x.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 269 | x509_r2x.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 292 | x509_r2x.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 270 | x509_r2x.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 293 | x509_r2x.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 271 | x509_r2x.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 294 | x509_r2x.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 295 | x509_r2x.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 272 | x509_r2x.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 296 | x509_r2x.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 273 | x509_r2x.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 297 | x509_r2x.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 298 | x509_r2x.o: ../../include/openssl/opensslconf.h | ||
| 274 | x509_r2x.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 299 | x509_r2x.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 275 | x509_r2x.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 300 | x509_r2x.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 276 | x509_r2x.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 301 | x509_r2x.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 277 | x509_r2x.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 302 | x509_r2x.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 278 | x509_r2x.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 303 | x509_r2x.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 279 | x509_r2x.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 304 | x509_r2x.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 280 | x509_r2x.o: ../cryptlib.h | 305 | x509_r2x.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 281 | x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 306 | x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 282 | x509_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 307 | x509_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 283 | x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 308 | x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -285,17 +310,19 @@ x509_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 285 | x509_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 310 | x509_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 286 | x509_req.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 311 | x509_req.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 287 | x509_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 312 | x509_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 288 | x509_req.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 313 | x509_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 314 | x509_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 289 | x509_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 315 | x509_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 290 | x509_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 316 | x509_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 317 | x509_req.o: ../../include/openssl/opensslconf.h | ||
| 291 | x509_req.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 318 | x509_req.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h |
| 292 | x509_req.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 319 | x509_req.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h |
| 293 | x509_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 320 | x509_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 294 | x509_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 321 | x509_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 295 | x509_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 322 | x509_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 296 | x509_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 323 | x509_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 297 | x509_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 324 | x509_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 298 | x509_req.o: ../cryptlib.h | 325 | x509_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 299 | x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 326 | x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 300 | x509_set.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 327 | x509_set.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 301 | x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 328 | x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -303,34 +330,39 @@ x509_set.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 303 | x509_set.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 330 | x509_set.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 304 | x509_set.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 331 | x509_set.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 305 | x509_set.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 332 | x509_set.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 306 | x509_set.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 333 | x509_set.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 334 | x509_set.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 307 | x509_set.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 335 | x509_set.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 308 | x509_set.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 336 | x509_set.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 337 | x509_set.o: ../../include/openssl/opensslconf.h | ||
| 309 | x509_set.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 338 | x509_set.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 310 | x509_set.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 339 | x509_set.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 311 | x509_set.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 340 | x509_set.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 312 | x509_set.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 341 | x509_set.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 313 | x509_set.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 342 | x509_set.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 314 | x509_set.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 343 | x509_set.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 315 | x509_set.o: ../cryptlib.h | 344 | x509_set.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 316 | x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 345 | x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 317 | x509_trs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 346 | x509_trs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 318 | x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 347 | x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 319 | x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 348 | x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 320 | x509_trs.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 349 | x509_trs.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 321 | x509_trs.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 350 | x509_trs.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 322 | x509_trs.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 351 | x509_trs.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 323 | x509_trs.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 352 | x509_trs.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 324 | x509_trs.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 353 | x509_trs.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 354 | x509_trs.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 325 | x509_trs.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 355 | x509_trs.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 326 | x509_trs.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 356 | x509_trs.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 357 | x509_trs.o: ../../include/openssl/opensslconf.h | ||
| 327 | x509_trs.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 358 | x509_trs.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 328 | x509_trs.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 359 | x509_trs.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 329 | x509_trs.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 360 | x509_trs.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 330 | x509_trs.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 361 | x509_trs.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 331 | x509_trs.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 362 | x509_trs.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 332 | x509_trs.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 363 | x509_trs.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 333 | x509_trs.o: ../../include/openssl/x509v3.h ../cryptlib.h | 364 | x509_trs.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 365 | x509_trs.o: ../cryptlib.h | ||
| 334 | x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 366 | x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 335 | x509_txt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 367 | x509_txt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 336 | x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 368 | x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -339,32 +371,35 @@ x509_txt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | |||
| 339 | x509_txt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 371 | x509_txt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 340 | x509_txt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 372 | x509_txt.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 341 | x509_txt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 373 | x509_txt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 342 | x509_txt.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 374 | x509_txt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h |
| 343 | x509_txt.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 375 | x509_txt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 376 | x509_txt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 344 | x509_txt.o: ../../include/openssl/opensslconf.h | 377 | x509_txt.o: ../../include/openssl/opensslconf.h |
| 345 | x509_txt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 378 | x509_txt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 346 | x509_txt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 379 | x509_txt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 347 | x509_txt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 380 | x509_txt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 348 | x509_txt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 381 | x509_txt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 349 | x509_txt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 382 | x509_txt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 350 | x509_txt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 383 | x509_txt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 351 | x509_txt.o: ../cryptlib.h | 384 | x509_txt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 352 | x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 385 | x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 353 | x509_v3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 386 | x509_v3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 354 | x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 387 | x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 355 | x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 388 | x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 356 | x509_v3.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 389 | x509_v3.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 357 | x509_v3.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 390 | x509_v3.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 358 | x509_v3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 391 | x509_v3.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 359 | x509_v3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 392 | x509_v3.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 360 | x509_v3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 393 | x509_v3.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 394 | x509_v3.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 361 | x509_v3.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 395 | x509_v3.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 362 | x509_v3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 396 | x509_v3.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 363 | x509_v3.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 397 | x509_v3.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 364 | x509_v3.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 398 | x509_v3.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 365 | x509_v3.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 399 | x509_v3.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 366 | x509_v3.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 400 | x509_v3.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 367 | x509_v3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 401 | x509_v3.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 402 | x509_v3.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 368 | x509_v3.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 403 | x509_v3.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 369 | x509_v3.o: ../../include/openssl/x509v3.h ../cryptlib.h | 404 | x509_v3.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 370 | x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 405 | x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -373,18 +408,21 @@ x509_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 373 | x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 408 | x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 374 | x509_vfy.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 409 | x509_vfy.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 375 | x509_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 410 | x509_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 376 | x509_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 411 | x509_vfy.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 377 | x509_vfy.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 412 | x509_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 378 | x509_vfy.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 413 | x509_vfy.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 414 | x509_vfy.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 379 | x509_vfy.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 415 | x509_vfy.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 380 | x509_vfy.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 416 | x509_vfy.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 417 | x509_vfy.o: ../../include/openssl/opensslconf.h | ||
| 381 | x509_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 418 | x509_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 382 | x509_vfy.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 419 | x509_vfy.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 383 | x509_vfy.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 420 | x509_vfy.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 384 | x509_vfy.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 421 | x509_vfy.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 385 | x509_vfy.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 422 | x509_vfy.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 386 | x509_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 423 | x509_vfy.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 387 | x509_vfy.o: ../../include/openssl/x509v3.h ../cryptlib.h | 424 | x509_vfy.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 425 | x509_vfy.o: ../cryptlib.h | ||
| 388 | x509name.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 426 | x509name.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 389 | x509name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 427 | x509name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 390 | x509name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 428 | x509name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -392,16 +430,18 @@ x509name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 392 | x509name.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 430 | x509name.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 393 | x509name.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 431 | x509name.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 394 | x509name.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 432 | x509name.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 395 | x509name.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 433 | x509name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 434 | x509name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 396 | x509name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 435 | x509name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 397 | x509name.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 436 | x509name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 437 | x509name.o: ../../include/openssl/opensslconf.h | ||
| 398 | x509name.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 438 | x509name.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 399 | x509name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 439 | x509name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 400 | x509name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 440 | x509name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 401 | x509name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 441 | x509name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 402 | x509name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 442 | x509name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 403 | x509name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 443 | x509name.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 404 | x509name.o: ../cryptlib.h | 444 | x509name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 405 | x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 445 | x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 406 | x509rset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 446 | x509rset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 407 | x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 447 | x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -409,16 +449,18 @@ x509rset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 409 | x509rset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 449 | x509rset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 410 | x509rset.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 450 | x509rset.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 411 | x509rset.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 451 | x509rset.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 412 | x509rset.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 452 | x509rset.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 453 | x509rset.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 413 | x509rset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 454 | x509rset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 414 | x509rset.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 455 | x509rset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 456 | x509rset.o: ../../include/openssl/opensslconf.h | ||
| 415 | x509rset.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 457 | x509rset.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 416 | x509rset.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 458 | x509rset.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 417 | x509rset.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 459 | x509rset.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 418 | x509rset.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 460 | x509rset.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 419 | x509rset.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 461 | x509rset.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 420 | x509rset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 462 | x509rset.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 421 | x509rset.o: ../cryptlib.h | 463 | x509rset.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 422 | x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 464 | x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 423 | x509spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 465 | x509spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 424 | x509spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 466 | x509spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| @@ -427,16 +469,17 @@ x509spki.o: ../../include/openssl/des.h ../../include/openssl/dh.h | |||
| 427 | x509spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 469 | x509spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 428 | x509spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 470 | x509spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 429 | x509spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 471 | x509spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 430 | x509spki.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 472 | x509spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 431 | x509spki.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 473 | x509spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 432 | x509spki.o: ../../include/openssl/opensslconf.h | 474 | x509spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 475 | x509spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 433 | x509spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 476 | x509spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 434 | x509spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 477 | x509spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 435 | x509spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 478 | x509spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 436 | x509spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 479 | x509spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 437 | x509spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 480 | x509spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 438 | x509spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 481 | x509spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 439 | x509spki.o: ../cryptlib.h | 482 | x509spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 440 | x509type.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 483 | x509type.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 441 | x509type.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 484 | x509type.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 442 | x509type.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 485 | x509type.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -444,16 +487,18 @@ x509type.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 444 | x509type.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 487 | x509type.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 445 | x509type.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 488 | x509type.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 446 | x509type.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 489 | x509type.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 447 | x509type.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 490 | x509type.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 491 | x509type.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 448 | x509type.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 492 | x509type.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 449 | x509type.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 493 | x509type.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 494 | x509type.o: ../../include/openssl/opensslconf.h | ||
| 450 | x509type.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 495 | x509type.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 451 | x509type.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 496 | x509type.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 452 | x509type.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 497 | x509type.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 453 | x509type.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 498 | x509type.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 454 | x509type.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 499 | x509type.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 455 | x509type.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 500 | x509type.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 456 | x509type.o: ../cryptlib.h | 501 | x509type.o: ../../include/openssl/x509_vfy.h ../cryptlib.h |
| 457 | x_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 502 | x_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 458 | x_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 503 | x_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 459 | x_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 504 | x_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| @@ -461,13 +506,15 @@ x_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | |||
| 461 | x_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 506 | x_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 462 | x_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 507 | x_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 463 | x_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 508 | x_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 464 | x_all.o: ../../include/openssl/idea.h ../../include/openssl/md2.h | 509 | x_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 510 | x_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 465 | x_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 511 | x_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 466 | x_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 512 | x_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 467 | x_all.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 513 | x_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 468 | x_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 514 | x_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 469 | x_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 515 | x_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 470 | x_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 516 | x_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 471 | x_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 517 | x_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 518 | x_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 472 | x_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 519 | x_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 473 | x_all.o: ../cryptlib.h | 520 | x_all.o: ../cryptlib.h |
diff --git a/src/lib/libssl/src/crypto/x509/by_dir.c b/src/lib/libssl/src/crypto/x509/by_dir.c index 14d12c56bd..cac64a6f40 100644 --- a/src/lib/libssl/src/crypto/x509/by_dir.c +++ b/src/lib/libssl/src/crypto/x509/by_dir.c | |||
| @@ -146,11 +146,11 @@ static int new_dir(X509_LOOKUP *lu) | |||
| 146 | { | 146 | { |
| 147 | BY_DIR *a; | 147 | BY_DIR *a; |
| 148 | 148 | ||
| 149 | if ((a=(BY_DIR *)Malloc(sizeof(BY_DIR))) == NULL) | 149 | if ((a=(BY_DIR *)OPENSSL_malloc(sizeof(BY_DIR))) == NULL) |
| 150 | return(0); | 150 | return(0); |
| 151 | if ((a->buffer=BUF_MEM_new()) == NULL) | 151 | if ((a->buffer=BUF_MEM_new()) == NULL) |
| 152 | { | 152 | { |
| 153 | Free(a); | 153 | OPENSSL_free(a); |
| 154 | return(0); | 154 | return(0); |
| 155 | } | 155 | } |
| 156 | a->num_dirs=0; | 156 | a->num_dirs=0; |
| @@ -168,11 +168,11 @@ static void free_dir(X509_LOOKUP *lu) | |||
| 168 | 168 | ||
| 169 | a=(BY_DIR *)lu->method_data; | 169 | a=(BY_DIR *)lu->method_data; |
| 170 | for (i=0; i<a->num_dirs; i++) | 170 | for (i=0; i<a->num_dirs; i++) |
| 171 | if (a->dirs[i] != NULL) Free(a->dirs[i]); | 171 | if (a->dirs[i] != NULL) OPENSSL_free(a->dirs[i]); |
| 172 | if (a->dirs != NULL) Free(a->dirs); | 172 | if (a->dirs != NULL) OPENSSL_free(a->dirs); |
| 173 | if (a->dirs_type != NULL) Free(a->dirs_type); | 173 | if (a->dirs_type != NULL) OPENSSL_free(a->dirs_type); |
| 174 | if (a->buffer != NULL) BUF_MEM_free(a->buffer); | 174 | if (a->buffer != NULL) BUF_MEM_free(a->buffer); |
| 175 | Free(a); | 175 | OPENSSL_free(a); |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) | 178 | static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) |
| @@ -204,9 +204,9 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) | |||
| 204 | if (ctx->num_dirs_alloced < (ctx->num_dirs+1)) | 204 | if (ctx->num_dirs_alloced < (ctx->num_dirs+1)) |
| 205 | { | 205 | { |
| 206 | ctx->num_dirs_alloced+=10; | 206 | ctx->num_dirs_alloced+=10; |
| 207 | pp=(char **)Malloc(ctx->num_dirs_alloced* | 207 | pp=(char **)OPENSSL_malloc(ctx->num_dirs_alloced* |
| 208 | sizeof(char *)); | 208 | sizeof(char *)); |
| 209 | ip=(int *)Malloc(ctx->num_dirs_alloced* | 209 | ip=(int *)OPENSSL_malloc(ctx->num_dirs_alloced* |
| 210 | sizeof(int)); | 210 | sizeof(int)); |
| 211 | if ((pp == NULL) || (ip == NULL)) | 211 | if ((pp == NULL) || (ip == NULL)) |
| 212 | { | 212 | { |
| @@ -218,14 +218,14 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) | |||
| 218 | memcpy(ip,ctx->dirs_type,(ctx->num_dirs_alloced-10)* | 218 | memcpy(ip,ctx->dirs_type,(ctx->num_dirs_alloced-10)* |
| 219 | sizeof(int)); | 219 | sizeof(int)); |
| 220 | if (ctx->dirs != NULL) | 220 | if (ctx->dirs != NULL) |
| 221 | Free(ctx->dirs); | 221 | OPENSSL_free(ctx->dirs); |
| 222 | if (ctx->dirs_type != NULL) | 222 | if (ctx->dirs_type != NULL) |
| 223 | Free(ctx->dirs_type); | 223 | OPENSSL_free(ctx->dirs_type); |
| 224 | ctx->dirs=pp; | 224 | ctx->dirs=pp; |
| 225 | ctx->dirs_type=ip; | 225 | ctx->dirs_type=ip; |
| 226 | } | 226 | } |
| 227 | ctx->dirs_type[ctx->num_dirs]=type; | 227 | ctx->dirs_type[ctx->num_dirs]=type; |
| 228 | ctx->dirs[ctx->num_dirs]=(char *)Malloc((unsigned int)len+1); | 228 | ctx->dirs[ctx->num_dirs]=(char *)OPENSSL_malloc((unsigned int)len+1); |
| 229 | if (ctx->dirs[ctx->num_dirs] == NULL) return(0); | 229 | if (ctx->dirs[ctx->num_dirs] == NULL) return(0); |
| 230 | strncpy(ctx->dirs[ctx->num_dirs],ss,(unsigned int)len); | 230 | strncpy(ctx->dirs[ctx->num_dirs],ss,(unsigned int)len); |
| 231 | ctx->dirs[ctx->num_dirs][len]='\0'; | 231 | ctx->dirs[ctx->num_dirs][len]='\0'; |
| @@ -326,7 +326,9 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, | |||
| 326 | /* we have added it to the cache so now pull | 326 | /* we have added it to the cache so now pull |
| 327 | * it out again */ | 327 | * it out again */ |
| 328 | CRYPTO_r_lock(CRYPTO_LOCK_X509_STORE); | 328 | CRYPTO_r_lock(CRYPTO_LOCK_X509_STORE); |
| 329 | tmp=(X509_OBJECT *)lh_retrieve(xl->store_ctx->certs,&stmp); | 329 | j = sk_X509_OBJECT_find(xl->store_ctx->objs,&stmp); |
| 330 | if(j != -1) tmp=sk_X509_OBJECT_value(xl->store_ctx->objs,i); | ||
| 331 | else tmp = NULL; | ||
| 330 | CRYPTO_r_unlock(CRYPTO_LOCK_X509_STORE); | 332 | CRYPTO_r_unlock(CRYPTO_LOCK_X509_STORE); |
| 331 | 333 | ||
| 332 | if (tmp != NULL) | 334 | if (tmp != NULL) |
diff --git a/src/lib/libssl/src/crypto/x509/x509.h b/src/lib/libssl/src/crypto/x509/x509.h index 0192272e7c..813c8adffd 100644 --- a/src/lib/libssl/src/crypto/x509/x509.h +++ b/src/lib/libssl/src/crypto/x509/x509.h | |||
| @@ -59,15 +59,16 @@ | |||
| 59 | #ifndef HEADER_X509_H | 59 | #ifndef HEADER_X509_H |
| 60 | #define HEADER_X509_H | 60 | #define HEADER_X509_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | 62 | #include <openssl/symhacks.h> |
| 63 | extern "C" { | 63 | #ifndef NO_BUFFER |
| 64 | #include <openssl/buffer.h> | ||
| 64 | #endif | 65 | #endif |
| 65 | 66 | #ifndef NO_EVP | |
| 66 | #ifdef VMS | 67 | #include <openssl/evp.h> |
| 67 | #undef X509_REVOKED_get_ext_by_critical | 68 | #endif |
| 68 | #define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic | 69 | #ifndef NO_BIO |
| 70 | #include <openssl/bio.h> | ||
| 69 | #endif | 71 | #endif |
| 70 | |||
| 71 | #include <openssl/stack.h> | 72 | #include <openssl/stack.h> |
| 72 | #include <openssl/asn1.h> | 73 | #include <openssl/asn1.h> |
| 73 | #include <openssl/safestack.h> | 74 | #include <openssl/safestack.h> |
| @@ -87,11 +88,19 @@ extern "C" { | |||
| 87 | #include <openssl/evp.h> | 88 | #include <openssl/evp.h> |
| 88 | 89 | ||
| 89 | 90 | ||
| 91 | #ifdef __cplusplus | ||
| 92 | extern "C" { | ||
| 93 | #endif | ||
| 94 | |||
| 90 | #ifdef WIN32 | 95 | #ifdef WIN32 |
| 91 | /* Under Win32 this is defined in wincrypt.h */ | 96 | /* Under Win32 this is defined in wincrypt.h */ |
| 92 | #undef X509_NAME | 97 | #undef X509_NAME |
| 93 | #endif | 98 | #endif |
| 94 | 99 | ||
| 100 | /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */ | ||
| 101 | #define DECLARE_PKCS12_STACK_OF(type) /* Nothing */ | ||
| 102 | #define IMPLEMENT_PKCS12_STACK_OF(type) /* Nothing */ | ||
| 103 | |||
| 95 | #define X509_FILETYPE_PEM 1 | 104 | #define X509_FILETYPE_PEM 1 |
| 96 | #define X509_FILETYPE_ASN1 2 | 105 | #define X509_FILETYPE_ASN1 2 |
| 97 | #define X509_FILETYPE_DEFAULT 3 | 106 | #define X509_FILETYPE_DEFAULT 3 |
| @@ -125,8 +134,8 @@ DECLARE_ASN1_SET_OF(X509_ALGOR) | |||
| 125 | 134 | ||
| 126 | typedef struct X509_val_st | 135 | typedef struct X509_val_st |
| 127 | { | 136 | { |
| 128 | ASN1_UTCTIME *notBefore; | 137 | ASN1_TIME *notBefore; |
| 129 | ASN1_UTCTIME *notAfter; | 138 | ASN1_TIME *notAfter; |
| 130 | } X509_VAL; | 139 | } X509_VAL; |
| 131 | 140 | ||
| 132 | typedef struct X509_pubkey_st | 141 | typedef struct X509_pubkey_st |
| @@ -158,7 +167,7 @@ typedef struct X509_name_st | |||
| 158 | { | 167 | { |
| 159 | STACK_OF(X509_NAME_ENTRY) *entries; | 168 | STACK_OF(X509_NAME_ENTRY) *entries; |
| 160 | int modified; /* true if 'bytes' needs to be built */ | 169 | int modified; /* true if 'bytes' needs to be built */ |
| 161 | #ifdef HEADER_BUFFER_H | 170 | #ifndef NO_BUFFER |
| 162 | BUF_MEM *bytes; | 171 | BUF_MEM *bytes; |
| 163 | #else | 172 | #else |
| 164 | char *bytes; | 173 | char *bytes; |
| @@ -200,6 +209,8 @@ DECLARE_ASN1_SET_OF(X509_ATTRIBUTE) | |||
| 200 | 209 | ||
| 201 | typedef struct X509_req_info_st | 210 | typedef struct X509_req_info_st |
| 202 | { | 211 | { |
| 212 | unsigned char *asn1; | ||
| 213 | int length; | ||
| 203 | ASN1_INTEGER *version; | 214 | ASN1_INTEGER *version; |
| 204 | X509_NAME *subject; | 215 | X509_NAME *subject; |
| 205 | X509_PUBKEY *pubkey; | 216 | X509_PUBKEY *pubkey; |
| @@ -260,6 +271,8 @@ typedef struct x509_st | |||
| 260 | unsigned long ex_kusage; | 271 | unsigned long ex_kusage; |
| 261 | unsigned long ex_xkusage; | 272 | unsigned long ex_xkusage; |
| 262 | unsigned long ex_nscert; | 273 | unsigned long ex_nscert; |
| 274 | ASN1_OCTET_STRING *skid; | ||
| 275 | struct AUTHORITY_KEYID_st *akid; | ||
| 263 | #ifndef NO_SHA | 276 | #ifndef NO_SHA |
| 264 | unsigned char sha1_hash[SHA_DIGEST_LENGTH]; | 277 | unsigned char sha1_hash[SHA_DIGEST_LENGTH]; |
| 265 | #endif | 278 | #endif |
| @@ -307,10 +320,65 @@ DECLARE_STACK_OF(X509_TRUST) | |||
| 307 | #define X509_TRUST_REJECTED 2 | 320 | #define X509_TRUST_REJECTED 2 |
| 308 | #define X509_TRUST_UNTRUSTED 3 | 321 | #define X509_TRUST_UNTRUSTED 3 |
| 309 | 322 | ||
| 323 | /* Flags specific to X509_NAME_print_ex() */ | ||
| 324 | |||
| 325 | /* The field separator information */ | ||
| 326 | |||
| 327 | #define XN_FLAG_SEP_MASK (0xf << 16) | ||
| 328 | |||
| 329 | #define XN_FLAG_COMPAT 0 /* Traditional SSLeay: use old X509_NAME_print */ | ||
| 330 | #define XN_FLAG_SEP_COMMA_PLUS (1 << 16) /* RFC2253 ,+ */ | ||
| 331 | #define XN_FLAG_SEP_CPLUS_SPC (2 << 16) /* ,+ spaced: more readable */ | ||
| 332 | #define XN_FLAG_SEP_SPLUS_SPC (3 << 16) /* ;+ spaced */ | ||
| 333 | #define XN_FLAG_SEP_MULTILINE (4 << 16) /* One line per field */ | ||
| 334 | |||
| 335 | #define XN_FLAG_DN_REV (1 << 20) /* Reverse DN order */ | ||
| 336 | |||
| 337 | /* How the field name is shown */ | ||
| 338 | |||
| 339 | #define XN_FLAG_FN_MASK (0x3 << 21) | ||
| 340 | |||
| 341 | #define XN_FLAG_FN_SN 0 /* Object short name */ | ||
| 342 | #define XN_FLAG_FN_LN (1 << 21) /* Object long name */ | ||
| 343 | #define XN_FLAG_FN_OID (2 << 21) /* Always use OIDs */ | ||
| 344 | #define XN_FLAG_FN_NONE (3 << 21) /* No field names */ | ||
| 345 | |||
| 346 | #define XN_FLAG_SPC_EQ (1 << 23) /* Put spaces round '=' */ | ||
| 347 | |||
| 348 | /* This determines if we dump fields we don't recognise: | ||
| 349 | * RFC2253 requires this. | ||
| 350 | */ | ||
| 351 | |||
| 352 | #define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24) | ||
| 353 | |||
| 354 | /* Complete set of RFC2253 flags */ | ||
| 355 | |||
| 356 | #define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \ | ||
| 357 | XN_FLAG_SEP_COMMA_PLUS | \ | ||
| 358 | XN_FLAG_DN_REV | \ | ||
| 359 | XN_FLAG_FN_SN | \ | ||
| 360 | XN_FLAG_DUMP_UNKNOWN_FIELDS) | ||
| 361 | |||
| 362 | /* readable oneline form */ | ||
| 363 | |||
| 364 | #define XN_FLAG_ONELINE (ASN1_STRFLGS_RFC2253 | \ | ||
| 365 | ASN1_STRFLGS_ESC_QUOTE | \ | ||
| 366 | XN_FLAG_SEP_CPLUS_SPC | \ | ||
| 367 | XN_FLAG_SPC_EQ | \ | ||
| 368 | XN_FLAG_FN_SN) | ||
| 369 | |||
| 370 | /* readable multiline form */ | ||
| 371 | |||
| 372 | #define XN_FLAG_MULTILINE (ASN1_STRFLGS_ESC_CTRL | \ | ||
| 373 | ASN1_STRFLGS_ESC_MSB | \ | ||
| 374 | XN_FLAG_SEP_MULTILINE | \ | ||
| 375 | XN_FLAG_SPC_EQ | \ | ||
| 376 | XN_FLAG_FN_LN) | ||
| 377 | |||
| 310 | typedef struct X509_revoked_st | 378 | typedef struct X509_revoked_st |
| 311 | { | 379 | { |
| 312 | ASN1_INTEGER *serialNumber; | 380 | ASN1_INTEGER *serialNumber; |
| 313 | ASN1_UTCTIME *revocationDate; | 381 | ASN1_TIME *revocationDate; |
| 314 | STACK_OF(X509_EXTENSION) /* optional */ *extensions; | 382 | STACK_OF(X509_EXTENSION) /* optional */ *extensions; |
| 315 | int sequence; /* load sequence */ | 383 | int sequence; /* load sequence */ |
| 316 | } X509_REVOKED; | 384 | } X509_REVOKED; |
| @@ -323,8 +391,8 @@ typedef struct X509_crl_info_st | |||
| 323 | ASN1_INTEGER *version; | 391 | ASN1_INTEGER *version; |
| 324 | X509_ALGOR *sig_alg; | 392 | X509_ALGOR *sig_alg; |
| 325 | X509_NAME *issuer; | 393 | X509_NAME *issuer; |
| 326 | ASN1_UTCTIME *lastUpdate; | 394 | ASN1_TIME *lastUpdate; |
| 327 | ASN1_UTCTIME *nextUpdate; | 395 | ASN1_TIME *nextUpdate; |
| 328 | STACK_OF(X509_REVOKED) *revoked; | 396 | STACK_OF(X509_REVOKED) *revoked; |
| 329 | STACK_OF(X509_EXTENSION) /* [0] */ *extensions; | 397 | STACK_OF(X509_EXTENSION) /* [0] */ *extensions; |
| 330 | } X509_CRL_INFO; | 398 | } X509_CRL_INFO; |
| @@ -362,7 +430,7 @@ typedef struct private_key_st | |||
| 362 | int references; | 430 | int references; |
| 363 | } X509_PKEY; | 431 | } X509_PKEY; |
| 364 | 432 | ||
| 365 | #ifdef HEADER_ENVELOPE_H | 433 | #ifndef NO_EVP |
| 366 | typedef struct X509_info_st | 434 | typedef struct X509_info_st |
| 367 | { | 435 | { |
| 368 | X509 *x509; | 436 | X509 *x509; |
| @@ -445,9 +513,17 @@ typedef struct pkcs8_priv_key_info_st | |||
| 445 | STACK_OF(X509_ATTRIBUTE) *attributes; | 513 | STACK_OF(X509_ATTRIBUTE) *attributes; |
| 446 | } PKCS8_PRIV_KEY_INFO; | 514 | } PKCS8_PRIV_KEY_INFO; |
| 447 | 515 | ||
| 516 | #ifdef __cplusplus | ||
| 517 | } | ||
| 518 | #endif | ||
| 519 | |||
| 448 | #include <openssl/x509_vfy.h> | 520 | #include <openssl/x509_vfy.h> |
| 449 | #include <openssl/pkcs7.h> | 521 | #include <openssl/pkcs7.h> |
| 450 | 522 | ||
| 523 | #ifdef __cplusplus | ||
| 524 | extern "C" { | ||
| 525 | #endif | ||
| 526 | |||
| 451 | #ifdef SSLEAY_MACROS | 527 | #ifdef SSLEAY_MACROS |
| 452 | #define X509_verify(a,r) ASN1_verify((int (*)())i2d_X509_CINF,a->sig_alg,\ | 528 | #define X509_verify(a,r) ASN1_verify((int (*)())i2d_X509_CINF,a->sig_alg,\ |
| 453 | a->signature,(char *)a->cert_info,r) | 529 | a->signature,(char *)a->cert_info,r) |
| @@ -610,7 +686,7 @@ typedef struct pkcs8_priv_key_info_st | |||
| 610 | const char *X509_verify_cert_error_string(long n); | 686 | const char *X509_verify_cert_error_string(long n); |
| 611 | 687 | ||
| 612 | #ifndef SSLEAY_MACROS | 688 | #ifndef SSLEAY_MACROS |
| 613 | #ifdef HEADER_ENVELOPE_H | 689 | #ifndef NO_EVP |
| 614 | int X509_verify(X509 *a, EVP_PKEY *r); | 690 | int X509_verify(X509 *a, EVP_PKEY *r); |
| 615 | 691 | ||
| 616 | int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); | 692 | int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); |
| @@ -629,9 +705,14 @@ int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md); | |||
| 629 | int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); | 705 | int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); |
| 630 | int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); | 706 | int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); |
| 631 | 707 | ||
| 632 | int X509_digest(X509 *data,const EVP_MD *type,unsigned char *md,unsigned int *len); | 708 | int X509_digest(const X509 *data,const EVP_MD *type, |
| 633 | int X509_NAME_digest(X509_NAME *data,const EVP_MD *type, | 709 | unsigned char *md, unsigned int *len); |
| 634 | unsigned char *md,unsigned int *len); | 710 | int X509_CRL_digest(const X509_CRL *data,const EVP_MD *type, |
| 711 | unsigned char *md, unsigned int *len); | ||
| 712 | int X509_REQ_digest(const X509_REQ *data,const EVP_MD *type, | ||
| 713 | unsigned char *md, unsigned int *len); | ||
| 714 | int X509_NAME_digest(const X509_NAME *data,const EVP_MD *type, | ||
| 715 | unsigned char *md, unsigned int *len); | ||
| 635 | #endif | 716 | #endif |
| 636 | 717 | ||
| 637 | #ifndef NO_FP_API | 718 | #ifndef NO_FP_API |
| @@ -663,9 +744,11 @@ int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,PKCS8_PRIV_KEY_INFO *p8inf); | |||
| 663 | int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key); | 744 | int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key); |
| 664 | int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey); | 745 | int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey); |
| 665 | EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a); | 746 | EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a); |
| 747 | int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey); | ||
| 748 | EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); | ||
| 666 | #endif | 749 | #endif |
| 667 | 750 | ||
| 668 | #ifdef HEADER_BIO_H | 751 | #ifndef NO_BIO |
| 669 | X509 *d2i_X509_bio(BIO *bp,X509 **x509); | 752 | X509 *d2i_X509_bio(BIO *bp,X509 **x509); |
| 670 | int i2d_X509_bio(BIO *bp,X509 *x509); | 753 | int i2d_X509_bio(BIO *bp,X509 *x509); |
| 671 | X509_CRL *d2i_X509_CRL_bio(BIO *bp,X509_CRL **crl); | 754 | X509_CRL *d2i_X509_CRL_bio(BIO *bp,X509_CRL **crl); |
| @@ -694,6 +777,8 @@ int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,PKCS8_PRIV_KEY_INFO *p8inf); | |||
| 694 | int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key); | 777 | int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key); |
| 695 | int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey); | 778 | int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey); |
| 696 | EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); | 779 | EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); |
| 780 | int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey); | ||
| 781 | EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a); | ||
| 697 | #endif | 782 | #endif |
| 698 | 783 | ||
| 699 | X509 *X509_dup(X509 *x509); | 784 | X509 *X509_dup(X509 *x509); |
| @@ -711,8 +796,10 @@ RSA *RSAPrivateKey_dup(RSA *rsa); | |||
| 711 | 796 | ||
| 712 | #endif /* !SSLEAY_MACROS */ | 797 | #endif /* !SSLEAY_MACROS */ |
| 713 | 798 | ||
| 714 | int X509_cmp_current_time(ASN1_UTCTIME *s); | 799 | int X509_cmp_time(ASN1_TIME *s, time_t *t); |
| 715 | ASN1_UTCTIME * X509_gmtime_adj(ASN1_UTCTIME *s, long adj); | 800 | int X509_cmp_current_time(ASN1_TIME *s); |
| 801 | ASN1_TIME * X509_time_adj(ASN1_TIME *s, long adj, time_t *t); | ||
| 802 | ASN1_TIME * X509_gmtime_adj(ASN1_TIME *s, long adj); | ||
| 716 | 803 | ||
| 717 | const char * X509_get_default_cert_area(void ); | 804 | const char * X509_get_default_cert_area(void ); |
| 718 | const char * X509_get_default_cert_dir(void ); | 805 | const char * X509_get_default_cert_dir(void ); |
| @@ -825,6 +912,7 @@ int i2d_X509_CERT_AUX(X509_CERT_AUX *a,unsigned char **pp); | |||
| 825 | X509_CERT_AUX * d2i_X509_CERT_AUX(X509_CERT_AUX **a,unsigned char **pp, | 912 | X509_CERT_AUX * d2i_X509_CERT_AUX(X509_CERT_AUX **a,unsigned char **pp, |
| 826 | long length); | 913 | long length); |
| 827 | int X509_alias_set1(X509 *x, unsigned char *name, int len); | 914 | int X509_alias_set1(X509 *x, unsigned char *name, int len); |
| 915 | int X509_keyid_set1(X509 *x, unsigned char *id, int len); | ||
| 828 | unsigned char * X509_alias_get0(X509 *x, int *len); | 916 | unsigned char * X509_alias_get0(X509 *x, int *len); |
| 829 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); | 917 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); |
| 830 | int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); | 918 | int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); |
| @@ -871,7 +959,7 @@ NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void); | |||
| 871 | NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, unsigned char **pp, long length); | 959 | NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, unsigned char **pp, long length); |
| 872 | void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a); | 960 | void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a); |
| 873 | 961 | ||
| 874 | #ifdef HEADER_ENVELOPE_H | 962 | #ifndef NO_EVP |
| 875 | X509_INFO * X509_INFO_new(void); | 963 | X509_INFO * X509_INFO_new(void); |
| 876 | void X509_INFO_free(X509_INFO *a); | 964 | void X509_INFO_free(X509_INFO *a); |
| 877 | char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); | 965 | char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); |
| @@ -894,8 +982,8 @@ int X509_set_issuer_name(X509 *x, X509_NAME *name); | |||
| 894 | X509_NAME * X509_get_issuer_name(X509 *a); | 982 | X509_NAME * X509_get_issuer_name(X509 *a); |
| 895 | int X509_set_subject_name(X509 *x, X509_NAME *name); | 983 | int X509_set_subject_name(X509 *x, X509_NAME *name); |
| 896 | X509_NAME * X509_get_subject_name(X509 *a); | 984 | X509_NAME * X509_get_subject_name(X509 *a); |
| 897 | int X509_set_notBefore(X509 *x, ASN1_UTCTIME *tm); | 985 | int X509_set_notBefore(X509 *x, ASN1_TIME *tm); |
| 898 | int X509_set_notAfter(X509 *x, ASN1_UTCTIME *tm); | 986 | int X509_set_notAfter(X509 *x, ASN1_TIME *tm); |
| 899 | int X509_set_pubkey(X509 *x, EVP_PKEY *pkey); | 987 | int X509_set_pubkey(X509 *x, EVP_PKEY *pkey); |
| 900 | EVP_PKEY * X509_get_pubkey(X509 *x); | 988 | EVP_PKEY * X509_get_pubkey(X509 *x); |
| 901 | int X509_certificate_type(X509 *x,EVP_PKEY *pubkey /* optional */); | 989 | int X509_certificate_type(X509 *x,EVP_PKEY *pubkey /* optional */); |
| @@ -931,28 +1019,30 @@ int X509_REQ_add1_attr_by_txt(X509_REQ *req, | |||
| 931 | 1019 | ||
| 932 | int X509_check_private_key(X509 *x509,EVP_PKEY *pkey); | 1020 | int X509_check_private_key(X509 *x509,EVP_PKEY *pkey); |
| 933 | 1021 | ||
| 934 | int X509_issuer_and_serial_cmp(X509 *a, X509 *b); | 1022 | int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b); |
| 935 | unsigned long X509_issuer_and_serial_hash(X509 *a); | 1023 | unsigned long X509_issuer_and_serial_hash(X509 *a); |
| 936 | 1024 | ||
| 937 | int X509_issuer_name_cmp(X509 *a, X509 *b); | 1025 | int X509_issuer_name_cmp(const X509 *a, const X509 *b); |
| 938 | unsigned long X509_issuer_name_hash(X509 *a); | 1026 | unsigned long X509_issuer_name_hash(X509 *a); |
| 939 | 1027 | ||
| 940 | int X509_subject_name_cmp(X509 *a,X509 *b); | 1028 | int X509_subject_name_cmp(const X509 *a, const X509 *b); |
| 941 | unsigned long X509_subject_name_hash(X509 *x); | 1029 | unsigned long X509_subject_name_hash(X509 *x); |
| 942 | 1030 | ||
| 943 | int X509_cmp (X509 *a, X509 *b); | 1031 | int X509_cmp(const X509 *a, const X509 *b); |
| 944 | int X509_NAME_cmp (X509_NAME *a, X509_NAME *b); | 1032 | int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b); |
| 945 | unsigned long X509_NAME_hash(X509_NAME *x); | 1033 | unsigned long X509_NAME_hash(X509_NAME *x); |
| 946 | 1034 | ||
| 947 | int X509_CRL_cmp(X509_CRL *a,X509_CRL *b); | 1035 | int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b); |
| 948 | #ifndef NO_FP_API | 1036 | #ifndef NO_FP_API |
| 949 | int X509_print_fp(FILE *bp,X509 *x); | 1037 | int X509_print_fp(FILE *bp,X509 *x); |
| 950 | int X509_CRL_print_fp(FILE *bp,X509_CRL *x); | 1038 | int X509_CRL_print_fp(FILE *bp,X509_CRL *x); |
| 951 | int X509_REQ_print_fp(FILE *bp,X509_REQ *req); | 1039 | int X509_REQ_print_fp(FILE *bp,X509_REQ *req); |
| 1040 | int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags); | ||
| 952 | #endif | 1041 | #endif |
| 953 | 1042 | ||
| 954 | #ifdef HEADER_BIO_H | 1043 | #ifndef NO_BIO |
| 955 | int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); | 1044 | int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); |
| 1045 | int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags); | ||
| 956 | int X509_print(BIO *bp,X509 *x); | 1046 | int X509_print(BIO *bp,X509 *x); |
| 957 | int X509_CERT_AUX_print(BIO *bp,X509_CERT_AUX *x, int indent); | 1047 | int X509_CERT_AUX_print(BIO *bp,X509_CERT_AUX *x, int indent); |
| 958 | int X509_CRL_print(BIO *bp,X509_CRL *x); | 1048 | int X509_CRL_print(BIO *bp,X509_CRL *x); |
diff --git a/src/lib/libssl/src/crypto/x509/x509_cmp.c b/src/lib/libssl/src/crypto/x509/x509_cmp.c index a8a5ca8b03..b147d573d2 100644 --- a/src/lib/libssl/src/crypto/x509/x509_cmp.c +++ b/src/lib/libssl/src/crypto/x509/x509_cmp.c | |||
| @@ -63,7 +63,7 @@ | |||
| 63 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
| 64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
| 65 | 65 | ||
| 66 | int X509_issuer_and_serial_cmp(X509 *a, X509 *b) | 66 | int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b) |
| 67 | { | 67 | { |
| 68 | int i; | 68 | int i; |
| 69 | X509_CINF *ai,*bi; | 69 | X509_CINF *ai,*bi; |
| @@ -97,17 +97,17 @@ unsigned long X509_issuer_and_serial_hash(X509 *a) | |||
| 97 | } | 97 | } |
| 98 | #endif | 98 | #endif |
| 99 | 99 | ||
| 100 | int X509_issuer_name_cmp(X509 *a, X509 *b) | 100 | int X509_issuer_name_cmp(const X509 *a, const X509 *b) |
| 101 | { | 101 | { |
| 102 | return(X509_NAME_cmp(a->cert_info->issuer,b->cert_info->issuer)); | 102 | return(X509_NAME_cmp(a->cert_info->issuer,b->cert_info->issuer)); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | int X509_subject_name_cmp(X509 *a, X509 *b) | 105 | int X509_subject_name_cmp(const X509 *a, const X509 *b) |
| 106 | { | 106 | { |
| 107 | return(X509_NAME_cmp(a->cert_info->subject,b->cert_info->subject)); | 107 | return(X509_NAME_cmp(a->cert_info->subject,b->cert_info->subject)); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | int X509_CRL_cmp(X509_CRL *a, X509_CRL *b) | 110 | int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b) |
| 111 | { | 111 | { |
| 112 | return(X509_NAME_cmp(a->crl->issuer,b->crl->issuer)); | 112 | return(X509_NAME_cmp(a->crl->issuer,b->crl->issuer)); |
| 113 | } | 113 | } |
| @@ -139,19 +139,25 @@ unsigned long X509_subject_name_hash(X509 *x) | |||
| 139 | 139 | ||
| 140 | #ifndef NO_SHA | 140 | #ifndef NO_SHA |
| 141 | /* Compare two certificates: they must be identical for | 141 | /* Compare two certificates: they must be identical for |
| 142 | * this to work. | 142 | * this to work. NB: Although "cmp" operations are generally |
| 143 | * prototyped to take "const" arguments (eg. for use in | ||
| 144 | * STACKs), the way X509 handling is - these operations may | ||
| 145 | * involve ensuring the hashes are up-to-date and ensuring | ||
| 146 | * certain cert information is cached. So this is the point | ||
| 147 | * where the "depth-first" constification tree has to halt | ||
| 148 | * with an evil cast. | ||
| 143 | */ | 149 | */ |
| 144 | int X509_cmp(X509 *a, X509 *b) | 150 | int X509_cmp(const X509 *a, const X509 *b) |
| 145 | { | 151 | { |
| 146 | /* ensure hash is valid */ | 152 | /* ensure hash is valid */ |
| 147 | X509_check_purpose(a, -1, 0); | 153 | X509_check_purpose((X509 *)a, -1, 0); |
| 148 | X509_check_purpose(b, -1, 0); | 154 | X509_check_purpose((X509 *)b, -1, 0); |
| 149 | 155 | ||
| 150 | return memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH); | 156 | return memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH); |
| 151 | } | 157 | } |
| 152 | #endif | 158 | #endif |
| 153 | 159 | ||
| 154 | int X509_NAME_cmp(X509_NAME *a, X509_NAME *b) | 160 | int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b) |
| 155 | { | 161 | { |
| 156 | int i,j; | 162 | int i,j; |
| 157 | X509_NAME_ENTRY *na,*nb; | 163 | X509_NAME_ENTRY *na,*nb; |
| @@ -198,14 +204,14 @@ unsigned long X509_NAME_hash(X509_NAME *x) | |||
| 198 | 204 | ||
| 199 | i=i2d_X509_NAME(x,NULL); | 205 | i=i2d_X509_NAME(x,NULL); |
| 200 | if (i > sizeof(str)) | 206 | if (i > sizeof(str)) |
| 201 | p=Malloc(i); | 207 | p=OPENSSL_malloc(i); |
| 202 | else | 208 | else |
| 203 | p=str; | 209 | p=str; |
| 204 | 210 | ||
| 205 | pp=p; | 211 | pp=p; |
| 206 | i2d_X509_NAME(x,&pp); | 212 | i2d_X509_NAME(x,&pp); |
| 207 | MD5((unsigned char *)p,i,&(md[0])); | 213 | MD5((unsigned char *)p,i,&(md[0])); |
| 208 | if (p != str) Free(p); | 214 | if (p != str) OPENSSL_free(p); |
| 209 | 215 | ||
| 210 | ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| | 216 | ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| |
| 211 | ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) | 217 | ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) |
diff --git a/src/lib/libssl/src/crypto/x509/x509_lu.c b/src/lib/libssl/src/crypto/x509/x509_lu.c index a20006d67e..863c738cad 100644 --- a/src/lib/libssl/src/crypto/x509/x509_lu.c +++ b/src/lib/libssl/src/crypto/x509/x509_lu.c | |||
| @@ -62,14 +62,13 @@ | |||
| 62 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
| 63 | 63 | ||
| 64 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_meth=NULL; | 64 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_meth=NULL; |
| 65 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_ctx_meth=NULL; | ||
| 66 | 65 | ||
| 67 | X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) | 66 | X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) |
| 68 | { | 67 | { |
| 69 | X509_LOOKUP *ret; | 68 | X509_LOOKUP *ret; |
| 70 | 69 | ||
| 71 | ret=(X509_LOOKUP *)Malloc(sizeof(X509_LOOKUP)); | 70 | ret=(X509_LOOKUP *)OPENSSL_malloc(sizeof(X509_LOOKUP)); |
| 72 | if (ret == NULL) return(NULL); | 71 | if (ret == NULL) return NULL; |
| 73 | 72 | ||
| 74 | ret->init=0; | 73 | ret->init=0; |
| 75 | ret->skip=0; | 74 | ret->skip=0; |
| @@ -78,10 +77,10 @@ X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) | |||
| 78 | ret->store_ctx=NULL; | 77 | ret->store_ctx=NULL; |
| 79 | if ((method->new_item != NULL) && !method->new_item(ret)) | 78 | if ((method->new_item != NULL) && !method->new_item(ret)) |
| 80 | { | 79 | { |
| 81 | Free(ret); | 80 | OPENSSL_free(ret); |
| 82 | return(NULL); | 81 | return NULL; |
| 83 | } | 82 | } |
| 84 | return(ret); | 83 | return ret; |
| 85 | } | 84 | } |
| 86 | 85 | ||
| 87 | void X509_LOOKUP_free(X509_LOOKUP *ctx) | 86 | void X509_LOOKUP_free(X509_LOOKUP *ctx) |
| @@ -90,44 +89,44 @@ void X509_LOOKUP_free(X509_LOOKUP *ctx) | |||
| 90 | if ( (ctx->method != NULL) && | 89 | if ( (ctx->method != NULL) && |
| 91 | (ctx->method->free != NULL)) | 90 | (ctx->method->free != NULL)) |
| 92 | ctx->method->free(ctx); | 91 | ctx->method->free(ctx); |
| 93 | Free(ctx); | 92 | OPENSSL_free(ctx); |
| 94 | } | 93 | } |
| 95 | 94 | ||
| 96 | int X509_LOOKUP_init(X509_LOOKUP *ctx) | 95 | int X509_LOOKUP_init(X509_LOOKUP *ctx) |
| 97 | { | 96 | { |
| 98 | if (ctx->method == NULL) return(0); | 97 | if (ctx->method == NULL) return 0; |
| 99 | if (ctx->method->init != NULL) | 98 | if (ctx->method->init != NULL) |
| 100 | return(ctx->method->init(ctx)); | 99 | return ctx->method->init(ctx); |
| 101 | else | 100 | else |
| 102 | return(1); | 101 | return 1; |
| 103 | } | 102 | } |
| 104 | 103 | ||
| 105 | int X509_LOOKUP_shutdown(X509_LOOKUP *ctx) | 104 | int X509_LOOKUP_shutdown(X509_LOOKUP *ctx) |
| 106 | { | 105 | { |
| 107 | if (ctx->method == NULL) return(0); | 106 | if (ctx->method == NULL) return 0; |
| 108 | if (ctx->method->shutdown != NULL) | 107 | if (ctx->method->shutdown != NULL) |
| 109 | return(ctx->method->shutdown(ctx)); | 108 | return ctx->method->shutdown(ctx); |
| 110 | else | 109 | else |
| 111 | return(1); | 110 | return 1; |
| 112 | } | 111 | } |
| 113 | 112 | ||
| 114 | int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, | 113 | int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, |
| 115 | char **ret) | 114 | char **ret) |
| 116 | { | 115 | { |
| 117 | if (ctx->method == NULL) return(-1); | 116 | if (ctx->method == NULL) return -1; |
| 118 | if (ctx->method->ctrl != NULL) | 117 | if (ctx->method->ctrl != NULL) |
| 119 | return(ctx->method->ctrl(ctx,cmd,argc,argl,ret)); | 118 | return ctx->method->ctrl(ctx,cmd,argc,argl,ret); |
| 120 | else | 119 | else |
| 121 | return(1); | 120 | return 1; |
| 122 | } | 121 | } |
| 123 | 122 | ||
| 124 | int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name, | 123 | int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name, |
| 125 | X509_OBJECT *ret) | 124 | X509_OBJECT *ret) |
| 126 | { | 125 | { |
| 127 | if ((ctx->method == NULL) || (ctx->method->get_by_subject == NULL)) | 126 | if ((ctx->method == NULL) || (ctx->method->get_by_subject == NULL)) |
| 128 | return(X509_LU_FAIL); | 127 | return X509_LU_FAIL; |
| 129 | if (ctx->skip) return(0); | 128 | if (ctx->skip) return 0; |
| 130 | return(ctx->method->get_by_subject(ctx,type,name,ret)); | 129 | return ctx->method->get_by_subject(ctx,type,name,ret); |
| 131 | } | 130 | } |
| 132 | 131 | ||
| 133 | int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, | 132 | int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, |
| @@ -135,71 +134,55 @@ int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, | |||
| 135 | { | 134 | { |
| 136 | if ((ctx->method == NULL) || | 135 | if ((ctx->method == NULL) || |
| 137 | (ctx->method->get_by_issuer_serial == NULL)) | 136 | (ctx->method->get_by_issuer_serial == NULL)) |
| 138 | return(X509_LU_FAIL); | 137 | return X509_LU_FAIL; |
| 139 | return(ctx->method->get_by_issuer_serial(ctx,type,name,serial,ret)); | 138 | return ctx->method->get_by_issuer_serial(ctx,type,name,serial,ret); |
| 140 | } | 139 | } |
| 141 | 140 | ||
| 142 | int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, | 141 | int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, |
| 143 | unsigned char *bytes, int len, X509_OBJECT *ret) | 142 | unsigned char *bytes, int len, X509_OBJECT *ret) |
| 144 | { | 143 | { |
| 145 | if ((ctx->method == NULL) || (ctx->method->get_by_fingerprint == NULL)) | 144 | if ((ctx->method == NULL) || (ctx->method->get_by_fingerprint == NULL)) |
| 146 | return(X509_LU_FAIL); | 145 | return X509_LU_FAIL; |
| 147 | return(ctx->method->get_by_fingerprint(ctx,type,bytes,len,ret)); | 146 | return ctx->method->get_by_fingerprint(ctx,type,bytes,len,ret); |
| 148 | } | 147 | } |
| 149 | 148 | ||
| 150 | int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len, | 149 | int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len, |
| 151 | X509_OBJECT *ret) | 150 | X509_OBJECT *ret) |
| 152 | { | 151 | { |
| 153 | if ((ctx->method == NULL) || (ctx->method->get_by_alias == NULL)) | 152 | if ((ctx->method == NULL) || (ctx->method->get_by_alias == NULL)) |
| 154 | return(X509_LU_FAIL); | 153 | return X509_LU_FAIL; |
| 155 | return(ctx->method->get_by_alias(ctx,type,str,len,ret)); | 154 | return ctx->method->get_by_alias(ctx,type,str,len,ret); |
| 156 | } | 155 | } |
| 157 | 156 | ||
| 158 | static unsigned long x509_object_hash(X509_OBJECT *a) | 157 | |
| 159 | { | 158 | static int x509_object_cmp(const X509_OBJECT * const *a, const X509_OBJECT * const *b) |
| 160 | unsigned long h; | 159 | { |
| 161 | 160 | int ret; | |
| 162 | switch (a->type) | 161 | |
| 163 | { | 162 | ret=((*a)->type - (*b)->type); |
| 164 | case X509_LU_X509: | 163 | if (ret) return ret; |
| 165 | h=X509_NAME_hash(a->data.x509->cert_info->subject); | 164 | switch ((*a)->type) |
| 166 | break; | 165 | { |
| 167 | case X509_LU_CRL: | 166 | case X509_LU_X509: |
| 168 | h=X509_NAME_hash(a->data.crl->crl->issuer); | 167 | ret=X509_subject_name_cmp((*a)->data.x509,(*b)->data.x509); |
| 169 | break; | 168 | break; |
| 170 | default: | 169 | case X509_LU_CRL: |
| 171 | abort(); | 170 | ret=X509_CRL_cmp((*a)->data.crl,(*b)->data.crl); |
| 172 | } | 171 | break; |
| 173 | return(h); | ||
| 174 | } | ||
| 175 | |||
| 176 | static int x509_object_cmp(X509_OBJECT *a, X509_OBJECT *b) | ||
| 177 | { | ||
| 178 | int ret; | ||
| 179 | |||
| 180 | ret=(a->type - b->type); | ||
| 181 | if (ret) return(ret); | ||
| 182 | switch (a->type) | ||
| 183 | { | ||
| 184 | case X509_LU_X509: | ||
| 185 | ret=X509_subject_name_cmp(a->data.x509,b->data.x509); | ||
| 186 | break; | ||
| 187 | case X509_LU_CRL: | ||
| 188 | ret=X509_CRL_cmp(a->data.crl,b->data.crl); | ||
| 189 | break; | ||
| 190 | default: | 172 | default: |
| 191 | abort(); | 173 | /* abort(); */ |
| 174 | return 0; | ||
| 192 | } | 175 | } |
| 193 | return(ret); | 176 | return ret; |
| 194 | } | 177 | } |
| 195 | 178 | ||
| 196 | X509_STORE *X509_STORE_new(void) | 179 | X509_STORE *X509_STORE_new(void) |
| 197 | { | 180 | { |
| 198 | X509_STORE *ret; | 181 | X509_STORE *ret; |
| 199 | 182 | ||
| 200 | if ((ret=(X509_STORE *)Malloc(sizeof(X509_STORE))) == NULL) | 183 | if ((ret=(X509_STORE *)OPENSSL_malloc(sizeof(X509_STORE))) == NULL) |
| 201 | return(NULL); | 184 | return NULL; |
| 202 | ret->certs=lh_new(x509_object_hash,x509_object_cmp); | 185 | ret->objs = sk_X509_OBJECT_new(x509_object_cmp); |
| 203 | ret->cache=1; | 186 | ret->cache=1; |
| 204 | ret->get_cert_methods=sk_X509_LOOKUP_new_null(); | 187 | ret->get_cert_methods=sk_X509_LOOKUP_new_null(); |
| 205 | ret->verify=NULL; | 188 | ret->verify=NULL; |
| @@ -207,7 +190,7 @@ X509_STORE *X509_STORE_new(void) | |||
| 207 | memset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA)); | 190 | memset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA)); |
| 208 | ret->references=1; | 191 | ret->references=1; |
| 209 | ret->depth=0; | 192 | ret->depth=0; |
| 210 | return(ret); | 193 | return ret; |
| 211 | } | 194 | } |
| 212 | 195 | ||
| 213 | static void cleanup(X509_OBJECT *a) | 196 | static void cleanup(X509_OBJECT *a) |
| @@ -221,9 +204,11 @@ static void cleanup(X509_OBJECT *a) | |||
| 221 | X509_CRL_free(a->data.crl); | 204 | X509_CRL_free(a->data.crl); |
| 222 | } | 205 | } |
| 223 | else | 206 | else |
| 224 | abort(); | 207 | { |
| 208 | /* abort(); */ | ||
| 209 | } | ||
| 225 | 210 | ||
| 226 | Free(a); | 211 | OPENSSL_free(a); |
| 227 | } | 212 | } |
| 228 | 213 | ||
| 229 | void X509_STORE_free(X509_STORE *vfy) | 214 | void X509_STORE_free(X509_STORE *vfy) |
| @@ -232,7 +217,7 @@ void X509_STORE_free(X509_STORE *vfy) | |||
| 232 | STACK_OF(X509_LOOKUP) *sk; | 217 | STACK_OF(X509_LOOKUP) *sk; |
| 233 | X509_LOOKUP *lu; | 218 | X509_LOOKUP *lu; |
| 234 | 219 | ||
| 235 | if(vfy == NULL) | 220 | if (vfy == NULL) |
| 236 | return; | 221 | return; |
| 237 | 222 | ||
| 238 | sk=vfy->get_cert_methods; | 223 | sk=vfy->get_cert_methods; |
| @@ -243,11 +228,10 @@ void X509_STORE_free(X509_STORE *vfy) | |||
| 243 | X509_LOOKUP_free(lu); | 228 | X509_LOOKUP_free(lu); |
| 244 | } | 229 | } |
| 245 | sk_X509_LOOKUP_free(sk); | 230 | sk_X509_LOOKUP_free(sk); |
| 231 | sk_X509_OBJECT_pop_free(vfy->objs, cleanup); | ||
| 246 | 232 | ||
| 247 | CRYPTO_free_ex_data(x509_store_meth,vfy,&vfy->ex_data); | 233 | CRYPTO_free_ex_data(x509_store_meth,vfy,&vfy->ex_data); |
| 248 | lh_doall(vfy->certs,cleanup); | 234 | OPENSSL_free(vfy); |
| 249 | lh_free(vfy->certs); | ||
| 250 | Free(vfy); | ||
| 251 | } | 235 | } |
| 252 | 236 | ||
| 253 | X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m) | 237 | X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m) |
| @@ -262,22 +246,22 @@ X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m) | |||
| 262 | lu=sk_X509_LOOKUP_value(sk,i); | 246 | lu=sk_X509_LOOKUP_value(sk,i); |
| 263 | if (m == lu->method) | 247 | if (m == lu->method) |
| 264 | { | 248 | { |
| 265 | return(lu); | 249 | return lu; |
| 266 | } | 250 | } |
| 267 | } | 251 | } |
| 268 | /* a new one */ | 252 | /* a new one */ |
| 269 | lu=X509_LOOKUP_new(m); | 253 | lu=X509_LOOKUP_new(m); |
| 270 | if (lu == NULL) | 254 | if (lu == NULL) |
| 271 | return(NULL); | 255 | return NULL; |
| 272 | else | 256 | else |
| 273 | { | 257 | { |
| 274 | lu->store_ctx=v; | 258 | lu->store_ctx=v; |
| 275 | if (sk_X509_LOOKUP_push(v->get_cert_methods,lu)) | 259 | if (sk_X509_LOOKUP_push(v->get_cert_methods,lu)) |
| 276 | return(lu); | 260 | return lu; |
| 277 | else | 261 | else |
| 278 | { | 262 | { |
| 279 | X509_LOOKUP_free(lu); | 263 | X509_LOOKUP_free(lu); |
| 280 | return(NULL); | 264 | return NULL; |
| 281 | } | 265 | } |
| 282 | } | 266 | } |
| 283 | } | 267 | } |
| @@ -290,7 +274,7 @@ int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name, | |||
| 290 | X509_OBJECT stmp,*tmp; | 274 | X509_OBJECT stmp,*tmp; |
| 291 | int i,j; | 275 | int i,j; |
| 292 | 276 | ||
| 293 | tmp=X509_OBJECT_retrieve_by_subject(ctx->certs,type,name); | 277 | tmp=X509_OBJECT_retrieve_by_subject(ctx->objs,type,name); |
| 294 | 278 | ||
| 295 | if (tmp == NULL) | 279 | if (tmp == NULL) |
| 296 | { | 280 | { |
| @@ -301,7 +285,7 @@ int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name, | |||
| 301 | if (j < 0) | 285 | if (j < 0) |
| 302 | { | 286 | { |
| 303 | vs->current_method=j; | 287 | vs->current_method=j; |
| 304 | return(j); | 288 | return j; |
| 305 | } | 289 | } |
| 306 | else if (j) | 290 | else if (j) |
| 307 | { | 291 | { |
| @@ -311,7 +295,7 @@ int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name, | |||
| 311 | } | 295 | } |
| 312 | vs->current_method=0; | 296 | vs->current_method=0; |
| 313 | if (tmp == NULL) | 297 | if (tmp == NULL) |
| 314 | return(0); | 298 | return 0; |
| 315 | } | 299 | } |
| 316 | 300 | ||
| 317 | /* if (ret->data.ptr != NULL) | 301 | /* if (ret->data.ptr != NULL) |
| @@ -322,7 +306,74 @@ int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name, | |||
| 322 | 306 | ||
| 323 | X509_OBJECT_up_ref_count(ret); | 307 | X509_OBJECT_up_ref_count(ret); |
| 324 | 308 | ||
| 325 | return(1); | 309 | return 1; |
| 310 | } | ||
| 311 | |||
| 312 | int X509_STORE_add_cert(X509_STORE *ctx, X509 *x) | ||
| 313 | { | ||
| 314 | X509_OBJECT *obj; | ||
| 315 | int ret=1; | ||
| 316 | |||
| 317 | if (x == NULL) return 0; | ||
| 318 | obj=(X509_OBJECT *)OPENSSL_malloc(sizeof(X509_OBJECT)); | ||
| 319 | if (obj == NULL) | ||
| 320 | { | ||
| 321 | X509err(X509_F_X509_STORE_ADD_CERT,ERR_R_MALLOC_FAILURE); | ||
| 322 | return 0; | ||
| 323 | } | ||
| 324 | obj->type=X509_LU_X509; | ||
| 325 | obj->data.x509=x; | ||
| 326 | |||
| 327 | CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); | ||
| 328 | |||
| 329 | X509_OBJECT_up_ref_count(obj); | ||
| 330 | |||
| 331 | |||
| 332 | if (X509_OBJECT_retrieve_match(ctx->objs, obj)) | ||
| 333 | { | ||
| 334 | X509_OBJECT_free_contents(obj); | ||
| 335 | OPENSSL_free(obj); | ||
| 336 | X509err(X509_F_X509_STORE_ADD_CERT,X509_R_CERT_ALREADY_IN_HASH_TABLE); | ||
| 337 | ret=0; | ||
| 338 | } | ||
| 339 | else sk_X509_OBJECT_push(ctx->objs, obj); | ||
| 340 | |||
| 341 | CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); | ||
| 342 | |||
| 343 | return ret; | ||
| 344 | } | ||
| 345 | |||
| 346 | int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x) | ||
| 347 | { | ||
| 348 | X509_OBJECT *obj; | ||
| 349 | int ret=1; | ||
| 350 | |||
| 351 | if (x == NULL) return 0; | ||
| 352 | obj=(X509_OBJECT *)OPENSSL_malloc(sizeof(X509_OBJECT)); | ||
| 353 | if (obj == NULL) | ||
| 354 | { | ||
| 355 | X509err(X509_F_X509_STORE_ADD_CRL,ERR_R_MALLOC_FAILURE); | ||
| 356 | return 0; | ||
| 357 | } | ||
| 358 | obj->type=X509_LU_CRL; | ||
| 359 | obj->data.crl=x; | ||
| 360 | |||
| 361 | CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); | ||
| 362 | |||
| 363 | X509_OBJECT_up_ref_count(obj); | ||
| 364 | |||
| 365 | if (X509_OBJECT_retrieve_match(ctx->objs, obj)) | ||
| 366 | { | ||
| 367 | X509_OBJECT_free_contents(obj); | ||
| 368 | OPENSSL_free(obj); | ||
| 369 | X509err(X509_F_X509_STORE_ADD_CRL,X509_R_CERT_ALREADY_IN_HASH_TABLE); | ||
| 370 | ret=0; | ||
| 371 | } | ||
| 372 | else sk_X509_OBJECT_push(ctx->objs, obj); | ||
| 373 | |||
| 374 | CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); | ||
| 375 | |||
| 376 | return ret; | ||
| 326 | } | 377 | } |
| 327 | 378 | ||
| 328 | void X509_OBJECT_up_ref_count(X509_OBJECT *a) | 379 | void X509_OBJECT_up_ref_count(X509_OBJECT *a) |
| @@ -351,10 +402,10 @@ void X509_OBJECT_free_contents(X509_OBJECT *a) | |||
| 351 | } | 402 | } |
| 352 | } | 403 | } |
| 353 | 404 | ||
| 354 | X509_OBJECT *X509_OBJECT_retrieve_by_subject(LHASH *h, int type, | 405 | int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, |
| 355 | X509_NAME *name) | 406 | X509_NAME *name) |
| 356 | { | 407 | { |
| 357 | X509_OBJECT stmp,*tmp; | 408 | X509_OBJECT stmp; |
| 358 | X509 x509_s; | 409 | X509 x509_s; |
| 359 | X509_CINF cinf_s; | 410 | X509_CINF cinf_s; |
| 360 | X509_CRL crl_s; | 411 | X509_CRL crl_s; |
| @@ -374,54 +425,105 @@ X509_OBJECT *X509_OBJECT_retrieve_by_subject(LHASH *h, int type, | |||
| 374 | crl_info_s.issuer=name; | 425 | crl_info_s.issuer=name; |
| 375 | break; | 426 | break; |
| 376 | default: | 427 | default: |
| 377 | abort(); | 428 | /* abort(); */ |
| 429 | return -1; | ||
| 378 | } | 430 | } |
| 379 | 431 | ||
| 380 | tmp=(X509_OBJECT *)lh_retrieve(h,&stmp); | 432 | return sk_X509_OBJECT_find(h,&stmp); |
| 381 | return(tmp); | ||
| 382 | } | 433 | } |
| 383 | 434 | ||
| 384 | X509_STORE_CTX *X509_STORE_CTX_new(void) | 435 | X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h, int type, |
| 436 | X509_NAME *name) | ||
| 385 | { | 437 | { |
| 386 | X509_STORE_CTX *ctx; | 438 | int idx; |
| 387 | ctx = (X509_STORE_CTX *)Malloc(sizeof(X509_STORE_CTX)); | 439 | idx = X509_OBJECT_idx_by_subject(h, type, name); |
| 388 | if(ctx) memset(ctx, 0, sizeof(X509_STORE_CTX)); | 440 | if (idx==-1) return NULL; |
| 389 | return ctx; | 441 | return sk_X509_OBJECT_value(h, idx); |
| 390 | } | 442 | } |
| 391 | 443 | ||
| 392 | void X509_STORE_CTX_free(X509_STORE_CTX *ctx) | 444 | X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x) |
| 393 | { | 445 | { |
| 394 | X509_STORE_CTX_cleanup(ctx); | 446 | int idx, i; |
| 395 | Free(ctx); | 447 | X509_OBJECT *obj; |
| 448 | idx = sk_X509_OBJECT_find(h, x); | ||
| 449 | if (idx == -1) return NULL; | ||
| 450 | if (x->type != X509_LU_X509) return sk_X509_OBJECT_value(h, idx); | ||
| 451 | for (i = idx; i < sk_X509_OBJECT_num(h); i++) | ||
| 452 | { | ||
| 453 | obj = sk_X509_OBJECT_value(h, i); | ||
| 454 | if (x509_object_cmp((const X509_OBJECT **)&obj, (const X509_OBJECT **)&x)) | ||
| 455 | return NULL; | ||
| 456 | if ((x->type != X509_LU_X509) || !X509_cmp(obj->data.x509, x->data.x509)) | ||
| 457 | return obj; | ||
| 458 | } | ||
| 459 | return NULL; | ||
| 396 | } | 460 | } |
| 397 | 461 | ||
| 398 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | ||
| 399 | STACK_OF(X509) *chain) | ||
| 400 | { | ||
| 401 | ctx->ctx=store; | ||
| 402 | ctx->current_method=0; | ||
| 403 | ctx->cert=x509; | ||
| 404 | ctx->untrusted=chain; | ||
| 405 | ctx->last_untrusted=0; | ||
| 406 | ctx->purpose=0; | ||
| 407 | ctx->trust=0; | ||
| 408 | ctx->valid=0; | ||
| 409 | ctx->chain=NULL; | ||
| 410 | ctx->depth=9; | ||
| 411 | ctx->error=0; | ||
| 412 | ctx->current_cert=NULL; | ||
| 413 | memset(&(ctx->ex_data),0,sizeof(CRYPTO_EX_DATA)); | ||
| 414 | } | ||
| 415 | 462 | ||
| 416 | void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) | 463 | /* Try to get issuer certificate from store. Due to limitations |
| 417 | { | 464 | * of the API this can only retrieve a single certificate matching |
| 418 | if (ctx->chain != NULL) | 465 | * a given subject name. However it will fill the cache with all |
| 466 | * matching certificates, so we can examine the cache for all | ||
| 467 | * matches. | ||
| 468 | * | ||
| 469 | * Return values are: | ||
| 470 | * 1 lookup successful. | ||
| 471 | * 0 certificate not found. | ||
| 472 | * -1 some other error. | ||
| 473 | */ | ||
| 474 | |||
| 475 | |||
| 476 | int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) | ||
| 477 | { | ||
| 478 | X509_NAME *xn; | ||
| 479 | X509_OBJECT obj, *pobj; | ||
| 480 | int i, ok, idx; | ||
| 481 | xn=X509_get_issuer_name(x); | ||
| 482 | ok=X509_STORE_get_by_subject(ctx,X509_LU_X509,xn,&obj); | ||
| 483 | if (ok != X509_LU_X509) | ||
| 484 | { | ||
| 485 | if (ok == X509_LU_RETRY) | ||
| 486 | { | ||
| 487 | X509_OBJECT_free_contents(&obj); | ||
| 488 | X509err(X509_F_X509_VERIFY_CERT,X509_R_SHOULD_RETRY); | ||
| 489 | return -1; | ||
| 490 | } | ||
| 491 | else if (ok != X509_LU_FAIL) | ||
| 492 | { | ||
| 493 | X509_OBJECT_free_contents(&obj); | ||
| 494 | /* not good :-(, break anyway */ | ||
| 495 | return -1; | ||
| 496 | } | ||
| 497 | return 0; | ||
| 498 | } | ||
| 499 | /* If certificate matches all OK */ | ||
| 500 | if (ctx->check_issued(ctx, x, obj.data.x509)) | ||
| 419 | { | 501 | { |
| 420 | sk_X509_pop_free(ctx->chain,X509_free); | 502 | *issuer = obj.data.x509; |
| 421 | ctx->chain=NULL; | 503 | return 1; |
| 422 | } | 504 | } |
| 423 | CRYPTO_free_ex_data(x509_store_ctx_meth,ctx,&(ctx->ex_data)); | 505 | X509_OBJECT_free_contents(&obj); |
| 424 | memset(&ctx->ex_data,0,sizeof(CRYPTO_EX_DATA)); | 506 | /* Else find index of first matching cert */ |
| 425 | } | 507 | idx = X509_OBJECT_idx_by_subject(ctx->ctx->objs, X509_LU_X509, xn); |
| 508 | /* This shouldn't normally happen since we already have one match */ | ||
| 509 | if (idx == -1) return 0; | ||
| 510 | |||
| 511 | /* Look through all matching certificates for a suitable issuer */ | ||
| 512 | for (i = idx; i < sk_X509_OBJECT_num(ctx->ctx->objs); i++) | ||
| 513 | { | ||
| 514 | pobj = sk_X509_OBJECT_value(ctx->ctx->objs, i); | ||
| 515 | /* See if we've ran out of matches */ | ||
| 516 | if (pobj->type != X509_LU_X509) return 0; | ||
| 517 | if (X509_NAME_cmp(xn, X509_get_subject_name(pobj->data.x509))) return 0; | ||
| 518 | if (ctx->check_issued(ctx, x, pobj->data.x509)) | ||
| 519 | { | ||
| 520 | *issuer = pobj->data.x509; | ||
| 521 | X509_OBJECT_up_ref_count(pobj); | ||
| 522 | return 1; | ||
| 523 | } | ||
| 524 | } | ||
| 525 | return 0; | ||
| 526 | } | ||
| 426 | 527 | ||
| 427 | IMPLEMENT_STACK_OF(X509_LOOKUP) | 528 | IMPLEMENT_STACK_OF(X509_LOOKUP) |
| 529 | IMPLEMENT_STACK_OF(X509_OBJECT) | ||
diff --git a/src/lib/libssl/src/crypto/x509/x509_obj.c b/src/lib/libssl/src/crypto/x509/x509_obj.c index 691b71f031..6a3ba8eb15 100644 --- a/src/lib/libssl/src/crypto/x509/x509_obj.c +++ b/src/lib/libssl/src/crypto/x509/x509_obj.c | |||
| @@ -91,7 +91,7 @@ int i; | |||
| 91 | if(b) | 91 | if(b) |
| 92 | { | 92 | { |
| 93 | buf=b->data; | 93 | buf=b->data; |
| 94 | Free(b); | 94 | OPENSSL_free(b); |
| 95 | } | 95 | } |
| 96 | strncpy(buf,"NO X509_NAME",len); | 96 | strncpy(buf,"NO X509_NAME",len); |
| 97 | return buf; | 97 | return buf; |
| @@ -210,7 +210,7 @@ int i; | |||
| 210 | if (b != NULL) | 210 | if (b != NULL) |
| 211 | { | 211 | { |
| 212 | p=b->data; | 212 | p=b->data; |
| 213 | Free(b); | 213 | OPENSSL_free(b); |
| 214 | } | 214 | } |
| 215 | else | 215 | else |
| 216 | p=buf; | 216 | p=buf; |
diff --git a/src/lib/libssl/src/crypto/x509/x509_req.c b/src/lib/libssl/src/crypto/x509/x509_req.c index baef8790eb..7eca1bd57a 100644 --- a/src/lib/libssl/src/crypto/x509/x509_req.c +++ b/src/lib/libssl/src/crypto/x509/x509_req.c | |||
| @@ -83,7 +83,7 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md) | |||
| 83 | ri=ret->req_info; | 83 | ri=ret->req_info; |
| 84 | 84 | ||
| 85 | ri->version->length=1; | 85 | ri->version->length=1; |
| 86 | ri->version->data=(unsigned char *)Malloc(1); | 86 | ri->version->data=(unsigned char *)OPENSSL_malloc(1); |
| 87 | if (ri->version->data == NULL) goto err; | 87 | if (ri->version->data == NULL) goto err; |
| 88 | ri->version->data[0]=0; /* version == 0 */ | 88 | ri->version->data[0]=0; /* version == 0 */ |
| 89 | 89 | ||
| @@ -188,7 +188,7 @@ int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts, | |||
| 188 | /* Generate encoding of extensions */ | 188 | /* Generate encoding of extensions */ |
| 189 | len = i2d_ASN1_SET_OF_X509_EXTENSION(exts, NULL, i2d_X509_EXTENSION, | 189 | len = i2d_ASN1_SET_OF_X509_EXTENSION(exts, NULL, i2d_X509_EXTENSION, |
| 190 | V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, IS_SEQUENCE); | 190 | V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, IS_SEQUENCE); |
| 191 | if(!(p = Malloc(len))) goto err; | 191 | if(!(p = OPENSSL_malloc(len))) goto err; |
| 192 | q = p; | 192 | q = p; |
| 193 | i2d_ASN1_SET_OF_X509_EXTENSION(exts, &q, i2d_X509_EXTENSION, | 193 | i2d_ASN1_SET_OF_X509_EXTENSION(exts, &q, i2d_X509_EXTENSION, |
| 194 | V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, IS_SEQUENCE); | 194 | V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, IS_SEQUENCE); |
| @@ -204,7 +204,7 @@ int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts, | |||
| 204 | if(!sk_X509_ATTRIBUTE_push(req->req_info->attributes, attr)) goto err; | 204 | if(!sk_X509_ATTRIBUTE_push(req->req_info->attributes, attr)) goto err; |
| 205 | return 1; | 205 | return 1; |
| 206 | err: | 206 | err: |
| 207 | if(p) Free(p); | 207 | if(p) OPENSSL_free(p); |
| 208 | X509_ATTRIBUTE_free(attr); | 208 | X509_ATTRIBUTE_free(attr); |
| 209 | ASN1_TYPE_free(at); | 209 | ASN1_TYPE_free(at); |
| 210 | return 0; | 210 | return 0; |
diff --git a/src/lib/libssl/src/crypto/x509/x509_set.c b/src/lib/libssl/src/crypto/x509/x509_set.c index add842d17a..aaf61ca062 100644 --- a/src/lib/libssl/src/crypto/x509/x509_set.c +++ b/src/lib/libssl/src/crypto/x509/x509_set.c | |||
| @@ -104,36 +104,36 @@ int X509_set_subject_name(X509 *x, X509_NAME *name) | |||
| 104 | return(X509_NAME_set(&x->cert_info->subject,name)); | 104 | return(X509_NAME_set(&x->cert_info->subject,name)); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | int X509_set_notBefore(X509 *x, ASN1_UTCTIME *tm) | 107 | int X509_set_notBefore(X509 *x, ASN1_TIME *tm) |
| 108 | { | 108 | { |
| 109 | ASN1_UTCTIME *in; | 109 | ASN1_TIME *in; |
| 110 | 110 | ||
| 111 | if ((x == NULL) || (x->cert_info->validity == NULL)) return(0); | 111 | if ((x == NULL) || (x->cert_info->validity == NULL)) return(0); |
| 112 | in=x->cert_info->validity->notBefore; | 112 | in=x->cert_info->validity->notBefore; |
| 113 | if (in != tm) | 113 | if (in != tm) |
| 114 | { | 114 | { |
| 115 | in=M_ASN1_UTCTIME_dup(tm); | 115 | in=M_ASN1_TIME_dup(tm); |
| 116 | if (in != NULL) | 116 | if (in != NULL) |
| 117 | { | 117 | { |
| 118 | M_ASN1_UTCTIME_free(x->cert_info->validity->notBefore); | 118 | M_ASN1_TIME_free(x->cert_info->validity->notBefore); |
| 119 | x->cert_info->validity->notBefore=in; | 119 | x->cert_info->validity->notBefore=in; |
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | return(in != NULL); | 122 | return(in != NULL); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | int X509_set_notAfter(X509 *x, ASN1_UTCTIME *tm) | 125 | int X509_set_notAfter(X509 *x, ASN1_TIME *tm) |
| 126 | { | 126 | { |
| 127 | ASN1_UTCTIME *in; | 127 | ASN1_TIME *in; |
| 128 | 128 | ||
| 129 | if ((x == NULL) || (x->cert_info->validity == NULL)) return(0); | 129 | if ((x == NULL) || (x->cert_info->validity == NULL)) return(0); |
| 130 | in=x->cert_info->validity->notAfter; | 130 | in=x->cert_info->validity->notAfter; |
| 131 | if (in != tm) | 131 | if (in != tm) |
| 132 | { | 132 | { |
| 133 | in=M_ASN1_UTCTIME_dup(tm); | 133 | in=M_ASN1_TIME_dup(tm); |
| 134 | if (in != NULL) | 134 | if (in != NULL) |
| 135 | { | 135 | { |
| 136 | M_ASN1_UTCTIME_free(x->cert_info->validity->notAfter); | 136 | M_ASN1_TIME_free(x->cert_info->validity->notAfter); |
| 137 | x->cert_info->validity->notAfter=in; | 137 | x->cert_info->validity->notAfter=in; |
| 138 | } | 138 | } |
| 139 | } | 139 | } |
diff --git a/src/lib/libssl/src/crypto/x509/x509_trs.c b/src/lib/libssl/src/crypto/x509/x509_trs.c index c779aaf94d..a7b1543461 100644 --- a/src/lib/libssl/src/crypto/x509/x509_trs.c +++ b/src/lib/libssl/src/crypto/x509/x509_trs.c | |||
| @@ -61,7 +61,8 @@ | |||
| 61 | #include <openssl/x509v3.h> | 61 | #include <openssl/x509v3.h> |
| 62 | 62 | ||
| 63 | 63 | ||
| 64 | static int tr_cmp(X509_TRUST **a, X509_TRUST **b); | 64 | static int tr_cmp(const X509_TRUST * const *a, |
| 65 | const X509_TRUST * const *b); | ||
| 65 | static void trtable_free(X509_TRUST *p); | 66 | static void trtable_free(X509_TRUST *p); |
| 66 | 67 | ||
| 67 | static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags); | 68 | static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags); |
| @@ -88,7 +89,8 @@ IMPLEMENT_STACK_OF(X509_TRUST) | |||
| 88 | 89 | ||
| 89 | static STACK_OF(X509_TRUST) *trtable = NULL; | 90 | static STACK_OF(X509_TRUST) *trtable = NULL; |
| 90 | 91 | ||
| 91 | static int tr_cmp(X509_TRUST **a, X509_TRUST **b) | 92 | static int tr_cmp(const X509_TRUST * const *a, |
| 93 | const X509_TRUST * const *b) | ||
| 92 | { | 94 | { |
| 93 | return (*a)->trust - (*b)->trust; | 95 | return (*a)->trust - (*b)->trust; |
| 94 | } | 96 | } |
| @@ -152,15 +154,15 @@ int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), | |||
| 152 | idx = X509_TRUST_get_by_id(id); | 154 | idx = X509_TRUST_get_by_id(id); |
| 153 | /* Need a new entry */ | 155 | /* Need a new entry */ |
| 154 | if(idx == -1) { | 156 | if(idx == -1) { |
| 155 | if(!(trtmp = Malloc(sizeof(X509_TRUST)))) { | 157 | if(!(trtmp = OPENSSL_malloc(sizeof(X509_TRUST)))) { |
| 156 | X509err(X509_F_X509_TRUST_ADD,ERR_R_MALLOC_FAILURE); | 158 | X509err(X509_F_X509_TRUST_ADD,ERR_R_MALLOC_FAILURE); |
| 157 | return 0; | 159 | return 0; |
| 158 | } | 160 | } |
| 159 | trtmp->flags = X509_TRUST_DYNAMIC; | 161 | trtmp->flags = X509_TRUST_DYNAMIC; |
| 160 | } else trtmp = X509_TRUST_get0(idx); | 162 | } else trtmp = X509_TRUST_get0(idx); |
| 161 | 163 | ||
| 162 | /* Free existing name if dynamic */ | 164 | /* OPENSSL_free existing name if dynamic */ |
| 163 | if(trtmp->flags & X509_TRUST_DYNAMIC_NAME) Free(trtmp->name); | 165 | if(trtmp->flags & X509_TRUST_DYNAMIC_NAME) OPENSSL_free(trtmp->name); |
| 164 | /* dup supplied name */ | 166 | /* dup supplied name */ |
| 165 | if(!(trtmp->name = BUF_strdup(name))) { | 167 | if(!(trtmp->name = BUF_strdup(name))) { |
| 166 | X509err(X509_F_X509_TRUST_ADD,ERR_R_MALLOC_FAILURE); | 168 | X509err(X509_F_X509_TRUST_ADD,ERR_R_MALLOC_FAILURE); |
| @@ -196,8 +198,8 @@ static void trtable_free(X509_TRUST *p) | |||
| 196 | if (p->flags & X509_TRUST_DYNAMIC) | 198 | if (p->flags & X509_TRUST_DYNAMIC) |
| 197 | { | 199 | { |
| 198 | if (p->flags & X509_TRUST_DYNAMIC_NAME) | 200 | if (p->flags & X509_TRUST_DYNAMIC_NAME) |
| 199 | Free(p->name); | 201 | OPENSSL_free(p->name); |
| 200 | Free(p); | 202 | OPENSSL_free(p); |
| 201 | } | 203 | } |
| 202 | } | 204 | } |
| 203 | 205 | ||
diff --git a/src/lib/libssl/src/crypto/x509/x509_txt.c b/src/lib/libssl/src/crypto/x509/x509_txt.c index 209cf53191..cfb478d4bc 100644 --- a/src/lib/libssl/src/crypto/x509/x509_txt.c +++ b/src/lib/libssl/src/crypto/x509/x509_txt.c | |||
| @@ -132,6 +132,15 @@ const char *X509_verify_cert_error_string(long n) | |||
| 132 | return ("certificate rejected"); | 132 | return ("certificate rejected"); |
| 133 | case X509_V_ERR_APPLICATION_VERIFICATION: | 133 | case X509_V_ERR_APPLICATION_VERIFICATION: |
| 134 | return("application verification failure"); | 134 | return("application verification failure"); |
| 135 | case X509_V_ERR_SUBJECT_ISSUER_MISMATCH: | ||
| 136 | return("subject issuer mismatch"); | ||
| 137 | case X509_V_ERR_AKID_SKID_MISMATCH: | ||
| 138 | return("authority and subject key identifier mismatch"); | ||
| 139 | case X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: | ||
| 140 | return("authority and issuer serial number mismatch"); | ||
| 141 | case X509_V_ERR_KEYUSAGE_NO_CERTSIGN: | ||
| 142 | return("key usage does not include certificate signing"); | ||
| 143 | |||
| 135 | default: | 144 | default: |
| 136 | sprintf(buf,"error number %ld",n); | 145 | sprintf(buf,"error number %ld",n); |
| 137 | return(buf); | 146 | return(buf); |
diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.c b/src/lib/libssl/src/crypto/x509/x509_vfy.c index 3ddb2303d3..0f4110cc64 100644 --- a/src/lib/libssl/src/crypto/x509/x509_vfy.c +++ b/src/lib/libssl/src/crypto/x509/x509_vfy.c | |||
| @@ -71,6 +71,8 @@ | |||
| 71 | #include <openssl/objects.h> | 71 | #include <openssl/objects.h> |
| 72 | 72 | ||
| 73 | static int null_callback(int ok,X509_STORE_CTX *e); | 73 | static int null_callback(int ok,X509_STORE_CTX *e); |
| 74 | static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); | ||
| 75 | static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x); | ||
| 74 | static int check_chain_purpose(X509_STORE_CTX *ctx); | 76 | static int check_chain_purpose(X509_STORE_CTX *ctx); |
| 75 | static int check_trust(X509_STORE_CTX *ctx); | 77 | static int check_trust(X509_STORE_CTX *ctx); |
| 76 | static int internal_verify(X509_STORE_CTX *ctx); | 78 | static int internal_verify(X509_STORE_CTX *ctx); |
| @@ -85,13 +87,13 @@ static STACK *x509_store_method=NULL; | |||
| 85 | 87 | ||
| 86 | static int null_callback(int ok, X509_STORE_CTX *e) | 88 | static int null_callback(int ok, X509_STORE_CTX *e) |
| 87 | { | 89 | { |
| 88 | return(ok); | 90 | return ok; |
| 89 | } | 91 | } |
| 90 | 92 | ||
| 91 | #if 0 | 93 | #if 0 |
| 92 | static int x509_subject_cmp(X509 **a, X509 **b) | 94 | static int x509_subject_cmp(X509 **a, X509 **b) |
| 93 | { | 95 | { |
| 94 | return(X509_subject_name_cmp(*a,*b)); | 96 | return X509_subject_name_cmp(*a,*b); |
| 95 | } | 97 | } |
| 96 | #endif | 98 | #endif |
| 97 | 99 | ||
| @@ -99,7 +101,6 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 99 | { | 101 | { |
| 100 | X509 *x,*xtmp,*chain_ss=NULL; | 102 | X509 *x,*xtmp,*chain_ss=NULL; |
| 101 | X509_NAME *xn; | 103 | X509_NAME *xn; |
| 102 | X509_OBJECT obj; | ||
| 103 | int depth,i,ok=0; | 104 | int depth,i,ok=0; |
| 104 | int num; | 105 | int num; |
| 105 | int (*cb)(); | 106 | int (*cb)(); |
| @@ -108,10 +109,10 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 108 | if (ctx->cert == NULL) | 109 | if (ctx->cert == NULL) |
| 109 | { | 110 | { |
| 110 | X509err(X509_F_X509_VERIFY_CERT,X509_R_NO_CERT_SET_FOR_US_TO_VERIFY); | 111 | X509err(X509_F_X509_VERIFY_CERT,X509_R_NO_CERT_SET_FOR_US_TO_VERIFY); |
| 111 | return(-1); | 112 | return -1; |
| 112 | } | 113 | } |
| 113 | 114 | ||
| 114 | cb=ctx->ctx->verify_cb; | 115 | cb=ctx->verify_cb; |
| 115 | if (cb == NULL) cb=null_callback; | 116 | if (cb == NULL) cb=null_callback; |
| 116 | 117 | ||
| 117 | /* first we make sure the chain we are going to build is | 118 | /* first we make sure the chain we are going to build is |
| @@ -152,13 +153,12 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 152 | 153 | ||
| 153 | /* If we are self signed, we break */ | 154 | /* If we are self signed, we break */ |
| 154 | xn=X509_get_issuer_name(x); | 155 | xn=X509_get_issuer_name(x); |
| 155 | if (X509_NAME_cmp(X509_get_subject_name(x),xn) == 0) | 156 | if (ctx->check_issued(ctx, x,x)) break; |
| 156 | break; | ||
| 157 | 157 | ||
| 158 | /* If we were passed a cert chain, use it first */ | 158 | /* If we were passed a cert chain, use it first */ |
| 159 | if (ctx->untrusted != NULL) | 159 | if (ctx->untrusted != NULL) |
| 160 | { | 160 | { |
| 161 | xtmp=X509_find_by_subject(sktmp,xn); | 161 | xtmp=find_issuer(ctx, sktmp,x); |
| 162 | if (xtmp != NULL) | 162 | if (xtmp != NULL) |
| 163 | { | 163 | { |
| 164 | if (!sk_X509_push(ctx->chain,xtmp)) | 164 | if (!sk_X509_push(ctx->chain,xtmp)) |
| @@ -183,11 +183,14 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 183 | * certificates. We now need to add at least one trusted one, | 183 | * certificates. We now need to add at least one trusted one, |
| 184 | * if possible, otherwise we complain. */ | 184 | * if possible, otherwise we complain. */ |
| 185 | 185 | ||
| 186 | /* Examine last certificate in chain and see if it | ||
| 187 | * is self signed. | ||
| 188 | */ | ||
| 189 | |||
| 186 | i=sk_X509_num(ctx->chain); | 190 | i=sk_X509_num(ctx->chain); |
| 187 | x=sk_X509_value(ctx->chain,i-1); | 191 | x=sk_X509_value(ctx->chain,i-1); |
| 188 | xn = X509_get_subject_name(x); | 192 | xn = X509_get_subject_name(x); |
| 189 | if (X509_NAME_cmp(xn,X509_get_issuer_name(x)) | 193 | if (ctx->check_issued(ctx, x, x)) |
| 190 | == 0) | ||
| 191 | { | 194 | { |
| 192 | /* we have a self signed certificate */ | 195 | /* we have a self signed certificate */ |
| 193 | if (sk_X509_num(ctx->chain) == 1) | 196 | if (sk_X509_num(ctx->chain) == 1) |
| @@ -196,13 +199,13 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 196 | * we can find it in the store. We must have an exact | 199 | * we can find it in the store. We must have an exact |
| 197 | * match to avoid possible impersonation. | 200 | * match to avoid possible impersonation. |
| 198 | */ | 201 | */ |
| 199 | ok=X509_STORE_get_by_subject(ctx,X509_LU_X509,xn,&obj); | 202 | ok = ctx->get_issuer(&xtmp, ctx, x); |
| 200 | if ((ok != X509_LU_X509) || X509_cmp(x, obj.data.x509)) | 203 | if ((ok <= 0) || X509_cmp(x, xtmp)) |
| 201 | { | 204 | { |
| 202 | ctx->error=X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT; | 205 | ctx->error=X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT; |
| 203 | ctx->current_cert=x; | 206 | ctx->current_cert=x; |
| 204 | ctx->error_depth=i-1; | 207 | ctx->error_depth=i-1; |
| 205 | if(ok == X509_LU_X509) X509_OBJECT_free_contents(&obj); | 208 | if (ok == 1) X509_free(xtmp); |
| 206 | ok=cb(0,ctx); | 209 | ok=cb(0,ctx); |
| 207 | if (!ok) goto end; | 210 | if (!ok) goto end; |
| 208 | } | 211 | } |
| @@ -212,14 +215,14 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 212 | * so we get any trust settings. | 215 | * so we get any trust settings. |
| 213 | */ | 216 | */ |
| 214 | X509_free(x); | 217 | X509_free(x); |
| 215 | x = obj.data.x509; | 218 | x = xtmp; |
| 216 | sk_X509_set(ctx->chain, i - 1, x); | 219 | sk_X509_set(ctx->chain, i - 1, x); |
| 217 | ctx->last_untrusted=0; | 220 | ctx->last_untrusted=0; |
| 218 | } | 221 | } |
| 219 | } | 222 | } |
| 220 | else | 223 | else |
| 221 | { | 224 | { |
| 222 | /* worry more about this one elsewhere */ | 225 | /* extract and save self signed certificate for later use */ |
| 223 | chain_ss=sk_X509_pop(ctx->chain); | 226 | chain_ss=sk_X509_pop(ctx->chain); |
| 224 | ctx->last_untrusted--; | 227 | ctx->last_untrusted--; |
| 225 | num--; | 228 | num--; |
| @@ -235,41 +238,30 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 235 | 238 | ||
| 236 | /* If we are self signed, we break */ | 239 | /* If we are self signed, we break */ |
| 237 | xn=X509_get_issuer_name(x); | 240 | xn=X509_get_issuer_name(x); |
| 238 | if (X509_NAME_cmp(X509_get_subject_name(x),xn) == 0) | 241 | if (ctx->check_issued(ctx,x,x)) break; |
| 239 | break; | ||
| 240 | 242 | ||
| 241 | ok=X509_STORE_get_by_subject(ctx,X509_LU_X509,xn,&obj); | 243 | ok = ctx->get_issuer(&xtmp, ctx, x); |
| 242 | if (ok != X509_LU_X509) | 244 | |
| 243 | { | 245 | if (ok < 0) return ok; |
| 244 | if (ok == X509_LU_RETRY) | 246 | if (ok == 0) break; |
| 245 | { | 247 | |
| 246 | X509_OBJECT_free_contents(&obj); | 248 | x = xtmp; |
| 247 | X509err(X509_F_X509_VERIFY_CERT,X509_R_SHOULD_RETRY); | 249 | if (!sk_X509_push(ctx->chain,x)) |
| 248 | return(ok); | ||
| 249 | } | ||
| 250 | else if (ok != X509_LU_FAIL) | ||
| 251 | { | ||
| 252 | X509_OBJECT_free_contents(&obj); | ||
| 253 | /* not good :-(, break anyway */ | ||
| 254 | return(ok); | ||
| 255 | } | ||
| 256 | break; | ||
| 257 | } | ||
| 258 | x=obj.data.x509; | ||
| 259 | if (!sk_X509_push(ctx->chain,obj.data.x509)) | ||
| 260 | { | 250 | { |
| 261 | X509_OBJECT_free_contents(&obj); | 251 | X509_free(xtmp); |
| 262 | X509err(X509_F_X509_VERIFY_CERT,ERR_R_MALLOC_FAILURE); | 252 | X509err(X509_F_X509_VERIFY_CERT,ERR_R_MALLOC_FAILURE); |
| 263 | return(0); | 253 | return 0; |
| 264 | } | 254 | } |
| 265 | num++; | 255 | num++; |
| 266 | } | 256 | } |
| 267 | 257 | ||
| 268 | /* we now have our chain, lets check it... */ | 258 | /* we now have our chain, lets check it... */ |
| 269 | xn=X509_get_issuer_name(x); | 259 | xn=X509_get_issuer_name(x); |
| 270 | if (X509_NAME_cmp(X509_get_subject_name(x),xn) != 0) | 260 | |
| 261 | /* Is last certificate looked up self signed? */ | ||
| 262 | if (!ctx->check_issued(ctx,x,x)) | ||
| 271 | { | 263 | { |
| 272 | if ((chain_ss == NULL) || (X509_NAME_cmp(X509_get_subject_name(chain_ss),xn) != 0)) | 264 | if ((chain_ss == NULL) || !ctx->check_issued(ctx, x, chain_ss)) |
| 273 | { | 265 | { |
| 274 | if (ctx->last_untrusted >= num) | 266 | if (ctx->last_untrusted >= num) |
| 275 | ctx->error=X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY; | 267 | ctx->error=X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY; |
| @@ -294,22 +286,22 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 294 | } | 286 | } |
| 295 | 287 | ||
| 296 | /* We have the chain complete: now we need to check its purpose */ | 288 | /* We have the chain complete: now we need to check its purpose */ |
| 297 | if(ctx->purpose > 0) ok = check_chain_purpose(ctx); | 289 | if (ctx->purpose > 0) ok = check_chain_purpose(ctx); |
| 298 | 290 | ||
| 299 | if(!ok) goto end; | 291 | if (!ok) goto end; |
| 300 | 292 | ||
| 301 | /* The chain extensions are OK: check trust */ | 293 | /* The chain extensions are OK: check trust */ |
| 302 | 294 | ||
| 303 | if(ctx->trust > 0) ok = check_trust(ctx); | 295 | if (ctx->trust > 0) ok = check_trust(ctx); |
| 304 | 296 | ||
| 305 | if(!ok) goto end; | 297 | if (!ok) goto end; |
| 306 | 298 | ||
| 307 | /* We may as well copy down any DSA parameters that are required */ | 299 | /* We may as well copy down any DSA parameters that are required */ |
| 308 | X509_get_pubkey_parameters(NULL,ctx->chain); | 300 | X509_get_pubkey_parameters(NULL,ctx->chain); |
| 309 | 301 | ||
| 310 | /* At this point, we have a chain and just need to verify it */ | 302 | /* At this point, we have a chain and just need to verify it */ |
| 311 | if (ctx->ctx->verify != NULL) | 303 | if (ctx->verify != NULL) |
| 312 | ok=ctx->ctx->verify(ctx); | 304 | ok=ctx->verify(ctx); |
| 313 | else | 305 | else |
| 314 | ok=internal_verify(ctx); | 306 | ok=internal_verify(ctx); |
| 315 | if (0) | 307 | if (0) |
| @@ -319,9 +311,61 @@ end: | |||
| 319 | } | 311 | } |
| 320 | if (sktmp != NULL) sk_X509_free(sktmp); | 312 | if (sktmp != NULL) sk_X509_free(sktmp); |
| 321 | if (chain_ss != NULL) X509_free(chain_ss); | 313 | if (chain_ss != NULL) X509_free(chain_ss); |
| 322 | return(ok); | 314 | return ok; |
| 323 | } | 315 | } |
| 324 | 316 | ||
| 317 | |||
| 318 | /* Given a STACK_OF(X509) find the issuer of cert (if any) | ||
| 319 | */ | ||
| 320 | |||
| 321 | static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x) | ||
| 322 | { | ||
| 323 | int i; | ||
| 324 | X509 *issuer; | ||
| 325 | for (i = 0; i < sk_X509_num(sk); i++) | ||
| 326 | { | ||
| 327 | issuer = sk_X509_value(sk, i); | ||
| 328 | if (ctx->check_issued(ctx, x, issuer)) | ||
| 329 | return issuer; | ||
| 330 | } | ||
| 331 | return NULL; | ||
| 332 | } | ||
| 333 | |||
| 334 | /* Given a possible certificate and issuer check them */ | ||
| 335 | |||
| 336 | static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) | ||
| 337 | { | ||
| 338 | int ret; | ||
| 339 | ret = X509_check_issued(issuer, x); | ||
| 340 | if (ret == X509_V_OK) | ||
| 341 | return 1; | ||
| 342 | /* If we haven't asked for issuer errors don't set ctx */ | ||
| 343 | if (!(ctx->flags & X509_V_FLAG_CB_ISSUER_CHECK)) | ||
| 344 | return 0; | ||
| 345 | |||
| 346 | ctx->error = ret; | ||
| 347 | ctx->current_cert = x; | ||
| 348 | ctx->current_issuer = issuer; | ||
| 349 | if (ctx->verify_cb) | ||
| 350 | return ctx->verify_cb(0, ctx); | ||
| 351 | return 0; | ||
| 352 | } | ||
| 353 | |||
| 354 | /* Alternative lookup method: look from a STACK stored in other_ctx */ | ||
| 355 | |||
| 356 | static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) | ||
| 357 | { | ||
| 358 | *issuer = find_issuer(ctx, ctx->other_ctx, x); | ||
| 359 | if (*issuer) | ||
| 360 | { | ||
| 361 | CRYPTO_add(&(*issuer)->references,1,CRYPTO_LOCK_X509); | ||
| 362 | return 1; | ||
| 363 | } | ||
| 364 | else | ||
| 365 | return 0; | ||
| 366 | } | ||
| 367 | |||
| 368 | |||
| 325 | /* Check a certificate chains extensions for consistency | 369 | /* Check a certificate chains extensions for consistency |
| 326 | * with the supplied purpose | 370 | * with the supplied purpose |
| 327 | */ | 371 | */ |
| @@ -334,32 +378,37 @@ static int check_chain_purpose(X509_STORE_CTX *ctx) | |||
| 334 | int i, ok=0; | 378 | int i, ok=0; |
| 335 | X509 *x; | 379 | X509 *x; |
| 336 | int (*cb)(); | 380 | int (*cb)(); |
| 337 | cb=ctx->ctx->verify_cb; | 381 | cb=ctx->verify_cb; |
| 338 | if (cb == NULL) cb=null_callback; | 382 | if (cb == NULL) cb=null_callback; |
| 339 | /* Check all untrusted certificates */ | 383 | /* Check all untrusted certificates */ |
| 340 | for(i = 0; i < ctx->last_untrusted; i++) { | 384 | for (i = 0; i < ctx->last_untrusted; i++) |
| 385 | { | ||
| 341 | x = sk_X509_value(ctx->chain, i); | 386 | x = sk_X509_value(ctx->chain, i); |
| 342 | if(!X509_check_purpose(x, ctx->purpose, i)) { | 387 | if (!X509_check_purpose(x, ctx->purpose, i)) |
| 343 | if(i) ctx->error = X509_V_ERR_INVALID_CA; | 388 | { |
| 344 | else ctx->error = X509_V_ERR_INVALID_PURPOSE; | 389 | if (i) |
| 390 | ctx->error = X509_V_ERR_INVALID_CA; | ||
| 391 | else | ||
| 392 | ctx->error = X509_V_ERR_INVALID_PURPOSE; | ||
| 345 | ctx->error_depth = i; | 393 | ctx->error_depth = i; |
| 346 | ctx->current_cert = x; | 394 | ctx->current_cert = x; |
| 347 | ok=cb(0,ctx); | 395 | ok=cb(0,ctx); |
| 348 | if(!ok) goto end; | 396 | if (!ok) goto end; |
| 349 | } | 397 | } |
| 350 | /* Check pathlen */ | 398 | /* Check pathlen */ |
| 351 | if((i > 1) && (x->ex_pathlen != -1) | 399 | if ((i > 1) && (x->ex_pathlen != -1) |
| 352 | && (i > (x->ex_pathlen + 1))) { | 400 | && (i > (x->ex_pathlen + 1))) |
| 401 | { | ||
| 353 | ctx->error = X509_V_ERR_PATH_LENGTH_EXCEEDED; | 402 | ctx->error = X509_V_ERR_PATH_LENGTH_EXCEEDED; |
| 354 | ctx->error_depth = i; | 403 | ctx->error_depth = i; |
| 355 | ctx->current_cert = x; | 404 | ctx->current_cert = x; |
| 356 | ok=cb(0,ctx); | 405 | ok=cb(0,ctx); |
| 357 | if(!ok) goto end; | 406 | if (!ok) goto end; |
| 407 | } | ||
| 358 | } | 408 | } |
| 359 | } | ||
| 360 | ok = 1; | 409 | ok = 1; |
| 361 | end: | 410 | end: |
| 362 | return(ok); | 411 | return ok; |
| 363 | #endif | 412 | #endif |
| 364 | } | 413 | } |
| 365 | 414 | ||
| @@ -371,19 +420,22 @@ static int check_trust(X509_STORE_CTX *ctx) | |||
| 371 | int i, ok; | 420 | int i, ok; |
| 372 | X509 *x; | 421 | X509 *x; |
| 373 | int (*cb)(); | 422 | int (*cb)(); |
| 374 | cb=ctx->ctx->verify_cb; | 423 | cb=ctx->verify_cb; |
| 375 | if (cb == NULL) cb=null_callback; | 424 | if (cb == NULL) cb=null_callback; |
| 376 | /* For now just check the last certificate in the chain */ | 425 | /* For now just check the last certificate in the chain */ |
| 377 | i = sk_X509_num(ctx->chain) - 1; | 426 | i = sk_X509_num(ctx->chain) - 1; |
| 378 | x = sk_X509_value(ctx->chain, i); | 427 | x = sk_X509_value(ctx->chain, i); |
| 379 | ok = X509_check_trust(x, ctx->trust, 0); | 428 | ok = X509_check_trust(x, ctx->trust, 0); |
| 380 | if(ok == X509_TRUST_TRUSTED) return 1; | 429 | if (ok == X509_TRUST_TRUSTED) |
| 430 | return 1; | ||
| 381 | ctx->error_depth = sk_X509_num(ctx->chain) - 1; | 431 | ctx->error_depth = sk_X509_num(ctx->chain) - 1; |
| 382 | ctx->current_cert = x; | 432 | ctx->current_cert = x; |
| 383 | if(ok == X509_TRUST_REJECTED) ctx->error = X509_V_ERR_CERT_REJECTED; | 433 | if (ok == X509_TRUST_REJECTED) |
| 384 | else ctx->error = X509_V_ERR_CERT_UNTRUSTED; | 434 | ctx->error = X509_V_ERR_CERT_REJECTED; |
| 435 | else | ||
| 436 | ctx->error = X509_V_ERR_CERT_UNTRUSTED; | ||
| 385 | ok = cb(0, ctx); | 437 | ok = cb(0, ctx); |
| 386 | return(ok); | 438 | return ok; |
| 387 | #endif | 439 | #endif |
| 388 | } | 440 | } |
| 389 | 441 | ||
| @@ -392,17 +444,21 @@ static int internal_verify(X509_STORE_CTX *ctx) | |||
| 392 | int i,ok=0,n; | 444 | int i,ok=0,n; |
| 393 | X509 *xs,*xi; | 445 | X509 *xs,*xi; |
| 394 | EVP_PKEY *pkey=NULL; | 446 | EVP_PKEY *pkey=NULL; |
| 447 | time_t *ptime; | ||
| 395 | int (*cb)(); | 448 | int (*cb)(); |
| 396 | 449 | ||
| 397 | cb=ctx->ctx->verify_cb; | 450 | cb=ctx->verify_cb; |
| 398 | if (cb == NULL) cb=null_callback; | 451 | if (cb == NULL) cb=null_callback; |
| 399 | 452 | ||
| 400 | n=sk_X509_num(ctx->chain); | 453 | n=sk_X509_num(ctx->chain); |
| 401 | ctx->error_depth=n-1; | 454 | ctx->error_depth=n-1; |
| 402 | n--; | 455 | n--; |
| 403 | xi=sk_X509_value(ctx->chain,n); | 456 | xi=sk_X509_value(ctx->chain,n); |
| 404 | if (X509_NAME_cmp(X509_get_subject_name(xi), | 457 | if (ctx->flags & X509_V_FLAG_USE_CHECK_TIME) |
| 405 | X509_get_issuer_name(xi)) == 0) | 458 | ptime = &ctx->check_time; |
| 459 | else | ||
| 460 | ptime = NULL; | ||
| 461 | if (ctx->check_issued(ctx, xi, xi)) | ||
| 406 | xs=xi; | 462 | xs=xi; |
| 407 | else | 463 | else |
| 408 | { | 464 | { |
| @@ -448,7 +504,7 @@ static int internal_verify(X509_STORE_CTX *ctx) | |||
| 448 | EVP_PKEY_free(pkey); | 504 | EVP_PKEY_free(pkey); |
| 449 | pkey=NULL; | 505 | pkey=NULL; |
| 450 | 506 | ||
| 451 | i=X509_cmp_current_time(X509_get_notBefore(xs)); | 507 | i=X509_cmp_time(X509_get_notBefore(xs), ptime); |
| 452 | if (i == 0) | 508 | if (i == 0) |
| 453 | { | 509 | { |
| 454 | ctx->error=X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD; | 510 | ctx->error=X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD; |
| @@ -466,7 +522,7 @@ static int internal_verify(X509_STORE_CTX *ctx) | |||
| 466 | xs->valid=1; | 522 | xs->valid=1; |
| 467 | } | 523 | } |
| 468 | 524 | ||
| 469 | i=X509_cmp_current_time(X509_get_notAfter(xs)); | 525 | i=X509_cmp_time(X509_get_notAfter(xs), ptime); |
| 470 | if (i == 0) | 526 | if (i == 0) |
| 471 | { | 527 | { |
| 472 | ctx->error=X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD; | 528 | ctx->error=X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD; |
| @@ -499,13 +555,18 @@ static int internal_verify(X509_STORE_CTX *ctx) | |||
| 499 | } | 555 | } |
| 500 | ok=1; | 556 | ok=1; |
| 501 | end: | 557 | end: |
| 502 | return(ok); | 558 | return ok; |
| 503 | } | 559 | } |
| 504 | 560 | ||
| 505 | int X509_cmp_current_time(ASN1_UTCTIME *ctm) | 561 | int X509_cmp_current_time(ASN1_TIME *ctm) |
| 562 | { | ||
| 563 | return X509_cmp_time(ctm, NULL); | ||
| 564 | } | ||
| 565 | |||
| 566 | int X509_cmp_time(ASN1_TIME *ctm, time_t *cmp_time) | ||
| 506 | { | 567 | { |
| 507 | char *str; | 568 | char *str; |
| 508 | ASN1_UTCTIME atm; | 569 | ASN1_TIME atm; |
| 509 | time_t offset; | 570 | time_t offset; |
| 510 | char buff1[24],buff2[24],*p; | 571 | char buff1[24],buff2[24],*p; |
| 511 | int i,j; | 572 | int i,j; |
| @@ -513,14 +574,35 @@ int X509_cmp_current_time(ASN1_UTCTIME *ctm) | |||
| 513 | p=buff1; | 574 | p=buff1; |
| 514 | i=ctm->length; | 575 | i=ctm->length; |
| 515 | str=(char *)ctm->data; | 576 | str=(char *)ctm->data; |
| 516 | if ((i < 11) || (i > 17)) return(0); | 577 | if (ctm->type == V_ASN1_UTCTIME) |
| 517 | memcpy(p,str,10); | 578 | { |
| 518 | p+=10; | 579 | if ((i < 11) || (i > 17)) return 0; |
| 519 | str+=10; | 580 | memcpy(p,str,10); |
| 581 | p+=10; | ||
| 582 | str+=10; | ||
| 583 | } | ||
| 584 | else | ||
| 585 | { | ||
| 586 | if (i < 13) return 0; | ||
| 587 | memcpy(p,str,12); | ||
| 588 | p+=12; | ||
| 589 | str+=12; | ||
| 590 | } | ||
| 520 | 591 | ||
| 521 | if ((*str == 'Z') || (*str == '-') || (*str == '+')) | 592 | if ((*str == 'Z') || (*str == '-') || (*str == '+')) |
| 522 | { *(p++)='0'; *(p++)='0'; } | 593 | { *(p++)='0'; *(p++)='0'; } |
| 523 | else { *(p++)= *(str++); *(p++)= *(str++); } | 594 | else |
| 595 | { | ||
| 596 | *(p++)= *(str++); | ||
| 597 | *(p++)= *(str++); | ||
| 598 | /* Skip any fractional seconds... */ | ||
| 599 | if (*str == '.') | ||
| 600 | { | ||
| 601 | str++; | ||
| 602 | while ((*str >= '0') && (*str <= '9')) str++; | ||
| 603 | } | ||
| 604 | |||
| 605 | } | ||
| 524 | *(p++)='Z'; | 606 | *(p++)='Z'; |
| 525 | *(p++)='\0'; | 607 | *(p++)='\0'; |
| 526 | 608 | ||
| @@ -529,39 +611,51 @@ int X509_cmp_current_time(ASN1_UTCTIME *ctm) | |||
| 529 | else | 611 | else |
| 530 | { | 612 | { |
| 531 | if ((*str != '+') && (str[5] != '-')) | 613 | if ((*str != '+') && (str[5] != '-')) |
| 532 | return(0); | 614 | return 0; |
| 533 | offset=((str[1]-'0')*10+(str[2]-'0'))*60; | 615 | offset=((str[1]-'0')*10+(str[2]-'0'))*60; |
| 534 | offset+=(str[3]-'0')*10+(str[4]-'0'); | 616 | offset+=(str[3]-'0')*10+(str[4]-'0'); |
| 535 | if (*str == '-') | 617 | if (*str == '-') |
| 536 | offset= -offset; | 618 | offset= -offset; |
| 537 | } | 619 | } |
| 538 | atm.type=V_ASN1_UTCTIME; | 620 | atm.type=ctm->type; |
| 539 | atm.length=sizeof(buff2); | 621 | atm.length=sizeof(buff2); |
| 540 | atm.data=(unsigned char *)buff2; | 622 | atm.data=(unsigned char *)buff2; |
| 541 | 623 | ||
| 542 | X509_gmtime_adj(&atm,-offset*60); | 624 | X509_time_adj(&atm,-offset*60, cmp_time); |
| 543 | 625 | ||
| 544 | i=(buff1[0]-'0')*10+(buff1[1]-'0'); | 626 | if (ctm->type == V_ASN1_UTCTIME) |
| 545 | if (i < 50) i+=100; /* cf. RFC 2459 */ | 627 | { |
| 546 | j=(buff2[0]-'0')*10+(buff2[1]-'0'); | 628 | i=(buff1[0]-'0')*10+(buff1[1]-'0'); |
| 547 | if (j < 50) j+=100; | 629 | if (i < 50) i+=100; /* cf. RFC 2459 */ |
| 630 | j=(buff2[0]-'0')*10+(buff2[1]-'0'); | ||
| 631 | if (j < 50) j+=100; | ||
| 548 | 632 | ||
| 549 | if (i < j) return (-1); | 633 | if (i < j) return -1; |
| 550 | if (i > j) return (1); | 634 | if (i > j) return 1; |
| 635 | } | ||
| 551 | i=strcmp(buff1,buff2); | 636 | i=strcmp(buff1,buff2); |
| 552 | if (i == 0) /* wait a second then return younger :-) */ | 637 | if (i == 0) /* wait a second then return younger :-) */ |
| 553 | return(-1); | 638 | return -1; |
| 554 | else | 639 | else |
| 555 | return(i); | 640 | return i; |
| 556 | } | 641 | } |
| 557 | 642 | ||
| 558 | ASN1_UTCTIME *X509_gmtime_adj(ASN1_UTCTIME *s, long adj) | 643 | ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj) |
| 644 | { | ||
| 645 | return X509_time_adj(s, adj, NULL); | ||
| 646 | } | ||
| 647 | |||
| 648 | ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *in_tm) | ||
| 559 | { | 649 | { |
| 560 | time_t t; | 650 | time_t t; |
| 561 | 651 | ||
| 562 | time(&t); | 652 | if (in_tm) t = *in_tm; |
| 653 | else time(&t); | ||
| 654 | |||
| 563 | t+=adj; | 655 | t+=adj; |
| 564 | return(ASN1_UTCTIME_set(s,t)); | 656 | if (!s) return ASN1_TIME_set(s, t); |
| 657 | if (s->type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t); | ||
| 658 | return ASN1_GENERALIZEDTIME_set(s, t); | ||
| 565 | } | 659 | } |
| 566 | 660 | ||
| 567 | int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) | 661 | int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) |
| @@ -569,7 +663,7 @@ int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) | |||
| 569 | EVP_PKEY *ktmp=NULL,*ktmp2; | 663 | EVP_PKEY *ktmp=NULL,*ktmp2; |
| 570 | int i,j; | 664 | int i,j; |
| 571 | 665 | ||
| 572 | if ((pkey != NULL) && !EVP_PKEY_missing_parameters(pkey)) return(1); | 666 | if ((pkey != NULL) && !EVP_PKEY_missing_parameters(pkey)) return 1; |
| 573 | 667 | ||
| 574 | for (i=0; i<sk_X509_num(chain); i++) | 668 | for (i=0; i<sk_X509_num(chain); i++) |
| 575 | { | 669 | { |
| @@ -577,7 +671,7 @@ int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) | |||
| 577 | if (ktmp == NULL) | 671 | if (ktmp == NULL) |
| 578 | { | 672 | { |
| 579 | X509err(X509_F_X509_GET_PUBKEY_PARAMETERS,X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY); | 673 | X509err(X509_F_X509_GET_PUBKEY_PARAMETERS,X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY); |
| 580 | return(0); | 674 | return 0; |
| 581 | } | 675 | } |
| 582 | if (!EVP_PKEY_missing_parameters(ktmp)) | 676 | if (!EVP_PKEY_missing_parameters(ktmp)) |
| 583 | break; | 677 | break; |
| @@ -590,7 +684,7 @@ int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) | |||
| 590 | if (ktmp == NULL) | 684 | if (ktmp == NULL) |
| 591 | { | 685 | { |
| 592 | X509err(X509_F_X509_GET_PUBKEY_PARAMETERS,X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN); | 686 | X509err(X509_F_X509_GET_PUBKEY_PARAMETERS,X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN); |
| 593 | return(0); | 687 | return 0; |
| 594 | } | 688 | } |
| 595 | 689 | ||
| 596 | /* first, populate the other certs */ | 690 | /* first, populate the other certs */ |
| @@ -603,101 +697,31 @@ int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) | |||
| 603 | 697 | ||
| 604 | if (pkey != NULL) EVP_PKEY_copy_parameters(pkey,ktmp); | 698 | if (pkey != NULL) EVP_PKEY_copy_parameters(pkey,ktmp); |
| 605 | EVP_PKEY_free(ktmp); | 699 | EVP_PKEY_free(ktmp); |
| 606 | return(1); | 700 | return 1; |
| 607 | } | ||
| 608 | |||
| 609 | int X509_STORE_add_cert(X509_STORE *ctx, X509 *x) | ||
| 610 | { | ||
| 611 | X509_OBJECT *obj,*r; | ||
| 612 | int ret=1; | ||
| 613 | |||
| 614 | if (x == NULL) return(0); | ||
| 615 | obj=(X509_OBJECT *)Malloc(sizeof(X509_OBJECT)); | ||
| 616 | if (obj == NULL) | ||
| 617 | { | ||
| 618 | X509err(X509_F_X509_STORE_ADD_CERT,ERR_R_MALLOC_FAILURE); | ||
| 619 | return(0); | ||
| 620 | } | ||
| 621 | obj->type=X509_LU_X509; | ||
| 622 | obj->data.x509=x; | ||
| 623 | |||
| 624 | CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); | ||
| 625 | |||
| 626 | X509_OBJECT_up_ref_count(obj); | ||
| 627 | |||
| 628 | r=(X509_OBJECT *)lh_insert(ctx->certs,obj); | ||
| 629 | if (r != NULL) | ||
| 630 | { /* oops, put it back */ | ||
| 631 | lh_delete(ctx->certs,obj); | ||
| 632 | X509_OBJECT_free_contents(obj); | ||
| 633 | Free(obj); | ||
| 634 | lh_insert(ctx->certs,r); | ||
| 635 | X509err(X509_F_X509_STORE_ADD_CERT,X509_R_CERT_ALREADY_IN_HASH_TABLE); | ||
| 636 | ret=0; | ||
| 637 | } | ||
| 638 | |||
| 639 | CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); | ||
| 640 | |||
| 641 | return(ret); | ||
| 642 | } | ||
| 643 | |||
| 644 | int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x) | ||
| 645 | { | ||
| 646 | X509_OBJECT *obj,*r; | ||
| 647 | int ret=1; | ||
| 648 | |||
| 649 | if (x == NULL) return(0); | ||
| 650 | obj=(X509_OBJECT *)Malloc(sizeof(X509_OBJECT)); | ||
| 651 | if (obj == NULL) | ||
| 652 | { | ||
| 653 | X509err(X509_F_X509_STORE_ADD_CRL,ERR_R_MALLOC_FAILURE); | ||
| 654 | return(0); | ||
| 655 | } | ||
| 656 | obj->type=X509_LU_CRL; | ||
| 657 | obj->data.crl=x; | ||
| 658 | |||
| 659 | CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); | ||
| 660 | |||
| 661 | X509_OBJECT_up_ref_count(obj); | ||
| 662 | |||
| 663 | r=(X509_OBJECT *)lh_insert(ctx->certs,obj); | ||
| 664 | if (r != NULL) | ||
| 665 | { /* oops, put it back */ | ||
| 666 | lh_delete(ctx->certs,obj); | ||
| 667 | X509_OBJECT_free_contents(obj); | ||
| 668 | Free(obj); | ||
| 669 | lh_insert(ctx->certs,r); | ||
| 670 | X509err(X509_F_X509_STORE_ADD_CRL,X509_R_CERT_ALREADY_IN_HASH_TABLE); | ||
| 671 | ret=0; | ||
| 672 | } | ||
| 673 | |||
| 674 | CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); | ||
| 675 | |||
| 676 | return(ret); | ||
| 677 | } | 701 | } |
| 678 | 702 | ||
| 679 | int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 703 | int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
| 680 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) | 704 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) |
| 681 | { | 705 | { |
| 682 | x509_store_ctx_num++; | 706 | x509_store_ctx_num++; |
| 683 | return(CRYPTO_get_ex_new_index(x509_store_ctx_num-1, | 707 | return CRYPTO_get_ex_new_index(x509_store_ctx_num-1, |
| 684 | &x509_store_ctx_method, | 708 | &x509_store_ctx_method, |
| 685 | argl,argp,new_func,dup_func,free_func)); | 709 | argl,argp,new_func,dup_func,free_func); |
| 686 | } | 710 | } |
| 687 | 711 | ||
| 688 | int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data) | 712 | int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data) |
| 689 | { | 713 | { |
| 690 | return(CRYPTO_set_ex_data(&ctx->ex_data,idx,data)); | 714 | return CRYPTO_set_ex_data(&ctx->ex_data,idx,data); |
| 691 | } | 715 | } |
| 692 | 716 | ||
| 693 | void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx) | 717 | void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx) |
| 694 | { | 718 | { |
| 695 | return(CRYPTO_get_ex_data(&ctx->ex_data,idx)); | 719 | return CRYPTO_get_ex_data(&ctx->ex_data,idx); |
| 696 | } | 720 | } |
| 697 | 721 | ||
| 698 | int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx) | 722 | int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx) |
| 699 | { | 723 | { |
| 700 | return(ctx->error); | 724 | return ctx->error; |
| 701 | } | 725 | } |
| 702 | 726 | ||
| 703 | void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int err) | 727 | void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int err) |
| @@ -707,17 +731,17 @@ void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int err) | |||
| 707 | 731 | ||
| 708 | int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx) | 732 | int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx) |
| 709 | { | 733 | { |
| 710 | return(ctx->error_depth); | 734 | return ctx->error_depth; |
| 711 | } | 735 | } |
| 712 | 736 | ||
| 713 | X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx) | 737 | X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx) |
| 714 | { | 738 | { |
| 715 | return(ctx->current_cert); | 739 | return ctx->current_cert; |
| 716 | } | 740 | } |
| 717 | 741 | ||
| 718 | STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx) | 742 | STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx) |
| 719 | { | 743 | { |
| 720 | return(ctx->chain); | 744 | return ctx->chain; |
| 721 | } | 745 | } |
| 722 | 746 | ||
| 723 | STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx) | 747 | STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx) |
| @@ -725,12 +749,13 @@ STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx) | |||
| 725 | int i; | 749 | int i; |
| 726 | X509 *x; | 750 | X509 *x; |
| 727 | STACK_OF(X509) *chain; | 751 | STACK_OF(X509) *chain; |
| 728 | if(!ctx->chain || !(chain = sk_X509_dup(ctx->chain))) return NULL; | 752 | if (!ctx->chain || !(chain = sk_X509_dup(ctx->chain))) return NULL; |
| 729 | for(i = 0; i < sk_X509_num(chain); i++) { | 753 | for (i = 0; i < sk_X509_num(chain); i++) |
| 754 | { | ||
| 730 | x = sk_X509_value(chain, i); | 755 | x = sk_X509_value(chain, i); |
| 731 | CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509); | 756 | CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509); |
| 732 | } | 757 | } |
| 733 | return(chain); | 758 | return chain; |
| 734 | } | 759 | } |
| 735 | 760 | ||
| 736 | void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x) | 761 | void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x) |
| @@ -768,43 +793,123 @@ int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, | |||
| 768 | { | 793 | { |
| 769 | int idx; | 794 | int idx; |
| 770 | /* If purpose not set use default */ | 795 | /* If purpose not set use default */ |
| 771 | if(!purpose) purpose = def_purpose; | 796 | if (!purpose) purpose = def_purpose; |
| 772 | /* If we have a purpose then check it is valid */ | 797 | /* If we have a purpose then check it is valid */ |
| 773 | if(purpose) { | 798 | if (purpose) |
| 799 | { | ||
| 774 | X509_PURPOSE *ptmp; | 800 | X509_PURPOSE *ptmp; |
| 775 | idx = X509_PURPOSE_get_by_id(purpose); | 801 | idx = X509_PURPOSE_get_by_id(purpose); |
| 776 | if(idx == -1) { | 802 | if (idx == -1) |
| 803 | { | ||
| 777 | X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT, | 804 | X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT, |
| 778 | X509_R_UNKNOWN_PURPOSE_ID); | 805 | X509_R_UNKNOWN_PURPOSE_ID); |
| 779 | return 0; | 806 | return 0; |
| 780 | } | 807 | } |
| 781 | ptmp = X509_PURPOSE_get0(idx); | 808 | ptmp = X509_PURPOSE_get0(idx); |
| 782 | if(ptmp->trust == X509_TRUST_DEFAULT) { | 809 | if (ptmp->trust == X509_TRUST_DEFAULT) |
| 810 | { | ||
| 783 | idx = X509_PURPOSE_get_by_id(def_purpose); | 811 | idx = X509_PURPOSE_get_by_id(def_purpose); |
| 784 | if(idx == -1) { | 812 | if (idx == -1) |
| 813 | { | ||
| 785 | X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT, | 814 | X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT, |
| 786 | X509_R_UNKNOWN_PURPOSE_ID); | 815 | X509_R_UNKNOWN_PURPOSE_ID); |
| 787 | return 0; | 816 | return 0; |
| 788 | } | 817 | } |
| 789 | ptmp = X509_PURPOSE_get0(idx); | 818 | ptmp = X509_PURPOSE_get0(idx); |
| 790 | } | 819 | } |
| 791 | /* If trust not set then get from purpose default */ | 820 | /* If trust not set then get from purpose default */ |
| 792 | if(!trust) trust = ptmp->trust; | 821 | if (!trust) trust = ptmp->trust; |
| 793 | } | 822 | } |
| 794 | if(trust) { | 823 | if (trust) |
| 824 | { | ||
| 795 | idx = X509_TRUST_get_by_id(trust); | 825 | idx = X509_TRUST_get_by_id(trust); |
| 796 | if(idx == -1) { | 826 | if (idx == -1) |
| 827 | { | ||
| 797 | X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT, | 828 | X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT, |
| 798 | X509_R_UNKNOWN_TRUST_ID); | 829 | X509_R_UNKNOWN_TRUST_ID); |
| 799 | return 0; | 830 | return 0; |
| 831 | } | ||
| 800 | } | 832 | } |
| 801 | } | ||
| 802 | 833 | ||
| 803 | if(purpose) ctx->purpose = purpose; | 834 | if (purpose) ctx->purpose = purpose; |
| 804 | if(trust) ctx->trust = trust; | 835 | if (trust) ctx->trust = trust; |
| 805 | return 1; | 836 | return 1; |
| 806 | } | 837 | } |
| 807 | 838 | ||
| 839 | X509_STORE_CTX *X509_STORE_CTX_new(void) | ||
| 840 | { | ||
| 841 | X509_STORE_CTX *ctx; | ||
| 842 | ctx = (X509_STORE_CTX *)OPENSSL_malloc(sizeof(X509_STORE_CTX)); | ||
| 843 | if (ctx) memset(ctx, 0, sizeof(X509_STORE_CTX)); | ||
| 844 | return ctx; | ||
| 845 | } | ||
| 846 | |||
| 847 | void X509_STORE_CTX_free(X509_STORE_CTX *ctx) | ||
| 848 | { | ||
| 849 | X509_STORE_CTX_cleanup(ctx); | ||
| 850 | OPENSSL_free(ctx); | ||
| 851 | } | ||
| 852 | |||
| 853 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | ||
| 854 | STACK_OF(X509) *chain) | ||
| 855 | { | ||
| 856 | ctx->ctx=store; | ||
| 857 | ctx->current_method=0; | ||
| 858 | ctx->cert=x509; | ||
| 859 | ctx->untrusted=chain; | ||
| 860 | ctx->last_untrusted=0; | ||
| 861 | ctx->purpose=0; | ||
| 862 | ctx->trust=0; | ||
| 863 | ctx->check_time=0; | ||
| 864 | ctx->flags=0; | ||
| 865 | ctx->other_ctx=NULL; | ||
| 866 | ctx->valid=0; | ||
| 867 | ctx->chain=NULL; | ||
| 868 | ctx->depth=9; | ||
| 869 | ctx->error=0; | ||
| 870 | ctx->error_depth=0; | ||
| 871 | ctx->current_cert=NULL; | ||
| 872 | ctx->current_issuer=NULL; | ||
| 873 | ctx->check_issued = check_issued; | ||
| 874 | ctx->get_issuer = X509_STORE_CTX_get1_issuer; | ||
| 875 | ctx->verify_cb = store->verify_cb; | ||
| 876 | ctx->verify = store->verify; | ||
| 877 | ctx->cleanup = 0; | ||
| 878 | memset(&(ctx->ex_data),0,sizeof(CRYPTO_EX_DATA)); | ||
| 879 | } | ||
| 880 | |||
| 881 | /* Set alternative lookup method: just a STACK of trusted certificates. | ||
| 882 | * This avoids X509_STORE nastiness where it isn't needed. | ||
| 883 | */ | ||
| 884 | |||
| 885 | void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) | ||
| 886 | { | ||
| 887 | ctx->other_ctx = sk; | ||
| 888 | ctx->get_issuer = get_issuer_sk; | ||
| 889 | } | ||
| 890 | |||
| 891 | void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) | ||
| 892 | { | ||
| 893 | if (ctx->cleanup) ctx->cleanup(ctx); | ||
| 894 | if (ctx->chain != NULL) | ||
| 895 | { | ||
| 896 | sk_X509_pop_free(ctx->chain,X509_free); | ||
| 897 | ctx->chain=NULL; | ||
| 898 | } | ||
| 899 | CRYPTO_free_ex_data(x509_store_ctx_method,ctx,&(ctx->ex_data)); | ||
| 900 | memset(&ctx->ex_data,0,sizeof(CRYPTO_EX_DATA)); | ||
| 901 | } | ||
| 902 | |||
| 903 | void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, long flags) | ||
| 904 | { | ||
| 905 | ctx->flags |= flags; | ||
| 906 | } | ||
| 907 | |||
| 908 | void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, long flags, time_t t) | ||
| 909 | { | ||
| 910 | ctx->check_time = t; | ||
| 911 | ctx->flags |= X509_V_FLAG_USE_CHECK_TIME; | ||
| 912 | } | ||
| 808 | 913 | ||
| 809 | IMPLEMENT_STACK_OF(X509) | 914 | IMPLEMENT_STACK_OF(X509) |
| 810 | IMPLEMENT_ASN1_SET_OF(X509) | 915 | IMPLEMENT_ASN1_SET_OF(X509) |
diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.h b/src/lib/libssl/src/crypto/x509/x509_vfy.h index 4637aecedf..e289d5309a 100644 --- a/src/lib/libssl/src/crypto/x509/x509_vfy.h +++ b/src/lib/libssl/src/crypto/x509/x509_vfy.h | |||
| @@ -65,13 +65,16 @@ | |||
| 65 | #ifndef HEADER_X509_VFY_H | 65 | #ifndef HEADER_X509_VFY_H |
| 66 | #define HEADER_X509_VFY_H | 66 | #define HEADER_X509_VFY_H |
| 67 | 67 | ||
| 68 | #ifdef __cplusplus | 68 | #ifndef NO_LHASH |
| 69 | extern "C" { | 69 | #include <openssl/lhash.h> |
| 70 | #endif | 70 | #endif |
| 71 | |||
| 72 | #include <openssl/bio.h> | 71 | #include <openssl/bio.h> |
| 73 | #include <openssl/crypto.h> | 72 | #include <openssl/crypto.h> |
| 74 | 73 | ||
| 74 | #ifdef __cplusplus | ||
| 75 | extern "C" { | ||
| 76 | #endif | ||
| 77 | |||
| 75 | /* Outer object */ | 78 | /* Outer object */ |
| 76 | typedef struct x509_hash_dir_st | 79 | typedef struct x509_hash_dir_st |
| 77 | { | 80 | { |
| @@ -128,6 +131,7 @@ typedef struct x509_object_st | |||
| 128 | typedef struct x509_lookup_st X509_LOOKUP; | 131 | typedef struct x509_lookup_st X509_LOOKUP; |
| 129 | 132 | ||
| 130 | DECLARE_STACK_OF(X509_LOOKUP) | 133 | DECLARE_STACK_OF(X509_LOOKUP) |
| 134 | DECLARE_STACK_OF(X509_OBJECT) | ||
| 131 | 135 | ||
| 132 | /* This is a static that defines the function interface */ | 136 | /* This is a static that defines the function interface */ |
| 133 | typedef struct x509_lookup_method_st | 137 | typedef struct x509_lookup_method_st |
| @@ -150,7 +154,7 @@ typedef struct x509_lookup_method_st | |||
| 150 | X509_OBJECT *ret); | 154 | X509_OBJECT *ret); |
| 151 | } X509_LOOKUP_METHOD; | 155 | } X509_LOOKUP_METHOD; |
| 152 | 156 | ||
| 153 | typedef struct x509_store_state_st X509_STORE_CTX; | 157 | typedef struct x509_store_ctx_st X509_STORE_CTX; |
| 154 | 158 | ||
| 155 | /* This is used to hold everything. It is used for all certificate | 159 | /* This is used to hold everything. It is used for all certificate |
| 156 | * validation. Once we have a certificate chain, the 'verify' | 160 | * validation. Once we have a certificate chain, the 'verify' |
| @@ -159,11 +163,7 @@ typedef struct x509_store_st | |||
| 159 | { | 163 | { |
| 160 | /* The following is a cache of trusted certs */ | 164 | /* The following is a cache of trusted certs */ |
| 161 | int cache; /* if true, stash any hits */ | 165 | int cache; /* if true, stash any hits */ |
| 162 | #ifdef HEADER_LHASH_H | 166 | STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */ |
| 163 | LHASH *certs; /* cached certs; */ | ||
| 164 | #else | ||
| 165 | char *certs; | ||
| 166 | #endif | ||
| 167 | 167 | ||
| 168 | /* These are external lookup methods */ | 168 | /* These are external lookup methods */ |
| 169 | STACK_OF(X509_LOOKUP) *get_cert_methods; | 169 | STACK_OF(X509_LOOKUP) *get_cert_methods; |
| @@ -191,10 +191,10 @@ struct x509_lookup_st | |||
| 191 | X509_STORE *store_ctx; /* who owns us */ | 191 | X509_STORE *store_ctx; /* who owns us */ |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | /* This is a temporary used when processing cert chains. Since the | 194 | /* This is a used when verifying cert chains. Since the |
| 195 | * gathering of the cert chain can take some time (and have to be | 195 | * gathering of the cert chain can take some time (and have to be |
| 196 | * 'retried', this needs to be kept and passed around. */ | 196 | * 'retried', this needs to be kept and passed around. */ |
| 197 | struct x509_store_state_st /* X509_STORE_CTX */ | 197 | struct x509_store_ctx_st /* X509_STORE_CTX */ |
| 198 | { | 198 | { |
| 199 | X509_STORE *ctx; | 199 | X509_STORE *ctx; |
| 200 | int current_method; /* used when looking up certs */ | 200 | int current_method; /* used when looking up certs */ |
| @@ -204,6 +204,16 @@ struct x509_store_state_st /* X509_STORE_CTX */ | |||
| 204 | STACK_OF(X509) *untrusted; /* chain of X509s - untrusted - passed in */ | 204 | STACK_OF(X509) *untrusted; /* chain of X509s - untrusted - passed in */ |
| 205 | int purpose; /* purpose to check untrusted certificates */ | 205 | int purpose; /* purpose to check untrusted certificates */ |
| 206 | int trust; /* trust setting to check */ | 206 | int trust; /* trust setting to check */ |
| 207 | time_t check_time; /* time to make verify at */ | ||
| 208 | unsigned long flags; /* Various verify flags */ | ||
| 209 | void *other_ctx; /* Other info for use with get_issuer() */ | ||
| 210 | |||
| 211 | /* Callbacks for various operations */ | ||
| 212 | int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */ | ||
| 213 | int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */ | ||
| 214 | int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */ | ||
| 215 | int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */ | ||
| 216 | int (*cleanup)(X509_STORE_CTX *ctx); | ||
| 207 | 217 | ||
| 208 | /* The following is built up */ | 218 | /* The following is built up */ |
| 209 | int depth; /* how far to go looking up certs */ | 219 | int depth; /* how far to go looking up certs */ |
| @@ -215,6 +225,7 @@ struct x509_store_state_st /* X509_STORE_CTX */ | |||
| 215 | int error_depth; | 225 | int error_depth; |
| 216 | int error; | 226 | int error; |
| 217 | X509 *current_cert; | 227 | X509 *current_cert; |
| 228 | X509 *current_issuer; /* cert currently being tested as valid issuer */ | ||
| 218 | 229 | ||
| 219 | CRYPTO_EX_DATA ex_data; | 230 | CRYPTO_EX_DATA ex_data; |
| 220 | }; | 231 | }; |
| @@ -265,10 +276,20 @@ struct x509_store_state_st /* X509_STORE_CTX */ | |||
| 265 | #define X509_V_ERR_INVALID_PURPOSE 26 | 276 | #define X509_V_ERR_INVALID_PURPOSE 26 |
| 266 | #define X509_V_ERR_CERT_UNTRUSTED 27 | 277 | #define X509_V_ERR_CERT_UNTRUSTED 27 |
| 267 | #define X509_V_ERR_CERT_REJECTED 28 | 278 | #define X509_V_ERR_CERT_REJECTED 28 |
| 279 | /* These are 'informational' when looking for issuer cert */ | ||
| 280 | #define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29 | ||
| 281 | #define X509_V_ERR_AKID_SKID_MISMATCH 30 | ||
| 282 | #define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31 | ||
| 283 | #define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32 | ||
| 268 | 284 | ||
| 269 | /* The application is not happy */ | 285 | /* The application is not happy */ |
| 270 | #define X509_V_ERR_APPLICATION_VERIFICATION 50 | 286 | #define X509_V_ERR_APPLICATION_VERIFICATION 50 |
| 271 | 287 | ||
| 288 | /* Certificate verify flags */ | ||
| 289 | |||
| 290 | #define X509_V_FLAG_CB_ISSUER_CHECK 0x1 /* Send issuer+subject checks to verify_cb */ | ||
| 291 | #define X509_V_FLAG_USE_CHECK_TIME 0x2 /* Use check time instead of current time */ | ||
| 292 | |||
| 272 | /* These functions are being redefined in another directory, | 293 | /* These functions are being redefined in another directory, |
| 273 | and clash when the linker is case-insensitive, so let's | 294 | and clash when the linker is case-insensitive, so let's |
| 274 | hide them a little, by giving them an extra 'o' at the | 295 | hide them a little, by giving them an extra 'o' at the |
| @@ -284,18 +305,23 @@ struct x509_store_state_st /* X509_STORE_CTX */ | |||
| 284 | #define X509v3_add_standard_extensions oX509v3_add_standard_extensions | 305 | #define X509v3_add_standard_extensions oX509v3_add_standard_extensions |
| 285 | #endif | 306 | #endif |
| 286 | 307 | ||
| 287 | #ifdef HEADER_LHASH_H | 308 | int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, |
| 288 | X509_OBJECT *X509_OBJECT_retrieve_by_subject(LHASH *h,int type,X509_NAME *name); | 309 | X509_NAME *name); |
| 289 | #endif | 310 | X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h,int type,X509_NAME *name); |
| 311 | X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x); | ||
| 290 | void X509_OBJECT_up_ref_count(X509_OBJECT *a); | 312 | void X509_OBJECT_up_ref_count(X509_OBJECT *a); |
| 291 | void X509_OBJECT_free_contents(X509_OBJECT *a); | 313 | void X509_OBJECT_free_contents(X509_OBJECT *a); |
| 292 | X509_STORE *X509_STORE_new(void ); | 314 | X509_STORE *X509_STORE_new(void ); |
| 293 | void X509_STORE_free(X509_STORE *v); | 315 | void X509_STORE_free(X509_STORE *v); |
| 294 | 316 | ||
| 295 | X509_STORE_CTX *X509_STORE_CTX_new(void); | 317 | X509_STORE_CTX *X509_STORE_CTX_new(void); |
| 318 | |||
| 319 | int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); | ||
| 320 | |||
| 296 | void X509_STORE_CTX_free(X509_STORE_CTX *ctx); | 321 | void X509_STORE_CTX_free(X509_STORE_CTX *ctx); |
| 297 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, | 322 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, |
| 298 | X509 *x509, STACK_OF(X509) *chain); | 323 | X509 *x509, STACK_OF(X509) *chain); |
| 324 | void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); | ||
| 299 | void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); | 325 | void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); |
| 300 | 326 | ||
| 301 | X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m); | 327 | X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m); |
| @@ -354,6 +380,8 @@ int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); | |||
| 354 | int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust); | 380 | int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust); |
| 355 | int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, | 381 | int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, |
| 356 | int purpose, int trust); | 382 | int purpose, int trust); |
| 383 | void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, long flags); | ||
| 384 | void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, long flags, time_t t); | ||
| 357 | 385 | ||
| 358 | #ifdef __cplusplus | 386 | #ifdef __cplusplus |
| 359 | } | 387 | } |
diff --git a/src/lib/libssl/src/crypto/x509/x509spki.c b/src/lib/libssl/src/crypto/x509/x509spki.c index b35c3f92e7..fd0a534d88 100644 --- a/src/lib/libssl/src/crypto/x509/x509spki.c +++ b/src/lib/libssl/src/crypto/x509/x509spki.c | |||
| @@ -82,7 +82,7 @@ NETSCAPE_SPKI * NETSCAPE_SPKI_b64_decode(const char *str, int len) | |||
| 82 | int spki_len; | 82 | int spki_len; |
| 83 | NETSCAPE_SPKI *spki; | 83 | NETSCAPE_SPKI *spki; |
| 84 | if(len <= 0) len = strlen(str); | 84 | if(len <= 0) len = strlen(str); |
| 85 | if (!(spki_der = Malloc(len + 1))) { | 85 | if (!(spki_der = OPENSSL_malloc(len + 1))) { |
| 86 | X509err(X509_F_NETSCAPE_SPKI_B64_DECODE, ERR_R_MALLOC_FAILURE); | 86 | X509err(X509_F_NETSCAPE_SPKI_B64_DECODE, ERR_R_MALLOC_FAILURE); |
| 87 | return NULL; | 87 | return NULL; |
| 88 | } | 88 | } |
| @@ -90,12 +90,12 @@ NETSCAPE_SPKI * NETSCAPE_SPKI_b64_decode(const char *str, int len) | |||
| 90 | if(spki_len < 0) { | 90 | if(spki_len < 0) { |
| 91 | X509err(X509_F_NETSCAPE_SPKI_B64_DECODE, | 91 | X509err(X509_F_NETSCAPE_SPKI_B64_DECODE, |
| 92 | X509_R_BASE64_DECODE_ERROR); | 92 | X509_R_BASE64_DECODE_ERROR); |
| 93 | Free(spki_der); | 93 | OPENSSL_free(spki_der); |
| 94 | return NULL; | 94 | return NULL; |
| 95 | } | 95 | } |
| 96 | p = spki_der; | 96 | p = spki_der; |
| 97 | spki = d2i_NETSCAPE_SPKI(NULL, &p, spki_len); | 97 | spki = d2i_NETSCAPE_SPKI(NULL, &p, spki_len); |
| 98 | Free(spki_der); | 98 | OPENSSL_free(spki_der); |
| 99 | return spki; | 99 | return spki; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| @@ -107,8 +107,8 @@ char * NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *spki) | |||
| 107 | char *b64_str; | 107 | char *b64_str; |
| 108 | int der_len; | 108 | int der_len; |
| 109 | der_len = i2d_NETSCAPE_SPKI(spki, NULL); | 109 | der_len = i2d_NETSCAPE_SPKI(spki, NULL); |
| 110 | der_spki = Malloc(der_len); | 110 | der_spki = OPENSSL_malloc(der_len); |
| 111 | b64_str = Malloc(der_len * 2); | 111 | b64_str = OPENSSL_malloc(der_len * 2); |
| 112 | if(!der_spki || !b64_str) { | 112 | if(!der_spki || !b64_str) { |
| 113 | X509err(X509_F_NETSCAPE_SPKI_B64_ENCODE, ERR_R_MALLOC_FAILURE); | 113 | X509err(X509_F_NETSCAPE_SPKI_B64_ENCODE, ERR_R_MALLOC_FAILURE); |
| 114 | return NULL; | 114 | return NULL; |
| @@ -116,6 +116,6 @@ char * NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *spki) | |||
| 116 | p = der_spki; | 116 | p = der_spki; |
| 117 | i2d_NETSCAPE_SPKI(spki, &p); | 117 | i2d_NETSCAPE_SPKI(spki, &p); |
| 118 | EVP_EncodeBlock((unsigned char *)b64_str, der_spki, der_len); | 118 | EVP_EncodeBlock((unsigned char *)b64_str, der_spki, der_len); |
| 119 | Free(der_spki); | 119 | OPENSSL_free(der_spki); |
| 120 | return b64_str; | 120 | return b64_str; |
| 121 | } | 121 | } |
diff --git a/src/lib/libssl/src/crypto/x509/x_all.c b/src/lib/libssl/src/crypto/x509/x_all.c index d2bf3c8e1c..9bd6e2a39b 100644 --- a/src/lib/libssl/src/crypto/x509/x_all.c +++ b/src/lib/libssl/src/crypto/x509/x_all.c | |||
| @@ -411,13 +411,25 @@ X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne) | |||
| 411 | (char *(*)())d2i_X509_NAME_ENTRY,(char *)ne)); | 411 | (char *(*)())d2i_X509_NAME_ENTRY,(char *)ne)); |
| 412 | } | 412 | } |
| 413 | 413 | ||
| 414 | int X509_digest(X509 *data, const EVP_MD *type, unsigned char *md, | 414 | int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md, |
| 415 | unsigned int *len) | 415 | unsigned int *len) |
| 416 | { | 416 | { |
| 417 | return(ASN1_digest((int (*)())i2d_X509,type,(char *)data,md,len)); | 417 | return(ASN1_digest((int (*)())i2d_X509,type,(char *)data,md,len)); |
| 418 | } | 418 | } |
| 419 | 419 | ||
| 420 | int X509_NAME_digest(X509_NAME *data, const EVP_MD *type, unsigned char *md, | 420 | int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md, |
| 421 | unsigned int *len) | ||
| 422 | { | ||
| 423 | return(ASN1_digest((int (*)())i2d_X509_CRL,type,(char *)data,md,len)); | ||
| 424 | } | ||
| 425 | |||
| 426 | int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type, unsigned char *md, | ||
| 427 | unsigned int *len) | ||
| 428 | { | ||
| 429 | return(ASN1_digest((int (*)())i2d_X509_REQ,type,(char *)data,md,len)); | ||
| 430 | } | ||
| 431 | |||
| 432 | int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type, unsigned char *md, | ||
| 421 | unsigned int *len) | 433 | unsigned int *len) |
| 422 | { | 434 | { |
| 423 | return(ASN1_digest((int (*)())i2d_X509_NAME,type,(char *)data,md,len)); | 435 | return(ASN1_digest((int (*)())i2d_X509_NAME,type,(char *)data,md,len)); |
| @@ -492,6 +504,17 @@ EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a) | |||
| 492 | (char *(*)())d2i_AutoPrivateKey, (fp),(unsigned char **)(a))); | 504 | (char *(*)())d2i_AutoPrivateKey, (fp),(unsigned char **)(a))); |
| 493 | } | 505 | } |
| 494 | 506 | ||
| 507 | int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey) | ||
| 508 | { | ||
| 509 | return(ASN1_i2d_fp(i2d_PUBKEY,fp,(unsigned char *)pkey)); | ||
| 510 | } | ||
| 511 | |||
| 512 | EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a) | ||
| 513 | { | ||
| 514 | return((EVP_PKEY *)ASN1_d2i_fp((char *(*)())EVP_PKEY_new, | ||
| 515 | (char *(*)())d2i_PUBKEY, (fp),(unsigned char **)(a))); | ||
| 516 | } | ||
| 517 | |||
| 495 | #endif | 518 | #endif |
| 496 | 519 | ||
| 497 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, | 520 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, |
| @@ -529,3 +552,14 @@ EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a) | |||
| 529 | return((EVP_PKEY *)ASN1_d2i_bio((char *(*)())EVP_PKEY_new, | 552 | return((EVP_PKEY *)ASN1_d2i_bio((char *(*)())EVP_PKEY_new, |
| 530 | (char *(*)())d2i_AutoPrivateKey, (bp),(unsigned char **)(a))); | 553 | (char *(*)())d2i_AutoPrivateKey, (bp),(unsigned char **)(a))); |
| 531 | } | 554 | } |
| 555 | |||
| 556 | int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey) | ||
| 557 | { | ||
| 558 | return(ASN1_i2d_bio(i2d_PUBKEY,bp,(unsigned char *)pkey)); | ||
| 559 | } | ||
| 560 | |||
| 561 | EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a) | ||
| 562 | { | ||
| 563 | return((EVP_PKEY *)ASN1_d2i_bio((char *(*)())EVP_PKEY_new, | ||
| 564 | (char *(*)())d2i_PUBKEY, (bp),(unsigned char **)(a))); | ||
| 565 | } | ||
diff --git a/src/lib/libssl/src/crypto/x509v3/Makefile.ssl b/src/lib/libssl/src/crypto/x509v3/Makefile.ssl index 1bb746d52d..f7c3a6ca13 100644 --- a/src/lib/libssl/src/crypto/x509v3/Makefile.ssl +++ b/src/lib/libssl/src/crypto/x509v3/Makefile.ssl | |||
| @@ -88,17 +88,19 @@ v3_akey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | |||
| 88 | v3_akey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 88 | v3_akey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 89 | v3_akey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 89 | v3_akey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 90 | v3_akey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 90 | v3_akey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 91 | v3_akey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 91 | v3_akey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h |
| 92 | v3_akey.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 92 | v3_akey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 93 | v3_akey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 93 | v3_akey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 94 | v3_akey.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 94 | v3_akey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 95 | v3_akey.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 95 | v3_akey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 96 | v3_akey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 96 | v3_akey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 97 | v3_akey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 97 | v3_akey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 98 | v3_akey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 98 | v3_akey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 99 | v3_akey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 99 | v3_akey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 100 | v3_akey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 100 | v3_akey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 101 | v3_akey.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 101 | v3_akey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 102 | v3_akey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 103 | v3_akey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 102 | v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 104 | v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 103 | v3_akey.o: ../cryptlib.h | 105 | v3_akey.o: ../cryptlib.h |
| 104 | v3_alt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 106 | v3_alt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -107,16 +109,18 @@ v3_alt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 107 | v3_alt.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 109 | v3_alt.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 108 | v3_alt.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 110 | v3_alt.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 109 | v3_alt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 111 | v3_alt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 110 | v3_alt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 112 | v3_alt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 111 | v3_alt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 113 | v3_alt.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 112 | v3_alt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 114 | v3_alt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 115 | v3_alt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 113 | v3_alt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 116 | v3_alt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 114 | v3_alt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 117 | v3_alt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 115 | v3_alt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 118 | v3_alt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 116 | v3_alt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 119 | v3_alt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 117 | v3_alt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 120 | v3_alt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 118 | v3_alt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 121 | v3_alt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 119 | v3_alt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 122 | v3_alt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 123 | v3_alt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 120 | v3_alt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 124 | v3_alt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 121 | v3_alt.o: ../../include/openssl/x509v3.h ../cryptlib.h | 125 | v3_alt.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 122 | v3_bcons.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 126 | v3_bcons.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| @@ -125,53 +129,60 @@ v3_bcons.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | |||
| 125 | v3_bcons.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 129 | v3_bcons.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 126 | v3_bcons.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 130 | v3_bcons.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 127 | v3_bcons.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 131 | v3_bcons.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 128 | v3_bcons.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 132 | v3_bcons.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h |
| 129 | v3_bcons.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 133 | v3_bcons.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 130 | v3_bcons.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 134 | v3_bcons.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 131 | v3_bcons.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 135 | v3_bcons.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 132 | v3_bcons.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 136 | v3_bcons.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 133 | v3_bcons.o: ../../include/openssl/opensslconf.h | 137 | v3_bcons.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 138 | v3_bcons.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 134 | v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 139 | v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 135 | v3_bcons.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 140 | v3_bcons.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 136 | v3_bcons.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 141 | v3_bcons.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 137 | v3_bcons.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 142 | v3_bcons.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 138 | v3_bcons.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 143 | v3_bcons.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 139 | v3_bcons.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 144 | v3_bcons.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 140 | v3_bcons.o: ../../include/openssl/x509v3.h ../cryptlib.h | 145 | v3_bcons.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 146 | v3_bcons.o: ../cryptlib.h | ||
| 141 | v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 147 | v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 142 | v3_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 148 | v3_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 143 | v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 149 | v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 144 | v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 150 | v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 145 | v3_bitst.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 151 | v3_bitst.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 146 | v3_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 152 | v3_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 147 | v3_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 153 | v3_bitst.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 148 | v3_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 154 | v3_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 149 | v3_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 155 | v3_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 156 | v3_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 150 | v3_bitst.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 157 | v3_bitst.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 151 | v3_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 158 | v3_bitst.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 159 | v3_bitst.o: ../../include/openssl/opensslconf.h | ||
| 152 | v3_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 160 | v3_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 153 | v3_bitst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 161 | v3_bitst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 154 | v3_bitst.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 162 | v3_bitst.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 155 | v3_bitst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 163 | v3_bitst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 156 | v3_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 164 | v3_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 157 | v3_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 165 | v3_bitst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 158 | v3_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h | 166 | v3_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 167 | v3_bitst.o: ../cryptlib.h | ||
| 159 | v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 168 | v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 160 | v3_conf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 169 | v3_conf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 161 | v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 170 | v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 162 | v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 171 | v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 163 | v3_conf.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 172 | v3_conf.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 164 | v3_conf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 173 | v3_conf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 165 | v3_conf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 174 | v3_conf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 166 | v3_conf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 175 | v3_conf.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 167 | v3_conf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 176 | v3_conf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 177 | v3_conf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 168 | v3_conf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 178 | v3_conf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 169 | v3_conf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 179 | v3_conf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 170 | v3_conf.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 180 | v3_conf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 171 | v3_conf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 181 | v3_conf.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 172 | v3_conf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 182 | v3_conf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 173 | v3_conf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 183 | v3_conf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 174 | v3_conf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 184 | v3_conf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 185 | v3_conf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 175 | v3_conf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 186 | v3_conf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 176 | v3_conf.o: ../../include/openssl/x509v3.h ../cryptlib.h | 187 | v3_conf.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 177 | v3_cpols.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 188 | v3_cpols.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| @@ -180,36 +191,40 @@ v3_cpols.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | |||
| 180 | v3_cpols.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 191 | v3_cpols.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 181 | v3_cpols.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 192 | v3_cpols.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 182 | v3_cpols.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 193 | v3_cpols.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 183 | v3_cpols.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 194 | v3_cpols.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h |
| 184 | v3_cpols.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 195 | v3_cpols.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 185 | v3_cpols.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 196 | v3_cpols.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 186 | v3_cpols.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 197 | v3_cpols.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 187 | v3_cpols.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 198 | v3_cpols.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 188 | v3_cpols.o: ../../include/openssl/opensslconf.h | 199 | v3_cpols.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 200 | v3_cpols.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 189 | v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 201 | v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 190 | v3_cpols.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 202 | v3_cpols.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 191 | v3_cpols.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 203 | v3_cpols.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 192 | v3_cpols.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 204 | v3_cpols.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 193 | v3_cpols.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 205 | v3_cpols.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 194 | v3_cpols.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 206 | v3_cpols.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 195 | v3_cpols.o: ../../include/openssl/x509v3.h ../cryptlib.h | 207 | v3_cpols.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 208 | v3_cpols.o: ../cryptlib.h | ||
| 196 | v3_crld.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 209 | v3_crld.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 197 | v3_crld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 210 | v3_crld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 198 | v3_crld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 211 | v3_crld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 199 | v3_crld.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 212 | v3_crld.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 200 | v3_crld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 213 | v3_crld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 201 | v3_crld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 214 | v3_crld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 202 | v3_crld.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 215 | v3_crld.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h |
| 203 | v3_crld.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 216 | v3_crld.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 204 | v3_crld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 217 | v3_crld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 205 | v3_crld.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 218 | v3_crld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 206 | v3_crld.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 219 | v3_crld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 207 | v3_crld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 220 | v3_crld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 208 | v3_crld.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 221 | v3_crld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 209 | v3_crld.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 222 | v3_crld.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 210 | v3_crld.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 223 | v3_crld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 211 | v3_crld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 224 | v3_crld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 212 | v3_crld.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 225 | v3_crld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 226 | v3_crld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 227 | v3_crld.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 213 | v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 228 | v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 214 | v3_crld.o: ../cryptlib.h | 229 | v3_crld.o: ../cryptlib.h |
| 215 | v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 230 | v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -218,16 +233,18 @@ v3_enum.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 218 | v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 233 | v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 219 | v3_enum.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 234 | v3_enum.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 220 | v3_enum.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 235 | v3_enum.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 221 | v3_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 236 | v3_enum.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 222 | v3_enum.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 237 | v3_enum.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 223 | v3_enum.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 238 | v3_enum.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 239 | v3_enum.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 224 | v3_enum.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 240 | v3_enum.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 225 | v3_enum.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 241 | v3_enum.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 226 | v3_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 242 | v3_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 227 | v3_enum.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 243 | v3_enum.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 228 | v3_enum.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 244 | v3_enum.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 229 | v3_enum.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 245 | v3_enum.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 230 | v3_enum.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 246 | v3_enum.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 247 | v3_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 231 | v3_enum.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 248 | v3_enum.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 232 | v3_enum.o: ../../include/openssl/x509v3.h ../cryptlib.h | 249 | v3_enum.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 233 | v3_extku.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 250 | v3_extku.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -236,35 +253,40 @@ v3_extku.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 236 | v3_extku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 253 | v3_extku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 237 | v3_extku.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 254 | v3_extku.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 238 | v3_extku.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 255 | v3_extku.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 239 | v3_extku.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 256 | v3_extku.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 240 | v3_extku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 257 | v3_extku.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 241 | v3_extku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 258 | v3_extku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 259 | v3_extku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 242 | v3_extku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 260 | v3_extku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 243 | v3_extku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 261 | v3_extku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 262 | v3_extku.o: ../../include/openssl/opensslconf.h | ||
| 244 | v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 263 | v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 245 | v3_extku.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 264 | v3_extku.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 246 | v3_extku.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 265 | v3_extku.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 247 | v3_extku.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 266 | v3_extku.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 248 | v3_extku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 267 | v3_extku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 249 | v3_extku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 268 | v3_extku.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 250 | v3_extku.o: ../../include/openssl/x509v3.h ../cryptlib.h | 269 | v3_extku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 270 | v3_extku.o: ../cryptlib.h | ||
| 251 | v3_genn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 271 | v3_genn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| 252 | v3_genn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 272 | v3_genn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h |
| 253 | v3_genn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 273 | v3_genn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 254 | v3_genn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 274 | v3_genn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 255 | v3_genn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 275 | v3_genn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 256 | v3_genn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 276 | v3_genn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 257 | v3_genn.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 277 | v3_genn.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h |
| 258 | v3_genn.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 278 | v3_genn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 259 | v3_genn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 279 | v3_genn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 260 | v3_genn.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 280 | v3_genn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 261 | v3_genn.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 281 | v3_genn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 262 | v3_genn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 282 | v3_genn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 263 | v3_genn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 283 | v3_genn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 264 | v3_genn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 284 | v3_genn.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 265 | v3_genn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 285 | v3_genn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 266 | v3_genn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 286 | v3_genn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 267 | v3_genn.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 287 | v3_genn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 288 | v3_genn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 289 | v3_genn.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 268 | v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 290 | v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 269 | v3_genn.o: ../cryptlib.h | 291 | v3_genn.o: ../cryptlib.h |
| 270 | v3_ia5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 292 | v3_ia5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -273,16 +295,18 @@ v3_ia5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 273 | v3_ia5.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 295 | v3_ia5.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 274 | v3_ia5.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 296 | v3_ia5.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 275 | v3_ia5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 297 | v3_ia5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 276 | v3_ia5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 298 | v3_ia5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 277 | v3_ia5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 299 | v3_ia5.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 278 | v3_ia5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 300 | v3_ia5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 301 | v3_ia5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 279 | v3_ia5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 302 | v3_ia5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 280 | v3_ia5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 303 | v3_ia5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 281 | v3_ia5.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 304 | v3_ia5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 282 | v3_ia5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 305 | v3_ia5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 283 | v3_ia5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 306 | v3_ia5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 284 | v3_ia5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 307 | v3_ia5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 285 | v3_ia5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 308 | v3_ia5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 309 | v3_ia5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 286 | v3_ia5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 310 | v3_ia5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 287 | v3_ia5.o: ../../include/openssl/x509v3.h ../cryptlib.h | 311 | v3_ia5.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 288 | v3_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 312 | v3_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| @@ -291,17 +315,19 @@ v3_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | |||
| 291 | v3_info.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 315 | v3_info.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 292 | v3_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 316 | v3_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 293 | v3_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 317 | v3_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 294 | v3_info.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 318 | v3_info.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h |
| 295 | v3_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 319 | v3_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 296 | v3_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 320 | v3_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 297 | v3_info.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 321 | v3_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 298 | v3_info.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 322 | v3_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 299 | v3_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 323 | v3_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 300 | v3_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 324 | v3_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 301 | v3_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 325 | v3_info.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 302 | v3_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 326 | v3_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 303 | v3_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 327 | v3_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 304 | v3_info.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 328 | v3_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 329 | v3_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 330 | v3_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 305 | v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 331 | v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 306 | v3_info.o: ../cryptlib.h | 332 | v3_info.o: ../cryptlib.h |
| 307 | v3_int.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 333 | v3_int.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -310,16 +336,18 @@ v3_int.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 310 | v3_int.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 336 | v3_int.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 311 | v3_int.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 337 | v3_int.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 312 | v3_int.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 338 | v3_int.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 313 | v3_int.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 339 | v3_int.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 314 | v3_int.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 340 | v3_int.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 315 | v3_int.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 341 | v3_int.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 342 | v3_int.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 316 | v3_int.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 343 | v3_int.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 317 | v3_int.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 344 | v3_int.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 318 | v3_int.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 345 | v3_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 319 | v3_int.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 346 | v3_int.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 320 | v3_int.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 347 | v3_int.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 321 | v3_int.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 348 | v3_int.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 322 | v3_int.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 349 | v3_int.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 350 | v3_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 323 | v3_int.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 351 | v3_int.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 324 | v3_int.o: ../../include/openssl/x509v3.h ../cryptlib.h | 352 | v3_int.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 325 | v3_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 353 | v3_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -328,16 +356,18 @@ v3_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 328 | v3_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 356 | v3_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 329 | v3_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 357 | v3_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 330 | v3_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 358 | v3_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 331 | v3_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 359 | v3_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 332 | v3_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 360 | v3_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 333 | v3_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 361 | v3_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 362 | v3_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 334 | v3_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 363 | v3_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 335 | v3_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 364 | v3_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 336 | v3_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 365 | v3_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 337 | v3_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 366 | v3_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 338 | v3_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 367 | v3_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 339 | v3_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 368 | v3_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 340 | v3_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 369 | v3_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 370 | v3_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 341 | v3_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 371 | v3_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 342 | v3_lib.o: ../../include/openssl/x509v3.h ../cryptlib.h ext_dat.h | 372 | v3_lib.o: ../../include/openssl/x509v3.h ../cryptlib.h ext_dat.h |
| 343 | v3_pku.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 373 | v3_pku.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| @@ -346,17 +376,19 @@ v3_pku.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | |||
| 346 | v3_pku.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 376 | v3_pku.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 347 | v3_pku.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 377 | v3_pku.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 348 | v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 378 | v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 349 | v3_pku.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 379 | v3_pku.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h |
| 350 | v3_pku.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 380 | v3_pku.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 351 | v3_pku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 381 | v3_pku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 352 | v3_pku.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 382 | v3_pku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 353 | v3_pku.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 383 | v3_pku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 354 | v3_pku.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 384 | v3_pku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 355 | v3_pku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 385 | v3_pku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 356 | v3_pku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 386 | v3_pku.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 357 | v3_pku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 387 | v3_pku.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 358 | v3_pku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 388 | v3_pku.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 359 | v3_pku.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | 389 | v3_pku.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 390 | v3_pku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 391 | v3_pku.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 360 | v3_pku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 392 | v3_pku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 361 | v3_pku.o: ../cryptlib.h | 393 | v3_pku.o: ../cryptlib.h |
| 362 | v3_prn.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 394 | v3_prn.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -365,16 +397,18 @@ v3_prn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 365 | v3_prn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 397 | v3_prn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 366 | v3_prn.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 398 | v3_prn.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 367 | v3_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 399 | v3_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 368 | v3_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 400 | v3_prn.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 369 | v3_prn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 401 | v3_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 370 | v3_prn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 402 | v3_prn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 403 | v3_prn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 371 | v3_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 404 | v3_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 372 | v3_prn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 405 | v3_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 373 | v3_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 406 | v3_prn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 374 | v3_prn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 407 | v3_prn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 375 | v3_prn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 408 | v3_prn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 376 | v3_prn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 409 | v3_prn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 377 | v3_prn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 410 | v3_prn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 411 | v3_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 378 | v3_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 412 | v3_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 379 | v3_prn.o: ../../include/openssl/x509v3.h ../cryptlib.h | 413 | v3_prn.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 380 | v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 414 | v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -383,16 +417,18 @@ v3_purp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 383 | v3_purp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 417 | v3_purp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 384 | v3_purp.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 418 | v3_purp.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 385 | v3_purp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 419 | v3_purp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 386 | v3_purp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 420 | v3_purp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 387 | v3_purp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 421 | v3_purp.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 388 | v3_purp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 422 | v3_purp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 423 | v3_purp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 389 | v3_purp.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 424 | v3_purp.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 390 | v3_purp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 425 | v3_purp.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 391 | v3_purp.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 426 | v3_purp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 392 | v3_purp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 427 | v3_purp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 393 | v3_purp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 428 | v3_purp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 394 | v3_purp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 429 | v3_purp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 395 | v3_purp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 430 | v3_purp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 431 | v3_purp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 396 | v3_purp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 432 | v3_purp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 397 | v3_purp.o: ../../include/openssl/x509v3.h ../cryptlib.h | 433 | v3_purp.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 398 | v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 434 | v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| @@ -401,16 +437,18 @@ v3_skey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | |||
| 401 | v3_skey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 437 | v3_skey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 402 | v3_skey.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 438 | v3_skey.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 403 | v3_skey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 439 | v3_skey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 404 | v3_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 440 | v3_skey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 405 | v3_skey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 441 | v3_skey.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 406 | v3_skey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 442 | v3_skey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 443 | v3_skey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 407 | v3_skey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 444 | v3_skey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 408 | v3_skey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 445 | v3_skey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 409 | v3_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 446 | v3_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 410 | v3_skey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 447 | v3_skey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 411 | v3_skey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 448 | v3_skey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 412 | v3_skey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 449 | v3_skey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 413 | v3_skey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 450 | v3_skey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 451 | v3_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 414 | v3_skey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 452 | v3_skey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 415 | v3_skey.o: ../../include/openssl/x509v3.h ../cryptlib.h | 453 | v3_skey.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 416 | v3_sxnet.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 454 | v3_sxnet.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h |
| @@ -419,51 +457,57 @@ v3_sxnet.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | |||
| 419 | v3_sxnet.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 457 | v3_sxnet.o: ../../include/openssl/cast.h ../../include/openssl/conf.h |
| 420 | v3_sxnet.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 458 | v3_sxnet.o: ../../include/openssl/crypto.h ../../include/openssl/des.h |
| 421 | v3_sxnet.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 459 | v3_sxnet.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 422 | v3_sxnet.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 460 | v3_sxnet.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h |
| 423 | v3_sxnet.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 461 | v3_sxnet.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 424 | v3_sxnet.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 462 | v3_sxnet.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 425 | v3_sxnet.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | 463 | v3_sxnet.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 426 | v3_sxnet.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | 464 | v3_sxnet.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 427 | v3_sxnet.o: ../../include/openssl/opensslconf.h | 465 | v3_sxnet.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h |
| 466 | v3_sxnet.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 428 | v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 467 | v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 429 | v3_sxnet.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 468 | v3_sxnet.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 430 | v3_sxnet.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 469 | v3_sxnet.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 431 | v3_sxnet.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 470 | v3_sxnet.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 432 | v3_sxnet.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 471 | v3_sxnet.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 433 | v3_sxnet.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 472 | v3_sxnet.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 434 | v3_sxnet.o: ../../include/openssl/x509v3.h ../cryptlib.h | 473 | v3_sxnet.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
| 474 | v3_sxnet.o: ../cryptlib.h | ||
| 435 | v3_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 475 | v3_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 436 | v3_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 476 | v3_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 437 | v3_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 477 | v3_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 438 | v3_utl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 478 | v3_utl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 439 | v3_utl.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 479 | v3_utl.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 440 | v3_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 480 | v3_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h |
| 441 | v3_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 481 | v3_utl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
| 442 | v3_utl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 482 | v3_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 443 | v3_utl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 483 | v3_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h |
| 484 | v3_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 444 | v3_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 485 | v3_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h |
| 445 | v3_utl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 486 | v3_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 446 | v3_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 487 | v3_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 447 | v3_utl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 488 | v3_utl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h |
| 448 | v3_utl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 489 | v3_utl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h |
| 449 | v3_utl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 490 | v3_utl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h |
| 450 | v3_utl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 491 | v3_utl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 492 | v3_utl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 451 | v3_utl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 493 | v3_utl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 452 | v3_utl.o: ../../include/openssl/x509v3.h ../cryptlib.h | 494 | v3_utl.o: ../../include/openssl/x509v3.h ../cryptlib.h |
| 453 | v3err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 495 | v3err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 454 | v3err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 496 | v3err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| 455 | v3err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 497 | v3err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h |
| 456 | v3err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 498 | v3err.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
| 457 | v3err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 499 | v3err.o: ../../include/openssl/des.h ../../include/openssl/dh.h |
| 500 | v3err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
| 458 | v3err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 501 | v3err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 459 | v3err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 502 | v3err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h |
| 460 | v3err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 503 | v3err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |
| 461 | v3err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 504 | v3err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h |
| 505 | v3err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 462 | v3err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 506 | v3err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 463 | v3err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 507 | v3err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h |
| 464 | v3err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 508 | v3err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h |
| 465 | v3err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 509 | v3err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h |
| 466 | v3err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 510 | v3err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 467 | v3err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 511 | v3err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 468 | v3err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 512 | v3err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 469 | v3err.o: ../../include/openssl/x509v3.h | 513 | v3err.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_akey.c b/src/lib/libssl/src/crypto/x509v3/v3_akey.c index 96c04fe4f5..0889a18993 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_akey.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_akey.c | |||
| @@ -132,7 +132,7 @@ void AUTHORITY_KEYID_free(AUTHORITY_KEYID *a) | |||
| 132 | M_ASN1_OCTET_STRING_free(a->keyid); | 132 | M_ASN1_OCTET_STRING_free(a->keyid); |
| 133 | sk_GENERAL_NAME_pop_free(a->issuer, GENERAL_NAME_free); | 133 | sk_GENERAL_NAME_pop_free(a->issuer, GENERAL_NAME_free); |
| 134 | M_ASN1_INTEGER_free (a->serial); | 134 | M_ASN1_INTEGER_free (a->serial); |
| 135 | Free (a); | 135 | OPENSSL_free (a); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, | 138 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, |
| @@ -142,7 +142,7 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, | |||
| 142 | if(akeyid->keyid) { | 142 | if(akeyid->keyid) { |
| 143 | tmp = hex_to_string(akeyid->keyid->data, akeyid->keyid->length); | 143 | tmp = hex_to_string(akeyid->keyid->data, akeyid->keyid->length); |
| 144 | X509V3_add_value("keyid", tmp, &extlist); | 144 | X509V3_add_value("keyid", tmp, &extlist); |
| 145 | Free(tmp); | 145 | OPENSSL_free(tmp); |
| 146 | } | 146 | } |
| 147 | if(akeyid->issuer) | 147 | if(akeyid->issuer) |
| 148 | extlist = i2v_GENERAL_NAMES(NULL, akeyid->issuer, extlist); | 148 | extlist = i2v_GENERAL_NAMES(NULL, akeyid->issuer, extlist); |
| @@ -150,7 +150,7 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, | |||
| 150 | tmp = hex_to_string(akeyid->serial->data, | 150 | tmp = hex_to_string(akeyid->serial->data, |
| 151 | akeyid->serial->length); | 151 | akeyid->serial->length); |
| 152 | X509V3_add_value("serial", tmp, &extlist); | 152 | X509V3_add_value("serial", tmp, &extlist); |
| 153 | Free(tmp); | 153 | OPENSSL_free(tmp); |
| 154 | } | 154 | } |
| 155 | return extlist; | 155 | return extlist; |
| 156 | } | 156 | } |
| @@ -224,7 +224,7 @@ if((issuer && !ikeyid) || (issuer == 2)) { | |||
| 224 | if(!(akeyid = AUTHORITY_KEYID_new())) goto err; | 224 | if(!(akeyid = AUTHORITY_KEYID_new())) goto err; |
| 225 | 225 | ||
| 226 | if(isname) { | 226 | if(isname) { |
| 227 | if(!(gens = sk_GENERAL_NAME_new(NULL)) || !(gen = GENERAL_NAME_new()) | 227 | if(!(gens = sk_GENERAL_NAME_new_null()) || !(gen = GENERAL_NAME_new()) |
| 228 | || !sk_GENERAL_NAME_push(gens, gen)) { | 228 | || !sk_GENERAL_NAME_push(gens, gen)) { |
| 229 | X509V3err(X509V3_F_V2I_AUTHORITY_KEYID,ERR_R_MALLOC_FAILURE); | 229 | X509V3err(X509V3_F_V2I_AUTHORITY_KEYID,ERR_R_MALLOC_FAILURE); |
| 230 | goto err; | 230 | goto err; |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_alt.c b/src/lib/libssl/src/crypto/x509v3/v3_alt.c index 5ccd1e0e3d..733919f250 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_alt.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_alt.c | |||
| @@ -160,7 +160,7 @@ static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method, | |||
| 160 | STACK_OF(GENERAL_NAME) *gens = NULL; | 160 | STACK_OF(GENERAL_NAME) *gens = NULL; |
| 161 | CONF_VALUE *cnf; | 161 | CONF_VALUE *cnf; |
| 162 | int i; | 162 | int i; |
| 163 | if(!(gens = sk_GENERAL_NAME_new(NULL))) { | 163 | if(!(gens = sk_GENERAL_NAME_new_null())) { |
| 164 | X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE); | 164 | X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE); |
| 165 | return NULL; | 165 | return NULL; |
| 166 | } | 166 | } |
| @@ -225,7 +225,7 @@ static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method, | |||
| 225 | STACK_OF(GENERAL_NAME) *gens = NULL; | 225 | STACK_OF(GENERAL_NAME) *gens = NULL; |
| 226 | CONF_VALUE *cnf; | 226 | CONF_VALUE *cnf; |
| 227 | int i; | 227 | int i; |
| 228 | if(!(gens = sk_GENERAL_NAME_new(NULL))) { | 228 | if(!(gens = sk_GENERAL_NAME_new_null())) { |
| 229 | X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE); | 229 | X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE); |
| 230 | return NULL; | 230 | return NULL; |
| 231 | } | 231 | } |
| @@ -304,7 +304,7 @@ STACK_OF(GENERAL_NAME) *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method, | |||
| 304 | STACK_OF(GENERAL_NAME) *gens = NULL; | 304 | STACK_OF(GENERAL_NAME) *gens = NULL; |
| 305 | CONF_VALUE *cnf; | 305 | CONF_VALUE *cnf; |
| 306 | int i; | 306 | int i; |
| 307 | if(!(gens = sk_GENERAL_NAME_new(NULL))) { | 307 | if(!(gens = sk_GENERAL_NAME_new_null())) { |
| 308 | X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE); | 308 | X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE); |
| 309 | return NULL; | 309 | return NULL; |
| 310 | } | 310 | } |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_bcons.c b/src/lib/libssl/src/crypto/x509v3/v3_bcons.c index 1e3edc205f..c576b8e955 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_bcons.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_bcons.c | |||
| @@ -123,7 +123,7 @@ void BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a) | |||
| 123 | { | 123 | { |
| 124 | if (a == NULL) return; | 124 | if (a == NULL) return; |
| 125 | M_ASN1_INTEGER_free (a->pathlen); | 125 | M_ASN1_INTEGER_free (a->pathlen); |
| 126 | Free (a); | 126 | OPENSSL_free (a); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static STACK_OF(CONF_VALUE) *i2v_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, | 129 | static STACK_OF(CONF_VALUE) *i2v_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_conf.c b/src/lib/libssl/src/crypto/x509v3/v3_conf.c index b2f03010cc..bdc9c1cbc1 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_conf.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_conf.c | |||
| @@ -167,7 +167,7 @@ static X509_EXTENSION *do_ext_i2d(X509V3_EXT_METHOD *method, int ext_nid, | |||
| 167 | X509_EXTENSION *ext; | 167 | X509_EXTENSION *ext; |
| 168 | /* Convert internal representation to DER */ | 168 | /* Convert internal representation to DER */ |
| 169 | ext_len = method->i2d(ext_struc, NULL); | 169 | ext_len = method->i2d(ext_struc, NULL); |
| 170 | if(!(ext_der = Malloc(ext_len))) goto merr; | 170 | if(!(ext_der = OPENSSL_malloc(ext_len))) goto merr; |
| 171 | p = ext_der; | 171 | p = ext_der; |
| 172 | method->i2d(ext_struc, &p); | 172 | method->i2d(ext_struc, &p); |
| 173 | if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr; | 173 | if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr; |
| @@ -255,7 +255,7 @@ extension = X509_EXTENSION_create_by_OBJ(NULL, obj, crit, oct); | |||
| 255 | err: | 255 | err: |
| 256 | ASN1_OBJECT_free(obj); | 256 | ASN1_OBJECT_free(obj); |
| 257 | M_ASN1_OCTET_STRING_free(oct); | 257 | M_ASN1_OCTET_STRING_free(oct); |
| 258 | if(ext_der) Free(ext_der); | 258 | if(ext_der) OPENSSL_free(ext_der); |
| 259 | return extension; | 259 | return extension; |
| 260 | } | 260 | } |
| 261 | 261 | ||
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_cpols.c b/src/lib/libssl/src/crypto/x509v3/v3_cpols.c index 466713b50d..8203ed7571 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_cpols.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_cpols.c | |||
| @@ -73,7 +73,7 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx, | |||
| 73 | STACK_OF(CONF_VALUE) *polstrs, int ia5org); | 73 | STACK_OF(CONF_VALUE) *polstrs, int ia5org); |
| 74 | static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, | 74 | static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, |
| 75 | STACK_OF(CONF_VALUE) *unot, int ia5org); | 75 | STACK_OF(CONF_VALUE) *unot, int ia5org); |
| 76 | static STACK *nref_nos(STACK_OF(CONF_VALUE) *nos); | 76 | static STACK_OF(ASN1_INTEGER) *nref_nos(STACK_OF(CONF_VALUE) *nos); |
| 77 | 77 | ||
| 78 | X509V3_EXT_METHOD v3_cpols = { | 78 | X509V3_EXT_METHOD v3_cpols = { |
| 79 | NID_certificate_policies, 0, | 79 | NID_certificate_policies, 0, |
| @@ -282,20 +282,22 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, | |||
| 282 | return NULL; | 282 | return NULL; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | static STACK *nref_nos(STACK_OF(CONF_VALUE) *nos) | 285 | static STACK_OF(ASN1_INTEGER) *nref_nos(STACK_OF(CONF_VALUE) *nos) |
| 286 | { | 286 | { |
| 287 | STACK *nnums; | 287 | STACK_OF(ASN1_INTEGER) *nnums; |
| 288 | CONF_VALUE *cnf; | 288 | CONF_VALUE *cnf; |
| 289 | ASN1_INTEGER *aint; | 289 | ASN1_INTEGER *aint; |
| 290 | |||
| 290 | int i; | 291 | int i; |
| 291 | if(!(nnums = sk_new_null())) goto merr; | 292 | |
| 293 | if(!(nnums = sk_ASN1_INTEGER_new_null())) goto merr; | ||
| 292 | for(i = 0; i < sk_CONF_VALUE_num(nos); i++) { | 294 | for(i = 0; i < sk_CONF_VALUE_num(nos); i++) { |
| 293 | cnf = sk_CONF_VALUE_value(nos, i); | 295 | cnf = sk_CONF_VALUE_value(nos, i); |
| 294 | if(!(aint = s2i_ASN1_INTEGER(NULL, cnf->name))) { | 296 | if(!(aint = s2i_ASN1_INTEGER(NULL, cnf->name))) { |
| 295 | X509V3err(X509V3_F_NREF_NOS,X509V3_R_INVALID_NUMBER); | 297 | X509V3err(X509V3_F_NREF_NOS,X509V3_R_INVALID_NUMBER); |
| 296 | goto err; | 298 | goto err; |
| 297 | } | 299 | } |
| 298 | if(!sk_push(nnums, (char *)aint)) goto merr; | 300 | if(!sk_ASN1_INTEGER_push(nnums, aint)) goto merr; |
| 299 | } | 301 | } |
| 300 | return nnums; | 302 | return nnums; |
| 301 | 303 | ||
| @@ -303,7 +305,7 @@ static STACK *nref_nos(STACK_OF(CONF_VALUE) *nos) | |||
| 303 | X509V3err(X509V3_F_NOTICE_SECTION,ERR_R_MALLOC_FAILURE); | 305 | X509V3err(X509V3_F_NOTICE_SECTION,ERR_R_MALLOC_FAILURE); |
| 304 | 306 | ||
| 305 | err: | 307 | err: |
| 306 | sk_pop_free(nnums, ASN1_STRING_free); | 308 | sk_ASN1_INTEGER_pop_free(nnums, ASN1_STRING_free); |
| 307 | return NULL; | 309 | return NULL; |
| 308 | } | 310 | } |
| 309 | 311 | ||
| @@ -399,7 +401,7 @@ void POLICYINFO_free(POLICYINFO *a) | |||
| 399 | if (a == NULL) return; | 401 | if (a == NULL) return; |
| 400 | ASN1_OBJECT_free(a->policyid); | 402 | ASN1_OBJECT_free(a->policyid); |
| 401 | sk_POLICYQUALINFO_pop_free(a->qualifiers, POLICYQUALINFO_free); | 403 | sk_POLICYQUALINFO_pop_free(a->qualifiers, POLICYQUALINFO_free); |
| 402 | Free (a); | 404 | OPENSSL_free (a); |
| 403 | } | 405 | } |
| 404 | 406 | ||
| 405 | static void print_qualifiers(BIO *out, STACK_OF(POLICYQUALINFO) *quals, | 407 | static void print_qualifiers(BIO *out, STACK_OF(POLICYQUALINFO) *quals, |
| @@ -441,15 +443,15 @@ static void print_notice(BIO *out, USERNOTICE *notice, int indent) | |||
| 441 | BIO_printf(out, "%*sOrganization: %s\n", indent, "", | 443 | BIO_printf(out, "%*sOrganization: %s\n", indent, "", |
| 442 | ref->organization->data); | 444 | ref->organization->data); |
| 443 | BIO_printf(out, "%*sNumber%s: ", indent, "", | 445 | BIO_printf(out, "%*sNumber%s: ", indent, "", |
| 444 | (sk_num(ref->noticenos) > 1) ? "s" : ""); | 446 | sk_ASN1_INTEGER_num(ref->noticenos) > 1 ? "s" : ""); |
| 445 | for(i = 0; i < sk_num(ref->noticenos); i++) { | 447 | for(i = 0; i < sk_ASN1_INTEGER_num(ref->noticenos); i++) { |
| 446 | ASN1_INTEGER *num; | 448 | ASN1_INTEGER *num; |
| 447 | char *tmp; | 449 | char *tmp; |
| 448 | num = (ASN1_INTEGER *)sk_value(ref->noticenos, i); | 450 | num = sk_ASN1_INTEGER_value(ref->noticenos, i); |
| 449 | if(i) BIO_puts(out, ", "); | 451 | if(i) BIO_puts(out, ", "); |
| 450 | tmp = i2s_ASN1_INTEGER(NULL, num); | 452 | tmp = i2s_ASN1_INTEGER(NULL, num); |
| 451 | BIO_puts(out, tmp); | 453 | BIO_puts(out, tmp); |
| 452 | Free(tmp); | 454 | OPENSSL_free(tmp); |
| 453 | } | 455 | } |
| 454 | BIO_puts(out, "\n"); | 456 | BIO_puts(out, "\n"); |
| 455 | } | 457 | } |
| @@ -551,7 +553,7 @@ void POLICYQUALINFO_free(POLICYQUALINFO *a) | |||
| 551 | } | 553 | } |
| 552 | 554 | ||
| 553 | ASN1_OBJECT_free(a->pqualid); | 555 | ASN1_OBJECT_free(a->pqualid); |
| 554 | Free (a); | 556 | OPENSSL_free (a); |
| 555 | } | 557 | } |
| 556 | 558 | ||
| 557 | int i2d_USERNOTICE(USERNOTICE *a, unsigned char **pp) | 559 | int i2d_USERNOTICE(USERNOTICE *a, unsigned char **pp) |
| @@ -597,7 +599,7 @@ void USERNOTICE_free(USERNOTICE *a) | |||
| 597 | if (a == NULL) return; | 599 | if (a == NULL) return; |
| 598 | NOTICEREF_free(a->noticeref); | 600 | NOTICEREF_free(a->noticeref); |
| 599 | M_DISPLAYTEXT_free(a->exptext); | 601 | M_DISPLAYTEXT_free(a->exptext); |
| 600 | Free (a); | 602 | OPENSSL_free (a); |
| 601 | } | 603 | } |
| 602 | 604 | ||
| 603 | int i2d_NOTICEREF(NOTICEREF *a, unsigned char **pp) | 605 | int i2d_NOTICEREF(NOTICEREF *a, unsigned char **pp) |
| @@ -605,12 +607,14 @@ int i2d_NOTICEREF(NOTICEREF *a, unsigned char **pp) | |||
| 605 | M_ASN1_I2D_vars(a); | 607 | M_ASN1_I2D_vars(a); |
| 606 | 608 | ||
| 607 | M_ASN1_I2D_len (a->organization, i2d_DISPLAYTEXT); | 609 | M_ASN1_I2D_len (a->organization, i2d_DISPLAYTEXT); |
| 608 | M_ASN1_I2D_len_SEQUENCE(a->noticenos, i2d_ASN1_INTEGER); | 610 | M_ASN1_I2D_len_SEQUENCE_type(ASN1_INTEGER, a->noticenos, |
| 611 | i2d_ASN1_INTEGER); | ||
| 609 | 612 | ||
| 610 | M_ASN1_I2D_seq_total(); | 613 | M_ASN1_I2D_seq_total(); |
| 611 | 614 | ||
| 612 | M_ASN1_I2D_put (a->organization, i2d_DISPLAYTEXT); | 615 | M_ASN1_I2D_put (a->organization, i2d_DISPLAYTEXT); |
| 613 | M_ASN1_I2D_put_SEQUENCE(a->noticenos, i2d_ASN1_INTEGER); | 616 | M_ASN1_I2D_put_SEQUENCE_type(ASN1_INTEGER, a->noticenos, |
| 617 | i2d_ASN1_INTEGER); | ||
| 614 | 618 | ||
| 615 | M_ASN1_I2D_finish(); | 619 | M_ASN1_I2D_finish(); |
| 616 | } | 620 | } |
| @@ -639,7 +643,8 @@ NOTICEREF *d2i_NOTICEREF(NOTICEREF **a, unsigned char **pp,long length) | |||
| 639 | if(!ret->organization) { | 643 | if(!ret->organization) { |
| 640 | M_ASN1_D2I_get(ret->organization, d2i_DISPLAYTEXT); | 644 | M_ASN1_D2I_get(ret->organization, d2i_DISPLAYTEXT); |
| 641 | } | 645 | } |
| 642 | M_ASN1_D2I_get_seq(ret->noticenos, d2i_ASN1_INTEGER, ASN1_STRING_free); | 646 | M_ASN1_D2I_get_seq_type(ASN1_INTEGER, ret->noticenos, d2i_ASN1_INTEGER, |
| 647 | ASN1_STRING_free); | ||
| 643 | M_ASN1_D2I_Finish(a, NOTICEREF_free, ASN1_F_D2I_NOTICEREF); | 648 | M_ASN1_D2I_Finish(a, NOTICEREF_free, ASN1_F_D2I_NOTICEREF); |
| 644 | } | 649 | } |
| 645 | 650 | ||
| @@ -647,8 +652,8 @@ void NOTICEREF_free(NOTICEREF *a) | |||
| 647 | { | 652 | { |
| 648 | if (a == NULL) return; | 653 | if (a == NULL) return; |
| 649 | M_DISPLAYTEXT_free(a->organization); | 654 | M_DISPLAYTEXT_free(a->organization); |
| 650 | sk_pop_free(a->noticenos, ASN1_STRING_free); | 655 | sk_ASN1_INTEGER_pop_free(a->noticenos, ASN1_STRING_free); |
| 651 | Free (a); | 656 | OPENSSL_free (a); |
| 652 | } | 657 | } |
| 653 | 658 | ||
| 654 | IMPLEMENT_STACK_OF(POLICYQUALINFO) | 659 | IMPLEMENT_STACK_OF(POLICYQUALINFO) |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_crld.c b/src/lib/libssl/src/crypto/x509v3/v3_crld.c index e459d2595a..67feea4017 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_crld.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_crld.c | |||
| @@ -87,7 +87,7 @@ static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method, | |||
| 87 | int i; | 87 | int i; |
| 88 | for(i = 0; i < sk_DIST_POINT_num(crld); i++) { | 88 | for(i = 0; i < sk_DIST_POINT_num(crld); i++) { |
| 89 | point = sk_DIST_POINT_value(crld, i); | 89 | point = sk_DIST_POINT_value(crld, i); |
| 90 | if(point->distpoint->fullname) { | 90 | if(point->distpoint && point->distpoint->fullname) { |
| 91 | exts = i2v_GENERAL_NAMES(NULL, | 91 | exts = i2v_GENERAL_NAMES(NULL, |
| 92 | point->distpoint->fullname, exts); | 92 | point->distpoint->fullname, exts); |
| 93 | } | 93 | } |
| @@ -95,7 +95,7 @@ static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method, | |||
| 95 | X509V3_add_value("reasons","<UNSUPPORTED>", &exts); | 95 | X509V3_add_value("reasons","<UNSUPPORTED>", &exts); |
| 96 | if(point->CRLissuer) | 96 | if(point->CRLissuer) |
| 97 | X509V3_add_value("CRLissuer","<UNSUPPORTED>", &exts); | 97 | X509V3_add_value("CRLissuer","<UNSUPPORTED>", &exts); |
| 98 | if(point->distpoint->relativename) | 98 | if(point->distpoint && point->distpoint->relativename) |
| 99 | X509V3_add_value("RelativeName","<UNSUPPORTED>", &exts); | 99 | X509V3_add_value("RelativeName","<UNSUPPORTED>", &exts); |
| 100 | } | 100 | } |
| 101 | return exts; | 101 | return exts; |
| @@ -109,7 +109,7 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method, | |||
| 109 | GENERAL_NAME *gen = NULL; | 109 | GENERAL_NAME *gen = NULL; |
| 110 | CONF_VALUE *cnf; | 110 | CONF_VALUE *cnf; |
| 111 | int i; | 111 | int i; |
| 112 | if(!(crld = sk_DIST_POINT_new(NULL))) goto merr; | 112 | if(!(crld = sk_DIST_POINT_new_null())) goto merr; |
| 113 | for(i = 0; i < sk_CONF_VALUE_num(nval); i++) { | 113 | for(i = 0; i < sk_CONF_VALUE_num(nval); i++) { |
| 114 | DIST_POINT *point; | 114 | DIST_POINT *point; |
| 115 | cnf = sk_CONF_VALUE_value(nval, i); | 115 | cnf = sk_CONF_VALUE_value(nval, i); |
| @@ -213,7 +213,7 @@ void DIST_POINT_free(DIST_POINT *a) | |||
| 213 | DIST_POINT_NAME_free(a->distpoint); | 213 | DIST_POINT_NAME_free(a->distpoint); |
| 214 | M_ASN1_BIT_STRING_free(a->reasons); | 214 | M_ASN1_BIT_STRING_free(a->reasons); |
| 215 | sk_GENERAL_NAME_pop_free(a->CRLissuer, GENERAL_NAME_free); | 215 | sk_GENERAL_NAME_pop_free(a->CRLissuer, GENERAL_NAME_free); |
| 216 | Free (a); | 216 | OPENSSL_free (a); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp) | 219 | int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp) |
| @@ -256,7 +256,7 @@ void DIST_POINT_NAME_free(DIST_POINT_NAME *a) | |||
| 256 | if (a == NULL) return; | 256 | if (a == NULL) return; |
| 257 | sk_X509_NAME_ENTRY_pop_free(a->relativename, X509_NAME_ENTRY_free); | 257 | sk_X509_NAME_ENTRY_pop_free(a->relativename, X509_NAME_ENTRY_free); |
| 258 | sk_GENERAL_NAME_pop_free(a->fullname, GENERAL_NAME_free); | 258 | sk_GENERAL_NAME_pop_free(a->fullname, GENERAL_NAME_free); |
| 259 | Free (a); | 259 | OPENSSL_free (a); |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, unsigned char **pp, | 262 | DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, unsigned char **pp, |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_extku.c b/src/lib/libssl/src/crypto/x509v3/v3_extku.c index e039d21cbf..53ec40a027 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_extku.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_extku.c | |||
| @@ -129,7 +129,7 @@ ASN1_OBJECT *objtmp; | |||
| 129 | CONF_VALUE *val; | 129 | CONF_VALUE *val; |
| 130 | int i; | 130 | int i; |
| 131 | 131 | ||
| 132 | if(!(extku = sk_ASN1_OBJECT_new(NULL))) { | 132 | if(!(extku = sk_ASN1_OBJECT_new_null())) { |
| 133 | X509V3err(X509V3_F_V2I_EXT_KU,ERR_R_MALLOC_FAILURE); | 133 | X509V3err(X509V3_F_V2I_EXT_KU,ERR_R_MALLOC_FAILURE); |
| 134 | return NULL; | 134 | return NULL; |
| 135 | } | 135 | } |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_genn.c b/src/lib/libssl/src/crypto/x509v3/v3_genn.c index 894afa7e03..d44751458e 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_genn.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_genn.c | |||
| @@ -211,7 +211,7 @@ void GENERAL_NAME_free(GENERAL_NAME *a) | |||
| 211 | break; | 211 | break; |
| 212 | 212 | ||
| 213 | } | 213 | } |
| 214 | Free (a); | 214 | OPENSSL_free (a); |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | /* Now the GeneralNames versions: a SEQUENCE OF GeneralName. These are needed as | 217 | /* Now the GeneralNames versions: a SEQUENCE OF GeneralName. These are needed as |
| @@ -220,7 +220,7 @@ void GENERAL_NAME_free(GENERAL_NAME *a) | |||
| 220 | 220 | ||
| 221 | STACK_OF(GENERAL_NAME) *GENERAL_NAMES_new() | 221 | STACK_OF(GENERAL_NAME) *GENERAL_NAMES_new() |
| 222 | { | 222 | { |
| 223 | return sk_GENERAL_NAME_new(NULL); | 223 | return sk_GENERAL_NAME_new_null(); |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *a) | 226 | void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *a) |
| @@ -286,6 +286,6 @@ void OTHERNAME_free(OTHERNAME *a) | |||
| 286 | if (a == NULL) return; | 286 | if (a == NULL) return; |
| 287 | ASN1_OBJECT_free(a->type_id); | 287 | ASN1_OBJECT_free(a->type_id); |
| 288 | ASN1_TYPE_free(a->value); | 288 | ASN1_TYPE_free(a->value); |
| 289 | Free (a); | 289 | OPENSSL_free (a); |
| 290 | } | 290 | } |
| 291 | 291 | ||
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_ia5.c b/src/lib/libssl/src/crypto/x509v3/v3_ia5.c index af3525f33e..f3bba38269 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_ia5.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_ia5.c | |||
| @@ -82,7 +82,7 @@ static char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, | |||
| 82 | { | 82 | { |
| 83 | char *tmp; | 83 | char *tmp; |
| 84 | if(!ia5 || !ia5->length) return NULL; | 84 | if(!ia5 || !ia5->length) return NULL; |
| 85 | tmp = Malloc(ia5->length + 1); | 85 | tmp = OPENSSL_malloc(ia5->length + 1); |
| 86 | memcpy(tmp, ia5->data, ia5->length); | 86 | memcpy(tmp, ia5->data, ia5->length); |
| 87 | tmp[ia5->length] = 0; | 87 | tmp[ia5->length] = 0; |
| 88 | return tmp; | 88 | return tmp; |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_info.c b/src/lib/libssl/src/crypto/x509v3/v3_info.c index 78d2135046..a045a629ee 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_info.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_info.c | |||
| @@ -94,7 +94,7 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method | |||
| 94 | if(!ret) break; | 94 | if(!ret) break; |
| 95 | vtmp = sk_CONF_VALUE_value(ret, i); | 95 | vtmp = sk_CONF_VALUE_value(ret, i); |
| 96 | i2t_ASN1_OBJECT(objtmp, 80, desc->method); | 96 | i2t_ASN1_OBJECT(objtmp, 80, desc->method); |
| 97 | ntmp = Malloc(strlen(objtmp) + strlen(vtmp->name) + 5); | 97 | ntmp = OPENSSL_malloc(strlen(objtmp) + strlen(vtmp->name) + 5); |
| 98 | if(!ntmp) { | 98 | if(!ntmp) { |
| 99 | X509V3err(X509V3_F_I2V_AUTHORITY_INFO_ACCESS, | 99 | X509V3err(X509V3_F_I2V_AUTHORITY_INFO_ACCESS, |
| 100 | ERR_R_MALLOC_FAILURE); | 100 | ERR_R_MALLOC_FAILURE); |
| @@ -103,7 +103,7 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method | |||
| 103 | strcpy(ntmp, objtmp); | 103 | strcpy(ntmp, objtmp); |
| 104 | strcat(ntmp, " - "); | 104 | strcat(ntmp, " - "); |
| 105 | strcat(ntmp, vtmp->name); | 105 | strcat(ntmp, vtmp->name); |
| 106 | Free(vtmp->name); | 106 | OPENSSL_free(vtmp->name); |
| 107 | vtmp->name = ntmp; | 107 | vtmp->name = ntmp; |
| 108 | 108 | ||
| 109 | } | 109 | } |
| @@ -119,7 +119,7 @@ static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD | |||
| 119 | ACCESS_DESCRIPTION *acc; | 119 | ACCESS_DESCRIPTION *acc; |
| 120 | int i, objlen; | 120 | int i, objlen; |
| 121 | char *objtmp, *ptmp; | 121 | char *objtmp, *ptmp; |
| 122 | if(!(ainfo = sk_ACCESS_DESCRIPTION_new(NULL))) { | 122 | if(!(ainfo = sk_ACCESS_DESCRIPTION_new_null())) { |
| 123 | X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE); | 123 | X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE); |
| 124 | return NULL; | 124 | return NULL; |
| 125 | } | 125 | } |
| @@ -140,7 +140,7 @@ static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD | |||
| 140 | ctmp.value = cnf->value; | 140 | ctmp.value = cnf->value; |
| 141 | if(!(acc->location = v2i_GENERAL_NAME(method, ctx, &ctmp))) | 141 | if(!(acc->location = v2i_GENERAL_NAME(method, ctx, &ctmp))) |
| 142 | goto err; | 142 | goto err; |
| 143 | if(!(objtmp = Malloc(objlen + 1))) { | 143 | if(!(objtmp = OPENSSL_malloc(objlen + 1))) { |
| 144 | X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE); | 144 | X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE); |
| 145 | goto err; | 145 | goto err; |
| 146 | } | 146 | } |
| @@ -150,10 +150,10 @@ static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD | |||
| 150 | if(!acc->method) { | 150 | if(!acc->method) { |
| 151 | X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,X509V3_R_BAD_OBJECT); | 151 | X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,X509V3_R_BAD_OBJECT); |
| 152 | ERR_add_error_data(2, "value=", objtmp); | 152 | ERR_add_error_data(2, "value=", objtmp); |
| 153 | Free(objtmp); | 153 | OPENSSL_free(objtmp); |
| 154 | goto err; | 154 | goto err; |
| 155 | } | 155 | } |
| 156 | Free(objtmp); | 156 | OPENSSL_free(objtmp); |
| 157 | 157 | ||
| 158 | } | 158 | } |
| 159 | return ainfo; | 159 | return ainfo; |
| @@ -204,12 +204,12 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a) | |||
| 204 | if (a == NULL) return; | 204 | if (a == NULL) return; |
| 205 | ASN1_OBJECT_free(a->method); | 205 | ASN1_OBJECT_free(a->method); |
| 206 | GENERAL_NAME_free(a->location); | 206 | GENERAL_NAME_free(a->location); |
| 207 | Free (a); | 207 | OPENSSL_free (a); |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void) | 210 | STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void) |
| 211 | { | 211 | { |
| 212 | return sk_ACCESS_DESCRIPTION_new(NULL); | 212 | return sk_ACCESS_DESCRIPTION_new_null(); |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a) | 215 | void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a) |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_lib.c b/src/lib/libssl/src/crypto/x509v3/v3_lib.c index 4242d130a2..ea86b9ebb9 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_lib.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_lib.c | |||
| @@ -64,25 +64,27 @@ | |||
| 64 | 64 | ||
| 65 | #include "ext_dat.h" | 65 | #include "ext_dat.h" |
| 66 | 66 | ||
| 67 | static STACK *ext_list = NULL; | 67 | static STACK_OF(X509V3_EXT_METHOD) *ext_list = NULL; |
| 68 | 68 | ||
| 69 | static int ext_cmp(X509V3_EXT_METHOD **a, X509V3_EXT_METHOD **b); | 69 | static int ext_cmp(const X509V3_EXT_METHOD * const *a, |
| 70 | const X509V3_EXT_METHOD * const *b); | ||
| 70 | static void ext_list_free(X509V3_EXT_METHOD *ext); | 71 | static void ext_list_free(X509V3_EXT_METHOD *ext); |
| 71 | 72 | ||
| 72 | int X509V3_EXT_add(X509V3_EXT_METHOD *ext) | 73 | int X509V3_EXT_add(X509V3_EXT_METHOD *ext) |
| 73 | { | 74 | { |
| 74 | if(!ext_list && !(ext_list = sk_new(ext_cmp))) { | 75 | if(!ext_list && !(ext_list = sk_X509V3_EXT_METHOD_new(ext_cmp))) { |
| 75 | X509V3err(X509V3_F_X509V3_EXT_ADD,ERR_R_MALLOC_FAILURE); | 76 | X509V3err(X509V3_F_X509V3_EXT_ADD,ERR_R_MALLOC_FAILURE); |
| 76 | return 0; | 77 | return 0; |
| 77 | } | 78 | } |
| 78 | if(!sk_push(ext_list, (char *)ext)) { | 79 | if(!sk_X509V3_EXT_METHOD_push(ext_list, ext)) { |
| 79 | X509V3err(X509V3_F_X509V3_EXT_ADD,ERR_R_MALLOC_FAILURE); | 80 | X509V3err(X509V3_F_X509V3_EXT_ADD,ERR_R_MALLOC_FAILURE); |
| 80 | return 0; | 81 | return 0; |
| 81 | } | 82 | } |
| 82 | return 1; | 83 | return 1; |
| 83 | } | 84 | } |
| 84 | 85 | ||
| 85 | static int ext_cmp(X509V3_EXT_METHOD **a, X509V3_EXT_METHOD **b) | 86 | static int ext_cmp(const X509V3_EXT_METHOD * const *a, |
| 87 | const X509V3_EXT_METHOD * const *b) | ||
| 86 | { | 88 | { |
| 87 | return ((*a)->ext_nid - (*b)->ext_nid); | 89 | return ((*a)->ext_nid - (*b)->ext_nid); |
| 88 | } | 90 | } |
| @@ -95,12 +97,12 @@ X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid) | |||
| 95 | tmp.ext_nid = nid; | 97 | tmp.ext_nid = nid; |
| 96 | ret = (X509V3_EXT_METHOD **) OBJ_bsearch((char *)&t, | 98 | ret = (X509V3_EXT_METHOD **) OBJ_bsearch((char *)&t, |
| 97 | (char *)standard_exts, STANDARD_EXTENSION_COUNT, | 99 | (char *)standard_exts, STANDARD_EXTENSION_COUNT, |
| 98 | sizeof(X509V3_EXT_METHOD *), (int (*)())ext_cmp); | 100 | sizeof(X509V3_EXT_METHOD *), (int (*)(const void *, const void *))ext_cmp); |
| 99 | if(ret) return *ret; | 101 | if(ret) return *ret; |
| 100 | if(!ext_list) return NULL; | 102 | if(!ext_list) return NULL; |
| 101 | idx = sk_find(ext_list, (char *)&tmp); | 103 | idx = sk_X509V3_EXT_METHOD_find(ext_list, &tmp); |
| 102 | if(idx == -1) return NULL; | 104 | if(idx == -1) return NULL; |
| 103 | return (X509V3_EXT_METHOD *)sk_value(ext_list, idx); | 105 | return sk_X509V3_EXT_METHOD_value(ext_list, idx); |
| 104 | } | 106 | } |
| 105 | 107 | ||
| 106 | X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext) | 108 | X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext) |
| @@ -125,7 +127,7 @@ int X509V3_EXT_add_alias(int nid_to, int nid_from) | |||
| 125 | X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,X509V3_R_EXTENSION_NOT_FOUND); | 127 | X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,X509V3_R_EXTENSION_NOT_FOUND); |
| 126 | return 0; | 128 | return 0; |
| 127 | } | 129 | } |
| 128 | if(!(tmpext = (X509V3_EXT_METHOD *)Malloc(sizeof(X509V3_EXT_METHOD)))) { | 130 | if(!(tmpext = (X509V3_EXT_METHOD *)OPENSSL_malloc(sizeof(X509V3_EXT_METHOD)))) { |
| 129 | X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,ERR_R_MALLOC_FAILURE); | 131 | X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,ERR_R_MALLOC_FAILURE); |
| 130 | return 0; | 132 | return 0; |
| 131 | } | 133 | } |
| @@ -137,13 +139,13 @@ int X509V3_EXT_add_alias(int nid_to, int nid_from) | |||
| 137 | 139 | ||
| 138 | void X509V3_EXT_cleanup(void) | 140 | void X509V3_EXT_cleanup(void) |
| 139 | { | 141 | { |
| 140 | sk_pop_free(ext_list, ext_list_free); | 142 | sk_X509V3_EXT_METHOD_pop_free(ext_list, ext_list_free); |
| 141 | ext_list = NULL; | 143 | ext_list = NULL; |
| 142 | } | 144 | } |
| 143 | 145 | ||
| 144 | static void ext_list_free(X509V3_EXT_METHOD *ext) | 146 | static void ext_list_free(X509V3_EXT_METHOD *ext) |
| 145 | { | 147 | { |
| 146 | if(ext->ext_flags & X509V3_EXT_DYNAMIC) Free(ext); | 148 | if(ext->ext_flags & X509V3_EXT_DYNAMIC) OPENSSL_free(ext); |
| 147 | } | 149 | } |
| 148 | 150 | ||
| 149 | /* Legacy function: we don't need to add standard extensions | 151 | /* Legacy function: we don't need to add standard extensions |
| @@ -213,9 +215,11 @@ void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx) | |||
| 213 | if(crit) *crit = found_ex->critical; | 215 | if(crit) *crit = found_ex->critical; |
| 214 | return X509V3_EXT_d2i(found_ex); | 216 | return X509V3_EXT_d2i(found_ex); |
| 215 | } | 217 | } |
| 216 | 218 | ||
| 217 | /* Extension not found */ | 219 | /* Extension not found */ |
| 218 | if(idx) *idx = -1; | 220 | if(idx) *idx = -1; |
| 219 | if(crit) *crit = -1; | 221 | if(crit) *crit = -1; |
| 220 | return NULL; | 222 | return NULL; |
| 221 | } | 223 | } |
| 224 | |||
| 225 | IMPLEMENT_STACK_OF(X509V3_EXT_METHOD) | ||
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_pku.c b/src/lib/libssl/src/crypto/x509v3/v3_pku.c index 30a62c6090..47f9e8f123 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_pku.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_pku.c | |||
| @@ -121,7 +121,7 @@ void PKEY_USAGE_PERIOD_free(PKEY_USAGE_PERIOD *a) | |||
| 121 | if (a == NULL) return; | 121 | if (a == NULL) return; |
| 122 | M_ASN1_GENERALIZEDTIME_free(a->notBefore); | 122 | M_ASN1_GENERALIZEDTIME_free(a->notBefore); |
| 123 | M_ASN1_GENERALIZEDTIME_free(a->notAfter); | 123 | M_ASN1_GENERALIZEDTIME_free(a->notAfter); |
| 124 | Free (a); | 124 | OPENSSL_free (a); |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, | 127 | static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_prn.c b/src/lib/libssl/src/crypto/x509v3/v3_prn.c index bee624c6be..dbc4fb1f16 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_prn.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_prn.c | |||
| @@ -133,7 +133,7 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent) | |||
| 133 | 133 | ||
| 134 | err: | 134 | err: |
| 135 | sk_CONF_VALUE_pop_free(nval, X509V3_conf_free); | 135 | sk_CONF_VALUE_pop_free(nval, X509V3_conf_free); |
| 136 | if(value) Free(value); | 136 | if(value) OPENSSL_free(value); |
| 137 | method->ext_free(ext_str); | 137 | method->ext_free(ext_str); |
| 138 | return ok; | 138 | return ok; |
| 139 | } | 139 | } |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_purp.c b/src/lib/libssl/src/crypto/x509v3/v3_purp.c index 5594a1d64f..867699b26f 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_purp.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_purp.c | |||
| @@ -59,21 +59,24 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 61 | #include <openssl/x509v3.h> | 61 | #include <openssl/x509v3.h> |
| 62 | #include <openssl/x509_vfy.h> | ||
| 62 | 63 | ||
| 63 | 64 | ||
| 64 | static void x509v3_cache_extensions(X509 *x); | 65 | static void x509v3_cache_extensions(X509 *x); |
| 65 | 66 | ||
| 66 | static int ca_check(X509 *x); | 67 | static int ca_check(const X509 *x); |
| 67 | static int check_purpose_ssl_client(X509_PURPOSE *xp, X509 *x, int ca); | 68 | static int check_ssl_ca(const X509 *x); |
| 68 | static int check_purpose_ssl_server(X509_PURPOSE *xp, X509 *x, int ca); | 69 | static int check_purpose_ssl_client(const X509_PURPOSE *xp, const X509 *x, int ca); |
| 69 | static int check_purpose_ns_ssl_server(X509_PURPOSE *xp, X509 *x, int ca); | 70 | static int check_purpose_ssl_server(const X509_PURPOSE *xp, const X509 *x, int ca); |
| 70 | static int purpose_smime(X509 *x, int ca); | 71 | static int check_purpose_ns_ssl_server(const X509_PURPOSE *xp, const X509 *x, int ca); |
| 71 | static int check_purpose_smime_sign(X509_PURPOSE *xp, X509 *x, int ca); | 72 | static int purpose_smime(const X509 *x, int ca); |
| 72 | static int check_purpose_smime_encrypt(X509_PURPOSE *xp, X509 *x, int ca); | 73 | static int check_purpose_smime_sign(const X509_PURPOSE *xp, const X509 *x, int ca); |
| 73 | static int check_purpose_crl_sign(X509_PURPOSE *xp, X509 *x, int ca); | 74 | static int check_purpose_smime_encrypt(const X509_PURPOSE *xp, const X509 *x, int ca); |
| 74 | static int no_check(X509_PURPOSE *xp, X509 *x, int ca); | 75 | static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x, int ca); |
| 75 | 76 | static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca); | |
| 76 | static int xp_cmp(X509_PURPOSE **a, X509_PURPOSE **b); | 77 | |
| 78 | static int xp_cmp(const X509_PURPOSE * const *a, | ||
| 79 | const X509_PURPOSE * const *b); | ||
| 77 | static void xptable_free(X509_PURPOSE *p); | 80 | static void xptable_free(X509_PURPOSE *p); |
| 78 | 81 | ||
| 79 | static X509_PURPOSE xstandard[] = { | 82 | static X509_PURPOSE xstandard[] = { |
| @@ -92,15 +95,19 @@ IMPLEMENT_STACK_OF(X509_PURPOSE) | |||
| 92 | 95 | ||
| 93 | static STACK_OF(X509_PURPOSE) *xptable = NULL; | 96 | static STACK_OF(X509_PURPOSE) *xptable = NULL; |
| 94 | 97 | ||
| 95 | static int xp_cmp(X509_PURPOSE **a, X509_PURPOSE **b) | 98 | static int xp_cmp(const X509_PURPOSE * const *a, |
| 99 | const X509_PURPOSE * const *b) | ||
| 96 | { | 100 | { |
| 97 | return (*a)->purpose - (*b)->purpose; | 101 | return (*a)->purpose - (*b)->purpose; |
| 98 | } | 102 | } |
| 99 | 103 | ||
| 104 | /* As much as I'd like to make X509_check_purpose use a "const" X509* | ||
| 105 | * I really can't because it does recalculate hashes and do other non-const | ||
| 106 | * things. */ | ||
| 100 | int X509_check_purpose(X509 *x, int id, int ca) | 107 | int X509_check_purpose(X509 *x, int id, int ca) |
| 101 | { | 108 | { |
| 102 | int idx; | 109 | int idx; |
| 103 | X509_PURPOSE *pt; | 110 | const X509_PURPOSE *pt; |
| 104 | if(!(x->ex_flags & EXFLAG_SET)) { | 111 | if(!(x->ex_flags & EXFLAG_SET)) { |
| 105 | CRYPTO_w_lock(CRYPTO_LOCK_X509); | 112 | CRYPTO_w_lock(CRYPTO_LOCK_X509); |
| 106 | x509v3_cache_extensions(x); | 113 | x509v3_cache_extensions(x); |
| @@ -152,7 +159,7 @@ int X509_PURPOSE_get_by_id(int purpose) | |||
| 152 | } | 159 | } |
| 153 | 160 | ||
| 154 | int X509_PURPOSE_add(int id, int trust, int flags, | 161 | int X509_PURPOSE_add(int id, int trust, int flags, |
| 155 | int (*ck)(X509_PURPOSE *, X509 *, int), | 162 | int (*ck)(const X509_PURPOSE *, const X509 *, int), |
| 156 | char *name, char *sname, void *arg) | 163 | char *name, char *sname, void *arg) |
| 157 | { | 164 | { |
| 158 | int idx; | 165 | int idx; |
| @@ -165,17 +172,17 @@ int X509_PURPOSE_add(int id, int trust, int flags, | |||
| 165 | idx = X509_PURPOSE_get_by_id(id); | 172 | idx = X509_PURPOSE_get_by_id(id); |
| 166 | /* Need a new entry */ | 173 | /* Need a new entry */ |
| 167 | if(idx == -1) { | 174 | if(idx == -1) { |
| 168 | if(!(ptmp = Malloc(sizeof(X509_PURPOSE)))) { | 175 | if(!(ptmp = OPENSSL_malloc(sizeof(X509_PURPOSE)))) { |
| 169 | X509V3err(X509V3_F_X509_PURPOSE_ADD,ERR_R_MALLOC_FAILURE); | 176 | X509V3err(X509V3_F_X509_PURPOSE_ADD,ERR_R_MALLOC_FAILURE); |
| 170 | return 0; | 177 | return 0; |
| 171 | } | 178 | } |
| 172 | ptmp->flags = X509_PURPOSE_DYNAMIC; | 179 | ptmp->flags = X509_PURPOSE_DYNAMIC; |
| 173 | } else ptmp = X509_PURPOSE_get0(idx); | 180 | } else ptmp = X509_PURPOSE_get0(idx); |
| 174 | 181 | ||
| 175 | /* Free existing name if dynamic */ | 182 | /* OPENSSL_free existing name if dynamic */ |
| 176 | if(ptmp->flags & X509_PURPOSE_DYNAMIC_NAME) { | 183 | if(ptmp->flags & X509_PURPOSE_DYNAMIC_NAME) { |
| 177 | Free(ptmp->name); | 184 | OPENSSL_free(ptmp->name); |
| 178 | Free(ptmp->sname); | 185 | OPENSSL_free(ptmp->sname); |
| 179 | } | 186 | } |
| 180 | /* dup supplied name */ | 187 | /* dup supplied name */ |
| 181 | ptmp->name = BUF_strdup(name); | 188 | ptmp->name = BUF_strdup(name); |
| @@ -214,10 +221,10 @@ static void xptable_free(X509_PURPOSE *p) | |||
| 214 | if (p->flags & X509_PURPOSE_DYNAMIC) | 221 | if (p->flags & X509_PURPOSE_DYNAMIC) |
| 215 | { | 222 | { |
| 216 | if (p->flags & X509_PURPOSE_DYNAMIC_NAME) { | 223 | if (p->flags & X509_PURPOSE_DYNAMIC_NAME) { |
| 217 | Free(p->name); | 224 | OPENSSL_free(p->name); |
| 218 | Free(p->sname); | 225 | OPENSSL_free(p->sname); |
| 219 | } | 226 | } |
| 220 | Free(p); | 227 | OPENSSL_free(p); |
| 221 | } | 228 | } |
| 222 | } | 229 | } |
| 223 | 230 | ||
| @@ -249,16 +256,18 @@ int X509_PURPOSE_get_trust(X509_PURPOSE *xp) | |||
| 249 | return xp->trust; | 256 | return xp->trust; |
| 250 | } | 257 | } |
| 251 | 258 | ||
| 252 | #ifndef NO_SHA | ||
| 253 | static void x509v3_cache_extensions(X509 *x) | 259 | static void x509v3_cache_extensions(X509 *x) |
| 254 | { | 260 | { |
| 255 | BASIC_CONSTRAINTS *bs; | 261 | BASIC_CONSTRAINTS *bs; |
| 256 | ASN1_BIT_STRING *usage; | 262 | ASN1_BIT_STRING *usage; |
| 257 | ASN1_BIT_STRING *ns; | 263 | ASN1_BIT_STRING *ns; |
| 258 | STACK_OF(ASN1_OBJECT) *extusage; | 264 | STACK_OF(ASN1_OBJECT) *extusage; |
| 265 | |||
| 259 | int i; | 266 | int i; |
| 260 | if(x->ex_flags & EXFLAG_SET) return; | 267 | if(x->ex_flags & EXFLAG_SET) return; |
| 268 | #ifndef NO_SHA | ||
| 261 | X509_digest(x, EVP_sha1(), x->sha1_hash, NULL); | 269 | X509_digest(x, EVP_sha1(), x->sha1_hash, NULL); |
| 270 | #endif | ||
| 262 | /* Does subject name match issuer ? */ | 271 | /* Does subject name match issuer ? */ |
| 263 | if(!X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x))) | 272 | if(!X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x))) |
| 264 | x->ex_flags |= EXFLAG_SS; | 273 | x->ex_flags |= EXFLAG_SS; |
| @@ -322,9 +331,10 @@ static void x509v3_cache_extensions(X509 *x) | |||
| 322 | x->ex_flags |= EXFLAG_NSCERT; | 331 | x->ex_flags |= EXFLAG_NSCERT; |
| 323 | ASN1_BIT_STRING_free(ns); | 332 | ASN1_BIT_STRING_free(ns); |
| 324 | } | 333 | } |
| 334 | x->skid =X509_get_ext_d2i(x, NID_subject_key_identifier, NULL, NULL); | ||
| 335 | x->akid =X509_get_ext_d2i(x, NID_authority_key_identifier, NULL, NULL); | ||
| 325 | x->ex_flags |= EXFLAG_SET; | 336 | x->ex_flags |= EXFLAG_SET; |
| 326 | } | 337 | } |
| 327 | #endif | ||
| 328 | 338 | ||
| 329 | /* CA checks common to all purposes | 339 | /* CA checks common to all purposes |
| 330 | * return codes: | 340 | * return codes: |
| @@ -342,7 +352,7 @@ static void x509v3_cache_extensions(X509 *x) | |||
| 342 | #define ns_reject(x, usage) \ | 352 | #define ns_reject(x, usage) \ |
| 343 | (((x)->ex_flags & EXFLAG_NSCERT) && !((x)->ex_nscert & (usage))) | 353 | (((x)->ex_flags & EXFLAG_NSCERT) && !((x)->ex_nscert & (usage))) |
| 344 | 354 | ||
| 345 | static int ca_check(X509 *x) | 355 | static int ca_check(const X509 *x) |
| 346 | { | 356 | { |
| 347 | /* keyUsage if present should allow cert signing */ | 357 | /* keyUsage if present should allow cert signing */ |
| 348 | if(ku_reject(x, KU_KEY_CERT_SIGN)) return 0; | 358 | if(ku_reject(x, KU_KEY_CERT_SIGN)) return 0; |
| @@ -356,22 +366,26 @@ static int ca_check(X509 *x) | |||
| 356 | } | 366 | } |
| 357 | } | 367 | } |
| 358 | 368 | ||
| 369 | /* Check SSL CA: common checks for SSL client and server */ | ||
| 370 | static int check_ssl_ca(const X509 *x) | ||
| 371 | { | ||
| 372 | int ca_ret; | ||
| 373 | ca_ret = ca_check(x); | ||
| 374 | if(!ca_ret) return 0; | ||
| 375 | /* check nsCertType if present */ | ||
| 376 | if(x->ex_flags & EXFLAG_NSCERT) { | ||
| 377 | if(x->ex_nscert & NS_SSL_CA) return ca_ret; | ||
| 378 | return 0; | ||
| 379 | } | ||
| 380 | if(ca_ret != 2) return ca_ret; | ||
| 381 | else return 0; | ||
| 382 | } | ||
| 383 | |||
| 359 | 384 | ||
| 360 | static int check_purpose_ssl_client(X509_PURPOSE *xp, X509 *x, int ca) | 385 | static int check_purpose_ssl_client(const X509_PURPOSE *xp, const X509 *x, int ca) |
| 361 | { | 386 | { |
| 362 | if(xku_reject(x,XKU_SSL_CLIENT)) return 0; | 387 | if(xku_reject(x,XKU_SSL_CLIENT)) return 0; |
| 363 | if(ca) { | 388 | if(ca) return check_ssl_ca(x); |
| 364 | int ca_ret; | ||
| 365 | ca_ret = ca_check(x); | ||
| 366 | if(!ca_ret) return 0; | ||
| 367 | /* check nsCertType if present */ | ||
| 368 | if(x->ex_flags & EXFLAG_NSCERT) { | ||
| 369 | if(x->ex_nscert & NS_SSL_CA) return ca_ret; | ||
| 370 | return 0; | ||
| 371 | } | ||
| 372 | if(ca_ret != 2) return ca_ret; | ||
| 373 | else return 0; | ||
| 374 | } | ||
| 375 | /* We need to do digital signatures with it */ | 389 | /* We need to do digital signatures with it */ |
| 376 | if(ku_reject(x,KU_DIGITAL_SIGNATURE)) return 0; | 390 | if(ku_reject(x,KU_DIGITAL_SIGNATURE)) return 0; |
| 377 | /* nsCertType if present should allow SSL client use */ | 391 | /* nsCertType if present should allow SSL client use */ |
| @@ -379,11 +393,10 @@ static int check_purpose_ssl_client(X509_PURPOSE *xp, X509 *x, int ca) | |||
| 379 | return 1; | 393 | return 1; |
| 380 | } | 394 | } |
| 381 | 395 | ||
| 382 | static int check_purpose_ssl_server(X509_PURPOSE *xp, X509 *x, int ca) | 396 | static int check_purpose_ssl_server(const X509_PURPOSE *xp, const X509 *x, int ca) |
| 383 | { | 397 | { |
| 384 | if(xku_reject(x,XKU_SSL_SERVER|XKU_SGC)) return 0; | 398 | if(xku_reject(x,XKU_SSL_SERVER|XKU_SGC)) return 0; |
| 385 | /* Otherwise same as SSL client for a CA */ | 399 | if(ca) return check_ssl_ca(x); |
| 386 | if(ca) return check_purpose_ssl_client(xp, x, 1); | ||
| 387 | 400 | ||
| 388 | if(ns_reject(x, NS_SSL_SERVER)) return 0; | 401 | if(ns_reject(x, NS_SSL_SERVER)) return 0; |
| 389 | /* Now as for keyUsage: we'll at least need to sign OR encipher */ | 402 | /* Now as for keyUsage: we'll at least need to sign OR encipher */ |
| @@ -393,7 +406,7 @@ static int check_purpose_ssl_server(X509_PURPOSE *xp, X509 *x, int ca) | |||
| 393 | 406 | ||
| 394 | } | 407 | } |
| 395 | 408 | ||
| 396 | static int check_purpose_ns_ssl_server(X509_PURPOSE *xp, X509 *x, int ca) | 409 | static int check_purpose_ns_ssl_server(const X509_PURPOSE *xp, const X509 *x, int ca) |
| 397 | { | 410 | { |
| 398 | int ret; | 411 | int ret; |
| 399 | ret = check_purpose_ssl_server(xp, x, ca); | 412 | ret = check_purpose_ssl_server(xp, x, ca); |
| @@ -404,7 +417,7 @@ static int check_purpose_ns_ssl_server(X509_PURPOSE *xp, X509 *x, int ca) | |||
| 404 | } | 417 | } |
| 405 | 418 | ||
| 406 | /* common S/MIME checks */ | 419 | /* common S/MIME checks */ |
| 407 | static int purpose_smime(X509 *x, int ca) | 420 | static int purpose_smime(const X509 *x, int ca) |
| 408 | { | 421 | { |
| 409 | if(xku_reject(x,XKU_SMIME)) return 0; | 422 | if(xku_reject(x,XKU_SMIME)) return 0; |
| 410 | if(ca) { | 423 | if(ca) { |
| @@ -428,7 +441,7 @@ static int purpose_smime(X509 *x, int ca) | |||
| 428 | return 1; | 441 | return 1; |
| 429 | } | 442 | } |
| 430 | 443 | ||
| 431 | static int check_purpose_smime_sign(X509_PURPOSE *xp, X509 *x, int ca) | 444 | static int check_purpose_smime_sign(const X509_PURPOSE *xp, const X509 *x, int ca) |
| 432 | { | 445 | { |
| 433 | int ret; | 446 | int ret; |
| 434 | ret = purpose_smime(x, ca); | 447 | ret = purpose_smime(x, ca); |
| @@ -437,7 +450,7 @@ static int check_purpose_smime_sign(X509_PURPOSE *xp, X509 *x, int ca) | |||
| 437 | return ret; | 450 | return ret; |
| 438 | } | 451 | } |
| 439 | 452 | ||
| 440 | static int check_purpose_smime_encrypt(X509_PURPOSE *xp, X509 *x, int ca) | 453 | static int check_purpose_smime_encrypt(const X509_PURPOSE *xp, const X509 *x, int ca) |
| 441 | { | 454 | { |
| 442 | int ret; | 455 | int ret; |
| 443 | ret = purpose_smime(x, ca); | 456 | ret = purpose_smime(x, ca); |
| @@ -446,7 +459,7 @@ static int check_purpose_smime_encrypt(X509_PURPOSE *xp, X509 *x, int ca) | |||
| 446 | return ret; | 459 | return ret; |
| 447 | } | 460 | } |
| 448 | 461 | ||
| 449 | static int check_purpose_crl_sign(X509_PURPOSE *xp, X509 *x, int ca) | 462 | static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x, int ca) |
| 450 | { | 463 | { |
| 451 | if(ca) { | 464 | if(ca) { |
| 452 | int ca_ret; | 465 | int ca_ret; |
| @@ -457,7 +470,64 @@ static int check_purpose_crl_sign(X509_PURPOSE *xp, X509 *x, int ca) | |||
| 457 | return 1; | 470 | return 1; |
| 458 | } | 471 | } |
| 459 | 472 | ||
| 460 | static int no_check(X509_PURPOSE *xp, X509 *x, int ca) | 473 | static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca) |
| 461 | { | 474 | { |
| 462 | return 1; | 475 | return 1; |
| 463 | } | 476 | } |
| 477 | |||
| 478 | /* Various checks to see if one certificate issued the second. | ||
| 479 | * This can be used to prune a set of possible issuer certificates | ||
| 480 | * which have been looked up using some simple method such as by | ||
| 481 | * subject name. | ||
| 482 | * These are: | ||
| 483 | * 1. Check issuer_name(subject) == subject_name(issuer) | ||
| 484 | * 2. If akid(subject) exists check it matches issuer | ||
| 485 | * 3. If key_usage(issuer) exists check it supports certificate signing | ||
| 486 | * returns 0 for OK, positive for reason for mismatch, reasons match | ||
| 487 | * codes for X509_verify_cert() | ||
| 488 | */ | ||
| 489 | |||
| 490 | int X509_check_issued(X509 *issuer, X509 *subject) | ||
| 491 | { | ||
| 492 | if(X509_NAME_cmp(X509_get_subject_name(issuer), | ||
| 493 | X509_get_issuer_name(subject))) | ||
| 494 | return X509_V_ERR_SUBJECT_ISSUER_MISMATCH; | ||
| 495 | x509v3_cache_extensions(issuer); | ||
| 496 | x509v3_cache_extensions(subject); | ||
| 497 | if(subject->akid) { | ||
| 498 | /* Check key ids (if present) */ | ||
| 499 | if(subject->akid->keyid && issuer->skid && | ||
| 500 | ASN1_OCTET_STRING_cmp(subject->akid->keyid, issuer->skid) ) | ||
| 501 | return X509_V_ERR_AKID_SKID_MISMATCH; | ||
| 502 | /* Check serial number */ | ||
| 503 | if(subject->akid->serial && | ||
| 504 | ASN1_INTEGER_cmp(X509_get_serialNumber(issuer), | ||
| 505 | subject->akid->serial)) | ||
| 506 | return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH; | ||
| 507 | /* Check issuer name */ | ||
| 508 | if(subject->akid->issuer) { | ||
| 509 | /* Ugh, for some peculiar reason AKID includes | ||
| 510 | * SEQUENCE OF GeneralName. So look for a DirName. | ||
| 511 | * There may be more than one but we only take any | ||
| 512 | * notice of the first. | ||
| 513 | */ | ||
| 514 | STACK_OF(GENERAL_NAME) *gens; | ||
| 515 | GENERAL_NAME *gen; | ||
| 516 | X509_NAME *nm = NULL; | ||
| 517 | int i; | ||
| 518 | gens = subject->akid->issuer; | ||
| 519 | for(i = 0; i < sk_GENERAL_NAME_num(gens); i++) { | ||
| 520 | gen = sk_GENERAL_NAME_value(gens, i); | ||
| 521 | if(gen->type == GEN_DIRNAME) { | ||
| 522 | nm = gen->d.dirn; | ||
| 523 | break; | ||
| 524 | } | ||
| 525 | } | ||
| 526 | if(nm && X509_NAME_cmp(nm, X509_get_issuer_name(issuer))) | ||
| 527 | return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH; | ||
| 528 | } | ||
| 529 | } | ||
| 530 | if(ku_reject(issuer, KU_KEY_CERT_SIGN)) return X509_V_ERR_KEYUSAGE_NO_CERTSIGN; | ||
| 531 | return X509_V_OK; | ||
| 532 | } | ||
| 533 | |||
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_sxnet.c b/src/lib/libssl/src/crypto/x509v3/v3_sxnet.c index 20ba8ac8d6..bfecacd336 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_sxnet.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_sxnet.c | |||
| @@ -132,7 +132,7 @@ void SXNET_free(SXNET *a) | |||
| 132 | if (a == NULL) return; | 132 | if (a == NULL) return; |
| 133 | M_ASN1_INTEGER_free(a->version); | 133 | M_ASN1_INTEGER_free(a->version); |
| 134 | sk_SXNETID_pop_free(a->ids, SXNETID_free); | 134 | sk_SXNETID_pop_free(a->ids, SXNETID_free); |
| 135 | Free (a); | 135 | OPENSSL_free (a); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | int i2d_SXNETID(SXNETID *a, unsigned char **pp) | 138 | int i2d_SXNETID(SXNETID *a, unsigned char **pp) |
| @@ -176,7 +176,7 @@ void SXNETID_free(SXNETID *a) | |||
| 176 | if (a == NULL) return; | 176 | if (a == NULL) return; |
| 177 | M_ASN1_INTEGER_free(a->zone); | 177 | M_ASN1_INTEGER_free(a->zone); |
| 178 | M_ASN1_OCTET_STRING_free(a->user); | 178 | M_ASN1_OCTET_STRING_free(a->user); |
| 179 | Free (a); | 179 | OPENSSL_free (a); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | static int sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, | 182 | static int sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, |
| @@ -192,7 +192,7 @@ static int sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, | |||
| 192 | id = sk_SXNETID_value(sx->ids, i); | 192 | id = sk_SXNETID_value(sx->ids, i); |
| 193 | tmp = i2s_ASN1_INTEGER(NULL, id->zone); | 193 | tmp = i2s_ASN1_INTEGER(NULL, id->zone); |
| 194 | BIO_printf(out, "\n%*sZone: %s, User: ", indent, "", tmp); | 194 | BIO_printf(out, "\n%*sZone: %s, User: ", indent, "", tmp); |
| 195 | Free(tmp); | 195 | OPENSSL_free(tmp); |
| 196 | M_ASN1_OCTET_STRING_print(out, id->user); | 196 | M_ASN1_OCTET_STRING_print(out, id->user); |
| 197 | } | 197 | } |
| 198 | return 1; | 198 | return 1; |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_utl.c b/src/lib/libssl/src/crypto/x509v3/v3_utl.c index 4c2c4a9483..619f161b58 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_utl.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_utl.c | |||
| @@ -65,6 +65,10 @@ | |||
| 65 | #include <openssl/x509v3.h> | 65 | #include <openssl/x509v3.h> |
| 66 | 66 | ||
| 67 | static char *strip_spaces(char *name); | 67 | static char *strip_spaces(char *name); |
| 68 | static int sk_strcmp(const char * const *a, const char * const *b); | ||
| 69 | static STACK *get_email(X509_NAME *name, STACK_OF(GENERAL_NAME) *gens); | ||
| 70 | static void str_free(void *str); | ||
| 71 | static int append_ia5(STACK **sk, ASN1_IA5STRING *email); | ||
| 68 | 72 | ||
| 69 | /* Add a CONF_VALUE name value pair to stack */ | 73 | /* Add a CONF_VALUE name value pair to stack */ |
| 70 | 74 | ||
| @@ -75,8 +79,8 @@ int X509V3_add_value(const char *name, const char *value, | |||
| 75 | char *tname = NULL, *tvalue = NULL; | 79 | char *tname = NULL, *tvalue = NULL; |
| 76 | if(name && !(tname = BUF_strdup(name))) goto err; | 80 | if(name && !(tname = BUF_strdup(name))) goto err; |
| 77 | if(value && !(tvalue = BUF_strdup(value))) goto err;; | 81 | if(value && !(tvalue = BUF_strdup(value))) goto err;; |
| 78 | if(!(vtmp = (CONF_VALUE *)Malloc(sizeof(CONF_VALUE)))) goto err; | 82 | if(!(vtmp = (CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE)))) goto err; |
| 79 | if(!*extlist && !(*extlist = sk_CONF_VALUE_new(NULL))) goto err; | 83 | if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err; |
| 80 | vtmp->section = NULL; | 84 | vtmp->section = NULL; |
| 81 | vtmp->name = tname; | 85 | vtmp->name = tname; |
| 82 | vtmp->value = tvalue; | 86 | vtmp->value = tvalue; |
| @@ -84,9 +88,9 @@ int X509V3_add_value(const char *name, const char *value, | |||
| 84 | return 1; | 88 | return 1; |
| 85 | err: | 89 | err: |
| 86 | X509V3err(X509V3_F_X509V3_ADD_VALUE,ERR_R_MALLOC_FAILURE); | 90 | X509V3err(X509V3_F_X509V3_ADD_VALUE,ERR_R_MALLOC_FAILURE); |
| 87 | if(vtmp) Free(vtmp); | 91 | if(vtmp) OPENSSL_free(vtmp); |
| 88 | if(tname) Free(tname); | 92 | if(tname) OPENSSL_free(tname); |
| 89 | if(tvalue) Free(tvalue); | 93 | if(tvalue) OPENSSL_free(tvalue); |
| 90 | return 0; | 94 | return 0; |
| 91 | } | 95 | } |
| 92 | 96 | ||
| @@ -101,10 +105,10 @@ int X509V3_add_value_uchar(const char *name, const unsigned char *value, | |||
| 101 | void X509V3_conf_free(CONF_VALUE *conf) | 105 | void X509V3_conf_free(CONF_VALUE *conf) |
| 102 | { | 106 | { |
| 103 | if(!conf) return; | 107 | if(!conf) return; |
| 104 | if(conf->name) Free(conf->name); | 108 | if(conf->name) OPENSSL_free(conf->name); |
| 105 | if(conf->value) Free(conf->value); | 109 | if(conf->value) OPENSSL_free(conf->value); |
| 106 | if(conf->section) Free(conf->section); | 110 | if(conf->section) OPENSSL_free(conf->section); |
| 107 | Free(conf); | 111 | OPENSSL_free(conf); |
| 108 | } | 112 | } |
| 109 | 113 | ||
| 110 | int X509V3_add_value_bool(const char *name, int asn1_bool, | 114 | int X509V3_add_value_bool(const char *name, int asn1_bool, |
| @@ -176,7 +180,7 @@ int X509V3_add_value_int(const char *name, ASN1_INTEGER *aint, | |||
| 176 | if(!aint) return 1; | 180 | if(!aint) return 1; |
| 177 | if(!(strtmp = i2s_ASN1_INTEGER(NULL, aint))) return 0; | 181 | if(!(strtmp = i2s_ASN1_INTEGER(NULL, aint))) return 0; |
| 178 | ret = X509V3_add_value(name, strtmp, extlist); | 182 | ret = X509V3_add_value(name, strtmp, extlist); |
| 179 | Free(strtmp); | 183 | OPENSSL_free(strtmp); |
| 180 | return ret; | 184 | return ret; |
| 181 | } | 185 | } |
| 182 | 186 | ||
| @@ -298,11 +302,11 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line) | |||
| 298 | } | 302 | } |
| 299 | X509V3_add_value(ntmp, NULL, &values); | 303 | X509V3_add_value(ntmp, NULL, &values); |
| 300 | } | 304 | } |
| 301 | Free(linebuf); | 305 | OPENSSL_free(linebuf); |
| 302 | return values; | 306 | return values; |
| 303 | 307 | ||
| 304 | err: | 308 | err: |
| 305 | Free(linebuf); | 309 | OPENSSL_free(linebuf); |
| 306 | sk_CONF_VALUE_pop_free(values, X509V3_conf_free); | 310 | sk_CONF_VALUE_pop_free(values, X509V3_conf_free); |
| 307 | return NULL; | 311 | return NULL; |
| 308 | 312 | ||
| @@ -325,8 +329,9 @@ static char *strip_spaces(char *name) | |||
| 325 | 329 | ||
| 326 | /* hex string utilities */ | 330 | /* hex string utilities */ |
| 327 | 331 | ||
| 328 | /* Given a buffer of length 'len' return a Malloc'ed string with its | 332 | /* Given a buffer of length 'len' return a OPENSSL_malloc'ed string with its |
| 329 | * hex representation | 333 | * hex representation |
| 334 | * @@@ (Contents of buffer are always kept in ASCII, also on EBCDIC machines) | ||
| 330 | */ | 335 | */ |
| 331 | 336 | ||
| 332 | char *hex_to_string(unsigned char *buffer, long len) | 337 | char *hex_to_string(unsigned char *buffer, long len) |
| @@ -336,7 +341,7 @@ char *hex_to_string(unsigned char *buffer, long len) | |||
| 336 | int i; | 341 | int i; |
| 337 | static char hexdig[] = "0123456789ABCDEF"; | 342 | static char hexdig[] = "0123456789ABCDEF"; |
| 338 | if(!buffer || !len) return NULL; | 343 | if(!buffer || !len) return NULL; |
| 339 | if(!(tmp = Malloc(len * 3 + 1))) { | 344 | if(!(tmp = OPENSSL_malloc(len * 3 + 1))) { |
| 340 | X509V3err(X509V3_F_HEX_TO_STRING,ERR_R_MALLOC_FAILURE); | 345 | X509V3err(X509V3_F_HEX_TO_STRING,ERR_R_MALLOC_FAILURE); |
| 341 | return NULL; | 346 | return NULL; |
| 342 | } | 347 | } |
| @@ -347,6 +352,10 @@ char *hex_to_string(unsigned char *buffer, long len) | |||
| 347 | *q++ = ':'; | 352 | *q++ = ':'; |
| 348 | } | 353 | } |
| 349 | q[-1] = 0; | 354 | q[-1] = 0; |
| 355 | #ifdef CHARSET_EBCDIC | ||
| 356 | ebcdic2ascii(tmp, tmp, q - tmp - 1); | ||
| 357 | #endif | ||
| 358 | |||
| 350 | return tmp; | 359 | return tmp; |
| 351 | } | 360 | } |
| 352 | 361 | ||
| @@ -362,14 +371,20 @@ unsigned char *string_to_hex(char *str, long *len) | |||
| 362 | X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_INVALID_NULL_ARGUMENT); | 371 | X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_INVALID_NULL_ARGUMENT); |
| 363 | return NULL; | 372 | return NULL; |
| 364 | } | 373 | } |
| 365 | if(!(hexbuf = Malloc(strlen(str) >> 1))) goto err; | 374 | if(!(hexbuf = OPENSSL_malloc(strlen(str) >> 1))) goto err; |
| 366 | for(p = (unsigned char *)str, q = hexbuf; *p;) { | 375 | for(p = (unsigned char *)str, q = hexbuf; *p;) { |
| 367 | ch = *p++; | 376 | ch = *p++; |
| 377 | #ifdef CHARSET_EBCDIC | ||
| 378 | ch = os_toebcdic[ch]; | ||
| 379 | #endif | ||
| 368 | if(ch == ':') continue; | 380 | if(ch == ':') continue; |
| 369 | cl = *p++; | 381 | cl = *p++; |
| 382 | #ifdef CHARSET_EBCDIC | ||
| 383 | cl = os_toebcdic[cl]; | ||
| 384 | #endif | ||
| 370 | if(!cl) { | 385 | if(!cl) { |
| 371 | X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_ODD_NUMBER_OF_DIGITS); | 386 | X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_ODD_NUMBER_OF_DIGITS); |
| 372 | Free(hexbuf); | 387 | OPENSSL_free(hexbuf); |
| 373 | return NULL; | 388 | return NULL; |
| 374 | } | 389 | } |
| 375 | if(isupper(ch)) ch = tolower(ch); | 390 | if(isupper(ch)) ch = tolower(ch); |
| @@ -391,12 +406,12 @@ unsigned char *string_to_hex(char *str, long *len) | |||
| 391 | return hexbuf; | 406 | return hexbuf; |
| 392 | 407 | ||
| 393 | err: | 408 | err: |
| 394 | if(hexbuf) Free(hexbuf); | 409 | if(hexbuf) OPENSSL_free(hexbuf); |
| 395 | X509V3err(X509V3_F_STRING_TO_HEX,ERR_R_MALLOC_FAILURE); | 410 | X509V3err(X509V3_F_STRING_TO_HEX,ERR_R_MALLOC_FAILURE); |
| 396 | return NULL; | 411 | return NULL; |
| 397 | 412 | ||
| 398 | badhex: | 413 | badhex: |
| 399 | Free(hexbuf); | 414 | OPENSSL_free(hexbuf); |
| 400 | X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_ILLEGAL_HEX_DIGIT); | 415 | X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_ILLEGAL_HEX_DIGIT); |
| 401 | return NULL; | 416 | return NULL; |
| 402 | 417 | ||
| @@ -416,3 +431,86 @@ int name_cmp(const char *name, const char *cmp) | |||
| 416 | if(!c || (c=='.')) return 0; | 431 | if(!c || (c=='.')) return 0; |
| 417 | return 1; | 432 | return 1; |
| 418 | } | 433 | } |
| 434 | |||
| 435 | static int sk_strcmp(const char * const *a, const char * const *b) | ||
| 436 | { | ||
| 437 | return strcmp(*a, *b); | ||
| 438 | } | ||
| 439 | |||
| 440 | STACK *X509_get1_email(X509 *x) | ||
| 441 | { | ||
| 442 | STACK_OF(GENERAL_NAME) *gens; | ||
| 443 | STACK *ret; | ||
| 444 | gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL); | ||
| 445 | ret = get_email(X509_get_subject_name(x), gens); | ||
| 446 | sk_GENERAL_NAME_pop_free(gens, GENERAL_NAME_free); | ||
| 447 | return ret; | ||
| 448 | } | ||
| 449 | |||
| 450 | STACK *X509_REQ_get1_email(X509_REQ *x) | ||
| 451 | { | ||
| 452 | STACK_OF(GENERAL_NAME) *gens; | ||
| 453 | STACK_OF(X509_EXTENSION) *exts; | ||
| 454 | STACK *ret; | ||
| 455 | exts = X509_REQ_get_extensions(x); | ||
| 456 | gens = X509V3_get_d2i(exts, NID_subject_alt_name, NULL, NULL); | ||
| 457 | ret = get_email(X509_REQ_get_subject_name(x), gens); | ||
| 458 | sk_GENERAL_NAME_pop_free(gens, GENERAL_NAME_free); | ||
| 459 | sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free); | ||
| 460 | return ret; | ||
| 461 | } | ||
| 462 | |||
| 463 | |||
| 464 | static STACK *get_email(X509_NAME *name, STACK_OF(GENERAL_NAME) *gens) | ||
| 465 | { | ||
| 466 | STACK *ret = NULL; | ||
| 467 | X509_NAME_ENTRY *ne; | ||
| 468 | ASN1_IA5STRING *email; | ||
| 469 | GENERAL_NAME *gen; | ||
| 470 | int i; | ||
| 471 | /* Now add any email address(es) to STACK */ | ||
| 472 | i = -1; | ||
| 473 | /* First supplied X509_NAME */ | ||
| 474 | while((i = X509_NAME_get_index_by_NID(name, | ||
| 475 | NID_pkcs9_emailAddress, i)) > 0) { | ||
| 476 | ne = X509_NAME_get_entry(name, i); | ||
| 477 | email = X509_NAME_ENTRY_get_data(ne); | ||
| 478 | if(!append_ia5(&ret, email)) return NULL; | ||
| 479 | } | ||
| 480 | for(i = 0; i < sk_GENERAL_NAME_num(gens); i++) | ||
| 481 | { | ||
| 482 | gen = sk_GENERAL_NAME_value(gens, i); | ||
| 483 | if(gen->type != GEN_EMAIL) continue; | ||
| 484 | if(!append_ia5(&ret, gen->d.ia5)) return NULL; | ||
| 485 | } | ||
| 486 | return ret; | ||
| 487 | } | ||
| 488 | |||
| 489 | static void str_free(void *str) | ||
| 490 | { | ||
| 491 | OPENSSL_free(str); | ||
| 492 | } | ||
| 493 | |||
| 494 | static int append_ia5(STACK **sk, ASN1_IA5STRING *email) | ||
| 495 | { | ||
| 496 | char *emtmp; | ||
| 497 | /* First some sanity checks */ | ||
| 498 | if(email->type != V_ASN1_IA5STRING) return 1; | ||
| 499 | if(!email->data || !email->length) return 1; | ||
| 500 | if(!*sk) *sk = sk_new(sk_strcmp); | ||
| 501 | if(!*sk) return 0; | ||
| 502 | /* Don't add duplicates */ | ||
| 503 | if(sk_find(*sk, (char *)email->data) != -1) return 1; | ||
| 504 | emtmp = BUF_strdup((char *)email->data); | ||
| 505 | if(!emtmp || !sk_push(*sk, emtmp)) { | ||
| 506 | X509_email_free(*sk); | ||
| 507 | *sk = NULL; | ||
| 508 | return 0; | ||
| 509 | } | ||
| 510 | return 1; | ||
| 511 | } | ||
| 512 | |||
| 513 | void X509_email_free(STACK *sk) | ||
| 514 | { | ||
| 515 | sk_pop_free(sk, str_free); | ||
| 516 | } | ||
diff --git a/src/lib/libssl/src/crypto/x509v3/x509v3.h b/src/lib/libssl/src/crypto/x509v3/x509v3.h index 96ceb7c4fb..0453b12d63 100644 --- a/src/lib/libssl/src/crypto/x509v3/x509v3.h +++ b/src/lib/libssl/src/crypto/x509v3/x509v3.h | |||
| @@ -58,14 +58,14 @@ | |||
| 58 | #ifndef HEADER_X509V3_H | 58 | #ifndef HEADER_X509V3_H |
| 59 | #define HEADER_X509V3_H | 59 | #define HEADER_X509V3_H |
| 60 | 60 | ||
| 61 | #ifdef __cplusplus | ||
| 62 | extern "C" { | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #include <openssl/bio.h> | 61 | #include <openssl/bio.h> |
| 66 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
| 67 | #include <openssl/conf.h> | 63 | #include <openssl/conf.h> |
| 68 | 64 | ||
| 65 | #ifdef __cplusplus | ||
| 66 | extern "C" { | ||
| 67 | #endif | ||
| 68 | |||
| 69 | /* Forward reference */ | 69 | /* Forward reference */ |
| 70 | struct v3_ext_method; | 70 | struct v3_ext_method; |
| 71 | struct v3_ext_ctx; | 71 | struct v3_ext_ctx; |
| @@ -131,6 +131,8 @@ void *db; | |||
| 131 | typedef struct v3_ext_method X509V3_EXT_METHOD; | 131 | typedef struct v3_ext_method X509V3_EXT_METHOD; |
| 132 | typedef struct v3_ext_ctx X509V3_CTX; | 132 | typedef struct v3_ext_ctx X509V3_CTX; |
| 133 | 133 | ||
| 134 | DECLARE_STACK_OF(X509V3_EXT_METHOD) | ||
| 135 | |||
| 134 | /* ext_flags values */ | 136 | /* ext_flags values */ |
| 135 | #define X509V3_EXT_DYNAMIC 0x1 | 137 | #define X509V3_EXT_DYNAMIC 0x1 |
| 136 | #define X509V3_EXT_CTX_DEP 0x2 | 138 | #define X509V3_EXT_CTX_DEP 0x2 |
| @@ -227,7 +229,7 @@ typedef struct SXNET_st { | |||
| 227 | 229 | ||
| 228 | typedef struct NOTICEREF_st { | 230 | typedef struct NOTICEREF_st { |
| 229 | ASN1_STRING *organization; | 231 | ASN1_STRING *organization; |
| 230 | STACK *noticenos; | 232 | STACK_OF(ASN1_INTEGER) *noticenos; |
| 231 | } NOTICEREF; | 233 | } NOTICEREF; |
| 232 | 234 | ||
| 233 | typedef struct USERNOTICE_st { | 235 | typedef struct USERNOTICE_st { |
| @@ -332,7 +334,8 @@ typedef struct x509_purpose_st { | |||
| 332 | int purpose; | 334 | int purpose; |
| 333 | int trust; /* Default trust ID */ | 335 | int trust; /* Default trust ID */ |
| 334 | int flags; | 336 | int flags; |
| 335 | int (*check_purpose)(struct x509_purpose_st *, X509 *, int); | 337 | int (*check_purpose)(const struct x509_purpose_st *, |
| 338 | const X509 *, int); | ||
| 336 | char *name; | 339 | char *name; |
| 337 | char *sname; | 340 | char *sname; |
| 338 | void *usr_data; | 341 | void *usr_data; |
| @@ -529,12 +532,13 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent); | |||
| 529 | int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); | 532 | int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); |
| 530 | 533 | ||
| 531 | int X509_check_purpose(X509 *x, int id, int ca); | 534 | int X509_check_purpose(X509 *x, int id, int ca); |
| 535 | int X509_check_issued(X509 *issuer, X509 *subject); | ||
| 532 | int X509_PURPOSE_get_count(void); | 536 | int X509_PURPOSE_get_count(void); |
| 533 | X509_PURPOSE * X509_PURPOSE_get0(int idx); | 537 | X509_PURPOSE * X509_PURPOSE_get0(int idx); |
| 534 | int X509_PURPOSE_get_by_sname(char *sname); | 538 | int X509_PURPOSE_get_by_sname(char *sname); |
| 535 | int X509_PURPOSE_get_by_id(int id); | 539 | int X509_PURPOSE_get_by_id(int id); |
| 536 | int X509_PURPOSE_add(int id, int trust, int flags, | 540 | int X509_PURPOSE_add(int id, int trust, int flags, |
| 537 | int (*ck)(X509_PURPOSE *, X509 *, int), | 541 | int (*ck)(const X509_PURPOSE *, const X509 *, int), |
| 538 | char *name, char *sname, void *arg); | 542 | char *name, char *sname, void *arg); |
| 539 | char *X509_PURPOSE_get0_name(X509_PURPOSE *xp); | 543 | char *X509_PURPOSE_get0_name(X509_PURPOSE *xp); |
| 540 | char *X509_PURPOSE_get0_sname(X509_PURPOSE *xp); | 544 | char *X509_PURPOSE_get0_sname(X509_PURPOSE *xp); |
| @@ -542,6 +546,11 @@ int X509_PURPOSE_get_trust(X509_PURPOSE *xp); | |||
| 542 | void X509_PURPOSE_cleanup(void); | 546 | void X509_PURPOSE_cleanup(void); |
| 543 | int X509_PURPOSE_get_id(X509_PURPOSE *); | 547 | int X509_PURPOSE_get_id(X509_PURPOSE *); |
| 544 | 548 | ||
| 549 | STACK *X509_get1_email(X509 *x); | ||
| 550 | STACK *X509_REQ_get1_email(X509_REQ *x); | ||
| 551 | void X509_email_free(STACK *sk); | ||
| 552 | |||
| 553 | |||
| 545 | /* BEGIN ERROR CODES */ | 554 | /* BEGIN ERROR CODES */ |
| 546 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 555 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
| 547 | * made after this point may be overwritten when the script is next run. | 556 | * made after this point may be overwritten when the script is next run. |
diff --git a/src/lib/libssl/src/demos/b64.c b/src/lib/libssl/src/demos/b64.c index ad86bc9b49..8e248e7e72 100644 --- a/src/lib/libssl/src/demos/b64.c +++ b/src/lib/libssl/src/demos/b64.c | |||
| @@ -177,11 +177,11 @@ bad: | |||
| 177 | if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize); | 177 | if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | strbuf=Malloc(SIZE); | 180 | strbuf=OPENSSL_malloc(SIZE); |
| 181 | buff=(unsigned char *)Malloc(EVP_ENCODE_LENGTH(bsize)); | 181 | buff=(unsigned char *)OPENSSL_malloc(EVP_ENCODE_LENGTH(bsize)); |
| 182 | if ((buff == NULL) || (strbuf == NULL)) | 182 | if ((buff == NULL) || (strbuf == NULL)) |
| 183 | { | 183 | { |
| 184 | BIO_printf(bio_err,"Malloc failure\n"); | 184 | BIO_printf(bio_err,"OPENSSL_malloc failure\n"); |
| 185 | goto end; | 185 | goto end; |
| 186 | } | 186 | } |
| 187 | 187 | ||
| @@ -259,8 +259,8 @@ bad: | |||
| 259 | BIO_printf(bio_err,"bytes written:%8ld\n",BIO_number_written(out)); | 259 | BIO_printf(bio_err,"bytes written:%8ld\n",BIO_number_written(out)); |
| 260 | } | 260 | } |
| 261 | end: | 261 | end: |
| 262 | if (strbuf != NULL) Free(strbuf); | 262 | if (strbuf != NULL) OPENSSL_free(strbuf); |
| 263 | if (buff != NULL) Free(buff); | 263 | if (buff != NULL) OPENSSL_free(buff); |
| 264 | if (in != NULL) BIO_free(in); | 264 | if (in != NULL) BIO_free(in); |
| 265 | if (out != NULL) BIO_free(out); | 265 | if (out != NULL) BIO_free(out); |
| 266 | if (benc != NULL) BIO_free(benc); | 266 | if (benc != NULL) BIO_free(benc); |
diff --git a/src/lib/libssl/src/doc/README b/src/lib/libssl/src/doc/README index 14469a82e3..6ecc14d994 100644 --- a/src/lib/libssl/src/doc/README +++ b/src/lib/libssl/src/doc/README | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | ssl/ssl.pod ......... Documentation of OpenSSL ssl.h+libssl.a | 4 | ssl/ssl.pod ......... Documentation of OpenSSL ssl.h+libssl.a |
| 5 | openssl.txt ......... Assembled documentation files for OpenSSL [not final] | 5 | openssl.txt ......... Assembled documentation files for OpenSSL [not final] |
| 6 | ssleay.txt .......... Assembled documentation of ancestor SSLeay [obsolete] | 6 | ssleay.txt .......... Assembled documentation of ancestor SSLeay [obsolete] |
| 7 | standards.txt ....... Assembled pointers to standards, RFCs or internet drafts | ||
| 8 | that are related to OpenSSL. | ||
| 7 | 9 | ||
| 8 | An archive of HTML documents for the SSLeay library is available from | 10 | An archive of HTML documents for the SSLeay library is available from |
| 9 | http://www.columbia.edu/~ariel/ssleay/ | 11 | http://www.columbia.edu/~ariel/ssleay/ |
diff --git a/src/lib/libssl/src/doc/apps/CA.pl.pod b/src/lib/libssl/src/doc/apps/CA.pl.pod index 9d287f0c4d..63cd1320cc 100644 --- a/src/lib/libssl/src/doc/apps/CA.pl.pod +++ b/src/lib/libssl/src/doc/apps/CA.pl.pod | |||
| @@ -69,9 +69,16 @@ list box), otherwise the name "My Certificate" is used. | |||
| 69 | 69 | ||
| 70 | calls the B<ca> program to sign a certificate request. It expects the request | 70 | calls the B<ca> program to sign a certificate request. It expects the request |
| 71 | to be in the file "newreq.pem". The new certificate is written to the file | 71 | to be in the file "newreq.pem". The new certificate is written to the file |
| 72 | "newcert.pem" except in the case of the B<-xcert> option when it is written | 72 | "newcert.pem" except in the case of the B<-xsign> option when it is written |
| 73 | to standard output. | 73 | to standard output. |
| 74 | 74 | ||
| 75 | |||
| 76 | =item B<-signCA> | ||
| 77 | |||
| 78 | this option is the same as the B<-signreq> option except it uses the configuration | ||
| 79 | file section B<v3_ca> and so makes the signed request a valid CA certificate. This | ||
| 80 | is useful when creating intermediate CA from a root CA. | ||
| 81 | |||
| 75 | =item B<-signcert> | 82 | =item B<-signcert> |
| 76 | 83 | ||
| 77 | this option is the same as B<-sign> except it expects a self signed certificate | 84 | this option is the same as B<-sign> except it expects a self signed certificate |
| @@ -122,7 +129,7 @@ Create the CA directories and files: | |||
| 122 | 129 | ||
| 123 | enter cacert.pem when prompted for the CA file name. | 130 | enter cacert.pem when prompted for the CA file name. |
| 124 | 131 | ||
| 125 | Create a DSA certificate request and privat key (a different set of parameters | 132 | Create a DSA certificate request and private key (a different set of parameters |
| 126 | can optionally be created first): | 133 | can optionally be created first): |
| 127 | 134 | ||
| 128 | openssl req -out newreq.pem -newkey dsa:dsap.pem | 135 | openssl req -out newreq.pem -newkey dsa:dsap.pem |
diff --git a/src/lib/libssl/src/doc/apps/ca.pod b/src/lib/libssl/src/doc/apps/ca.pod index 03209aa6b1..d352925864 100644 --- a/src/lib/libssl/src/doc/apps/ca.pod +++ b/src/lib/libssl/src/doc/apps/ca.pod | |||
| @@ -23,6 +23,7 @@ B<openssl> B<ca> | |||
| 23 | [B<-policy arg>] | 23 | [B<-policy arg>] |
| 24 | [B<-keyfile arg>] | 24 | [B<-keyfile arg>] |
| 25 | [B<-key arg>] | 25 | [B<-key arg>] |
| 26 | [B<-passin arg>] | ||
| 26 | [B<-cert file>] | 27 | [B<-cert file>] |
| 27 | [B<-in file>] | 28 | [B<-in file>] |
| 28 | [B<-out file>] | 29 | [B<-out file>] |
| @@ -99,6 +100,10 @@ the password used to encrypt the private key. Since on some | |||
| 99 | systems the command line arguments are visible (e.g. Unix with | 100 | systems the command line arguments are visible (e.g. Unix with |
| 100 | the 'ps' utility) this option should be used with caution. | 101 | the 'ps' utility) this option should be used with caution. |
| 101 | 102 | ||
| 103 | =item B<-passin arg> | ||
| 104 | |||
| 105 | the key password source. For more information about the format of B<arg> | ||
| 106 | see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>. | ||
| 102 | =item B<-verbose> | 107 | =item B<-verbose> |
| 103 | 108 | ||
| 104 | this prints extra details about the operations being performed. | 109 | this prints extra details about the operations being performed. |
| @@ -342,6 +347,10 @@ Sign a certificate request: | |||
| 342 | 347 | ||
| 343 | openssl ca -in req.pem -out newcert.pem | 348 | openssl ca -in req.pem -out newcert.pem |
| 344 | 349 | ||
| 350 | Sign a certificate request, using CA extensions: | ||
| 351 | |||
| 352 | openssl ca -in req.pem -extensions v3_ca -out newcert.pem | ||
| 353 | |||
| 345 | Generate a CRL | 354 | Generate a CRL |
| 346 | 355 | ||
| 347 | openssl ca -gencrl -out crl.pem | 356 | openssl ca -gencrl -out crl.pem |
diff --git a/src/lib/libssl/src/doc/apps/ciphers.pod b/src/lib/libssl/src/doc/apps/ciphers.pod index 2301e28251..21077614a7 100644 --- a/src/lib/libssl/src/doc/apps/ciphers.pod +++ b/src/lib/libssl/src/doc/apps/ciphers.pod | |||
| @@ -25,9 +25,13 @@ the appropriate cipherlist. | |||
| 25 | 25 | ||
| 26 | =item B<-v> | 26 | =item B<-v> |
| 27 | 27 | ||
| 28 | verbose option. List ciphers with a complete description of the authentication, | 28 | verbose option. List ciphers with a complete description of |
| 29 | key exchange, encryption and mac algorithms used along with any key size | 29 | protocol version (SSLv2 or SSLv3; the latter includes TLS), key exchange, |
| 30 | authentication, encryption and mac algorithms used along with any key size | ||
| 30 | restrictions and whether the algorithm is classed as an "export" cipher. | 31 | restrictions and whether the algorithm is classed as an "export" cipher. |
| 32 | Note that without the B<-v> option, ciphers may seem to appear twice | ||
| 33 | in a cipher list; this is when similar ciphers are available for | ||
| 34 | SSL v2 and for SSL v3/TLS v1. | ||
| 31 | 35 | ||
| 32 | =item B<-ssl3> | 36 | =item B<-ssl3> |
| 33 | 37 | ||
diff --git a/src/lib/libssl/src/doc/apps/dgst.pod b/src/lib/libssl/src/doc/apps/dgst.pod index fcfd3ecf23..1648742bcf 100644 --- a/src/lib/libssl/src/doc/apps/dgst.pod +++ b/src/lib/libssl/src/doc/apps/dgst.pod | |||
| @@ -2,25 +2,32 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | dgst, md5, md2, sha1, sha, mdc2, ripemd160 - message digests | 5 | dgst, md5, md4, md2, sha1, sha, mdc2, ripemd160 - message digests |
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | B<openssl> B<dgst> | 9 | B<openssl> B<dgst> |
| 10 | [B<-md5|-md2|-sha1|-sha|mdc2|-ripemd160>] | 10 | [B<-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1>] |
| 11 | [B<-c>] | 11 | [B<-c>] |
| 12 | [B<-d>] | 12 | [B<-d>] |
| 13 | [B<-hex>] | ||
| 14 | [B<-binary>] | ||
| 15 | [B<-out filename>] | ||
| 16 | [B<-sign filename>] | ||
| 17 | [B<-verify filename>] | ||
| 18 | [B<-prverify filename>] | ||
| 19 | [B<-signature filename>] | ||
| 13 | [B<file...>] | 20 | [B<file...>] |
| 14 | 21 | ||
| 15 | [B<md5|md2|sha1|sha|mdc2|ripemd160>] | 22 | [B<md5|md4|md2|sha1|sha|mdc2|ripemd160>] |
| 16 | [B<-c>] | 23 | [B<-c>] |
| 17 | [B<-d>] | 24 | [B<-d>] |
| 18 | [B<file...>] | 25 | [B<file...>] |
| 19 | 26 | ||
| 20 | =head1 DESCRIPTION | 27 | =head1 DESCRIPTION |
| 21 | 28 | ||
| 22 | The digest functions print out the message digest of a supplied file or files | 29 | The digest functions output the message digest of a supplied file or files |
| 23 | in hexadecimal form. | 30 | in hexadecimal form. They can also be used for digital signing and verification. |
| 24 | 31 | ||
| 25 | =head1 OPTIONS | 32 | =head1 OPTIONS |
| 26 | 33 | ||
| @@ -28,12 +35,51 @@ in hexadecimal form. | |||
| 28 | 35 | ||
| 29 | =item B<-c> | 36 | =item B<-c> |
| 30 | 37 | ||
| 31 | print out the digest in two digit groups separated by colons. | 38 | print out the digest in two digit groups separated by colons, only relevant if |
| 39 | B<hex> format output is used. | ||
| 32 | 40 | ||
| 33 | =item B<-d> | 41 | =item B<-d> |
| 34 | 42 | ||
| 35 | print out BIO debugging information. | 43 | print out BIO debugging information. |
| 36 | 44 | ||
| 45 | =item B<-hex> | ||
| 46 | |||
| 47 | digest is to be output as a hex dump. This is the default case for a "normal" | ||
| 48 | digest as opposed to a digital signature. | ||
| 49 | |||
| 50 | =item B<-binary> | ||
| 51 | |||
| 52 | output the digest or signature in binary form. | ||
| 53 | |||
| 54 | =item B<-out filename> | ||
| 55 | |||
| 56 | filename to output to, or standard output by default. | ||
| 57 | |||
| 58 | =item B<-sign filename> | ||
| 59 | |||
| 60 | digitally sign the digest using the private key in "filename". | ||
| 61 | |||
| 62 | =item B<-verify filename> | ||
| 63 | |||
| 64 | verify the signature using the the public key in "filename". | ||
| 65 | The output is either "Verification OK" or "Verification Failure". | ||
| 66 | |||
| 67 | =item B<-prverify filename> | ||
| 68 | |||
| 69 | verify the signature using the the private key in "filename". | ||
| 70 | |||
| 71 | =item B<-signature filename> | ||
| 72 | |||
| 73 | the actual signature to verify. | ||
| 74 | |||
| 75 | =item B<-rand file(s)> | ||
| 76 | |||
| 77 | a file or files containing random data used to seed the random number | ||
| 78 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | ||
| 79 | Multiple files can be specified separated by a OS-dependent character. | ||
| 80 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for | ||
| 81 | all others. | ||
| 82 | |||
| 37 | =item B<file...> | 83 | =item B<file...> |
| 38 | 84 | ||
| 39 | file or files to digest. If no files are specified then standard input is | 85 | file or files to digest. If no files are specified then standard input is |
| @@ -46,4 +92,13 @@ used. | |||
| 46 | The digest of choice for all new applications is SHA1. Other digests are | 92 | The digest of choice for all new applications is SHA1. Other digests are |
| 47 | however still widely used. | 93 | however still widely used. |
| 48 | 94 | ||
| 95 | If you wish to sign or verify data using the DSA algorithm then the dss1 | ||
| 96 | digest must be used. | ||
| 97 | |||
| 98 | A source of random numbers is required for certain signing algorithms, in | ||
| 99 | particular DSA. | ||
| 100 | |||
| 101 | The signing and verify options should only be used if a single file is | ||
| 102 | being signed or verified. | ||
| 103 | |||
| 49 | =cut | 104 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/dhparam.pod b/src/lib/libssl/src/doc/apps/dhparam.pod index 15aabf4ac8..ff8a6e5e5b 100644 --- a/src/lib/libssl/src/doc/apps/dhparam.pod +++ b/src/lib/libssl/src/doc/apps/dhparam.pod | |||
| @@ -73,7 +73,7 @@ input file is ignored and parameters are generated instead. | |||
| 73 | a file or files containing random data used to seed the random number | 73 | a file or files containing random data used to seed the random number |
| 74 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | 74 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). |
| 75 | Multiple files can be specified separated by a OS-dependent character. | 75 | Multiple files can be specified separated by a OS-dependent character. |
| 76 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | 76 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for |
| 77 | all others. | 77 | all others. |
| 78 | 78 | ||
| 79 | =item I<numbits> | 79 | =item I<numbits> |
diff --git a/src/lib/libssl/src/doc/apps/dsaparam.pod b/src/lib/libssl/src/doc/apps/dsaparam.pod index 8647f34698..50c2f61242 100644 --- a/src/lib/libssl/src/doc/apps/dsaparam.pod +++ b/src/lib/libssl/src/doc/apps/dsaparam.pod | |||
| @@ -73,7 +73,7 @@ parameters. | |||
| 73 | a file or files containing random data used to seed the random number | 73 | a file or files containing random data used to seed the random number |
| 74 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | 74 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). |
| 75 | Multiple files can be specified separated by a OS-dependent character. | 75 | Multiple files can be specified separated by a OS-dependent character. |
| 76 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | 76 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for |
| 77 | all others. | 77 | all others. |
| 78 | 78 | ||
| 79 | =item B<numbits> | 79 | =item B<numbits> |
diff --git a/src/lib/libssl/src/doc/apps/gendsa.pod b/src/lib/libssl/src/doc/apps/gendsa.pod index 3314ace517..74318fe7fb 100644 --- a/src/lib/libssl/src/doc/apps/gendsa.pod +++ b/src/lib/libssl/src/doc/apps/gendsa.pod | |||
| @@ -34,7 +34,7 @@ If none of these options is specified no encryption is used. | |||
| 34 | a file or files containing random data used to seed the random number | 34 | a file or files containing random data used to seed the random number |
| 35 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | 35 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). |
| 36 | Multiple files can be specified separated by a OS-dependent character. | 36 | Multiple files can be specified separated by a OS-dependent character. |
| 37 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | 37 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for |
| 38 | all others. | 38 | all others. |
| 39 | 39 | ||
| 40 | =item B<paramfile> | 40 | =item B<paramfile> |
diff --git a/src/lib/libssl/src/doc/apps/genrsa.pod b/src/lib/libssl/src/doc/apps/genrsa.pod index 70d35fef0a..cdcc03c123 100644 --- a/src/lib/libssl/src/doc/apps/genrsa.pod +++ b/src/lib/libssl/src/doc/apps/genrsa.pod | |||
| @@ -51,7 +51,7 @@ the public exponent to use, either 65537 or 3. The default is 65537. | |||
| 51 | a file or files containing random data used to seed the random number | 51 | a file or files containing random data used to seed the random number |
| 52 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | 52 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). |
| 53 | Multiple files can be specified separated by a OS-dependent character. | 53 | Multiple files can be specified separated by a OS-dependent character. |
| 54 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | 54 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for |
| 55 | all others. | 55 | all others. |
| 56 | 56 | ||
| 57 | =item B<numbits> | 57 | =item B<numbits> |
diff --git a/src/lib/libssl/src/doc/apps/openssl.pod b/src/lib/libssl/src/doc/apps/openssl.pod index 2fc61b6c21..0cbd199d79 100644 --- a/src/lib/libssl/src/doc/apps/openssl.pod +++ b/src/lib/libssl/src/doc/apps/openssl.pod | |||
| @@ -83,9 +83,10 @@ CRL to PKCS#7 Conversion. | |||
| 83 | 83 | ||
| 84 | Message Digest Calculation. | 84 | Message Digest Calculation. |
| 85 | 85 | ||
| 86 | =item L<B<dh>|dh(1)> | 86 | =item B<dh> |
| 87 | 87 | ||
| 88 | Diffie-Hellman Data Management. | 88 | Diffie-Hellman Parameter Management. |
| 89 | Obsoleted by L<B<dhparam>|dhparam(1)>. | ||
| 89 | 90 | ||
| 90 | =item L<B<dsa>|dsa(1)> | 91 | =item L<B<dsa>|dsa(1)> |
| 91 | 92 | ||
| @@ -103,9 +104,14 @@ Encoding with Ciphers. | |||
| 103 | 104 | ||
| 104 | Error Number to Error String Conversion. | 105 | Error Number to Error String Conversion. |
| 105 | 106 | ||
| 106 | =item L<B<gendh>|gendh(1)> | 107 | =item L<B<dhparam>|dhparam(1)> |
| 108 | |||
| 109 | Generation and Management of Diffie-Hellman Parameters. | ||
| 110 | |||
| 111 | =item B<gendh> | ||
| 107 | 112 | ||
| 108 | Generation of Diffie-Hellman Parameters. | 113 | Generation of Diffie-Hellman Parameters. |
| 114 | Obsoleted by L<B<dhparam>|dhparam(1)>. | ||
| 109 | 115 | ||
| 110 | =item L<B<gendsa>|gendsa(1)> | 116 | =item L<B<gendsa>|gendsa(1)> |
| 111 | 117 | ||
| @@ -135,6 +141,10 @@ X.509 Certificate Signing Request (CSR) Management. | |||
| 135 | 141 | ||
| 136 | RSA Data Management. | 142 | RSA Data Management. |
| 137 | 143 | ||
| 144 | =item L<B<rsautl>|rsautl(1)> | ||
| 145 | |||
| 146 | RSA utility for signing, verification, encryption, and decryption. | ||
| 147 | |||
| 138 | =item L<B<s_client>|s_client(1)> | 148 | =item L<B<s_client>|s_client(1)> |
| 139 | 149 | ||
| 140 | This implements a generic SSL/TLS client which can establish a transparent | 150 | This implements a generic SSL/TLS client which can establish a transparent |
| @@ -309,7 +319,8 @@ L<enc(1)|enc(1)>, L<gendsa(1)|gendsa(1)>, | |||
| 309 | L<genrsa(1)|genrsa(1)>, L<nseq(1)|nseq(1)>, L<openssl(1)|openssl(1)>, | 319 | L<genrsa(1)|genrsa(1)>, L<nseq(1)|nseq(1)>, L<openssl(1)|openssl(1)>, |
| 310 | L<passwd(1)|passwd(1)>, | 320 | L<passwd(1)|passwd(1)>, |
| 311 | L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>, | 321 | L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>, |
| 312 | L<rand(1)|rand(1)>, L<req(1)|req(1)>, L<rsa(1)|rsa(1)>, L<s_client(1)|s_client(1)>, | 322 | L<rand(1)|rand(1)>, L<req(1)|req(1)>, L<rsa(1)|rsa(1)>, |
| 323 | L<rsautl(1)|rsautl(1)>, L<s_client(1)|s_client(1)>, | ||
| 313 | L<s_server(1)|s_server(1)>, L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>, | 324 | L<s_server(1)|s_server(1)>, L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>, |
| 314 | L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>, | 325 | L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>, |
| 315 | L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)> | 326 | L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)> |
diff --git a/src/lib/libssl/src/doc/apps/passwd.pod b/src/lib/libssl/src/doc/apps/passwd.pod index cee6a2f172..6e098940c7 100644 --- a/src/lib/libssl/src/doc/apps/passwd.pod +++ b/src/lib/libssl/src/doc/apps/passwd.pod | |||
| @@ -8,6 +8,7 @@ passwd - compute password hashes | |||
| 8 | 8 | ||
| 9 | B<openssl passwd> | 9 | B<openssl passwd> |
| 10 | [B<-crypt>] | 10 | [B<-crypt>] |
| 11 | [B<-1>] | ||
| 11 | [B<-apr1>] | 12 | [B<-apr1>] |
| 12 | [B<-salt> I<string>] | 13 | [B<-salt> I<string>] |
| 13 | [B<-in> I<file>] | 14 | [B<-in> I<file>] |
| @@ -22,8 +23,8 @@ The B<passwd> command computes the hash of a password typed at | |||
| 22 | run-time or the hash of each password in a list. The password list is | 23 | run-time or the hash of each password in a list. The password list is |
| 23 | taken from the named file for option B<-in file>, from stdin for | 24 | taken from the named file for option B<-in file>, from stdin for |
| 24 | option B<-stdin>, and from the command line otherwise. | 25 | option B<-stdin>, and from the command line otherwise. |
| 25 | The Unix standard algorithm B<crypt> and the MD5-based B<apr1> algorithm | 26 | The Unix standard algorithm B<crypt> and the MD5-based BSD password |
| 26 | are available. | 27 | algorithm B<1> and its Apache variant B<apr1> are available. |
| 27 | 28 | ||
| 28 | =head1 OPTIONS | 29 | =head1 OPTIONS |
| 29 | 30 | ||
| @@ -33,9 +34,13 @@ are available. | |||
| 33 | 34 | ||
| 34 | Use the B<crypt> algorithm (default). | 35 | Use the B<crypt> algorithm (default). |
| 35 | 36 | ||
| 37 | =item B<-1> | ||
| 38 | |||
| 39 | Use the MD5 based BSD password algorithm B<1>. | ||
| 40 | |||
| 36 | =item B<-apr1> | 41 | =item B<-apr1> |
| 37 | 42 | ||
| 38 | Use the B<apr1> algorithm. | 43 | Use the B<apr1> algorithm (Apache variant of the BSD algorithm). |
| 39 | 44 | ||
| 40 | =item B<-salt> I<string> | 45 | =item B<-salt> I<string> |
| 41 | 46 | ||
| @@ -64,6 +69,8 @@ to each password hash. | |||
| 64 | 69 | ||
| 65 | B<openssl passwd -crypt -salt xx password> prints B<xxj31ZMTZzkVA>. | 70 | B<openssl passwd -crypt -salt xx password> prints B<xxj31ZMTZzkVA>. |
| 66 | 71 | ||
| 72 | B<openssl passwd -1 -salt xxxxxxxx password> prints B<$1$xxxxxxxx$8XJIcl6ZXqBMCK0qFevqT1>. | ||
| 73 | |||
| 67 | B<openssl passwd -apr1 -salt xxxxxxxx password> prints B<$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0>. | 74 | B<openssl passwd -apr1 -salt xxxxxxxx password> prints B<$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0>. |
| 68 | 75 | ||
| 69 | =cut | 76 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/pkcs12.pod b/src/lib/libssl/src/doc/apps/pkcs12.pod index 241f9c4a8b..c4009998b8 100644 --- a/src/lib/libssl/src/doc/apps/pkcs12.pod +++ b/src/lib/libssl/src/doc/apps/pkcs12.pod | |||
| @@ -244,7 +244,7 @@ to be needed to use MAC iterations counts but they are now used by default. | |||
| 244 | a file or files containing random data used to seed the random number | 244 | a file or files containing random data used to seed the random number |
| 245 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | 245 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). |
| 246 | Multiple files can be specified separated by a OS-dependent character. | 246 | Multiple files can be specified separated by a OS-dependent character. |
| 247 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | 247 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for |
| 248 | all others. | 248 | all others. |
| 249 | 249 | ||
| 250 | =back | 250 | =back |
diff --git a/src/lib/libssl/src/doc/apps/rand.pod b/src/lib/libssl/src/doc/apps/rand.pod index f81eab0457..cbf8768801 100644 --- a/src/lib/libssl/src/doc/apps/rand.pod +++ b/src/lib/libssl/src/doc/apps/rand.pod | |||
| @@ -34,7 +34,7 @@ Write to I<file> instead of standard output. | |||
| 34 | Use specified file or files or EGD socket (see L<RAND_egd(3)|RAND_egd(3)>) | 34 | Use specified file or files or EGD socket (see L<RAND_egd(3)|RAND_egd(3)>) |
| 35 | for seeding the random number generator. | 35 | for seeding the random number generator. |
| 36 | Multiple files can be specified separated by a OS-dependent character. | 36 | Multiple files can be specified separated by a OS-dependent character. |
| 37 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | 37 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for |
| 38 | all others. | 38 | all others. |
| 39 | 39 | ||
| 40 | =item B<-base64> | 40 | =item B<-base64> |
diff --git a/src/lib/libssl/src/doc/apps/req.pod b/src/lib/libssl/src/doc/apps/req.pod index fde6ff2e9f..a3f54f45a3 100644 --- a/src/lib/libssl/src/doc/apps/req.pod +++ b/src/lib/libssl/src/doc/apps/req.pod | |||
| @@ -19,6 +19,7 @@ B<openssl> B<req> | |||
| 19 | [B<-verify>] | 19 | [B<-verify>] |
| 20 | [B<-modulus>] | 20 | [B<-modulus>] |
| 21 | [B<-new>] | 21 | [B<-new>] |
| 22 | [B<-rand file(s)>] | ||
| 22 | [B<-newkey rsa:bits>] | 23 | [B<-newkey rsa:bits>] |
| 23 | [B<-newkey dsa:file>] | 24 | [B<-newkey dsa:file>] |
| 24 | [B<-nodes>] | 25 | [B<-nodes>] |
| @@ -104,6 +105,14 @@ in the configuration file and any requested extensions. | |||
| 104 | If the B<-key> option is not used it will generate a new RSA private | 105 | If the B<-key> option is not used it will generate a new RSA private |
| 105 | key using information specified in the configuration file. | 106 | key using information specified in the configuration file. |
| 106 | 107 | ||
| 108 | =item B<-rand file(s)> | ||
| 109 | |||
| 110 | a file or files containing random data used to seed the random number | ||
| 111 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | ||
| 112 | Multiple files can be specified separated by a OS-dependent character. | ||
| 113 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for | ||
| 114 | all others. | ||
| 115 | |||
| 107 | =item B<-newkey arg> | 116 | =item B<-newkey arg> |
| 108 | 117 | ||
| 109 | this option creates a new certificate request and a new private | 118 | this option creates a new certificate request and a new private |
| @@ -158,6 +167,7 @@ when the B<-x509> option is being used this specifies the number of | |||
| 158 | days to certify the certificate for. The default is 30 days. | 167 | days to certify the certificate for. The default is 30 days. |
| 159 | 168 | ||
| 160 | =item B<-extensions section> | 169 | =item B<-extensions section> |
| 170 | |||
| 161 | =item B<-reqexts section> | 171 | =item B<-reqexts section> |
| 162 | 172 | ||
| 163 | these options specify alternative sections to include certificate | 173 | these options specify alternative sections to include certificate |
diff --git a/src/lib/libssl/src/doc/apps/rsa.pod b/src/lib/libssl/src/doc/apps/rsa.pod index 62ad62e23d..f0e613ed05 100644 --- a/src/lib/libssl/src/doc/apps/rsa.pod +++ b/src/lib/libssl/src/doc/apps/rsa.pod | |||
| @@ -14,6 +14,7 @@ B<openssl> B<rsa> | |||
| 14 | [B<-passin arg>] | 14 | [B<-passin arg>] |
| 15 | [B<-out filename>] | 15 | [B<-out filename>] |
| 16 | [B<-passout arg>] | 16 | [B<-passout arg>] |
| 17 | [B<-sgckey>] | ||
| 17 | [B<-des>] | 18 | [B<-des>] |
| 18 | [B<-des3>] | 19 | [B<-des3>] |
| 19 | [B<-idea>] | 20 | [B<-idea>] |
| @@ -42,9 +43,8 @@ This specifies the input format. The B<DER> option uses an ASN1 DER encoded | |||
| 42 | form compatible with the PKCS#1 RSAPrivateKey or SubjectPublicKeyInfo format. | 43 | form compatible with the PKCS#1 RSAPrivateKey or SubjectPublicKeyInfo format. |
| 43 | The B<PEM> form is the default format: it consists of the B<DER> format base64 | 44 | The B<PEM> form is the default format: it consists of the B<DER> format base64 |
| 44 | encoded with additional header and footer lines. On input PKCS#8 format private | 45 | encoded with additional header and footer lines. On input PKCS#8 format private |
| 45 | keys are also accepted. The B<NET> form is a format compatible with older Netscape | 46 | keys are also accepted. The B<NET> form is a format is described in the B<NOTES> |
| 46 | servers and MS IIS, this uses unsalted RC4 for its encryption. It is not very | 47 | section. |
| 47 | secure and so should only be used when necessary. | ||
| 48 | 48 | ||
| 49 | =item B<-outform DER|NET|PEM> | 49 | =item B<-outform DER|NET|PEM> |
| 50 | 50 | ||
| @@ -74,6 +74,11 @@ filename. | |||
| 74 | the output file password source. For more information about the format of B<arg> | 74 | the output file password source. For more information about the format of B<arg> |
| 75 | see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>. | 75 | see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>. |
| 76 | 76 | ||
| 77 | =item B<-sgckey> | ||
| 78 | |||
| 79 | use the modified NET algorithm used with some versions of Microsoft IIS and SGC | ||
| 80 | keys. | ||
| 81 | |||
| 77 | =item B<-des|-des3|-idea> | 82 | =item B<-des|-des3|-idea> |
| 78 | 83 | ||
| 79 | These options encrypt the private key with the DES, triple DES, or the | 84 | These options encrypt the private key with the DES, triple DES, or the |
| @@ -126,6 +131,18 @@ The PEM public key format uses the header and footer lines: | |||
| 126 | -----BEGIN PUBLIC KEY----- | 131 | -----BEGIN PUBLIC KEY----- |
| 127 | -----END PUBLIC KEY----- | 132 | -----END PUBLIC KEY----- |
| 128 | 133 | ||
| 134 | The B<NET> form is a format compatible with older Netscape servers | ||
| 135 | and Microsoft IIS .key files, this uses unsalted RC4 for its encryption. | ||
| 136 | It is not very secure and so should only be used when necessary. | ||
| 137 | |||
| 138 | Some newer version of IIS have additional data in the exported .key | ||
| 139 | files. To use thse with the utility view the file with a binary editor | ||
| 140 | and look for the string "private-key", then trace back to the byte | ||
| 141 | sequence 0x30, 0x82 (this is an ASN1 SEQUENCE). Copy all the data | ||
| 142 | from this point onwards to another file and use that as the input | ||
| 143 | to the B<rsa> utility with the B<-inform NET> option. If you get | ||
| 144 | an error after entering the password try the B<-sgckey> option. | ||
| 145 | |||
| 129 | =head1 EXAMPLES | 146 | =head1 EXAMPLES |
| 130 | 147 | ||
| 131 | To remove the pass phrase on an RSA private key: | 148 | To remove the pass phrase on an RSA private key: |
| @@ -148,6 +165,14 @@ To just output the public part of a private key: | |||
| 148 | 165 | ||
| 149 | openssl rsa -in key.pem -pubout -out pubkey.pem | 166 | openssl rsa -in key.pem -pubout -out pubkey.pem |
| 150 | 167 | ||
| 168 | =head1 BUGS | ||
| 169 | |||
| 170 | The command line password arguments don't currently work with | ||
| 171 | B<NET> format. | ||
| 172 | |||
| 173 | There should be an option that automatically handles .key files, | ||
| 174 | without having to manually edit them. | ||
| 175 | |||
| 151 | =head1 SEE ALSO | 176 | =head1 SEE ALSO |
| 152 | 177 | ||
| 153 | L<pkcs8(1)|pkcs8(1)>, L<dsa(1)|dsa(1)>, L<genrsa(1)|genrsa(1)>, | 178 | L<pkcs8(1)|pkcs8(1)>, L<dsa(1)|dsa(1)>, L<genrsa(1)|genrsa(1)>, |
diff --git a/src/lib/libssl/src/doc/apps/rsautl.pod b/src/lib/libssl/src/doc/apps/rsautl.pod new file mode 100644 index 0000000000..7a334bc8d6 --- /dev/null +++ b/src/lib/libssl/src/doc/apps/rsautl.pod | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | rsautl - RSA utility | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | B<openssl> B<rsautl> | ||
| 10 | [B<-in file>] | ||
| 11 | [B<-out file>] | ||
| 12 | [B<-inkey file>] | ||
| 13 | [B<-pubin>] | ||
| 14 | [B<-certin>] | ||
| 15 | [B<-sign>] | ||
| 16 | [B<-verify>] | ||
| 17 | [B<-encrypt>] | ||
| 18 | [B<-decrypt>] | ||
| 19 | [B<-pkcs>] | ||
| 20 | [B<-ssl>] | ||
| 21 | [B<-raw>] | ||
| 22 | [B<-hexdump>] | ||
| 23 | [B<-asn1parse>] | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | The B<rsautl> command can be used to sign, verify, encrypt and decrypt | ||
| 28 | data using the RSA algorithm. | ||
| 29 | |||
| 30 | =head1 COMMAND OPTIONS | ||
| 31 | |||
| 32 | =over 4 | ||
| 33 | |||
| 34 | =item B<-in filename> | ||
| 35 | |||
| 36 | This specifies the input filename to read data from or standard input | ||
| 37 | if this option is not specified. | ||
| 38 | |||
| 39 | =item B<-out filename> | ||
| 40 | |||
| 41 | specifies the output filename to write to or standard output by | ||
| 42 | default. | ||
| 43 | |||
| 44 | =item B<-inkey file> | ||
| 45 | |||
| 46 | the input key file, by default it should be an RSA private key. | ||
| 47 | |||
| 48 | =item B<-pubin> | ||
| 49 | |||
| 50 | the input file is an RSA public key. | ||
| 51 | |||
| 52 | =item B<-certin> | ||
| 53 | |||
| 54 | the input is a certificate containing an RSA public key. | ||
| 55 | |||
| 56 | =item B<-sign> | ||
| 57 | |||
| 58 | sign the input data and output the signed result. This requires | ||
| 59 | and RSA private key. | ||
| 60 | |||
| 61 | =item B<-verify> | ||
| 62 | |||
| 63 | verify the input data and output the recovered data. | ||
| 64 | |||
| 65 | =item B<-encrypt> | ||
| 66 | |||
| 67 | encrypt the input data using an RSA public key. | ||
| 68 | |||
| 69 | =item B<-decrypt> | ||
| 70 | |||
| 71 | decrypt the input data using an RSA private key. | ||
| 72 | |||
| 73 | =item B<-pkcs, -oaep, -ssl, -raw> | ||
| 74 | |||
| 75 | the padding to use: PKCS#1 v1.5 (the default), PKCS#1 OAEP, | ||
| 76 | special padding used in SSL v2 backwards compatible handshakes, | ||
| 77 | or no padding, respectively. | ||
| 78 | For signatures, only B<-pkcs> and B<-raw> can be used. | ||
| 79 | |||
| 80 | =item B<-hexdump> | ||
| 81 | |||
| 82 | hex dump the output data. | ||
| 83 | |||
| 84 | =item B<-asn1parse> | ||
| 85 | |||
| 86 | asn1parse the output data, this is useful when combined with the | ||
| 87 | B<-verify> option. | ||
| 88 | |||
| 89 | =back | ||
| 90 | |||
| 91 | =head1 NOTES | ||
| 92 | |||
| 93 | B<rsautl> because it uses the RSA algorithm directly can only be | ||
| 94 | used to sign or verify small pieces of data. | ||
| 95 | |||
| 96 | =head1 EXAMPLES | ||
| 97 | |||
| 98 | Sign some data using a private key: | ||
| 99 | |||
| 100 | openssl rsautl -sign -in file -inkey key.pem -out sig | ||
| 101 | |||
| 102 | Recover the signed data | ||
| 103 | |||
| 104 | openssl rsautl -sign -in sig -inkey key.pem | ||
| 105 | |||
| 106 | Examine the raw signed data: | ||
| 107 | |||
| 108 | openssl rsautl -sign -in file -inkey key.pem -raw -hexdump | ||
| 109 | |||
| 110 | 0000 - 00 01 ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................ | ||
| 111 | 0010 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................ | ||
| 112 | 0020 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................ | ||
| 113 | 0030 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................ | ||
| 114 | 0040 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................ | ||
| 115 | 0050 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................ | ||
| 116 | 0060 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................ | ||
| 117 | 0070 - ff ff ff ff 00 68 65 6c-6c 6f 20 77 6f 72 6c 64 .....hello world | ||
| 118 | |||
| 119 | The PKCS#1 block formatting is evident from this. If this was done using | ||
| 120 | encrypt and decrypt the block would have been of type 2 (the second byte) | ||
| 121 | and random padding data visible instead of the 0xff bytes. | ||
| 122 | |||
| 123 | It is possible to analyse the signature of certificates using this | ||
| 124 | utility in conjunction with B<asn1parse>. Consider the self signed | ||
| 125 | example in certs/pca-cert.pem . Running B<asn1parse> as follows yields: | ||
| 126 | |||
| 127 | openssl asn1parse -in pca-cert.pem | ||
| 128 | |||
| 129 | 0:d=0 hl=4 l= 742 cons: SEQUENCE | ||
| 130 | 4:d=1 hl=4 l= 591 cons: SEQUENCE | ||
| 131 | 8:d=2 hl=2 l= 3 cons: cont [ 0 ] | ||
| 132 | 10:d=3 hl=2 l= 1 prim: INTEGER :02 | ||
| 133 | 13:d=2 hl=2 l= 1 prim: INTEGER :00 | ||
| 134 | 16:d=2 hl=2 l= 13 cons: SEQUENCE | ||
| 135 | 18:d=3 hl=2 l= 9 prim: OBJECT :md5WithRSAEncryption | ||
| 136 | 29:d=3 hl=2 l= 0 prim: NULL | ||
| 137 | 31:d=2 hl=2 l= 92 cons: SEQUENCE | ||
| 138 | 33:d=3 hl=2 l= 11 cons: SET | ||
| 139 | 35:d=4 hl=2 l= 9 cons: SEQUENCE | ||
| 140 | 37:d=5 hl=2 l= 3 prim: OBJECT :countryName | ||
| 141 | 42:d=5 hl=2 l= 2 prim: PRINTABLESTRING :AU | ||
| 142 | .... | ||
| 143 | 599:d=1 hl=2 l= 13 cons: SEQUENCE | ||
| 144 | 601:d=2 hl=2 l= 9 prim: OBJECT :md5WithRSAEncryption | ||
| 145 | 612:d=2 hl=2 l= 0 prim: NULL | ||
| 146 | 614:d=1 hl=3 l= 129 prim: BIT STRING | ||
| 147 | |||
| 148 | |||
| 149 | The final BIT STRING contains the actual signature. It can be extracted with: | ||
| 150 | |||
| 151 | openssl asn1parse -in pca-cert.pem -out sig -noout -strparse 614 | ||
| 152 | |||
| 153 | The certificate public key can be extracted with: | ||
| 154 | |||
| 155 | openssl x509 -in test/testx509.pem -pubout -noout >pubkey.pem | ||
| 156 | |||
| 157 | The signature can be analysed with: | ||
| 158 | |||
| 159 | openssl rsautl -in sig -verify -asn1parse -inkey pubkey.pem -pubin | ||
| 160 | |||
| 161 | 0:d=0 hl=2 l= 32 cons: SEQUENCE | ||
| 162 | 2:d=1 hl=2 l= 12 cons: SEQUENCE | ||
| 163 | 4:d=2 hl=2 l= 8 prim: OBJECT :md5 | ||
| 164 | 14:d=2 hl=2 l= 0 prim: NULL | ||
| 165 | 16:d=1 hl=2 l= 16 prim: OCTET STRING | ||
| 166 | 0000 - f3 46 9e aa 1a 4a 73 c9-37 ea 93 00 48 25 08 b5 .F...Js.7...H%.. | ||
| 167 | |||
| 168 | This is the parsed version of an ASN1 DigestInfo structure. It can be seen that | ||
| 169 | the digest used was md5. The actual part of the certificate that was signed can | ||
| 170 | be extracted with: | ||
| 171 | |||
| 172 | openssl asn1parse -in pca-cert.pem -out tbs -noout -strparse 4 | ||
| 173 | |||
| 174 | and its digest computed with: | ||
| 175 | |||
| 176 | openssl md5 -c tbs | ||
| 177 | MD5(tbs)= f3:46:9e:aa:1a:4a:73:c9:37:ea:93:00:48:25:08:b5 | ||
| 178 | |||
| 179 | which it can be seen agrees with the recovered value above. | ||
| 180 | |||
| 181 | =head1 SEE ALSO | ||
| 182 | |||
| 183 | L<dgst(1)|dgst(1)>, L<rsa(1)|rsa(1)>, L<genrsa(1)|genrsa(1)> | ||
diff --git a/src/lib/libssl/src/doc/apps/s_client.pod b/src/lib/libssl/src/doc/apps/s_client.pod index 2f80375319..9df1c07fb7 100644 --- a/src/lib/libssl/src/doc/apps/s_client.pod +++ b/src/lib/libssl/src/doc/apps/s_client.pod | |||
| @@ -32,6 +32,7 @@ B<openssl> B<s_client> | |||
| 32 | [B<-no_tls1>] | 32 | [B<-no_tls1>] |
| 33 | [B<-bugs>] | 33 | [B<-bugs>] |
| 34 | [B<-cipher cipherlist>] | 34 | [B<-cipher cipherlist>] |
| 35 | [B<-engine id>] | ||
| 35 | 36 | ||
| 36 | =head1 DESCRIPTION | 37 | =head1 DESCRIPTION |
| 37 | 38 | ||
| @@ -156,6 +157,13 @@ the server determines which cipher suite is used it should take the first | |||
| 156 | supported cipher in the list sent by the client. See the B<ciphers> | 157 | supported cipher in the list sent by the client. See the B<ciphers> |
| 157 | command for more information. | 158 | command for more information. |
| 158 | 159 | ||
| 160 | =item B<-engine id> | ||
| 161 | |||
| 162 | specifying an engine (by it's unique B<id> string) will cause B<s_client> | ||
| 163 | to attempt to obtain a functional reference to the specified engine, | ||
| 164 | thus initialising it if needed. The engine will then be set as the default | ||
| 165 | for all available algorithms. | ||
| 166 | |||
| 159 | =back | 167 | =back |
| 160 | 168 | ||
| 161 | =head1 CONNECTED COMMANDS | 169 | =head1 CONNECTED COMMANDS |
diff --git a/src/lib/libssl/src/doc/apps/s_server.pod b/src/lib/libssl/src/doc/apps/s_server.pod index 0f29c361d9..3a5bf46e28 100644 --- a/src/lib/libssl/src/doc/apps/s_server.pod +++ b/src/lib/libssl/src/doc/apps/s_server.pod | |||
| @@ -39,6 +39,7 @@ B<openssl> B<s_client> | |||
| 39 | [B<-hack>] | 39 | [B<-hack>] |
| 40 | [B<-www>] | 40 | [B<-www>] |
| 41 | [B<-WWW>] | 41 | [B<-WWW>] |
| 42 | [B<-engine id>] | ||
| 42 | 43 | ||
| 43 | =head1 DESCRIPTION | 44 | =head1 DESCRIPTION |
| 44 | 45 | ||
| @@ -186,6 +187,13 @@ emulates a simple web server. Pages will be resolved relative to the | |||
| 186 | current directory, for example if the URL https://myhost/page.html is | 187 | current directory, for example if the URL https://myhost/page.html is |
| 187 | requested the file ./page.html will be loaded. | 188 | requested the file ./page.html will be loaded. |
| 188 | 189 | ||
| 190 | =item B<-engine id> | ||
| 191 | |||
| 192 | specifying an engine (by it's unique B<id> string) will cause B<s_server> | ||
| 193 | to attempt to obtain a functional reference to the specified engine, | ||
| 194 | thus initialising it if needed. The engine will then be set as the default | ||
| 195 | for all available algorithms. | ||
| 196 | |||
| 189 | =back | 197 | =back |
| 190 | 198 | ||
| 191 | =head1 CONNECTED COMMANDS | 199 | =head1 CONNECTED COMMANDS |
diff --git a/src/lib/libssl/src/doc/apps/smime.pod b/src/lib/libssl/src/doc/apps/smime.pod index 631ecdc241..ce99b5c345 100644 --- a/src/lib/libssl/src/doc/apps/smime.pod +++ b/src/lib/libssl/src/doc/apps/smime.pod | |||
| @@ -22,8 +22,12 @@ B<openssl> B<smime> | |||
| 22 | [B<-signer file>] | 22 | [B<-signer file>] |
| 23 | [B<-recip file>] | 23 | [B<-recip file>] |
| 24 | [B<-in file>] | 24 | [B<-in file>] |
| 25 | [B<-inform SMIME|PEM|DER>] | ||
| 26 | [B<-passin arg>] | ||
| 25 | [B<-inkey file>] | 27 | [B<-inkey file>] |
| 26 | [B<-out file>] | 28 | [B<-out file>] |
| 29 | [B<-outform SMIME|PEM|DER>] | ||
| 30 | [B<-content file>] | ||
| 27 | [B<-to addr>] | 31 | [B<-to addr>] |
| 28 | [B<-from ad>] | 32 | [B<-from ad>] |
| 29 | [B<-subject s>] | 33 | [B<-subject s>] |
| @@ -74,11 +78,37 @@ takes an input message and writes out a PEM encoded PKCS#7 structure. | |||
| 74 | the input message to be encrypted or signed or the MIME message to | 78 | the input message to be encrypted or signed or the MIME message to |
| 75 | be decrypted or verified. | 79 | be decrypted or verified. |
| 76 | 80 | ||
| 81 | =item B<-inform SMIME|PEM|DER> | ||
| 82 | |||
| 83 | this specifies the input format for the PKCS#7 structure. The default | ||
| 84 | is B<SMIME> which reads an S/MIME format message. B<PEM> and B<DER> | ||
| 85 | format change this to expect PEM and DER format PKCS#7 structures | ||
| 86 | instead. This currently only affects the input format of the PKCS#7 | ||
| 87 | structure, if no PKCS#7 structure is being input (for example with | ||
| 88 | B<-encrypt> or B<-sign>) this option has no effect. | ||
| 89 | |||
| 77 | =item B<-out filename> | 90 | =item B<-out filename> |
| 78 | 91 | ||
| 79 | the message text that has been decrypted or verified or the output MIME | 92 | the message text that has been decrypted or verified or the output MIME |
| 80 | format message that has been signed or verified. | 93 | format message that has been signed or verified. |
| 81 | 94 | ||
| 95 | =item B<-outform SMIME|PEM|DER> | ||
| 96 | |||
| 97 | this specifies the output format for the PKCS#7 structure. The default | ||
| 98 | is B<SMIME> which write an S/MIME format message. B<PEM> and B<DER> | ||
| 99 | format change this to write PEM and DER format PKCS#7 structures | ||
| 100 | instead. This currently only affects the output format of the PKCS#7 | ||
| 101 | structure, if no PKCS#7 structure is being output (for example with | ||
| 102 | B<-verify> or B<-decrypt>) this option has no effect. | ||
| 103 | |||
| 104 | =item B<-content filename> | ||
| 105 | |||
| 106 | This specifies a file containing the detached content, this is only | ||
| 107 | useful with the B<-verify> command. This is only usable if the PKCS#7 | ||
| 108 | structure is using the detached signature form where the content is | ||
| 109 | not included. This option will override any content if the input format | ||
| 110 | is S/MIME and it uses the multipart/signed MIME content type. | ||
| 111 | |||
| 82 | =item B<-text> | 112 | =item B<-text> |
| 83 | 113 | ||
| 84 | this option adds plain text (text/plain) MIME headers to the supplied | 114 | this option adds plain text (text/plain) MIME headers to the supplied |
| @@ -174,12 +204,17 @@ corresponding certificate. If this option is not specified then the | |||
| 174 | private key must be included in the certificate file specified with | 204 | private key must be included in the certificate file specified with |
| 175 | the B<-recip> or B<-signer> file. | 205 | the B<-recip> or B<-signer> file. |
| 176 | 206 | ||
| 207 | =item B<-passin arg> | ||
| 208 | |||
| 209 | the private key password source. For more information about the format of B<arg> | ||
| 210 | see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>. | ||
| 211 | |||
| 177 | =item B<-rand file(s)> | 212 | =item B<-rand file(s)> |
| 178 | 213 | ||
| 179 | a file or files containing random data used to seed the random number | 214 | a file or files containing random data used to seed the random number |
| 180 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | 215 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). |
| 181 | Multiple files can be specified separated by a OS-dependent character. | 216 | Multiple files can be specified separated by a OS-dependent character. |
| 182 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | 217 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for |
| 183 | all others. | 218 | all others. |
| 184 | 219 | ||
| 185 | =item B<cert.pem...> | 220 | =item B<cert.pem...> |
| @@ -204,7 +239,7 @@ a blank line. Piping the mail directly to sendmail is one way to | |||
| 204 | achieve the correct format. | 239 | achieve the correct format. |
| 205 | 240 | ||
| 206 | The supplied message to be signed or encrypted must include the | 241 | The supplied message to be signed or encrypted must include the |
| 207 | necessary MIME headers: or many S/MIME clients wont display it | 242 | necessary MIME headers or many S/MIME clients wont display it |
| 208 | properly (if at all). You can use the B<-text> option to automatically | 243 | properly (if at all). You can use the B<-text> option to automatically |
| 209 | add plain text headers. | 244 | add plain text headers. |
| 210 | 245 | ||
| @@ -290,7 +325,7 @@ Send encrypted mail using triple DES: | |||
| 290 | Sign and encrypt mail: | 325 | Sign and encrypt mail: |
| 291 | 326 | ||
| 292 | openssl smime -sign -in ml.txt -signer my.pem -text \ | 327 | openssl smime -sign -in ml.txt -signer my.pem -text \ |
| 293 | | openssl -encrypt -out mail.msg \ | 328 | | openssl smime -encrypt -out mail.msg \ |
| 294 | -from steve@openssl.org -to someone@somewhere \ | 329 | -from steve@openssl.org -to someone@somewhere \ |
| 295 | -subject "Signed and Encrypted message" -des3 user.pem | 330 | -subject "Signed and Encrypted message" -des3 user.pem |
| 296 | 331 | ||
| @@ -301,6 +336,22 @@ Decrypt mail: | |||
| 301 | 336 | ||
| 302 | openssl smime -decrypt -in mail.msg -recip mycert.pem -inkey key.pem | 337 | openssl smime -decrypt -in mail.msg -recip mycert.pem -inkey key.pem |
| 303 | 338 | ||
| 339 | The output from Netscape form signing is a PKCS#7 structure with the | ||
| 340 | detached signature format. You can use this program to verify the | ||
| 341 | signature by line wrapping the base64 encoded structure and surrounding | ||
| 342 | it with: | ||
| 343 | |||
| 344 | -----BEGIN PKCS7---- | ||
| 345 | -----END PKCS7---- | ||
| 346 | |||
| 347 | and using the command, | ||
| 348 | |||
| 349 | openssl smime -verify -inform PEM -in signature.pem -content content.txt | ||
| 350 | |||
| 351 | alternatively you can base64 decode the signature and use | ||
| 352 | |||
| 353 | openssl smime -verify -inform DER -in signature.der -content content.txt | ||
| 354 | |||
| 304 | =head1 BUGS | 355 | =head1 BUGS |
| 305 | 356 | ||
| 306 | The MIME parser isn't very clever: it seems to handle most messages that I've thrown | 357 | The MIME parser isn't very clever: it seems to handle most messages that I've thrown |
diff --git a/src/lib/libssl/src/doc/apps/speed.pod b/src/lib/libssl/src/doc/apps/speed.pod index fecd9a994d..8101851ec6 100644 --- a/src/lib/libssl/src/doc/apps/speed.pod +++ b/src/lib/libssl/src/doc/apps/speed.pod | |||
| @@ -7,6 +7,7 @@ speed - test library performance | |||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | B<openssl speed> | 9 | B<openssl speed> |
| 10 | [B<-engine id>] | ||
| 10 | [B<md2>] | 11 | [B<md2>] |
| 11 | [B<mdc2>] | 12 | [B<mdc2>] |
| 12 | [B<md5>] | 13 | [B<md5>] |
| @@ -39,7 +40,18 @@ This command is used to test the performance of cryptographic algorithms. | |||
| 39 | 40 | ||
| 40 | =head1 OPTIONS | 41 | =head1 OPTIONS |
| 41 | 42 | ||
| 42 | If an option is given, B<speed> test that algorithm, otherwise all of | 43 | =over 4 |
| 44 | |||
| 45 | =item B<-engine id> | ||
| 46 | |||
| 47 | specifying an engine (by it's unique B<id> string) will cause B<speed> | ||
| 48 | to attempt to obtain a functional reference to the specified engine, | ||
| 49 | thus initialising it if needed. The engine will then be set as the default | ||
| 50 | for all available algorithms. | ||
| 51 | |||
| 52 | =item B<[zero or more test algorithms]> | ||
| 53 | |||
| 54 | If any options are given, B<speed> tests those algorithms, otherwise all of | ||
| 43 | the above are tested. | 55 | the above are tested. |
| 44 | 56 | ||
| 45 | =cut | 57 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/verify.pod b/src/lib/libssl/src/doc/apps/verify.pod index 4a6572d3b8..90455525d1 100644 --- a/src/lib/libssl/src/doc/apps/verify.pod +++ b/src/lib/libssl/src/doc/apps/verify.pod | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | pkcs7 - PKCS#7 utility | 5 | verify - Utility to verify certificates. |
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| @@ -12,6 +12,7 @@ B<openssl> B<verify> | |||
| 12 | [B<-purpose purpose>] | 12 | [B<-purpose purpose>] |
| 13 | [B<-untrusted file>] | 13 | [B<-untrusted file>] |
| 14 | [B<-help>] | 14 | [B<-help>] |
| 15 | [B<-issuer_checks>] | ||
| 15 | [B<-verbose>] | 16 | [B<-verbose>] |
| 16 | [B<->] | 17 | [B<->] |
| 17 | [certificates] | 18 | [certificates] |
| @@ -57,6 +58,14 @@ prints out a usage message. | |||
| 57 | 58 | ||
| 58 | print extra information about the operations being performed. | 59 | print extra information about the operations being performed. |
| 59 | 60 | ||
| 61 | =item B<-issuer_checks> | ||
| 62 | |||
| 63 | print out diagnostics relating to searches for the issuer certificate | ||
| 64 | of the current certificate. This shows why each candidate issuer | ||
| 65 | certificate was rejected. However the presence of rejection messages | ||
| 66 | does not itself imply that anything is wrong: during the normal | ||
| 67 | verify process several rejections may take place. | ||
| 68 | |||
| 60 | =item B<-> | 69 | =item B<-> |
| 61 | 70 | ||
| 62 | marks the last option. All arguments following this are assumed to be | 71 | marks the last option. All arguments following this are assumed to be |
| @@ -88,9 +97,21 @@ The verify operation consists of a number of separate steps. | |||
| 88 | 97 | ||
| 89 | Firstly a certificate chain is built up starting from the supplied certificate | 98 | Firstly a certificate chain is built up starting from the supplied certificate |
| 90 | and ending in the root CA. It is an error if the whole chain cannot be built | 99 | and ending in the root CA. It is an error if the whole chain cannot be built |
| 91 | up. The chain is built up by looking up a certificate whose subject name | 100 | up. The chain is built up by looking up the issuers certificate of the current |
| 92 | matches the issuer name of the current certificate. If a certificate is found | 101 | certificate. If a certificate is found which is its own issuer it is assumed |
| 93 | whose subject and issuer names are identical it is assumed to be the root CA. | 102 | to be the root CA. |
| 103 | |||
| 104 | The process of 'looking up the issuers certificate' itself involves a number | ||
| 105 | of steps. In versions of OpenSSL before 0.9.5a the first certificate whose | ||
| 106 | subject name matched the issuer of the current certificate was assumed to be | ||
| 107 | the issuers certificate. In OpenSSL 0.9.6 and later all certificates | ||
| 108 | whose subject name matches the issuer name of the current certificate are | ||
| 109 | subject to further tests. The relevant authority key identifier components | ||
| 110 | of the current certificate (if present) must match the subject key identifier | ||
| 111 | (if present) and issuer and serial number of the candidate issuer, in addition | ||
| 112 | the keyUsage extension of the candidate issuer (if present) must permit | ||
| 113 | certificate signing. | ||
| 114 | |||
| 94 | The lookup first looks in the list of untrusted certificates and if no match | 115 | The lookup first looks in the list of untrusted certificates and if no match |
| 95 | is found the remaining lookups are from the trusted certificates. The root CA | 116 | is found the remaining lookups are from the trusted certificates. The root CA |
| 96 | is always looked up in the trusted certificate list: if the certificate to | 117 | is always looked up in the trusted certificate list: if the certificate to |
| @@ -260,12 +281,46 @@ the root CA is not marked as trusted for the specified purpose. | |||
| 260 | 281 | ||
| 261 | the root CA is marked to reject the specified purpose. | 282 | the root CA is marked to reject the specified purpose. |
| 262 | 283 | ||
| 284 | =item B<29 X509_V_ERR_SUBJECT_ISSUER_MISMATCH: subject issuer mismatch> | ||
| 285 | |||
| 286 | the current candidate issuer certificate was rejected because its subject name | ||
| 287 | did not match the issuer name of the current certificate. Only displayed when | ||
| 288 | the B<-issuer_checks> option is set. | ||
| 289 | |||
| 290 | =item B<30 X509_V_ERR_AKID_SKID_MISMATCH: authority and subject key identifier mismatch> | ||
| 291 | |||
| 292 | the current candidate issuer certificate was rejected because its subject key | ||
| 293 | identifier was present and did not match the authority key identifier current | ||
| 294 | certificate. Only displayed when the B<-issuer_checks> option is set. | ||
| 295 | |||
| 296 | =item B<31 X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: authority and issuer serial number mismatch> | ||
| 297 | |||
| 298 | the current candidate issuer certificate was rejected because its issuer name | ||
| 299 | and serial number was present and did not match the authority key identifier | ||
| 300 | of the current certificate. Only displayed when the B<-issuer_checks> option is set. | ||
| 301 | |||
| 302 | =item B<32 X509_V_ERR_KEYUSAGE_NO_CERTSIGN:key usage does not include certificate signing> | ||
| 303 | |||
| 304 | the current candidate issuer certificate was rejected because its keyUsage extension | ||
| 305 | does not permit certificate signing. | ||
| 306 | |||
| 263 | =item B<50 X509_V_ERR_APPLICATION_VERIFICATION: application verification failure> | 307 | =item B<50 X509_V_ERR_APPLICATION_VERIFICATION: application verification failure> |
| 264 | 308 | ||
| 265 | an application specific error. Unused. | 309 | an application specific error. Unused. |
| 266 | 310 | ||
| 267 | =back | 311 | =back |
| 268 | 312 | ||
| 313 | =head1 BUGS | ||
| 314 | |||
| 315 | Although the issuer checks are a considerably improvement over the old technique they still | ||
| 316 | suffer from limitations in the underlying X509_LOOKUP API. One consequence of this is that | ||
| 317 | trusted certificates with matching subject name must either appear in a file (as specified by the | ||
| 318 | B<-CAfile> option) or a directory (as specified by B<-CApath>. If they occur in both then only | ||
| 319 | the certificates in the file will be recognised. | ||
| 320 | |||
| 321 | Previous versions of OpenSSL assume certificates with matching subject name are identical and | ||
| 322 | mishandled them. | ||
| 323 | |||
| 269 | =head1 SEE ALSO | 324 | =head1 SEE ALSO |
| 270 | 325 | ||
| 271 | L<x509(1)|x509(1)> | 326 | L<x509(1)|x509(1)> |
diff --git a/src/lib/libssl/src/doc/apps/x509.pod b/src/lib/libssl/src/doc/apps/x509.pod index e4ae5468da..84f76cb421 100644 --- a/src/lib/libssl/src/doc/apps/x509.pod +++ b/src/lib/libssl/src/doc/apps/x509.pod | |||
| @@ -19,6 +19,8 @@ B<openssl> B<x509> | |||
| 19 | [B<-hash>] | 19 | [B<-hash>] |
| 20 | [B<-subject>] | 20 | [B<-subject>] |
| 21 | [B<-issuer>] | 21 | [B<-issuer>] |
| 22 | [B<-nameopt option>] | ||
| 23 | [B<-email>] | ||
| 22 | [B<-startdate>] | 24 | [B<-startdate>] |
| 23 | [B<-enddate>] | 25 | [B<-enddate>] |
| 24 | [B<-purpose>] | 26 | [B<-purpose>] |
| @@ -137,6 +139,16 @@ outputs the subject name. | |||
| 137 | 139 | ||
| 138 | outputs the issuer name. | 140 | outputs the issuer name. |
| 139 | 141 | ||
| 142 | =item B<-nameopt option> | ||
| 143 | |||
| 144 | option which determine how the subject or issuer names are displayed. This | ||
| 145 | option may be used more than once to set multiple options. See the B<NAME | ||
| 146 | OPTIONS> section for more information. | ||
| 147 | |||
| 148 | =item B<-email> | ||
| 149 | |||
| 150 | outputs the email address(es) if any. | ||
| 151 | |||
| 140 | =item B<-startdate> | 152 | =item B<-startdate> |
| 141 | 153 | ||
| 142 | prints out the start date of the certificate, that is the notBefore date. | 154 | prints out the start date of the certificate, that is the notBefore date. |
| @@ -330,6 +342,138 @@ specified then the extensions should either be contained in the unnamed | |||
| 330 | 342 | ||
| 331 | =back | 343 | =back |
| 332 | 344 | ||
| 345 | =head1 NAME OPTIONS | ||
| 346 | |||
| 347 | The B<nameopt> command line switch determines how the subject and issuer | ||
| 348 | names are displayed. If no B<nameopt> switch is present the default "oneline" | ||
| 349 | format is used which is compatible with previous versions of OpenSSL. | ||
| 350 | Each option is described in detail below, all options can be preceded by | ||
| 351 | a B<-> to turn the option off. Only the first four will normally be used. | ||
| 352 | |||
| 353 | =over 4 | ||
| 354 | |||
| 355 | =item B<compat> | ||
| 356 | |||
| 357 | use the old format. This is equivalent to specifying no name options at all. | ||
| 358 | |||
| 359 | =item B<RFC2253> | ||
| 360 | |||
| 361 | displays names compatible with RFC2253 equivalent to B<esc_2253>, B<esc_ctrl>, | ||
| 362 | B<esc_msb>, B<utf8>, B<dump_nostr>, B<dump_unknown>, B<dump_der>, | ||
| 363 | B<sep_comma_plus>, B<dn_rev> and B<sname>. | ||
| 364 | |||
| 365 | =item B<oneline> | ||
| 366 | |||
| 367 | a oneline format which is more readable than RFC2253. It is equivalent to | ||
| 368 | specifying the B<esc_2253>, B<esc_ctrl>, B<esc_msb>, B<utf8>, B<dump_nostr>, | ||
| 369 | B<dump_der>, B<use_quote>, B<sep_comma_plus_spc>, B<spc_eq> and B<sname> | ||
| 370 | options. | ||
| 371 | |||
| 372 | =item B<multiline> | ||
| 373 | |||
| 374 | a multiline format. It is equivalent B<esc_ctrl>, B<esc_msb>, B<sep_multiline>, | ||
| 375 | B<spc_eq> and B<lname>. | ||
| 376 | |||
| 377 | =item B<esc_2253> | ||
| 378 | |||
| 379 | escape the "special" characters required by RFC2253 in a field That is | ||
| 380 | B<,+"E<lt>E<gt>;>. Additionally B<#> is escaped at the beginnging of a string | ||
| 381 | and a space character at the beginning or end of a string. | ||
| 382 | |||
| 383 | =item B<esc_ctrl> | ||
| 384 | |||
| 385 | escape control characters. That is those with ASCII values less than | ||
| 386 | 0x20 (space) and the delete (0x7f) character. They are escaped using the | ||
| 387 | RFC2253 \XX notation (where XX are two hex digits representing the | ||
| 388 | character value). | ||
| 389 | |||
| 390 | =item B<esc_msb> | ||
| 391 | |||
| 392 | escape characters with the MSB set, that is with ASCII values larger than | ||
| 393 | 127. | ||
| 394 | |||
| 395 | =item B<use_quote> | ||
| 396 | |||
| 397 | escapes some characters by surrounding the whole string with B<"> characters, | ||
| 398 | without the option all escaping is done with the B<\> character. | ||
| 399 | |||
| 400 | =item B<utf8> | ||
| 401 | |||
| 402 | convert all strings to UTF8 format first. This is required by RFC2253. If | ||
| 403 | you are lucky enough to have a UTF8 compatible terminal then the use | ||
| 404 | of this option (and B<not> setting B<esc_msb>) may result in the correct | ||
| 405 | display of multibyte (international) characters. Is this option is not | ||
| 406 | present then multibyte characters larger than 0xff will be represented | ||
| 407 | using the format \UXXXX for 16 bits and \WXXXXXXXX for 32 bits. | ||
| 408 | Also if this option is off any UTF8Strings will be converted to their | ||
| 409 | character form first. | ||
| 410 | |||
| 411 | =item B<no_type> | ||
| 412 | |||
| 413 | this option does not attempt to interpret multibyte characters in any | ||
| 414 | way. That is their content octets are merely dumped as though one octet | ||
| 415 | represents each character. This is useful for diagnostic purposes but | ||
| 416 | will result in rather odd looking output. | ||
| 417 | |||
| 418 | =item B<show_type> | ||
| 419 | |||
| 420 | show the type of the ASN1 character string. The type precedes the | ||
| 421 | field contents. For example "BMPSTRING: Hello World". | ||
| 422 | |||
| 423 | =item B<dump_der> | ||
| 424 | |||
| 425 | when this option is set any fields that need to be hexdumped will | ||
| 426 | be dumped using the DER encoding of the field. Otherwise just the | ||
| 427 | content octets will be displayed. Both options use the RFC2253 | ||
| 428 | B<#XXXX...> format. | ||
| 429 | |||
| 430 | =item B<dump_nostr> | ||
| 431 | |||
| 432 | dump non character string types (for example OCTET STRING) if this | ||
| 433 | option is not set then non character string types will be displayed | ||
| 434 | as though each content octet repesents a single character. | ||
| 435 | |||
| 436 | =item B<dump_all> | ||
| 437 | |||
| 438 | dump all fields. This option when used with B<dump_der> allows the | ||
| 439 | DER encoding of the structure to be unambiguously determined. | ||
| 440 | |||
| 441 | =item B<dump_unknown> | ||
| 442 | |||
| 443 | dump any field whose OID is not recognised by OpenSSL. | ||
| 444 | |||
| 445 | =item B<sep_comma_plus>, B<sep_comma_plus_space>, B<sep_semi_plus_space>, | ||
| 446 | B<sep_multiline> | ||
| 447 | |||
| 448 | these options determine the field separators. The first character is | ||
| 449 | between RDNs and the second between multiple AVAs (multiple AVAs are | ||
| 450 | very rare and their use is discouraged). The options ending in | ||
| 451 | "space" additionally place a space after the separator to make it | ||
| 452 | more readable. The B<sep_multiline> uses a linefeed character for | ||
| 453 | the RDN separator and a spaced B<+> for the AVA separator. It also | ||
| 454 | indents the fields by four characters. | ||
| 455 | |||
| 456 | =item B<dn_rev> | ||
| 457 | |||
| 458 | reverse the fields of the DN. This is required by RFC2253. As a side | ||
| 459 | effect this also reverses the order of multiple AVAs but this is | ||
| 460 | permissible. | ||
| 461 | |||
| 462 | =item B<nofname>, B<sname>, B<lname>, B<oid> | ||
| 463 | |||
| 464 | these options alter how the field name is displayed. B<nofname> does | ||
| 465 | not display the field at all. B<sname> uses the "short name" form | ||
| 466 | (CN for commonName for example). B<lname> uses the long form. | ||
| 467 | B<oid> represents the OID in numerical form and is useful for | ||
| 468 | diagnostic purpose. | ||
| 469 | |||
| 470 | =item B<spc_eq> | ||
| 471 | |||
| 472 | places spaces round the B<=> character which follows the field | ||
| 473 | name. | ||
| 474 | |||
| 475 | =back | ||
| 476 | |||
| 333 | =head1 EXAMPLES | 477 | =head1 EXAMPLES |
| 334 | 478 | ||
| 335 | Note: in these examples the '\' means the example should be all on one | 479 | Note: in these examples the '\' means the example should be all on one |
| @@ -343,6 +487,19 @@ Display the certificate serial number: | |||
| 343 | 487 | ||
| 344 | openssl x509 -in cert.pem -noout -serial | 488 | openssl x509 -in cert.pem -noout -serial |
| 345 | 489 | ||
| 490 | Display the certificate subject name: | ||
| 491 | |||
| 492 | openssl x509 -in cert.pem -noout -subject | ||
| 493 | |||
| 494 | Display the certificate subject name in RFC2253 form: | ||
| 495 | |||
| 496 | openssl x509 -in cert.pem -noout -subject -nameopt RFC2253 | ||
| 497 | |||
| 498 | Display the certificate subject name in oneline form on a terminal | ||
| 499 | supporting UTF8: | ||
| 500 | |||
| 501 | openssl x509 -in cert.pem -noout -subject -nameopt oneline -nameopt -escmsb | ||
| 502 | |||
| 346 | Display the certificate MD5 fingerprint: | 503 | Display the certificate MD5 fingerprint: |
| 347 | 504 | ||
| 348 | openssl x509 -in cert.pem -noout -fingerprint | 505 | openssl x509 -in cert.pem -noout -fingerprint |
| @@ -362,13 +519,13 @@ Convert a certificate to a certificate request: | |||
| 362 | Convert a certificate request into a self signed certificate using | 519 | Convert a certificate request into a self signed certificate using |
| 363 | extensions for a CA: | 520 | extensions for a CA: |
| 364 | 521 | ||
| 365 | openssl x509 -req -in careq.pem -config openssl.cnf -extensions v3_ca \ | 522 | openssl x509 -req -in careq.pem -extfile openssl.cnf -extensions v3_ca \ |
| 366 | -signkey key.pem -out cacert.pem | 523 | -signkey key.pem -out cacert.pem |
| 367 | 524 | ||
| 368 | Sign a certificate request using the CA certificate above and add user | 525 | Sign a certificate request using the CA certificate above and add user |
| 369 | certificate extensions: | 526 | certificate extensions: |
| 370 | 527 | ||
| 371 | openssl x509 -req -in req.pem -config openssl.cnf -extensions v3_usr \ | 528 | openssl x509 -req -in req.pem -extfile openssl.cnf -extensions v3_usr \ |
| 372 | -CA cacert.pem -CAkey key.pem -CAcreateserial | 529 | -CA cacert.pem -CAkey key.pem -CAcreateserial |
| 373 | 530 | ||
| 374 | 531 | ||
| @@ -395,6 +552,11 @@ Trusted certificates have the lines | |||
| 395 | -----BEGIN TRUSTED CERTIFICATE---- | 552 | -----BEGIN TRUSTED CERTIFICATE---- |
| 396 | -----END TRUSTED CERTIFICATE---- | 553 | -----END TRUSTED CERTIFICATE---- |
| 397 | 554 | ||
| 555 | The conversion to UTF8 format used with the name options assumes that | ||
| 556 | T61Strings use the ISO8859-1 character set. This is wrong but Netscape | ||
| 557 | and MSIE do this as do many certificates. So although this is incorrect | ||
| 558 | it is more likely to display the majority of certificates correctly. | ||
| 559 | |||
| 398 | The B<-fingerprint> option takes the digest of the DER encoded certificate. | 560 | The B<-fingerprint> option takes the digest of the DER encoded certificate. |
| 399 | This is commonly called a "fingerprint". Because of the nature of message | 561 | This is commonly called a "fingerprint". Because of the nature of message |
| 400 | digests the fingerprint of a certificate is unique to that certificate and | 562 | digests the fingerprint of a certificate is unique to that certificate and |
| @@ -402,6 +564,10 @@ two certificates with the same fingerprint can be considered to be the same. | |||
| 402 | 564 | ||
| 403 | The Netscape fingerprint uses MD5 whereas MSIE uses SHA1. | 565 | The Netscape fingerprint uses MD5 whereas MSIE uses SHA1. |
| 404 | 566 | ||
| 567 | The B<-email> option searches the subject name and the subject alternative | ||
| 568 | name extension. Only unique email addresses will be printed out: it will | ||
| 569 | not print the same address more than once. | ||
| 570 | |||
| 405 | =head1 CERTIFICATE EXTENSIONS | 571 | =head1 CERTIFICATE EXTENSIONS |
| 406 | 572 | ||
| 407 | The B<-purpose> option checks the certificate extensions and determines | 573 | The B<-purpose> option checks the certificate extensions and determines |
| @@ -517,10 +683,6 @@ must be present. | |||
| 517 | 683 | ||
| 518 | =head1 BUGS | 684 | =head1 BUGS |
| 519 | 685 | ||
| 520 | The way DNs are printed is in a "historical SSLeay" format which doesn't | ||
| 521 | follow any published standard. It should follow some standard like RFC2253 | ||
| 522 | or RFC1779 with options to make the stuff more readable. | ||
| 523 | |||
| 524 | Extensions in certificates are not transferred to certificate requests and | 686 | Extensions in certificates are not transferred to certificate requests and |
| 525 | vice versa. | 687 | vice versa. |
| 526 | 688 | ||
| @@ -532,7 +694,7 @@ There should be options to explicitly set such things as start and end | |||
| 532 | dates rather than an offset from the current time. | 694 | dates rather than an offset from the current time. |
| 533 | 695 | ||
| 534 | The code to implement the verify behaviour described in the B<TRUST SETTINGS> | 696 | The code to implement the verify behaviour described in the B<TRUST SETTINGS> |
| 535 | is currently being developed. It thus describes the intended behavior rather | 697 | is currently being developed. It thus describes the intended behaviour rather |
| 536 | than the current behaviour. It is hoped that it will represent reality in | 698 | than the current behaviour. It is hoped that it will represent reality in |
| 537 | OpenSSL 0.9.5 and later. | 699 | OpenSSL 0.9.5 and later. |
| 538 | 700 | ||
diff --git a/src/lib/libssl/src/doc/c-indentation.el b/src/lib/libssl/src/doc/c-indentation.el index 9111450915..48ca3cf69b 100644 --- a/src/lib/libssl/src/doc/c-indentation.el +++ b/src/lib/libssl/src/doc/c-indentation.el | |||
| @@ -39,7 +39,8 @@ | |||
| 39 | (label . -) | 39 | (label . -) |
| 40 | (arglist-cont-nonempty . +) | 40 | (arglist-cont-nonempty . +) |
| 41 | (topmost-intro . -) | 41 | (topmost-intro . -) |
| 42 | (brace-list-close . +) | 42 | (brace-list-close . 0) |
| 43 | (brace-list-intro . +) | 43 | (brace-list-intro . 0) |
| 44 | (brace-list-open . +) | ||
| 44 | )))) | 45 | )))) |
| 45 | 46 | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_ctrl.pod b/src/lib/libssl/src/doc/crypto/BIO_ctrl.pod new file mode 100644 index 0000000000..722e8b8f46 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_ctrl.pod | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset, | ||
| 6 | BIO_seek, BIO_tell, BIO_flush, BIO_eof, BIO_set_close, BIO_get_close, | ||
| 7 | BIO_pending, BIO_wpending, BIO_ctrl_pending, BIO_ctrl_wpending, | ||
| 8 | BIO_get_info_callback, BIO_set_info_callback - BIO control operations | ||
| 9 | |||
| 10 | =head1 SYNOPSIS | ||
| 11 | |||
| 12 | #include <openssl/bio.h> | ||
| 13 | |||
| 14 | long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg); | ||
| 15 | long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, long)); | ||
| 16 | char * BIO_ptr_ctrl(BIO *bp,int cmd,long larg); | ||
| 17 | long BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg); | ||
| 18 | |||
| 19 | int BIO_reset(BIO *b); | ||
| 20 | int BIO_seek(BIO *b, int ofs); | ||
| 21 | int BIO_tell(BIO *b); | ||
| 22 | int BIO_flush(BIO *b); | ||
| 23 | int BIO_eof(BIO *b); | ||
| 24 | int BIO_set_close(BIO *b,long flag); | ||
| 25 | int BIO_get_close(BIO *b); | ||
| 26 | int BIO_pending(BIO *b); | ||
| 27 | int BIO_wpending(BIO *b); | ||
| 28 | size_t BIO_ctrl_pending(BIO *b); | ||
| 29 | size_t BIO_ctrl_wpending(BIO *b); | ||
| 30 | |||
| 31 | int BIO_get_info_callback(BIO *b,bio_info_cb **cbp); | ||
| 32 | int BIO_set_info_callback(BIO *b,bio_info_cb *cb); | ||
| 33 | |||
| 34 | typedef void bio_info_cb(BIO *b, int oper, const char *ptr, int arg1, long arg2, long arg3); | ||
| 35 | |||
| 36 | =head1 DESCRIPTION | ||
| 37 | |||
| 38 | BIO_ctrl(), BIO_callback_ctrl(), BIO_ptr_ctrl() and BIO_int_ctrl() | ||
| 39 | are BIO "control" operations taking arguments of various types. | ||
| 40 | These functions are not normally called directly, various macros | ||
| 41 | are used instead. The standard macros are described below, macros | ||
| 42 | specific to a particular type of BIO are described in the specific | ||
| 43 | BIOs manual page as well as any special features of the standard | ||
| 44 | calls. | ||
| 45 | |||
| 46 | BIO_reset() typically resets a BIO to some initial state, in the case | ||
| 47 | of file related BIOs for example it rewinds the file pointer to the | ||
| 48 | start of the file. | ||
| 49 | |||
| 50 | BIO_seek() resets a file related BIO's (that is file descriptor and | ||
| 51 | FILE BIOs) file position pointer to B<ofs> bytes from start of file. | ||
| 52 | |||
| 53 | BIO_tell() returns the current file position of a file related BIO. | ||
| 54 | |||
| 55 | BIO_flush() normally writes out any internally buffered data, in some | ||
| 56 | cases it is used to signal EOF and that no more data will be written. | ||
| 57 | |||
| 58 | BIO_eof() returns 1 if the BIO has read EOF, the precise meaning of | ||
| 59 | "EOF" varies according to the BIO type. | ||
| 60 | |||
| 61 | BIO_set_close() sets the BIO B<b> close flag to B<flag>. B<flag> can | ||
| 62 | take the value BIO_CLOSE or BIO_NOCLOSE. Typically BIO_CLOSE is used | ||
| 63 | in a source/sink BIO to indicate that the underlying I/O stream should | ||
| 64 | be closed when the BIO is freed. | ||
| 65 | |||
| 66 | BIO_get_close() returns the BIOs close flag. | ||
| 67 | |||
| 68 | BIO_pending(), BIO_ctrl_pending(), BIO_wpending() and BIO_ctrl_wpending() | ||
| 69 | return the number of pending characters in the BIOs read and write buffers. | ||
| 70 | Not all BIOs support these calls. BIO_ctrl_pending() and BIO_ctrl_wpending() | ||
| 71 | return a size_t type and are functions, BIO_pending() and BIO_wpending() are | ||
| 72 | macros which call BIO_ctrl(). | ||
| 73 | |||
| 74 | =head1 RETURN VALUES | ||
| 75 | |||
| 76 | BIO_reset() normally returns 1 for success and 0 or -1 for failure. File | ||
| 77 | BIOs are an exception, they return 0 for success and -1 for failure. | ||
| 78 | |||
| 79 | BIO_seek() and BIO_tell() both return the current file position on success | ||
| 80 | and -1 for failure, except file BIOs which for BIO_seek() always return 0 | ||
| 81 | for success and -1 for failure. | ||
| 82 | |||
| 83 | BIO_flush() returns 1 for success and 0 or -1 for failure. | ||
| 84 | |||
| 85 | BIO_eof() returns 1 if EOF has been reached 0 otherwise. | ||
| 86 | |||
| 87 | BIO_set_close() always returns 1. | ||
| 88 | |||
| 89 | BIO_get_close() returns the close flag value: BIO_CLOSE or BIO_NOCLOSE. | ||
| 90 | |||
| 91 | BIO_pending(), BIO_ctrl_pending(), BIO_wpending() and BIO_ctrl_wpending() | ||
| 92 | return the amount of pending data. | ||
| 93 | |||
| 94 | =head1 NOTES | ||
| 95 | |||
| 96 | BIO_flush(), because it can write data may return 0 or -1 indicating | ||
| 97 | that the call should be retried later in a similar manner to BIO_write(). | ||
| 98 | The BIO_should_retry() call should be used and appropriate action taken | ||
| 99 | is the call fails. | ||
| 100 | |||
| 101 | The return values of BIO_pending() and BIO_wpending() may not reliably | ||
| 102 | determine the amount of pending data in all cases. For example in the | ||
| 103 | case of a file BIO some data may be available in the FILE structures | ||
| 104 | internal buffers but it is not possible to determine this in a | ||
| 105 | portably way. For other types of BIO they may not be supported. | ||
| 106 | |||
| 107 | Filter BIOs if they do not internally handle a particular BIO_ctrl() | ||
| 108 | operation usually pass the operation to the next BIO in the chain. | ||
| 109 | This often means there is no need to locate the required BIO for | ||
| 110 | a particular operation, it can be called on a chain and it will | ||
| 111 | be automatically passed to the relevant BIO. However this can cause | ||
| 112 | unexpected results: for example no current filter BIOs implement | ||
| 113 | BIO_seek(), but this may still succeed if the chain ends in a FILE | ||
| 114 | or file descriptor BIO. | ||
| 115 | |||
| 116 | Source/sink BIOs return an 0 if they do not recognize the BIO_ctrl() | ||
| 117 | operation. | ||
| 118 | |||
| 119 | =head1 BUGS | ||
| 120 | |||
| 121 | Some of the return values are ambiguous and care should be taken. In | ||
| 122 | particular a return value of 0 can be returned if an operation is not | ||
| 123 | supported, if an error occurred, if EOF has not been reached and in | ||
| 124 | the case of BIO_seek() on a file BIO for a successful operation. | ||
| 125 | |||
| 126 | =head1 SEE ALSO | ||
| 127 | |||
| 128 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod b/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod new file mode 100644 index 0000000000..fdb603b38e --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_f_base64 - base64 BIO filter | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | #include <openssl/evp.h> | ||
| 11 | |||
| 12 | BIO_METHOD * BIO_f_base64(void); | ||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | BIO_f_base64() returns the base64 BIO method. This is a filter | ||
| 17 | BIO that base64 encodes any data written through it and decodes | ||
| 18 | any data read through it. | ||
| 19 | |||
| 20 | Base64 BIOs do not support BIO_gets() or BIO_puts(). | ||
| 21 | |||
| 22 | BIO_flush() on a base64 BIO that is being written through is | ||
| 23 | used to signal that no more data is to be encoded: this is used | ||
| 24 | to flush the final block through the BIO. | ||
| 25 | |||
| 26 | The flag BIO_FLAGS_BASE64_NO_NL can be set with BIO_set_flags() | ||
| 27 | to encode the data all on one line or expect the data to be all | ||
| 28 | on one line. | ||
| 29 | |||
| 30 | =head1 NOTES | ||
| 31 | |||
| 32 | Because of the format of base64 encoding the end of the encoded | ||
| 33 | block cannot always be reliably determined. | ||
| 34 | |||
| 35 | =head1 RETURN VALUES | ||
| 36 | |||
| 37 | BIO_f_base64() returns the base64 BIO method. | ||
| 38 | |||
| 39 | =head1 EXAMPLES | ||
| 40 | |||
| 41 | Base64 encode the string "Hello World\n" and write the result | ||
| 42 | to standard output: | ||
| 43 | |||
| 44 | BIO *bio, *b64; | ||
| 45 | char message[] = "Hello World \n"; | ||
| 46 | |||
| 47 | b64 = BIO_new(BIO_f_base64()); | ||
| 48 | bio = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 49 | bio = BIO_push(b64, bio); | ||
| 50 | BIO_write(bio, message, strlen(message)); | ||
| 51 | BIO_flush(bio); | ||
| 52 | |||
| 53 | BIO_free_all(bio); | ||
| 54 | |||
| 55 | Read Base64 encoded data from standard input and write the decoded | ||
| 56 | data to standard output: | ||
| 57 | |||
| 58 | BIO *bio, *b64, bio_out; | ||
| 59 | char inbuf[512]; | ||
| 60 | int inlen; | ||
| 61 | char message[] = "Hello World \n"; | ||
| 62 | |||
| 63 | b64 = BIO_new(BIO_f_base64()); | ||
| 64 | bio = BIO_new_fp(stdin, BIO_NOCLOSE); | ||
| 65 | bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 66 | bio = BIO_push(b64, bio); | ||
| 67 | while((inlen = BIO_read(bio, inbuf, strlen(message))) > 0) | ||
| 68 | BIO_write(bio_out, inbuf, inlen); | ||
| 69 | |||
| 70 | BIO_free_all(bio); | ||
| 71 | |||
| 72 | =head1 BUGS | ||
| 73 | |||
| 74 | The ambiguity of EOF in base64 encoded data can cause additional | ||
| 75 | data following the base64 encoded block to be misinterpreted. | ||
| 76 | |||
| 77 | There should be some way of specifying a test that the BIO can perform | ||
| 78 | to reliably determine EOF (for example a MIME boundary). | ||
| 79 | |||
| 80 | =head1 SEE ALSO | ||
| 81 | |||
| 82 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod b/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod new file mode 100644 index 0000000000..c9093c6a57 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_f_buffer - buffering BIO | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | BIO_METHOD * BIO_f_buffer(void); | ||
| 12 | |||
| 13 | #define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL) | ||
| 14 | #define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0) | ||
| 15 | #define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1) | ||
| 16 | #define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL) | ||
| 17 | #define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf) | ||
| 18 | |||
| 19 | =head1 DESCRIPTION | ||
| 20 | |||
| 21 | BIO_f_buffer() returns the buffering BIO method. | ||
| 22 | |||
| 23 | Data written to a buffering BIO is buffered and periodically written | ||
| 24 | to the next BIO in the chain. Data read from a buffering BIO comes from | ||
| 25 | an internal buffer which is filled from the next BIO in the chain. | ||
| 26 | Both BIO_gets() and BIO_puts() are supported. | ||
| 27 | |||
| 28 | Calling BIO_reset() on a buffering BIO clears any buffered data. | ||
| 29 | |||
| 30 | BIO_get_buffer_num_lines() returns the number of lines currently buffered. | ||
| 31 | |||
| 32 | BIO_set_read_buffer_size(), BIO_set_write_buffer_size() and BIO_set_buffer_size() | ||
| 33 | set the read, write or both read and write buffer sizes to B<size>. The initial | ||
| 34 | buffer size is DEFAULT_BUFFER_SIZE, currently 1024. Any attempt to reduce the | ||
| 35 | buffer size below DEFAULT_BUFFER_SIZE is ignored. Any buffered data is cleared | ||
| 36 | when the buffer is resized. | ||
| 37 | |||
| 38 | BIO_set_buffer_read_data() clears the read buffer and fills it with B<num> | ||
| 39 | bytes of B<buf>. If B<num> is larger than the current buffer size the buffer | ||
| 40 | is expanded. | ||
| 41 | |||
| 42 | =head1 NOTES | ||
| 43 | |||
| 44 | Buffering BIOs implement BIO_gets() by using BIO_read() operations on the | ||
| 45 | next BIO in the chain. By prepending a buffering BIO to a chain it is therefore | ||
| 46 | possible to provide BIO_gets() functionality if the following BIOs do not | ||
| 47 | support it (for example SSL BIOs). | ||
| 48 | |||
| 49 | Data is only written to the next BIO in the chain when the write buffer fills | ||
| 50 | or when BIO_flush() is called. It is therefore important to call BIO_flush() | ||
| 51 | whenever any pending data should be written such as when removing a buffering | ||
| 52 | BIO using BIO_pop(). BIO_flush() may need to be retried if the ultimate | ||
| 53 | source/sink BIO is non blocking. | ||
| 54 | |||
| 55 | =head1 RETURN VALUES | ||
| 56 | |||
| 57 | BIO_f_buffer() returns the buffering BIO method. | ||
| 58 | |||
| 59 | BIO_get_buffer_num_lines() returns the number of lines buffered (may be 0). | ||
| 60 | |||
| 61 | BIO_set_read_buffer_size(), BIO_set_write_buffer_size() and BIO_set_buffer_size() | ||
| 62 | return 1 if the buffer was successfully resized or 0 for failure. | ||
| 63 | |||
| 64 | BIO_set_buffer_read_data() returns 1 if the data was set correctly or 0 if | ||
| 65 | there was an error. | ||
| 66 | |||
| 67 | =head1 SEE ALSO | ||
| 68 | |||
| 69 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod b/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod new file mode 100644 index 0000000000..4182f2c309 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - cipher BIO filter | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | #include <openssl/evp.h> | ||
| 11 | |||
| 12 | BIO_METHOD * BIO_f_cipher(void); | ||
| 13 | void BIO_set_cipher(BIO *b,const EVP_CIPHER *cipher, | ||
| 14 | unsigned char *key, unsigned char *iv, int enc); | ||
| 15 | int BIO_get_cipher_status(BIO *b) | ||
| 16 | int BIO_get_cipher_ctx(BIO *b, EVP_CIPHER_CTX **pctx) | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | BIO_f_cipher() returns the cipher BIO method. This is a filter | ||
| 21 | BIO that encrypts any data written through it, and decrypts any data | ||
| 22 | read from it. It is a BIO wrapper for the cipher routines | ||
| 23 | EVP_CipherInit(), EVP_CipherUpdate() and EVP_CipherFinal(). | ||
| 24 | |||
| 25 | Cipher BIOs do not support BIO_gets() or BIO_puts(). | ||
| 26 | |||
| 27 | BIO_flush() on an encryption BIO that is being written through is | ||
| 28 | used to signal that no more data is to be encrypted: this is used | ||
| 29 | to flush and possibly pad the final block through the BIO. | ||
| 30 | |||
| 31 | BIO_set_cipher() sets the cipher of BIO <b> to B<cipher> using key B<key> | ||
| 32 | and IV B<iv>. B<enc> should be set to 1 for encryption and zero for | ||
| 33 | decryption. | ||
| 34 | |||
| 35 | When reading from an encryption BIO the final block is automatically | ||
| 36 | decrypted and checked when EOF is detected. BIO_get_cipher_status() | ||
| 37 | is a BIO_ctrl() macro which can be called to determine whether the | ||
| 38 | decryption operation was successful. | ||
| 39 | |||
| 40 | BIO_get_cipher_ctx() is a BIO_ctrl() macro which retrieves the internal | ||
| 41 | BIO cipher context. The retrieved context can be used in conjunction | ||
| 42 | with the standard cipher routines to set it up. This is useful when | ||
| 43 | BIO_set_cipher() is not flexible enough for the applications needs. | ||
| 44 | |||
| 45 | =head1 NOTES | ||
| 46 | |||
| 47 | When encrypting BIO_flush() B<must> be called to flush the final block | ||
| 48 | through the BIO. If it is not then the final block will fail a subsequent | ||
| 49 | decrypt. | ||
| 50 | |||
| 51 | When decrypting an error on the final block is signalled by a zero | ||
| 52 | return value from the read operation. A successful decrypt followed | ||
| 53 | by EOF will also return zero for the final read. BIO_get_cipher_status() | ||
| 54 | should be called to determine if the decrypt was successful. | ||
| 55 | |||
| 56 | As always, if BIO_gets() or BIO_puts() support is needed then it can | ||
| 57 | be achieved by preceding the cipher BIO with a buffering BIO. | ||
| 58 | |||
| 59 | =head1 RETURN VALUES | ||
| 60 | |||
| 61 | BIO_f_cipher() returns the cipher BIO method. | ||
| 62 | |||
| 63 | BIO_set_cipher() does not return a value. | ||
| 64 | |||
| 65 | BIO_get_cipher_status() returns 1 for a successful decrypt and 0 | ||
| 66 | for failure. | ||
| 67 | |||
| 68 | BIO_get_cipher_ctx() currently always returns 1. | ||
| 69 | |||
| 70 | =head1 EXAMPLES | ||
| 71 | |||
| 72 | TBA | ||
| 73 | |||
| 74 | =head1 SEE ALSO | ||
| 75 | |||
| 76 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_md.pod b/src/lib/libssl/src/doc/crypto/BIO_f_md.pod new file mode 100644 index 0000000000..c32504dfb1 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_f_md.pod | |||
| @@ -0,0 +1,138 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx - message digest BIO filter | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | #include <openssl/evp.h> | ||
| 11 | |||
| 12 | BIO_METHOD * BIO_f_md(void); | ||
| 13 | int BIO_set_md(BIO *b,EVP_MD *md); | ||
| 14 | int BIO_get_md(BIO *b,EVP_MD **mdp); | ||
| 15 | int BIO_get_md_ctx(BIO *b,EVP_MD_CTX **mdcp); | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | BIO_f_md() returns the message digest BIO method. This is a filter | ||
| 20 | BIO that digests any data passed through it, it is a BIO wrapper | ||
| 21 | for the digest routines EVP_DigestInit(), EVP_DigestUpdate() | ||
| 22 | and EVP_DigestFinal(). | ||
| 23 | |||
| 24 | Any data written or read through a digest BIO using BIO_read() and | ||
| 25 | BIO_write() is digested. | ||
| 26 | |||
| 27 | BIO_gets(), if its B<size> parameter is large enough finishes the | ||
| 28 | digest calculation and returns the digest value. BIO_puts() is | ||
| 29 | not supported. | ||
| 30 | |||
| 31 | BIO_reset() reinitializes a digest BIO. | ||
| 32 | |||
| 33 | BIO_set_md() sets the message digest of BIO B<b> to B<md>: this | ||
| 34 | must be called to initialize a digest BIO before any data is | ||
| 35 | passed through it. It is a BIO_ctrl() macro. | ||
| 36 | |||
| 37 | BIO_get_md() places the a pointer to the digest BIOs digest method | ||
| 38 | in B<mdp>, it is a BIO_ctrl() macro. | ||
| 39 | |||
| 40 | BIO_get_md_ctx() returns the digest BIOs context into B<mdcp>. | ||
| 41 | |||
| 42 | =head1 NOTES | ||
| 43 | |||
| 44 | The context returned by BIO_get_md_ctx() can be used in calls | ||
| 45 | to EVP_DigestFinal() and also the signature routines EVP_SignFinal() | ||
| 46 | and EVP_VerifyFinal(). | ||
| 47 | |||
| 48 | The context returned by BIO_get_md_ctx() is an internal context | ||
| 49 | structure. Changes made to this context will affect the digest | ||
| 50 | BIO itself and the context pointer will become invalid when the digest | ||
| 51 | BIO is freed. | ||
| 52 | |||
| 53 | After the digest has been retrieved from a digest BIO it must be | ||
| 54 | reinitialized by calling BIO_reset(), or BIO_set_md() before any more | ||
| 55 | data is passed through it. | ||
| 56 | |||
| 57 | If an application needs to call BIO_gets() or BIO_puts() through | ||
| 58 | a chain containing digest BIOs then this can be done by prepending | ||
| 59 | a buffering BIO. | ||
| 60 | |||
| 61 | =head1 RETURN VALUES | ||
| 62 | |||
| 63 | BIO_f_md() returns the digest BIO method. | ||
| 64 | |||
| 65 | BIO_set_md(), BIO_get_md() and BIO_md_ctx() return 1 for success and | ||
| 66 | 0 for failure. | ||
| 67 | |||
| 68 | =head1 EXAMPLES | ||
| 69 | |||
| 70 | The following example creates a BIO chain containing an SHA1 and MD5 | ||
| 71 | digest BIO and passes the string "Hello World" through it. Error | ||
| 72 | checking has been omitted for clarity. | ||
| 73 | |||
| 74 | BIO *bio, *mdtmp; | ||
| 75 | char message[] = "Hello World"; | ||
| 76 | bio = BIO_new(BIO_s_null()); | ||
| 77 | mdtmp = BIO_new(BIO_f_md()); | ||
| 78 | BIO_set_md(mdtmp, EVP_sha1()); | ||
| 79 | /* For BIO_push() we want to append the sink BIO and keep a note of | ||
| 80 | * the start of the chain. | ||
| 81 | */ | ||
| 82 | bio = BIO_push(mdtmp, bio); | ||
| 83 | mdtmp = BIO_new(BIO_f_md()); | ||
| 84 | BIO_set_md(mdtmp, EVP_md5()); | ||
| 85 | bio = BIO_push(mdtmp, bio); | ||
| 86 | /* Note: mdtmp can now be discarded */ | ||
| 87 | BIO_write(bio, message, strlen(message)); | ||
| 88 | |||
| 89 | The next example digests data by reading through a chain instead: | ||
| 90 | |||
| 91 | BIO *bio, *mdtmp; | ||
| 92 | char buf[1024]; | ||
| 93 | int rdlen; | ||
| 94 | bio = BIO_new_file(file, "rb"); | ||
| 95 | mdtmp = BIO_new(BIO_f_md()); | ||
| 96 | BIO_set_md(mdtmp, EVP_sha1()); | ||
| 97 | bio = BIO_push(mdtmp, bio); | ||
| 98 | mdtmp = BIO_new(BIO_f_md()); | ||
| 99 | BIO_set_md(mdtmp, EVP_md5()); | ||
| 100 | bio = BIO_push(mdtmp, bio); | ||
| 101 | do { | ||
| 102 | rdlen = BIO_read(bio, buf, sizeof(buf)); | ||
| 103 | /* Might want to do something with the data here */ | ||
| 104 | } while(rdlen > 0); | ||
| 105 | |||
| 106 | This next example retrieves the message digests from a BIO chain and | ||
| 107 | outputs them. This could be used with the examples above. | ||
| 108 | |||
| 109 | BIO *mdtmp; | ||
| 110 | unsigned char mdbuf[EVP_MAX_MD_SIZE]; | ||
| 111 | int mdlen; | ||
| 112 | int i; | ||
| 113 | mdtmp = bio; /* Assume bio has previously been set up */ | ||
| 114 | do { | ||
| 115 | EVP_MD *md; | ||
| 116 | mdtmp = BIO_find_type(mdtmp, BIO_TYPE_MD); | ||
| 117 | if(!mdtmp) break; | ||
| 118 | BIO_get_md(mdtmp, &md); | ||
| 119 | printf("%s digest", OBJ_nid2sn(EVP_MD_type(md))); | ||
| 120 | mdlen = BIO_gets(mdtmp, mdbuf, EVP_MAX_MD_SIZE); | ||
| 121 | for(i = 0; i < mdlen; i++) printf(":%02X", mdbuf[i]); | ||
| 122 | printf("\n"); | ||
| 123 | mdtmp = BIO_next(mdtmp); | ||
| 124 | } while(mdtmp); | ||
| 125 | |||
| 126 | BIO_free_all(bio); | ||
| 127 | |||
| 128 | =head1 BUGS | ||
| 129 | |||
| 130 | The lack of support for BIO_puts() and the non standard behaviour of | ||
| 131 | BIO_gets() could be regarded as anomalous. It could be argued that BIO_gets() | ||
| 132 | and BIO_puts() should be passed to the next BIO in the chain and digest | ||
| 133 | the data passed through and that digests should be retrieved using a | ||
| 134 | separate BIO_ctrl() call. | ||
| 135 | |||
| 136 | =head1 SEE ALSO | ||
| 137 | |||
| 138 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_null.pod b/src/lib/libssl/src/doc/crypto/BIO_f_null.pod new file mode 100644 index 0000000000..b057c18408 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_f_null.pod | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_f_null - null filter | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | BIO_METHOD * BIO_f_null(void); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | BIO_f_null() returns the null filter BIO method. This is a filter BIO | ||
| 16 | that does nothing. | ||
| 17 | |||
| 18 | All requests to a null filter BIO are passed through to the next BIO in | ||
| 19 | the chain: this means that a BIO chain containing a null filter BIO | ||
| 20 | behaves just as though the BIO was not there. | ||
| 21 | |||
| 22 | =head1 NOTES | ||
| 23 | |||
| 24 | As may be apparent a null filter BIO is not particularly useful. | ||
| 25 | |||
| 26 | =head1 RETURN VALUES | ||
| 27 | |||
| 28 | BIO_f_null() returns the null filter BIO method. | ||
| 29 | |||
| 30 | =head1 SEE ALSO | ||
| 31 | |||
| 32 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod b/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod new file mode 100644 index 0000000000..a56ee2b92f --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod | |||
| @@ -0,0 +1,313 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_f_ssl, BIO_set_ssl, BIO_get_ssl, BIO_set_ssl_mode, BIO_set_ssl_renegotiate_bytes, | ||
| 6 | BIO_get_num_renegotiates, BIO_set_ssl_renegotiate_timeout, BIO_new_ssl, | ||
| 7 | BIO_new_ssl_connect, BIO_new_buffer_ssl_connect, BIO_ssl_copy_session_id, | ||
| 8 | BIO_ssl_shutdown - SSL BIO | ||
| 9 | |||
| 10 | =head1 SYNOPSIS | ||
| 11 | |||
| 12 | #include <openssl/bio.h> | ||
| 13 | #include <openssl/ssl.h> | ||
| 14 | |||
| 15 | BIO_METHOD *BIO_f_ssl(void); | ||
| 16 | |||
| 17 | #define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl) | ||
| 18 | #define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp) | ||
| 19 | #define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL) | ||
| 20 | #define BIO_set_ssl_renegotiate_bytes(b,num) \ | ||
| 21 | BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL); | ||
| 22 | #define BIO_set_ssl_renegotiate_timeout(b,seconds) \ | ||
| 23 | BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL); | ||
| 24 | #define BIO_get_num_renegotiates(b) \ | ||
| 25 | BIO_ctrl(b,BIO_C_SET_SSL_NUM_RENEGOTIATES,0,NULL); | ||
| 26 | |||
| 27 | BIO *BIO_new_ssl(SSL_CTX *ctx,int client); | ||
| 28 | BIO *BIO_new_ssl_connect(SSL_CTX *ctx); | ||
| 29 | BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx); | ||
| 30 | int BIO_ssl_copy_session_id(BIO *to,BIO *from); | ||
| 31 | void BIO_ssl_shutdown(BIO *bio); | ||
| 32 | |||
| 33 | #define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL) | ||
| 34 | |||
| 35 | =head1 DESCRIPTION | ||
| 36 | |||
| 37 | BIO_f_ssl() returns the SSL BIO method. This is a filter BIO which | ||
| 38 | is a wrapper round the OpenSSL SSL routines adding a BIO "flavour" to | ||
| 39 | SSL I/O. | ||
| 40 | |||
| 41 | I/O performed on an SSL BIO communicates using the SSL protocol with | ||
| 42 | the SSLs read and write BIOs. If an SSL connection is not established | ||
| 43 | then an attempt is made to establish one on the first I/O call. | ||
| 44 | |||
| 45 | If a BIO is appended to an SSL BIO using BIO_push() it is automatically | ||
| 46 | used as the SSL BIOs read and write BIOs. | ||
| 47 | |||
| 48 | Calling BIO_reset() on an SSL BIO closes down any current SSL connection | ||
| 49 | by calling SSL_shutdown(). BIO_reset() is then sent to the next BIO in | ||
| 50 | the chain: this will typically disconnect the underlying transport. | ||
| 51 | The SSL BIO is then reset to the initial accept or connect state. | ||
| 52 | |||
| 53 | If the close flag is set when an SSL BIO is freed then the internal | ||
| 54 | SSL structure is also freed using SSL_free(). | ||
| 55 | |||
| 56 | BIO_set_ssl() sets the internal SSL pointer of BIO B<b> to B<ssl> using | ||
| 57 | the close flag B<c>. | ||
| 58 | |||
| 59 | BIO_get_ssl() retrieves the SSL pointer of BIO B<b>, it can then be | ||
| 60 | manipulated using the standard SSL library functions. | ||
| 61 | |||
| 62 | BIO_set_ssl_mode() sets the SSL BIO mode to B<client>. If B<client> | ||
| 63 | is 1 client mode is set. If B<client> is 0 server mode is set. | ||
| 64 | |||
| 65 | BIO_set_ssl_renegotiate_bytes() sets the renegotiate byte count | ||
| 66 | to B<num>. When set after every B<num> bytes of I/O (read and write) | ||
| 67 | the SSL session is automatically renegotiated. B<num> must be at | ||
| 68 | least 512 bytes. | ||
| 69 | |||
| 70 | BIO_set_ssl_renegotiate_timeout() sets the renegotiate timeout to | ||
| 71 | B<seconds>. When the renegotiate timeout elapses the session is | ||
| 72 | automatically renegotiated. | ||
| 73 | |||
| 74 | BIO_get_num_renegotiates() returns the total number of session | ||
| 75 | renegotiations due to I/O or timeout. | ||
| 76 | |||
| 77 | BIO_new_ssl() allocates an SSL BIO using SSL_CTX B<ctx> and using | ||
| 78 | client mode if B<client> is non zero. | ||
| 79 | |||
| 80 | BIO_new_ssl_connect() creates a new BIO chain consisting of an | ||
| 81 | SSL BIO (using B<ctx>) followed by a connect BIO. | ||
| 82 | |||
| 83 | BIO_new_buffer_ssl_connect() creates a new BIO chain consisting | ||
| 84 | of a buffering BIO, an SSL BIO (using B<ctx>) and a connect | ||
| 85 | BIO. | ||
| 86 | |||
| 87 | BIO_ssl_copy_session_id() copies an SSL session id between | ||
| 88 | BIO chains B<from> and B<to>. It does this by locating the | ||
| 89 | SSL BIOs in each chain and calling SSL_copy_session_id() on | ||
| 90 | the internal SSL pointer. | ||
| 91 | |||
| 92 | BIO_ssl_shutdown() closes down an SSL connection on BIO | ||
| 93 | chain B<bio>. It does this by locating the SSL BIO in the | ||
| 94 | chain and calling SSL_shutdown() on its internal SSL | ||
| 95 | pointer. | ||
| 96 | |||
| 97 | BIO_do_handshake() attempts to complete an SSL handshake on the | ||
| 98 | supplied BIO and establish the SSL connection. It returns 1 | ||
| 99 | if the connection was established successfully. A zero or negative | ||
| 100 | value is returned if the connection could not be established, the | ||
| 101 | call BIO_should_retry() should be used for non blocking connect BIOs | ||
| 102 | to determine if the call should be retried. If an SSL connection has | ||
| 103 | already been established this call has no effect. | ||
| 104 | |||
| 105 | =head1 NOTES | ||
| 106 | |||
| 107 | SSL BIOs are exceptional in that if the underlying transport | ||
| 108 | is non blocking they can still request a retry in exceptional | ||
| 109 | circumstances. Specifically this will happen if a session | ||
| 110 | renegotiation takes place during a BIO_read() operation, one | ||
| 111 | case where this happens is when SGC or step up occurs. | ||
| 112 | |||
| 113 | In OpenSSL 0.9.6 and later the SSL flag SSL_AUTO_RETRY can be | ||
| 114 | set to disable this behaviour. That is when this flag is set | ||
| 115 | an SSL BIO using a blocking transport will never request a | ||
| 116 | retry. | ||
| 117 | |||
| 118 | Since unknown BIO_ctrl() operations are sent through filter | ||
| 119 | BIOs the servers name and port can be set using BIO_set_host() | ||
| 120 | on the BIO returned by BIO_new_ssl_connect() without having | ||
| 121 | to locate the connect BIO first. | ||
| 122 | |||
| 123 | Applications do not have to call BIO_do_handshake() but may wish | ||
| 124 | to do so to separate the handshake process from other I/O | ||
| 125 | processing. | ||
| 126 | |||
| 127 | =head1 RETURN VALUES | ||
| 128 | |||
| 129 | TBA | ||
| 130 | |||
| 131 | =head1 EXAMPLE | ||
| 132 | |||
| 133 | This SSL/TLS client example, attempts to retrieve a page from an | ||
| 134 | SSL/TLS web server. The I/O routines are identical to those of the | ||
| 135 | unencrypted example in L<BIO_s_connect(3)|BIO_s_connect(3)>. | ||
| 136 | |||
| 137 | BIO *sbio, *out; | ||
| 138 | int len; | ||
| 139 | char tmpbuf[1024]; | ||
| 140 | SSL_CTX *ctx; | ||
| 141 | SSL *ssl; | ||
| 142 | |||
| 143 | ERR_load_crypto_strings(); | ||
| 144 | ERR_load_SSL_strings(); | ||
| 145 | OpenSSL_add_all_algorithms(); | ||
| 146 | |||
| 147 | /* We would seed the PRNG here if the platform didn't | ||
| 148 | * do it automatically | ||
| 149 | */ | ||
| 150 | |||
| 151 | ctx = SSL_CTX_new(SSLv23_client_method()); | ||
| 152 | |||
| 153 | /* We'd normally set some stuff like the verify paths and | ||
| 154 | * mode here because as things stand this will connect to | ||
| 155 | * any server whose certificate is signed by any CA. | ||
| 156 | */ | ||
| 157 | |||
| 158 | sbio = BIO_new_ssl_connect(ctx); | ||
| 159 | |||
| 160 | BIO_get_ssl(sbio, &ssl); | ||
| 161 | |||
| 162 | if(!ssl) { | ||
| 163 | fprintf(stderr, "Can't locate SSL pointer\n"); | ||
| 164 | /* whatever ... */ | ||
| 165 | } | ||
| 166 | |||
| 167 | /* Don't want any retries */ | ||
| 168 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); | ||
| 169 | |||
| 170 | /* We might want to do other things with ssl here */ | ||
| 171 | |||
| 172 | BIO_set_conn_hostname(sbio, "localhost:https"); | ||
| 173 | |||
| 174 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 175 | if(BIO_do_connect(sbio) <= 0) { | ||
| 176 | fprintf(stderr, "Error connecting to server\n"); | ||
| 177 | ERR_print_errors_fp(stderr); | ||
| 178 | /* whatever ... */ | ||
| 179 | } | ||
| 180 | |||
| 181 | if(BIO_do_handshake(sbio) <= 0) { | ||
| 182 | fprintf(stderr, "Error establishing SSL connection\n"); | ||
| 183 | ERR_print_errors_fp(stderr); | ||
| 184 | /* whatever ... */ | ||
| 185 | } | ||
| 186 | |||
| 187 | /* Could examine ssl here to get connection info */ | ||
| 188 | |||
| 189 | BIO_puts(sbio, "GET / HTTP/1.0\n\n"); | ||
| 190 | for(;;) { | ||
| 191 | len = BIO_read(sbio, tmpbuf, 1024); | ||
| 192 | if(len <= 0) break; | ||
| 193 | BIO_write(out, tmpbuf, len); | ||
| 194 | } | ||
| 195 | BIO_free_all(sbio); | ||
| 196 | BIO_free(out); | ||
| 197 | |||
| 198 | Here is a simple server example. It makes use of a buffering | ||
| 199 | BIO to allow lines to be read from the SSL BIO using BIO_gets. | ||
| 200 | It creates a pseudo web page containing the actual request from | ||
| 201 | a client and also echoes the request to standard output. | ||
| 202 | |||
| 203 | BIO *sbio, *bbio, *acpt, *out; | ||
| 204 | int len; | ||
| 205 | char tmpbuf[1024]; | ||
| 206 | SSL_CTX *ctx; | ||
| 207 | SSL *ssl; | ||
| 208 | |||
| 209 | ERR_load_crypto_strings(); | ||
| 210 | ERR_load_SSL_strings(); | ||
| 211 | OpenSSL_add_all_algorithms(); | ||
| 212 | |||
| 213 | /* Might seed PRNG here */ | ||
| 214 | |||
| 215 | ctx = SSL_CTX_new(SSLv23_server_method()); | ||
| 216 | |||
| 217 | if (!SSL_CTX_use_certificate_file(ctx,"server.pem",SSL_FILETYPE_PEM) | ||
| 218 | || !SSL_CTX_use_PrivateKey_file(ctx,"server.pem",SSL_FILETYPE_PEM) | ||
| 219 | || !SSL_CTX_check_private_key(ctx)) { | ||
| 220 | |||
| 221 | fprintf(stderr, "Error setting up SSL_CTX\n"); | ||
| 222 | ERR_print_errors_fp(stderr); | ||
| 223 | return 0; | ||
| 224 | } | ||
| 225 | |||
| 226 | /* Might do other things here like setting verify locations and | ||
| 227 | * DH and/or RSA temporary key callbacks | ||
| 228 | */ | ||
| 229 | |||
| 230 | /* New SSL BIO setup as server */ | ||
| 231 | sbio=BIO_new_ssl(ctx,0); | ||
| 232 | |||
| 233 | BIO_get_ssl(sbio, &ssl); | ||
| 234 | |||
| 235 | if(!ssl) { | ||
| 236 | fprintf(stderr, "Can't locate SSL pointer\n"); | ||
| 237 | /* whatever ... */ | ||
| 238 | } | ||
| 239 | |||
| 240 | /* Don't want any retries */ | ||
| 241 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); | ||
| 242 | |||
| 243 | /* Create the buffering BIO */ | ||
| 244 | |||
| 245 | bbio = BIO_new(BIO_f_buffer()); | ||
| 246 | |||
| 247 | /* Add to chain */ | ||
| 248 | sbio = BIO_push(bbio, sbio); | ||
| 249 | |||
| 250 | acpt=BIO_new_accept("4433"); | ||
| 251 | |||
| 252 | /* By doing this when a new connection is established | ||
| 253 | * we automatically have sbio inserted into it. The | ||
| 254 | * BIO chain is now 'swallowed' by the accept BIO and | ||
| 255 | * will be freed when the accept BIO is freed. | ||
| 256 | */ | ||
| 257 | |||
| 258 | BIO_set_accept_bios(acpt,sbio); | ||
| 259 | |||
| 260 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 261 | |||
| 262 | /* Setup accept BIO */ | ||
| 263 | if(BIO_do_accept(acpt) <= 0) { | ||
| 264 | fprintf(stderr, "Error setting up accept BIO\n"); | ||
| 265 | ERR_print_errors_fp(stderr); | ||
| 266 | return 0; | ||
| 267 | } | ||
| 268 | |||
| 269 | /* Now wait for incoming connection */ | ||
| 270 | if(BIO_do_accept(acpt) <= 0) { | ||
| 271 | fprintf(stderr, "Error in connection\n"); | ||
| 272 | ERR_print_errors_fp(stderr); | ||
| 273 | return 0; | ||
| 274 | } | ||
| 275 | |||
| 276 | /* We only want one connection so remove and free | ||
| 277 | * accept BIO | ||
| 278 | */ | ||
| 279 | |||
| 280 | sbio = BIO_pop(acpt); | ||
| 281 | |||
| 282 | BIO_free_all(acpt); | ||
| 283 | |||
| 284 | if(BIO_do_handshake(sbio) <= 0) { | ||
| 285 | fprintf(stderr, "Error in SSL handshake\n"); | ||
| 286 | ERR_print_errors_fp(stderr); | ||
| 287 | return 0; | ||
| 288 | } | ||
| 289 | |||
| 290 | BIO_puts(sbio, "HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n"); | ||
| 291 | BIO_puts(sbio, "<pre>\r\nConnection Established\r\nRequest headers:\r\n"); | ||
| 292 | BIO_puts(sbio, "--------------------------------------------------\r\n"); | ||
| 293 | |||
| 294 | for(;;) { | ||
| 295 | len = BIO_gets(sbio, tmpbuf, 1024); | ||
| 296 | if(len <= 0) break; | ||
| 297 | BIO_write(sbio, tmpbuf, len); | ||
| 298 | BIO_write(out, tmpbuf, len); | ||
| 299 | /* Look for blank line signifying end of headers*/ | ||
| 300 | if((tmpbuf[0] == '\r') || (tmpbuf[0] == '\n')) break; | ||
| 301 | } | ||
| 302 | |||
| 303 | BIO_puts(sbio, "--------------------------------------------------\r\n"); | ||
| 304 | BIO_puts(sbio, "</pre>\r\n"); | ||
| 305 | |||
| 306 | /* Since there is a buffering BIO present we had better flush it */ | ||
| 307 | BIO_flush(sbio); | ||
| 308 | |||
| 309 | BIO_free_all(sbio); | ||
| 310 | |||
| 311 | =head1 SEE ALSO | ||
| 312 | |||
| 313 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_find_type.pod b/src/lib/libssl/src/doc/crypto/BIO_find_type.pod new file mode 100644 index 0000000000..bd3b256196 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_find_type.pod | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_find_type, BIO_next - BIO chain traversal | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | BIO * BIO_find_type(BIO *b,int bio_type); | ||
| 12 | BIO * BIO_next(BIO *b); | ||
| 13 | |||
| 14 | #define BIO_method_type(b) ((b)->method->type) | ||
| 15 | |||
| 16 | #define BIO_TYPE_NONE 0 | ||
| 17 | #define BIO_TYPE_MEM (1|0x0400) | ||
| 18 | #define BIO_TYPE_FILE (2|0x0400) | ||
| 19 | |||
| 20 | #define BIO_TYPE_FD (4|0x0400|0x0100) | ||
| 21 | #define BIO_TYPE_SOCKET (5|0x0400|0x0100) | ||
| 22 | #define BIO_TYPE_NULL (6|0x0400) | ||
| 23 | #define BIO_TYPE_SSL (7|0x0200) | ||
| 24 | #define BIO_TYPE_MD (8|0x0200) | ||
| 25 | #define BIO_TYPE_BUFFER (9|0x0200) | ||
| 26 | #define BIO_TYPE_CIPHER (10|0x0200) | ||
| 27 | #define BIO_TYPE_BASE64 (11|0x0200) | ||
| 28 | #define BIO_TYPE_CONNECT (12|0x0400|0x0100) | ||
| 29 | #define BIO_TYPE_ACCEPT (13|0x0400|0x0100) | ||
| 30 | #define BIO_TYPE_PROXY_CLIENT (14|0x0200) | ||
| 31 | #define BIO_TYPE_PROXY_SERVER (15|0x0200) | ||
| 32 | #define BIO_TYPE_NBIO_TEST (16|0x0200) | ||
| 33 | #define BIO_TYPE_NULL_FILTER (17|0x0200) | ||
| 34 | #define BIO_TYPE_BER (18|0x0200) | ||
| 35 | #define BIO_TYPE_BIO (19|0x0400) | ||
| 36 | |||
| 37 | #define BIO_TYPE_DESCRIPTOR 0x0100 | ||
| 38 | #define BIO_TYPE_FILTER 0x0200 | ||
| 39 | #define BIO_TYPE_SOURCE_SINK 0x0400 | ||
| 40 | |||
| 41 | =head1 DESCRIPTION | ||
| 42 | |||
| 43 | The BIO_find_type() searches for a BIO of a given type in a chain, starting | ||
| 44 | at BIO B<b>. If B<type> is a specific type (such as BIO_TYPE_MEM) then a search | ||
| 45 | is made for a BIO of that type. If B<type> is a general type (such as | ||
| 46 | B<BIO_TYPE_SOURCE_SINK>) then the next matching BIO of the given general type is | ||
| 47 | searched for. BIO_find_type() returns the next matching BIO or NULL if none is | ||
| 48 | found. | ||
| 49 | |||
| 50 | Note: not all the B<BIO_TYPE_*> types above have corresponding BIO implementations. | ||
| 51 | |||
| 52 | BIO_next() returns the next BIO in a chain. It can be used to traverse all BIOs | ||
| 53 | in a chain or used in conjunction with BIO_find_type() to find all BIOs of a | ||
| 54 | certain type. | ||
| 55 | |||
| 56 | BIO_method_type() returns the type of a BIO. | ||
| 57 | |||
| 58 | =head1 RETURN VALUES | ||
| 59 | |||
| 60 | BIO_find_type() returns a matching BIO or NULL for no match. | ||
| 61 | |||
| 62 | BIO_next() returns the next BIO in a chain. | ||
| 63 | |||
| 64 | BIO_method_type() returns the type of the BIO B<b>. | ||
| 65 | |||
| 66 | =head1 NOTES | ||
| 67 | |||
| 68 | BIO_next() was added to OpenSSL 0.9.6 to provide a 'clean' way to traverse a BIO | ||
| 69 | chain or find multiple matches using BIO_find_type(). Previous versions had to | ||
| 70 | use: | ||
| 71 | |||
| 72 | next = bio->next_bio; | ||
| 73 | |||
| 74 | =head1 BUGS | ||
| 75 | |||
| 76 | BIO_find_type() in OpenSSL 0.9.5a and earlier could not be safely passed a | ||
| 77 | NULL pointer for the B<b> argument. | ||
| 78 | |||
| 79 | =head1 EXAMPLE | ||
| 80 | |||
| 81 | Traverse a chain looking for digest BIOs: | ||
| 82 | |||
| 83 | BIO *btmp; | ||
| 84 | btmp = in_bio; /* in_bio is chain to search through */ | ||
| 85 | |||
| 86 | do { | ||
| 87 | btmp = BIO_find_type(btmp, BIO_TYPE_MD); | ||
| 88 | if(btmp == NULL) break; /* Not found */ | ||
| 89 | /* btmp is a digest BIO, do something with it ...*/ | ||
| 90 | ... | ||
| 91 | |||
| 92 | btmp = BIO_next(btmp); | ||
| 93 | } while(btmp); | ||
| 94 | |||
| 95 | |||
| 96 | =head1 SEE ALSO | ||
| 97 | |||
| 98 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_new.pod b/src/lib/libssl/src/doc/crypto/BIO_new.pod new file mode 100644 index 0000000000..2a245fc8de --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_new.pod | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_new, BIO_set, BIO_free, BIO_vfree, BIO_free_all - BIO allocation and freeing functions | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | BIO * BIO_new(BIO_METHOD *type); | ||
| 12 | int BIO_set(BIO *a,BIO_METHOD *type); | ||
| 13 | int BIO_free(BIO *a); | ||
| 14 | void BIO_vfree(BIO *a); | ||
| 15 | void BIO_free_all(BIO *a); | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | The BIO_new() function returns a new BIO using method B<type>. | ||
| 20 | |||
| 21 | BIO_set() sets the method of an already existing BIO. | ||
| 22 | |||
| 23 | BIO_free() frees up a single BIO, BIO_vfree() also frees up a single BIO | ||
| 24 | but it does not return a value. Calling BIO_free() may also have some effect | ||
| 25 | on the underlying I/O structure, for example it may close the file being | ||
| 26 | referred to under certain circumstances. For more details see the individual | ||
| 27 | BIO_METHOD descriptions. | ||
| 28 | |||
| 29 | BIO_free_all() frees up an entire BIO chain, it does not halt if an error | ||
| 30 | occurs freeing up an individual BIO in the chain. | ||
| 31 | |||
| 32 | =head1 RETURN VALUES | ||
| 33 | |||
| 34 | BIO_new() returns a newly created BIO or NULL if the call fails. | ||
| 35 | |||
| 36 | BIO_set(), BIO_free() return 1 for success and 0 for failure. | ||
| 37 | |||
| 38 | BIO_free_all() and BIO_vfree() do not return values. | ||
| 39 | |||
| 40 | =head1 NOTES | ||
| 41 | |||
| 42 | Some BIOs (such as memory BIOs) can be used immediately after calling | ||
| 43 | BIO_new(). Others (such as file BIOs) need some additional initialization, | ||
| 44 | and frequently a utility function exists to create and initialize such BIOs. | ||
| 45 | |||
| 46 | If BIO_free() is called on a BIO chain it will only free one BIO resulting | ||
| 47 | in a memory leak. | ||
| 48 | |||
| 49 | Calling BIO_free_all() a single BIO has the same effect as calling BIO_free() | ||
| 50 | on it other than the discarded return value. | ||
| 51 | |||
| 52 | Normally the B<type> argument is supplied by a function which returns a | ||
| 53 | pointer to a BIO_METHOD. There is a naming convention for such functions: | ||
| 54 | a source/sink BIO is normally called BIO_s_*() and a filter BIO | ||
| 55 | BIO_f_*(); | ||
| 56 | |||
| 57 | =head1 EXAMPLE | ||
| 58 | |||
| 59 | Create a memory BIO: | ||
| 60 | |||
| 61 | BIO *mem = BIO_new(BIO_s_mem()); | ||
| 62 | |||
| 63 | =head1 SEE ALSO | ||
| 64 | |||
| 65 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_new_bio_pair.pod b/src/lib/libssl/src/doc/crypto/BIO_new_bio_pair.pod new file mode 100644 index 0000000000..2256ba9d34 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_new_bio_pair.pod | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_new_bio_pair - create a new BIO pair | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, BIO **bio2, size_t writebuf2); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | BIO_new_bio_pair() creates a buffering BIO pair. It has two endpoints between | ||
| 16 | data can be buffered. Its typical use is to connect one endpoint as underlying | ||
| 17 | input/output BIO to an SSL and access the other one controlled by the program | ||
| 18 | instead of accessing the network connection directly. | ||
| 19 | |||
| 20 | The two new BIOs B<bio1> and B<bio2> are symmetric with respect to their | ||
| 21 | functionality. The size of their buffers is determined by B<writebuf1> and | ||
| 22 | B<writebuf2>. If the size give is 0, the default size is used. | ||
| 23 | |||
| 24 | BIO_new_bio_pair() does not check whether B<bio1> or B<bio2> do point to | ||
| 25 | some other BIO, the values are overwritten, BIO_free() is not called. | ||
| 26 | |||
| 27 | The two BIOs, even though forming a BIO pair and must be BIO_free()'ed | ||
| 28 | separately. This can be of importance, as some SSL-functions like SSL_set_bio() | ||
| 29 | or SSL_free() call BIO_free() implicitly, so that the peer-BIO is left | ||
| 30 | untouched and must also be BIO_free()'ed. | ||
| 31 | |||
| 32 | =head1 EXAMPLE | ||
| 33 | |||
| 34 | The BIO pair can be used to have full control over the network access of an | ||
| 35 | application. The application can call select() on the socket as required | ||
| 36 | without having to go through the SSL-interface. | ||
| 37 | |||
| 38 | BIO *internal_bio, *network_bio; | ||
| 39 | ... | ||
| 40 | BIO_new_bio_pair(internal_bio, 0, network_bio, 0); | ||
| 41 | SSL_set_bio(ssl, internal_bio); | ||
| 42 | SSL_operations(); | ||
| 43 | ... | ||
| 44 | |||
| 45 | application | TLS-engine | ||
| 46 | | | | ||
| 47 | +----------> SSL_operations() | ||
| 48 | | /\ || | ||
| 49 | | || \/ | ||
| 50 | | BIO-pair (internal_bio) | ||
| 51 | +----------< BIO-pair (network_bio) | ||
| 52 | | | | ||
| 53 | socket | | ||
| 54 | |||
| 55 | ... | ||
| 56 | SSL_free(ssl); /* implicitly frees internal_bio */ | ||
| 57 | BIO_free(network_bio); | ||
| 58 | ... | ||
| 59 | |||
| 60 | As the BIO pair will only buffer the data and never directly access the | ||
| 61 | connection, it behaves non-blocking and will return as soon as the write | ||
| 62 | buffer is full or the read buffer is drained. Then the application has to | ||
| 63 | flush the write buffer and/or fill the read buffer. | ||
| 64 | |||
| 65 | Use the BIO_ctrl_pending(), to find out whether data is buffered in the BIO | ||
| 66 | and must be transfered to the network. Use BIO_ctrl_get_read_request() to | ||
| 67 | find out, how many bytes must be written into the buffer before the | ||
| 68 | SSL_operation() can successfully be continued. | ||
| 69 | |||
| 70 | =head1 IMPORTANT | ||
| 71 | |||
| 72 | As the data is buffered, SSL_operation() may return with a ERROR_SSL_WANT_READ | ||
| 73 | condition, but there is still data in the write buffer. An application must | ||
| 74 | not rely on the error value of SSL_operation() but must assure that the | ||
| 75 | write buffer is always flushed first. Otherwise a deadlock may occur as | ||
| 76 | the peer might be waiting for the data before being able to continue. | ||
| 77 | |||
| 78 | =head1 RETURN VALUES | ||
| 79 | |||
| 80 | The following return values can occur: | ||
| 81 | |||
| 82 | =over 4 | ||
| 83 | |||
| 84 | =item 1 | ||
| 85 | |||
| 86 | The BIO pair was created successfully. The new BIOs are available in | ||
| 87 | B<bio1> and B<bio2>. | ||
| 88 | |||
| 89 | =item 0 | ||
| 90 | |||
| 91 | The operation failed. The NULL pointer is stored into the locations for | ||
| 92 | B<bio1> and B<bio2>. Check the error stack for more information. | ||
| 93 | |||
| 94 | =back | ||
| 95 | |||
| 96 | =head1 SEE ALSO | ||
| 97 | |||
| 98 | L<SSL_set_bio(3)|SSL_set_bio(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>, | ||
| 99 | L<BIO_ctrl_pending(3)|BIO_ctrl_pending(3)>, | ||
| 100 | L<BIO_ctrl_get_read_request(3)|BIO_ctrl_get_read_request(3)> | ||
| 101 | |||
| 102 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_push.pod b/src/lib/libssl/src/doc/crypto/BIO_push.pod new file mode 100644 index 0000000000..8af1d3c097 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_push.pod | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_push, BIO_pop - add and remove BIOs from a chain. | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | BIO * BIO_push(BIO *b,BIO *append); | ||
| 12 | BIO * BIO_pop(BIO *b); | ||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | The BIO_push() function appends the BIO B<append> to B<b>, it returns | ||
| 17 | B<b>. | ||
| 18 | |||
| 19 | BIO_pop() removes the BIO B<b> from a chain and returns the next BIO | ||
| 20 | in the chain, or NULL if there is no next BIO. The removed BIO then | ||
| 21 | becomes a single BIO with no association with the original chain, | ||
| 22 | it can thus be freed or attached to a different chain. | ||
| 23 | |||
| 24 | =head1 NOTES | ||
| 25 | |||
| 26 | The names of these functions are perhaps a little misleading. BIO_push() | ||
| 27 | joins two BIO chains whereas BIO_pop() deletes a single BIO from a chain, | ||
| 28 | the deleted BIO does not need to be at the end of a chain. | ||
| 29 | |||
| 30 | The process of calling BIO_push() and BIO_pop() on a BIO may have additional | ||
| 31 | consequences (a control call is made to the affected BIOs) any effects will | ||
| 32 | be noted in the descriptions of individual BIOs. | ||
| 33 | |||
| 34 | =head1 EXAMPLES | ||
| 35 | |||
| 36 | For these examples suppose B<md1> and B<md2> are digest BIOs, B<b64> is | ||
| 37 | a base64 BIO and B<f> is a file BIO. | ||
| 38 | |||
| 39 | If the call: | ||
| 40 | |||
| 41 | BIO_push(b64, f); | ||
| 42 | |||
| 43 | is made then the new chain will be B<b64-chain>. After making the calls | ||
| 44 | |||
| 45 | BIO_push(md2, b64); | ||
| 46 | BIO_push(md1, md2); | ||
| 47 | |||
| 48 | the new chain is B<md1-md2-b64-f>. Data written to B<md1> will be digested | ||
| 49 | by B<md1> and B<md2>, B<base64> encoded and written to B<f>. | ||
| 50 | |||
| 51 | It should be noted that reading causes data to pass in the reverse | ||
| 52 | direction, that is data is read from B<f>, base64 B<decoded> and digested | ||
| 53 | by B<md1> and B<md2>. If the call: | ||
| 54 | |||
| 55 | BIO_pop(md2); | ||
| 56 | |||
| 57 | The call will return B<b64> and the new chain will be B<md1-b64-f> data can | ||
| 58 | be written to B<md1> as before. | ||
| 59 | |||
| 60 | =head1 RETURN VALUES | ||
| 61 | |||
| 62 | BIO_push() returns the end of the chain, B<b>. | ||
| 63 | |||
| 64 | BIO_pop() returns the next BIO in the chain, or NULL if there is no next | ||
| 65 | BIO. | ||
| 66 | |||
| 67 | =head1 SEE ALSO | ||
| 68 | |||
| 69 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_read.pod b/src/lib/libssl/src/doc/crypto/BIO_read.pod new file mode 100644 index 0000000000..b34528104d --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_read.pod | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_read, BIO_write, BIO_gets, BIO_puts - BIO I/O functions | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | int BIO_read(BIO *b, void *buf, int len); | ||
| 12 | int BIO_gets(BIO *b,char *buf, int size); | ||
| 13 | int BIO_write(BIO *b, const void *buf, int len); | ||
| 14 | int BIO_puts(BIO *b,const char *buf); | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | BIO_read() attempts to read B<len> bytes from BIO B<b> and places | ||
| 19 | the data in B<buf>. | ||
| 20 | |||
| 21 | BIO_gets() performs the BIOs "gets" operation and places the data | ||
| 22 | in B<buf>. Usually this operation will attempt to read a line of data | ||
| 23 | from the BIO of maximum length B<len>. There are exceptions to this | ||
| 24 | however, for example BIO_gets() on a digest BIO will calculate and | ||
| 25 | return the digest and other BIOs may not support BIO_gets() at all. | ||
| 26 | |||
| 27 | BIO_write() attempts to write B<len> bytes from B<buf> to BIO B<b>. | ||
| 28 | |||
| 29 | BIO_puts() attempts to write a null terminated string B<buf> to BIO B<b> | ||
| 30 | |||
| 31 | =head1 RETURN VALUES | ||
| 32 | |||
| 33 | All these functions return either the amount of data successfully read or | ||
| 34 | written (if the return value is positive) or that no data was successfully | ||
| 35 | read or written if the result is 0 or -1. If the return value is -2 then | ||
| 36 | the operation is not implemented in the specific BIO type. | ||
| 37 | |||
| 38 | =head1 NOTES | ||
| 39 | |||
| 40 | A 0 or -1 return is not necessarily an indication of an error. In | ||
| 41 | particular when the source/sink is non-blocking or of a certain type | ||
| 42 | it may merely be an indication that no data is currently available and that | ||
| 43 | the application should retry the operation later. | ||
| 44 | |||
| 45 | One technique sometimes used with blocking sockets is to use a system call | ||
| 46 | (such as select(), poll() or equivalent) to determine when data is available | ||
| 47 | and then call read() to read the data. The equivalent with BIOs (that is call | ||
| 48 | select() on the underlying I/O structure and then call BIO_read() to | ||
| 49 | read the data) should B<not> be used because a single call to BIO_read() | ||
| 50 | can cause several reads (and writes in the case of SSL BIOs) on the underlying | ||
| 51 | I/O structure and may block as a result. Instead select() (or equivalent) | ||
| 52 | should be combined with non blocking I/O so successive reads will request | ||
| 53 | a retry instead of blocking. | ||
| 54 | |||
| 55 | See L<BIO_should_retry(3)|BIO_should_retry(3)> for details of how to | ||
| 56 | determine the cause of a retry and other I/O issues. | ||
| 57 | |||
| 58 | If the BIO_gets() function is not supported by a BIO then it possible to | ||
| 59 | work around this by adding a buffering BIO L<BIO_f_buffer(3)|BIO_f_buffer(3)> | ||
| 60 | to the chain. | ||
| 61 | |||
| 62 | =head1 SEE ALSO | ||
| 63 | |||
| 64 | L<BIO_should_retry(3)|BIO_should_retry(3)> | ||
| 65 | |||
| 66 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod b/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod new file mode 100644 index 0000000000..c49da7fb02 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod | |||
| @@ -0,0 +1,184 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_s_accept, BIO_set_nbio, BIO_set_accept_port, BIO_get_accept_port, | ||
| 6 | BIO_set_nbio_accept, BIO_set_accept_bios, BIO_set_bind_mode, | ||
| 7 | BIO_get_bind_mode, BIO_do_accept - accept BIO | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | #include <openssl/bio.h> | ||
| 12 | |||
| 13 | BIO_METHOD * BIO_s_accept(void); | ||
| 14 | |||
| 15 | #define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name) | ||
| 16 | #define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0) | ||
| 17 | |||
| 18 | BIO *BIO_new_accept(char *host_port); | ||
| 19 | |||
| 20 | #define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?"a":NULL) | ||
| 21 | #define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio) | ||
| 22 | |||
| 23 | #define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) | ||
| 24 | #define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) | ||
| 25 | |||
| 26 | #define BIO_BIND_NORMAL 0 | ||
| 27 | #define BIO_BIND_REUSEADDR_IF_UNUSED 1 | ||
| 28 | #define BIO_BIND_REUSEADDR 2 | ||
| 29 | |||
| 30 | #define BIO_do_accept(b) BIO_do_handshake(b) | ||
| 31 | |||
| 32 | =head1 DESCRIPTION | ||
| 33 | |||
| 34 | BIO_s_accept() returns the accept BIO method. This is a wrapper | ||
| 35 | round the platform's TCP/IP socket accept routines. | ||
| 36 | |||
| 37 | Using accept BIOs TCP/IP connections can be accepted and data | ||
| 38 | transferred using only BIO routines. In this way any platform | ||
| 39 | specific operations are hidden by the BIO abstraction. | ||
| 40 | |||
| 41 | Read and write operations on an accept BIO will perform I/O | ||
| 42 | on the underlying connection. If no connection is established | ||
| 43 | and the port (see below) is set up properly then the BIO | ||
| 44 | waits for an incoming connection. | ||
| 45 | |||
| 46 | Accept BIOs support BIO_puts() but not BIO_gets(). | ||
| 47 | |||
| 48 | If the close flag is set on an accept BIO then any active | ||
| 49 | connection on that chain is shutdown and the socket closed when | ||
| 50 | the BIO is freed. | ||
| 51 | |||
| 52 | Calling BIO_reset() on a accept BIO will close any active | ||
| 53 | connection and reset the BIO into a state where it awaits another | ||
| 54 | incoming connection. | ||
| 55 | |||
| 56 | BIO_get_fd() and BIO_set_fd() can be called to retrieve or set | ||
| 57 | the accept socket. See L<BIO_s_fd(3)|BIO_s_fd(3)> | ||
| 58 | |||
| 59 | BIO_set_accept_port() uses the string B<name> to set the accept | ||
| 60 | port. The port is represented as a string of the form "host:port", | ||
| 61 | where "host" is the interface to use and "port" is the port. | ||
| 62 | Either or both values can be "*" which is interpreted as meaning | ||
| 63 | any interface or port respectively. "port" has the same syntax | ||
| 64 | as the port specified in BIO_set_conn_port() for connect BIOs, | ||
| 65 | that is it can be a numerical port string or a string to lookup | ||
| 66 | using getservbyname() and a string table. | ||
| 67 | |||
| 68 | BIO_new_accept() combines BIO_new() and BIO_set_accept_port() into | ||
| 69 | a single call: that is it creates a new accept BIO with port | ||
| 70 | B<host_port>. | ||
| 71 | |||
| 72 | BIO_set_nbio_accept() sets the accept socket to blocking mode | ||
| 73 | (the default) if B<n> is 0 or non blocking mode if B<n> is 1. | ||
| 74 | |||
| 75 | BIO_set_accept_bios() can be used to set a chain of BIOs which | ||
| 76 | will be duplicated and prepended to the chain when an incoming | ||
| 77 | connection is received. This is useful if, for example, a | ||
| 78 | buffering or SSL BIO is required for each connection. The | ||
| 79 | chain of BIOs must not be freed after this call, they will | ||
| 80 | be automatically freed when the accept BIO is freed. | ||
| 81 | |||
| 82 | BIO_set_bind_mode() and BIO_get_bind_mode() set and retrieve | ||
| 83 | the current bind mode. If BIO_BIND_NORMAL (the default) is set | ||
| 84 | then another socket cannot be bound to the same port. If | ||
| 85 | BIO_BIND_REUSEADDR is set then other sockets can bind to the | ||
| 86 | same port. If BIO_BIND_REUSEADDR_IF_UNUSED is set then and | ||
| 87 | attempt is first made to use BIO_BIN_NORMAL, if this fails | ||
| 88 | and the port is not in use then a second attempt is made | ||
| 89 | using BIO_BIND_REUSEADDR. | ||
| 90 | |||
| 91 | BIO_do_accept() serves two functions. When it is first | ||
| 92 | called, after the accept BIO has been setup, it will attempt | ||
| 93 | to create the accept socket and bind an address to it. Second | ||
| 94 | and subsequent calls to BIO_do_accept() will await an incoming | ||
| 95 | connection. | ||
| 96 | |||
| 97 | =head1 NOTES | ||
| 98 | |||
| 99 | When an accept BIO is at the end of a chain it will await an | ||
| 100 | incoming connection before processing I/O calls. When an accept | ||
| 101 | BIO is not at then end of a chain it passes I/O calls to the next | ||
| 102 | BIO in the chain. | ||
| 103 | |||
| 104 | When a connection is established a new socket BIO is created for | ||
| 105 | the connection and appended to the chain. That is the chain is now | ||
| 106 | accept->socket. This effectively means that attempting I/O on | ||
| 107 | an initial accept socket will await an incoming connection then | ||
| 108 | perform I/O on it. | ||
| 109 | |||
| 110 | If any additional BIOs have been set using BIO_set_accept_bios() | ||
| 111 | then they are placed between the socket and the accept BIO, | ||
| 112 | that is the chain will be accept->otherbios->socket. | ||
| 113 | |||
| 114 | If a server wishes to process multiple connections (as is normally | ||
| 115 | the case) then the accept BIO must be made available for further | ||
| 116 | incoming connections. This can be done by waiting for a connection and | ||
| 117 | then calling: | ||
| 118 | |||
| 119 | connection = BIO_pop(accept); | ||
| 120 | |||
| 121 | After this call B<connection> will contain a BIO for the recently | ||
| 122 | established connection and B<accept> will now be a single BIO | ||
| 123 | again which can be used to await further incoming connections. | ||
| 124 | If no further connections will be accepted the B<accept> can | ||
| 125 | be freed using BIO_free(). | ||
| 126 | |||
| 127 | If only a single connection will be processed it is possible to | ||
| 128 | perform I/O using the accept BIO itself. This is often undesirable | ||
| 129 | however because the accept BIO will still accept additional incoming | ||
| 130 | connections. This can be resolved by using BIO_pop() (see above) | ||
| 131 | and freeing up the accept BIO after the initial connection. | ||
| 132 | |||
| 133 | =head1 RETURN VALUES | ||
| 134 | |||
| 135 | TBA | ||
| 136 | |||
| 137 | =head1 EXAMPLE | ||
| 138 | |||
| 139 | This example accepts two connections on port 4444, sends messages | ||
| 140 | down each and finally closes both down. | ||
| 141 | |||
| 142 | BIO *abio, *cbio, *cbio2; | ||
| 143 | ERR_load_crypto_strings(); | ||
| 144 | abio = BIO_new_accept("4444"); | ||
| 145 | |||
| 146 | /* First call to BIO_accept() sets up accept BIO */ | ||
| 147 | if(BIO_do_accept(abio) <= 0) { | ||
| 148 | fprintf(stderr, "Error setting up accept\n"); | ||
| 149 | ERR_print_errors_fp(stderr); | ||
| 150 | exit(0); | ||
| 151 | } | ||
| 152 | |||
| 153 | /* Wait for incoming connection */ | ||
| 154 | if(BIO_do_accept(abio) <= 0) { | ||
| 155 | fprintf(stderr, "Error accepting connection\n"); | ||
| 156 | ERR_print_errors_fp(stderr); | ||
| 157 | exit(0); | ||
| 158 | } | ||
| 159 | fprintf(stderr, "Connection 1 established\n"); | ||
| 160 | /* Retrieve BIO for connection */ | ||
| 161 | cbio = BIO_pop(abio); | ||
| 162 | BIO_puts(cbio, "Connection 1: Sending out Data on initial connection\n"); | ||
| 163 | fprintf(stderr, "Sent out data on connection 1\n"); | ||
| 164 | /* Wait for another connection */ | ||
| 165 | if(BIO_do_accept(abio) <= 0) { | ||
| 166 | fprintf(stderr, "Error accepting connection\n"); | ||
| 167 | ERR_print_errors_fp(stderr); | ||
| 168 | exit(0); | ||
| 169 | } | ||
| 170 | fprintf(stderr, "Connection 2 established\n"); | ||
| 171 | /* Close accept BIO to refuse further connections */ | ||
| 172 | cbio2 = BIO_pop(abio); | ||
| 173 | BIO_free(abio); | ||
| 174 | BIO_puts(cbio2, "Connection 2: Sending out Data on second\n"); | ||
| 175 | fprintf(stderr, "Sent out data on connection 2\n"); | ||
| 176 | |||
| 177 | BIO_puts(cbio, "Connection 1: Second connection established\n"); | ||
| 178 | /* Close the two established connections */ | ||
| 179 | BIO_free(cbio); | ||
| 180 | BIO_free(cbio2); | ||
| 181 | |||
| 182 | =head1 SEE ALSO | ||
| 183 | |||
| 184 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_bio.pod b/src/lib/libssl/src/doc/crypto/BIO_s_bio.pod new file mode 100644 index 0000000000..95ae802e47 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_s_bio.pod | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_s_bio, BIO_make_bio_pair, BIO_destroy_bio_pair, BIO_shutdown_wr, | ||
| 6 | BIO_set_write_buf_size, BIO_get_write_buf_size, BIO_new_bio_pair, | ||
| 7 | BIO_get_write_guarantee, BIO_ctrl_get_write_guarantee, BIO_get_read_request, | ||
| 8 | BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request - BIO pair BIO | ||
| 9 | |||
| 10 | =head1 SYNOPSIS | ||
| 11 | |||
| 12 | #include <openssl/bio.h> | ||
| 13 | |||
| 14 | BIO_METHOD *BIO_s_bio(void); | ||
| 15 | |||
| 16 | #define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2) | ||
| 17 | #define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL) | ||
| 18 | |||
| 19 | #define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL) | ||
| 20 | |||
| 21 | #define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL) | ||
| 22 | #define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL) | ||
| 23 | |||
| 24 | int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, BIO **bio2, size_t writebuf2); | ||
| 25 | |||
| 26 | #define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL) | ||
| 27 | size_t BIO_ctrl_get_write_guarantee(BIO *b); | ||
| 28 | |||
| 29 | #define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL) | ||
| 30 | size_t BIO_ctrl_get_read_request(BIO *b); | ||
| 31 | |||
| 32 | int BIO_ctrl_reset_read_request(BIO *b); | ||
| 33 | |||
| 34 | =head1 DESCRIPTION | ||
| 35 | |||
| 36 | BIO_s_bio() returns the method for a BIO pair. A BIO pair is a pair of source/sink | ||
| 37 | BIOs where data written to either half of the pair is buffered and can be read from | ||
| 38 | the other half. Both halves must usually by handled by the same application thread | ||
| 39 | since no locking is done on the internal data structures. | ||
| 40 | |||
| 41 | Since BIO chains typically end in a source/sink BIO it is possible to make this | ||
| 42 | one half of a BIO pair and have all the data processed by the chain under application | ||
| 43 | control. | ||
| 44 | |||
| 45 | One typical use of BIO pairs is to place TLS/SSL I/O under application control, this | ||
| 46 | can be used when the application wishes to use a non standard transport for | ||
| 47 | TLS/SSL or the normal socket routines are inappropriate. | ||
| 48 | |||
| 49 | Calls to BIO_read() will read data from the buffer or request a retry if no | ||
| 50 | data is available. | ||
| 51 | |||
| 52 | Calls to BIO_write() will place data in the buffer or request a retry if the | ||
| 53 | buffer is full. | ||
| 54 | |||
| 55 | The standard calls BIO_ctrl_pending() and BIO_ctrl_wpending() can be used to | ||
| 56 | determine the amount of pending data in the read or write buffer. | ||
| 57 | |||
| 58 | BIO_reset() clears any data in the write buffer. | ||
| 59 | |||
| 60 | BIO_make_bio_pair() joins two separate BIOs into a connected pair. | ||
| 61 | |||
| 62 | BIO_destroy_pair() destroys the association between two connected BIOs. Freeing | ||
| 63 | up any half of the pair will automatically destroy the association. | ||
| 64 | |||
| 65 | BIO_shutdown_wr() is used to close down a BIO B<b>. After this call no further | ||
| 66 | writes on BIO B<b> are allowed (they will return an error). Reads on the other | ||
| 67 | half of the pair will return any pending data or EOF when all pending data has | ||
| 68 | been read. | ||
| 69 | |||
| 70 | BIO_set_write_buf_size() sets the write buffer size of BIO B<b> to B<size>. | ||
| 71 | If the size is not initialized a default value is used. This is currently | ||
| 72 | 17K, sufficient for a maximum size TLS record. | ||
| 73 | |||
| 74 | BIO_get_write_buf_size() returns the size of the write buffer. | ||
| 75 | |||
| 76 | BIO_new_bio_pair() combines the calls to BIO_new(), BIO_make_bio_pair() and | ||
| 77 | BIO_set_write_buf_size() to create a connected pair of BIOs B<bio1>, B<bio2> | ||
| 78 | with write buffer sizes B<writebuf1> and B<writebuf2>. If either size is | ||
| 79 | zero then the default size is used. | ||
| 80 | |||
| 81 | BIO_get_write_guarantee() and BIO_ctrl_get_write_guarantee() return the maximum | ||
| 82 | length of data that can be currently written to the BIO. Writes larger than this | ||
| 83 | value will return a value from BIO_write() less than the amount requested or if the | ||
| 84 | buffer is full request a retry. BIO_ctrl_get_write_guarantee() is a function | ||
| 85 | whereas BIO_get_write_guarantee() is a macro. | ||
| 86 | |||
| 87 | BIO_get_read_request() and BIO_ctrl_get_read_request() return the | ||
| 88 | amount of data requested, or the buffer size if it is less, if the | ||
| 89 | last read attempt at the other half of the BIO pair failed due to an | ||
| 90 | empty buffer. This can be used to determine how much data should be | ||
| 91 | written to the BIO so the next read will succeed: this is most useful | ||
| 92 | in TLS/SSL applications where the amount of data read is usually | ||
| 93 | meaningful rather than just a buffer size. After a successful read | ||
| 94 | this call will return zero. It also will return zero once new data | ||
| 95 | has been written satisfying the read request or part of it. | ||
| 96 | Note that BIO_get_read_request() never returns an amount larger | ||
| 97 | than that returned by BIO_get_write_guarantee(). | ||
| 98 | |||
| 99 | BIO_ctrl_reset_read_request() can also be used to reset the value returned by | ||
| 100 | BIO_get_read_request() to zero. | ||
| 101 | |||
| 102 | =head1 NOTES | ||
| 103 | |||
| 104 | Both halves of a BIO pair should be freed. That is even if one half is implicit | ||
| 105 | freed due to a BIO_free_all() or SSL_free() call the other half needs to be freed. | ||
| 106 | |||
| 107 | When used in bidirectional applications (such as TLS/SSL) care should be taken to | ||
| 108 | flush any data in the write buffer. This can be done by calling BIO_pending() | ||
| 109 | on the other half of the pair and, if any data is pending, reading it and sending | ||
| 110 | it to the underlying transport. This must be done before any normal processing | ||
| 111 | (such as calling select() ) due to a request and BIO_should_read() being true. | ||
| 112 | |||
| 113 | To see why this is important consider a case where a request is sent using | ||
| 114 | BIO_write() and a response read with BIO_read(), this can occur during an | ||
| 115 | TLS/SSL handshake for example. BIO_write() will succeed and place data in the write | ||
| 116 | buffer. BIO_read() will initially fail and BIO_should_read() will be true. If | ||
| 117 | the application then waits for data to be available on the underlying transport | ||
| 118 | before flushing the write buffer it will never succeed because the request was | ||
| 119 | never sent! | ||
| 120 | |||
| 121 | =head1 EXAMPLE | ||
| 122 | |||
| 123 | TBA | ||
| 124 | |||
| 125 | =head1 SEE ALSO | ||
| 126 | |||
| 127 | L<SSL_set_bio(3)|SSL_set_bio(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>, | ||
| 128 | L<BIO_should_retry(3)|BIO_should_retry(3)>, L<BIO_read(3)|BIO_read(3)> | ||
| 129 | |||
| 130 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_connect.pod b/src/lib/libssl/src/doc/crypto/BIO_s_connect.pod new file mode 100644 index 0000000000..fe1aa679d4 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_s_connect.pod | |||
| @@ -0,0 +1,182 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_s_connect, BIO_set_conn_hostname, BIO_set_conn_port, | ||
| 6 | BIO_set_conn_ip, BIO_set_conn_int_port, BIO_get_conn_hostname, | ||
| 7 | BIO_get_conn_port, BIO_get_conn_ip, BIO_get_conn_int_port, | ||
| 8 | BIO_set_nbio, BIO_do_connect - connect BIO | ||
| 9 | |||
| 10 | =head1 SYNOPSIS | ||
| 11 | |||
| 12 | #include <openssl/bio.h> | ||
| 13 | |||
| 14 | BIO_METHOD * BIO_s_connect(void); | ||
| 15 | |||
| 16 | #define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0,(char *)name) | ||
| 17 | #define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1,(char *)port) | ||
| 18 | #define BIO_set_conn_ip(b,ip) BIO_ctrl(b,BIO_C_SET_CONNECT,2,(char *)ip) | ||
| 19 | #define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port) | ||
| 20 | #define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0) | ||
| 21 | #define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1) | ||
| 22 | #define BIO_get_conn_ip(b,ip) BIO_ptr_ctrl(b,BIO_C_SET_CONNECT,2) | ||
| 23 | #define BIO_get_conn_int_port(b,port) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,port) | ||
| 24 | |||
| 25 | #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) | ||
| 26 | |||
| 27 | #define BIO_do_connect(b) BIO_do_handshake(b) | ||
| 28 | |||
| 29 | =head1 DESCRIPTION | ||
| 30 | |||
| 31 | BIO_s_connect() returns the connect BIO method. This is a wrapper | ||
| 32 | round the platform's TCP/IP socket connection routines. | ||
| 33 | |||
| 34 | Using connect BIOs TCP/IP connections can be made and data | ||
| 35 | transferred using only BIO routines. In this way any platform | ||
| 36 | specific operations are hidden by the BIO abstraction. | ||
| 37 | |||
| 38 | Read and write operations on a connect BIO will perform I/O | ||
| 39 | on the underlying connection. If no connection is established | ||
| 40 | and the port and hostname (see below) is set up properly then | ||
| 41 | a connection is established first. | ||
| 42 | |||
| 43 | Connect BIOs support BIO_puts() but not BIO_gets(). | ||
| 44 | |||
| 45 | If the close flag is set on a connect BIO then any active | ||
| 46 | connection is shutdown and the socket closed when the BIO | ||
| 47 | is freed. | ||
| 48 | |||
| 49 | Calling BIO_reset() on a connect BIO will close any active | ||
| 50 | connection and reset the BIO into a state where it can connect | ||
| 51 | to the same host again. | ||
| 52 | |||
| 53 | BIO_get_fd() places the underlying socket in B<c> if it is not NULL, | ||
| 54 | it also returns the socket . If B<c> is not NULL it should be of | ||
| 55 | type (int *). | ||
| 56 | |||
| 57 | BIO_set_conn_hostname() uses the string B<name> to set the hostname | ||
| 58 | The hostname can be an IP address. The hostname can also include the | ||
| 59 | port in the form hostname:port . It is also acceptable to use the | ||
| 60 | form "hostname/any/other/path" or "hostname:port/any/other/path". | ||
| 61 | |||
| 62 | BIO_set_conn_port() sets the port to B<port>. B<port> can be the | ||
| 63 | numerical form or a string such as "http". A string will be looked | ||
| 64 | up first using getservbyname() on the host platform but if that | ||
| 65 | fails a standard table of port names will be used. Currently the | ||
| 66 | list is http, telnet, socks, https, ssl, ftp, gopher and wais. | ||
| 67 | |||
| 68 | BIO_set_conn_ip() sets the IP address to B<ip> using binary form, | ||
| 69 | that is four bytes specifying the IP address in big-endian form. | ||
| 70 | |||
| 71 | BIO_set_conn_int_port() sets the port using B<port>. B<port> should | ||
| 72 | be of type (int *). | ||
| 73 | |||
| 74 | BIO_get_conn_hostname() returns the hostname of the connect BIO or | ||
| 75 | NULL if the BIO is initialized but no hostname is set. | ||
| 76 | This return value is an internal pointer which should not be modified. | ||
| 77 | |||
| 78 | BIO_get_conn_port() returns the port as a string. | ||
| 79 | |||
| 80 | BIO_get_conn_ip() returns the IP address in binary form. | ||
| 81 | |||
| 82 | BIO_get_conn_int_port() returns the port as an int. | ||
| 83 | |||
| 84 | BIO_set_nbio() sets the non blocking I/O flag to B<n>. If B<n> is | ||
| 85 | zero then blocking I/O is set. If B<n> is 1 then non blocking I/O | ||
| 86 | is set. Blocking I/O is the default. The call to BIO_set_nbio() | ||
| 87 | should be made before the connection is established because | ||
| 88 | non blocking I/O is set during the connect process. | ||
| 89 | |||
| 90 | BIO_do_connect() attempts to connect the supplied BIO. It returns 1 | ||
| 91 | if the connection was established successfully. A zero or negative | ||
| 92 | value is returned if the connection could not be established, the | ||
| 93 | call BIO_should_retry() should be used for non blocking connect BIOs | ||
| 94 | to determine if the call should be retried. | ||
| 95 | |||
| 96 | =head1 NOTES | ||
| 97 | |||
| 98 | If blocking I/O is set then a non positive return value from any | ||
| 99 | I/O call is caused by an error condition, although a zero return | ||
| 100 | will normally mean that the connection was closed. | ||
| 101 | |||
| 102 | If the port name is supplied as part of the host name then this will | ||
| 103 | override any value set with BIO_set_conn_port(). This may be undesirable | ||
| 104 | if the application does not wish to allow connection to arbitrary | ||
| 105 | ports. This can be avoided by checking for the presence of the ':' | ||
| 106 | character in the passed hostname and either indicating an error or | ||
| 107 | truncating the string at that point. | ||
| 108 | |||
| 109 | The values returned by BIO_get_conn_hostname(), BIO_get_conn_port(), | ||
| 110 | BIO_get_conn_ip() and BIO_get_conn_int_port() are updated when a | ||
| 111 | connection attempt is made. Before any connection attempt the values | ||
| 112 | returned are those set by the application itself. | ||
| 113 | |||
| 114 | Applications do not have to call BIO_do_connect() but may wish to do | ||
| 115 | so to separate the connection process from other I/O processing. | ||
| 116 | |||
| 117 | If non blocking I/O is set then retries will be requested as appropriate. | ||
| 118 | |||
| 119 | It addition to BIO_should_read() and BIO_should_write() it is also | ||
| 120 | possible for BIO_should_io_special() to be true during the initial | ||
| 121 | connection process with the reason BIO_RR_CONNECT. If this is returned | ||
| 122 | then this is an indication that a connection attempt would block, | ||
| 123 | the application should then take appropriate action to wait until | ||
| 124 | the underlying socket has connected and retry the call. | ||
| 125 | |||
| 126 | =head1 RETURN VALUES | ||
| 127 | |||
| 128 | BIO_s_connect() returns the connect BIO method. | ||
| 129 | |||
| 130 | BIO_get_fd() returns the socket or -1 if the BIO has not | ||
| 131 | been initialized. | ||
| 132 | |||
| 133 | BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_set_conn_ip() and | ||
| 134 | BIO_set_conn_int_port() always return 1. | ||
| 135 | |||
| 136 | BIO_get_conn_hostname() returns the connected hostname or NULL is | ||
| 137 | none was set. | ||
| 138 | |||
| 139 | BIO_get_conn_port() returns a string representing the connected | ||
| 140 | port or NULL if not set. | ||
| 141 | |||
| 142 | BIO_get_conn_ip() returns a pointer to the connected IP address in | ||
| 143 | binary form or all zeros if not set. | ||
| 144 | |||
| 145 | BIO_get_conn_int_port() returns the connected port or 0 if none was | ||
| 146 | set. | ||
| 147 | |||
| 148 | BIO_set_nbio() always returns 1. | ||
| 149 | |||
| 150 | BIO_do_connect() returns 1 if the connection was successfully | ||
| 151 | established and 0 or -1 if the connection failed. | ||
| 152 | |||
| 153 | =head1 EXAMPLE | ||
| 154 | |||
| 155 | This is example connects to a webserver on the local host and attempts | ||
| 156 | to retrieve a page and copy the result to standard output. | ||
| 157 | |||
| 158 | |||
| 159 | BIO *cbio, *out; | ||
| 160 | int len; | ||
| 161 | char tmpbuf[1024]; | ||
| 162 | ERR_load_crypto_strings(); | ||
| 163 | cbio = BIO_new_connect("localhost:http"); | ||
| 164 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 165 | if(BIO_do_connect(cbio) <= 0) { | ||
| 166 | fprintf(stderr, "Error connecting to server\n"); | ||
| 167 | ERR_print_errors_fp(stderr); | ||
| 168 | /* whatever ... */ | ||
| 169 | } | ||
| 170 | BIO_puts(cbio, "GET / HTTP/1.0\n\n"); | ||
| 171 | for(;;) { | ||
| 172 | len = BIO_read(cbio, tmpbuf, 1024); | ||
| 173 | if(len <= 0) break; | ||
| 174 | BIO_write(out, tmpbuf, len); | ||
| 175 | } | ||
| 176 | BIO_free(cbio); | ||
| 177 | BIO_free(out); | ||
| 178 | |||
| 179 | |||
| 180 | =head1 SEE ALSO | ||
| 181 | |||
| 182 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_fd.pod b/src/lib/libssl/src/doc/crypto/BIO_s_fd.pod new file mode 100644 index 0000000000..b1de1d1015 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_s_fd.pod | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd - file descriptor BIO | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | BIO_METHOD * BIO_s_fd(void); | ||
| 12 | |||
| 13 | #define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) | ||
| 14 | #define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c) | ||
| 15 | |||
| 16 | BIO *BIO_new_fd(int fd, int close_flag); | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | BIO_s_fd() returns the file descriptor BIO method. This is a wrapper | ||
| 21 | round the platforms file descriptor routines such as read() and write(). | ||
| 22 | |||
| 23 | BIO_read() and BIO_write() read or write the underlying descriptor. | ||
| 24 | BIO_puts() is supported but BIO_gets() is not. | ||
| 25 | |||
| 26 | If the close flag is set then then close() is called on the underlying | ||
| 27 | file descriptor when the BIO is freed. | ||
| 28 | |||
| 29 | BIO_reset() attempts to change the file pointer to the start of file | ||
| 30 | using lseek(fd, 0, 0). | ||
| 31 | |||
| 32 | BIO_seek() sets the file pointer to position B<ofs> from start of file | ||
| 33 | using lseek(fd, ofs, 0). | ||
| 34 | |||
| 35 | BIO_tell() returns the current file position by calling lseek(fd, 0, 1). | ||
| 36 | |||
| 37 | BIO_set_fd() sets the file descriptor of BIO B<b> to B<fd> and the close | ||
| 38 | flag to B<c>. | ||
| 39 | |||
| 40 | BIO_get_fd() places the file descriptor in B<c> if it is not NULL, it also | ||
| 41 | returns the file descriptor. If B<c> is not NULL it should be of type | ||
| 42 | (int *). | ||
| 43 | |||
| 44 | BIO_new_fd() returns a file descriptor BIO using B<fd> and B<close_flag>. | ||
| 45 | |||
| 46 | =head1 NOTES | ||
| 47 | |||
| 48 | The behaviour of BIO_read() and BIO_write() depends on the behavior of the | ||
| 49 | platforms read() and write() calls on the descriptor. If the underlying | ||
| 50 | file descriptor is in a non blocking mode then the BIO will behave in the | ||
| 51 | manner described in the L<BIO_read(3)|BIO_read(3)> and L<BIO_should_retry(3)|BIO_should_retry(3)> | ||
| 52 | manual pages. | ||
| 53 | |||
| 54 | File descriptor BIOs should not be used for socket I/O. Use socket BIOs | ||
| 55 | instead. | ||
| 56 | |||
| 57 | =head1 RETURN VALUES | ||
| 58 | |||
| 59 | BIO_s_fd() returns the file descriptor BIO method. | ||
| 60 | |||
| 61 | BIO_reset() returns zero for success and -1 if an error occurred. | ||
| 62 | BIO_seek() and BIO_tell() return the current file position or -1 | ||
| 63 | is an error occurred. These values reflect the underlying lseek() | ||
| 64 | behaviour. | ||
| 65 | |||
| 66 | BIO_set_fd() always returns 1. | ||
| 67 | |||
| 68 | BIO_get_fd() returns the file descriptor or -1 if the BIO has not | ||
| 69 | been initialized. | ||
| 70 | |||
| 71 | BIO_new_fd() returns the newly allocated BIO or NULL is an error | ||
| 72 | occurred. | ||
| 73 | |||
| 74 | =head1 EXAMPLE | ||
| 75 | |||
| 76 | This is a file descriptor BIO version of "Hello World": | ||
| 77 | |||
| 78 | BIO *out; | ||
| 79 | out = BIO_new_fd(fileno(stdout), BIO_NOCLOSE); | ||
| 80 | BIO_printf(out, "Hello World\n"); | ||
| 81 | BIO_free(out); | ||
| 82 | |||
| 83 | =head1 SEE ALSO | ||
| 84 | |||
| 85 | L<BIO_seek(3)|BIO_seek(3)>, L<BIO_tell(3)|BIO_tell(3)>, | ||
| 86 | L<BIO_reset(3)|BIO_reset(3)>, L<BIO_read(3)|BIO_read(3)>, | ||
| 87 | L<BIO_write(3)|BIO_write(3)>, L<BIO_puts(3)|BIO_puts(3)>, | ||
| 88 | L<BIO_gets(3)|BIO_gets(3)>, L<BIO_printf(3)|BIO_printf(3)>, | ||
| 89 | L<BIO_set_close(3)|BIO_set_close(3)>, L<BIO_get_close(3)|BIO_get_close(3)> | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_file.pod b/src/lib/libssl/src/doc/crypto/BIO_s_file.pod new file mode 100644 index 0000000000..b2a29263f4 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_s_file.pod | |||
| @@ -0,0 +1,144 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_s_file, BIO_new_file, BIO_new_fp, BIO_set_fp, BIO_get_fp, | ||
| 6 | BIO_read_filename, BIO_write_filename, BIO_append_filename, | ||
| 7 | BIO_rw_filename - FILE bio | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | #include <openssl/bio.h> | ||
| 12 | |||
| 13 | BIO_METHOD * BIO_s_file(void); | ||
| 14 | BIO *BIO_new_file(const char *filename, const char *mode); | ||
| 15 | BIO *BIO_new_fp(FILE *stream, int flags); | ||
| 16 | |||
| 17 | BIO_set_fp(BIO *b,FILE *fp, int flags); | ||
| 18 | BIO_get_fp(BIO *b,FILE **fpp); | ||
| 19 | |||
| 20 | int BIO_read_filename(BIO *b, char *name) | ||
| 21 | int BIO_write_filename(BIO *b, char *name) | ||
| 22 | int BIO_append_filename(BIO *b, char *name) | ||
| 23 | int BIO_rw_filename(BIO *b, char *name) | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | BIO_s_file() returns the BIO file method. As its name implies it | ||
| 28 | is a wrapper round the stdio FILE structure and it is a | ||
| 29 | source/sink BIO. | ||
| 30 | |||
| 31 | Calls to BIO_read() and BIO_write() read and write data to the | ||
| 32 | underlying stream. BIO_gets() and BIO_puts() are supported on file BIOs. | ||
| 33 | |||
| 34 | BIO_flush() on a file BIO calls the fflush() function on the wrapped | ||
| 35 | stream. | ||
| 36 | |||
| 37 | BIO_reset() attempts to change the file pointer to the start of file | ||
| 38 | using fseek(stream, 0, 0). | ||
| 39 | |||
| 40 | BIO_seek() sets the file pointer to position B<ofs> from start of file | ||
| 41 | using fseek(stream, ofs, 0). | ||
| 42 | |||
| 43 | BIO_eof() calls feof(). | ||
| 44 | |||
| 45 | Setting the BIO_CLOSE flag calls fclose() on the stream when the BIO | ||
| 46 | is freed. | ||
| 47 | |||
| 48 | BIO_new_file() creates a new file BIO with mode B<mode> the meaning | ||
| 49 | of B<mode> is the same as the stdio function fopen(). The BIO_CLOSE | ||
| 50 | flag is set on the returned BIO. | ||
| 51 | |||
| 52 | BIO_new_fp() creates a file BIO wrapping B<stream>. Flags can be: | ||
| 53 | BIO_CLOSE, BIO_NOCLOSE (the close flag) BIO_FP_TEXT (sets the underlying | ||
| 54 | stream to text mode, default is binary: this only has any effect under | ||
| 55 | Win32). | ||
| 56 | |||
| 57 | BIO_set_fp() set the fp of a file BIO to B<fp>. B<flags> has the same | ||
| 58 | meaning as in BIO_new_fp(), it is a macro. | ||
| 59 | |||
| 60 | BIO_get_fp() retrieves the fp of a file BIO, it is a macro. | ||
| 61 | |||
| 62 | BIO_seek() is a macro that sets the position pointer to B<offset> bytes | ||
| 63 | from the start of file. | ||
| 64 | |||
| 65 | BIO_tell() returns the value of the position pointer. | ||
| 66 | |||
| 67 | BIO_read_filename(), BIO_write_filename(), BIO_append_filename() and | ||
| 68 | BIO_rw_filename() set the file BIO B<b> to use file B<name> for | ||
| 69 | reading, writing, append or read write respectively. | ||
| 70 | |||
| 71 | =head1 NOTES | ||
| 72 | |||
| 73 | When wrapping stdout, stdin or stderr the underlying stream should not | ||
| 74 | normally be closed so the BIO_NOCLOSE flag should be set. | ||
| 75 | |||
| 76 | Because the file BIO calls the underlying stdio functions any quirks | ||
| 77 | in stdio behaviour will be mirrored by the corresponding BIO. | ||
| 78 | |||
| 79 | =head1 EXAMPLES | ||
| 80 | |||
| 81 | File BIO "hello world": | ||
| 82 | |||
| 83 | BIO *bio_out; | ||
| 84 | bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 85 | BIO_printf(bio_out, "Hello World\n"); | ||
| 86 | |||
| 87 | Alternative technique: | ||
| 88 | |||
| 89 | BIO *bio_out; | ||
| 90 | bio_out = BIO_new(BIO_s_file()); | ||
| 91 | if(bio_out == NULL) /* Error ... */ | ||
| 92 | if(!BIO_set_fp(bio_out, stdout, BIO_NOCLOSE)) /* Error ... */ | ||
| 93 | BIO_printf(bio_out, "Hello World\n"); | ||
| 94 | |||
| 95 | Write to a file: | ||
| 96 | |||
| 97 | BIO *out; | ||
| 98 | out = BIO_new_file("filename.txt", "w"); | ||
| 99 | if(!out) /* Error occurred */ | ||
| 100 | BIO_printf(out, "Hello World\n"); | ||
| 101 | BIO_free(out); | ||
| 102 | |||
| 103 | Alternative technique: | ||
| 104 | |||
| 105 | BIO *out; | ||
| 106 | out = BIO_new(BIO_s_file()); | ||
| 107 | if(out == NULL) /* Error ... */ | ||
| 108 | if(!BIO_write_filename(out, "filename.txt")) /* Error ... */ | ||
| 109 | BIO_printf(out, "Hello World\n"); | ||
| 110 | BIO_free(out); | ||
| 111 | |||
| 112 | =head1 RETURN VALUES | ||
| 113 | |||
| 114 | BIO_s_file() returns the file BIO method. | ||
| 115 | |||
| 116 | BIO_new_file() and BIO_new_fp() return a file BIO or NULL if an error | ||
| 117 | occurred. | ||
| 118 | |||
| 119 | BIO_set_fp() and BIO_get_fp() return 1 for success or 0 for failure | ||
| 120 | (although the current implementation never return 0). | ||
| 121 | |||
| 122 | BIO_seek() returns the same value as the underlying fseek() function: | ||
| 123 | 0 for success or -1 for failure. | ||
| 124 | |||
| 125 | BIO_tell() returns the current file position. | ||
| 126 | |||
| 127 | BIO_read_filename(), BIO_write_filename(), BIO_append_filename() and | ||
| 128 | BIO_rw_filename() return 1 for success or 0 for failure. | ||
| 129 | |||
| 130 | =head1 BUGS | ||
| 131 | |||
| 132 | BIO_reset() and BIO_seek() are implemented using fseek() on the underlying | ||
| 133 | stream. The return value for fseek() is 0 for success or -1 if an error | ||
| 134 | occurred this differs from other types of BIO which will typically return | ||
| 135 | 1 for success and a non positive value if an error occurred. | ||
| 136 | |||
| 137 | =head1 SEE ALSO | ||
| 138 | |||
| 139 | L<BIO_seek(3)|BIO_seek(3)>, L<BIO_tell(3)|BIO_tell(3)>, | ||
| 140 | L<BIO_reset(3)|BIO_reset(3)>, L<BIO_flush(3)|BIO_flush(3)>, | ||
| 141 | L<BIO_read(3)|BIO_read(3)>, | ||
| 142 | L<BIO_write(3)|BIO_write(3)>, L<BIO_puts(3)|BIO_puts(3)>, | ||
| 143 | L<BIO_gets(3)|BIO_gets(3)>, L<BIO_printf(3)|BIO_printf(3)>, | ||
| 144 | L<BIO_set_close(3)|BIO_set_close(3)>, L<BIO_get_close(3)|BIO_get_close(3)> | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_mem.pod b/src/lib/libssl/src/doc/crypto/BIO_s_mem.pod new file mode 100644 index 0000000000..19648acfae --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_s_mem.pod | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf, | ||
| 6 | BIO_get_mem_ptr, BIO_new_mem_buf - memory BIO | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/bio.h> | ||
| 11 | |||
| 12 | BIO_METHOD * BIO_s_mem(void); | ||
| 13 | |||
| 14 | BIO_set_mem_eof_return(BIO *b,int v) | ||
| 15 | long BIO_get_mem_data(BIO *b, char **pp) | ||
| 16 | BIO_set_mem_buf(BIO *b,BUF_MEM *bm,int c) | ||
| 17 | BIO_get_mem_ptr(BIO *b,BUF_MEM **pp) | ||
| 18 | |||
| 19 | BIO *BIO_new_mem_buf(void *buf, int len); | ||
| 20 | |||
| 21 | =head1 DESCRIPTION | ||
| 22 | |||
| 23 | BIO_s_mem() return the memory BIO method function. | ||
| 24 | |||
| 25 | A memory BIO is a source/sink BIO which uses memory for its I/O. Data | ||
| 26 | written to a memory BIO is stored in a BUF_MEM structure which is extended | ||
| 27 | as appropriate to accommodate the stored data. | ||
| 28 | |||
| 29 | Any data written to a memory BIO can be recalled by reading from it. | ||
| 30 | Unless the memory BIO is read only any data read from it is deleted from | ||
| 31 | the BIO. | ||
| 32 | |||
| 33 | Memory BIOs support BIO_gets() and BIO_puts(). | ||
| 34 | |||
| 35 | If the BIO_CLOSE flag is set when a memory BIO is freed then the underlying | ||
| 36 | BUF_MEM structure is also freed. | ||
| 37 | |||
| 38 | Calling BIO_reset() on a read write memory BIO clears any data in it. On a | ||
| 39 | read only BIO it restores the BIO to its original state and the read only | ||
| 40 | data can be read again. | ||
| 41 | |||
| 42 | BIO_eof() is true if no data is in the BIO. | ||
| 43 | |||
| 44 | BIO_ctrl_pending() returns the number of bytes currently stored. | ||
| 45 | |||
| 46 | BIO_set_mem_eof_return() sets the behaviour of memory BIO B<b> when it is | ||
| 47 | empty. If the B<v> is zero then an empty memory BIO will return EOF (that is | ||
| 48 | it will return zero and BIO_should_retry(b) will be false. If B<v> is non | ||
| 49 | zero then it will return B<v> when it is empty and it will set the read retry | ||
| 50 | flag (that is BIO_read_retry(b) is true). To avoid ambiguity with a normal | ||
| 51 | positive return value B<v> should be set to a negative value, typically -1. | ||
| 52 | |||
| 53 | BIO_get_mem_data() sets B<pp> to a pointer to the start of the memory BIOs data | ||
| 54 | and returns the total amount of data available. It is implemented as a macro. | ||
| 55 | |||
| 56 | BIO_set_mem_buf() sets the internal BUF_MEM structure to B<bm> and sets the | ||
| 57 | close flag to B<c>, that is B<c> should be either BIO_CLOSE or BIO_NOCLOSE. | ||
| 58 | It is a macro. | ||
| 59 | |||
| 60 | BIO_get_mem_ptr() places the underlying BUF_MEM structure in B<pp>. It is | ||
| 61 | a macro. | ||
| 62 | |||
| 63 | BIO_new_mem_buf() creates a memory BIO using B<len> bytes of data at B<buf>, | ||
| 64 | if B<len> is -1 then the B<buf> is assumed to be null terminated and its | ||
| 65 | length is determined by B<strlen>. The BIO is set to a read only state and | ||
| 66 | as a result cannot be written to. This is useful when some data needs to be | ||
| 67 | made available from a static area of memory in the form of a BIO. The | ||
| 68 | supplied data is read directly from the supplied buffer: it is B<not> copied | ||
| 69 | first, so the supplied area of memory must be unchanged until the BIO is freed. | ||
| 70 | |||
| 71 | =head1 NOTES | ||
| 72 | |||
| 73 | Writes to memory BIOs will always succeed if memory is available: that is | ||
| 74 | their size can grow indefinitely. | ||
| 75 | |||
| 76 | Every read from a read write memory BIO will remove the data just read with | ||
| 77 | an internal copy operation, if a BIO contains a lots of data and it is | ||
| 78 | read in small chunks the operation can be very slow. The use of a read only | ||
| 79 | memory BIO avoids this problem. If the BIO must be read write then adding | ||
| 80 | a buffering BIO to the chain will speed up the process. | ||
| 81 | |||
| 82 | =head1 BUGS | ||
| 83 | |||
| 84 | There should be an option to set the maximum size of a memory BIO. | ||
| 85 | |||
| 86 | There should be a way to "rewind" a read write BIO without destroying | ||
| 87 | its contents. | ||
| 88 | |||
| 89 | The copying operation should not occur after every small read of a large BIO | ||
| 90 | to improve efficiency. | ||
| 91 | |||
| 92 | =head1 EXAMPLE | ||
| 93 | |||
| 94 | Create a memory BIO and write some data to it: | ||
| 95 | |||
| 96 | BIO *mem = BIO_new(BIO_s_mem()); | ||
| 97 | BIO_puts(mem, "Hello World\n"); | ||
| 98 | |||
| 99 | Create a read only memory BIO: | ||
| 100 | |||
| 101 | char data[] = "Hello World"; | ||
| 102 | BIO *mem; | ||
| 103 | mem = BIO_new_mem_buf(data, -1); | ||
| 104 | |||
| 105 | Extract the BUF_MEM structure from a memory BIO and then free up the BIO: | ||
| 106 | |||
| 107 | BUF_MEM *bptr; | ||
| 108 | BIO_get_mem_ptr(mem, &bptr); | ||
| 109 | BIO_set_close(mem, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */ | ||
| 110 | BIO_free(mem); | ||
| 111 | |||
| 112 | |||
| 113 | =head1 SEE ALSO | ||
| 114 | |||
| 115 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_null.pod b/src/lib/libssl/src/doc/crypto/BIO_s_null.pod new file mode 100644 index 0000000000..e5514f7238 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_s_null.pod | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_s_null - null data sink | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | BIO_METHOD * BIO_s_null(void); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | BIO_s_null() returns the null sink BIO method. Data written to | ||
| 16 | the null sink is discarded, reads return EOF. | ||
| 17 | |||
| 18 | =head1 NOTES | ||
| 19 | |||
| 20 | A null sink BIO behaves in a similar manner to the Unix /dev/null | ||
| 21 | device. | ||
| 22 | |||
| 23 | A null bio can be placed on the end of a chain to discard any data | ||
| 24 | passed through it. | ||
| 25 | |||
| 26 | A null sink is useful if, for example, an application wishes to digest some | ||
| 27 | data by writing through a digest bio but not send the digested data anywhere. | ||
| 28 | Since a BIO chain must normally include a source/sink BIO this can be achieved | ||
| 29 | by adding a null sink BIO to the end of the chain | ||
| 30 | |||
| 31 | =head1 RETURN VALUES | ||
| 32 | |||
| 33 | BIO_s_null() returns the null sink BIO method. | ||
| 34 | |||
| 35 | =head1 SEE ALSO | ||
| 36 | |||
| 37 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_socket.pod b/src/lib/libssl/src/doc/crypto/BIO_s_socket.pod new file mode 100644 index 0000000000..253185185c --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_s_socket.pod | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_s_socket, BIO_new_socket - socket BIO | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | BIO_METHOD * BIO_s_socket(void); | ||
| 12 | |||
| 13 | #define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) | ||
| 14 | #define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c) | ||
| 15 | |||
| 16 | BIO *BIO_new_socket(int sock, int close_flag); | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | BIO_s_socket() returns the socket BIO method. This is a wrapper | ||
| 21 | round the platform's socket routines. | ||
| 22 | |||
| 23 | BIO_read() and BIO_write() read or write the underlying socket. | ||
| 24 | BIO_puts() is supported but BIO_gets() is not. | ||
| 25 | |||
| 26 | If the close flag is set then the socket is shut down and closed | ||
| 27 | when the BIO is freed. | ||
| 28 | |||
| 29 | BIO_set_fd() sets the socket of BIO B<b> to B<fd> and the close | ||
| 30 | flag to B<c>. | ||
| 31 | |||
| 32 | BIO_get_fd() places the socket in B<c> if it is not NULL, it also | ||
| 33 | returns the socket . If B<c> is not NULL it should be of type (int *). | ||
| 34 | |||
| 35 | BIO_new_socket() returns a socket BIO using B<sock> and B<close_flag>. | ||
| 36 | |||
| 37 | =head1 NOTES | ||
| 38 | |||
| 39 | Socket BIOs also support any relevant functionality of file descriptor | ||
| 40 | BIOs. | ||
| 41 | |||
| 42 | The reason for having separate file descriptor and socket BIOs is that on some | ||
| 43 | platforms sockets are not file descriptors and use distinct I/O routines, | ||
| 44 | Windows is one such platform. Any code mixing the two will not work on | ||
| 45 | all platforms. | ||
| 46 | |||
| 47 | =head1 RETURN VALUES | ||
| 48 | |||
| 49 | BIO_s_socket() returns the socket BIO method. | ||
| 50 | |||
| 51 | BIO_set_fd() always returns 1. | ||
| 52 | |||
| 53 | BIO_get_fd() returns the socket or -1 if the BIO has not been | ||
| 54 | initialized. | ||
| 55 | |||
| 56 | BIO_new_socket() returns the newly allocated BIO or NULL is an error | ||
| 57 | occurred. | ||
| 58 | |||
| 59 | =head1 SEE ALSO | ||
| 60 | |||
| 61 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_set_callback.pod b/src/lib/libssl/src/doc/crypto/BIO_set_callback.pod new file mode 100644 index 0000000000..9b6961ca8d --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_set_callback.pod | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg, | ||
| 6 | BIO_debug_callback - BIO callback functions | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/bio.h> | ||
| 11 | |||
| 12 | #define BIO_set_callback(b,cb) ((b)->callback=(cb)) | ||
| 13 | #define BIO_get_callback(b) ((b)->callback) | ||
| 14 | #define BIO_set_callback_arg(b,arg) ((b)->cb_arg=(char *)(arg)) | ||
| 15 | #define BIO_get_callback_arg(b) ((b)->cb_arg) | ||
| 16 | |||
| 17 | long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi, | ||
| 18 | long argl,long ret); | ||
| 19 | |||
| 20 | typedef long callback(BIO *b, int oper, const char *argp, | ||
| 21 | int argi, long argl, long retvalue); | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | BIO_set_callback() and BIO_get_callback() set and retrieve the BIO callback, | ||
| 26 | they are both macros. The callback is called during most high level BIO | ||
| 27 | operations. It can be used for debugging purposes to trace operations on | ||
| 28 | a BIO or to modify its operation. | ||
| 29 | |||
| 30 | BIO_set_callback_arg() and BIO_get_callback_arg() are macros which can be | ||
| 31 | used to set and retrieve an argument for use in the callback. | ||
| 32 | |||
| 33 | BIO_debug_callback() is a standard debugging callback which prints | ||
| 34 | out information relating to each BIO operation. If the callback | ||
| 35 | argument is set if is interpreted as a BIO to send the information | ||
| 36 | to, otherwise stderr is used. | ||
| 37 | |||
| 38 | callback() is the callback function itself. The meaning of each | ||
| 39 | argument is described below. | ||
| 40 | |||
| 41 | The BIO the callback is attached to is passed in B<b>. | ||
| 42 | |||
| 43 | B<oper> is set to the operation being performed. For some operations | ||
| 44 | the callback is called twice, once before and once after the actual | ||
| 45 | operation, the latter case has B<oper> or'ed with BIO_CB_RETURN. | ||
| 46 | |||
| 47 | The meaning of the arguments B<argp>, B<argi> and B<argl> depends on | ||
| 48 | the value of B<oper>, that is the operation being performed. | ||
| 49 | |||
| 50 | B<retvalue> is the return value that would be returned to the | ||
| 51 | application if no callback were present. The actual value returned | ||
| 52 | is the return value of the callback itself. In the case of callbacks | ||
| 53 | called before the actual BIO operation 1 is placed in retvalue, if | ||
| 54 | the return value is not positive it will be immediately returned to | ||
| 55 | the application and the BIO operation will not be performed. | ||
| 56 | |||
| 57 | The callback should normally simply return B<retvalue> when it has | ||
| 58 | finished processing, unless if specifically wishes to modify the | ||
| 59 | value returned to the application. | ||
| 60 | |||
| 61 | =head1 CALLBACK OPERATIONS | ||
| 62 | |||
| 63 | =over 4 | ||
| 64 | |||
| 65 | =item B<BIO_free(b)> | ||
| 66 | |||
| 67 | callback(b, BIO_CB_FREE, NULL, 0L, 0L, 1L) is called before the | ||
| 68 | free operation. | ||
| 69 | |||
| 70 | =item B<BIO_read(b, out, outl)> | ||
| 71 | |||
| 72 | callback(b, BIO_CB_READ, out, outl, 0L, 1L) is called before | ||
| 73 | the read and callback(b, BIO_CB_READ|BIO_CB_RETURN, out, outl, 0L, retvalue) | ||
| 74 | after. | ||
| 75 | |||
| 76 | =item B<BIO_write(b, in, inl)> | ||
| 77 | |||
| 78 | callback(b, BIO_CB_WRITE, in, inl, 0L, 1L) is called before | ||
| 79 | the write and callback(b, BIO_CB_WRITE|BIO_CB_RETURN, in, inl, 0L, retvalue) | ||
| 80 | after. | ||
| 81 | |||
| 82 | =item B<BIO_gets(b, out, outl)> | ||
| 83 | |||
| 84 | callback(b, BIO_CB_GETS, out, outl, 0L, 1L) is called before | ||
| 85 | the operation and callback(b, BIO_CB_GETS|BIO_CB_RETURN, out, outl, 0L, retvalue) | ||
| 86 | after. | ||
| 87 | |||
| 88 | =item B<BIO_puts(b, in)> | ||
| 89 | |||
| 90 | callback(b, BIO_CB_WRITE, in, 0, 0L, 1L) is called before | ||
| 91 | the operation and callback(b, BIO_CB_WRITE|BIO_CB_RETURN, in, 0, 0L, retvalue) | ||
| 92 | after. | ||
| 93 | |||
| 94 | =item B<BIO_ctrl(BIO *b, int cmd, long larg, void *parg)> | ||
| 95 | |||
| 96 | callback(b,BIO_CB_CTRL,parg,cmd,larg,1L) is called before the call and | ||
| 97 | callback(b,BIO_CB_CTRL|BIO_CB_RETURN,parg,cmd, larg,ret) after. | ||
| 98 | |||
| 99 | =back | ||
| 100 | |||
| 101 | =head1 EXAMPLE | ||
| 102 | |||
| 103 | The BIO_debug_callback() function is a good example, its source is | ||
| 104 | in crypto/bio/bio_cb.c | ||
| 105 | |||
| 106 | =head1 SEE ALSO | ||
| 107 | |||
| 108 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_should_retry.pod b/src/lib/libssl/src/doc/crypto/BIO_should_retry.pod new file mode 100644 index 0000000000..539c391272 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/BIO_should_retry.pod | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | BIO_should_retry, BIO_should_read, BIO_should_write, | ||
| 6 | BIO_should_io_special, BIO_retry_type, BIO_should_retry, | ||
| 7 | BIO_get_retry_BIO, BIO_get_retry_reason - BIO retry functions | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | #include <openssl/bio.h> | ||
| 12 | |||
| 13 | #define BIO_should_read(a) ((a)->flags & BIO_FLAGS_READ) | ||
| 14 | #define BIO_should_write(a) ((a)->flags & BIO_FLAGS_WRITE) | ||
| 15 | #define BIO_should_io_special(a) ((a)->flags & BIO_FLAGS_IO_SPECIAL) | ||
| 16 | #define BIO_retry_type(a) ((a)->flags & BIO_FLAGS_RWS) | ||
| 17 | #define BIO_should_retry(a) ((a)->flags & BIO_FLAGS_SHOULD_RETRY) | ||
| 18 | |||
| 19 | #define BIO_FLAGS_READ 0x01 | ||
| 20 | #define BIO_FLAGS_WRITE 0x02 | ||
| 21 | #define BIO_FLAGS_IO_SPECIAL 0x04 | ||
| 22 | #define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL) | ||
| 23 | #define BIO_FLAGS_SHOULD_RETRY 0x08 | ||
| 24 | |||
| 25 | BIO * BIO_get_retry_BIO(BIO *bio, int *reason); | ||
| 26 | int BIO_get_retry_reason(BIO *bio); | ||
| 27 | |||
| 28 | =head1 DESCRIPTION | ||
| 29 | |||
| 30 | These functions determine why a BIO is not able to read or write data. | ||
| 31 | They will typically be called after a failed BIO_read() or BIO_write() | ||
| 32 | call. | ||
| 33 | |||
| 34 | BIO_should_retry() is true if the call that produced this condition | ||
| 35 | should then be retried at a later time. | ||
| 36 | |||
| 37 | If BIO_should_retry() is false then the cause is an error condition. | ||
| 38 | |||
| 39 | BIO_should_read() is true if the cause of the condition is that a BIO | ||
| 40 | needs to read data. | ||
| 41 | |||
| 42 | BIO_should_write() is true if the cause of the condition is that a BIO | ||
| 43 | needs to read data. | ||
| 44 | |||
| 45 | BIO_should_io_special() is true if some "special" condition, that is a | ||
| 46 | reason other than reading or writing is the cause of the condition. | ||
| 47 | |||
| 48 | BIO_get_retry_reason() returns a mask of the cause of a retry condition | ||
| 49 | consisting of the values B<BIO_FLAGS_READ>, B<BIO_FLAGS_WRITE>, | ||
| 50 | B<BIO_FLAGS_IO_SPECIAL> though current BIO types will only set one of | ||
| 51 | these. | ||
| 52 | |||
| 53 | BIO_get_retry_BIO() determines the precise reason for the special | ||
| 54 | condition, it returns the BIO that caused this condition and if | ||
| 55 | B<reason> is not NULL it contains the reason code. The meaning of | ||
| 56 | the reason code and the action that should be taken depends on | ||
| 57 | the type of BIO that resulted in this condition. | ||
| 58 | |||
| 59 | BIO_get_retry_reason() returns the reason for a special condition if | ||
| 60 | passed the relevant BIO, for example as returned by BIO_get_retry_BIO(). | ||
| 61 | |||
| 62 | =head1 NOTES | ||
| 63 | |||
| 64 | If BIO_should_retry() returns false then the precise "error condition" | ||
| 65 | depends on the BIO type that caused it and the return code of the BIO | ||
| 66 | operation. For example if a call to BIO_read() on a socket BIO returns | ||
| 67 | 0 and BIO_should_retry() is false then the cause will be that the | ||
| 68 | connection closed. A similar condition on a file BIO will mean that it | ||
| 69 | has reached EOF. Some BIO types may place additional information on | ||
| 70 | the error queue. For more details see the individual BIO type manual | ||
| 71 | pages. | ||
| 72 | |||
| 73 | If the underlying I/O structure is in a blocking mode almost all current | ||
| 74 | BIO types will not request a retry, because the underlying I/O | ||
| 75 | calls will not. If the application knows that the BIO type will never | ||
| 76 | signal a retry then it need not call BIO_should_retry() after a failed | ||
| 77 | BIO I/O call. This is typically done with file BIOs. | ||
| 78 | |||
| 79 | SSL BIOs are the only current exception to this rule: they can request a | ||
| 80 | retry even if the underlying I/O structure is blocking, if a handshake | ||
| 81 | occurs during a call to BIO_read(). An application can retry the failed | ||
| 82 | call immediately or avoid this situation by setting SSL_MODE_AUTO_RETRY | ||
| 83 | on the underlying SSL structure. | ||
| 84 | |||
| 85 | While an application may retry a failed non blocking call immediately | ||
| 86 | this is likely to be very inefficient because the call will fail | ||
| 87 | repeatedly until data can be processed or is available. An application | ||
| 88 | will normally wait until the necessary condition is satisfied. How | ||
| 89 | this is done depends on the underlying I/O structure. | ||
| 90 | |||
| 91 | For example if the cause is ultimately a socket and BIO_should_read() | ||
| 92 | is true then a call to select() may be made to wait until data is | ||
| 93 | available and then retry the BIO operation. By combining the retry | ||
| 94 | conditions of several non blocking BIOs in a single select() call | ||
| 95 | it is possible to service several BIOs in a single thread, though | ||
| 96 | the performance may be poor if SSL BIOs are present because long delays | ||
| 97 | can occur during the initial handshake process. | ||
| 98 | |||
| 99 | It is possible for a BIO to block indefinitely if the underlying I/O | ||
| 100 | structure cannot process or return any data. This depends on the behaviour of | ||
| 101 | the platforms I/O functions. This is often not desirable: one solution | ||
| 102 | is to use non blocking I/O and use a timeout on the select() (or | ||
| 103 | equivalent) call. | ||
| 104 | |||
| 105 | =head1 BUGS | ||
| 106 | |||
| 107 | The OpenSSL ASN1 functions cannot gracefully deal with non blocking I/O: | ||
| 108 | that is they cannot retry after a partial read or write. This is usually | ||
| 109 | worked around by only passing the relevant data to ASN1 functions when | ||
| 110 | the entire structure can be read or written. | ||
| 111 | |||
| 112 | =head1 SEE ALSO | ||
| 113 | |||
| 114 | TBA | ||
diff --git a/src/lib/libssl/src/doc/crypto/BN_CTX_start.pod b/src/lib/libssl/src/doc/crypto/BN_CTX_start.pod index c30552b122..dfcefe1a88 100644 --- a/src/lib/libssl/src/doc/crypto/BN_CTX_start.pod +++ b/src/lib/libssl/src/doc/crypto/BN_CTX_start.pod | |||
| @@ -17,7 +17,8 @@ BN_CTX_start, BN_CTX_get, BN_CTX_end - use temporary BIGNUM variables | |||
| 17 | =head1 DESCRIPTION | 17 | =head1 DESCRIPTION |
| 18 | 18 | ||
| 19 | These functions are used to obtain temporary B<BIGNUM> variables from | 19 | These functions are used to obtain temporary B<BIGNUM> variables from |
| 20 | a B<BN_CTX> in order to save the overhead of repeatedly creating and | 20 | a B<BN_CTX> (which can been created by using L<BN_CTX_new(3)|BN_CTX_new(3)>) |
| 21 | in order to save the overhead of repeatedly creating and | ||
| 21 | freeing B<BIGNUM>s in functions that are called from inside a loop. | 22 | freeing B<BIGNUM>s in functions that are called from inside a loop. |
| 22 | 23 | ||
| 23 | A function must call BN_CTX_start() first. Then, BN_CTX_get() may be | 24 | A function must call BN_CTX_start() first. Then, BN_CTX_get() may be |
diff --git a/src/lib/libssl/src/doc/crypto/BN_bn2bin.pod b/src/lib/libssl/src/doc/crypto/BN_bn2bin.pod index ca77f0d61b..4f78574ed0 100644 --- a/src/lib/libssl/src/doc/crypto/BN_bn2bin.pod +++ b/src/lib/libssl/src/doc/crypto/BN_bn2bin.pod | |||
| @@ -36,7 +36,7 @@ NULL, a new B<BIGNUM> is created. | |||
| 36 | BN_bn2hex() and BN_bn2dec() return printable strings containing the | 36 | BN_bn2hex() and BN_bn2dec() return printable strings containing the |
| 37 | hexadecimal and decimal encoding of B<a> respectively. For negative | 37 | hexadecimal and decimal encoding of B<a> respectively. For negative |
| 38 | numbers, the string is prefaced with a leading '-'. The string must be | 38 | numbers, the string is prefaced with a leading '-'. The string must be |
| 39 | Free()d later. | 39 | freed later using OPENSSL_free(). |
| 40 | 40 | ||
| 41 | BN_hex2bn() converts the string B<str> containing a hexadecimal number | 41 | BN_hex2bn() converts the string B<str> containing a hexadecimal number |
| 42 | to a B<BIGNUM> and stores it in **B<bn>. If *B<bn> is NULL, a new | 42 | to a B<BIGNUM> and stores it in **B<bn>. If *B<bn> is NULL, a new |
diff --git a/src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod b/src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod index 3ec6f6172b..f3cee924b9 100644 --- a/src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod +++ b/src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod | |||
| @@ -39,7 +39,7 @@ BN_MONT_CTX_init() initializes an existing uninitialized B<BN_MONT_CTX>. | |||
| 39 | BN_MONT_CTX_set() sets up the B<mont> structure from the modulus B<m> | 39 | BN_MONT_CTX_set() sets up the B<mont> structure from the modulus B<m> |
| 40 | by precomputing its inverse and a value R. | 40 | by precomputing its inverse and a value R. |
| 41 | 41 | ||
| 42 | BN_MONT_CTX_copy() copies the B<N_MONT_CTX> B<from> to B<to>. | 42 | BN_MONT_CTX_copy() copies the B<BN_MONT_CTX> B<from> to B<to>. |
| 43 | 43 | ||
| 44 | BN_MONT_CTX_free() frees the components of the B<BN_MONT_CTX>, and, if | 44 | BN_MONT_CTX_free() frees the components of the B<BN_MONT_CTX>, and, if |
| 45 | it was created by BN_MONT_CTX_new(), also the structure itself. | 45 | it was created by BN_MONT_CTX_new(), also the structure itself. |
| @@ -49,7 +49,7 @@ the result in B<r>. | |||
| 49 | 49 | ||
| 50 | BN_from_montgomery() performs the Montgomery reduction B<r> = B<a>*R^-1. | 50 | BN_from_montgomery() performs the Montgomery reduction B<r> = B<a>*R^-1. |
| 51 | 51 | ||
| 52 | BN_to_montgomery() computes Mont(B<a>,R^2). | 52 | BN_to_montgomery() computes Mont(B<a>,R^2), i.e. B<a>*R. |
| 53 | 53 | ||
| 54 | For all functions, B<ctx> is a previously allocated B<BN_CTX> used for | 54 | For all functions, B<ctx> is a previously allocated B<BN_CTX> used for |
| 55 | temporary variables. | 55 | temporary variables. |
diff --git a/src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod b/src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod index 38034bba14..74a216ddc2 100644 --- a/src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod +++ b/src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | BN_mod_mul_reciprocal, BN_RECP_CTX_new, BN_RECP_CTX_init, | 5 | BN_mod_mul_reciprocal, BN_div_recp, BN_RECP_CTX_new, BN_RECP_CTX_init, |
| 6 | BN_RECP_CTX_free, BN_RECP_CTX_set - modular multiplication using | 6 | BN_RECP_CTX_free, BN_RECP_CTX_set - modular multiplication using |
| 7 | reciprocal | 7 | reciprocal |
| 8 | 8 | ||
diff --git a/src/lib/libssl/src/doc/crypto/BN_zero.pod b/src/lib/libssl/src/doc/crypto/BN_zero.pod index 165fd9a228..2f33876498 100644 --- a/src/lib/libssl/src/doc/crypto/BN_zero.pod +++ b/src/lib/libssl/src/doc/crypto/BN_zero.pod | |||
| @@ -2,7 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | BN_zero, BN_one, BN_set_word, BN_get_word - BIGNUM assignment operations | 5 | BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word - BIGNUM assignment |
| 6 | operations | ||
| 6 | 7 | ||
| 7 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 8 | 9 | ||
diff --git a/src/lib/libssl/src/doc/crypto/DH_set_method.pod b/src/lib/libssl/src/doc/crypto/DH_set_method.pod index a8f75bdd9d..62088eea1b 100644 --- a/src/lib/libssl/src/doc/crypto/DH_set_method.pod +++ b/src/lib/libssl/src/doc/crypto/DH_set_method.pod | |||
| @@ -2,20 +2,21 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | DH_set_default_method, DH_get_default_method, DH_set_method, | 5 | DH_set_default_openssl_method, DH_get_default_openssl_method, |
| 6 | DH_new_method, DH_OpenSSL - select DH method | 6 | DH_set_method, DH_new_method, DH_OpenSSL - select DH method |
| 7 | 7 | ||
| 8 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 9 | 9 | ||
| 10 | #include <openssl/dh.h> | 10 | #include <openssl/dh.h> |
| 11 | #include <openssl/engine.h> | ||
| 11 | 12 | ||
| 12 | void DH_set_default_method(DH_METHOD *meth); | 13 | void DH_set_default_openssl_method(DH_METHOD *meth); |
| 13 | 14 | ||
| 14 | DH_METHOD *DH_get_default_method(void); | 15 | DH_METHOD *DH_get_default_openssl_method(void); |
| 15 | 16 | ||
| 16 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); | 17 | int DH_set_method(DH *dh, ENGINE *engine); |
| 17 | 18 | ||
| 18 | DH *DH_new_method(DH_METHOD *meth); | 19 | DH *DH_new_method(ENGINE *engine); |
| 19 | 20 | ||
| 20 | DH_METHOD *DH_OpenSSL(void); | 21 | DH_METHOD *DH_OpenSSL(void); |
| 21 | 22 | ||
| @@ -28,20 +29,26 @@ such as hardware accelerators may be used. | |||
| 28 | Initially, the default is to use the OpenSSL internal implementation. | 29 | Initially, the default is to use the OpenSSL internal implementation. |
| 29 | DH_OpenSSL() returns a pointer to that method. | 30 | DH_OpenSSL() returns a pointer to that method. |
| 30 | 31 | ||
| 31 | DH_set_default_method() makes B<meth> the default method for all B<DH> | 32 | DH_set_default_openssl_method() makes B<meth> the default method for all DH |
| 32 | structures created later. | 33 | structures created later. B<NB:> This is true only whilst the default engine |
| 34 | for Diffie-Hellman operations remains as "openssl". ENGINEs provide an | ||
| 35 | encapsulation for implementations of one or more algorithms, and all the DH | ||
| 36 | functions mentioned here operate within the scope of the default | ||
| 37 | "openssl" engine. | ||
| 33 | 38 | ||
| 34 | DH_get_default_method() returns a pointer to the current default | 39 | DH_get_default_openssl_method() returns a pointer to the current default |
| 35 | method. | 40 | method for the "openssl" engine. |
| 36 | 41 | ||
| 37 | DH_set_method() selects B<meth> for all operations using the structure B<dh>. | 42 | DH_set_method() selects B<engine> as the engine that will be responsible for |
| 43 | all operations using the structure B<dh>. If this function completes successfully, | ||
| 44 | then the B<dh> structure will have its own functional reference of B<engine>, so | ||
| 45 | the caller should remember to free their own reference to B<engine> when they are | ||
| 46 | finished with it. NB: An ENGINE's DH_METHOD can be retrieved (or set) by | ||
| 47 | ENGINE_get_DH() or ENGINE_set_DH(). | ||
| 38 | 48 | ||
| 39 | DH_get_method() returns a pointer to the method currently selected | 49 | DH_new_method() allocates and initializes a DH structure so that |
| 40 | for B<dh>. | 50 | B<engine> will be used for the DH operations. If B<engine> is NULL, |
| 41 | 51 | the default engine for Diffie-Hellman opertaions is used. | |
| 42 | DH_new_method() allocates and initializes a B<DH> structure so that | ||
| 43 | B<method> will be used for the DH operations. If B<method> is B<NULL>, | ||
| 44 | the default method is used. | ||
| 45 | 52 | ||
| 46 | =head1 THE DH_METHOD STRUCTURE | 53 | =head1 THE DH_METHOD STRUCTURE |
| 47 | 54 | ||
| @@ -75,17 +82,17 @@ the default method is used. | |||
| 75 | 82 | ||
| 76 | =head1 RETURN VALUES | 83 | =head1 RETURN VALUES |
| 77 | 84 | ||
| 78 | DH_OpenSSL(), DH_get_default_method() and DH_get_method() return | 85 | DH_OpenSSL() and DH_get_default_method() return pointers to the respective |
| 79 | pointers to the respective B<DH_METHOD>s. | 86 | DH_METHODs. |
| 80 | 87 | ||
| 81 | DH_set_default_method() returns no value. | 88 | DH_set_default_openssl_method() returns no value. |
| 82 | 89 | ||
| 83 | DH_set_method() returns a pointer to the B<DH_METHOD> previously | 90 | DH_set_method() returns non-zero if the ENGINE associated with B<dh> |
| 84 | associated with B<dh>. | 91 | was successfully changed to B<engine>. |
| 85 | 92 | ||
| 86 | DH_new_method() returns B<NULL> and sets an error code that can be | 93 | DH_new_method() returns NULL and sets an error code that can be |
| 87 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it | 94 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. |
| 88 | returns a pointer to the newly allocated structure. | 95 | Otherwise it returns a pointer to the newly allocated structure. |
| 89 | 96 | ||
| 90 | =head1 SEE ALSO | 97 | =head1 SEE ALSO |
| 91 | 98 | ||
| @@ -96,4 +103,9 @@ L<dh(3)|dh(3)>, L<DH_new(3)|DH_new(3)> | |||
| 96 | DH_set_default_method(), DH_get_default_method(), DH_set_method(), | 103 | DH_set_default_method(), DH_get_default_method(), DH_set_method(), |
| 97 | DH_new_method() and DH_OpenSSL() were added in OpenSSL 0.9.4. | 104 | DH_new_method() and DH_OpenSSL() were added in OpenSSL 0.9.4. |
| 98 | 105 | ||
| 106 | DH_set_default_openssl_method() and DH_get_default_openssl_method() | ||
| 107 | replaced DH_set_default_method() and DH_get_default_method() respectively, | ||
| 108 | and DH_set_method() and DH_new_method() were altered to use B<ENGINE>s | ||
| 109 | rather than B<DH_METHOD>s during development of OpenSSL 0.9.6. | ||
| 110 | |||
| 99 | =cut | 111 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/DSA_set_method.pod b/src/lib/libssl/src/doc/crypto/DSA_set_method.pod index edec46413d..c56dfd0f47 100644 --- a/src/lib/libssl/src/doc/crypto/DSA_set_method.pod +++ b/src/lib/libssl/src/doc/crypto/DSA_set_method.pod | |||
| @@ -2,20 +2,21 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | DSA_set_default_method, DSA_get_default_method, DSA_set_method, | 5 | DSA_set_default_openssl_method, DSA_get_default_openssl_method, |
| 6 | DSA_new_method, DSA_OpenSSL - select RSA method | 6 | DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method |
| 7 | 7 | ||
| 8 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 9 | 9 | ||
| 10 | #include <openssl/DSA.h> | 10 | #include <openssl/dsa.h> |
| 11 | #include <openssl/engine.h> | ||
| 11 | 12 | ||
| 12 | void DSA_set_default_method(DSA_METHOD *meth); | 13 | void DSA_set_default_openssl_method(DSA_METHOD *meth); |
| 13 | 14 | ||
| 14 | DSA_METHOD *DSA_get_default_method(void); | 15 | DSA_METHOD *DSA_get_default_openssl_method(void); |
| 15 | 16 | ||
| 16 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth); | 17 | int DSA_set_method(DSA *dsa, ENGINE *engine); |
| 17 | 18 | ||
| 18 | DSA *DSA_new_method(DSA_METHOD *meth); | 19 | DSA *DSA_new_method(ENGINE *engine); |
| 19 | 20 | ||
| 20 | DSA_METHOD *DSA_OpenSSL(void); | 21 | DSA_METHOD *DSA_OpenSSL(void); |
| 21 | 22 | ||
| @@ -28,20 +29,21 @@ such as hardware accelerators may be used. | |||
| 28 | Initially, the default is to use the OpenSSL internal implementation. | 29 | Initially, the default is to use the OpenSSL internal implementation. |
| 29 | DSA_OpenSSL() returns a pointer to that method. | 30 | DSA_OpenSSL() returns a pointer to that method. |
| 30 | 31 | ||
| 31 | DSA_set_default_method() makes B<meth> the default method for all B<DSA> | 32 | DSA_set_default_openssl_method() makes B<meth> the default method for |
| 32 | structures created later. | 33 | all DSA structures created later. B<NB:> This is true only whilst the |
| 34 | default engine for DSA operations remains as "openssl". ENGINEs | ||
| 35 | provide an encapsulation for implementations of one or more algorithms at a | ||
| 36 | time, and all the DSA functions mentioned here operate within the scope | ||
| 37 | of the default "openssl" engine. | ||
| 33 | 38 | ||
| 34 | DSA_get_default_method() returns a pointer to the current default | 39 | DSA_get_default_openssl_method() returns a pointer to the current default |
| 35 | method. | 40 | method for the "openssl" engine. |
| 36 | 41 | ||
| 37 | DSA_set_method() selects B<meth> for all operations using the structure B<DSA>. | 42 | DSA_set_method() selects B<engine> for all operations using the structure B<dsa>. |
| 38 | 43 | ||
| 39 | DSA_get_method() returns a pointer to the method currently selected | 44 | DSA_new_method() allocates and initializes a DSA structure so that |
| 40 | for B<DSA>. | 45 | B<engine> will be used for the DSA operations. If B<engine> is NULL, |
| 41 | 46 | the default engine for DSA operations is used. | |
| 42 | DSA_new_method() allocates and initializes a B<DSA> structure so that | ||
| 43 | B<method> will be used for the DSA operations. If B<method> is B<NULL>, | ||
| 44 | the default method is used. | ||
| 45 | 47 | ||
| 46 | =head1 THE DSA_METHOD STRUCTURE | 48 | =head1 THE DSA_METHOD STRUCTURE |
| 47 | 49 | ||
| @@ -87,18 +89,17 @@ struct | |||
| 87 | 89 | ||
| 88 | =head1 RETURN VALUES | 90 | =head1 RETURN VALUES |
| 89 | 91 | ||
| 90 | DSA_OpenSSL(), DSA_get_default_method() and DSA_get_method() return | 92 | DSA_OpenSSL() and DSA_get_default_openssl_method() return pointers to the |
| 91 | pointers to the respective B<DSA_METHOD>s. | 93 | respective DSA_METHODs. |
| 92 | 94 | ||
| 93 | DSA_set_default_method() returns no value. | 95 | DSA_set_default_openssl_method() returns no value. |
| 94 | 96 | ||
| 95 | DSA_set_method() returns a pointer to the B<DSA_METHOD> previously | 97 | DSA_set_method() returns non-zero if the ENGINE associated with B<dsa> |
| 96 | associated with B<dsa>. | 98 | was successfully changed to B<engine>. |
| 97 | 99 | ||
| 98 | DSA_new_method() returns B<NULL> and sets an error code that can be | 100 | DSA_new_method() returns NULL and sets an error code that can be |
| 99 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation | 101 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation |
| 100 | fails. Otherwise it returns a pointer to the newly allocated | 102 | fails. Otherwise it returns a pointer to the newly allocated structure. |
| 101 | structure. | ||
| 102 | 103 | ||
| 103 | =head1 SEE ALSO | 104 | =head1 SEE ALSO |
| 104 | 105 | ||
| @@ -109,4 +110,9 @@ L<dsa(3)|dsa(3)>, L<DSA_new(3)|DSA_new(3)> | |||
| 109 | DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(), | 110 | DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(), |
| 110 | DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4. | 111 | DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4. |
| 111 | 112 | ||
| 113 | DSA_set_default_openssl_method() and DSA_get_default_openssl_method() | ||
| 114 | replaced DSA_set_default_method() and DSA_get_default_method() respectively, | ||
| 115 | and DSA_set_method() and DSA_new_method() were altered to use B<ENGINE>s | ||
| 116 | rather than B<DSA_METHOD>s during development of OpenSSL 0.9.6. | ||
| 117 | |||
| 112 | =cut | 118 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/ERR_error_string.pod b/src/lib/libssl/src/doc/crypto/ERR_error_string.pod index 0d2417599c..e01beb817a 100644 --- a/src/lib/libssl/src/doc/crypto/ERR_error_string.pod +++ b/src/lib/libssl/src/doc/crypto/ERR_error_string.pod | |||
| @@ -2,13 +2,16 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | ERR_error_string - obtain human-readable error message | 5 | ERR_error_string, ERR_error_string_n, ERR_lib_error_string, |
| 6 | ERR_func_error_string, ERR_reason_error_string - obtain human-readable | ||
| 7 | error message | ||
| 6 | 8 | ||
| 7 | =head1 SYNOPSIS | 9 | =head1 SYNOPSIS |
| 8 | 10 | ||
| 9 | #include <openssl/err.h> | 11 | #include <openssl/err.h> |
| 10 | 12 | ||
| 11 | char *ERR_error_string(unsigned long e, char *buf); | 13 | char *ERR_error_string(unsigned long e, char *buf); |
| 14 | char *ERR_error_string_n(unsigned long e, char *buf, size_t len); | ||
| 12 | 15 | ||
| 13 | const char *ERR_lib_error_string(unsigned long e); | 16 | const char *ERR_lib_error_string(unsigned long e); |
| 14 | const char *ERR_func_error_string(unsigned long e); | 17 | const char *ERR_func_error_string(unsigned long e); |
| @@ -17,9 +20,13 @@ ERR_error_string - obtain human-readable error message | |||
| 17 | =head1 DESCRIPTION | 20 | =head1 DESCRIPTION |
| 18 | 21 | ||
| 19 | ERR_error_string() generates a human-readable string representing the | 22 | ERR_error_string() generates a human-readable string representing the |
| 20 | error code B<e>, and places it at B<buf>. B<buf> must be at least 120 | 23 | error code I<e>, and places it at I<buf>. I<buf> must be at least 120 |
| 21 | bytes long. If B<buf> is B<NULL>, the error string is placed in a | 24 | bytes long. If I<buf> is B<NULL>, the error string is placed in a |
| 22 | static buffer. | 25 | static buffer. |
| 26 | ERR_error_string_n() is a variant of ERR_error_string() that writes | ||
| 27 | at most I<len> characters (including the terminating 0) | ||
| 28 | and truncates the string if necessary. | ||
| 29 | For ERR_error_string_n(), I<buf> may not be B<NULL>. | ||
| 23 | 30 | ||
| 24 | The string will have the following format: | 31 | The string will have the following format: |
| 25 | 32 | ||
| @@ -45,7 +52,7 @@ all error codes currently in the queue. | |||
| 45 | =head1 RETURN VALUES | 52 | =head1 RETURN VALUES |
| 46 | 53 | ||
| 47 | ERR_error_string() returns a pointer to a static buffer containing the | 54 | ERR_error_string() returns a pointer to a static buffer containing the |
| 48 | string if B<buf == NULL>, B<buf> otherwise. | 55 | string if I<buf> B<== NULL>, I<buf> otherwise. |
| 49 | 56 | ||
| 50 | ERR_lib_error_string(), ERR_func_error_string() and | 57 | ERR_lib_error_string(), ERR_func_error_string() and |
| 51 | ERR_reason_error_string() return the strings, and B<NULL> if | 58 | ERR_reason_error_string() return the strings, and B<NULL> if |
| @@ -61,5 +68,6 @@ L<ERR_print_errors(3)|ERR_print_errors(3)> | |||
| 61 | =head1 HISTORY | 68 | =head1 HISTORY |
| 62 | 69 | ||
| 63 | ERR_error_string() is available in all versions of SSLeay and OpenSSL. | 70 | ERR_error_string() is available in all versions of SSLeay and OpenSSL. |
| 71 | ERR_error_string_n() was added in OpenSSL 0.9.6. | ||
| 64 | 72 | ||
| 65 | =cut | 73 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/ERR_get_error.pod b/src/lib/libssl/src/doc/crypto/ERR_get_error.pod index 75ece00d97..3551bacb8d 100644 --- a/src/lib/libssl/src/doc/crypto/ERR_get_error.pod +++ b/src/lib/libssl/src/doc/crypto/ERR_get_error.pod | |||
| @@ -2,7 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | ERR_get_error, ERR_peek_error - obtain error code | 5 | ERR_get_error, ERR_peek_error, ERR_get_error_line, ERR_peek_error_line, |
| 6 | ERR_get_error_line_data, ERR_peek_error_line_data - obtain error code and data | ||
| 6 | 7 | ||
| 7 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 8 | 9 | ||
| @@ -40,7 +41,7 @@ the error occurred in *B<file> and *B<line>, unless these are B<NULL>. | |||
| 40 | ERR_get_error_line_data() and ERR_peek_error_line_data() store | 41 | ERR_get_error_line_data() and ERR_peek_error_line_data() store |
| 41 | additional data and flags associated with the error code in *B<data> | 42 | additional data and flags associated with the error code in *B<data> |
| 42 | and *B<flags>, unless these are B<NULL>. *B<data> contains a string | 43 | and *B<flags>, unless these are B<NULL>. *B<data> contains a string |
| 43 | if *B<flags>&B<ERR_TXT_STRING>. If it has been allocated by Malloc(), | 44 | if *B<flags>&B<ERR_TXT_STRING>. If it has been allocated by OPENSSL_malloc(), |
| 44 | *B<flags>&B<ERR_TXT_MALLOCED> is true. | 45 | *B<flags>&B<ERR_TXT_MALLOCED> is true. |
| 45 | 46 | ||
| 46 | =head1 RETURN VALUES | 47 | =head1 RETURN VALUES |
diff --git a/src/lib/libssl/src/doc/crypto/ERR_remove_state.pod b/src/lib/libssl/src/doc/crypto/ERR_remove_state.pod index ebcdc0f5a5..72925fb9f4 100644 --- a/src/lib/libssl/src/doc/crypto/ERR_remove_state.pod +++ b/src/lib/libssl/src/doc/crypto/ERR_remove_state.pod | |||
| @@ -16,7 +16,7 @@ ERR_remove_state() frees the error queue associated with thread B<pid>. | |||
| 16 | If B<pid> == 0, the current thread will have its error queue removed. | 16 | If B<pid> == 0, the current thread will have its error queue removed. |
| 17 | 17 | ||
| 18 | Since error queue data structures are allocated automatically for new | 18 | Since error queue data structures are allocated automatically for new |
| 19 | threads, they must be freed when threads are terminated in oder to | 19 | threads, they must be freed when threads are terminated in order to |
| 20 | avoid memory leaks. | 20 | avoid memory leaks. |
| 21 | 21 | ||
| 22 | =head1 RETURN VALUE | 22 | =head1 RETURN VALUE |
diff --git a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod index 6d4e156ae3..fefc858f7e 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod | |||
| @@ -2,7 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal - EVP digest routines | 5 | EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal, EVP_MAX_MD_SIZE, |
| 6 | EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, EVP_MD_block_size, | ||
| 7 | EVP_MD_CTX_md, EVP_MD_CTX_size, EVP_MD_CTX_block_size, EVP_MD_CTX_type, | ||
| 8 | EVP_md_null, EVP_md2, EVP_md5, EVP_sha, EVP_sha1, EVP_dss, EVP_dss1, EVP_mdc2, | ||
| 9 | EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, EVP_get_digestbyobj - | ||
| 10 | EVP digest routines | ||
| 6 | 11 | ||
| 7 | =head1 SYNOPSIS | 12 | =head1 SYNOPSIS |
| 8 | 13 | ||
| @@ -45,12 +50,12 @@ EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal - EVP digest routines | |||
| 45 | 50 | ||
| 46 | The EVP digest routines are a high level interface to message digests. | 51 | The EVP digest routines are a high level interface to message digests. |
| 47 | 52 | ||
| 48 | EVP_DigestInit() initialises a digest context B<ctx> to use a digest | 53 | EVP_DigestInit() initializes a digest context B<ctx> to use a digest |
| 49 | B<type>: this will typically be supplied by a function such as | 54 | B<type>: this will typically be supplied by a function such as |
| 50 | EVP_sha1(). | 55 | EVP_sha1(). |
| 51 | 56 | ||
| 52 | EVP_DigestUpdate() hashes B<cnt> bytes of data at B<d> into the | 57 | EVP_DigestUpdate() hashes B<cnt> bytes of data at B<d> into the |
| 53 | digest context B<ctx>. This funtion can be called several times on the | 58 | digest context B<ctx>. This function can be called several times on the |
| 54 | same B<ctx> to hash additional data. | 59 | same B<ctx> to hash additional data. |
| 55 | 60 | ||
| 56 | EVP_DigestFinal() retrieves the digest value from B<ctx> and places | 61 | EVP_DigestFinal() retrieves the digest value from B<ctx> and places |
| @@ -58,7 +63,7 @@ it in B<md>. If the B<s> parameter is not NULL then the number of | |||
| 58 | bytes of data written (i.e. the length of the digest) will be written | 63 | bytes of data written (i.e. the length of the digest) will be written |
| 59 | to the integer at B<s>, at most B<EVP_MAX_MD_SIZE> bytes will be written. | 64 | to the integer at B<s>, at most B<EVP_MAX_MD_SIZE> bytes will be written. |
| 60 | After calling EVP_DigestFinal() no additional calls to EVP_DigestUpdate() | 65 | After calling EVP_DigestFinal() no additional calls to EVP_DigestUpdate() |
| 61 | can be made, but EVP_DigestInit() can be called to initialiase a new | 66 | can be made, but EVP_DigestInit() can be called to initialize a new |
| 62 | digest operation. | 67 | digest operation. |
| 63 | 68 | ||
| 64 | EVP_MD_CTX_copy() can be used to copy the message digest state from | 69 | EVP_MD_CTX_copy() can be used to copy the message digest state from |
| @@ -97,7 +102,7 @@ returns is of zero length. | |||
| 97 | 102 | ||
| 98 | EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj() | 103 | EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj() |
| 99 | return an B<EVP_MD> structure when passed a digest name, a digest NID or | 104 | return an B<EVP_MD> structure when passed a digest name, a digest NID or |
| 100 | an ASN1_OBJECT structure respectively. The digest table must be initialised | 105 | an ASN1_OBJECT structure respectively. The digest table must be initialized |
| 101 | using, for example, OpenSSL_add_all_digests() for these functions to work. | 106 | using, for example, OpenSSL_add_all_digests() for these functions to work. |
| 102 | 107 | ||
| 103 | =head1 RETURN VALUES | 108 | =head1 RETURN VALUES |
diff --git a/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod b/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod index 77ed4ccdba..9afe2396e2 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod | |||
| @@ -2,34 +2,46 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | EVP_EncryptInit, EVP_EncryptUpdate, EVP_EncryptFinal - EVP cipher routines | 5 | EVP_EncryptInit, EVP_EncryptUpdate, EVP_EncryptFinal, EVP_DecryptInit, |
| 6 | EVP_DecryptUpdate, EVP_DecryptFinal, EVP_CipherInit, EVP_CipherUpdate, | ||
| 7 | EVP_CipherFinal, EVP_CIPHER_CTX_set_key_length, EVP_CIPHER_CTX_ctrl, | ||
| 8 | EVP_CIPHER_CTX_cleanup, EVP_get_cipherbyname, EVP_get_cipherbynid, | ||
| 9 | EVP_get_cipherbyobj, EVP_CIPHER_nid, EVP_CIPHER_block_size, | ||
| 10 | EVP_CIPHER_key_length, EVP_CIPHER_iv_length, EVP_CIPHER_flags, | ||
| 11 | EVP_CIPHER_mode, EVP_CIPHER_type, EVP_CIPHER_CTX_cipher, EVP_CIPHER_CTX_nid, | ||
| 12 | EVP_CIPHER_CTX_block_size, EVP_CIPHER_CTX_key_length, EVP_CIPHER_CTX_iv_length, | ||
| 13 | EVP_CIPHER_CTX_get_app_data, EVP_CIPHER_CTX_set_app_data, EVP_CIPHER_CTX_type, | ||
| 14 | EVP_CIPHER_CTX_flags, EVP_CIPHER_CTX_mode, EVP_CIPHER_param_to_asn1, | ||
| 15 | EVP_CIPHER_asn1_to_param - EVP cipher routines | ||
| 6 | 16 | ||
| 7 | =head1 SYNOPSIS | 17 | =head1 SYNOPSIS |
| 8 | 18 | ||
| 9 | #include <openssl/evp.h> | 19 | #include <openssl/evp.h> |
| 10 | 20 | ||
| 11 | void EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, | 21 | int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, |
| 12 | unsigned char *key, unsigned char *iv); | 22 | unsigned char *key, unsigned char *iv); |
| 13 | void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 23 | int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 14 | int *outl, unsigned char *in, int inl); | 24 | int *outl, unsigned char *in, int inl); |
| 15 | void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, | 25 | int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 16 | int *outl); | 26 | int *outl); |
| 17 | 27 | ||
| 18 | void EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, | 28 | int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, |
| 19 | unsigned char *key, unsigned char *iv); | 29 | unsigned char *key, unsigned char *iv); |
| 20 | void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 30 | int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 21 | int *outl, unsigned char *in, int inl); | 31 | int *outl, unsigned char *in, int inl); |
| 22 | int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, | 32 | int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, |
| 23 | int *outl); | 33 | int *outl); |
| 24 | 34 | ||
| 25 | void EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, | 35 | int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, |
| 26 | unsigned char *key, unsigned char *iv, int enc); | 36 | unsigned char *key, unsigned char *iv, int enc); |
| 27 | void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 37 | int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 28 | int *outl, unsigned char *in, int inl); | 38 | int *outl, unsigned char *in, int inl); |
| 29 | int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, | 39 | int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, |
| 30 | int *outl); | 40 | int *outl); |
| 31 | 41 | ||
| 32 | void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); | 42 | int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); |
| 43 | int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); | ||
| 44 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); | ||
| 33 | 45 | ||
| 34 | const EVP_CIPHER *EVP_get_cipherbyname(const char *name); | 46 | const EVP_CIPHER *EVP_get_cipherbyname(const char *name); |
| 35 | #define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) | 47 | #define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) |
| @@ -38,15 +50,21 @@ EVP_EncryptInit, EVP_EncryptUpdate, EVP_EncryptFinal - EVP cipher routines | |||
| 38 | #define EVP_CIPHER_nid(e) ((e)->nid) | 50 | #define EVP_CIPHER_nid(e) ((e)->nid) |
| 39 | #define EVP_CIPHER_block_size(e) ((e)->block_size) | 51 | #define EVP_CIPHER_block_size(e) ((e)->block_size) |
| 40 | #define EVP_CIPHER_key_length(e) ((e)->key_len) | 52 | #define EVP_CIPHER_key_length(e) ((e)->key_len) |
| 41 | #define EVP_CIPHER_iv_length(e) ((e)->iv_len) | 53 | #define EVP_CIPHER_iv_length(e) ((e)->iv_len) |
| 42 | 54 | #define EVP_CIPHER_flags(e) ((e)->flags) | |
| 55 | #define EVP_CIPHER_mode(e) ((e)->flags) & EVP_CIPH_MODE) | ||
| 43 | int EVP_CIPHER_type(const EVP_CIPHER *ctx); | 56 | int EVP_CIPHER_type(const EVP_CIPHER *ctx); |
| 57 | |||
| 44 | #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) | 58 | #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) |
| 45 | #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) | 59 | #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) |
| 46 | #define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size) | 60 | #define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size) |
| 47 | #define EVP_CIPHER_CTX_key_length(e) ((e)->cipher->key_len) | 61 | #define EVP_CIPHER_CTX_key_length(e) ((e)->key_len) |
| 48 | #define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len) | 62 | #define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len) |
| 63 | #define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) | ||
| 64 | #define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d)) | ||
| 49 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) | 65 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) |
| 66 | #define EVP_CIPHER_CTX_flags(e) ((e)->cipher->flags) | ||
| 67 | #define EVP_CIPHER_CTX_mode(e) ((e)->cipher->flags & EVP_CIPH_MODE) | ||
| 50 | 68 | ||
| 51 | int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | 69 | int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); |
| 52 | int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | 70 | int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); |
| @@ -56,16 +74,14 @@ EVP_EncryptInit, EVP_EncryptUpdate, EVP_EncryptFinal - EVP cipher routines | |||
| 56 | The EVP cipher routines are a high level interface to certain | 74 | The EVP cipher routines are a high level interface to certain |
| 57 | symmetric ciphers. | 75 | symmetric ciphers. |
| 58 | 76 | ||
| 59 | EVP_EncryptInit() initialises a cipher context B<ctx> for encryption | 77 | EVP_EncryptInit() initializes a cipher context B<ctx> for encryption |
| 60 | with cipher B<type>. B<type> is normally supplied by a function such | 78 | with cipher B<type>. B<type> is normally supplied by a function such |
| 61 | as EVP_des_cbc() . B<key> is the symmetric key to use and B<iv> is the | 79 | as EVP_des_cbc() . B<key> is the symmetric key to use and B<iv> is the |
| 62 | IV to use (if necessary), the actual number of bytes used for the | 80 | IV to use (if necessary), the actual number of bytes used for the |
| 63 | key and IV depends on the cipher. It is possible to set all parameters | 81 | key and IV depends on the cipher. It is possible to set all parameters |
| 64 | to NULL except B<type> in an initial call and supply the remaining | 82 | to NULL except B<type> in an initial call and supply the remaining |
| 65 | parameters in subsequent calls. This is normally done when the | 83 | parameters in subsequent calls, all of which have B<type> set to NULL. |
| 66 | EVP_CIPHER_asn1_to_param() function is called to set the cipher | 84 | This is done when the default cipher parameters are not appropriate. |
| 67 | parameters from an ASN1 AlgorithmIdentifier and the key from a | ||
| 68 | different source. | ||
| 69 | 85 | ||
| 70 | EVP_EncryptUpdate() encrypts B<inl> bytes from the buffer B<in> and | 86 | EVP_EncryptUpdate() encrypts B<inl> bytes from the buffer B<in> and |
| 71 | writes the encrypted version to B<out>. This function can be called | 87 | writes the encrypted version to B<out>. This function can be called |
| @@ -93,7 +109,8 @@ cipher block size is 1 in which case B<inl> bytes is sufficient. | |||
| 93 | EVP_CipherInit(), EVP_CipherUpdate() and EVP_CipherFinal() are functions | 109 | EVP_CipherInit(), EVP_CipherUpdate() and EVP_CipherFinal() are functions |
| 94 | that can be used for decryption or encryption. The operation performed | 110 | that can be used for decryption or encryption. The operation performed |
| 95 | depends on the value of the B<enc> parameter. It should be set to 1 for | 111 | depends on the value of the B<enc> parameter. It should be set to 1 for |
| 96 | encryption and 0 for decryption. | 112 | encryption, 0 for decryption and -1 to leave the value unchanged (the |
| 113 | actual value of 'enc' being supplied in a previous call). | ||
| 97 | 114 | ||
| 98 | EVP_CIPHER_CTX_cleanup() clears all information from a cipher context. | 115 | EVP_CIPHER_CTX_cleanup() clears all information from a cipher context. |
| 99 | It should be called after all operations using a cipher are complete | 116 | It should be called after all operations using a cipher are complete |
| @@ -111,7 +128,13 @@ IDENTIFIER. | |||
| 111 | EVP_CIPHER_key_length() and EVP_CIPHER_CTX_key_length() return the key | 128 | EVP_CIPHER_key_length() and EVP_CIPHER_CTX_key_length() return the key |
| 112 | length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX> | 129 | length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX> |
| 113 | structure. The constant B<EVP_MAX_KEY_LENGTH> is the maximum key length | 130 | structure. The constant B<EVP_MAX_KEY_LENGTH> is the maximum key length |
| 114 | for all ciphers. | 131 | for all ciphers. Note: although EVP_CIPHER_key_length() is fixed for a |
| 132 | given cipher, the value of EVP_CIPHER_CTX_key_length() may be different | ||
| 133 | for variable key length ciphers. | ||
| 134 | |||
| 135 | EVP_CIPHER_CTX_set_key_length() sets the key length of the cipher ctx. | ||
| 136 | If the cipher is a fixed length cipher then attempting to set the key | ||
| 137 | length to any value other than the fixed value is an error. | ||
| 115 | 138 | ||
| 116 | EVP_CIPHER_iv_length() and EVP_CIPHER_CTX_iv_length() return the IV | 139 | EVP_CIPHER_iv_length() and EVP_CIPHER_CTX_iv_length() return the IV |
| 117 | length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX>. | 140 | length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX>. |
| @@ -133,6 +156,11 @@ B<NID_undef>. | |||
| 133 | EVP_CIPHER_CTX_cipher() returns the B<EVP_CIPHER> structure when passed | 156 | EVP_CIPHER_CTX_cipher() returns the B<EVP_CIPHER> structure when passed |
| 134 | an B<EVP_CIPHER_CTX> structure. | 157 | an B<EVP_CIPHER_CTX> structure. |
| 135 | 158 | ||
| 159 | EVP_CIPHER_mode() and EVP_CIPHER_CTX_mode() return the block cipher mode: | ||
| 160 | EVP_CIPH_ECB_MODE, EVP_CIPH_CBC_MODE, EVP_CIPH_CFB_MODE or | ||
| 161 | EVP_CIPH_OFB_MODE. If the cipher is a stream cipher then | ||
| 162 | EVP_CIPH_STREAM_CIPHER is returned. | ||
| 163 | |||
| 136 | EVP_CIPHER_param_to_asn1() sets the AlgorithmIdentifier "parameter" based | 164 | EVP_CIPHER_param_to_asn1() sets the AlgorithmIdentifier "parameter" based |
| 137 | on the passed cipher. This will typically include any parameters and an | 165 | on the passed cipher. This will typically include any parameters and an |
| 138 | IV. The cipher IV (if any) must be set when this call is made. This call | 166 | IV. The cipher IV (if any) must be set when this call is made. This call |
| @@ -149,21 +177,24 @@ key set to NULL, EVP_CIPHER_asn1_to_param() will be called and finally | |||
| 149 | EVP_CipherInit() again with all parameters except the key set to NULL. It is | 177 | EVP_CipherInit() again with all parameters except the key set to NULL. It is |
| 150 | possible for this function to fail if the cipher does not have any ASN1 support | 178 | possible for this function to fail if the cipher does not have any ASN1 support |
| 151 | or the parameters cannot be set (for example the RC2 effective key length | 179 | or the parameters cannot be set (for example the RC2 effective key length |
| 152 | does not have an B<EVP_CIPHER> structure). | 180 | is not supported. |
| 181 | |||
| 182 | EVP_CIPHER_CTX_ctrl() allows various cipher specific parameters to be determined | ||
| 183 | and set. Currently only the RC2 effective key length and the number of rounds of | ||
| 184 | RC5 can be set. | ||
| 153 | 185 | ||
| 154 | =head1 RETURN VALUES | 186 | =head1 RETURN VALUES |
| 155 | 187 | ||
| 156 | EVP_EncryptInit(), EVP_EncryptUpdate() and EVP_EncryptFinal() do not return | 188 | EVP_EncryptInit(), EVP_EncryptUpdate() and EVP_EncryptFinal() return 1 for success |
| 157 | values. | 189 | and 0 for failure. |
| 158 | 190 | ||
| 159 | EVP_DecryptInit() and EVP_DecryptUpdate() do not return values. | 191 | EVP_DecryptInit() and EVP_DecryptUpdate() return 1 for success and 0 for failure. |
| 160 | EVP_DecryptFinal() returns 0 if the decrypt failed or 1 for success. | 192 | EVP_DecryptFinal() returns 0 if the decrypt failed or 1 for success. |
| 161 | 193 | ||
| 162 | EVP_CipherInit() and EVP_CipherUpdate() do not return values. | 194 | EVP_CipherInit() and EVP_CipherUpdate() return 1 for success and 0 for failure. |
| 163 | EVP_CipherFinal() returns 1 for a decryption failure or 1 for success, if | 195 | EVP_CipherFinal() returns 1 for a decryption failure or 1 for success. |
| 164 | the operation is encryption then it always returns 1. | ||
| 165 | 196 | ||
| 166 | EVP_CIPHER_CTX_cleanup() does not return a value. | 197 | EVP_CIPHER_CTX_cleanup() returns 1 for success and 0 for failure. |
| 167 | 198 | ||
| 168 | EVP_get_cipherbyname(), EVP_get_cipherbynid() and EVP_get_cipherbyobj() | 199 | EVP_get_cipherbyname(), EVP_get_cipherbynid() and EVP_get_cipherbyobj() |
| 169 | return an B<EVP_CIPHER> structure or NULL on error. | 200 | return an B<EVP_CIPHER> structure or NULL on error. |
| @@ -187,6 +218,75 @@ EVP_CIPHER_CTX_cipher() returns an B<EVP_CIPHER> structure. | |||
| 187 | EVP_CIPHER_param_to_asn1() and EVP_CIPHER_asn1_to_param() return 1 for | 218 | EVP_CIPHER_param_to_asn1() and EVP_CIPHER_asn1_to_param() return 1 for |
| 188 | success or zero for failure. | 219 | success or zero for failure. |
| 189 | 220 | ||
| 221 | =head1 CIPHER LISTING | ||
| 222 | |||
| 223 | All algorithms have a fixed key length unless otherwise stated. | ||
| 224 | |||
| 225 | =over 4 | ||
| 226 | |||
| 227 | =item EVP_enc_null() | ||
| 228 | |||
| 229 | Null cipher: does nothing. | ||
| 230 | |||
| 231 | =item EVP_des_cbc(void), EVP_des_ecb(void), EVP_des_cfb(void), EVP_des_ofb(void) | ||
| 232 | |||
| 233 | DES in CBC, ECB, CFB and OFB modes respectively. | ||
| 234 | |||
| 235 | =item EVP_des_ede_cbc(void), EVP_des_ede(), EVP_des_ede_ofb(void), EVP_des_ede_cfb(void) | ||
| 236 | |||
| 237 | Two key triple DES in CBC, ECB, CFB and OFB modes respectively. | ||
| 238 | |||
| 239 | =item EVP_des_ede3_cbc(void), EVP_des_ede3(), EVP_des_ede3_ofb(void), EVP_des_ede3_cfb(void) | ||
| 240 | |||
| 241 | Three key triple DES in CBC, ECB, CFB and OFB modes respectively. | ||
| 242 | |||
| 243 | =item EVP_desx_cbc(void) | ||
| 244 | |||
| 245 | DESX algorithm in CBC mode. | ||
| 246 | |||
| 247 | =item EVP_rc4(void) | ||
| 248 | |||
| 249 | RC4 stream cipher. This is a variable key length cipher with default key length 128 bits. | ||
| 250 | |||
| 251 | =item EVP_rc4_40(void) | ||
| 252 | |||
| 253 | RC4 stream cipher with 40 bit key length. This is obsolete and new code should use EVP_rc4() | ||
| 254 | and the EVP_CIPHER_CTX_set_key_length() function. | ||
| 255 | |||
| 256 | =item EVP_idea_cbc() EVP_idea_ecb(void), EVP_idea_cfb(void), EVP_idea_ofb(void), EVP_idea_cbc(void) | ||
| 257 | |||
| 258 | IDEA encryption algorithm in CBC, ECB, CFB and OFB modes respectively. | ||
| 259 | |||
| 260 | =item EVP_rc2_cbc(void), EVP_rc2_ecb(void), EVP_rc2_cfb(void), EVP_rc2_ofb(void) | ||
| 261 | |||
| 262 | RC2 encryption algorithm in CBC, ECB, CFB and OFB modes respectively. This is a variable key | ||
| 263 | length cipher with an additional parameter called "effective key bits" or "effective key length". | ||
| 264 | By default both are set to 128 bits. | ||
| 265 | |||
| 266 | =item EVP_rc2_40_cbc(void), EVP_rc2_64_cbc(void) | ||
| 267 | |||
| 268 | RC2 algorithm in CBC mode with a default key length and effective key length of 40 and 64 bits. | ||
| 269 | These are obsolete and new code should use EVP_rc2_cbc(), EVP_CIPHER_CTX_set_key_length() and | ||
| 270 | EVP_CIPHER_CTX_ctrl() to set the key length and effective key length. | ||
| 271 | |||
| 272 | =item EVP_bf_cbc(void), EVP_bf_ecb(void), EVP_bf_cfb(void), EVP_bf_ofb(void); | ||
| 273 | |||
| 274 | Blowfish encryption algorithm in CBC, ECB, CFB and OFB modes respectively. This is a variable key | ||
| 275 | length cipher. | ||
| 276 | |||
| 277 | =item EVP_cast5_cbc(void), EVP_cast5_ecb(void), EVP_cast5_cfb(void), EVP_cast5_ofb(void) | ||
| 278 | |||
| 279 | CAST encryption algorithm in CBC, ECB, CFB and OFB modes respectively. This is a variable key | ||
| 280 | length cipher. | ||
| 281 | |||
| 282 | =item EVP_rc5_32_12_16_cbc(void), EVP_rc5_32_12_16_ecb(void), EVP_rc5_32_12_16_cfb(void), EVP_rc5_32_12_16_ofb(void) | ||
| 283 | |||
| 284 | RC5 encryption algorithm in CBC, ECB, CFB and OFB modes respectively. This is a variable key length | ||
| 285 | cipher with an additional "number of rounds" parameter. By default the key length is set to 128 | ||
| 286 | bits and 12 rounds. | ||
| 287 | |||
| 288 | =back | ||
| 289 | |||
| 190 | =head1 NOTES | 290 | =head1 NOTES |
| 191 | 291 | ||
| 192 | Where possible the B<EVP> interface to symmetric ciphers should be used in | 292 | Where possible the B<EVP> interface to symmetric ciphers should be used in |
| @@ -206,14 +306,49 @@ test that the input data or key is correct. A random block has better than | |||
| 206 | 1 in 256 chance of being of the correct format and problems with the | 306 | 1 in 256 chance of being of the correct format and problems with the |
| 207 | input data earlier on will not produce a final decrypt error. | 307 | input data earlier on will not produce a final decrypt error. |
| 208 | 308 | ||
| 309 | The functions EVP_EncryptInit(), EVP_EncryptUpdate(), EVP_EncryptFinal(), | ||
| 310 | EVP_DecryptInit(), EVP_DecryptUpdate(), EVP_CipherInit() and EVP_CipherUpdate() | ||
| 311 | and EVP_CIPHER_CTX_cleanup() did not return errors in OpenSSL version 0.9.5a or | ||
| 312 | earlier. Software only versions of encryption algorithms will never return | ||
| 313 | error codes for these functions, unless there is a programming error (for example | ||
| 314 | and attempt to set the key before the cipher is set in EVP_EncryptInit() ). | ||
| 315 | |||
| 209 | =head1 BUGS | 316 | =head1 BUGS |
| 210 | 317 | ||
| 211 | The current B<EVP> cipher interface is not as flexible as it should be. Only | 318 | For RC5 the number of rounds can currently only be set to 8, 12 or 16. This is |
| 212 | certain "spot" encryption algorithms can be used for ciphers which have various | 319 | a limitation of the current RC5 code rather than the EVP interface. |
| 213 | parameters associated with them (RC2, RC5 for example) this is inadequate. | 320 | |
| 321 | It should be possible to disable PKCS padding: currently it isn't. | ||
| 322 | |||
| 323 | EVP_MAX_KEY_LENGTH and EVP_MAX_IV_LENGTH only refer to the internal ciphers with | ||
| 324 | default key lengths. If custom ciphers exceed these values the results are | ||
| 325 | unpredictable. This is because it has become standard practice to define a | ||
| 326 | generic key as a fixed unsigned char array containing EVP_MAX_KEY_LENGTH bytes. | ||
| 327 | |||
| 328 | The ASN1 code is incomplete (and sometimes inaccurate) it has only been tested | ||
| 329 | for certain common S/MIME ciphers (RC2, DES, triple DES) in CBC mode. | ||
| 330 | |||
| 331 | =head1 EXAMPLES | ||
| 332 | |||
| 333 | Get the number of rounds used in RC5: | ||
| 334 | |||
| 335 | int nrounds; | ||
| 336 | EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GET_RC5_ROUNDS, 0, &i); | ||
| 337 | |||
| 338 | Get the RC2 effective key length: | ||
| 339 | |||
| 340 | int key_bits; | ||
| 341 | EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GET_RC2_KEY_BITS, 0, &i); | ||
| 342 | |||
| 343 | Set the number of rounds used in RC5: | ||
| 344 | |||
| 345 | int nrounds; | ||
| 346 | EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC5_ROUNDS, i, NULL); | ||
| 347 | |||
| 348 | Set the number of rounds used in RC2: | ||
| 214 | 349 | ||
| 215 | Several of the functions do not return error codes because the software versions | 350 | int nrounds; |
| 216 | can never fail. This is not true of hardware versions. | 351 | EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC2_KEY_BITS, i, NULL); |
| 217 | 352 | ||
| 218 | =head1 SEE ALSO | 353 | =head1 SEE ALSO |
| 219 | 354 | ||
diff --git a/src/lib/libssl/src/doc/crypto/EVP_OpenInit.pod b/src/lib/libssl/src/doc/crypto/EVP_OpenInit.pod index 50edb124e4..2e710da945 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_OpenInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_OpenInit.pod | |||
| @@ -10,9 +10,9 @@ EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal - EVP envelope decryption | |||
| 10 | 10 | ||
| 11 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, | 11 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, |
| 12 | int ekl,unsigned char *iv,EVP_PKEY *priv); | 12 | int ekl,unsigned char *iv,EVP_PKEY *priv); |
| 13 | void EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 13 | int EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 14 | int *outl, unsigned char *in, int inl); | 14 | int *outl, unsigned char *in, int inl); |
| 15 | void EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, | 15 | int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 16 | int *outl); | 16 | int *outl); |
| 17 | 17 | ||
| 18 | =head1 DESCRIPTION | 18 | =head1 DESCRIPTION |
| @@ -21,7 +21,7 @@ The EVP envelope routines are a high level interface to envelope | |||
| 21 | decryption. They decrypt a public key encrypted symmetric key and | 21 | decryption. They decrypt a public key encrypted symmetric key and |
| 22 | then decrypt data using it. | 22 | then decrypt data using it. |
| 23 | 23 | ||
| 24 | EVP_OpenInit() initialises a cipher context B<ctx> for decryption | 24 | EVP_OpenInit() initializes a cipher context B<ctx> for decryption |
| 25 | with cipher B<type>. It decrypts the encrypted symmetric key of length | 25 | with cipher B<type>. It decrypts the encrypted symmetric key of length |
| 26 | B<ekl> bytes passed in the B<ek> parameter using the private key B<priv>. | 26 | B<ekl> bytes passed in the B<ek> parameter using the private key B<priv>. |
| 27 | The IV is supplied in the B<iv> parameter. | 27 | The IV is supplied in the B<iv> parameter. |
| @@ -29,20 +29,32 @@ The IV is supplied in the B<iv> parameter. | |||
| 29 | EVP_OpenUpdate() and EVP_OpenFinal() have exactly the same properties | 29 | EVP_OpenUpdate() and EVP_OpenFinal() have exactly the same properties |
| 30 | as the EVP_DecryptUpdate() and EVP_DecryptFinal() routines, as | 30 | as the EVP_DecryptUpdate() and EVP_DecryptFinal() routines, as |
| 31 | documented on the L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> manual | 31 | documented on the L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> manual |
| 32 | page. | 32 | page. |
| 33 | |||
| 34 | =head1 NOTES | ||
| 35 | |||
| 36 | It is possible to call EVP_OpenInit() twice in the same way as | ||
| 37 | EVP_DecryptInit(). The first call should have B<priv> set to NULL | ||
| 38 | and (after setting any cipher parameters) it should be called again | ||
| 39 | with B<type> set to NULL. | ||
| 40 | |||
| 41 | If the cipher passed in the B<type> parameter is a variable length | ||
| 42 | cipher then the key length will be set to the value of the recovered | ||
| 43 | key length. If the cipher is a fixed length cipher then the recovered | ||
| 44 | key length must match the fixed cipher length. | ||
| 33 | 45 | ||
| 34 | =head1 RETURN VALUES | 46 | =head1 RETURN VALUES |
| 35 | 47 | ||
| 36 | EVP_OpenInit() returns -1 on error or an non zero integer (actually the | 48 | EVP_OpenInit() returns 0 on error or a non zero integer (actually the |
| 37 | recovered secret key size) if successful. | 49 | recovered secret key size) if successful. |
| 38 | 50 | ||
| 39 | EVP_SealUpdate() does not return a value. | 51 | EVP_OpenUpdate() returns 1 for success or 0 for failure. |
| 40 | 52 | ||
| 41 | EVP_SealFinal() returns 0 if the decrypt failed or 1 for success. | 53 | EVP_OpenFinal() returns 0 if the decrypt failed or 1 for success. |
| 42 | 54 | ||
| 43 | =head1 SEE ALSO | 55 | =head1 SEE ALSO |
| 44 | 56 | ||
| 45 | L<evp(3)|evp(3)>, | 57 | L<evp(3)|evp(3)>, L<rand(3)|rand(3)>, |
| 46 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, | 58 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, |
| 47 | L<EVP_SealInit(3)|EVP_SealInit(3)> | 59 | L<EVP_SealInit(3)|EVP_SealInit(3)> |
| 48 | 60 | ||
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod index 42beed33bd..0451eb648a 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod | |||
| @@ -10,9 +10,9 @@ EVP_SealInit, EVP_SealUpdate, EVP_SealFinal - EVP envelope encryption | |||
| 10 | 10 | ||
| 11 | int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, | 11 | int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, |
| 12 | int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk); | 12 | int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk); |
| 13 | void EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 13 | int EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 14 | int *outl, unsigned char *in, int inl); | 14 | int *outl, unsigned char *in, int inl); |
| 15 | void EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, | 15 | int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 16 | int *outl); | 16 | int *outl); |
| 17 | 17 | ||
| 18 | =head1 DESCRIPTION | 18 | =head1 DESCRIPTION |
| @@ -22,7 +22,7 @@ encryption. They generate a random key and then "envelope" it by | |||
| 22 | using public key encryption. Data can then be encrypted using this | 22 | using public key encryption. Data can then be encrypted using this |
| 23 | key. | 23 | key. |
| 24 | 24 | ||
| 25 | EVP_SealInit() initialises a cipher context B<ctx> for encryption | 25 | EVP_SealInit() initializes a cipher context B<ctx> for encryption |
| 26 | with cipher B<type> using a random secret key and IV supplied in | 26 | with cipher B<type> using a random secret key and IV supplied in |
| 27 | the B<iv> parameter. B<type> is normally supplied by a function such | 27 | the B<iv> parameter. B<type> is normally supplied by a function such |
| 28 | as EVP_des_cbc(). The secret key is encrypted using one or more public | 28 | as EVP_des_cbc(). The secret key is encrypted using one or more public |
| @@ -41,9 +41,10 @@ page. | |||
| 41 | 41 | ||
| 42 | =head1 RETURN VALUES | 42 | =head1 RETURN VALUES |
| 43 | 43 | ||
| 44 | EVP_SealInit() returns -1 on error or B<npubk> if successful. | 44 | EVP_SealInit() returns 0 on error or B<npubk> if successful. |
| 45 | 45 | ||
| 46 | EVP_SealUpdate() and EVP_SealFinal() do not return values. | 46 | EVP_SealUpdate() and EVP_SealFinal() return 1 for success and 0 for |
| 47 | failure. | ||
| 47 | 48 | ||
| 48 | =head1 NOTES | 49 | =head1 NOTES |
| 49 | 50 | ||
| @@ -59,9 +60,14 @@ but symmetric encryption is fast. So symmetric encryption is used for | |||
| 59 | bulk encryption and the small random symmetric key used is transferred | 60 | bulk encryption and the small random symmetric key used is transferred |
| 60 | using public key encryption. | 61 | using public key encryption. |
| 61 | 62 | ||
| 63 | It is possible to call EVP_SealInit() twice in the same way as | ||
| 64 | EVP_EncryptInit(). The first call should have B<npubk> set to 0 | ||
| 65 | and (after setting any cipher parameters) it should be called again | ||
| 66 | with B<type> set to NULL. | ||
| 67 | |||
| 62 | =head1 SEE ALSO | 68 | =head1 SEE ALSO |
| 63 | 69 | ||
| 64 | L<evp(3)|evp(3)>, | 70 | L<evp(3)|evp(3)>, L<rand(3)|rand(3)>, |
| 65 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, | 71 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, |
| 66 | L<EVP_OpenInit(3)|EVP_OpenInit(3)> | 72 | L<EVP_OpenInit(3)|EVP_OpenInit(3)> |
| 67 | 73 | ||
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod index 1167cefb45..d5ce245ecd 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod | |||
| @@ -19,12 +19,12 @@ EVP_SignInit, EVP_SignUpdate, EVP_SignFinal - EVP signing functions | |||
| 19 | The EVP signature routines are a high level interface to digital | 19 | The EVP signature routines are a high level interface to digital |
| 20 | signatures. | 20 | signatures. |
| 21 | 21 | ||
| 22 | EVP_SignInit() initialises a signing context B<ctx> to using digest | 22 | EVP_SignInit() initializes a signing context B<ctx> to using digest |
| 23 | B<type>: this will typically be supplied by a function such as | 23 | B<type>: this will typically be supplied by a function such as |
| 24 | EVP_sha1(). | 24 | EVP_sha1(). |
| 25 | 25 | ||
| 26 | EVP_SignUpdate() hashes B<cnt> bytes of data at B<d> into the | 26 | EVP_SignUpdate() hashes B<cnt> bytes of data at B<d> into the |
| 27 | signature context B<ctx>. This funtion can be called several times on the | 27 | signature context B<ctx>. This function can be called several times on the |
| 28 | same B<ctx> to include additional data. | 28 | same B<ctx> to include additional data. |
| 29 | 29 | ||
| 30 | EVP_SignFinal() signs the data in B<ctx> using the private key B<pkey> | 30 | EVP_SignFinal() signs the data in B<ctx> using the private key B<pkey> |
| @@ -32,7 +32,7 @@ and places the signature in B<sig>. If the B<s> parameter is not NULL | |||
| 32 | then the number of bytes of data written (i.e. the length of the signature) | 32 | then the number of bytes of data written (i.e. the length of the signature) |
| 33 | will be written to the integer at B<s>, at most EVP_PKEY_size(pkey) bytes | 33 | will be written to the integer at B<s>, at most EVP_PKEY_size(pkey) bytes |
| 34 | will be written. After calling EVP_SignFinal() no additional calls to | 34 | will be written. After calling EVP_SignFinal() no additional calls to |
| 35 | EVP_SignUpdate() can be made, but EVP_SignInit() can be called to initialiase | 35 | EVP_SignUpdate() can be made, but EVP_SignInit() can be called to initialize |
| 36 | a new signature operation. | 36 | a new signature operation. |
| 37 | 37 | ||
| 38 | EVP_PKEY_size() returns the maximum size of a signature in bytes. The actual | 38 | EVP_PKEY_size() returns the maximum size of a signature in bytes. The actual |
diff --git a/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod b/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod index 5e74c5dcf9..736a0f4a82 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod | |||
| @@ -17,17 +17,17 @@ EVP_VerifyInit, EVP_VerifyUpdate, EVP_VerifyFinal - EVP signature verification f | |||
| 17 | The EVP signature verification routines are a high level interface to digital | 17 | The EVP signature verification routines are a high level interface to digital |
| 18 | signatures. | 18 | signatures. |
| 19 | 19 | ||
| 20 | EVP_VerifyInit() initialises a verification context B<ctx> to using digest | 20 | EVP_VerifyInit() initializes a verification context B<ctx> to using digest |
| 21 | B<type>: this will typically be supplied by a function such as EVP_sha1(). | 21 | B<type>: this will typically be supplied by a function such as EVP_sha1(). |
| 22 | 22 | ||
| 23 | EVP_VerifyUpdate() hashes B<cnt> bytes of data at B<d> into the | 23 | EVP_VerifyUpdate() hashes B<cnt> bytes of data at B<d> into the |
| 24 | verification context B<ctx>. This funtion can be called several times on the | 24 | verification context B<ctx>. This function can be called several times on the |
| 25 | same B<ctx> to include additional data. | 25 | same B<ctx> to include additional data. |
| 26 | 26 | ||
| 27 | EVP_VerifyFinal() verifies the data in B<ctx> using the public key B<pkey> | 27 | EVP_VerifyFinal() verifies the data in B<ctx> using the public key B<pkey> |
| 28 | and against the B<siglen> bytes at B<sigbuf>. After calling EVP_VerifyFinal() | 28 | and against the B<siglen> bytes at B<sigbuf>. After calling EVP_VerifyFinal() |
| 29 | no additional calls to EVP_VerifyUpdate() can be made, but EVP_VerifyInit() | 29 | no additional calls to EVP_VerifyUpdate() can be made, but EVP_VerifyInit() |
| 30 | can be called to initialiase a new verification operation. | 30 | can be called to initialize a new verification operation. |
| 31 | 31 | ||
| 32 | =head1 RETURN VALUES | 32 | =head1 RETURN VALUES |
| 33 | 33 | ||
| @@ -57,11 +57,12 @@ might. | |||
| 57 | 57 | ||
| 58 | =head1 SEE ALSO | 58 | =head1 SEE ALSO |
| 59 | 59 | ||
| 60 | L<evp(3)|evp(3)>, | ||
| 60 | L<EVP_SignInit(3)|EVP_SignInit(3)>, | 61 | L<EVP_SignInit(3)|EVP_SignInit(3)>, |
| 61 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, | 62 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, |
| 62 | L<evp(3)|evp(3)>, L<HMAC(3)|HMAC(3)>, L<MD2(3)|MD2(3)>, | 63 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, |
| 63 | L<MD5(3)|MD5(3)>, L<MDC2(3)|MDC2(3)>, L<RIPEMD(3)|RIPEMD(3)>, | 64 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, |
| 64 | L<SHA1(3)|SHA1(3)>, L<digest(1)|digest(1)> | 65 | L<sha(3)|sha(3)>, L<digest(1)|digest(1)> |
| 65 | 66 | ||
| 66 | =head1 HISTORY | 67 | =head1 HISTORY |
| 67 | 68 | ||
diff --git a/src/lib/libssl/src/doc/crypto/OPENSSL_VERSION_NUMBER.pod b/src/lib/libssl/src/doc/crypto/OPENSSL_VERSION_NUMBER.pod index b0b1058d19..68ea723259 100644 --- a/src/lib/libssl/src/doc/crypto/OPENSSL_VERSION_NUMBER.pod +++ b/src/lib/libssl/src/doc/crypto/OPENSSL_VERSION_NUMBER.pod | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | OPENSSL_VERSION_NUMBER, SSLeay - get OpenSSL version number | 5 | OPENSSL_VERSION_NUMBER, SSLeay SSLeay_version - get OpenSSL version number |
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| @@ -11,11 +11,27 @@ OPENSSL_VERSION_NUMBER, SSLeay - get OpenSSL version number | |||
| 11 | 11 | ||
| 12 | #include <openssl/crypto.h> | 12 | #include <openssl/crypto.h> |
| 13 | long SSLeay(void); | 13 | long SSLeay(void); |
| 14 | char *SSLeay_version(int t); | ||
| 14 | 15 | ||
| 15 | =head1 DESCRIPTION | 16 | =head1 DESCRIPTION |
| 16 | 17 | ||
| 17 | OPENSSL_VERSION_NUMBER is a numeric release version identifier: | 18 | OPENSSL_VERSION_NUMBER is a numeric release version identifier: |
| 18 | 19 | ||
| 20 | MMNNFFPPS: major minor fix patch status | ||
| 21 | |||
| 22 | The status nibble has one of the values 0 for development, 1 to e for betas | ||
| 23 | 1 to 14, and f for release. | ||
| 24 | |||
| 25 | for example | ||
| 26 | |||
| 27 | 0x000906000 == 0.9.6 dev | ||
| 28 | 0x000906023 == 0.9.6b beta 3 | ||
| 29 | 0x00090605f == 0.9.6e release | ||
| 30 | |||
| 31 | Versions prior to 0.9.3 have identifiers E<lt> 0x0930. | ||
| 32 | Versions between 0.9.3 and 0.9.5 had a version identifier with this | ||
| 33 | interpretation: | ||
| 34 | |||
| 19 | MMNNFFRBB major minor fix final beta/patch | 35 | MMNNFFRBB major minor fix final beta/patch |
| 20 | 36 | ||
| 21 | for example | 37 | for example |
| @@ -23,13 +39,39 @@ for example | |||
| 23 | 0x000904100 == 0.9.4 release | 39 | 0x000904100 == 0.9.4 release |
| 24 | 0x000905000 == 0.9.5 dev | 40 | 0x000905000 == 0.9.5 dev |
| 25 | 41 | ||
| 26 | Versions prior to 0.9.3 have identifiers E<lt> 0x0930. | 42 | Version 0.9.5a had an interim interpretation that is like the current one, |
| 43 | except the patch level got the highest bit set, to keep continuity. The | ||
| 44 | number was therefore 0x0090581f. | ||
| 45 | |||
| 46 | |||
| 27 | For backward compatibility, SSLEAY_VERSION_NUMBER is also defined. | 47 | For backward compatibility, SSLEAY_VERSION_NUMBER is also defined. |
| 28 | 48 | ||
| 29 | SSLeay() returns this number. The return value can be compared to the | 49 | SSLeay() returns this number. The return value can be compared to the |
| 30 | macro to make sure that the correct version of the library has been | 50 | macro to make sure that the correct version of the library has been |
| 31 | loaded, especially when using DLLs on Windows systems. | 51 | loaded, especially when using DLLs on Windows systems. |
| 32 | 52 | ||
| 53 | SSLeay_version() returns different strings depending on B<t>: | ||
| 54 | |||
| 55 | =over 4 | ||
| 56 | |||
| 57 | =item SSLEAY_VERSION | ||
| 58 | The text variant of the version number and the release date. For example, | ||
| 59 | "OpenSSL 0.9.5a 1 Apr 2000". | ||
| 60 | |||
| 61 | =item SSLEAY_CFLAGS | ||
| 62 | The flags given to the C compiler when compiling OpenSSL are returned in a | ||
| 63 | string. | ||
| 64 | |||
| 65 | =item SSLEAY_PLATFORM | ||
| 66 | The platform name used when OpenSSL was configured is returned. | ||
| 67 | |||
| 68 | =back | ||
| 69 | |||
| 70 | If the data request isn't available, a text saying that the information is | ||
| 71 | not available is returned. | ||
| 72 | |||
| 73 | For an unknown B<t>, the text "not available" is returned. | ||
| 74 | |||
| 33 | =head1 RETURN VALUE | 75 | =head1 RETURN VALUE |
| 34 | 76 | ||
| 35 | The version number. | 77 | The version number. |
diff --git a/src/lib/libssl/src/doc/crypto/OpenSSL_add_all_algorithms.pod b/src/lib/libssl/src/doc/crypto/OpenSSL_add_all_algorithms.pod index 015d4eaf36..e63411b5bb 100644 --- a/src/lib/libssl/src/doc/crypto/OpenSSL_add_all_algorithms.pod +++ b/src/lib/libssl/src/doc/crypto/OpenSSL_add_all_algorithms.pod | |||
| @@ -2,7 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | OpenSSL_add_all_algorithms() - add algorithms to internal table | 5 | OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests - |
| 6 | add algorithms to internal table | ||
| 6 | 7 | ||
| 7 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 8 | 9 | ||
| @@ -43,7 +44,7 @@ by EVP_sha1(). It just needs to add them if it (or any of the functions it calls | |||
| 43 | needs to lookup algorithms. | 44 | needs to lookup algorithms. |
| 44 | 45 | ||
| 45 | The cipher and digest lookup functions are used in many parts of the library. If | 46 | The cipher and digest lookup functions are used in many parts of the library. If |
| 46 | the table is not initialised several functions will misbehave and complain they | 47 | the table is not initialized several functions will misbehave and complain they |
| 47 | cannot find algorithms. This includes the PEM, PKCS#12, SSL and S/MIME libraries. | 48 | cannot find algorithms. This includes the PEM, PKCS#12, SSL and S/MIME libraries. |
| 48 | This is a common query in the OpenSSL mailing lists. | 49 | This is a common query in the OpenSSL mailing lists. |
| 49 | 50 | ||
diff --git a/src/lib/libssl/src/doc/crypto/RAND_egd.pod b/src/lib/libssl/src/doc/crypto/RAND_egd.pod index a40bd96198..40241e2df8 100644 --- a/src/lib/libssl/src/doc/crypto/RAND_egd.pod +++ b/src/lib/libssl/src/doc/crypto/RAND_egd.pod | |||
| @@ -21,6 +21,10 @@ RAND_egd() is called with that path as an argument, it tries to read | |||
| 21 | random bytes that EGD has collected. The read is performed in | 21 | random bytes that EGD has collected. The read is performed in |
| 22 | non-blocking mode. | 22 | non-blocking mode. |
| 23 | 23 | ||
| 24 | Alternatively, the EGD-compatible daemon PRNGD can be used. It is | ||
| 25 | available from | ||
| 26 | http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html . | ||
| 27 | |||
| 24 | =head1 RETURN VALUE | 28 | =head1 RETURN VALUE |
| 25 | 29 | ||
| 26 | RAND_egd() returns the number of bytes read from the daemon on | 30 | RAND_egd() returns the number of bytes read from the daemon on |
diff --git a/src/lib/libssl/src/doc/crypto/RSA_get_ex_new_index.pod b/src/lib/libssl/src/doc/crypto/RSA_get_ex_new_index.pod index 920dc76325..46cc8f5359 100644 --- a/src/lib/libssl/src/doc/crypto/RSA_get_ex_new_index.pod +++ b/src/lib/libssl/src/doc/crypto/RSA_get_ex_new_index.pod | |||
| @@ -17,14 +17,12 @@ RSA_get_ex_new_index, RSA_set_ex_data, RSA_get_ex_data - add application specifi | |||
| 17 | 17 | ||
| 18 | void *RSA_get_ex_data(RSA *r, int idx); | 18 | void *RSA_get_ex_data(RSA *r, int idx); |
| 19 | 19 | ||
| 20 | int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | 20 | typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, |
| 21 | int idx, long argl, void *argp); | 21 | int idx, long argl, void *argp); |
| 22 | 22 | typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | |
| 23 | void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | 23 | int idx, long argl, void *argp); |
| 24 | int idx, long argl, void *argp); | 24 | typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, |
| 25 | 25 | int idx, long argl, void *argp); | |
| 26 | int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, | ||
| 27 | int idx, long argl, void *argp); | ||
| 28 | 26 | ||
| 29 | =head1 DESCRIPTION | 27 | =head1 DESCRIPTION |
| 30 | 28 | ||
diff --git a/src/lib/libssl/src/doc/crypto/RSA_print.pod b/src/lib/libssl/src/doc/crypto/RSA_print.pod index dd968a5274..67876facc5 100644 --- a/src/lib/libssl/src/doc/crypto/RSA_print.pod +++ b/src/lib/libssl/src/doc/crypto/RSA_print.pod | |||
| @@ -2,8 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | RSA_print, RSA_print_fp, DHparams_print, DHparams_print_fp - print | 5 | RSA_print, RSA_print_fp, DHparams_print, DHparams_print_fp, DSA_print, |
| 6 | cryptographic parameters | 6 | DSA_print_fp, DHparams_print, DHparams_print_fp - print cryptographic |
| 7 | parameters | ||
| 7 | 8 | ||
| 8 | =head1 SYNOPSIS | 9 | =head1 SYNOPSIS |
| 9 | 10 | ||
diff --git a/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod b/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod index 13b7df62be..23861c0004 100644 --- a/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod +++ b/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod | |||
| @@ -47,7 +47,7 @@ Encrypting user data directly with RSA is insecure. | |||
| 47 | =back | 47 | =back |
| 48 | 48 | ||
| 49 | B<flen> must be less than RSA_size(B<rsa>) - 11 for the PKCS #1 v1.5 | 49 | B<flen> must be less than RSA_size(B<rsa>) - 11 for the PKCS #1 v1.5 |
| 50 | based padding modes, and less than RSA_size(B<rsa>) - 21 for | 50 | based padding modes, and less than RSA_size(B<rsa>) - 41 for |
| 51 | RSA_PKCS1_OAEP_PADDING. The random number generator must be seeded | 51 | RSA_PKCS1_OAEP_PADDING. The random number generator must be seeded |
| 52 | prior to calling RSA_public_encrypt(). | 52 | prior to calling RSA_public_encrypt(). |
| 53 | 53 | ||
diff --git a/src/lib/libssl/src/doc/crypto/RSA_set_method.pod b/src/lib/libssl/src/doc/crypto/RSA_set_method.pod index 14b0b4cf35..b672712292 100644 --- a/src/lib/libssl/src/doc/crypto/RSA_set_method.pod +++ b/src/lib/libssl/src/doc/crypto/RSA_set_method.pod | |||
| @@ -4,17 +4,18 @@ | |||
| 4 | 4 | ||
| 5 | RSA_set_default_method, RSA_get_default_method, RSA_set_method, | 5 | RSA_set_default_method, RSA_get_default_method, RSA_set_method, |
| 6 | RSA_get_method, RSA_PKCS1_SSLeay, RSA_PKCS1_RSAref, | 6 | RSA_get_method, RSA_PKCS1_SSLeay, RSA_PKCS1_RSAref, |
| 7 | RSA_PKCS1_null_method, RSA_flags, RSA_new_method - select RSA method | 7 | RSA_null_method, RSA_flags, RSA_new_method - select RSA method |
| 8 | 8 | ||
| 9 | =head1 SYNOPSIS | 9 | =head1 SYNOPSIS |
| 10 | 10 | ||
| 11 | #include <openssl/rsa.h> | 11 | #include <openssl/rsa.h> |
| 12 | #include <openssl/engine.h> | ||
| 12 | 13 | ||
| 13 | void RSA_set_default_method(RSA_METHOD *meth); | 14 | void RSA_set_default_openssl_method(RSA_METHOD *meth); |
| 14 | 15 | ||
| 15 | RSA_METHOD *RSA_get_default_method(void); | 16 | RSA_METHOD *RSA_get_default_openssl_method(void); |
| 16 | 17 | ||
| 17 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth); | 18 | RSA_METHOD *RSA_set_method(RSA *rsa, ENGINE *engine); |
| 18 | 19 | ||
| 19 | RSA_METHOD *RSA_get_method(RSA *rsa); | 20 | RSA_METHOD *RSA_get_method(RSA *rsa); |
| 20 | 21 | ||
| @@ -26,7 +27,7 @@ RSA_PKCS1_null_method, RSA_flags, RSA_new_method - select RSA method | |||
| 26 | 27 | ||
| 27 | int RSA_flags(RSA *rsa); | 28 | int RSA_flags(RSA *rsa); |
| 28 | 29 | ||
| 29 | RSA *RSA_new_method(RSA_METHOD *method); | 30 | RSA *RSA_new_method(ENGINE *engine); |
| 30 | 31 | ||
| 31 | =head1 DESCRIPTION | 32 | =head1 DESCRIPTION |
| 32 | 33 | ||
| @@ -46,23 +47,27 @@ the RSA transformation. It is the default if OpenSSL is compiled with | |||
| 46 | C<-DRSA_NULL>. These methods may be useful in the USA because of a | 47 | C<-DRSA_NULL>. These methods may be useful in the USA because of a |
| 47 | patent on the RSA cryptosystem. | 48 | patent on the RSA cryptosystem. |
| 48 | 49 | ||
| 49 | RSA_set_default_method() makes B<meth> the default method for all B<RSA> | 50 | RSA_set_default_openssl_method() makes B<meth> the default method for all B<RSA> |
| 50 | structures created later. | 51 | structures created later. B<NB:> This is true only whilst the default engine |
| 52 | for RSA operations remains as "openssl". ENGINEs provide an | ||
| 53 | encapsulation for implementations of one or more algorithms at a time, and all | ||
| 54 | the RSA functions mentioned here operate within the scope of the default | ||
| 55 | "openssl" engine. | ||
| 51 | 56 | ||
| 52 | RSA_get_default_method() returns a pointer to the current default | 57 | RSA_get_default_openssl_method() returns a pointer to the current default |
| 53 | method. | 58 | method for the "openssl" engine. |
| 54 | 59 | ||
| 55 | RSA_set_method() selects B<meth> for all operations using the key | 60 | RSA_set_method() selects B<engine> for all operations using the key |
| 56 | B<rsa>. | 61 | B<rsa>. |
| 57 | 62 | ||
| 58 | RSA_get_method() returns a pointer to the method currently selected | 63 | RSA_get_method() returns a pointer to the RSA_METHOD from the currently |
| 59 | for B<rsa>. | 64 | selected ENGINE for B<rsa>. |
| 60 | 65 | ||
| 61 | RSA_flags() returns the B<flags> that are set for B<rsa>'s current method. | 66 | RSA_flags() returns the B<flags> that are set for B<rsa>'s current method. |
| 62 | 67 | ||
| 63 | RSA_new_method() allocates and initializes an B<RSA> structure so that | 68 | RSA_new_method() allocates and initializes an RSA structure so that |
| 64 | B<method> will be used for the RSA operations. If B<method> is B<NULL>, | 69 | B<engine> will be used for the RSA operations. If B<engine> is NULL, |
| 65 | the default method is used. | 70 | the default engine for RSA operations is used. |
| 66 | 71 | ||
| 67 | =head1 THE RSA_METHOD STRUCTURE | 72 | =head1 THE RSA_METHOD STRUCTURE |
| 68 | 73 | ||
| @@ -128,17 +133,21 @@ the default method is used. | |||
| 128 | =head1 RETURN VALUES | 133 | =head1 RETURN VALUES |
| 129 | 134 | ||
| 130 | RSA_PKCS1_SSLeay(), RSA_PKCS1_RSAref(), RSA_PKCS1_null_method(), | 135 | RSA_PKCS1_SSLeay(), RSA_PKCS1_RSAref(), RSA_PKCS1_null_method(), |
| 131 | RSA_get_default_method() and RSA_get_method() return pointers to the | 136 | RSA_get_default_openssl_method() and RSA_get_method() return pointers to |
| 132 | respective B<RSA_METHOD>s. | 137 | the respective RSA_METHODs. |
| 133 | 138 | ||
| 134 | RSA_set_default_method() returns no value. | 139 | RSA_set_default_openssl_method() returns no value. |
| 135 | 140 | ||
| 136 | RSA_set_method() returns a pointer to the B<RSA_METHOD> previously | 141 | RSA_set_method() selects B<engine> as the engine that will be responsible for |
| 137 | associated with B<rsa>. | 142 | all operations using the structure B<rsa>. If this function completes successfully, |
| 143 | then the B<rsa> structure will have its own functional reference of B<engine>, so | ||
| 144 | the caller should remember to free their own reference to B<engine> when they are | ||
| 145 | finished with it. NB: An ENGINE's RSA_METHOD can be retrieved (or set) by | ||
| 146 | ENGINE_get_RSA() or ENGINE_set_RSA(). | ||
| 138 | 147 | ||
| 139 | RSA_new_method() returns B<NULL> and sets an error code that can be | 148 | RSA_new_method() returns NULL and sets an error code that can be |
| 140 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it | 149 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise |
| 141 | returns a pointer to the newly allocated structure. | 150 | it returns a pointer to the newly allocated structure. |
| 142 | 151 | ||
| 143 | =head1 SEE ALSO | 152 | =head1 SEE ALSO |
| 144 | 153 | ||
| @@ -151,4 +160,9 @@ RSA_get_default_method(), RSA_set_method() and RSA_get_method() as | |||
| 151 | well as the rsa_sign and rsa_verify components of RSA_METHOD were | 160 | well as the rsa_sign and rsa_verify components of RSA_METHOD were |
| 152 | added in OpenSSL 0.9.4. | 161 | added in OpenSSL 0.9.4. |
| 153 | 162 | ||
| 163 | RSA_set_default_openssl_method() and RSA_get_default_openssl_method() | ||
| 164 | replaced RSA_set_default_method() and RSA_get_default_method() respectively, | ||
| 165 | and RSA_set_method() and RSA_new_method() were altered to use B<ENGINE>s | ||
| 166 | rather than B<DH_METHOD>s during development of OpenSSL 0.9.6. | ||
| 167 | |||
| 154 | =cut | 168 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/bio.pod b/src/lib/libssl/src/doc/crypto/bio.pod new file mode 100644 index 0000000000..24f61dfb56 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/bio.pod | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | bio - I/O abstraction | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/bio.h> | ||
| 10 | |||
| 11 | TBA | ||
| 12 | |||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | A BIO is an I/O abstraction, it hides many of the underlying I/O | ||
| 17 | details from an application. If an application uses a BIO for its | ||
| 18 | I/O it can transparently handle SSL connections, unencrypted network | ||
| 19 | connections and file I/O. | ||
| 20 | |||
| 21 | There are two type of BIO, a source/sink BIO and a filter BIO. | ||
| 22 | |||
| 23 | As its name implies a source/sink BIO is a source and/or sink of data, | ||
| 24 | examples include a socket BIO and a file BIO. | ||
| 25 | |||
| 26 | A filter BIO takes data from one BIO and passes it through to | ||
| 27 | another, or the application. The data may be left unmodified (for | ||
| 28 | example a message digest BIO) or translated (for example an | ||
| 29 | encryption BIO). The effect of a filter BIO may change according | ||
| 30 | to the I/O operation it is performing: for example an encryption | ||
| 31 | BIO will encrypt data if it is being written to and decrypt data | ||
| 32 | if it is being read from. | ||
| 33 | |||
| 34 | BIOs can be joined together to form a chain (a single BIO is a chain | ||
| 35 | with one component). A chain normally consist of one source/sink | ||
| 36 | BIO and one or more filter BIOs. Data read from or written to the | ||
| 37 | first BIO then traverses the chain to the end (normally a source/sink | ||
| 38 | BIO). | ||
| 39 | |||
| 40 | =head1 SEE ALSO | ||
| 41 | |||
| 42 | L<BIO_ctrl(3)|BIO_ctrl(3)>, | ||
| 43 | L<BIO_f_base64(3)|BIO_f_base64(3)>, | ||
| 44 | L<BIO_f_cipher(3)|BIO_f_cipher(3)>, L<BIO_f_md(3)|BIO_f_md(3)>, | ||
| 45 | L<BIO_f_null(3)|BIO_f_null(3)>, L<BIO_f_ssl(3)|BIO_f_ssl(3)>, | ||
| 46 | L<BIO_find_type(3)|BIO_find_type(3)>, L<BIO_new(3)|BIO_new(3)>, | ||
| 47 | L<BIO_new_bio_pair(3)|BIO_new_bio_pair(3)>, | ||
| 48 | L<BIO_push(3)|BIO_push(3)>, L<BIO_read(3)|BIO_read(3)>, | ||
| 49 | L<BIO_s_accept(3)|BIO_s_accept(3)>, L<BIO_s_bio(3)|BIO_s_bio(3)>, | ||
| 50 | L<BIO_s_connect(3)|BIO_s_connect(3)>, L<BIO_s_fd(3)|BIO_s_fd(3)>, | ||
| 51 | L<BIO_s_file(3)|BIO_s_file(3)>, L<BIO_s_mem(3)|BIO_s_mem(3)>, | ||
| 52 | L<BIO_s_null(3)|BIO_s_null(3)>, L<BIO_s_socket(3)|BIO_s_socket(3)>, | ||
| 53 | L<BIO_set_callback(3)|BIO_set_callback(3)>, | ||
| 54 | L<BIO_should_retry(3)|BIO_should_retry(3)> | ||
diff --git a/src/lib/libssl/src/doc/crypto/blowfish.pod b/src/lib/libssl/src/doc/crypto/blowfish.pod index e0b777418f..65b8be388c 100644 --- a/src/lib/libssl/src/doc/crypto/blowfish.pod +++ b/src/lib/libssl/src/doc/crypto/blowfish.pod | |||
| @@ -11,9 +11,6 @@ BF_cfb64_encrypt, BF_ofb64_encrypt, BF_options - Blowfish encryption | |||
| 11 | 11 | ||
| 12 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data); | 12 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data); |
| 13 | 13 | ||
| 14 | void BF_encrypt(BF_LONG *data,const BF_KEY *key); | ||
| 15 | void BF_decrypt(BF_LONG *data,const BF_KEY *key); | ||
| 16 | |||
| 17 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, | 14 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, |
| 18 | BF_KEY *key, int enc); | 15 | BF_KEY *key, int enc); |
| 19 | void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, | 16 | void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, |
| @@ -25,10 +22,13 @@ BF_cfb64_encrypt, BF_ofb64_encrypt, BF_options - Blowfish encryption | |||
| 25 | long length, BF_KEY *schedule, unsigned char *ivec, int *num); | 22 | long length, BF_KEY *schedule, unsigned char *ivec, int *num); |
| 26 | const char *BF_options(void); | 23 | const char *BF_options(void); |
| 27 | 24 | ||
| 25 | void BF_encrypt(BF_LONG *data,const BF_KEY *key); | ||
| 26 | void BF_decrypt(BF_LONG *data,const BF_KEY *key); | ||
| 27 | |||
| 28 | =head1 DESCRIPTION | 28 | =head1 DESCRIPTION |
| 29 | 29 | ||
| 30 | This library implements the Blowfish cipher, which is invented and described | 30 | This library implements the Blowfish cipher, which is invented and described |
| 31 | by Counterpane (see http://www.counterpane.com/blowfish/ ). | 31 | by Counterpane (see http://www.counterpane.com/blowfish.html ). |
| 32 | 32 | ||
| 33 | Blowfish is a block cipher that operates on 64 bit (8 byte) blocks of data. | 33 | Blowfish is a block cipher that operates on 64 bit (8 byte) blocks of data. |
| 34 | It uses a variable size key, but typically, 128 bit (16 byte) keys are | 34 | It uses a variable size key, but typically, 128 bit (16 byte) keys are |
| @@ -43,11 +43,6 @@ phase. | |||
| 43 | BF_set_key() sets up the B<BF_KEY> B<key> using the B<len> bytes long key | 43 | BF_set_key() sets up the B<BF_KEY> B<key> using the B<len> bytes long key |
| 44 | at B<data>. | 44 | at B<data>. |
| 45 | 45 | ||
| 46 | BF_encrypt() and BF_decrypt() are the lowest level functions for Blowfish | ||
| 47 | encryption. They encrypt/decrypt the first 64 bits of the vector pointed by | ||
| 48 | B<data>, using the key B<key>. These functions should not be used unless you | ||
| 49 | implement 'modes' of Blowfish. | ||
| 50 | |||
| 51 | BF_ecb_encrypt() is the basic Blowfish encryption and decryption function. | 46 | BF_ecb_encrypt() is the basic Blowfish encryption and decryption function. |
| 52 | It encrypts or decrypts the first 64 bits of B<in> using the key B<key>, | 47 | It encrypts or decrypts the first 64 bits of B<in> using the key B<key>, |
| 53 | putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>) | 48 | putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>) |
| @@ -56,37 +51,45 @@ B<in> and B<out> must be 64 bits in length, no less. If they are larger, | |||
| 56 | everything after the first 64 bits is ignored. | 51 | everything after the first 64 bits is ignored. |
| 57 | 52 | ||
| 58 | The mode functions BF_cbc_encrypt(), BF_cfb64_encrypt() and BF_ofb64_encrypt() | 53 | The mode functions BF_cbc_encrypt(), BF_cfb64_encrypt() and BF_ofb64_encrypt() |
| 59 | all operate on variable length data. They all take an initialisation vector | 54 | all operate on variable length data. They all take an initialization vector |
| 60 | B<ivec> which needs to be passed along into the next call of the same function | 55 | B<ivec> which needs to be passed along into the next call of the same function |
| 61 | for the same message. B<ivec> may be initialised with anything, but the | 56 | for the same message. B<ivec> may be initialized with anything, but the |
| 62 | recipient needs to know what it was initialised with, or it won't be able | 57 | recipient needs to know what it was initialized with, or it won't be able |
| 63 | to decrypt. Some programs and protocols simplify this, like SSH, where | 58 | to decrypt. Some programs and protocols simplify this, like SSH, where |
| 64 | B<ivec> is simply initialised to zero. | 59 | B<ivec> is simply initialized to zero. |
| 65 | BF_cbc_encrypt() operates of data that is a multiple of 8 bytes long, while | 60 | BF_cbc_encrypt() operates of data that is a multiple of 8 bytes long, while |
| 66 | BF_cfb64_encrypt() and BF_ofb64_encrypt() are used to encrypt an variable | 61 | BF_cfb64_encrypt() and BF_ofb64_encrypt() are used to encrypt an variable |
| 67 | number of bytes (the amount does not have to be an exact multiple of 8). The | 62 | number of bytes (the amount does not have to be an exact multiple of 8). The |
| 68 | purpose of the latter two is to simulate stream ciphers, and therefore, they | 63 | purpose of the latter two is to simulate stream ciphers, and therefore, they |
| 69 | need the parameter B<num>, which is a pointer to an integer where the current | 64 | need the parameter B<num>, which is a pointer to an integer where the current |
| 70 | offset in B<ivec> is stored between calls. This integer must be initialised | 65 | offset in B<ivec> is stored between calls. This integer must be initialized |
| 71 | to zero when B<ivec> is initialised. | 66 | to zero when B<ivec> is initialized. |
| 72 | 67 | ||
| 73 | BF_cbc_encrypt() is the Cipher Block Chaining function for Blowfish. It | 68 | BF_cbc_encrypt() is the Cipher Block Chaining function for Blowfish. It |
| 74 | encrypts or decrypts the 64 bits chunks of B<in> using the key B<schedule>, | 69 | encrypts or decrypts the 64 bits chunks of B<in> using the key B<schedule>, |
| 75 | putting the result in B<out>. B<enc> decides if encryption (BF_ENCRYPT) or | 70 | putting the result in B<out>. B<enc> decides if encryption (BF_ENCRYPT) or |
| 76 | decryption (BF_DECRYPT) shall be performed. B<ivec> must point at an 8 byte | 71 | decryption (BF_DECRYPT) shall be performed. B<ivec> must point at an 8 byte |
| 77 | long initialisation vector. | 72 | long initialization vector. |
| 78 | 73 | ||
| 79 | BF_cfb64_encrypt() is the CFB mode for Blowfish with 64 bit feedback. | 74 | BF_cfb64_encrypt() is the CFB mode for Blowfish with 64 bit feedback. |
| 80 | It encrypts or decrypts the bytes in B<in> using the key B<schedule>, | 75 | It encrypts or decrypts the bytes in B<in> using the key B<schedule>, |
| 81 | putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>) | 76 | putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>) |
| 82 | or decryption (B<BF_DECRYPT>) shall be performed. B<ivec> must point at an | 77 | or decryption (B<BF_DECRYPT>) shall be performed. B<ivec> must point at an |
| 83 | 8 byte long initialisation vector. B<num> must point at an integer which must | 78 | 8 byte long initialization vector. B<num> must point at an integer which must |
| 84 | be initially zero. | 79 | be initially zero. |
| 85 | 80 | ||
| 86 | BF_ofb64_encrypt() is the OFB mode for Blowfish with 64 bit feedback. | 81 | BF_ofb64_encrypt() is the OFB mode for Blowfish with 64 bit feedback. |
| 87 | It uses the same parameters as BF_cfb64_encrypt(), which must be initialised | 82 | It uses the same parameters as BF_cfb64_encrypt(), which must be initialized |
| 88 | the same way. | 83 | the same way. |
| 89 | 84 | ||
| 85 | BF_encrypt() and BF_decrypt() are the lowest level functions for Blowfish | ||
| 86 | encryption. They encrypt/decrypt the first 64 bits of the vector pointed by | ||
| 87 | B<data>, using the key B<key>. These functions should not be used unless you | ||
| 88 | implement 'modes' of Blowfish. The alternative is to use BF_ecb_encrypt(). | ||
| 89 | If you still want to use these functions, you should be aware that they take | ||
| 90 | each 32-bit chunk in host-byte order, which is little-endian on little-endian | ||
| 91 | platforms and big-endian on big-endian ones. | ||
| 92 | |||
| 90 | =head1 RETURN VALUES | 93 | =head1 RETURN VALUES |
| 91 | 94 | ||
| 92 | None of the functions presented here return any value. | 95 | None of the functions presented here return any value. |
diff --git a/src/lib/libssl/src/doc/crypto/bn_internal.pod b/src/lib/libssl/src/doc/crypto/bn_internal.pod index 5af0c791c8..8da244aed4 100644 --- a/src/lib/libssl/src/doc/crypto/bn_internal.pod +++ b/src/lib/libssl/src/doc/crypto/bn_internal.pod | |||
| @@ -149,7 +149,7 @@ word array B<a>, the B<nb> word array B<b> and the B<na>+B<nb> word | |||
| 149 | array B<r>. It computes B<a>*B<b> and places the result in B<r>. | 149 | array B<r>. It computes B<a>*B<b> and places the result in B<r>. |
| 150 | 150 | ||
| 151 | bn_mul_low_normal(B<r>, B<a>, B<b>, B<n>) operates on the B<n> word | 151 | bn_mul_low_normal(B<r>, B<a>, B<b>, B<n>) operates on the B<n> word |
| 152 | arrays B<r>, B<a> und B<b>. It computes the B<n> low words of | 152 | arrays B<r>, B<a> and B<b>. It computes the B<n> low words of |
| 153 | B<a>*B<b> and places the result in B<r>. | 153 | B<a>*B<b> and places the result in B<r>. |
| 154 | 154 | ||
| 155 | bn_mul_recursive(B<r>, B<a>, B<b>, B<n2>, B<t>) operates on the B<n2> | 155 | bn_mul_recursive(B<r>, B<a>, B<b>, B<n2>, B<t>) operates on the B<n2> |
diff --git a/src/lib/libssl/src/doc/crypto/buffer.pod b/src/lib/libssl/src/doc/crypto/buffer.pod index 7088f51bc4..781f5b11ee 100644 --- a/src/lib/libssl/src/doc/crypto/buffer.pod +++ b/src/lib/libssl/src/doc/crypto/buffer.pod | |||
| @@ -46,11 +46,11 @@ size. | |||
| 46 | 46 | ||
| 47 | BUF_strdup() copies a null terminated string into a block of allocated | 47 | BUF_strdup() copies a null terminated string into a block of allocated |
| 48 | memory and returns a pointer to the allocated block. | 48 | memory and returns a pointer to the allocated block. |
| 49 | Unlike the standard C library strdup() this function uses Malloc() and so | 49 | Unlike the standard C library strdup() this function uses OPENSSL_malloc() and so |
| 50 | should be used in preference to the standard library strdup() because it can | 50 | should be used in preference to the standard library strdup() because it can |
| 51 | be used for memory leak checking or replacing the malloc() function. | 51 | be used for memory leak checking or replacing the malloc() function. |
| 52 | 52 | ||
| 53 | The memory allocated from BUF_strdup() should be freed up using the Free() | 53 | The memory allocated from BUF_strdup() should be freed up using the OPENSSL_free() |
| 54 | function. | 54 | function. |
| 55 | 55 | ||
| 56 | =head1 RETURN VALUES | 56 | =head1 RETURN VALUES |
| @@ -68,6 +68,6 @@ L<bio(3)|bio(3)> | |||
| 68 | =head1 HISTORY | 68 | =head1 HISTORY |
| 69 | 69 | ||
| 70 | BUF_MEM_new(), BUF_MEM_free() and BUF_MEM_grow() are available in all | 70 | BUF_MEM_new(), BUF_MEM_free() and BUF_MEM_grow() are available in all |
| 71 | versions of SSLeay and OpenSSL. BUF_strdup() was addded in SSLeay 0.8. | 71 | versions of SSLeay and OpenSSL. BUF_strdup() was added in SSLeay 0.8. |
| 72 | 72 | ||
| 73 | =cut | 73 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/crypto.pod b/src/lib/libssl/src/doc/crypto/crypto.pod index c3d74b4587..07ba7e5bc9 100644 --- a/src/lib/libssl/src/doc/crypto/crypto.pod +++ b/src/lib/libssl/src/doc/crypto/crypto.pod | |||
| @@ -28,7 +28,7 @@ hash functions and a cryptographic pseudo-random number generator. | |||
| 28 | =item SYMMETRIC CIPHERS | 28 | =item SYMMETRIC CIPHERS |
| 29 | 29 | ||
| 30 | L<blowfish(3)|blowfish(3)>, L<cast(3)|cast(3)>, L<des(3)|des(3)>, | 30 | L<blowfish(3)|blowfish(3)>, L<cast(3)|cast(3)>, L<des(3)|des(3)>, |
| 31 | L<idea(3)|idea(3)>, L<rc2(3)|rc2(3)>, L<RC4(3)|RC4(3)>, L<rc5(3)|rc5(3)> | 31 | L<idea(3)|idea(3)>, L<rc2(3)|rc2(3)>, L<rc4(3)|rc4(3)>, L<rc5(3)|rc5(3)> |
| 32 | 32 | ||
| 33 | =item PUBLIC KEY CRYPTOGRAPHY AND KEY AGREEMENT | 33 | =item PUBLIC KEY CRYPTOGRAPHY AND KEY AGREEMENT |
| 34 | 34 | ||
| @@ -40,17 +40,17 @@ L<x509(3)|x509(3)>, L<x509v3(3)|x509v3(3)> | |||
| 40 | 40 | ||
| 41 | =item AUTHENTICATION CODES, HASH FUNCTIONS | 41 | =item AUTHENTICATION CODES, HASH FUNCTIONS |
| 42 | 42 | ||
| 43 | L<HMAC(3)|HMAC(3)>, L<MD2(3)|MD2(3)>, L<MD5(3)|MD5(3)>, L<MDC2(3)|MDC2(3)>, | 43 | L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, L<md4(3)|md4(3)>, |
| 44 | L<RIPEMD160(3)|RIPEMD160(3)>, L<SHA1(3)|SHA1(3)> | 44 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, |
| 45 | L<sha(3)|sha(3)> | ||
| 45 | 46 | ||
| 46 | =item AUXILIARY FUNCTIONS | 47 | =item AUXILIARY FUNCTIONS |
| 47 | 48 | ||
| 48 | L<err(3)|err(3)>, L<CRYPTO_set_locking_callback(3)|CRYPTO_set_locking_callback(3)>, L<rand(3)|rand(3)> | 49 | L<err(3)|err(3)>, L<threads(3)|threads(3)>, L<rand(3)|rand(3)> |
| 49 | 50 | ||
| 50 | =item INPUT/OUTPUT, DATA ENCODING | 51 | =item INPUT/OUTPUT, DATA ENCODING |
| 51 | 52 | ||
| 52 | L<asn1(3)|asn1(3)>, L<bio(3)|bio(3)>, L<evp(3)|evp(3)>, | 53 | L<asn1(3)|asn1(3)>, L<bio(3)|bio(3)>, L<evp(3)|evp(3)>, L<pem(3)|pem(3)>, |
| 53 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<pem(3)|pem(3)>, | ||
| 54 | L<pkcs7(3)|pkcs7(3)>, L<pkcs12(3)|pkcs12(3)> | 54 | L<pkcs7(3)|pkcs7(3)>, L<pkcs12(3)|pkcs12(3)> |
| 55 | 55 | ||
| 56 | =item INTERNAL FUNCTIONS | 56 | =item INTERNAL FUNCTIONS |
diff --git a/src/lib/libssl/src/doc/crypto/des.pod b/src/lib/libssl/src/doc/crypto/des.pod index 1ca6bfb78f..99080391b1 100644 --- a/src/lib/libssl/src/doc/crypto/des.pod +++ b/src/lib/libssl/src/doc/crypto/des.pod | |||
| @@ -130,7 +130,7 @@ earlier versions of the library, des_random_key() did not generate | |||
| 130 | secure keys. | 130 | secure keys. |
| 131 | 131 | ||
| 132 | Before a DES key can be used, it must be converted into the | 132 | Before a DES key can be used, it must be converted into the |
| 133 | architecture dependant I<des_key_schedule> via the | 133 | architecture dependent I<des_key_schedule> via the |
| 134 | des_set_key_checked() or des_set_key_unchecked() function. | 134 | des_set_key_checked() or des_set_key_unchecked() function. |
| 135 | 135 | ||
| 136 | des_set_key_checked() will check that the key passed is of odd parity | 136 | des_set_key_checked() will check that the key passed is of odd parity |
| @@ -200,7 +200,7 @@ reusing I<ks1> for the final encryption. C<C=E(ks1,D(ks2,E(ks1,M)))>. | |||
| 200 | This form of Triple-DES is used by the RSAREF library. | 200 | This form of Triple-DES is used by the RSAREF library. |
| 201 | 201 | ||
| 202 | des_pcbc_encrypt() encrypt/decrypts using the propagating cipher block | 202 | des_pcbc_encrypt() encrypt/decrypts using the propagating cipher block |
| 203 | chaing mode used by Kerberos v4. Its parameters are the same as | 203 | chaining mode used by Kerberos v4. Its parameters are the same as |
| 204 | des_ncbc_encrypt(). | 204 | des_ncbc_encrypt(). |
| 205 | 205 | ||
| 206 | des_cfb_encrypt() encrypt/decrypts using cipher feedback mode. This | 206 | des_cfb_encrypt() encrypt/decrypts using cipher feedback mode. This |
| @@ -241,7 +241,7 @@ compatibility with the MIT Kerberos library. des_read_pw_string() | |||
| 241 | is also available under the name EVP_read_pw_string(). | 241 | is also available under the name EVP_read_pw_string(). |
| 242 | 242 | ||
| 243 | des_read_pw_string() writes the string specified by I<prompt> to | 243 | des_read_pw_string() writes the string specified by I<prompt> to |
| 244 | standarf output, turns echo off and reads in input string from the | 244 | standard output, turns echo off and reads in input string from the |
| 245 | terminal. The string is returned in I<buf>, which must have space for | 245 | terminal. The string is returned in I<buf>, which must have space for |
| 246 | at least I<length> bytes. If I<verify> is set, the user is asked for | 246 | at least I<length> bytes. If I<verify> is set, the user is asked for |
| 247 | the password twice and unless the two copies match, an error is | 247 | the password twice and unless the two copies match, an error is |
| @@ -268,9 +268,9 @@ input, depending on I<out_count>, 1, 2, 3 or 4 times. If I<output> is | |||
| 268 | non-NULL, the 8 bytes generated by each pass are written into | 268 | non-NULL, the 8 bytes generated by each pass are written into |
| 269 | I<output>. | 269 | I<output>. |
| 270 | 270 | ||
| 271 | The following are DES-based tranformations: | 271 | The following are DES-based transformations: |
| 272 | 272 | ||
| 273 | des_fcrypt() is a fast version of the unix crypt(3) function. This | 273 | des_fcrypt() is a fast version of the Unix crypt(3) function. This |
| 274 | version takes only a small amount of space relative to other fast | 274 | version takes only a small amount of space relative to other fast |
| 275 | crypt() implementations. This is different to the normal crypt in | 275 | crypt() implementations. This is different to the normal crypt in |
| 276 | that the third parameter is the buffer that the return value is | 276 | that the third parameter is the buffer that the return value is |
diff --git a/src/lib/libssl/src/doc/crypto/des_modes.pod b/src/lib/libssl/src/doc/crypto/des_modes.pod index ee4f2238c7..8e5074d24c 100644 --- a/src/lib/libssl/src/doc/crypto/des_modes.pod +++ b/src/lib/libssl/src/doc/crypto/des_modes.pod | |||
| @@ -6,7 +6,7 @@ des_modes - the variants of DES and other crypto algorithms of OpenSSL | |||
| 6 | 6 | ||
| 7 | =head1 DESCRIPTION | 7 | =head1 DESCRIPTION |
| 8 | 8 | ||
| 9 | Several crypto algorithms fo OpenSSL can be used in a number of modes. Those | 9 | Several crypto algorithms for OpenSSL can be used in a number of modes. Those |
| 10 | are used for using block ciphers in a way similar to stream ciphers, among | 10 | are used for using block ciphers in a way similar to stream ciphers, among |
| 11 | other things. | 11 | other things. |
| 12 | 12 | ||
| @@ -165,13 +165,13 @@ only one bit to be in error in the deciphered plaintext. | |||
| 165 | 165 | ||
| 166 | =item * | 166 | =item * |
| 167 | 167 | ||
| 168 | OFB mode is not self-synchronising. If the two operation of | 168 | OFB mode is not self-synchronizing. If the two operation of |
| 169 | encipherment and decipherment get out of synchronism, the system needs | 169 | encipherment and decipherment get out of synchronism, the system needs |
| 170 | to be re-initialised. | 170 | to be re-initialized. |
| 171 | 171 | ||
| 172 | =item * | 172 | =item * |
| 173 | 173 | ||
| 174 | Each re-initialisation should use a value of the start variable | 174 | Each re-initialization should use a value of the start variable |
| 175 | different from the start variable values used before with the same | 175 | different from the start variable values used before with the same |
| 176 | key. The reason for this is that an identical bit stream would be | 176 | key. The reason for this is that an identical bit stream would be |
| 177 | produced each time from the same parameters. This would be | 177 | produced each time from the same parameters. This would be |
diff --git a/src/lib/libssl/src/doc/crypto/dh.pod b/src/lib/libssl/src/doc/crypto/dh.pod index 0a9b7c03a2..b4be4be405 100644 --- a/src/lib/libssl/src/doc/crypto/dh.pod +++ b/src/lib/libssl/src/doc/crypto/dh.pod | |||
| @@ -7,6 +7,7 @@ dh - Diffie-Hellman key agreement | |||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | #include <openssl/dh.h> | 9 | #include <openssl/dh.h> |
| 10 | #include <openssl/engine.h> | ||
| 10 | 11 | ||
| 11 | DH * DH_new(void); | 12 | DH * DH_new(void); |
| 12 | void DH_free(DH *dh); | 13 | void DH_free(DH *dh); |
| @@ -20,10 +21,10 @@ dh - Diffie-Hellman key agreement | |||
| 20 | int DH_generate_key(DH *dh); | 21 | int DH_generate_key(DH *dh); |
| 21 | int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); | 22 | int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); |
| 22 | 23 | ||
| 23 | void DH_set_default_method(DH_METHOD *meth); | 24 | void DH_set_default_openssl_method(DH_METHOD *meth); |
| 24 | DH_METHOD *DH_get_default_method(void); | 25 | DH_METHOD *DH_get_default_openssl_method(void); |
| 25 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); | 26 | int DH_set_method(DH *dh, ENGINE *engine); |
| 26 | DH *DH_new_method(DH_METHOD *meth); | 27 | DH *DH_new_method(ENGINE *engine); |
| 27 | DH_METHOD *DH_OpenSSL(void); | 28 | DH_METHOD *DH_OpenSSL(void); |
| 28 | 29 | ||
| 29 | int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(), | 30 | int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(), |
diff --git a/src/lib/libssl/src/doc/crypto/dsa.pod b/src/lib/libssl/src/doc/crypto/dsa.pod index 80ecf38178..573500204b 100644 --- a/src/lib/libssl/src/doc/crypto/dsa.pod +++ b/src/lib/libssl/src/doc/crypto/dsa.pod | |||
| @@ -7,6 +7,7 @@ dsa - Digital Signature Algorithm | |||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | #include <openssl/dsa.h> | 9 | #include <openssl/dsa.h> |
| 10 | #include <openssl/engine.h> | ||
| 10 | 11 | ||
| 11 | DSA * DSA_new(void); | 12 | DSA * DSA_new(void); |
| 12 | void DSA_free(DSA *dsa); | 13 | void DSA_free(DSA *dsa); |
| @@ -28,10 +29,10 @@ dsa - Digital Signature Algorithm | |||
| 28 | int DSA_verify(int dummy, const unsigned char *dgst, int len, | 29 | int DSA_verify(int dummy, const unsigned char *dgst, int len, |
| 29 | unsigned char *sigbuf, int siglen, DSA *dsa); | 30 | unsigned char *sigbuf, int siglen, DSA *dsa); |
| 30 | 31 | ||
| 31 | void DSA_set_default_method(DSA_METHOD *meth); | 32 | void DSA_set_default_openssl_method(DSA_METHOD *meth); |
| 32 | DSA_METHOD *DSA_get_default_method(void); | 33 | DSA_METHOD *DSA_get_default_openssl_method(void); |
| 33 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth); | 34 | int DSA_set_method(DSA *dsa, ENGINE *engine); |
| 34 | DSA *DSA_new_method(DSA_METHOD *meth); | 35 | DSA *DSA_new_method(ENGINE *engine); |
| 35 | DSA_METHOD *DSA_OpenSSL(void); | 36 | DSA_METHOD *DSA_OpenSSL(void); |
| 36 | 37 | ||
| 37 | int DSA_get_ex_new_index(long argl, char *argp, int (*new_func)(), | 38 | int DSA_get_ex_new_index(long argl, char *argp, int (*new_func)(), |
diff --git a/src/lib/libssl/src/doc/crypto/err.pod b/src/lib/libssl/src/doc/crypto/err.pod index b824c92b57..264e30103d 100644 --- a/src/lib/libssl/src/doc/crypto/err.pod +++ b/src/lib/libssl/src/doc/crypto/err.pod | |||
| @@ -143,7 +143,7 @@ The closing #endif etc will be automatically added by the script. | |||
| 143 | 143 | ||
| 144 | The generated C error code file B<xxx_err.c> will load the header | 144 | The generated C error code file B<xxx_err.c> will load the header |
| 145 | files B<stdio.h>, B<openssl/err.h> and B<openssl/xxx.h> so the | 145 | files B<stdio.h>, B<openssl/err.h> and B<openssl/xxx.h> so the |
| 146 | header file must load any additional header files containg any | 146 | header file must load any additional header files containing any |
| 147 | definitions it uses. | 147 | definitions it uses. |
| 148 | 148 | ||
| 149 | =head1 USING ERROR CODES IN EXTERNAL LIBRARIES | 149 | =head1 USING ERROR CODES IN EXTERNAL LIBRARIES |
diff --git a/src/lib/libssl/src/doc/crypto/evp.pod b/src/lib/libssl/src/doc/crypto/evp.pod new file mode 100644 index 0000000000..f089dd49a2 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/evp.pod | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | evp - high-level cryptographic functions | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/evp.h> | ||
| 10 | |||
| 11 | =head1 DESCRIPTION | ||
| 12 | |||
| 13 | The EVP library provided a high-level interface to cryptographic | ||
| 14 | functions. | ||
| 15 | |||
| 16 | B<EVP_Seal>I<...> and B<EVP_Open>I<...> provide public key encryption | ||
| 17 | and decryption to implement digital "envelopes". | ||
| 18 | |||
| 19 | The B<EVP_Sign>I<...> and B<EVP_Verify>I<...> functions implement | ||
| 20 | digital signatures. | ||
| 21 | |||
| 22 | Symmetric encryption is available with the B<EVP_Encrypt>I<...> | ||
| 23 | functions. The B<EVP_Digest>I<...> functions provide message digests. | ||
| 24 | |||
| 25 | Algorithms are loaded with OpenSSL_add_all_algorithms(3). | ||
| 26 | |||
| 27 | =head1 SEE ALSO | ||
| 28 | |||
| 29 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, | ||
| 30 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, | ||
| 31 | L<EVP_OpenInit(3)|EVP_OpenInit(3)>, | ||
| 32 | L<EVP_SealInit(3)|EVP_SealInit(3)>, | ||
| 33 | L<EVP_SignInit(3)|EVP_SignInit(3)>, | ||
| 34 | L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, | ||
| 35 | L<OpenSSL_add_all_algorithms(3)|OpenSSL_add_all_algorithms(3)> | ||
| 36 | |||
| 37 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/hmac.pod b/src/lib/libssl/src/doc/crypto/hmac.pod index 095e537da1..631f40377e 100644 --- a/src/lib/libssl/src/doc/crypto/hmac.pod +++ b/src/lib/libssl/src/doc/crypto/hmac.pod | |||
| @@ -2,7 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | HMAC, HMAC_Init, HMAC_Update, HMAC_Final - HMAC message authentication code | 5 | HMAC, HMAC_Init, HMAC_Update, HMAC_Final, HMAC_cleanup - HMAC message |
| 6 | authentication code | ||
| 6 | 7 | ||
| 7 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 8 | 9 | ||
diff --git a/src/lib/libssl/src/doc/crypto/lhash.pod b/src/lib/libssl/src/doc/crypto/lhash.pod index af2c9a7102..4e87aee824 100644 --- a/src/lib/libssl/src/doc/crypto/lhash.pod +++ b/src/lib/libssl/src/doc/crypto/lhash.pod | |||
| @@ -102,7 +102,7 @@ The following description is based on the SSLeay documentation: | |||
| 102 | The B<lhash> library implements a hash table described in the | 102 | The B<lhash> library implements a hash table described in the |
| 103 | I<Communications of the ACM> in 1991. What makes this hash table | 103 | I<Communications of the ACM> in 1991. What makes this hash table |
| 104 | different is that as the table fills, the hash table is increased (or | 104 | different is that as the table fills, the hash table is increased (or |
| 105 | decreased) in size via Realloc(). When a 'resize' is done, instead of | 105 | decreased) in size via OPENSSL_realloc(). When a 'resize' is done, instead of |
| 106 | all hashes being redistributed over twice as many 'buckets', one | 106 | all hashes being redistributed over twice as many 'buckets', one |
| 107 | bucket is split. So when an 'expand' is done, there is only a minimal | 107 | bucket is split. So when an 'expand' is done, there is only a minimal |
| 108 | cost to redistribute some values. Subsequent inserts will cause more | 108 | cost to redistribute some values. Subsequent inserts will cause more |
diff --git a/src/lib/libssl/src/doc/crypto/md5.pod b/src/lib/libssl/src/doc/crypto/md5.pod index e9d7ccd689..6e6322dcdc 100644 --- a/src/lib/libssl/src/doc/crypto/md5.pod +++ b/src/lib/libssl/src/doc/crypto/md5.pod | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | MD2, MD5, MD2_Init, MD2_Update, MD2_Final, MD5_Init, MD5_Update, | 5 | MD2, MD4, MD5, MD2_Init, MD2_Update, MD2_Final, MD4_Init, MD4_Update, |
| 6 | MD5_Final - MD2 and MD5 hash functions | 6 | MD4_Final, MD5_Init, MD5_Update, MD5_Final - MD2, MD4, and MD5 hash functions |
| 7 | 7 | ||
| 8 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 9 | 9 | ||
| @@ -18,6 +18,17 @@ MD5_Final - MD2 and MD5 hash functions | |||
| 18 | void MD2_Final(unsigned char *md, MD2_CTX *c); | 18 | void MD2_Final(unsigned char *md, MD2_CTX *c); |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <openssl/md4.h> | ||
| 22 | |||
| 23 | unsigned char *MD4(const unsigned char *d, unsigned long n, | ||
| 24 | unsigned char *md); | ||
| 25 | |||
| 26 | void MD4_Init(MD4_CTX *c); | ||
| 27 | void MD4_Update(MD4_CTX *c, const void *data, | ||
| 28 | unsigned long len); | ||
| 29 | void MD4_Final(unsigned char *md, MD4_CTX *c); | ||
| 30 | |||
| 31 | |||
| 21 | #include <openssl/md5.h> | 32 | #include <openssl/md5.h> |
| 22 | 33 | ||
| 23 | unsigned char *MD5(const unsigned char *d, unsigned long n, | 34 | unsigned char *MD5(const unsigned char *d, unsigned long n, |
| @@ -30,12 +41,13 @@ MD5_Final - MD2 and MD5 hash functions | |||
| 30 | 41 | ||
| 31 | =head1 DESCRIPTION | 42 | =head1 DESCRIPTION |
| 32 | 43 | ||
| 33 | MD2 and MD5 are cryptographic hash functions with a 128 bit output. | 44 | MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit output. |
| 34 | 45 | ||
| 35 | MD2() and MD5() compute the MD2 and MD5 message digest of the B<n> | 46 | MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest |
| 36 | bytes at B<d> and place it in B<md> (which must have space for | 47 | of the B<n> bytes at B<d> and place it in B<md> (which must have space |
| 37 | MD2_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16 bytes of output). If | 48 | for MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16 |
| 38 | B<md> is NULL, the digest is placed in a static array. | 49 | bytes of output). If B<md> is NULL, the digest is placed in a static |
| 50 | array. | ||
| 39 | 51 | ||
| 40 | The following functions may be used if the message is not completely | 52 | The following functions may be used if the message is not completely |
| 41 | stored in memory: | 53 | stored in memory: |
| @@ -48,8 +60,8 @@ be hashed (B<len> bytes at B<data>). | |||
| 48 | MD2_Final() places the message digest in B<md>, which must have space | 60 | MD2_Final() places the message digest in B<md>, which must have space |
| 49 | for MD2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MD2_CTX>. | 61 | for MD2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MD2_CTX>. |
| 50 | 62 | ||
| 51 | MD5_Init(), MD5_Update() and MD5_Final() are analogous using an | 63 | MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and |
| 52 | B<MD5_CTX> structure. | 64 | MD5_Final() are analogous using an B<MD4_CTX> and B<MD5_CTX> structure. |
| 53 | 65 | ||
| 54 | Applications should use the higher level functions | 66 | Applications should use the higher level functions |
| 55 | L<EVP_DigestInit(3)|EVP_DigestInit(3)> | 67 | L<EVP_DigestInit(3)|EVP_DigestInit(3)> |
| @@ -57,24 +69,25 @@ etc. instead of calling the hash functions directly. | |||
| 57 | 69 | ||
| 58 | =head1 NOTE | 70 | =head1 NOTE |
| 59 | 71 | ||
| 60 | MD2 and MD5 are recommended only for compatibility with existing | 72 | MD2, MD4, and MD5 are recommended only for compatibility with existing |
| 61 | applications. In new applications, SHA-1 or RIPEMD-160 should be | 73 | applications. In new applications, SHA-1 or RIPEMD-160 should be |
| 62 | preferred. | 74 | preferred. |
| 63 | 75 | ||
| 64 | =head1 RETURN VALUES | 76 | =head1 RETURN VALUES |
| 65 | 77 | ||
| 66 | MD2() and MD5() return pointers to the hash value. | 78 | MD2(), MD4(), and MD5() return pointers to the hash value. |
| 67 | 79 | ||
| 68 | MD2_Init(), MD2_Update() MD2_Final(), MD5_Init(), MD5_Update() and | 80 | MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(), |
| 69 | MD5_Final() do not return values. | 81 | MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() do not return |
| 82 | values. | ||
| 70 | 83 | ||
| 71 | =head1 CONFORMING TO | 84 | =head1 CONFORMING TO |
| 72 | 85 | ||
| 73 | RFC 1319, RFC 1321 | 86 | RFC 1319, RFC 1320, RFC 1321 |
| 74 | 87 | ||
| 75 | =head1 SEE ALSO | 88 | =head1 SEE ALSO |
| 76 | 89 | ||
| 77 | L<SHA1(3)|SHA1(3)>, L<RIPEMD160(3)|RIPEMD160(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)> | 90 | L<sha(3)|sha(3)>, L<ripemd(3)|ripemd(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)> |
| 78 | 91 | ||
| 79 | =head1 HISTORY | 92 | =head1 HISTORY |
| 80 | 93 | ||
| @@ -82,4 +95,7 @@ MD2(), MD2_Init(), MD2_Update() MD2_Final(), MD5(), MD5_Init(), | |||
| 82 | MD5_Update() and MD5_Final() are available in all versions of SSLeay | 95 | MD5_Update() and MD5_Final() are available in all versions of SSLeay |
| 83 | and OpenSSL. | 96 | and OpenSSL. |
| 84 | 97 | ||
| 98 | MD4(), MD4_Init(), and MD4_Update() are available in OpenSSL 0.9.6 and | ||
| 99 | above. | ||
| 100 | |||
| 85 | =cut | 101 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/rsa.pod b/src/lib/libssl/src/doc/crypto/rsa.pod index eb8ba612c4..ef0d4df205 100644 --- a/src/lib/libssl/src/doc/crypto/rsa.pod +++ b/src/lib/libssl/src/doc/crypto/rsa.pod | |||
| @@ -7,6 +7,7 @@ rsa - RSA public key cryptosystem | |||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | #include <openssl/rsa.h> | 9 | #include <openssl/rsa.h> |
| 10 | #include <openssl/engine.h> | ||
| 10 | 11 | ||
| 11 | RSA * RSA_new(void); | 12 | RSA * RSA_new(void); |
| 12 | void RSA_free(RSA *rsa); | 13 | void RSA_free(RSA *rsa); |
| @@ -31,15 +32,15 @@ rsa - RSA public key cryptosystem | |||
| 31 | int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); | 32 | int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); |
| 32 | void RSA_blinding_off(RSA *rsa); | 33 | void RSA_blinding_off(RSA *rsa); |
| 33 | 34 | ||
| 34 | void RSA_set_default_method(RSA_METHOD *meth); | 35 | void RSA_set_default_openssl_method(RSA_METHOD *meth); |
| 35 | RSA_METHOD *RSA_get_default_method(void); | 36 | RSA_METHOD *RSA_get_default_openssl_method(void); |
| 36 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth); | 37 | int RSA_set_method(RSA *rsa, ENGINE *engine); |
| 37 | RSA_METHOD *RSA_get_method(RSA *rsa); | 38 | RSA_METHOD *RSA_get_method(RSA *rsa); |
| 38 | RSA_METHOD *RSA_PKCS1_SSLeay(void); | 39 | RSA_METHOD *RSA_PKCS1_SSLeay(void); |
| 39 | RSA_METHOD *RSA_PKCS1_RSAref(void); | 40 | RSA_METHOD *RSA_PKCS1_RSAref(void); |
| 40 | RSA_METHOD *RSA_null_method(void); | 41 | RSA_METHOD *RSA_null_method(void); |
| 41 | int RSA_flags(RSA *rsa); | 42 | int RSA_flags(RSA *rsa); |
| 42 | RSA *RSA_new_method(RSA_METHOD *method); | 43 | RSA *RSA_new_method(ENGINE *engine); |
| 43 | 44 | ||
| 44 | int RSA_print(BIO *bp, RSA *x, int offset); | 45 | int RSA_print(BIO *bp, RSA *x, int offset); |
| 45 | int RSA_print_fp(FILE *fp, RSA *x, int offset); | 46 | int RSA_print_fp(FILE *fp, RSA *x, int offset); |
| @@ -96,7 +97,7 @@ SSL, PKCS #1 v2.0 | |||
| 96 | 97 | ||
| 97 | =head1 PATENTS | 98 | =head1 PATENTS |
| 98 | 99 | ||
| 99 | RSA is covered by a US patent which expires in September 2000. | 100 | RSA was covered by a US patent which expired in September 2000. |
| 100 | 101 | ||
| 101 | =head1 SEE ALSO | 102 | =head1 SEE ALSO |
| 102 | 103 | ||
diff --git a/src/lib/libssl/src/doc/crypto/threads.pod b/src/lib/libssl/src/doc/crypto/threads.pod index 5da056f3f8..bc7ff9b705 100644 --- a/src/lib/libssl/src/doc/crypto/threads.pod +++ b/src/lib/libssl/src/doc/crypto/threads.pod | |||
| @@ -2,7 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | CRYPTO_set_locking_callback, CRYPTO_set_id_callback - OpenSSL thread support | 5 | CRYPTO_set_locking_callback, CRYPTO_set_id_callback, CRYPTO_num_locks, |
| 6 | CRYPTO_set_dynlock_create_callback, CRYPTO_set_dynlock_lock_callback, | ||
| 7 | CRYPTO_set_dynlock_destroy_callback, CRYPTO_get_new_dynlockid, | ||
| 8 | CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support | ||
| 6 | 9 | ||
| 7 | =head1 SYNOPSIS | 10 | =head1 SYNOPSIS |
| 8 | 11 | ||
| @@ -15,13 +18,42 @@ CRYPTO_set_locking_callback, CRYPTO_set_id_callback - OpenSSL thread support | |||
| 15 | 18 | ||
| 16 | int CRYPTO_num_locks(void); | 19 | int CRYPTO_num_locks(void); |
| 17 | 20 | ||
| 21 | |||
| 22 | /* struct CRYPTO_dynlock_value needs to be defined by the user */ | ||
| 23 | struct CRYPTO_dynlock_value; | ||
| 24 | |||
| 25 | void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value * | ||
| 26 | (*dyn_create_function)(char *file, int line)); | ||
| 27 | void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function) | ||
| 28 | (int mode, struct CRYPTO_dynlock_value *l, | ||
| 29 | const char *file, int line)); | ||
| 30 | void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function) | ||
| 31 | (struct CRYPTO_dynlock_value *l, const char *file, int line)); | ||
| 32 | |||
| 33 | int CRYPTO_get_new_dynlockid(void); | ||
| 34 | |||
| 35 | void CRYPTO_destroy_dynlockid(int i); | ||
| 36 | |||
| 37 | void CRYPTO_lock(int mode, int n, const char *file, int line); | ||
| 38 | |||
| 39 | #define CRYPTO_w_lock(type) \ | ||
| 40 | CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) | ||
| 41 | #define CRYPTO_w_unlock(type) \ | ||
| 42 | CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) | ||
| 43 | #define CRYPTO_r_lock(type) \ | ||
| 44 | CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__) | ||
| 45 | #define CRYPTO_r_unlock(type) \ | ||
| 46 | CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__) | ||
| 47 | #define CRYPTO_add(addr,amount,type) \ | ||
| 48 | CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__) | ||
| 49 | |||
| 18 | =head1 DESCRIPTION | 50 | =head1 DESCRIPTION |
| 19 | 51 | ||
| 20 | OpenSSL can safely be used in multi-threaded applications provided | 52 | OpenSSL can safely be used in multi-threaded applications provided |
| 21 | that two callback functions are set. | 53 | that at least two callback functions are set. |
| 22 | 54 | ||
| 23 | locking_function(int mode, int n, const char *file, int line) is | 55 | locking_function(int mode, int n, const char *file, int line) is |
| 24 | needed to perform locking on shared data stuctures. Multi-threaded | 56 | needed to perform locking on shared data structures. Multi-threaded |
| 25 | applications will crash at random if it is not set. | 57 | applications will crash at random if it is not set. |
| 26 | 58 | ||
| 27 | locking_function() must be able to handle up to CRYPTO_num_locks() | 59 | locking_function() must be able to handle up to CRYPTO_num_locks() |
| @@ -35,9 +67,59 @@ id_function(void) is a function that returns a thread ID. It is not | |||
| 35 | needed on Windows nor on platforms where getpid() returns a different | 67 | needed on Windows nor on platforms where getpid() returns a different |
| 36 | ID for each thread (most notably Linux). | 68 | ID for each thread (most notably Linux). |
| 37 | 69 | ||
| 70 | Additionally, OpenSSL supports dynamic locks, and sometimes, some parts | ||
| 71 | of OpenSSL need it for better performance. To enable this, the following | ||
| 72 | is required: | ||
| 73 | |||
| 74 | =over 4 | ||
| 75 | |||
| 76 | =item * | ||
| 77 | Three additional callback function, dyn_create_function, dyn_lock_function | ||
| 78 | and dyn_destroy_function. | ||
| 79 | |||
| 80 | =item * | ||
| 81 | A structure defined with the data that each lock needs to handle. | ||
| 82 | |||
| 83 | =back | ||
| 84 | |||
| 85 | struct CRYPTO_dynlock_value has to be defined to contain whatever structure | ||
| 86 | is needed to handle locks. | ||
| 87 | |||
| 88 | dyn_create_function(const char *file, int line) is needed to create a | ||
| 89 | lock. Multi-threaded applications might crash at random if it is not set. | ||
| 90 | |||
| 91 | dyn_lock_function(int mode, CRYPTO_dynlock *l, const char *file, int line) | ||
| 92 | is needed to perform locking off dynamic lock numbered n. Multi-threaded | ||
| 93 | applications might crash at random if it is not set. | ||
| 94 | |||
| 95 | dyn_destroy_function(CRYPTO_dynlock *l, const char *file, int line) is | ||
| 96 | needed to destroy the lock l. Multi-threaded applications might crash at | ||
| 97 | random if it is not set. | ||
| 98 | |||
| 99 | CRYPTO_get_new_dynlockid() is used to create locks. It will call | ||
| 100 | dyn_create_function for the actual creation. | ||
| 101 | |||
| 102 | CRYPTO_destroy_dynlockid() is used to destroy locks. It will call | ||
| 103 | dyn_destroy_function for the actual destruction. | ||
| 104 | |||
| 105 | CRYPTO_lock() is used to lock and unlock the locks. mode is a bitfield | ||
| 106 | describing what should be done with the lock. n is the number of the | ||
| 107 | lock as returned from CRYPTO_get_new_dynlockid(). mode can be combined | ||
| 108 | from the following values. These values are pairwise exclusive, with | ||
| 109 | undefined behaviour if misused (for example, CRYPTO_READ and CRYPTO_WRITE | ||
| 110 | should not be used together): | ||
| 111 | |||
| 112 | CRYPTO_LOCK 0x01 | ||
| 113 | CRYPTO_UNLOCK 0x02 | ||
| 114 | CRYPTO_READ 0x04 | ||
| 115 | CRYPTO_WRITE 0x08 | ||
| 116 | |||
| 38 | =head1 RETURN VALUES | 117 | =head1 RETURN VALUES |
| 39 | 118 | ||
| 40 | CRYPTO_num_locks() returns the required number of locks. | 119 | CRYPTO_num_locks() returns the required number of locks. |
| 120 | |||
| 121 | CRYPTO_get_new_dynlockid() returns the index to the newly created lock. | ||
| 122 | |||
| 41 | The other functions return no values. | 123 | The other functions return no values. |
| 42 | 124 | ||
| 43 | =head1 NOTE | 125 | =head1 NOTE |
| @@ -52,6 +134,9 @@ You can find out if OpenSSL was configured with thread support: | |||
| 52 | // no thread support | 134 | // no thread support |
| 53 | #endif | 135 | #endif |
| 54 | 136 | ||
| 137 | Also, dynamic locks are currently not used internally by OpenSSL, but | ||
| 138 | may do so in the future. | ||
| 139 | |||
| 55 | =head1 EXAMPLES | 140 | =head1 EXAMPLES |
| 56 | 141 | ||
| 57 | B<crypto/threads/mttest.c> shows examples of the callback functions on | 142 | B<crypto/threads/mttest.c> shows examples of the callback functions on |
| @@ -62,6 +147,7 @@ Solaris, Irix and Win32. | |||
| 62 | CRYPTO_set_locking_callback() and CRYPTO_set_id_callback() are | 147 | CRYPTO_set_locking_callback() and CRYPTO_set_id_callback() are |
| 63 | available in all versions of SSLeay and OpenSSL. | 148 | available in all versions of SSLeay and OpenSSL. |
| 64 | CRYPTO_num_locks() was added in OpenSSL 0.9.4. | 149 | CRYPTO_num_locks() was added in OpenSSL 0.9.4. |
| 150 | All functions dealing with dynamic locks were added in OpenSSL 0.9.5b-dev. | ||
| 65 | 151 | ||
| 66 | =head1 SEE ALSO | 152 | =head1 SEE ALSO |
| 67 | 153 | ||
diff --git a/src/lib/libssl/src/doc/openssl.txt b/src/lib/libssl/src/doc/openssl.txt index 880eace4da..5da519e7e4 100644 --- a/src/lib/libssl/src/doc/openssl.txt +++ b/src/lib/libssl/src/doc/openssl.txt | |||
| @@ -355,6 +355,24 @@ that would not make sense. It does support an additional issuer:copy option | |||
| 355 | that will copy all the subject alternative name values from the issuer | 355 | that will copy all the subject alternative name values from the issuer |
| 356 | certificate (if possible). | 356 | certificate (if possible). |
| 357 | 357 | ||
| 358 | Example: | ||
| 359 | |||
| 360 | issuserAltName = issuer:copy | ||
| 361 | |||
| 362 | Authority Info Access. | ||
| 363 | |||
| 364 | The authority information access extension gives details about how to access | ||
| 365 | certain information relating to the CA. Its syntax is accessOID;location | ||
| 366 | where 'location' has the same syntax as subject alternative name (except | ||
| 367 | that email:copy is not supported). accessOID can be any valid OID but only | ||
| 368 | certain values are meaningful for example OCSP and caIssuers. OCSP gives the | ||
| 369 | location of an OCSP responder: this is used by Netscape PSM and other software. | ||
| 370 | |||
| 371 | Example: | ||
| 372 | |||
| 373 | authorityInfoAccess = OCSP;URI:http://ocsp.my.host/ | ||
| 374 | authorityInfoAccess = caIssuers;URI:http://my.ca/ca.html | ||
| 375 | |||
| 358 | CRL distribution points. | 376 | CRL distribution points. |
| 359 | 377 | ||
| 360 | This is a multi-valued extension that supports all the literal options of | 378 | This is a multi-valued extension that supports all the literal options of |
| @@ -489,6 +507,47 @@ details about the structures returned. The returned structure should be freed | |||
| 489 | after use using the relevant free function, BASIC_CONSTRAINTS_free() for | 507 | after use using the relevant free function, BASIC_CONSTRAINTS_free() for |
| 490 | example. | 508 | example. |
| 491 | 509 | ||
| 510 | void * X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx); | ||
| 511 | void * X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx); | ||
| 512 | void * X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx); | ||
| 513 | void * X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx); | ||
| 514 | |||
| 515 | These functions combine the operations of searching for extensions and | ||
| 516 | parsing them. They search a certificate, a CRL a CRL entry or a stack | ||
| 517 | of extensions respectively for extension whose NID is 'nid' and return | ||
| 518 | the parsed result of NULL if an error occurred. For example: | ||
| 519 | |||
| 520 | BASIC_CONSTRAINTS *bs; | ||
| 521 | bs = X509_get_ext_d2i(cert, NID_basic_constraints, NULL, NULL); | ||
| 522 | |||
| 523 | This will search for the basicConstraints extension and either return | ||
| 524 | it value or NULL. NULL can mean either the extension was not found, it | ||
| 525 | occurred more than once or it could not be parsed. | ||
| 526 | |||
| 527 | If 'idx' is NULL then an extension is only parsed if it occurs precisely | ||
| 528 | once. This is standard behaviour because extensions normally cannot occur | ||
| 529 | more than once. If however more than one extension of the same type can | ||
| 530 | occur it can be used to parse successive extensions for example: | ||
| 531 | |||
| 532 | int i; | ||
| 533 | void *ext; | ||
| 534 | |||
| 535 | i = -1; | ||
| 536 | for(;;) { | ||
| 537 | ext = X509_get_ext_d2i(x, nid, crit, &idx); | ||
| 538 | if(ext == NULL) break; | ||
| 539 | /* Do something with ext */ | ||
| 540 | } | ||
| 541 | |||
| 542 | If 'crit' is not NULL and the extension was found then the int it points to | ||
| 543 | is set to 1 for critical extensions and 0 for non critical. Therefore if the | ||
| 544 | function returns NULL but 'crit' is set to 0 or 1 then the extension was | ||
| 545 | found but it could not be parsed. | ||
| 546 | |||
| 547 | The int pointed to by crit will be set to -1 if the extension was not found | ||
| 548 | and -2 if the extension occurred more than once (this will only happen if | ||
| 549 | idx is NULL). In both cases the function will return NULL. | ||
| 550 | |||
| 492 | 3. Generating extensions. | 551 | 3. Generating extensions. |
| 493 | 552 | ||
| 494 | An extension will typically be generated from a configuration file, or some | 553 | An extension will typically be generated from a configuration file, or some |
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod b/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod new file mode 100644 index 0000000000..7fea14ee68 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_CIPHER_get_name, SSL_CIPHER_get_bits, SSL_CIPHER_get_version, | ||
| 6 | SSL_CIPHER_description - get SSL_CIPHER properties | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/ssl.h> | ||
| 11 | |||
| 12 | const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher); | ||
| 13 | int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *alg_bits); | ||
| 14 | char *SSL_CIPHER_get_version(SSL_CIPHER *cipher); | ||
| 15 | char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int size); | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | SSL_CIPHER_get_name() returns a pointer to the name of B<cipher>. If the | ||
| 20 | argument is the NULL pointer, a pointer to the constant value "NONE" is | ||
| 21 | returned. | ||
| 22 | |||
| 23 | SSL_CIPHER_get_bits() returns the number of secret bits used for B<cipher>. If | ||
| 24 | B<alg_bits> is not NULL, it contains the number of bits processed by the | ||
| 25 | chosen algorithm. If B<cipher> is NULL, 0 is returned. | ||
| 26 | |||
| 27 | SSL_CIPHER_get_version() returns the protocol version for B<cipher>, currently | ||
| 28 | "SSLv2", "SSLv3", or "TLSv1". If B<cipher> is NULL, "(NONE)" is returned. | ||
| 29 | |||
| 30 | SSL_CIPHER_description() returns a textual description of the cipher used | ||
| 31 | into the buffer B<buf> of length B<len> provided. B<len> must be at least | ||
| 32 | 128 bytes, otherwise the string "Buffer too small" is returned. If B<buf> | ||
| 33 | is NULL, a buffer of 128 bytes is allocated using OPENSSL_malloc(). If the | ||
| 34 | allocation fails, the string "OPENSSL_malloc Error" is returned. | ||
| 35 | |||
| 36 | =head1 NOTES | ||
| 37 | |||
| 38 | The number of bits processed can be different from the secret bits. An | ||
| 39 | export cipher like e.g. EXP-RC4-MD5 has only 40 secret bits. The algorithm | ||
| 40 | does use the full 128 bits (which would be returned for B<alg_bits>), of | ||
| 41 | which however 88bits are fixed. The search space is hence only 40 bits. | ||
| 42 | |||
| 43 | =head1 BUGS | ||
| 44 | |||
| 45 | If SSL_CIPHER_description() is called with B<cipher> being NULL, the | ||
| 46 | library crashes. | ||
| 47 | |||
| 48 | =head1 RETURN VALUES | ||
| 49 | |||
| 50 | See DESCRIPTION | ||
| 51 | |||
| 52 | =head1 SEE ALSO | ||
| 53 | |||
| 54 | L<ssl(3)|ssl(3)>, L<SSL_get_current_cipher(3)|SSL_get_current_cipher(3)>, | ||
| 55 | L<SSL_get_ciphers(3)|SSL_get_ciphers(3)> | ||
| 56 | |||
| 57 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_free.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_free.pod new file mode 100644 index 0000000000..de69672422 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_free.pod | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_CTX_free - free an allocated SSL_CTX object | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | void SSL_CTX_free(SSL_CTX *ctx); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_CTX_free() decrements the reference count of B<ctx>, and removes the | ||
| 16 | SSL_CTX object pointed to by B<ctx> and frees up the allocated memory if the | ||
| 17 | the reference count has reached 0. | ||
| 18 | |||
| 19 | It also calls the free()ing procedures for indirectly affected items, if | ||
| 20 | applicable: the session cacahe, the list of ciphers, the list of Client CAs, | ||
| 21 | the certificates and keys. | ||
| 22 | |||
| 23 | =head1 RETURN VALUES | ||
| 24 | |||
| 25 | SSL_CTX_free() does not provide diagnostic information. | ||
| 26 | |||
| 27 | L<SSL_CTX_new(3)|SSL_CTX_new(3)>, L<ssl(3)|ssl(3)> | ||
| 28 | |||
| 29 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_new.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_new.pod new file mode 100644 index 0000000000..e166c692c3 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_new.pod | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_CTX_new - create a new SSL_CTX object as framework for TLS/SSL enabled functions | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | SSL_CTX *SSL_CTX_new(SSL_METHOD *method); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_CTX_new() creates a new B<SSL_CTX> object as framework to establish | ||
| 16 | TLS/SSL enabled connections. | ||
| 17 | |||
| 18 | =head1 NOTES | ||
| 19 | |||
| 20 | The SSL_CTX object uses B<method> as connection method. The methods exist | ||
| 21 | in a generic type (for client and server use), a server only type, and a | ||
| 22 | client only type. B<method> can be of the following types: | ||
| 23 | |||
| 24 | =over 4 | ||
| 25 | |||
| 26 | =item SSLv2_method(void), SSLv2_server_method(void), SSLv2_client_method(void) | ||
| 27 | |||
| 28 | A TLS/SSL connection established with these methods will only understand | ||
| 29 | the SSLv2 protocol. A client will send out SSLv2 client hello messages | ||
| 30 | and will also indicate that it only understand SSLv2. A server will only | ||
| 31 | understand SSLv2 client hello messages. | ||
| 32 | |||
| 33 | =item SSLv3_method(void), SSLv3_server_method(void), SSLv3_client_method(void) | ||
| 34 | |||
| 35 | A TLS/SSL connection established with these methods will only understand the | ||
| 36 | SSLv3 and TLSv1 protocol. A client will send out SSLv3 client hello messages | ||
| 37 | and will indicate that it also understands TLSv1. A server will only understand | ||
| 38 | SSLv3 and TLSv1 client hello messages. This especially means, that it will | ||
| 39 | not understand SSLv2 client hello messages which are widely used for | ||
| 40 | compatibility reasons, see SSLv23_*_method(). | ||
| 41 | |||
| 42 | =item TLSv1_method(void), TLSv1_server_method(void), TLSv1_client_method(void) | ||
| 43 | |||
| 44 | A TLS/SSL connection established with these methods will only understand the | ||
| 45 | TLSv1 protocol. A client will send out TLSv1 client hello messages | ||
| 46 | and will indicate that it only understands TLSv1. A server will only understand | ||
| 47 | TLSv1 client hello messages. This especially means, that it will | ||
| 48 | not understand SSLv2 client hello messages which are widely used for | ||
| 49 | compatibility reasons, see SSLv23_*_method(). | ||
| 50 | |||
| 51 | =item SSLv23_method(void), SSLv23_server_method(void), SSLv23_client_method(void) | ||
| 52 | |||
| 53 | A TLS/SSL connection established with these methods will understand the SSLv2, | ||
| 54 | SSLv3, and TLSv1 protocol. A client will send out SSLv2 client hello messages | ||
| 55 | and will indicate that it also understands SSLv3 and TLSv1. A server will | ||
| 56 | understand SSLv2, SSLv3, and TLSv1 client hello messages. This is the best | ||
| 57 | choice when compatibility is a concern. | ||
| 58 | |||
| 59 | =back | ||
| 60 | |||
| 61 | The list of protocols available can later be limited using the SSL_OP_NO_SSLv2, | ||
| 62 | SSL_OP_NO_SSLv3, SSL_OP_NO_TLSv1 options of the B<SSL_CTX_set_options()> or | ||
| 63 | B<SSL_set_options()> functions. Using these options it is possible to choose | ||
| 64 | e.g. SSLv23_server_method() and be able to negotiate with all possible | ||
| 65 | clients, but to only allow newer protocols like SSLv3 or TLSv1. | ||
| 66 | |||
| 67 | SSL_CTX_new() initializes the list of ciphers, the session cache setting, | ||
| 68 | the callbacks, the keys and certificates, and the options to its default | ||
| 69 | values. | ||
| 70 | |||
| 71 | =head1 RETURN VALUES | ||
| 72 | |||
| 73 | The following return values can occur: | ||
| 74 | |||
| 75 | =over 4 | ||
| 76 | |||
| 77 | =item NULL | ||
| 78 | |||
| 79 | The creation of a new SSL_CTX object failed. Check the error stack to | ||
| 80 | find out the reason. | ||
| 81 | |||
| 82 | =item Pointer to an SSL_CTX object | ||
| 83 | |||
| 84 | The return value points to an allocated SSL_CTX object. | ||
| 85 | |||
| 86 | =back | ||
| 87 | |||
| 88 | =head1 SEE ALSO | ||
| 89 | |||
| 90 | L<SSL_CTX_free(3)|SSL_CTX_free(3)>, L<SSL_accept(3)|SSL_accept(3)>, | ||
| 91 | L<ssl(3)|ssl(3)> | ||
| 92 | |||
| 93 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_cipher_list.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_cipher_list.pod new file mode 100644 index 0000000000..272d6b3de2 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_cipher_list.pod | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_CTX_set_cipher_list, SSL_set_cipher_list | ||
| 6 | - choose list of available SSL_CIPHERs | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/ssl.h> | ||
| 11 | |||
| 12 | int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str); | ||
| 13 | int SSL_set_cipher_list(SSL *ssl, const char *str); | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | SSL_CTX_set_cipher_list() sets the list of available ciphers for B<ctx> | ||
| 18 | using the control string B<str>. The format of the string is described | ||
| 19 | in L<ciphers(1)|ciphers(1)>. The list of ciphers is inherited by all | ||
| 20 | B<ssl> objects created from B<ctx>. | ||
| 21 | |||
| 22 | SSL_set_cipher_list() sets the list of ciphers only for B<ssl>. | ||
| 23 | |||
| 24 | =head1 NOTES | ||
| 25 | |||
| 26 | The control string B<str> should be universally usable and not depend | ||
| 27 | on details of the library configuration (ciphers compiled in). Thus no | ||
| 28 | syntax checking takes place. Items that are not recognized, because the | ||
| 29 | corresponding ciphers are not compiled in or because they are mistyped, | ||
| 30 | are simply ignored. Failure is only flagged if no ciphers could be collected | ||
| 31 | at all. | ||
| 32 | |||
| 33 | It should be noted, that inclusion of a cipher to be used into the list is | ||
| 34 | a necessary condition. On the client side, the inclusion into the list is | ||
| 35 | also sufficient. On the server side, additional restrictions apply. All ciphers | ||
| 36 | have additional requirements. ADH ciphers don't need a certificate, but | ||
| 37 | DH-parameters must have been set. All other ciphers need a corresponding | ||
| 38 | certificate and key. A RSA cipher can only be chosen, when a RSA certificate is | ||
| 39 | available, the respective is valid for DSA ciphers. Ciphers using EDH need | ||
| 40 | a certificate and key and DH-parameters. | ||
| 41 | |||
| 42 | =head1 RETURN VALUES | ||
| 43 | |||
| 44 | SSL_CTX_set_cipher_list() and SSL_set_cipher_list() return 1 if any cipher | ||
| 45 | could be selected and 0 on complete failure. | ||
| 46 | |||
| 47 | =head1 SEE ALSO | ||
| 48 | |||
| 49 | L<ssl(3)|ssl(3)>, L<SSL_get_ciphers(3)|SSL_get_ciphers(3)>, | ||
| 50 | L<ciphers(1)|ciphers(1)> | ||
| 51 | |||
| 52 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_ssl_version.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_ssl_version.pod new file mode 100644 index 0000000000..3091bd6895 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_ssl_version.pod | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_CTX_set_ssl_version, SSL_set_ssl_method, SSL_get_ssl_method | ||
| 6 | - choose a new TLS/SSL method | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/ssl.h> | ||
| 11 | |||
| 12 | int SSL_CTX_set_ssl_version(SSL_CTX *ctx, SSL_METHOD *method); | ||
| 13 | int SSL_set_ssl_method(SSL *s, SSL_METHOD *method); | ||
| 14 | SSL_METHOD *SSL_get_ssl_method(SSL *ssl); | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | SSL_CTX_set_ssl_version() sets a new default TLS/SSL B<method> for SSL objects | ||
| 19 | newly created from this B<ctx>. SSL objects already created with | ||
| 20 | L<SSL_new(3)|SSL_new(3)> are not affected, except when SSL_clear() is | ||
| 21 | being called. | ||
| 22 | |||
| 23 | SSL_set_ssl_method() sets a new TLS/SSL B<method> for a particular B<ssl> | ||
| 24 | object. It may be reset, when SSL_clear() is called. | ||
| 25 | |||
| 26 | SSL_get_ssl_method() returns a function pointer to the TLS/SSL method | ||
| 27 | set in B<ssl>. | ||
| 28 | |||
| 29 | =head1 NOTES | ||
| 30 | |||
| 31 | The available B<method> choices are described in | ||
| 32 | L<SSL_CTX_new(3)|SSL_CTX_new(3)>. | ||
| 33 | |||
| 34 | When SSL_clear() is called and no session is connected to an SSL object, | ||
| 35 | the method of the SSL object is reset to the method currently set in | ||
| 36 | the corresponding SSL_CTX object. | ||
| 37 | |||
| 38 | =head1 RETURN VALUES | ||
| 39 | |||
| 40 | The following return values can occur for SSL_CTX_set_ssl_version() | ||
| 41 | and SSL_set_ssl_method(): | ||
| 42 | |||
| 43 | =over 4 | ||
| 44 | |||
| 45 | =item 0 | ||
| 46 | |||
| 47 | The new choice failed, check the error stack to find out the reason. | ||
| 48 | |||
| 49 | =item 1 | ||
| 50 | |||
| 51 | The operation succeeded. | ||
| 52 | |||
| 53 | =back | ||
| 54 | |||
| 55 | =head1 SEE ALSO | ||
| 56 | |||
| 57 | L<SSL_CTX_new(3)|SSL_CTX_new(3)>, L<SSL_new(3)|SSL_new(3)>, | ||
| 58 | L<SSL_clear(3)|SSL_clear(3)>, L<ssl(3)|ssl(3)> | ||
| 59 | |||
| 60 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod b/src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod new file mode 100644 index 0000000000..df30ccbb32 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_SESSION_free - free an allocated SSL_SESSION structure | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | void SSL_SESSION_free(SSL_SESSION *session); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_SESSION_free() decrements the reference count of B<session> and removes | ||
| 16 | the B<SSL_SESSION> structure pointed to by B<session> and frees up the allocated | ||
| 17 | memory, if the the reference count has reached 0. | ||
| 18 | |||
| 19 | =head1 RETURN VALUES | ||
| 20 | |||
| 21 | SSL_SESSION_free() does not provide diagnostic information. | ||
| 22 | |||
| 23 | L<ssl(3)|ssl(3)>, L<SSL_get_session(3)|SSL_get_session(3)> | ||
| 24 | |||
| 25 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_accept.pod b/src/lib/libssl/src/doc/ssl/SSL_accept.pod new file mode 100644 index 0000000000..0c79ac515e --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_accept.pod | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_accept - wait for a TLS/SSL client to initiate a TLS/SSL handshake | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_accept(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_accept() waits for a TLS/SSL client to initiate the TLS/SSL handshake. | ||
| 16 | The communication channel must already have been set and assigned to the | ||
| 17 | B<ssl> by setting an underlying B<BIO>. | ||
| 18 | |||
| 19 | =head1 NOTES | ||
| 20 | |||
| 21 | The behaviour of SSL_accept() depends on the underlying BIO. | ||
| 22 | |||
| 23 | If the underlying BIO is B<blocking>, SSL_accept() will only return once the | ||
| 24 | handshake has been finished or an error occurred, except for SGC (Server | ||
| 25 | Gated Cryptography). For SGC, SSL_accept() may return with -1, but | ||
| 26 | SSL_get_error() will yield B<SSL_ERROR_WANT_READ/WRITE> and SSL_accept() | ||
| 27 | should be called again. | ||
| 28 | |||
| 29 | If the underlying BIO is B<non-blocking>, SSL_accept() will also return | ||
| 30 | when the underlying BIO could not satisfy the needs of SSL_accept() | ||
| 31 | to continue the handshake. In this case a call to SSL_get_error() with the | ||
| 32 | return value of SSL_accept() will yield B<SSL_ERROR_WANT_READ> or | ||
| 33 | B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after | ||
| 34 | taking appropriate action to satisfy the needs of SSL_accept(). | ||
| 35 | The action depends on the underlying BIO. When using a non-blocking socket, | ||
| 36 | nothing is to be done, but select() can be used to check for the required | ||
| 37 | condition. When using a buffering BIO, like a BIO pair, data must be written | ||
| 38 | into or retrieved out of the BIO before being able to continue. | ||
| 39 | |||
| 40 | =head1 RETURN VALUES | ||
| 41 | |||
| 42 | The following return values can occur: | ||
| 43 | |||
| 44 | =over 4 | ||
| 45 | |||
| 46 | =item 1 | ||
| 47 | |||
| 48 | The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been | ||
| 49 | established. | ||
| 50 | |||
| 51 | =item 0 | ||
| 52 | |||
| 53 | The TLS/SSL handshake was not successful but was shut down controlled and | ||
| 54 | by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the | ||
| 55 | return value B<ret> to find out the reason. | ||
| 56 | |||
| 57 | =item -1 | ||
| 58 | |||
| 59 | The TLS/SSL handshake was not successful because a fatal error occurred either | ||
| 60 | at the protocol level or a connection failure occurred. The shutdown was | ||
| 61 | not clean. It can also occur of action is need to continue the operation | ||
| 62 | for non-blocking BIOs. Call SSL_get_error() with the return value B<ret> | ||
| 63 | to find out the reason. | ||
| 64 | |||
| 65 | =back | ||
| 66 | |||
| 67 | =head1 SEE ALSO | ||
| 68 | |||
| 69 | L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_connect(3)|SSL_connect(3)>, | ||
| 70 | L<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)> | ||
| 71 | |||
| 72 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_clear.pod b/src/lib/libssl/src/doc/ssl/SSL_clear.pod new file mode 100644 index 0000000000..862fd8291d --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_clear.pod | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_clear - reset SSL object to allow another connection | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_clear(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | Reset B<ssl> to allow another connection. All settings (method, ciphers, | ||
| 16 | BIOs) are kept. A completely negotiated B<SSL_SESSION> is not freed but left | ||
| 17 | untouched for the underlying B<SSL_CTX>. | ||
| 18 | |||
| 19 | =head1 RETURN VALUES | ||
| 20 | |||
| 21 | The following return values can occur: | ||
| 22 | |||
| 23 | =over 4 | ||
| 24 | |||
| 25 | =item 0 | ||
| 26 | |||
| 27 | The SSL_clear() operation could not be performed. Check the error stack to | ||
| 28 | find out the reason. | ||
| 29 | |||
| 30 | =item 1 | ||
| 31 | |||
| 32 | The SSL_clear() operation was successful. | ||
| 33 | |||
| 34 | =back | ||
| 35 | |||
| 36 | L<SSL_new(3)|SSL_new(3)>, L<SSL_free(3)|SSL_free(3)>, | ||
| 37 | L<ssl(3)|ssl(3)> | ||
| 38 | |||
| 39 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_connect.pod b/src/lib/libssl/src/doc/ssl/SSL_connect.pod new file mode 100644 index 0000000000..debe41744f --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_connect.pod | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_connect - initiate the TLS/SSL handshake with an TLS/SSL server | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_connect(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_connect() initiates the TLS/SSL handshake with a server. The communication | ||
| 16 | channel must already have been set and assigned to the B<ssl> by setting an | ||
| 17 | underlying B<BIO>. | ||
| 18 | |||
| 19 | =head1 NOTES | ||
| 20 | |||
| 21 | The behaviour of SSL_connect() depends on the underlying BIO. | ||
| 22 | |||
| 23 | If the underlying BIO is B<blocking>, SSL_connect() will only return once the | ||
| 24 | handshake has been finished or an error occurred. | ||
| 25 | |||
| 26 | If the underlying BIO is B<non-blocking>, SSL_connect() will also return | ||
| 27 | when the underlying BIO could not satisfy the needs of SSL_connect() | ||
| 28 | to continue the handshake. In this case a call to SSL_get_error() with the | ||
| 29 | return value of SSL_connect() will yield B<SSL_ERROR_WANT_READ> or | ||
| 30 | B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after | ||
| 31 | taking appropriate action to satisfy the needs of SSL_connect(). | ||
| 32 | The action depends on the underlying BIO. When using a non-blocking socket, | ||
| 33 | nothing is to be done, but select() can be used to check for the required | ||
| 34 | condition. When using a buffering BIO, like a BIO pair, data must be written | ||
| 35 | into or retrieved out of the BIO before being able to continue. | ||
| 36 | |||
| 37 | =head1 RETURN VALUES | ||
| 38 | |||
| 39 | The following return values can occur: | ||
| 40 | |||
| 41 | =over 4 | ||
| 42 | |||
| 43 | =item 1 | ||
| 44 | |||
| 45 | The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been | ||
| 46 | established. | ||
| 47 | |||
| 48 | =item 0 | ||
| 49 | |||
| 50 | The TLS/SSL handshake was not successful but was shut down controlled and | ||
| 51 | by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the | ||
| 52 | return value B<ret> to find out the reason. | ||
| 53 | |||
| 54 | =item -1 | ||
| 55 | |||
| 56 | The TLS/SSL handshake was not successful, because a fatal error occurred either | ||
| 57 | at the protocol level or a connection failure occurred. The shutdown was | ||
| 58 | not clean. It can also occur of action is need to continue the operation | ||
| 59 | for non-blocking BIOs. Call SSL_get_error() with the return value B<ret> | ||
| 60 | to find out the reason. | ||
| 61 | |||
| 62 | =back | ||
| 63 | |||
| 64 | =head1 SEE ALSO | ||
| 65 | |||
| 66 | L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_accept(3)|SSL_accept(3)>, | ||
| 67 | L<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)> | ||
| 68 | |||
| 69 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_free.pod b/src/lib/libssl/src/doc/ssl/SSL_free.pod new file mode 100644 index 0000000000..f3f0c345f8 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_free.pod | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_free - free an allocated SSL structure | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | void SSL_free(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_free() decrements the reference count of B<ssl>, and removes the SSL | ||
| 16 | structure pointed to by B<ssl> and frees up the allocated memory if the | ||
| 17 | the reference count has reached 0. | ||
| 18 | |||
| 19 | It also calls the free()ing procedures for indirectly affected items, if | ||
| 20 | applicable: the buffering BIO, the read and write BIOs, | ||
| 21 | cipher lists specially created for this B<ssl>, the B<SSL_SESSION>. | ||
| 22 | Do not explicitly free these indirectly freed up items before or after | ||
| 23 | calling SSL_free(), as trying to free things twice may lead to program | ||
| 24 | failure. | ||
| 25 | |||
| 26 | =head1 RETURN VALUES | ||
| 27 | |||
| 28 | SSL_free() does not provide diagnostic information. | ||
| 29 | |||
| 30 | L<SSL_new(3)|SSL_new(3)>, L<SSL_clear(3)|SSL_clear(3)>, | ||
| 31 | L<ssl(3)|ssl(3)> | ||
| 32 | |||
| 33 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_ciphers.pod b/src/lib/libssl/src/doc/ssl/SSL_get_ciphers.pod new file mode 100644 index 0000000000..2a57455c23 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_get_ciphers.pod | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_get_ciphers, SSL_get_cipher_list - get list of available SSL_CIPHERs | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *ssl); | ||
| 12 | const char *SSL_get_cipher_list(SSL *ssl, int priority); | ||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | SSL_get_ciphers() returns the stack of available SSL_CIPHERs for B<ssl>, | ||
| 17 | sorted by preference. If B<ssl> is NULL or no ciphers are available, NULL | ||
| 18 | is returned. | ||
| 19 | |||
| 20 | SSL_get_cipher_list() returns a pointer to the name of the SSL_CIPHER | ||
| 21 | listed for B<ssl> with B<priority>. If B<ssl> is NULL, no ciphers are | ||
| 22 | available, or there are less ciphers than B<priority> available, NULL | ||
| 23 | is returned. | ||
| 24 | |||
| 25 | =head1 NOTES | ||
| 26 | |||
| 27 | The details of the ciphers obtained by SSL_get_ciphers() can be obtained using | ||
| 28 | the L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)> family of functions. | ||
| 29 | |||
| 30 | Call SSL_get_cipher_list() with B<priority> starting from 0 to obtain the | ||
| 31 | sorted list of available ciphers, until NULL is returned. | ||
| 32 | |||
| 33 | =head1 RETURN VALUES | ||
| 34 | |||
| 35 | See DESCRIPTION | ||
| 36 | |||
| 37 | =head1 SEE ALSO | ||
| 38 | |||
| 39 | L<ssl(3)|ssl(3)>, L<SSL_CTX_set_cipher_list(3)|SSL_CTX_set_cipher_list(3)>, | ||
| 40 | L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)> | ||
| 41 | |||
| 42 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_current_cipher.pod b/src/lib/libssl/src/doc/ssl/SSL_get_current_cipher.pod new file mode 100644 index 0000000000..2dd7261d89 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_get_current_cipher.pod | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_get_current_cipher, SSL_get_cipher, SSL_get_cipher_name, | ||
| 6 | SSL_get_cipher_bits, SSL_get_cipher_version - get SSL_CIPHER of a connection | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/ssl.h> | ||
| 11 | |||
| 12 | SSL_CIPHER *SSL_get_current_cipher(SSL *ssl); | ||
| 13 | #define SSL_get_cipher(s) \ | ||
| 14 | SSL_CIPHER_get_name(SSL_get_current_cipher(s)) | ||
| 15 | #define SSL_get_cipher_name(s) \ | ||
| 16 | SSL_CIPHER_get_name(SSL_get_current_cipher(s)) | ||
| 17 | #define SSL_get_cipher_bits(s,np) \ | ||
| 18 | SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np) | ||
| 19 | #define SSL_get_cipher_version(s) \ | ||
| 20 | SSL_CIPHER_get_version(SSL_get_current_cipher(s)) | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | SSL_get_current_cipher() returns a pointer to an SSL_CIPHER object containing | ||
| 25 | the description of the actually used cipher of a connection established with | ||
| 26 | the B<ssl> object. | ||
| 27 | |||
| 28 | SSL_get_cipher() and SSL_get_cipher_name() are identical macros to obtain the | ||
| 29 | name of the currently used cipher. SSL_get_cipher_bits() is a | ||
| 30 | macro to obtain the number of secret/algorithm bits used and | ||
| 31 | SSL_get_cipher_version() returns the protocol name. | ||
| 32 | See L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)> for more details. | ||
| 33 | |||
| 34 | =head1 RETURN VALUES | ||
| 35 | |||
| 36 | SSL_get_current_cipher() returns the cipher actually used or NULL, when | ||
| 37 | no session has been established. | ||
| 38 | |||
| 39 | =head1 SEE ALSO | ||
| 40 | |||
| 41 | L<ssl(3)|ssl(3)>, L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)> | ||
| 42 | |||
| 43 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_error.pod b/src/lib/libssl/src/doc/ssl/SSL_get_error.pod index 9cacdedc57..d85b564258 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_error.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_error.pod | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | SSL_get_error - obtain result code for SSL I/O operation | 5 | SSL_get_error - obtain result code for TLS/SSL I/O operation |
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| @@ -15,14 +15,14 @@ SSL_get_error - obtain result code for SSL I/O operation | |||
| 15 | SSL_get_error() returns a result code (suitable for the C "switch" | 15 | SSL_get_error() returns a result code (suitable for the C "switch" |
| 16 | statement) for a preceding call to SSL_connect(), SSL_accept(), | 16 | statement) for a preceding call to SSL_connect(), SSL_accept(), |
| 17 | SSL_read(), or SSL_write() on B<ssl>. The value returned by that | 17 | SSL_read(), or SSL_write() on B<ssl>. The value returned by that |
| 18 | SSL I/O function must be passed to SSL_get_error() in parameter | 18 | TLS/SSL I/O function must be passed to SSL_get_error() in parameter |
| 19 | B<ret>. | 19 | B<ret>. |
| 20 | 20 | ||
| 21 | In addition to B<ssl> and B<ret>, SSL_get_error() inspects the | 21 | In addition to B<ssl> and B<ret>, SSL_get_error() inspects the |
| 22 | current thread's OpenSSL error queue. Thus, SSL_get_error() must be | 22 | current thread's OpenSSL error queue. Thus, SSL_get_error() must be |
| 23 | used in the same thread that performed the SSL I/O operation, and no | 23 | used in the same thread that performed the TLS/SSL I/O operation, and no |
| 24 | other OpenSSL function calls should appear in between. The current | 24 | other OpenSSL function calls should appear in between. The current |
| 25 | thread's error queue must be empty before the SSL I/O operation is | 25 | thread's error queue must be empty before the TLS/SSL I/O operation is |
| 26 | attempted, or SSL_get_error() will not work reliably. | 26 | attempted, or SSL_get_error() will not work reliably. |
| 27 | 27 | ||
| 28 | =head1 RETURN VALUES | 28 | =head1 RETURN VALUES |
| @@ -33,27 +33,29 @@ The following return values can currently occur: | |||
| 33 | 33 | ||
| 34 | =item SSL_ERROR_NONE | 34 | =item SSL_ERROR_NONE |
| 35 | 35 | ||
| 36 | The SSL I/O operation completed. This result code is returned | 36 | The TLS/SSL I/O operation completed. This result code is returned |
| 37 | if and only if B<ret E<gt> 0>. | 37 | if and only if B<ret E<gt> 0>. |
| 38 | 38 | ||
| 39 | =item SSL_ERROR_ZERO_RETURN | 39 | =item SSL_ERROR_ZERO_RETURN |
| 40 | 40 | ||
| 41 | The SSL connection has been closed. If the protocol version is SSL 3.0 | 41 | The TLS/SSL connection has been closed. If the protocol version is SSL 3.0 |
| 42 | or TLS 1.0, this result code is returned only if a closure | 42 | or TLS 1.0, this result code is returned only if a closure |
| 43 | alerts has occurred in the protocol, i.e. if the connection has been | 43 | alert has occurred in the protocol, i.e. if the connection has been |
| 44 | closed cleanly. | 44 | closed cleanly. Note that in this case B<SSL_ERROR_ZERO_RETURN> |
| 45 | does not necessarily indicate that the underlying transport | ||
| 46 | has been closed. | ||
| 45 | 47 | ||
| 46 | =item SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE | 48 | =item SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE |
| 47 | 49 | ||
| 48 | The operation did not complete; the same SSL I/O function should be | 50 | The operation did not complete; the same TLS/SSL I/O function should be |
| 49 | called again later. There will be protocol progress if, by then, the | 51 | called again later. There will be protocol progress if, by then, the |
| 50 | underlying B<BIO> has data available for reading (if the result code is | 52 | underlying B<BIO> has data available for reading (if the result code is |
| 51 | B<SSL_ERROR_WANT_READ>) or allows writing data (B<SSL_ERROR_WANT_WRITE>). | 53 | B<SSL_ERROR_WANT_READ>) or allows writing data (B<SSL_ERROR_WANT_WRITE>). |
| 52 | For socket B<BIO>s (e.g. when SSL_set_fd() was used) this means that | 54 | For socket B<BIO>s (e.g. when SSL_set_fd() was used) this means that |
| 53 | select() or poll() on the underlying socket can be used to find out | 55 | select() or poll() on the underlying socket can be used to find out |
| 54 | when the SSL I/O function should be retried. | 56 | when the TLS/SSL I/O function should be retried. |
| 55 | 57 | ||
| 56 | Caveat: Any SSL I/O function can lead to either of | 58 | Caveat: Any TLS/SSL I/O function can lead to either of |
| 57 | B<SSL_ERROR_WANT_READ> and B<SSL_ERROR_WANT_WRITE>, i.e. SSL_read() | 59 | B<SSL_ERROR_WANT_READ> and B<SSL_ERROR_WANT_WRITE>, i.e. SSL_read() |
| 58 | may want to write data and SSL_write() may want to read data. | 60 | may want to write data and SSL_write() may want to read data. |
| 59 | 61 | ||
| @@ -61,7 +63,7 @@ may want to write data and SSL_write() may want to read data. | |||
| 61 | 63 | ||
| 62 | The operation did not complete because an application callback set by | 64 | The operation did not complete because an application callback set by |
| 63 | SSL_CTX_set_client_cert_cb() has asked to be called again. | 65 | SSL_CTX_set_client_cert_cb() has asked to be called again. |
| 64 | The SSL I/O function should be called again later. | 66 | The TLS/SSL I/O function should be called again later. |
| 65 | Details depend on the application. | 67 | Details depend on the application. |
| 66 | 68 | ||
| 67 | =item SSL_ERROR_SYSCALL | 69 | =item SSL_ERROR_SYSCALL |
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_fd.pod b/src/lib/libssl/src/doc/ssl/SSL_get_fd.pod new file mode 100644 index 0000000000..a3f7625931 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_get_fd.pod | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_get_fd - get file descriptor linked to an SSL object | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_get_fd(SSL *ssl); | ||
| 12 | int SSL_get_rfd(SSL *ssl); | ||
| 13 | int SSL_get_wfd(SSL *ssl); | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | SSL_get_fd() returns the file descriptor which is linked to B<ssl>. | ||
| 18 | SSL_get_rfd() and SSL_get_wfd() return the file descriptors for the | ||
| 19 | read or the write channel, which can be different. If the read and the | ||
| 20 | write channel are different, SSL_get_fd() will return the file descriptor | ||
| 21 | of the read channel. | ||
| 22 | |||
| 23 | =head1 RETURN VALUES | ||
| 24 | |||
| 25 | The following return values can occur: | ||
| 26 | |||
| 27 | =over 4 | ||
| 28 | |||
| 29 | =item -1 | ||
| 30 | |||
| 31 | The operation failed, because the underlying BIO is not of the correct type | ||
| 32 | (suitable for file descriptors). | ||
| 33 | |||
| 34 | =item E<gt>=0 | ||
| 35 | |||
| 36 | The file descriptor linked to B<ssl>. | ||
| 37 | |||
| 38 | =back | ||
| 39 | |||
| 40 | =head1 SEE ALSO | ||
| 41 | |||
| 42 | L<SSL_set_fd(3)|SSL_set_fd(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)> | ||
| 43 | |||
| 44 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_peer_cert_chain.pod b/src/lib/libssl/src/doc/ssl/SSL_get_peer_cert_chain.pod new file mode 100644 index 0000000000..e93e8206fa --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_get_peer_cert_chain.pod | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_get_peer_cert_chain - get the X509 certificate chain of the peer | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | STACKOF(X509) *SSL_get_peer_cert_chain(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_get_peer_cert_chain() returns a pointer to STACKOF(X509) certificates | ||
| 16 | forming the certificate chain of the peer. If called on the client side, | ||
| 17 | the stack also contains the peer's certificate; if called on the server | ||
| 18 | side, the peer's certificate must be obtained seperately using | ||
| 19 | L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>. | ||
| 20 | If the peer did not present a certificate, NULL is returned. | ||
| 21 | |||
| 22 | =head1 NOTES | ||
| 23 | |||
| 24 | The peer certificate chain is not necessarily available after reusing | ||
| 25 | a session, in which case a NULL pointer is returned. | ||
| 26 | |||
| 27 | The reference count of the STACKOF(X509) object is not incremented. | ||
| 28 | If the corresponding session is freed, the pointer must not be used | ||
| 29 | any longer. | ||
| 30 | |||
| 31 | =head1 RETURN VALUES | ||
| 32 | |||
| 33 | The following return values can occur: | ||
| 34 | |||
| 35 | =over 4 | ||
| 36 | |||
| 37 | =item NULL | ||
| 38 | |||
| 39 | No certificate was presented by the peer or no connection was established | ||
| 40 | or the certificate chain is no longer available when a session is reused. | ||
| 41 | |||
| 42 | =item Pointer to a STACKOF(X509) | ||
| 43 | |||
| 44 | The return value points to the certificate chain presented by the peer. | ||
| 45 | |||
| 46 | =back | ||
| 47 | |||
| 48 | =head1 SEE ALSO | ||
| 49 | |||
| 50 | L<ssl(3)|ssl(3)>, L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)> | ||
| 51 | |||
| 52 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_peer_certificate.pod b/src/lib/libssl/src/doc/ssl/SSL_get_peer_certificate.pod new file mode 100644 index 0000000000..79c089aa51 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_get_peer_certificate.pod | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_get_peer_certificate - get the X509 certificate of the peer | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | X509 *SSL_get_peer_certificate(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_get_peer_certificate() returns a pointer to the X509 certificate the | ||
| 16 | peer presented. If the peer did not present a certificate, NULL is returned. | ||
| 17 | |||
| 18 | =head1 NOTES | ||
| 19 | |||
| 20 | That a certificate is returned does not indicate information about the | ||
| 21 | verification state, use L<SSL_get_verify_result(3)|SSL_get_verify_result(3)> | ||
| 22 | to check the verification state. | ||
| 23 | |||
| 24 | The reference count of the X509 object is incremented by one, so that it | ||
| 25 | will not be destroyed when the session containing the peer certificate is | ||
| 26 | freed. The X509 object must be explicitely freed using X509_free(). | ||
| 27 | |||
| 28 | =head1 RETURN VALUES | ||
| 29 | |||
| 30 | The following return values can occur: | ||
| 31 | |||
| 32 | =over 4 | ||
| 33 | |||
| 34 | =item NULL | ||
| 35 | |||
| 36 | No certificate was presented by the peer or no connection was established. | ||
| 37 | |||
| 38 | =item Pointer to an X509 certificate | ||
| 39 | |||
| 40 | The return value points to the certificate presented by the peer. | ||
| 41 | |||
| 42 | =back | ||
| 43 | |||
| 44 | =head1 SEE ALSO | ||
| 45 | |||
| 46 | L<ssl(3)|ssl(3)>, L<SSL_get_verify_result(3)|SSL_get_verify_result(3)> | ||
| 47 | |||
| 48 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_rbio.pod b/src/lib/libssl/src/doc/ssl/SSL_get_rbio.pod new file mode 100644 index 0000000000..3d98233cac --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_get_rbio.pod | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_get_rbio - get BIO linked to an SSL object | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | BIO *SSL_get_rbio(SSL *ssl); | ||
| 12 | BIO *SSL_get_wbio(SSL *ssl); | ||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | SSL_get_rbio() and SSL_get_wbio() return pointers to the BIOs for the | ||
| 17 | read or the write channel, which can be different. The reference count | ||
| 18 | of the BIO is not incremented. | ||
| 19 | |||
| 20 | =head1 RETURN VALUES | ||
| 21 | |||
| 22 | The following return values can occur: | ||
| 23 | |||
| 24 | =over 4 | ||
| 25 | |||
| 26 | =item NULL | ||
| 27 | |||
| 28 | No BIO was connected to the SSL object | ||
| 29 | |||
| 30 | =item Any other pointer | ||
| 31 | |||
| 32 | The BIO linked to B<ssl>. | ||
| 33 | |||
| 34 | =back | ||
| 35 | |||
| 36 | =head1 SEE ALSO | ||
| 37 | |||
| 38 | L<SSL_set_bio(3)|SSL_set_bio(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)> | ||
| 39 | |||
| 40 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_session.pod b/src/lib/libssl/src/doc/ssl/SSL_get_session.pod new file mode 100644 index 0000000000..aff41fb9cf --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_get_session.pod | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_get_session - retrieve TLS/SSL session data | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | SSL_SESSION *SSL_get_session(SSL *ssl); | ||
| 12 | SSL_SESSION *SSL_get0_session(SSL *ssl); | ||
| 13 | SSL_SESSION *SSL_get1_session(SSL *ssl); | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | SSL_get_session() returns a pointer to the B<SSL_SESSION> actually used in | ||
| 18 | B<ssl>. The reference count of the B<SSL_SESSION> is not incremented, so | ||
| 19 | that the pointer can become invalid when the B<ssl> is freed and | ||
| 20 | SSL_SESSION_free() is implicitly called. | ||
| 21 | |||
| 22 | SSL_get0_session() is the same as SSL_get_session(). | ||
| 23 | |||
| 24 | SSL_get1_session() is the same as SSL_get_session(), but the reference | ||
| 25 | count of the B<SSL_SESSION> is incremented by one. | ||
| 26 | |||
| 27 | =head1 RETURN VALUES | ||
| 28 | |||
| 29 | The following return values can occur: | ||
| 30 | |||
| 31 | =over 4 | ||
| 32 | |||
| 33 | =item NULL | ||
| 34 | |||
| 35 | There is no session available in B<ssl>. | ||
| 36 | |||
| 37 | =item Pointer to an SSL | ||
| 38 | |||
| 39 | The return value points to the data of an SSL session. | ||
| 40 | |||
| 41 | =back | ||
| 42 | |||
| 43 | =head1 SEE ALSO | ||
| 44 | |||
| 45 | L<ssl(3)|ssl(3)>, L<SSL_free(3)|SSL_free(3)>, | ||
| 46 | L<SSL_SESSION_free(3)|SSL_SESSION_free(3)> | ||
| 47 | |||
| 48 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_verify_result.pod b/src/lib/libssl/src/doc/ssl/SSL_get_verify_result.pod new file mode 100644 index 0000000000..4d66236a05 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_get_verify_result.pod | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_get_verify_result - get result of peer certificate verification | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | long SSL_get_verify_result(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_get_verify_result() returns the result of the verification of the | ||
| 16 | X509 certificate presented by the peer, if any. | ||
| 17 | |||
| 18 | =head1 NOTES | ||
| 19 | |||
| 20 | SSL_get_verify_result() can only return one error code while the verification | ||
| 21 | of a certificate can fail because of many reasons at the same time. Only | ||
| 22 | the last verification error that occured during the processing is available | ||
| 23 | from SSL_get_verify_result(). | ||
| 24 | |||
| 25 | The verification result is part of the established session and is restored | ||
| 26 | when a session is reused. | ||
| 27 | |||
| 28 | =head1 BUGS | ||
| 29 | |||
| 30 | If no peer certificate was presented, the returned result code is | ||
| 31 | X509_V_OK. This is because no verification error occured, it does however | ||
| 32 | not indicate success. SSL_get_verify_result() is only useful in connection | ||
| 33 | with L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>. | ||
| 34 | |||
| 35 | =head1 RETURN VALUES | ||
| 36 | |||
| 37 | The following return values can currently occur: | ||
| 38 | |||
| 39 | =over 4 | ||
| 40 | |||
| 41 | =item X509_V_OK | ||
| 42 | |||
| 43 | The verification succeeded or no peer certificate was presented. | ||
| 44 | |||
| 45 | =item Any other value | ||
| 46 | |||
| 47 | Documented in L<verify(1)|verify(1)>. | ||
| 48 | |||
| 49 | =back | ||
| 50 | |||
| 51 | =head1 SEE ALSO | ||
| 52 | |||
| 53 | L<ssl(3)|ssl(3)>, L<SSL_set_verify_result(3)|SSL_set_verify_result(3)>, | ||
| 54 | L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>, | ||
| 55 | L<verify(1)|verify(1)> | ||
| 56 | |||
| 57 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_library_init.pod b/src/lib/libssl/src/doc/ssl/SSL_library_init.pod new file mode 100644 index 0000000000..ecf3c4858e --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_library_init.pod | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_library_init, OpenSSL_add_ssl_algorithms, SSLeay_add_ssl_algorithms | ||
| 6 | - initialize SSL library by registering algorithms | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/ssl.h> | ||
| 11 | |||
| 12 | int SSL_library_init(void); | ||
| 13 | #define OpenSSL_add_ssl_algorithms() SSL_library_init() | ||
| 14 | #define SSLeay_add_ssl_algorithms() SSL_library_init() | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | SSL_library_init() registers the available ciphers and digests. | ||
| 19 | |||
| 20 | OpenSSL_add_ssl_algorithms() and SSLeay_add_ssl_algorithms() are synonyms | ||
| 21 | for SSL_library_init(). | ||
| 22 | |||
| 23 | =head1 NOTES | ||
| 24 | |||
| 25 | SSL_library_init() must be called before any other action takes place. | ||
| 26 | |||
| 27 | =head1 WARNING | ||
| 28 | |||
| 29 | SSL_library_init() only registers ciphers. Another important initialization | ||
| 30 | is the seeding of the PRNG (Pseudo Random Number Generator), which has to | ||
| 31 | be performed separately. | ||
| 32 | |||
| 33 | =head1 EXAMPLES | ||
| 34 | |||
| 35 | A typical TLS/SSL application will start with the library initialization, | ||
| 36 | will provide readable error messages and will seed the PRNG. | ||
| 37 | |||
| 38 | SSL_load_error_strings(); /* readable error messages */ | ||
| 39 | SSL_library_init(); /* initialize library */ | ||
| 40 | actions_to_seed_PRNG(); | ||
| 41 | |||
| 42 | =head1 RETURN VALUES | ||
| 43 | |||
| 44 | SSL_library_init() always returns "1", so it is safe to discard the return | ||
| 45 | value. | ||
| 46 | |||
| 47 | =head1 SEE ALSO | ||
| 48 | |||
| 49 | L<ssl(3)|ssl(3)>, L<SSL_load_error_strings(3)|SSL_load_error_strings(3)>, | ||
| 50 | L<RAND_add(3)|RAND_add(3)> | ||
| 51 | |||
| 52 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_new.pod b/src/lib/libssl/src/doc/ssl/SSL_new.pod new file mode 100644 index 0000000000..8e8638fa95 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_new.pod | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_new - create a new SSL structure for a connection | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | SSL *SSL_new(SSL_CTX *ctx); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_new() creates a new B<SSL> structure which is needed to hold the | ||
| 16 | data for a TLS/SSL connection. The new structure inherits the settings | ||
| 17 | of the underlying context B<ctx>: connection method (SSLv2/v3/TLSv1), | ||
| 18 | options, verification settings, timeout settings. | ||
| 19 | |||
| 20 | =head1 RETURN VALUES | ||
| 21 | |||
| 22 | The following return values can occur: | ||
| 23 | |||
| 24 | =over 4 | ||
| 25 | |||
| 26 | =item NULL | ||
| 27 | |||
| 28 | The creation of a new SSL structure failed. Check the error stack to | ||
| 29 | find out the reason. | ||
| 30 | |||
| 31 | =item Pointer to an SSL structure | ||
| 32 | |||
| 33 | The return value points to an allocated SSL structure. | ||
| 34 | |||
| 35 | =back | ||
| 36 | |||
| 37 | =head1 SEE ALSO | ||
| 38 | |||
| 39 | L<SSL_free(3)|SSL_free(3)>, L<SSL_clear(3)|SSL_clear(3)>, | ||
| 40 | L<ssl(3)|ssl(3)> | ||
| 41 | |||
| 42 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_pending.pod b/src/lib/libssl/src/doc/ssl/SSL_pending.pod new file mode 100644 index 0000000000..744e1855e1 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_pending.pod | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_pending - obtain number of readable bytes buffered in an SSL object | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_pending(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_pending() returns the number of bytes which are available inside | ||
| 16 | B<ssl> for immediate read. | ||
| 17 | |||
| 18 | =head1 NOTES | ||
| 19 | |||
| 20 | Data are received in blocks from the peer. Therefore data can be buffered | ||
| 21 | inside B<ssl> and are ready for immediate retrieval with | ||
| 22 | L<SSL_read(3)|SSL_read(3)>. | ||
| 23 | |||
| 24 | =head1 RETURN VALUES | ||
| 25 | |||
| 26 | The number of bytes pending is returned. | ||
| 27 | |||
| 28 | L<SSL_read(3)|SSL_read(3)>, L<ssl(3)|ssl(3)> | ||
| 29 | |||
| 30 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_read.pod b/src/lib/libssl/src/doc/ssl/SSL_read.pod new file mode 100644 index 0000000000..072dc26cf2 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_read.pod | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_read - read bytes from a TLS/SSL connection. | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_read(SSL *ssl, char *buf, int num); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_read() tries to read B<num> bytes from the specified B<ssl> into the | ||
| 16 | buffer B<buf>. | ||
| 17 | |||
| 18 | =head1 NOTES | ||
| 19 | |||
| 20 | If necessary, SSL_read() will negotiate a TLS/SSL session, if | ||
| 21 | not already explicitly performed by SSL_connect() or SSL_accept(). If the | ||
| 22 | peer requests a re-negotiation, it will be performed transparently during | ||
| 23 | the SSL_read() operation. The behaviour of SSL_read() depends on the | ||
| 24 | underlying BIO. | ||
| 25 | |||
| 26 | If the underlying BIO is B<blocking>, SSL_read() will only return, once the | ||
| 27 | read operation has been finished or an error occurred. | ||
| 28 | |||
| 29 | If the underlying BIO is B<non-blocking>, SSL_read() will also return | ||
| 30 | when the underlying BIO could not satisfy the needs of SSL_read() | ||
| 31 | to continue the operation. In this case a call to SSL_get_error() with the | ||
| 32 | return value of SSL_read() will yield B<SSL_ERROR_WANT_READ> or | ||
| 33 | B<SSL_ERROR_WANT_WRITE>. As at any time a re-negotiation is possible, a | ||
| 34 | call to SSL_read() can also cause write operations! The calling process | ||
| 35 | then must repeat the call after taking appropriate action to satisfy the | ||
| 36 | needs of SSL_read(). The action depends on the underlying BIO. When using a | ||
| 37 | non-blocking socket, nothing is to be done, but select() can be used to check | ||
| 38 | for the required condition. When using a buffering BIO, like a BIO pair, data | ||
| 39 | must be written into or retrieved out of the BIO before being able to continue. | ||
| 40 | |||
| 41 | =head1 WARNING | ||
| 42 | |||
| 43 | When an SSL_read() operation has to be repeated because of | ||
| 44 | B<SSL_ERROR_WANT_READ> or B<SSL_ERROR_WANT_WRITE>, it must be repeated | ||
| 45 | with the same arguments. | ||
| 46 | |||
| 47 | =head1 RETURN VALUES | ||
| 48 | |||
| 49 | The following return values can occur: | ||
| 50 | |||
| 51 | =over 4 | ||
| 52 | |||
| 53 | =item E<gt>0 | ||
| 54 | |||
| 55 | The read operation was successful; the return value is the number of | ||
| 56 | bytes actually read from the TLS/SSL connection. | ||
| 57 | |||
| 58 | =item 0 | ||
| 59 | |||
| 60 | The read operation was not successful, probably because no data was | ||
| 61 | available. Call SSL_get_error() with the return value B<ret> to find out, | ||
| 62 | whether an error occurred. | ||
| 63 | |||
| 64 | =item -1 | ||
| 65 | |||
| 66 | The read operation was not successful, because either an error occurred | ||
| 67 | or action must be taken by the calling process. Call SSL_get_error() with the | ||
| 68 | return value B<ret> to find out the reason. | ||
| 69 | |||
| 70 | =back | ||
| 71 | |||
| 72 | =head1 SEE ALSO | ||
| 73 | |||
| 74 | L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_write(3)|SSL_write(3)>, | ||
| 75 | L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)> | ||
| 76 | |||
| 77 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_set_bio.pod b/src/lib/libssl/src/doc/ssl/SSL_set_bio.pod new file mode 100644 index 0000000000..67c9756d3f --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_set_bio.pod | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_set_bio - connect the SSL object with a BIO | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | void SSL_set_bio(SSL *ssl, BIO *rbio, BIO *wbio); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_set_bio() connects the BIOs B<rbio> and B<wbio> for the read and write | ||
| 16 | operations of the TLS/SSL (encrypted) side of B<ssl>. | ||
| 17 | |||
| 18 | The SSL engine inherits the behaviour of B<rbio> and B<wbio>, respectively. | ||
| 19 | If a BIO is non-blocking, the B<ssl> will also have non-blocking behaviour. | ||
| 20 | |||
| 21 | If there was already a BIO connected to B<ssl>, BIO_free() will be called | ||
| 22 | (for both the reading and writing side, if different). | ||
| 23 | |||
| 24 | =head1 RETURN VALUES | ||
| 25 | |||
| 26 | SSL_set_bio() cannot fail. | ||
| 27 | |||
| 28 | =head1 SEE ALSO | ||
| 29 | |||
| 30 | L<SSL_get_rbio(3)|SSL_get_rbio(3)>, | ||
| 31 | L<SSL_connect(3)|SSL_connect(3)>, L<SSL_accept(3)|SSL_accept(3)>, | ||
| 32 | L<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)> | ||
| 33 | |||
| 34 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_set_fd.pod b/src/lib/libssl/src/doc/ssl/SSL_set_fd.pod new file mode 100644 index 0000000000..70291128fc --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_set_fd.pod | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_set_fd - connect the SSL object with a file descriptor | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_set_fd(SSL *ssl, int fd); | ||
| 12 | int SSL_set_rfd(SSL *ssl, int fd); | ||
| 13 | int SSL_set_wfd(SSL *ssl, int fd); | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | SSL_set_fd() sets the file descriptor B<fd> as the input/output facility | ||
| 18 | for the TLS/SSL (encrypted) side of B<ssl>. B<fd> will typically be the | ||
| 19 | socket file descriptor of a network connection. | ||
| 20 | |||
| 21 | When performing the operation, a B<socket BIO> is automatically created to | ||
| 22 | interface between the B<ssl> and B<fd>. The BIO and hence the SSL engine | ||
| 23 | inherit the behaviour of B<fd>. If B<fd> is non-blocking, the B<ssl> will | ||
| 24 | also have non-blocking behaviour. | ||
| 25 | |||
| 26 | If there was already a BIO connected to B<ssl>, BIO_free() will be called | ||
| 27 | (for both the reading and writing side, if different). | ||
| 28 | |||
| 29 | SSL_set_rfd() and SSL_set_wfd() perform the respective action, but only | ||
| 30 | for the read channel or the write channel, which can be set independently. | ||
| 31 | |||
| 32 | =head1 RETURN VALUES | ||
| 33 | |||
| 34 | The following return values can occur: | ||
| 35 | |||
| 36 | =over 4 | ||
| 37 | |||
| 38 | =item 0 | ||
| 39 | |||
| 40 | The operation failed. Check the error stack to find out why. | ||
| 41 | |||
| 42 | =item 1 | ||
| 43 | |||
| 44 | The operation succeeded. | ||
| 45 | |||
| 46 | =back | ||
| 47 | |||
| 48 | =head1 SEE ALSO | ||
| 49 | |||
| 50 | L<SSL_get_fd(3)|SSL_get_fd(3)>, L<SSL_set_bio(3)|SSL_set_bio(3)>, | ||
| 51 | L<SSL_connect(3)|SSL_connect(3)>, L<SSL_accept(3)|SSL_accept(3)>, | ||
| 52 | L<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)> | ||
| 53 | |||
| 54 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_set_session.pod b/src/lib/libssl/src/doc/ssl/SSL_set_session.pod new file mode 100644 index 0000000000..9f78d9e434 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_set_session.pod | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_set_session - set a TLS/SSL session to be used during TLS/SSL connect | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_set_session(SSL *ssl, SSL_SESSION *session); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_set_session() sets B<session> to be used when the TLS/SSL connection | ||
| 16 | is to be established. SSL_set_session() is only useful for TLS/SSL clients. | ||
| 17 | When the session is set, the reference count of B<session> is incremented | ||
| 18 | by 1. If the session is not reused, the reference count is decremented | ||
| 19 | again during SSL_connect(). | ||
| 20 | |||
| 21 | If there is already a session set inside B<ssl> (because it was set with | ||
| 22 | SSL_set_session() before or because the same B<ssl> was already used for | ||
| 23 | a connection), SSL_SESSION_free() will be called for that session. | ||
| 24 | |||
| 25 | =head1 RETURN VALUES | ||
| 26 | |||
| 27 | The following return values can occur: | ||
| 28 | |||
| 29 | =over 4 | ||
| 30 | |||
| 31 | =item 0 | ||
| 32 | |||
| 33 | The operation failed; check the error stack to find out the reason. | ||
| 34 | |||
| 35 | =item 1 | ||
| 36 | |||
| 37 | The operation succeeded. | ||
| 38 | |||
| 39 | =back | ||
| 40 | |||
| 41 | =head1 SEE ALSO | ||
| 42 | |||
| 43 | L<ssl(3)|ssl(3)>, L<SSL_SESSION_free(3)|SSL_SESSION_free(3)> | ||
| 44 | |||
| 45 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_set_verify_result.pod b/src/lib/libssl/src/doc/ssl/SSL_set_verify_result.pod new file mode 100644 index 0000000000..04ab101aad --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_set_verify_result.pod | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_set_verify_result - override result of peer certificate verification | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | void SSL_set_verify_result(SSL *ssl, long verify_result); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_set_verify_result() sets B<verify_result> of the object B<ssl> to be the | ||
| 16 | result of the verification of the X509 certificate presented by the peer, | ||
| 17 | if any. | ||
| 18 | |||
| 19 | =head1 NOTES | ||
| 20 | |||
| 21 | SSL_set_verify_result() overrides the verification result. It only changes | ||
| 22 | the verification result of the B<ssl> object. It does not become part of the | ||
| 23 | established session, so if the session is to be reused later, the original | ||
| 24 | value will reappear. | ||
| 25 | |||
| 26 | The valid codes for B<verify_result> are documented in L<verify(1)|verify(1)>. | ||
| 27 | |||
| 28 | =head1 RETURN VALUES | ||
| 29 | |||
| 30 | SSL_set_verify_result() does not provide a return value. | ||
| 31 | |||
| 32 | =head1 SEE ALSO | ||
| 33 | |||
| 34 | L<ssl(3)|ssl(3)>, L<SSL_get_verify_result(3)|SSL_get_verify_result(3)>, | ||
| 35 | L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>, | ||
| 36 | L<verify(1)|verify(1)> | ||
| 37 | |||
| 38 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod b/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod new file mode 100644 index 0000000000..20e273bd4d --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_shutdown - shut down a TLS/SSL connection | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_shutdown(SSL *ssl); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_shutdown() shuts down an active TLS/SSL connection. It sends the shutdown | ||
| 16 | alert to the peer. The behaviour of SSL_shutdown() depends on the underlying | ||
| 17 | BIO. | ||
| 18 | |||
| 19 | If the underlying BIO is B<blocking>, SSL_shutdown() will only return once the | ||
| 20 | handshake has been finished or an error occurred. | ||
| 21 | |||
| 22 | If the underlying BIO is B<non-blocking>, SSL_shutdown() will also return | ||
| 23 | when the underlying BIO could not satisfy the needs of SSL_shutdown() | ||
| 24 | to continue the handshake. In this case a call to SSL_get_error() with the | ||
| 25 | return value of SSL_shutdown() will yield B<SSL_ERROR_WANT_READ> or | ||
| 26 | B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after | ||
| 27 | taking appropriate action to satisfy the needs of SSL_shutdown(). | ||
| 28 | The action depends on the underlying BIO. When using a non-blocking socket, | ||
| 29 | nothing is to be done, but select() can be used to check for the required | ||
| 30 | condition. When using a buffering BIO, like a BIO pair, data must be written | ||
| 31 | into or retrieved out of the BIO before being able to continue. | ||
| 32 | |||
| 33 | =head1 RETURN VALUES | ||
| 34 | |||
| 35 | The following return values can occur: | ||
| 36 | |||
| 37 | =over 4 | ||
| 38 | |||
| 39 | =item 1 | ||
| 40 | |||
| 41 | The shutdown was successfully completed. | ||
| 42 | |||
| 43 | =item 0 | ||
| 44 | |||
| 45 | The shutdown was not successful. Call SSL_get_error() with the return | ||
| 46 | value B<ret> to find out the reason. | ||
| 47 | |||
| 48 | =item -1 | ||
| 49 | |||
| 50 | The shutdown was not successful because a fatal error occurred either | ||
| 51 | at the protocol level or a connection failure occurred. It can also occur of | ||
| 52 | action is need to continue the operation for non-blocking BIOs. | ||
| 53 | Call SSL_get_error() with the return value B<ret> to find out the reason. | ||
| 54 | |||
| 55 | =back | ||
| 56 | |||
| 57 | =head1 SEE ALSO | ||
| 58 | |||
| 59 | L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_connect(3)|SSL_connect(3)>, | ||
| 60 | L<SSL_accept(3)|SSL_accept(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)> | ||
| 61 | |||
| 62 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_write.pod b/src/lib/libssl/src/doc/ssl/SSL_write.pod new file mode 100644 index 0000000000..db67c187e0 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_write.pod | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | SSL_read - write bytes to a TLS/SSL connection. | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/ssl.h> | ||
| 10 | |||
| 11 | int SSL_write(SSL *ssl, char *buf, int num); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | SSL_write() writes B<num> bytes from the buffer B<buf> into the specified | ||
| 16 | B<ssl> connection. | ||
| 17 | |||
| 18 | =head1 NOTES | ||
| 19 | |||
| 20 | If necessary, SSL_write() will negotiate a TLS/SSL session, if | ||
| 21 | not already explicitly performed by SSL_connect() or SSL_accept(). If the | ||
| 22 | peer requests a re-negotiation, it will be performed transparently during | ||
| 23 | the SSL_write() operation. The behaviour of SSL_write() depends on the | ||
| 24 | underlying BIO. | ||
| 25 | |||
| 26 | If the underlying BIO is B<blocking>, SSL_write() will only return, once the | ||
| 27 | write operation has been finished or an error occurred. | ||
| 28 | |||
| 29 | If the underlying BIO is B<non-blocking>, SSL_write() will also return, | ||
| 30 | when the underlying BIO could not satisfy the needs of SSL_write() | ||
| 31 | to continue the operation. In this case a call to SSL_get_error() with the | ||
| 32 | return value of SSL_write() will yield B<SSL_ERROR_WANT_READ> or | ||
| 33 | B<SSL_ERROR_WANT_WRITE>. As at any time a re-negotiation is possible, a | ||
| 34 | call to SSL_write() can also cause write operations! The calling process | ||
| 35 | then must repeat the call after taking appropriate action to satisfy the | ||
| 36 | needs of SSL_write(). The action depends on the underlying BIO. When using a | ||
| 37 | non-blocking socket, nothing is to be done, but select() can be used to check | ||
| 38 | for the required condition. When using a buffering BIO, like a BIO pair, data | ||
| 39 | must be written into or retrieved out of the BIO before being able to continue. | ||
| 40 | |||
| 41 | =head1 WARNING | ||
| 42 | |||
| 43 | When an SSL_write() operation has to be repeated because of | ||
| 44 | B<SSL_ERROR_WANT_READ> or B<SSL_ERROR_WANT_WRITE>, it must be repeated | ||
| 45 | with the same arguments. | ||
| 46 | |||
| 47 | =head1 RETURN VALUES | ||
| 48 | |||
| 49 | The following return values can occur: | ||
| 50 | |||
| 51 | =over 4 | ||
| 52 | |||
| 53 | =item E<gt>0 | ||
| 54 | |||
| 55 | The write operation was successful, the return value is the number of | ||
| 56 | bytes actually written to the TLS/SSL connection. | ||
| 57 | |||
| 58 | =item 0 | ||
| 59 | |||
| 60 | The write operation was not successful. Call SSL_get_error() with the return | ||
| 61 | value B<ret> to find out, whether an error occurred. | ||
| 62 | |||
| 63 | =item -1 | ||
| 64 | |||
| 65 | The read operation was not successful, because either an error occurred | ||
| 66 | or action must be taken by the calling process. Call SSL_get_error() with the | ||
| 67 | return value B<ret> to find out the reason. | ||
| 68 | |||
| 69 | =back | ||
| 70 | |||
| 71 | =head1 SEE ALSO | ||
| 72 | |||
| 73 | L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_read(3)|SSL_read(3)>, | ||
| 74 | L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)> | ||
| 75 | |||
| 76 | =cut | ||
diff --git a/src/lib/libssl/src/doc/ssl/ssl.pod b/src/lib/libssl/src/doc/ssl/ssl.pod index 9dae13d9eb..7787376f7b 100644 --- a/src/lib/libssl/src/doc/ssl/ssl.pod +++ b/src/lib/libssl/src/doc/ssl/ssl.pod | |||
| @@ -83,7 +83,7 @@ B<SSL> structures which are later created for the connections. | |||
| 83 | 83 | ||
| 84 | =item B<SSL_SESSION> (SSL Session) | 84 | =item B<SSL_SESSION> (SSL Session) |
| 85 | 85 | ||
| 86 | This is a structure containing the current SSL session details for a | 86 | This is a structure containing the current TLS/SSL session details for a |
| 87 | connection: B<SSL_CIPHER>s, client and server certificates, keys, etc. | 87 | connection: B<SSL_CIPHER>s, client and server certificates, keys, etc. |
| 88 | 88 | ||
| 89 | =item B<SSL> (SSL Connection) | 89 | =item B<SSL> (SSL Connection) |
| @@ -163,7 +163,7 @@ Determine the number of bits in I<cipher>. Because of export crippled ciphers | |||
| 163 | there are two bits: The bits the algorithm supports in general (stored to | 163 | there are two bits: The bits the algorithm supports in general (stored to |
| 164 | I<alg_bits>) and the bits which are actually used (the return value). | 164 | I<alg_bits>) and the bits which are actually used (the return value). |
| 165 | 165 | ||
| 166 | =item char *B<SSL_CIPHER_get_name>(SSL_CIPHER *cipher); | 166 | =item const char *B<SSL_CIPHER_get_name>(SSL_CIPHER *cipher); |
| 167 | 167 | ||
| 168 | Return the internal name of I<cipher> as a string. These are the various | 168 | Return the internal name of I<cipher> as a string. These are the various |
| 169 | strings defined by the I<SSL2_TXT_xxx>, I<SSL3_TXT_xxx> and I<TLS1_TXT_xxx> | 169 | strings defined by the I<SSL2_TXT_xxx>, I<SSL3_TXT_xxx> and I<TLS1_TXT_xxx> |
| @@ -437,7 +437,7 @@ connection defined in the B<SSL> structure. | |||
| 437 | 437 | ||
| 438 | =item X509 *B<SSL_get_certificate>(SSL *ssl); | 438 | =item X509 *B<SSL_get_certificate>(SSL *ssl); |
| 439 | 439 | ||
| 440 | =item SSL_CIPHER *B<SSL_get_cipher>(SSL *ssl); | 440 | =item const char *B<SSL_get_cipher>(SSL *ssl); |
| 441 | 441 | ||
| 442 | =item int B<SSL_get_cipher_bits>(SSL *ssl, int *alg_bits); | 442 | =item int B<SSL_get_cipher_bits>(SSL *ssl, int *alg_bits); |
| 443 | 443 | ||
| @@ -624,7 +624,21 @@ connection defined in the B<SSL> structure. | |||
| 624 | =head1 SEE ALSO | 624 | =head1 SEE ALSO |
| 625 | 625 | ||
| 626 | L<openssl(1)|openssl(1)>, L<crypto(3)|crypto(3)>, | 626 | L<openssl(1)|openssl(1)>, L<crypto(3)|crypto(3)>, |
| 627 | L<SSL_get_error(3)|SSL_get_error(3)> | 627 | L<SSL_accept(3)|SSL_accept(3)>, L<SSL_clear(3)|SSL_clear(3)>, |
| 628 | L<SSL_connect(3)|SSL_connect(3)>, L<SSL_CTX_new(3)|SSL_CTX_new(3)>, | ||
| 629 | L<SSL_CTX_set_ssl_version(3)|SSL_CTX_set_ssl_version(3)>, | ||
| 630 | L<SSL_get_ciphers(3)|SSL_get_ciphers(3)>, | ||
| 631 | L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_get_fd(3)|SSL_get_fd(3)>, | ||
| 632 | L<SSL_get_peer_cert_chain(3)|SSL_get_peer_cert_chain(3)>, | ||
| 633 | L<SSL_get_rbio(3)|SSL_get_rbio(3)>, | ||
| 634 | L<SSL_get_session(3)|SSL_get_session(3)>, | ||
| 635 | L<SSL_get_verify_result(3)|SSL_get_verify_result(3)>, | ||
| 636 | L<SSL_library_init(3)|SSL_library_init(3)>, L<SSL_new(3)|SSL_new(3)>, | ||
| 637 | L<SSL_read(3)|SSL_read(3)>, L<SSL_set_bio(3)|SSL_set_bio(3)>, | ||
| 638 | L<SSL_set_fd(3)|SSL_set_fd(3)>, L<SSL_pending(3)|SSL_pending(3)>, | ||
| 639 | L<SSL_set_session(3)|SSL_set_session(3)>, | ||
| 640 | L<SSL_shutdown(3)|SSL_shutdown(3)>, L<SSL_write(3)|SSL_write(3)>, | ||
| 641 | L<SSL_SESSION_free(3)|SSL_SESSION_free(3)> | ||
| 628 | 642 | ||
| 629 | =head1 HISTORY | 643 | =head1 HISTORY |
| 630 | 644 | ||
diff --git a/src/lib/libssl/src/doc/standards.txt b/src/lib/libssl/src/doc/standards.txt new file mode 100644 index 0000000000..61ccc5d7e0 --- /dev/null +++ b/src/lib/libssl/src/doc/standards.txt | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | Standards related to OpenSSL | ||
| 2 | ============================ | ||
| 3 | |||
| 4 | [Please, this is currently a draft. I made a first try at finding | ||
| 5 | documents that describe parts of what OpenSSL implements. There are | ||
| 6 | big gaps, and I've most certainly done something wrong. Please | ||
| 7 | correct whatever is... Also, this note should be removed when this | ||
| 8 | file is reaching a somewhat correct state. -- Richard Levitte] | ||
| 9 | |||
| 10 | |||
| 11 | All pointers in here will be either URL's or blobs of text borrowed | ||
| 12 | from miscellaneous indexes, like rfc-index.txt (index of RFCs), | ||
| 13 | 1id-index.txt (index of Internet drafts) and the like. | ||
| 14 | |||
| 15 | To find the latest possible RFCs, it's recommended to either browse | ||
| 16 | ftp://ftp.isi.edu/in-notes/ or go to http://www.rfc-editor.org/ and | ||
| 17 | use the search mechanism found there. | ||
| 18 | To find the latest possible Internet drafts, it's recommended to | ||
| 19 | browse ftp://ftp.isi.edu/internet-drafts/. | ||
| 20 | To find the latest possible PKCS, it's recommended to browse | ||
| 21 | http://www.rsasecurity.com/rsalabs/pkcs/. | ||
| 22 | |||
| 23 | |||
| 24 | Implemented: | ||
| 25 | ------------ | ||
| 26 | |||
| 27 | These are documents that describe things that are implemented in OpenSSL. | ||
| 28 | |||
| 29 | 1319 The MD2 Message-Digest Algorithm. B. Kaliski. April 1992. | ||
| 30 | (Format: TXT=25661 bytes) (Status: INFORMATIONAL) | ||
| 31 | |||
| 32 | 1320 The MD4 Message-Digest Algorithm. R. Rivest. April 1992. (Format: | ||
| 33 | TXT=32407 bytes) (Status: INFORMATIONAL) | ||
| 34 | |||
| 35 | 1321 The MD5 Message-Digest Algorithm. R. Rivest. April 1992. (Format: | ||
| 36 | TXT=35222 bytes) (Status: INFORMATIONAL) | ||
| 37 | |||
| 38 | 2246 The TLS Protocol Version 1.0. T. Dierks, C. Allen. January 1999. | ||
| 39 | (Format: TXT=170401 bytes) (Status: PROPOSED STANDARD) | ||
| 40 | |||
| 41 | 2268 A Description of the RC2(r) Encryption Algorithm. R. Rivest. | ||
| 42 | January 1998. (Format: TXT=19048 bytes) (Status: INFORMATIONAL) | ||
| 43 | |||
| 44 | 2314 PKCS 10: Certification Request Syntax Version 1.5. B. Kaliski. | ||
| 45 | March 1998. (Format: TXT=15814 bytes) (Status: INFORMATIONAL) | ||
| 46 | |||
| 47 | 2315 PKCS 7: Cryptographic Message Syntax Version 1.5. B. Kaliski. | ||
| 48 | March 1998. (Format: TXT=69679 bytes) (Status: INFORMATIONAL) | ||
| 49 | |||
| 50 | 2437 PKCS #1: RSA Cryptography Specifications Version 2.0. B. Kaliski, | ||
| 51 | J. Staddon. October 1998. (Format: TXT=73529 bytes) (Obsoletes | ||
| 52 | RFC2313) (Status: INFORMATIONAL) | ||
| 53 | |||
| 54 | 2459 Internet X.509 Public Key Infrastructure Certificate and CRL | ||
| 55 | Profile. R. Housley, W. Ford, W. Polk, D. Solo. January 1999. | ||
| 56 | (Format: TXT=278438 bytes) (Status: PROPOSED STANDARD) | ||
| 57 | |||
| 58 | PKCS#8: Private-Key Information Syntax Standard | ||
| 59 | |||
| 60 | PKCS#12: Personal Information Exchange Syntax Standard, version 1.0. | ||
| 61 | |||
| 62 | |||
| 63 | Related: | ||
| 64 | -------- | ||
| 65 | |||
| 66 | These are documents that are close to OpenSSL, for example the | ||
| 67 | STARTTLS documents. | ||
| 68 | |||
| 69 | 1421 Privacy Enhancement for Internet Electronic Mail: Part I: Message | ||
| 70 | Encryption and Authentication Procedures. J. Linn. February 1993. | ||
| 71 | (Format: TXT=103894 bytes) (Obsoletes RFC1113) (Status: PROPOSED | ||
| 72 | STANDARD) | ||
| 73 | |||
| 74 | 1422 Privacy Enhancement for Internet Electronic Mail: Part II: | ||
| 75 | Certificate-Based Key Management. S. Kent. February 1993. (Format: | ||
| 76 | TXT=86085 bytes) (Obsoletes RFC1114) (Status: PROPOSED STANDARD) | ||
| 77 | |||
| 78 | 1423 Privacy Enhancement for Internet Electronic Mail: Part III: | ||
| 79 | Algorithms, Modes, and Identifiers. D. Balenson. February 1993. | ||
| 80 | (Format: TXT=33277 bytes) (Obsoletes RFC1115) (Status: PROPOSED | ||
| 81 | STANDARD) | ||
| 82 | |||
| 83 | 1424 Privacy Enhancement for Internet Electronic Mail: Part IV: Key | ||
| 84 | Certification and Related Services. B. Kaliski. February 1993. | ||
| 85 | (Format: TXT=17537 bytes) (Status: PROPOSED STANDARD) | ||
| 86 | |||
| 87 | 2487 SMTP Service Extension for Secure SMTP over TLS. P. Hoffman. | ||
| 88 | January 1999. (Format: TXT=15120 bytes) (Status: PROPOSED STANDARD) | ||
| 89 | |||
| 90 | 2585 Internet X.509 Public Key Infrastructure Operational Protocols: | ||
| 91 | FTP and HTTP. R. Housley, P. Hoffman. May 1999. (Format: TXT=14813 | ||
| 92 | bytes) (Status: PROPOSED STANDARD) | ||
| 93 | |||
| 94 | 2595 Using TLS with IMAP, POP3 and ACAP. C. Newman. June 1999. | ||
| 95 | (Format: TXT=32440 bytes) (Status: PROPOSED STANDARD) | ||
| 96 | |||
| 97 | 2712 Addition of Kerberos Cipher Suites to Transport Layer Security | ||
| 98 | (TLS). A. Medvinsky, M. Hur. October 1999. (Format: TXT=13763 bytes) | ||
| 99 | (Status: PROPOSED STANDARD) | ||
| 100 | |||
| 101 | 2817 Upgrading to TLS Within HTTP/1.1. R. Khare, S. Lawrence. May | ||
| 102 | 2000. (Format: TXT=27598 bytes) (Updates RFC2616) (Status: PROPOSED | ||
| 103 | STANDARD) | ||
| 104 | |||
| 105 | 2818 HTTP Over TLS. E. Rescorla. May 2000. (Format: TXT=15170 bytes) | ||
| 106 | (Status: INFORMATIONAL) | ||
| 107 | |||
| 108 | "Securing FTP with TLS", 01/27/2000, <draft-murray-auth-ftp-ssl-05.txt> | ||
| 109 | |||
| 110 | |||
| 111 | To be implemented: | ||
| 112 | ------------------ | ||
| 113 | |||
| 114 | These are documents that describe things that are planed to be | ||
| 115 | implemented in the hopefully short future. | ||
| 116 | |||
| 117 | 2560 X.509 Internet Public Key Infrastructure Online Certificate | ||
| 118 | Status Protocol - OCSP. M. Myers, R. Ankney, A. Malpani, S. Galperin, | ||
| 119 | C. Adams. June 1999. (Format: TXT=43243 bytes) (Status: PROPOSED | ||
| 120 | STANDARD) | ||
| 121 | |||
diff --git a/src/lib/libssl/src/e_os.h b/src/lib/libssl/src/e_os.h index 406bd4fc78..318e83edb5 100644 --- a/src/lib/libssl/src/e_os.h +++ b/src/lib/libssl/src/e_os.h | |||
| @@ -87,6 +87,7 @@ extern "C" { | |||
| 87 | # ifndef MAC_OS_GUSI_SOURCE | 87 | # ifndef MAC_OS_GUSI_SOURCE |
| 88 | # define MAC_OS_pre_X | 88 | # define MAC_OS_pre_X |
| 89 | # define NO_SYS_TYPES_H | 89 | # define NO_SYS_TYPES_H |
| 90 | typedef long ssize_t; | ||
| 90 | # endif | 91 | # endif |
| 91 | # define NO_SYS_PARAM_H | 92 | # define NO_SYS_PARAM_H |
| 92 | # define NO_CHMOD | 93 | # define NO_CHMOD |
| @@ -107,11 +108,11 @@ extern "C" { | |||
| 107 | # define MS_STATIC | 108 | # define MS_STATIC |
| 108 | #endif | 109 | #endif |
| 109 | 110 | ||
| 110 | #if defined(_WIN32) && !defined(WIN32) | 111 | #if defined(_WIN32) && !defined(WIN32) && !defined(__CYGWIN32__) |
| 111 | # define WIN32 | 112 | # define WIN32 |
| 112 | #endif | 113 | #endif |
| 113 | 114 | ||
| 114 | #if defined(WIN32) || defined(WIN16) | 115 | #if (defined(WIN32) || defined(WIN16)) && !defined(__CYGWIN32__) |
| 115 | # ifndef WINDOWS | 116 | # ifndef WINDOWS |
| 116 | # define WINDOWS | 117 | # define WINDOWS |
| 117 | # endif | 118 | # endif |
| @@ -135,7 +136,7 @@ extern "C" { | |||
| 135 | #define clear_sys_error() errno=0 | 136 | #define clear_sys_error() errno=0 |
| 136 | #endif | 137 | #endif |
| 137 | 138 | ||
| 138 | #ifdef WINDOWS | 139 | #if defined(WINDOWS) && !defined(__CYGWIN32__) |
| 139 | #define get_last_socket_error() WSAGetLastError() | 140 | #define get_last_socket_error() WSAGetLastError() |
| 140 | #define clear_socket_error() WSASetLastError(0) | 141 | #define clear_socket_error() WSASetLastError(0) |
| 141 | #define readsocket(s,b,n) recv((s),(b),(n),0) | 142 | #define readsocket(s,b,n) recv((s),(b),(n),0) |
| @@ -169,7 +170,7 @@ extern "C" { | |||
| 169 | # define NO_FP_API | 170 | # define NO_FP_API |
| 170 | #endif | 171 | #endif |
| 171 | 172 | ||
| 172 | #if defined(WINDOWS) || defined(MSDOS) | 173 | #if (defined(WINDOWS) || defined(MSDOS)) && !defined(__CYGWIN32__) |
| 173 | 174 | ||
| 174 | #ifndef S_IFDIR | 175 | #ifndef S_IFDIR |
| 175 | #define S_IFDIR _S_IFDIR | 176 | #define S_IFDIR _S_IFDIR |
| @@ -259,6 +260,9 @@ extern "C" { | |||
| 259 | # define NO_SYS_PARAM_H | 260 | # define NO_SYS_PARAM_H |
| 260 | # else | 261 | # else |
| 261 | /* !defined VMS */ | 262 | /* !defined VMS */ |
| 263 | # ifdef MPE | ||
| 264 | # define NO_SYS_PARAM_H | ||
| 265 | # endif | ||
| 262 | # ifdef OPENSSL_UNISTD | 266 | # ifdef OPENSSL_UNISTD |
| 263 | # include OPENSSL_UNISTD | 267 | # include OPENSSL_UNISTD |
| 264 | # else | 268 | # else |
| @@ -267,6 +271,16 @@ extern "C" { | |||
| 267 | # ifndef NO_SYS_TYPES_H | 271 | # ifndef NO_SYS_TYPES_H |
| 268 | # include <sys/types.h> | 272 | # include <sys/types.h> |
| 269 | # endif | 273 | # endif |
| 274 | # if defined(NeXT) || defined(NEWS4) | ||
| 275 | # define pid_t int /* pid_t is missing on NEXTSTEP/OPENSTEP | ||
| 276 | * (unless when compiling with -D_POSIX_SOURCE, | ||
| 277 | * which doesn't work for us) */ | ||
| 278 | # define ssize_t int /* ditto */ | ||
| 279 | # endif | ||
| 280 | # ifdef NEWS4 /* setvbuf is missing on mips-sony-bsd */ | ||
| 281 | # define setvbuf(a, b, c, d) setbuffer((a), (b), (d)) | ||
| 282 | typedef unsigned long clock_t; | ||
| 283 | # endif | ||
| 270 | 284 | ||
| 271 | # define OPENSSL_CONF "openssl.cnf" | 285 | # define OPENSSL_CONF "openssl.cnf" |
| 272 | # define SSLEAY_CONF OPENSSL_CONF | 286 | # define SSLEAY_CONF OPENSSL_CONF |
| @@ -318,7 +332,9 @@ extern HINSTANCE _hInstance; | |||
| 318 | # ifndef NO_SYS_PARAM_H | 332 | # ifndef NO_SYS_PARAM_H |
| 319 | # include <sys/param.h> | 333 | # include <sys/param.h> |
| 320 | # endif | 334 | # endif |
| 321 | # include <sys/time.h> /* Needed under linux for FD_XXX */ | 335 | # ifndef MPE |
| 336 | # include <sys/time.h> /* Needed under linux for FD_XXX */ | ||
| 337 | # endif | ||
| 322 | 338 | ||
| 323 | # include <netdb.h> | 339 | # include <netdb.h> |
| 324 | # if defined(VMS) && !defined(__DECC) | 340 | # if defined(VMS) && !defined(__DECC) |
| @@ -341,6 +357,10 @@ extern HINSTANCE _hInstance; | |||
| 341 | # include <sys/select.h> | 357 | # include <sys/select.h> |
| 342 | # endif | 358 | # endif |
| 343 | 359 | ||
| 360 | # ifdef __QNX__ | ||
| 361 | # include <sys/select.h> | ||
| 362 | # endif | ||
| 363 | |||
| 344 | # if defined(sun) | 364 | # if defined(sun) |
| 345 | # include <sys/filio.h> | 365 | # include <sys/filio.h> |
| 346 | # else | 366 | # else |
| @@ -375,6 +395,15 @@ extern HINSTANCE _hInstance; | |||
| 375 | #endif | 395 | #endif |
| 376 | #endif | 396 | #endif |
| 377 | 397 | ||
| 398 | #if defined(sun) && !defined(__svr4__) && !defined(__SVR4) | ||
| 399 | /* bcopy can handle overlapping moves according to SunOS 4.1.4 manpage */ | ||
| 400 | # define memmove(s1,s2,n) bcopy((s2),(s1),(n)) | ||
| 401 | # define strtoul(s,e,b) ((unsigned long int)strtol((s),(e),(b))) | ||
| 402 | extern char *sys_errlist[]; extern int sys_nerr; | ||
| 403 | # define strerror(errnum) \ | ||
| 404 | (((errnum)<0 || (errnum)>=sys_nerr) ? NULL : sys_errlist[errnum]) | ||
| 405 | #endif | ||
| 406 | |||
| 378 | /***********************************************/ | 407 | /***********************************************/ |
| 379 | 408 | ||
| 380 | /* do we need to do this for getenv. | 409 | /* do we need to do this for getenv. |
diff --git a/src/lib/libssl/src/e_os2.h b/src/lib/libssl/src/e_os2.h index bd97b921a8..5a25ac7cf6 100644 --- a/src/lib/libssl/src/e_os2.h +++ b/src/lib/libssl/src/e_os2.h | |||
| @@ -3,12 +3,12 @@ | |||
| 3 | #ifndef HEADER_E_OS2_H | 3 | #ifndef HEADER_E_OS2_H |
| 4 | #define HEADER_E_OS2_H | 4 | #define HEADER_E_OS2_H |
| 5 | 5 | ||
| 6 | #include <openssl/opensslconf.h> /* OPENSSL_UNISTD */ | ||
| 7 | |||
| 6 | #ifdef __cplusplus | 8 | #ifdef __cplusplus |
| 7 | extern "C" { | 9 | extern "C" { |
| 8 | #endif | 10 | #endif |
| 9 | 11 | ||
| 10 | #include <openssl/opensslconf.h> /* OPENSSL_UNISTD */ | ||
| 11 | |||
| 12 | #ifdef MSDOS | 12 | #ifdef MSDOS |
| 13 | # define OPENSSL_UNISTD_IO <io.h> | 13 | # define OPENSSL_UNISTD_IO <io.h> |
| 14 | # define OPENSSL_DECLARE_EXIT extern void exit(int); | 14 | # define OPENSSL_DECLARE_EXIT extern void exit(int); |
diff --git a/src/lib/libssl/src/makevms.com b/src/lib/libssl/src/makevms.com index e89b309e87..733e0e6f4f 100644 --- a/src/lib/libssl/src/makevms.com +++ b/src/lib/libssl/src/makevms.com | |||
| @@ -314,7 +314,11 @@ $! Tell The User We Are Partly Rebuilding The [.TEST] Directory. | |||
| 314 | $! | 314 | $! |
| 315 | $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files." | 315 | $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files." |
| 316 | $! | 316 | $! |
| 317 | $ DELETE SYS$DISK:[.APPS]MD5.C;*,RMD160.C;* | 317 | $ DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;* |
| 318 | $! | ||
| 319 | $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS] | ||
| 320 | $! | ||
| 321 | $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS] | ||
| 318 | $! | 322 | $! |
| 319 | $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS] | 323 | $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS] |
| 320 | $! | 324 | $! |
| @@ -357,14 +361,14 @@ $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL] | |||
| 357 | $! | 361 | $! |
| 358 | $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree. | 362 | $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree. |
| 359 | $! | 363 | $! |
| 360 | $ SDIRS := ,MD2,MD5,SHA,MDC2,HMAC,RIPEMD,- | 364 | $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- |
| 361 | DES,RC2,RC4,RC5,IDEA,BF,CAST,- | 365 | DES,RC2,RC4,RC5,IDEA,BF,CAST,- |
| 362 | BN,RSA,DSA,DH,- | 366 | BN,RSA,DSA,DH,DSO,ENGINE,- |
| 363 | BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- | 367 | BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- |
| 364 | EVP,ASN1,PEM,X509,X509V3,- | 368 | EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP |
| 365 | CONF,TXT_DB,PKCS7,PKCS12,COMP | 369 | $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h |
| 366 | $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h | ||
| 367 | $ EXHEADER_MD2 := md2.h | 370 | $ EXHEADER_MD2 := md2.h |
| 371 | $ EXHEADER_MD4 := md4.h | ||
| 368 | $ EXHEADER_MD5 := md5.h | 372 | $ EXHEADER_MD5 := md5.h |
| 369 | $ EXHEADER_SHA := sha.h | 373 | $ EXHEADER_SHA := sha.h |
| 370 | $ EXHEADER_MDC2 := mdc2.h | 374 | $ EXHEADER_MDC2 := mdc2.h |
| @@ -381,19 +385,21 @@ $ EXHEADER_BN := bn.h | |||
| 381 | $ EXHEADER_RSA := rsa.h | 385 | $ EXHEADER_RSA := rsa.h |
| 382 | $ EXHEADER_DSA := dsa.h | 386 | $ EXHEADER_DSA := dsa.h |
| 383 | $ EXHEADER_DH := dh.h | 387 | $ EXHEADER_DH := dh.h |
| 388 | $ EXHEADER_DSO := dso.h | ||
| 389 | $ EXHEADER_ENGINE := engine.h | ||
| 384 | $ EXHEADER_BUFFER := buffer.h | 390 | $ EXHEADER_BUFFER := buffer.h |
| 385 | $ EXHEADER_BIO := bio.h | 391 | $ EXHEADER_BIO := bio.h |
| 386 | $ EXHEADER_STACK := stack.h,safestack.h | 392 | $ EXHEADER_STACK := stack.h,safestack.h |
| 387 | $ EXHEADER_LHASH := lhash.h | 393 | $ EXHEADER_LHASH := lhash.h |
| 388 | $ EXHEADER_RAND := rand.h | 394 | $ EXHEADER_RAND := rand.h |
| 389 | $ EXHEADER_ERR := err.h | 395 | $ EXHEADER_ERR := err.h |
| 390 | $ EXHEADER_OBJECTS := objects.h | 396 | $ EXHEADER_OBJECTS := objects.h,obj_mac.h |
| 391 | $ EXHEADER_EVP := evp.h | 397 | $ EXHEADER_EVP := evp.h |
| 392 | $ EXHEADER_ASN1 := asn1.h,asn1_mac.h | 398 | $ EXHEADER_ASN1 := asn1.h,asn1_mac.h |
| 393 | $ EXHEADER_PEM := pem.h,pem2.h | 399 | $ EXHEADER_PEM := pem.h,pem2.h |
| 394 | $ EXHEADER_X509 := x509.h,x509_vfy.h | 400 | $ EXHEADER_X509 := x509.h,x509_vfy.h |
| 395 | $ EXHEADER_X509V3 := x509v3.h | 401 | $ EXHEADER_X509V3 := x509v3.h |
| 396 | $ EXHEADER_CONF := conf.h | 402 | $ EXHEADER_CONF := conf.h,conf_api.h |
| 397 | $ EXHEADER_TXT_DB := txt_db.h | 403 | $ EXHEADER_TXT_DB := txt_db.h |
| 398 | $ EXHEADER_PKCS7 := pkcs7.h | 404 | $ EXHEADER_PKCS7 := pkcs7.h |
| 399 | $ EXHEADER_PKCS12 := pkcs12.h | 405 | $ EXHEADER_PKCS12 := pkcs12.h |
| @@ -424,11 +430,6 @@ $! | |||
| 424 | $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h | 430 | $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h |
| 425 | $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL] | 431 | $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL] |
| 426 | $! | 432 | $! |
| 427 | $! Copy All The ".H" Files From The [.VMS] Directory. | ||
| 428 | $! | ||
| 429 | $ EXHEADER := vms_idhacks.h | ||
| 430 | $ COPY SYS$DISK:[.VMS]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL] | ||
| 431 | $! | ||
| 432 | $! Purge all doubles | 433 | $! Purge all doubles |
| 433 | $! | 434 | $! |
| 434 | $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H | 435 | $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H |
diff --git a/src/lib/libssl/src/ms/mingw32.bat b/src/lib/libssl/src/ms/mingw32.bat index 1726c55bcd..db70b8580e 100644 --- a/src/lib/libssl/src/ms/mingw32.bat +++ b/src/lib/libssl/src/ms/mingw32.bat | |||
| @@ -76,6 +76,8 @@ rem Create files -- this can be skipped if using the GNU file utilities | |||
| 76 | make -f ms/mingw32f.mak | 76 | make -f ms/mingw32f.mak |
| 77 | echo You can ignore the error messages above | 77 | echo You can ignore the error messages above |
| 78 | 78 | ||
| 79 | copy ms\tlhelp32.h outinc | ||
| 80 | |||
| 79 | echo Building the libraries | 81 | echo Building the libraries |
| 80 | make -f ms/mingw32a.mak | 82 | make -f ms/mingw32a.mak |
| 81 | if errorlevel 1 goto end | 83 | if errorlevel 1 goto end |
diff --git a/src/lib/libssl/src/ms/tlhelp32.h b/src/lib/libssl/src/ms/tlhelp32.h new file mode 100644 index 0000000000..8f4222e34f --- /dev/null +++ b/src/lib/libssl/src/ms/tlhelp32.h | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | /* | ||
| 2 | tlhelp32.h - Include file for Tool help functions. | ||
| 3 | |||
| 4 | Written by Mumit Khan <khan@nanotech.wisc.edu> | ||
| 5 | |||
| 6 | This file is part of a free library for the Win32 API. | ||
| 7 | |||
| 8 | This library is distributed in the hope that it will be useful, | ||
| 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 11 | |||
| 12 | */ | ||
| 13 | #ifndef _TLHELP32_H | ||
| 14 | #define _TLHELP32_H | ||
| 15 | #ifdef __cplusplus | ||
| 16 | extern "C" { | ||
| 17 | #endif | ||
| 18 | #define HF32_DEFAULT 1 | ||
| 19 | #define HF32_SHARED 2 | ||
| 20 | #define LF32_FIXED 0x1 | ||
| 21 | #define LF32_FREE 0x2 | ||
| 22 | #define LF32_MOVEABLE 0x4 | ||
| 23 | #define MAX_MODULE_NAME32 255 | ||
| 24 | #define TH32CS_SNAPHEAPLIST 0x1 | ||
| 25 | #define TH32CS_SNAPPROCESS 0x2 | ||
| 26 | #define TH32CS_SNAPTHREAD 0x4 | ||
| 27 | #define TH32CS_SNAPMODULE 0x8 | ||
| 28 | #define TH32CS_SNAPALL (TH32CS_SNAPHEAPLIST|TH32CS_SNAPPROCESS|TH32CS_SNAPTHREAD|TH32CS_SNAPMODULE) | ||
| 29 | #define TH32CS_INHERIT 0x80000000 | ||
| 30 | typedef struct tagHEAPLIST32 { | ||
| 31 | DWORD dwSize; | ||
| 32 | DWORD th32ProcessID; | ||
| 33 | DWORD th32HeapID; | ||
| 34 | DWORD dwFlags; | ||
| 35 | } HEAPLIST32,*PHEAPLIST32,*LPHEAPLIST32; | ||
| 36 | typedef struct tagHEAPENTRY32 { | ||
| 37 | DWORD dwSize; | ||
| 38 | HANDLE hHandle; | ||
| 39 | DWORD dwAddress; | ||
| 40 | DWORD dwBlockSize; | ||
| 41 | DWORD dwFlags; | ||
| 42 | DWORD dwLockCount; | ||
| 43 | DWORD dwResvd; | ||
| 44 | DWORD th32ProcessID; | ||
| 45 | DWORD th32HeapID; | ||
| 46 | } HEAPENTRY32,*PHEAPENTRY32,*LPHEAPENTRY32; | ||
| 47 | typedef struct tagPROCESSENTRY32W { | ||
| 48 | DWORD dwSize; | ||
| 49 | DWORD cntUsage; | ||
| 50 | DWORD th32ProcessID; | ||
| 51 | DWORD th32DefaultHeapID; | ||
| 52 | DWORD th32ModuleID; | ||
| 53 | DWORD cntThreads; | ||
| 54 | DWORD th32ParentProcessID; | ||
| 55 | LONG pcPriClassBase; | ||
| 56 | DWORD dwFlags; | ||
| 57 | WCHAR szExeFile[MAX_PATH]; | ||
| 58 | } PROCESSENTRY32W,*PPROCESSENTRY32W,*LPPROCESSENTRY32W; | ||
| 59 | typedef struct tagPROCESSENTRY32 { | ||
| 60 | DWORD dwSize; | ||
| 61 | DWORD cntUsage; | ||
| 62 | DWORD th32ProcessID; | ||
| 63 | DWORD th32DefaultHeapID; | ||
| 64 | DWORD th32ModuleID; | ||
| 65 | DWORD cntThreads; | ||
| 66 | DWORD th32ParentProcessID; | ||
| 67 | LONG pcPriClassBase; | ||
| 68 | DWORD dwFlags; | ||
| 69 | CHAR szExeFile[MAX_PATH]; | ||
| 70 | } PROCESSENTRY32,*PPROCESSENTRY32,*LPPROCESSENTRY32; | ||
| 71 | typedef struct tagTHREADENTRY32 { | ||
| 72 | DWORD dwSize; | ||
| 73 | DWORD cntUsage; | ||
| 74 | DWORD th32ThreadID; | ||
| 75 | DWORD th32OwnerProcessID; | ||
| 76 | LONG tpBasePri; | ||
| 77 | LONG tpDeltaPri; | ||
| 78 | DWORD dwFlags; | ||
| 79 | } THREADENTRY32,*PTHREADENTRY32,*LPTHREADENTRY32; | ||
| 80 | typedef struct tagMODULEENTRY32W { | ||
| 81 | DWORD dwSize; | ||
| 82 | DWORD th32ModuleID; | ||
| 83 | DWORD th32ProcessID; | ||
| 84 | DWORD GlblcntUsage; | ||
| 85 | DWORD ProccntUsage; | ||
| 86 | BYTE *modBaseAddr; | ||
| 87 | DWORD modBaseSize; | ||
| 88 | HMODULE hModule; | ||
| 89 | WCHAR szModule[MAX_MODULE_NAME32 + 1]; | ||
| 90 | WCHAR szExePath[MAX_PATH]; | ||
| 91 | } MODULEENTRY32W,*PMODULEENTRY32W,*LPMODULEENTRY32W; | ||
| 92 | typedef struct tagMODULEENTRY32 { | ||
| 93 | DWORD dwSize; | ||
| 94 | DWORD th32ModuleID; | ||
| 95 | DWORD th32ProcessID; | ||
| 96 | DWORD GlblcntUsage; | ||
| 97 | DWORD ProccntUsage; | ||
| 98 | BYTE *modBaseAddr; | ||
| 99 | DWORD modBaseSize; | ||
| 100 | HMODULE hModule; | ||
| 101 | char szModule[MAX_MODULE_NAME32 + 1]; | ||
| 102 | char szExePath[MAX_PATH]; | ||
| 103 | } MODULEENTRY32,*PMODULEENTRY32,*LPMODULEENTRY32; | ||
| 104 | BOOL WINAPI Heap32First(LPHEAPENTRY32,DWORD,DWORD); | ||
| 105 | BOOL WINAPI Heap32ListFirst(HANDLE,LPHEAPLIST32); | ||
| 106 | BOOL WINAPI Heap32ListNext(HANDLE,LPHEAPLIST32); | ||
| 107 | BOOL WINAPI Heap32Next(LPHEAPENTRY32); | ||
| 108 | BOOL WINAPI Module32First(HANDLE,LPMODULEENTRY32); | ||
| 109 | BOOL WINAPI Module32FirstW(HANDLE,LPMODULEENTRY32W); | ||
| 110 | BOOL WINAPI Module32Next(HANDLE,LPMODULEENTRY32); | ||
| 111 | BOOL WINAPI Module32NextW(HANDLE,LPMODULEENTRY32W); | ||
| 112 | BOOL WINAPI Process32First(HANDLE,LPPROCESSENTRY32); | ||
| 113 | BOOL WINAPI Process32FirstW(HANDLE,LPPROCESSENTRY32W); | ||
| 114 | BOOL WINAPI Process32Next(HANDLE,LPPROCESSENTRY32); | ||
| 115 | BOOL WINAPI Process32NextW(HANDLE,LPPROCESSENTRY32W); | ||
| 116 | BOOL WINAPI Thread32First(HANDLE,LPTHREADENTRY32); | ||
| 117 | BOOL WINAPI Thread32Next(HANDLE,LPTHREADENTRY32); | ||
| 118 | BOOL WINAPI Toolhelp32ReadProcessMemory(DWORD,LPCVOID,LPVOID,DWORD,LPDWORD); | ||
| 119 | HANDLE WINAPI CreateToolhelp32Snapshot(DWORD,DWORD); | ||
| 120 | #ifdef UNICODE | ||
| 121 | #define LPMODULEENTRY32 LPMODULEENTRY32W | ||
| 122 | #define LPPROCESSENTRY32 LPPROCESSENTRY32W | ||
| 123 | #define MODULEENTRY32 MODULEENTRY32W | ||
| 124 | #define Module32First Module32FirstW | ||
| 125 | #define Module32Next Module32NextW | ||
| 126 | #define PMODULEENTRY32 PMODULEENTRY32W | ||
| 127 | #define PPROCESSENTRY32 PPROCESSENTRY32W | ||
| 128 | #define PROCESSENTRY32 PROCESSENTRY32W | ||
| 129 | #define Process32First Process32FirstW | ||
| 130 | #define Process32Next Process32NextW | ||
| 131 | #endif /* UNICODE */ | ||
| 132 | #ifdef __cplusplus | ||
| 133 | } | ||
| 134 | #endif | ||
| 135 | #endif /* _TLHELP32_H */ | ||
| 136 | |||
diff --git a/src/lib/libssl/src/openssl.spec b/src/lib/libssl/src/openssl.spec new file mode 100644 index 0000000000..1c8f4e9d81 --- /dev/null +++ b/src/lib/libssl/src/openssl.spec | |||
| @@ -0,0 +1,213 @@ | |||
| 1 | %define libmaj 0 | ||
| 2 | %define libmin 9 | ||
| 3 | %define librel 6 | ||
| 4 | #%define librev | ||
| 5 | Release: 1 | ||
| 6 | |||
| 7 | %define openssldir /var/ssl | ||
| 8 | |||
| 9 | Summary: Secure Sockets Layer and cryptography libraries and tools | ||
| 10 | Name: openssl-engine | ||
| 11 | Version: %{libmaj}.%{libmin}.%{librel} | ||
| 12 | #Version: %{libmaj}.%{libmin}.%{librel}%{librev} | ||
| 13 | Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz | ||
| 14 | Copyright: Freely distributable | ||
| 15 | Group: System Environment/Libraries | ||
| 16 | Provides: SSL | ||
| 17 | URL: http://www.openssl.org/ | ||
| 18 | Packager: Damien Miller <djm@mindrot.org> | ||
| 19 | BuildRoot: /var/tmp/%{name}-%{version}-root | ||
| 20 | |||
| 21 | %description | ||
| 22 | The OpenSSL Project is a collaborative effort to develop a robust, | ||
| 23 | commercial-grade, fully featured, and Open Source toolkit implementing the | ||
| 24 | Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) | ||
| 25 | protocols as well as a full-strength general purpose cryptography library. | ||
| 26 | The project is managed by a worldwide community of volunteers that use the | ||
| 27 | Internet to communicate, plan, and develop the OpenSSL tookit and its related | ||
| 28 | documentation. | ||
| 29 | |||
| 30 | OpenSSL is based on the excellent SSLeay library developed from Eric A. | ||
| 31 | Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an | ||
| 32 | Apache-style licence, which basically means that you are free to get and | ||
| 33 | use it for commercial and non-commercial purposes. | ||
| 34 | |||
| 35 | This package contains the base OpenSSL cryptography and SSL/TLS | ||
| 36 | libraries and tools. | ||
| 37 | |||
| 38 | %package devel | ||
| 39 | Summary: Secure Sockets Layer and cryptography static libraries and headers | ||
| 40 | Group: Development/Libraries | ||
| 41 | Requires: openssl-engine | ||
| 42 | %description devel | ||
| 43 | The OpenSSL Project is a collaborative effort to develop a robust, | ||
| 44 | commercial-grade, fully featured, and Open Source toolkit implementing the | ||
| 45 | Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) | ||
| 46 | protocols as well as a full-strength general purpose cryptography library. | ||
| 47 | The project is managed by a worldwide community of volunteers that use the | ||
| 48 | Internet to communicate, plan, and develop the OpenSSL tookit and its related | ||
| 49 | documentation. | ||
| 50 | |||
| 51 | OpenSSL is based on the excellent SSLeay library developed from Eric A. | ||
| 52 | Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an | ||
| 53 | Apache-style licence, which basically means that you are free to get and | ||
| 54 | use it for commercial and non-commercial purposes. | ||
| 55 | |||
| 56 | This package contains the the OpenSSL cryptography and SSL/TLS | ||
| 57 | static libraries and header files required when developing applications. | ||
| 58 | |||
| 59 | %package doc | ||
| 60 | Summary: OpenSSL miscellaneous files | ||
| 61 | Group: Documentation | ||
| 62 | Requires: openssl-engine | ||
| 63 | %description doc | ||
| 64 | The OpenSSL Project is a collaborative effort to develop a robust, | ||
| 65 | commercial-grade, fully featured, and Open Source toolkit implementing the | ||
| 66 | Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) | ||
| 67 | protocols as well as a full-strength general purpose cryptography library. | ||
| 68 | The project is managed by a worldwide community of volunteers that use the | ||
| 69 | Internet to communicate, plan, and develop the OpenSSL tookit and its related | ||
| 70 | documentation. | ||
| 71 | |||
| 72 | OpenSSL is based on the excellent SSLeay library developed from Eric A. | ||
| 73 | Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an | ||
| 74 | Apache-style licence, which basically means that you are free to get and | ||
| 75 | use it for commercial and non-commercial purposes. | ||
| 76 | |||
| 77 | This package contains the the OpenSSL cryptography and SSL/TLS extra | ||
| 78 | documentation and POD files from which the man pages were produced. | ||
| 79 | |||
| 80 | %prep | ||
| 81 | |||
| 82 | %setup -q | ||
| 83 | |||
| 84 | %build | ||
| 85 | |||
| 86 | %define CONFIG_FLAGS -DSSL_ALLOW_ADH --prefix=/usr | ||
| 87 | |||
| 88 | perl util/perlpath.pl /usr/bin/perl | ||
| 89 | |||
| 90 | %ifarch i386 i486 i586 i686 | ||
| 91 | ./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-elf | ||
| 92 | #!#./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-elf shared | ||
| 93 | %endif | ||
| 94 | %ifarch ppc | ||
| 95 | ./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-ppc | ||
| 96 | #!#./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-ppc shared | ||
| 97 | %endif | ||
| 98 | %ifarch alpha | ||
| 99 | ./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-alpha | ||
| 100 | #!#./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-alpha shared | ||
| 101 | %endif | ||
| 102 | LD_LIBRARY_PATH=`pwd` make | ||
| 103 | LD_LIBRARY_PATH=`pwd` make rehash | ||
| 104 | LD_LIBRARY_PATH=`pwd` make test | ||
| 105 | |||
| 106 | %install | ||
| 107 | rm -rf $RPM_BUILD_ROOT | ||
| 108 | make install MANDIR=/usr/man INSTALL_PREFIX="$RPM_BUILD_ROOT" | ||
| 109 | |||
| 110 | # Rename manpages | ||
| 111 | for x in $RPM_BUILD_ROOT/usr/man/man*/* | ||
| 112 | do mv ${x} ${x}ssl | ||
| 113 | done | ||
| 114 | |||
| 115 | # Install RSAref stuff | ||
| 116 | install -m644 rsaref/rsaref.h $RPM_BUILD_ROOT/usr/include/openssl | ||
| 117 | install -m644 libRSAglue.a $RPM_BUILD_ROOT/usr/lib | ||
| 118 | |||
| 119 | # Make backwards-compatibility symlink to ssleay | ||
| 120 | ln -s /usr/bin/openssl $RPM_BUILD_ROOT/usr/bin/ssleay | ||
| 121 | |||
| 122 | # Install shared libs | ||
| 123 | install -m644 libcrypto.a $RPM_BUILD_ROOT/usr/lib | ||
| 124 | #!#install -m755 libcrypto.so.%{libmaj}.%{libmin}.%{librel} $RPM_BUILD_ROOT/usr/lib | ||
| 125 | install -m644 libssl.a $RPM_BUILD_ROOT/usr/lib | ||
| 126 | #!#install -m755 libssl.so.%{libmaj}.%{libmin}.%{librel} $RPM_BUILD_ROOT/usr/lib | ||
| 127 | ( | ||
| 128 | cd $RPM_BUILD_ROOT/usr/lib | ||
| 129 | #!#ln -s libcrypto.so.%{libmaj}.%{libmin}.%{librel} libcrypto.so.%{libmaj} | ||
| 130 | #!#ln -s libcrypto.so.%{libmaj}.%{libmin}.%{librel} libcrypto.so | ||
| 131 | #!#ln -s libssl.so.%{libmaj}.%{libmin}.%{librel} libssl.so.%{libmaj} | ||
| 132 | #!#ln -s libssl.so.%{libmaj}.%{libmin}.%{librel} libssl.so | ||
| 133 | ) | ||
| 134 | |||
| 135 | %clean | ||
| 136 | rm -rf $RPM_BUILD_ROOT | ||
| 137 | |||
| 138 | %files | ||
| 139 | %defattr(0644,root,root,0755) | ||
| 140 | %doc CHANGES CHANGES.SSLeay LICENSE NEWS README | ||
| 141 | |||
| 142 | %attr(0755,root,root) /usr/bin/* | ||
| 143 | #!#%attr(0755,root,root) /usr/lib/*.so* | ||
| 144 | %attr(0755,root,root) %{openssldir}/misc/* | ||
| 145 | %attr(0644,root,root) /usr/man/man[157]/* | ||
| 146 | |||
| 147 | %config %attr(0644,root,root) %{openssldir}/openssl.cnf | ||
| 148 | %dir %attr(0755,root,root) %{openssldir}/certs | ||
| 149 | %dir %attr(0755,root,root) %{openssldir}/lib | ||
| 150 | %dir %attr(0755,root,root) %{openssldir}/misc | ||
| 151 | %dir %attr(0750,root,root) %{openssldir}/private | ||
| 152 | |||
| 153 | %files devel | ||
| 154 | %doc CHANGES CHANGES.SSLeay LICENSE NEWS README | ||
| 155 | |||
| 156 | %defattr(0644,root,root,0755) | ||
| 157 | %attr(0644,root,root) /usr/lib/*.a | ||
| 158 | %attr(0644,root,root) /usr/include/openssl/* | ||
| 159 | %attr(0644,root,root) /usr/man/man[3]/* | ||
| 160 | |||
| 161 | %files doc | ||
| 162 | %doc CHANGES CHANGES.SSLeay LICENSE NEWS README | ||
| 163 | %doc doc | ||
| 164 | |||
| 165 | %post | ||
| 166 | ldconfig | ||
| 167 | |||
| 168 | %postun | ||
| 169 | ldconfig | ||
| 170 | |||
| 171 | %changelog | ||
| 172 | * Thu Sep 14 2000 Richard Levitte <richard@levitte.org> | ||
| 173 | - Changed to adapt to the new (supported) way of making shared libraries | ||
| 174 | - Installs all static libraries, not just libRSAglue.a | ||
| 175 | - Extra documents now end up in a separate document package | ||
| 176 | * Sun Feb 27 2000 Damien Miller <djm@mindrot.org> | ||
| 177 | - Merged patches to spec | ||
| 178 | - Updated to 0.9.5beta2 (now with manpages) | ||
| 179 | * Sat Feb 5 2000 Michal Jaegermann <michal@harddata.com> | ||
| 180 | - added 'linux-alpha' to configuration | ||
| 181 | - fixed nasty absolute links | ||
| 182 | * Tue Jan 25 2000 Bennett Todd <bet@rahul.net> | ||
| 183 | - Added -DSSL_ALLOW_ADH, bumped Release to 4 | ||
| 184 | * Thu Oct 14 1999 Damien Miller <djm@mindrot.org> | ||
| 185 | - Set default permissions | ||
| 186 | - Removed documentation from devel sub-package | ||
| 187 | * Thu Sep 30 1999 Damien Miller <djm@mindrot.org> | ||
| 188 | - Added "make test" stage | ||
| 189 | - GPG signed | ||
| 190 | * Tue Sep 10 1999 Damien Miller <damien@ibs.com.au> | ||
| 191 | - Updated to version 0.9.4 | ||
| 192 | * Tue May 25 1999 Damien Miller <damien@ibs.com.au> | ||
| 193 | - Updated to version 0.9.3 | ||
| 194 | - Added attributes for all files | ||
| 195 | - Paramatised openssl directory | ||
| 196 | * Sat Mar 20 1999 Carlo M. Arenas Belon <carenas@jmconsultores.com.pe> | ||
| 197 | - Added "official" bnrec patch and taking other out | ||
| 198 | - making a link from ssleay to openssl binary | ||
| 199 | - putting all changelog together on SPEC file | ||
| 200 | * Fri Mar 5 1999 Henri Gomez <gomez@slib.fr> | ||
| 201 | - Added bnrec patch | ||
| 202 | * Tue Dec 29 1998 Jonathan Ruano <kobalt@james.encomix.es> | ||
| 203 | - minimum spec and patches changes for openssl | ||
| 204 | - modified for openssl sources | ||
| 205 | * Sat Aug 8 1998 Khimenko Victor <khim@sch57.msk.ru> | ||
| 206 | - shared library creating process honours $RPM_OPT_FLAGS | ||
| 207 | - shared libarry supports threads (as well as static library) | ||
| 208 | * Wed Jul 22 1998 Khimenko Victor <khim@sch57.msk.ru> | ||
| 209 | - building of shared library completely reworked | ||
| 210 | * Tue Jul 21 1998 Khimenko Victor <khim@sch57.msk.ru> | ||
| 211 | - RPM is BuildRoot'ed | ||
| 212 | * Tue Feb 10 1998 Khimenko Victor <khim@sch57.msk.ru> | ||
| 213 | - all stuff is moved out of /usr/local | ||
diff --git a/src/lib/libssl/src/rsaref/Makefile.ssl b/src/lib/libssl/src/rsaref/Makefile.ssl index 8d06a531d7..a17e38f9a5 100644 --- a/src/lib/libssl/src/rsaref/Makefile.ssl +++ b/src/lib/libssl/src/rsaref/Makefile.ssl | |||
| @@ -85,15 +85,17 @@ clean: | |||
| 85 | 85 | ||
| 86 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 86 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 87 | 87 | ||
| 88 | rsar_err.o: ../include/openssl/bn.h ../include/openssl/crypto.h | 88 | rsar_err.o: ../include/openssl/bio.h ../include/openssl/bn.h |
| 89 | rsar_err.o: ../include/openssl/err.h ../include/openssl/opensslconf.h | 89 | rsar_err.o: ../include/openssl/crypto.h ../include/openssl/err.h |
| 90 | rsar_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | ||
| 90 | rsar_err.o: ../include/openssl/opensslv.h ../include/openssl/rsa.h | 91 | rsar_err.o: ../include/openssl/opensslv.h ../include/openssl/rsa.h |
| 91 | rsar_err.o: ../include/openssl/rsaref.h ../include/openssl/safestack.h | 92 | rsar_err.o: ../include/openssl/rsaref.h ../include/openssl/safestack.h |
| 92 | rsar_err.o: ../include/openssl/stack.h | 93 | rsar_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 93 | rsaref.o: ../crypto/cryptlib.h ../include/openssl/bio.h ../include/openssl/bn.h | 94 | rsaref.o: ../crypto/cryptlib.h ../include/openssl/bio.h ../include/openssl/bn.h |
| 94 | rsaref.o: ../include/openssl/buffer.h ../include/openssl/crypto.h | 95 | rsaref.o: ../include/openssl/buffer.h ../include/openssl/crypto.h |
| 95 | rsaref.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 96 | rsaref.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 96 | rsaref.o: ../include/openssl/err.h ../include/openssl/opensslconf.h | 97 | rsaref.o: ../include/openssl/err.h ../include/openssl/lhash.h |
| 97 | rsaref.o: ../include/openssl/opensslv.h ../include/openssl/rand.h | 98 | rsaref.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 98 | rsaref.o: ../include/openssl/rsa.h ../include/openssl/rsaref.h | 99 | rsaref.o: ../include/openssl/rand.h ../include/openssl/rsa.h |
| 99 | rsaref.o: ../include/openssl/safestack.h ../include/openssl/stack.h | 100 | rsaref.o: ../include/openssl/rsaref.h ../include/openssl/safestack.h |
| 101 | rsaref.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
diff --git a/src/lib/libssl/src/rsaref/rsaref.h b/src/lib/libssl/src/rsaref/rsaref.h index 15f65dd94f..498449f40e 100644 --- a/src/lib/libssl/src/rsaref/rsaref.h +++ b/src/lib/libssl/src/rsaref/rsaref.h | |||
| @@ -59,13 +59,13 @@ | |||
| 59 | #ifndef HEADER_RSAREF_H | 59 | #ifndef HEADER_RSAREF_H |
| 60 | #define HEADER_RSAREF_H | 60 | #define HEADER_RSAREF_H |
| 61 | 61 | ||
| 62 | #ifndef NO_RSA | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | |||
| 62 | #ifdef __cplusplus | 65 | #ifdef __cplusplus |
| 63 | extern "C" { | 66 | extern "C" { |
| 64 | #endif | 67 | #endif |
| 65 | 68 | ||
| 66 | #ifndef NO_RSA | ||
| 67 | #include <openssl/rsa.h> | ||
| 68 | |||
| 69 | /* RSAeuro */ | 69 | /* RSAeuro */ |
| 70 | /*#define RSAref_MAX_BITS 2048*/ | 70 | /*#define RSAref_MAX_BITS 2048*/ |
| 71 | 71 | ||
| @@ -133,6 +133,10 @@ int R_RandomFinal(RSARandomState *rnd); | |||
| 133 | 133 | ||
| 134 | void ERR_load_RSAREF_strings(void ); | 134 | void ERR_load_RSAREF_strings(void ); |
| 135 | RSA_METHOD *RSA_PKCS1_RSAref(void ); | 135 | RSA_METHOD *RSA_PKCS1_RSAref(void ); |
| 136 | |||
| 137 | #ifdef __cplusplus | ||
| 138 | } | ||
| 139 | #endif | ||
| 136 | #endif | 140 | #endif |
| 137 | 141 | ||
| 138 | /* BEGIN ERROR CODES */ | 142 | /* BEGIN ERROR CODES */ |
| @@ -173,8 +177,4 @@ RSA_METHOD *RSA_PKCS1_RSAref(void ); | |||
| 173 | #define RSAREF_R_SIGNATURE 0x040b | 177 | #define RSAREF_R_SIGNATURE 0x040b |
| 174 | #define RSAREF_R_SIGNATURE_ENCODING 0x040c | 178 | #define RSAREF_R_SIGNATURE_ENCODING 0x040c |
| 175 | 179 | ||
| 176 | #ifdef __cplusplus | ||
| 177 | } | ||
| 178 | #endif | ||
| 179 | #endif | 180 | #endif |
| 180 | |||
diff --git a/src/lib/libssl/src/ssl/Makefile.ssl b/src/lib/libssl/src/ssl/Makefile.ssl index 7165804eb3..ad8da5c4be 100644 --- a/src/lib/libssl/src/ssl/Makefile.ssl +++ b/src/lib/libssl/src/ssl/Makefile.ssl | |||
| @@ -97,21 +97,23 @@ clean: | |||
| 97 | bio_ssl.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 97 | bio_ssl.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 98 | bio_ssl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 98 | bio_ssl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 99 | bio_ssl.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 99 | bio_ssl.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 100 | bio_ssl.o: ../include/openssl/crypto.h ../include/openssl/des.h | 100 | bio_ssl.o: ../include/openssl/comp.h ../include/openssl/crypto.h |
| 101 | bio_ssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 101 | bio_ssl.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 102 | bio_ssl.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 102 | bio_ssl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h |
| 103 | bio_ssl.o: ../include/openssl/evp.h ../include/openssl/idea.h | 103 | bio_ssl.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 104 | bio_ssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 104 | bio_ssl.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 105 | bio_ssl.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 105 | bio_ssl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 106 | bio_ssl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 106 | bio_ssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 107 | bio_ssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 107 | bio_ssl.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 108 | bio_ssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 108 | bio_ssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 109 | bio_ssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 109 | bio_ssl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 110 | bio_ssl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 110 | bio_ssl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 111 | bio_ssl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 111 | bio_ssl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 112 | bio_ssl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 112 | bio_ssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 113 | bio_ssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 113 | bio_ssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 114 | bio_ssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 114 | bio_ssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 115 | bio_ssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 116 | bio_ssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 115 | bio_ssl.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 117 | bio_ssl.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 116 | bio_ssl.o: ../include/openssl/x509_vfy.h | 118 | bio_ssl.o: ../include/openssl/x509_vfy.h |
| 117 | s23_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 119 | s23_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| @@ -123,7 +125,8 @@ s23_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 123 | s23_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 125 | s23_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 124 | s23_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h | 126 | s23_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 125 | s23_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 127 | s23_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 126 | s23_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 128 | s23_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 129 | s23_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 127 | s23_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 130 | s23_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 128 | s23_clnt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 131 | s23_clnt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 129 | s23_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 132 | s23_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -133,8 +136,9 @@ s23_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 133 | s23_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 136 | s23_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 134 | s23_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 137 | s23_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 135 | s23_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 138 | s23_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 136 | s23_clnt.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 139 | s23_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 137 | s23_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 140 | s23_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 141 | s23_clnt.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 138 | s23_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 142 | s23_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 139 | s23_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 143 | s23_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 140 | s23_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 144 | s23_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -144,7 +148,8 @@ s23_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 144 | s23_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 148 | s23_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 145 | s23_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h | 149 | s23_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 146 | s23_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 150 | s23_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 147 | s23_lib.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 151 | s23_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 152 | s23_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 148 | s23_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 153 | s23_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 149 | s23_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 154 | s23_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 150 | s23_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 155 | s23_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -154,8 +159,8 @@ s23_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 154 | s23_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 159 | s23_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 155 | s23_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 160 | s23_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 156 | s23_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 161 | s23_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 157 | s23_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 162 | s23_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 158 | s23_lib.o: ../include/openssl/x509_vfy.h ssl_locl.h | 163 | s23_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 159 | s23_meth.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 164 | s23_meth.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 160 | s23_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 165 | s23_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 161 | s23_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 166 | s23_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -165,7 +170,8 @@ s23_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 165 | s23_meth.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 170 | s23_meth.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 166 | s23_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h | 171 | s23_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 167 | s23_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 172 | s23_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 168 | s23_meth.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 173 | s23_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 174 | s23_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 169 | s23_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 175 | s23_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 170 | s23_meth.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 176 | s23_meth.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 171 | s23_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 177 | s23_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -175,8 +181,8 @@ s23_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 175 | s23_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 181 | s23_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 176 | s23_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 182 | s23_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 177 | s23_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 183 | s23_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 178 | s23_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 184 | s23_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 179 | s23_meth.o: ../include/openssl/x509_vfy.h ssl_locl.h | 185 | s23_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 180 | s23_pkt.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 186 | s23_pkt.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 181 | s23_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 187 | s23_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 182 | s23_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 188 | s23_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -186,7 +192,8 @@ s23_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 186 | s23_pkt.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 192 | s23_pkt.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 187 | s23_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h | 193 | s23_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 188 | s23_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 194 | s23_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 189 | s23_pkt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 195 | s23_pkt.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 196 | s23_pkt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 190 | s23_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 197 | s23_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 191 | s23_pkt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 198 | s23_pkt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 192 | s23_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 199 | s23_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -196,8 +203,8 @@ s23_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 196 | s23_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 203 | s23_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 197 | s23_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 204 | s23_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 198 | s23_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 205 | s23_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 199 | s23_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 206 | s23_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 200 | s23_pkt.o: ../include/openssl/x509_vfy.h ssl_locl.h | 207 | s23_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 201 | s23_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 208 | s23_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 202 | s23_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 209 | s23_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 203 | s23_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 210 | s23_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -207,7 +214,8 @@ s23_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 207 | s23_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 214 | s23_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 208 | s23_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h | 215 | s23_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 209 | s23_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 216 | s23_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 210 | s23_srvr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 217 | s23_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 218 | s23_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 211 | s23_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 219 | s23_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 212 | s23_srvr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 220 | s23_srvr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 213 | s23_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 221 | s23_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -217,8 +225,9 @@ s23_srvr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 217 | s23_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 225 | s23_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 218 | s23_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 226 | s23_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 219 | s23_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 227 | s23_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 220 | s23_srvr.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 228 | s23_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 221 | s23_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 229 | s23_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 230 | s23_srvr.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 222 | s2_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 231 | s2_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 223 | s2_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 232 | s2_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 224 | s2_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 233 | s2_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -228,7 +237,8 @@ s2_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 228 | s2_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 237 | s2_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 229 | s2_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h | 238 | s2_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 230 | s2_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 239 | s2_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 231 | s2_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 240 | s2_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 241 | s2_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 232 | s2_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 242 | s2_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 233 | s2_clnt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 243 | s2_clnt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 234 | s2_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 244 | s2_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -238,8 +248,9 @@ s2_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 238 | s2_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 248 | s2_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 239 | s2_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 249 | s2_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 240 | s2_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 250 | s2_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 241 | s2_clnt.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 251 | s2_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 242 | s2_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 252 | s2_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 253 | s2_clnt.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 243 | s2_enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 254 | s2_enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 244 | s2_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 255 | s2_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 245 | s2_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 256 | s2_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -249,7 +260,8 @@ s2_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 249 | s2_enc.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 260 | s2_enc.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 250 | s2_enc.o: ../include/openssl/evp.h ../include/openssl/idea.h | 261 | s2_enc.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 251 | s2_enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 262 | s2_enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 252 | s2_enc.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 263 | s2_enc.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 264 | s2_enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 253 | s2_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 265 | s2_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 254 | s2_enc.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 266 | s2_enc.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 255 | s2_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 267 | s2_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -259,8 +271,8 @@ s2_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 259 | s2_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 271 | s2_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 260 | s2_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 272 | s2_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 261 | s2_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 273 | s2_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 262 | s2_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 274 | s2_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 263 | s2_enc.o: ../include/openssl/x509_vfy.h ssl_locl.h | 275 | s2_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 264 | s2_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 276 | s2_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 265 | s2_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 277 | s2_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 266 | s2_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 278 | s2_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -270,7 +282,8 @@ s2_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 270 | s2_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 282 | s2_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 271 | s2_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h | 283 | s2_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 272 | s2_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 284 | s2_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 273 | s2_lib.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 285 | s2_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 286 | s2_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 274 | s2_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 287 | s2_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 275 | s2_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 288 | s2_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 276 | s2_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 289 | s2_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -280,8 +293,8 @@ s2_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 280 | s2_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 293 | s2_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 281 | s2_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 294 | s2_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 282 | s2_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 295 | s2_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 283 | s2_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 296 | s2_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 284 | s2_lib.o: ../include/openssl/x509_vfy.h ssl_locl.h | 297 | s2_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 285 | s2_meth.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 298 | s2_meth.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 286 | s2_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 299 | s2_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 287 | s2_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 300 | s2_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -291,7 +304,8 @@ s2_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 291 | s2_meth.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 304 | s2_meth.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 292 | s2_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h | 305 | s2_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 293 | s2_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 306 | s2_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 294 | s2_meth.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 307 | s2_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 308 | s2_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 295 | s2_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 309 | s2_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 296 | s2_meth.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 310 | s2_meth.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 297 | s2_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 311 | s2_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -301,8 +315,8 @@ s2_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 301 | s2_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 315 | s2_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 302 | s2_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 316 | s2_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 303 | s2_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 317 | s2_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 304 | s2_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 318 | s2_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 305 | s2_meth.o: ../include/openssl/x509_vfy.h ssl_locl.h | 319 | s2_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 306 | s2_pkt.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 320 | s2_pkt.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 307 | s2_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 321 | s2_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 308 | s2_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 322 | s2_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -312,7 +326,8 @@ s2_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 312 | s2_pkt.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 326 | s2_pkt.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 313 | s2_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h | 327 | s2_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 314 | s2_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 328 | s2_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 315 | s2_pkt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 329 | s2_pkt.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 330 | s2_pkt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 316 | s2_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 331 | s2_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 317 | s2_pkt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 332 | s2_pkt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 318 | s2_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 333 | s2_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -322,8 +337,8 @@ s2_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 322 | s2_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 337 | s2_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 323 | s2_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 338 | s2_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 324 | s2_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 339 | s2_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 325 | s2_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 340 | s2_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 326 | s2_pkt.o: ../include/openssl/x509_vfy.h ssl_locl.h | 341 | s2_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 327 | s2_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 342 | s2_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 328 | s2_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 343 | s2_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 329 | s2_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 344 | s2_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -333,7 +348,8 @@ s2_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 333 | s2_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 348 | s2_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 334 | s2_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h | 349 | s2_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 335 | s2_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 350 | s2_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 336 | s2_srvr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 351 | s2_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 352 | s2_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 337 | s2_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 353 | s2_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 338 | s2_srvr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 354 | s2_srvr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 339 | s2_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 355 | s2_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -343,8 +359,9 @@ s2_srvr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 343 | s2_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 359 | s2_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 344 | s2_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 360 | s2_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 345 | s2_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 361 | s2_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 346 | s2_srvr.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 362 | s2_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 347 | s2_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 363 | s2_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 364 | s2_srvr.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 348 | s3_both.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 365 | s3_both.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 349 | s3_both.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 366 | s3_both.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 350 | s3_both.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 367 | s3_both.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -354,7 +371,8 @@ s3_both.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 354 | s3_both.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 371 | s3_both.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 355 | s3_both.o: ../include/openssl/evp.h ../include/openssl/idea.h | 372 | s3_both.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 356 | s3_both.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 373 | s3_both.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 357 | s3_both.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 374 | s3_both.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 375 | s3_both.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 358 | s3_both.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 376 | s3_both.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 359 | s3_both.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 377 | s3_both.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 360 | s3_both.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 378 | s3_both.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -364,8 +382,9 @@ s3_both.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 364 | s3_both.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 382 | s3_both.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 365 | s3_both.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 383 | s3_both.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 366 | s3_both.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 384 | s3_both.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 367 | s3_both.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 385 | s3_both.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 368 | s3_both.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 386 | s3_both.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 387 | s3_both.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 369 | s3_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 388 | s3_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 370 | s3_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 389 | s3_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 371 | s3_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 390 | s3_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -375,7 +394,8 @@ s3_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 375 | s3_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 394 | s3_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 376 | s3_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h | 395 | s3_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 377 | s3_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 396 | s3_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 378 | s3_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 397 | s3_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 398 | s3_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 379 | s3_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 399 | s3_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 380 | s3_clnt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 400 | s3_clnt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 381 | s3_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 401 | s3_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -385,8 +405,9 @@ s3_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 385 | s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 405 | s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 386 | s3_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 406 | s3_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 387 | s3_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 407 | s3_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 388 | s3_clnt.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 408 | s3_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 389 | s3_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 409 | s3_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 410 | s3_clnt.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 390 | s3_enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 411 | s3_enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 391 | s3_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 412 | s3_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 392 | s3_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 413 | s3_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -396,7 +417,8 @@ s3_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 396 | s3_enc.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 417 | s3_enc.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 397 | s3_enc.o: ../include/openssl/evp.h ../include/openssl/idea.h | 418 | s3_enc.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 398 | s3_enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 419 | s3_enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 399 | s3_enc.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 420 | s3_enc.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 421 | s3_enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 400 | s3_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 422 | s3_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 401 | s3_enc.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 423 | s3_enc.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 402 | s3_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 424 | s3_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -406,8 +428,8 @@ s3_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 406 | s3_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 428 | s3_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 407 | s3_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 429 | s3_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 408 | s3_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 430 | s3_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 409 | s3_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 431 | s3_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 410 | s3_enc.o: ../include/openssl/x509_vfy.h ssl_locl.h | 432 | s3_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 411 | s3_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 433 | s3_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 412 | s3_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 434 | s3_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 413 | s3_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 435 | s3_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -417,7 +439,8 @@ s3_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 417 | s3_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 439 | s3_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 418 | s3_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h | 440 | s3_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 419 | s3_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 441 | s3_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 420 | s3_lib.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 442 | s3_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 443 | s3_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 421 | s3_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 444 | s3_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 422 | s3_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 445 | s3_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 423 | s3_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 446 | s3_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -427,8 +450,8 @@ s3_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 427 | s3_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 450 | s3_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 428 | s3_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 451 | s3_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 429 | s3_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 452 | s3_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 430 | s3_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 453 | s3_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 431 | s3_lib.o: ../include/openssl/x509_vfy.h ssl_locl.h | 454 | s3_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 432 | s3_meth.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 455 | s3_meth.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 433 | s3_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 456 | s3_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 434 | s3_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 457 | s3_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -438,7 +461,8 @@ s3_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 438 | s3_meth.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 461 | s3_meth.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 439 | s3_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h | 462 | s3_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 440 | s3_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 463 | s3_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 441 | s3_meth.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 464 | s3_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 465 | s3_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 442 | s3_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 466 | s3_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 443 | s3_meth.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 467 | s3_meth.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 444 | s3_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 468 | s3_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -448,8 +472,8 @@ s3_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 448 | s3_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 472 | s3_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 449 | s3_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 473 | s3_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 450 | s3_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 474 | s3_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 451 | s3_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 475 | s3_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 452 | s3_meth.o: ../include/openssl/x509_vfy.h ssl_locl.h | 476 | s3_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 453 | s3_pkt.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 477 | s3_pkt.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 454 | s3_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 478 | s3_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 455 | s3_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 479 | s3_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -459,7 +483,8 @@ s3_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 459 | s3_pkt.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 483 | s3_pkt.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 460 | s3_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h | 484 | s3_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 461 | s3_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 485 | s3_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 462 | s3_pkt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 486 | s3_pkt.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 487 | s3_pkt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 463 | s3_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 488 | s3_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 464 | s3_pkt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 489 | s3_pkt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 465 | s3_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 490 | s3_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -469,8 +494,8 @@ s3_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 469 | s3_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 494 | s3_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 470 | s3_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 495 | s3_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 471 | s3_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 496 | s3_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 472 | s3_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 497 | s3_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 473 | s3_pkt.o: ../include/openssl/x509_vfy.h ssl_locl.h | 498 | s3_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 474 | s3_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 499 | s3_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 475 | s3_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 500 | s3_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 476 | s3_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 501 | s3_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -480,7 +505,8 @@ s3_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 480 | s3_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 505 | s3_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 481 | s3_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h | 506 | s3_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 482 | s3_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 507 | s3_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 483 | s3_srvr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 508 | s3_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 509 | s3_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 484 | s3_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 510 | s3_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 485 | s3_srvr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 511 | s3_srvr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 486 | s3_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 512 | s3_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -490,8 +516,9 @@ s3_srvr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 490 | s3_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 516 | s3_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 491 | s3_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 517 | s3_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 492 | s3_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 518 | s3_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 493 | s3_srvr.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 519 | s3_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 494 | s3_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 520 | s3_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 521 | s3_srvr.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 495 | ssl_algs.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 522 | ssl_algs.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 496 | ssl_algs.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 523 | ssl_algs.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 497 | ssl_algs.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 524 | ssl_algs.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -501,7 +528,8 @@ ssl_algs.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 501 | ssl_algs.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 528 | ssl_algs.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 502 | ssl_algs.o: ../include/openssl/evp.h ../include/openssl/idea.h | 529 | ssl_algs.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 503 | ssl_algs.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 530 | ssl_algs.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 504 | ssl_algs.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 531 | ssl_algs.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 532 | ssl_algs.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 505 | ssl_algs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 533 | ssl_algs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 506 | ssl_algs.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 534 | ssl_algs.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 507 | ssl_algs.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 535 | ssl_algs.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -511,8 +539,8 @@ ssl_algs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 511 | ssl_algs.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 539 | ssl_algs.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 512 | ssl_algs.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 540 | ssl_algs.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 513 | ssl_algs.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 541 | ssl_algs.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 514 | ssl_algs.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 542 | ssl_algs.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 515 | ssl_algs.o: ../include/openssl/x509_vfy.h ssl_locl.h | 543 | ssl_algs.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 516 | ssl_asn1.o: ../include/openssl/asn1.h ../include/openssl/asn1_mac.h | 544 | ssl_asn1.o: ../include/openssl/asn1.h ../include/openssl/asn1_mac.h |
| 517 | ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | 545 | ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/blowfish.h |
| 518 | ssl_asn1.o: ../include/openssl/bn.h ../include/openssl/buffer.h | 546 | ssl_asn1.o: ../include/openssl/bn.h ../include/openssl/buffer.h |
| @@ -522,8 +550,9 @@ ssl_asn1.o: ../include/openssl/dh.h ../include/openssl/dsa.h | |||
| 522 | ssl_asn1.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 550 | ssl_asn1.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 523 | ssl_asn1.o: ../include/openssl/err.h ../include/openssl/evp.h | 551 | ssl_asn1.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 524 | ssl_asn1.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 552 | ssl_asn1.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 525 | ssl_asn1.o: ../include/openssl/md2.h ../include/openssl/md5.h | 553 | ssl_asn1.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 526 | ssl_asn1.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 554 | ssl_asn1.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 555 | ssl_asn1.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 527 | ssl_asn1.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 556 | ssl_asn1.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 528 | ssl_asn1.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 557 | ssl_asn1.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 529 | ssl_asn1.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 558 | ssl_asn1.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| @@ -532,8 +561,9 @@ ssl_asn1.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 532 | ssl_asn1.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 561 | ssl_asn1.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 533 | ssl_asn1.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 562 | ssl_asn1.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 534 | ssl_asn1.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 563 | ssl_asn1.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 535 | ssl_asn1.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 564 | ssl_asn1.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 536 | ssl_asn1.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 565 | ssl_asn1.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 566 | ssl_asn1.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 537 | ssl_cert.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 567 | ssl_cert.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 538 | ssl_cert.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 568 | ssl_cert.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 539 | ssl_cert.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 569 | ssl_cert.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -541,19 +571,21 @@ ssl_cert.o: ../include/openssl/comp.h ../include/openssl/conf.h | |||
| 541 | ssl_cert.o: ../include/openssl/crypto.h ../include/openssl/des.h | 571 | ssl_cert.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 542 | ssl_cert.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 572 | ssl_cert.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 543 | ssl_cert.o: ../include/openssl/e_os.h ../include/openssl/e_os.h | 573 | ssl_cert.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 544 | ssl_cert.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 574 | ssl_cert.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 545 | ssl_cert.o: ../include/openssl/evp.h ../include/openssl/idea.h | 575 | ssl_cert.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 546 | ssl_cert.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 576 | ssl_cert.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 577 | ssl_cert.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 547 | ssl_cert.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 578 | ssl_cert.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 548 | ssl_cert.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 579 | ssl_cert.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 549 | ssl_cert.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 580 | ssl_cert.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 550 | ssl_cert.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 581 | ssl_cert.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 551 | ssl_cert.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 582 | ssl_cert.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 552 | ssl_cert.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 583 | ssl_cert.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 553 | ssl_cert.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 584 | ssl_cert.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 554 | ssl_cert.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 585 | ssl_cert.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 555 | ssl_cert.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 586 | ssl_cert.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 556 | ssl_cert.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 587 | ssl_cert.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 588 | ssl_cert.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 557 | ssl_cert.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 589 | ssl_cert.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 558 | ssl_cert.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h | 590 | ssl_cert.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h |
| 559 | ssl_cert.o: ssl_locl.h | 591 | ssl_cert.o: ssl_locl.h |
| @@ -566,7 +598,8 @@ ssl_ciph.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 566 | ssl_ciph.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 598 | ssl_ciph.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 567 | ssl_ciph.o: ../include/openssl/evp.h ../include/openssl/idea.h | 599 | ssl_ciph.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 568 | ssl_ciph.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 600 | ssl_ciph.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 569 | ssl_ciph.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 601 | ssl_ciph.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 602 | ssl_ciph.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 570 | ssl_ciph.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 603 | ssl_ciph.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 571 | ssl_ciph.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 604 | ssl_ciph.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 572 | ssl_ciph.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 605 | ssl_ciph.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -576,46 +609,50 @@ ssl_ciph.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 576 | ssl_ciph.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 609 | ssl_ciph.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 577 | ssl_ciph.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 610 | ssl_ciph.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 578 | ssl_ciph.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 611 | ssl_ciph.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 579 | ssl_ciph.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 612 | ssl_ciph.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 580 | ssl_ciph.o: ../include/openssl/x509_vfy.h ssl_locl.h | 613 | ssl_ciph.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 581 | ssl_err.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 614 | ssl_err.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 582 | ssl_err.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 615 | ssl_err.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 583 | ssl_err.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 616 | ssl_err.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 584 | ssl_err.o: ../include/openssl/crypto.h ../include/openssl/des.h | 617 | ssl_err.o: ../include/openssl/comp.h ../include/openssl/crypto.h |
| 585 | ssl_err.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 618 | ssl_err.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 586 | ssl_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 619 | ssl_err.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h |
| 587 | ssl_err.o: ../include/openssl/evp.h ../include/openssl/idea.h | 620 | ssl_err.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 588 | ssl_err.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 621 | ssl_err.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 622 | ssl_err.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 589 | ssl_err.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 623 | ssl_err.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 590 | ssl_err.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 624 | ssl_err.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 591 | ssl_err.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 625 | ssl_err.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 592 | ssl_err.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 626 | ssl_err.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 593 | ssl_err.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 627 | ssl_err.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 594 | ssl_err.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 628 | ssl_err.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 595 | ssl_err.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 629 | ssl_err.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 596 | ssl_err.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 630 | ssl_err.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 597 | ssl_err.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 631 | ssl_err.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 598 | ssl_err.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 632 | ssl_err.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 633 | ssl_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 599 | ssl_err.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 634 | ssl_err.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 600 | ssl_err.o: ../include/openssl/x509_vfy.h | 635 | ssl_err.o: ../include/openssl/x509_vfy.h |
| 601 | ssl_err2.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 636 | ssl_err2.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 602 | ssl_err2.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 637 | ssl_err2.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 603 | ssl_err2.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 638 | ssl_err2.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 604 | ssl_err2.o: ../include/openssl/crypto.h ../include/openssl/des.h | 639 | ssl_err2.o: ../include/openssl/comp.h ../include/openssl/crypto.h |
| 605 | ssl_err2.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 640 | ssl_err2.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 606 | ssl_err2.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 641 | ssl_err2.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h |
| 607 | ssl_err2.o: ../include/openssl/evp.h ../include/openssl/idea.h | 642 | ssl_err2.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 608 | ssl_err2.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 643 | ssl_err2.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 644 | ssl_err2.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
| 609 | ssl_err2.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 645 | ssl_err2.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 610 | ssl_err2.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 646 | ssl_err2.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h |
| 611 | ssl_err2.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 647 | ssl_err2.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 612 | ssl_err2.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 648 | ssl_err2.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 613 | ssl_err2.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 649 | ssl_err2.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| 614 | ssl_err2.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 650 | ssl_err2.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 615 | ssl_err2.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 651 | ssl_err2.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 616 | ssl_err2.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 652 | ssl_err2.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 617 | ssl_err2.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 653 | ssl_err2.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 618 | ssl_err2.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 654 | ssl_err2.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 655 | ssl_err2.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 619 | ssl_err2.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 656 | ssl_err2.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 620 | ssl_err2.o: ../include/openssl/x509_vfy.h | 657 | ssl_err2.o: ../include/openssl/x509_vfy.h |
| 621 | ssl_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 658 | ssl_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| @@ -624,20 +661,22 @@ ssl_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h | |||
| 624 | ssl_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h | 661 | ssl_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h |
| 625 | ssl_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h | 662 | ssl_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 626 | ssl_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 663 | ssl_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 627 | ssl_lib.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 664 | ssl_lib.o: ../include/openssl/e_os.h ../include/openssl/e_os.h |
| 628 | ssl_lib.o: ../include/openssl/err.h ../include/openssl/evp.h | 665 | ssl_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 629 | ssl_lib.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 666 | ssl_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 630 | ssl_lib.o: ../include/openssl/md2.h ../include/openssl/md5.h | 667 | ssl_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 631 | ssl_lib.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 668 | ssl_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 632 | ssl_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 669 | ssl_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 633 | ssl_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 670 | ssl_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 634 | ssl_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 671 | ssl_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 635 | ssl_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 672 | ssl_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 636 | ssl_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 673 | ssl_lib.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 637 | ssl_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 674 | ssl_lib.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 638 | ssl_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 675 | ssl_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 639 | ssl_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 676 | ssl_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 640 | ssl_lib.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 677 | ssl_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 678 | ssl_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | ||
| 679 | ssl_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h | ||
| 641 | ssl_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | 680 | ssl_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h |
| 642 | ssl_lib.o: ../include/openssl/x509v3.h ssl_locl.h | 681 | ssl_lib.o: ../include/openssl/x509v3.h ssl_locl.h |
| 643 | ssl_rsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 682 | ssl_rsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| @@ -649,7 +688,8 @@ ssl_rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 649 | ssl_rsa.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 688 | ssl_rsa.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 650 | ssl_rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h | 689 | ssl_rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 651 | ssl_rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 690 | ssl_rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 652 | ssl_rsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 691 | ssl_rsa.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 692 | ssl_rsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 653 | ssl_rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 693 | ssl_rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 654 | ssl_rsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 694 | ssl_rsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 655 | ssl_rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 695 | ssl_rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -659,8 +699,8 @@ ssl_rsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 659 | ssl_rsa.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 699 | ssl_rsa.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 660 | ssl_rsa.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 700 | ssl_rsa.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 661 | ssl_rsa.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 701 | ssl_rsa.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 662 | ssl_rsa.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 702 | ssl_rsa.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 663 | ssl_rsa.o: ../include/openssl/x509_vfy.h ssl_locl.h | 703 | ssl_rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 664 | ssl_sess.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 704 | ssl_sess.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 665 | ssl_sess.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 705 | ssl_sess.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 666 | ssl_sess.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 706 | ssl_sess.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -670,7 +710,8 @@ ssl_sess.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 670 | ssl_sess.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 710 | ssl_sess.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 671 | ssl_sess.o: ../include/openssl/evp.h ../include/openssl/idea.h | 711 | ssl_sess.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 672 | ssl_sess.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 712 | ssl_sess.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 673 | ssl_sess.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 713 | ssl_sess.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 714 | ssl_sess.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 674 | ssl_sess.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 715 | ssl_sess.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 675 | ssl_sess.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 716 | ssl_sess.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 676 | ssl_sess.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 717 | ssl_sess.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -680,8 +721,9 @@ ssl_sess.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 680 | ssl_sess.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 721 | ssl_sess.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 681 | ssl_sess.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 722 | ssl_sess.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 682 | ssl_sess.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 723 | ssl_sess.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 683 | ssl_sess.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 724 | ssl_sess.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 684 | ssl_sess.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 725 | ssl_sess.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 726 | ssl_sess.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 685 | ssl_stat.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 727 | ssl_stat.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 686 | ssl_stat.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 728 | ssl_stat.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 687 | ssl_stat.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 729 | ssl_stat.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -691,7 +733,8 @@ ssl_stat.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 691 | ssl_stat.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 733 | ssl_stat.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 692 | ssl_stat.o: ../include/openssl/evp.h ../include/openssl/idea.h | 734 | ssl_stat.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 693 | ssl_stat.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 735 | ssl_stat.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 694 | ssl_stat.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 736 | ssl_stat.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 737 | ssl_stat.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 695 | ssl_stat.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 738 | ssl_stat.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 696 | ssl_stat.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 739 | ssl_stat.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 697 | ssl_stat.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 740 | ssl_stat.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -701,8 +744,8 @@ ssl_stat.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 701 | ssl_stat.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 744 | ssl_stat.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 702 | ssl_stat.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 745 | ssl_stat.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 703 | ssl_stat.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 746 | ssl_stat.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 704 | ssl_stat.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 747 | ssl_stat.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 705 | ssl_stat.o: ../include/openssl/x509_vfy.h ssl_locl.h | 748 | ssl_stat.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 706 | ssl_txt.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 749 | ssl_txt.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 707 | ssl_txt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 750 | ssl_txt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 708 | ssl_txt.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 751 | ssl_txt.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -712,7 +755,8 @@ ssl_txt.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 712 | ssl_txt.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 755 | ssl_txt.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 713 | ssl_txt.o: ../include/openssl/evp.h ../include/openssl/idea.h | 756 | ssl_txt.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 714 | ssl_txt.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 757 | ssl_txt.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 715 | ssl_txt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 758 | ssl_txt.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 759 | ssl_txt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 716 | ssl_txt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 760 | ssl_txt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 717 | ssl_txt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 761 | ssl_txt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 718 | ssl_txt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 762 | ssl_txt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -722,8 +766,8 @@ ssl_txt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 722 | ssl_txt.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 766 | ssl_txt.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 723 | ssl_txt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 767 | ssl_txt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 724 | ssl_txt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 768 | ssl_txt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 725 | ssl_txt.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 769 | ssl_txt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 726 | ssl_txt.o: ../include/openssl/x509_vfy.h ssl_locl.h | 770 | ssl_txt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 727 | t1_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 771 | t1_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 728 | t1_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 772 | t1_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 729 | t1_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 773 | t1_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -733,7 +777,8 @@ t1_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 733 | t1_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 777 | t1_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 734 | t1_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h | 778 | t1_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 735 | t1_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 779 | t1_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 736 | t1_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 780 | t1_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 781 | t1_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 737 | t1_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 782 | t1_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 738 | t1_clnt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 783 | t1_clnt.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 739 | t1_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 784 | t1_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -743,8 +788,9 @@ t1_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 743 | t1_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 788 | t1_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 744 | t1_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 789 | t1_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 745 | t1_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 790 | t1_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 746 | t1_clnt.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 791 | t1_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 747 | t1_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 792 | t1_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 793 | t1_clnt.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 748 | t1_enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 794 | t1_enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 749 | t1_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 795 | t1_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 750 | t1_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 796 | t1_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -754,8 +800,9 @@ t1_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 754 | t1_enc.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 800 | t1_enc.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 755 | t1_enc.o: ../include/openssl/evp.h ../include/openssl/hmac.h | 801 | t1_enc.o: ../include/openssl/evp.h ../include/openssl/hmac.h |
| 756 | t1_enc.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 802 | t1_enc.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 757 | t1_enc.o: ../include/openssl/md2.h ../include/openssl/md5.h | 803 | t1_enc.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 758 | t1_enc.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 804 | t1_enc.o: ../include/openssl/md5.h ../include/openssl/mdc2.h |
| 805 | t1_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 759 | t1_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 806 | t1_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 760 | t1_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 807 | t1_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h |
| 761 | t1_enc.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | 808 | t1_enc.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h |
| @@ -764,8 +811,9 @@ t1_enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 764 | t1_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 811 | t1_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 765 | t1_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 812 | t1_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 766 | t1_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 813 | t1_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 767 | t1_enc.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 814 | t1_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 768 | t1_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 815 | t1_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 816 | t1_enc.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
| 769 | t1_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 817 | t1_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 770 | t1_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 818 | t1_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 771 | t1_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 819 | t1_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -775,7 +823,8 @@ t1_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 775 | t1_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 823 | t1_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 776 | t1_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h | 824 | t1_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 777 | t1_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 825 | t1_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 778 | t1_lib.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 826 | t1_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 827 | t1_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 779 | t1_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 828 | t1_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 780 | t1_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 829 | t1_lib.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 781 | t1_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 830 | t1_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -785,8 +834,8 @@ t1_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 785 | t1_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 834 | t1_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 786 | t1_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 835 | t1_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 787 | t1_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 836 | t1_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 788 | t1_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 837 | t1_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 789 | t1_lib.o: ../include/openssl/x509_vfy.h ssl_locl.h | 838 | t1_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 790 | t1_meth.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 839 | t1_meth.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 791 | t1_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 840 | t1_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 792 | t1_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 841 | t1_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -796,7 +845,8 @@ t1_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 796 | t1_meth.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 845 | t1_meth.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 797 | t1_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h | 846 | t1_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 798 | t1_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 847 | t1_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 799 | t1_meth.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 848 | t1_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 849 | t1_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 800 | t1_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 850 | t1_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 801 | t1_meth.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 851 | t1_meth.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 802 | t1_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 852 | t1_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -806,8 +856,8 @@ t1_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | |||
| 806 | t1_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 856 | t1_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h |
| 807 | t1_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 857 | t1_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h |
| 808 | t1_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 858 | t1_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h |
| 809 | t1_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 859 | t1_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h |
| 810 | t1_meth.o: ../include/openssl/x509_vfy.h ssl_locl.h | 860 | t1_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h |
| 811 | t1_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 861 | t1_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 812 | t1_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 862 | t1_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 813 | t1_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 863 | t1_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| @@ -817,7 +867,8 @@ t1_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | |||
| 817 | t1_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 867 | t1_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 818 | t1_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h | 868 | t1_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 819 | t1_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h | 869 | t1_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 820 | t1_srvr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 870 | t1_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 871 | t1_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 821 | t1_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 872 | t1_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 822 | t1_srvr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h | 873 | t1_srvr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 823 | t1_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | 874 | t1_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| @@ -827,5 +878,6 @@ t1_srvr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | |||
| 827 | t1_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 878 | t1_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 828 | t1_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | 879 | t1_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 829 | t1_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | 880 | t1_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h |
| 830 | t1_srvr.o: ../include/openssl/stack.h ../include/openssl/tls1.h | 881 | t1_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 831 | t1_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h | 882 | t1_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 883 | t1_srvr.o: ../include/openssl/x509_vfy.h ssl_locl.h | ||
diff --git a/src/lib/libssl/src/ssl/bio_ssl.c b/src/lib/libssl/src/ssl/bio_ssl.c index d73c41adcd..d85555a7e6 100644 --- a/src/lib/libssl/src/ssl/bio_ssl.c +++ b/src/lib/libssl/src/ssl/bio_ssl.c | |||
| @@ -65,13 +65,13 @@ | |||
| 65 | #include <openssl/err.h> | 65 | #include <openssl/err.h> |
| 66 | #include <openssl/ssl.h> | 66 | #include <openssl/ssl.h> |
| 67 | 67 | ||
| 68 | static int ssl_write(BIO *h,char *buf,int num); | 68 | static int ssl_write(BIO *h, const char *buf, int num); |
| 69 | static int ssl_read(BIO *h,char *buf,int size); | 69 | static int ssl_read(BIO *h, char *buf, int size); |
| 70 | static int ssl_puts(BIO *h,char *str); | 70 | static int ssl_puts(BIO *h, const char *str); |
| 71 | static long ssl_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 71 | static long ssl_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 72 | static int ssl_new(BIO *h); | 72 | static int ssl_new(BIO *h); |
| 73 | static int ssl_free(BIO *data); | 73 | static int ssl_free(BIO *data); |
| 74 | static long ssl_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 74 | static long ssl_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); |
| 75 | typedef struct bio_ssl_st | 75 | typedef struct bio_ssl_st |
| 76 | { | 76 | { |
| 77 | SSL *ssl; /* The ssl handle :-) */ | 77 | SSL *ssl; /* The ssl handle :-) */ |
| @@ -105,7 +105,7 @@ static int ssl_new(BIO *bi) | |||
| 105 | { | 105 | { |
| 106 | BIO_SSL *bs; | 106 | BIO_SSL *bs; |
| 107 | 107 | ||
| 108 | bs=(BIO_SSL *)Malloc(sizeof(BIO_SSL)); | 108 | bs=(BIO_SSL *)OPENSSL_malloc(sizeof(BIO_SSL)); |
| 109 | if (bs == NULL) | 109 | if (bs == NULL) |
| 110 | { | 110 | { |
| 111 | BIOerr(BIO_F_SSL_NEW,ERR_R_MALLOC_FAILURE); | 111 | BIOerr(BIO_F_SSL_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -133,7 +133,7 @@ static int ssl_free(BIO *a) | |||
| 133 | a->flags=0; | 133 | a->flags=0; |
| 134 | } | 134 | } |
| 135 | if (a->ptr != NULL) | 135 | if (a->ptr != NULL) |
| 136 | Free(a->ptr); | 136 | OPENSSL_free(a->ptr); |
| 137 | return(1); | 137 | return(1); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| @@ -221,7 +221,7 @@ static int ssl_read(BIO *b, char *out, int outl) | |||
| 221 | return(ret); | 221 | return(ret); |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | static int ssl_write(BIO *b, char *out, int outl) | 224 | static int ssl_write(BIO *b, const char *out, int outl) |
| 225 | { | 225 | { |
| 226 | int ret,r=0; | 226 | int ret,r=0; |
| 227 | int retry_reason=0; | 227 | int retry_reason=0; |
| @@ -289,7 +289,7 @@ static int ssl_write(BIO *b, char *out, int outl) | |||
| 289 | return(ret); | 289 | return(ret); |
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr) | 292 | static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 293 | { | 293 | { |
| 294 | SSL **sslp,*ssl; | 294 | SSL **sslp,*ssl; |
| 295 | BIO_SSL *bs; | 295 | BIO_SSL *bs; |
| @@ -470,7 +470,7 @@ static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 470 | return(ret); | 470 | return(ret); |
| 471 | } | 471 | } |
| 472 | 472 | ||
| 473 | static long ssl_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 473 | static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 474 | { | 474 | { |
| 475 | SSL *ssl; | 475 | SSL *ssl; |
| 476 | BIO_SSL *bs; | 476 | BIO_SSL *bs; |
| @@ -492,7 +492,7 @@ static long ssl_callback_ctrl(BIO *b, int cmd, void (*fp)()) | |||
| 492 | return(ret); | 492 | return(ret); |
| 493 | } | 493 | } |
| 494 | 494 | ||
| 495 | static int ssl_puts(BIO *bp, char *str) | 495 | static int ssl_puts(BIO *bp, const char *str) |
| 496 | { | 496 | { |
| 497 | int n,ret; | 497 | int n,ret; |
| 498 | 498 | ||
diff --git a/src/lib/libssl/src/ssl/s23_clnt.c b/src/lib/libssl/src/ssl/s23_clnt.c index aaedf6a9bb..5050a13ef2 100644 --- a/src/lib/libssl/src/ssl/s23_clnt.c +++ b/src/lib/libssl/src/ssl/s23_clnt.c | |||
| @@ -366,7 +366,9 @@ static int ssl23_get_server_hello(SSL *s) | |||
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | s->state=SSL2_ST_GET_SERVER_HELLO_A; | 368 | s->state=SSL2_ST_GET_SERVER_HELLO_A; |
| 369 | s->s2->ssl2_rollback=1; | 369 | if (!(s->client_version == SSL2_VERSION)) |
| 370 | /* use special padding (SSL 3.0 draft/RFC 2246, App. E.2) */ | ||
| 371 | s->s2->ssl2_rollback=1; | ||
| 370 | 372 | ||
| 371 | /* setup the 5 bytes we have read so we get them from | 373 | /* setup the 5 bytes we have read so we get them from |
| 372 | * the sslv2 buffer */ | 374 | * the sslv2 buffer */ |
diff --git a/src/lib/libssl/src/ssl/s23_srvr.c b/src/lib/libssl/src/ssl/s23_srvr.c index 6a3bbb10b9..050618235f 100644 --- a/src/lib/libssl/src/ssl/s23_srvr.c +++ b/src/lib/libssl/src/ssl/s23_srvr.c | |||
| @@ -297,7 +297,7 @@ int ssl23_get_client_hello(SSL *s) | |||
| 297 | if (n <= 0) return(n); | 297 | if (n <= 0) return(n); |
| 298 | p=s->packet; | 298 | p=s->packet; |
| 299 | 299 | ||
| 300 | if ((buf=Malloc(n)) == NULL) | 300 | if ((buf=OPENSSL_malloc(n)) == NULL) |
| 301 | { | 301 | { |
| 302 | SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,ERR_R_MALLOC_FAILURE); | 302 | SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,ERR_R_MALLOC_FAILURE); |
| 303 | goto err; | 303 | goto err; |
| @@ -348,16 +348,21 @@ int ssl23_get_client_hello(SSL *s) | |||
| 348 | * SSLv3 or tls1 header | 348 | * SSLv3 or tls1 header |
| 349 | */ | 349 | */ |
| 350 | 350 | ||
| 351 | v[0]=p[1]; /* major version */ | 351 | v[0]=p[1]; /* major version (= SSL3_VERSION_MAJOR) */ |
| 352 | /* We must look at client_version inside the Client Hello message | 352 | /* We must look at client_version inside the Client Hello message |
| 353 | * to get the correct minor version: */ | 353 | * to get the correct minor version. |
| 354 | v[1]=p[10]; | 354 | * However if we have only a pathologically small fragment of the |
| 355 | /* However if we have only a pathologically small fragment of the | 355 | * Client Hello message, this would be difficult, we'd have |
| 356 | * Client Hello message, we simply use the version from the | 356 | * to read at least one additional record to find out. |
| 357 | * record header -- this is incorrect but unlikely to fail in | 357 | * This doesn't usually happen in real life, so we just complain |
| 358 | * practice */ | 358 | * for now. |
| 359 | */ | ||
| 359 | if (p[3] == 0 && p[4] < 6) | 360 | if (p[3] == 0 && p[4] < 6) |
| 360 | v[1]=p[2]; | 361 | { |
| 362 | SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_SMALL); | ||
| 363 | goto err; | ||
| 364 | } | ||
| 365 | v[1]=p[10]; /* minor version according to client_version */ | ||
| 361 | if (v[1] >= TLS1_VERSION_MINOR) | 366 | if (v[1] >= TLS1_VERSION_MINOR) |
| 362 | { | 367 | { |
| 363 | if (!(s->options & SSL_OP_NO_TLSv1)) | 368 | if (!(s->options & SSL_OP_NO_TLSv1)) |
| @@ -495,9 +500,12 @@ int ssl23_get_client_hello(SSL *s) | |||
| 495 | 500 | ||
| 496 | s->state=SSL2_ST_GET_CLIENT_HELLO_A; | 501 | s->state=SSL2_ST_GET_CLIENT_HELLO_A; |
| 497 | if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) || | 502 | if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) || |
| 498 | use_sslv2_strong) | 503 | use_sslv2_strong || |
| 504 | (s->options & SSL_OP_NO_TLSv1 && s->options & SSL_OP_NO_SSLv3)) | ||
| 499 | s->s2->ssl2_rollback=0; | 505 | s->s2->ssl2_rollback=0; |
| 500 | else | 506 | else |
| 507 | /* reject SSL 2.0 session if client supports SSL 3.0 or TLS 1.0 | ||
| 508 | * (SSL 3.0 draft/RFC 2246, App. E.2) */ | ||
| 501 | s->s2->ssl2_rollback=1; | 509 | s->s2->ssl2_rollback=1; |
| 502 | 510 | ||
| 503 | /* setup the n bytes we have read so we get them from | 511 | /* setup the n bytes we have read so we get them from |
| @@ -559,10 +567,10 @@ int ssl23_get_client_hello(SSL *s) | |||
| 559 | } | 567 | } |
| 560 | s->init_num=0; | 568 | s->init_num=0; |
| 561 | 569 | ||
| 562 | if (buf != buf_space) Free(buf); | 570 | if (buf != buf_space) OPENSSL_free(buf); |
| 563 | s->first_packet=1; | 571 | s->first_packet=1; |
| 564 | return(SSL_accept(s)); | 572 | return(SSL_accept(s)); |
| 565 | err: | 573 | err: |
| 566 | if (buf != buf_space) Free(buf); | 574 | if (buf != buf_space) OPENSSL_free(buf); |
| 567 | return(-1); | 575 | return(-1); |
| 568 | } | 576 | } |
diff --git a/src/lib/libssl/src/ssl/s2_clnt.c b/src/lib/libssl/src/ssl/s2_clnt.c index 6ff6a51362..47dd09c286 100644 --- a/src/lib/libssl/src/ssl/s2_clnt.c +++ b/src/lib/libssl/src/ssl/s2_clnt.c | |||
| @@ -920,6 +920,7 @@ int ssl2_set_certificate(SSL *s, int type, int len, unsigned char *data) | |||
| 920 | SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); | 920 | SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); |
| 921 | goto err; | 921 | goto err; |
| 922 | } | 922 | } |
| 923 | ERR_clear_error(); /* but we keep s->verify_result */ | ||
| 923 | 924 | ||
| 924 | /* server's cert for this session */ | 925 | /* server's cert for this session */ |
| 925 | sc=ssl_sess_cert_new(); | 926 | sc=ssl_sess_cert_new(); |
diff --git a/src/lib/libssl/src/ssl/s2_enc.c b/src/lib/libssl/src/ssl/s2_enc.c index a9458e7fa7..35acdf8276 100644 --- a/src/lib/libssl/src/ssl/s2_enc.c +++ b/src/lib/libssl/src/ssl/s2_enc.c | |||
| @@ -80,11 +80,11 @@ int ssl2_enc_init(SSL *s, int client) | |||
| 80 | 80 | ||
| 81 | if ((s->enc_read_ctx == NULL) && | 81 | if ((s->enc_read_ctx == NULL) && |
| 82 | ((s->enc_read_ctx=(EVP_CIPHER_CTX *) | 82 | ((s->enc_read_ctx=(EVP_CIPHER_CTX *) |
| 83 | Malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) | 83 | OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) |
| 84 | goto err; | 84 | goto err; |
| 85 | if ((s->enc_write_ctx == NULL) && | 85 | if ((s->enc_write_ctx == NULL) && |
| 86 | ((s->enc_write_ctx=(EVP_CIPHER_CTX *) | 86 | ((s->enc_write_ctx=(EVP_CIPHER_CTX *) |
| 87 | Malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) | 87 | OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) |
| 88 | goto err; | 88 | goto err; |
| 89 | 89 | ||
| 90 | rs= s->enc_read_ctx; | 90 | rs= s->enc_read_ctx; |
diff --git a/src/lib/libssl/src/ssl/s2_lib.c b/src/lib/libssl/src/ssl/s2_lib.c index 5ddba23a06..129ed89d97 100644 --- a/src/lib/libssl/src/ssl/s2_lib.c +++ b/src/lib/libssl/src/ssl/s2_lib.c | |||
| @@ -267,12 +267,12 @@ int ssl2_new(SSL *s) | |||
| 267 | { | 267 | { |
| 268 | SSL2_STATE *s2; | 268 | SSL2_STATE *s2; |
| 269 | 269 | ||
| 270 | if ((s2=Malloc(sizeof *s2)) == NULL) goto err; | 270 | if ((s2=OPENSSL_malloc(sizeof *s2)) == NULL) goto err; |
| 271 | memset(s2,0,sizeof *s2); | 271 | memset(s2,0,sizeof *s2); |
| 272 | 272 | ||
| 273 | if ((s2->rbuf=Malloc( | 273 | if ((s2->rbuf=OPENSSL_malloc( |
| 274 | SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER+2)) == NULL) goto err; | 274 | SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER+2)) == NULL) goto err; |
| 275 | if ((s2->wbuf=Malloc( | 275 | if ((s2->wbuf=OPENSSL_malloc( |
| 276 | SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER+2)) == NULL) goto err; | 276 | SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER+2)) == NULL) goto err; |
| 277 | s->s2=s2; | 277 | s->s2=s2; |
| 278 | 278 | ||
| @@ -281,9 +281,9 @@ int ssl2_new(SSL *s) | |||
| 281 | err: | 281 | err: |
| 282 | if (s2 != NULL) | 282 | if (s2 != NULL) |
| 283 | { | 283 | { |
| 284 | if (s2->wbuf != NULL) Free(s2->wbuf); | 284 | if (s2->wbuf != NULL) OPENSSL_free(s2->wbuf); |
| 285 | if (s2->rbuf != NULL) Free(s2->rbuf); | 285 | if (s2->rbuf != NULL) OPENSSL_free(s2->rbuf); |
| 286 | Free(s2); | 286 | OPENSSL_free(s2); |
| 287 | } | 287 | } |
| 288 | return(0); | 288 | return(0); |
| 289 | } | 289 | } |
| @@ -296,10 +296,10 @@ void ssl2_free(SSL *s) | |||
| 296 | return; | 296 | return; |
| 297 | 297 | ||
| 298 | s2=s->s2; | 298 | s2=s->s2; |
| 299 | if (s2->rbuf != NULL) Free(s2->rbuf); | 299 | if (s2->rbuf != NULL) OPENSSL_free(s2->rbuf); |
| 300 | if (s2->wbuf != NULL) Free(s2->wbuf); | 300 | if (s2->wbuf != NULL) OPENSSL_free(s2->wbuf); |
| 301 | memset(s2,0,sizeof *s2); | 301 | memset(s2,0,sizeof *s2); |
| 302 | Free(s2); | 302 | OPENSSL_free(s2); |
| 303 | s->s2=NULL; | 303 | s->s2=NULL; |
| 304 | } | 304 | } |
| 305 | 305 | ||
| @@ -384,7 +384,7 @@ SSL_CIPHER *ssl2_get_cipher_by_char(const unsigned char *p) | |||
| 384 | cpp=(SSL_CIPHER **)OBJ_bsearch((char *)&cp, | 384 | cpp=(SSL_CIPHER **)OBJ_bsearch((char *)&cp, |
| 385 | (char *)sorted, | 385 | (char *)sorted, |
| 386 | SSL2_NUM_CIPHERS,sizeof(SSL_CIPHER *), | 386 | SSL2_NUM_CIPHERS,sizeof(SSL_CIPHER *), |
| 387 | (int (*)())ssl_cipher_ptr_id_cmp); | 387 | FP_ICC ssl_cipher_ptr_id_cmp); |
| 388 | if ((cpp == NULL) || !(*cpp)->valid) | 388 | if ((cpp == NULL) || !(*cpp)->valid) |
| 389 | return(NULL); | 389 | return(NULL); |
| 390 | else | 390 | else |
diff --git a/src/lib/libssl/src/ssl/s2_srvr.c b/src/lib/libssl/src/ssl/s2_srvr.c index 332e284451..1ed02540ae 100644 --- a/src/lib/libssl/src/ssl/s2_srvr.c +++ b/src/lib/libssl/src/ssl/s2_srvr.c | |||
| @@ -898,7 +898,7 @@ static int request_certificate(SSL *s) | |||
| 898 | EVP_VerifyUpdate(&ctx,ccd,SSL2_MIN_CERT_CHALLENGE_LENGTH); | 898 | EVP_VerifyUpdate(&ctx,ccd,SSL2_MIN_CERT_CHALLENGE_LENGTH); |
| 899 | 899 | ||
| 900 | i=i2d_X509(s->cert->pkeys[SSL_PKEY_RSA_ENC].x509,NULL); | 900 | i=i2d_X509(s->cert->pkeys[SSL_PKEY_RSA_ENC].x509,NULL); |
| 901 | buf2=Malloc((unsigned int)i); | 901 | buf2=OPENSSL_malloc((unsigned int)i); |
| 902 | if (buf2 == NULL) | 902 | if (buf2 == NULL) |
| 903 | { | 903 | { |
| 904 | SSLerr(SSL_F_REQUEST_CERTIFICATE,ERR_R_MALLOC_FAILURE); | 904 | SSLerr(SSL_F_REQUEST_CERTIFICATE,ERR_R_MALLOC_FAILURE); |
| @@ -907,7 +907,7 @@ static int request_certificate(SSL *s) | |||
| 907 | p2=buf2; | 907 | p2=buf2; |
| 908 | i=i2d_X509(s->cert->pkeys[SSL_PKEY_RSA_ENC].x509,&p2); | 908 | i=i2d_X509(s->cert->pkeys[SSL_PKEY_RSA_ENC].x509,&p2); |
| 909 | EVP_VerifyUpdate(&ctx,buf2,(unsigned int)i); | 909 | EVP_VerifyUpdate(&ctx,buf2,(unsigned int)i); |
| 910 | Free(buf2); | 910 | OPENSSL_free(buf2); |
| 911 | 911 | ||
| 912 | pkey=X509_get_pubkey(x509); | 912 | pkey=X509_get_pubkey(x509); |
| 913 | if (pkey == NULL) goto end; | 913 | if (pkey == NULL) goto end; |
diff --git a/src/lib/libssl/src/ssl/s3_both.c b/src/lib/libssl/src/ssl/s3_both.c index 03e0c38770..d92c164b0f 100644 --- a/src/lib/libssl/src/ssl/s3_both.c +++ b/src/lib/libssl/src/ssl/s3_both.c | |||
| @@ -567,7 +567,7 @@ int ssl3_setup_buffers(SSL *s) | |||
| 567 | extra=SSL3_RT_MAX_EXTRA; | 567 | extra=SSL3_RT_MAX_EXTRA; |
| 568 | else | 568 | else |
| 569 | extra=0; | 569 | extra=0; |
| 570 | if ((p=Malloc(SSL3_RT_MAX_PACKET_SIZE+extra)) | 570 | if ((p=OPENSSL_malloc(SSL3_RT_MAX_PACKET_SIZE+extra)) |
| 571 | == NULL) | 571 | == NULL) |
| 572 | goto err; | 572 | goto err; |
| 573 | s->s3->rbuf.buf=p; | 573 | s->s3->rbuf.buf=p; |
| @@ -575,7 +575,7 @@ int ssl3_setup_buffers(SSL *s) | |||
| 575 | 575 | ||
| 576 | if (s->s3->wbuf.buf == NULL) | 576 | if (s->s3->wbuf.buf == NULL) |
| 577 | { | 577 | { |
| 578 | if ((p=Malloc(SSL3_RT_MAX_PACKET_SIZE)) | 578 | if ((p=OPENSSL_malloc(SSL3_RT_MAX_PACKET_SIZE)) |
| 579 | == NULL) | 579 | == NULL) |
| 580 | goto err; | 580 | goto err; |
| 581 | s->s3->wbuf.buf=p; | 581 | s->s3->wbuf.buf=p; |
diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c index 0c8f551f73..62040f9f1d 100644 --- a/src/lib/libssl/src/ssl/s3_clnt.c +++ b/src/lib/libssl/src/ssl/s3_clnt.c | |||
| @@ -69,7 +69,7 @@ static SSL_METHOD *ssl3_get_client_method(int ver); | |||
| 69 | static int ssl3_client_hello(SSL *s); | 69 | static int ssl3_client_hello(SSL *s); |
| 70 | static int ssl3_get_server_hello(SSL *s); | 70 | static int ssl3_get_server_hello(SSL *s); |
| 71 | static int ssl3_get_certificate_request(SSL *s); | 71 | static int ssl3_get_certificate_request(SSL *s); |
| 72 | static int ca_dn_cmp(X509_NAME **a,X509_NAME **b); | 72 | static int ca_dn_cmp(const X509_NAME * const *a,const X509_NAME * const *b); |
| 73 | static int ssl3_get_server_done(SSL *s); | 73 | static int ssl3_get_server_done(SSL *s); |
| 74 | static int ssl3_send_client_verify(SSL *s); | 74 | static int ssl3_send_client_verify(SSL *s); |
| 75 | static int ssl3_send_client_certificate(SSL *s); | 75 | static int ssl3_send_client_certificate(SSL *s); |
| @@ -142,7 +142,12 @@ int ssl3_connect(SSL *s) | |||
| 142 | if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); | 142 | if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); |
| 143 | 143 | ||
| 144 | if ((s->version & 0xff00 ) != 0x0300) | 144 | if ((s->version & 0xff00 ) != 0x0300) |
| 145 | abort(); | 145 | { |
| 146 | SSLerr(SSL_F_SSL3_CONNECT, SSL_R_INTERNAL_ERROR); | ||
| 147 | ret = -1; | ||
| 148 | goto end; | ||
| 149 | } | ||
| 150 | |||
| 146 | /* s->version=SSL3_VERSION; */ | 151 | /* s->version=SSL3_VERSION; */ |
| 147 | s->type=SSL_ST_CONNECT; | 152 | s->type=SSL_ST_CONNECT; |
| 148 | 153 | ||
| @@ -764,6 +769,7 @@ static int ssl3_get_server_certificate(SSL *s) | |||
| 764 | SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); | 769 | SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); |
| 765 | goto f_err; | 770 | goto f_err; |
| 766 | } | 771 | } |
| 772 | ERR_clear_error(); /* but we keep s->verify_result */ | ||
| 767 | 773 | ||
| 768 | sc=ssl_sess_cert_new(); | 774 | sc=ssl_sess_cert_new(); |
| 769 | if (sc == NULL) goto err; | 775 | if (sc == NULL) goto err; |
| @@ -934,10 +940,12 @@ static int ssl3_get_key_exchange(SSL *s) | |||
| 934 | s->session->sess_cert->peer_rsa_tmp=rsa; | 940 | s->session->sess_cert->peer_rsa_tmp=rsa; |
| 935 | rsa=NULL; | 941 | rsa=NULL; |
| 936 | } | 942 | } |
| 937 | else | 943 | #else /* NO_RSA */ |
| 944 | if (0) | ||
| 945 | ; | ||
| 938 | #endif | 946 | #endif |
| 939 | #ifndef NO_DH | 947 | #ifndef NO_DH |
| 940 | if (alg & SSL_kEDH) | 948 | else if (alg & SSL_kEDH) |
| 941 | { | 949 | { |
| 942 | if ((dh=DH_new()) == NULL) | 950 | if ((dh=DH_new()) == NULL) |
| 943 | { | 951 | { |
| @@ -993,10 +1001,12 @@ static int ssl3_get_key_exchange(SSL *s) | |||
| 993 | #ifndef NO_RSA | 1001 | #ifndef NO_RSA |
| 994 | if (alg & SSL_aRSA) | 1002 | if (alg & SSL_aRSA) |
| 995 | pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509); | 1003 | pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509); |
| 996 | else | 1004 | #else |
| 1005 | if (0) | ||
| 1006 | ; | ||
| 997 | #endif | 1007 | #endif |
| 998 | #ifndef NO_DSA | 1008 | #ifndef NO_DSA |
| 999 | if (alg & SSL_aDSS) | 1009 | else if (alg & SSL_aDSS) |
| 1000 | pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_DSA_SIGN].x509); | 1010 | pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_DSA_SIGN].x509); |
| 1001 | #endif | 1011 | #endif |
| 1002 | /* else anonymous DH, so no certificate or pkey. */ | 1012 | /* else anonymous DH, so no certificate or pkey. */ |
| @@ -1010,7 +1020,7 @@ static int ssl3_get_key_exchange(SSL *s) | |||
| 1010 | SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER); | 1020 | SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER); |
| 1011 | goto f_err; | 1021 | goto f_err; |
| 1012 | } | 1022 | } |
| 1013 | #endif | 1023 | #endif /* !NO_DH */ |
| 1014 | if (alg & SSL_aFZA) | 1024 | if (alg & SSL_aFZA) |
| 1015 | { | 1025 | { |
| 1016 | al=SSL_AD_HANDSHAKE_FAILURE; | 1026 | al=SSL_AD_HANDSHAKE_FAILURE; |
| @@ -1274,7 +1284,7 @@ err: | |||
| 1274 | return(ret); | 1284 | return(ret); |
| 1275 | } | 1285 | } |
| 1276 | 1286 | ||
| 1277 | static int ca_dn_cmp(X509_NAME **a, X509_NAME **b) | 1287 | static int ca_dn_cmp(const X509_NAME * const *a, const X509_NAME * const *b) |
| 1278 | { | 1288 | { |
| 1279 | return(X509_NAME_cmp(*a,*b)); | 1289 | return(X509_NAME_cmp(*a,*b)); |
| 1280 | } | 1290 | } |
diff --git a/src/lib/libssl/src/ssl/s3_enc.c b/src/lib/libssl/src/ssl/s3_enc.c index df4acab3d0..012a4b8740 100644 --- a/src/lib/libssl/src/ssl/s3_enc.c +++ b/src/lib/libssl/src/ssl/s3_enc.c | |||
| @@ -150,7 +150,7 @@ int ssl3_change_cipher_state(SSL *s, int which) | |||
| 150 | { | 150 | { |
| 151 | if ((s->enc_read_ctx == NULL) && | 151 | if ((s->enc_read_ctx == NULL) && |
| 152 | ((s->enc_read_ctx=(EVP_CIPHER_CTX *) | 152 | ((s->enc_read_ctx=(EVP_CIPHER_CTX *) |
| 153 | Malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) | 153 | OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) |
| 154 | goto err; | 154 | goto err; |
| 155 | dd= s->enc_read_ctx; | 155 | dd= s->enc_read_ctx; |
| 156 | s->read_hash=m; | 156 | s->read_hash=m; |
| @@ -170,7 +170,7 @@ int ssl3_change_cipher_state(SSL *s, int which) | |||
| 170 | } | 170 | } |
| 171 | if (s->s3->rrec.comp == NULL) | 171 | if (s->s3->rrec.comp == NULL) |
| 172 | s->s3->rrec.comp=(unsigned char *) | 172 | s->s3->rrec.comp=(unsigned char *) |
| 173 | Malloc(SSL3_RT_MAX_PLAIN_LENGTH); | 173 | OPENSSL_malloc(SSL3_RT_MAX_PLAIN_LENGTH); |
| 174 | if (s->s3->rrec.comp == NULL) | 174 | if (s->s3->rrec.comp == NULL) |
| 175 | goto err; | 175 | goto err; |
| 176 | } | 176 | } |
| @@ -181,7 +181,7 @@ int ssl3_change_cipher_state(SSL *s, int which) | |||
| 181 | { | 181 | { |
| 182 | if ((s->enc_write_ctx == NULL) && | 182 | if ((s->enc_write_ctx == NULL) && |
| 183 | ((s->enc_write_ctx=(EVP_CIPHER_CTX *) | 183 | ((s->enc_write_ctx=(EVP_CIPHER_CTX *) |
| 184 | Malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) | 184 | OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) |
| 185 | goto err; | 185 | goto err; |
| 186 | dd= s->enc_write_ctx; | 186 | dd= s->enc_write_ctx; |
| 187 | s->write_hash=m; | 187 | s->write_hash=m; |
| @@ -300,7 +300,7 @@ int ssl3_setup_key_block(SSL *s) | |||
| 300 | 300 | ||
| 301 | ssl3_cleanup_key_block(s); | 301 | ssl3_cleanup_key_block(s); |
| 302 | 302 | ||
| 303 | if ((p=Malloc(num)) == NULL) | 303 | if ((p=OPENSSL_malloc(num)) == NULL) |
| 304 | goto err; | 304 | goto err; |
| 305 | 305 | ||
| 306 | s->s3->tmp.key_block_length=num; | 306 | s->s3->tmp.key_block_length=num; |
| @@ -320,7 +320,7 @@ void ssl3_cleanup_key_block(SSL *s) | |||
| 320 | { | 320 | { |
| 321 | memset(s->s3->tmp.key_block,0, | 321 | memset(s->s3->tmp.key_block,0, |
| 322 | s->s3->tmp.key_block_length); | 322 | s->s3->tmp.key_block_length); |
| 323 | Free(s->s3->tmp.key_block); | 323 | OPENSSL_free(s->s3->tmp.key_block); |
| 324 | s->s3->tmp.key_block=NULL; | 324 | s->s3->tmp.key_block=NULL; |
| 325 | } | 325 | } |
| 326 | s->s3->tmp.key_block_length=0; | 326 | s->s3->tmp.key_block_length=0; |
diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c index 7ada26cbb6..cee2021b6b 100644 --- a/src/lib/libssl/src/ssl/s3_lib.c +++ b/src/lib/libssl/src/ssl/s3_lib.c | |||
| @@ -648,7 +648,7 @@ int ssl3_new(SSL *s) | |||
| 648 | { | 648 | { |
| 649 | SSL3_STATE *s3; | 649 | SSL3_STATE *s3; |
| 650 | 650 | ||
| 651 | if ((s3=Malloc(sizeof *s3)) == NULL) goto err; | 651 | if ((s3=OPENSSL_malloc(sizeof *s3)) == NULL) goto err; |
| 652 | memset(s3,0,sizeof *s3); | 652 | memset(s3,0,sizeof *s3); |
| 653 | 653 | ||
| 654 | s->s3=s3; | 654 | s->s3=s3; |
| @@ -666,11 +666,11 @@ void ssl3_free(SSL *s) | |||
| 666 | 666 | ||
| 667 | ssl3_cleanup_key_block(s); | 667 | ssl3_cleanup_key_block(s); |
| 668 | if (s->s3->rbuf.buf != NULL) | 668 | if (s->s3->rbuf.buf != NULL) |
| 669 | Free(s->s3->rbuf.buf); | 669 | OPENSSL_free(s->s3->rbuf.buf); |
| 670 | if (s->s3->wbuf.buf != NULL) | 670 | if (s->s3->wbuf.buf != NULL) |
| 671 | Free(s->s3->wbuf.buf); | 671 | OPENSSL_free(s->s3->wbuf.buf); |
| 672 | if (s->s3->rrec.comp != NULL) | 672 | if (s->s3->rrec.comp != NULL) |
| 673 | Free(s->s3->rrec.comp); | 673 | OPENSSL_free(s->s3->rrec.comp); |
| 674 | #ifndef NO_DH | 674 | #ifndef NO_DH |
| 675 | if (s->s3->tmp.dh != NULL) | 675 | if (s->s3->tmp.dh != NULL) |
| 676 | DH_free(s->s3->tmp.dh); | 676 | DH_free(s->s3->tmp.dh); |
| @@ -678,7 +678,7 @@ void ssl3_free(SSL *s) | |||
| 678 | if (s->s3->tmp.ca_names != NULL) | 678 | if (s->s3->tmp.ca_names != NULL) |
| 679 | sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free); | 679 | sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free); |
| 680 | memset(s->s3,0,sizeof *s->s3); | 680 | memset(s->s3,0,sizeof *s->s3); |
| 681 | Free(s->s3); | 681 | OPENSSL_free(s->s3); |
| 682 | s->s3=NULL; | 682 | s->s3=NULL; |
| 683 | } | 683 | } |
| 684 | 684 | ||
| @@ -692,7 +692,7 @@ void ssl3_clear(SSL *s) | |||
| 692 | 692 | ||
| 693 | if (s->s3->rrec.comp != NULL) | 693 | if (s->s3->rrec.comp != NULL) |
| 694 | { | 694 | { |
| 695 | Free(s->s3->rrec.comp); | 695 | OPENSSL_free(s->s3->rrec.comp); |
| 696 | s->s3->rrec.comp=NULL; | 696 | s->s3->rrec.comp=NULL; |
| 697 | } | 697 | } |
| 698 | #ifndef NO_DH | 698 | #ifndef NO_DH |
| @@ -1041,7 +1041,7 @@ SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p) | |||
| 1041 | cpp=(SSL_CIPHER **)OBJ_bsearch((char *)&cp, | 1041 | cpp=(SSL_CIPHER **)OBJ_bsearch((char *)&cp, |
| 1042 | (char *)sorted, | 1042 | (char *)sorted, |
| 1043 | SSL3_NUM_CIPHERS,sizeof(SSL_CIPHER *), | 1043 | SSL3_NUM_CIPHERS,sizeof(SSL_CIPHER *), |
| 1044 | (int (*)())ssl_cipher_ptr_id_cmp); | 1044 | FP_ICC ssl_cipher_ptr_id_cmp); |
| 1045 | if ((cpp == NULL) || !(*cpp)->valid) | 1045 | if ((cpp == NULL) || !(*cpp)->valid) |
| 1046 | return(NULL); | 1046 | return(NULL); |
| 1047 | else | 1047 | else |
diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c index eb965310d9..1414079853 100644 --- a/src/lib/libssl/src/ssl/s3_pkt.c +++ b/src/lib/libssl/src/ssl/s3_pkt.c | |||
| @@ -899,19 +899,21 @@ start: | |||
| 899 | return(-1); | 899 | return(-1); |
| 900 | } | 900 | } |
| 901 | 901 | ||
| 902 | if (s->s3->rbuf.left == 0) /* no read-ahead left? */ | 902 | if (!(s->mode & SSL_MODE_AUTO_RETRY)) |
| 903 | { | 903 | { |
| 904 | BIO *bio; | 904 | if (s->s3->rbuf.left == 0) /* no read-ahead left? */ |
| 905 | /* In the case where we try to read application data | 905 | { |
| 906 | * the first time, but we trigger an SSL handshake, we | 906 | BIO *bio; |
| 907 | * return -1 with the retry option set. I do this | 907 | /* In the case where we try to read application data, |
| 908 | * otherwise renegotiation can cause nasty problems | 908 | * but we trigger an SSL handshake, we return -1 with |
| 909 | * in the blocking world */ /* ? */ | 909 | * the retry option set. Otherwise renegotiation may |
| 910 | s->rwstate=SSL_READING; | 910 | * cause nasty problems in the blocking world */ |
| 911 | bio=SSL_get_rbio(s); | 911 | s->rwstate=SSL_READING; |
| 912 | BIO_clear_retry_flags(bio); | 912 | bio=SSL_get_rbio(s); |
| 913 | BIO_set_retry_read(bio); | 913 | BIO_clear_retry_flags(bio); |
| 914 | return(-1); | 914 | BIO_set_retry_read(bio); |
| 915 | return(-1); | ||
| 916 | } | ||
| 915 | } | 917 | } |
| 916 | } | 918 | } |
| 917 | } | 919 | } |
| @@ -954,7 +956,7 @@ start: | |||
| 954 | s->rwstate=SSL_NOTHING; | 956 | s->rwstate=SSL_NOTHING; |
| 955 | s->s3->fatal_alert = alert_descr; | 957 | s->s3->fatal_alert = alert_descr; |
| 956 | SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr); | 958 | SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr); |
| 957 | sprintf(tmp,"%d",alert_descr); | 959 | BIO_snprintf(tmp,sizeof tmp,"%d",alert_descr); |
| 958 | ERR_add_error_data(2,"SSL alert number ",tmp); | 960 | ERR_add_error_data(2,"SSL alert number ",tmp); |
| 959 | s->shutdown|=SSL_RECEIVED_SHUTDOWN; | 961 | s->shutdown|=SSL_RECEIVED_SHUTDOWN; |
| 960 | SSL_CTX_remove_session(s->ctx,s->session); | 962 | SSL_CTX_remove_session(s->ctx,s->session); |
| @@ -1022,19 +1024,21 @@ start: | |||
| 1022 | return(-1); | 1024 | return(-1); |
| 1023 | } | 1025 | } |
| 1024 | 1026 | ||
| 1025 | if (s->s3->rbuf.left == 0) /* no read-ahead left? */ | 1027 | if (!(s->mode & SSL_MODE_AUTO_RETRY)) |
| 1026 | { | 1028 | { |
| 1027 | BIO *bio; | 1029 | if (s->s3->rbuf.left == 0) /* no read-ahead left? */ |
| 1028 | /* In the case where we try to read application data | 1030 | { |
| 1029 | * the first time, but we trigger an SSL handshake, we | 1031 | BIO *bio; |
| 1030 | * return -1 with the retry option set. I do this | 1032 | /* In the case where we try to read application data, |
| 1031 | * otherwise renegotiation can cause nasty problems | 1033 | * but we trigger an SSL handshake, we return -1 with |
| 1032 | * in the blocking world */ /* ? */ | 1034 | * the retry option set. Otherwise renegotiation may |
| 1033 | s->rwstate=SSL_READING; | 1035 | * cause nasty problems in the blocking world */ |
| 1034 | bio=SSL_get_rbio(s); | 1036 | s->rwstate=SSL_READING; |
| 1035 | BIO_clear_retry_flags(bio); | 1037 | bio=SSL_get_rbio(s); |
| 1036 | BIO_set_retry_read(bio); | 1038 | BIO_clear_retry_flags(bio); |
| 1037 | return(-1); | 1039 | BIO_set_retry_read(bio); |
| 1040 | return(-1); | ||
| 1041 | } | ||
| 1038 | } | 1042 | } |
| 1039 | goto start; | 1043 | goto start; |
| 1040 | } | 1044 | } |
diff --git a/src/lib/libssl/src/ssl/s3_srvr.c b/src/lib/libssl/src/ssl/s3_srvr.c index e23ca20bd3..bb8cfb31e5 100644 --- a/src/lib/libssl/src/ssl/s3_srvr.c +++ b/src/lib/libssl/src/ssl/s3_srvr.c | |||
| @@ -153,7 +153,10 @@ int ssl3_accept(SSL *s) | |||
| 153 | if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); | 153 | if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); |
| 154 | 154 | ||
| 155 | if ((s->version>>8) != 3) | 155 | if ((s->version>>8) != 3) |
| 156 | abort(); | 156 | { |
| 157 | SSLerr(SSL_F_SSL3_ACCEPT, SSL_R_INTERNAL_ERROR); | ||
| 158 | return -1; | ||
| 159 | } | ||
| 157 | s->type=SSL_ST_ACCEPT; | 160 | s->type=SSL_ST_ACCEPT; |
| 158 | 161 | ||
| 159 | if (s->init_buf == NULL) | 162 | if (s->init_buf == NULL) |
| @@ -982,7 +985,7 @@ static int ssl3_send_server_key_exchange(SSL *s) | |||
| 982 | dhp=cert->dh_tmp; | 985 | dhp=cert->dh_tmp; |
| 983 | if ((dhp == NULL) && (s->cert->dh_tmp_cb != NULL)) | 986 | if ((dhp == NULL) && (s->cert->dh_tmp_cb != NULL)) |
| 984 | dhp=s->cert->dh_tmp_cb(s, | 987 | dhp=s->cert->dh_tmp_cb(s, |
| 985 | !SSL_C_IS_EXPORT(s->s3->tmp.new_cipher), | 988 | SSL_C_IS_EXPORT(s->s3->tmp.new_cipher), |
| 986 | SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)); | 989 | SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)); |
| 987 | if (dhp == NULL) | 990 | if (dhp == NULL) |
| 988 | { | 991 | { |
| @@ -1326,11 +1329,22 @@ static int ssl3_get_client_key_exchange(SSL *s) | |||
| 1326 | goto f_err; | 1329 | goto f_err; |
| 1327 | } | 1330 | } |
| 1328 | 1331 | ||
| 1329 | if ((p[0] != (s->client_version>>8)) || (p[1] != (s->client_version & 0xff))) | 1332 | if (!((p[0] == (s->client_version>>8)) && (p[1] == (s->client_version & 0xff)))) |
| 1330 | { | 1333 | { |
| 1331 | al=SSL_AD_DECODE_ERROR; | 1334 | /* The premaster secret must contain the same version number as the |
| 1332 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); | 1335 | * ClientHello to detect version rollback attacks (strangely, the |
| 1333 | goto f_err; | 1336 | * protocol does not offer such protection for DH ciphersuites). |
| 1337 | * However, buggy clients exist that send the negotiated protocol | ||
| 1338 | * version instead if the server does not support the requested | ||
| 1339 | * protocol version. | ||
| 1340 | * If SSL_OP_TLS_ROLLBACK_BUG is set, tolerate such clients. */ | ||
| 1341 | if (!((s->options & SSL_OP_TLS_ROLLBACK_BUG) && | ||
| 1342 | (p[0] == (s->version>>8)) && (p[1] == (s->version & 0xff)))) | ||
| 1343 | { | ||
| 1344 | al=SSL_AD_DECODE_ERROR; | ||
| 1345 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); | ||
| 1346 | goto f_err; | ||
| 1347 | } | ||
| 1334 | } | 1348 | } |
| 1335 | 1349 | ||
| 1336 | s->session->master_key_length= | 1350 | s->session->master_key_length= |
diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h index bb846f491c..fdbdc70ba7 100644 --- a/src/lib/libssl/src/ssl/ssl.h +++ b/src/lib/libssl/src/ssl/ssl.h | |||
| @@ -59,12 +59,21 @@ | |||
| 59 | #ifndef HEADER_SSL_H | 59 | #ifndef HEADER_SSL_H |
| 60 | #define HEADER_SSL_H | 60 | #define HEADER_SSL_H |
| 61 | 61 | ||
| 62 | #ifndef NO_COMP | ||
| 63 | #include <openssl/comp.h> | ||
| 64 | #endif | ||
| 65 | #ifndef NO_BIO | ||
| 66 | #include <openssl/bio.h> | ||
| 67 | #endif | ||
| 68 | #ifndef NO_X509 | ||
| 69 | #include <openssl/x509.h> | ||
| 70 | #endif | ||
| 71 | #include <openssl/safestack.h> | ||
| 72 | |||
| 62 | #ifdef __cplusplus | 73 | #ifdef __cplusplus |
| 63 | extern "C" { | 74 | extern "C" { |
| 64 | #endif | 75 | #endif |
| 65 | 76 | ||
| 66 | #include <openssl/safestack.h> | ||
| 67 | |||
| 68 | /* SSLeay version number for ASN.1 encoding of the session information */ | 77 | /* SSLeay version number for ASN.1 encoding of the session information */ |
| 69 | /* Version 0 - initial version | 78 | /* Version 0 - initial version |
| 70 | * Version 1 - added the optional peer certificate | 79 | * Version 1 - added the optional peer certificate |
| @@ -140,6 +149,10 @@ extern "C" { | |||
| 140 | #define SSL_SENT_SHUTDOWN 1 | 149 | #define SSL_SENT_SHUTDOWN 1 |
| 141 | #define SSL_RECEIVED_SHUTDOWN 2 | 150 | #define SSL_RECEIVED_SHUTDOWN 2 |
| 142 | 151 | ||
| 152 | #ifdef __cplusplus | ||
| 153 | } | ||
| 154 | #endif | ||
| 155 | |||
| 143 | #include <openssl/crypto.h> | 156 | #include <openssl/crypto.h> |
| 144 | #include <openssl/lhash.h> | 157 | #include <openssl/lhash.h> |
| 145 | #include <openssl/buffer.h> | 158 | #include <openssl/buffer.h> |
| @@ -147,6 +160,10 @@ extern "C" { | |||
| 147 | #include <openssl/pem.h> | 160 | #include <openssl/pem.h> |
| 148 | #include <openssl/x509.h> | 161 | #include <openssl/x509.h> |
| 149 | 162 | ||
| 163 | #ifdef __cplusplus | ||
| 164 | extern "C" { | ||
| 165 | #endif | ||
| 166 | |||
| 150 | #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2) | 167 | #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2) |
| 151 | #define NO_SSL2 | 168 | #define NO_SSL2 |
| 152 | #endif | 169 | #endif |
| @@ -318,6 +335,9 @@ typedef struct ssl_session_st | |||
| 318 | * the misconception that non-blocking SSL_write() behaves like | 335 | * the misconception that non-blocking SSL_write() behaves like |
| 319 | * non-blocking write(): */ | 336 | * non-blocking write(): */ |
| 320 | #define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L | 337 | #define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L |
| 338 | /* Never bother the application with retries if the transport | ||
| 339 | * is blocking: */ | ||
| 340 | #define SSL_MODE_AUTO_RETRY 0x00000004L | ||
| 321 | 341 | ||
| 322 | /* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, | 342 | /* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, |
| 323 | * they cannot be used to clear bits. */ | 343 | * they cannot be used to clear bits. */ |
| @@ -343,15 +363,15 @@ typedef struct ssl_session_st | |||
| 343 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) | 363 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) |
| 344 | 364 | ||
| 345 | typedef struct ssl_comp_st | 365 | typedef struct ssl_comp_st |
| 346 | { | 366 | { |
| 347 | int id; | 367 | int id; |
| 348 | char *name; | 368 | char *name; |
| 349 | #ifdef HEADER_COMP_H | 369 | #ifndef NO_COMP |
| 350 | COMP_METHOD *method; | 370 | COMP_METHOD *method; |
| 351 | #else | 371 | #else |
| 352 | char *method; | 372 | char *method; |
| 353 | #endif | 373 | #endif |
| 354 | } SSL_COMP; | 374 | } SSL_COMP; |
| 355 | 375 | ||
| 356 | DECLARE_STACK_OF(SSL_COMP) | 376 | DECLARE_STACK_OF(SSL_COMP) |
| 357 | 377 | ||
| @@ -533,10 +553,10 @@ struct ssl_st | |||
| 533 | * same. This is so data can be read and written to different | 553 | * same. This is so data can be read and written to different |
| 534 | * handlers */ | 554 | * handlers */ |
| 535 | 555 | ||
| 536 | #ifdef HEADER_BIO_H | 556 | #ifndef NO_BIO |
| 537 | BIO *rbio; /* used by SSL_read */ | 557 | BIO *rbio; /* used by SSL_read */ |
| 538 | BIO *wbio; /* used by SSL_write */ | 558 | BIO *wbio; /* used by SSL_write */ |
| 539 | BIO *bbio; /* used during session-id reuse to concatinate | 559 | BIO *bbio; /* used during session-id reuse to concatenate |
| 540 | * messages */ | 560 | * messages */ |
| 541 | #else | 561 | #else |
| 542 | char *rbio; /* used by SSL_read */ | 562 | char *rbio; /* used by SSL_read */ |
| @@ -597,7 +617,7 @@ struct ssl_st | |||
| 597 | 617 | ||
| 598 | EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ | 618 | EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ |
| 599 | const EVP_MD *read_hash; /* used for mac generation */ | 619 | const EVP_MD *read_hash; /* used for mac generation */ |
| 600 | #ifdef HEADER_COMP_H | 620 | #ifndef NO_COMP |
| 601 | COMP_CTX *expand; /* uncompress */ | 621 | COMP_CTX *expand; /* uncompress */ |
| 602 | #else | 622 | #else |
| 603 | char *expand; | 623 | char *expand; |
| @@ -605,7 +625,7 @@ struct ssl_st | |||
| 605 | 625 | ||
| 606 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ | 626 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ |
| 607 | const EVP_MD *write_hash; /* used for mac generation */ | 627 | const EVP_MD *write_hash; /* used for mac generation */ |
| 608 | #ifdef HEADER_COMP_H | 628 | #ifndef NO_COMP |
| 609 | COMP_CTX *compress; /* compression */ | 629 | COMP_CTX *compress; /* compression */ |
| 610 | #else | 630 | #else |
| 611 | char *compress; | 631 | char *compress; |
| @@ -655,11 +675,19 @@ struct ssl_st | |||
| 655 | * SSLv3/TLS rollback check */ | 675 | * SSLv3/TLS rollback check */ |
| 656 | }; | 676 | }; |
| 657 | 677 | ||
| 678 | #ifdef __cplusplus | ||
| 679 | } | ||
| 680 | #endif | ||
| 681 | |||
| 658 | #include <openssl/ssl2.h> | 682 | #include <openssl/ssl2.h> |
| 659 | #include <openssl/ssl3.h> | 683 | #include <openssl/ssl3.h> |
| 660 | #include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */ | 684 | #include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */ |
| 661 | #include <openssl/ssl23.h> | 685 | #include <openssl/ssl23.h> |
| 662 | 686 | ||
| 687 | #ifdef __cplusplus | ||
| 688 | extern "C" { | ||
| 689 | #endif | ||
| 690 | |||
| 663 | /* compatibility */ | 691 | /* compatibility */ |
| 664 | #define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) | 692 | #define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) |
| 665 | #define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) | 693 | #define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) |
| @@ -883,7 +911,7 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count); | |||
| 883 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_sub_to_stack | 911 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_sub_to_stack |
| 884 | #endif | 912 | #endif |
| 885 | 913 | ||
| 886 | #ifdef HEADER_BIO_H | 914 | #ifndef NO_BIO |
| 887 | BIO_METHOD *BIO_f_ssl(void); | 915 | BIO_METHOD *BIO_f_ssl(void); |
| 888 | BIO *BIO_new_ssl(SSL_CTX *ctx,int client); | 916 | BIO *BIO_new_ssl(SSL_CTX *ctx,int client); |
| 889 | BIO *BIO_new_ssl_connect(SSL_CTX *ctx); | 917 | BIO *BIO_new_ssl_connect(SSL_CTX *ctx); |
| @@ -920,7 +948,7 @@ int SSL_set_fd(SSL *s, int fd); | |||
| 920 | int SSL_set_rfd(SSL *s, int fd); | 948 | int SSL_set_rfd(SSL *s, int fd); |
| 921 | int SSL_set_wfd(SSL *s, int fd); | 949 | int SSL_set_wfd(SSL *s, int fd); |
| 922 | #endif | 950 | #endif |
| 923 | #ifdef HEADER_BIO_H | 951 | #ifndef NO_BIO |
| 924 | void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); | 952 | void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); |
| 925 | BIO * SSL_get_rbio(SSL *s); | 953 | BIO * SSL_get_rbio(SSL *s); |
| 926 | BIO * SSL_get_wbio(SSL *s); | 954 | BIO * SSL_get_wbio(SSL *s); |
| @@ -975,7 +1003,7 @@ int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b); | |||
| 975 | #ifndef NO_FP_API | 1003 | #ifndef NO_FP_API |
| 976 | int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses); | 1004 | int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses); |
| 977 | #endif | 1005 | #endif |
| 978 | #ifdef HEADER_BIO_H | 1006 | #ifndef NO_BIO |
| 979 | int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses); | 1007 | int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses); |
| 980 | #endif | 1008 | #endif |
| 981 | void SSL_SESSION_free(SSL_SESSION *ses); | 1009 | void SSL_SESSION_free(SSL_SESSION *ses); |
| @@ -1171,7 +1199,7 @@ void SSL_set_tmp_dh_callback(SSL *ssl, | |||
| 1171 | int keylength)); | 1199 | int keylength)); |
| 1172 | #endif | 1200 | #endif |
| 1173 | 1201 | ||
| 1174 | #ifdef HEADER_COMP_H | 1202 | #ifndef NO_COMP |
| 1175 | int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); | 1203 | int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); |
| 1176 | #else | 1204 | #else |
| 1177 | int SSL_COMP_add_compression_method(int id,char *cm); | 1205 | int SSL_COMP_add_compression_method(int id,char *cm); |
| @@ -1443,6 +1471,7 @@ int SSL_COMP_add_compression_method(int id,char *cm); | |||
| 1443 | #define SSL_R_READ_WRONG_PACKET_TYPE 212 | 1471 | #define SSL_R_READ_WRONG_PACKET_TYPE 212 |
| 1444 | #define SSL_R_RECORD_LENGTH_MISMATCH 213 | 1472 | #define SSL_R_RECORD_LENGTH_MISMATCH 213 |
| 1445 | #define SSL_R_RECORD_TOO_LARGE 214 | 1473 | #define SSL_R_RECORD_TOO_LARGE 214 |
| 1474 | #define SSL_R_RECORD_TOO_SMALL 1093 | ||
| 1446 | #define SSL_R_REQUIRED_CIPHER_MISSING 215 | 1475 | #define SSL_R_REQUIRED_CIPHER_MISSING 215 |
| 1447 | #define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 | 1476 | #define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 |
| 1448 | #define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 | 1477 | #define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 |
diff --git a/src/lib/libssl/src/ssl/ssl2.h b/src/lib/libssl/src/ssl/ssl2.h index 01d41c88c5..df7d03c18f 100644 --- a/src/lib/libssl/src/ssl/ssl2.h +++ b/src/lib/libssl/src/ssl/ssl2.h | |||
| @@ -133,7 +133,11 @@ extern "C" { | |||
| 133 | 133 | ||
| 134 | /* Upper/Lower Bounds */ | 134 | /* Upper/Lower Bounds */ |
| 135 | #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 | 135 | #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 |
| 136 | #ifdef MPE | ||
| 137 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)29998 | ||
| 138 | #else | ||
| 136 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)32767 | 139 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)32767 |
| 140 | #endif | ||
| 137 | #define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /**/ | 141 | #define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /**/ |
| 138 | 142 | ||
| 139 | #define SSL2_CHALLENGE_LENGTH 16 | 143 | #define SSL2_CHALLENGE_LENGTH 16 |
diff --git a/src/lib/libssl/src/ssl/ssl3.h b/src/lib/libssl/src/ssl/ssl3.h index f616763830..7ee1feaa67 100644 --- a/src/lib/libssl/src/ssl/ssl3.h +++ b/src/lib/libssl/src/ssl/ssl3.h | |||
| @@ -59,6 +59,9 @@ | |||
| 59 | #ifndef HEADER_SSL3_H | 59 | #ifndef HEADER_SSL3_H |
| 60 | #define HEADER_SSL3_H | 60 | #define HEADER_SSL3_H |
| 61 | 61 | ||
| 62 | #ifndef NO_COMP | ||
| 63 | #include <openssl/comp.h> | ||
| 64 | #endif | ||
| 62 | #include <openssl/buffer.h> | 65 | #include <openssl/buffer.h> |
| 63 | #include <openssl/evp.h> | 66 | #include <openssl/evp.h> |
| 64 | #include <openssl/ssl.h> | 67 | #include <openssl/ssl.h> |
| @@ -310,7 +313,7 @@ typedef struct ssl3_state_st | |||
| 310 | 313 | ||
| 311 | const EVP_CIPHER *new_sym_enc; | 314 | const EVP_CIPHER *new_sym_enc; |
| 312 | const EVP_MD *new_hash; | 315 | const EVP_MD *new_hash; |
| 313 | #ifdef HEADER_COMP_H | 316 | #ifndef NO_COMP |
| 314 | const SSL_COMP *new_compression; | 317 | const SSL_COMP *new_compression; |
| 315 | #else | 318 | #else |
| 316 | char *new_compression; | 319 | char *new_compression; |
diff --git a/src/lib/libssl/src/ssl/ssl_asn1.c b/src/lib/libssl/src/ssl/ssl_asn1.c index e77cdddfd3..fa6456e4f5 100644 --- a/src/lib/libssl/src/ssl/ssl_asn1.c +++ b/src/lib/libssl/src/ssl/ssl_asn1.c | |||
| @@ -92,7 +92,7 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) | |||
| 92 | 92 | ||
| 93 | /* Note that I cheat in the following 2 assignments. I know | 93 | /* Note that I cheat in the following 2 assignments. I know |
| 94 | * that if the ASN1_INTEGER passed to ASN1_INTEGER_set | 94 | * that if the ASN1_INTEGER passed to ASN1_INTEGER_set |
| 95 | * is > sizeof(long)+1, the buffer will not be re-Malloc()ed. | 95 | * is > sizeof(long)+1, the buffer will not be re-OPENSSL_malloc()ed. |
| 96 | * This is a bit evil but makes things simple, no dynamic allocation | 96 | * This is a bit evil but makes things simple, no dynamic allocation |
| 97 | * to clean up :-) */ | 97 | * to clean up :-) */ |
| 98 | a.version.length=LSIZE2; | 98 | a.version.length=LSIZE2; |
| @@ -223,13 +223,13 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 223 | ai.data=NULL; ai.length=0; | 223 | ai.data=NULL; ai.length=0; |
| 224 | M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER); | 224 | M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER); |
| 225 | version=(int)ASN1_INTEGER_get(aip); | 225 | version=(int)ASN1_INTEGER_get(aip); |
| 226 | if (ai.data != NULL) { Free(ai.data); ai.data=NULL; ai.length=0; } | 226 | if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; } |
| 227 | 227 | ||
| 228 | /* we don't care about the version right now :-) */ | 228 | /* we don't care about the version right now :-) */ |
| 229 | M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER); | 229 | M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER); |
| 230 | ssl_version=(int)ASN1_INTEGER_get(aip); | 230 | ssl_version=(int)ASN1_INTEGER_get(aip); |
| 231 | ret->ssl_version=ssl_version; | 231 | ret->ssl_version=ssl_version; |
| 232 | if (ai.data != NULL) { Free(ai.data); ai.data=NULL; ai.length=0; } | 232 | if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; } |
| 233 | 233 | ||
| 234 | os.data=NULL; os.length=0; | 234 | os.data=NULL; os.length=0; |
| 235 | M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING); | 235 | M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING); |
| @@ -291,14 +291,14 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 291 | else | 291 | else |
| 292 | ret->key_arg_length=os.length; | 292 | ret->key_arg_length=os.length; |
| 293 | memcpy(ret->key_arg,os.data,ret->key_arg_length); | 293 | memcpy(ret->key_arg,os.data,ret->key_arg_length); |
| 294 | if (os.data != NULL) Free(os.data); | 294 | if (os.data != NULL) OPENSSL_free(os.data); |
| 295 | 295 | ||
| 296 | ai.length=0; | 296 | ai.length=0; |
| 297 | M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,1); | 297 | M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,1); |
| 298 | if (ai.data != NULL) | 298 | if (ai.data != NULL) |
| 299 | { | 299 | { |
| 300 | ret->time=ASN1_INTEGER_get(aip); | 300 | ret->time=ASN1_INTEGER_get(aip); |
| 301 | Free(ai.data); ai.data=NULL; ai.length=0; | 301 | OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; |
| 302 | } | 302 | } |
| 303 | else | 303 | else |
| 304 | ret->time=time(NULL); | 304 | ret->time=time(NULL); |
| @@ -308,7 +308,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 308 | if (ai.data != NULL) | 308 | if (ai.data != NULL) |
| 309 | { | 309 | { |
| 310 | ret->timeout=ASN1_INTEGER_get(aip); | 310 | ret->timeout=ASN1_INTEGER_get(aip); |
| 311 | Free(ai.data); ai.data=NULL; ai.length=0; | 311 | OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; |
| 312 | } | 312 | } |
| 313 | else | 313 | else |
| 314 | ret->timeout=3; | 314 | ret->timeout=3; |
| @@ -330,7 +330,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 330 | SSLerr(SSL_F_D2I_SSL_SESSION,SSL_R_BAD_LENGTH); | 330 | SSLerr(SSL_F_D2I_SSL_SESSION,SSL_R_BAD_LENGTH); |
| 331 | ret->sid_ctx_length=os.length; | 331 | ret->sid_ctx_length=os.length; |
| 332 | memcpy(ret->sid_ctx,os.data,os.length); | 332 | memcpy(ret->sid_ctx,os.data,os.length); |
| 333 | Free(os.data); os.data=NULL; os.length=0; | 333 | OPENSSL_free(os.data); os.data=NULL; os.length=0; |
| 334 | } | 334 | } |
| 335 | else | 335 | else |
| 336 | ret->sid_ctx_length=0; | 336 | ret->sid_ctx_length=0; |
| @@ -340,7 +340,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 340 | if (ai.data != NULL) | 340 | if (ai.data != NULL) |
| 341 | { | 341 | { |
| 342 | ret->verify_result=ASN1_INTEGER_get(aip); | 342 | ret->verify_result=ASN1_INTEGER_get(aip); |
| 343 | Free(ai.data); ai.data=NULL; ai.length=0; | 343 | OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; |
| 344 | } | 344 | } |
| 345 | else | 345 | else |
| 346 | ret->verify_result=X509_V_OK; | 346 | ret->verify_result=X509_V_OK; |
diff --git a/src/lib/libssl/src/ssl/ssl_cert.c b/src/lib/libssl/src/ssl/ssl_cert.c index f2335d5650..c26df62c20 100644 --- a/src/lib/libssl/src/ssl/ssl_cert.c +++ b/src/lib/libssl/src/ssl/ssl_cert.c | |||
| @@ -143,7 +143,7 @@ CERT *ssl_cert_new(void) | |||
| 143 | { | 143 | { |
| 144 | CERT *ret; | 144 | CERT *ret; |
| 145 | 145 | ||
| 146 | ret=(CERT *)Malloc(sizeof(CERT)); | 146 | ret=(CERT *)OPENSSL_malloc(sizeof(CERT)); |
| 147 | if (ret == NULL) | 147 | if (ret == NULL) |
| 148 | { | 148 | { |
| 149 | SSLerr(SSL_F_SSL_CERT_NEW,ERR_R_MALLOC_FAILURE); | 149 | SSLerr(SSL_F_SSL_CERT_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -162,7 +162,7 @@ CERT *ssl_cert_dup(CERT *cert) | |||
| 162 | CERT *ret; | 162 | CERT *ret; |
| 163 | int i; | 163 | int i; |
| 164 | 164 | ||
| 165 | ret = (CERT *)Malloc(sizeof(CERT)); | 165 | ret = (CERT *)OPENSSL_malloc(sizeof(CERT)); |
| 166 | if (ret == NULL) | 166 | if (ret == NULL) |
| 167 | { | 167 | { |
| 168 | SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_MALLOC_FAILURE); | 168 | SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_MALLOC_FAILURE); |
| @@ -331,7 +331,7 @@ void ssl_cert_free(CERT *c) | |||
| 331 | EVP_PKEY_free(c->pkeys[i].publickey); | 331 | EVP_PKEY_free(c->pkeys[i].publickey); |
| 332 | #endif | 332 | #endif |
| 333 | } | 333 | } |
| 334 | Free(c); | 334 | OPENSSL_free(c); |
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | int ssl_cert_inst(CERT **o) | 337 | int ssl_cert_inst(CERT **o) |
| @@ -367,7 +367,7 @@ SESS_CERT *ssl_sess_cert_new(void) | |||
| 367 | { | 367 | { |
| 368 | SESS_CERT *ret; | 368 | SESS_CERT *ret; |
| 369 | 369 | ||
| 370 | ret = Malloc(sizeof *ret); | 370 | ret = OPENSSL_malloc(sizeof *ret); |
| 371 | if (ret == NULL) | 371 | if (ret == NULL) |
| 372 | { | 372 | { |
| 373 | SSLerr(SSL_F_SSL_SESS_CERT_NEW, ERR_R_MALLOC_FAILURE); | 373 | SSLerr(SSL_F_SSL_SESS_CERT_NEW, ERR_R_MALLOC_FAILURE); |
| @@ -426,7 +426,7 @@ void ssl_sess_cert_free(SESS_CERT *sc) | |||
| 426 | DH_free(sc->peer_dh_tmp); | 426 | DH_free(sc->peer_dh_tmp); |
| 427 | #endif | 427 | #endif |
| 428 | 428 | ||
| 429 | Free(sc); | 429 | OPENSSL_free(sc); |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | int ssl_set_peer_cert_type(SESS_CERT *sc,int type) | 432 | int ssl_set_peer_cert_type(SESS_CERT *sc,int type) |
| @@ -568,7 +568,7 @@ int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x) | |||
| 568 | return(add_client_CA(&(ctx->client_CA),x)); | 568 | return(add_client_CA(&(ctx->client_CA),x)); |
| 569 | } | 569 | } |
| 570 | 570 | ||
| 571 | static int xname_cmp(X509_NAME **a,X509_NAME **b) | 571 | static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b) |
| 572 | { | 572 | { |
| 573 | return(X509_NAME_cmp(*a,*b)); | 573 | return(X509_NAME_cmp(*a,*b)); |
| 574 | } | 574 | } |
| @@ -589,7 +589,7 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file) | |||
| 589 | X509_NAME *xn=NULL; | 589 | X509_NAME *xn=NULL; |
| 590 | STACK_OF(X509_NAME) *ret,*sk; | 590 | STACK_OF(X509_NAME) *ret,*sk; |
| 591 | 591 | ||
| 592 | ret=sk_X509_NAME_new(NULL); | 592 | ret=sk_X509_NAME_new_null(); |
| 593 | sk=sk_X509_NAME_new(xname_cmp); | 593 | sk=sk_X509_NAME_new(xname_cmp); |
| 594 | 594 | ||
| 595 | in=BIO_new(BIO_s_file_internal()); | 595 | in=BIO_new(BIO_s_file_internal()); |
| @@ -644,53 +644,53 @@ err: | |||
| 644 | 644 | ||
| 645 | int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, | 645 | int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, |
| 646 | const char *file) | 646 | const char *file) |
| 647 | { | ||
| 648 | BIO *in; | ||
| 649 | X509 *x=NULL; | ||
| 650 | X509_NAME *xn=NULL; | ||
| 651 | int ret=1; | ||
| 652 | int (*oldcmp)(X509_NAME **a, X509_NAME **b); | ||
| 653 | |||
| 654 | oldcmp=sk_X509_NAME_set_cmp_func(stack,xname_cmp); | ||
| 655 | |||
| 656 | in=BIO_new(BIO_s_file_internal()); | ||
| 657 | |||
| 658 | if (in == NULL) | ||
| 659 | { | 647 | { |
| 660 | SSLerr(SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE); | 648 | BIO *in; |
| 661 | goto err; | 649 | X509 *x=NULL; |
| 662 | } | 650 | X509_NAME *xn=NULL; |
| 651 | int ret=1; | ||
| 652 | int (*oldcmp)(const X509_NAME * const *a, const X509_NAME * const *b); | ||
| 663 | 653 | ||
| 664 | if (!BIO_read_filename(in,file)) | 654 | oldcmp=sk_X509_NAME_set_cmp_func(stack,xname_cmp); |
| 665 | goto err; | 655 | |
| 666 | 656 | in=BIO_new(BIO_s_file_internal()); | |
| 667 | for (;;) | 657 | |
| 668 | { | 658 | if (in == NULL) |
| 669 | if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL) | 659 | { |
| 670 | break; | 660 | SSLerr(SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE); |
| 671 | if ((xn=X509_get_subject_name(x)) == NULL) goto err; | 661 | goto err; |
| 672 | xn=X509_NAME_dup(xn); | 662 | } |
| 673 | if (xn == NULL) goto err; | 663 | |
| 674 | if (sk_X509_NAME_find(stack,xn) >= 0) | 664 | if (!BIO_read_filename(in,file)) |
| 675 | X509_NAME_free(xn); | 665 | goto err; |
| 676 | else | 666 | |
| 677 | sk_X509_NAME_push(stack,xn); | 667 | for (;;) |
| 678 | } | 668 | { |
| 669 | if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL) | ||
| 670 | break; | ||
| 671 | if ((xn=X509_get_subject_name(x)) == NULL) goto err; | ||
| 672 | xn=X509_NAME_dup(xn); | ||
| 673 | if (xn == NULL) goto err; | ||
| 674 | if (sk_X509_NAME_find(stack,xn) >= 0) | ||
| 675 | X509_NAME_free(xn); | ||
| 676 | else | ||
| 677 | sk_X509_NAME_push(stack,xn); | ||
| 678 | } | ||
| 679 | 679 | ||
| 680 | if (0) | 680 | if (0) |
| 681 | { | 681 | { |
| 682 | err: | 682 | err: |
| 683 | ret=0; | 683 | ret=0; |
| 684 | } | 684 | } |
| 685 | if(in != NULL) | 685 | if(in != NULL) |
| 686 | BIO_free(in); | 686 | BIO_free(in); |
| 687 | if(x != NULL) | 687 | if(x != NULL) |
| 688 | X509_free(x); | 688 | X509_free(x); |
| 689 | 689 | ||
| 690 | sk_X509_NAME_set_cmp_func(stack,oldcmp); | 690 | sk_X509_NAME_set_cmp_func(stack,oldcmp); |
| 691 | 691 | ||
| 692 | return ret; | 692 | return ret; |
| 693 | } | 693 | } |
| 694 | 694 | ||
| 695 | /*! | 695 | /*! |
| 696 | * Add a directory of certs to a stack. | 696 | * Add a directory of certs to a stack. |
| @@ -709,44 +709,46 @@ err: | |||
| 709 | 709 | ||
| 710 | int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, | 710 | int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, |
| 711 | const char *dir) | 711 | const char *dir) |
| 712 | { | ||
| 713 | DIR *d; | ||
| 714 | struct dirent *dstruct; | ||
| 715 | int ret = 0; | ||
| 716 | |||
| 717 | CRYPTO_w_lock(CRYPTO_LOCK_READDIR); | ||
| 718 | d = opendir(dir); | ||
| 719 | |||
| 720 | /* Note that a side effect is that the CAs will be sorted by name */ | ||
| 721 | if(!d) | ||
| 722 | { | 712 | { |
| 723 | SYSerr(SYS_F_OPENDIR, get_last_sys_error()); | 713 | DIR *d; |
| 724 | ERR_add_error_data(3, "opendir('", dir, "')"); | 714 | struct dirent *dstruct; |
| 725 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK, ERR_R_SYS_LIB); | 715 | int ret = 0; |
| 726 | goto err; | ||
| 727 | } | ||
| 728 | 716 | ||
| 729 | while((dstruct=readdir(d))) | 717 | CRYPTO_w_lock(CRYPTO_LOCK_READDIR); |
| 730 | { | 718 | d = opendir(dir); |
| 731 | char buf[1024]; | ||
| 732 | 719 | ||
| 733 | if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf) | 720 | /* Note that a side effect is that the CAs will be sorted by name */ |
| 734 | { | 721 | if(!d) |
| 735 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); | 722 | { |
| 736 | goto err; | 723 | SYSerr(SYS_F_OPENDIR, get_last_sys_error()); |
| 737 | } | 724 | ERR_add_error_data(3, "opendir('", dir, "')"); |
| 725 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK, ERR_R_SYS_LIB); | ||
| 726 | goto err; | ||
| 727 | } | ||
| 738 | 728 | ||
| 739 | sprintf(buf,"%s/%s",dir,dstruct->d_name); | 729 | while((dstruct=readdir(d))) |
| 740 | if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) | 730 | { |
| 741 | goto err; | 731 | char buf[1024]; |
| 742 | } | 732 | int r; |
| 743 | ret = 1; | 733 | |
| 734 | if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf) | ||
| 735 | { | ||
| 736 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); | ||
| 737 | goto err; | ||
| 738 | } | ||
| 739 | |||
| 740 | r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,dstruct->d_name); | ||
| 741 | if (r <= 0 || r >= sizeof buf) | ||
| 742 | goto err; | ||
| 743 | if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) | ||
| 744 | goto err; | ||
| 745 | } | ||
| 746 | ret = 1; | ||
| 744 | 747 | ||
| 745 | err: | 748 | err: |
| 746 | closedir(d); | 749 | CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); |
| 747 | CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); | 750 | return ret; |
| 748 | return ret; | 751 | } |
| 749 | } | ||
| 750 | 752 | ||
| 751 | #endif | 753 | #endif |
| 752 | #endif | 754 | #endif |
diff --git a/src/lib/libssl/src/ssl/ssl_ciph.c b/src/lib/libssl/src/ssl/ssl_ciph.c index 7436a50ad1..f63163f26c 100644 --- a/src/lib/libssl/src/ssl/ssl_ciph.c +++ b/src/lib/libssl/src/ssl/ssl_ciph.c | |||
| @@ -518,7 +518,7 @@ static int ssl_cipher_strength_sort(CIPHER_ORDER *list, CIPHER_ORDER **head_p, | |||
| 518 | curr = curr->next; | 518 | curr = curr->next; |
| 519 | } | 519 | } |
| 520 | 520 | ||
| 521 | number_uses = Malloc((max_strength_bits + 1) * sizeof(int)); | 521 | number_uses = OPENSSL_malloc((max_strength_bits + 1) * sizeof(int)); |
| 522 | if (!number_uses) | 522 | if (!number_uses) |
| 523 | { | 523 | { |
| 524 | SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT,ERR_R_MALLOC_FAILURE); | 524 | SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT,ERR_R_MALLOC_FAILURE); |
| @@ -545,7 +545,7 @@ static int ssl_cipher_strength_sort(CIPHER_ORDER *list, CIPHER_ORDER **head_p, | |||
| 545 | ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i, | 545 | ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i, |
| 546 | list, head_p, tail_p); | 546 | list, head_p, tail_p); |
| 547 | 547 | ||
| 548 | Free(number_uses); | 548 | OPENSSL_free(number_uses); |
| 549 | return(1); | 549 | return(1); |
| 550 | } | 550 | } |
| 551 | 551 | ||
| @@ -738,7 +738,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
| 738 | * it is used for allocation. | 738 | * it is used for allocation. |
| 739 | */ | 739 | */ |
| 740 | num_of_ciphers = ssl_method->num_ciphers(); | 740 | num_of_ciphers = ssl_method->num_ciphers(); |
| 741 | list = (CIPHER_ORDER *)Malloc(sizeof(CIPHER_ORDER) * num_of_ciphers); | 741 | list = (CIPHER_ORDER *)OPENSSL_malloc(sizeof(CIPHER_ORDER) * num_of_ciphers); |
| 742 | if (list == NULL) | 742 | if (list == NULL) |
| 743 | { | 743 | { |
| 744 | SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); | 744 | SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); |
| @@ -759,10 +759,10 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
| 759 | num_of_group_aliases = sizeof(cipher_aliases) / sizeof(SSL_CIPHER); | 759 | num_of_group_aliases = sizeof(cipher_aliases) / sizeof(SSL_CIPHER); |
| 760 | num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1; | 760 | num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1; |
| 761 | ca_list = | 761 | ca_list = |
| 762 | (SSL_CIPHER **)Malloc(sizeof(SSL_CIPHER *) * num_of_alias_max); | 762 | (SSL_CIPHER **)OPENSSL_malloc(sizeof(SSL_CIPHER *) * num_of_alias_max); |
| 763 | if (ca_list == NULL) | 763 | if (ca_list == NULL) |
| 764 | { | 764 | { |
| 765 | Free(list); | 765 | OPENSSL_free(list); |
| 766 | SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); | 766 | SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); |
| 767 | return(NULL); /* Failure */ | 767 | return(NULL); /* Failure */ |
| 768 | } | 768 | } |
| @@ -788,20 +788,20 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
| 788 | ok = ssl_cipher_process_rulestr(rule_p, list, &head, &tail, | 788 | ok = ssl_cipher_process_rulestr(rule_p, list, &head, &tail, |
| 789 | ca_list); | 789 | ca_list); |
| 790 | 790 | ||
| 791 | Free(ca_list); /* Not needed anymore */ | 791 | OPENSSL_free(ca_list); /* Not needed anymore */ |
| 792 | 792 | ||
| 793 | if (!ok) | 793 | if (!ok) |
| 794 | { /* Rule processing failure */ | 794 | { /* Rule processing failure */ |
| 795 | Free(list); | 795 | OPENSSL_free(list); |
| 796 | return(NULL); | 796 | return(NULL); |
| 797 | } | 797 | } |
| 798 | /* | 798 | /* |
| 799 | * Allocate new "cipherstack" for the result, return with error | 799 | * Allocate new "cipherstack" for the result, return with error |
| 800 | * if we cannot get one. | 800 | * if we cannot get one. |
| 801 | */ | 801 | */ |
| 802 | if ((cipherstack = sk_SSL_CIPHER_new(NULL)) == NULL) | 802 | if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) |
| 803 | { | 803 | { |
| 804 | Free(list); | 804 | OPENSSL_free(list); |
| 805 | return(NULL); | 805 | return(NULL); |
| 806 | } | 806 | } |
| 807 | 807 | ||
| @@ -819,7 +819,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
| 819 | #endif | 819 | #endif |
| 820 | } | 820 | } |
| 821 | } | 821 | } |
| 822 | Free(list); /* Not needed any longer */ | 822 | OPENSSL_free(list); /* Not needed any longer */ |
| 823 | 823 | ||
| 824 | /* | 824 | /* |
| 825 | * The following passage is a little bit odd. If pointer variables | 825 | * The following passage is a little bit odd. If pointer variables |
| @@ -975,13 +975,14 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) | |||
| 975 | 975 | ||
| 976 | if (buf == NULL) | 976 | if (buf == NULL) |
| 977 | { | 977 | { |
| 978 | buf=Malloc(128); | 978 | len=128; |
| 979 | if (buf == NULL) return("Malloc Error"); | 979 | buf=OPENSSL_malloc(len); |
| 980 | if (buf == NULL) return("OPENSSL_malloc Error"); | ||
| 980 | } | 981 | } |
| 981 | else if (len < 128) | 982 | else if (len < 128) |
| 982 | return("Buffer too small"); | 983 | return("Buffer too small"); |
| 983 | 984 | ||
| 984 | sprintf(buf,format,cipher->name,ver,kx,au,enc,mac,exp); | 985 | BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp); |
| 985 | return(buf); | 986 | return(buf); |
| 986 | } | 987 | } |
| 987 | 988 | ||
| @@ -1036,7 +1037,8 @@ SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n) | |||
| 1036 | return(NULL); | 1037 | return(NULL); |
| 1037 | } | 1038 | } |
| 1038 | 1039 | ||
| 1039 | static int sk_comp_cmp(SSL_COMP **a,SSL_COMP **b) | 1040 | static int sk_comp_cmp(const SSL_COMP * const *a, |
| 1041 | const SSL_COMP * const *b) | ||
| 1040 | { | 1042 | { |
| 1041 | return((*a)->id-(*b)->id); | 1043 | return((*a)->id-(*b)->id); |
| 1042 | } | 1044 | } |
| @@ -1051,7 +1053,7 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) | |||
| 1051 | SSL_COMP *comp; | 1053 | SSL_COMP *comp; |
| 1052 | STACK_OF(SSL_COMP) *sk; | 1054 | STACK_OF(SSL_COMP) *sk; |
| 1053 | 1055 | ||
| 1054 | comp=(SSL_COMP *)Malloc(sizeof(SSL_COMP)); | 1056 | comp=(SSL_COMP *)OPENSSL_malloc(sizeof(SSL_COMP)); |
| 1055 | comp->id=id; | 1057 | comp->id=id; |
| 1056 | comp->method=cm; | 1058 | comp->method=cm; |
| 1057 | if (ssl_comp_methods == NULL) | 1059 | if (ssl_comp_methods == NULL) |
diff --git a/src/lib/libssl/src/ssl/ssl_err.c b/src/lib/libssl/src/ssl/ssl_err.c index 642c3f93e7..17b4caf528 100644 --- a/src/lib/libssl/src/ssl/ssl_err.c +++ b/src/lib/libssl/src/ssl/ssl_err.c | |||
| @@ -327,6 +327,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= | |||
| 327 | {SSL_R_READ_WRONG_PACKET_TYPE ,"read wrong packet type"}, | 327 | {SSL_R_READ_WRONG_PACKET_TYPE ,"read wrong packet type"}, |
| 328 | {SSL_R_RECORD_LENGTH_MISMATCH ,"record length mismatch"}, | 328 | {SSL_R_RECORD_LENGTH_MISMATCH ,"record length mismatch"}, |
| 329 | {SSL_R_RECORD_TOO_LARGE ,"record too large"}, | 329 | {SSL_R_RECORD_TOO_LARGE ,"record too large"}, |
| 330 | {SSL_R_RECORD_TOO_SMALL ,"record too small"}, | ||
| 330 | {SSL_R_REQUIRED_CIPHER_MISSING ,"required cipher missing"}, | 331 | {SSL_R_REQUIRED_CIPHER_MISSING ,"required cipher missing"}, |
| 331 | {SSL_R_REUSE_CERT_LENGTH_NOT_ZERO ,"reuse cert length not zero"}, | 332 | {SSL_R_REUSE_CERT_LENGTH_NOT_ZERO ,"reuse cert length not zero"}, |
| 332 | {SSL_R_REUSE_CERT_TYPE_NOT_ZERO ,"reuse cert type not zero"}, | 333 | {SSL_R_REUSE_CERT_TYPE_NOT_ZERO ,"reuse cert type not zero"}, |
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index c515c41b4e..635b25062e 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
| @@ -58,6 +58,8 @@ | |||
| 58 | * [including the GNU Public Licence.] | 58 | * [including the GNU Public Licence.] |
| 59 | */ | 59 | */ |
| 60 | 60 | ||
| 61 | |||
| 62 | #include <assert.h> | ||
| 61 | #include <stdio.h> | 63 | #include <stdio.h> |
| 62 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 63 | #include <openssl/lhash.h> | 65 | #include <openssl/lhash.h> |
| @@ -183,7 +185,7 @@ SSL *SSL_new(SSL_CTX *ctx) | |||
| 183 | return(NULL); | 185 | return(NULL); |
| 184 | } | 186 | } |
| 185 | 187 | ||
| 186 | s=(SSL *)Malloc(sizeof(SSL)); | 188 | s=(SSL *)OPENSSL_malloc(sizeof(SSL)); |
| 187 | if (s == NULL) goto err; | 189 | if (s == NULL) goto err; |
| 188 | memset(s,0,sizeof(SSL)); | 190 | memset(s,0,sizeof(SSL)); |
| 189 | 191 | ||
| @@ -239,7 +241,7 @@ err: | |||
| 239 | ssl_cert_free(s->cert); | 241 | ssl_cert_free(s->cert); |
| 240 | if (s->ctx != NULL) | 242 | if (s->ctx != NULL) |
| 241 | SSL_CTX_free(s->ctx); /* decrement reference count */ | 243 | SSL_CTX_free(s->ctx); /* decrement reference count */ |
| 242 | Free(s); | 244 | OPENSSL_free(s); |
| 243 | } | 245 | } |
| 244 | SSLerr(SSL_F_SSL_NEW,ERR_R_MALLOC_FAILURE); | 246 | SSLerr(SSL_F_SSL_NEW,ERR_R_MALLOC_FAILURE); |
| 245 | return(NULL); | 247 | return(NULL); |
| @@ -375,7 +377,7 @@ void SSL_free(SSL *s) | |||
| 375 | 377 | ||
| 376 | if (s->method != NULL) s->method->ssl_free(s); | 378 | if (s->method != NULL) s->method->ssl_free(s); |
| 377 | 379 | ||
| 378 | Free(s); | 380 | OPENSSL_free(s); |
| 379 | } | 381 | } |
| 380 | 382 | ||
| 381 | void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio) | 383 | void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio) |
| @@ -874,7 +876,7 @@ long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)()) | |||
| 874 | } | 876 | } |
| 875 | } | 877 | } |
| 876 | 878 | ||
| 877 | int ssl_cipher_id_cmp(SSL_CIPHER *a,SSL_CIPHER *b) | 879 | int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b) |
| 878 | { | 880 | { |
| 879 | long l; | 881 | long l; |
| 880 | 882 | ||
| @@ -885,7 +887,8 @@ int ssl_cipher_id_cmp(SSL_CIPHER *a,SSL_CIPHER *b) | |||
| 885 | return((l > 0)?1:-1); | 887 | return((l > 0)?1:-1); |
| 886 | } | 888 | } |
| 887 | 889 | ||
| 888 | int ssl_cipher_ptr_id_cmp(SSL_CIPHER **ap,SSL_CIPHER **bp) | 890 | int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, |
| 891 | const SSL_CIPHER * const *bp) | ||
| 889 | { | 892 | { |
| 890 | long l; | 893 | long l; |
| 891 | 894 | ||
| @@ -1033,7 +1036,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, | |||
| 1033 | return(NULL); | 1036 | return(NULL); |
| 1034 | } | 1037 | } |
| 1035 | if ((skp == NULL) || (*skp == NULL)) | 1038 | if ((skp == NULL) || (*skp == NULL)) |
| 1036 | sk=sk_SSL_CIPHER_new(NULL); /* change perhaps later */ | 1039 | sk=sk_SSL_CIPHER_new_null(); /* change perhaps later */ |
| 1037 | else | 1040 | else |
| 1038 | { | 1041 | { |
| 1039 | sk= *skp; | 1042 | sk= *skp; |
| @@ -1099,7 +1102,7 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) | |||
| 1099 | SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS); | 1102 | SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS); |
| 1100 | goto err; | 1103 | goto err; |
| 1101 | } | 1104 | } |
| 1102 | ret=(SSL_CTX *)Malloc(sizeof(SSL_CTX)); | 1105 | ret=(SSL_CTX *)OPENSSL_malloc(sizeof(SSL_CTX)); |
| 1103 | if (ret == NULL) | 1106 | if (ret == NULL) |
| 1104 | goto err; | 1107 | goto err; |
| 1105 | 1108 | ||
| @@ -1195,7 +1198,7 @@ err2: | |||
| 1195 | } | 1198 | } |
| 1196 | 1199 | ||
| 1197 | static void SSL_COMP_free(SSL_COMP *comp) | 1200 | static void SSL_COMP_free(SSL_COMP *comp) |
| 1198 | { Free(comp); } | 1201 | { OPENSSL_free(comp); } |
| 1199 | 1202 | ||
| 1200 | void SSL_CTX_free(SSL_CTX *a) | 1203 | void SSL_CTX_free(SSL_CTX *a) |
| 1201 | { | 1204 | { |
| @@ -1236,7 +1239,7 @@ void SSL_CTX_free(SSL_CTX *a) | |||
| 1236 | sk_X509_pop_free(a->extra_certs,X509_free); | 1239 | sk_X509_pop_free(a->extra_certs,X509_free); |
| 1237 | if (a->comp_methods != NULL) | 1240 | if (a->comp_methods != NULL) |
| 1238 | sk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free); | 1241 | sk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free); |
| 1239 | Free(a); | 1242 | OPENSSL_free(a); |
| 1240 | } | 1243 | } |
| 1241 | 1244 | ||
| 1242 | void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) | 1245 | void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) |
| @@ -1759,13 +1762,13 @@ void ssl_clear_cipher_ctx(SSL *s) | |||
| 1759 | if (s->enc_read_ctx != NULL) | 1762 | if (s->enc_read_ctx != NULL) |
| 1760 | { | 1763 | { |
| 1761 | EVP_CIPHER_CTX_cleanup(s->enc_read_ctx); | 1764 | EVP_CIPHER_CTX_cleanup(s->enc_read_ctx); |
| 1762 | Free(s->enc_read_ctx); | 1765 | OPENSSL_free(s->enc_read_ctx); |
| 1763 | s->enc_read_ctx=NULL; | 1766 | s->enc_read_ctx=NULL; |
| 1764 | } | 1767 | } |
| 1765 | if (s->enc_write_ctx != NULL) | 1768 | if (s->enc_write_ctx != NULL) |
| 1766 | { | 1769 | { |
| 1767 | EVP_CIPHER_CTX_cleanup(s->enc_write_ctx); | 1770 | EVP_CIPHER_CTX_cleanup(s->enc_write_ctx); |
| 1768 | Free(s->enc_write_ctx); | 1771 | OPENSSL_free(s->enc_write_ctx); |
| 1769 | s->enc_write_ctx=NULL; | 1772 | s->enc_write_ctx=NULL; |
| 1770 | } | 1773 | } |
| 1771 | if (s->expand != NULL) | 1774 | if (s->expand != NULL) |
| @@ -1843,19 +1846,16 @@ int ssl_init_wbio_buffer(SSL *s,int push) | |||
| 1843 | 1846 | ||
| 1844 | void ssl_free_wbio_buffer(SSL *s) | 1847 | void ssl_free_wbio_buffer(SSL *s) |
| 1845 | { | 1848 | { |
| 1846 | BIO *under; | ||
| 1847 | |||
| 1848 | if (s->bbio == NULL) return; | 1849 | if (s->bbio == NULL) return; |
| 1849 | 1850 | ||
| 1850 | if (s->bbio == s->wbio) | 1851 | if (s->bbio == s->wbio) |
| 1851 | { | 1852 | { |
| 1852 | /* remove buffering */ | 1853 | /* remove buffering */ |
| 1853 | under=BIO_pop(s->wbio); | 1854 | s->wbio=BIO_pop(s->wbio); |
| 1854 | if (under != NULL) | 1855 | #ifdef REF_CHECK /* not the usual REF_CHECK, but this avoids adding one more preprocessor symbol */ |
| 1855 | s->wbio=under; | 1856 | assert(s->wbio != NULL); |
| 1856 | else | 1857 | #endif |
| 1857 | abort(); /* ok */ | 1858 | } |
| 1858 | } | ||
| 1859 | BIO_free(s->bbio); | 1859 | BIO_free(s->bbio); |
| 1860 | s->bbio=NULL; | 1860 | s->bbio=NULL; |
| 1861 | } | 1861 | } |
diff --git a/src/lib/libssl/src/ssl/ssl_locl.h b/src/lib/libssl/src/ssl/ssl_locl.h index 9a52bab254..d70fff4627 100644 --- a/src/lib/libssl/src/ssl/ssl_locl.h +++ b/src/lib/libssl/src/ssl/ssl_locl.h | |||
| @@ -423,8 +423,9 @@ void ssl_sess_cert_free(SESS_CERT *sc); | |||
| 423 | int ssl_set_peer_cert_type(SESS_CERT *c, int type); | 423 | int ssl_set_peer_cert_type(SESS_CERT *c, int type); |
| 424 | int ssl_get_new_session(SSL *s, int session); | 424 | int ssl_get_new_session(SSL *s, int session); |
| 425 | int ssl_get_prev_session(SSL *s, unsigned char *session,int len); | 425 | int ssl_get_prev_session(SSL *s, unsigned char *session,int len); |
| 426 | int ssl_cipher_id_cmp(SSL_CIPHER *a,SSL_CIPHER *b); | 426 | int ssl_cipher_id_cmp(const SSL_CIPHER *a,const SSL_CIPHER *b); |
| 427 | int ssl_cipher_ptr_id_cmp(SSL_CIPHER **ap,SSL_CIPHER **bp); | 427 | int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, |
| 428 | const SSL_CIPHER * const *bp); | ||
| 428 | STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, | 429 | STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, |
| 429 | STACK_OF(SSL_CIPHER) **skp); | 430 | STACK_OF(SSL_CIPHER) **skp); |
| 430 | int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p); | 431 | int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p); |
diff --git a/src/lib/libssl/src/ssl/ssl_sess.c b/src/lib/libssl/src/ssl/ssl_sess.c index 9e01f72753..416def8908 100644 --- a/src/lib/libssl/src/ssl/ssl_sess.c +++ b/src/lib/libssl/src/ssl/ssl_sess.c | |||
| @@ -111,7 +111,7 @@ SSL_SESSION *SSL_SESSION_new(void) | |||
| 111 | { | 111 | { |
| 112 | SSL_SESSION *ss; | 112 | SSL_SESSION *ss; |
| 113 | 113 | ||
| 114 | ss=(SSL_SESSION *)Malloc(sizeof(SSL_SESSION)); | 114 | ss=(SSL_SESSION *)OPENSSL_malloc(sizeof(SSL_SESSION)); |
| 115 | if (ss == NULL) | 115 | if (ss == NULL) |
| 116 | { | 116 | { |
| 117 | SSLerr(SSL_F_SSL_SESSION_NEW,ERR_R_MALLOC_FAILURE); | 117 | SSLerr(SSL_F_SSL_SESSION_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -310,7 +310,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len) | |||
| 310 | #if 0 /* This is way too late. */ | 310 | #if 0 /* This is way too late. */ |
| 311 | 311 | ||
| 312 | /* If a thread got the session, then 'swaped', and another got | 312 | /* If a thread got the session, then 'swaped', and another got |
| 313 | * it and then due to a time-out decided to 'Free' it we could | 313 | * it and then due to a time-out decided to 'OPENSSL_free' it we could |
| 314 | * be in trouble. So I'll increment it now, then double decrement | 314 | * be in trouble. So I'll increment it now, then double decrement |
| 315 | * later - am I speaking rubbish?. */ | 315 | * later - am I speaking rubbish?. */ |
| 316 | CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION); | 316 | CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION); |
| @@ -474,7 +474,7 @@ void SSL_SESSION_free(SSL_SESSION *ss) | |||
| 474 | if (ss->peer != NULL) X509_free(ss->peer); | 474 | if (ss->peer != NULL) X509_free(ss->peer); |
| 475 | if (ss->ciphers != NULL) sk_SSL_CIPHER_free(ss->ciphers); | 475 | if (ss->ciphers != NULL) sk_SSL_CIPHER_free(ss->ciphers); |
| 476 | memset(ss,0,sizeof(*ss)); | 476 | memset(ss,0,sizeof(*ss)); |
| 477 | Free(ss); | 477 | OPENSSL_free(ss); |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | int SSL_set_session(SSL *s, SSL_SESSION *session) | 480 | int SSL_set_session(SSL *s, SSL_SESSION *session) |
diff --git a/src/lib/libssl/src/ssl/ssl_txt.c b/src/lib/libssl/src/ssl/ssl_txt.c index c07d957576..6e33eec3e4 100644 --- a/src/lib/libssl/src/ssl/ssl_txt.c +++ b/src/lib/libssl/src/ssl/ssl_txt.c | |||
| @@ -81,7 +81,7 @@ int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *x) | |||
| 81 | int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) | 81 | int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) |
| 82 | { | 82 | { |
| 83 | unsigned int i; | 83 | unsigned int i; |
| 84 | char str[128],*s; | 84 | char *s; |
| 85 | 85 | ||
| 86 | if (x == NULL) goto err; | 86 | if (x == NULL) goto err; |
| 87 | if (BIO_puts(bp,"SSL-Session:\n") <= 0) goto err; | 87 | if (BIO_puts(bp,"SSL-Session:\n") <= 0) goto err; |
| @@ -93,36 +93,41 @@ int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) | |||
| 93 | s="TLSv1"; | 93 | s="TLSv1"; |
| 94 | else | 94 | else |
| 95 | s="unknown"; | 95 | s="unknown"; |
| 96 | sprintf(str," Protocol : %s\n",s); | 96 | if (BIO_printf(bp," Protocol : %s\n",s) <= 0) goto err; |
| 97 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 98 | 97 | ||
| 99 | if (x->cipher == NULL) | 98 | if (x->cipher == NULL) |
| 100 | { | 99 | { |
| 101 | if (((x->cipher_id) & 0xff000000) == 0x02000000) | 100 | if (((x->cipher_id) & 0xff000000) == 0x02000000) |
| 102 | sprintf(str," Cipher : %06lX\n",x->cipher_id&0xffffff); | 101 | { |
| 102 | if (BIO_printf(bp," Cipher : %06lX\n",x->cipher_id&0xffffff) <= 0) | ||
| 103 | goto err; | ||
| 104 | } | ||
| 103 | else | 105 | else |
| 104 | sprintf(str," Cipher : %04lX\n",x->cipher_id&0xffff); | 106 | { |
| 107 | if (BIO_printf(bp," Cipher : %04lX\n",x->cipher_id&0xffff) <= 0) | ||
| 108 | goto err; | ||
| 109 | } | ||
| 105 | } | 110 | } |
| 106 | else | 111 | else |
| 107 | sprintf(str," Cipher : %s\n",(x->cipher == NULL)?"unknown":x->cipher->name); | 112 | { |
| 108 | if (BIO_puts(bp,str) <= 0) goto err; | 113 | if (BIO_printf(bp," Cipher : %s\n",((x->cipher == NULL)?"unknown":x->cipher->name)) <= 0) |
| 114 | goto err; | ||
| 115 | } | ||
| 109 | if (BIO_puts(bp," Session-ID: ") <= 0) goto err; | 116 | if (BIO_puts(bp," Session-ID: ") <= 0) goto err; |
| 110 | for (i=0; i<x->session_id_length; i++) | 117 | for (i=0; i<x->session_id_length; i++) |
| 111 | { | 118 | { |
| 112 | sprintf(str,"%02X",x->session_id[i]); | 119 | if (BIO_printf(bp,"%02X",x->session_id[i]) <= 0) goto err; |
| 113 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 114 | } | 120 | } |
| 115 | if (BIO_puts(bp,"\n Session-ID-ctx: ") <= 0) goto err; | 121 | if (BIO_puts(bp,"\n Session-ID-ctx: ") <= 0) goto err; |
| 116 | for (i=0; i<x->sid_ctx_length; i++) | 122 | for (i=0; i<x->sid_ctx_length; i++) |
| 117 | { | 123 | { |
| 118 | sprintf(str,"%02X",x->sid_ctx[i]); | 124 | if (BIO_printf(bp,"%02X",x->sid_ctx[i]) <= 0) |
| 119 | if (BIO_puts(bp,str) <= 0) goto err; | 125 | goto err; |
| 120 | } | 126 | } |
| 121 | if (BIO_puts(bp,"\n Master-Key: ") <= 0) goto err; | 127 | if (BIO_puts(bp,"\n Master-Key: ") <= 0) goto err; |
| 122 | for (i=0; i<(unsigned int)x->master_key_length; i++) | 128 | for (i=0; i<(unsigned int)x->master_key_length; i++) |
| 123 | { | 129 | { |
| 124 | sprintf(str,"%02X",x->master_key[i]); | 130 | if (BIO_printf(bp,"%02X",x->master_key[i]) <= 0) goto err; |
| 125 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 126 | } | 131 | } |
| 127 | if (BIO_puts(bp,"\n Key-Arg : ") <= 0) goto err; | 132 | if (BIO_puts(bp,"\n Key-Arg : ") <= 0) goto err; |
| 128 | if (x->key_arg_length == 0) | 133 | if (x->key_arg_length == 0) |
| @@ -132,8 +137,7 @@ int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) | |||
| 132 | else | 137 | else |
| 133 | for (i=0; i<x->key_arg_length; i++) | 138 | for (i=0; i<x->key_arg_length; i++) |
| 134 | { | 139 | { |
| 135 | sprintf(str,"%02X",x->key_arg[i]); | 140 | if (BIO_printf(bp,"%02X",x->key_arg[i]) <= 0) goto err; |
| 136 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 137 | } | 141 | } |
| 138 | if (x->compress_meth != 0) | 142 | if (x->compress_meth != 0) |
| 139 | { | 143 | { |
| @@ -142,32 +146,26 @@ int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) | |||
| 142 | ssl_cipher_get_evp(x,NULL,NULL,&comp); | 146 | ssl_cipher_get_evp(x,NULL,NULL,&comp); |
| 143 | if (comp == NULL) | 147 | if (comp == NULL) |
| 144 | { | 148 | { |
| 145 | sprintf(str,"\n Compression: %d",x->compress_meth); | 149 | if (BIO_printf(bp,"\n Compression: %d",x->compress_meth) <= 0) goto err; |
| 146 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 147 | } | 150 | } |
| 148 | else | 151 | else |
| 149 | { | 152 | { |
| 150 | sprintf(str,"\n Compression: %d (%s)", | 153 | if (BIO_printf(bp,"\n Compression: %d (%s)", comp->id,comp->method->name) <= 0) goto err; |
| 151 | comp->id,comp->method->name); | ||
| 152 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 153 | } | 154 | } |
| 154 | } | 155 | } |
| 155 | if (x->time != 0L) | 156 | if (x->time != 0L) |
| 156 | { | 157 | { |
| 157 | sprintf(str,"\n Start Time: %ld",x->time); | 158 | if (BIO_printf(bp, "\n Start Time: %ld",x->time) <= 0) goto err; |
| 158 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 159 | } | 159 | } |
| 160 | if (x->timeout != 0L) | 160 | if (x->timeout != 0L) |
| 161 | { | 161 | { |
| 162 | sprintf(str,"\n Timeout : %ld (sec)",x->timeout); | 162 | if (BIO_printf(bp, "\n Timeout : %ld (sec)",x->timeout) <= 0) goto err; |
| 163 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 164 | } | 163 | } |
| 165 | if (BIO_puts(bp,"\n") <= 0) goto err; | 164 | if (BIO_puts(bp,"\n") <= 0) goto err; |
| 166 | 165 | ||
| 167 | if (BIO_puts(bp, " Verify return code: ") <= 0) goto err; | 166 | if (BIO_puts(bp, " Verify return code: ") <= 0) goto err; |
| 168 | sprintf(str, "%ld (%s)\n", x->verify_result, | 167 | if (BIO_printf(bp, "%ld (%s)\n", x->verify_result, |
| 169 | X509_verify_cert_error_string(x->verify_result)); | 168 | X509_verify_cert_error_string(x->verify_result)) <= 0) goto err; |
| 170 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 171 | 169 | ||
| 172 | return(1); | 170 | return(1); |
| 173 | err: | 171 | err: |
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c index dde35794f5..2ef8a50785 100644 --- a/src/lib/libssl/src/ssl/ssltest.c +++ b/src/lib/libssl/src/ssl/ssltest.c | |||
| @@ -88,6 +88,7 @@ | |||
| 88 | static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); | 88 | static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); |
| 89 | #ifndef NO_RSA | 89 | #ifndef NO_RSA |
| 90 | static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export,int keylength); | 90 | static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export,int keylength); |
| 91 | static void free_tmp_rsa(void); | ||
| 91 | #endif | 92 | #endif |
| 92 | #ifndef NO_DH | 93 | #ifndef NO_DH |
| 93 | static DH *get_dh512(void); | 94 | static DH *get_dh512(void); |
| @@ -528,6 +529,9 @@ end: | |||
| 528 | 529 | ||
| 529 | if (bio_stdout != NULL) BIO_free(bio_stdout); | 530 | if (bio_stdout != NULL) BIO_free(bio_stdout); |
| 530 | 531 | ||
| 532 | #ifndef NO_RSA | ||
| 533 | free_tmp_rsa(); | ||
| 534 | #endif | ||
| 531 | ERR_free_strings(); | 535 | ERR_free_strings(); |
| 532 | ERR_remove_state(0); | 536 | ERR_remove_state(0); |
| 533 | EVP_cleanup(); | 537 | EVP_cleanup(); |
| @@ -1189,7 +1193,7 @@ int doit(SSL *s_ssl, SSL *c_ssl, long count) | |||
| 1189 | ret=0; | 1193 | ret=0; |
| 1190 | err: | 1194 | err: |
| 1191 | /* We have to set the BIO's to NULL otherwise they will be | 1195 | /* We have to set the BIO's to NULL otherwise they will be |
| 1192 | * Free()ed twice. Once when th s_ssl is SSL_free()ed and | 1196 | * OPENSSL_free()ed twice. Once when th s_ssl is SSL_free()ed and |
| 1193 | * again when c_ssl is SSL_free()ed. | 1197 | * again when c_ssl is SSL_free()ed. |
| 1194 | * This is a hack required because s_ssl and c_ssl are sharing the same | 1198 | * This is a hack required because s_ssl and c_ssl are sharing the same |
| 1195 | * BIO structure and SSL_set_bio() and SSL_free() automatically | 1199 | * BIO structure and SSL_set_bio() and SSL_free() automatically |
| @@ -1242,10 +1246,10 @@ static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) | |||
| 1242 | } | 1246 | } |
| 1243 | 1247 | ||
| 1244 | #ifndef NO_RSA | 1248 | #ifndef NO_RSA |
| 1249 | static RSA *rsa_tmp=NULL; | ||
| 1250 | |||
| 1245 | static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength) | 1251 | static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength) |
| 1246 | { | 1252 | { |
| 1247 | static RSA *rsa_tmp=NULL; | ||
| 1248 | |||
| 1249 | if (rsa_tmp == NULL) | 1253 | if (rsa_tmp == NULL) |
| 1250 | { | 1254 | { |
| 1251 | BIO_printf(bio_err,"Generating temp (%d bit) RSA key...",keylength); | 1255 | BIO_printf(bio_err,"Generating temp (%d bit) RSA key...",keylength); |
| @@ -1256,6 +1260,15 @@ static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength) | |||
| 1256 | } | 1260 | } |
| 1257 | return(rsa_tmp); | 1261 | return(rsa_tmp); |
| 1258 | } | 1262 | } |
| 1263 | |||
| 1264 | static void free_tmp_rsa(void) | ||
| 1265 | { | ||
| 1266 | if (rsa_tmp != NULL) | ||
| 1267 | { | ||
| 1268 | RSA_free(rsa_tmp); | ||
| 1269 | rsa_tmp = NULL; | ||
| 1270 | } | ||
| 1271 | } | ||
| 1259 | #endif | 1272 | #endif |
| 1260 | 1273 | ||
| 1261 | #ifndef NO_DH | 1274 | #ifndef NO_DH |
diff --git a/src/lib/libssl/src/ssl/t1_enc.c b/src/lib/libssl/src/ssl/t1_enc.c index 279e45db5d..0d34357eb4 100644 --- a/src/lib/libssl/src/ssl/t1_enc.c +++ b/src/lib/libssl/src/ssl/t1_enc.c | |||
| @@ -178,7 +178,7 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 178 | { | 178 | { |
| 179 | if ((s->enc_read_ctx == NULL) && | 179 | if ((s->enc_read_ctx == NULL) && |
| 180 | ((s->enc_read_ctx=(EVP_CIPHER_CTX *) | 180 | ((s->enc_read_ctx=(EVP_CIPHER_CTX *) |
| 181 | Malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) | 181 | OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) |
| 182 | goto err; | 182 | goto err; |
| 183 | dd= s->enc_read_ctx; | 183 | dd= s->enc_read_ctx; |
| 184 | s->read_hash=m; | 184 | s->read_hash=m; |
| @@ -197,7 +197,7 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 197 | } | 197 | } |
| 198 | if (s->s3->rrec.comp == NULL) | 198 | if (s->s3->rrec.comp == NULL) |
| 199 | s->s3->rrec.comp=(unsigned char *) | 199 | s->s3->rrec.comp=(unsigned char *) |
| 200 | Malloc(SSL3_RT_MAX_ENCRYPTED_LENGTH); | 200 | OPENSSL_malloc(SSL3_RT_MAX_ENCRYPTED_LENGTH); |
| 201 | if (s->s3->rrec.comp == NULL) | 201 | if (s->s3->rrec.comp == NULL) |
| 202 | goto err; | 202 | goto err; |
| 203 | } | 203 | } |
| @@ -208,7 +208,7 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 208 | { | 208 | { |
| 209 | if ((s->enc_write_ctx == NULL) && | 209 | if ((s->enc_write_ctx == NULL) && |
| 210 | ((s->enc_write_ctx=(EVP_CIPHER_CTX *) | 210 | ((s->enc_write_ctx=(EVP_CIPHER_CTX *) |
| 211 | Malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) | 211 | OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) |
| 212 | goto err; | 212 | goto err; |
| 213 | dd= s->enc_write_ctx; | 213 | dd= s->enc_write_ctx; |
| 214 | s->write_hash=m; | 214 | s->write_hash=m; |
| @@ -355,9 +355,9 @@ int tls1_setup_key_block(SSL *s) | |||
| 355 | 355 | ||
| 356 | ssl3_cleanup_key_block(s); | 356 | ssl3_cleanup_key_block(s); |
| 357 | 357 | ||
| 358 | if ((p1=(unsigned char *)Malloc(num)) == NULL) | 358 | if ((p1=(unsigned char *)OPENSSL_malloc(num)) == NULL) |
| 359 | goto err; | 359 | goto err; |
| 360 | if ((p2=(unsigned char *)Malloc(num)) == NULL) | 360 | if ((p2=(unsigned char *)OPENSSL_malloc(num)) == NULL) |
| 361 | goto err; | 361 | goto err; |
| 362 | 362 | ||
| 363 | s->s3->tmp.key_block_length=num; | 363 | s->s3->tmp.key_block_length=num; |
| @@ -374,7 +374,7 @@ printf("pre-master\n"); | |||
| 374 | #endif | 374 | #endif |
| 375 | tls1_generate_key_block(s,p1,p2,num); | 375 | tls1_generate_key_block(s,p1,p2,num); |
| 376 | memset(p2,0,num); | 376 | memset(p2,0,num); |
| 377 | Free(p2); | 377 | OPENSSL_free(p2); |
| 378 | #ifdef TLS_DEBUG | 378 | #ifdef TLS_DEBUG |
| 379 | printf("\nkey block\n"); | 379 | printf("\nkey block\n"); |
| 380 | { int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); } | 380 | { int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); } |
diff --git a/src/lib/libssl/src/ssl/tls1.h b/src/lib/libssl/src/ssl/tls1.h index 6e2b06d34f..cf92ae034f 100644 --- a/src/lib/libssl/src/ssl/tls1.h +++ b/src/lib/libssl/src/ssl/tls1.h | |||
| @@ -84,6 +84,10 @@ extern "C" { | |||
| 84 | #define TLS1_AD_USER_CANCELLED 90 | 84 | #define TLS1_AD_USER_CANCELLED 90 |
| 85 | #define TLS1_AD_NO_RENEGOTIATION 100 | 85 | #define TLS1_AD_NO_RENEGOTIATION 100 |
| 86 | 86 | ||
| 87 | /* Additional TLS ciphersuites from draft-ietf-tls-56-bit-ciphersuites-00.txt | ||
| 88 | * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see | ||
| 89 | * s3_lib.c). We actually treat them like SSL 3.0 ciphers, which we probably | ||
| 90 | * shouldn't. */ | ||
| 87 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 | 91 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 |
| 88 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 | 92 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 |
| 89 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 | 93 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 |
| @@ -92,6 +96,13 @@ extern "C" { | |||
| 92 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065 | 96 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065 |
| 93 | #define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066 | 97 | #define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066 |
| 94 | 98 | ||
| 99 | /* XXX | ||
| 100 | * Inconsistency alert: | ||
| 101 | * The OpenSSL names of ciphers with ephemeral DH here include the string | ||
| 102 | * "DHE", while elsewhere it has always been "EDH". | ||
| 103 | * (The alias for the list of all such ciphers also is "EDH".) | ||
| 104 | * The specifications speak of "EDH"; maybe we should allow both forms | ||
| 105 | * for everything. */ | ||
| 95 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5" | 106 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5" |
| 96 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5" | 107 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5" |
| 97 | #define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA" | 108 | #define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA" |
diff --git a/src/lib/libssl/src/test/Makefile.ssl b/src/lib/libssl/src/test/Makefile.ssl index dbb523bf15..b961dabc3c 100644 --- a/src/lib/libssl/src/test/Makefile.ssl +++ b/src/lib/libssl/src/test/Makefile.ssl | |||
| @@ -38,6 +38,7 @@ SHA1TEST= sha1test | |||
| 38 | MDC2TEST= mdc2test | 38 | MDC2TEST= mdc2test |
| 39 | RMDTEST= rmdtest | 39 | RMDTEST= rmdtest |
| 40 | MD2TEST= md2test | 40 | MD2TEST= md2test |
| 41 | MD4TEST= md4test | ||
| 41 | MD5TEST= md5test | 42 | MD5TEST= md5test |
| 42 | HMACTEST= hmactest | 43 | HMACTEST= hmactest |
| 43 | RC2TEST= rc2test | 44 | RC2TEST= rc2test |
| @@ -52,24 +53,27 @@ DSATEST= dsatest | |||
| 52 | METHTEST= methtest | 53 | METHTEST= methtest |
| 53 | SSLTEST= ssltest | 54 | SSLTEST= ssltest |
| 54 | RSATEST= rsa_test | 55 | RSATEST= rsa_test |
| 56 | ENGINETEST= enginetest | ||
| 55 | 57 | ||
| 56 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ | 58 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD4TEST) $(MD5TEST) $(HMACTEST) \ |
| 57 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | 59 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ |
| 58 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | 60 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ |
| 59 | $(RANDTEST) $(DHTEST) \ | 61 | $(RANDTEST) $(DHTEST) $(ENGINETEST) \ |
| 60 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(RSATEST) | 62 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(RSATEST) |
| 61 | 63 | ||
| 62 | # $(METHTEST) | 64 | # $(METHTEST) |
| 63 | 65 | ||
| 64 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD5TEST).o $(HMACTEST).o \ | 66 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \ |
| 67 | $(HMACTEST).o \ | ||
| 65 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | 68 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ |
| 66 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | 69 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ |
| 67 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ | 70 | $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ |
| 68 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o | 71 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o |
| 69 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ | 72 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ |
| 73 | $(HMACTEST).c \ | ||
| 70 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | 74 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ |
| 71 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | 75 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ |
| 72 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ | 76 | $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \ |
| 73 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c | 77 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c |
| 74 | 78 | ||
| 75 | EXHEADER= | 79 | EXHEADER= |
| @@ -98,11 +102,12 @@ tags: | |||
| 98 | ctags $(SRC) | 102 | ctags $(SRC) |
| 99 | 103 | ||
| 100 | tests: exe apps \ | 104 | tests: exe apps \ |
| 101 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ | 105 | test_des test_idea test_sha test_md4 test_md5 test_hmac \ |
| 106 | test_md2 test_mdc2 \ | ||
| 102 | test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast \ | 107 | test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast \ |
| 103 | test_rand test_bn test_enc test_x509 test_rsa test_crl test_sid \ | 108 | test_rand test_bn test_enc test_x509 test_rsa test_crl test_sid \ |
| 104 | test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ | 109 | test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ |
| 105 | test_ss test_ssl test_ca | 110 | test_ss test_ca test_engine test_ssl |
| 106 | 111 | ||
| 107 | apps: | 112 | apps: |
| 108 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) | 113 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) |
| @@ -123,6 +128,9 @@ test_mdc2: | |||
| 123 | test_md5: | 128 | test_md5: |
| 124 | ./$(MD5TEST) | 129 | ./$(MD5TEST) |
| 125 | 130 | ||
| 131 | test_md4: | ||
| 132 | ./$(MD4TEST) | ||
| 133 | |||
| 126 | test_hmac: | 134 | test_hmac: |
| 127 | ./$(HMACTEST) | 135 | ./$(HMACTEST) |
| 128 | 136 | ||
| @@ -210,6 +218,10 @@ test_ss: | |||
| 210 | @echo "Generate and certify a test certificate" | 218 | @echo "Generate and certify a test certificate" |
| 211 | @sh ./testss | 219 | @sh ./testss |
| 212 | 220 | ||
| 221 | test_engine: | ||
| 222 | @echo "Manipulate the ENGINE structures" | ||
| 223 | ./$(ENGINETEST) | ||
| 224 | |||
| 213 | test_ssl: | 225 | test_ssl: |
| 214 | @echo "test SSL protocol" | 226 | @echo "test SSL protocol" |
| 215 | @sh ./testssl | 227 | @sh ./testssl |
| @@ -264,6 +276,9 @@ $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) | |||
| 264 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) | 276 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) |
| 265 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | 277 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) |
| 266 | 278 | ||
| 279 | $(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO) | ||
| 280 | $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 281 | |||
| 267 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) | 282 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) |
| 268 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | 283 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) |
| 269 | 284 | ||
| @@ -303,25 +318,31 @@ $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) | |||
| 303 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | 318 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) |
| 304 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | 319 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) |
| 305 | 320 | ||
| 321 | $(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO) | ||
| 322 | $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 323 | |||
| 306 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 324 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 307 | 325 | ||
| 308 | bftest.o: ../include/openssl/blowfish.h | 326 | bftest.o: ../include/openssl/blowfish.h |
| 309 | bntest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 327 | bntest.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 310 | bntest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 328 | bntest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 311 | bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | 329 | bntest.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 312 | bntest.o: ../include/openssl/des.h ../include/openssl/dh.h | 330 | bntest.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 313 | bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | 331 | bntest.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 314 | bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 332 | bntest.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 315 | bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h | 333 | bntest.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 316 | bntest.o: ../include/openssl/md2.h ../include/openssl/md5.h | 334 | bntest.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 317 | bntest.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 335 | bntest.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 336 | bntest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
| 337 | bntest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 318 | bntest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 338 | bntest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 319 | bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | 339 | bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 320 | bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 340 | bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 321 | bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 341 | bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 322 | bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 342 | bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 323 | bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h | 343 | bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h |
| 324 | bntest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | 344 | bntest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h |
| 345 | bntest.o: ../include/openssl/x509_vfy.h | ||
| 325 | casttest.o: ../include/openssl/cast.h | 346 | casttest.o: ../include/openssl/cast.h |
| 326 | destest.o: ../include/openssl/des.h ../include/openssl/e_os2.h | 347 | destest.o: ../include/openssl/des.h ../include/openssl/e_os2.h |
| 327 | destest.o: ../include/openssl/opensslconf.h | 348 | destest.o: ../include/openssl/opensslconf.h |
| @@ -329,18 +350,37 @@ dhtest.o: ../include/openssl/bio.h ../include/openssl/bn.h | |||
| 329 | dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h | 350 | dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h |
| 330 | dhtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 351 | dhtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 331 | dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h | 352 | dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h |
| 332 | dhtest.o: ../include/openssl/stack.h | 353 | dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 333 | dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h | 354 | dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h |
| 334 | dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h | 355 | dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h |
| 335 | dsatest.o: ../include/openssl/dsa.h ../include/openssl/err.h | 356 | dsatest.o: ../include/openssl/dsa.h ../include/openssl/err.h |
| 336 | dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 357 | dsatest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 337 | dsatest.o: ../include/openssl/rand.h ../include/openssl/safestack.h | 358 | dsatest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h |
| 338 | dsatest.o: ../include/openssl/stack.h | 359 | dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h |
| 360 | dsatest.o: ../include/openssl/symhacks.h | ||
| 361 | enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
| 362 | enginetest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | ||
| 363 | enginetest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | ||
| 364 | enginetest.o: ../include/openssl/des.h ../include/openssl/dh.h | ||
| 365 | enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
| 366 | enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
| 367 | enginetest.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
| 368 | enginetest.o: ../include/openssl/lhash.h ../include/openssl/md2.h | ||
| 369 | enginetest.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 370 | enginetest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 371 | enginetest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | ||
| 372 | enginetest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h | ||
| 373 | enginetest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | ||
| 374 | enginetest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | ||
| 375 | enginetest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | ||
| 376 | enginetest.o: ../include/openssl/sha.h ../include/openssl/stack.h | ||
| 377 | enginetest.o: ../include/openssl/symhacks.h | ||
| 339 | exptest.o: ../include/openssl/bio.h ../include/openssl/bn.h | 378 | exptest.o: ../include/openssl/bio.h ../include/openssl/bn.h |
| 340 | exptest.o: ../include/openssl/crypto.h ../include/openssl/err.h | 379 | exptest.o: ../include/openssl/crypto.h ../include/openssl/err.h |
| 341 | exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 380 | exptest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 342 | exptest.o: ../include/openssl/rand.h ../include/openssl/safestack.h | 381 | exptest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h |
| 343 | exptest.o: ../include/openssl/stack.h | 382 | exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h |
| 383 | exptest.o: ../include/openssl/symhacks.h | ||
| 344 | hmactest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 384 | hmactest.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 345 | hmactest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 385 | hmactest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 346 | hmactest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | 386 | hmactest.o: ../include/openssl/cast.h ../include/openssl/crypto.h |
| @@ -348,15 +388,17 @@ hmactest.o: ../include/openssl/des.h ../include/openssl/dh.h | |||
| 348 | hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | 388 | hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h |
| 349 | hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h | 389 | hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h |
| 350 | hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h | 390 | hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h |
| 351 | hmactest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 391 | hmactest.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 392 | hmactest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 352 | hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 393 | hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 353 | hmactest.o: ../include/openssl/opensslv.h ../include/openssl/rc2.h | 394 | hmactest.o: ../include/openssl/opensslv.h ../include/openssl/rc2.h |
| 354 | hmactest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 395 | hmactest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 355 | hmactest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 396 | hmactest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 356 | hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 397 | hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 357 | hmactest.o: ../include/openssl/stack.h | 398 | hmactest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 358 | ideatest.o: ../include/openssl/idea.h ../include/openssl/opensslconf.h | 399 | ideatest.o: ../include/openssl/idea.h ../include/openssl/opensslconf.h |
| 359 | md2test.o: ../include/openssl/md2.h ../include/openssl/opensslconf.h | 400 | md2test.o: ../include/openssl/md2.h ../include/openssl/opensslconf.h |
| 401 | md4test.o: ../include/openssl/md4.h | ||
| 360 | md5test.o: ../include/openssl/md5.h | 402 | md5test.o: ../include/openssl/md5.h |
| 361 | mdc2test.o: ../include/openssl/des.h ../include/openssl/e_os2.h | 403 | mdc2test.o: ../include/openssl/des.h ../include/openssl/e_os2.h |
| 362 | mdc2test.o: ../include/openssl/mdc2.h ../include/openssl/opensslconf.h | 404 | mdc2test.o: ../include/openssl/mdc2.h ../include/openssl/opensslconf.h |
| @@ -365,32 +407,35 @@ rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h | |||
| 365 | rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h | 407 | rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h |
| 366 | rc5test.o: ../include/openssl/rc5.h | 408 | rc5test.o: ../include/openssl/rc5.h |
| 367 | rmdtest.o: ../include/openssl/ripemd.h | 409 | rmdtest.o: ../include/openssl/ripemd.h |
| 368 | rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h | 410 | rsa_test.o: ../include/openssl/bio.h ../include/openssl/bn.h |
| 369 | rsa_test.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 411 | rsa_test.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 370 | rsa_test.o: ../include/openssl/err.h ../include/openssl/opensslconf.h | 412 | rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 413 | rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | ||
| 371 | rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/rand.h | 414 | rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/rand.h |
| 372 | rsa_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 415 | rsa_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 373 | rsa_test.o: ../include/openssl/stack.h | 416 | rsa_test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 374 | sha1test.o: ../include/openssl/sha.h | 417 | sha1test.o: ../include/openssl/sha.h |
| 375 | shatest.o: ../include/openssl/sha.h | 418 | shatest.o: ../include/openssl/sha.h |
| 376 | ssltest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 419 | ssltest.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 377 | ssltest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 420 | ssltest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 378 | ssltest.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 421 | ssltest.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 379 | ssltest.o: ../include/openssl/crypto.h ../include/openssl/des.h | 422 | ssltest.o: ../include/openssl/comp.h ../include/openssl/crypto.h |
| 380 | ssltest.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 423 | ssltest.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 381 | ssltest.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 424 | ssltest.o: ../include/openssl/dsa.h ../include/openssl/e_os.h |
| 382 | ssltest.o: ../include/openssl/err.h ../include/openssl/evp.h | 425 | ssltest.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 383 | ssltest.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 426 | ssltest.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 384 | ssltest.o: ../include/openssl/md2.h ../include/openssl/md5.h | 427 | ssltest.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 385 | ssltest.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 428 | ssltest.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 386 | ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 429 | ssltest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 387 | ssltest.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 430 | ssltest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 388 | ssltest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | 431 | ssltest.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 389 | ssltest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 432 | ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 390 | ssltest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 433 | ssltest.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 391 | ssltest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 434 | ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 392 | ssltest.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 435 | ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 393 | ssltest.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 436 | ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 394 | ssltest.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 437 | ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 438 | ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | ||
| 439 | ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 395 | ssltest.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 440 | ssltest.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 396 | ssltest.o: ../include/openssl/x509_vfy.h | 441 | ssltest.o: ../include/openssl/x509_vfy.h |
diff --git a/src/lib/libssl/src/test/enginetest.c b/src/lib/libssl/src/test/enginetest.c new file mode 100644 index 0000000000..a5a3c47fcb --- /dev/null +++ b/src/lib/libssl/src/test/enginetest.c | |||
| @@ -0,0 +1,251 @@ | |||
| 1 | /* crypto/engine/enginetest.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <openssl/engine.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | |||
| 64 | static void display_engine_list() | ||
| 65 | { | ||
| 66 | ENGINE *h; | ||
| 67 | int loop; | ||
| 68 | |||
| 69 | h = ENGINE_get_first(); | ||
| 70 | loop = 0; | ||
| 71 | printf("listing available engine types\n"); | ||
| 72 | while(h) | ||
| 73 | { | ||
| 74 | printf("engine %i, id = \"%s\", name = \"%s\"\n", | ||
| 75 | loop++, ENGINE_get_id(h), ENGINE_get_name(h)); | ||
| 76 | h = ENGINE_get_next(h); | ||
| 77 | } | ||
| 78 | printf("end of list\n"); | ||
| 79 | } | ||
| 80 | |||
| 81 | int main(int argc, char *argv[]) | ||
| 82 | { | ||
| 83 | ENGINE *block[512]; | ||
| 84 | char buf[256]; | ||
| 85 | const char *id, *name; | ||
| 86 | ENGINE *ptr; | ||
| 87 | int loop; | ||
| 88 | int to_return = 1; | ||
| 89 | ENGINE *new_h1 = NULL; | ||
| 90 | ENGINE *new_h2 = NULL; | ||
| 91 | ENGINE *new_h3 = NULL; | ||
| 92 | ENGINE *new_h4 = NULL; | ||
| 93 | |||
| 94 | ERR_load_crypto_strings(); | ||
| 95 | |||
| 96 | memset(block, 0, 512 * sizeof(ENGINE *)); | ||
| 97 | if(((new_h1 = ENGINE_new()) == NULL) || | ||
| 98 | !ENGINE_set_id(new_h1, "test_id0") || | ||
| 99 | !ENGINE_set_name(new_h1, "First test item") || | ||
| 100 | ((new_h2 = ENGINE_new()) == NULL) || | ||
| 101 | !ENGINE_set_id(new_h2, "test_id1") || | ||
| 102 | !ENGINE_set_name(new_h2, "Second test item") || | ||
| 103 | ((new_h3 = ENGINE_new()) == NULL) || | ||
| 104 | !ENGINE_set_id(new_h3, "test_id2") || | ||
| 105 | !ENGINE_set_name(new_h3, "Third test item") || | ||
| 106 | ((new_h4 = ENGINE_new()) == NULL) || | ||
| 107 | !ENGINE_set_id(new_h4, "test_id3") || | ||
| 108 | !ENGINE_set_name(new_h4, "Fourth test item")) | ||
| 109 | { | ||
| 110 | printf("Couldn't set up test ENGINE structures\n"); | ||
| 111 | goto end; | ||
| 112 | } | ||
| 113 | printf("\nenginetest beginning\n\n"); | ||
| 114 | display_engine_list(); | ||
| 115 | if(!ENGINE_add(new_h1)) | ||
| 116 | { | ||
| 117 | printf("Add failed!\n"); | ||
| 118 | goto end; | ||
| 119 | } | ||
| 120 | display_engine_list(); | ||
| 121 | ptr = ENGINE_get_first(); | ||
| 122 | if(!ENGINE_remove(ptr)) | ||
| 123 | { | ||
| 124 | printf("Remove failed!\n"); | ||
| 125 | goto end; | ||
| 126 | } | ||
| 127 | display_engine_list(); | ||
| 128 | if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) | ||
| 129 | { | ||
| 130 | printf("Add failed!\n"); | ||
| 131 | goto end; | ||
| 132 | } | ||
| 133 | display_engine_list(); | ||
| 134 | if(!ENGINE_remove(new_h2)) | ||
| 135 | { | ||
| 136 | printf("Remove failed!\n"); | ||
| 137 | goto end; | ||
| 138 | } | ||
| 139 | display_engine_list(); | ||
| 140 | if(!ENGINE_add(new_h4)) | ||
| 141 | { | ||
| 142 | printf("Add failed!\n"); | ||
| 143 | goto end; | ||
| 144 | } | ||
| 145 | display_engine_list(); | ||
| 146 | if(ENGINE_add(new_h3)) | ||
| 147 | { | ||
| 148 | printf("Add *should* have failed but didn't!\n"); | ||
| 149 | goto end; | ||
| 150 | } | ||
| 151 | else | ||
| 152 | printf("Add that should fail did.\n"); | ||
| 153 | ERR_clear_error(); | ||
| 154 | if(ENGINE_remove(new_h2)) | ||
| 155 | { | ||
| 156 | printf("Remove *should* have failed but didn't!\n"); | ||
| 157 | goto end; | ||
| 158 | } | ||
| 159 | else | ||
| 160 | printf("Remove that should fail did.\n"); | ||
| 161 | if(!ENGINE_remove(new_h1)) | ||
| 162 | { | ||
| 163 | printf("Remove failed!\n"); | ||
| 164 | goto end; | ||
| 165 | } | ||
| 166 | display_engine_list(); | ||
| 167 | if(!ENGINE_remove(new_h3)) | ||
| 168 | { | ||
| 169 | printf("Remove failed!\n"); | ||
| 170 | goto end; | ||
| 171 | } | ||
| 172 | display_engine_list(); | ||
| 173 | if(!ENGINE_remove(new_h4)) | ||
| 174 | { | ||
| 175 | printf("Remove failed!\n"); | ||
| 176 | goto end; | ||
| 177 | } | ||
| 178 | display_engine_list(); | ||
| 179 | /* Depending on whether there's any hardware support compiled | ||
| 180 | * in, this remove may be destined to fail. */ | ||
| 181 | ptr = ENGINE_get_first(); | ||
| 182 | if(ptr) | ||
| 183 | if(!ENGINE_remove(ptr)) | ||
| 184 | printf("Remove failed!i - probably no hardware " | ||
| 185 | "support present.\n"); | ||
| 186 | display_engine_list(); | ||
| 187 | if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) | ||
| 188 | { | ||
| 189 | printf("Couldn't add and remove to an empty list!\n"); | ||
| 190 | goto end; | ||
| 191 | } | ||
| 192 | else | ||
| 193 | printf("Successfully added and removed to an empty list!\n"); | ||
| 194 | printf("About to beef up the engine-type list\n"); | ||
| 195 | for(loop = 0; loop < 512; loop++) | ||
| 196 | { | ||
| 197 | sprintf(buf, "id%i", loop); | ||
| 198 | id = strdup(buf); | ||
| 199 | sprintf(buf, "Fake engine type %i", loop); | ||
| 200 | name = strdup(buf); | ||
| 201 | if(((block[loop] = ENGINE_new()) == NULL) || | ||
| 202 | !ENGINE_set_id(block[loop], id) || | ||
| 203 | !ENGINE_set_name(block[loop], name)) | ||
| 204 | { | ||
| 205 | printf("Couldn't create block of ENGINE structures.\n" | ||
| 206 | "I'll probably also core-dump now, damn.\n"); | ||
| 207 | goto end; | ||
| 208 | } | ||
| 209 | } | ||
| 210 | for(loop = 0; loop < 512; loop++) | ||
| 211 | { | ||
| 212 | if(!ENGINE_add(block[loop])) | ||
| 213 | { | ||
| 214 | printf("\nAdding stopped at %i, (%s,%s)\n", | ||
| 215 | loop, ENGINE_get_id(block[loop]), | ||
| 216 | ENGINE_get_name(block[loop])); | ||
| 217 | goto cleanup_loop; | ||
| 218 | } | ||
| 219 | else | ||
| 220 | printf("."); fflush(stdout); | ||
| 221 | } | ||
| 222 | cleanup_loop: | ||
| 223 | printf("\nAbout to empty the engine-type list\n"); | ||
| 224 | while((ptr = ENGINE_get_first()) != NULL) | ||
| 225 | { | ||
| 226 | if(!ENGINE_remove(ptr)) | ||
| 227 | { | ||
| 228 | printf("\nRemove failed!\n"); | ||
| 229 | goto end; | ||
| 230 | } | ||
| 231 | printf("."); fflush(stdout); | ||
| 232 | } | ||
| 233 | for(loop = 0; loop < 512; loop++) | ||
| 234 | { | ||
| 235 | free((char *)(ENGINE_get_id(block[loop]))); | ||
| 236 | free((char *)(ENGINE_get_name(block[loop]))); | ||
| 237 | } | ||
| 238 | printf("\nTests completed happily\n"); | ||
| 239 | to_return = 0; | ||
| 240 | end: | ||
| 241 | if(to_return) | ||
| 242 | ERR_print_errors_fp(stderr); | ||
| 243 | if(new_h1) ENGINE_free(new_h1); | ||
| 244 | if(new_h2) ENGINE_free(new_h2); | ||
| 245 | if(new_h3) ENGINE_free(new_h3); | ||
| 246 | if(new_h4) ENGINE_free(new_h4); | ||
| 247 | for(loop = 0; loop < 512; loop++) | ||
| 248 | if(block[loop]) | ||
| 249 | ENGINE_free(block[loop]); | ||
| 250 | return to_return; | ||
| 251 | } | ||
diff --git a/src/lib/libssl/src/test/maketests.com b/src/lib/libssl/src/test/maketests.com index 1246d9a077..135e0bfeb9 100644 --- a/src/lib/libssl/src/test/maketests.com +++ b/src/lib/libssl/src/test/maketests.com | |||
| @@ -143,7 +143,7 @@ $ GOSUB CHECK_OPT_FILE | |||
| 143 | $! | 143 | $! |
| 144 | $! Define The TEST Files. | 144 | $! Define The TEST Files. |
| 145 | $! | 145 | $! |
| 146 | $ TEST_FILES = "BNTEST,IDEATEST,MD2TEST,MD5TEST,HMACTEST,"+ - | 146 | $ TEST_FILES = "BNTEST,IDEATEST,MD2TEST,MD4TEST,MD5TEST,HMACTEST,"+ - |
| 147 | "RC2TEST,RC4TEST,RC5TEST,"+ - | 147 | "RC2TEST,RC4TEST,RC5TEST,"+ - |
| 148 | "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ - | 148 | "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ - |
| 149 | "RANDTEST,DHTEST,"+ - | 149 | "RANDTEST,DHTEST,"+ - |
diff --git a/src/lib/libssl/src/test/md4test.c b/src/lib/libssl/src/test/md4test.c new file mode 100644 index 0000000000..97e6e21efd --- /dev/null +++ b/src/lib/libssl/src/test/md4test.c | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | /* crypto/md4/md4test.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <stdlib.h> | ||
| 62 | |||
| 63 | #ifdef NO_MD4 | ||
| 64 | int main(int argc, char *argv[]) | ||
| 65 | { | ||
| 66 | printf("No MD4 support\n"); | ||
| 67 | return(0); | ||
| 68 | } | ||
| 69 | #else | ||
| 70 | #include <openssl/md4.h> | ||
| 71 | |||
| 72 | static char *test[]={ | ||
| 73 | "", | ||
| 74 | "a", | ||
| 75 | "abc", | ||
| 76 | "message digest", | ||
| 77 | "abcdefghijklmnopqrstuvwxyz", | ||
| 78 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", | ||
| 79 | "12345678901234567890123456789012345678901234567890123456789012345678901234567890", | ||
| 80 | NULL, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static char *ret[]={ | ||
| 84 | "31d6cfe0d16ae931b73c59d7e0c089c0", | ||
| 85 | "bde52cb31de33e46245e05fbdbd6fb24", | ||
| 86 | "a448017aaf21d8525fc10ae87aa6729d", | ||
| 87 | "d9130a8164549fe818874806e1c7014b", | ||
| 88 | "d79e1c308aa5bbcdeea8ed63df412da9", | ||
| 89 | "043f8582f241db351ce627e153e7f0e4", | ||
| 90 | "e33b4ddc9c38f2199c3e7b164fcc0536", | ||
| 91 | }; | ||
| 92 | |||
| 93 | static char *pt(unsigned char *md); | ||
| 94 | int main(int argc, char *argv[]) | ||
| 95 | { | ||
| 96 | int i,err=0; | ||
| 97 | unsigned char **P,**R; | ||
| 98 | char *p; | ||
| 99 | |||
| 100 | P=(unsigned char **)test; | ||
| 101 | R=(unsigned char **)ret; | ||
| 102 | i=1; | ||
| 103 | while (*P != NULL) | ||
| 104 | { | ||
| 105 | p=pt(MD4(&(P[0][0]),(unsigned long)strlen((char *)*P),NULL)); | ||
| 106 | if (strcmp(p,(char *)*R) != 0) | ||
| 107 | { | ||
| 108 | printf("error calculating MD4 on '%s'\n",*P); | ||
| 109 | printf("got %s instead of %s\n",p,*R); | ||
| 110 | err++; | ||
| 111 | } | ||
| 112 | else | ||
| 113 | printf("test %d ok\n",i); | ||
| 114 | i++; | ||
| 115 | R++; | ||
| 116 | P++; | ||
| 117 | } | ||
| 118 | exit(err); | ||
| 119 | return(0); | ||
| 120 | } | ||
| 121 | |||
| 122 | static char *pt(unsigned char *md) | ||
| 123 | { | ||
| 124 | int i; | ||
| 125 | static char buf[80]; | ||
| 126 | |||
| 127 | for (i=0; i<MD4_DIGEST_LENGTH; i++) | ||
| 128 | sprintf(&(buf[i*2]),"%02x",md[i]); | ||
| 129 | return(buf); | ||
| 130 | } | ||
| 131 | #endif | ||
diff --git a/src/lib/libssl/src/test/testp7.pem b/src/lib/libssl/src/test/testp7.pem index 6bba16f137..e5b7866c31 100644 --- a/src/lib/libssl/src/test/testp7.pem +++ b/src/lib/libssl/src/test/testp7.pem | |||
| @@ -1,46 +1,46 @@ | |||
| 1 | -----BEGIN PKCS7----- | 1 | -----BEGIN PKCS7----- |
| 2 | MIAGCSqGSIb3DQEHAqCAMIIIBwIBATEAMIAGCSqGSIb3DQEHAQAAoIIGPDCCBHIw | 2 | MIIIGAYJKoZIhvcNAQcCoIIICTCCCAUCAQExADALBgkqhkiG9w0BBwGgggY8MIIE |
| 3 | ggQcoAMCAQICEHkvjiX1iVGQMenF9HgIjI8wDQYJKoZIhvcNAQEEBQAwYjERMA8G | 3 | cjCCBBygAwIBAgIQeS+OJfWJUZAx6cX0eAiMjzANBgkqhkiG9w0BAQQFADBiMREw |
| 4 | A1UEBxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQL | 4 | DwYDVQQHEwhJbnRlcm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNV |
| 5 | EytWZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMB4X | 5 | BAsTK1ZlcmlTaWduIENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXIw |
| 6 | DTk2MDcxOTAwMDAwMFoXDTk3MDMzMDIzNTk1OVowgdUxETAPBgNVBAcTCEludGVy | 6 | HhcNOTYwNzE5MDAwMDAwWhcNOTcwMzMwMjM1OTU5WjCB1TERMA8GA1UEBxMISW50 |
| 7 | bmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24g | 7 | ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJpU2ln |
| 8 | Q2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjEoMCYGA1UECxMfRGln | 8 | biBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMSgwJgYDVQQLEx9E |
| 9 | aXRhbCBJRCBDbGFzcyAxIC0gU01JTUUgVGVzdDFHMEUGA1UECxM+d3d3LnZlcmlz | 9 | aWdpdGFsIElEIENsYXNzIDEgLSBTTUlNRSBUZXN0MUcwRQYDVQQLEz53d3cudmVy |
| 10 | aWduLmNvbS9yZXBvc2l0b3J5L0NQUy0xLjAgSW5jLiBieSBSZWYuLExJQUIuTFRE | 10 | aXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEuMCBJbmMuIGJ5IFJlZi4sTElBQi5M |
| 11 | KGMpOTYwWzANBgkqhkiG9w0BAQEFAANKADBHAkAOy7xxCAIkOfuIA2LyRpxgKlDO | 11 | VEQoYyk5NjBbMA0GCSqGSIb3DQEBAQUAA0oAMEcCQA7LvHEIAiQ5+4gDYvJGnGAq |
| 12 | Rl8htdXYhF5iBGUx1GYaK6KF+bK/CCI0l4j2OfWGFBUrwGoWqxTNcWgTfMzRAgMB | 12 | UM5GXyG11diEXmIEZTHUZhorooX5sr8IIjSXiPY59YYUFSvAaharFM1xaBN8zNEC |
| 13 | AAGjggI5MIICNTAJBgNVHRMEAjAAMIICJgYDVR0DBIICHTCCAhkwggIVMIICEQYL | 13 | AwEAAaOCAjkwggI1MAkGA1UdEwQCMAAwggImBgNVHQMEggIdMIICGTCCAhUwggIR |
| 14 | YIZIAYb4RQEHAQEwggIAFoIBq1RoaXMgY2VydGlmaWNhdGUgaW5jb3Jwb3JhdGVz | 14 | BgtghkgBhvhFAQcBATCCAgAWggGrVGhpcyBjZXJ0aWZpY2F0ZSBpbmNvcnBvcmF0 |
| 15 | IGJ5IHJlZmVyZW5jZSwgYW5kIGl0cyB1c2UgaXMgc3RyaWN0bHkgc3ViamVjdCB0 | 15 | ZXMgYnkgcmVmZXJlbmNlLCBhbmQgaXRzIHVzZSBpcyBzdHJpY3RseSBzdWJqZWN0 |
| 16 | bywgdGhlIFZlcmlTaWduIENlcnRpZmljYXRpb24gUHJhY3RpY2UgU3RhdGVtZW50 | 16 | IHRvLCB0aGUgVmVyaVNpZ24gQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0ZW1l |
| 17 | IChDUFMpLCBhdmFpbGFibGUgYXQ6IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9D | 17 | bnQgKENQUyksIGF2YWlsYWJsZSBhdDogaHR0cHM6Ly93d3cudmVyaXNpZ24uY29t |
| 18 | UFMtMS4wOyBieSBFLW1haWwgYXQgQ1BTLXJlcXVlc3RzQHZlcmlzaWduLmNvbTsg | 18 | L0NQUy0xLjA7IGJ5IEUtbWFpbCBhdCBDUFMtcmVxdWVzdHNAdmVyaXNpZ24uY29t |
| 19 | b3IgYnkgbWFpbCBhdCBWZXJpU2lnbiwgSW5jLiwgMjU5MyBDb2FzdCBBdmUuLCBN | 19 | OyBvciBieSBtYWlsIGF0IFZlcmlTaWduLCBJbmMuLCAyNTkzIENvYXN0IEF2ZS4s |
| 20 | b3VudGFpbiBWaWV3LCBDQSA5NDA0MyBVU0EgVGVsLiArMSAoNDE1KSA5NjEtODgz | 20 | IE1vdW50YWluIFZpZXcsIENBIDk0MDQzIFVTQSBUZWwuICsxICg0MTUpIDk2MS04 |
| 21 | MCBDb3B5cmlnaHQgKGMpIDE5OTYgVmVyaVNpZ24sIEluYy4gIEFsbCBSaWdodHMg | 21 | ODMwIENvcHlyaWdodCAoYykgMTk5NiBWZXJpU2lnbiwgSW5jLiAgQWxsIFJpZ2h0 |
| 22 | UmVzZXJ2ZWQuIENFUlRBSU4gV0FSUkFOVElFUyBESVNDTEFJTUVEIGFuZCBMSUFC | 22 | cyBSZXNlcnZlZC4gQ0VSVEFJTiBXQVJSQU5USUVTIERJU0NMQUlNRUQgYW5kIExJ |
| 23 | SUxJVFkgTElNSVRFRC6gDgYMYIZIAYb4RQEHAQEBoQ4GDGCGSAGG+EUBBwEBAjAv | 23 | QUJJTElUWSBMSU1JVEVELqAOBgxghkgBhvhFAQcBAQGhDgYMYIZIAYb4RQEHAQEC |
| 24 | MC0WK2h0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9yZXBvc2l0b3J5L0NQUy0xLgMw | 24 | MC8wLRYraHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEu |
| 25 | DQYJKoZIhvcNAQEEBQADQQDAmA7km/3iJWEsWN9Z2WU2gmZAknx45WnDKHxMa3Bf | 25 | AzANBgkqhkiG9w0BAQQFAANBAMCYDuSb/eIlYSxY31nZZTaCZkCSfHjlacMofExr |
| 26 | gNsh6BLk/ngkJKjNKTDR13XVHqEPUY1flbjATZputw1GMIIBwjCCAWygAwIBAgIQ | 26 | cF+A2yHoEuT+eCQkqM0pMNHXddUeoQ9RjV+VuMBNmm63DUYwggHCMIIBbKADAgEC |
| 27 | fAmE6tW5ERSQWDneu3KfSTANBgkqhkiG9w0BAQIFADA+MQswCQYDVQQGEwJVUzEX | 27 | AhB8CYTq1bkRFJBYOd67cp9JMA0GCSqGSIb3DQEBAgUAMD4xCzAJBgNVBAYTAlVT |
| 28 | MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xFjAUBgNVBAsTDVRFU1QgUm9vdCBQQ0Ew | 28 | MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEWMBQGA1UECxMNVEVTVCBSb290IFBD |
| 29 | HhcNOTYwNzE3MDAwMDAwWhcNOTcwNzE3MjM1OTU5WjBiMREwDwYDVQQHEwhJbnRl | 29 | QTAeFw05NjA3MTcwMDAwMDBaFw05NzA3MTcyMzU5NTlaMGIxETAPBgNVBAcTCElu |
| 30 | cm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNVBAsTK1ZlcmlTaWdu | 30 | dGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNp |
| 31 | IENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXIwXDANBgkqhkiG9w0B | 31 | Z24gQ2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjBcMA0GCSqGSIb3 |
| 32 | AQEFAANLADBIAkEA7Fc6zYJw4WwCWa1ni3fYNbzGSQNluuw990024GusjLfhEk1h | 32 | DQEBAQUAA0sAMEgCQQDsVzrNgnDhbAJZrWeLd9g1vMZJA2W67D33TTbga6yMt+ES |
| 33 | MsIUukTT/n8yxoO7rYp4x+LS+tHF2tBtuxg7CwIDAQABoyIwIDALBgNVHQ8EBAMC | 33 | TWEywhS6RNP+fzLGg7utinjH4tL60cXa0G27GDsLAgMBAAGjIjAgMAsGA1UdDwQE |
| 34 | AQYwEQYJYIZIAYb4QgEBBAQDAgIEMA0GCSqGSIb3DQEBAgUAA0EAFKem0cJGg9nd | 34 | AwIBBjARBglghkgBhvhCAQEEBAMCAgQwDQYJKoZIhvcNAQECBQADQQAUp6bRwkaD |
| 35 | TAbP5o1HIEyNn11ZlvLU5v1Hejs1MKQt72IMm4jjgOH+pjguXW8lB6yzrK4oVOO2 | 35 | 2d1MBs/mjUcgTI2fXVmW8tTm/Ud6OzUwpC3vYgybiOOA4f6mOC5dbyUHrLOsrihU |
| 36 | UNCaNQ1H26GCAa0wgcEwbTANBgkqhkiG9w0BAQIFADA+MQswCQYDVQQGEwJVUzEX | 36 | 47ZQ0Jo1DUfboYIBrTCBwTBtMA0GCSqGSIb3DQEBAgUAMD4xCzAJBgNVBAYTAlVT |
| 37 | MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xFjAUBgNVBAsTDVRFU1QgUm9vdCBQQ0EX | 37 | MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEWMBQGA1UECxMNVEVTVCBSb290IFBD |
| 38 | DTk2MDcxNzE3NDQwOVoXDTk4MDcxNzAwMDAwMFowDQYJKoZIhvcNAQECBQADQQB4 | 38 | QRcNOTYwNzE3MTc0NDA5WhcNOTgwNzE3MDAwMDAwWjANBgkqhkiG9w0BAQIFAANB |
| 39 | rQNP8QLpAox83odQDE/5dqAuvDfshW/miTxwQTMXOoBtjGiowTcG+YXF1JZTJRMT | 39 | AHitA0/xAukCjHzeh1AMT/l2oC68N+yFb+aJPHBBMxc6gG2MaKjBNwb5hcXUllMl |
| 40 | jQN47tdH+6MCKt7N8MddMIHmMIGRMA0GCSqGSIb3DQEBAgUAMGIxETAPBgNVBAcT | 40 | ExONA3ju10f7owIq3s3wx10wgeYwgZEwDQYJKoZIhvcNAQECBQAwYjERMA8GA1UE |
| 41 | CEludGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVy | 41 | BxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytW |
| 42 | aVNpZ24gQ2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlchcNOTYwNzE3 | 42 | ZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyFw05NjA3 |
| 43 | MTc1OTI5WhcNOTcwNzE4MDAwMDAwWjANBgkqhkiG9w0BAQIFAANBALm1VmE7FrEJ | 43 | MTcxNzU5MjlaFw05NzA3MTgwMDAwMDBaMA0GCSqGSIb3DQEBAgUAA0EAubVWYTsW |
| 44 | rLXvX/lIDMPAZIw5TNuX8EC6wn5ppy8Y3sHstdJEkTsqVGiS2/q+KEQC3NHxvV32 | 44 | sQmste9f+UgMw8BkjDlM25fwQLrCfmmnLxjewey10kSROypUaJLb+r4oRALc0fG9 |
| 45 | bGooiIKLUB4xAAAAAAA= | 45 | XfZsaiiIgotQHjEA |
| 46 | -----END PKCS7----- | 46 | -----END PKCS7----- |
diff --git a/src/lib/libssl/src/test/tests.com b/src/lib/libssl/src/test/tests.com index 040dafab8d..df8f46e75d 100644 --- a/src/lib/libssl/src/test/tests.com +++ b/src/lib/libssl/src/test/tests.com | |||
| @@ -19,11 +19,12 @@ $ then | |||
| 19 | $ tests = p1 | 19 | $ tests = p1 |
| 20 | $ else | 20 | $ else |
| 21 | $ tests := - | 21 | $ tests := - |
| 22 | test_des,test_idea,test_sha,test_md5,test_hmac,test_md2,test_mdc2,- | 22 | test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,- |
| 23 | test_md2,test_mdc2,- | ||
| 23 | test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,- | 24 | test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,- |
| 24 | test_rand,test_bn,test_enc,test_x509,test_rsa,test_crl,test_sid,- | 25 | test_rand,test_bn,test_enc,test_x509,test_rsa,test_crl,test_sid,- |
| 25 | test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- | 26 | test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- |
| 26 | test_ss,test_ssl,test_ca | 27 | test_ss,test_ca,test_ssl |
| 27 | $ endif | 28 | $ endif |
| 28 | $ tests = f$edit(tests,"COLLAPSE") | 29 | $ tests = f$edit(tests,"COLLAPSE") |
| 29 | $ | 30 | $ |
| @@ -35,6 +36,7 @@ $ SHA1TEST := sha1test | |||
| 35 | $ MDC2TEST := mdc2test | 36 | $ MDC2TEST := mdc2test |
| 36 | $ RMDTEST := rmdtest | 37 | $ RMDTEST := rmdtest |
| 37 | $ MD2TEST := md2test | 38 | $ MD2TEST := md2test |
| 39 | $ MD4TEST := md4test | ||
| 38 | $ MD5TEST := md5test | 40 | $ MD5TEST := md5test |
| 39 | $ HMACTEST := hmactest | 41 | $ HMACTEST := hmactest |
| 40 | $ RC2TEST := rc2test | 42 | $ RC2TEST := rc2test |
| @@ -55,54 +57,58 @@ $ loop_tests: | |||
| 55 | $ tests_e = f$element(tests_i,",",tests) | 57 | $ tests_e = f$element(tests_i,",",tests) |
| 56 | $ tests_i = tests_i + 1 | 58 | $ tests_i = tests_i + 1 |
| 57 | $ if tests_e .eqs. "," then goto exit | 59 | $ if tests_e .eqs. "," then goto exit |
| 58 | $ goto 'tests_e' | 60 | $ gosub 'tests_e' |
| 61 | $ goto loop_tests | ||
| 59 | $ | 62 | $ |
| 60 | $ test_des: | 63 | $ test_des: |
| 61 | $ mcr 'texe_dir''destest' | 64 | $ mcr 'texe_dir''destest' |
| 62 | $ goto loop_tests | 65 | $ return |
| 63 | $ test_idea: | 66 | $ test_idea: |
| 64 | $ mcr 'texe_dir''ideatest' | 67 | $ mcr 'texe_dir''ideatest' |
| 65 | $ goto loop_tests | 68 | $ return |
| 66 | $ test_sha: | 69 | $ test_sha: |
| 67 | $ mcr 'texe_dir''shatest' | 70 | $ mcr 'texe_dir''shatest' |
| 68 | $ mcr 'texe_dir''sha1test' | 71 | $ mcr 'texe_dir''sha1test' |
| 69 | $ goto loop_tests | 72 | $ return |
| 70 | $ test_mdc2: | 73 | $ test_mdc2: |
| 71 | $ mcr 'texe_dir''mdc2test' | 74 | $ mcr 'texe_dir''mdc2test' |
| 72 | $ goto loop_tests | 75 | $ return |
| 73 | $ test_md5: | 76 | $ test_md5: |
| 74 | $ mcr 'texe_dir''md5test' | 77 | $ mcr 'texe_dir''md5test' |
| 75 | $ goto loop_tests | 78 | $ return |
| 79 | $ test_md4: | ||
| 80 | $ mcr 'texe_dir''md4test' | ||
| 81 | $ return | ||
| 76 | $ test_hmac: | 82 | $ test_hmac: |
| 77 | $ mcr 'texe_dir''hmactest' | 83 | $ mcr 'texe_dir''hmactest' |
| 78 | $ goto loop_tests | 84 | $ return |
| 79 | $ test_md2: | 85 | $ test_md2: |
| 80 | $ mcr 'texe_dir''md2test' | 86 | $ mcr 'texe_dir''md2test' |
| 81 | $ goto loop_tests | 87 | $ return |
| 82 | $ test_rmd: | 88 | $ test_rmd: |
| 83 | $ mcr 'texe_dir''rmdtest' | 89 | $ mcr 'texe_dir''rmdtest' |
| 84 | $ goto loop_tests | 90 | $ return |
| 85 | $ test_bf: | 91 | $ test_bf: |
| 86 | $ mcr 'texe_dir''bftest' | 92 | $ mcr 'texe_dir''bftest' |
| 87 | $ goto loop_tests | 93 | $ return |
| 88 | $ test_cast: | 94 | $ test_cast: |
| 89 | $ mcr 'texe_dir''casttest' | 95 | $ mcr 'texe_dir''casttest' |
| 90 | $ goto loop_tests | 96 | $ return |
| 91 | $ test_rc2: | 97 | $ test_rc2: |
| 92 | $ mcr 'texe_dir''rc2test' | 98 | $ mcr 'texe_dir''rc2test' |
| 93 | $ goto loop_tests | 99 | $ return |
| 94 | $ test_rc4: | 100 | $ test_rc4: |
| 95 | $ mcr 'texe_dir''rc4test' | 101 | $ mcr 'texe_dir''rc4test' |
| 96 | $ goto loop_tests | 102 | $ return |
| 97 | $ test_rc5: | 103 | $ test_rc5: |
| 98 | $ mcr 'texe_dir''rc5test' | 104 | $ mcr 'texe_dir''rc5test' |
| 99 | $ goto loop_tests | 105 | $ return |
| 100 | $ test_rand: | 106 | $ test_rand: |
| 101 | $ mcr 'texe_dir''randtest' | 107 | $ mcr 'texe_dir''randtest' |
| 102 | $ goto loop_tests | 108 | $ return |
| 103 | $ test_enc: | 109 | $ test_enc: |
| 104 | $ @testenc.com | 110 | $ @testenc.com |
| 105 | $ goto loop_tests | 111 | $ return |
| 106 | $ test_x509: | 112 | $ test_x509: |
| 107 | $ define sys$error nla0: | 113 | $ define sys$error nla0: |
| 108 | $ write sys$output "test normal x509v1 certificate" | 114 | $ write sys$output "test normal x509v1 certificate" |
| @@ -112,35 +118,35 @@ $ @tx509.com v3-cert1.pem | |||
| 112 | $ write sys$output "test second x509v3 certificate" | 118 | $ write sys$output "test second x509v3 certificate" |
| 113 | $ @tx509.com v3-cert2.pem | 119 | $ @tx509.com v3-cert2.pem |
| 114 | $ deassign sys$error | 120 | $ deassign sys$error |
| 115 | $ goto loop_tests | 121 | $ return |
| 116 | $ test_rsa: | 122 | $ test_rsa: |
| 117 | $ define sys$error nla0: | 123 | $ define sys$error nla0: |
| 118 | $ @trsa.com | 124 | $ @trsa.com |
| 119 | $ deassign sys$error | 125 | $ deassign sys$error |
| 120 | $ mcr 'texe_dir''rsatest' | 126 | $ mcr 'texe_dir''rsatest' |
| 121 | $ goto loop_tests | 127 | $ return |
| 122 | $ test_crl: | 128 | $ test_crl: |
| 123 | $ define sys$error nla0: | 129 | $ define sys$error nla0: |
| 124 | $ @tcrl.com | 130 | $ @tcrl.com |
| 125 | $ deassign sys$error | 131 | $ deassign sys$error |
| 126 | $ goto loop_tests | 132 | $ return |
| 127 | $ test_sid: | 133 | $ test_sid: |
| 128 | $ define sys$error nla0: | 134 | $ define sys$error nla0: |
| 129 | $ @tsid.com | 135 | $ @tsid.com |
| 130 | $ deassign sys$error | 136 | $ deassign sys$error |
| 131 | $ goto loop_tests | 137 | $ return |
| 132 | $ test_req: | 138 | $ test_req: |
| 133 | $ define sys$error nla0: | 139 | $ define sys$error nla0: |
| 134 | $ @treq.com | 140 | $ @treq.com |
| 135 | $ @treq.com testreq2.pem | 141 | $ @treq.com testreq2.pem |
| 136 | $ deassign sys$error | 142 | $ deassign sys$error |
| 137 | $ goto loop_tests | 143 | $ return |
| 138 | $ test_pkcs7: | 144 | $ test_pkcs7: |
| 139 | $ define sys$error nla0: | 145 | $ define sys$error nla0: |
| 140 | $ @tpkcs7.com | 146 | $ @tpkcs7.com |
| 141 | $ @tpkcs7d.com | 147 | $ @tpkcs7d.com |
| 142 | $ deassign sys$error | 148 | $ deassign sys$error |
| 143 | $ goto loop_tests | 149 | $ return |
| 144 | $ test_bn: | 150 | $ test_bn: |
| 145 | $ write sys$output "starting big number library test, could take a while..." | 151 | $ write sys$output "starting big number library test, could take a while..." |
| 146 | $ create bntest-vms.fdl | 152 | $ create bntest-vms.fdl |
| @@ -164,36 +170,56 @@ $ write sys$output "-- through sh or bash to verify that the bignum operations w | |||
| 164 | $ write sys$output "" | 170 | $ write sys$output "" |
| 165 | $ write sys$output "test a^b%c implementations" | 171 | $ write sys$output "test a^b%c implementations" |
| 166 | $ mcr 'texe_dir''exptest' | 172 | $ mcr 'texe_dir''exptest' |
| 167 | $ goto loop_tests | 173 | $ return |
| 168 | $ test_verify: | 174 | $ test_verify: |
| 169 | $ write sys$output "The following command should have some OK's and some failures" | 175 | $ write sys$output "The following command should have some OK's and some failures" |
| 170 | $ write sys$output "There are definitly a few expired certificates" | 176 | $ write sys$output "There are definitly a few expired certificates" |
| 171 | $ @tverify.com | 177 | $ @tverify.com |
| 172 | $ goto loop_tests | 178 | $ return |
| 173 | $ test_dh: | 179 | $ test_dh: |
| 174 | $ write sys$output "Generate a set of DH parameters" | 180 | $ write sys$output "Generate a set of DH parameters" |
| 175 | $ mcr 'texe_dir''dhtest' | 181 | $ mcr 'texe_dir''dhtest' |
| 176 | $ goto loop_tests | 182 | $ return |
| 177 | $ test_dsa: | 183 | $ test_dsa: |
| 178 | $ write sys$output "Generate a set of DSA parameters" | 184 | $ write sys$output "Generate a set of DSA parameters" |
| 179 | $ mcr 'texe_dir''dsatest' | 185 | $ mcr 'texe_dir''dsatest' |
| 180 | $ goto loop_tests | 186 | $ return |
| 181 | $ test_gen: | 187 | $ test_gen: |
| 182 | $ write sys$output "Generate and verify a certificate request" | 188 | $ write sys$output "Generate and verify a certificate request" |
| 183 | $ @testgen.com | 189 | $ @testgen.com |
| 184 | $ goto loop_tests | 190 | $ return |
| 191 | $ maybe_test_ss: | ||
| 192 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) | ||
| 193 | $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then - | ||
| 194 | goto test_ss | ||
| 195 | $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then - | ||
| 196 | goto test_ss | ||
| 197 | $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then - | ||
| 198 | goto test_ss | ||
| 199 | $ return | ||
| 185 | $ test_ss: | 200 | $ test_ss: |
| 186 | $ write sys$output "Generate and certify a test certificate" | 201 | $ write sys$output "Generate and certify a test certificate" |
| 187 | $ @testss.com | 202 | $ @testss.com |
| 188 | $ goto loop_tests | 203 | $ return |
| 189 | $ test_ssl: | 204 | $ test_ssl: |
| 190 | $ write sys$output "test SSL protocol" | 205 | $ write sys$output "test SSL protocol" |
| 191 | $ @testssl.com | 206 | $ gosub maybe_test_ss |
| 192 | $ goto loop_tests | 207 | $ @testssl.com keyU.ss certU.ss certCA.ss |
| 208 | $ return | ||
| 193 | $ test_ca: | 209 | $ test_ca: |
| 194 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | 210 | $ set noon |
| 195 | $ @testca.com | 211 | $ define/user sys$output nla0: |
| 196 | $ goto loop_tests | 212 | $ mcr 'exe_dir'openssl no-rsa |
| 213 | $ save_severity=$SEVERITY | ||
| 214 | $ set on | ||
| 215 | $ if save_severity | ||
| 216 | $ then | ||
| 217 | $ write sys$output "skipping CA.com test -- requires RSA" | ||
| 218 | $ else | ||
| 219 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | ||
| 220 | $ @testca.com | ||
| 221 | $ endif | ||
| 222 | $ return | ||
| 197 | $ | 223 | $ |
| 198 | $ | 224 | $ |
| 199 | $ exit: | 225 | $ exit: |
diff --git a/src/lib/libssl/src/times/x86/md4s.cpp b/src/lib/libssl/src/times/x86/md4s.cpp new file mode 100644 index 0000000000..c0ec97fc9f --- /dev/null +++ b/src/lib/libssl/src/times/x86/md4s.cpp | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | // | ||
| 2 | // gettsc.inl | ||
| 3 | // | ||
| 4 | // gives access to the Pentium's (secret) cycle counter | ||
| 5 | // | ||
| 6 | // This software was written by Leonard Janke (janke@unixg.ubc.ca) | ||
| 7 | // in 1996-7 and is entered, by him, into the public domain. | ||
| 8 | |||
| 9 | #if defined(__WATCOMC__) | ||
| 10 | void GetTSC(unsigned long&); | ||
| 11 | #pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax]; | ||
| 12 | #elif defined(__GNUC__) | ||
| 13 | inline | ||
| 14 | void GetTSC(unsigned long& tsc) | ||
| 15 | { | ||
| 16 | asm volatile(".byte 15, 49\n\t" | ||
| 17 | : "=eax" (tsc) | ||
| 18 | : | ||
| 19 | : "%edx", "%eax"); | ||
| 20 | } | ||
| 21 | #elif defined(_MSC_VER) | ||
| 22 | inline | ||
| 23 | void GetTSC(unsigned long& tsc) | ||
| 24 | { | ||
| 25 | unsigned long a; | ||
| 26 | __asm _emit 0fh | ||
| 27 | __asm _emit 31h | ||
| 28 | __asm mov a, eax; | ||
| 29 | tsc=a; | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #include <stdio.h> | ||
| 34 | #include <stdlib.h> | ||
| 35 | #include <openssl/md4.h> | ||
| 36 | |||
| 37 | extern "C" { | ||
| 38 | void md4_block_x86(MD4_CTX *ctx, unsigned char *buffer,int num); | ||
| 39 | } | ||
| 40 | |||
| 41 | void main(int argc,char *argv[]) | ||
| 42 | { | ||
| 43 | unsigned char buffer[64*256]; | ||
| 44 | MD4_CTX ctx; | ||
| 45 | unsigned long s1,s2,e1,e2; | ||
| 46 | unsigned char k[16]; | ||
| 47 | unsigned long data[2]; | ||
| 48 | unsigned char iv[8]; | ||
| 49 | int i,num=0,numm; | ||
| 50 | int j=0; | ||
| 51 | |||
| 52 | if (argc >= 2) | ||
| 53 | num=atoi(argv[1]); | ||
| 54 | |||
| 55 | if (num == 0) num=16; | ||
| 56 | if (num > 250) num=16; | ||
| 57 | numm=num+2; | ||
| 58 | num*=64; | ||
| 59 | numm*=64; | ||
| 60 | |||
| 61 | for (j=0; j<6; j++) | ||
| 62 | { | ||
| 63 | for (i=0; i<10; i++) /**/ | ||
| 64 | { | ||
| 65 | md4_block_x86(&ctx,buffer,numm); | ||
| 66 | GetTSC(s1); | ||
| 67 | md4_block_x86(&ctx,buffer,numm); | ||
| 68 | GetTSC(e1); | ||
| 69 | GetTSC(s2); | ||
| 70 | md4_block_x86(&ctx,buffer,num); | ||
| 71 | GetTSC(e2); | ||
| 72 | md4_block_x86(&ctx,buffer,num); | ||
| 73 | } | ||
| 74 | printf("md4 (%d bytes) %d %d (%.2f)\n",num, | ||
| 75 | e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2); | ||
| 76 | } | ||
| 77 | } | ||
| 78 | |||
diff --git a/src/lib/libssl/src/tools/c_rehash.in b/src/lib/libssl/src/tools/c_rehash.in index cc3b65871f..baec7c14ff 100644 --- a/src/lib/libssl/src/tools/c_rehash.in +++ b/src/lib/libssl/src/tools/c_rehash.in | |||
| @@ -1,61 +1,148 @@ | |||
| 1 | #!/bin/sh | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | |
| 3 | # redo the hashes for the certificates in your cert path or the ones passed | 3 | |
| 4 | # on the command line. | 4 | # Perl c_rehash script, scan all files in a directory |
| 5 | # | 5 | # and add symbolic links to their hash values. |
| 6 | 6 | ||
| 7 | if [ "$OPENSSL"x = "x" -o ! -x "$OPENSSL" ]; then | 7 | my $openssl; |
| 8 | OPENSSL='openssl' | 8 | |
| 9 | export OPENSSL | 9 | my $dir; |
| 10 | fi | 10 | |
| 11 | DIR=/usr/local/ssl | 11 | if(defined $ENV{OPENSSL}) { |
| 12 | PATH=$DIR/bin:$PATH | 12 | $openssl = $ENV{OPENSSL}; |
| 13 | 13 | } else { | |
| 14 | if [ ! -f "$OPENSSL" ]; then | 14 | $openssl = "openssl"; |
| 15 | found=0 | 15 | $ENV{OPENSSL} = $openssl; |
| 16 | for dir in . `echo $PATH | sed -e 's/:/ /g'`; do | 16 | } |
| 17 | if [ -f "$dir/$OPENSSL" ]; then | 17 | |
| 18 | found=1 | 18 | $ENV{PATH} .= ":$dir/bin"; |
| 19 | break | 19 | |
| 20 | fi | 20 | if(! -f $openssl) { |
| 21 | done | 21 | my $found = 0; |
| 22 | if [ $found = 0 ]; then | 22 | foreach (split /:/, $ENV{PATH}) { |
| 23 | echo "c_rehash: rehashing skipped ('openssl' program not available)" 1>&2 | 23 | if(-f "$_/$openssl") { |
| 24 | exit 0 | 24 | $found = 1; |
| 25 | fi | 25 | last; |
| 26 | fi | 26 | } |
| 27 | 27 | } | |
| 28 | SSL_DIR=$DIR/certs | 28 | if($found == 0) { |
| 29 | 29 | print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n"; | |
| 30 | if [ "$*" = "" ]; then | 30 | exit 0; |
| 31 | CERTS=${*:-${SSL_CERT_DIR:-$SSL_DIR}} | 31 | } |
| 32 | else | 32 | } |
| 33 | CERTS=$* | 33 | |
| 34 | fi | 34 | if(@ARGV) { |
| 35 | 35 | @dirlist = @ARGV; | |
| 36 | IFS=': ' | 36 | } elsif($ENV{SSL_CERT_DIR}) { |
| 37 | for i in $CERTS | 37 | @dirlist = split /:/, $ENV{SSL_CERT_DIR}; |
| 38 | do | 38 | } else { |
| 39 | ( | 39 | $dirlist[0] = "$dir/certs"; |
| 40 | IFS=' ' | 40 | } |
| 41 | if [ -d $i -a -w $i ]; then | 41 | |
| 42 | cd $i | 42 | |
| 43 | echo "Doing $i" | 43 | foreach (@dirlist) { |
| 44 | for i in *.pem | 44 | if(-d $_ and -w $_) { |
| 45 | do | 45 | hash_dir($_); |
| 46 | if [ $i != '*.pem' ]; then | 46 | } |
| 47 | h=`$OPENSSL x509 -hash -noout -in $i` | 47 | } |
| 48 | if [ "x$h" = "x" ]; then | 48 | |
| 49 | echo $i does not contain a certificate | 49 | sub hash_dir { |
| 50 | else | 50 | my %hashlist; |
| 51 | if [ -f $h.0 ]; then | 51 | print "Doing $_[0]\n"; |
| 52 | /bin/rm -f $h.0 | 52 | chdir $_[0]; |
| 53 | fi | 53 | opendir(DIR, "."); |
| 54 | echo "$i => $h.0" | 54 | my @flist = readdir(DIR); |
| 55 | ln -s $i $h.0 | 55 | # Delete any existing symbolic links |
| 56 | fi | 56 | foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) { |
| 57 | fi | 57 | if(-l $_) { |
| 58 | done | 58 | unlink $_; |
| 59 | fi | 59 | } |
| 60 | ) | 60 | } |
| 61 | done | 61 | closedir DIR; |
| 62 | FILE: foreach $fname (grep {/\.pem$/} @flist) { | ||
| 63 | # Check to see if certificates and/or CRLs present. | ||
| 64 | my ($cert, $crl) = check_file($fname); | ||
| 65 | if(!$cert && !$crl) { | ||
| 66 | print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n"; | ||
| 67 | next; | ||
| 68 | } | ||
| 69 | link_hash_cert($fname) if($cert); | ||
| 70 | link_hash_crl($fname) if($crl); | ||
| 71 | } | ||
| 72 | } | ||
| 73 | |||
| 74 | sub check_file { | ||
| 75 | my ($is_cert, $is_crl) = (0,0); | ||
| 76 | my $fname = $_[0]; | ||
| 77 | open IN, $fname; | ||
| 78 | while(<IN>) { | ||
| 79 | if(/^-----BEGIN (.*)-----/) { | ||
| 80 | my $hdr = $1; | ||
| 81 | if($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) { | ||
| 82 | $is_cert = 1; | ||
| 83 | last if($is_crl); | ||
| 84 | } elsif($hdr eq "X509 CRL") { | ||
| 85 | $is_crl = 1; | ||
| 86 | last if($is_cert); | ||
| 87 | } | ||
| 88 | } | ||
| 89 | } | ||
| 90 | close IN; | ||
| 91 | return ($is_cert, $is_crl); | ||
| 92 | } | ||
| 93 | |||
| 94 | |||
| 95 | # Link a certificate to its subject name hash value, each hash is of | ||
| 96 | # the form <hash>.<n> where n is an integer. If the hash value already exists | ||
| 97 | # then we need to up the value of n, unless its a duplicate in which | ||
| 98 | # case we skip the link. We check for duplicates by comparing the | ||
| 99 | # certificate fingerprints | ||
| 100 | |||
| 101 | sub link_hash_cert { | ||
| 102 | my $fname = $_[0]; | ||
| 103 | my ($hash, $fprint) = `$openssl x509 -hash -fingerprint -noout -in $fname`; | ||
| 104 | chomp $hash; | ||
| 105 | chomp $fprint; | ||
| 106 | $fprint =~ s/^.*=//; | ||
| 107 | $fprint =~ tr/://d; | ||
| 108 | my $suffix = 0; | ||
| 109 | # Search for an unused hash filename | ||
| 110 | while(exists $hashlist{"$hash.$suffix"}) { | ||
| 111 | # Hash matches: if fingerprint matches its a duplicate cert | ||
| 112 | if($hashlist{"$hash.$suffix"} eq $fprint) { | ||
| 113 | print STDERR "WARNING: Skipping duplicate certificate $fname\n"; | ||
| 114 | return; | ||
| 115 | } | ||
| 116 | $suffix++; | ||
| 117 | } | ||
| 118 | $hash .= ".$suffix"; | ||
| 119 | print "$fname => $hash\n"; | ||
| 120 | symlink $fname, $hash; | ||
| 121 | $hashlist{$hash} = $fprint; | ||
| 122 | } | ||
| 123 | |||
| 124 | # Same as above except for a CRL. CRL links are of the form <hash>.r<n> | ||
| 125 | |||
| 126 | sub link_hash_crl { | ||
| 127 | my $fname = $_[0]; | ||
| 128 | my ($hash, $fprint) = `$openssl crl -hash -fingerprint -noout -in $fname`; | ||
| 129 | chomp $hash; | ||
| 130 | chomp $fprint; | ||
| 131 | $fprint =~ s/^.*=//; | ||
| 132 | $fprint =~ tr/://d; | ||
| 133 | my $suffix = 0; | ||
| 134 | # Search for an unused hash filename | ||
| 135 | while(exists $hashlist{"$hash.r$suffix"}) { | ||
| 136 | # Hash matches: if fingerprint matches its a duplicate cert | ||
| 137 | if($hashlist{"$hash.r$suffix"} eq $fprint) { | ||
| 138 | print STDERR "WARNING: Skipping duplicate CRL $fname\n"; | ||
| 139 | return; | ||
| 140 | } | ||
| 141 | $suffix++; | ||
| 142 | } | ||
| 143 | $hash .= ".r$suffix"; | ||
| 144 | print "$fname => $hash\n"; | ||
| 145 | symlink $fname, $hash; | ||
| 146 | $hashlist{$hash} = $fprint; | ||
| 147 | } | ||
| 148 | |||
diff --git a/src/lib/libssl/src/util/libeay.num b/src/lib/libssl/src/util/libeay.num index f611d6b283..e8eebbf50c 100644 --- a/src/lib/libssl/src/util/libeay.num +++ b/src/lib/libssl/src/util/libeay.num | |||
| @@ -1,2232 +1,1930 @@ | |||
| 1 | SSLeay 1 | 1 | SSLeay 1 EXIST::FUNCTION: |
| 2 | SSLeay_version 2 | 2 | SSLeay_version 2 EXIST::FUNCTION: |
| 3 | ASN1_BIT_STRING_asn1_meth 3 | 3 | ASN1_BIT_STRING_asn1_meth 3 EXIST::FUNCTION: |
| 4 | ASN1_HEADER_free 4 | 4 | ASN1_HEADER_free 4 EXIST::FUNCTION: |
| 5 | ASN1_HEADER_new 5 | 5 | ASN1_HEADER_new 5 EXIST::FUNCTION: |
| 6 | ASN1_IA5STRING_asn1_meth 6 | 6 | ASN1_IA5STRING_asn1_meth 6 EXIST::FUNCTION: |
| 7 | ASN1_INTEGER_get 7 | 7 | ASN1_INTEGER_get 7 EXIST::FUNCTION: |
| 8 | ASN1_INTEGER_set 8 | 8 | ASN1_INTEGER_set 8 EXIST::FUNCTION: |
| 9 | ASN1_INTEGER_to_BN 9 | 9 | ASN1_INTEGER_to_BN 9 EXIST::FUNCTION: |
| 10 | ASN1_OBJECT_create 10 | 10 | ASN1_OBJECT_create 10 EXIST::FUNCTION: |
| 11 | ASN1_OBJECT_free 11 | 11 | ASN1_OBJECT_free 11 EXIST::FUNCTION: |
| 12 | ASN1_OBJECT_new 12 | 12 | ASN1_OBJECT_new 12 EXIST::FUNCTION: |
| 13 | ASN1_PRINTABLE_type 13 | 13 | ASN1_PRINTABLE_type 13 EXIST::FUNCTION: |
| 14 | ASN1_STRING_cmp 14 | 14 | ASN1_STRING_cmp 14 EXIST::FUNCTION: |
| 15 | ASN1_STRING_dup 15 | 15 | ASN1_STRING_dup 15 EXIST::FUNCTION: |
| 16 | ASN1_STRING_free 16 | 16 | ASN1_STRING_free 16 EXIST::FUNCTION: |
| 17 | ASN1_STRING_new 17 | 17 | ASN1_STRING_new 17 EXIST::FUNCTION: |
| 18 | ASN1_STRING_print 18 | 18 | ASN1_STRING_print 18 EXIST::FUNCTION: |
| 19 | ASN1_STRING_set 19 | 19 | ASN1_STRING_set 19 EXIST::FUNCTION: |
| 20 | ASN1_STRING_type_new 20 | 20 | ASN1_STRING_type_new 20 EXIST::FUNCTION: |
| 21 | ASN1_TYPE_free 21 | 21 | ASN1_TYPE_free 21 EXIST::FUNCTION: |
| 22 | ASN1_TYPE_new 22 | 22 | ASN1_TYPE_new 22 EXIST::FUNCTION: |
| 23 | ASN1_UNIVERSALSTRING_to_string 23 | 23 | ASN1_UNIVERSALSTRING_to_string 23 EXIST::FUNCTION: |
| 24 | ASN1_UTCTIME_check 24 | 24 | ASN1_UTCTIME_check 24 EXIST::FUNCTION: |
| 25 | ASN1_UTCTIME_print 25 | 25 | ASN1_UTCTIME_print 25 EXIST::FUNCTION: |
| 26 | ASN1_UTCTIME_set 26 | 26 | ASN1_UTCTIME_set 26 EXIST::FUNCTION: |
| 27 | ASN1_check_infinite_end 27 | 27 | ASN1_check_infinite_end 27 EXIST::FUNCTION: |
| 28 | ASN1_d2i_bio 28 | 28 | ASN1_d2i_bio 28 EXIST::FUNCTION: |
| 29 | ASN1_d2i_fp 29 | 29 | ASN1_d2i_fp 29 EXIST::FUNCTION:FP_API |
| 30 | ASN1_digest 30 | 30 | ASN1_digest 30 EXIST::FUNCTION: |
| 31 | ASN1_dup 31 | 31 | ASN1_dup 31 EXIST::FUNCTION: |
| 32 | ASN1_get_object 32 | 32 | ASN1_get_object 32 EXIST::FUNCTION: |
| 33 | ASN1_i2d_bio 33 | 33 | ASN1_i2d_bio 33 EXIST::FUNCTION: |
| 34 | ASN1_i2d_fp 34 | 34 | ASN1_i2d_fp 34 EXIST::FUNCTION:FP_API |
| 35 | ASN1_object_size 35 | 35 | ASN1_object_size 35 EXIST::FUNCTION: |
| 36 | ASN1_parse 36 | 36 | ASN1_parse 36 EXIST::FUNCTION: |
| 37 | ASN1_put_object 37 | 37 | ASN1_put_object 37 EXIST::FUNCTION: |
| 38 | ASN1_sign 38 | 38 | ASN1_sign 38 EXIST::FUNCTION: |
| 39 | ASN1_verify 39 | 39 | ASN1_verify 39 EXIST::FUNCTION: |
| 40 | BF_cbc_encrypt 40 | 40 | BF_cbc_encrypt 40 EXIST::FUNCTION:BF |
| 41 | BF_cfb64_encrypt 41 | 41 | BF_cfb64_encrypt 41 EXIST::FUNCTION:BF |
| 42 | BF_ecb_encrypt 42 | 42 | BF_ecb_encrypt 42 EXIST::FUNCTION:BF |
| 43 | BF_encrypt 43 | 43 | BF_encrypt 43 EXIST::FUNCTION:BF |
| 44 | BF_ofb64_encrypt 44 | 44 | BF_ofb64_encrypt 44 EXIST::FUNCTION:BF |
| 45 | BF_options 45 | 45 | BF_options 45 EXIST::FUNCTION:BF |
| 46 | BF_set_key 46 | 46 | BF_set_key 46 EXIST::FUNCTION:BF |
| 47 | BIO_CONNECT_free 47 | 47 | BIO_CONNECT_free 47 NOEXIST::FUNCTION: |
| 48 | BIO_CONNECT_new 48 | 48 | BIO_CONNECT_new 48 NOEXIST::FUNCTION: |
| 49 | BIO_accept 51 | 49 | BIO_accept 51 EXIST::FUNCTION: |
| 50 | BIO_ctrl 52 | 50 | BIO_ctrl 52 EXIST::FUNCTION: |
| 51 | BIO_int_ctrl 53 | 51 | BIO_int_ctrl 53 EXIST::FUNCTION: |
| 52 | BIO_debug_callback 54 | 52 | BIO_debug_callback 54 EXIST::FUNCTION: |
| 53 | BIO_dump 55 | 53 | BIO_dump 55 EXIST::FUNCTION: |
| 54 | BIO_dup_chain 56 | 54 | BIO_dup_chain 56 EXIST::FUNCTION: |
| 55 | BIO_f_base64 57 | 55 | BIO_f_base64 57 EXIST::FUNCTION: |
| 56 | BIO_f_buffer 58 | 56 | BIO_f_buffer 58 EXIST::FUNCTION: |
| 57 | BIO_f_cipher 59 | 57 | BIO_f_cipher 59 EXIST::FUNCTION: |
| 58 | BIO_f_md 60 | 58 | BIO_f_md 60 EXIST::FUNCTION: |
| 59 | BIO_f_null 61 | 59 | BIO_f_null 61 EXIST::FUNCTION: |
| 60 | BIO_f_proxy_server 62 | 60 | BIO_f_proxy_server 62 NOEXIST::FUNCTION: |
| 61 | BIO_fd_non_fatal_error 63 | 61 | BIO_fd_non_fatal_error 63 EXIST::FUNCTION: |
| 62 | BIO_fd_should_retry 64 | 62 | BIO_fd_should_retry 64 EXIST::FUNCTION: |
| 63 | BIO_find_type 65 | 63 | BIO_find_type 65 EXIST::FUNCTION: |
| 64 | BIO_free 66 | 64 | BIO_free 66 EXIST::FUNCTION: |
| 65 | BIO_free_all 67 | 65 | BIO_free_all 67 EXIST::FUNCTION: |
| 66 | BIO_get_accept_socket 69 | 66 | BIO_get_accept_socket 69 EXIST::FUNCTION: |
| 67 | BIO_get_filter_bio 70 | 67 | BIO_get_filter_bio 70 NOEXIST::FUNCTION: |
| 68 | BIO_get_host_ip 71 | 68 | BIO_get_host_ip 71 EXIST::FUNCTION: |
| 69 | BIO_get_port 72 | 69 | BIO_get_port 72 EXIST::FUNCTION: |
| 70 | BIO_get_retry_BIO 73 | 70 | BIO_get_retry_BIO 73 EXIST::FUNCTION: |
| 71 | BIO_get_retry_reason 74 | 71 | BIO_get_retry_reason 74 EXIST::FUNCTION: |
| 72 | BIO_gethostbyname 75 | 72 | BIO_gethostbyname 75 EXIST::FUNCTION: |
| 73 | BIO_gets 76 | 73 | BIO_gets 76 EXIST::FUNCTION: |
| 74 | BIO_new 78 | 74 | BIO_new 78 EXIST::FUNCTION: |
| 75 | BIO_new_accept 79 | 75 | BIO_new_accept 79 EXIST::FUNCTION: |
| 76 | BIO_new_connect 80 | 76 | BIO_new_connect 80 EXIST::FUNCTION: |
| 77 | BIO_new_fd 81 | 77 | BIO_new_fd 81 EXIST::FUNCTION: |
| 78 | BIO_new_file 82 | 78 | BIO_new_file 82 EXIST:!WIN16:FUNCTION:FP_API |
| 79 | BIO_new_fp 83 | 79 | BIO_new_fp 83 EXIST:!WIN16:FUNCTION:FP_API |
| 80 | BIO_new_socket 84 | 80 | BIO_new_socket 84 EXIST::FUNCTION: |
| 81 | BIO_pop 85 | 81 | BIO_pop 85 EXIST::FUNCTION: |
| 82 | BIO_printf 86 | 82 | BIO_printf 86 EXIST::FUNCTION: |
| 83 | BIO_push 87 | 83 | BIO_push 87 EXIST::FUNCTION: |
| 84 | BIO_puts 88 | 84 | BIO_puts 88 EXIST::FUNCTION: |
| 85 | BIO_read 89 | 85 | BIO_read 89 EXIST::FUNCTION: |
| 86 | BIO_s_accept 90 | 86 | BIO_s_accept 90 EXIST::FUNCTION: |
| 87 | BIO_s_connect 91 | 87 | BIO_s_connect 91 EXIST::FUNCTION: |
| 88 | BIO_s_fd 92 | 88 | BIO_s_fd 92 EXIST::FUNCTION: |
| 89 | BIO_s_file 93 | 89 | BIO_s_file 93 EXIST:!WIN16:FUNCTION:FP_API |
| 90 | BIO_s_mem 95 | 90 | BIO_s_mem 95 EXIST::FUNCTION: |
| 91 | BIO_s_null 96 | 91 | BIO_s_null 96 EXIST::FUNCTION: |
| 92 | BIO_s_proxy_client 97 | 92 | BIO_s_proxy_client 97 NOEXIST::FUNCTION: |
| 93 | BIO_s_socket 98 | 93 | BIO_s_socket 98 EXIST::FUNCTION: |
| 94 | BIO_set 100 | 94 | BIO_set 100 EXIST::FUNCTION: |
| 95 | BIO_set_cipher 101 | 95 | BIO_set_cipher 101 EXIST::FUNCTION: |
| 96 | BIO_set_tcp_ndelay 102 | 96 | BIO_set_tcp_ndelay 102 EXIST::FUNCTION: |
| 97 | BIO_sock_cleanup 103 | 97 | BIO_sock_cleanup 103 EXIST::FUNCTION: |
| 98 | BIO_sock_error 104 | 98 | BIO_sock_error 104 EXIST::FUNCTION: |
| 99 | BIO_sock_init 105 | 99 | BIO_sock_init 105 EXIST::FUNCTION: |
| 100 | BIO_sock_non_fatal_error 106 | 100 | BIO_sock_non_fatal_error 106 EXIST::FUNCTION: |
| 101 | BIO_sock_should_retry 107 | 101 | BIO_sock_should_retry 107 EXIST::FUNCTION: |
| 102 | BIO_socket_ioctl 108 | 102 | BIO_socket_ioctl 108 EXIST::FUNCTION: |
| 103 | BIO_write 109 | 103 | BIO_write 109 EXIST::FUNCTION: |
| 104 | BN_CTX_free 110 | 104 | BN_CTX_free 110 EXIST::FUNCTION: |
| 105 | BN_CTX_new 111 | 105 | BN_CTX_new 111 EXIST::FUNCTION: |
| 106 | BN_MONT_CTX_free 112 | 106 | BN_MONT_CTX_free 112 EXIST::FUNCTION: |
| 107 | BN_MONT_CTX_new 113 | 107 | BN_MONT_CTX_new 113 EXIST::FUNCTION: |
| 108 | BN_MONT_CTX_set 114 | 108 | BN_MONT_CTX_set 114 EXIST::FUNCTION: |
| 109 | BN_add 115 | 109 | BN_add 115 EXIST::FUNCTION: |
| 110 | BN_add_word 116 | 110 | BN_add_word 116 EXIST::FUNCTION: |
| 111 | BN_hex2bn 117 | 111 | BN_hex2bn 117 EXIST::FUNCTION: |
| 112 | BN_bin2bn 118 | 112 | BN_bin2bn 118 EXIST::FUNCTION: |
| 113 | BN_bn2hex 119 | 113 | BN_bn2hex 119 EXIST::FUNCTION: |
| 114 | BN_bn2bin 120 | 114 | BN_bn2bin 120 EXIST::FUNCTION: |
| 115 | BN_clear 121 | 115 | BN_clear 121 EXIST::FUNCTION: |
| 116 | BN_clear_bit 122 | 116 | BN_clear_bit 122 EXIST::FUNCTION: |
| 117 | BN_clear_free 123 | 117 | BN_clear_free 123 EXIST::FUNCTION: |
| 118 | BN_cmp 124 | 118 | BN_cmp 124 EXIST::FUNCTION: |
| 119 | BN_copy 125 | 119 | BN_copy 125 EXIST::FUNCTION: |
| 120 | BN_div 126 | 120 | BN_div 126 EXIST::FUNCTION: |
| 121 | BN_div_word 127 | 121 | BN_div_word 127 EXIST::FUNCTION: |
| 122 | BN_dup 128 | 122 | BN_dup 128 EXIST::FUNCTION: |
| 123 | BN_free 129 | 123 | BN_free 129 EXIST::FUNCTION: |
| 124 | BN_from_montgomery 130 | 124 | BN_from_montgomery 130 EXIST::FUNCTION: |
| 125 | BN_gcd 131 | 125 | BN_gcd 131 EXIST::FUNCTION: |
| 126 | BN_generate_prime 132 | 126 | BN_generate_prime 132 EXIST::FUNCTION: |
| 127 | BN_get_word 133 | 127 | BN_get_word 133 EXIST::FUNCTION: |
| 128 | BN_is_bit_set 134 | 128 | BN_is_bit_set 134 EXIST::FUNCTION: |
| 129 | BN_is_prime 135 | 129 | BN_is_prime 135 EXIST::FUNCTION: |
| 130 | BN_lshift 136 | 130 | BN_lshift 136 EXIST::FUNCTION: |
| 131 | BN_lshift1 137 | 131 | BN_lshift1 137 EXIST::FUNCTION: |
| 132 | BN_mask_bits 138 | 132 | BN_mask_bits 138 EXIST::FUNCTION: |
| 133 | BN_mod 139 | 133 | BN_mod 139 EXIST::FUNCTION: |
| 134 | BN_mod_exp 140 | 134 | BN_mod_exp 140 EXIST::FUNCTION: |
| 135 | BN_mod_exp_mont 141 | 135 | BN_mod_exp_mont 141 EXIST::FUNCTION: |
| 136 | BN_mod_exp_recp 142 | 136 | BN_mod_exp_simple 143 EXIST::FUNCTION: |
| 137 | BN_mod_exp_simple 143 | 137 | BN_mod_inverse 144 EXIST::FUNCTION: |
| 138 | BN_mod_inverse 144 | 138 | BN_mod_mul 145 EXIST::FUNCTION: |
| 139 | BN_mod_mul 145 | 139 | BN_mod_mul_montgomery 146 EXIST::FUNCTION: |
| 140 | BN_mod_mul_montgomery 146 | 140 | BN_mod_word 148 EXIST::FUNCTION: |
| 141 | BN_mod_mul_reciprocal 147 | 141 | BN_mul 149 EXIST::FUNCTION: |
| 142 | BN_mod_word 148 | 142 | BN_new 150 EXIST::FUNCTION: |
| 143 | BN_mul 149 | 143 | BN_num_bits 151 EXIST::FUNCTION: |
| 144 | BN_new 150 | 144 | BN_num_bits_word 152 EXIST::FUNCTION: |
| 145 | BN_num_bits 151 | 145 | BN_options 153 EXIST::FUNCTION: |
| 146 | BN_num_bits_word 152 | 146 | BN_print 154 EXIST::FUNCTION: |
| 147 | BN_options 153 | 147 | BN_print_fp 155 EXIST::FUNCTION:FP_API |
| 148 | BN_print 154 | 148 | BN_rand 156 EXIST::FUNCTION: |
| 149 | BN_print_fp 155 | 149 | BN_reciprocal 157 EXIST::FUNCTION: |
| 150 | BN_rand 156 | 150 | BN_rshift 158 EXIST::FUNCTION: |
| 151 | BN_reciprocal 157 | 151 | BN_rshift1 159 EXIST::FUNCTION: |
| 152 | BN_rshift 158 | 152 | BN_set_bit 160 EXIST::FUNCTION: |
| 153 | BN_rshift1 159 | 153 | BN_set_word 161 EXIST::FUNCTION: |
| 154 | BN_set_bit 160 | 154 | BN_sqr 162 EXIST::FUNCTION: |
| 155 | BN_set_word 161 | 155 | BN_sub 163 EXIST::FUNCTION: |
| 156 | BN_sqr 162 | 156 | BN_to_ASN1_INTEGER 164 EXIST::FUNCTION: |
| 157 | BN_sub 163 | 157 | BN_ucmp 165 EXIST::FUNCTION: |
| 158 | BN_to_ASN1_INTEGER 164 | 158 | BN_value_one 166 EXIST::FUNCTION: |
| 159 | BN_ucmp 165 | 159 | BUF_MEM_free 167 EXIST::FUNCTION: |
| 160 | BN_value_one 166 | 160 | BUF_MEM_grow 168 EXIST::FUNCTION: |
| 161 | BUF_MEM_free 167 | 161 | BUF_MEM_new 169 EXIST::FUNCTION: |
| 162 | BUF_MEM_grow 168 | 162 | BUF_strdup 170 EXIST::FUNCTION: |
| 163 | BUF_MEM_new 169 | 163 | CONF_free 171 EXIST::FUNCTION: |
| 164 | BUF_strdup 170 | 164 | CONF_get_number 172 EXIST::FUNCTION: |
| 165 | CONF_free 171 | 165 | CONF_get_section 173 EXIST::FUNCTION: |
| 166 | CONF_get_number 172 | 166 | CONF_get_string 174 EXIST::FUNCTION: |
| 167 | CONF_get_section 173 | 167 | CONF_load 175 EXIST::FUNCTION: |
| 168 | CONF_get_string 174 | 168 | CRYPTO_add_lock 176 EXIST::FUNCTION: |
| 169 | CONF_load 175 | 169 | CRYPTO_dbg_free 177 EXIST::FUNCTION: |
| 170 | CRYPTO_add_lock 176 | 170 | CRYPTO_dbg_malloc 178 EXIST::FUNCTION: |
| 171 | CRYPTO_dbg_free 177 | 171 | CRYPTO_dbg_realloc 179 EXIST::FUNCTION: |
| 172 | CRYPTO_dbg_malloc 178 | 172 | CRYPTO_dbg_remalloc 180 NOEXIST::FUNCTION: |
| 173 | CRYPTO_dbg_realloc 179 | 173 | CRYPTO_free 181 EXIST::FUNCTION: |
| 174 | CRYPTO_dbg_remalloc 180 | 174 | CRYPTO_get_add_lock_callback 182 EXIST::FUNCTION: |
| 175 | CRYPTO_free 181 | 175 | CRYPTO_get_id_callback 183 EXIST::FUNCTION: |
| 176 | CRYPTO_get_add_lock_callback 182 | 176 | CRYPTO_get_lock_name 184 EXIST::FUNCTION: |
| 177 | CRYPTO_get_id_callback 183 | 177 | CRYPTO_get_locking_callback 185 EXIST::FUNCTION: |
| 178 | CRYPTO_get_lock_name 184 | 178 | CRYPTO_get_mem_functions 186 EXIST::FUNCTION: |
| 179 | CRYPTO_get_locking_callback 185 | 179 | CRYPTO_lock 187 EXIST::FUNCTION: |
| 180 | CRYPTO_get_mem_functions 186 | 180 | CRYPTO_malloc 188 EXIST::FUNCTION: |
| 181 | CRYPTO_lock 187 | 181 | CRYPTO_mem_ctrl 189 EXIST::FUNCTION: |
| 182 | CRYPTO_malloc 188 | 182 | CRYPTO_mem_leaks 190 EXIST::FUNCTION: |
| 183 | CRYPTO_mem_ctrl 189 | 183 | CRYPTO_mem_leaks_cb 191 EXIST::FUNCTION: |
| 184 | CRYPTO_mem_leaks 190 | 184 | CRYPTO_mem_leaks_fp 192 EXIST::FUNCTION:FP_API |
| 185 | CRYPTO_mem_leaks_cb 191 | 185 | CRYPTO_realloc 193 EXIST::FUNCTION: |
| 186 | CRYPTO_mem_leaks_fp 192 | 186 | CRYPTO_remalloc 194 EXIST::FUNCTION: |
| 187 | CRYPTO_realloc 193 | 187 | CRYPTO_set_add_lock_callback 195 EXIST::FUNCTION: |
| 188 | CRYPTO_remalloc 194 | 188 | CRYPTO_set_id_callback 196 EXIST::FUNCTION: |
| 189 | CRYPTO_set_add_lock_callback 195 | 189 | CRYPTO_set_locking_callback 197 EXIST::FUNCTION: |
| 190 | CRYPTO_set_id_callback 196 | 190 | CRYPTO_set_mem_functions 198 EXIST::FUNCTION: |
| 191 | CRYPTO_set_locking_callback 197 | 191 | CRYPTO_thread_id 199 EXIST::FUNCTION: |
| 192 | CRYPTO_set_mem_functions 198 | 192 | DH_check 200 EXIST::FUNCTION:DH |
| 193 | CRYPTO_thread_id 199 | 193 | DH_compute_key 201 EXIST::FUNCTION:DH |
| 194 | DH_check 200 | 194 | DH_free 202 EXIST::FUNCTION:DH |
| 195 | DH_compute_key 201 | 195 | DH_generate_key 203 EXIST::FUNCTION:DH |
| 196 | DH_free 202 | 196 | DH_generate_parameters 204 EXIST::FUNCTION:DH |
| 197 | DH_generate_key 203 | 197 | DH_new 205 EXIST::FUNCTION:DH |
| 198 | DH_generate_parameters 204 | 198 | DH_size 206 EXIST::FUNCTION:DH |
| 199 | DH_new 205 | 199 | DHparams_print 207 EXIST::FUNCTION:DH |
| 200 | DH_size 206 | 200 | DHparams_print_fp 208 EXIST::FUNCTION:DH,FP_API |
| 201 | DHparams_print 207 | 201 | DSA_free 209 EXIST::FUNCTION:DSA |
| 202 | DHparams_print_fp 208 | 202 | DSA_generate_key 210 EXIST::FUNCTION:DSA |
| 203 | DSA_free 209 | 203 | DSA_generate_parameters 211 EXIST::FUNCTION:DSA |
| 204 | DSA_generate_key 210 | 204 | DSA_is_prime 212 NOEXIST::FUNCTION: |
| 205 | DSA_generate_parameters 211 | 205 | DSA_new 213 EXIST::FUNCTION:DSA |
| 206 | DSA_is_prime 212 | 206 | DSA_print 214 EXIST::FUNCTION:DSA |
| 207 | DSA_new 213 | 207 | DSA_print_fp 215 EXIST::FUNCTION:DSA,FP_API |
| 208 | DSA_print 214 | 208 | DSA_sign 216 EXIST::FUNCTION:DSA |
| 209 | DSA_print_fp 215 | 209 | DSA_sign_setup 217 EXIST::FUNCTION:DSA |
| 210 | DSA_sign 216 | 210 | DSA_size 218 EXIST::FUNCTION:DSA |
| 211 | DSA_sign_setup 217 | 211 | DSA_verify 219 EXIST::FUNCTION:DSA |
| 212 | DSA_size 218 | 212 | DSAparams_print 220 EXIST::FUNCTION:DSA |
| 213 | DSA_verify 219 | 213 | DSAparams_print_fp 221 EXIST::FUNCTION:DSA,FP_API |
| 214 | DSAparams_print 220 | 214 | ERR_clear_error 222 EXIST::FUNCTION: |
| 215 | DSAparams_print_fp 221 | 215 | ERR_error_string 223 EXIST::FUNCTION: |
| 216 | ERR_clear_error 222 | 216 | ERR_free_strings 224 EXIST::FUNCTION: |
| 217 | ERR_error_string 223 | 217 | ERR_func_error_string 225 EXIST::FUNCTION: |
| 218 | ERR_free_strings 224 | 218 | ERR_get_err_state_table 226 EXIST::FUNCTION: |
| 219 | ERR_func_error_string 225 | 219 | ERR_get_error 227 EXIST::FUNCTION: |
| 220 | ERR_get_err_state_table 226 | 220 | ERR_get_error_line 228 EXIST::FUNCTION: |
| 221 | ERR_get_error 227 | 221 | ERR_get_state 229 EXIST::FUNCTION: |
| 222 | ERR_get_error_line 228 | 222 | ERR_get_string_table 230 EXIST::FUNCTION: |
| 223 | ERR_get_state 229 | 223 | ERR_lib_error_string 231 EXIST::FUNCTION: |
| 224 | ERR_get_string_table 230 | 224 | ERR_load_ASN1_strings 232 EXIST::FUNCTION: |
| 225 | ERR_lib_error_string 231 | 225 | ERR_load_BIO_strings 233 EXIST::FUNCTION: |
| 226 | ERR_load_ASN1_strings 232 | 226 | ERR_load_BN_strings 234 EXIST::FUNCTION: |
| 227 | ERR_load_BIO_strings 233 | 227 | ERR_load_BUF_strings 235 EXIST::FUNCTION: |
| 228 | ERR_load_BN_strings 234 | 228 | ERR_load_CONF_strings 236 EXIST::FUNCTION: |
| 229 | ERR_load_BUF_strings 235 | 229 | ERR_load_DH_strings 237 EXIST::FUNCTION:DH |
| 230 | ERR_load_CONF_strings 236 | 230 | ERR_load_DSA_strings 238 EXIST::FUNCTION:DSA |
| 231 | ERR_load_DH_strings 237 | 231 | ERR_load_ERR_strings 239 EXIST::FUNCTION: |
| 232 | ERR_load_DSA_strings 238 | 232 | ERR_load_EVP_strings 240 EXIST::FUNCTION: |
| 233 | ERR_load_ERR_strings 239 | 233 | ERR_load_OBJ_strings 241 EXIST::FUNCTION: |
| 234 | ERR_load_EVP_strings 240 | 234 | ERR_load_PEM_strings 242 EXIST::FUNCTION: |
| 235 | ERR_load_OBJ_strings 241 | 235 | ERR_load_PROXY_strings 243 NOEXIST::FUNCTION: |
| 236 | ERR_load_PEM_strings 242 | 236 | ERR_load_RSA_strings 244 EXIST::FUNCTION:RSA |
| 237 | ERR_load_PROXY_strings 243 | 237 | ERR_load_X509_strings 245 EXIST::FUNCTION: |
| 238 | ERR_load_RSA_strings 244 | 238 | ERR_load_crypto_strings 246 EXIST::FUNCTION: |
| 239 | ERR_load_X509_strings 245 | 239 | ERR_load_strings 247 EXIST::FUNCTION: |
| 240 | ERR_load_crypto_strings 246 | 240 | ERR_peek_error 248 EXIST::FUNCTION: |
| 241 | ERR_load_strings 247 | 241 | ERR_peek_error_line 249 EXIST::FUNCTION: |
| 242 | ERR_peek_error 248 | 242 | ERR_print_errors 250 EXIST::FUNCTION: |
| 243 | ERR_peek_error_line 249 | 243 | ERR_print_errors_fp 251 EXIST::FUNCTION:FP_API |
| 244 | ERR_print_errors 250 | 244 | ERR_put_error 252 EXIST::FUNCTION: |
| 245 | ERR_print_errors_fp 251 | 245 | ERR_reason_error_string 253 EXIST::FUNCTION: |
| 246 | ERR_put_error 252 | 246 | ERR_remove_state 254 EXIST::FUNCTION: |
| 247 | ERR_reason_error_string 253 | 247 | EVP_BytesToKey 255 EXIST::FUNCTION: |
| 248 | ERR_remove_state 254 | 248 | EVP_CIPHER_CTX_cleanup 256 EXIST::FUNCTION: |
| 249 | EVP_BytesToKey 255 | 249 | EVP_CipherFinal 257 EXIST::FUNCTION: |
| 250 | EVP_CIPHER_CTX_cleanup 256 | 250 | EVP_CipherInit 258 EXIST::FUNCTION: |
| 251 | EVP_CipherFinal 257 | 251 | EVP_CipherUpdate 259 EXIST::FUNCTION: |
| 252 | EVP_CipherInit 258 | 252 | EVP_DecodeBlock 260 EXIST::FUNCTION: |
| 253 | EVP_CipherUpdate 259 | 253 | EVP_DecodeFinal 261 EXIST::FUNCTION: |
| 254 | EVP_DecodeBlock 260 | 254 | EVP_DecodeInit 262 EXIST::FUNCTION: |
| 255 | EVP_DecodeFinal 261 | 255 | EVP_DecodeUpdate 263 EXIST::FUNCTION: |
| 256 | EVP_DecodeInit 262 | 256 | EVP_DecryptFinal 264 EXIST::FUNCTION: |
| 257 | EVP_DecodeUpdate 263 | 257 | EVP_DecryptInit 265 EXIST::FUNCTION: |
| 258 | EVP_DecryptFinal 264 | 258 | EVP_DecryptUpdate 266 EXIST::FUNCTION: |
| 259 | EVP_DecryptInit 265 | 259 | EVP_DigestFinal 267 EXIST::FUNCTION: |
| 260 | EVP_DecryptUpdate 266 | 260 | EVP_DigestInit 268 EXIST::FUNCTION: |
| 261 | EVP_DigestFinal 267 | 261 | EVP_DigestUpdate 269 EXIST::FUNCTION: |
| 262 | EVP_DigestInit 268 | 262 | EVP_EncodeBlock 270 EXIST::FUNCTION: |
| 263 | EVP_DigestUpdate 269 | 263 | EVP_EncodeFinal 271 EXIST::FUNCTION: |
| 264 | EVP_EncodeBlock 270 | 264 | EVP_EncodeInit 272 EXIST::FUNCTION: |
| 265 | EVP_EncodeFinal 271 | 265 | EVP_EncodeUpdate 273 EXIST::FUNCTION: |
| 266 | EVP_EncodeInit 272 | 266 | EVP_EncryptFinal 274 EXIST::FUNCTION: |
| 267 | EVP_EncodeUpdate 273 | 267 | EVP_EncryptInit 275 EXIST::FUNCTION: |
| 268 | EVP_EncryptFinal 274 | 268 | EVP_EncryptUpdate 276 EXIST::FUNCTION: |
| 269 | EVP_EncryptInit 275 | 269 | EVP_OpenFinal 277 EXIST::FUNCTION:RSA |
| 270 | EVP_EncryptUpdate 276 | 270 | EVP_OpenInit 278 EXIST::FUNCTION:RSA |
| 271 | EVP_OpenFinal 277 | 271 | EVP_PKEY_assign 279 EXIST::FUNCTION: |
| 272 | EVP_OpenInit 278 | 272 | EVP_PKEY_copy_parameters 280 EXIST::FUNCTION: |
| 273 | EVP_PKEY_assign 279 | 273 | EVP_PKEY_free 281 EXIST::FUNCTION: |
| 274 | EVP_PKEY_copy_parameters 280 | 274 | EVP_PKEY_missing_parameters 282 EXIST::FUNCTION: |
| 275 | EVP_PKEY_free 281 | 275 | EVP_PKEY_new 283 EXIST::FUNCTION: |
| 276 | EVP_PKEY_missing_parameters 282 | 276 | EVP_PKEY_save_parameters 284 EXIST::FUNCTION: |
| 277 | EVP_PKEY_new 283 | 277 | EVP_PKEY_size 285 EXIST::FUNCTION: |
| 278 | EVP_PKEY_save_parameters 284 | 278 | EVP_PKEY_type 286 EXIST::FUNCTION: |
| 279 | EVP_PKEY_size 285 | 279 | EVP_SealFinal 287 EXIST::FUNCTION:RSA |
| 280 | EVP_PKEY_type 286 | 280 | EVP_SealInit 288 EXIST::FUNCTION:RSA |
| 281 | EVP_SealFinal 287 | 281 | EVP_SignFinal 289 EXIST::FUNCTION: |
| 282 | EVP_SealInit 288 | 282 | EVP_VerifyFinal 290 EXIST::FUNCTION: |
| 283 | EVP_SignFinal 289 | 283 | EVP_add_alias 291 NOEXIST::FUNCTION: |
| 284 | EVP_VerifyFinal 290 | 284 | EVP_add_cipher 292 EXIST::FUNCTION: |
| 285 | EVP_add_alias 291 | 285 | EVP_add_digest 293 EXIST::FUNCTION: |
| 286 | EVP_add_cipher 292 | 286 | EVP_bf_cbc 294 EXIST::FUNCTION:BF |
| 287 | EVP_add_digest 293 | 287 | EVP_bf_cfb 295 EXIST::FUNCTION:BF |
| 288 | EVP_bf_cbc 294 | 288 | EVP_bf_ecb 296 EXIST::FUNCTION:BF |
| 289 | EVP_bf_cfb 295 | 289 | EVP_bf_ofb 297 EXIST::FUNCTION:BF |
| 290 | EVP_bf_ecb 296 | 290 | EVP_cleanup 298 EXIST::FUNCTION: |
| 291 | EVP_bf_ofb 297 | 291 | EVP_des_cbc 299 EXIST::FUNCTION:DES |
| 292 | EVP_cleanup 298 | 292 | EVP_des_cfb 300 EXIST::FUNCTION:DES |
| 293 | EVP_des_cbc 299 | 293 | EVP_des_ecb 301 EXIST::FUNCTION:DES |
| 294 | EVP_des_cfb 300 | 294 | EVP_des_ede 302 EXIST::FUNCTION:DES |
| 295 | EVP_des_ecb 301 | 295 | EVP_des_ede3 303 EXIST::FUNCTION:DES |
| 296 | EVP_des_ede 302 | 296 | EVP_des_ede3_cbc 304 EXIST::FUNCTION:DES |
| 297 | EVP_des_ede3 303 | 297 | EVP_des_ede3_cfb 305 EXIST::FUNCTION:DES |
| 298 | EVP_des_ede3_cbc 304 | 298 | EVP_des_ede3_ofb 306 EXIST::FUNCTION:DES |
| 299 | EVP_des_ede3_cfb 305 | 299 | EVP_des_ede_cbc 307 EXIST::FUNCTION:DES |
| 300 | EVP_des_ede3_ofb 306 | 300 | EVP_des_ede_cfb 308 EXIST::FUNCTION:DES |
| 301 | EVP_des_ede_cbc 307 | 301 | EVP_des_ede_ofb 309 EXIST::FUNCTION:DES |
| 302 | EVP_des_ede_cfb 308 | 302 | EVP_des_ofb 310 EXIST::FUNCTION:DES |
| 303 | EVP_des_ede_ofb 309 | 303 | EVP_desx_cbc 311 EXIST::FUNCTION:DES |
| 304 | EVP_des_ofb 310 | 304 | EVP_dss 312 EXIST::FUNCTION:DSA |
| 305 | EVP_desx_cbc 311 | 305 | EVP_dss1 313 EXIST::FUNCTION:DSA |
| 306 | EVP_dss 312 | 306 | EVP_enc_null 314 EXIST::FUNCTION: |
| 307 | EVP_dss1 313 | 307 | EVP_get_cipherbyname 315 EXIST::FUNCTION: |
| 308 | EVP_enc_null 314 | 308 | EVP_get_digestbyname 316 EXIST::FUNCTION: |
| 309 | EVP_get_cipherbyname 315 | 309 | EVP_get_pw_prompt 317 EXIST::FUNCTION: |
| 310 | EVP_get_digestbyname 316 | 310 | EVP_idea_cbc 318 EXIST::FUNCTION:IDEA |
| 311 | EVP_get_pw_prompt 317 | 311 | EVP_idea_cfb 319 EXIST::FUNCTION:IDEA |
| 312 | EVP_idea_cbc 318 | 312 | EVP_idea_ecb 320 EXIST::FUNCTION:IDEA |
| 313 | EVP_idea_cfb 319 | 313 | EVP_idea_ofb 321 EXIST::FUNCTION:IDEA |
| 314 | EVP_idea_ecb 320 | 314 | EVP_md2 322 EXIST::FUNCTION:MD2 |
| 315 | EVP_idea_ofb 321 | 315 | EVP_md5 323 EXIST::FUNCTION:MD5 |
| 316 | EVP_md2 322 | 316 | EVP_md_null 324 EXIST::FUNCTION: |
| 317 | EVP_md5 323 | 317 | EVP_rc2_cbc 325 EXIST::FUNCTION:RC2 |
| 318 | EVP_md_null 324 | 318 | EVP_rc2_cfb 326 EXIST::FUNCTION:RC2 |
| 319 | EVP_rc2_cbc 325 | 319 | EVP_rc2_ecb 327 EXIST::FUNCTION:RC2 |
| 320 | EVP_rc2_cfb 326 | 320 | EVP_rc2_ofb 328 EXIST::FUNCTION:RC2 |
| 321 | EVP_rc2_ecb 327 | 321 | EVP_rc4 329 EXIST::FUNCTION:RC4 |
| 322 | EVP_rc2_ofb 328 | 322 | EVP_read_pw_string 330 EXIST::FUNCTION: |
| 323 | EVP_rc4 329 | 323 | EVP_set_pw_prompt 331 EXIST::FUNCTION: |
| 324 | EVP_read_pw_string 330 | 324 | EVP_sha 332 EXIST::FUNCTION:SHA |
| 325 | EVP_set_pw_prompt 331 | 325 | EVP_sha1 333 EXIST::FUNCTION:SHA |
| 326 | EVP_sha 332 | 326 | MD2 334 EXIST::FUNCTION:MD2 |
| 327 | EVP_sha1 333 | 327 | MD2_Final 335 EXIST::FUNCTION:MD2 |
| 328 | MD2 334 | 328 | MD2_Init 336 EXIST::FUNCTION:MD2 |
| 329 | MD2_Final 335 | 329 | MD2_Update 337 EXIST::FUNCTION:MD2 |
| 330 | MD2_Init 336 | 330 | MD2_options 338 EXIST::FUNCTION:MD2 |
| 331 | MD2_Update 337 | 331 | MD5 339 EXIST::FUNCTION:MD5 |
| 332 | MD2_options 338 | 332 | MD5_Final 340 EXIST::FUNCTION:MD5 |
| 333 | MD5 339 | 333 | MD5_Init 341 EXIST::FUNCTION:MD5 |
| 334 | MD5_Final 340 | 334 | MD5_Update 342 EXIST::FUNCTION:MD5 |
| 335 | MD5_Init 341 | 335 | MDC2 343 EXIST::FUNCTION:MDC2 |
| 336 | MD5_Update 342 | 336 | MDC2_Final 344 EXIST::FUNCTION:MDC2 |
| 337 | MDC2 343 | 337 | MDC2_Init 345 EXIST::FUNCTION:MDC2 |
| 338 | MDC2_Final 344 | 338 | MDC2_Update 346 EXIST::FUNCTION:MDC2 |
| 339 | MDC2_Init 345 | 339 | NETSCAPE_SPKAC_free 347 EXIST::FUNCTION: |
| 340 | MDC2_Update 346 | 340 | NETSCAPE_SPKAC_new 348 EXIST::FUNCTION: |
| 341 | NETSCAPE_SPKAC_free 347 | 341 | NETSCAPE_SPKI_free 349 EXIST::FUNCTION: |
| 342 | NETSCAPE_SPKAC_new 348 | 342 | NETSCAPE_SPKI_new 350 EXIST::FUNCTION: |
| 343 | NETSCAPE_SPKI_free 349 | 343 | NETSCAPE_SPKI_sign 351 EXIST::FUNCTION: |
| 344 | NETSCAPE_SPKI_new 350 | 344 | NETSCAPE_SPKI_verify 352 EXIST::FUNCTION: |
| 345 | NETSCAPE_SPKI_sign 351 | 345 | OBJ_add_object 353 EXIST::FUNCTION: |
| 346 | NETSCAPE_SPKI_verify 352 | 346 | OBJ_bsearch 354 EXIST::FUNCTION: |
| 347 | OBJ_add_object 353 | 347 | OBJ_cleanup 355 EXIST::FUNCTION: |
| 348 | OBJ_bsearch 354 | 348 | OBJ_cmp 356 EXIST::FUNCTION: |
| 349 | OBJ_cleanup 355 | 349 | OBJ_create 357 EXIST::FUNCTION: |
| 350 | OBJ_cmp 356 | 350 | OBJ_dup 358 EXIST::FUNCTION: |
| 351 | OBJ_create 357 | 351 | OBJ_ln2nid 359 EXIST::FUNCTION: |
| 352 | OBJ_dup 358 | 352 | OBJ_new_nid 360 EXIST::FUNCTION: |
| 353 | OBJ_ln2nid 359 | 353 | OBJ_nid2ln 361 EXIST::FUNCTION: |
| 354 | OBJ_new_nid 360 | 354 | OBJ_nid2obj 362 EXIST::FUNCTION: |
| 355 | OBJ_nid2ln 361 | 355 | OBJ_nid2sn 363 EXIST::FUNCTION: |
| 356 | OBJ_nid2obj 362 | 356 | OBJ_obj2nid 364 EXIST::FUNCTION: |
| 357 | OBJ_nid2sn 363 | 357 | OBJ_sn2nid 365 EXIST::FUNCTION: |
| 358 | OBJ_obj2nid 364 | 358 | OBJ_txt2nid 366 EXIST::FUNCTION: |
| 359 | OBJ_sn2nid 365 | 359 | PEM_ASN1_read 367 EXIST:!WIN16:FUNCTION: |
| 360 | OBJ_txt2nid 366 | 360 | PEM_ASN1_read_bio 368 EXIST::FUNCTION: |
| 361 | PEM_ASN1_read 367 | 361 | PEM_ASN1_write 369 EXIST:!WIN16:FUNCTION: |
| 362 | PEM_ASN1_read_bio 368 | 362 | PEM_ASN1_write_bio 370 EXIST::FUNCTION: |
| 363 | PEM_ASN1_write 369 | 363 | PEM_SealFinal 371 EXIST::FUNCTION:RSA |
| 364 | PEM_ASN1_write_bio 370 | 364 | PEM_SealInit 372 EXIST::FUNCTION:RSA |
| 365 | PEM_SealFinal 371 | 365 | PEM_SealUpdate 373 EXIST::FUNCTION:RSA |
| 366 | PEM_SealInit 372 | 366 | PEM_SignFinal 374 EXIST::FUNCTION: |
| 367 | PEM_SealUpdate 373 | 367 | PEM_SignInit 375 EXIST::FUNCTION: |
| 368 | PEM_SignFinal 374 | 368 | PEM_SignUpdate 376 EXIST::FUNCTION: |
| 369 | PEM_SignInit 375 | 369 | PEM_X509_INFO_read 377 EXIST:!WIN16:FUNCTION: |
| 370 | PEM_SignUpdate 376 | 370 | PEM_X509_INFO_read_bio 378 EXIST::FUNCTION: |
| 371 | PEM_X509_INFO_read 377 | 371 | PEM_X509_INFO_write_bio 379 EXIST::FUNCTION: |
| 372 | PEM_X509_INFO_read_bio 378 | 372 | PEM_dek_info 380 EXIST::FUNCTION: |
| 373 | PEM_X509_INFO_write_bio 379 | 373 | PEM_do_header 381 EXIST::FUNCTION: |
| 374 | PEM_dek_info 380 | 374 | PEM_get_EVP_CIPHER_INFO 382 EXIST::FUNCTION: |
| 375 | PEM_do_header 381 | 375 | PEM_proc_type 383 EXIST::FUNCTION: |
| 376 | PEM_get_EVP_CIPHER_INFO 382 | 376 | PEM_read 384 EXIST:!WIN16:FUNCTION: |
| 377 | PEM_proc_type 383 | 377 | PEM_read_DHparams 385 EXIST:!WIN16:FUNCTION:DH |
| 378 | PEM_read 384 | 378 | PEM_read_DSAPrivateKey 386 EXIST:!WIN16:FUNCTION:DSA |
| 379 | PEM_read_DHparams 385 | 379 | PEM_read_DSAparams 387 EXIST:!WIN16:FUNCTION:DSA |
| 380 | PEM_read_DSAPrivateKey 386 | 380 | PEM_read_PKCS7 388 EXIST:!WIN16:FUNCTION: |
| 381 | PEM_read_DSAparams 387 | 381 | PEM_read_PrivateKey 389 EXIST:!WIN16:FUNCTION: |
| 382 | PEM_read_PKCS7 388 | 382 | PEM_read_RSAPrivateKey 390 EXIST:!WIN16:FUNCTION:RSA |
| 383 | PEM_read_PrivateKey 389 | 383 | PEM_read_X509 391 EXIST:!WIN16:FUNCTION: |
| 384 | PEM_read_RSAPrivateKey 390 | 384 | PEM_read_X509_CRL 392 EXIST:!WIN16:FUNCTION: |
| 385 | PEM_read_X509 391 | 385 | PEM_read_X509_REQ 393 EXIST:!WIN16:FUNCTION: |
| 386 | PEM_read_X509_CRL 392 | 386 | PEM_read_bio 394 EXIST::FUNCTION: |
| 387 | PEM_read_X509_REQ 393 | 387 | PEM_read_bio_DHparams 395 EXIST::FUNCTION:DH |
| 388 | PEM_read_bio 394 | 388 | PEM_read_bio_DSAPrivateKey 396 EXIST::FUNCTION:DSA |
| 389 | PEM_read_bio_DHparams 395 | 389 | PEM_read_bio_DSAparams 397 EXIST::FUNCTION:DSA |
| 390 | PEM_read_bio_DSAPrivateKey 396 | 390 | PEM_read_bio_PKCS7 398 EXIST::FUNCTION: |
| 391 | PEM_read_bio_DSAparams 397 | 391 | PEM_read_bio_PrivateKey 399 EXIST::FUNCTION: |
| 392 | PEM_read_bio_PKCS7 398 | 392 | PEM_read_bio_RSAPrivateKey 400 EXIST::FUNCTION:RSA |
| 393 | PEM_read_bio_PrivateKey 399 | 393 | PEM_read_bio_X509 401 EXIST::FUNCTION: |
| 394 | PEM_read_bio_RSAPrivateKey 400 | 394 | PEM_read_bio_X509_CRL 402 EXIST::FUNCTION: |
| 395 | PEM_read_bio_X509 401 | 395 | PEM_read_bio_X509_REQ 403 EXIST::FUNCTION: |
| 396 | PEM_read_bio_X509_CRL 402 | 396 | PEM_write 404 EXIST:!WIN16:FUNCTION: |
| 397 | PEM_read_bio_X509_REQ 403 | 397 | PEM_write_DHparams 405 EXIST:!WIN16:FUNCTION:DH |
| 398 | PEM_write 404 | 398 | PEM_write_DSAPrivateKey 406 EXIST:!WIN16:FUNCTION:DSA |
| 399 | PEM_write_DHparams 405 | 399 | PEM_write_DSAparams 407 EXIST:!WIN16:FUNCTION:DSA |
| 400 | PEM_write_DSAPrivateKey 406 | 400 | PEM_write_PKCS7 408 EXIST:!WIN16:FUNCTION: |
| 401 | PEM_write_DSAparams 407 | 401 | PEM_write_PrivateKey 409 EXIST:!WIN16:FUNCTION: |
| 402 | PEM_write_PKCS7 408 | 402 | PEM_write_RSAPrivateKey 410 EXIST:!WIN16:FUNCTION:RSA |
| 403 | PEM_write_PrivateKey 409 | 403 | PEM_write_X509 411 EXIST:!WIN16:FUNCTION: |
| 404 | PEM_write_RSAPrivateKey 410 | 404 | PEM_write_X509_CRL 412 EXIST:!WIN16:FUNCTION: |
| 405 | PEM_write_X509 411 | 405 | PEM_write_X509_REQ 413 EXIST:!WIN16:FUNCTION: |
| 406 | PEM_write_X509_CRL 412 | 406 | PEM_write_bio 414 EXIST::FUNCTION: |
| 407 | PEM_write_X509_REQ 413 | 407 | PEM_write_bio_DHparams 415 EXIST::FUNCTION:DH |
| 408 | PEM_write_bio 414 | 408 | PEM_write_bio_DSAPrivateKey 416 EXIST::FUNCTION:DSA |
| 409 | PEM_write_bio_DHparams 415 | 409 | PEM_write_bio_DSAparams 417 EXIST::FUNCTION:DSA |
| 410 | PEM_write_bio_DSAPrivateKey 416 | 410 | PEM_write_bio_PKCS7 418 EXIST::FUNCTION: |
| 411 | PEM_write_bio_DSAparams 417 | 411 | PEM_write_bio_PrivateKey 419 EXIST::FUNCTION: |
| 412 | PEM_write_bio_PKCS7 418 | 412 | PEM_write_bio_RSAPrivateKey 420 EXIST::FUNCTION:RSA |
| 413 | PEM_write_bio_PrivateKey 419 | 413 | PEM_write_bio_X509 421 EXIST::FUNCTION: |
| 414 | PEM_write_bio_RSAPrivateKey 420 | 414 | PEM_write_bio_X509_CRL 422 EXIST::FUNCTION: |
| 415 | PEM_write_bio_X509 421 | 415 | PEM_write_bio_X509_REQ 423 EXIST::FUNCTION: |
| 416 | PEM_write_bio_X509_CRL 422 | 416 | PKCS7_DIGEST_free 424 EXIST::FUNCTION: |
| 417 | PEM_write_bio_X509_REQ 423 | 417 | PKCS7_DIGEST_new 425 EXIST::FUNCTION: |
| 418 | PKCS7_DIGEST_free 424 | 418 | PKCS7_ENCRYPT_free 426 EXIST::FUNCTION: |
| 419 | PKCS7_DIGEST_new 425 | 419 | PKCS7_ENCRYPT_new 427 EXIST::FUNCTION: |
| 420 | PKCS7_ENCRYPT_free 426 | 420 | PKCS7_ENC_CONTENT_free 428 EXIST::FUNCTION: |
| 421 | PKCS7_ENCRYPT_new 427 | 421 | PKCS7_ENC_CONTENT_new 429 EXIST::FUNCTION: |
| 422 | PKCS7_ENC_CONTENT_free 428 | 422 | PKCS7_ENVELOPE_free 430 EXIST::FUNCTION: |
| 423 | PKCS7_ENC_CONTENT_new 429 | 423 | PKCS7_ENVELOPE_new 431 EXIST::FUNCTION: |
| 424 | PKCS7_ENVELOPE_free 430 | 424 | PKCS7_ISSUER_AND_SERIAL_digest 432 EXIST::FUNCTION: |
| 425 | PKCS7_ENVELOPE_new 431 | 425 | PKCS7_ISSUER_AND_SERIAL_free 433 EXIST::FUNCTION: |
| 426 | PKCS7_ISSUER_AND_SERIAL_digest 432 | 426 | PKCS7_ISSUER_AND_SERIAL_new 434 EXIST::FUNCTION: |
| 427 | PKCS7_ISSUER_AND_SERIAL_free 433 | 427 | PKCS7_RECIP_INFO_free 435 EXIST::FUNCTION: |
| 428 | PKCS7_ISSUER_AND_SERIAL_new 434 | 428 | PKCS7_RECIP_INFO_new 436 EXIST::FUNCTION: |
| 429 | PKCS7_RECIP_INFO_free 435 | 429 | PKCS7_SIGNED_free 437 EXIST::FUNCTION: |
| 430 | PKCS7_RECIP_INFO_new 436 | 430 | PKCS7_SIGNED_new 438 EXIST::FUNCTION: |
| 431 | PKCS7_SIGNED_free 437 | 431 | PKCS7_SIGNER_INFO_free 439 EXIST::FUNCTION: |
| 432 | PKCS7_SIGNED_new 438 | 432 | PKCS7_SIGNER_INFO_new 440 EXIST::FUNCTION: |
| 433 | PKCS7_SIGNER_INFO_free 439 | 433 | PKCS7_SIGN_ENVELOPE_free 441 EXIST::FUNCTION: |
| 434 | PKCS7_SIGNER_INFO_new 440 | 434 | PKCS7_SIGN_ENVELOPE_new 442 EXIST::FUNCTION: |
| 435 | PKCS7_SIGN_ENVELOPE_free 441 | 435 | PKCS7_dup 443 EXIST::FUNCTION: |
| 436 | PKCS7_SIGN_ENVELOPE_new 442 | 436 | PKCS7_free 444 EXIST::FUNCTION: |
| 437 | PKCS7_dup 443 | 437 | PKCS7_new 445 EXIST::FUNCTION: |
| 438 | PKCS7_free 444 | 438 | PROXY_ENTRY_add_noproxy 446 NOEXIST::FUNCTION: |
| 439 | PKCS7_new 445 | 439 | PROXY_ENTRY_clear_noproxy 447 NOEXIST::FUNCTION: |
| 440 | PROXY_ENTRY_add_noproxy 446 | 440 | PROXY_ENTRY_free 448 NOEXIST::FUNCTION: |
| 441 | PROXY_ENTRY_clear_noproxy 447 | 441 | PROXY_ENTRY_get_noproxy 449 NOEXIST::FUNCTION: |
| 442 | PROXY_ENTRY_free 448 | 442 | PROXY_ENTRY_new 450 NOEXIST::FUNCTION: |
| 443 | PROXY_ENTRY_get_noproxy 449 | 443 | PROXY_ENTRY_set_server 451 NOEXIST::FUNCTION: |
| 444 | PROXY_ENTRY_new 450 | 444 | PROXY_add_noproxy 452 NOEXIST::FUNCTION: |
| 445 | PROXY_ENTRY_set_server 451 | 445 | PROXY_add_server 453 NOEXIST::FUNCTION: |
| 446 | PROXY_add_noproxy 452 | 446 | PROXY_check_by_host 454 NOEXIST::FUNCTION: |
| 447 | PROXY_add_server 453 | 447 | PROXY_check_url 455 NOEXIST::FUNCTION: |
| 448 | PROXY_check_by_host 454 | 448 | PROXY_clear_noproxy 456 NOEXIST::FUNCTION: |
| 449 | PROXY_check_url 455 | 449 | PROXY_free 457 NOEXIST::FUNCTION: |
| 450 | PROXY_clear_noproxy 456 | 450 | PROXY_get_noproxy 458 NOEXIST::FUNCTION: |
| 451 | PROXY_free 457 | 451 | PROXY_get_proxies 459 NOEXIST::FUNCTION: |
| 452 | PROXY_get_noproxy 458 | 452 | PROXY_get_proxy_entry 460 NOEXIST::FUNCTION: |
| 453 | PROXY_get_proxies 459 | 453 | PROXY_load_conf 461 NOEXIST::FUNCTION: |
| 454 | PROXY_get_proxy_entry 460 | 454 | PROXY_new 462 NOEXIST::FUNCTION: |
| 455 | PROXY_load_conf 461 | 455 | PROXY_print 463 NOEXIST::FUNCTION: |
| 456 | PROXY_new 462 | 456 | RAND_bytes 464 EXIST::FUNCTION: |
| 457 | PROXY_print 463 | 457 | RAND_cleanup 465 EXIST::FUNCTION: |
| 458 | RAND_bytes 464 | 458 | RAND_file_name 466 EXIST::FUNCTION: |
| 459 | RAND_cleanup 465 | 459 | RAND_load_file 467 EXIST::FUNCTION: |
| 460 | RAND_file_name 466 | 460 | RAND_screen 468 EXIST::FUNCTION: |
| 461 | RAND_load_file 467 | 461 | RAND_seed 469 EXIST::FUNCTION: |
| 462 | RAND_screen 468 | 462 | RAND_write_file 470 EXIST::FUNCTION: |
| 463 | RAND_seed 469 | 463 | RC2_cbc_encrypt 471 EXIST::FUNCTION:RC2 |
| 464 | RAND_write_file 470 | 464 | RC2_cfb64_encrypt 472 EXIST::FUNCTION:RC2 |
| 465 | RC2_cbc_encrypt 471 | 465 | RC2_ecb_encrypt 473 EXIST::FUNCTION:RC2 |
| 466 | RC2_cfb64_encrypt 472 | 466 | RC2_encrypt 474 EXIST::FUNCTION:RC2 |
| 467 | RC2_ecb_encrypt 473 | 467 | RC2_ofb64_encrypt 475 EXIST::FUNCTION:RC2 |
| 468 | RC2_encrypt 474 | 468 | RC2_set_key 476 EXIST::FUNCTION:RC2 |
| 469 | RC2_ofb64_encrypt 475 | 469 | RC4 477 EXIST::FUNCTION:RC4 |
| 470 | RC2_set_key 476 | 470 | RC4_options 478 EXIST::FUNCTION:RC4 |
| 471 | RC4 477 | 471 | RC4_set_key 479 EXIST::FUNCTION:RC4 |
| 472 | RC4_options 478 | 472 | RSAPrivateKey_asn1_meth 480 EXIST::FUNCTION:RSA |
| 473 | RC4_set_key 479 | 473 | RSAPrivateKey_dup 481 EXIST::FUNCTION:RSA |
| 474 | RSAPrivateKey_asn1_meth 480 | 474 | RSAPublicKey_dup 482 EXIST::FUNCTION:RSA |
| 475 | RSAPrivateKey_dup 481 | 475 | RSA_PKCS1_SSLeay 483 EXIST::FUNCTION:RSA |
| 476 | RSAPublicKey_dup 482 | 476 | RSA_free 484 EXIST::FUNCTION:RSA |
| 477 | RSA_PKCS1_SSLeay 483 | 477 | RSA_generate_key 485 EXIST::FUNCTION:RSA |
| 478 | RSA_free 484 | 478 | RSA_new 486 EXIST::FUNCTION:RSA |
| 479 | RSA_generate_key 485 | 479 | RSA_new_method 487 EXIST::FUNCTION:RSA |
| 480 | RSA_new 486 | 480 | RSA_print 488 EXIST::FUNCTION:RSA |
| 481 | RSA_new_method 487 | 481 | RSA_print_fp 489 EXIST::FUNCTION:RSA,FP_API |
| 482 | RSA_print 488 | 482 | RSA_private_decrypt 490 EXIST::FUNCTION:RSA |
| 483 | RSA_print_fp 489 | 483 | RSA_private_encrypt 491 EXIST::FUNCTION:RSA |
| 484 | RSA_private_decrypt 490 | 484 | RSA_public_decrypt 492 EXIST::FUNCTION:RSA |
| 485 | RSA_private_encrypt 491 | 485 | RSA_public_encrypt 493 EXIST::FUNCTION:RSA |
| 486 | RSA_public_decrypt 492 | 486 | RSA_set_default_method 494 EXIST::FUNCTION:RSA |
| 487 | RSA_public_encrypt 493 | 487 | RSA_sign 495 EXIST::FUNCTION:RSA |
| 488 | RSA_set_default_method 494 | 488 | RSA_sign_ASN1_OCTET_STRING 496 EXIST::FUNCTION:RSA |
| 489 | RSA_sign 495 | 489 | RSA_size 497 EXIST::FUNCTION:RSA |
| 490 | RSA_sign_ASN1_OCTET_STRING 496 | 490 | RSA_verify 498 EXIST::FUNCTION:RSA |
| 491 | RSA_size 497 | 491 | RSA_verify_ASN1_OCTET_STRING 499 EXIST::FUNCTION:RSA |
| 492 | RSA_verify 498 | 492 | SHA 500 EXIST::FUNCTION:SHA |
| 493 | RSA_verify_ASN1_OCTET_STRING 499 | 493 | SHA1 501 EXIST::FUNCTION:SHA |
| 494 | SHA 500 | 494 | SHA1_Final 502 EXIST::FUNCTION:SHA |
| 495 | SHA1 501 | 495 | SHA1_Init 503 EXIST::FUNCTION:SHA |
| 496 | SHA1_Final 502 | 496 | SHA1_Update 504 EXIST::FUNCTION:SHA |
| 497 | SHA1_Init 503 | 497 | SHA_Final 505 EXIST::FUNCTION:SHA |
| 498 | SHA1_Update 504 | 498 | SHA_Init 506 EXIST::FUNCTION:SHA |
| 499 | SHA_Final 505 | 499 | SHA_Update 507 EXIST::FUNCTION:SHA |
| 500 | SHA_Init 506 | 500 | OpenSSL_add_all_algorithms 508 EXIST::FUNCTION: |
| 501 | SHA_Update 507 | 501 | OpenSSL_add_all_ciphers 509 EXIST::FUNCTION: |
| 502 | OpenSSL_add_all_algorithms 508 | 502 | OpenSSL_add_all_digests 510 EXIST::FUNCTION: |
| 503 | OpenSSL_add_all_ciphers 509 | 503 | TXT_DB_create_index 511 EXIST::FUNCTION: |
| 504 | OpenSSL_add_all_digests 510 | 504 | TXT_DB_free 512 EXIST::FUNCTION: |
| 505 | TXT_DB_create_index 511 | 505 | TXT_DB_get_by_index 513 EXIST::FUNCTION: |
| 506 | TXT_DB_free 512 | 506 | TXT_DB_insert 514 EXIST::FUNCTION: |
| 507 | TXT_DB_get_by_index 513 | 507 | TXT_DB_read 515 EXIST::FUNCTION: |
| 508 | TXT_DB_insert 514 | 508 | TXT_DB_write 516 EXIST::FUNCTION: |
| 509 | TXT_DB_read 515 | 509 | X509_ALGOR_free 517 EXIST::FUNCTION: |
| 510 | TXT_DB_write 516 | 510 | X509_ALGOR_new 518 EXIST::FUNCTION: |
| 511 | X509_ALGOR_free 517 | 511 | X509_ATTRIBUTE_free 519 EXIST::FUNCTION: |
| 512 | X509_ALGOR_new 518 | 512 | X509_ATTRIBUTE_new 520 EXIST::FUNCTION: |
| 513 | X509_ATTRIBUTE_free 519 | 513 | X509_CINF_free 521 EXIST::FUNCTION: |
| 514 | X509_ATTRIBUTE_new 520 | 514 | X509_CINF_new 522 EXIST::FUNCTION: |
| 515 | X509_CINF_free 521 | 515 | X509_CRL_INFO_free 523 EXIST::FUNCTION: |
| 516 | X509_CINF_new 522 | 516 | X509_CRL_INFO_new 524 EXIST::FUNCTION: |
| 517 | X509_CRL_INFO_free 523 | 517 | X509_CRL_add_ext 525 EXIST::FUNCTION: |
| 518 | X509_CRL_INFO_new 524 | 518 | X509_CRL_cmp 526 EXIST::FUNCTION: |
| 519 | X509_CRL_add_ext 525 | 519 | X509_CRL_delete_ext 527 EXIST::FUNCTION: |
| 520 | X509_CRL_cmp 526 | 520 | X509_CRL_dup 528 EXIST::FUNCTION: |
| 521 | X509_CRL_delete_ext 527 | 521 | X509_CRL_free 529 EXIST::FUNCTION: |
| 522 | X509_CRL_dup 528 | 522 | X509_CRL_get_ext 530 EXIST::FUNCTION: |
| 523 | X509_CRL_free 529 | 523 | X509_CRL_get_ext_by_NID 531 EXIST::FUNCTION: |
| 524 | X509_CRL_get_ext 530 | 524 | X509_CRL_get_ext_by_OBJ 532 EXIST::FUNCTION: |
| 525 | X509_CRL_get_ext_by_NID 531 | 525 | X509_CRL_get_ext_by_critical 533 EXIST::FUNCTION: |
| 526 | X509_CRL_get_ext_by_OBJ 532 | 526 | X509_CRL_get_ext_count 534 EXIST::FUNCTION: |
| 527 | X509_CRL_get_ext_by_critical 533 | 527 | X509_CRL_new 535 EXIST::FUNCTION: |
| 528 | X509_CRL_get_ext_count 534 | 528 | X509_CRL_sign 536 EXIST::FUNCTION: |
| 529 | X509_CRL_new 535 | 529 | X509_CRL_verify 537 EXIST::FUNCTION: |
| 530 | X509_CRL_sign 536 | 530 | X509_EXTENSION_create_by_NID 538 EXIST::FUNCTION: |
| 531 | X509_CRL_verify 537 | 531 | X509_EXTENSION_create_by_OBJ 539 EXIST::FUNCTION: |
| 532 | X509_EXTENSION_create_by_NID 538 | 532 | X509_EXTENSION_dup 540 EXIST::FUNCTION: |
| 533 | X509_EXTENSION_create_by_OBJ 539 | 533 | X509_EXTENSION_free 541 EXIST::FUNCTION: |
| 534 | X509_EXTENSION_dup 540 | 534 | X509_EXTENSION_get_critical 542 EXIST::FUNCTION: |
| 535 | X509_EXTENSION_free 541 | 535 | X509_EXTENSION_get_data 543 EXIST::FUNCTION: |
| 536 | X509_EXTENSION_get_critical 542 | 536 | X509_EXTENSION_get_object 544 EXIST::FUNCTION: |
| 537 | X509_EXTENSION_get_data 543 | 537 | X509_EXTENSION_new 545 EXIST::FUNCTION: |
| 538 | X509_EXTENSION_get_object 544 | 538 | X509_EXTENSION_set_critical 546 EXIST::FUNCTION: |
| 539 | X509_EXTENSION_new 545 | 539 | X509_EXTENSION_set_data 547 EXIST::FUNCTION: |
| 540 | X509_EXTENSION_set_critical 546 | 540 | X509_EXTENSION_set_object 548 EXIST::FUNCTION: |
| 541 | X509_EXTENSION_set_data 547 | 541 | X509_INFO_free 549 EXIST::FUNCTION: |
| 542 | X509_EXTENSION_set_object 548 | 542 | X509_INFO_new 550 EXIST::FUNCTION: |
| 543 | X509_INFO_free 549 | 543 | X509_LOOKUP_by_alias 551 EXIST::FUNCTION: |
| 544 | X509_INFO_new 550 | 544 | X509_LOOKUP_by_fingerprint 552 EXIST::FUNCTION: |
| 545 | X509_LOOKUP_by_alias 551 | 545 | X509_LOOKUP_by_issuer_serial 553 EXIST::FUNCTION: |
| 546 | X509_LOOKUP_by_fingerprint 552 | 546 | X509_LOOKUP_by_subject 554 EXIST::FUNCTION: |
| 547 | X509_LOOKUP_by_issuer_serial 553 | 547 | X509_LOOKUP_ctrl 555 EXIST::FUNCTION: |
| 548 | X509_LOOKUP_by_subject 554 | 548 | X509_LOOKUP_file 556 EXIST::FUNCTION: |
| 549 | X509_LOOKUP_ctrl 555 | 549 | X509_LOOKUP_free 557 EXIST::FUNCTION: |
| 550 | X509_LOOKUP_file 556 | 550 | X509_LOOKUP_hash_dir 558 EXIST::FUNCTION: |
| 551 | X509_LOOKUP_free 557 | 551 | X509_LOOKUP_init 559 EXIST::FUNCTION: |
| 552 | X509_LOOKUP_hash_dir 558 | 552 | X509_LOOKUP_new 560 EXIST::FUNCTION: |
| 553 | X509_LOOKUP_init 559 | 553 | X509_LOOKUP_shutdown 561 EXIST::FUNCTION: |
| 554 | X509_LOOKUP_new 560 | 554 | X509_NAME_ENTRY_create_by_NID 562 EXIST::FUNCTION: |
| 555 | X509_LOOKUP_shutdown 561 | 555 | X509_NAME_ENTRY_create_by_OBJ 563 EXIST::FUNCTION: |
| 556 | X509_NAME_ENTRY_create_by_NID 562 | 556 | X509_NAME_ENTRY_dup 564 EXIST::FUNCTION: |
| 557 | X509_NAME_ENTRY_create_by_OBJ 563 | 557 | X509_NAME_ENTRY_free 565 EXIST::FUNCTION: |
| 558 | X509_NAME_ENTRY_dup 564 | 558 | X509_NAME_ENTRY_get_data 566 EXIST::FUNCTION: |
| 559 | X509_NAME_ENTRY_free 565 | 559 | X509_NAME_ENTRY_get_object 567 EXIST::FUNCTION: |
| 560 | X509_NAME_ENTRY_get_data 566 | 560 | X509_NAME_ENTRY_new 568 EXIST::FUNCTION: |
| 561 | X509_NAME_ENTRY_get_object 567 | 561 | X509_NAME_ENTRY_set_data 569 EXIST::FUNCTION: |
| 562 | X509_NAME_ENTRY_new 568 | 562 | X509_NAME_ENTRY_set_object 570 EXIST::FUNCTION: |
| 563 | X509_NAME_ENTRY_set_data 569 | 563 | X509_NAME_add_entry 571 EXIST::FUNCTION: |
| 564 | X509_NAME_ENTRY_set_object 570 | 564 | X509_NAME_cmp 572 EXIST::FUNCTION: |
| 565 | X509_NAME_add_entry 571 | 565 | X509_NAME_delete_entry 573 EXIST::FUNCTION: |
| 566 | X509_NAME_cmp 572 | 566 | X509_NAME_digest 574 EXIST::FUNCTION: |
| 567 | X509_NAME_delete_entry 573 | 567 | X509_NAME_dup 575 EXIST::FUNCTION: |
| 568 | X509_NAME_digest 574 | 568 | X509_NAME_entry_count 576 EXIST::FUNCTION: |
| 569 | X509_NAME_dup 575 | 569 | X509_NAME_free 577 EXIST::FUNCTION: |
| 570 | X509_NAME_entry_count 576 | 570 | X509_NAME_get_entry 578 EXIST::FUNCTION: |
| 571 | X509_NAME_free 577 | 571 | X509_NAME_get_index_by_NID 579 EXIST::FUNCTION: |
| 572 | X509_NAME_get_entry 578 | 572 | X509_NAME_get_index_by_OBJ 580 EXIST::FUNCTION: |
| 573 | X509_NAME_get_index_by_NID 579 | 573 | X509_NAME_get_text_by_NID 581 EXIST::FUNCTION: |
| 574 | X509_NAME_get_index_by_OBJ 580 | 574 | X509_NAME_get_text_by_OBJ 582 EXIST::FUNCTION: |
| 575 | X509_NAME_get_text_by_NID 581 | 575 | X509_NAME_hash 583 EXIST::FUNCTION: |
| 576 | X509_NAME_get_text_by_OBJ 582 | 576 | X509_NAME_new 584 EXIST::FUNCTION: |
| 577 | X509_NAME_hash 583 | 577 | X509_NAME_oneline 585 EXIST::FUNCTION: |
| 578 | X509_NAME_new 584 | 578 | X509_NAME_print 586 EXIST::FUNCTION: |
| 579 | X509_NAME_oneline 585 | 579 | X509_NAME_set 587 EXIST::FUNCTION: |
| 580 | X509_NAME_print 586 | 580 | X509_OBJECT_free_contents 588 EXIST::FUNCTION: |
| 581 | X509_NAME_set 587 | 581 | X509_OBJECT_retrieve_by_subject 589 EXIST::FUNCTION: |
| 582 | X509_OBJECT_free_contents 588 | 582 | X509_OBJECT_up_ref_count 590 EXIST::FUNCTION: |
| 583 | X509_OBJECT_retrieve_by_subject 589 | 583 | X509_PKEY_free 591 EXIST::FUNCTION: |
| 584 | X509_OBJECT_up_ref_count 590 | 584 | X509_PKEY_new 592 EXIST::FUNCTION: |
| 585 | X509_PKEY_free 591 | 585 | X509_PUBKEY_free 593 EXIST::FUNCTION: |
| 586 | X509_PKEY_new 592 | 586 | X509_PUBKEY_get 594 EXIST::FUNCTION: |
| 587 | X509_PUBKEY_free 593 | 587 | X509_PUBKEY_new 595 EXIST::FUNCTION: |
| 588 | X509_PUBKEY_get 594 | 588 | X509_PUBKEY_set 596 EXIST::FUNCTION: |
| 589 | X509_PUBKEY_new 595 | 589 | X509_REQ_INFO_free 597 EXIST::FUNCTION: |
| 590 | X509_PUBKEY_set 596 | 590 | X509_REQ_INFO_new 598 EXIST::FUNCTION: |
| 591 | X509_REQ_INFO_free 597 | 591 | X509_REQ_dup 599 EXIST::FUNCTION: |
| 592 | X509_REQ_INFO_new 598 | 592 | X509_REQ_free 600 EXIST::FUNCTION: |
| 593 | X509_REQ_dup 599 | 593 | X509_REQ_get_pubkey 601 EXIST::FUNCTION: |
| 594 | X509_REQ_free 600 | 594 | X509_REQ_new 602 EXIST::FUNCTION: |
| 595 | X509_REQ_get_pubkey 601 | 595 | X509_REQ_print 603 EXIST::FUNCTION: |
| 596 | X509_REQ_new 602 | 596 | X509_REQ_print_fp 604 EXIST::FUNCTION:FP_API |
| 597 | X509_REQ_print 603 | 597 | X509_REQ_set_pubkey 605 EXIST::FUNCTION: |
| 598 | X509_REQ_print_fp 604 | 598 | X509_REQ_set_subject_name 606 EXIST::FUNCTION: |
| 599 | X509_REQ_set_pubkey 605 | 599 | X509_REQ_set_version 607 EXIST::FUNCTION: |
| 600 | X509_REQ_set_subject_name 606 | 600 | X509_REQ_sign 608 EXIST::FUNCTION: |
| 601 | X509_REQ_set_version 607 | 601 | X509_REQ_to_X509 609 EXIST::FUNCTION: |
| 602 | X509_REQ_sign 608 | 602 | X509_REQ_verify 610 EXIST::FUNCTION: |
| 603 | X509_REQ_to_X509 609 | 603 | X509_REVOKED_add_ext 611 EXIST::FUNCTION: |
| 604 | X509_REQ_verify 610 | 604 | X509_REVOKED_delete_ext 612 EXIST::FUNCTION: |
| 605 | X509_REVOKED_add_ext 611 | 605 | X509_REVOKED_free 613 EXIST::FUNCTION: |
| 606 | X509_REVOKED_delete_ext 612 | 606 | X509_REVOKED_get_ext 614 EXIST::FUNCTION: |
| 607 | X509_REVOKED_free 613 | 607 | X509_REVOKED_get_ext_by_NID 615 EXIST::FUNCTION: |
| 608 | X509_REVOKED_get_ext 614 | 608 | X509_REVOKED_get_ext_by_OBJ 616 EXIST::FUNCTION: |
| 609 | X509_REVOKED_get_ext_by_NID 615 | 609 | X509_REVOKED_get_ext_by_critical 617 EXIST:!VMS:FUNCTION: |
| 610 | X509_REVOKED_get_ext_by_OBJ 616 | 610 | X509_REVOKED_get_ext_by_critic 617 EXIST:VMS:FUNCTION: |
| 611 | X509_REVOKED_get_ext_by_critical 617 | 611 | X509_REVOKED_get_ext_count 618 EXIST::FUNCTION: |
| 612 | X509_REVOKED_get_ext_count 618 | 612 | X509_REVOKED_new 619 EXIST::FUNCTION: |
| 613 | X509_REVOKED_new 619 | 613 | X509_SIG_free 620 EXIST::FUNCTION: |
| 614 | X509_SIG_free 620 | 614 | X509_SIG_new 621 EXIST::FUNCTION: |
| 615 | X509_SIG_new 621 | 615 | X509_STORE_CTX_cleanup 622 EXIST::FUNCTION: |
| 616 | X509_STORE_CTX_cleanup 622 | 616 | X509_STORE_CTX_init 623 EXIST::FUNCTION: |
| 617 | X509_STORE_CTX_init 623 | 617 | X509_STORE_add_cert 624 EXIST::FUNCTION: |
| 618 | X509_STORE_add_cert 624 | 618 | X509_STORE_add_lookup 625 EXIST::FUNCTION: |
| 619 | X509_STORE_add_lookup 625 | 619 | X509_STORE_free 626 EXIST::FUNCTION: |
| 620 | X509_STORE_free 626 | 620 | X509_STORE_get_by_subject 627 EXIST::FUNCTION: |
| 621 | X509_STORE_get_by_subject 627 | 621 | X509_STORE_load_locations 628 EXIST::FUNCTION: |
| 622 | X509_STORE_load_locations 628 | 622 | X509_STORE_new 629 EXIST::FUNCTION: |
| 623 | X509_STORE_new 629 | 623 | X509_STORE_set_default_paths 630 EXIST::FUNCTION: |
| 624 | X509_STORE_set_default_paths 630 | 624 | X509_VAL_free 631 EXIST::FUNCTION: |
| 625 | X509_VAL_free 631 | 625 | X509_VAL_new 632 EXIST::FUNCTION: |
| 626 | X509_VAL_new 632 | 626 | X509_add_ext 633 EXIST::FUNCTION: |
| 627 | X509_add_ext 633 | 627 | X509_asn1_meth 634 EXIST::FUNCTION: |
| 628 | X509_asn1_meth 634 | 628 | X509_certificate_type 635 EXIST::FUNCTION: |
| 629 | X509_certificate_type 635 | 629 | X509_check_private_key 636 EXIST::FUNCTION: |
| 630 | X509_check_private_key 636 | 630 | X509_cmp_current_time 637 EXIST::FUNCTION: |
| 631 | X509_cmp_current_time 637 | 631 | X509_delete_ext 638 EXIST::FUNCTION: |
| 632 | X509_delete_ext 638 | 632 | X509_digest 639 EXIST::FUNCTION: |
| 633 | X509_digest 639 | 633 | X509_dup 640 EXIST::FUNCTION: |
| 634 | X509_dup 640 | 634 | X509_free 641 EXIST::FUNCTION: |
| 635 | X509_free 641 | 635 | X509_get_default_cert_area 642 EXIST::FUNCTION: |
| 636 | X509_get_default_cert_area 642 | 636 | X509_get_default_cert_dir 643 EXIST::FUNCTION: |
| 637 | X509_get_default_cert_dir 643 | 637 | X509_get_default_cert_dir_env 644 EXIST::FUNCTION: |
| 638 | X509_get_default_cert_dir_env 644 | 638 | X509_get_default_cert_file 645 EXIST::FUNCTION: |
| 639 | X509_get_default_cert_file 645 | 639 | X509_get_default_cert_file_env 646 EXIST::FUNCTION: |
| 640 | X509_get_default_cert_file_env 646 | 640 | X509_get_default_private_dir 647 EXIST::FUNCTION: |
| 641 | X509_get_default_private_dir 647 | 641 | X509_get_ext 648 EXIST::FUNCTION: |
| 642 | X509_get_ext 648 | 642 | X509_get_ext_by_NID 649 EXIST::FUNCTION: |
| 643 | X509_get_ext_by_NID 649 | 643 | X509_get_ext_by_OBJ 650 EXIST::FUNCTION: |
| 644 | X509_get_ext_by_OBJ 650 | 644 | X509_get_ext_by_critical 651 EXIST::FUNCTION: |
| 645 | X509_get_ext_by_critical 651 | 645 | X509_get_ext_count 652 EXIST::FUNCTION: |
| 646 | X509_get_ext_count 652 | 646 | X509_get_issuer_name 653 EXIST::FUNCTION: |
| 647 | X509_get_issuer_name 653 | 647 | X509_get_pubkey 654 EXIST::FUNCTION: |
| 648 | X509_get_pubkey 654 | 648 | X509_get_pubkey_parameters 655 EXIST::FUNCTION: |
| 649 | X509_get_pubkey_parameters 655 | 649 | X509_get_serialNumber 656 EXIST::FUNCTION: |
| 650 | X509_get_serialNumber 656 | 650 | X509_get_subject_name 657 EXIST::FUNCTION: |
| 651 | X509_get_subject_name 657 | 651 | X509_gmtime_adj 658 EXIST::FUNCTION: |
| 652 | X509_gmtime_adj 658 | 652 | X509_issuer_and_serial_cmp 659 EXIST::FUNCTION: |
| 653 | X509_issuer_and_serial_cmp 659 | 653 | X509_issuer_and_serial_hash 660 EXIST::FUNCTION: |
| 654 | X509_issuer_and_serial_hash 660 | 654 | X509_issuer_name_cmp 661 EXIST::FUNCTION: |
| 655 | X509_issuer_name_cmp 661 | 655 | X509_issuer_name_hash 662 EXIST::FUNCTION: |
| 656 | X509_issuer_name_hash 662 | 656 | X509_load_cert_file 663 EXIST::FUNCTION: |
| 657 | X509_load_cert_file 663 | 657 | X509_new 664 EXIST::FUNCTION: |
| 658 | X509_new 664 | 658 | X509_print 665 EXIST::FUNCTION: |
| 659 | X509_print 665 | 659 | X509_print_fp 666 EXIST::FUNCTION:FP_API |
| 660 | X509_print_fp 666 | 660 | X509_set_issuer_name 667 EXIST::FUNCTION: |
| 661 | X509_set_issuer_name 667 | 661 | X509_set_notAfter 668 EXIST::FUNCTION: |
| 662 | X509_set_notAfter 668 | 662 | X509_set_notBefore 669 EXIST::FUNCTION: |
| 663 | X509_set_notBefore 669 | 663 | X509_set_pubkey 670 EXIST::FUNCTION: |
| 664 | X509_set_pubkey 670 | 664 | X509_set_serialNumber 671 EXIST::FUNCTION: |
| 665 | X509_set_serialNumber 671 | 665 | X509_set_subject_name 672 EXIST::FUNCTION: |
| 666 | X509_set_subject_name 672 | 666 | X509_set_version 673 EXIST::FUNCTION: |
| 667 | X509_set_version 673 | 667 | X509_sign 674 EXIST::FUNCTION: |
| 668 | X509_sign 674 | 668 | X509_subject_name_cmp 675 EXIST::FUNCTION: |
| 669 | X509_subject_name_cmp 675 | 669 | X509_subject_name_hash 676 EXIST::FUNCTION: |
| 670 | X509_subject_name_hash 676 | 670 | X509_to_X509_REQ 677 EXIST::FUNCTION: |
| 671 | X509_to_X509_REQ 677 | 671 | X509_verify 678 EXIST::FUNCTION: |
| 672 | X509_verify 678 | 672 | X509_verify_cert 679 EXIST::FUNCTION: |
| 673 | X509_verify_cert 679 | 673 | X509_verify_cert_error_string 680 EXIST::FUNCTION: |
| 674 | X509_verify_cert_error_string 680 | 674 | X509v3_add_ext 681 EXIST::FUNCTION: |
| 675 | X509v3_add_ext 681 | 675 | X509v3_add_extension 682 NOEXIST::FUNCTION: |
| 676 | X509v3_add_extension 682 | 676 | X509v3_add_netscape_extensions 683 NOEXIST::FUNCTION: |
| 677 | X509v3_add_netscape_extensions 683 | 677 | X509v3_add_standard_extensions 684 NOEXIST::FUNCTION: |
| 678 | X509v3_add_standard_extensions 684 | 678 | X509v3_cleanup_extensions 685 NOEXIST::FUNCTION: |
| 679 | X509v3_cleanup_extensions 685 | 679 | X509v3_data_type_by_NID 686 NOEXIST::FUNCTION: |
| 680 | X509v3_data_type_by_NID 686 | 680 | X509v3_data_type_by_OBJ 687 NOEXIST::FUNCTION: |
| 681 | X509v3_data_type_by_OBJ 687 | 681 | X509v3_delete_ext 688 EXIST::FUNCTION: |
| 682 | X509v3_delete_ext 688 | 682 | X509v3_get_ext 689 EXIST::FUNCTION: |
| 683 | X509v3_get_ext 689 | 683 | X509v3_get_ext_by_NID 690 EXIST::FUNCTION: |
| 684 | X509v3_get_ext_by_NID 690 | 684 | X509v3_get_ext_by_OBJ 691 EXIST::FUNCTION: |
| 685 | X509v3_get_ext_by_OBJ 691 | 685 | X509v3_get_ext_by_critical 692 EXIST::FUNCTION: |
| 686 | X509v3_get_ext_by_critical 692 | 686 | X509v3_get_ext_count 693 EXIST::FUNCTION: |
| 687 | X509v3_get_ext_count 693 | 687 | X509v3_pack_string 694 NOEXIST::FUNCTION: |
| 688 | X509v3_pack_string 694 | 688 | X509v3_pack_type_by_NID 695 NOEXIST::FUNCTION: |
| 689 | X509v3_pack_type_by_NID 695 | 689 | X509v3_pack_type_by_OBJ 696 NOEXIST::FUNCTION: |
| 690 | X509v3_pack_type_by_OBJ 696 | 690 | X509v3_unpack_string 697 NOEXIST::FUNCTION: |
| 691 | X509v3_unpack_string 697 | 691 | _des_crypt 698 NOEXIST::FUNCTION: |
| 692 | _des_crypt 698 | 692 | a2d_ASN1_OBJECT 699 EXIST::FUNCTION: |
| 693 | a2d_ASN1_OBJECT 699 | 693 | a2i_ASN1_INTEGER 700 EXIST::FUNCTION: |
| 694 | a2i_ASN1_INTEGER 700 | 694 | a2i_ASN1_STRING 701 EXIST::FUNCTION: |
| 695 | a2i_ASN1_STRING 701 | 695 | asn1_Finish 702 EXIST::FUNCTION: |
| 696 | asn1_Finish 702 | 696 | asn1_GetSequence 703 EXIST::FUNCTION: |
| 697 | asn1_GetSequence 703 | 697 | bn_div_words 704 EXIST::FUNCTION: |
| 698 | bn_div_words 704 | 698 | bn_expand2 705 EXIST::FUNCTION: |
| 699 | bn_expand2 705 | 699 | bn_mul_add_words 706 EXIST::FUNCTION: |
| 700 | bn_mul_add_words 706 | 700 | bn_mul_words 707 EXIST::FUNCTION: |
| 701 | bn_mul_words 707 | 701 | BN_uadd 708 EXIST::FUNCTION: |
| 702 | BN_uadd 708 | 702 | BN_usub 709 EXIST::FUNCTION: |
| 703 | BN_usub 709 | 703 | bn_sqr_words 710 EXIST::FUNCTION: |
| 704 | bn_sqr_words 710 | 704 | crypt 711 EXIST:!PERL5,!NeXT,!__FreeBSD__:FUNCTION:DES |
| 705 | crypt 711 | 705 | d2i_ASN1_BIT_STRING 712 EXIST::FUNCTION: |
| 706 | d2i_ASN1_BIT_STRING 712 | 706 | d2i_ASN1_BOOLEAN 713 EXIST::FUNCTION: |
| 707 | d2i_ASN1_BOOLEAN 713 | 707 | d2i_ASN1_HEADER 714 EXIST::FUNCTION: |
| 708 | d2i_ASN1_HEADER 714 | 708 | d2i_ASN1_IA5STRING 715 EXIST::FUNCTION: |
| 709 | d2i_ASN1_IA5STRING 715 | 709 | d2i_ASN1_INTEGER 716 EXIST::FUNCTION: |
| 710 | d2i_ASN1_INTEGER 716 | 710 | d2i_ASN1_OBJECT 717 EXIST::FUNCTION: |
| 711 | d2i_ASN1_OBJECT 717 | 711 | d2i_ASN1_OCTET_STRING 718 EXIST::FUNCTION: |
| 712 | d2i_ASN1_OCTET_STRING 718 | 712 | d2i_ASN1_PRINTABLE 719 EXIST::FUNCTION: |
| 713 | d2i_ASN1_PRINTABLE 719 | 713 | d2i_ASN1_PRINTABLESTRING 720 EXIST::FUNCTION: |
| 714 | d2i_ASN1_PRINTABLESTRING 720 | 714 | d2i_ASN1_SET 721 EXIST::FUNCTION: |
| 715 | d2i_ASN1_SET 721 | 715 | d2i_ASN1_T61STRING 722 EXIST::FUNCTION: |
| 716 | d2i_ASN1_T61STRING 722 | 716 | d2i_ASN1_TYPE 723 EXIST::FUNCTION: |
| 717 | d2i_ASN1_TYPE 723 | 717 | d2i_ASN1_UTCTIME 724 EXIST::FUNCTION: |
| 718 | d2i_ASN1_UTCTIME 724 | 718 | d2i_ASN1_bytes 725 EXIST::FUNCTION: |
| 719 | d2i_ASN1_bytes 725 | 719 | d2i_ASN1_type_bytes 726 EXIST::FUNCTION: |
| 720 | d2i_ASN1_type_bytes 726 | 720 | d2i_DHparams 727 EXIST::FUNCTION:DH |
| 721 | d2i_DHparams 727 | 721 | d2i_DSAPrivateKey 728 EXIST::FUNCTION:DSA |
| 722 | d2i_DSAPrivateKey 728 | 722 | d2i_DSAPrivateKey_bio 729 EXIST::FUNCTION:DSA |
| 723 | d2i_DSAPrivateKey_bio 729 | 723 | d2i_DSAPrivateKey_fp 730 EXIST::FUNCTION:DSA,FP_API |
| 724 | d2i_DSAPrivateKey_fp 730 | 724 | d2i_DSAPublicKey 731 EXIST::FUNCTION:DSA |
| 725 | d2i_DSAPublicKey 731 | 725 | d2i_DSAparams 732 EXIST::FUNCTION:DSA |
| 726 | d2i_DSAparams 732 | 726 | d2i_NETSCAPE_SPKAC 733 EXIST::FUNCTION: |
| 727 | d2i_NETSCAPE_SPKAC 733 | 727 | d2i_NETSCAPE_SPKI 734 EXIST::FUNCTION: |
| 728 | d2i_NETSCAPE_SPKI 734 | 728 | d2i_Netscape_RSA 735 EXIST::FUNCTION:RSA |
| 729 | d2i_Netscape_RSA 735 | 729 | d2i_PKCS7 736 EXIST::FUNCTION: |
| 730 | d2i_PKCS7 736 | 730 | d2i_PKCS7_DIGEST 737 EXIST::FUNCTION: |
| 731 | d2i_PKCS7_DIGEST 737 | 731 | d2i_PKCS7_ENCRYPT 738 EXIST::FUNCTION: |
| 732 | d2i_PKCS7_ENCRYPT 738 | 732 | d2i_PKCS7_ENC_CONTENT 739 EXIST::FUNCTION: |
| 733 | d2i_PKCS7_ENC_CONTENT 739 | 733 | d2i_PKCS7_ENVELOPE 740 EXIST::FUNCTION: |
| 734 | d2i_PKCS7_ENVELOPE 740 | 734 | d2i_PKCS7_ISSUER_AND_SERIAL 741 EXIST::FUNCTION: |
| 735 | d2i_PKCS7_ISSUER_AND_SERIAL 741 | 735 | d2i_PKCS7_RECIP_INFO 742 EXIST::FUNCTION: |
| 736 | d2i_PKCS7_RECIP_INFO 742 | 736 | d2i_PKCS7_SIGNED 743 EXIST::FUNCTION: |
| 737 | d2i_PKCS7_SIGNED 743 | 737 | d2i_PKCS7_SIGNER_INFO 744 EXIST::FUNCTION: |
| 738 | d2i_PKCS7_SIGNER_INFO 744 | 738 | d2i_PKCS7_SIGN_ENVELOPE 745 EXIST::FUNCTION: |
| 739 | d2i_PKCS7_SIGN_ENVELOPE 745 | 739 | d2i_PKCS7_bio 746 EXIST::FUNCTION: |
| 740 | d2i_PKCS7_bio 746 | 740 | d2i_PKCS7_fp 747 EXIST::FUNCTION:FP_API |
| 741 | d2i_PKCS7_fp 747 | 741 | d2i_PrivateKey 748 EXIST::FUNCTION: |
| 742 | d2i_PrivateKey 748 | 742 | d2i_PublicKey 749 EXIST::FUNCTION: |
| 743 | d2i_PublicKey 749 | 743 | d2i_RSAPrivateKey 750 EXIST::FUNCTION:RSA |
| 744 | d2i_RSAPrivateKey 750 | 744 | d2i_RSAPrivateKey_bio 751 EXIST::FUNCTION:RSA |
| 745 | d2i_RSAPrivateKey_bio 751 | 745 | d2i_RSAPrivateKey_fp 752 EXIST::FUNCTION:RSA,FP_API |
| 746 | d2i_RSAPrivateKey_fp 752 | 746 | d2i_RSAPublicKey 753 EXIST::FUNCTION:RSA |
| 747 | d2i_RSAPublicKey 753 | 747 | d2i_X509 754 EXIST::FUNCTION: |
| 748 | d2i_X509 754 | 748 | d2i_X509_ALGOR 755 EXIST::FUNCTION: |
| 749 | d2i_X509_ALGOR 755 | 749 | d2i_X509_ATTRIBUTE 756 EXIST::FUNCTION: |
| 750 | d2i_X509_ATTRIBUTE 756 | 750 | d2i_X509_CINF 757 EXIST::FUNCTION: |
| 751 | d2i_X509_CINF 757 | 751 | d2i_X509_CRL 758 EXIST::FUNCTION: |
| 752 | d2i_X509_CRL 758 | 752 | d2i_X509_CRL_INFO 759 EXIST::FUNCTION: |
| 753 | d2i_X509_CRL_INFO 759 | 753 | d2i_X509_CRL_bio 760 EXIST::FUNCTION: |
| 754 | d2i_X509_CRL_bio 760 | 754 | d2i_X509_CRL_fp 761 EXIST::FUNCTION:FP_API |
| 755 | d2i_X509_CRL_fp 761 | 755 | d2i_X509_EXTENSION 762 EXIST::FUNCTION: |
| 756 | d2i_X509_EXTENSION 762 | 756 | d2i_X509_NAME 763 EXIST::FUNCTION: |
| 757 | d2i_X509_NAME 763 | 757 | d2i_X509_NAME_ENTRY 764 EXIST::FUNCTION: |
| 758 | d2i_X509_NAME_ENTRY 764 | 758 | d2i_X509_PKEY 765 EXIST::FUNCTION: |
| 759 | d2i_X509_PKEY 765 | 759 | d2i_X509_PUBKEY 766 EXIST::FUNCTION: |
| 760 | d2i_X509_PUBKEY 766 | 760 | d2i_X509_REQ 767 EXIST::FUNCTION: |
| 761 | d2i_X509_REQ 767 | 761 | d2i_X509_REQ_INFO 768 EXIST::FUNCTION: |
| 762 | d2i_X509_REQ_INFO 768 | 762 | d2i_X509_REQ_bio 769 EXIST::FUNCTION: |
| 763 | d2i_X509_REQ_bio 769 | 763 | d2i_X509_REQ_fp 770 EXIST::FUNCTION:FP_API |
| 764 | d2i_X509_REQ_fp 770 | 764 | d2i_X509_REVOKED 771 EXIST::FUNCTION: |
| 765 | d2i_X509_REVOKED 771 | 765 | d2i_X509_SIG 772 EXIST::FUNCTION: |
| 766 | d2i_X509_SIG 772 | 766 | d2i_X509_VAL 773 EXIST::FUNCTION: |
| 767 | d2i_X509_VAL 773 | 767 | d2i_X509_bio 774 EXIST::FUNCTION: |
| 768 | d2i_X509_bio 774 | 768 | d2i_X509_fp 775 EXIST::FUNCTION:FP_API |
| 769 | d2i_X509_fp 775 | 769 | des_cbc_cksum 777 EXIST::FUNCTION:DES |
| 770 | des_cbc_cksum 777 | 770 | des_cbc_encrypt 778 EXIST::FUNCTION:DES |
| 771 | des_cbc_encrypt 778 | 771 | des_cblock_print_file 779 NOEXIST::FUNCTION: |
| 772 | des_cblock_print_file 779 | 772 | des_cfb64_encrypt 780 EXIST::FUNCTION:DES |
| 773 | des_cfb64_encrypt 780 | 773 | des_cfb_encrypt 781 EXIST::FUNCTION:DES |
| 774 | des_cfb_encrypt 781 | 774 | des_decrypt3 782 EXIST::FUNCTION:DES |
| 775 | des_decrypt3 782 | 775 | des_ecb3_encrypt 783 EXIST::FUNCTION:DES |
| 776 | des_ecb3_encrypt 783 | 776 | des_ecb_encrypt 784 EXIST::FUNCTION:DES |
| 777 | des_ecb_encrypt 784 | 777 | des_ede3_cbc_encrypt 785 EXIST::FUNCTION:DES |
| 778 | des_ede3_cbc_encrypt 785 | 778 | des_ede3_cfb64_encrypt 786 EXIST::FUNCTION:DES |
| 779 | des_ede3_cfb64_encrypt 786 | 779 | des_ede3_ofb64_encrypt 787 EXIST::FUNCTION:DES |
| 780 | des_ede3_ofb64_encrypt 787 | 780 | des_enc_read 788 EXIST::FUNCTION:DES |
| 781 | des_enc_read 788 | 781 | des_enc_write 789 EXIST::FUNCTION:DES |
| 782 | des_enc_write 789 | 782 | des_encrypt 790 EXIST::FUNCTION:DES |
| 783 | des_encrypt 790 | 783 | des_encrypt2 791 EXIST::FUNCTION:DES |
| 784 | des_encrypt2 791 | 784 | des_encrypt3 792 EXIST::FUNCTION:DES |
| 785 | des_encrypt3 792 | 785 | des_fcrypt 793 EXIST::FUNCTION:DES |
| 786 | des_fcrypt 793 | 786 | des_is_weak_key 794 EXIST::FUNCTION:DES |
| 787 | des_is_weak_key 794 | 787 | des_key_sched 795 EXIST::FUNCTION:DES |
| 788 | des_key_sched 795 | 788 | des_ncbc_encrypt 796 EXIST::FUNCTION:DES |
| 789 | des_ncbc_encrypt 796 | 789 | des_ofb64_encrypt 797 EXIST::FUNCTION:DES |
| 790 | des_ofb64_encrypt 797 | 790 | des_ofb_encrypt 798 EXIST::FUNCTION:DES |
| 791 | des_ofb_encrypt 798 | 791 | des_options 799 EXIST::FUNCTION:DES |
| 792 | des_options 799 | 792 | des_pcbc_encrypt 800 EXIST::FUNCTION:DES |
| 793 | des_pcbc_encrypt 800 | 793 | des_quad_cksum 801 EXIST::FUNCTION:DES |
| 794 | des_quad_cksum 801 | 794 | des_random_key 802 EXIST::FUNCTION:DES |
| 795 | des_random_key 802 | 795 | des_random_seed 803 EXIST::FUNCTION:DES |
| 796 | des_random_seed 803 | 796 | des_read_2passwords 804 EXIST::FUNCTION:DES |
| 797 | des_read_2passwords 804 | 797 | des_read_password 805 EXIST::FUNCTION:DES |
| 798 | des_read_password 805 | 798 | des_read_pw 806 EXIST::FUNCTION:DES |
| 799 | des_read_pw 806 | 799 | des_read_pw_string 807 EXIST::FUNCTION:DES |
| 800 | des_read_pw_string 807 | 800 | des_set_key 808 EXIST::FUNCTION:DES |
| 801 | des_set_key 808 | 801 | des_set_odd_parity 809 EXIST::FUNCTION:DES |
| 802 | des_set_odd_parity 809 | 802 | des_string_to_2keys 810 EXIST::FUNCTION:DES |
| 803 | des_string_to_2keys 810 | 803 | des_string_to_key 811 EXIST::FUNCTION:DES |
| 804 | des_string_to_key 811 | 804 | des_xcbc_encrypt 812 EXIST::FUNCTION:DES |
| 805 | des_xcbc_encrypt 812 | 805 | des_xwhite_in2out 813 EXIST::FUNCTION:DES |
| 806 | des_xwhite_in2out 813 | 806 | fcrypt_body 814 NOEXIST::FUNCTION: |
| 807 | fcrypt_body 814 | 807 | i2a_ASN1_INTEGER 815 EXIST::FUNCTION: |
| 808 | i2a_ASN1_INTEGER 815 | 808 | i2a_ASN1_OBJECT 816 EXIST::FUNCTION: |
| 809 | i2a_ASN1_OBJECT 816 | 809 | i2a_ASN1_STRING 817 EXIST::FUNCTION: |
| 810 | i2a_ASN1_STRING 817 | 810 | i2d_ASN1_BIT_STRING 818 EXIST::FUNCTION: |
| 811 | i2d_ASN1_BIT_STRING 818 | 811 | i2d_ASN1_BOOLEAN 819 EXIST::FUNCTION: |
| 812 | i2d_ASN1_BOOLEAN 819 | 812 | i2d_ASN1_HEADER 820 EXIST::FUNCTION: |
| 813 | i2d_ASN1_HEADER 820 | 813 | i2d_ASN1_IA5STRING 821 EXIST::FUNCTION: |
| 814 | i2d_ASN1_IA5STRING 821 | 814 | i2d_ASN1_INTEGER 822 EXIST::FUNCTION: |
| 815 | i2d_ASN1_INTEGER 822 | 815 | i2d_ASN1_OBJECT 823 EXIST::FUNCTION: |
| 816 | i2d_ASN1_OBJECT 823 | 816 | i2d_ASN1_OCTET_STRING 824 EXIST::FUNCTION: |
| 817 | i2d_ASN1_OCTET_STRING 824 | 817 | i2d_ASN1_PRINTABLE 825 EXIST::FUNCTION: |
| 818 | i2d_ASN1_PRINTABLE 825 | 818 | i2d_ASN1_SET 826 EXIST::FUNCTION: |
| 819 | i2d_ASN1_SET 826 | 819 | i2d_ASN1_TYPE 827 EXIST::FUNCTION: |
| 820 | i2d_ASN1_TYPE 827 | 820 | i2d_ASN1_UTCTIME 828 EXIST::FUNCTION: |
| 821 | i2d_ASN1_UTCTIME 828 | 821 | i2d_ASN1_bytes 829 EXIST::FUNCTION: |
| 822 | i2d_ASN1_bytes 829 | 822 | i2d_DHparams 830 EXIST::FUNCTION:DH |
| 823 | i2d_DHparams 830 | 823 | i2d_DSAPrivateKey 831 EXIST::FUNCTION:DSA |
| 824 | i2d_DSAPrivateKey 831 | 824 | i2d_DSAPrivateKey_bio 832 EXIST::FUNCTION:DSA |
| 825 | i2d_DSAPrivateKey_bio 832 | 825 | i2d_DSAPrivateKey_fp 833 EXIST::FUNCTION:DSA,FP_API |
| 826 | i2d_DSAPrivateKey_fp 833 | 826 | i2d_DSAPublicKey 834 EXIST::FUNCTION:DSA |
| 827 | i2d_DSAPublicKey 834 | 827 | i2d_DSAparams 835 EXIST::FUNCTION:DSA |
| 828 | i2d_DSAparams 835 | 828 | i2d_NETSCAPE_SPKAC 836 EXIST::FUNCTION: |
| 829 | i2d_NETSCAPE_SPKAC 836 | 829 | i2d_NETSCAPE_SPKI 837 EXIST::FUNCTION: |
| 830 | i2d_NETSCAPE_SPKI 837 | 830 | i2d_Netscape_RSA 838 EXIST::FUNCTION:RSA |
| 831 | i2d_Netscape_RSA 838 | 831 | i2d_PKCS7 839 EXIST::FUNCTION: |
| 832 | i2d_PKCS7 839 | 832 | i2d_PKCS7_DIGEST 840 EXIST::FUNCTION: |
| 833 | i2d_PKCS7_DIGEST 840 | 833 | i2d_PKCS7_ENCRYPT 841 EXIST::FUNCTION: |
| 834 | i2d_PKCS7_ENCRYPT 841 | 834 | i2d_PKCS7_ENC_CONTENT 842 EXIST::FUNCTION: |
| 835 | i2d_PKCS7_ENC_CONTENT 842 | 835 | i2d_PKCS7_ENVELOPE 843 EXIST::FUNCTION: |
| 836 | i2d_PKCS7_ENVELOPE 843 | 836 | i2d_PKCS7_ISSUER_AND_SERIAL 844 EXIST::FUNCTION: |
| 837 | i2d_PKCS7_ISSUER_AND_SERIAL 844 | 837 | i2d_PKCS7_RECIP_INFO 845 EXIST::FUNCTION: |
| 838 | i2d_PKCS7_RECIP_INFO 845 | 838 | i2d_PKCS7_SIGNED 846 EXIST::FUNCTION: |
| 839 | i2d_PKCS7_SIGNED 846 | 839 | i2d_PKCS7_SIGNER_INFO 847 EXIST::FUNCTION: |
| 840 | i2d_PKCS7_SIGNER_INFO 847 | 840 | i2d_PKCS7_SIGN_ENVELOPE 848 EXIST::FUNCTION: |
| 841 | i2d_PKCS7_SIGN_ENVELOPE 848 | 841 | i2d_PKCS7_bio 849 EXIST::FUNCTION: |
| 842 | i2d_PKCS7_bio 849 | 842 | i2d_PKCS7_fp 850 EXIST::FUNCTION:FP_API |
| 843 | i2d_PKCS7_fp 850 | 843 | i2d_PrivateKey 851 EXIST::FUNCTION: |
| 844 | i2d_PrivateKey 851 | 844 | i2d_PublicKey 852 EXIST::FUNCTION: |
| 845 | i2d_PublicKey 852 | 845 | i2d_RSAPrivateKey 853 EXIST::FUNCTION:RSA |
| 846 | i2d_RSAPrivateKey 853 | 846 | i2d_RSAPrivateKey_bio 854 EXIST::FUNCTION:RSA |
| 847 | i2d_RSAPrivateKey_bio 854 | 847 | i2d_RSAPrivateKey_fp 855 EXIST::FUNCTION:RSA,FP_API |
| 848 | i2d_RSAPrivateKey_fp 855 | 848 | i2d_RSAPublicKey 856 EXIST::FUNCTION:RSA |
| 849 | i2d_RSAPublicKey 856 | 849 | i2d_X509 857 EXIST::FUNCTION: |
| 850 | i2d_X509 857 | 850 | i2d_X509_ALGOR 858 EXIST::FUNCTION: |
| 851 | i2d_X509_ALGOR 858 | 851 | i2d_X509_ATTRIBUTE 859 EXIST::FUNCTION: |
| 852 | i2d_X509_ATTRIBUTE 859 | 852 | i2d_X509_CINF 860 EXIST::FUNCTION: |
| 853 | i2d_X509_CINF 860 | 853 | i2d_X509_CRL 861 EXIST::FUNCTION: |
| 854 | i2d_X509_CRL 861 | 854 | i2d_X509_CRL_INFO 862 EXIST::FUNCTION: |
| 855 | i2d_X509_CRL_INFO 862 | 855 | i2d_X509_CRL_bio 863 EXIST::FUNCTION: |
| 856 | i2d_X509_CRL_bio 863 | 856 | i2d_X509_CRL_fp 864 EXIST::FUNCTION:FP_API |
| 857 | i2d_X509_CRL_fp 864 | 857 | i2d_X509_EXTENSION 865 EXIST::FUNCTION: |
| 858 | i2d_X509_EXTENSION 865 | 858 | i2d_X509_NAME 866 EXIST::FUNCTION: |
| 859 | i2d_X509_NAME 866 | 859 | i2d_X509_NAME_ENTRY 867 EXIST::FUNCTION: |
| 860 | i2d_X509_NAME_ENTRY 867 | 860 | i2d_X509_PKEY 868 EXIST::FUNCTION: |
| 861 | i2d_X509_PKEY 868 | 861 | i2d_X509_PUBKEY 869 EXIST::FUNCTION: |
| 862 | i2d_X509_PUBKEY 869 | 862 | i2d_X509_REQ 870 EXIST::FUNCTION: |
| 863 | i2d_X509_REQ 870 | 863 | i2d_X509_REQ_INFO 871 EXIST::FUNCTION: |
| 864 | i2d_X509_REQ_INFO 871 | 864 | i2d_X509_REQ_bio 872 EXIST::FUNCTION: |
| 865 | i2d_X509_REQ_bio 872 | 865 | i2d_X509_REQ_fp 873 EXIST::FUNCTION:FP_API |
| 866 | i2d_X509_REQ_fp 873 | 866 | i2d_X509_REVOKED 874 EXIST::FUNCTION: |
| 867 | i2d_X509_REVOKED 874 | 867 | i2d_X509_SIG 875 EXIST::FUNCTION: |
| 868 | i2d_X509_SIG 875 | 868 | i2d_X509_VAL 876 EXIST::FUNCTION: |
| 869 | i2d_X509_VAL 876 | 869 | i2d_X509_bio 877 EXIST::FUNCTION: |
| 870 | i2d_X509_bio 877 | 870 | i2d_X509_fp 878 EXIST::FUNCTION:FP_API |
| 871 | i2d_X509_fp 878 | 871 | idea_cbc_encrypt 879 EXIST::FUNCTION:IDEA |
| 872 | idea_cbc_encrypt 879 | 872 | idea_cfb64_encrypt 880 EXIST::FUNCTION:IDEA |
| 873 | idea_cfb64_encrypt 880 | 873 | idea_ecb_encrypt 881 EXIST::FUNCTION:IDEA |
| 874 | idea_ecb_encrypt 881 | 874 | idea_encrypt 882 EXIST::FUNCTION:IDEA |
| 875 | idea_encrypt 882 | 875 | idea_ofb64_encrypt 883 EXIST::FUNCTION:IDEA |
| 876 | idea_ofb64_encrypt 883 | 876 | idea_options 884 EXIST::FUNCTION:IDEA |
| 877 | idea_options 884 | 877 | idea_set_decrypt_key 885 EXIST::FUNCTION:IDEA |
| 878 | idea_set_decrypt_key 885 | 878 | idea_set_encrypt_key 886 EXIST::FUNCTION:IDEA |
| 879 | idea_set_encrypt_key 886 | 879 | lh_delete 887 EXIST::FUNCTION: |
| 880 | lh_delete 887 | 880 | lh_doall 888 EXIST::FUNCTION: |
| 881 | lh_doall 888 | 881 | lh_doall_arg 889 EXIST::FUNCTION: |
| 882 | lh_doall_arg 889 | 882 | lh_free 890 EXIST::FUNCTION: |
| 883 | lh_free 890 | 883 | lh_insert 891 EXIST::FUNCTION: |
| 884 | lh_insert 891 | 884 | lh_new 892 EXIST::FUNCTION: |
| 885 | lh_new 892 | 885 | lh_node_stats 893 EXIST::FUNCTION:FP_API |
| 886 | lh_node_stats 893 | 886 | lh_node_stats_bio 894 EXIST::FUNCTION: |
| 887 | lh_node_stats_bio 894 | 887 | lh_node_usage_stats 895 EXIST::FUNCTION:FP_API |
| 888 | lh_node_usage_stats 895 | 888 | lh_node_usage_stats_bio 896 EXIST::FUNCTION: |
| 889 | lh_node_usage_stats_bio 896 | 889 | lh_retrieve 897 EXIST::FUNCTION: |
| 890 | lh_retrieve 897 | 890 | lh_stats 898 EXIST::FUNCTION:FP_API |
| 891 | lh_stats 898 | 891 | lh_stats_bio 899 EXIST::FUNCTION: |
| 892 | lh_stats_bio 899 | 892 | lh_strhash 900 EXIST::FUNCTION: |
| 893 | lh_strhash 900 | 893 | sk_delete 901 EXIST::FUNCTION: |
| 894 | sk_delete 901 | 894 | sk_delete_ptr 902 EXIST::FUNCTION: |
| 895 | sk_delete_ptr 902 | 895 | sk_dup 903 EXIST::FUNCTION: |
| 896 | sk_dup 903 | 896 | sk_find 904 EXIST::FUNCTION: |
| 897 | sk_find 904 | 897 | sk_free 905 EXIST::FUNCTION: |
| 898 | sk_free 905 | 898 | sk_insert 906 EXIST::FUNCTION: |
| 899 | sk_insert 906 | 899 | sk_new 907 EXIST::FUNCTION: |
| 900 | sk_new 907 | 900 | sk_pop 908 EXIST::FUNCTION: |
| 901 | sk_pop 908 | 901 | sk_pop_free 909 EXIST::FUNCTION: |
| 902 | sk_pop_free 909 | 902 | sk_push 910 EXIST::FUNCTION: |
| 903 | sk_push 910 | 903 | sk_set_cmp_func 911 EXIST::FUNCTION: |
| 904 | sk_set_cmp_func 911 | 904 | sk_shift 912 EXIST::FUNCTION: |
| 905 | sk_shift 912 | 905 | sk_unshift 913 EXIST::FUNCTION: |
| 906 | sk_unshift 913 | 906 | sk_zero 914 EXIST::FUNCTION: |
| 907 | sk_zero 914 | 907 | BIO_f_nbio_test 915 EXIST::FUNCTION: |
| 908 | BIO_f_nbio_test 915 | 908 | ASN1_TYPE_get 916 EXIST::FUNCTION: |
| 909 | ASN1_TYPE_get 916 | 909 | ASN1_TYPE_set 917 EXIST::FUNCTION: |
| 910 | ASN1_TYPE_set 917 | 910 | PKCS7_content_free 918 EXIST::FUNCTION: |
| 911 | PKCS7_content_free 918 | 911 | ERR_load_PKCS7_strings 919 EXIST::FUNCTION: |
| 912 | ERR_load_PKCS7_strings 919 | 912 | X509_find_by_issuer_and_serial 920 EXIST::FUNCTION: |
| 913 | X509_find_by_issuer_and_serial 920 | 913 | X509_find_by_subject 921 EXIST::FUNCTION: |
| 914 | X509_find_by_subject 921 | 914 | PKCS7_ctrl 927 EXIST::FUNCTION: |
| 915 | PKCS7_ctrl 927 | 915 | PKCS7_set_type 928 EXIST::FUNCTION: |
| 916 | PKCS7_set_type 928 | 916 | PKCS7_set_content 929 EXIST::FUNCTION: |
| 917 | PKCS7_set_content 929 | 917 | PKCS7_SIGNER_INFO_set 930 EXIST::FUNCTION: |
| 918 | PKCS7_SIGNER_INFO_set 930 | 918 | PKCS7_add_signer 931 EXIST::FUNCTION: |
| 919 | PKCS7_add_signer 931 | 919 | PKCS7_add_certificate 932 EXIST::FUNCTION: |
| 920 | PKCS7_add_certificate 932 | 920 | PKCS7_add_crl 933 EXIST::FUNCTION: |
| 921 | PKCS7_add_crl 933 | 921 | PKCS7_content_new 934 EXIST::FUNCTION: |
| 922 | PKCS7_content_new 934 | 922 | PKCS7_dataSign 935 NOEXIST::FUNCTION: |
| 923 | PKCS7_dataSign 935 | 923 | PKCS7_dataVerify 936 EXIST::FUNCTION: |
| 924 | PKCS7_dataVerify 936 | 924 | PKCS7_dataInit 937 EXIST::FUNCTION: |
| 925 | PKCS7_dataInit 937 | 925 | PKCS7_add_signature 938 EXIST::FUNCTION: |
| 926 | PKCS7_add_signature 938 | 926 | PKCS7_cert_from_signer_info 939 EXIST::FUNCTION: |
| 927 | PKCS7_cert_from_signer_info 939 | 927 | PKCS7_get_signer_info 940 EXIST::FUNCTION: |
| 928 | PKCS7_get_signer_info 940 | 928 | EVP_delete_alias 941 NOEXIST::FUNCTION: |
| 929 | EVP_delete_alias 941 | 929 | EVP_mdc2 942 EXIST::FUNCTION: |
| 930 | EVP_mdc2 942 | 930 | PEM_read_bio_RSAPublicKey 943 EXIST::FUNCTION:RSA |
| 931 | PEM_read_bio_RSAPublicKey 943 | 931 | PEM_write_bio_RSAPublicKey 944 EXIST::FUNCTION:RSA |
| 932 | PEM_write_bio_RSAPublicKey 944 | 932 | d2i_RSAPublicKey_bio 945 EXIST::FUNCTION:RSA |
| 933 | d2i_RSAPublicKey_bio 945 | 933 | i2d_RSAPublicKey_bio 946 EXIST::FUNCTION:RSA |
| 934 | i2d_RSAPublicKey_bio 946 | 934 | PEM_read_RSAPublicKey 947 EXIST:!WIN16:FUNCTION:RSA |
| 935 | PEM_read_RSAPublicKey 947 | 935 | PEM_write_RSAPublicKey 949 EXIST:!WIN16:FUNCTION:RSA |
| 936 | PEM_write_RSAPublicKey 949 | 936 | d2i_RSAPublicKey_fp 952 EXIST::FUNCTION:RSA,FP_API |
| 937 | d2i_RSAPublicKey_fp 952 | 937 | i2d_RSAPublicKey_fp 954 EXIST::FUNCTION:RSA,FP_API |
| 938 | i2d_RSAPublicKey_fp 954 | 938 | BIO_copy_next_retry 955 EXIST::FUNCTION: |
| 939 | BIO_copy_next_retry 955 | 939 | RSA_flags 956 EXIST::FUNCTION:RSA |
| 940 | RSA_flags 956 | 940 | X509_STORE_add_crl 957 EXIST::FUNCTION: |
| 941 | X509_STORE_add_crl 957 | 941 | X509_load_crl_file 958 EXIST::FUNCTION: |
| 942 | X509_load_crl_file 958 | 942 | EVP_rc2_40_cbc 959 EXIST::FUNCTION:RC2 |
| 943 | EVP_rc2_40_cbc 959 | 943 | EVP_rc4_40 960 EXIST::FUNCTION:RC4 |
| 944 | EVP_rc4_40 960 | 944 | EVP_CIPHER_CTX_init 961 EXIST::FUNCTION: |
| 945 | EVP_CIPHER_CTX_init 961 | 945 | HMAC 962 EXIST::FUNCTION:HMAC |
| 946 | HMAC 962 | 946 | HMAC_Init 963 EXIST::FUNCTION:HMAC |
| 947 | HMAC_Init 963 | 947 | HMAC_Update 964 EXIST::FUNCTION:HMAC |
| 948 | HMAC_Update 964 | 948 | HMAC_Final 965 EXIST::FUNCTION:HMAC |
| 949 | HMAC_Final 965 | 949 | ERR_get_next_error_library 966 EXIST::FUNCTION: |
| 950 | ERR_get_next_error_library 966 | 950 | EVP_PKEY_cmp_parameters 967 EXIST::FUNCTION: |
| 951 | EVP_PKEY_cmp_parameters 967 | 951 | HMAC_cleanup 968 EXIST::FUNCTION:HMAC |
| 952 | HMAC_cleanup 968 | 952 | BIO_ptr_ctrl 969 EXIST::FUNCTION: |
| 953 | BIO_ptr_ctrl 969 | 953 | BIO_new_file_internal 970 EXIST:WIN16:FUNCTION:FP_API |
| 954 | BIO_new_file_internal 970 | 954 | BIO_new_fp_internal 971 EXIST:WIN16:FUNCTION:FP_API |
| 955 | BIO_new_fp_internal 971 | 955 | BIO_s_file_internal 972 EXIST:WIN16:FUNCTION:FP_API |
| 956 | BIO_s_file_internal 972 | 956 | BN_BLINDING_convert 973 EXIST::FUNCTION: |
| 957 | BN_BLINDING_convert 973 | 957 | BN_BLINDING_invert 974 EXIST::FUNCTION: |
| 958 | BN_BLINDING_invert 974 | 958 | BN_BLINDING_update 975 EXIST::FUNCTION: |
| 959 | BN_BLINDING_update 975 | 959 | RSA_blinding_on 977 EXIST::FUNCTION:RSA |
| 960 | RSA_blinding_on 977 | 960 | RSA_blinding_off 978 EXIST::FUNCTION:RSA |
| 961 | RSA_blinding_off 978 | 961 | i2t_ASN1_OBJECT 979 EXIST::FUNCTION: |
| 962 | i2t_ASN1_OBJECT 979 | 962 | BN_BLINDING_new 980 EXIST::FUNCTION: |
| 963 | BN_BLINDING_new 980 | 963 | BN_BLINDING_free 981 EXIST::FUNCTION: |
| 964 | BN_BLINDING_free 981 | 964 | EVP_cast5_cbc 983 EXIST::FUNCTION:CAST |
| 965 | EVP_cast5_cbc 983 | 965 | EVP_cast5_cfb 984 EXIST::FUNCTION:CAST |
| 966 | EVP_cast5_cfb 984 | 966 | EVP_cast5_ecb 985 EXIST::FUNCTION:CAST |
| 967 | EVP_cast5_ecb 985 | 967 | EVP_cast5_ofb 986 EXIST::FUNCTION:CAST |
| 968 | EVP_cast5_ofb 986 | 968 | BF_decrypt 987 EXIST::FUNCTION:BF |
| 969 | BF_decrypt 987 | 969 | CAST_set_key 988 EXIST::FUNCTION:CAST |
| 970 | CAST_set_key 988 | 970 | CAST_encrypt 989 EXIST::FUNCTION:CAST |
| 971 | CAST_encrypt 989 | 971 | CAST_decrypt 990 EXIST::FUNCTION:CAST |
| 972 | CAST_decrypt 990 | 972 | CAST_ecb_encrypt 991 EXIST::FUNCTION:CAST |
| 973 | CAST_ecb_encrypt 991 | 973 | CAST_cbc_encrypt 992 EXIST::FUNCTION:CAST |
| 974 | CAST_cbc_encrypt 992 | 974 | CAST_cfb64_encrypt 993 EXIST::FUNCTION:CAST |
| 975 | CAST_cfb64_encrypt 993 | 975 | CAST_ofb64_encrypt 994 EXIST::FUNCTION:CAST |
| 976 | CAST_ofb64_encrypt 994 | 976 | RC2_decrypt 995 EXIST::FUNCTION:RC2 |
| 977 | RC2_decrypt 995 | 977 | OBJ_create_objects 997 EXIST::FUNCTION: |
| 978 | OBJ_create_objects 997 | 978 | BN_exp 998 EXIST::FUNCTION: |
| 979 | BN_exp 998 | 979 | BN_mul_word 999 EXIST::FUNCTION: |
| 980 | BN_mul_word 999 | 980 | BN_sub_word 1000 EXIST::FUNCTION: |
| 981 | BN_sub_word 1000 | 981 | BN_dec2bn 1001 EXIST::FUNCTION: |
| 982 | BN_dec2bn 1001 | 982 | BN_bn2dec 1002 EXIST::FUNCTION: |
| 983 | BN_bn2dec 1002 | 983 | BIO_ghbn_ctrl 1003 EXIST::FUNCTION: |
| 984 | BIO_ghbn_ctrl 1003 | 984 | CRYPTO_free_ex_data 1004 EXIST::FUNCTION: |
| 985 | CRYPTO_free_ex_data 1004 | 985 | CRYPTO_get_ex_data 1005 EXIST::FUNCTION: |
| 986 | CRYPTO_get_ex_data 1005 | 986 | CRYPTO_set_ex_data 1007 EXIST::FUNCTION: |
| 987 | CRYPTO_set_ex_data 1007 | 987 | ERR_load_CRYPTO_strings 1009 EXIST:!WIN16,!VMS:FUNCTION: |
| 988 | ERR_load_CRYPTO_strings 1009 | 988 | ERR_load_CRYPTOlib_strings 1009 EXIST:WIN16,VMS:FUNCTION: |
| 989 | ERR_load_CRYPTOlib_strings 1009 | 989 | EVP_PKEY_bits 1010 EXIST::FUNCTION: |
| 990 | EVP_PKEY_bits 1010 | 990 | MD5_Transform 1011 EXIST::FUNCTION:MD5 |
| 991 | MD5_Transform 1011 | 991 | SHA1_Transform 1012 EXIST::FUNCTION:SHA |
| 992 | SHA1_Transform 1012 | 992 | SHA_Transform 1013 EXIST::FUNCTION:SHA |
| 993 | SHA_Transform 1013 | 993 | X509_STORE_CTX_get_chain 1014 EXIST::FUNCTION: |
| 994 | X509_STORE_CTX_get_chain 1014 | 994 | X509_STORE_CTX_get_current_cert 1015 EXIST::FUNCTION: |
| 995 | X509_STORE_CTX_get_current_cert 1015 | 995 | X509_STORE_CTX_get_error 1016 EXIST::FUNCTION: |
| 996 | X509_STORE_CTX_get_error 1016 | 996 | X509_STORE_CTX_get_error_depth 1017 EXIST::FUNCTION: |
| 997 | X509_STORE_CTX_get_error_depth 1017 | 997 | X509_STORE_CTX_get_ex_data 1018 EXIST::FUNCTION: |
| 998 | X509_STORE_CTX_get_ex_data 1018 | 998 | X509_STORE_CTX_set_cert 1020 EXIST::FUNCTION: |
| 999 | X509_STORE_CTX_set_cert 1020 | 999 | X509_STORE_CTX_set_chain 1021 EXIST::FUNCTION: |
| 1000 | X509_STORE_CTX_set_chain 1021 | 1000 | X509_STORE_CTX_set_error 1022 EXIST::FUNCTION: |
| 1001 | X509_STORE_CTX_set_error 1022 | 1001 | X509_STORE_CTX_set_ex_data 1023 EXIST::FUNCTION: |
| 1002 | X509_STORE_CTX_set_ex_data 1023 | 1002 | CRYPTO_dup_ex_data 1025 EXIST::FUNCTION: |
| 1003 | CRYPTO_dup_ex_data 1025 | 1003 | CRYPTO_get_new_lockid 1026 EXIST::FUNCTION: |
| 1004 | CRYPTO_get_new_lockid 1026 | 1004 | CRYPTO_new_ex_data 1027 EXIST::FUNCTION: |
| 1005 | CRYPTO_new_ex_data 1027 | 1005 | RSA_set_ex_data 1028 EXIST::FUNCTION:RSA |
| 1006 | RSA_set_ex_data 1028 | 1006 | RSA_get_ex_data 1029 EXIST::FUNCTION:RSA |
| 1007 | RSA_get_ex_data 1029 | 1007 | RSA_get_ex_new_index 1030 EXIST::FUNCTION:RSA |
| 1008 | RSA_get_ex_new_index 1030 | 1008 | RSA_padding_add_PKCS1_type_1 1031 EXIST::FUNCTION:RSA |
| 1009 | RSA_padding_add_PKCS1_type_1 1031 | 1009 | RSA_padding_add_PKCS1_type_2 1032 EXIST::FUNCTION:RSA |
| 1010 | RSA_padding_add_PKCS1_type_2 1032 | 1010 | RSA_padding_add_SSLv23 1033 EXIST::FUNCTION:RSA |
| 1011 | RSA_padding_add_SSLv23 1033 | 1011 | RSA_padding_add_none 1034 EXIST::FUNCTION:RSA |
| 1012 | RSA_padding_add_none 1034 | 1012 | RSA_padding_check_PKCS1_type_1 1035 EXIST::FUNCTION:RSA |
| 1013 | RSA_padding_check_PKCS1_type_1 1035 | 1013 | RSA_padding_check_PKCS1_type_2 1036 EXIST::FUNCTION:RSA |
| 1014 | RSA_padding_check_PKCS1_type_2 1036 | 1014 | RSA_padding_check_SSLv23 1037 EXIST::FUNCTION:RSA |
| 1015 | RSA_padding_check_SSLv23 1037 | 1015 | RSA_padding_check_none 1038 EXIST::FUNCTION:RSA |
| 1016 | RSA_padding_check_none 1038 | 1016 | bn_add_words 1039 EXIST::FUNCTION: |
| 1017 | bn_add_words 1039 | 1017 | d2i_Netscape_RSA_2 1040 EXIST::FUNCTION:RSA |
| 1018 | d2i_Netscape_RSA_2 1040 | 1018 | CRYPTO_get_ex_new_index 1041 EXIST::FUNCTION: |
| 1019 | CRYPTO_get_ex_new_index 1041 | 1019 | RIPEMD160_Init 1042 EXIST::FUNCTION:RIPEMD |
| 1020 | RIPEMD160_Init 1042 | 1020 | RIPEMD160_Update 1043 EXIST::FUNCTION:RIPEMD |
| 1021 | RIPEMD160_Update 1043 | 1021 | RIPEMD160_Final 1044 EXIST::FUNCTION:RIPEMD |
| 1022 | RIPEMD160_Final 1044 | 1022 | RIPEMD160 1045 EXIST::FUNCTION:RIPEMD |
| 1023 | RIPEMD160 1045 | 1023 | RIPEMD160_Transform 1046 EXIST::FUNCTION:RIPEMD |
| 1024 | RIPEMD160_Transform 1046 | 1024 | RC5_32_set_key 1047 EXIST::FUNCTION:RC5 |
| 1025 | RC5_32_set_key 1047 | 1025 | RC5_32_ecb_encrypt 1048 EXIST::FUNCTION:RC5 |
| 1026 | RC5_32_ecb_encrypt 1048 | 1026 | RC5_32_encrypt 1049 EXIST::FUNCTION:RC5 |
| 1027 | RC5_32_encrypt 1049 | 1027 | RC5_32_decrypt 1050 EXIST::FUNCTION:RC5 |
| 1028 | RC5_32_decrypt 1050 | 1028 | RC5_32_cbc_encrypt 1051 EXIST::FUNCTION:RC5 |
| 1029 | RC5_32_cbc_encrypt 1051 | 1029 | RC5_32_cfb64_encrypt 1052 EXIST::FUNCTION:RC5 |
| 1030 | RC5_32_cfb64_encrypt 1052 | 1030 | RC5_32_ofb64_encrypt 1053 EXIST::FUNCTION:RC5 |
| 1031 | RC5_32_ofb64_encrypt 1053 | 1031 | BN_bn2mpi 1058 EXIST::FUNCTION: |
| 1032 | BN_bn2mpi 1058 | 1032 | BN_mpi2bn 1059 EXIST::FUNCTION: |
| 1033 | BN_mpi2bn 1059 | 1033 | ASN1_BIT_STRING_get_bit 1060 EXIST::FUNCTION: |
| 1034 | ASN1_BIT_STRING_get_bit 1060 | 1034 | ASN1_BIT_STRING_set_bit 1061 EXIST::FUNCTION: |
| 1035 | ASN1_BIT_STRING_set_bit 1061 | 1035 | BIO_get_ex_data 1062 EXIST::FUNCTION: |
| 1036 | BIO_get_ex_data 1062 | 1036 | BIO_get_ex_new_index 1063 EXIST::FUNCTION: |
| 1037 | BIO_get_ex_new_index 1063 | 1037 | BIO_set_ex_data 1064 EXIST::FUNCTION: |
| 1038 | BIO_set_ex_data 1064 | 1038 | X509v3_get_key_usage 1066 NOEXIST::FUNCTION: |
| 1039 | X509_STORE_CTX_get_ex_new_index 1065 | 1039 | X509v3_set_key_usage 1067 NOEXIST::FUNCTION: |
| 1040 | X509v3_get_key_usage 1066 | 1040 | a2i_X509v3_key_usage 1068 NOEXIST::FUNCTION: |
| 1041 | X509v3_set_key_usage 1067 | 1041 | i2a_X509v3_key_usage 1069 NOEXIST::FUNCTION: |
| 1042 | a2i_X509v3_key_usage 1068 | 1042 | EVP_PKEY_decrypt 1070 EXIST::FUNCTION: |
| 1043 | i2a_X509v3_key_usage 1069 | 1043 | EVP_PKEY_encrypt 1071 EXIST::FUNCTION: |
| 1044 | EVP_PKEY_decrypt 1070 | 1044 | PKCS7_RECIP_INFO_set 1072 EXIST::FUNCTION: |
| 1045 | EVP_PKEY_encrypt 1071 | 1045 | PKCS7_add_recipient 1073 EXIST::FUNCTION: |
| 1046 | PKCS7_RECIP_INFO_set 1072 | 1046 | PKCS7_add_recipient_info 1074 EXIST::FUNCTION: |
| 1047 | PKCS7_add_recipient 1073 | 1047 | PKCS7_set_cipher 1075 EXIST::FUNCTION: |
| 1048 | PKCS7_add_recipient_info 1074 | 1048 | ASN1_TYPE_get_int_octetstring 1076 EXIST::FUNCTION: |
| 1049 | PKCS7_set_cipher 1075 | 1049 | ASN1_TYPE_get_octetstring 1077 EXIST::FUNCTION: |
| 1050 | ASN1_TYPE_get_int_octetstring 1076 | 1050 | ASN1_TYPE_set_int_octetstring 1078 EXIST::FUNCTION: |
| 1051 | ASN1_TYPE_get_octetstring 1077 | 1051 | ASN1_TYPE_set_octetstring 1079 EXIST::FUNCTION: |
| 1052 | ASN1_TYPE_set_int_octetstring 1078 | 1052 | ASN1_UTCTIME_set_string 1080 EXIST::FUNCTION: |
| 1053 | ASN1_TYPE_set_octetstring 1079 | 1053 | ERR_add_error_data 1081 EXIST::FUNCTION: |
| 1054 | ASN1_UTCTIME_set_string 1080 | 1054 | ERR_set_error_data 1082 EXIST::FUNCTION: |
| 1055 | ERR_add_error_data 1081 | 1055 | EVP_CIPHER_asn1_to_param 1083 EXIST::FUNCTION: |
| 1056 | ERR_set_error_data 1082 | 1056 | EVP_CIPHER_param_to_asn1 1084 EXIST::FUNCTION: |
| 1057 | EVP_CIPHER_asn1_to_param 1083 | 1057 | EVP_CIPHER_get_asn1_iv 1085 EXIST::FUNCTION: |
| 1058 | EVP_CIPHER_param_to_asn1 1084 | 1058 | EVP_CIPHER_set_asn1_iv 1086 EXIST::FUNCTION: |
| 1059 | EVP_CIPHER_get_asn1_iv 1085 | 1059 | EVP_rc5_32_12_16_cbc 1087 EXIST::FUNCTION:RC5 |
| 1060 | EVP_CIPHER_set_asn1_iv 1086 | 1060 | EVP_rc5_32_12_16_cfb 1088 EXIST::FUNCTION:RC5 |
| 1061 | EVP_rc5_32_12_16_cbc 1087 | 1061 | EVP_rc5_32_12_16_ecb 1089 EXIST::FUNCTION:RC5 |
| 1062 | EVP_rc5_32_12_16_cfb 1088 | 1062 | EVP_rc5_32_12_16_ofb 1090 EXIST::FUNCTION:RC5 |
| 1063 | EVP_rc5_32_12_16_ecb 1089 | 1063 | asn1_add_error 1091 EXIST::FUNCTION: |
| 1064 | EVP_rc5_32_12_16_ofb 1090 | 1064 | d2i_ASN1_BMPSTRING 1092 EXIST::FUNCTION: |
| 1065 | asn1_add_error 1091 | 1065 | i2d_ASN1_BMPSTRING 1093 EXIST::FUNCTION: |
| 1066 | d2i_ASN1_BMPSTRING 1092 | 1066 | BIO_f_ber 1094 NOEXIST::FUNCTION: |
| 1067 | i2d_ASN1_BMPSTRING 1093 | 1067 | BN_init 1095 EXIST::FUNCTION: |
| 1068 | BIO_f_ber 1094 | 1068 | COMP_CTX_new 1096 EXIST::FUNCTION: |
| 1069 | BN_init 1095 | 1069 | COMP_CTX_free 1097 EXIST::FUNCTION: |
| 1070 | COMP_CTX_new 1096 | 1070 | COMP_CTX_compress_block 1098 NOEXIST::FUNCTION: |
| 1071 | COMP_CTX_free 1097 | 1071 | COMP_CTX_expand_block 1099 NOEXIST::FUNCTION: |
| 1072 | COMP_CTX_compress_block 1098 | 1072 | X509_STORE_CTX_get_ex_new_index 1100 EXIST::FUNCTION: |
| 1073 | COMP_CTX_expand_block 1099 | 1073 | OBJ_NAME_add 1101 EXIST::FUNCTION: |
| 1074 | X509_STORE_CTX_get_ex_new_index 1100 | 1074 | BIO_socket_nbio 1102 EXIST::FUNCTION: |
| 1075 | OBJ_NAME_add 1101 | 1075 | EVP_rc2_64_cbc 1103 EXIST::FUNCTION:RC2 |
| 1076 | BIO_socket_nbio 1102 | 1076 | OBJ_NAME_cleanup 1104 EXIST::FUNCTION: |
| 1077 | EVP_rc2_64_cbc 1103 | 1077 | OBJ_NAME_get 1105 EXIST::FUNCTION: |
| 1078 | OBJ_NAME_cleanup 1104 | 1078 | OBJ_NAME_init 1106 EXIST::FUNCTION: |
| 1079 | OBJ_NAME_get 1105 | 1079 | OBJ_NAME_new_index 1107 EXIST::FUNCTION: |
| 1080 | OBJ_NAME_init 1106 | 1080 | OBJ_NAME_remove 1108 EXIST::FUNCTION: |
| 1081 | OBJ_NAME_new_index 1107 | 1081 | BN_MONT_CTX_copy 1109 EXIST::FUNCTION: |
| 1082 | OBJ_NAME_remove 1108 | 1082 | BIO_new_socks4a_connect 1110 NOEXIST::FUNCTION: |
| 1083 | BN_MONT_CTX_copy 1109 | 1083 | BIO_s_socks4a_connect 1111 NOEXIST::FUNCTION: |
| 1084 | BIO_new_socks4a_connect 1110 | 1084 | PROXY_set_connect_mode 1112 NOEXIST::FUNCTION: |
| 1085 | BIO_s_socks4a_connect 1111 | 1085 | RAND_SSLeay 1113 EXIST::FUNCTION: |
| 1086 | PROXY_set_connect_mode 1112 | 1086 | RAND_set_rand_method 1114 EXIST::FUNCTION: |
| 1087 | RAND_SSLeay 1113 | 1087 | RSA_memory_lock 1115 EXIST::FUNCTION:RSA |
| 1088 | RAND_set_rand_method 1114 | 1088 | bn_sub_words 1116 EXIST::FUNCTION: |
| 1089 | RSA_memory_lock 1115 | 1089 | bn_mul_normal 1117 NOEXIST::FUNCTION: |
| 1090 | bn_sub_words 1116 | 1090 | bn_mul_comba8 1118 NOEXIST::FUNCTION: |
| 1091 | bn_mul_normal 1117 | 1091 | bn_mul_comba4 1119 NOEXIST::FUNCTION: |
| 1092 | bn_mul_comba8 1118 | 1092 | bn_sqr_normal 1120 NOEXIST::FUNCTION: |
| 1093 | bn_mul_comba4 1119 | 1093 | bn_sqr_comba8 1121 NOEXIST::FUNCTION: |
| 1094 | bn_sqr_normal 1120 | 1094 | bn_sqr_comba4 1122 NOEXIST::FUNCTION: |
| 1095 | bn_sqr_comba8 1121 | 1095 | bn_cmp_words 1123 NOEXIST::FUNCTION: |
| 1096 | bn_sqr_comba4 1122 | 1096 | bn_mul_recursive 1124 NOEXIST::FUNCTION: |
| 1097 | bn_cmp_words 1123 | 1097 | bn_mul_part_recursive 1125 NOEXIST::FUNCTION: |
| 1098 | bn_mul_recursive 1124 | 1098 | bn_sqr_recursive 1126 NOEXIST::FUNCTION: |
| 1099 | bn_mul_part_recursive 1125 | 1099 | bn_mul_low_normal 1127 NOEXIST::FUNCTION: |
| 1100 | bn_sqr_recursive 1126 | 1100 | BN_RECP_CTX_init 1128 EXIST::FUNCTION: |
| 1101 | bn_mul_low_normal 1127 | 1101 | BN_RECP_CTX_new 1129 EXIST::FUNCTION: |
| 1102 | BN_RECP_CTX_init 1128 | 1102 | BN_RECP_CTX_free 1130 EXIST::FUNCTION: |
| 1103 | BN_RECP_CTX_new 1129 | 1103 | BN_RECP_CTX_set 1131 EXIST::FUNCTION: |
| 1104 | BN_RECP_CTX_free 1130 | 1104 | BN_mod_mul_reciprocal 1132 EXIST::FUNCTION: |
| 1105 | BN_RECP_CTX_set 1131 | 1105 | BN_mod_exp_recp 1133 EXIST::FUNCTION: |
| 1106 | BN_mod_mul_reciprocal 1132 | 1106 | BN_div_recp 1134 EXIST::FUNCTION: |
| 1107 | BN_mod_exp_recp 1133 | 1107 | BN_CTX_init 1135 EXIST::FUNCTION: |
| 1108 | BN_div_recp 1134 | 1108 | BN_MONT_CTX_init 1136 EXIST::FUNCTION: |
| 1109 | BN_CTX_init 1135 | 1109 | RAND_get_rand_method 1137 EXIST::FUNCTION: |
| 1110 | BN_MONT_CTX_init 1136 | 1110 | PKCS7_add_attribute 1138 EXIST::FUNCTION: |
| 1111 | RAND_get_rand_method 1137 | 1111 | PKCS7_add_signed_attribute 1139 EXIST::FUNCTION: |
| 1112 | PKCS7_add_attribute 1138 | 1112 | PKCS7_digest_from_attributes 1140 EXIST::FUNCTION: |
| 1113 | PKCS7_add_signed_attribute 1139 | 1113 | PKCS7_get_attribute 1141 EXIST::FUNCTION: |
| 1114 | PKCS7_digest_from_attributes 1140 | 1114 | PKCS7_get_issuer_and_serial 1142 EXIST::FUNCTION: |
| 1115 | PKCS7_get_attribute 1141 | 1115 | PKCS7_get_signed_attribute 1143 EXIST::FUNCTION: |
| 1116 | PKCS7_get_issuer_and_serial 1142 | 1116 | COMP_compress_block 1144 EXIST::FUNCTION: |
| 1117 | PKCS7_get_signed_attribute 1143 | 1117 | COMP_expand_block 1145 EXIST::FUNCTION: |
| 1118 | COMP_compress_block 1144 | 1118 | COMP_rle 1146 EXIST::FUNCTION: |
| 1119 | COMP_expand_block 1145 | 1119 | COMP_zlib 1147 EXIST::FUNCTION: |
| 1120 | COMP_rle 1146 | 1120 | ms_time_diff 1148 EXIST::FUNCTION: |
| 1121 | COMP_zlib 1147 | 1121 | ms_time_new 1149 EXIST::FUNCTION: |
| 1122 | ms_time_diff 1148 | 1122 | ms_time_free 1150 EXIST::FUNCTION: |
| 1123 | ms_time_new 1149 | 1123 | ms_time_cmp 1151 EXIST::FUNCTION: |
| 1124 | ms_time_free 1150 | 1124 | ms_time_get 1152 EXIST::FUNCTION: |
| 1125 | ms_time_cmp 1151 | 1125 | PKCS7_set_attributes 1153 EXIST::FUNCTION: |
| 1126 | ms_time_get 1152 | 1126 | PKCS7_set_signed_attributes 1154 EXIST::FUNCTION: |
| 1127 | PKCS7_set_attributes 1153 | 1127 | X509_ATTRIBUTE_create 1155 EXIST::FUNCTION: |
| 1128 | PKCS7_set_signed_attributes 1154 | 1128 | X509_ATTRIBUTE_dup 1156 EXIST::FUNCTION: |
| 1129 | X509_ATTRIBUTE_create 1155 | 1129 | ASN1_GENERALIZEDTIME_check 1157 EXIST::FUNCTION: |
| 1130 | X509_ATTRIBUTE_dup 1156 | 1130 | ASN1_GENERALIZEDTIME_print 1158 EXIST::FUNCTION: |
| 1131 | ASN1_GENERALIZEDTIME_check 1157 | 1131 | ASN1_GENERALIZEDTIME_set 1159 EXIST::FUNCTION: |
| 1132 | ASN1_GENERALIZEDTIME_print 1158 | 1132 | ASN1_GENERALIZEDTIME_set_string 1160 EXIST::FUNCTION: |
| 1133 | ASN1_GENERALIZEDTIME_set 1159 | 1133 | ASN1_TIME_print 1161 EXIST::FUNCTION: |
| 1134 | ASN1_GENERALIZEDTIME_set_string 1160 | 1134 | BASIC_CONSTRAINTS_free 1162 EXIST::FUNCTION: |
| 1135 | ASN1_TIME_print 1161 | 1135 | BASIC_CONSTRAINTS_new 1163 EXIST::FUNCTION: |
| 1136 | BASIC_CONSTRAINTS_free 1162 | 1136 | ERR_load_X509V3_strings 1164 EXIST::FUNCTION: |
| 1137 | BASIC_CONSTRAINTS_new 1163 | 1137 | NETSCAPE_CERT_SEQUENCE_free 1165 EXIST::FUNCTION: |
| 1138 | ERR_load_X509V3_strings 1164 | 1138 | NETSCAPE_CERT_SEQUENCE_new 1166 EXIST::FUNCTION: |
| 1139 | NETSCAPE_CERT_SEQUENCE_free 1165 | 1139 | OBJ_txt2obj 1167 EXIST::FUNCTION: |
| 1140 | NETSCAPE_CERT_SEQUENCE_new 1166 | 1140 | PEM_read_NETSCAPE_CERT_SEQUENCE 1168 EXIST:!WIN16:FUNCTION: |
| 1141 | OBJ_txt2obj 1167 | 1141 | PEM_read_bio_NETSCAPE_CERT_SEQUENCE 1169 EXIST::FUNCTION: |
| 1142 | PEM_read_NETSCAPE_CERT_SEQUENCE 1168 | 1142 | PEM_write_NETSCAPE_CERT_SEQUENCE 1170 EXIST:!WIN16:FUNCTION: |
| 1143 | PEM_read_bio_NETSCAPE_CERT_SEQUENCE 1169 | 1143 | PEM_write_bio_NETSCAPE_CERT_SEQUENCE 1171 EXIST::FUNCTION: |
| 1144 | PEM_write_NETSCAPE_CERT_SEQUENCE 1170 | 1144 | X509V3_EXT_add 1172 EXIST::FUNCTION: |
| 1145 | PEM_write_bio_NETSCAPE_CERT_SEQUENCE 1171 | 1145 | X509V3_EXT_add_alias 1173 EXIST::FUNCTION: |
| 1146 | X509V3_EXT_add 1172 | 1146 | X509V3_EXT_add_conf 1174 EXIST::FUNCTION: |
| 1147 | X509V3_EXT_add_alias 1173 | 1147 | X509V3_EXT_cleanup 1175 EXIST::FUNCTION: |
| 1148 | X509V3_EXT_add_conf 1174 | 1148 | X509V3_EXT_conf 1176 EXIST::FUNCTION: |
| 1149 | X509V3_EXT_cleanup 1175 | 1149 | X509V3_EXT_conf_nid 1177 EXIST::FUNCTION: |
| 1150 | X509V3_EXT_conf 1176 | 1150 | X509V3_EXT_get 1178 EXIST::FUNCTION: |
| 1151 | X509V3_EXT_conf_nid 1177 | 1151 | X509V3_EXT_get_nid 1179 EXIST::FUNCTION: |
| 1152 | X509V3_EXT_get 1178 | 1152 | X509V3_EXT_print 1180 EXIST::FUNCTION: |
| 1153 | X509V3_EXT_get_nid 1179 | 1153 | X509V3_EXT_print_fp 1181 EXIST::FUNCTION: |
| 1154 | X509V3_EXT_print 1180 | 1154 | X509V3_add_standard_extensions 1182 EXIST::FUNCTION: |
| 1155 | X509V3_EXT_print_fp 1181 | 1155 | X509V3_add_value 1183 EXIST::FUNCTION: |
| 1156 | X509V3_add_standard_extensions 1182 | 1156 | X509V3_add_value_bool 1184 EXIST::FUNCTION: |
| 1157 | X509V3_add_value 1183 | 1157 | X509V3_add_value_int 1185 EXIST::FUNCTION: |
| 1158 | X509V3_add_value_bool 1184 | 1158 | X509V3_conf_free 1186 EXIST::FUNCTION: |
| 1159 | X509V3_add_value_int 1185 | 1159 | X509V3_get_value_bool 1187 EXIST::FUNCTION: |
| 1160 | X509V3_conf_free 1186 | 1160 | X509V3_get_value_int 1188 EXIST::FUNCTION: |
| 1161 | X509V3_get_value_bool 1187 | 1161 | X509V3_parse_list 1189 EXIST::FUNCTION: |
| 1162 | X509V3_get_value_int 1188 | 1162 | d2i_ASN1_GENERALIZEDTIME 1190 EXIST::FUNCTION: |
| 1163 | X509V3_parse_list 1189 | 1163 | d2i_ASN1_TIME 1191 EXIST::FUNCTION: |
| 1164 | d2i_ASN1_GENERALIZEDTIME 1190 | 1164 | d2i_BASIC_CONSTRAINTS 1192 EXIST::FUNCTION: |
| 1165 | d2i_ASN1_TIME 1191 | 1165 | d2i_NETSCAPE_CERT_SEQUENCE 1193 EXIST::FUNCTION: |
| 1166 | d2i_BASIC_CONSTRAINTS 1192 | 1166 | d2i_ext_ku 1194 EXIST::FUNCTION: |
| 1167 | d2i_NETSCAPE_CERT_SEQUENCE 1193 | 1167 | ext_ku_free 1195 EXIST::FUNCTION: |
| 1168 | d2i_ext_ku 1194 | 1168 | ext_ku_new 1196 EXIST::FUNCTION: |
| 1169 | ext_ku_free 1195 | 1169 | i2d_ASN1_GENERALIZEDTIME 1197 EXIST::FUNCTION: |
| 1170 | ext_ku_new 1196 | 1170 | i2d_ASN1_TIME 1198 EXIST::FUNCTION: |
| 1171 | i2d_ASN1_GENERALIZEDTIME 1197 | 1171 | i2d_BASIC_CONSTRAINTS 1199 EXIST::FUNCTION: |
| 1172 | i2d_ASN1_TIME 1198 | 1172 | i2d_NETSCAPE_CERT_SEQUENCE 1200 EXIST::FUNCTION: |
| 1173 | i2d_BASIC_CONSTRAINTS 1199 | 1173 | i2d_ext_ku 1201 EXIST::FUNCTION: |
| 1174 | i2d_NETSCAPE_CERT_SEQUENCE 1200 | 1174 | EVP_MD_CTX_copy 1202 EXIST::FUNCTION: |
| 1175 | i2d_ext_ku 1201 | 1175 | i2d_ASN1_ENUMERATED 1203 EXIST::FUNCTION: |
| 1176 | EVP_MD_CTX_copy 1202 | 1176 | d2i_ASN1_ENUMERATED 1204 EXIST::FUNCTION: |
| 1177 | i2d_ASN1_ENUMERATED 1203 | 1177 | ASN1_ENUMERATED_set 1205 EXIST::FUNCTION: |
| 1178 | d2i_ASN1_ENUMERATED 1204 | 1178 | ASN1_ENUMERATED_get 1206 EXIST::FUNCTION: |
| 1179 | ASN1_ENUMERATED_set 1205 | 1179 | BN_to_ASN1_ENUMERATED 1207 EXIST::FUNCTION: |
| 1180 | ASN1_ENUMERATED_get 1206 | 1180 | ASN1_ENUMERATED_to_BN 1208 EXIST::FUNCTION: |
| 1181 | BN_to_ASN1_ENUMERATED 1207 | 1181 | i2a_ASN1_ENUMERATED 1209 EXIST::FUNCTION: |
| 1182 | ASN1_ENUMERATED_to_BN 1208 | 1182 | a2i_ASN1_ENUMERATED 1210 EXIST::FUNCTION: |
| 1183 | i2a_ASN1_ENUMERATED 1209 | 1183 | i2d_GENERAL_NAME 1211 EXIST::FUNCTION: |
| 1184 | a2i_ASN1_ENUMERATED 1210 | 1184 | d2i_GENERAL_NAME 1212 EXIST::FUNCTION: |
| 1185 | i2d_GENERAL_NAME 1211 | 1185 | GENERAL_NAME_new 1213 EXIST::FUNCTION: |
| 1186 | d2i_GENERAL_NAME 1212 | 1186 | GENERAL_NAME_free 1214 EXIST::FUNCTION: |
| 1187 | GENERAL_NAME_new 1213 | 1187 | GENERAL_NAMES_new 1215 EXIST::FUNCTION: |
| 1188 | GENERAL_NAME_free 1214 | 1188 | GENERAL_NAMES_free 1216 EXIST::FUNCTION: |
| 1189 | GENERAL_NAMES_new 1215 | 1189 | d2i_GENERAL_NAMES 1217 EXIST::FUNCTION: |
| 1190 | GENERAL_NAMES_free 1216 | 1190 | i2d_GENERAL_NAMES 1218 EXIST::FUNCTION: |
| 1191 | d2i_GENERAL_NAMES 1217 | 1191 | i2v_GENERAL_NAMES 1219 EXIST::FUNCTION: |
| 1192 | i2d_GENERAL_NAMES 1218 | 1192 | i2s_ASN1_OCTET_STRING 1220 EXIST::FUNCTION: |
| 1193 | i2v_GENERAL_NAMES 1219 | 1193 | s2i_ASN1_OCTET_STRING 1221 EXIST::FUNCTION: |
| 1194 | i2s_ASN1_OCTET_STRING 1220 | 1194 | X509V3_EXT_check_conf 1222 NOEXIST::FUNCTION: |
| 1195 | s2i_ASN1_OCTET_STRING 1221 | 1195 | hex_to_string 1223 EXIST::FUNCTION: |
| 1196 | X509V3_EXT_check_conf 1222 | 1196 | string_to_hex 1224 EXIST::FUNCTION: |
| 1197 | hex_to_string 1223 | 1197 | des_ede3_cbcm_encrypt 1225 EXIST::FUNCTION:DES |
| 1198 | string_to_hex 1224 | 1198 | RSA_padding_add_PKCS1_OAEP 1226 EXIST::FUNCTION:RSA |
| 1199 | des_ede3_cbcm_encrypt 1225 | 1199 | RSA_padding_check_PKCS1_OAEP 1227 EXIST::FUNCTION:RSA |
| 1200 | RSA_padding_add_PKCS1_OAEP 1226 | 1200 | X509_CRL_print_fp 1228 EXIST::FUNCTION:FP_API |
| 1201 | RSA_padding_check_PKCS1_OAEP 1227 | 1201 | X509_CRL_print 1229 EXIST::FUNCTION: |
| 1202 | X509_CRL_print_fp 1228 | 1202 | i2v_GENERAL_NAME 1230 EXIST::FUNCTION: |
| 1203 | X509_CRL_print 1229 | 1203 | v2i_GENERAL_NAME 1231 EXIST::FUNCTION: |
| 1204 | i2v_GENERAL_NAME 1230 | 1204 | i2d_PKEY_USAGE_PERIOD 1232 EXIST::FUNCTION: |
| 1205 | v2i_GENERAL_NAME 1231 | 1205 | d2i_PKEY_USAGE_PERIOD 1233 EXIST::FUNCTION: |
| 1206 | i2d_PKEY_USAGE_PERIOD 1232 | 1206 | PKEY_USAGE_PERIOD_new 1234 EXIST::FUNCTION: |
| 1207 | d2i_PKEY_USAGE_PERIOD 1233 | 1207 | PKEY_USAGE_PERIOD_free 1235 EXIST::FUNCTION: |
| 1208 | PKEY_USAGE_PERIOD_new 1234 | 1208 | v2i_GENERAL_NAMES 1236 EXIST::FUNCTION: |
| 1209 | PKEY_USAGE_PERIOD_free 1235 | 1209 | i2s_ASN1_INTEGER 1237 EXIST::FUNCTION: |
| 1210 | v2i_GENERAL_NAMES 1236 | 1210 | X509V3_EXT_d2i 1238 EXIST::FUNCTION: |
| 1211 | i2s_ASN1_INTEGER 1237 | 1211 | name_cmp 1239 EXIST::FUNCTION: |
| 1212 | X509V3_EXT_d2i 1238 | 1212 | str_dup 1240 NOEXIST::FUNCTION: |
| 1213 | name_cmp 1239 | 1213 | i2s_ASN1_ENUMERATED 1241 EXIST::FUNCTION: |
| 1214 | str_dup 1240 | 1214 | i2s_ASN1_ENUMERATED_TABLE 1242 EXIST::FUNCTION: |
| 1215 | i2s_ASN1_ENUMERATED 1241 | 1215 | BIO_s_log 1243 EXIST:!WIN32,!WIN16,!macintosh:FUNCTION: |
| 1216 | i2s_ASN1_ENUMERATED_TABLE 1242 | 1216 | BIO_f_reliable 1244 EXIST::FUNCTION: |
| 1217 | BIO_s_log 1243 | 1217 | PKCS7_dataFinal 1245 EXIST::FUNCTION: |
| 1218 | BIO_f_reliable 1244 | 1218 | PKCS7_dataDecode 1246 EXIST::FUNCTION: |
| 1219 | PKCS7_dataFinal 1245 | 1219 | X509V3_EXT_CRL_add_conf 1247 EXIST::FUNCTION: |
| 1220 | PKCS7_dataDecode 1246 | 1220 | BN_set_params 1248 EXIST::FUNCTION: |
| 1221 | X509V3_EXT_CRL_add_conf 1247 | 1221 | BN_get_params 1249 EXIST::FUNCTION: |
| 1222 | BN_set_params 1248 | 1222 | BIO_get_ex_num 1250 NOEXIST::FUNCTION: |
| 1223 | BN_get_params 1249 | 1223 | BIO_set_ex_free_func 1251 NOEXIST::FUNCTION: |
| 1224 | BIO_get_ex_num 1250 | 1224 | EVP_ripemd160 1252 EXIST::FUNCTION:RIPEMD |
| 1225 | BIO_set_ex_free_func 1251 | 1225 | ASN1_TIME_set 1253 EXIST::FUNCTION: |
| 1226 | EVP_ripemd160 1252 | 1226 | i2d_AUTHORITY_KEYID 1254 EXIST::FUNCTION: |
| 1227 | ASN1_TIME_set 1253 | 1227 | d2i_AUTHORITY_KEYID 1255 EXIST::FUNCTION: |
| 1228 | i2d_AUTHORITY_KEYID 1254 | 1228 | AUTHORITY_KEYID_new 1256 EXIST::FUNCTION: |
| 1229 | d2i_AUTHORITY_KEYID 1255 | 1229 | AUTHORITY_KEYID_free 1257 EXIST::FUNCTION: |
| 1230 | AUTHORITY_KEYID_new 1256 | 1230 | ASN1_seq_unpack 1258 EXIST::FUNCTION: |
| 1231 | AUTHORITY_KEYID_free 1257 | 1231 | ASN1_seq_pack 1259 EXIST::FUNCTION: |
| 1232 | ASN1_seq_unpack 1258 | 1232 | ASN1_unpack_string 1260 EXIST::FUNCTION: |
| 1233 | ASN1_seq_pack 1259 | 1233 | ASN1_pack_string 1261 EXIST::FUNCTION: |
| 1234 | ASN1_unpack_string 1260 | 1234 | PKCS12_pack_safebag 1262 EXIST::FUNCTION: |
| 1235 | ASN1_pack_string 1261 | 1235 | PKCS12_MAKE_KEYBAG 1263 EXIST::FUNCTION: |
| 1236 | PKCS12_pack_safebag 1262 | 1236 | PKCS8_encrypt 1264 EXIST::FUNCTION: |
| 1237 | PKCS12_MAKE_KEYBAG 1263 | 1237 | PKCS12_MAKE_SHKEYBAG 1265 EXIST::FUNCTION: |
| 1238 | PKCS8_encrypt 1264 | 1238 | PKCS12_pack_p7data 1266 EXIST::FUNCTION: |
| 1239 | PKCS12_MAKE_SHKEYBAG 1265 | 1239 | PKCS12_pack_p7encdata 1267 EXIST::FUNCTION: |
| 1240 | PKCS12_pack_p7data 1266 | 1240 | PKCS12_add_localkeyid 1268 EXIST::FUNCTION: |
| 1241 | PKCS12_pack_p7encdata 1267 | 1241 | PKCS12_add_friendlyname_asc 1269 EXIST::FUNCTION: |
| 1242 | PKCS12_add_localkeyid 1268 | 1242 | PKCS12_add_friendlyname_uni 1270 EXIST::FUNCTION: |
| 1243 | PKCS12_add_friendlyname_asc 1269 | 1243 | PKCS12_get_friendlyname 1271 EXIST::FUNCTION: |
| 1244 | PKCS12_add_friendlyname_uni 1270 | 1244 | PKCS12_pbe_crypt 1272 EXIST::FUNCTION: |
| 1245 | PKCS12_get_friendlyname 1271 | 1245 | PKCS12_decrypt_d2i 1273 EXIST::FUNCTION: |
| 1246 | PKCS12_pbe_crypt 1272 | 1246 | PKCS12_i2d_encrypt 1274 EXIST::FUNCTION: |
| 1247 | PKCS12_decrypt_d2i 1273 | 1247 | PKCS12_init 1275 EXIST::FUNCTION: |
| 1248 | PKCS12_i2d_encrypt 1274 | 1248 | PKCS12_key_gen_asc 1276 EXIST::FUNCTION: |
| 1249 | PKCS12_init 1275 | 1249 | PKCS12_key_gen_uni 1277 EXIST::FUNCTION: |
| 1250 | PKCS12_key_gen_asc 1276 | 1250 | PKCS12_gen_mac 1278 EXIST::FUNCTION: |
| 1251 | PKCS12_key_gen_uni 1277 | 1251 | PKCS12_verify_mac 1279 EXIST::FUNCTION: |
| 1252 | PKCS12_gen_mac 1278 | 1252 | PKCS12_set_mac 1280 EXIST::FUNCTION: |
| 1253 | PKCS12_verify_mac 1279 | 1253 | PKCS12_setup_mac 1281 EXIST::FUNCTION: |
| 1254 | PKCS12_set_mac 1280 | 1254 | asc2uni 1282 EXIST::FUNCTION: |
| 1255 | PKCS12_setup_mac 1281 | 1255 | uni2asc 1283 EXIST::FUNCTION: |
| 1256 | asc2uni 1282 | 1256 | i2d_PKCS12_BAGS 1284 EXIST::FUNCTION: |
| 1257 | uni2asc 1283 | 1257 | PKCS12_BAGS_new 1285 EXIST::FUNCTION: |
| 1258 | i2d_PKCS12_BAGS 1284 | 1258 | d2i_PKCS12_BAGS 1286 EXIST::FUNCTION: |
| 1259 | PKCS12_BAGS_new 1285 | 1259 | PKCS12_BAGS_free 1287 EXIST::FUNCTION: |
| 1260 | d2i_PKCS12_BAGS 1286 | 1260 | i2d_PKCS12 1288 EXIST::FUNCTION: |
| 1261 | PKCS12_BAGS_free 1287 | 1261 | d2i_PKCS12 1289 EXIST::FUNCTION: |
| 1262 | i2d_PKCS12 1288 | 1262 | PKCS12_new 1290 EXIST::FUNCTION: |
| 1263 | d2i_PKCS12 1289 | 1263 | PKCS12_free 1291 EXIST::FUNCTION: |
| 1264 | PKCS12_new 1290 | 1264 | i2d_PKCS12_MAC_DATA 1292 EXIST::FUNCTION: |
| 1265 | PKCS12_free 1291 | 1265 | PKCS12_MAC_DATA_new 1293 EXIST::FUNCTION: |
| 1266 | i2d_PKCS12_MAC_DATA 1292 | 1266 | d2i_PKCS12_MAC_DATA 1294 EXIST::FUNCTION: |
| 1267 | PKCS12_MAC_DATA_new 1293 | 1267 | PKCS12_MAC_DATA_free 1295 EXIST::FUNCTION: |
| 1268 | d2i_PKCS12_MAC_DATA 1294 | 1268 | i2d_PKCS12_SAFEBAG 1296 EXIST::FUNCTION: |
| 1269 | PKCS12_MAC_DATA_free 1295 | 1269 | PKCS12_SAFEBAG_new 1297 EXIST::FUNCTION: |
| 1270 | i2d_PKCS12_SAFEBAG 1296 | 1270 | d2i_PKCS12_SAFEBAG 1298 EXIST::FUNCTION: |
| 1271 | PKCS12_SAFEBAG_new 1297 | 1271 | PKCS12_SAFEBAG_free 1299 EXIST::FUNCTION: |
| 1272 | d2i_PKCS12_SAFEBAG 1298 | 1272 | ERR_load_PKCS12_strings 1300 EXIST::FUNCTION: |
| 1273 | PKCS12_SAFEBAG_free 1299 | 1273 | PKCS12_PBE_add 1301 EXIST::FUNCTION: |
| 1274 | ERR_load_PKCS12_strings 1300 | 1274 | PKCS8_add_keyusage 1302 EXIST::FUNCTION: |
| 1275 | PKCS12_PBE_add 1301 | 1275 | PKCS12_get_attr_gen 1303 EXIST::FUNCTION: |
| 1276 | PKCS8_add_keyusage 1302 | 1276 | PKCS12_parse 1304 EXIST::FUNCTION: |
| 1277 | PKCS12_get_attr_gen 1303 | 1277 | PKCS12_create 1305 EXIST::FUNCTION: |
| 1278 | PKCS12_parse 1304 | 1278 | i2d_PKCS12_bio 1306 EXIST::FUNCTION: |
| 1279 | PKCS12_create 1305 | 1279 | i2d_PKCS12_fp 1307 EXIST::FUNCTION: |
| 1280 | i2d_PKCS12_bio 1306 | 1280 | d2i_PKCS12_bio 1308 EXIST::FUNCTION: |
| 1281 | i2d_PKCS12_fp 1307 | 1281 | d2i_PKCS12_fp 1309 EXIST::FUNCTION: |
| 1282 | d2i_PKCS12_bio 1308 | 1282 | i2d_PBEPARAM 1310 EXIST::FUNCTION: |
| 1283 | d2i_PKCS12_fp 1309 | 1283 | PBEPARAM_new 1311 EXIST::FUNCTION: |
| 1284 | i2d_PBEPARAM 1310 | 1284 | d2i_PBEPARAM 1312 EXIST::FUNCTION: |
| 1285 | PBEPARAM_new 1311 | 1285 | PBEPARAM_free 1313 EXIST::FUNCTION: |
| 1286 | d2i_PBEPARAM 1312 | 1286 | i2d_PKCS8_PRIV_KEY_INFO 1314 EXIST::FUNCTION: |
| 1287 | PBEPARAM_free 1313 | 1287 | PKCS8_PRIV_KEY_INFO_new 1315 EXIST::FUNCTION: |
| 1288 | i2d_PKCS8_PRIV_KEY_INFO 1314 | 1288 | d2i_PKCS8_PRIV_KEY_INFO 1316 EXIST::FUNCTION: |
| 1289 | PKCS8_PRIV_KEY_INFO_new 1315 | 1289 | PKCS8_PRIV_KEY_INFO_free 1317 EXIST::FUNCTION: |
| 1290 | d2i_PKCS8_PRIV_KEY_INFO 1316 | 1290 | EVP_PKCS82PKEY 1318 EXIST::FUNCTION: |
| 1291 | PKCS8_PRIV_KEY_INFO_free 1317 | 1291 | EVP_PKEY2PKCS8 1319 EXIST::FUNCTION: |
| 1292 | EVP_PKCS82PKEY 1318 | 1292 | PKCS8_set_broken 1320 EXIST::FUNCTION: |
| 1293 | EVP_PKEY2PKCS8 1319 | 1293 | EVP_PBE_ALGOR_CipherInit 1321 NOEXIST::FUNCTION: |
| 1294 | PKCS8_set_broken 1320 | 1294 | EVP_PBE_alg_add 1322 EXIST::FUNCTION: |
| 1295 | EVP_PBE_ALGOR_CipherInit 1321 | 1295 | PKCS5_pbe_set 1323 EXIST::FUNCTION: |
| 1296 | EVP_PBE_alg_add 1322 | 1296 | EVP_PBE_cleanup 1324 EXIST::FUNCTION: |
| 1297 | PKCS5_pbe_set 1323 | 1297 | i2d_SXNET 1325 EXIST::FUNCTION: |
| 1298 | EVP_PBE_cleanup 1324 | 1298 | d2i_SXNET 1326 EXIST::FUNCTION: |
| 1299 | i2d_SXNET 1325 | 1299 | SXNET_new 1327 EXIST::FUNCTION: |
| 1300 | d2i_SXNET 1326 | 1300 | SXNET_free 1328 EXIST::FUNCTION: |
| 1301 | SXNET_new 1327 | 1301 | i2d_SXNETID 1329 EXIST::FUNCTION: |
| 1302 | SXNET_free 1328 | 1302 | d2i_SXNETID 1330 EXIST::FUNCTION: |
| 1303 | i2d_SXNETID 1329 | 1303 | SXNETID_new 1331 EXIST::FUNCTION: |
| 1304 | d2i_SXNETID 1330 | 1304 | SXNETID_free 1332 EXIST::FUNCTION: |
| 1305 | SXNETID_new 1331 | 1305 | DSA_SIG_new 1333 EXIST::FUNCTION:DSA |
| 1306 | SXNETID_free 1332 | 1306 | DSA_SIG_free 1334 EXIST::FUNCTION:DSA |
| 1307 | DSA_SIG_new 1333 | 1307 | DSA_do_sign 1335 EXIST::FUNCTION:DSA |
| 1308 | DSA_SIG_free 1334 | 1308 | DSA_do_verify 1336 EXIST::FUNCTION:DSA |
| 1309 | DSA_do_sign 1335 | 1309 | d2i_DSA_SIG 1337 EXIST::FUNCTION:DSA |
| 1310 | DSA_do_verify 1336 | 1310 | i2d_DSA_SIG 1338 EXIST::FUNCTION:DSA |
| 1311 | d2i_DSA_SIG 1337 | 1311 | i2d_ASN1_VISIBLESTRING 1339 EXIST::FUNCTION: |
| 1312 | i2d_DSA_SIG 1338 | 1312 | d2i_ASN1_VISIBLESTRING 1340 EXIST::FUNCTION: |
| 1313 | i2d_ASN1_VISIBLESTRING 1339 | 1313 | i2d_ASN1_UTF8STRING 1341 EXIST::FUNCTION: |
| 1314 | d2i_ASN1_VISIBLESTRING 1340 | 1314 | d2i_ASN1_UTF8STRING 1342 EXIST::FUNCTION: |
| 1315 | i2d_ASN1_UTF8STRING 1341 | 1315 | i2d_DIRECTORYSTRING 1343 EXIST::FUNCTION: |
| 1316 | d2i_ASN1_UTF8STRING 1342 | 1316 | d2i_DIRECTORYSTRING 1344 EXIST::FUNCTION: |
| 1317 | i2d_DIRECTORYSTRING 1343 | 1317 | i2d_DISPLAYTEXT 1345 EXIST::FUNCTION: |
| 1318 | d2i_DIRECTORYSTRING 1344 | 1318 | d2i_DISPLAYTEXT 1346 EXIST::FUNCTION: |
| 1319 | i2d_DISPLAYTEXT 1345 | 1319 | d2i_ASN1_SET_OF_X509 1379 NOEXIST::FUNCTION: |
| 1320 | d2i_DISPLAYTEXT 1346 | 1320 | i2d_ASN1_SET_OF_X509 1380 NOEXIST::FUNCTION: |
| 1321 | sk_X509_NAME_new 1347 | 1321 | i2d_PBKDF2PARAM 1397 EXIST::FUNCTION: |
| 1322 | sk_X509_NAME_new_null 1348 | 1322 | PBKDF2PARAM_new 1398 EXIST::FUNCTION: |
| 1323 | sk_X509_NAME_free 1349 | 1323 | d2i_PBKDF2PARAM 1399 EXIST::FUNCTION: |
| 1324 | sk_X509_NAME_num 1350 | 1324 | PBKDF2PARAM_free 1400 EXIST::FUNCTION: |
| 1325 | sk_X509_NAME_value 1351 | 1325 | i2d_PBE2PARAM 1401 EXIST::FUNCTION: |
| 1326 | sk_X509_NAME_set 1352 | 1326 | PBE2PARAM_new 1402 EXIST::FUNCTION: |
| 1327 | sk_X509_NAME_zero 1353 | 1327 | d2i_PBE2PARAM 1403 EXIST::FUNCTION: |
| 1328 | sk_X509_NAME_push 1354 | 1328 | PBE2PARAM_free 1404 EXIST::FUNCTION: |
| 1329 | sk_X509_NAME_pop 1355 | 1329 | d2i_ASN1_SET_OF_GENERAL_NAME 1421 NOEXIST::FUNCTION: |
| 1330 | sk_X509_NAME_find 1356 | 1330 | i2d_ASN1_SET_OF_GENERAL_NAME 1422 NOEXIST::FUNCTION: |
| 1331 | sk_X509_NAME_delete 1357 | 1331 | d2i_ASN1_SET_OF_SXNETID 1439 NOEXIST::FUNCTION: |
| 1332 | sk_X509_NAME_delete_ptr 1358 | 1332 | i2d_ASN1_SET_OF_SXNETID 1440 NOEXIST::FUNCTION: |
| 1333 | sk_X509_NAME_set_cmp_func 1359 | 1333 | d2i_ASN1_SET_OF_POLICYQUALINFO 1457 NOEXIST::FUNCTION: |
| 1334 | sk_X509_NAME_dup 1360 | 1334 | i2d_ASN1_SET_OF_POLICYQUALINFO 1458 NOEXIST::FUNCTION: |
| 1335 | sk_X509_NAME_pop_free 1361 | 1335 | d2i_ASN1_SET_OF_POLICYINFO 1475 NOEXIST::FUNCTION: |
| 1336 | sk_X509_NAME_shift 1362 | 1336 | i2d_ASN1_SET_OF_POLICYINFO 1476 NOEXIST::FUNCTION: |
| 1337 | sk_X509_new 1363 | 1337 | SXNET_add_id_asc 1477 EXIST::FUNCTION: |
| 1338 | sk_X509_new_null 1364 | 1338 | SXNET_add_id_ulong 1478 EXIST::FUNCTION: |
| 1339 | sk_X509_free 1365 | 1339 | SXNET_add_id_INTEGER 1479 EXIST::FUNCTION: |
| 1340 | sk_X509_num 1366 | 1340 | SXNET_get_id_asc 1480 EXIST::FUNCTION: |
| 1341 | sk_X509_value 1367 | 1341 | SXNET_get_id_ulong 1481 EXIST::FUNCTION: |
| 1342 | sk_X509_set 1368 | 1342 | SXNET_get_id_INTEGER 1482 EXIST::FUNCTION: |
| 1343 | sk_X509_zero 1369 | 1343 | X509V3_set_conf_lhash 1483 EXIST::FUNCTION: |
| 1344 | sk_X509_push 1370 | 1344 | i2d_CERTIFICATEPOLICIES 1484 EXIST::FUNCTION: |
| 1345 | sk_X509_pop 1371 | 1345 | CERTIFICATEPOLICIES_new 1485 EXIST::FUNCTION: |
| 1346 | sk_X509_find 1372 | 1346 | CERTIFICATEPOLICIES_free 1486 EXIST::FUNCTION: |
| 1347 | sk_X509_delete 1373 | 1347 | d2i_CERTIFICATEPOLICIES 1487 EXIST::FUNCTION: |
| 1348 | sk_X509_delete_ptr 1374 | 1348 | i2d_POLICYINFO 1488 EXIST::FUNCTION: |
| 1349 | sk_X509_set_cmp_func 1375 | 1349 | POLICYINFO_new 1489 EXIST::FUNCTION: |
| 1350 | sk_X509_dup 1376 | 1350 | d2i_POLICYINFO 1490 EXIST::FUNCTION: |
| 1351 | sk_X509_pop_free 1377 | 1351 | POLICYINFO_free 1491 EXIST::FUNCTION: |
| 1352 | sk_X509_shift 1378 | 1352 | i2d_POLICYQUALINFO 1492 EXIST::FUNCTION: |
| 1353 | d2i_ASN1_SET_OF_X509 1379 | 1353 | POLICYQUALINFO_new 1493 EXIST::FUNCTION: |
| 1354 | i2d_ASN1_SET_OF_X509 1380 | 1354 | d2i_POLICYQUALINFO 1494 EXIST::FUNCTION: |
| 1355 | sk_X509_ATTRIBUTE_new 1381 | 1355 | POLICYQUALINFO_free 1495 EXIST::FUNCTION: |
| 1356 | sk_X509_ATTRIBUTE_new_null 1382 | 1356 | i2d_USERNOTICE 1496 EXIST::FUNCTION: |
| 1357 | sk_X509_ATTRIBUTE_free 1383 | 1357 | USERNOTICE_new 1497 EXIST::FUNCTION: |
| 1358 | sk_X509_ATTRIBUTE_num 1384 | 1358 | d2i_USERNOTICE 1498 EXIST::FUNCTION: |
| 1359 | sk_X509_ATTRIBUTE_value 1385 | 1359 | USERNOTICE_free 1499 EXIST::FUNCTION: |
| 1360 | sk_X509_ATTRIBUTE_set 1386 | 1360 | i2d_NOTICEREF 1500 EXIST::FUNCTION: |
| 1361 | sk_X509_ATTRIBUTE_zero 1387 | 1361 | NOTICEREF_new 1501 EXIST::FUNCTION: |
| 1362 | sk_X509_ATTRIBUTE_push 1388 | 1362 | d2i_NOTICEREF 1502 EXIST::FUNCTION: |
| 1363 | sk_X509_ATTRIBUTE_pop 1389 | 1363 | NOTICEREF_free 1503 EXIST::FUNCTION: |
| 1364 | sk_X509_ATTRIBUTE_find 1390 | 1364 | X509V3_get_string 1504 EXIST::FUNCTION: |
| 1365 | sk_X509_ATTRIBUTE_delete 1391 | 1365 | X509V3_get_section 1505 EXIST::FUNCTION: |
| 1366 | sk_X509_ATTRIBUTE_delete_ptr 1392 | 1366 | X509V3_string_free 1506 EXIST::FUNCTION: |
| 1367 | sk_X509_ATTRIBUTE_set_cmp_func 1393 | 1367 | X509V3_section_free 1507 EXIST::FUNCTION: |
| 1368 | sk_X509_ATTRIBUTE_dup 1394 | 1368 | X509V3_set_ctx 1508 EXIST::FUNCTION: |
| 1369 | sk_X509_ATTRIBUTE_pop_free 1395 | 1369 | s2i_ASN1_INTEGER 1509 EXIST::FUNCTION: |
| 1370 | sk_X509_ATTRIBUTE_shift 1396 | 1370 | CRYPTO_set_locked_mem_functions 1510 EXIST::FUNCTION: |
| 1371 | i2d_PBKDF2PARAM 1397 | 1371 | CRYPTO_get_locked_mem_functions 1511 EXIST::FUNCTION: |
| 1372 | PBKDF2PARAM_new 1398 | 1372 | CRYPTO_malloc_locked 1512 EXIST::FUNCTION: |
| 1373 | d2i_PBKDF2PARAM 1399 | 1373 | CRYPTO_free_locked 1513 EXIST::FUNCTION: |
| 1374 | PBKDF2PARAM_free 1400 | 1374 | BN_mod_exp2_mont 1514 EXIST::FUNCTION: |
| 1375 | i2d_PBE2PARAM 1401 | 1375 | ERR_get_error_line_data 1515 EXIST::FUNCTION: |
| 1376 | PBE2PARAM_new 1402 | 1376 | ERR_peek_error_line_data 1516 EXIST::FUNCTION: |
| 1377 | d2i_PBE2PARAM 1403 | 1377 | PKCS12_PBE_keyivgen 1517 EXIST::FUNCTION: |
| 1378 | PBE2PARAM_free 1404 | 1378 | X509_ALGOR_dup 1518 EXIST::FUNCTION: |
| 1379 | sk_GENERAL_NAME_new 1405 | 1379 | d2i_ASN1_SET_OF_DIST_POINT 1535 NOEXIST::FUNCTION: |
| 1380 | sk_GENERAL_NAME_new_null 1406 | 1380 | i2d_ASN1_SET_OF_DIST_POINT 1536 NOEXIST::FUNCTION: |
| 1381 | sk_GENERAL_NAME_free 1407 | 1381 | i2d_CRL_DIST_POINTS 1537 EXIST::FUNCTION: |
| 1382 | sk_GENERAL_NAME_num 1408 | 1382 | CRL_DIST_POINTS_new 1538 EXIST::FUNCTION: |
| 1383 | sk_GENERAL_NAME_value 1409 | 1383 | CRL_DIST_POINTS_free 1539 EXIST::FUNCTION: |
| 1384 | sk_GENERAL_NAME_set 1410 | 1384 | d2i_CRL_DIST_POINTS 1540 EXIST::FUNCTION: |
| 1385 | sk_GENERAL_NAME_zero 1411 | 1385 | i2d_DIST_POINT 1541 EXIST::FUNCTION: |
| 1386 | sk_GENERAL_NAME_push 1412 | 1386 | DIST_POINT_new 1542 EXIST::FUNCTION: |
| 1387 | sk_GENERAL_NAME_pop 1413 | 1387 | d2i_DIST_POINT 1543 EXIST::FUNCTION: |
| 1388 | sk_GENERAL_NAME_find 1414 | 1388 | DIST_POINT_free 1544 EXIST::FUNCTION: |
| 1389 | sk_GENERAL_NAME_delete 1415 | 1389 | i2d_DIST_POINT_NAME 1545 EXIST::FUNCTION: |
| 1390 | sk_GENERAL_NAME_delete_ptr 1416 | 1390 | DIST_POINT_NAME_new 1546 EXIST::FUNCTION: |
| 1391 | sk_GENERAL_NAME_set_cmp_func 1417 | 1391 | DIST_POINT_NAME_free 1547 EXIST::FUNCTION: |
| 1392 | sk_GENERAL_NAME_dup 1418 | 1392 | d2i_DIST_POINT_NAME 1548 EXIST::FUNCTION: |
| 1393 | sk_GENERAL_NAME_pop_free 1419 | 1393 | X509V3_add_value_uchar 1549 EXIST::FUNCTION: |
| 1394 | sk_GENERAL_NAME_shift 1420 | 1394 | d2i_ASN1_SET_OF_X509_ATTRIBUTE 1555 NOEXIST::FUNCTION: |
| 1395 | d2i_ASN1_SET_OF_GENERAL_NAME 1421 | 1395 | i2d_ASN1_SET_OF_ASN1_TYPE 1560 NOEXIST::FUNCTION: |
| 1396 | i2d_ASN1_SET_OF_GENERAL_NAME 1422 | 1396 | d2i_ASN1_SET_OF_X509_EXTENSION 1567 NOEXIST::FUNCTION: |
| 1397 | sk_SXNETID_new 1423 | 1397 | d2i_ASN1_SET_OF_X509_NAME_ENTRY 1574 NOEXIST::FUNCTION: |
| 1398 | sk_SXNETID_new_null 1424 | 1398 | d2i_ASN1_SET_OF_ASN1_TYPE 1589 NOEXIST::FUNCTION: |
| 1399 | sk_SXNETID_free 1425 | 1399 | i2d_ASN1_SET_OF_X509_ATTRIBUTE 1615 NOEXIST::FUNCTION: |
| 1400 | sk_SXNETID_num 1426 | 1400 | i2d_ASN1_SET_OF_X509_EXTENSION 1624 NOEXIST::FUNCTION: |
| 1401 | sk_SXNETID_value 1427 | 1401 | i2d_ASN1_SET_OF_X509_NAME_ENTRY 1633 NOEXIST::FUNCTION: |
| 1402 | sk_SXNETID_set 1428 | 1402 | X509V3_EXT_i2d 1646 EXIST::FUNCTION: |
| 1403 | sk_SXNETID_zero 1429 | 1403 | X509V3_EXT_val_prn 1647 EXIST::FUNCTION: |
| 1404 | sk_SXNETID_push 1430 | 1404 | X509V3_EXT_add_list 1648 EXIST::FUNCTION: |
| 1405 | sk_SXNETID_pop 1431 | 1405 | EVP_CIPHER_type 1649 EXIST::FUNCTION: |
| 1406 | sk_SXNETID_find 1432 | 1406 | EVP_PBE_CipherInit 1650 EXIST::FUNCTION: |
| 1407 | sk_SXNETID_delete 1433 | 1407 | X509V3_add_value_bool_nf 1651 EXIST::FUNCTION: |
| 1408 | sk_SXNETID_delete_ptr 1434 | 1408 | d2i_ASN1_UINTEGER 1652 EXIST::FUNCTION: |
| 1409 | sk_SXNETID_set_cmp_func 1435 | 1409 | sk_value 1653 EXIST::FUNCTION: |
| 1410 | sk_SXNETID_dup 1436 | 1410 | sk_num 1654 EXIST::FUNCTION: |
| 1411 | sk_SXNETID_pop_free 1437 | 1411 | sk_set 1655 EXIST::FUNCTION: |
| 1412 | sk_SXNETID_shift 1438 | 1412 | i2d_ASN1_SET_OF_X509_REVOKED 1661 NOEXIST::FUNCTION: |
| 1413 | d2i_ASN1_SET_OF_SXNETID 1439 | 1413 | sk_sort 1671 EXIST::FUNCTION: |
| 1414 | i2d_ASN1_SET_OF_SXNETID 1440 | 1414 | d2i_ASN1_SET_OF_X509_REVOKED 1674 NOEXIST::FUNCTION: |
| 1415 | sk_POLICYQUALINFO_new 1441 | 1415 | i2d_ASN1_SET_OF_X509_ALGOR 1682 NOEXIST::FUNCTION: |
| 1416 | sk_POLICYQUALINFO_new_null 1442 | 1416 | i2d_ASN1_SET_OF_X509_CRL 1685 NOEXIST::FUNCTION: |
| 1417 | sk_POLICYQUALINFO_free 1443 | 1417 | d2i_ASN1_SET_OF_X509_ALGOR 1696 NOEXIST::FUNCTION: |
| 1418 | sk_POLICYQUALINFO_num 1444 | 1418 | d2i_ASN1_SET_OF_X509_CRL 1702 NOEXIST::FUNCTION: |
| 1419 | sk_POLICYQUALINFO_value 1445 | 1419 | i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO 1723 NOEXIST::FUNCTION: |
| 1420 | sk_POLICYQUALINFO_set 1446 | 1420 | i2d_ASN1_SET_OF_PKCS7_RECIP_INFO 1738 NOEXIST::FUNCTION: |
| 1421 | sk_POLICYQUALINFO_zero 1447 | 1421 | d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO 1748 NOEXIST::FUNCTION: |
| 1422 | sk_POLICYQUALINFO_push 1448 | 1422 | d2i_ASN1_SET_OF_PKCS7_RECIP_INFO 1753 NOEXIST::FUNCTION: |
| 1423 | sk_POLICYQUALINFO_pop 1449 | 1423 | PKCS5_PBE_add 1775 EXIST::FUNCTION: |
| 1424 | sk_POLICYQUALINFO_find 1450 | 1424 | PEM_write_bio_PKCS8 1776 EXIST::FUNCTION: |
| 1425 | sk_POLICYQUALINFO_delete 1451 | 1425 | i2d_PKCS8_fp 1777 EXIST::FUNCTION:FP_API |
| 1426 | sk_POLICYQUALINFO_delete_ptr 1452 | 1426 | PEM_read_bio_PKCS8_PRIV_KEY_INFO 1778 EXIST::FUNCTION: |
| 1427 | sk_POLICYQUALINFO_set_cmp_func 1453 | 1427 | d2i_PKCS8_bio 1779 EXIST::FUNCTION: |
| 1428 | sk_POLICYQUALINFO_dup 1454 | 1428 | d2i_PKCS8_PRIV_KEY_INFO_fp 1780 EXIST::FUNCTION:FP_API |
| 1429 | sk_POLICYQUALINFO_pop_free 1455 | 1429 | PEM_write_bio_PKCS8_PRIV_KEY_INFO 1781 EXIST::FUNCTION: |
| 1430 | sk_POLICYQUALINFO_shift 1456 | 1430 | PEM_read_PKCS8 1782 EXIST:!WIN16:FUNCTION: |
| 1431 | d2i_ASN1_SET_OF_POLICYQUALINFO 1457 | 1431 | d2i_PKCS8_PRIV_KEY_INFO_bio 1783 EXIST::FUNCTION: |
| 1432 | i2d_ASN1_SET_OF_POLICYQUALINFO 1458 | 1432 | d2i_PKCS8_fp 1784 EXIST::FUNCTION:FP_API |
| 1433 | sk_POLICYINFO_new 1459 | 1433 | PEM_write_PKCS8 1785 EXIST:!WIN16:FUNCTION: |
| 1434 | sk_POLICYINFO_new_null 1460 | 1434 | PEM_read_PKCS8_PRIV_KEY_INFO 1786 EXIST:!WIN16:FUNCTION: |
| 1435 | sk_POLICYINFO_free 1461 | 1435 | PEM_read_bio_PKCS8 1787 EXIST::FUNCTION: |
| 1436 | sk_POLICYINFO_num 1462 | 1436 | PEM_write_PKCS8_PRIV_KEY_INFO 1788 EXIST:!WIN16:FUNCTION: |
| 1437 | sk_POLICYINFO_value 1463 | 1437 | PKCS5_PBE_keyivgen 1789 EXIST::FUNCTION: |
| 1438 | sk_POLICYINFO_set 1464 | 1438 | i2d_PKCS8_bio 1790 EXIST::FUNCTION: |
| 1439 | sk_POLICYINFO_zero 1465 | 1439 | i2d_PKCS8_PRIV_KEY_INFO_fp 1791 EXIST::FUNCTION:FP_API |
| 1440 | sk_POLICYINFO_push 1466 | 1440 | i2d_PKCS8_PRIV_KEY_INFO_bio 1792 EXIST::FUNCTION: |
| 1441 | sk_POLICYINFO_pop 1467 | 1441 | BIO_s_bio 1793 EXIST::FUNCTION: |
| 1442 | sk_POLICYINFO_find 1468 | 1442 | PKCS5_pbe2_set 1794 EXIST::FUNCTION: |
| 1443 | sk_POLICYINFO_delete 1469 | 1443 | PKCS5_PBKDF2_HMAC_SHA1 1795 EXIST::FUNCTION: |
| 1444 | sk_POLICYINFO_delete_ptr 1470 | 1444 | PKCS5_v2_PBE_keyivgen 1796 EXIST::FUNCTION: |
| 1445 | sk_POLICYINFO_set_cmp_func 1471 | 1445 | PEM_write_bio_PKCS8PrivateKey 1797 EXIST::FUNCTION: |
| 1446 | sk_POLICYINFO_dup 1472 | 1446 | PEM_write_PKCS8PrivateKey 1798 EXIST::FUNCTION: |
| 1447 | sk_POLICYINFO_pop_free 1473 | 1447 | BIO_ctrl_get_read_request 1799 EXIST::FUNCTION: |
| 1448 | sk_POLICYINFO_shift 1474 | 1448 | BIO_ctrl_pending 1800 EXIST::FUNCTION: |
| 1449 | d2i_ASN1_SET_OF_POLICYINFO 1475 | 1449 | BIO_ctrl_wpending 1801 EXIST::FUNCTION: |
| 1450 | i2d_ASN1_SET_OF_POLICYINFO 1476 | 1450 | BIO_new_bio_pair 1802 EXIST::FUNCTION: |
| 1451 | SXNET_add_id_asc 1477 | 1451 | BIO_ctrl_get_write_guarantee 1803 EXIST::FUNCTION: |
| 1452 | SXNET_add_id_ulong 1478 | 1452 | CRYPTO_num_locks 1804 EXIST::FUNCTION: |
| 1453 | SXNET_add_id_INTEGER 1479 | 1453 | CONF_load_bio 1805 EXIST::FUNCTION: |
| 1454 | SXNET_get_id_asc 1480 | 1454 | CONF_load_fp 1806 EXIST::FUNCTION:FP_API |
| 1455 | SXNET_get_id_ulong 1481 | 1455 | i2d_ASN1_SET_OF_ASN1_OBJECT 1837 NOEXIST::FUNCTION: |
| 1456 | SXNET_get_id_INTEGER 1482 | 1456 | d2i_ASN1_SET_OF_ASN1_OBJECT 1844 NOEXIST::FUNCTION: |
| 1457 | X509V3_set_conf_lhash 1483 | 1457 | PKCS7_signatureVerify 1845 EXIST::FUNCTION: |
| 1458 | i2d_CERTIFICATEPOLICIES 1484 | 1458 | RSA_set_method 1846 EXIST::FUNCTION:RSA |
| 1459 | CERTIFICATEPOLICIES_new 1485 | 1459 | RSA_get_method 1847 EXIST::FUNCTION:RSA |
| 1460 | CERTIFICATEPOLICIES_free 1486 | 1460 | RSA_get_default_method 1848 EXIST::FUNCTION:RSA |
| 1461 | d2i_CERTIFICATEPOLICIES 1487 | 1461 | RSA_check_key 1869 EXIST::FUNCTION:RSA |
| 1462 | i2d_POLICYINFO 1488 | 1462 | OBJ_obj2txt 1870 EXIST::FUNCTION: |
| 1463 | POLICYINFO_new 1489 | 1463 | DSA_dup_DH 1871 EXIST::FUNCTION:DSA,DH |
| 1464 | d2i_POLICYINFO 1490 | 1464 | X509_REQ_get_extensions 1872 EXIST::FUNCTION: |
| 1465 | POLICYINFO_free 1491 | 1465 | X509_REQ_set_extension_nids 1873 EXIST::FUNCTION: |
| 1466 | i2d_POLICYQUALINFO 1492 | 1466 | BIO_nwrite 1874 EXIST::FUNCTION: |
| 1467 | POLICYQUALINFO_new 1493 | 1467 | X509_REQ_extension_nid 1875 EXIST::FUNCTION: |
| 1468 | d2i_POLICYQUALINFO 1494 | 1468 | BIO_nread 1876 EXIST::FUNCTION: |
| 1469 | POLICYQUALINFO_free 1495 | 1469 | X509_REQ_get_extension_nids 1877 EXIST::FUNCTION: |
| 1470 | i2d_USERNOTICE 1496 | 1470 | BIO_nwrite0 1878 EXIST::FUNCTION: |
| 1471 | USERNOTICE_new 1497 | 1471 | X509_REQ_add_extensions_nid 1879 EXIST::FUNCTION: |
| 1472 | d2i_USERNOTICE 1498 | 1472 | BIO_nread0 1880 EXIST::FUNCTION: |
| 1473 | USERNOTICE_free 1499 | 1473 | X509_REQ_add_extensions 1881 EXIST::FUNCTION: |
| 1474 | i2d_NOTICEREF 1500 | 1474 | BIO_new_mem_buf 1882 EXIST::FUNCTION: |
| 1475 | NOTICEREF_new 1501 | 1475 | DH_set_ex_data 1883 EXIST::FUNCTION:DH |
| 1476 | d2i_NOTICEREF 1502 | 1476 | DH_set_method 1884 EXIST::FUNCTION:DH |
| 1477 | NOTICEREF_free 1503 | 1477 | DSA_OpenSSL 1885 EXIST::FUNCTION:DSA |
| 1478 | X509V3_get_string 1504 | 1478 | DH_get_ex_data 1886 EXIST::FUNCTION:DH |
| 1479 | X509V3_get_section 1505 | 1479 | DH_get_ex_new_index 1887 EXIST::FUNCTION:DH |
| 1480 | X509V3_string_free 1506 | 1480 | DSA_new_method 1888 EXIST::FUNCTION:DSA |
| 1481 | X509V3_section_free 1507 | 1481 | DH_new_method 1889 EXIST::FUNCTION:DH |
| 1482 | X509V3_set_ctx 1508 | 1482 | DH_OpenSSL 1890 EXIST::FUNCTION:DH |
| 1483 | s2i_ASN1_INTEGER 1509 | 1483 | DSA_get_ex_new_index 1891 EXIST::FUNCTION:DSA |
| 1484 | CRYPTO_set_locked_mem_functions 1510 | 1484 | DH_get_default_method 1892 EXIST::FUNCTION:DH |
| 1485 | CRYPTO_get_locked_mem_functions 1511 | 1485 | DSA_set_ex_data 1893 EXIST::FUNCTION:DSA |
| 1486 | CRYPTO_malloc_locked 1512 | 1486 | DH_set_default_method 1894 EXIST::FUNCTION:DH |
| 1487 | CRYPTO_free_locked 1513 | 1487 | DSA_get_ex_data 1895 EXIST::FUNCTION:DSA |
| 1488 | BN_mod_exp2_mont 1514 | 1488 | X509V3_EXT_REQ_add_conf 1896 EXIST::FUNCTION: |
| 1489 | ERR_get_error_line_data 1515 | 1489 | NETSCAPE_SPKI_print 1897 EXIST::FUNCTION: |
| 1490 | ERR_peek_error_line_data 1516 | 1490 | NETSCAPE_SPKI_set_pubkey 1898 EXIST::FUNCTION: |
| 1491 | PKCS12_PBE_keyivgen 1517 | 1491 | NETSCAPE_SPKI_b64_encode 1899 EXIST::FUNCTION: |
| 1492 | X509_ALGOR_dup 1518 | 1492 | NETSCAPE_SPKI_get_pubkey 1900 EXIST::FUNCTION: |
| 1493 | sk_DIST_POINT_new 1519 | 1493 | NETSCAPE_SPKI_b64_decode 1901 EXIST::FUNCTION: |
| 1494 | sk_DIST_POINT_new_null 1520 | 1494 | UTF8_putc 1902 EXIST::FUNCTION: |
| 1495 | sk_DIST_POINT_free 1521 | 1495 | UTF8_getc 1903 EXIST::FUNCTION: |
| 1496 | sk_DIST_POINT_num 1522 | 1496 | RSA_null_method 1904 EXIST::FUNCTION:RSA |
| 1497 | sk_DIST_POINT_value 1523 | 1497 | ASN1_tag2str 1905 EXIST::FUNCTION: |
| 1498 | sk_DIST_POINT_set 1524 | 1498 | BIO_ctrl_reset_read_request 1906 EXIST::FUNCTION: |
| 1499 | sk_DIST_POINT_zero 1525 | 1499 | DISPLAYTEXT_new 1907 EXIST::FUNCTION: |
| 1500 | sk_DIST_POINT_push 1526 | 1500 | ASN1_GENERALIZEDTIME_free 1908 EXIST::FUNCTION: |
| 1501 | sk_DIST_POINT_pop 1527 | 1501 | X509_REVOKED_get_ext_d2i 1909 EXIST::FUNCTION: |
| 1502 | sk_DIST_POINT_find 1528 | 1502 | X509_set_ex_data 1910 EXIST::FUNCTION: |
| 1503 | sk_DIST_POINT_delete 1529 | 1503 | X509_reject_set_bit_asc 1911 NOEXIST::FUNCTION: |
| 1504 | sk_DIST_POINT_delete_ptr 1530 | 1504 | X509_NAME_add_entry_by_txt 1912 EXIST::FUNCTION: |
| 1505 | sk_DIST_POINT_set_cmp_func 1531 | 1505 | X509_NAME_add_entry_by_NID 1914 EXIST::FUNCTION: |
| 1506 | sk_DIST_POINT_dup 1532 | 1506 | X509_PURPOSE_get0 1915 EXIST::FUNCTION: |
| 1507 | sk_DIST_POINT_pop_free 1533 | 1507 | PEM_read_X509_AUX 1917 EXIST:!WIN16:FUNCTION: |
| 1508 | sk_DIST_POINT_shift 1534 | 1508 | d2i_AUTHORITY_INFO_ACCESS 1918 EXIST::FUNCTION: |
| 1509 | d2i_ASN1_SET_OF_DIST_POINT 1535 | 1509 | PEM_write_PUBKEY 1921 EXIST:!WIN16:FUNCTION: |
| 1510 | i2d_ASN1_SET_OF_DIST_POINT 1536 | 1510 | ACCESS_DESCRIPTION_new 1925 EXIST::FUNCTION: |
| 1511 | i2d_CRL_DIST_POINTS 1537 | 1511 | X509_CERT_AUX_free 1926 EXIST::FUNCTION: |
| 1512 | CRL_DIST_POINTS_new 1538 | 1512 | d2i_ACCESS_DESCRIPTION 1927 EXIST::FUNCTION: |
| 1513 | CRL_DIST_POINTS_free 1539 | 1513 | X509_trust_clear 1928 EXIST::FUNCTION: |
| 1514 | d2i_CRL_DIST_POINTS 1540 | 1514 | X509_TRUST_add 1931 EXIST::FUNCTION: |
| 1515 | i2d_DIST_POINT 1541 | 1515 | ASN1_VISIBLESTRING_new 1932 EXIST::FUNCTION: |
| 1516 | DIST_POINT_new 1542 | 1516 | X509_alias_set1 1933 EXIST::FUNCTION: |
| 1517 | d2i_DIST_POINT 1543 | 1517 | ASN1_PRINTABLESTRING_free 1934 EXIST::FUNCTION: |
| 1518 | DIST_POINT_free 1544 | 1518 | EVP_PKEY_get1_DSA 1935 EXIST::FUNCTION:DSA |
| 1519 | i2d_DIST_POINT_NAME 1545 | 1519 | ASN1_BMPSTRING_new 1936 EXIST::FUNCTION: |
| 1520 | DIST_POINT_NAME_new 1546 | 1520 | ASN1_mbstring_copy 1937 EXIST::FUNCTION: |
| 1521 | DIST_POINT_NAME_free 1547 | 1521 | ASN1_UTF8STRING_new 1938 EXIST::FUNCTION: |
| 1522 | d2i_DIST_POINT_NAME 1548 | 1522 | DSA_get_default_method 1941 EXIST::FUNCTION:DSA |
| 1523 | X509V3_add_value_uchar 1549 | 1523 | i2d_ASN1_SET_OF_ACCESS_DESCRIPTION 1945 NOEXIST::FUNCTION: |
| 1524 | sk_X509_INFO_new 1550 | 1524 | ASN1_T61STRING_free 1946 EXIST::FUNCTION: |
| 1525 | sk_X509_EXTENSION_new 1551 | 1525 | DSA_set_method 1949 EXIST::FUNCTION:DSA |
| 1526 | sk_X509_NAME_ENTRY_unshift 1552 | 1526 | X509_get_ex_data 1950 EXIST::FUNCTION: |
| 1527 | sk_ASN1_TYPE_value 1553 | 1527 | ASN1_STRING_type 1951 EXIST::FUNCTION: |
| 1528 | sk_X509_EXTENSION_find 1554 | 1528 | X509_PURPOSE_get_by_sname 1952 EXIST::FUNCTION: |
| 1529 | d2i_ASN1_SET_OF_X509_ATTRIBUTE 1555 | 1529 | ASN1_TIME_free 1954 EXIST::FUNCTION: |
| 1530 | sk_ASN1_TYPE_pop 1556 | 1530 | ASN1_OCTET_STRING_cmp 1955 EXIST::FUNCTION: |
| 1531 | sk_X509_EXTENSION_set_cmp_func 1557 | 1531 | ASN1_BIT_STRING_new 1957 EXIST::FUNCTION: |
| 1532 | sk_ASN1_TYPE_new_null 1558 | 1532 | X509_get_ext_d2i 1958 EXIST::FUNCTION: |
| 1533 | sk_X509_NAME_ENTRY_delete 1559 | 1533 | PEM_read_bio_X509_AUX 1959 EXIST::FUNCTION: |
| 1534 | i2d_ASN1_SET_OF_ASN1_TYPE 1560 | 1534 | ASN1_STRING_set_default_mask_asc 1960 EXIST:!VMS:FUNCTION: |
| 1535 | sk_X509_NAME_ENTRY_dup 1561 | 1535 | ASN1_STRING_set_def_mask_asc 1960 EXIST:VMS:FUNCTION: |
| 1536 | sk_X509_unshift 1562 | 1536 | PEM_write_bio_RSA_PUBKEY 1961 EXIST::FUNCTION:RSA |
| 1537 | sk_X509_NAME_unshift 1563 | 1537 | ASN1_INTEGER_cmp 1963 EXIST::FUNCTION: |
| 1538 | sk_ASN1_TYPE_num 1564 | 1538 | d2i_RSA_PUBKEY_fp 1964 EXIST::FUNCTION:RSA,FP_API |
| 1539 | sk_X509_EXTENSION_new_null 1565 | 1539 | X509_trust_set_bit_asc 1967 NOEXIST::FUNCTION: |
| 1540 | sk_X509_INFO_value 1566 | 1540 | PEM_write_bio_DSA_PUBKEY 1968 EXIST::FUNCTION: |
| 1541 | d2i_ASN1_SET_OF_X509_EXTENSION 1567 | 1541 | X509_STORE_CTX_free 1969 EXIST::FUNCTION: |
| 1542 | sk_X509_INFO_delete_ptr 1568 | 1542 | EVP_PKEY_set1_DSA 1970 EXIST::FUNCTION:DSA |
| 1543 | sk_X509_NAME_ENTRY_new 1569 | 1543 | i2d_DSA_PUBKEY_fp 1971 EXIST::FUNCTION:DSA,FP_API |
| 1544 | sk_DIST_POINT_insert 1570 | 1544 | X509_load_cert_crl_file 1972 EXIST::FUNCTION: |
| 1545 | sk_ASN1_TYPE_set_cmp_func 1571 | 1545 | ASN1_TIME_new 1973 EXIST::FUNCTION: |
| 1546 | sk_X509_EXTENSION_value 1572 | 1546 | i2d_RSA_PUBKEY 1974 EXIST::FUNCTION:RSA |
| 1547 | sk_DIST_POINT_unshift 1573 | 1547 | X509_STORE_CTX_purpose_inherit 1976 EXIST::FUNCTION: |
| 1548 | d2i_ASN1_SET_OF_X509_NAME_ENTRY 1574 | 1548 | PEM_read_RSA_PUBKEY 1977 EXIST:!WIN16:FUNCTION:RSA |
| 1549 | sk_X509_INFO_pop 1575 | 1549 | d2i_X509_AUX 1980 EXIST::FUNCTION: |
| 1550 | sk_X509_EXTENSION_pop 1576 | 1550 | i2d_DSA_PUBKEY 1981 EXIST::FUNCTION:DSA |
| 1551 | sk_X509_NAME_ENTRY_shift 1577 | 1551 | X509_CERT_AUX_print 1982 EXIST::FUNCTION: |
| 1552 | sk_X509_INFO_num 1578 | 1552 | PEM_read_DSA_PUBKEY 1984 EXIST:!WIN16:FUNCTION: |
| 1553 | sk_X509_EXTENSION_num 1579 | 1553 | i2d_RSA_PUBKEY_bio 1985 EXIST::FUNCTION:RSA |
| 1554 | sk_X509_INFO_pop_free 1580 | 1554 | ASN1_BIT_STRING_num_asc 1986 EXIST::FUNCTION: |
| 1555 | sk_POLICYQUALINFO_unshift 1581 | 1555 | i2d_PUBKEY 1987 EXIST::FUNCTION: |
| 1556 | sk_POLICYINFO_unshift 1582 | 1556 | ASN1_UTCTIME_free 1988 EXIST::FUNCTION: |
| 1557 | sk_X509_NAME_ENTRY_new_null 1583 | 1557 | DSA_set_default_method 1989 EXIST::FUNCTION:DSA |
| 1558 | sk_X509_NAME_ENTRY_pop 1584 | 1558 | X509_PURPOSE_get_by_id 1990 EXIST::FUNCTION: |
| 1559 | sk_X509_ATTRIBUTE_unshift 1585 | 1559 | ACCESS_DESCRIPTION_free 1994 EXIST::FUNCTION: |
| 1560 | sk_X509_NAME_ENTRY_num 1586 | 1560 | PEM_read_bio_PUBKEY 1995 EXIST::FUNCTION: |
| 1561 | sk_GENERAL_NAME_unshift 1587 | 1561 | ASN1_STRING_set_by_NID 1996 EXIST::FUNCTION: |
| 1562 | sk_X509_INFO_free 1588 | 1562 | X509_PURPOSE_get_id 1997 EXIST::FUNCTION: |
| 1563 | d2i_ASN1_SET_OF_ASN1_TYPE 1589 | 1563 | DISPLAYTEXT_free 1998 EXIST::FUNCTION: |
| 1564 | sk_X509_INFO_insert 1590 | 1564 | OTHERNAME_new 1999 EXIST::FUNCTION: |
| 1565 | sk_X509_NAME_ENTRY_value 1591 | 1565 | X509_CERT_AUX_new 2001 EXIST::FUNCTION: |
| 1566 | sk_POLICYQUALINFO_insert 1592 | 1566 | X509_TRUST_cleanup 2007 EXIST::FUNCTION: |
| 1567 | sk_ASN1_TYPE_set 1593 | 1567 | X509_NAME_add_entry_by_OBJ 2008 EXIST::FUNCTION: |
| 1568 | sk_X509_EXTENSION_delete_ptr 1594 | 1568 | X509_CRL_get_ext_d2i 2009 EXIST::FUNCTION: |
| 1569 | sk_X509_INFO_unshift 1595 | 1569 | X509_PURPOSE_get0_name 2011 EXIST::FUNCTION: |
| 1570 | sk_ASN1_TYPE_unshift 1596 | 1570 | PEM_read_PUBKEY 2012 EXIST:!WIN16:FUNCTION: |
| 1571 | sk_ASN1_TYPE_free 1597 | 1571 | i2d_DSA_PUBKEY_bio 2014 EXIST::FUNCTION:DSA |
| 1572 | sk_ASN1_TYPE_delete_ptr 1598 | 1572 | i2d_OTHERNAME 2015 EXIST::FUNCTION: |
| 1573 | sk_ASN1_TYPE_pop_free 1599 | 1573 | ASN1_OCTET_STRING_free 2016 EXIST::FUNCTION: |
| 1574 | sk_X509_EXTENSION_unshift 1600 | 1574 | ASN1_BIT_STRING_set_asc 2017 EXIST::FUNCTION: |
| 1575 | sk_X509_EXTENSION_pop_free 1601 | 1575 | X509_get_ex_new_index 2019 EXIST::FUNCTION: |
| 1576 | sk_X509_NAME_ENTRY_set_cmp_func 1602 | 1576 | ASN1_STRING_TABLE_cleanup 2020 EXIST::FUNCTION: |
| 1577 | sk_ASN1_TYPE_insert 1603 | 1577 | X509_TRUST_get_by_id 2021 EXIST::FUNCTION: |
| 1578 | sk_X509_NAME_ENTRY_free 1604 | 1578 | X509_PURPOSE_get_trust 2022 EXIST::FUNCTION: |
| 1579 | sk_SXNETID_insert 1605 | 1579 | ASN1_STRING_length 2023 EXIST::FUNCTION: |
| 1580 | sk_X509_NAME_insert 1606 | 1580 | d2i_ASN1_SET_OF_ACCESS_DESCRIPTION 2024 NOEXIST::FUNCTION: |
| 1581 | sk_X509_insert 1607 | 1581 | ASN1_PRINTABLESTRING_new 2025 EXIST::FUNCTION: |
| 1582 | sk_X509_INFO_delete 1608 | 1582 | X509V3_get_d2i 2026 EXIST::FUNCTION: |
| 1583 | sk_X509_INFO_set_cmp_func 1609 | 1583 | ASN1_ENUMERATED_free 2027 EXIST::FUNCTION: |
| 1584 | sk_X509_ATTRIBUTE_insert 1610 | 1584 | i2d_X509_CERT_AUX 2028 EXIST::FUNCTION: |
| 1585 | sk_X509_INFO_zero 1611 | 1585 | X509_STORE_CTX_set_trust 2030 EXIST::FUNCTION: |
| 1586 | sk_X509_INFO_set 1612 | 1586 | ASN1_STRING_set_default_mask 2032 EXIST::FUNCTION: |
| 1587 | sk_X509_EXTENSION_set 1613 | 1587 | X509_STORE_CTX_new 2033 EXIST::FUNCTION: |
| 1588 | sk_X509_EXTENSION_free 1614 | 1588 | EVP_PKEY_get1_RSA 2034 EXIST::FUNCTION:RSA |
| 1589 | i2d_ASN1_SET_OF_X509_ATTRIBUTE 1615 | 1589 | DIRECTORYSTRING_free 2038 EXIST::FUNCTION: |
| 1590 | sk_SXNETID_unshift 1616 | 1590 | PEM_write_X509_AUX 2039 EXIST:!WIN16:FUNCTION: |
| 1591 | sk_X509_INFO_push 1617 | 1591 | ASN1_OCTET_STRING_set 2040 EXIST::FUNCTION: |
| 1592 | sk_X509_EXTENSION_insert 1618 | 1592 | d2i_DSA_PUBKEY_fp 2041 EXIST::FUNCTION:DSA,FP_API |
| 1593 | sk_X509_INFO_new_null 1619 | 1593 | d2i_RSA_PUBKEY 2044 EXIST::FUNCTION:RSA |
| 1594 | sk_ASN1_TYPE_dup 1620 | 1594 | X509_TRUST_get0_name 2046 EXIST::FUNCTION: |
| 1595 | sk_X509_INFO_find 1621 | 1595 | X509_TRUST_get0 2047 EXIST::FUNCTION: |
| 1596 | sk_POLICYINFO_insert 1622 | 1596 | AUTHORITY_INFO_ACCESS_free 2048 EXIST::FUNCTION: |
| 1597 | sk_ASN1_TYPE_zero 1623 | 1597 | ASN1_IA5STRING_new 2049 EXIST::FUNCTION: |
| 1598 | i2d_ASN1_SET_OF_X509_EXTENSION 1624 | 1598 | d2i_DSA_PUBKEY 2050 EXIST::FUNCTION:DSA |
| 1599 | sk_X509_NAME_ENTRY_set 1625 | 1599 | X509_check_purpose 2051 EXIST::FUNCTION: |
| 1600 | sk_ASN1_TYPE_push 1626 | 1600 | ASN1_ENUMERATED_new 2052 EXIST::FUNCTION: |
| 1601 | sk_X509_NAME_ENTRY_insert 1627 | 1601 | d2i_RSA_PUBKEY_bio 2053 EXIST::FUNCTION:RSA |
| 1602 | sk_ASN1_TYPE_new 1628 | 1602 | d2i_PUBKEY 2054 EXIST::FUNCTION: |
| 1603 | sk_GENERAL_NAME_insert 1629 | 1603 | X509_TRUST_get_trust 2055 EXIST::FUNCTION: |
| 1604 | sk_ASN1_TYPE_shift 1630 | 1604 | X509_TRUST_get_flags 2056 EXIST::FUNCTION: |
| 1605 | sk_ASN1_TYPE_delete 1631 | 1605 | ASN1_BMPSTRING_free 2057 EXIST::FUNCTION: |
| 1606 | sk_X509_NAME_ENTRY_pop_free 1632 | 1606 | ASN1_T61STRING_new 2058 EXIST::FUNCTION: |
| 1607 | i2d_ASN1_SET_OF_X509_NAME_ENTRY 1633 | 1607 | ASN1_UTCTIME_new 2060 EXIST::FUNCTION: |
| 1608 | sk_X509_NAME_ENTRY_zero 1634 | 1608 | i2d_AUTHORITY_INFO_ACCESS 2062 EXIST::FUNCTION: |
| 1609 | sk_ASN1_TYPE_find 1635 | 1609 | EVP_PKEY_set1_RSA 2063 EXIST::FUNCTION:RSA |
| 1610 | sk_X509_NAME_ENTRY_delete_ptr 1636 | 1610 | X509_STORE_CTX_set_purpose 2064 EXIST::FUNCTION: |
| 1611 | sk_X509_NAME_ENTRY_push 1637 | 1611 | ASN1_IA5STRING_free 2065 EXIST::FUNCTION: |
| 1612 | sk_X509_EXTENSION_zero 1638 | 1612 | PEM_write_bio_X509_AUX 2066 EXIST::FUNCTION: |
| 1613 | sk_X509_INFO_shift 1639 | 1613 | X509_PURPOSE_get_count 2067 EXIST::FUNCTION: |
| 1614 | sk_X509_INFO_dup 1640 | 1614 | CRYPTO_add_info 2068 NOEXIST::FUNCTION: |
| 1615 | sk_X509_EXTENSION_dup 1641 | 1615 | X509_NAME_ENTRY_create_by_txt 2071 EXIST::FUNCTION: |
| 1616 | sk_X509_EXTENSION_delete 1642 | 1616 | ASN1_STRING_get_default_mask 2072 EXIST::FUNCTION: |
| 1617 | sk_X509_EXTENSION_shift 1643 | 1617 | X509_alias_get0 2074 EXIST::FUNCTION: |
| 1618 | sk_X509_EXTENSION_push 1644 | 1618 | ASN1_STRING_data 2075 EXIST::FUNCTION: |
| 1619 | sk_X509_NAME_ENTRY_find 1645 | 1619 | i2d_ACCESS_DESCRIPTION 2077 EXIST::FUNCTION: |
| 1620 | X509V3_EXT_i2d 1646 | 1620 | X509_trust_set_bit 2078 NOEXIST::FUNCTION: |
| 1621 | X509V3_EXT_val_prn 1647 | 1621 | ASN1_BIT_STRING_free 2080 EXIST::FUNCTION: |
| 1622 | X509V3_EXT_add_list 1648 | 1622 | PEM_read_bio_RSA_PUBKEY 2081 EXIST::FUNCTION:RSA |
| 1623 | EVP_CIPHER_type 1649 | 1623 | X509_add1_reject_object 2082 EXIST::FUNCTION: |
| 1624 | EVP_PBE_CipherInit 1650 | 1624 | X509_check_trust 2083 EXIST::FUNCTION: |
| 1625 | X509V3_add_value_bool_nf 1651 | 1625 | PEM_read_bio_DSA_PUBKEY 2088 EXIST::FUNCTION: |
| 1626 | d2i_ASN1_UINTEGER 1652 | 1626 | X509_PURPOSE_add 2090 EXIST::FUNCTION: |
| 1627 | sk_value 1653 | 1627 | ASN1_STRING_TABLE_get 2091 EXIST::FUNCTION: |
| 1628 | sk_num 1654 | 1628 | ASN1_UTF8STRING_free 2092 EXIST::FUNCTION: |
| 1629 | sk_set 1655 | 1629 | d2i_DSA_PUBKEY_bio 2093 EXIST::FUNCTION:DSA |
| 1630 | sk_X509_REVOKED_set_cmp_func 1656 | 1630 | PEM_write_RSA_PUBKEY 2095 EXIST:!WIN16:FUNCTION:RSA |
| 1631 | sk_X509_REVOKED_unshift 1657 | 1631 | d2i_OTHERNAME 2096 EXIST::FUNCTION: |
| 1632 | sk_X509_REVOKED_dup 1658 | 1632 | X509_reject_set_bit 2098 NOEXIST::FUNCTION: |
| 1633 | sk_X509_REVOKED_free 1659 | 1633 | PEM_write_DSA_PUBKEY 2101 EXIST:!WIN16:FUNCTION: |
| 1634 | sk_X509_REVOKED_new 1660 | 1634 | X509_PURPOSE_get0_sname 2105 EXIST::FUNCTION: |
| 1635 | i2d_ASN1_SET_OF_X509_REVOKED 1661 | 1635 | EVP_PKEY_set1_DH 2107 EXIST::FUNCTION:DH |
| 1636 | sk_X509_REVOKED_shift 1662 | 1636 | ASN1_OCTET_STRING_dup 2108 EXIST::FUNCTION: |
| 1637 | sk_X509_REVOKED_delete_ptr 1663 | 1637 | ASN1_BIT_STRING_set 2109 EXIST::FUNCTION: |
| 1638 | sk_X509_REVOKED_pop_free 1664 | 1638 | X509_TRUST_get_count 2110 EXIST::FUNCTION: |
| 1639 | sk_X509_REVOKED_insert 1665 | 1639 | ASN1_INTEGER_free 2111 EXIST::FUNCTION: |
| 1640 | sk_X509_REVOKED_zero 1666 | 1640 | OTHERNAME_free 2112 EXIST::FUNCTION: |
| 1641 | sk_X509_REVOKED_pop 1667 | 1641 | i2d_RSA_PUBKEY_fp 2113 EXIST::FUNCTION:RSA,FP_API |
| 1642 | sk_X509_REVOKED_value 1668 | 1642 | ASN1_INTEGER_dup 2114 EXIST::FUNCTION: |
| 1643 | sk_X509_REVOKED_num 1669 | 1643 | d2i_X509_CERT_AUX 2115 EXIST::FUNCTION: |
| 1644 | sk_X509_REVOKED_push 1670 | 1644 | PEM_write_bio_PUBKEY 2117 EXIST::FUNCTION: |
| 1645 | sk_sort 1671 | 1645 | ASN1_VISIBLESTRING_free 2118 EXIST::FUNCTION: |
| 1646 | sk_X509_REVOKED_find 1672 | 1646 | X509_PURPOSE_cleanup 2119 EXIST::FUNCTION: |
| 1647 | sk_X509_REVOKED_delete 1673 | 1647 | ASN1_mbstring_ncopy 2123 EXIST::FUNCTION: |
| 1648 | d2i_ASN1_SET_OF_X509_REVOKED 1674 | 1648 | ASN1_GENERALIZEDTIME_new 2126 EXIST::FUNCTION: |
| 1649 | sk_X509_REVOKED_new_null 1675 | 1649 | EVP_PKEY_get1_DH 2128 EXIST::FUNCTION:DH |
| 1650 | sk_X509_REVOKED_set 1676 | 1650 | ASN1_OCTET_STRING_new 2130 EXIST::FUNCTION: |
| 1651 | sk_X509_ALGOR_new 1677 | 1651 | ASN1_INTEGER_new 2131 EXIST::FUNCTION: |
| 1652 | sk_X509_CRL_set_cmp_func 1678 | 1652 | i2d_X509_AUX 2132 EXIST::FUNCTION: |
| 1653 | sk_X509_CRL_set 1679 | 1653 | ASN1_BIT_STRING_name_print 2134 EXIST::FUNCTION: |
| 1654 | sk_X509_ALGOR_unshift 1680 | 1654 | X509_cmp 2135 EXIST::FUNCTION: |
| 1655 | sk_X509_CRL_free 1681 | 1655 | ASN1_STRING_length_set 2136 EXIST::FUNCTION: |
| 1656 | i2d_ASN1_SET_OF_X509_ALGOR 1682 | 1656 | DIRECTORYSTRING_new 2137 EXIST::FUNCTION: |
| 1657 | sk_X509_ALGOR_pop 1683 | 1657 | X509_add1_trust_object 2140 EXIST::FUNCTION: |
| 1658 | sk_X509_CRL_unshift 1684 | 1658 | PKCS12_newpass 2141 EXIST::FUNCTION: |
| 1659 | i2d_ASN1_SET_OF_X509_CRL 1685 | 1659 | SMIME_write_PKCS7 2142 EXIST::FUNCTION: |
| 1660 | sk_X509_ALGOR_num 1686 | 1660 | SMIME_read_PKCS7 2143 EXIST::FUNCTION: |
| 1661 | sk_X509_CRL_insert 1687 | 1661 | des_set_key_checked 2144 EXIST::FUNCTION:DES |
| 1662 | sk_X509_CRL_pop_free 1688 | 1662 | PKCS7_verify 2145 EXIST::FUNCTION: |
| 1663 | sk_X509_CRL_delete_ptr 1689 | 1663 | PKCS7_encrypt 2146 EXIST::FUNCTION: |
| 1664 | sk_X509_ALGOR_insert 1690 | 1664 | des_set_key_unchecked 2147 EXIST::FUNCTION:DES |
| 1665 | sk_X509_CRL_dup 1691 | 1665 | SMIME_crlf_copy 2148 EXIST::FUNCTION: |
| 1666 | sk_X509_CRL_zero 1692 | 1666 | i2d_ASN1_PRINTABLESTRING 2149 EXIST::FUNCTION: |
| 1667 | sk_X509_CRL_new 1693 | 1667 | PKCS7_get0_signers 2150 EXIST::FUNCTION: |
| 1668 | sk_X509_CRL_push 1694 | 1668 | PKCS7_decrypt 2151 EXIST::FUNCTION: |
| 1669 | sk_X509_ALGOR_new_null 1695 | 1669 | SMIME_text 2152 EXIST::FUNCTION: |
| 1670 | d2i_ASN1_SET_OF_X509_ALGOR 1696 | 1670 | PKCS7_simple_smimecap 2153 EXIST::FUNCTION: |
| 1671 | sk_X509_CRL_shift 1697 | 1671 | PKCS7_get_smimecap 2154 EXIST::FUNCTION: |
| 1672 | sk_X509_CRL_find 1698 | 1672 | PKCS7_sign 2155 EXIST::FUNCTION: |
| 1673 | sk_X509_CRL_delete 1699 | 1673 | PKCS7_add_attrib_smimecap 2156 EXIST::FUNCTION: |
| 1674 | sk_X509_ALGOR_free 1700 | 1674 | CRYPTO_dbg_set_options 2157 EXIST::FUNCTION: |
| 1675 | sk_X509_ALGOR_delete 1701 | 1675 | CRYPTO_remove_all_info 2158 EXIST::FUNCTION: |
| 1676 | d2i_ASN1_SET_OF_X509_CRL 1702 | 1676 | CRYPTO_get_mem_debug_functions 2159 EXIST::FUNCTION: |
| 1677 | sk_X509_ALGOR_delete_ptr 1703 | 1677 | CRYPTO_is_mem_check_on 2160 EXIST::FUNCTION: |
| 1678 | sk_X509_CRL_pop 1704 | 1678 | CRYPTO_set_mem_debug_functions 2161 EXIST::FUNCTION: |
| 1679 | sk_X509_ALGOR_set 1705 | 1679 | CRYPTO_pop_info 2162 EXIST::FUNCTION: |
| 1680 | sk_X509_CRL_num 1706 | 1680 | CRYPTO_push_info_ 2163 EXIST::FUNCTION: |
| 1681 | sk_X509_CRL_value 1707 | 1681 | CRYPTO_set_mem_debug_options 2164 EXIST::FUNCTION: |
| 1682 | sk_X509_ALGOR_shift 1708 | 1682 | PEM_write_PKCS8PrivateKey_nid 2165 EXIST::FUNCTION: |
| 1683 | sk_X509_ALGOR_zero 1709 | 1683 | PEM_write_bio_PKCS8PrivateKey_nid 2166 EXIST:!VMS:FUNCTION: |
| 1684 | sk_X509_CRL_new_null 1710 | 1684 | PEM_write_bio_PKCS8PrivKey_nid 2166 EXIST:VMS:FUNCTION: |
| 1685 | sk_X509_ALGOR_push 1711 | 1685 | d2i_PKCS8PrivateKey_bio 2167 EXIST::FUNCTION: |
| 1686 | sk_X509_ALGOR_value 1712 | 1686 | ASN1_NULL_free 2168 EXIST::FUNCTION: |
| 1687 | sk_X509_ALGOR_find 1713 | 1687 | d2i_ASN1_NULL 2169 EXIST::FUNCTION: |
| 1688 | sk_X509_ALGOR_set_cmp_func 1714 | 1688 | ASN1_NULL_new 2170 EXIST::FUNCTION: |
| 1689 | sk_X509_ALGOR_dup 1715 | 1689 | i2d_PKCS8PrivateKey_bio 2171 EXIST::FUNCTION: |
| 1690 | sk_X509_ALGOR_pop_free 1716 | 1690 | i2d_PKCS8PrivateKey_fp 2172 EXIST::FUNCTION: |
| 1691 | sk_PKCS7_SIGNER_INFO_new 1717 | 1691 | i2d_ASN1_NULL 2173 EXIST::FUNCTION: |
| 1692 | sk_PKCS7_SIGNER_INFO_zero 1718 | 1692 | i2d_PKCS8PrivateKey_nid_fp 2174 EXIST::FUNCTION: |
| 1693 | sk_PKCS7_SIGNER_INFO_unshift 1719 | 1693 | d2i_PKCS8PrivateKey_fp 2175 EXIST::FUNCTION: |
| 1694 | sk_PKCS7_RECIP_INFO_dup 1720 | 1694 | i2d_PKCS8PrivateKey_nid_bio 2176 EXIST::FUNCTION: |
| 1695 | sk_PKCS7_SIGNER_INFO_insert 1721 | 1695 | i2d_PKCS8PrivateKeyInfo_fp 2177 EXIST::FUNCTION:FP_API |
| 1696 | sk_PKCS7_SIGNER_INFO_push 1722 | 1696 | i2d_PKCS8PrivateKeyInfo_bio 2178 EXIST::FUNCTION: |
| 1697 | i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO 1723 | 1697 | PEM_cb 2179 NOEXIST::FUNCTION: |
| 1698 | sk_PKCS7_RECIP_INFO_new 1724 | 1698 | i2d_PrivateKey_fp 2180 EXIST::FUNCTION:FP_API |
| 1699 | sk_X509_LOOKUP_new_null 1725 | 1699 | d2i_PrivateKey_bio 2181 EXIST::FUNCTION: |
| 1700 | sk_PKCS7_SIGNER_INFO_find 1726 | 1700 | d2i_PrivateKey_fp 2182 EXIST::FUNCTION:FP_API |
| 1701 | sk_PKCS7_SIGNER_INFO_set_cmp_func 1727 | 1701 | i2d_PrivateKey_bio 2183 EXIST::FUNCTION: |
| 1702 | sk_X509_LOOKUP_zero 1728 | 1702 | X509_reject_clear 2184 EXIST::FUNCTION: |
| 1703 | sk_PKCS7_RECIP_INFO_shift 1729 | 1703 | X509_TRUST_set_default 2185 EXIST::FUNCTION: |
| 1704 | sk_PKCS7_RECIP_INFO_new_null 1730 | 1704 | d2i_AutoPrivateKey 2186 EXIST::FUNCTION: |
| 1705 | sk_PKCS7_SIGNER_INFO_shift 1731 | 1705 | X509_ATTRIBUTE_get0_type 2187 EXIST::FUNCTION: |
| 1706 | sk_PKCS7_SIGNER_INFO_pop 1732 | 1706 | X509_ATTRIBUTE_set1_data 2188 EXIST::FUNCTION: |
| 1707 | sk_PKCS7_SIGNER_INFO_pop_free 1733 | 1707 | X509at_get_attr 2189 EXIST::FUNCTION: |
| 1708 | sk_X509_LOOKUP_push 1734 | 1708 | X509at_get_attr_count 2190 EXIST::FUNCTION: |
| 1709 | sk_X509_LOOKUP_dup 1735 | 1709 | X509_ATTRIBUTE_create_by_NID 2191 EXIST::FUNCTION: |
| 1710 | sk_PKCS7_SIGNER_INFO_num 1736 | 1710 | X509_ATTRIBUTE_set1_object 2192 EXIST::FUNCTION: |
| 1711 | sk_X509_LOOKUP_find 1737 | 1711 | X509_ATTRIBUTE_count 2193 EXIST::FUNCTION: |
| 1712 | i2d_ASN1_SET_OF_PKCS7_RECIP_INFO 1738 | 1712 | X509_ATTRIBUTE_create_by_OBJ 2194 EXIST::FUNCTION: |
| 1713 | sk_X509_LOOKUP_new 1739 | 1713 | X509_ATTRIBUTE_get0_object 2195 EXIST::FUNCTION: |
| 1714 | sk_PKCS7_SIGNER_INFO_delete 1740 | 1714 | X509at_get_attr_by_NID 2196 EXIST::FUNCTION: |
| 1715 | sk_PKCS7_RECIP_INFO_set_cmp_func 1741 | 1715 | X509at_add1_attr 2197 EXIST::FUNCTION: |
| 1716 | sk_PKCS7_SIGNER_INFO_delete_ptr 1742 | 1716 | X509_ATTRIBUTE_get0_data 2198 EXIST::FUNCTION: |
| 1717 | sk_PKCS7_RECIP_INFO_pop 1743 | 1717 | X509at_delete_attr 2199 EXIST::FUNCTION: |
| 1718 | sk_X509_LOOKUP_insert 1744 | 1718 | X509at_get_attr_by_OBJ 2200 EXIST::FUNCTION: |
| 1719 | sk_PKCS7_RECIP_INFO_value 1745 | 1719 | RAND_add 2201 EXIST::FUNCTION: |
| 1720 | sk_PKCS7_RECIP_INFO_num 1746 | 1720 | BIO_number_written 2202 EXIST::FUNCTION: |
| 1721 | sk_PKCS7_SIGNER_INFO_value 1747 | 1721 | BIO_number_read 2203 EXIST::FUNCTION: |
| 1722 | d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO 1748 | 1722 | X509_STORE_CTX_get1_chain 2204 EXIST::FUNCTION: |
| 1723 | sk_X509_LOOKUP_pop 1749 | 1723 | ERR_load_RAND_strings 2205 EXIST::FUNCTION: |
| 1724 | sk_X509_LOOKUP_num 1750 | 1724 | RAND_pseudo_bytes 2206 EXIST::FUNCTION: |
| 1725 | sk_X509_LOOKUP_delete 1751 | 1725 | X509_REQ_get_attr_by_NID 2207 EXIST::FUNCTION: |
| 1726 | sk_PKCS7_RECIP_INFO_free 1752 | 1726 | X509_REQ_get_attr 2208 EXIST::FUNCTION: |
| 1727 | d2i_ASN1_SET_OF_PKCS7_RECIP_INFO 1753 | 1727 | X509_REQ_add1_attr_by_NID 2209 EXIST::FUNCTION: |
| 1728 | sk_PKCS7_SIGNER_INFO_set 1754 | 1728 | X509_REQ_get_attr_by_OBJ 2210 EXIST::FUNCTION: |
| 1729 | sk_X509_LOOKUP_pop_free 1755 | 1729 | X509at_add1_attr_by_NID 2211 EXIST::FUNCTION: |
| 1730 | sk_X509_LOOKUP_shift 1756 | 1730 | X509_REQ_add1_attr_by_OBJ 2212 EXIST::FUNCTION: |
| 1731 | sk_X509_LOOKUP_unshift 1757 | 1731 | X509_REQ_get_attr_count 2213 EXIST::FUNCTION: |
| 1732 | sk_PKCS7_SIGNER_INFO_new_null 1758 | 1732 | X509_REQ_add1_attr 2214 EXIST::FUNCTION: |
| 1733 | sk_PKCS7_RECIP_INFO_delete_ptr 1759 | 1733 | X509_REQ_delete_attr 2215 EXIST::FUNCTION: |
| 1734 | sk_PKCS7_RECIP_INFO_pop_free 1760 | 1734 | X509at_add1_attr_by_OBJ 2216 EXIST::FUNCTION: |
| 1735 | sk_PKCS7_RECIP_INFO_insert 1761 | 1735 | X509_REQ_add1_attr_by_txt 2217 EXIST::FUNCTION: |
| 1736 | sk_PKCS7_SIGNER_INFO_free 1762 | 1736 | X509_ATTRIBUTE_create_by_txt 2218 EXIST::FUNCTION: |
| 1737 | sk_PKCS7_RECIP_INFO_set 1763 | 1737 | X509at_add1_attr_by_txt 2219 EXIST::FUNCTION: |
| 1738 | sk_PKCS7_RECIP_INFO_zero 1764 | 1738 | BN_pseudo_rand 2239 EXIST::FUNCTION: |
| 1739 | sk_X509_LOOKUP_value 1765 | 1739 | BN_is_prime_fasttest 2240 EXIST::FUNCTION: |
| 1740 | sk_PKCS7_RECIP_INFO_push 1766 | 1740 | BN_CTX_end 2241 EXIST::FUNCTION: |
| 1741 | sk_PKCS7_RECIP_INFO_unshift 1767 | 1741 | BN_CTX_start 2242 EXIST::FUNCTION: |
| 1742 | sk_X509_LOOKUP_set_cmp_func 1768 | 1742 | BN_CTX_get 2243 EXIST::FUNCTION: |
| 1743 | sk_X509_LOOKUP_free 1769 | 1743 | EVP_PKEY2PKCS8_broken 2244 EXIST::FUNCTION: |
| 1744 | sk_PKCS7_SIGNER_INFO_dup 1770 | 1744 | ASN1_STRING_TABLE_add 2245 EXIST::FUNCTION: |
| 1745 | sk_X509_LOOKUP_delete_ptr 1771 | 1745 | CRYPTO_dbg_get_options 2246 EXIST::FUNCTION: |
| 1746 | sk_X509_LOOKUP_set 1772 | 1746 | AUTHORITY_INFO_ACCESS_new 2247 EXIST::FUNCTION: |
| 1747 | sk_PKCS7_RECIP_INFO_find 1773 | 1747 | CRYPTO_get_mem_debug_options 2248 EXIST::FUNCTION: |
| 1748 | sk_PKCS7_RECIP_INFO_delete 1774 | 1748 | des_crypt 2249 EXIST::FUNCTION:DES |
| 1749 | PKCS5_PBE_add 1775 | 1749 | PEM_write_bio_X509_REQ_NEW 2250 EXIST::FUNCTION: |
| 1750 | PEM_write_bio_PKCS8 1776 | 1750 | PEM_write_X509_REQ_NEW 2251 EXIST:!WIN16:FUNCTION: |
| 1751 | i2d_PKCS8_fp 1777 | 1751 | BIO_callback_ctrl 2252 EXIST::FUNCTION: |
| 1752 | PEM_read_bio_PKCS8_PRIV_KEY_INFO 1778 | 1752 | RAND_egd 2253 EXIST::FUNCTION: |
| 1753 | d2i_PKCS8_bio 1779 | 1753 | RAND_status 2254 EXIST::FUNCTION: |
| 1754 | d2i_PKCS8_PRIV_KEY_INFO_fp 1780 | 1754 | bn_dump1 2255 NOEXIST::FUNCTION: |
| 1755 | PEM_write_bio_PKCS8_PRIV_KEY_INFO 1781 | 1755 | des_check_key_parity 2256 EXIST::FUNCTION:DES |
| 1756 | PEM_read_PKCS8 1782 | 1756 | lh_num_items 2257 EXIST::FUNCTION: |
| 1757 | d2i_PKCS8_PRIV_KEY_INFO_bio 1783 | 1757 | RAND_event 2258 EXIST::FUNCTION: |
| 1758 | d2i_PKCS8_fp 1784 | 1758 | DSO_new 2259 EXIST::FUNCTION: |
| 1759 | PEM_write_PKCS8 1785 | 1759 | DSO_new_method 2260 EXIST::FUNCTION: |
| 1760 | PEM_read_PKCS8_PRIV_KEY_INFO 1786 | 1760 | DSO_free 2261 EXIST::FUNCTION: |
| 1761 | PEM_read_bio_PKCS8 1787 | 1761 | DSO_flags 2262 EXIST::FUNCTION: |
| 1762 | PEM_write_PKCS8_PRIV_KEY_INFO 1788 | 1762 | DSO_up 2263 EXIST::FUNCTION: |
| 1763 | PKCS5_PBE_keyivgen 1789 | 1763 | DSO_set_default_method 2264 EXIST::FUNCTION: |
| 1764 | i2d_PKCS8_bio 1790 | 1764 | DSO_get_default_method 2265 EXIST::FUNCTION: |
| 1765 | i2d_PKCS8_PRIV_KEY_INFO_fp 1791 | 1765 | DSO_get_method 2266 EXIST::FUNCTION: |
| 1766 | i2d_PKCS8_PRIV_KEY_INFO_bio 1792 | 1766 | DSO_set_method 2267 EXIST::FUNCTION: |
| 1767 | BIO_s_bio 1793 | 1767 | DSO_load 2268 EXIST::FUNCTION: |
| 1768 | PKCS5_pbe2_set 1794 | 1768 | DSO_bind_var 2269 EXIST::FUNCTION: |
| 1769 | PKCS5_PBKDF2_HMAC_SHA1 1795 | 1769 | DSO_METHOD_null 2270 EXIST::FUNCTION: |
| 1770 | PKCS5_v2_PBE_keyivgen 1796 | 1770 | DSO_METHOD_openssl 2271 EXIST::FUNCTION: |
| 1771 | PEM_write_bio_PKCS8PrivateKey 1797 | 1771 | DSO_METHOD_dlfcn 2272 EXIST::FUNCTION: |
| 1772 | PEM_write_PKCS8PrivateKey 1798 | 1772 | DSO_METHOD_win32 2273 EXIST::FUNCTION: |
| 1773 | BIO_ctrl_get_read_request 1799 | 1773 | ERR_load_DSO_strings 2274 EXIST::FUNCTION: |
| 1774 | BIO_ctrl_pending 1800 | 1774 | DSO_METHOD_dl 2275 EXIST::FUNCTION: |
| 1775 | BIO_ctrl_wpending 1801 | 1775 | NCONF_load 2276 EXIST::FUNCTION: |
| 1776 | BIO_new_bio_pair 1802 | 1776 | NCONF_load_fp 2278 EXIST::FUNCTION:FP_API |
| 1777 | BIO_ctrl_get_write_guarantee 1803 | 1777 | NCONF_new 2279 EXIST::FUNCTION: |
| 1778 | CRYPTO_num_locks 1804 | 1778 | NCONF_get_string 2280 EXIST::FUNCTION: |
| 1779 | CONF_load_bio 1805 | 1779 | NCONF_free 2281 EXIST::FUNCTION: |
| 1780 | CONF_load_fp 1806 | 1780 | NCONF_get_number 2282 EXIST::FUNCTION: |
| 1781 | sk_CONF_VALUE_delete 1807 | 1781 | CONF_dump_fp 2283 EXIST::FUNCTION: |
| 1782 | sk_CONF_VALUE_pop 1808 | 1782 | NCONF_load_bio 2284 EXIST::FUNCTION: |
| 1783 | sk_CONF_VALUE_num 1809 | 1783 | NCONF_dump_fp 2285 EXIST::FUNCTION: |
| 1784 | sk_CONF_VALUE_pop_free 1810 | 1784 | NCONF_get_section 2286 EXIST::FUNCTION: |
| 1785 | sk_CONF_VALUE_free 1811 | 1785 | NCONF_dump_bio 2287 EXIST::FUNCTION: |
| 1786 | sk_CONF_VALUE_shift 1812 | 1786 | CONF_dump_bio 2288 EXIST::FUNCTION: |
| 1787 | sk_CONF_VALUE_unshift 1813 | 1787 | NCONF_free_data 2289 EXIST::FUNCTION: |
| 1788 | sk_CONF_VALUE_value 1814 | 1788 | CONF_set_default_method 2290 EXIST::FUNCTION: |
| 1789 | sk_CONF_VALUE_set 1815 | 1789 | ERR_error_string_n 2291 EXIST::FUNCTION: |
| 1790 | sk_CONF_VALUE_zero 1816 | 1790 | BIO_snprintf 2292 EXIST::FUNCTION: |
| 1791 | sk_CONF_VALUE_push 1817 | 1791 | DSO_ctrl 2293 EXIST::FUNCTION: |
| 1792 | sk_CONF_VALUE_delete_ptr 1818 | 1792 | i2d_ASN1_SET_OF_ASN1_INTEGER 2317 NOEXIST::FUNCTION: |
| 1793 | sk_CONF_VALUE_find 1819 | 1793 | i2d_ASN1_SET_OF_PKCS12_SAFEBAG 2320 NOEXIST::FUNCTION: |
| 1794 | sk_CONF_VALUE_set_cmp_func 1820 | 1794 | i2d_ASN1_SET_OF_PKCS7 2328 NOEXIST::FUNCTION: |
| 1795 | sk_CONF_VALUE_new_null 1821 | 1795 | BIO_vfree 2334 EXIST::FUNCTION: |
| 1796 | sk_CONF_VALUE_dup 1822 | 1796 | d2i_ASN1_SET_OF_ASN1_INTEGER 2339 NOEXIST::FUNCTION: |
| 1797 | sk_CONF_VALUE_insert 1823 | 1797 | d2i_ASN1_SET_OF_PKCS12_SAFEBAG 2341 NOEXIST::FUNCTION: |
| 1798 | sk_CONF_VALUE_new 1824 | 1798 | ASN1_UTCTIME_get 2350 EXIST::FUNCTION: |
| 1799 | sk_ASN1_OBJECT_find 1825 | 1799 | X509_REQ_digest 2362 EXIST::FUNCTION: |
| 1800 | sk_ASN1_OBJECT_pop_free 1826 | 1800 | X509_CRL_digest 2391 EXIST::FUNCTION: |
| 1801 | sk_ASN1_OBJECT_dup 1827 | 1801 | d2i_ASN1_SET_OF_PKCS7 2397 NOEXIST::FUNCTION: |
| 1802 | sk_ASN1_OBJECT_delete_ptr 1828 | 1802 | EVP_CIPHER_CTX_set_key_length 2399 EXIST::FUNCTION: |
| 1803 | sk_ASN1_OBJECT_new 1829 | 1803 | EVP_CIPHER_CTX_ctrl 2400 EXIST::FUNCTION: |
| 1804 | sk_ASN1_OBJECT_unshift 1830 | 1804 | BN_mod_exp_mont_word 2401 EXIST::FUNCTION: |
| 1805 | sk_ASN1_OBJECT_delete 1831 | 1805 | RAND_egd_bytes 2402 EXIST::FUNCTION: |
| 1806 | sk_ASN1_OBJECT_shift 1832 | 1806 | X509_REQ_get1_email 2403 EXIST::FUNCTION: |
| 1807 | sk_ASN1_OBJECT_pop 1833 | 1807 | X509_get1_email 2404 EXIST::FUNCTION: |
| 1808 | sk_ASN1_OBJECT_num 1834 | 1808 | X509_email_free 2405 EXIST::FUNCTION: |
| 1809 | sk_ASN1_OBJECT_value 1835 | 1809 | i2d_RSA_NET 2406 EXIST::FUNCTION:RSA |
| 1810 | sk_ASN1_OBJECT_new_null 1836 | 1810 | d2i_RSA_NET_2 2407 EXIST::FUNCTION:RSA |
| 1811 | i2d_ASN1_SET_OF_ASN1_OBJECT 1837 | 1811 | d2i_RSA_NET 2408 EXIST::FUNCTION:RSA |
| 1812 | sk_ASN1_OBJECT_free 1838 | 1812 | DSO_bind_func 2409 EXIST::FUNCTION: |
| 1813 | sk_ASN1_OBJECT_set 1839 | 1813 | CRYPTO_get_new_dynlockid 2410 EXIST::FUNCTION: |
| 1814 | sk_ASN1_OBJECT_set_cmp_func 1840 | 1814 | sk_new_null 2411 EXIST::FUNCTION: |
| 1815 | sk_ASN1_OBJECT_zero 1841 | 1815 | CRYPTO_set_dynlock_destroy_callback 2412 EXIST:!VMS:FUNCTION: |
| 1816 | sk_ASN1_OBJECT_insert 1842 | 1816 | CRYPTO_set_dynlock_destroy_cb 2412 EXIST:VMS:FUNCTION: |
| 1817 | sk_ASN1_OBJECT_push 1843 | 1817 | CRYPTO_destroy_dynlockid 2413 EXIST::FUNCTION: |
| 1818 | d2i_ASN1_SET_OF_ASN1_OBJECT 1844 | 1818 | CRYPTO_set_dynlock_size 2414 NOEXIST::FUNCTION: |
| 1819 | PKCS7_signatureVerify 1845 | 1819 | CRYPTO_set_dynlock_create_callback 2415 EXIST:!VMS:FUNCTION: |
| 1820 | RSA_set_method 1846 | 1820 | CRYPTO_set_dynlock_create_cb 2415 EXIST:VMS:FUNCTION: |
| 1821 | RSA_get_method 1847 | 1821 | CRYPTO_set_dynlock_lock_callback 2416 EXIST:!VMS:FUNCTION: |
| 1822 | RSA_get_default_method 1848 | 1822 | CRYPTO_set_dynlock_lock_cb 2416 EXIST:VMS:FUNCTION: |
| 1823 | sk_CONF_VALUE_sort 1849 | 1823 | CRYPTO_get_dynlock_lock_callback 2417 EXIST:!VMS:FUNCTION: |
| 1824 | sk_X509_REVOKED_sort 1850 | 1824 | CRYPTO_get_dynlock_lock_cb 2417 EXIST:VMS:FUNCTION: |
| 1825 | sk_X509_ATTRIBUTE_sort 1851 | 1825 | CRYPTO_get_dynlock_destroy_callback 2418 EXIST:!VMS:FUNCTION: |
| 1826 | sk_X509_INFO_sort 1852 | 1826 | CRYPTO_get_dynlock_destroy_cb 2418 EXIST:VMS:FUNCTION: |
| 1827 | sk_POLICYINFO_sort 1853 | 1827 | CRYPTO_get_dynlock_value 2419 EXIST::FUNCTION: |
| 1828 | sk_GENERAL_NAME_sort 1854 | 1828 | CRYPTO_get_dynlock_create_callback 2420 EXIST:!VMS:FUNCTION: |
| 1829 | sk_X509_sort 1855 | 1829 | CRYPTO_get_dynlock_create_cb 2420 EXIST:VMS:FUNCTION: |
| 1830 | sk_X509_NAME_sort 1856 | 1830 | c2i_ASN1_BIT_STRING 2421 EXIST::FUNCTION: |
| 1831 | sk_ASN1_TYPE_sort 1857 | 1831 | i2c_ASN1_BIT_STRING 2422 EXIST::FUNCTION: |
| 1832 | sk_X509_ALGOR_sort 1858 | 1832 | RAND_poll 2423 EXIST::FUNCTION: |
| 1833 | sk_PKCS7_RECIP_INFO_sort 1859 | 1833 | c2i_ASN1_INTEGER 2424 EXIST::FUNCTION: |
| 1834 | sk_X509_NAME_ENTRY_sort 1860 | 1834 | i2c_ASN1_INTEGER 2425 EXIST::FUNCTION: |
| 1835 | sk_X509_EXTENSION_sort 1861 | 1835 | BIO_dump_indent 2426 EXIST::FUNCTION: |
| 1836 | sk_SXNETID_sort 1862 | 1836 | ASN1_parse_dump 2427 EXIST::FUNCTION: |
| 1837 | sk_ASN1_OBJECT_sort 1863 | 1837 | c2i_ASN1_OBJECT 2428 EXIST::FUNCTION: |
| 1838 | sk_PKCS7_SIGNER_INFO_sort 1864 | 1838 | X509_NAME_print_ex_fp 2429 EXIST::FUNCTION:FP_API |
| 1839 | sk_X509_LOOKUP_sort 1865 | 1839 | ASN1_STRING_print_ex_fp 2430 EXIST::FUNCTION:FP_API |
| 1840 | sk_POLICYQUALINFO_sort 1866 | 1840 | X509_NAME_print_ex 2431 EXIST::FUNCTION: |
| 1841 | sk_X509_CRL_sort 1867 | 1841 | ASN1_STRING_print_ex 2432 EXIST::FUNCTION: |
| 1842 | sk_DIST_POINT_sort 1868 | 1842 | MD4 2433 EXIST::FUNCTION:MD4 |
| 1843 | RSA_check_key 1869 | 1843 | MD4_Transform 2434 EXIST::FUNCTION:MD4 |
| 1844 | OBJ_obj2txt 1870 | 1844 | MD4_Final 2435 EXIST::FUNCTION:MD4 |
| 1845 | DSA_dup_DH 1871 | 1845 | MD4_Update 2436 EXIST::FUNCTION:MD4 |
| 1846 | X509_REQ_get_extensions 1872 | 1846 | MD4_Init 2437 EXIST::FUNCTION:MD4 |
| 1847 | X509_REQ_set_extension_nids 1873 | 1847 | EVP_md4 2438 EXIST::FUNCTION:MD4 |
| 1848 | BIO_nwrite 1874 | 1848 | i2d_PUBKEY_bio 2439 EXIST::FUNCTION: |
| 1849 | X509_REQ_extension_nid 1875 | 1849 | i2d_PUBKEY_fp 2440 EXIST::FUNCTION:FP_API |
| 1850 | BIO_nread 1876 | 1850 | d2i_PUBKEY_bio 2441 EXIST::FUNCTION: |
| 1851 | X509_REQ_get_extension_nids 1877 | 1851 | ASN1_STRING_to_UTF8 2442 EXIST::FUNCTION: |
| 1852 | BIO_nwrite0 1878 | 1852 | BIO_vprintf 2443 EXIST::FUNCTION: |
| 1853 | X509_REQ_add_extensions_nid 1879 | 1853 | BIO_vsnprintf 2444 EXIST::FUNCTION: |
| 1854 | BIO_nread0 1880 | 1854 | d2i_PUBKEY_fp 2445 EXIST::FUNCTION:FP_API |
| 1855 | X509_REQ_add_extensions 1881 | 1855 | X509_cmp_time 2446 EXIST::FUNCTION: |
| 1856 | BIO_new_mem_buf 1882 | 1856 | X509_STORE_CTX_set_time 2447 EXIST::FUNCTION: |
| 1857 | DH_set_ex_data 1883 | 1857 | X509_STORE_CTX_get1_issuer 2448 EXIST::FUNCTION: |
| 1858 | DH_set_method 1884 | 1858 | X509_OBJECT_retrieve_match 2449 EXIST::FUNCTION: |
| 1859 | DSA_OpenSSL 1885 | 1859 | X509_OBJECT_idx_by_subject 2450 EXIST::FUNCTION: |
| 1860 | DH_get_ex_data 1886 | 1860 | X509_STORE_CTX_set_flags 2451 EXIST::FUNCTION: |
| 1861 | DH_get_ex_new_index 1887 | 1861 | X509_STORE_CTX_trusted_stack 2452 EXIST::FUNCTION: |
| 1862 | DSA_new_method 1888 | 1862 | X509_time_adj 2453 EXIST::FUNCTION: |
| 1863 | DH_new_method 1889 | 1863 | X509_check_issued 2454 EXIST::FUNCTION: |
| 1864 | DH_OpenSSL 1890 | 1864 | ASN1_UTCTIME_cmp_time_t 2455 EXIST::FUNCTION: |
| 1865 | DSA_get_ex_new_index 1891 | 1865 | des_set_weak_key_flag 2456 EXIST::VARIABLE:DES |
| 1866 | DH_get_default_method 1892 | 1866 | des_check_key 2457 EXIST::VARIABLE:DES |
| 1867 | DSA_set_ex_data 1893 | 1867 | des_rw_mode 2458 EXIST::VARIABLE:DES |
| 1868 | DH_set_default_method 1894 | 1868 | RSA_PKCS1_RSAref 2459 EXIST:RSAREF:FUNCTION:RSA |
| 1869 | DSA_get_ex_data 1895 | 1869 | X509_keyid_set1 2460 EXIST::FUNCTION: |
| 1870 | X509V3_EXT_REQ_add_conf 1896 | 1870 | BIO_next 2461 EXIST::FUNCTION: |
| 1871 | NETSCAPE_SPKI_print 1897 | 1871 | DSO_METHOD_vms 2462 EXIST::FUNCTION: |
| 1872 | NETSCAPE_SPKI_set_pubkey 1898 | 1872 | BIO_f_linebuffer 2463 EXIST:VMS:FUNCTION: |
| 1873 | NETSCAPE_SPKI_b64_encode 1899 | 1873 | ERR_load_ENGINE_strings 2464 EXIST::FUNCTION: |
| 1874 | NETSCAPE_SPKI_get_pubkey 1900 | 1874 | ENGINE_set_DSA 2465 EXIST::FUNCTION: |
| 1875 | NETSCAPE_SPKI_b64_decode 1901 | 1875 | ENGINE_get_finish_function 2466 EXIST::FUNCTION: |
| 1876 | UTF8_putc 1902 | 1876 | ENGINE_get_default_RSA 2467 EXIST::FUNCTION: |
| 1877 | UTF8_getc 1903 | 1877 | ENGINE_get_BN_mod_exp 2468 EXIST::FUNCTION: |
| 1878 | RSA_null_method 1904 | 1878 | DSA_get_default_openssl_method 2469 EXIST::FUNCTION:DSA |
| 1879 | ASN1_tag2str 1905 | 1879 | ENGINE_set_DH 2470 EXIST::FUNCTION: |
| 1880 | BIO_ctrl_reset_read_request 1906 | 1880 | ENGINE_set_default_BN_mod_exp_crt 2471 EXIST:!VMS:FUNCTION: |
| 1881 | DISPLAYTEXT_new 1907 | 1881 | ENGINE_set_def_BN_mod_exp_crt 2471 EXIST:VMS:FUNCTION: |
| 1882 | ASN1_GENERALIZEDTIME_free 1908 | 1882 | ENGINE_init 2472 EXIST::FUNCTION: |
| 1883 | X509_REVOKED_get_ext_d2i 1909 | 1883 | DH_get_default_openssl_method 2473 EXIST::FUNCTION:DH |
| 1884 | X509_set_ex_data 1910 | 1884 | RSA_set_default_openssl_method 2474 EXIST::FUNCTION:RSA |
| 1885 | X509_reject_set_bit_asc 1911 | 1885 | ENGINE_finish 2475 EXIST::FUNCTION: |
| 1886 | X509_NAME_add_entry_by_txt 1912 | 1886 | ENGINE_load_public_key 2476 EXIST::FUNCTION: |
| 1887 | sk_X509_TRUST_pop 1913 | 1887 | ENGINE_get_DH 2477 EXIST::FUNCTION: |
| 1888 | X509_NAME_add_entry_by_NID 1914 | 1888 | ENGINE_ctrl 2478 EXIST::FUNCTION: |
| 1889 | X509_PURPOSE_get0 1915 | 1889 | ENGINE_get_init_function 2479 EXIST::FUNCTION: |
| 1890 | sk_ACCESS_DESCRIPTION_shift 1916 | 1890 | ENGINE_set_init_function 2480 EXIST::FUNCTION: |
| 1891 | PEM_read_X509_AUX 1917 | 1891 | ENGINE_set_default_DSA 2481 EXIST::FUNCTION: |
| 1892 | d2i_AUTHORITY_INFO_ACCESS 1918 | 1892 | ENGINE_get_name 2482 EXIST::FUNCTION: |
| 1893 | sk_X509_TRUST_set_cmp_func 1919 | 1893 | ENGINE_get_last 2483 EXIST::FUNCTION: |
| 1894 | sk_X509_TRUST_free 1920 | 1894 | ENGINE_get_prev 2484 EXIST::FUNCTION: |
| 1895 | PEM_write_PUBKEY 1921 | 1895 | ENGINE_get_default_DH 2485 EXIST::FUNCTION: |
| 1896 | sk_X509_TRUST_num 1922 | 1896 | ENGINE_get_RSA 2486 EXIST::FUNCTION: |
| 1897 | sk_ACCESS_DESCRIPTION_delete 1923 | 1897 | ENGINE_set_default 2487 EXIST::FUNCTION: |
| 1898 | sk_ASN1_STRING_TABLE_value 1924 | 1898 | ENGINE_get_RAND 2488 EXIST::FUNCTION: |
| 1899 | ACCESS_DESCRIPTION_new 1925 | 1899 | ENGINE_get_first 2489 EXIST::FUNCTION: |
| 1900 | X509_CERT_AUX_free 1926 | 1900 | ENGINE_by_id 2490 EXIST::FUNCTION: |
| 1901 | d2i_ACCESS_DESCRIPTION 1927 | 1901 | ENGINE_set_finish_function 2491 EXIST::FUNCTION: |
| 1902 | X509_trust_clear 1928 | 1902 | ENGINE_get_default_BN_mod_exp_crt 2492 EXIST:!VMS:FUNCTION: |
| 1903 | sk_X509_PURPOSE_value 1929 | 1903 | ENGINE_get_def_BN_mod_exp_crt 2492 EXIST:VMS:FUNCTION: |
| 1904 | sk_X509_PURPOSE_zero 1930 | 1904 | RSA_get_default_openssl_method 2493 EXIST::FUNCTION:RSA |
| 1905 | X509_TRUST_add 1931 | 1905 | ENGINE_set_RSA 2494 EXIST::FUNCTION: |
| 1906 | ASN1_VISIBLESTRING_new 1932 | 1906 | ENGINE_load_private_key 2495 EXIST::FUNCTION: |
| 1907 | X509_alias_set1 1933 | 1907 | ENGINE_set_default_RAND 2496 EXIST::FUNCTION: |
| 1908 | ASN1_PRINTABLESTRING_free 1934 | 1908 | ENGINE_set_BN_mod_exp 2497 EXIST::FUNCTION: |
| 1909 | EVP_PKEY_get1_DSA 1935 | 1909 | ENGINE_remove 2498 EXIST::FUNCTION: |
| 1910 | ASN1_BMPSTRING_new 1936 | 1910 | ENGINE_free 2499 EXIST::FUNCTION: |
| 1911 | ASN1_mbstring_copy 1937 | 1911 | ENGINE_get_BN_mod_exp_crt 2500 EXIST::FUNCTION: |
| 1912 | ASN1_UTF8STRING_new 1938 | 1912 | ENGINE_get_next 2501 EXIST::FUNCTION: |
| 1913 | sk_ACCESS_DESCRIPTION_set 1939 | 1913 | ENGINE_set_name 2502 EXIST::FUNCTION: |
| 1914 | sk_X509_PURPOSE_pop 1940 | 1914 | ENGINE_get_default_DSA 2503 EXIST::FUNCTION: |
| 1915 | DSA_get_default_method 1941 | 1915 | ENGINE_set_default_BN_mod_exp 2504 EXIST::FUNCTION: |
| 1916 | sk_X509_PURPOSE_push 1942 | 1916 | ENGINE_set_default_RSA 2505 EXIST::FUNCTION: |
| 1917 | sk_X509_PURPOSE_delete 1943 | 1917 | ENGINE_get_default_RAND 2506 EXIST::FUNCTION: |
| 1918 | sk_X509_PURPOSE_num 1944 | 1918 | ENGINE_get_default_BN_mod_exp 2507 EXIST::FUNCTION: |
| 1919 | i2d_ASN1_SET_OF_ACCESS_DESCRIPTION 1945 | 1919 | ENGINE_set_RAND 2508 EXIST::FUNCTION: |
| 1920 | ASN1_T61STRING_free 1946 | 1920 | ENGINE_set_id 2509 EXIST::FUNCTION: |
| 1921 | sk_ACCESS_DESCRIPTION_free 1947 | 1921 | ENGINE_set_BN_mod_exp_crt 2510 EXIST::FUNCTION: |
| 1922 | sk_ASN1_STRING_TABLE_pop 1948 | 1922 | ENGINE_set_default_DH 2511 EXIST::FUNCTION: |
| 1923 | DSA_set_method 1949 | 1923 | ENGINE_new 2512 EXIST::FUNCTION: |
| 1924 | X509_get_ex_data 1950 | 1924 | ENGINE_get_id 2513 EXIST::FUNCTION: |
| 1925 | ASN1_STRING_type 1951 | 1925 | DSA_set_default_openssl_method 2514 EXIST::FUNCTION:DSA |
| 1926 | X509_PURPOSE_get_by_sname 1952 | 1926 | ENGINE_add 2515 EXIST::FUNCTION: |
| 1927 | sk_X509_PURPOSE_find 1953 | 1927 | DH_set_default_openssl_method 2516 EXIST::FUNCTION:DH |
| 1928 | ASN1_TIME_free 1954 | 1928 | ENGINE_get_DSA 2517 EXIST::FUNCTION: |
| 1929 | ASN1_OCTET_STRING_cmp 1955 | 1929 | ENGINE_get_ctrl_function 2518 EXIST::FUNCTION: |
| 1930 | sk_ACCESS_DESCRIPTION_value 1956 | 1930 | ENGINE_set_ctrl_function 2519 EXIST::FUNCTION: |
| 1931 | ASN1_BIT_STRING_new 1957 | ||
| 1932 | X509_get_ext_d2i 1958 | ||
| 1933 | PEM_read_bio_X509_AUX 1959 | ||
| 1934 | ASN1_STRING_set_default_mask_asc 1960 | ||
| 1935 | PEM_write_bio_RSA_PUBKEY 1961 | ||
| 1936 | sk_ASN1_STRING_TABLE_num 1962 | ||
| 1937 | ASN1_INTEGER_cmp 1963 | ||
| 1938 | d2i_RSA_PUBKEY_fp 1964 | ||
| 1939 | sk_ACCESS_DESCRIPTION_unshift 1965 | ||
| 1940 | sk_ASN1_STRING_TABLE_delete_ptr 1966 | ||
| 1941 | X509_trust_set_bit_asc 1967 | ||
| 1942 | PEM_write_bio_DSA_PUBKEY 1968 | ||
| 1943 | X509_STORE_CTX_free 1969 | ||
| 1944 | EVP_PKEY_set1_DSA 1970 | ||
| 1945 | i2d_DSA_PUBKEY_fp 1971 | ||
| 1946 | X509_load_cert_crl_file 1972 | ||
| 1947 | ASN1_TIME_new 1973 | ||
| 1948 | i2d_RSA_PUBKEY 1974 | ||
| 1949 | sk_X509_TRUST_pop_free 1975 | ||
| 1950 | X509_STORE_CTX_purpose_inherit 1976 | ||
| 1951 | PEM_read_RSA_PUBKEY 1977 | ||
| 1952 | sk_X509_TRUST_zero 1978 | ||
| 1953 | sk_ACCESS_DESCRIPTION_pop_free 1979 | ||
| 1954 | d2i_X509_AUX 1980 | ||
| 1955 | i2d_DSA_PUBKEY 1981 | ||
| 1956 | X509_CERT_AUX_print 1982 | ||
| 1957 | sk_X509_PURPOSE_new_null 1983 | ||
| 1958 | PEM_read_DSA_PUBKEY 1984 | ||
| 1959 | i2d_RSA_PUBKEY_bio 1985 | ||
| 1960 | ASN1_BIT_STRING_num_asc 1986 | ||
| 1961 | i2d_PUBKEY 1987 | ||
| 1962 | ASN1_UTCTIME_free 1988 | ||
| 1963 | DSA_set_default_method 1989 | ||
| 1964 | X509_PURPOSE_get_by_id 1990 | ||
| 1965 | sk_X509_TRUST_push 1991 | ||
| 1966 | sk_ASN1_STRING_TABLE_sort 1992 | ||
| 1967 | sk_X509_PURPOSE_set_cmp_func 1993 | ||
| 1968 | ACCESS_DESCRIPTION_free 1994 | ||
| 1969 | PEM_read_bio_PUBKEY 1995 | ||
| 1970 | ASN1_STRING_set_by_NID 1996 | ||
| 1971 | X509_PURPOSE_get_id 1997 | ||
| 1972 | DISPLAYTEXT_free 1998 | ||
| 1973 | OTHERNAME_new 1999 | ||
| 1974 | sk_X509_TRUST_find 2000 | ||
| 1975 | X509_CERT_AUX_new 2001 | ||
| 1976 | sk_ACCESS_DESCRIPTION_dup 2002 | ||
| 1977 | sk_ASN1_STRING_TABLE_pop_free 2003 | ||
| 1978 | sk_ASN1_STRING_TABLE_unshift 2004 | ||
| 1979 | sk_X509_TRUST_shift 2005 | ||
| 1980 | sk_ACCESS_DESCRIPTION_zero 2006 | ||
| 1981 | X509_TRUST_cleanup 2007 | ||
| 1982 | X509_NAME_add_entry_by_OBJ 2008 | ||
| 1983 | X509_CRL_get_ext_d2i 2009 | ||
| 1984 | sk_X509_TRUST_set 2010 | ||
| 1985 | X509_PURPOSE_get0_name 2011 | ||
| 1986 | PEM_read_PUBKEY 2012 | ||
| 1987 | sk_ACCESS_DESCRIPTION_new 2013 | ||
| 1988 | i2d_DSA_PUBKEY_bio 2014 | ||
| 1989 | i2d_OTHERNAME 2015 | ||
| 1990 | ASN1_OCTET_STRING_free 2016 | ||
| 1991 | ASN1_BIT_STRING_set_asc 2017 | ||
| 1992 | sk_ACCESS_DESCRIPTION_push 2018 | ||
| 1993 | X509_get_ex_new_index 2019 | ||
| 1994 | ASN1_STRING_TABLE_cleanup 2020 | ||
| 1995 | X509_TRUST_get_by_id 2021 | ||
| 1996 | X509_PURPOSE_get_trust 2022 | ||
| 1997 | ASN1_STRING_length 2023 | ||
| 1998 | d2i_ASN1_SET_OF_ACCESS_DESCRIPTION 2024 | ||
| 1999 | ASN1_PRINTABLESTRING_new 2025 | ||
| 2000 | X509V3_get_d2i 2026 | ||
| 2001 | ASN1_ENUMERATED_free 2027 | ||
| 2002 | i2d_X509_CERT_AUX 2028 | ||
| 2003 | sk_ACCESS_DESCRIPTION_find 2029 | ||
| 2004 | X509_STORE_CTX_set_trust 2030 | ||
| 2005 | sk_X509_PURPOSE_unshift 2031 | ||
| 2006 | ASN1_STRING_set_default_mask 2032 | ||
| 2007 | X509_STORE_CTX_new 2033 | ||
| 2008 | EVP_PKEY_get1_RSA 2034 | ||
| 2009 | sk_X509_PURPOSE_set 2035 | ||
| 2010 | sk_ASN1_STRING_TABLE_insert 2036 | ||
| 2011 | sk_X509_PURPOSE_sort 2037 | ||
| 2012 | DIRECTORYSTRING_free 2038 | ||
| 2013 | PEM_write_X509_AUX 2039 | ||
| 2014 | ASN1_OCTET_STRING_set 2040 | ||
| 2015 | d2i_DSA_PUBKEY_fp 2041 | ||
| 2016 | sk_ASN1_STRING_TABLE_free 2042 | ||
| 2017 | sk_X509_TRUST_value 2043 | ||
| 2018 | d2i_RSA_PUBKEY 2044 | ||
| 2019 | sk_ASN1_STRING_TABLE_set 2045 | ||
| 2020 | X509_TRUST_get0_name 2046 | ||
| 2021 | X509_TRUST_get0 2047 | ||
| 2022 | AUTHORITY_INFO_ACCESS_free 2048 | ||
| 2023 | ASN1_IA5STRING_new 2049 | ||
| 2024 | d2i_DSA_PUBKEY 2050 | ||
| 2025 | X509_check_purpose 2051 | ||
| 2026 | ASN1_ENUMERATED_new 2052 | ||
| 2027 | d2i_RSA_PUBKEY_bio 2053 | ||
| 2028 | d2i_PUBKEY 2054 | ||
| 2029 | X509_TRUST_get_trust 2055 | ||
| 2030 | X509_TRUST_get_flags 2056 | ||
| 2031 | ASN1_BMPSTRING_free 2057 | ||
| 2032 | ASN1_T61STRING_new 2058 | ||
| 2033 | sk_X509_TRUST_unshift 2059 | ||
| 2034 | ASN1_UTCTIME_new 2060 | ||
| 2035 | sk_ACCESS_DESCRIPTION_pop 2061 | ||
| 2036 | i2d_AUTHORITY_INFO_ACCESS 2062 | ||
| 2037 | EVP_PKEY_set1_RSA 2063 | ||
| 2038 | X509_STORE_CTX_set_purpose 2064 | ||
| 2039 | ASN1_IA5STRING_free 2065 | ||
| 2040 | PEM_write_bio_X509_AUX 2066 | ||
| 2041 | X509_PURPOSE_get_count 2067 | ||
| 2042 | CRYPTO_add_info 2068 | ||
| 2043 | sk_ACCESS_DESCRIPTION_num 2069 | ||
| 2044 | sk_ASN1_STRING_TABLE_set_cmp_func 2070 | ||
| 2045 | X509_NAME_ENTRY_create_by_txt 2071 | ||
| 2046 | ASN1_STRING_get_default_mask 2072 | ||
| 2047 | sk_X509_TRUST_dup 2073 | ||
| 2048 | X509_alias_get0 2074 | ||
| 2049 | ASN1_STRING_data 2075 | ||
| 2050 | sk_X509_TRUST_insert 2076 | ||
| 2051 | i2d_ACCESS_DESCRIPTION 2077 | ||
| 2052 | X509_trust_set_bit 2078 | ||
| 2053 | sk_X509_PURPOSE_delete_ptr 2079 | ||
| 2054 | ASN1_BIT_STRING_free 2080 | ||
| 2055 | PEM_read_bio_RSA_PUBKEY 2081 | ||
| 2056 | X509_add1_reject_object 2082 | ||
| 2057 | X509_check_trust 2083 | ||
| 2058 | sk_X509_TRUST_new_null 2084 | ||
| 2059 | sk_ACCESS_DESCRIPTION_new_null 2085 | ||
| 2060 | sk_ACCESS_DESCRIPTION_delete_ptr 2086 | ||
| 2061 | sk_X509_TRUST_sort 2087 | ||
| 2062 | PEM_read_bio_DSA_PUBKEY 2088 | ||
| 2063 | sk_X509_TRUST_new 2089 | ||
| 2064 | X509_PURPOSE_add 2090 | ||
| 2065 | ASN1_STRING_TABLE_get 2091 | ||
| 2066 | ASN1_UTF8STRING_free 2092 | ||
| 2067 | d2i_DSA_PUBKEY_bio 2093 | ||
| 2068 | sk_ASN1_STRING_TABLE_delete 2094 | ||
| 2069 | PEM_write_RSA_PUBKEY 2095 | ||
| 2070 | d2i_OTHERNAME 2096 | ||
| 2071 | sk_ACCESS_DESCRIPTION_insert 2097 | ||
| 2072 | X509_reject_set_bit 2098 | ||
| 2073 | sk_X509_TRUST_delete_ptr 2099 | ||
| 2074 | sk_X509_PURPOSE_pop_free 2100 | ||
| 2075 | PEM_write_DSA_PUBKEY 2101 | ||
| 2076 | sk_X509_PURPOSE_free 2102 | ||
| 2077 | sk_X509_PURPOSE_dup 2103 | ||
| 2078 | sk_ASN1_STRING_TABLE_zero 2104 | ||
| 2079 | X509_PURPOSE_get0_sname 2105 | ||
| 2080 | sk_ASN1_STRING_TABLE_shift 2106 | ||
| 2081 | EVP_PKEY_set1_DH 2107 | ||
| 2082 | ASN1_OCTET_STRING_dup 2108 | ||
| 2083 | ASN1_BIT_STRING_set 2109 | ||
| 2084 | X509_TRUST_get_count 2110 | ||
| 2085 | ASN1_INTEGER_free 2111 | ||
| 2086 | OTHERNAME_free 2112 | ||
| 2087 | i2d_RSA_PUBKEY_fp 2113 | ||
| 2088 | ASN1_INTEGER_dup 2114 | ||
| 2089 | d2i_X509_CERT_AUX 2115 | ||
| 2090 | sk_ASN1_STRING_TABLE_new_null 2116 | ||
| 2091 | PEM_write_bio_PUBKEY 2117 | ||
| 2092 | ASN1_VISIBLESTRING_free 2118 | ||
| 2093 | X509_PURPOSE_cleanup 2119 | ||
| 2094 | sk_ASN1_STRING_TABLE_push 2120 | ||
| 2095 | sk_ASN1_STRING_TABLE_dup 2121 | ||
| 2096 | sk_X509_PURPOSE_shift 2122 | ||
| 2097 | ASN1_mbstring_ncopy 2123 | ||
| 2098 | sk_X509_PURPOSE_new 2124 | ||
| 2099 | sk_X509_PURPOSE_insert 2125 | ||
| 2100 | ASN1_GENERALIZEDTIME_new 2126 | ||
| 2101 | sk_ACCESS_DESCRIPTION_sort 2127 | ||
| 2102 | EVP_PKEY_get1_DH 2128 | ||
| 2103 | sk_ACCESS_DESCRIPTION_set_cmp_func 2129 | ||
| 2104 | ASN1_OCTET_STRING_new 2130 | ||
| 2105 | ASN1_INTEGER_new 2131 | ||
| 2106 | i2d_X509_AUX 2132 | ||
| 2107 | sk_ASN1_STRING_TABLE_find 2133 | ||
| 2108 | ASN1_BIT_STRING_name_print 2134 | ||
| 2109 | X509_cmp 2135 | ||
| 2110 | ASN1_STRING_length_set 2136 | ||
| 2111 | DIRECTORYSTRING_new 2137 | ||
| 2112 | sk_ASN1_STRING_TABLE_new 2138 | ||
| 2113 | sk_X509_TRUST_delete 2139 | ||
| 2114 | X509_add1_trust_object 2140 | ||
| 2115 | PKCS12_newpass 2141 | ||
| 2116 | SMIME_write_PKCS7 2142 | ||
| 2117 | SMIME_read_PKCS7 2143 | ||
| 2118 | des_set_key_checked 2144 | ||
| 2119 | PKCS7_verify 2145 | ||
| 2120 | PKCS7_encrypt 2146 | ||
| 2121 | des_set_key_unchecked 2147 | ||
| 2122 | SMIME_crlf_copy 2148 | ||
| 2123 | i2d_ASN1_PRINTABLESTRING 2149 | ||
| 2124 | PKCS7_get0_signers 2150 | ||
| 2125 | PKCS7_decrypt 2151 | ||
| 2126 | SMIME_text 2152 | ||
| 2127 | PKCS7_simple_smimecap 2153 | ||
| 2128 | PKCS7_get_smimecap 2154 | ||
| 2129 | PKCS7_sign 2155 | ||
| 2130 | PKCS7_add_attrib_smimecap 2156 | ||
| 2131 | CRYPTO_dbg_set_options 2157 | ||
| 2132 | CRYPTO_remove_all_info 2158 | ||
| 2133 | CRYPTO_get_mem_debug_functions 2159 | ||
| 2134 | CRYPTO_is_mem_check_on 2160 | ||
| 2135 | CRYPTO_set_mem_debug_functions 2161 | ||
| 2136 | CRYPTO_pop_info 2162 | ||
| 2137 | CRYPTO_push_info_ 2163 | ||
| 2138 | CRYPTO_set_mem_debug_options 2164 | ||
| 2139 | PEM_write_PKCS8PrivateKey_nid 2165 | ||
| 2140 | PEM_write_bio_PKCS8PrivateKey_nid 2166 | ||
| 2141 | d2i_PKCS8PrivateKey_bio 2167 | ||
| 2142 | ASN1_NULL_free 2168 | ||
| 2143 | d2i_ASN1_NULL 2169 | ||
| 2144 | ASN1_NULL_new 2170 | ||
| 2145 | i2d_PKCS8PrivateKey_bio 2171 | ||
| 2146 | i2d_PKCS8PrivateKey_fp 2172 | ||
| 2147 | i2d_ASN1_NULL 2173 | ||
| 2148 | i2d_PKCS8PrivateKey_nid_fp 2174 | ||
| 2149 | d2i_PKCS8PrivateKey_fp 2175 | ||
| 2150 | i2d_PKCS8PrivateKey_nid_bio 2176 | ||
| 2151 | i2d_PKCS8PrivateKeyInfo_fp 2177 | ||
| 2152 | i2d_PKCS8PrivateKeyInfo_bio 2178 | ||
| 2153 | PEM_cb 2179 | ||
| 2154 | i2d_PrivateKey_fp 2180 | ||
| 2155 | d2i_PrivateKey_bio 2181 | ||
| 2156 | d2i_PrivateKey_fp 2182 | ||
| 2157 | i2d_PrivateKey_bio 2183 | ||
| 2158 | X509_reject_clear 2184 | ||
| 2159 | X509_TRUST_set_default 2185 | ||
| 2160 | d2i_AutoPrivateKey 2186 | ||
| 2161 | X509_ATTRIBUTE_get0_type 2187 | ||
| 2162 | X509_ATTRIBUTE_set1_data 2188 | ||
| 2163 | X509at_get_attr 2189 | ||
| 2164 | X509at_get_attr_count 2190 | ||
| 2165 | X509_ATTRIBUTE_create_by_NID 2191 | ||
| 2166 | X509_ATTRIBUTE_set1_object 2192 | ||
| 2167 | X509_ATTRIBUTE_count 2193 | ||
| 2168 | X509_ATTRIBUTE_create_by_OBJ 2194 | ||
| 2169 | X509_ATTRIBUTE_get0_object 2195 | ||
| 2170 | X509at_get_attr_by_NID 2196 | ||
| 2171 | X509at_add1_attr 2197 | ||
| 2172 | X509_ATTRIBUTE_get0_data 2198 | ||
| 2173 | X509at_delete_attr 2199 | ||
| 2174 | X509at_get_attr_by_OBJ 2200 | ||
| 2175 | RAND_add 2201 | ||
| 2176 | BIO_number_written 2202 | ||
| 2177 | BIO_number_read 2203 | ||
| 2178 | X509_STORE_CTX_get1_chain 2204 | ||
| 2179 | ERR_load_RAND_strings 2205 | ||
| 2180 | RAND_pseudo_bytes 2206 | ||
| 2181 | X509_REQ_get_attr_by_NID 2207 | ||
| 2182 | X509_REQ_get_attr 2208 | ||
| 2183 | X509_REQ_add1_attr_by_NID 2209 | ||
| 2184 | X509_REQ_get_attr_by_OBJ 2210 | ||
| 2185 | X509at_add1_attr_by_NID 2211 | ||
| 2186 | X509_REQ_add1_attr_by_OBJ 2212 | ||
| 2187 | X509_REQ_get_attr_count 2213 | ||
| 2188 | X509_REQ_add1_attr 2214 | ||
| 2189 | X509_REQ_delete_attr 2215 | ||
| 2190 | X509at_add1_attr_by_OBJ 2216 | ||
| 2191 | X509_REQ_add1_attr_by_txt 2217 | ||
| 2192 | X509_ATTRIBUTE_create_by_txt 2218 | ||
| 2193 | X509at_add1_attr_by_txt 2219 | ||
| 2194 | sk_CRYPTO_EX_DATA_FUNCS_delete 2220 | ||
| 2195 | sk_CRYPTO_EX_DATA_FUNCS_set 2221 | ||
| 2196 | sk_CRYPTO_EX_DATA_FUNCS_unshift 2222 | ||
| 2197 | sk_CRYPTO_EX_DATA_FUNCS_new_null 2223 | ||
| 2198 | sk_CRYPTO_EX_DATA_FUNCS_set_cmp_func 2224 | ||
| 2199 | sk_CRYPTO_EX_DATA_FUNCS_sort 2225 | ||
| 2200 | sk_CRYPTO_EX_DATA_FUNCS_dup 2226 | ||
| 2201 | sk_CRYPTO_EX_DATA_FUNCS_shift 2227 | ||
| 2202 | sk_CRYPTO_EX_DATA_FUNCS_value 2228 | ||
| 2203 | sk_CRYPTO_EX_DATA_FUNCS_pop 2229 | ||
| 2204 | sk_CRYPTO_EX_DATA_FUNCS_push 2230 | ||
| 2205 | sk_CRYPTO_EX_DATA_FUNCS_find 2231 | ||
| 2206 | sk_CRYPTO_EX_DATA_FUNCS_new 2232 | ||
| 2207 | sk_CRYPTO_EX_DATA_FUNCS_free 2233 | ||
| 2208 | sk_CRYPTO_EX_DATA_FUNCS_delete_ptr 2234 | ||
| 2209 | sk_CRYPTO_EX_DATA_FUNCS_num 2235 | ||
| 2210 | sk_CRYPTO_EX_DATA_FUNCS_pop_free 2236 | ||
| 2211 | sk_CRYPTO_EX_DATA_FUNCS_insert 2237 | ||
| 2212 | sk_CRYPTO_EX_DATA_FUNCS_zero 2238 | ||
| 2213 | BN_pseudo_rand 2239 | ||
| 2214 | BN_is_prime_fasttest 2240 | ||
| 2215 | BN_CTX_end 2241 | ||
| 2216 | BN_CTX_start 2242 | ||
| 2217 | BN_CTX_get 2243 | ||
| 2218 | EVP_PKEY2PKCS8_broken 2244 | ||
| 2219 | ASN1_STRING_TABLE_add 2245 | ||
| 2220 | CRYPTO_dbg_get_options 2246 | ||
| 2221 | AUTHORITY_INFO_ACCESS_new 2247 | ||
| 2222 | CRYPTO_get_mem_debug_options 2248 | ||
| 2223 | des_crypt 2249 | ||
| 2224 | PEM_write_bio_X509_REQ_NEW 2250 | ||
| 2225 | PEM_write_X509_REQ_NEW 2251 | ||
| 2226 | BIO_callback_ctrl 2252 | ||
| 2227 | RAND_egd 2253 | ||
| 2228 | RAND_status 2254 | ||
| 2229 | bn_dump1 2255 | ||
| 2230 | des_check_key_parity 2256 | ||
| 2231 | lh_num_items 2257 | ||
| 2232 | RAND_event 2258 | ||
diff --git a/src/lib/libssl/src/util/mk1mf.pl b/src/lib/libssl/src/util/mk1mf.pl index 100d76f279..46755fa287 100644 --- a/src/lib/libssl/src/util/mk1mf.pl +++ b/src/lib/libssl/src/util/mk1mf.pl | |||
| @@ -52,7 +52,8 @@ foreach (@ARGV) | |||
| 52 | { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; } | 52 | { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; } |
| 53 | print STDERR <<"EOF"; | 53 | print STDERR <<"EOF"; |
| 54 | and [options] can be one of | 54 | and [options] can be one of |
| 55 | no-md2 no-md5 no-sha no-mdc2 no-ripemd - Skip this digest | 55 | no-md2 no-md4 no-md5 no-sha no-mdc2 - Skip this digest |
| 56 | no-ripemd | ||
| 56 | no-rc2 no-rc4 no-idea no-des no-bf no-cast - Skip this symetric cipher | 57 | no-rc2 no-rc4 no-idea no-des no-bf no-cast - Skip this symetric cipher |
| 57 | no-rc5 | 58 | no-rc5 |
| 58 | no-rsa no-dsa no-dh - Skip this public key cipher | 59 | no-rsa no-dsa no-dh - Skip this public key cipher |
| @@ -65,6 +66,7 @@ and [options] can be one of | |||
| 65 | no-err - No error strings | 66 | no-err - No error strings |
| 66 | dll/shlib - Build shared libraries (MS) | 67 | dll/shlib - Build shared libraries (MS) |
| 67 | debug - Debug build | 68 | debug - Debug build |
| 69 | profile - Profiling build | ||
| 68 | gcc - Use Gcc (unix) | 70 | gcc - Use Gcc (unix) |
| 69 | rsaref - Build to require RSAref | 71 | rsaref - Build to require RSAref |
| 70 | 72 | ||
| @@ -200,6 +202,7 @@ $cflags.=" -DNO_RC2" if $no_rc2; | |||
| 200 | $cflags.=" -DNO_RC4" if $no_rc4; | 202 | $cflags.=" -DNO_RC4" if $no_rc4; |
| 201 | $cflags.=" -DNO_RC5" if $no_rc5; | 203 | $cflags.=" -DNO_RC5" if $no_rc5; |
| 202 | $cflags.=" -DNO_MD2" if $no_md2; | 204 | $cflags.=" -DNO_MD2" if $no_md2; |
| 205 | $cflags.=" -DNO_MD4" if $no_md4; | ||
| 203 | $cflags.=" -DNO_MD5" if $no_md5; | 206 | $cflags.=" -DNO_MD5" if $no_md5; |
| 204 | $cflags.=" -DNO_SHA" if $no_sha; | 207 | $cflags.=" -DNO_SHA" if $no_sha; |
| 205 | $cflags.=" -DNO_SHA1" if $no_sha1; | 208 | $cflags.=" -DNO_SHA1" if $no_sha1; |
| @@ -217,9 +220,10 @@ $cflags.=" -DNO_SSL3" if $no_ssl3; | |||
| 217 | $cflags.=" -DNO_ERR" if $no_err; | 220 | $cflags.=" -DNO_ERR" if $no_err; |
| 218 | $cflags.=" -DRSAref" if $rsaref ne ""; | 221 | $cflags.=" -DRSAref" if $rsaref ne ""; |
| 219 | 222 | ||
| 220 | if ($unix) | 223 | ## if ($unix) |
| 221 | { $cflags="$c_flags" if ($c_flags ne ""); } | 224 | ## { $cflags="$c_flags" if ($c_flags ne ""); } |
| 222 | else { $cflags="$c_flags$cflags" if ($c_flags ne ""); } | 225 | ##else |
| 226 | { $cflags="$c_flags$cflags" if ($c_flags ne ""); } | ||
| 223 | 227 | ||
| 224 | $ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); | 228 | $ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); |
| 225 | 229 | ||
| @@ -273,6 +277,8 @@ LFLAGS=$lflags | |||
| 273 | 277 | ||
| 274 | BN_ASM_OBJ=$bn_asm_obj | 278 | BN_ASM_OBJ=$bn_asm_obj |
| 275 | BN_ASM_SRC=$bn_asm_src | 279 | BN_ASM_SRC=$bn_asm_src |
| 280 | BNCO_ASM_OBJ=$bnco_asm_obj | ||
| 281 | BNCO_ASM_SRC=$bnco_asm_src | ||
| 276 | DES_ENC_OBJ=$des_enc_obj | 282 | DES_ENC_OBJ=$des_enc_obj |
| 277 | DES_ENC_SRC=$des_enc_src | 283 | DES_ENC_SRC=$des_enc_src |
| 278 | BF_ENC_OBJ=$bf_enc_obj | 284 | BF_ENC_OBJ=$bf_enc_obj |
| @@ -379,6 +385,7 @@ $banner | |||
| 379 | \$(MKDIR) \$(INC_D) | 385 | \$(MKDIR) \$(INC_D) |
| 380 | 386 | ||
| 381 | headers: \$(HEADER) \$(EXHEADER) | 387 | headers: \$(HEADER) \$(EXHEADER) |
| 388 | @ | ||
| 382 | 389 | ||
| 383 | lib: \$(LIBS_DEP) | 390 | lib: \$(LIBS_DEP) |
| 384 | 391 | ||
| @@ -539,6 +546,11 @@ foreach (values %lib_nam) | |||
| 539 | $lib_obj =~ s/\s\S*\/bn_asm\S*/ \$(BN_ASM_OBJ)/; | 546 | $lib_obj =~ s/\s\S*\/bn_asm\S*/ \$(BN_ASM_OBJ)/; |
| 540 | $rules.=&do_asm_rule($bn_asm_obj,$bn_asm_src); | 547 | $rules.=&do_asm_rule($bn_asm_obj,$bn_asm_src); |
| 541 | } | 548 | } |
| 549 | if (($bnco_asm_obj ne "") && ($_ eq "CRYPTO")) | ||
| 550 | { | ||
| 551 | $lib_obj .= "\$(BNCO_ASM_OBJ)"; | ||
| 552 | $rules.=&do_asm_rule($bnco_asm_obj,$bnco_asm_src); | ||
| 553 | } | ||
| 542 | if (($des_enc_obj ne "") && ($_ eq "CRYPTO")) | 554 | if (($des_enc_obj ne "") && ($_ eq "CRYPTO")) |
| 543 | { | 555 | { |
| 544 | $lib_obj =~ s/\s\S*des_enc\S*/ \$(DES_ENC_OBJ)/; | 556 | $lib_obj =~ s/\s\S*des_enc\S*/ \$(DES_ENC_OBJ)/; |
| @@ -601,6 +613,14 @@ $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPT | |||
| 601 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); | 613 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); |
| 602 | 614 | ||
| 603 | print $defs; | 615 | print $defs; |
| 616 | |||
| 617 | if ($platform eq "linux-elf") { | ||
| 618 | print <<"EOF"; | ||
| 619 | # Generate perlasm output files | ||
| 620 | %.cpp: | ||
| 621 | (cd \$(\@D)/..; PERL=perl make -f Makefile.ssl asm/\$(\@F)) | ||
| 622 | EOF | ||
| 623 | } | ||
| 604 | print "###################################################################\n"; | 624 | print "###################################################################\n"; |
| 605 | print $rules; | 625 | print $rules; |
| 606 | 626 | ||
| @@ -652,6 +672,7 @@ sub var_add | |||
| 652 | @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock; | 672 | @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock; |
| 653 | 673 | ||
| 654 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; | 674 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; |
| 675 | @a=grep(!/(^md4)|(_md4$)/,@a) if $no_md4; | ||
| 655 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; | 676 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; |
| 656 | @a=grep(!/(rmd)|(ripemd)/,@a) if $no_rmd160; | 677 | @a=grep(!/(rmd)|(ripemd)/,@a) if $no_rmd160; |
| 657 | 678 | ||
| @@ -717,6 +738,7 @@ sub do_defs | |||
| 717 | { $pf=".c"; } | 738 | { $pf=".c"; } |
| 718 | else { $pf=$postfix; } | 739 | else { $pf=$postfix; } |
| 719 | if ($_ =~ /BN_ASM/) { $t="$_ "; } | 740 | if ($_ =~ /BN_ASM/) { $t="$_ "; } |
| 741 | elsif ($_ =~ /BNCO_ASM/){ $t="$_ "; } | ||
| 720 | elsif ($_ =~ /DES_ENC/) { $t="$_ "; } | 742 | elsif ($_ =~ /DES_ENC/) { $t="$_ "; } |
| 721 | elsif ($_ =~ /BF_ENC/) { $t="$_ "; } | 743 | elsif ($_ =~ /BF_ENC/) { $t="$_ "; } |
| 722 | elsif ($_ =~ /CAST_ENC/){ $t="$_ "; } | 744 | elsif ($_ =~ /CAST_ENC/){ $t="$_ "; } |
| @@ -840,6 +862,7 @@ sub read_options | |||
| 840 | elsif (/^no-bf$/) { $no_bf=1; } | 862 | elsif (/^no-bf$/) { $no_bf=1; } |
| 841 | elsif (/^no-cast$/) { $no_cast=1; } | 863 | elsif (/^no-cast$/) { $no_cast=1; } |
| 842 | elsif (/^no-md2$/) { $no_md2=1; } | 864 | elsif (/^no-md2$/) { $no_md2=1; } |
| 865 | elsif (/^no-md4$/) { $no_md4=1; } | ||
| 843 | elsif (/^no-md5$/) { $no_md5=1; } | 866 | elsif (/^no-md5$/) { $no_md5=1; } |
| 844 | elsif (/^no-sha$/) { $no_sha=1; } | 867 | elsif (/^no-sha$/) { $no_sha=1; } |
| 845 | elsif (/^no-sha1$/) { $no_sha1=1; } | 868 | elsif (/^no-sha1$/) { $no_sha1=1; } |
| @@ -865,8 +888,10 @@ sub read_options | |||
| 865 | elsif (/^rsaref$/) { $rsaref=1; } | 888 | elsif (/^rsaref$/) { $rsaref=1; } |
| 866 | elsif (/^gcc$/) { $gcc=1; } | 889 | elsif (/^gcc$/) { $gcc=1; } |
| 867 | elsif (/^debug$/) { $debug=1; } | 890 | elsif (/^debug$/) { $debug=1; } |
| 891 | elsif (/^profile$/) { $profile=1; } | ||
| 868 | elsif (/^shlib$/) { $shlib=1; } | 892 | elsif (/^shlib$/) { $shlib=1; } |
| 869 | elsif (/^dll$/) { $shlib=1; } | 893 | elsif (/^dll$/) { $shlib=1; } |
| 894 | elsif (/^shared$/) { } # We just need to ignore it for now... | ||
| 870 | elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; } | 895 | elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; } |
| 871 | elsif (/^-[lL].*$/) { $l_flags.="$_ "; } | 896 | elsif (/^-[lL].*$/) { $l_flags.="$_ "; } |
| 872 | elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/) | 897 | elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/) |
diff --git a/src/lib/libssl/src/util/mkdef.pl b/src/lib/libssl/src/util/mkdef.pl index 4e2845a4e1..cc41a1813e 100644 --- a/src/lib/libssl/src/util/mkdef.pl +++ b/src/lib/libssl/src/util/mkdef.pl | |||
| @@ -5,20 +5,78 @@ | |||
| 5 | # It does this by parsing the header files and looking for the | 5 | # It does this by parsing the header files and looking for the |
| 6 | # prototyped functions: it then prunes the output. | 6 | # prototyped functions: it then prunes the output. |
| 7 | # | 7 | # |
| 8 | # Intermediary files are created, call libeay.num and ssleay.num,... | ||
| 9 | # Previously, they had the following format: | ||
| 10 | # | ||
| 11 | # routine-name nnnn | ||
| 12 | # | ||
| 13 | # But that isn't enough for a number of reasons, the first on being that | ||
| 14 | # this format is (needlessly) very Win32-centric, and even then... | ||
| 15 | # One of the biggest problems is that there's no information about what | ||
| 16 | # routines should actually be used, which varies with what crypto algorithms | ||
| 17 | # are disabled. Also, some operating systems (for example VMS with VAX C) | ||
| 18 | # need to keep track of the global variables as well as the functions. | ||
| 19 | # | ||
| 20 | # So, a remake of this script is done so as to include information on the | ||
| 21 | # kind of symbol it is (function or variable) and what algorithms they're | ||
| 22 | # part of. This will allow easy translating to .def files or the corresponding | ||
| 23 | # file in other operating systems (a .opt file for VMS, possibly with a .mar | ||
| 24 | # file). | ||
| 25 | # | ||
| 26 | # The format now becomes: | ||
| 27 | # | ||
| 28 | # routine-name nnnn info | ||
| 29 | # | ||
| 30 | # and the "info" part is actually a colon-separated string of fields with | ||
| 31 | # the following meaning: | ||
| 32 | # | ||
| 33 | # existence:platform:kind:algorithms | ||
| 34 | # | ||
| 35 | # - "existence" can be "EXIST" or "NOEXIST" depending on if the symbol is | ||
| 36 | # found somewhere in the source, | ||
| 37 | # - "platforms" is empty if it exists on all platforms, otherwise it contains | ||
| 38 | # comma-separated list of the platform, just as they are if the symbol exists | ||
| 39 | # for those platforms, or prepended with a "!" if not. This helps resolve | ||
| 40 | # symbol name replacements for platforms where the names are too long for the | ||
| 41 | # compiler or linker, or if the systems is case insensitive and there is a | ||
| 42 | # clash. This script assumes those redefinitions are place in the file | ||
| 43 | # crypto/symhacks.h. | ||
| 44 | # The semantics for the platforms list is a bit complicated. The rule of | ||
| 45 | # thumb is that the list is exclusive, but it seems to mean different things. | ||
| 46 | # So, if the list is all negatives (like "!VMS,!WIN16"), the symbol exists | ||
| 47 | # on all platforms except those listed. If the list is all positives (like | ||
| 48 | # "VMS,WIN16"), the symbol exists only on those platforms and nowhere else. | ||
| 49 | # The combination of positives and negatives will act as if the positives | ||
| 50 | # weren't there. | ||
| 51 | # - "kind" is "FUNCTION" or "VARIABLE". The meaning of that is obvious. | ||
| 52 | # - "algorithms" is a comma-separated list of algorithm names. This helps | ||
| 53 | # exclude symbols that are part of an algorithm that some user wants to | ||
| 54 | # exclude. | ||
| 55 | # | ||
| 8 | 56 | ||
| 9 | my $crypto_num="util/libeay.num"; | 57 | my $crypto_num= "util/libeay.num"; |
| 10 | my $ssl_num= "util/ssleay.num"; | 58 | my $ssl_num= "util/ssleay.num"; |
| 11 | 59 | ||
| 12 | my $do_update = 0; | 60 | my $do_update = 0; |
| 61 | my $do_rewrite = 0; | ||
| 13 | my $do_crypto = 0; | 62 | my $do_crypto = 0; |
| 14 | my $do_ssl = 0; | 63 | my $do_ssl = 0; |
| 15 | my $do_ctest = 0; | 64 | my $do_ctest = 0; |
| 65 | my $do_ctestall = 0; | ||
| 16 | my $rsaref = 0; | 66 | my $rsaref = 0; |
| 17 | 67 | ||
| 18 | my $W32=1; | 68 | my $VMS=0; |
| 69 | my $W32=0; | ||
| 70 | my $W16=0; | ||
| 19 | my $NT=0; | 71 | my $NT=0; |
| 20 | # Set this to make typesafe STACK definitions appear in DEF | 72 | # Set this to make typesafe STACK definitions appear in DEF |
| 21 | my $safe_stack_def = 1; | 73 | my $safe_stack_def = 0; |
| 74 | |||
| 75 | my @known_platforms = ( "__FreeBSD__", "VMS", "WIN16", "WIN32", | ||
| 76 | "WINNT", "PERL5", "NeXT" ); | ||
| 77 | my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", | ||
| 78 | "CAST", "MD2", "MD4", "MD5", "SHA", "RIPEMD", | ||
| 79 | "MDC2", "RSA", "DSA", "DH", "HMAC", "FP_API" ); | ||
| 22 | 80 | ||
| 23 | my $options=""; | 81 | my $options=""; |
| 24 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; | 82 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; |
| @@ -31,24 +89,31 @@ close(IN); | |||
| 31 | # defined with ifndef(NO_XXX) are not included in the .def file, and everything | 89 | # defined with ifndef(NO_XXX) are not included in the .def file, and everything |
| 32 | # in directory xxx is ignored. | 90 | # in directory xxx is ignored. |
| 33 | my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; | 91 | my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; |
| 34 | my $no_cast; my $no_md2; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; | 92 | my $no_cast; |
| 93 | my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; | ||
| 35 | my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; | 94 | my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; |
| 95 | my $no_fp_api; | ||
| 36 | 96 | ||
| 37 | foreach (@ARGV, split(/ /, $options)) | 97 | foreach (@ARGV, split(/ /, $options)) |
| 38 | { | 98 | { |
| 39 | $W32=1 if $_ eq "32"; | 99 | $W32=1 if $_ eq "32"; |
| 40 | $W32=0 if $_ eq "16"; | 100 | $W16=1 if $_ eq "16"; |
| 41 | if($_ eq "NT") { | 101 | if($_ eq "NT") { |
| 42 | $W32 = 1; | 102 | $W32 = 1; |
| 43 | $NT = 1; | 103 | $NT = 1; |
| 44 | } | 104 | } |
| 105 | $VMS=1 if $_ eq "VMS"; | ||
| 106 | $rsaref=1 if $_ eq "rsaref"; | ||
| 107 | |||
| 45 | $do_ssl=1 if $_ eq "ssleay"; | 108 | $do_ssl=1 if $_ eq "ssleay"; |
| 46 | $do_ssl=1 if $_ eq "ssl"; | 109 | $do_ssl=1 if $_ eq "ssl"; |
| 47 | $do_crypto=1 if $_ eq "libeay"; | 110 | $do_crypto=1 if $_ eq "libeay"; |
| 48 | $do_crypto=1 if $_ eq "crypto"; | 111 | $do_crypto=1 if $_ eq "crypto"; |
| 49 | $do_update=1 if $_ eq "update"; | 112 | $do_update=1 if $_ eq "update"; |
| 113 | $do_rewrite=1 if $_ eq "rewrite"; | ||
| 50 | $do_ctest=1 if $_ eq "ctest"; | 114 | $do_ctest=1 if $_ eq "ctest"; |
| 51 | $rsaref=1 if $_ eq "rsaref"; | 115 | $do_ctestall=1 if $_ eq "ctestall"; |
| 116 | #$safe_stack_def=1 if $_ eq "-DDEBUG_SAFESTACK"; | ||
| 52 | 117 | ||
| 53 | if (/^no-rc2$/) { $no_rc2=1; } | 118 | if (/^no-rc2$/) { $no_rc2=1; } |
| 54 | elsif (/^no-rc4$/) { $no_rc4=1; } | 119 | elsif (/^no-rc4$/) { $no_rc4=1; } |
| @@ -58,6 +123,7 @@ foreach (@ARGV, split(/ /, $options)) | |||
| 58 | elsif (/^no-bf$/) { $no_bf=1; } | 123 | elsif (/^no-bf$/) { $no_bf=1; } |
| 59 | elsif (/^no-cast$/) { $no_cast=1; } | 124 | elsif (/^no-cast$/) { $no_cast=1; } |
| 60 | elsif (/^no-md2$/) { $no_md2=1; } | 125 | elsif (/^no-md2$/) { $no_md2=1; } |
| 126 | elsif (/^no-md4$/) { $no_md4=1; } | ||
| 61 | elsif (/^no-md5$/) { $no_md5=1; } | 127 | elsif (/^no-md5$/) { $no_md5=1; } |
| 62 | elsif (/^no-sha$/) { $no_sha=1; } | 128 | elsif (/^no-sha$/) { $no_sha=1; } |
| 63 | elsif (/^no-ripemd$/) { $no_ripemd=1; } | 129 | elsif (/^no-ripemd$/) { $no_ripemd=1; } |
| @@ -69,6 +135,16 @@ foreach (@ARGV, split(/ /, $options)) | |||
| 69 | } | 135 | } |
| 70 | 136 | ||
| 71 | 137 | ||
| 138 | # If no platform is given, assume WIN32 | ||
| 139 | if ($W32 + $W16 + $VMS == 0) { | ||
| 140 | $W32 = 1; | ||
| 141 | } | ||
| 142 | |||
| 143 | # Add extra knowledge | ||
| 144 | if ($W16) { | ||
| 145 | $no_fp_api=1; | ||
| 146 | } | ||
| 147 | |||
| 72 | if (!$do_ssl && !$do_crypto) | 148 | if (!$do_ssl && !$do_crypto) |
| 73 | { | 149 | { |
| 74 | print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT ] [rsaref]\n"; | 150 | print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT ] [rsaref]\n"; |
| @@ -91,6 +167,7 @@ $crypto.=" crypto/rc2/rc2.h" unless $no_rc2; | |||
| 91 | $crypto.=" crypto/bf/blowfish.h" unless $no_bf; | 167 | $crypto.=" crypto/bf/blowfish.h" unless $no_bf; |
| 92 | $crypto.=" crypto/cast/cast.h" unless $no_cast; | 168 | $crypto.=" crypto/cast/cast.h" unless $no_cast; |
| 93 | $crypto.=" crypto/md2/md2.h" unless $no_md2; | 169 | $crypto.=" crypto/md2/md2.h" unless $no_md2; |
| 170 | $crypto.=" crypto/md4/md4.h" unless $no_md4; | ||
| 94 | $crypto.=" crypto/md5/md5.h" unless $no_md5; | 171 | $crypto.=" crypto/md5/md5.h" unless $no_md5; |
| 95 | $crypto.=" crypto/mdc2/mdc2.h" unless $no_mdc2; | 172 | $crypto.=" crypto/mdc2/mdc2.h" unless $no_mdc2; |
| 96 | $crypto.=" crypto/sha/sha.h" unless $no_sha; | 173 | $crypto.=" crypto/sha/sha.h" unless $no_sha; |
| @@ -102,9 +179,11 @@ $crypto.=" crypto/dsa/dsa.h" unless $no_dsa; | |||
| 102 | $crypto.=" crypto/dh/dh.h" unless $no_dh; | 179 | $crypto.=" crypto/dh/dh.h" unless $no_dh; |
| 103 | $crypto.=" crypto/hmac/hmac.h" unless $no_hmac; | 180 | $crypto.=" crypto/hmac/hmac.h" unless $no_hmac; |
| 104 | 181 | ||
| 182 | $crypto.=" crypto/engine/engine.h"; | ||
| 105 | $crypto.=" crypto/stack/stack.h"; | 183 | $crypto.=" crypto/stack/stack.h"; |
| 106 | $crypto.=" crypto/buffer/buffer.h"; | 184 | $crypto.=" crypto/buffer/buffer.h"; |
| 107 | $crypto.=" crypto/bio/bio.h"; | 185 | $crypto.=" crypto/bio/bio.h"; |
| 186 | $crypto.=" crypto/dso/dso.h"; | ||
| 108 | $crypto.=" crypto/lhash/lhash.h"; | 187 | $crypto.=" crypto/lhash/lhash.h"; |
| 109 | $crypto.=" crypto/conf/conf.h"; | 188 | $crypto.=" crypto/conf/conf.h"; |
| 110 | $crypto.=" crypto/txt_db/txt_db.h"; | 189 | $crypto.=" crypto/txt_db/txt_db.h"; |
| @@ -125,25 +204,41 @@ $crypto.=" crypto/rand/rand.h"; | |||
| 125 | $crypto.=" crypto/comp/comp.h"; | 204 | $crypto.=" crypto/comp/comp.h"; |
| 126 | $crypto.=" crypto/tmdiff.h"; | 205 | $crypto.=" crypto/tmdiff.h"; |
| 127 | 206 | ||
| 128 | my @ssl_func = &do_defs("SSLEAY", $ssl); | 207 | my $symhacks="crypto/symhacks.h"; |
| 129 | my @crypto_func = &do_defs("LIBEAY", $crypto); | ||
| 130 | 208 | ||
| 209 | my @ssl_symbols = &do_defs("SSLEAY", $ssl, $symhacks); | ||
| 210 | my @crypto_symbols = &do_defs("LIBEAY", $crypto, $symhacks); | ||
| 131 | 211 | ||
| 132 | if ($do_update) { | 212 | if ($do_update) { |
| 133 | 213 | ||
| 134 | if ($do_ssl == 1) { | 214 | if ($do_ssl == 1) { |
| 135 | open(OUT, ">>$ssl_num"); | 215 | |
| 136 | &update_numbers(*OUT,"SSLEAY",*ssl_list,$max_ssl, @ssl_func); | 216 | &maybe_add_info("SSLEAY",*ssl_list,@ssl_symbols); |
| 217 | if ($do_rewrite == 1) { | ||
| 218 | open(OUT, ">$ssl_num"); | ||
| 219 | &rewrite_numbers(*OUT,"SSLEAY",*ssl_list,@ssl_symbols); | ||
| 220 | close OUT; | ||
| 221 | } else { | ||
| 222 | open(OUT, ">>$ssl_num"); | ||
| 223 | } | ||
| 224 | &update_numbers(*OUT,"SSLEAY",*ssl_list,$max_ssl,@ssl_symbols); | ||
| 137 | close OUT; | 225 | close OUT; |
| 138 | } | 226 | } |
| 139 | 227 | ||
| 140 | if($do_crypto == 1) { | 228 | if($do_crypto == 1) { |
| 141 | open(OUT, ">>$crypto_num"); | 229 | |
| 142 | &update_numbers(*OUT,"LIBEAY",*crypto_list,$max_crypto, @crypto_func); | 230 | &maybe_add_info("LIBEAY",*crypto_list,@crypto_symbols); |
| 231 | if ($do_rewrite == 1) { | ||
| 232 | open(OUT, ">$crypto_num"); | ||
| 233 | &rewrite_numbers(*OUT,"LIBEAY",*crypto_list,@crypto_symbols); | ||
| 234 | } else { | ||
| 235 | open(OUT, ">>$crypto_num"); | ||
| 236 | } | ||
| 237 | &update_numbers(*OUT,"LIBEAY",*crypto_list,$max_crypto,@crypto_symbols); | ||
| 143 | close OUT; | 238 | close OUT; |
| 144 | } | 239 | } |
| 145 | 240 | ||
| 146 | } elsif ($do_ctest) { | 241 | } elsif ($do_ctest || $do_ctestall) { |
| 147 | 242 | ||
| 148 | print <<"EOF"; | 243 | print <<"EOF"; |
| 149 | 244 | ||
| @@ -154,20 +249,20 @@ if($do_crypto == 1) { | |||
| 154 | int main() | 249 | int main() |
| 155 | { | 250 | { |
| 156 | EOF | 251 | EOF |
| 157 | &print_test_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_func) | 252 | &print_test_file(*STDOUT,"SSLEAY",*ssl_list,$do_ctestall,@ssl_symbols) |
| 158 | if $do_ssl == 1; | 253 | if $do_ssl == 1; |
| 159 | 254 | ||
| 160 | &print_test_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_func) | 255 | &print_test_file(*STDOUT,"LIBEAY",*crypto_list,$do_ctestall,@crypto_symbols) |
| 161 | if $do_crypto == 1; | 256 | if $do_crypto == 1; |
| 162 | 257 | ||
| 163 | print "}\n"; | 258 | print "}\n"; |
| 164 | 259 | ||
| 165 | } else { | 260 | } else { |
| 166 | 261 | ||
| 167 | &print_def_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_func) | 262 | &print_def_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_symbols) |
| 168 | if $do_ssl == 1; | 263 | if $do_ssl == 1; |
| 169 | 264 | ||
| 170 | &print_def_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_func) | 265 | &print_def_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_symbols) |
| 171 | if $do_crypto == 1; | 266 | if $do_crypto == 1; |
| 172 | 267 | ||
| 173 | } | 268 | } |
| @@ -175,42 +270,30 @@ EOF | |||
| 175 | 270 | ||
| 176 | sub do_defs | 271 | sub do_defs |
| 177 | { | 272 | { |
| 178 | my($name,$files)=@_; | 273 | my($name,$files,$symhacksfile)=@_; |
| 179 | my $file; | 274 | my $file; |
| 180 | my @ret; | 275 | my @ret; |
| 181 | my %funcs; | 276 | my %syms; |
| 277 | my %platform; # For anything undefined, we assume "" | ||
| 278 | my %kind; # For anything undefined, we assume "FUNCTION" | ||
| 279 | my %algorithm; # For anything undefined, we assume "" | ||
| 280 | my %rename; | ||
| 182 | my $cpp; | 281 | my $cpp; |
| 183 | 282 | ||
| 184 | foreach $file (split(/\s+/,$files)) | 283 | foreach $file (split(/\s+/,$symhacksfile." ".$files)) |
| 185 | { | 284 | { |
| 186 | open(IN,"<$file") || die "unable to open $file:$!\n"; | 285 | open(IN,"<$file") || die "unable to open $file:$!\n"; |
| 187 | my $line = "", my $def= ""; | 286 | my $line = "", my $def= ""; |
| 188 | my %tag = ( | 287 | my %tag = ( |
| 189 | FreeBSD => 0, | 288 | (map { $_ => 0 } @known_platforms), |
| 289 | (map { "NO_".$_ => 0 } @known_algorithms), | ||
| 190 | NOPROTO => 0, | 290 | NOPROTO => 0, |
| 191 | WIN16 => 0, | ||
| 192 | PERL5 => 0, | 291 | PERL5 => 0, |
| 193 | _WINDLL => 0, | 292 | _WINDLL => 0, |
| 194 | NO_FP_API => 0, | ||
| 195 | CONST_STRICT => 0, | 293 | CONST_STRICT => 0, |
| 196 | TRUE => 1, | 294 | TRUE => 1, |
| 197 | NO_RC2 => 0, | ||
| 198 | NO_RC4 => 0, | ||
| 199 | NO_RC5 => 0, | ||
| 200 | NO_IDEA => 0, | ||
| 201 | NO_DES => 0, | ||
| 202 | NO_BF => 0, | ||
| 203 | NO_CAST => 0, | ||
| 204 | NO_MD2 => 0, | ||
| 205 | NO_MD5 => 0, | ||
| 206 | NO_SHA => 0, | ||
| 207 | NO_RIPEMD => 0, | ||
| 208 | NO_MDC2 => 0, | ||
| 209 | NO_RSA => 0, | ||
| 210 | NO_DSA => 0, | ||
| 211 | NO_DH => 0, | ||
| 212 | NO_HMAC => 0, | ||
| 213 | ); | 295 | ); |
| 296 | my $symhacking = $file eq $symhacksfile; | ||
| 214 | while(<IN>) { | 297 | while(<IN>) { |
| 215 | last if (/BEGIN ERROR CODES/); | 298 | last if (/BEGIN ERROR CODES/); |
| 216 | if ($line ne '') { | 299 | if ($line ne '') { |
| @@ -223,9 +306,9 @@ sub do_defs | |||
| 223 | next; | 306 | next; |
| 224 | } | 307 | } |
| 225 | 308 | ||
| 226 | $cpp = 1 if /^#.*ifdef.*cplusplus/; | 309 | $cpp = 1 if /^\#.*ifdef.*cplusplus/; |
| 227 | if ($cpp) { | 310 | if ($cpp) { |
| 228 | $cpp = 0 if /^#.*endif/; | 311 | $cpp = 0 if /^\#.*endif/; |
| 229 | next; | 312 | next; |
| 230 | } | 313 | } |
| 231 | 314 | ||
| @@ -234,115 +317,132 @@ sub do_defs | |||
| 234 | if (/^\#\s*ifndef (.*)/) { | 317 | if (/^\#\s*ifndef (.*)/) { |
| 235 | push(@tag,$1); | 318 | push(@tag,$1); |
| 236 | $tag{$1}=-1; | 319 | $tag{$1}=-1; |
| 237 | next; | ||
| 238 | } elsif (/^\#\s*if !defined\(([^\)]+)\)/) { | 320 | } elsif (/^\#\s*if !defined\(([^\)]+)\)/) { |
| 239 | push(@tag,$1); | 321 | push(@tag,$1); |
| 240 | $tag{$1}=-1; | 322 | $tag{$1}=-1; |
| 241 | next; | ||
| 242 | } elsif (/^\#\s*ifdef (.*)/) { | 323 | } elsif (/^\#\s*ifdef (.*)/) { |
| 243 | push(@tag,$1); | 324 | push(@tag,$1); |
| 244 | $tag{$1}=1; | 325 | $tag{$1}=1; |
| 245 | next; | 326 | } elsif (/^\#\s*if defined\(([^\)]+)\)/) { |
| 246 | } elsif (/^\#\s*if defined(.*)/) { | ||
| 247 | push(@tag,$1); | 327 | push(@tag,$1); |
| 248 | $tag{$1}=1; | 328 | $tag{$1}=1; |
| 249 | next; | 329 | } elsif (/^\#\s*error\s+(\w+) is disabled\./) { |
| 330 | if ($tag[$#tag] eq "NO_".$1) { | ||
| 331 | $tag{$tag[$#tag]}=2; | ||
| 332 | } | ||
| 250 | } elsif (/^\#\s*endif/) { | 333 | } elsif (/^\#\s*endif/) { |
| 251 | $tag{$tag[$#tag]}=0; | 334 | if ($tag{$tag[$#tag]}==2) { |
| 335 | $tag{$tag[$#tag]}=-1; | ||
| 336 | } else { | ||
| 337 | $tag{$tag[$#tag]}=0; | ||
| 338 | } | ||
| 252 | pop(@tag); | 339 | pop(@tag); |
| 253 | next; | ||
| 254 | } elsif (/^\#\s*else/) { | 340 | } elsif (/^\#\s*else/) { |
| 255 | my $t=$tag[$#tag]; | 341 | my $t=$tag[$#tag]; |
| 256 | $tag{$t}= -$tag{$t}; | 342 | $tag{$t}= -$tag{$t}; |
| 257 | next; | ||
| 258 | } elsif (/^\#\s*if\s+1/) { | 343 | } elsif (/^\#\s*if\s+1/) { |
| 259 | # Dummy tag | 344 | # Dummy tag |
| 260 | push(@tag,"TRUE"); | 345 | push(@tag,"TRUE"); |
| 261 | $tag{"TRUE"}=1; | 346 | $tag{"TRUE"}=1; |
| 262 | next; | ||
| 263 | } elsif (/^\#\s*if\s+0/) { | 347 | } elsif (/^\#\s*if\s+0/) { |
| 264 | # Dummy tag | 348 | # Dummy tag |
| 265 | push(@tag,"TRUE"); | 349 | push(@tag,"TRUE"); |
| 266 | $tag{"TRUE"}=-1; | 350 | $tag{"TRUE"}=-1; |
| 267 | next; | 351 | } elsif (/^\#\s*define\s+(\w+)\s+(\w+)/ |
| 268 | } elsif (/^\#/) { | 352 | && $symhacking) { |
| 353 | my $s = $1; | ||
| 354 | my $a = | ||
| 355 | $2.":".join(",", grep(!/^$/, | ||
| 356 | map { $tag{$_} == 1 ? | ||
| 357 | $_ : "" } | ||
| 358 | @known_platforms)); | ||
| 359 | $rename{$s} = $a; | ||
| 360 | } | ||
| 361 | if (/^\#/) { | ||
| 362 | my @p = grep(!/^$/, | ||
| 363 | map { $tag{$_} == 1 ? $_ : | ||
| 364 | $tag{$_} == -1 ? "!".$_ : "" } | ||
| 365 | @known_platforms); | ||
| 366 | my @a = grep(!/^$/, | ||
| 367 | map { $tag{"NO_".$_} == -1 ? $_ : "" } | ||
| 368 | @known_algorithms); | ||
| 369 | $def .= "#INFO:".join(',',@p).":".join(',',@a).";"; | ||
| 269 | next; | 370 | next; |
| 270 | } | 371 | } |
| 271 | if ($safe_stack_def && | 372 | if (/^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) { |
| 272 | /^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) { | 373 | next; |
| 273 | $funcs{"sk_${1}_new"} = 1; | 374 | } elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) { |
| 274 | $funcs{"sk_${1}_new_null"} = 1; | 375 | next; |
| 275 | $funcs{"sk_${1}_free"} = 1; | 376 | } elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) { |
| 276 | $funcs{"sk_${1}_num"} = 1; | 377 | next; |
| 277 | $funcs{"sk_${1}_value"} = 1; | ||
| 278 | $funcs{"sk_${1}_set"} = 1; | ||
| 279 | $funcs{"sk_${1}_zero"} = 1; | ||
| 280 | $funcs{"sk_${1}_push"} = 1; | ||
| 281 | $funcs{"sk_${1}_unshift"} = 1; | ||
| 282 | $funcs{"sk_${1}_find"} = 1; | ||
| 283 | $funcs{"sk_${1}_delete"} = 1; | ||
| 284 | $funcs{"sk_${1}_delete_ptr"} = 1; | ||
| 285 | $funcs{"sk_${1}_insert"} = 1; | ||
| 286 | $funcs{"sk_${1}_set_cmp_func"} = 1; | ||
| 287 | $funcs{"sk_${1}_dup"} = 1; | ||
| 288 | $funcs{"sk_${1}_pop_free"} = 1; | ||
| 289 | $funcs{"sk_${1}_shift"} = 1; | ||
| 290 | $funcs{"sk_${1}_pop"} = 1; | ||
| 291 | $funcs{"sk_${1}_sort"} = 1; | ||
| 292 | } elsif ($safe_stack_def && | ||
| 293 | /^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) { | ||
| 294 | $funcs{"d2i_ASN1_SET_OF_${1}"} = 1; | ||
| 295 | $funcs{"i2d_ASN1_SET_OF_${1}"} = 1; | ||
| 296 | } elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ || | 378 | } elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ || |
| 297 | /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) { | 379 | /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) { |
| 298 | if($W32) { | 380 | # Things not in Win16 |
| 299 | $funcs{"PEM_read_${1}"} = 1; | 381 | $syms{"PEM_read_${1}"} = 1; |
| 300 | $funcs{"PEM_write_${1}"} = 1; | 382 | $platform{"PEM_read_${1}"} = "!WIN16"; |
| 383 | $syms{"PEM_write_${1}"} = 1; | ||
| 384 | $platform{"PEM_write_${1}"} = "!WIN16"; | ||
| 385 | # Things that are everywhere | ||
| 386 | $syms{"PEM_read_bio_${1}"} = 1; | ||
| 387 | $syms{"PEM_write_bio_${1}"} = 1; | ||
| 388 | if ($1 eq "RSAPrivateKey" || | ||
| 389 | $1 eq "RSAPublicKey" || | ||
| 390 | $1 eq "RSA_PUBKEY") { | ||
| 391 | $algorithm{"PEM_read_${1}"} = "RSA"; | ||
| 392 | $algorithm{"PEM_write_${1}"} = "RSA"; | ||
| 393 | $algorithm{"PEM_read_bio_${1}"} = "RSA"; | ||
| 394 | $algorithm{"PEM_write_bio_${1}"} = "RSA"; | ||
| 395 | } | ||
| 396 | elsif ($1 eq "DSAPrivateKey" || | ||
| 397 | $1 eq "DSAparams" || | ||
| 398 | $1 eq "RSA_PUBKEY") { | ||
| 399 | $algorithm{"PEM_read_${1}"} = "DSA"; | ||
| 400 | $algorithm{"PEM_write_${1}"} = "DSA"; | ||
| 401 | $algorithm{"PEM_read_bio_${1}"} = "DSA"; | ||
| 402 | $algorithm{"PEM_write_bio_${1}"} = "DSA"; | ||
| 403 | } | ||
| 404 | elsif ($1 eq "DHparams") { | ||
| 405 | $algorithm{"PEM_read_${1}"} = "DH"; | ||
| 406 | $algorithm{"PEM_write_${1}"} = "DH"; | ||
| 407 | $algorithm{"PEM_read_bio_${1}"} = "DH"; | ||
| 408 | $algorithm{"PEM_write_bio_${1}"} = "DH"; | ||
| 301 | } | 409 | } |
| 302 | $funcs{"PEM_read_bio_${1}"} = 1; | ||
| 303 | $funcs{"PEM_write_bio_${1}"} = 1; | ||
| 304 | } elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ || | 410 | } elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ || |
| 305 | /^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) { | 411 | /^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) { |
| 306 | if($W32) { | 412 | # Things not in Win16 |
| 307 | $funcs{"PEM_write_${1}"} = 1; | 413 | $syms{"PEM_write_${1}"} = 1; |
| 414 | $platform{"PEM_write_${1}"} .= ",!WIN16"; | ||
| 415 | # Things that are everywhere | ||
| 416 | $syms{"PEM_write_bio_${1}"} = 1; | ||
| 417 | if ($1 eq "RSAPrivateKey" || | ||
| 418 | $1 eq "RSAPublicKey" || | ||
| 419 | $1 eq "RSA_PUBKEY") { | ||
| 420 | $algorithm{"PEM_write_${1}"} = "RSA"; | ||
| 421 | $algorithm{"PEM_write_bio_${1}"} = "RSA"; | ||
| 422 | } | ||
| 423 | elsif ($1 eq "DSAPrivateKey" || | ||
| 424 | $1 eq "DSAparams" || | ||
| 425 | $1 eq "RSA_PUBKEY") { | ||
| 426 | $algorithm{"PEM_write_${1}"} = "DSA"; | ||
| 427 | $algorithm{"PEM_write_bio_${1}"} = "DSA"; | ||
| 428 | } | ||
| 429 | elsif ($1 eq "DHparams") { | ||
| 430 | $algorithm{"PEM_write_${1}"} = "DH"; | ||
| 431 | $algorithm{"PEM_write_bio_${1}"} = "DH"; | ||
| 308 | } | 432 | } |
| 309 | $funcs{"PEM_write_bio_${1}"} = 1; | ||
| 310 | } elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ || | 433 | } elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ || |
| 311 | /^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) { | 434 | /^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) { |
| 312 | if($W32) { | 435 | # Things not in Win16 |
| 313 | $funcs{"PEM_read_${1}"} = 1; | 436 | $syms{"PEM_read_${1}"} = 1; |
| 314 | } | 437 | $platform{"PEM_read_${1}"} .= ",!WIN16"; |
| 315 | $funcs{"PEM_read_bio_${1}"} = 1; | 438 | # Things that are everywhere |
| 439 | $syms{"PEM_read_bio_${1}"} = 1; | ||
| 316 | } elsif ( | 440 | } elsif ( |
| 317 | ($tag{'TRUE'} != -1) && | 441 | ($tag{'TRUE'} != -1) |
| 318 | ($tag{'FreeBSD'} != 1) && | 442 | && ($tag{'CONST_STRICT'} != 1) |
| 319 | ($tag{'CONST_STRICT'} != 1) && | 443 | ) |
| 320 | (($W32 && ($tag{'WIN16'} != 1)) || | ||
| 321 | (!$W32 && ($tag{'WIN16'} != -1))) && | ||
| 322 | ($tag{'PERL5'} != 1) && | ||
| 323 | # ($tag{'_WINDLL'} != -1) && | ||
| 324 | ((!$W32 && $tag{'_WINDLL'} != -1) || | ||
| 325 | ($W32 && $tag{'_WINDLL'} != 1)) && | ||
| 326 | ((($tag{'NO_FP_API'} != 1) && $W32) || | ||
| 327 | (($tag{'NO_FP_API'} != -1) && !$W32)) && | ||
| 328 | ($tag{'NO_RC2'} == 0 || !$no_rc2) && | ||
| 329 | ($tag{'NO_RC4'} == 0 || !$no_rc4) && | ||
| 330 | ($tag{'NO_RC5'} == 0 || !$no_rc5) && | ||
| 331 | ($tag{'NO_IDEA'} == 0 || !$no_idea) && | ||
| 332 | ($tag{'NO_DES'} == 0 || !$no_des) && | ||
| 333 | ($tag{'NO_BF'} == 0 || !$no_bf) && | ||
| 334 | ($tag{'NO_CAST'} == 0 || !$no_cast) && | ||
| 335 | ($tag{'NO_MD2'} == 0 || !$no_md2) && | ||
| 336 | ($tag{'NO_MD5'} == 0 || !$no_md5) && | ||
| 337 | ($tag{'NO_SHA'} == 0 || !$no_sha) && | ||
| 338 | ($tag{'NO_RIPEMD'} == 0 || !$no_ripemd) && | ||
| 339 | ($tag{'NO_MDC2'} == 0 || !$no_mdc2) && | ||
| 340 | ($tag{'NO_RSA'} == 0 || !$no_rsa) && | ||
| 341 | ($tag{'NO_DSA'} == 0 || !$no_dsa) && | ||
| 342 | ($tag{'NO_DH'} == 0 || !$no_dh) && | ||
| 343 | ($tag{'NO_HMAC'} == 0 || !$no_hmac)) | ||
| 344 | { | 444 | { |
| 345 | if (/{|\/\*/) { # } | 445 | if (/\{|\/\*|\([^\)]*$/) { |
| 346 | $line = $_; | 446 | $line = $_; |
| 347 | } else { | 447 | } else { |
| 348 | $def .= $_; | 448 | $def .= $_; |
| @@ -351,24 +451,26 @@ sub do_defs | |||
| 351 | } | 451 | } |
| 352 | close(IN); | 452 | close(IN); |
| 353 | 453 | ||
| 454 | my $algs; | ||
| 455 | my $plays; | ||
| 456 | |||
| 354 | foreach (split /;/, $def) { | 457 | foreach (split /;/, $def) { |
| 458 | my $s; my $k = "FUNCTION"; my $p; my $a; | ||
| 355 | s/^[\n\s]*//g; | 459 | s/^[\n\s]*//g; |
| 356 | s/[\n\s]*$//g; | 460 | s/[\n\s]*$//g; |
| 461 | next if(/\#undef/); | ||
| 357 | next if(/typedef\W/); | 462 | next if(/typedef\W/); |
| 358 | next if(/EVP_bf/ and $no_bf); | 463 | next if(/\#define/); |
| 359 | next if(/EVP_cast/ and $no_cast); | 464 | |
| 360 | next if(/EVP_des/ and $no_des); | 465 | if (/^\#INFO:([^:]*):(.*)$/) { |
| 361 | next if(/EVP_dss/ and $no_dsa); | 466 | $plats = $1; |
| 362 | next if(/EVP_idea/ and $no_idea); | 467 | $algs = $2; |
| 363 | next if(/EVP_md2/ and $no_md2); | 468 | next; |
| 364 | next if(/EVP_md5/ and $no_md5); | 469 | } elsif (/^\s*OPENSSL_EXTERN\s.*?(\w+)(\[[0-9]*\])*\s*$/) { |
| 365 | next if(/EVP_rc2/ and $no_rc2); | 470 | $s = $1; |
| 366 | next if(/EVP_rc4/ and $no_rc4); | 471 | $k = "VARIABLE"; |
| 367 | next if(/EVP_rc5/ and $no_rc5); | 472 | } elsif (/\(\*(\w*)\([^\)]+/) { |
| 368 | next if(/EVP_ripemd/ and $no_ripemd); | 473 | $s = $1; |
| 369 | next if(/EVP_sha/ and $no_sha); | ||
| 370 | if (/\(\*(\w*)\([^\)]+/) { | ||
| 371 | $funcs{$1} = 1; | ||
| 372 | } elsif (/\w+\W+(\w+)\W*\(\s*\)$/s) { | 474 | } elsif (/\w+\W+(\w+)\W*\(\s*\)$/s) { |
| 373 | # K&R C | 475 | # K&R C |
| 374 | next; | 476 | next; |
| @@ -379,65 +481,184 @@ sub do_defs | |||
| 379 | } | 481 | } |
| 380 | s/\(void\)//; | 482 | s/\(void\)//; |
| 381 | /(\w+)\W*\(\)/s; | 483 | /(\w+)\W*\(\)/s; |
| 382 | $funcs{$1} = 1; | 484 | $s = $1; |
| 383 | } elsif (/\(/ and not (/=/)) { | 485 | } elsif (/\(/ and not (/=/)) { |
| 384 | print STDERR "File $file: cannot parse: $_;\n"; | 486 | print STDERR "File $file: cannot parse: $_;\n"; |
| 487 | next; | ||
| 488 | } else { | ||
| 489 | next; | ||
| 490 | } | ||
| 491 | |||
| 492 | $syms{$s} = 1; | ||
| 493 | $kind{$s} = $k; | ||
| 494 | |||
| 495 | $p = $plats; | ||
| 496 | $a = $algs; | ||
| 497 | $a .= ",BF" if($s =~ /EVP_bf/); | ||
| 498 | $a .= ",CAST" if($s =~ /EVP_cast/); | ||
| 499 | $a .= ",DES" if($s =~ /EVP_des/); | ||
| 500 | $a .= ",DSA" if($s =~ /EVP_dss/); | ||
| 501 | $a .= ",IDEA" if($s =~ /EVP_idea/); | ||
| 502 | $a .= ",MD2" if($s =~ /EVP_md2/); | ||
| 503 | $a .= ",MD4" if($s =~ /EVP_md4/); | ||
| 504 | $a .= ",MD5" if($s =~ /EVP_md5/); | ||
| 505 | $a .= ",RC2" if($s =~ /EVP_rc2/); | ||
| 506 | $a .= ",RC4" if($s =~ /EVP_rc4/); | ||
| 507 | $a .= ",RC5" if($s =~ /EVP_rc5/); | ||
| 508 | $a .= ",RIPEMD" if($s =~ /EVP_ripemd/); | ||
| 509 | $a .= ",SHA" if($s =~ /EVP_sha/); | ||
| 510 | $a .= ",RSA" if($s =~ /EVP_(Open|Seal)(Final|Init)/); | ||
| 511 | $a .= ",RSA" if($s =~ /PEM_Seal(Final|Init|Update)/); | ||
| 512 | $a .= ",RSA" if($s =~ /RSAPrivateKey/); | ||
| 513 | $a .= ",RSA" if($s =~ /SSLv23?_((client|server)_)?method/); | ||
| 514 | |||
| 515 | $platform{$s} .= ','.$p; | ||
| 516 | $algorithm{$s} .= ','.$a; | ||
| 517 | |||
| 518 | if (defined($rename{$s})) { | ||
| 519 | (my $r, my $p) = split(/:/,$rename{$s}); | ||
| 520 | my @ip = map { /^!(.*)$/ ? $1 : "!".$_ } split /,/, $p; | ||
| 521 | $syms{$r} = 1; | ||
| 522 | $kind{$r} = $kind{$s}."(".$s.")"; | ||
| 523 | $algorithm{$r} = $algorithm{$s}; | ||
| 524 | $platform{$r} = $platform{$s}.",".$p; | ||
| 525 | $platform{$s} .= ','.join(',', @ip).','.join(',', @ip); | ||
| 385 | } | 526 | } |
| 386 | } | 527 | } |
| 387 | } | 528 | } |
| 388 | 529 | ||
| 389 | # Prune the returned functions | 530 | # Prune the returned symbols |
| 390 | 531 | ||
| 391 | delete $funcs{"SSL_add_dir_cert_subjects_to_stack"}; | 532 | $platform{"crypt"} .= ",!PERL5,!__FreeBSD__,!NeXT"; |
| 392 | delete $funcs{"RSA_PKCS1_RSAref"} unless $rsaref; | ||
| 393 | delete $funcs{"bn_dump1"}; | ||
| 394 | 533 | ||
| 395 | if($W32) { | 534 | delete $syms{"SSL_add_dir_cert_subjects_to_stack"}; |
| 396 | delete $funcs{"BIO_s_file_internal"}; | 535 | delete $syms{"bn_dump1"}; |
| 397 | delete $funcs{"BIO_new_file_internal"}; | 536 | |
| 398 | delete $funcs{"BIO_new_fp_internal"}; | 537 | $platform{"BIO_s_file_internal"} .= ",WIN16"; |
| 399 | } else { | 538 | $platform{"BIO_new_file_internal"} .= ",WIN16"; |
| 400 | if(exists $funcs{"ERR_load_CRYPTO_strings"}) { | 539 | $platform{"BIO_new_fp_internal"} .= ",WIN16"; |
| 401 | delete $funcs{"ERR_load_CRYPTO_strings"}; | 540 | |
| 402 | $funcs{"ERR_load_CRYPTOlib_strings"} = 1; | 541 | $platform{"BIO_s_file"} .= ",!WIN16"; |
| 542 | $platform{"BIO_new_file"} .= ",!WIN16"; | ||
| 543 | $platform{"BIO_new_fp"} .= ",!WIN16"; | ||
| 544 | |||
| 545 | $platform{"BIO_s_log"} .= ",!WIN32,!WIN16,!macintosh"; | ||
| 546 | |||
| 547 | if(exists $syms{"ERR_load_CRYPTO_strings"}) { | ||
| 548 | $platform{"ERR_load_CRYPTO_strings"} .= ",!VMS,!WIN16"; | ||
| 549 | $syms{"ERR_load_CRYPTOlib_strings"} = 1; | ||
| 550 | $platform{"ERR_load_CRYPTOlib_strings"} .= ",VMS,WIN16"; | ||
| 551 | } | ||
| 552 | |||
| 553 | # Info we know about | ||
| 554 | |||
| 555 | $platform{"RSA_PKCS1_RSAref"} = "RSAREF"; | ||
| 556 | $algorithm{"RSA_PKCS1_RSAref"} = "RSA"; | ||
| 557 | |||
| 558 | push @ret, map { $_."\\".&info_string($_,"EXIST", | ||
| 559 | $platform{$_}, | ||
| 560 | $kind{$_}, | ||
| 561 | $algorithm{$_}) } keys %syms; | ||
| 562 | |||
| 563 | return(@ret); | ||
| 564 | } | ||
| 565 | |||
| 566 | sub info_string { | ||
| 567 | (my $symbol, my $exist, my $platforms, my $kind, my $algorithms) = @_; | ||
| 568 | |||
| 569 | my %a = defined($algorithms) ? | ||
| 570 | map { $_ => 1 } split /,/, $algorithms : (); | ||
| 571 | my $pl = defined($platforms) ? $platforms : ""; | ||
| 572 | my %p = map { $_ => 0 } split /,/, $pl; | ||
| 573 | my $k = defined($kind) ? $kind : "FUNCTION"; | ||
| 574 | my $ret; | ||
| 575 | |||
| 576 | # We do this, because if there's code like the following, it really | ||
| 577 | # means the function exists in all cases and should therefore be | ||
| 578 | # everywhere. By increasing and decreasing, we may attain 0: | ||
| 579 | # | ||
| 580 | # ifndef WIN16 | ||
| 581 | # int foo(); | ||
| 582 | # else | ||
| 583 | # int _fat foo(); | ||
| 584 | # endif | ||
| 585 | foreach $platform (split /,/, $pl) { | ||
| 586 | if ($platform =~ /^!(.*)$/) { | ||
| 587 | $p{$1}--; | ||
| 588 | } else { | ||
| 589 | $p{$platform}++; | ||
| 403 | } | 590 | } |
| 404 | delete $funcs{"BIO_s_file"}; | ||
| 405 | delete $funcs{"BIO_new_file"}; | ||
| 406 | delete $funcs{"BIO_new_fp"}; | ||
| 407 | } | 591 | } |
| 408 | if (!$NT) { | 592 | foreach $platform (keys %p) { |
| 409 | delete $funcs{"BIO_s_log"}; | 593 | if ($p{$platform} == 0) { delete $p{$platform}; } |
| 410 | } | 594 | } |
| 411 | 595 | ||
| 412 | push @ret, keys %funcs; | 596 | delete $p{""}; |
| 597 | delete $a{""}; | ||
| 413 | 598 | ||
| 414 | return(@ret); | 599 | $ret = $exist; |
| 600 | $ret .= ":".join(',',map { $p{$_} < 0 ? "!".$_ : $_ } keys %p); | ||
| 601 | $ret .= ":".$k; | ||
| 602 | $ret .= ":".join(',',keys %a); | ||
| 603 | return $ret; | ||
| 604 | } | ||
| 605 | |||
| 606 | sub maybe_add_info { | ||
| 607 | (my $name, *nums, my @symbols) = @_; | ||
| 608 | my $sym; | ||
| 609 | my $new_info = 0; | ||
| 610 | |||
| 611 | print STDERR "Updating $name info\n"; | ||
| 612 | foreach $sym (@symbols) { | ||
| 613 | (my $s, my $i) = split /\\/, $sym; | ||
| 614 | $i =~ s/^(.*?:.*?:\w+)(\(\w+\))?/$1/; | ||
| 615 | if (defined($nums{$s})) { | ||
| 616 | (my $n, my $dummy) = split /\\/, $nums{$s}; | ||
| 617 | if (!defined($dummy) || $i ne $dummy) { | ||
| 618 | $nums{$s} = $n."\\".$i; | ||
| 619 | $new_info++; | ||
| 620 | #print STDERR "DEBUG: maybe_add_info for $s: \"$dummy\" => \"$i\"\n"; | ||
| 621 | } | ||
| 622 | } | ||
| 623 | } | ||
| 624 | if ($new_info) { | ||
| 625 | print STDERR "$new_info old symbols got an info update\n"; | ||
| 626 | if (!$do_rewrite) { | ||
| 627 | print STDERR "You should do a rewrite to fix this.\n"; | ||
| 628 | } | ||
| 629 | } else { | ||
| 630 | print STDERR "No old symbols needed info update\n"; | ||
| 631 | } | ||
| 415 | } | 632 | } |
| 416 | 633 | ||
| 417 | sub print_test_file | 634 | sub print_test_file |
| 418 | { | 635 | { |
| 419 | (*OUT,my $name,*nums,my @functions)=@_; | 636 | (*OUT,my $name,*nums,my @symbols)=@_; |
| 420 | my $n = 1; my @e; my @r; | 637 | my $n = 1; my @e; my @r; |
| 421 | my $func; | 638 | my $sym; my $prev = ""; my $prefSSLeay; |
| 422 | 639 | ||
| 423 | (@e)=grep(/^SSLeay/,@functions); | 640 | (@e)=grep(/^SSLeay\\.*?:.*?:FUNCTION/,@symbols); |
| 424 | (@r)=grep(!/^SSLeay/,@functions); | 641 | (@r)=grep(/^\w+\\.*?:.*?:FUNCTION/ && !/^SSLeay\\.*?:.*?:FUNCTION/,@symbols); |
| 425 | @functions=((sort @e),(sort @r)); | 642 | @symbols=((sort @e),(sort @r)); |
| 426 | 643 | ||
| 427 | foreach $func (@functions) { | 644 | foreach $sym (@symbols) { |
| 428 | if (!defined($nums{$func})) { | 645 | (my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/; |
| 429 | printf STDERR "$func does not have a number assigned\n" | 646 | if ($s ne $prev) { |
| 430 | if(!$do_update); | 647 | if (!defined($nums{$sym})) { |
| 431 | } else { | 648 | printf STDERR "Warning: $sym does not have a number assigned\n" |
| 432 | $n=$nums{$func}; | 649 | if(!$do_update); |
| 433 | print OUT "\t$func();\n"; | 650 | } else { |
| 651 | $n=$nums{$s}; | ||
| 652 | print OUT "\t$s();\n"; | ||
| 653 | } | ||
| 434 | } | 654 | } |
| 655 | $prev = $s; # To avoid duplicates... | ||
| 435 | } | 656 | } |
| 436 | } | 657 | } |
| 437 | 658 | ||
| 438 | sub print_def_file | 659 | sub print_def_file |
| 439 | { | 660 | { |
| 440 | (*OUT,my $name,*nums,my @functions)=@_; | 661 | (*OUT,my $name,*nums,my @symbols)=@_; |
| 441 | my $n = 1; my @e; my @r; | 662 | my $n = 1; my @e; my @r; |
| 442 | 663 | ||
| 443 | if ($W32) | 664 | if ($W32) |
| @@ -471,18 +692,61 @@ EOF | |||
| 471 | 692 | ||
| 472 | print "EXPORTS\n"; | 693 | print "EXPORTS\n"; |
| 473 | 694 | ||
| 695 | (@e)=grep(/^SSLeay\\.*?:.*?:FUNCTION/,@symbols); | ||
| 696 | (@r)=grep(/^\w+\\.*?:.*?:FUNCTION/ && !/^SSLeay\\.*?:.*?:FUNCTION/,@symbols); | ||
| 697 | @symbols=((sort @e),(sort @r)); | ||
| 474 | 698 | ||
| 475 | (@e)=grep(/^SSLeay/,@functions); | ||
| 476 | (@r)=grep(!/^SSLeay/,@functions); | ||
| 477 | @functions=((sort @e),(sort @r)); | ||
| 478 | 699 | ||
| 479 | foreach $func (@functions) { | 700 | foreach $sym (@symbols) { |
| 480 | if (!defined($nums{$func})) { | 701 | (my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/; |
| 481 | printf STDERR "$func does not have a number assigned\n" | 702 | if (!defined($nums{$s})) { |
| 703 | printf STDERR "Warning: $s does not have a number assigned\n" | ||
| 482 | if(!$do_update); | 704 | if(!$do_update); |
| 483 | } else { | 705 | } else { |
| 484 | $n=$nums{$func}; | 706 | (my $n, my $i) = split /\\/, $nums{$s}; |
| 485 | printf OUT " %s%-40s@%d\n",($W32)?"":"_",$func,$n; | 707 | my %pf = (); |
| 708 | my @p = split(/,/, ($i =~ /^.*?:(.*?):/,$1)); | ||
| 709 | # @p_purged must contain hardware platforms only | ||
| 710 | my @p_purged = (); | ||
| 711 | foreach $ptmp (@p) { | ||
| 712 | next if $ptmp =~ /^!?RSAREF$/; | ||
| 713 | push @p_purged, $ptmp; | ||
| 714 | } | ||
| 715 | my $negatives = !!grep(/^!/,@p); | ||
| 716 | # It is very important to check NT before W32 | ||
| 717 | if ((($NT && (!@p_purged | ||
| 718 | || (!$negatives && grep(/^WINNT$/,@p)) | ||
| 719 | || ($negatives && !grep(/^!WINNT$/,@p)))) | ||
| 720 | || ($W32 && (!@p_purged | ||
| 721 | || (!$negatives && grep(/^WIN32$/,@p)) | ||
| 722 | || ($negatives && !grep(/^!WIN32$/,@p)))) | ||
| 723 | || ($W16 && (!@p_purged | ||
| 724 | || (!$negatives && grep(/^WIN16$/,@p)) | ||
| 725 | || ($negatives && !grep(/^!WIN16$/,@p))))) | ||
| 726 | && (!@p | ||
| 727 | || (!$negatives | ||
| 728 | && ($rsaref || !grep(/^RSAREF$/,@p))) | ||
| 729 | || ($negatives | ||
| 730 | && (!$rsaref || !grep(/^!RSAREF$/,@p))))) { | ||
| 731 | printf OUT " %s%-40s@%d\n",($W32)?"":"_",$s,$n; | ||
| 732 | # } else { | ||
| 733 | # print STDERR "DEBUG: \"$sym\" (@p):", | ||
| 734 | # " rsaref:", !!(!@p | ||
| 735 | # || (!$negatives | ||
| 736 | # && ($rsaref || !grep(/^RSAREF$/,@p))) | ||
| 737 | # || ($negatives | ||
| 738 | # && (!$rsaref || !grep(/^!RSAREF$/,@p))))?1:0, | ||
| 739 | # " 16:", !!($W16 && (!@p_purged | ||
| 740 | # || (!$negatives && grep(/^WIN16$/,@p)) | ||
| 741 | # || ($negatives && !grep(/^!WIN16$/,@p)))), | ||
| 742 | # " 32:", !!($W32 && (!@p_purged | ||
| 743 | # || (!$negatives && grep(/^WIN32$/,@p)) | ||
| 744 | # || ($negatives && !grep(/^!WIN32$/,@p)))), | ||
| 745 | # " NT:", !!($NT && (!@p_purged | ||
| 746 | # || (!$negatives && grep(/^WINNT$/,@p)) | ||
| 747 | # || ($negatives && !grep(/^!WINNT$/,@p)))), | ||
| 748 | # "\n"; | ||
| 749 | } | ||
| 486 | } | 750 | } |
| 487 | } | 751 | } |
| 488 | printf OUT "\n"; | 752 | printf OUT "\n"; |
| @@ -494,6 +758,8 @@ sub load_numbers | |||
| 494 | my(@a,%ret); | 758 | my(@a,%ret); |
| 495 | 759 | ||
| 496 | $max_num = 0; | 760 | $max_num = 0; |
| 761 | $num_noinfo = 0; | ||
| 762 | $prev = ""; | ||
| 497 | 763 | ||
| 498 | open(IN,"<$name") || die "unable to open $name:$!\n"; | 764 | open(IN,"<$name") || die "unable to open $name:$!\n"; |
| 499 | while (<IN>) { | 765 | while (<IN>) { |
| @@ -501,27 +767,138 @@ sub load_numbers | |||
| 501 | s/#.*$//; | 767 | s/#.*$//; |
| 502 | next if /^\s*$/; | 768 | next if /^\s*$/; |
| 503 | @a=split; | 769 | @a=split; |
| 504 | $ret{$a[0]}=$a[1]; | 770 | if (defined $ret{$a[0]}) { |
| 771 | print STDERR "Warning: Symbol '",$a[0],"' redefined. old=",$ret{$a[0]},", new=",$a[1],"\n"; | ||
| 772 | } | ||
| 773 | if ($max_num > $a[1]) { | ||
| 774 | print STDERR "Warning: Number decreased from ",$max_num," to ",$a[1],"\n"; | ||
| 775 | } | ||
| 776 | if ($max_num == $a[1]) { | ||
| 777 | # This is actually perfectly OK | ||
| 778 | #print STDERR "Warning: Symbol ",$a[0]," has same number as previous ",$prev,": ",$a[1],"\n"; | ||
| 779 | } | ||
| 780 | if ($#a < 2) { | ||
| 781 | # Existence will be proven later, in do_defs | ||
| 782 | $ret{$a[0]}=$a[1]; | ||
| 783 | $num_noinfo++; | ||
| 784 | } else { | ||
| 785 | $ret{$a[0]}=$a[1]."\\".$a[2]; # \\ is a special marker | ||
| 786 | } | ||
| 505 | $max_num = $a[1] if $a[1] > $max_num; | 787 | $max_num = $a[1] if $a[1] > $max_num; |
| 788 | $prev=$a[0]; | ||
| 789 | } | ||
| 790 | if ($num_noinfo) { | ||
| 791 | print STDERR "Warning: $num_noinfo symbols were without info."; | ||
| 792 | if ($do_rewrite) { | ||
| 793 | printf STDERR " The rewrite will fix this.\n"; | ||
| 794 | } else { | ||
| 795 | printf STDERR " You should do a rewrite to fix this.\n"; | ||
| 796 | } | ||
| 506 | } | 797 | } |
| 507 | close(IN); | 798 | close(IN); |
| 508 | return(%ret); | 799 | return(%ret); |
| 509 | } | 800 | } |
| 510 | 801 | ||
| 802 | sub parse_number | ||
| 803 | { | ||
| 804 | (my $str, my $what) = @_; | ||
| 805 | (my $n, my $i) = split(/\\/,$str); | ||
| 806 | if ($what eq "n") { | ||
| 807 | return $n; | ||
| 808 | } else { | ||
| 809 | return $i; | ||
| 810 | } | ||
| 811 | } | ||
| 812 | |||
| 813 | sub rewrite_numbers | ||
| 814 | { | ||
| 815 | (*OUT,$name,*nums,@symbols)=@_; | ||
| 816 | my $thing; | ||
| 817 | |||
| 818 | print STDERR "Rewriting $name\n"; | ||
| 819 | |||
| 820 | my @r = grep(/^\w+\\.*?:.*?:\w+\(\w+\)/,@symbols); | ||
| 821 | my $r; my %r; my %rsyms; | ||
| 822 | foreach $r (@r) { | ||
| 823 | (my $s, my $i) = split /\\/, $r; | ||
| 824 | my $a = $1 if $i =~ /^.*?:.*?:\w+\((\w+)\)/; | ||
| 825 | $i =~ s/^(.*?:.*?:\w+)\(\w+\)/$1/; | ||
| 826 | $r{$a} = $s."\\".$i; | ||
| 827 | $rsyms{$s} = 1; | ||
| 828 | } | ||
| 829 | |||
| 830 | my @s=sort { &parse_number($nums{$a},"n") <=> &parse_number($nums{$b},"n") } keys %nums; | ||
| 831 | foreach $sym (@s) { | ||
| 832 | (my $n, my $i) = split /\\/, $nums{$sym}; | ||
| 833 | next if defined($i) && $i =~ /^.*?:.*?:\w+\(\w+\)/; | ||
| 834 | next if defined($rsyms{$sym}); | ||
| 835 | $i="NOEXIST::FUNCTION:" if !defined($i) || $i eq ""; | ||
| 836 | printf OUT "%s%-40s%d\t%s\n","",$sym,$n,$i; | ||
| 837 | if (exists $r{$sym}) { | ||
| 838 | (my $s, $i) = split /\\/,$r{$sym}; | ||
| 839 | printf OUT "%s%-40s%d\t%s\n","",$s,$n,$i; | ||
| 840 | } | ||
| 841 | } | ||
| 842 | } | ||
| 843 | |||
| 511 | sub update_numbers | 844 | sub update_numbers |
| 512 | { | 845 | { |
| 513 | (*OUT,$name,*nums,my $start_num, my @functions)=@_; | 846 | (*OUT,$name,*nums,my $start_num, my @symbols)=@_; |
| 514 | my $new_funcs = 0; | 847 | my $new_syms = 0; |
| 515 | print STDERR "Updating $name\n"; | 848 | |
| 516 | foreach $func (@functions) { | 849 | print STDERR "Updating $name numbers\n"; |
| 517 | if (!exists $nums{$func}) { | 850 | |
| 518 | $new_funcs++; | 851 | my @r = grep(/^\w+\\.*?:.*?:\w+\(\w+\)/,@symbols); |
| 519 | printf OUT "%s%-40s%d\n","",$func, ++$start_num; | 852 | my $r; my %r; my %rsyms; |
| 853 | foreach $r (@r) { | ||
| 854 | (my $s, my $i) = split /\\/, $r; | ||
| 855 | my $a = $1 if $i =~ /^.*?:.*?:\w+\((\w+)\)/; | ||
| 856 | $i =~ s/^(.*?:.*?:\w+)\(\w+\)/$1/; | ||
| 857 | $r{$a} = $s."\\".$i; | ||
| 858 | $rsyms{$s} = 1; | ||
| 859 | } | ||
| 860 | |||
| 861 | foreach $sym (@symbols) { | ||
| 862 | (my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/; | ||
| 863 | next if $i =~ /^.*?:.*?:\w+\(\w+\)/; | ||
| 864 | next if defined($rsyms{$sym}); | ||
| 865 | die "ERROR: Symbol $sym had no info attached to it." | ||
| 866 | if $i eq ""; | ||
| 867 | if (!exists $nums{$s}) { | ||
| 868 | $new_syms++; | ||
| 869 | printf OUT "%s%-40s%d\t%s\n","",$s, ++$start_num,$i; | ||
| 870 | if (exists $r{$s}) { | ||
| 871 | ($s, $i) = split /\\/,$r{$s}; | ||
| 872 | printf OUT "%s%-40s%d\t%s\n","",$s, $start_num,$i; | ||
| 873 | } | ||
| 520 | } | 874 | } |
| 521 | } | 875 | } |
| 522 | if($new_funcs) { | 876 | if($new_syms) { |
| 523 | print STDERR "$new_funcs New Functions added\n"; | 877 | print STDERR "$new_syms New symbols added\n"; |
| 524 | } else { | 878 | } else { |
| 525 | print STDERR "No New Functions Added\n"; | 879 | print STDERR "No New symbols Added\n"; |
| 526 | } | 880 | } |
| 527 | } | 881 | } |
| 882 | |||
| 883 | sub check_existing | ||
| 884 | { | ||
| 885 | (*nums, my @symbols)=@_; | ||
| 886 | my %existing; my @remaining; | ||
| 887 | @remaining=(); | ||
| 888 | foreach $sym (@symbols) { | ||
| 889 | (my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/; | ||
| 890 | $existing{$s}=1; | ||
| 891 | } | ||
| 892 | foreach $sym (keys %nums) { | ||
| 893 | if (!exists $existing{$sym}) { | ||
| 894 | push @remaining, $sym; | ||
| 895 | } | ||
| 896 | } | ||
| 897 | if(@remaining) { | ||
| 898 | print STDERR "The following symbols do not seem to exist:\n"; | ||
| 899 | foreach $sym (@remaining) { | ||
| 900 | print STDERR "\t",$sym,"\n"; | ||
| 901 | } | ||
| 902 | } | ||
| 903 | } | ||
| 904 | |||
diff --git a/src/lib/libssl/src/util/mkerr.pl b/src/lib/libssl/src/util/mkerr.pl index 8e18f3c2df..7d98b5234d 100644 --- a/src/lib/libssl/src/util/mkerr.pl +++ b/src/lib/libssl/src/util/mkerr.pl | |||
| @@ -38,7 +38,7 @@ while (@ARGV) { | |||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | if($recurse) { | 40 | if($recurse) { |
| 41 | @source = (<crypto/*.c>, <crypto/*/*.c>, ,<rsaref/*.c>, <ssl/*.c>); | 41 | @source = (<crypto/*.c>, <crypto/*/*.c>, <rsaref/*.c>, <ssl/*.c>); |
| 42 | } else { | 42 | } else { |
| 43 | @source = @ARGV; | 43 | @source = @ARGV; |
| 44 | } | 44 | } |
| @@ -79,8 +79,11 @@ while (($lib, $hdr) = each %hinc) | |||
| 79 | next if($hdr eq "NONE"); | 79 | next if($hdr eq "NONE"); |
| 80 | print STDERR "Scanning header file $hdr\n" if $debug; | 80 | print STDERR "Scanning header file $hdr\n" if $debug; |
| 81 | open(IN, "<$hdr") || die "Can't open Header file $hdr\n"; | 81 | open(IN, "<$hdr") || die "Can't open Header file $hdr\n"; |
| 82 | my $line = "", $def= ""; | 82 | my $line = "", $def= "", $linenr = 0; |
| 83 | while(<IN>) { | 83 | while(<IN>) { |
| 84 | $linenr++; | ||
| 85 | print STDERR "line: $linenr\r" if $debug; | ||
| 86 | |||
| 84 | last if(/BEGIN\s+ERROR\s+CODES/); | 87 | last if(/BEGIN\s+ERROR\s+CODES/); |
| 85 | if ($line ne '') { | 88 | if ($line ne '') { |
| 86 | $_ = $line . $_; | 89 | $_ = $line . $_; |
| @@ -110,7 +113,12 @@ while (($lib, $hdr) = each %hinc) | |||
| 110 | } | 113 | } |
| 111 | } | 114 | } |
| 112 | 115 | ||
| 116 | print STDERR " \r" if $debug; | ||
| 117 | $defnr = 0; | ||
| 113 | foreach (split /;/, $def) { | 118 | foreach (split /;/, $def) { |
| 119 | $defnr++; | ||
| 120 | print STDERR "def: $defnr\r" if $debug; | ||
| 121 | |||
| 114 | s/^[\n\s]*//g; | 122 | s/^[\n\s]*//g; |
| 115 | s/[\n\s]*$//g; | 123 | s/[\n\s]*$//g; |
| 116 | next if(/typedef\W/); | 124 | next if(/typedef\W/); |
| @@ -136,6 +144,8 @@ while (($lib, $hdr) = each %hinc) | |||
| 136 | } | 144 | } |
| 137 | } | 145 | } |
| 138 | 146 | ||
| 147 | print STDERR " \r" if $debug; | ||
| 148 | |||
| 139 | next if $reindex; | 149 | next if $reindex; |
| 140 | 150 | ||
| 141 | # Scan function and reason codes and store them: keep a note of the | 151 | # Scan function and reason codes and store them: keep a note of the |
diff --git a/src/lib/libssl/src/util/mkfiles.pl b/src/lib/libssl/src/util/mkfiles.pl index 6fa424bd19..470feea76f 100644 --- a/src/lib/libssl/src/util/mkfiles.pl +++ b/src/lib/libssl/src/util/mkfiles.pl | |||
| @@ -10,6 +10,7 @@ my @dirs = ( | |||
| 10 | ".", | 10 | ".", |
| 11 | "crypto", | 11 | "crypto", |
| 12 | "crypto/md2", | 12 | "crypto/md2", |
| 13 | "crypto/md4", | ||
| 13 | "crypto/md5", | 14 | "crypto/md5", |
| 14 | "crypto/sha", | 15 | "crypto/sha", |
| 15 | "crypto/mdc2", | 16 | "crypto/mdc2", |
| @@ -25,6 +26,7 @@ my @dirs = ( | |||
| 25 | "crypto/bn", | 26 | "crypto/bn", |
| 26 | "crypto/rsa", | 27 | "crypto/rsa", |
| 27 | "crypto/dsa", | 28 | "crypto/dsa", |
| 29 | "crypto/dso", | ||
| 28 | "crypto/dh", | 30 | "crypto/dh", |
| 29 | "crypto/buffer", | 31 | "crypto/buffer", |
| 30 | "crypto/bio", | 32 | "crypto/bio", |
| @@ -43,6 +45,7 @@ my @dirs = ( | |||
| 43 | "crypto/pkcs7", | 45 | "crypto/pkcs7", |
| 44 | "crypto/pkcs12", | 46 | "crypto/pkcs12", |
| 45 | "crypto/comp", | 47 | "crypto/comp", |
| 48 | "crypto/engine", | ||
| 46 | "ssl", | 49 | "ssl", |
| 47 | "rsaref", | 50 | "rsaref", |
| 48 | "apps", | 51 | "apps", |
diff --git a/src/lib/libssl/src/util/mklink.pl b/src/lib/libssl/src/util/mklink.pl index de555820ec..d7b997ada7 100644 --- a/src/lib/libssl/src/util/mklink.pl +++ b/src/lib/libssl/src/util/mklink.pl | |||
| @@ -49,7 +49,7 @@ my $to = join('/', @to_path); | |||
| 49 | 49 | ||
| 50 | my $file; | 50 | my $file; |
| 51 | foreach $file (@files) { | 51 | foreach $file (@files) { |
| 52 | # print "ln -s $to/$file $from/$file\n"; | 52 | my $err = ""; |
| 53 | symlink("$to/$file", "$from/$file"); | 53 | symlink("$to/$file", "$from/$file") or $err = " [$!]"; |
| 54 | print $file . " => $from/$file\n"; | 54 | print $file . " => $from/$file$err\n"; |
| 55 | } | 55 | } |
diff --git a/src/lib/libssl/src/util/mkstack.pl b/src/lib/libssl/src/util/mkstack.pl new file mode 100644 index 0000000000..3ee13fe7c9 --- /dev/null +++ b/src/lib/libssl/src/util/mkstack.pl | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | #!/usr/local/bin/perl -w | ||
| 2 | |||
| 3 | # This is a utility that searches out "DECLARE_STACK_OF()" | ||
| 4 | # declarations in .h and .c files, and updates/creates/replaces | ||
| 5 | # the corresponding macro declarations in crypto/stack/safestack.h. | ||
| 6 | # As it's not generally possible to have macros that generate macros, | ||
| 7 | # we need to control this from the "outside", here in this script. | ||
| 8 | # | ||
| 9 | # Geoff Thorpe, June, 2000 (with massive Perl-hacking | ||
| 10 | # help from Steve Robb) | ||
| 11 | |||
| 12 | my $safestack = "crypto/stack/safestack"; | ||
| 13 | |||
| 14 | my $do_write; | ||
| 15 | while (@ARGV) { | ||
| 16 | my $arg = $ARGV[0]; | ||
| 17 | if($arg eq "-write") { | ||
| 18 | $do_write = 1; | ||
| 19 | } | ||
| 20 | shift @ARGV; | ||
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | @source = (<crypto/*.[ch]>, <crypto/*/*.[ch]>, <rsaref/*.[ch]>, <ssl/*.[ch]>); | ||
| 25 | foreach $file (@source) { | ||
| 26 | next if -l $file; | ||
| 27 | |||
| 28 | # Open the .c/.h file for reading | ||
| 29 | open(IN, "< $file") || die "Can't open $file for reading: $!"; | ||
| 30 | |||
| 31 | while(<IN>) { | ||
| 32 | if (/^DECLARE_STACK_OF\(([^)]+)\)/) { | ||
| 33 | push @stacklst, $1; | ||
| 34 | } if (/^DECLARE_ASN1_SET_OF\(([^)]+)\)/) { | ||
| 35 | push @asn1setlst, $1; | ||
| 36 | } if (/^DECLARE_PKCS12_STACK_OF\(([^)]+)\)/) { | ||
| 37 | push @p12stklst, $1; | ||
| 38 | } | ||
| 39 | } | ||
| 40 | close(IN); | ||
| 41 | } | ||
| 42 | |||
| 43 | |||
| 44 | |||
| 45 | my $old_stackfile = ""; | ||
| 46 | my $new_stackfile = ""; | ||
| 47 | my $inside_block = 0; | ||
| 48 | my $type_thing; | ||
| 49 | |||
| 50 | open(IN, "< $safestack.h") || die "Can't open input file: $!"; | ||
| 51 | while(<IN>) { | ||
| 52 | $old_stackfile .= $_; | ||
| 53 | |||
| 54 | if (m|^/\* This block of defines is updated by util/mkstack.pl, please do not touch! \*/|) { | ||
| 55 | $inside_block = 1; | ||
| 56 | } | ||
| 57 | if (m|^/\* End of util/mkstack.pl block, you may now edit :-\) \*/|) { | ||
| 58 | $inside_block = 0; | ||
| 59 | } elsif ($inside_block == 0) { | ||
| 60 | $new_stackfile .= $_; | ||
| 61 | } | ||
| 62 | next if($inside_block != 1); | ||
| 63 | $new_stackfile .= "/* This block of defines is updated by util/mkstack.pl, please do not touch! */"; | ||
| 64 | |||
| 65 | foreach $type_thing (sort @stacklst) { | ||
| 66 | $new_stackfile .= <<EOF; | ||
| 67 | |||
| 68 | #define sk_${type_thing}_new(st) SKM_sk_new($type_thing, (st)) | ||
| 69 | #define sk_${type_thing}_new_null() SKM_sk_new_null($type_thing) | ||
| 70 | #define sk_${type_thing}_free(st) SKM_sk_free($type_thing, (st)) | ||
| 71 | #define sk_${type_thing}_num(st) SKM_sk_num($type_thing, (st)) | ||
| 72 | #define sk_${type_thing}_value(st, i) SKM_sk_value($type_thing, (st), (i)) | ||
| 73 | #define sk_${type_thing}_set(st, i, val) SKM_sk_set($type_thing, (st), (i), (val)) | ||
| 74 | #define sk_${type_thing}_zero(st) SKM_sk_zero($type_thing, (st)) | ||
| 75 | #define sk_${type_thing}_push(st, val) SKM_sk_push($type_thing, (st), (val)) | ||
| 76 | #define sk_${type_thing}_unshift(st, val) SKM_sk_unshift($type_thing, (st), (val)) | ||
| 77 | #define sk_${type_thing}_find(st, val) SKM_sk_find($type_thing, (st), (val)) | ||
| 78 | #define sk_${type_thing}_delete(st, i) SKM_sk_delete($type_thing, (st), (i)) | ||
| 79 | #define sk_${type_thing}_delete_ptr(st, ptr) SKM_sk_delete_ptr($type_thing, (st), (ptr)) | ||
| 80 | #define sk_${type_thing}_insert(st, val, i) SKM_sk_insert($type_thing, (st), (val), (i)) | ||
| 81 | #define sk_${type_thing}_set_cmp_func(st, cmp) SKM_sk_set_cmp_func($type_thing, (st), (cmp)) | ||
| 82 | #define sk_${type_thing}_dup(st) SKM_sk_dup($type_thing, st) | ||
| 83 | #define sk_${type_thing}_pop_free(st, free_func) SKM_sk_pop_free($type_thing, (st), (free_func)) | ||
| 84 | #define sk_${type_thing}_shift(st) SKM_sk_shift($type_thing, (st)) | ||
| 85 | #define sk_${type_thing}_pop(st) SKM_sk_pop($type_thing, (st)) | ||
| 86 | #define sk_${type_thing}_sort(st) SKM_sk_sort($type_thing, (st)) | ||
| 87 | EOF | ||
| 88 | } | ||
| 89 | foreach $type_thing (sort @asn1setlst) { | ||
| 90 | $new_stackfile .= <<EOF; | ||
| 91 | |||
| 92 | #define d2i_ASN1_SET_OF_${type_thing}(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\ | ||
| 93 | SKM_ASN1_SET_OF_d2i($type_thing, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | ||
| 94 | #define i2d_ASN1_SET_OF_${type_thing}(st, pp, i2d_func, ex_tag, ex_class, is_set) \\ | ||
| 95 | SKM_ASN1_SET_OF_i2d($type_thing, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | ||
| 96 | #define ASN1_seq_pack_${type_thing}(st, i2d_func, buf, len) \\ | ||
| 97 | SKM_ASN1_seq_pack($type_thing, (st), (i2d_func), (buf), (len)) | ||
| 98 | #define ASN1_seq_unpack_${type_thing}(buf, len, d2i_func, free_func) \\ | ||
| 99 | SKM_ASN1_seq_unpack($type_thing, (buf), (len), (d2i_func), (free_func)) | ||
| 100 | EOF | ||
| 101 | } | ||
| 102 | foreach $type_thing (sort @p12stklst) { | ||
| 103 | $new_stackfile .= <<EOF; | ||
| 104 | |||
| 105 | #define PKCS12_decrypt_d2i_${type_thing}(algor, d2i_func, free_func, pass, passlen, oct, seq) \\ | ||
| 106 | SKM_PKCS12_decrypt_d2i($type_thing, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) | ||
| 107 | EOF | ||
| 108 | } | ||
| 109 | $new_stackfile .= "/* End of util/mkstack.pl block, you may now edit :-) */\n"; | ||
| 110 | $inside_block = 2; | ||
| 111 | } | ||
| 112 | |||
| 113 | |||
| 114 | if ($new_stackfile eq $old_stackfile) { | ||
| 115 | print "No changes to $safestack.h.\n"; | ||
| 116 | exit 0; # avoid unnecessary rebuild | ||
| 117 | } | ||
| 118 | |||
| 119 | if ($do_write) { | ||
| 120 | print "Writing new $safestack.h.\n"; | ||
| 121 | open OUT, ">$safestack.h" || die "Can't open output file"; | ||
| 122 | print OUT $new_stackfile; | ||
| 123 | close OUT; | ||
| 124 | } | ||
diff --git a/src/lib/libssl/src/util/pl/BC-32.pl b/src/lib/libssl/src/util/pl/BC-32.pl index 7f57809a16..20cb3a9c50 100644 --- a/src/lib/libssl/src/util/pl/BC-32.pl +++ b/src/lib/libssl/src/util/pl/BC-32.pl | |||
| @@ -19,7 +19,7 @@ $out_def="out32"; | |||
| 19 | $tmp_def="tmp32"; | 19 | $tmp_def="tmp32"; |
| 20 | $inc_def="inc32"; | 20 | $inc_def="inc32"; |
| 21 | #enable max error messages, disable most common warnings | 21 | #enable max error messages, disable most common warnings |
| 22 | $cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DWINDOWS -DWIN32 -DL_ENDIAN "; | 22 | $cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DWINDOWS -DWIN32 -DL_ENDIAN -DDSO_WIN32 "; |
| 23 | if ($debug) | 23 | if ($debug) |
| 24 | { | 24 | { |
| 25 | $cflags.="-Od -y -v -vi- -D_DEBUG"; | 25 | $cflags.="-Od -y -v -vi- -D_DEBUG"; |
diff --git a/src/lib/libssl/src/util/pl/Mingw32.pl b/src/lib/libssl/src/util/pl/Mingw32.pl index c687d9b118..37f36126f3 100644 --- a/src/lib/libssl/src/util/pl/Mingw32.pl +++ b/src/lib/libssl/src/util/pl/Mingw32.pl | |||
| @@ -17,9 +17,9 @@ $mkdir='gmkdir'; | |||
| 17 | 17 | ||
| 18 | $cc='gcc'; | 18 | $cc='gcc'; |
| 19 | if ($debug) | 19 | if ($debug) |
| 20 | { $cflags="-DL_ENDIAN -g2 -ggdb"; } | 20 | { $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; } |
| 21 | else | 21 | else |
| 22 | { $cflags="-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall"; } | 22 | { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -m486 -Wall"; } |
| 23 | 23 | ||
| 24 | if ($gaswin and !$no_asm) | 24 | if ($gaswin and !$no_asm) |
| 25 | { | 25 | { |
diff --git a/src/lib/libssl/src/util/pl/Mingw32f.pl b/src/lib/libssl/src/util/pl/Mingw32f.pl index a53c537646..44f5673d7a 100644 --- a/src/lib/libssl/src/util/pl/Mingw32f.pl +++ b/src/lib/libssl/src/util/pl/Mingw32f.pl | |||
| @@ -11,9 +11,9 @@ $rm='del'; | |||
| 11 | 11 | ||
| 12 | $cc='gcc'; | 12 | $cc='gcc'; |
| 13 | if ($debug) | 13 | if ($debug) |
| 14 | { $cflags="-g2 -ggdb"; } | 14 | { $cflags="-g2 -ggdb -DDSO_WIN32"; } |
| 15 | else | 15 | else |
| 16 | { $cflags="-O3 -fomit-frame-pointer"; } | 16 | { $cflags="-O3 -fomit-frame-pointer -DDSO_WIN32"; } |
| 17 | 17 | ||
| 18 | $obj='.o'; | 18 | $obj='.o'; |
| 19 | $ofile='-o '; | 19 | $ofile='-o '; |
diff --git a/src/lib/libssl/src/util/pl/VC-32.pl b/src/lib/libssl/src/util/pl/VC-32.pl index 046f0e253c..7c6674b971 100644 --- a/src/lib/libssl/src/util/pl/VC-32.pl +++ b/src/lib/libssl/src/util/pl/VC-32.pl | |||
| @@ -12,7 +12,7 @@ $rm='del'; | |||
| 12 | 12 | ||
| 13 | # C compiler stuff | 13 | # C compiler stuff |
| 14 | $cc='cl'; | 14 | $cc='cl'; |
| 15 | $cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN'; | 15 | $cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32'; |
| 16 | $lflags="/nologo /subsystem:console /machine:I386 /opt:ref"; | 16 | $lflags="/nologo /subsystem:console /machine:I386 /opt:ref"; |
| 17 | $mlflags=''; | 17 | $mlflags=''; |
| 18 | 18 | ||
| @@ -22,7 +22,7 @@ $inc_def="inc32"; | |||
| 22 | 22 | ||
| 23 | if ($debug) | 23 | if ($debug) |
| 24 | { | 24 | { |
| 25 | $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG"; | 25 | $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG -DDSO_WIN32"; |
| 26 | $lflags.=" /debug"; | 26 | $lflags.=" /debug"; |
| 27 | $mlflags.=' /debug'; | 27 | $mlflags.=' /debug'; |
| 28 | } | 28 | } |
| @@ -112,7 +112,8 @@ sub do_lib_rule | |||
| 112 | if (!$shlib) | 112 | if (!$shlib) |
| 113 | { | 113 | { |
| 114 | # $ret.="\t\$(RM) \$(O_$Name)\n"; | 114 | # $ret.="\t\$(RM) \$(O_$Name)\n"; |
| 115 | $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs\n<<\n"; | 115 | $ex =' advapi32.lib'; |
| 116 | $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs $ex\n<<\n"; | ||
| 116 | } | 117 | } |
| 117 | else | 118 | else |
| 118 | { | 119 | { |
diff --git a/src/lib/libssl/src/util/pl/linux.pl b/src/lib/libssl/src/util/pl/linux.pl index a8cfdc578a..8924ed5480 100644 --- a/src/lib/libssl/src/util/pl/linux.pl +++ b/src/lib/libssl/src/util/pl/linux.pl | |||
| @@ -12,6 +12,8 @@ $rm='/bin/rm -f'; | |||
| 12 | $cc='gcc'; | 12 | $cc='gcc'; |
| 13 | if ($debug) | 13 | if ($debug) |
| 14 | { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; } | 14 | { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; } |
| 15 | elsif ($profile) | ||
| 16 | { $cflags="-pg -O3"; } | ||
| 15 | else | 17 | else |
| 16 | { $cflags="-O3 -fomit-frame-pointer"; } | 18 | { $cflags="-O3 -fomit-frame-pointer"; } |
| 17 | 19 | ||
| @@ -19,6 +21,8 @@ if (!$no_asm) | |||
| 19 | { | 21 | { |
| 20 | $bn_asm_obj='$(OBJ_D)/bn86-elf.o'; | 22 | $bn_asm_obj='$(OBJ_D)/bn86-elf.o'; |
| 21 | $bn_asm_src='crypto/bn/asm/bn86unix.cpp'; | 23 | $bn_asm_src='crypto/bn/asm/bn86unix.cpp'; |
| 24 | $bnco_asm_obj='$(OBJ_D)/co86-elf.o'; | ||
| 25 | $bnco_asm_src='crypto/bn/asm/co86unix.cpp'; | ||
| 22 | $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; | 26 | $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; |
| 23 | $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; | 27 | $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; |
| 24 | $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; | 28 | $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; |
diff --git a/src/lib/libssl/src/util/selftest.pl b/src/lib/libssl/src/util/selftest.pl index 04b4425d7e..eb50d52ff8 100644 --- a/src/lib/libssl/src/util/selftest.pl +++ b/src/lib/libssl/src/util/selftest.pl | |||
| @@ -19,6 +19,7 @@ my $ok=0; | |||
| 19 | my $cc="cc"; | 19 | my $cc="cc"; |
| 20 | my $cversion="??"; | 20 | my $cversion="??"; |
| 21 | my $sep="-----------------------------------------------------------------------------\n"; | 21 | my $sep="-----------------------------------------------------------------------------\n"; |
| 22 | my $not_our_fault="\nPlease ask your system administrator/vendor for more information.\n[Problems with your operating system setup should not be reported\nto the OpenSSL project.]\n"; | ||
| 22 | 23 | ||
| 23 | open(OUT,">$report") or die; | 24 | open(OUT,">$report") or die; |
| 24 | 25 | ||
| @@ -76,16 +77,18 @@ print OUT "\n"; | |||
| 76 | 77 | ||
| 77 | print "Checking compiler...\n"; | 78 | print "Checking compiler...\n"; |
| 78 | if (open(TEST,">cctest.c")) { | 79 | if (open(TEST,">cctest.c")) { |
| 79 | print TEST "#include <stdio.h>\nmain(){printf(\"Hello world\\n\");}\n"; | 80 | print TEST "#include <stdio.h>\n#include <errno.h>\nmain(){printf(\"Hello world\\n\");}\n"; |
| 80 | close(TEST); | 81 | close(TEST); |
| 81 | system("$cc -o cctest cctest.c"); | 82 | system("$cc -o cctest cctest.c"); |
| 82 | if (`./cctest` !~ /Hello world/) { | 83 | if (`./cctest` !~ /Hello world/) { |
| 83 | print OUT "Compiler doesn't work.\n"; | 84 | print OUT "Compiler doesn't work.\n"; |
| 85 | print OUT $not_our_fault; | ||
| 84 | goto err; | 86 | goto err; |
| 85 | } | 87 | } |
| 86 | system("ar r cctest.a /dev/null"); | 88 | system("ar r cctest.a /dev/null"); |
| 87 | if (not -f "cctest.a") { | 89 | if (not -f "cctest.a") { |
| 88 | print OUT "Check your archive tool (ar).\n"; | 90 | print OUT "Check your archive tool (ar).\n"; |
| 91 | print OUT $not_our_fault; | ||
| 89 | goto err; | 92 | goto err; |
| 90 | } | 93 | } |
| 91 | } else { | 94 | } else { |
| @@ -102,6 +105,7 @@ if (open(TEST,">cctest.c")) { | |||
| 102 | } else { | 105 | } else { |
| 103 | print OUT "Can't compile test program!\n"; | 106 | print OUT "Can't compile test program!\n"; |
| 104 | } | 107 | } |
| 108 | print OUT $not_our_fault; | ||
| 105 | goto err; | 109 | goto err; |
| 106 | } | 110 | } |
| 107 | } else { | 111 | } else { |
| @@ -133,6 +137,13 @@ if (/no-/) | |||
| 133 | goto err; | 137 | goto err; |
| 134 | } | 138 | } |
| 135 | 139 | ||
| 140 | if (`echo 4+1 | bc` != 5) | ||
| 141 | { | ||
| 142 | print OUT "Can't run bc! Test skipped.\n"; | ||
| 143 | print OUT $not_our_fault; | ||
| 144 | goto err; | ||
| 145 | } | ||
| 146 | |||
| 136 | print "Running make test...\n"; | 147 | print "Running make test...\n"; |
| 137 | if (system("make test 2>&1 | tee maketest.log") > 255) | 148 | if (system("make test 2>&1 | tee maketest.log") > 255) |
| 138 | { | 149 | { |
diff --git a/src/lib/libssl/src/util/sp-diff.pl b/src/lib/libssl/src/util/sp-diff.pl index f81e50201b..9d6c60387f 100644 --- a/src/lib/libssl/src/util/sp-diff.pl +++ b/src/lib/libssl/src/util/sp-diff.pl | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | %two=&loadfile($ARGV[1]); | 11 | %two=&loadfile($ARGV[1]); |
| 12 | 12 | ||
| 13 | $line=0; | 13 | $line=0; |
| 14 | foreach $a ("md2","md5","sha","sha1","rc4","des cfb","des cbc","des ede3", | 14 | foreach $a ("md2","md4","md5","sha","sha1","rc4","des cfb","des cbc","des ede3", |
| 15 | "idea cfb","idea cbc","rc2 cfb","rc2 cbc","blowfish cbc","cast cbc") | 15 | "idea cfb","idea cbc","rc2 cfb","rc2 cbc","blowfish cbc","cast cbc") |
| 16 | { | 16 | { |
| 17 | if (defined($one{$a,8}) && defined($two{$a,8})) | 17 | if (defined($one{$a,8}) && defined($two{$a,8})) |
diff --git a/src/lib/libssl/src/util/ssleay.num b/src/lib/libssl/src/util/ssleay.num index 32b2e960c4..561bac2ec9 100644 --- a/src/lib/libssl/src/util/ssleay.num +++ b/src/lib/libssl/src/util/ssleay.num | |||
| @@ -1,227 +1,195 @@ | |||
| 1 | ERR_load_SSL_strings 1 | 1 | ERR_load_SSL_strings 1 EXIST::FUNCTION: |
| 2 | SSL_CIPHER_description 2 | 2 | SSL_CIPHER_description 2 EXIST::FUNCTION: |
| 3 | SSL_CTX_add_client_CA 3 | 3 | SSL_CTX_add_client_CA 3 EXIST::FUNCTION: |
| 4 | SSL_CTX_add_session 4 | 4 | SSL_CTX_add_session 4 EXIST::FUNCTION: |
| 5 | SSL_CTX_check_private_key 5 | 5 | SSL_CTX_check_private_key 5 EXIST::FUNCTION: |
| 6 | SSL_CTX_ctrl 6 | 6 | SSL_CTX_ctrl 6 EXIST::FUNCTION: |
| 7 | SSL_CTX_flush_sessions 7 | 7 | SSL_CTX_flush_sessions 7 EXIST::FUNCTION: |
| 8 | SSL_CTX_free 8 | 8 | SSL_CTX_free 8 EXIST::FUNCTION: |
| 9 | SSL_CTX_get_client_CA_list 9 | 9 | SSL_CTX_get_client_CA_list 9 EXIST::FUNCTION: |
| 10 | SSL_CTX_get_verify_callback 10 | 10 | SSL_CTX_get_verify_callback 10 EXIST::FUNCTION: |
| 11 | SSL_CTX_get_verify_mode 11 | 11 | SSL_CTX_get_verify_mode 11 EXIST::FUNCTION: |
| 12 | SSL_CTX_new 12 | 12 | SSL_CTX_new 12 EXIST::FUNCTION: |
| 13 | SSL_CTX_remove_session 13 | 13 | SSL_CTX_remove_session 13 EXIST::FUNCTION: |
| 14 | SSL_CTX_set_cert_verify_cb 14 | 14 | SSL_CTX_set_cipher_list 15 EXIST::FUNCTION: |
| 15 | SSL_CTX_set_cipher_list 15 | 15 | SSL_CTX_set_client_CA_list 16 EXIST::FUNCTION: |
| 16 | SSL_CTX_set_client_CA_list 16 | 16 | SSL_CTX_set_default_passwd_cb 17 EXIST::FUNCTION: |
| 17 | SSL_CTX_set_default_passwd_cb 17 | 17 | SSL_CTX_set_ssl_version 19 EXIST::FUNCTION: |
| 18 | SSL_CTX_set_ssl_version 19 | 18 | SSL_CTX_set_verify 21 EXIST::FUNCTION: |
| 19 | SSL_CTX_set_verify 21 | 19 | SSL_CTX_use_PrivateKey 22 EXIST::FUNCTION: |
| 20 | SSL_CTX_use_PrivateKey 22 | 20 | SSL_CTX_use_PrivateKey_ASN1 23 EXIST::FUNCTION: |
| 21 | SSL_CTX_use_PrivateKey_ASN1 23 | 21 | SSL_CTX_use_PrivateKey_file 24 EXIST::FUNCTION: |
| 22 | SSL_CTX_use_PrivateKey_file 24 | 22 | SSL_CTX_use_RSAPrivateKey 25 EXIST::FUNCTION:RSA |
| 23 | SSL_CTX_use_RSAPrivateKey 25 | 23 | SSL_CTX_use_RSAPrivateKey_ASN1 26 EXIST::FUNCTION:RSA |
| 24 | SSL_CTX_use_RSAPrivateKey_ASN1 26 | 24 | SSL_CTX_use_RSAPrivateKey_file 27 EXIST::FUNCTION:RSA |
| 25 | SSL_CTX_use_RSAPrivateKey_file 27 | 25 | SSL_CTX_use_certificate 28 EXIST::FUNCTION: |
| 26 | SSL_CTX_use_certificate 28 | 26 | SSL_CTX_use_certificate_ASN1 29 EXIST::FUNCTION: |
| 27 | SSL_CTX_use_certificate_ASN1 29 | 27 | SSL_CTX_use_certificate_file 30 EXIST::FUNCTION: |
| 28 | SSL_CTX_use_certificate_file 30 | 28 | SSL_SESSION_free 31 EXIST::FUNCTION: |
| 29 | SSL_SESSION_free 31 | 29 | SSL_SESSION_new 32 EXIST::FUNCTION: |
| 30 | SSL_SESSION_new 32 | 30 | SSL_SESSION_print 33 EXIST::FUNCTION: |
| 31 | SSL_SESSION_print 33 | 31 | SSL_SESSION_print_fp 34 EXIST::FUNCTION:FP_API |
| 32 | SSL_SESSION_print_fp 34 | 32 | SSL_accept 35 EXIST::FUNCTION: |
| 33 | SSL_accept 35 | 33 | SSL_add_client_CA 36 EXIST::FUNCTION: |
| 34 | SSL_add_client_CA 36 | 34 | SSL_alert_desc_string 37 EXIST::FUNCTION: |
| 35 | SSL_alert_desc_string 37 | 35 | SSL_alert_desc_string_long 38 EXIST::FUNCTION: |
| 36 | SSL_alert_desc_string_long 38 | 36 | SSL_alert_type_string 39 EXIST::FUNCTION: |
| 37 | SSL_alert_type_string 39 | 37 | SSL_alert_type_string_long 40 EXIST::FUNCTION: |
| 38 | SSL_alert_type_string_long 40 | 38 | SSL_check_private_key 41 EXIST::FUNCTION: |
| 39 | SSL_check_private_key 41 | 39 | SSL_clear 42 EXIST::FUNCTION: |
| 40 | SSL_clear 42 | 40 | SSL_connect 43 EXIST::FUNCTION: |
| 41 | SSL_connect 43 | 41 | SSL_copy_session_id 44 EXIST::FUNCTION: |
| 42 | SSL_copy_session_id 44 | 42 | SSL_ctrl 45 EXIST::FUNCTION: |
| 43 | SSL_ctrl 45 | 43 | SSL_dup 46 EXIST::FUNCTION: |
| 44 | SSL_dup 46 | 44 | SSL_dup_CA_list 47 EXIST::FUNCTION: |
| 45 | SSL_dup_CA_list 47 | 45 | SSL_free 48 EXIST::FUNCTION: |
| 46 | SSL_free 48 | 46 | SSL_get_certificate 49 EXIST::FUNCTION: |
| 47 | SSL_get_certificate 49 | 47 | SSL_get_cipher_list 52 EXIST::FUNCTION: |
| 48 | SSL_get_cipher_list 52 | 48 | SSL_get_ciphers 55 EXIST::FUNCTION: |
| 49 | SSL_get_ciphers 55 | 49 | SSL_get_client_CA_list 56 EXIST::FUNCTION: |
| 50 | SSL_get_client_CA_list 56 | 50 | SSL_get_default_timeout 57 EXIST::FUNCTION: |
| 51 | SSL_get_default_timeout 57 | 51 | SSL_get_error 58 EXIST::FUNCTION: |
| 52 | SSL_get_error 58 | 52 | SSL_get_fd 59 EXIST::FUNCTION: |
| 53 | SSL_get_fd 59 | 53 | SSL_get_peer_cert_chain 60 EXIST::FUNCTION: |
| 54 | SSL_get_peer_cert_chain 60 | 54 | SSL_get_peer_certificate 61 EXIST::FUNCTION: |
| 55 | SSL_get_peer_certificate 61 | 55 | SSL_get_rbio 63 EXIST::FUNCTION: |
| 56 | SSL_get_rbio 63 | 56 | SSL_get_read_ahead 64 EXIST::FUNCTION: |
| 57 | SSL_get_read_ahead 64 | 57 | SSL_get_shared_ciphers 65 EXIST::FUNCTION: |
| 58 | SSL_get_shared_ciphers 65 | 58 | SSL_get_ssl_method 66 EXIST::FUNCTION: |
| 59 | SSL_get_ssl_method 66 | 59 | SSL_get_verify_callback 69 EXIST::FUNCTION: |
| 60 | SSL_get_verify_callback 69 | 60 | SSL_get_verify_mode 70 EXIST::FUNCTION: |
| 61 | SSL_get_verify_mode 70 | 61 | SSL_get_version 71 EXIST::FUNCTION: |
| 62 | SSL_get_version 71 | 62 | SSL_get_wbio 72 EXIST::FUNCTION: |
| 63 | SSL_get_wbio 72 | 63 | SSL_load_client_CA_file 73 EXIST::FUNCTION: |
| 64 | SSL_load_client_CA_file 73 | 64 | SSL_load_error_strings 74 EXIST::FUNCTION: |
| 65 | SSL_load_error_strings 74 | 65 | SSL_new 75 EXIST::FUNCTION: |
| 66 | SSL_new 75 | 66 | SSL_peek 76 EXIST::FUNCTION: |
| 67 | SSL_peek 76 | 67 | SSL_pending 77 EXIST::FUNCTION: |
| 68 | SSL_pending 77 | 68 | SSL_read 78 EXIST::FUNCTION: |
| 69 | SSL_read 78 | 69 | SSL_renegotiate 79 EXIST::FUNCTION: |
| 70 | SSL_renegotiate 79 | 70 | SSL_rstate_string 80 EXIST::FUNCTION: |
| 71 | SSL_rstate_string 80 | 71 | SSL_rstate_string_long 81 EXIST::FUNCTION: |
| 72 | SSL_rstate_string_long 81 | 72 | SSL_set_accept_state 82 EXIST::FUNCTION: |
| 73 | SSL_set_accept_state 82 | 73 | SSL_set_bio 83 EXIST::FUNCTION: |
| 74 | SSL_set_bio 83 | 74 | SSL_set_cipher_list 84 EXIST::FUNCTION: |
| 75 | SSL_set_cipher_list 84 | 75 | SSL_set_client_CA_list 85 EXIST::FUNCTION: |
| 76 | SSL_set_client_CA_list 85 | 76 | SSL_set_connect_state 86 EXIST::FUNCTION: |
| 77 | SSL_set_connect_state 86 | 77 | SSL_set_fd 87 EXIST::FUNCTION: |
| 78 | SSL_set_fd 87 | 78 | SSL_set_read_ahead 88 EXIST::FUNCTION: |
| 79 | SSL_set_read_ahead 88 | 79 | SSL_set_rfd 89 EXIST::FUNCTION: |
| 80 | SSL_set_rfd 89 | 80 | SSL_set_session 90 EXIST::FUNCTION: |
| 81 | SSL_set_session 90 | 81 | SSL_set_ssl_method 91 EXIST::FUNCTION: |
| 82 | SSL_set_ssl_method 91 | 82 | SSL_set_verify 94 EXIST::FUNCTION: |
| 83 | SSL_set_verify 94 | 83 | SSL_set_wfd 95 EXIST::FUNCTION: |
| 84 | SSL_set_wfd 95 | 84 | SSL_shutdown 96 EXIST::FUNCTION: |
| 85 | SSL_shutdown 96 | 85 | SSL_state_string 97 EXIST::FUNCTION: |
| 86 | SSL_state_string 97 | 86 | SSL_state_string_long 98 EXIST::FUNCTION: |
| 87 | SSL_state_string_long 98 | 87 | SSL_use_PrivateKey 99 EXIST::FUNCTION: |
| 88 | SSL_use_PrivateKey 99 | 88 | SSL_use_PrivateKey_ASN1 100 EXIST::FUNCTION: |
| 89 | SSL_use_PrivateKey_ASN1 100 | 89 | SSL_use_PrivateKey_file 101 EXIST::FUNCTION: |
| 90 | SSL_use_PrivateKey_file 101 | 90 | SSL_use_RSAPrivateKey 102 EXIST::FUNCTION:RSA |
| 91 | SSL_use_RSAPrivateKey 102 | 91 | SSL_use_RSAPrivateKey_ASN1 103 EXIST::FUNCTION:RSA |
| 92 | SSL_use_RSAPrivateKey_ASN1 103 | 92 | SSL_use_RSAPrivateKey_file 104 EXIST::FUNCTION:RSA |
| 93 | SSL_use_RSAPrivateKey_file 104 | 93 | SSL_use_certificate 105 EXIST::FUNCTION: |
| 94 | SSL_use_certificate 105 | 94 | SSL_use_certificate_ASN1 106 EXIST::FUNCTION: |
| 95 | SSL_use_certificate_ASN1 106 | 95 | SSL_use_certificate_file 107 EXIST::FUNCTION: |
| 96 | SSL_use_certificate_file 107 | 96 | SSL_write 108 EXIST::FUNCTION: |
| 97 | SSL_write 108 | 97 | SSLeay_add_ssl_algorithms 109 NOEXIST::FUNCTION: |
| 98 | SSLeay_add_ssl_algorithms 109 | 98 | SSLv23_client_method 110 EXIST::FUNCTION:RSA |
| 99 | SSLv23_client_method 110 | 99 | SSLv23_method 111 EXIST::FUNCTION:RSA |
| 100 | SSLv23_method 111 | 100 | SSLv23_server_method 112 EXIST::FUNCTION:RSA |
| 101 | SSLv23_server_method 112 | 101 | SSLv2_client_method 113 EXIST::FUNCTION:RSA |
| 102 | SSLv2_client_method 113 | 102 | SSLv2_method 114 EXIST::FUNCTION:RSA |
| 103 | SSLv2_method 114 | 103 | SSLv2_server_method 115 EXIST::FUNCTION:RSA |
| 104 | SSLv2_server_method 115 | 104 | SSLv3_client_method 116 EXIST::FUNCTION: |
| 105 | SSLv3_client_method 116 | 105 | SSLv3_method 117 EXIST::FUNCTION: |
| 106 | SSLv3_method 117 | 106 | SSLv3_server_method 118 EXIST::FUNCTION: |
| 107 | SSLv3_server_method 118 | 107 | d2i_SSL_SESSION 119 EXIST::FUNCTION: |
| 108 | d2i_SSL_SESSION 119 | 108 | i2d_SSL_SESSION 120 EXIST::FUNCTION: |
| 109 | i2d_SSL_SESSION 120 | 109 | BIO_f_ssl 121 EXIST::FUNCTION: |
| 110 | BIO_f_ssl 121 | 110 | BIO_new_ssl 122 EXIST::FUNCTION: |
| 111 | BIO_new_ssl 122 | 111 | BIO_proxy_ssl_copy_session_id 123 NOEXIST::FUNCTION: |
| 112 | BIO_proxy_ssl_copy_session_id 123 | 112 | BIO_ssl_copy_session_id 124 EXIST::FUNCTION: |
| 113 | BIO_ssl_copy_session_id 124 | 113 | SSL_do_handshake 125 EXIST::FUNCTION: |
| 114 | SSL_do_handshake 125 | 114 | SSL_get_privatekey 126 EXIST::FUNCTION: |
| 115 | SSL_get_privatekey 126 | 115 | SSL_get_current_cipher 127 EXIST::FUNCTION: |
| 116 | SSL_get_current_cipher 127 | 116 | SSL_CIPHER_get_bits 128 EXIST::FUNCTION: |
| 117 | SSL_CIPHER_get_bits 128 | 117 | SSL_CIPHER_get_version 129 EXIST::FUNCTION: |
| 118 | SSL_CIPHER_get_version 129 | 118 | SSL_CIPHER_get_name 130 EXIST::FUNCTION: |
| 119 | SSL_CIPHER_get_name 130 | 119 | BIO_ssl_shutdown 131 EXIST::FUNCTION: |
| 120 | BIO_ssl_shutdown 131 | 120 | SSL_SESSION_cmp 132 EXIST::FUNCTION: |
| 121 | SSL_SESSION_cmp 132 | 121 | SSL_SESSION_hash 133 EXIST::FUNCTION: |
| 122 | SSL_SESSION_hash 133 | 122 | SSL_SESSION_get_time 134 EXIST::FUNCTION: |
| 123 | SSL_SESSION_get_time 134 | 123 | SSL_SESSION_set_time 135 EXIST::FUNCTION: |
| 124 | SSL_SESSION_set_time 135 | 124 | SSL_SESSION_get_timeout 136 EXIST::FUNCTION: |
| 125 | SSL_SESSION_get_timeout 136 | 125 | SSL_SESSION_set_timeout 137 EXIST::FUNCTION: |
| 126 | SSL_SESSION_set_timeout 137 | 126 | SSL_CTX_get_ex_data 138 EXIST::FUNCTION: |
| 127 | SSL_CTX_get_ex_data 138 | 127 | SSL_CTX_get_quiet_shutdown 140 EXIST::FUNCTION: |
| 128 | SSL_CTX_get_quiet_shutdown 140 | 128 | SSL_CTX_load_verify_locations 141 EXIST::FUNCTION: |
| 129 | SSL_CTX_load_verify_locations 141 | 129 | SSL_CTX_set_default_verify_paths 142 EXIST:!VMS:FUNCTION: |
| 130 | SSL_CTX_set_default_verify_paths 142 | 130 | SSL_CTX_set_def_verify_paths 142 EXIST:VMS:FUNCTION: |
| 131 | SSL_CTX_set_ex_data 143 | 131 | SSL_CTX_set_ex_data 143 EXIST::FUNCTION: |
| 132 | SSL_CTX_set_quiet_shutdown 145 | 132 | SSL_CTX_set_quiet_shutdown 145 EXIST::FUNCTION: |
| 133 | SSL_SESSION_get_ex_data 146 | 133 | SSL_SESSION_get_ex_data 146 EXIST::FUNCTION: |
| 134 | SSL_SESSION_set_ex_data 148 | 134 | SSL_SESSION_set_ex_data 148 EXIST::FUNCTION: |
| 135 | SSL_get_SSL_CTX 150 | 135 | SSL_get_SSL_CTX 150 EXIST::FUNCTION: |
| 136 | SSL_get_ex_data 151 | 136 | SSL_get_ex_data 151 EXIST::FUNCTION: |
| 137 | SSL_get_quiet_shutdown 153 | 137 | SSL_get_quiet_shutdown 153 EXIST::FUNCTION: |
| 138 | SSL_get_session 154 | 138 | SSL_get_session 154 EXIST::FUNCTION: |
| 139 | SSL_get_shutdown 155 | 139 | SSL_get_shutdown 155 EXIST::FUNCTION: |
| 140 | SSL_get_verify_result 157 | 140 | SSL_get_verify_result 157 EXIST::FUNCTION: |
| 141 | SSL_set_ex_data 158 | 141 | SSL_set_ex_data 158 EXIST::FUNCTION: |
| 142 | SSL_set_info_callback 160 | 142 | SSL_set_info_callback 160 EXIST::FUNCTION: |
| 143 | SSL_set_quiet_shutdown 161 | 143 | SSL_set_quiet_shutdown 161 EXIST::FUNCTION: |
| 144 | SSL_set_shutdown 162 | 144 | SSL_set_shutdown 162 EXIST::FUNCTION: |
| 145 | SSL_set_verify_result 163 | 145 | SSL_set_verify_result 163 EXIST::FUNCTION: |
| 146 | SSL_version 164 | 146 | SSL_version 164 EXIST::FUNCTION: |
| 147 | SSL_get_info_callback 165 | 147 | SSL_get_info_callback 165 EXIST::FUNCTION: |
| 148 | SSL_state 166 | 148 | SSL_state 166 EXIST::FUNCTION: |
| 149 | SSL_CTX_get_ex_new_index 167 | 149 | SSL_CTX_get_ex_new_index 167 EXIST::FUNCTION: |
| 150 | SSL_SESSION_get_ex_new_index 168 | 150 | SSL_SESSION_get_ex_new_index 168 EXIST::FUNCTION: |
| 151 | SSL_get_ex_new_index 169 | 151 | SSL_get_ex_new_index 169 EXIST::FUNCTION: |
| 152 | TLSv1_method 170 | 152 | TLSv1_method 170 EXIST::FUNCTION: |
| 153 | TLSv1_server_method 171 | 153 | TLSv1_server_method 171 EXIST::FUNCTION: |
| 154 | TLSv1_client_method 172 | 154 | TLSv1_client_method 172 EXIST::FUNCTION: |
| 155 | BIO_new_buffer_ssl_connect 173 | 155 | BIO_new_buffer_ssl_connect 173 EXIST::FUNCTION: |
| 156 | BIO_new_ssl_connect 174 | 156 | BIO_new_ssl_connect 174 EXIST::FUNCTION: |
| 157 | SSL_get_ex_data_X509_STORE_CTX_idx 175 | 157 | SSL_get_ex_data_X509_STORE_CTX_idx 175 EXIST:!VMS:FUNCTION: |
| 158 | SSL_CTX_set_tmp_dh_callback 176 | 158 | SSL_get_ex_d_X509_STORE_CTX_idx 175 EXIST:VMS:FUNCTION: |
| 159 | SSL_CTX_set_tmp_rsa_callback 177 | 159 | SSL_CTX_set_tmp_dh_callback 176 EXIST::FUNCTION:DH |
| 160 | SSL_CTX_set_timeout 178 | 160 | SSL_CTX_set_tmp_rsa_callback 177 EXIST::FUNCTION:RSA |
| 161 | SSL_CTX_get_timeout 179 | 161 | SSL_CTX_set_timeout 178 EXIST::FUNCTION: |
| 162 | SSL_CTX_get_cert_store 180 | 162 | SSL_CTX_get_timeout 179 EXIST::FUNCTION: |
| 163 | SSL_CTX_set_cert_store 181 | 163 | SSL_CTX_get_cert_store 180 EXIST::FUNCTION: |
| 164 | SSL_want 182 | 164 | SSL_CTX_set_cert_store 181 EXIST::FUNCTION: |
| 165 | SSL_library_init 183 | 165 | SSL_want 182 EXIST::FUNCTION: |
| 166 | SSL_COMP_add_compression_method 184 | 166 | SSL_library_init 183 EXIST::FUNCTION: |
| 167 | SSL_add_file_cert_subjects_to_stack 185 | 167 | SSL_COMP_add_compression_method 184 EXIST::FUNCTION: |
| 168 | SSL_set_tmp_rsa_callback 186 | 168 | SSL_add_file_cert_subjects_to_stack 185 EXIST:!VMS:FUNCTION: |
| 169 | SSL_set_tmp_dh_callback 187 | 169 | SSL_add_file_cert_subjs_to_stk 185 EXIST:VMS:FUNCTION: |
| 170 | SSL_add_dir_cert_subjects_to_stack 188 | 170 | SSL_set_tmp_rsa_callback 186 EXIST::FUNCTION:RSA |
| 171 | SSL_set_session_id_context 189 | 171 | SSL_set_tmp_dh_callback 187 EXIST::FUNCTION:DH |
| 172 | sk_SSL_CIPHER_new 190 | 172 | SSL_add_dir_cert_subjects_to_stack 188 NOEXIST::FUNCTION: |
| 173 | sk_SSL_CIPHER_new_null 191 | 173 | SSL_add_dir_cert_subjs_to_stk 188 EXIST:VMS:FUNCTION: |
| 174 | sk_SSL_CIPHER_free 192 | 174 | SSL_set_session_id_context 189 EXIST::FUNCTION: |
| 175 | sk_SSL_CIPHER_num 193 | 175 | SSL_CTX_use_certificate_chain_file 222 EXIST:!VMS:FUNCTION: |
| 176 | sk_SSL_CIPHER_value 194 | 176 | SSL_CTX_use_cert_chain_file 222 EXIST:VMS:FUNCTION: |
| 177 | sk_SSL_CIPHER_set 195 | 177 | SSL_CTX_set_verify_depth 225 EXIST::FUNCTION: |
| 178 | sk_SSL_CIPHER_zero 196 | 178 | SSL_set_verify_depth 226 EXIST::FUNCTION: |
| 179 | sk_SSL_CIPHER_push 197 | 179 | SSL_CTX_get_verify_depth 228 EXIST::FUNCTION: |
| 180 | sk_SSL_CIPHER_pop 198 | 180 | SSL_get_verify_depth 229 EXIST::FUNCTION: |
| 181 | sk_SSL_CIPHER_find 199 | 181 | SSL_CTX_set_session_id_context 231 EXIST::FUNCTION: |
| 182 | sk_SSL_CIPHER_delete 200 | 182 | SSL_CTX_set_cert_verify_callback 232 EXIST:!VMS:FUNCTION: |
| 183 | sk_SSL_CIPHER_delete_ptr 201 | 183 | SSL_CTX_set_cert_verify_cb 232 EXIST:VMS:FUNCTION: |
| 184 | sk_SSL_CIPHER_set_cmp_func 202 | 184 | SSL_CTX_set_default_passwd_cb_userdata 235 EXIST:!VMS:FUNCTION: |
| 185 | sk_SSL_CIPHER_dup 203 | 185 | SSL_CTX_set_def_passwd_cb_ud 235 EXIST:VMS:FUNCTION: |
| 186 | sk_SSL_CIPHER_pop_free 204 | 186 | SSL_set_purpose 236 EXIST::FUNCTION: |
| 187 | sk_SSL_CIPHER_shift 205 | 187 | SSL_CTX_set_trust 237 EXIST::FUNCTION: |
| 188 | sk_SSL_COMP_new 206 | 188 | SSL_CTX_set_purpose 238 EXIST::FUNCTION: |
| 189 | sk_SSL_COMP_new_null 207 | 189 | SSL_set_trust 239 EXIST::FUNCTION: |
| 190 | sk_SSL_COMP_free 208 | 190 | SSL_get_finished 240 EXIST::FUNCTION: |
| 191 | sk_SSL_COMP_num 209 | 191 | SSL_get_peer_finished 241 EXIST::FUNCTION: |
| 192 | sk_SSL_COMP_value 210 | 192 | SSL_get1_session 242 EXIST::FUNCTION: |
| 193 | sk_SSL_COMP_set 211 | 193 | SSL_CTX_callback_ctrl 243 EXIST::FUNCTION: |
| 194 | sk_SSL_COMP_zero 212 | 194 | SSL_callback_ctrl 244 EXIST::FUNCTION: |
| 195 | sk_SSL_COMP_push 213 | 195 | SSL_CTX_sessions 245 EXIST::FUNCTION: |
| 196 | sk_SSL_COMP_pop 214 | ||
| 197 | sk_SSL_COMP_find 215 | ||
| 198 | sk_SSL_COMP_delete 216 | ||
| 199 | sk_SSL_COMP_delete_ptr 217 | ||
| 200 | sk_SSL_COMP_set_cmp_func 218 | ||
| 201 | sk_SSL_COMP_dup 219 | ||
| 202 | sk_SSL_COMP_pop_free 220 | ||
| 203 | sk_SSL_COMP_shift 221 | ||
| 204 | SSL_CTX_use_certificate_chain_file 222 | ||
| 205 | sk_SSL_COMP_insert 223 | ||
| 206 | sk_SSL_CIPHER_insert 224 | ||
| 207 | SSL_CTX_set_verify_depth 225 | ||
| 208 | SSL_set_verify_depth 226 | ||
| 209 | sk_SSL_CIPHER_unshift 227 | ||
| 210 | SSL_CTX_get_verify_depth 228 | ||
| 211 | SSL_get_verify_depth 229 | ||
| 212 | sk_SSL_COMP_unshift 230 | ||
| 213 | SSL_CTX_set_session_id_context 231 | ||
| 214 | SSL_CTX_set_cert_verify_callback 232 | ||
| 215 | sk_SSL_COMP_sort 233 | ||
| 216 | sk_SSL_CIPHER_sort 234 | ||
| 217 | SSL_CTX_set_default_passwd_cb_userdata 235 | ||
| 218 | SSL_set_purpose 236 | ||
| 219 | SSL_CTX_set_trust 237 | ||
| 220 | SSL_CTX_set_purpose 238 | ||
| 221 | SSL_set_trust 239 | ||
| 222 | SSL_get_finished 240 | ||
| 223 | SSL_get_peer_finished 241 | ||
| 224 | SSL_get1_session 242 | ||
| 225 | SSL_CTX_callback_ctrl 243 | ||
| 226 | SSL_callback_ctrl 244 | ||
| 227 | SSL_CTX_sessions 245 | ||
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index bb846f491c..fdbdc70ba7 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
| @@ -59,12 +59,21 @@ | |||
| 59 | #ifndef HEADER_SSL_H | 59 | #ifndef HEADER_SSL_H |
| 60 | #define HEADER_SSL_H | 60 | #define HEADER_SSL_H |
| 61 | 61 | ||
| 62 | #ifndef NO_COMP | ||
| 63 | #include <openssl/comp.h> | ||
| 64 | #endif | ||
| 65 | #ifndef NO_BIO | ||
| 66 | #include <openssl/bio.h> | ||
| 67 | #endif | ||
| 68 | #ifndef NO_X509 | ||
| 69 | #include <openssl/x509.h> | ||
| 70 | #endif | ||
| 71 | #include <openssl/safestack.h> | ||
| 72 | |||
| 62 | #ifdef __cplusplus | 73 | #ifdef __cplusplus |
| 63 | extern "C" { | 74 | extern "C" { |
| 64 | #endif | 75 | #endif |
| 65 | 76 | ||
| 66 | #include <openssl/safestack.h> | ||
| 67 | |||
| 68 | /* SSLeay version number for ASN.1 encoding of the session information */ | 77 | /* SSLeay version number for ASN.1 encoding of the session information */ |
| 69 | /* Version 0 - initial version | 78 | /* Version 0 - initial version |
| 70 | * Version 1 - added the optional peer certificate | 79 | * Version 1 - added the optional peer certificate |
| @@ -140,6 +149,10 @@ extern "C" { | |||
| 140 | #define SSL_SENT_SHUTDOWN 1 | 149 | #define SSL_SENT_SHUTDOWN 1 |
| 141 | #define SSL_RECEIVED_SHUTDOWN 2 | 150 | #define SSL_RECEIVED_SHUTDOWN 2 |
| 142 | 151 | ||
| 152 | #ifdef __cplusplus | ||
| 153 | } | ||
| 154 | #endif | ||
| 155 | |||
| 143 | #include <openssl/crypto.h> | 156 | #include <openssl/crypto.h> |
| 144 | #include <openssl/lhash.h> | 157 | #include <openssl/lhash.h> |
| 145 | #include <openssl/buffer.h> | 158 | #include <openssl/buffer.h> |
| @@ -147,6 +160,10 @@ extern "C" { | |||
| 147 | #include <openssl/pem.h> | 160 | #include <openssl/pem.h> |
| 148 | #include <openssl/x509.h> | 161 | #include <openssl/x509.h> |
| 149 | 162 | ||
| 163 | #ifdef __cplusplus | ||
| 164 | extern "C" { | ||
| 165 | #endif | ||
| 166 | |||
| 150 | #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2) | 167 | #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2) |
| 151 | #define NO_SSL2 | 168 | #define NO_SSL2 |
| 152 | #endif | 169 | #endif |
| @@ -318,6 +335,9 @@ typedef struct ssl_session_st | |||
| 318 | * the misconception that non-blocking SSL_write() behaves like | 335 | * the misconception that non-blocking SSL_write() behaves like |
| 319 | * non-blocking write(): */ | 336 | * non-blocking write(): */ |
| 320 | #define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L | 337 | #define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L |
| 338 | /* Never bother the application with retries if the transport | ||
| 339 | * is blocking: */ | ||
| 340 | #define SSL_MODE_AUTO_RETRY 0x00000004L | ||
| 321 | 341 | ||
| 322 | /* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, | 342 | /* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, |
| 323 | * they cannot be used to clear bits. */ | 343 | * they cannot be used to clear bits. */ |
| @@ -343,15 +363,15 @@ typedef struct ssl_session_st | |||
| 343 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) | 363 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) |
| 344 | 364 | ||
| 345 | typedef struct ssl_comp_st | 365 | typedef struct ssl_comp_st |
| 346 | { | 366 | { |
| 347 | int id; | 367 | int id; |
| 348 | char *name; | 368 | char *name; |
| 349 | #ifdef HEADER_COMP_H | 369 | #ifndef NO_COMP |
| 350 | COMP_METHOD *method; | 370 | COMP_METHOD *method; |
| 351 | #else | 371 | #else |
| 352 | char *method; | 372 | char *method; |
| 353 | #endif | 373 | #endif |
| 354 | } SSL_COMP; | 374 | } SSL_COMP; |
| 355 | 375 | ||
| 356 | DECLARE_STACK_OF(SSL_COMP) | 376 | DECLARE_STACK_OF(SSL_COMP) |
| 357 | 377 | ||
| @@ -533,10 +553,10 @@ struct ssl_st | |||
| 533 | * same. This is so data can be read and written to different | 553 | * same. This is so data can be read and written to different |
| 534 | * handlers */ | 554 | * handlers */ |
| 535 | 555 | ||
| 536 | #ifdef HEADER_BIO_H | 556 | #ifndef NO_BIO |
| 537 | BIO *rbio; /* used by SSL_read */ | 557 | BIO *rbio; /* used by SSL_read */ |
| 538 | BIO *wbio; /* used by SSL_write */ | 558 | BIO *wbio; /* used by SSL_write */ |
| 539 | BIO *bbio; /* used during session-id reuse to concatinate | 559 | BIO *bbio; /* used during session-id reuse to concatenate |
| 540 | * messages */ | 560 | * messages */ |
| 541 | #else | 561 | #else |
| 542 | char *rbio; /* used by SSL_read */ | 562 | char *rbio; /* used by SSL_read */ |
| @@ -597,7 +617,7 @@ struct ssl_st | |||
| 597 | 617 | ||
| 598 | EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ | 618 | EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ |
| 599 | const EVP_MD *read_hash; /* used for mac generation */ | 619 | const EVP_MD *read_hash; /* used for mac generation */ |
| 600 | #ifdef HEADER_COMP_H | 620 | #ifndef NO_COMP |
| 601 | COMP_CTX *expand; /* uncompress */ | 621 | COMP_CTX *expand; /* uncompress */ |
| 602 | #else | 622 | #else |
| 603 | char *expand; | 623 | char *expand; |
| @@ -605,7 +625,7 @@ struct ssl_st | |||
| 605 | 625 | ||
| 606 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ | 626 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ |
| 607 | const EVP_MD *write_hash; /* used for mac generation */ | 627 | const EVP_MD *write_hash; /* used for mac generation */ |
| 608 | #ifdef HEADER_COMP_H | 628 | #ifndef NO_COMP |
| 609 | COMP_CTX *compress; /* compression */ | 629 | COMP_CTX *compress; /* compression */ |
| 610 | #else | 630 | #else |
| 611 | char *compress; | 631 | char *compress; |
| @@ -655,11 +675,19 @@ struct ssl_st | |||
| 655 | * SSLv3/TLS rollback check */ | 675 | * SSLv3/TLS rollback check */ |
| 656 | }; | 676 | }; |
| 657 | 677 | ||
| 678 | #ifdef __cplusplus | ||
| 679 | } | ||
| 680 | #endif | ||
| 681 | |||
| 658 | #include <openssl/ssl2.h> | 682 | #include <openssl/ssl2.h> |
| 659 | #include <openssl/ssl3.h> | 683 | #include <openssl/ssl3.h> |
| 660 | #include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */ | 684 | #include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */ |
| 661 | #include <openssl/ssl23.h> | 685 | #include <openssl/ssl23.h> |
| 662 | 686 | ||
| 687 | #ifdef __cplusplus | ||
| 688 | extern "C" { | ||
| 689 | #endif | ||
| 690 | |||
| 663 | /* compatibility */ | 691 | /* compatibility */ |
| 664 | #define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) | 692 | #define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) |
| 665 | #define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) | 693 | #define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) |
| @@ -883,7 +911,7 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count); | |||
| 883 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_sub_to_stack | 911 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_sub_to_stack |
| 884 | #endif | 912 | #endif |
| 885 | 913 | ||
| 886 | #ifdef HEADER_BIO_H | 914 | #ifndef NO_BIO |
| 887 | BIO_METHOD *BIO_f_ssl(void); | 915 | BIO_METHOD *BIO_f_ssl(void); |
| 888 | BIO *BIO_new_ssl(SSL_CTX *ctx,int client); | 916 | BIO *BIO_new_ssl(SSL_CTX *ctx,int client); |
| 889 | BIO *BIO_new_ssl_connect(SSL_CTX *ctx); | 917 | BIO *BIO_new_ssl_connect(SSL_CTX *ctx); |
| @@ -920,7 +948,7 @@ int SSL_set_fd(SSL *s, int fd); | |||
| 920 | int SSL_set_rfd(SSL *s, int fd); | 948 | int SSL_set_rfd(SSL *s, int fd); |
| 921 | int SSL_set_wfd(SSL *s, int fd); | 949 | int SSL_set_wfd(SSL *s, int fd); |
| 922 | #endif | 950 | #endif |
| 923 | #ifdef HEADER_BIO_H | 951 | #ifndef NO_BIO |
| 924 | void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); | 952 | void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); |
| 925 | BIO * SSL_get_rbio(SSL *s); | 953 | BIO * SSL_get_rbio(SSL *s); |
| 926 | BIO * SSL_get_wbio(SSL *s); | 954 | BIO * SSL_get_wbio(SSL *s); |
| @@ -975,7 +1003,7 @@ int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b); | |||
| 975 | #ifndef NO_FP_API | 1003 | #ifndef NO_FP_API |
| 976 | int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses); | 1004 | int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses); |
| 977 | #endif | 1005 | #endif |
| 978 | #ifdef HEADER_BIO_H | 1006 | #ifndef NO_BIO |
| 979 | int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses); | 1007 | int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses); |
| 980 | #endif | 1008 | #endif |
| 981 | void SSL_SESSION_free(SSL_SESSION *ses); | 1009 | void SSL_SESSION_free(SSL_SESSION *ses); |
| @@ -1171,7 +1199,7 @@ void SSL_set_tmp_dh_callback(SSL *ssl, | |||
| 1171 | int keylength)); | 1199 | int keylength)); |
| 1172 | #endif | 1200 | #endif |
| 1173 | 1201 | ||
| 1174 | #ifdef HEADER_COMP_H | 1202 | #ifndef NO_COMP |
| 1175 | int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); | 1203 | int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); |
| 1176 | #else | 1204 | #else |
| 1177 | int SSL_COMP_add_compression_method(int id,char *cm); | 1205 | int SSL_COMP_add_compression_method(int id,char *cm); |
| @@ -1443,6 +1471,7 @@ int SSL_COMP_add_compression_method(int id,char *cm); | |||
| 1443 | #define SSL_R_READ_WRONG_PACKET_TYPE 212 | 1471 | #define SSL_R_READ_WRONG_PACKET_TYPE 212 |
| 1444 | #define SSL_R_RECORD_LENGTH_MISMATCH 213 | 1472 | #define SSL_R_RECORD_LENGTH_MISMATCH 213 |
| 1445 | #define SSL_R_RECORD_TOO_LARGE 214 | 1473 | #define SSL_R_RECORD_TOO_LARGE 214 |
| 1474 | #define SSL_R_RECORD_TOO_SMALL 1093 | ||
| 1446 | #define SSL_R_REQUIRED_CIPHER_MISSING 215 | 1475 | #define SSL_R_REQUIRED_CIPHER_MISSING 215 |
| 1447 | #define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 | 1476 | #define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 |
| 1448 | #define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 | 1477 | #define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 |
diff --git a/src/lib/libssl/ssl/shlib_version b/src/lib/libssl/ssl/shlib_version index c87e1c60d4..c29621c831 100644 --- a/src/lib/libssl/ssl/shlib_version +++ b/src/lib/libssl/ssl/shlib_version | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | major=2 | 1 | major=2 |
| 2 | minor=4 | 2 | minor=5 |
diff --git a/src/lib/libssl/ssl2.h b/src/lib/libssl/ssl2.h index 01d41c88c5..df7d03c18f 100644 --- a/src/lib/libssl/ssl2.h +++ b/src/lib/libssl/ssl2.h | |||
| @@ -133,7 +133,11 @@ extern "C" { | |||
| 133 | 133 | ||
| 134 | /* Upper/Lower Bounds */ | 134 | /* Upper/Lower Bounds */ |
| 135 | #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 | 135 | #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 |
| 136 | #ifdef MPE | ||
| 137 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)29998 | ||
| 138 | #else | ||
| 136 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)32767 | 139 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)32767 |
| 140 | #endif | ||
| 137 | #define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /**/ | 141 | #define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /**/ |
| 138 | 142 | ||
| 139 | #define SSL2_CHALLENGE_LENGTH 16 | 143 | #define SSL2_CHALLENGE_LENGTH 16 |
diff --git a/src/lib/libssl/ssl3.h b/src/lib/libssl/ssl3.h index f616763830..7ee1feaa67 100644 --- a/src/lib/libssl/ssl3.h +++ b/src/lib/libssl/ssl3.h | |||
| @@ -59,6 +59,9 @@ | |||
| 59 | #ifndef HEADER_SSL3_H | 59 | #ifndef HEADER_SSL3_H |
| 60 | #define HEADER_SSL3_H | 60 | #define HEADER_SSL3_H |
| 61 | 61 | ||
| 62 | #ifndef NO_COMP | ||
| 63 | #include <openssl/comp.h> | ||
| 64 | #endif | ||
| 62 | #include <openssl/buffer.h> | 65 | #include <openssl/buffer.h> |
| 63 | #include <openssl/evp.h> | 66 | #include <openssl/evp.h> |
| 64 | #include <openssl/ssl.h> | 67 | #include <openssl/ssl.h> |
| @@ -310,7 +313,7 @@ typedef struct ssl3_state_st | |||
| 310 | 313 | ||
| 311 | const EVP_CIPHER *new_sym_enc; | 314 | const EVP_CIPHER *new_sym_enc; |
| 312 | const EVP_MD *new_hash; | 315 | const EVP_MD *new_hash; |
| 313 | #ifdef HEADER_COMP_H | 316 | #ifndef NO_COMP |
| 314 | const SSL_COMP *new_compression; | 317 | const SSL_COMP *new_compression; |
| 315 | #else | 318 | #else |
| 316 | char *new_compression; | 319 | char *new_compression; |
diff --git a/src/lib/libssl/ssl_asn1.c b/src/lib/libssl/ssl_asn1.c index e77cdddfd3..fa6456e4f5 100644 --- a/src/lib/libssl/ssl_asn1.c +++ b/src/lib/libssl/ssl_asn1.c | |||
| @@ -92,7 +92,7 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) | |||
| 92 | 92 | ||
| 93 | /* Note that I cheat in the following 2 assignments. I know | 93 | /* Note that I cheat in the following 2 assignments. I know |
| 94 | * that if the ASN1_INTEGER passed to ASN1_INTEGER_set | 94 | * that if the ASN1_INTEGER passed to ASN1_INTEGER_set |
| 95 | * is > sizeof(long)+1, the buffer will not be re-Malloc()ed. | 95 | * is > sizeof(long)+1, the buffer will not be re-OPENSSL_malloc()ed. |
| 96 | * This is a bit evil but makes things simple, no dynamic allocation | 96 | * This is a bit evil but makes things simple, no dynamic allocation |
| 97 | * to clean up :-) */ | 97 | * to clean up :-) */ |
| 98 | a.version.length=LSIZE2; | 98 | a.version.length=LSIZE2; |
| @@ -223,13 +223,13 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 223 | ai.data=NULL; ai.length=0; | 223 | ai.data=NULL; ai.length=0; |
| 224 | M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER); | 224 | M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER); |
| 225 | version=(int)ASN1_INTEGER_get(aip); | 225 | version=(int)ASN1_INTEGER_get(aip); |
| 226 | if (ai.data != NULL) { Free(ai.data); ai.data=NULL; ai.length=0; } | 226 | if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; } |
| 227 | 227 | ||
| 228 | /* we don't care about the version right now :-) */ | 228 | /* we don't care about the version right now :-) */ |
| 229 | M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER); | 229 | M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER); |
| 230 | ssl_version=(int)ASN1_INTEGER_get(aip); | 230 | ssl_version=(int)ASN1_INTEGER_get(aip); |
| 231 | ret->ssl_version=ssl_version; | 231 | ret->ssl_version=ssl_version; |
| 232 | if (ai.data != NULL) { Free(ai.data); ai.data=NULL; ai.length=0; } | 232 | if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; } |
| 233 | 233 | ||
| 234 | os.data=NULL; os.length=0; | 234 | os.data=NULL; os.length=0; |
| 235 | M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING); | 235 | M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING); |
| @@ -291,14 +291,14 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 291 | else | 291 | else |
| 292 | ret->key_arg_length=os.length; | 292 | ret->key_arg_length=os.length; |
| 293 | memcpy(ret->key_arg,os.data,ret->key_arg_length); | 293 | memcpy(ret->key_arg,os.data,ret->key_arg_length); |
| 294 | if (os.data != NULL) Free(os.data); | 294 | if (os.data != NULL) OPENSSL_free(os.data); |
| 295 | 295 | ||
| 296 | ai.length=0; | 296 | ai.length=0; |
| 297 | M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,1); | 297 | M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,1); |
| 298 | if (ai.data != NULL) | 298 | if (ai.data != NULL) |
| 299 | { | 299 | { |
| 300 | ret->time=ASN1_INTEGER_get(aip); | 300 | ret->time=ASN1_INTEGER_get(aip); |
| 301 | Free(ai.data); ai.data=NULL; ai.length=0; | 301 | OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; |
| 302 | } | 302 | } |
| 303 | else | 303 | else |
| 304 | ret->time=time(NULL); | 304 | ret->time=time(NULL); |
| @@ -308,7 +308,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 308 | if (ai.data != NULL) | 308 | if (ai.data != NULL) |
| 309 | { | 309 | { |
| 310 | ret->timeout=ASN1_INTEGER_get(aip); | 310 | ret->timeout=ASN1_INTEGER_get(aip); |
| 311 | Free(ai.data); ai.data=NULL; ai.length=0; | 311 | OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; |
| 312 | } | 312 | } |
| 313 | else | 313 | else |
| 314 | ret->timeout=3; | 314 | ret->timeout=3; |
| @@ -330,7 +330,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 330 | SSLerr(SSL_F_D2I_SSL_SESSION,SSL_R_BAD_LENGTH); | 330 | SSLerr(SSL_F_D2I_SSL_SESSION,SSL_R_BAD_LENGTH); |
| 331 | ret->sid_ctx_length=os.length; | 331 | ret->sid_ctx_length=os.length; |
| 332 | memcpy(ret->sid_ctx,os.data,os.length); | 332 | memcpy(ret->sid_ctx,os.data,os.length); |
| 333 | Free(os.data); os.data=NULL; os.length=0; | 333 | OPENSSL_free(os.data); os.data=NULL; os.length=0; |
| 334 | } | 334 | } |
| 335 | else | 335 | else |
| 336 | ret->sid_ctx_length=0; | 336 | ret->sid_ctx_length=0; |
| @@ -340,7 +340,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, | |||
| 340 | if (ai.data != NULL) | 340 | if (ai.data != NULL) |
| 341 | { | 341 | { |
| 342 | ret->verify_result=ASN1_INTEGER_get(aip); | 342 | ret->verify_result=ASN1_INTEGER_get(aip); |
| 343 | Free(ai.data); ai.data=NULL; ai.length=0; | 343 | OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; |
| 344 | } | 344 | } |
| 345 | else | 345 | else |
| 346 | ret->verify_result=X509_V_OK; | 346 | ret->verify_result=X509_V_OK; |
diff --git a/src/lib/libssl/ssl_cert.c b/src/lib/libssl/ssl_cert.c index f2335d5650..c26df62c20 100644 --- a/src/lib/libssl/ssl_cert.c +++ b/src/lib/libssl/ssl_cert.c | |||
| @@ -143,7 +143,7 @@ CERT *ssl_cert_new(void) | |||
| 143 | { | 143 | { |
| 144 | CERT *ret; | 144 | CERT *ret; |
| 145 | 145 | ||
| 146 | ret=(CERT *)Malloc(sizeof(CERT)); | 146 | ret=(CERT *)OPENSSL_malloc(sizeof(CERT)); |
| 147 | if (ret == NULL) | 147 | if (ret == NULL) |
| 148 | { | 148 | { |
| 149 | SSLerr(SSL_F_SSL_CERT_NEW,ERR_R_MALLOC_FAILURE); | 149 | SSLerr(SSL_F_SSL_CERT_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -162,7 +162,7 @@ CERT *ssl_cert_dup(CERT *cert) | |||
| 162 | CERT *ret; | 162 | CERT *ret; |
| 163 | int i; | 163 | int i; |
| 164 | 164 | ||
| 165 | ret = (CERT *)Malloc(sizeof(CERT)); | 165 | ret = (CERT *)OPENSSL_malloc(sizeof(CERT)); |
| 166 | if (ret == NULL) | 166 | if (ret == NULL) |
| 167 | { | 167 | { |
| 168 | SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_MALLOC_FAILURE); | 168 | SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_MALLOC_FAILURE); |
| @@ -331,7 +331,7 @@ void ssl_cert_free(CERT *c) | |||
| 331 | EVP_PKEY_free(c->pkeys[i].publickey); | 331 | EVP_PKEY_free(c->pkeys[i].publickey); |
| 332 | #endif | 332 | #endif |
| 333 | } | 333 | } |
| 334 | Free(c); | 334 | OPENSSL_free(c); |
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | int ssl_cert_inst(CERT **o) | 337 | int ssl_cert_inst(CERT **o) |
| @@ -367,7 +367,7 @@ SESS_CERT *ssl_sess_cert_new(void) | |||
| 367 | { | 367 | { |
| 368 | SESS_CERT *ret; | 368 | SESS_CERT *ret; |
| 369 | 369 | ||
| 370 | ret = Malloc(sizeof *ret); | 370 | ret = OPENSSL_malloc(sizeof *ret); |
| 371 | if (ret == NULL) | 371 | if (ret == NULL) |
| 372 | { | 372 | { |
| 373 | SSLerr(SSL_F_SSL_SESS_CERT_NEW, ERR_R_MALLOC_FAILURE); | 373 | SSLerr(SSL_F_SSL_SESS_CERT_NEW, ERR_R_MALLOC_FAILURE); |
| @@ -426,7 +426,7 @@ void ssl_sess_cert_free(SESS_CERT *sc) | |||
| 426 | DH_free(sc->peer_dh_tmp); | 426 | DH_free(sc->peer_dh_tmp); |
| 427 | #endif | 427 | #endif |
| 428 | 428 | ||
| 429 | Free(sc); | 429 | OPENSSL_free(sc); |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | int ssl_set_peer_cert_type(SESS_CERT *sc,int type) | 432 | int ssl_set_peer_cert_type(SESS_CERT *sc,int type) |
| @@ -568,7 +568,7 @@ int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x) | |||
| 568 | return(add_client_CA(&(ctx->client_CA),x)); | 568 | return(add_client_CA(&(ctx->client_CA),x)); |
| 569 | } | 569 | } |
| 570 | 570 | ||
| 571 | static int xname_cmp(X509_NAME **a,X509_NAME **b) | 571 | static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b) |
| 572 | { | 572 | { |
| 573 | return(X509_NAME_cmp(*a,*b)); | 573 | return(X509_NAME_cmp(*a,*b)); |
| 574 | } | 574 | } |
| @@ -589,7 +589,7 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file) | |||
| 589 | X509_NAME *xn=NULL; | 589 | X509_NAME *xn=NULL; |
| 590 | STACK_OF(X509_NAME) *ret,*sk; | 590 | STACK_OF(X509_NAME) *ret,*sk; |
| 591 | 591 | ||
| 592 | ret=sk_X509_NAME_new(NULL); | 592 | ret=sk_X509_NAME_new_null(); |
| 593 | sk=sk_X509_NAME_new(xname_cmp); | 593 | sk=sk_X509_NAME_new(xname_cmp); |
| 594 | 594 | ||
| 595 | in=BIO_new(BIO_s_file_internal()); | 595 | in=BIO_new(BIO_s_file_internal()); |
| @@ -644,53 +644,53 @@ err: | |||
| 644 | 644 | ||
| 645 | int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, | 645 | int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, |
| 646 | const char *file) | 646 | const char *file) |
| 647 | { | ||
| 648 | BIO *in; | ||
| 649 | X509 *x=NULL; | ||
| 650 | X509_NAME *xn=NULL; | ||
| 651 | int ret=1; | ||
| 652 | int (*oldcmp)(X509_NAME **a, X509_NAME **b); | ||
| 653 | |||
| 654 | oldcmp=sk_X509_NAME_set_cmp_func(stack,xname_cmp); | ||
| 655 | |||
| 656 | in=BIO_new(BIO_s_file_internal()); | ||
| 657 | |||
| 658 | if (in == NULL) | ||
| 659 | { | 647 | { |
| 660 | SSLerr(SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE); | 648 | BIO *in; |
| 661 | goto err; | 649 | X509 *x=NULL; |
| 662 | } | 650 | X509_NAME *xn=NULL; |
| 651 | int ret=1; | ||
| 652 | int (*oldcmp)(const X509_NAME * const *a, const X509_NAME * const *b); | ||
| 663 | 653 | ||
| 664 | if (!BIO_read_filename(in,file)) | 654 | oldcmp=sk_X509_NAME_set_cmp_func(stack,xname_cmp); |
| 665 | goto err; | 655 | |
| 666 | 656 | in=BIO_new(BIO_s_file_internal()); | |
| 667 | for (;;) | 657 | |
| 668 | { | 658 | if (in == NULL) |
| 669 | if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL) | 659 | { |
| 670 | break; | 660 | SSLerr(SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE); |
| 671 | if ((xn=X509_get_subject_name(x)) == NULL) goto err; | 661 | goto err; |
| 672 | xn=X509_NAME_dup(xn); | 662 | } |
| 673 | if (xn == NULL) goto err; | 663 | |
| 674 | if (sk_X509_NAME_find(stack,xn) >= 0) | 664 | if (!BIO_read_filename(in,file)) |
| 675 | X509_NAME_free(xn); | 665 | goto err; |
| 676 | else | 666 | |
| 677 | sk_X509_NAME_push(stack,xn); | 667 | for (;;) |
| 678 | } | 668 | { |
| 669 | if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL) | ||
| 670 | break; | ||
| 671 | if ((xn=X509_get_subject_name(x)) == NULL) goto err; | ||
| 672 | xn=X509_NAME_dup(xn); | ||
| 673 | if (xn == NULL) goto err; | ||
| 674 | if (sk_X509_NAME_find(stack,xn) >= 0) | ||
| 675 | X509_NAME_free(xn); | ||
| 676 | else | ||
| 677 | sk_X509_NAME_push(stack,xn); | ||
| 678 | } | ||
| 679 | 679 | ||
| 680 | if (0) | 680 | if (0) |
| 681 | { | 681 | { |
| 682 | err: | 682 | err: |
| 683 | ret=0; | 683 | ret=0; |
| 684 | } | 684 | } |
| 685 | if(in != NULL) | 685 | if(in != NULL) |
| 686 | BIO_free(in); | 686 | BIO_free(in); |
| 687 | if(x != NULL) | 687 | if(x != NULL) |
| 688 | X509_free(x); | 688 | X509_free(x); |
| 689 | 689 | ||
| 690 | sk_X509_NAME_set_cmp_func(stack,oldcmp); | 690 | sk_X509_NAME_set_cmp_func(stack,oldcmp); |
| 691 | 691 | ||
| 692 | return ret; | 692 | return ret; |
| 693 | } | 693 | } |
| 694 | 694 | ||
| 695 | /*! | 695 | /*! |
| 696 | * Add a directory of certs to a stack. | 696 | * Add a directory of certs to a stack. |
| @@ -709,44 +709,46 @@ err: | |||
| 709 | 709 | ||
| 710 | int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, | 710 | int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, |
| 711 | const char *dir) | 711 | const char *dir) |
| 712 | { | ||
| 713 | DIR *d; | ||
| 714 | struct dirent *dstruct; | ||
| 715 | int ret = 0; | ||
| 716 | |||
| 717 | CRYPTO_w_lock(CRYPTO_LOCK_READDIR); | ||
| 718 | d = opendir(dir); | ||
| 719 | |||
| 720 | /* Note that a side effect is that the CAs will be sorted by name */ | ||
| 721 | if(!d) | ||
| 722 | { | 712 | { |
| 723 | SYSerr(SYS_F_OPENDIR, get_last_sys_error()); | 713 | DIR *d; |
| 724 | ERR_add_error_data(3, "opendir('", dir, "')"); | 714 | struct dirent *dstruct; |
| 725 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK, ERR_R_SYS_LIB); | 715 | int ret = 0; |
| 726 | goto err; | ||
| 727 | } | ||
| 728 | 716 | ||
| 729 | while((dstruct=readdir(d))) | 717 | CRYPTO_w_lock(CRYPTO_LOCK_READDIR); |
| 730 | { | 718 | d = opendir(dir); |
| 731 | char buf[1024]; | ||
| 732 | 719 | ||
| 733 | if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf) | 720 | /* Note that a side effect is that the CAs will be sorted by name */ |
| 734 | { | 721 | if(!d) |
| 735 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); | 722 | { |
| 736 | goto err; | 723 | SYSerr(SYS_F_OPENDIR, get_last_sys_error()); |
| 737 | } | 724 | ERR_add_error_data(3, "opendir('", dir, "')"); |
| 725 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK, ERR_R_SYS_LIB); | ||
| 726 | goto err; | ||
| 727 | } | ||
| 738 | 728 | ||
| 739 | sprintf(buf,"%s/%s",dir,dstruct->d_name); | 729 | while((dstruct=readdir(d))) |
| 740 | if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) | 730 | { |
| 741 | goto err; | 731 | char buf[1024]; |
| 742 | } | 732 | int r; |
| 743 | ret = 1; | 733 | |
| 734 | if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf) | ||
| 735 | { | ||
| 736 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); | ||
| 737 | goto err; | ||
| 738 | } | ||
| 739 | |||
| 740 | r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,dstruct->d_name); | ||
| 741 | if (r <= 0 || r >= sizeof buf) | ||
| 742 | goto err; | ||
| 743 | if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) | ||
| 744 | goto err; | ||
| 745 | } | ||
| 746 | ret = 1; | ||
| 744 | 747 | ||
| 745 | err: | 748 | err: |
| 746 | closedir(d); | 749 | CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); |
| 747 | CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); | 750 | return ret; |
| 748 | return ret; | 751 | } |
| 749 | } | ||
| 750 | 752 | ||
| 751 | #endif | 753 | #endif |
| 752 | #endif | 754 | #endif |
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c index 7436a50ad1..f63163f26c 100644 --- a/src/lib/libssl/ssl_ciph.c +++ b/src/lib/libssl/ssl_ciph.c | |||
| @@ -518,7 +518,7 @@ static int ssl_cipher_strength_sort(CIPHER_ORDER *list, CIPHER_ORDER **head_p, | |||
| 518 | curr = curr->next; | 518 | curr = curr->next; |
| 519 | } | 519 | } |
| 520 | 520 | ||
| 521 | number_uses = Malloc((max_strength_bits + 1) * sizeof(int)); | 521 | number_uses = OPENSSL_malloc((max_strength_bits + 1) * sizeof(int)); |
| 522 | if (!number_uses) | 522 | if (!number_uses) |
| 523 | { | 523 | { |
| 524 | SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT,ERR_R_MALLOC_FAILURE); | 524 | SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT,ERR_R_MALLOC_FAILURE); |
| @@ -545,7 +545,7 @@ static int ssl_cipher_strength_sort(CIPHER_ORDER *list, CIPHER_ORDER **head_p, | |||
| 545 | ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i, | 545 | ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i, |
| 546 | list, head_p, tail_p); | 546 | list, head_p, tail_p); |
| 547 | 547 | ||
| 548 | Free(number_uses); | 548 | OPENSSL_free(number_uses); |
| 549 | return(1); | 549 | return(1); |
| 550 | } | 550 | } |
| 551 | 551 | ||
| @@ -738,7 +738,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
| 738 | * it is used for allocation. | 738 | * it is used for allocation. |
| 739 | */ | 739 | */ |
| 740 | num_of_ciphers = ssl_method->num_ciphers(); | 740 | num_of_ciphers = ssl_method->num_ciphers(); |
| 741 | list = (CIPHER_ORDER *)Malloc(sizeof(CIPHER_ORDER) * num_of_ciphers); | 741 | list = (CIPHER_ORDER *)OPENSSL_malloc(sizeof(CIPHER_ORDER) * num_of_ciphers); |
| 742 | if (list == NULL) | 742 | if (list == NULL) |
| 743 | { | 743 | { |
| 744 | SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); | 744 | SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); |
| @@ -759,10 +759,10 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
| 759 | num_of_group_aliases = sizeof(cipher_aliases) / sizeof(SSL_CIPHER); | 759 | num_of_group_aliases = sizeof(cipher_aliases) / sizeof(SSL_CIPHER); |
| 760 | num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1; | 760 | num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1; |
| 761 | ca_list = | 761 | ca_list = |
| 762 | (SSL_CIPHER **)Malloc(sizeof(SSL_CIPHER *) * num_of_alias_max); | 762 | (SSL_CIPHER **)OPENSSL_malloc(sizeof(SSL_CIPHER *) * num_of_alias_max); |
| 763 | if (ca_list == NULL) | 763 | if (ca_list == NULL) |
| 764 | { | 764 | { |
| 765 | Free(list); | 765 | OPENSSL_free(list); |
| 766 | SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); | 766 | SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); |
| 767 | return(NULL); /* Failure */ | 767 | return(NULL); /* Failure */ |
| 768 | } | 768 | } |
| @@ -788,20 +788,20 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
| 788 | ok = ssl_cipher_process_rulestr(rule_p, list, &head, &tail, | 788 | ok = ssl_cipher_process_rulestr(rule_p, list, &head, &tail, |
| 789 | ca_list); | 789 | ca_list); |
| 790 | 790 | ||
| 791 | Free(ca_list); /* Not needed anymore */ | 791 | OPENSSL_free(ca_list); /* Not needed anymore */ |
| 792 | 792 | ||
| 793 | if (!ok) | 793 | if (!ok) |
| 794 | { /* Rule processing failure */ | 794 | { /* Rule processing failure */ |
| 795 | Free(list); | 795 | OPENSSL_free(list); |
| 796 | return(NULL); | 796 | return(NULL); |
| 797 | } | 797 | } |
| 798 | /* | 798 | /* |
| 799 | * Allocate new "cipherstack" for the result, return with error | 799 | * Allocate new "cipherstack" for the result, return with error |
| 800 | * if we cannot get one. | 800 | * if we cannot get one. |
| 801 | */ | 801 | */ |
| 802 | if ((cipherstack = sk_SSL_CIPHER_new(NULL)) == NULL) | 802 | if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) |
| 803 | { | 803 | { |
| 804 | Free(list); | 804 | OPENSSL_free(list); |
| 805 | return(NULL); | 805 | return(NULL); |
| 806 | } | 806 | } |
| 807 | 807 | ||
| @@ -819,7 +819,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
| 819 | #endif | 819 | #endif |
| 820 | } | 820 | } |
| 821 | } | 821 | } |
| 822 | Free(list); /* Not needed any longer */ | 822 | OPENSSL_free(list); /* Not needed any longer */ |
| 823 | 823 | ||
| 824 | /* | 824 | /* |
| 825 | * The following passage is a little bit odd. If pointer variables | 825 | * The following passage is a little bit odd. If pointer variables |
| @@ -975,13 +975,14 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) | |||
| 975 | 975 | ||
| 976 | if (buf == NULL) | 976 | if (buf == NULL) |
| 977 | { | 977 | { |
| 978 | buf=Malloc(128); | 978 | len=128; |
| 979 | if (buf == NULL) return("Malloc Error"); | 979 | buf=OPENSSL_malloc(len); |
| 980 | if (buf == NULL) return("OPENSSL_malloc Error"); | ||
| 980 | } | 981 | } |
| 981 | else if (len < 128) | 982 | else if (len < 128) |
| 982 | return("Buffer too small"); | 983 | return("Buffer too small"); |
| 983 | 984 | ||
| 984 | sprintf(buf,format,cipher->name,ver,kx,au,enc,mac,exp); | 985 | BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp); |
| 985 | return(buf); | 986 | return(buf); |
| 986 | } | 987 | } |
| 987 | 988 | ||
| @@ -1036,7 +1037,8 @@ SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n) | |||
| 1036 | return(NULL); | 1037 | return(NULL); |
| 1037 | } | 1038 | } |
| 1038 | 1039 | ||
| 1039 | static int sk_comp_cmp(SSL_COMP **a,SSL_COMP **b) | 1040 | static int sk_comp_cmp(const SSL_COMP * const *a, |
| 1041 | const SSL_COMP * const *b) | ||
| 1040 | { | 1042 | { |
| 1041 | return((*a)->id-(*b)->id); | 1043 | return((*a)->id-(*b)->id); |
| 1042 | } | 1044 | } |
| @@ -1051,7 +1053,7 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) | |||
| 1051 | SSL_COMP *comp; | 1053 | SSL_COMP *comp; |
| 1052 | STACK_OF(SSL_COMP) *sk; | 1054 | STACK_OF(SSL_COMP) *sk; |
| 1053 | 1055 | ||
| 1054 | comp=(SSL_COMP *)Malloc(sizeof(SSL_COMP)); | 1056 | comp=(SSL_COMP *)OPENSSL_malloc(sizeof(SSL_COMP)); |
| 1055 | comp->id=id; | 1057 | comp->id=id; |
| 1056 | comp->method=cm; | 1058 | comp->method=cm; |
| 1057 | if (ssl_comp_methods == NULL) | 1059 | if (ssl_comp_methods == NULL) |
diff --git a/src/lib/libssl/ssl_err.c b/src/lib/libssl/ssl_err.c index 642c3f93e7..17b4caf528 100644 --- a/src/lib/libssl/ssl_err.c +++ b/src/lib/libssl/ssl_err.c | |||
| @@ -327,6 +327,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= | |||
| 327 | {SSL_R_READ_WRONG_PACKET_TYPE ,"read wrong packet type"}, | 327 | {SSL_R_READ_WRONG_PACKET_TYPE ,"read wrong packet type"}, |
| 328 | {SSL_R_RECORD_LENGTH_MISMATCH ,"record length mismatch"}, | 328 | {SSL_R_RECORD_LENGTH_MISMATCH ,"record length mismatch"}, |
| 329 | {SSL_R_RECORD_TOO_LARGE ,"record too large"}, | 329 | {SSL_R_RECORD_TOO_LARGE ,"record too large"}, |
| 330 | {SSL_R_RECORD_TOO_SMALL ,"record too small"}, | ||
| 330 | {SSL_R_REQUIRED_CIPHER_MISSING ,"required cipher missing"}, | 331 | {SSL_R_REQUIRED_CIPHER_MISSING ,"required cipher missing"}, |
| 331 | {SSL_R_REUSE_CERT_LENGTH_NOT_ZERO ,"reuse cert length not zero"}, | 332 | {SSL_R_REUSE_CERT_LENGTH_NOT_ZERO ,"reuse cert length not zero"}, |
| 332 | {SSL_R_REUSE_CERT_TYPE_NOT_ZERO ,"reuse cert type not zero"}, | 333 | {SSL_R_REUSE_CERT_TYPE_NOT_ZERO ,"reuse cert type not zero"}, |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index c515c41b4e..635b25062e 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
| @@ -58,6 +58,8 @@ | |||
| 58 | * [including the GNU Public Licence.] | 58 | * [including the GNU Public Licence.] |
| 59 | */ | 59 | */ |
| 60 | 60 | ||
| 61 | |||
| 62 | #include <assert.h> | ||
| 61 | #include <stdio.h> | 63 | #include <stdio.h> |
| 62 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 63 | #include <openssl/lhash.h> | 65 | #include <openssl/lhash.h> |
| @@ -183,7 +185,7 @@ SSL *SSL_new(SSL_CTX *ctx) | |||
| 183 | return(NULL); | 185 | return(NULL); |
| 184 | } | 186 | } |
| 185 | 187 | ||
| 186 | s=(SSL *)Malloc(sizeof(SSL)); | 188 | s=(SSL *)OPENSSL_malloc(sizeof(SSL)); |
| 187 | if (s == NULL) goto err; | 189 | if (s == NULL) goto err; |
| 188 | memset(s,0,sizeof(SSL)); | 190 | memset(s,0,sizeof(SSL)); |
| 189 | 191 | ||
| @@ -239,7 +241,7 @@ err: | |||
| 239 | ssl_cert_free(s->cert); | 241 | ssl_cert_free(s->cert); |
| 240 | if (s->ctx != NULL) | 242 | if (s->ctx != NULL) |
| 241 | SSL_CTX_free(s->ctx); /* decrement reference count */ | 243 | SSL_CTX_free(s->ctx); /* decrement reference count */ |
| 242 | Free(s); | 244 | OPENSSL_free(s); |
| 243 | } | 245 | } |
| 244 | SSLerr(SSL_F_SSL_NEW,ERR_R_MALLOC_FAILURE); | 246 | SSLerr(SSL_F_SSL_NEW,ERR_R_MALLOC_FAILURE); |
| 245 | return(NULL); | 247 | return(NULL); |
| @@ -375,7 +377,7 @@ void SSL_free(SSL *s) | |||
| 375 | 377 | ||
| 376 | if (s->method != NULL) s->method->ssl_free(s); | 378 | if (s->method != NULL) s->method->ssl_free(s); |
| 377 | 379 | ||
| 378 | Free(s); | 380 | OPENSSL_free(s); |
| 379 | } | 381 | } |
| 380 | 382 | ||
| 381 | void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio) | 383 | void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio) |
| @@ -874,7 +876,7 @@ long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)()) | |||
| 874 | } | 876 | } |
| 875 | } | 877 | } |
| 876 | 878 | ||
| 877 | int ssl_cipher_id_cmp(SSL_CIPHER *a,SSL_CIPHER *b) | 879 | int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b) |
| 878 | { | 880 | { |
| 879 | long l; | 881 | long l; |
| 880 | 882 | ||
| @@ -885,7 +887,8 @@ int ssl_cipher_id_cmp(SSL_CIPHER *a,SSL_CIPHER *b) | |||
| 885 | return((l > 0)?1:-1); | 887 | return((l > 0)?1:-1); |
| 886 | } | 888 | } |
| 887 | 889 | ||
| 888 | int ssl_cipher_ptr_id_cmp(SSL_CIPHER **ap,SSL_CIPHER **bp) | 890 | int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, |
| 891 | const SSL_CIPHER * const *bp) | ||
| 889 | { | 892 | { |
| 890 | long l; | 893 | long l; |
| 891 | 894 | ||
| @@ -1033,7 +1036,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, | |||
| 1033 | return(NULL); | 1036 | return(NULL); |
| 1034 | } | 1037 | } |
| 1035 | if ((skp == NULL) || (*skp == NULL)) | 1038 | if ((skp == NULL) || (*skp == NULL)) |
| 1036 | sk=sk_SSL_CIPHER_new(NULL); /* change perhaps later */ | 1039 | sk=sk_SSL_CIPHER_new_null(); /* change perhaps later */ |
| 1037 | else | 1040 | else |
| 1038 | { | 1041 | { |
| 1039 | sk= *skp; | 1042 | sk= *skp; |
| @@ -1099,7 +1102,7 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) | |||
| 1099 | SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS); | 1102 | SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS); |
| 1100 | goto err; | 1103 | goto err; |
| 1101 | } | 1104 | } |
| 1102 | ret=(SSL_CTX *)Malloc(sizeof(SSL_CTX)); | 1105 | ret=(SSL_CTX *)OPENSSL_malloc(sizeof(SSL_CTX)); |
| 1103 | if (ret == NULL) | 1106 | if (ret == NULL) |
| 1104 | goto err; | 1107 | goto err; |
| 1105 | 1108 | ||
| @@ -1195,7 +1198,7 @@ err2: | |||
| 1195 | } | 1198 | } |
| 1196 | 1199 | ||
| 1197 | static void SSL_COMP_free(SSL_COMP *comp) | 1200 | static void SSL_COMP_free(SSL_COMP *comp) |
| 1198 | { Free(comp); } | 1201 | { OPENSSL_free(comp); } |
| 1199 | 1202 | ||
| 1200 | void SSL_CTX_free(SSL_CTX *a) | 1203 | void SSL_CTX_free(SSL_CTX *a) |
| 1201 | { | 1204 | { |
| @@ -1236,7 +1239,7 @@ void SSL_CTX_free(SSL_CTX *a) | |||
| 1236 | sk_X509_pop_free(a->extra_certs,X509_free); | 1239 | sk_X509_pop_free(a->extra_certs,X509_free); |
| 1237 | if (a->comp_methods != NULL) | 1240 | if (a->comp_methods != NULL) |
| 1238 | sk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free); | 1241 | sk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free); |
| 1239 | Free(a); | 1242 | OPENSSL_free(a); |
| 1240 | } | 1243 | } |
| 1241 | 1244 | ||
| 1242 | void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) | 1245 | void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) |
| @@ -1759,13 +1762,13 @@ void ssl_clear_cipher_ctx(SSL *s) | |||
| 1759 | if (s->enc_read_ctx != NULL) | 1762 | if (s->enc_read_ctx != NULL) |
| 1760 | { | 1763 | { |
| 1761 | EVP_CIPHER_CTX_cleanup(s->enc_read_ctx); | 1764 | EVP_CIPHER_CTX_cleanup(s->enc_read_ctx); |
| 1762 | Free(s->enc_read_ctx); | 1765 | OPENSSL_free(s->enc_read_ctx); |
| 1763 | s->enc_read_ctx=NULL; | 1766 | s->enc_read_ctx=NULL; |
| 1764 | } | 1767 | } |
| 1765 | if (s->enc_write_ctx != NULL) | 1768 | if (s->enc_write_ctx != NULL) |
| 1766 | { | 1769 | { |
| 1767 | EVP_CIPHER_CTX_cleanup(s->enc_write_ctx); | 1770 | EVP_CIPHER_CTX_cleanup(s->enc_write_ctx); |
| 1768 | Free(s->enc_write_ctx); | 1771 | OPENSSL_free(s->enc_write_ctx); |
| 1769 | s->enc_write_ctx=NULL; | 1772 | s->enc_write_ctx=NULL; |
| 1770 | } | 1773 | } |
| 1771 | if (s->expand != NULL) | 1774 | if (s->expand != NULL) |
| @@ -1843,19 +1846,16 @@ int ssl_init_wbio_buffer(SSL *s,int push) | |||
| 1843 | 1846 | ||
| 1844 | void ssl_free_wbio_buffer(SSL *s) | 1847 | void ssl_free_wbio_buffer(SSL *s) |
| 1845 | { | 1848 | { |
| 1846 | BIO *under; | ||
| 1847 | |||
| 1848 | if (s->bbio == NULL) return; | 1849 | if (s->bbio == NULL) return; |
| 1849 | 1850 | ||
| 1850 | if (s->bbio == s->wbio) | 1851 | if (s->bbio == s->wbio) |
| 1851 | { | 1852 | { |
| 1852 | /* remove buffering */ | 1853 | /* remove buffering */ |
| 1853 | under=BIO_pop(s->wbio); | 1854 | s->wbio=BIO_pop(s->wbio); |
| 1854 | if (under != NULL) | 1855 | #ifdef REF_CHECK /* not the usual REF_CHECK, but this avoids adding one more preprocessor symbol */ |
| 1855 | s->wbio=under; | 1856 | assert(s->wbio != NULL); |
| 1856 | else | 1857 | #endif |
| 1857 | abort(); /* ok */ | 1858 | } |
| 1858 | } | ||
| 1859 | BIO_free(s->bbio); | 1859 | BIO_free(s->bbio); |
| 1860 | s->bbio=NULL; | 1860 | s->bbio=NULL; |
| 1861 | } | 1861 | } |
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 9a52bab254..d70fff4627 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
| @@ -423,8 +423,9 @@ void ssl_sess_cert_free(SESS_CERT *sc); | |||
| 423 | int ssl_set_peer_cert_type(SESS_CERT *c, int type); | 423 | int ssl_set_peer_cert_type(SESS_CERT *c, int type); |
| 424 | int ssl_get_new_session(SSL *s, int session); | 424 | int ssl_get_new_session(SSL *s, int session); |
| 425 | int ssl_get_prev_session(SSL *s, unsigned char *session,int len); | 425 | int ssl_get_prev_session(SSL *s, unsigned char *session,int len); |
| 426 | int ssl_cipher_id_cmp(SSL_CIPHER *a,SSL_CIPHER *b); | 426 | int ssl_cipher_id_cmp(const SSL_CIPHER *a,const SSL_CIPHER *b); |
| 427 | int ssl_cipher_ptr_id_cmp(SSL_CIPHER **ap,SSL_CIPHER **bp); | 427 | int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, |
| 428 | const SSL_CIPHER * const *bp); | ||
| 428 | STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, | 429 | STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, |
| 429 | STACK_OF(SSL_CIPHER) **skp); | 430 | STACK_OF(SSL_CIPHER) **skp); |
| 430 | int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p); | 431 | int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p); |
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index 9e01f72753..416def8908 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
| @@ -111,7 +111,7 @@ SSL_SESSION *SSL_SESSION_new(void) | |||
| 111 | { | 111 | { |
| 112 | SSL_SESSION *ss; | 112 | SSL_SESSION *ss; |
| 113 | 113 | ||
| 114 | ss=(SSL_SESSION *)Malloc(sizeof(SSL_SESSION)); | 114 | ss=(SSL_SESSION *)OPENSSL_malloc(sizeof(SSL_SESSION)); |
| 115 | if (ss == NULL) | 115 | if (ss == NULL) |
| 116 | { | 116 | { |
| 117 | SSLerr(SSL_F_SSL_SESSION_NEW,ERR_R_MALLOC_FAILURE); | 117 | SSLerr(SSL_F_SSL_SESSION_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -310,7 +310,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len) | |||
| 310 | #if 0 /* This is way too late. */ | 310 | #if 0 /* This is way too late. */ |
| 311 | 311 | ||
| 312 | /* If a thread got the session, then 'swaped', and another got | 312 | /* If a thread got the session, then 'swaped', and another got |
| 313 | * it and then due to a time-out decided to 'Free' it we could | 313 | * it and then due to a time-out decided to 'OPENSSL_free' it we could |
| 314 | * be in trouble. So I'll increment it now, then double decrement | 314 | * be in trouble. So I'll increment it now, then double decrement |
| 315 | * later - am I speaking rubbish?. */ | 315 | * later - am I speaking rubbish?. */ |
| 316 | CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION); | 316 | CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION); |
| @@ -474,7 +474,7 @@ void SSL_SESSION_free(SSL_SESSION *ss) | |||
| 474 | if (ss->peer != NULL) X509_free(ss->peer); | 474 | if (ss->peer != NULL) X509_free(ss->peer); |
| 475 | if (ss->ciphers != NULL) sk_SSL_CIPHER_free(ss->ciphers); | 475 | if (ss->ciphers != NULL) sk_SSL_CIPHER_free(ss->ciphers); |
| 476 | memset(ss,0,sizeof(*ss)); | 476 | memset(ss,0,sizeof(*ss)); |
| 477 | Free(ss); | 477 | OPENSSL_free(ss); |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | int SSL_set_session(SSL *s, SSL_SESSION *session) | 480 | int SSL_set_session(SSL *s, SSL_SESSION *session) |
diff --git a/src/lib/libssl/ssl_txt.c b/src/lib/libssl/ssl_txt.c index c07d957576..6e33eec3e4 100644 --- a/src/lib/libssl/ssl_txt.c +++ b/src/lib/libssl/ssl_txt.c | |||
| @@ -81,7 +81,7 @@ int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *x) | |||
| 81 | int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) | 81 | int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) |
| 82 | { | 82 | { |
| 83 | unsigned int i; | 83 | unsigned int i; |
| 84 | char str[128],*s; | 84 | char *s; |
| 85 | 85 | ||
| 86 | if (x == NULL) goto err; | 86 | if (x == NULL) goto err; |
| 87 | if (BIO_puts(bp,"SSL-Session:\n") <= 0) goto err; | 87 | if (BIO_puts(bp,"SSL-Session:\n") <= 0) goto err; |
| @@ -93,36 +93,41 @@ int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) | |||
| 93 | s="TLSv1"; | 93 | s="TLSv1"; |
| 94 | else | 94 | else |
| 95 | s="unknown"; | 95 | s="unknown"; |
| 96 | sprintf(str," Protocol : %s\n",s); | 96 | if (BIO_printf(bp," Protocol : %s\n",s) <= 0) goto err; |
| 97 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 98 | 97 | ||
| 99 | if (x->cipher == NULL) | 98 | if (x->cipher == NULL) |
| 100 | { | 99 | { |
| 101 | if (((x->cipher_id) & 0xff000000) == 0x02000000) | 100 | if (((x->cipher_id) & 0xff000000) == 0x02000000) |
| 102 | sprintf(str," Cipher : %06lX\n",x->cipher_id&0xffffff); | 101 | { |
| 102 | if (BIO_printf(bp," Cipher : %06lX\n",x->cipher_id&0xffffff) <= 0) | ||
| 103 | goto err; | ||
| 104 | } | ||
| 103 | else | 105 | else |
| 104 | sprintf(str," Cipher : %04lX\n",x->cipher_id&0xffff); | 106 | { |
| 107 | if (BIO_printf(bp," Cipher : %04lX\n",x->cipher_id&0xffff) <= 0) | ||
| 108 | goto err; | ||
| 109 | } | ||
| 105 | } | 110 | } |
| 106 | else | 111 | else |
| 107 | sprintf(str," Cipher : %s\n",(x->cipher == NULL)?"unknown":x->cipher->name); | 112 | { |
| 108 | if (BIO_puts(bp,str) <= 0) goto err; | 113 | if (BIO_printf(bp," Cipher : %s\n",((x->cipher == NULL)?"unknown":x->cipher->name)) <= 0) |
| 114 | goto err; | ||
| 115 | } | ||
| 109 | if (BIO_puts(bp," Session-ID: ") <= 0) goto err; | 116 | if (BIO_puts(bp," Session-ID: ") <= 0) goto err; |
| 110 | for (i=0; i<x->session_id_length; i++) | 117 | for (i=0; i<x->session_id_length; i++) |
| 111 | { | 118 | { |
| 112 | sprintf(str,"%02X",x->session_id[i]); | 119 | if (BIO_printf(bp,"%02X",x->session_id[i]) <= 0) goto err; |
| 113 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 114 | } | 120 | } |
| 115 | if (BIO_puts(bp,"\n Session-ID-ctx: ") <= 0) goto err; | 121 | if (BIO_puts(bp,"\n Session-ID-ctx: ") <= 0) goto err; |
| 116 | for (i=0; i<x->sid_ctx_length; i++) | 122 | for (i=0; i<x->sid_ctx_length; i++) |
| 117 | { | 123 | { |
| 118 | sprintf(str,"%02X",x->sid_ctx[i]); | 124 | if (BIO_printf(bp,"%02X",x->sid_ctx[i]) <= 0) |
| 119 | if (BIO_puts(bp,str) <= 0) goto err; | 125 | goto err; |
| 120 | } | 126 | } |
| 121 | if (BIO_puts(bp,"\n Master-Key: ") <= 0) goto err; | 127 | if (BIO_puts(bp,"\n Master-Key: ") <= 0) goto err; |
| 122 | for (i=0; i<(unsigned int)x->master_key_length; i++) | 128 | for (i=0; i<(unsigned int)x->master_key_length; i++) |
| 123 | { | 129 | { |
| 124 | sprintf(str,"%02X",x->master_key[i]); | 130 | if (BIO_printf(bp,"%02X",x->master_key[i]) <= 0) goto err; |
| 125 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 126 | } | 131 | } |
| 127 | if (BIO_puts(bp,"\n Key-Arg : ") <= 0) goto err; | 132 | if (BIO_puts(bp,"\n Key-Arg : ") <= 0) goto err; |
| 128 | if (x->key_arg_length == 0) | 133 | if (x->key_arg_length == 0) |
| @@ -132,8 +137,7 @@ int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) | |||
| 132 | else | 137 | else |
| 133 | for (i=0; i<x->key_arg_length; i++) | 138 | for (i=0; i<x->key_arg_length; i++) |
| 134 | { | 139 | { |
| 135 | sprintf(str,"%02X",x->key_arg[i]); | 140 | if (BIO_printf(bp,"%02X",x->key_arg[i]) <= 0) goto err; |
| 136 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 137 | } | 141 | } |
| 138 | if (x->compress_meth != 0) | 142 | if (x->compress_meth != 0) |
| 139 | { | 143 | { |
| @@ -142,32 +146,26 @@ int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) | |||
| 142 | ssl_cipher_get_evp(x,NULL,NULL,&comp); | 146 | ssl_cipher_get_evp(x,NULL,NULL,&comp); |
| 143 | if (comp == NULL) | 147 | if (comp == NULL) |
| 144 | { | 148 | { |
| 145 | sprintf(str,"\n Compression: %d",x->compress_meth); | 149 | if (BIO_printf(bp,"\n Compression: %d",x->compress_meth) <= 0) goto err; |
| 146 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 147 | } | 150 | } |
| 148 | else | 151 | else |
| 149 | { | 152 | { |
| 150 | sprintf(str,"\n Compression: %d (%s)", | 153 | if (BIO_printf(bp,"\n Compression: %d (%s)", comp->id,comp->method->name) <= 0) goto err; |
| 151 | comp->id,comp->method->name); | ||
| 152 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 153 | } | 154 | } |
| 154 | } | 155 | } |
| 155 | if (x->time != 0L) | 156 | if (x->time != 0L) |
| 156 | { | 157 | { |
| 157 | sprintf(str,"\n Start Time: %ld",x->time); | 158 | if (BIO_printf(bp, "\n Start Time: %ld",x->time) <= 0) goto err; |
| 158 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 159 | } | 159 | } |
| 160 | if (x->timeout != 0L) | 160 | if (x->timeout != 0L) |
| 161 | { | 161 | { |
| 162 | sprintf(str,"\n Timeout : %ld (sec)",x->timeout); | 162 | if (BIO_printf(bp, "\n Timeout : %ld (sec)",x->timeout) <= 0) goto err; |
| 163 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 164 | } | 163 | } |
| 165 | if (BIO_puts(bp,"\n") <= 0) goto err; | 164 | if (BIO_puts(bp,"\n") <= 0) goto err; |
| 166 | 165 | ||
| 167 | if (BIO_puts(bp, " Verify return code: ") <= 0) goto err; | 166 | if (BIO_puts(bp, " Verify return code: ") <= 0) goto err; |
| 168 | sprintf(str, "%ld (%s)\n", x->verify_result, | 167 | if (BIO_printf(bp, "%ld (%s)\n", x->verify_result, |
| 169 | X509_verify_cert_error_string(x->verify_result)); | 168 | X509_verify_cert_error_string(x->verify_result)) <= 0) goto err; |
| 170 | if (BIO_puts(bp,str) <= 0) goto err; | ||
| 171 | 169 | ||
| 172 | return(1); | 170 | return(1); |
| 173 | err: | 171 | err: |
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index 279e45db5d..0d34357eb4 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
| @@ -178,7 +178,7 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 178 | { | 178 | { |
| 179 | if ((s->enc_read_ctx == NULL) && | 179 | if ((s->enc_read_ctx == NULL) && |
| 180 | ((s->enc_read_ctx=(EVP_CIPHER_CTX *) | 180 | ((s->enc_read_ctx=(EVP_CIPHER_CTX *) |
| 181 | Malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) | 181 | OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) |
| 182 | goto err; | 182 | goto err; |
| 183 | dd= s->enc_read_ctx; | 183 | dd= s->enc_read_ctx; |
| 184 | s->read_hash=m; | 184 | s->read_hash=m; |
| @@ -197,7 +197,7 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 197 | } | 197 | } |
| 198 | if (s->s3->rrec.comp == NULL) | 198 | if (s->s3->rrec.comp == NULL) |
| 199 | s->s3->rrec.comp=(unsigned char *) | 199 | s->s3->rrec.comp=(unsigned char *) |
| 200 | Malloc(SSL3_RT_MAX_ENCRYPTED_LENGTH); | 200 | OPENSSL_malloc(SSL3_RT_MAX_ENCRYPTED_LENGTH); |
| 201 | if (s->s3->rrec.comp == NULL) | 201 | if (s->s3->rrec.comp == NULL) |
| 202 | goto err; | 202 | goto err; |
| 203 | } | 203 | } |
| @@ -208,7 +208,7 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 208 | { | 208 | { |
| 209 | if ((s->enc_write_ctx == NULL) && | 209 | if ((s->enc_write_ctx == NULL) && |
| 210 | ((s->enc_write_ctx=(EVP_CIPHER_CTX *) | 210 | ((s->enc_write_ctx=(EVP_CIPHER_CTX *) |
| 211 | Malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) | 211 | OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)) |
| 212 | goto err; | 212 | goto err; |
| 213 | dd= s->enc_write_ctx; | 213 | dd= s->enc_write_ctx; |
| 214 | s->write_hash=m; | 214 | s->write_hash=m; |
| @@ -355,9 +355,9 @@ int tls1_setup_key_block(SSL *s) | |||
| 355 | 355 | ||
| 356 | ssl3_cleanup_key_block(s); | 356 | ssl3_cleanup_key_block(s); |
| 357 | 357 | ||
| 358 | if ((p1=(unsigned char *)Malloc(num)) == NULL) | 358 | if ((p1=(unsigned char *)OPENSSL_malloc(num)) == NULL) |
| 359 | goto err; | 359 | goto err; |
| 360 | if ((p2=(unsigned char *)Malloc(num)) == NULL) | 360 | if ((p2=(unsigned char *)OPENSSL_malloc(num)) == NULL) |
| 361 | goto err; | 361 | goto err; |
| 362 | 362 | ||
| 363 | s->s3->tmp.key_block_length=num; | 363 | s->s3->tmp.key_block_length=num; |
| @@ -374,7 +374,7 @@ printf("pre-master\n"); | |||
| 374 | #endif | 374 | #endif |
| 375 | tls1_generate_key_block(s,p1,p2,num); | 375 | tls1_generate_key_block(s,p1,p2,num); |
| 376 | memset(p2,0,num); | 376 | memset(p2,0,num); |
| 377 | Free(p2); | 377 | OPENSSL_free(p2); |
| 378 | #ifdef TLS_DEBUG | 378 | #ifdef TLS_DEBUG |
| 379 | printf("\nkey block\n"); | 379 | printf("\nkey block\n"); |
| 380 | { int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); } | 380 | { int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); } |
diff --git a/src/lib/libssl/test/Makefile.ssl b/src/lib/libssl/test/Makefile.ssl index dbb523bf15..b961dabc3c 100644 --- a/src/lib/libssl/test/Makefile.ssl +++ b/src/lib/libssl/test/Makefile.ssl | |||
| @@ -38,6 +38,7 @@ SHA1TEST= sha1test | |||
| 38 | MDC2TEST= mdc2test | 38 | MDC2TEST= mdc2test |
| 39 | RMDTEST= rmdtest | 39 | RMDTEST= rmdtest |
| 40 | MD2TEST= md2test | 40 | MD2TEST= md2test |
| 41 | MD4TEST= md4test | ||
| 41 | MD5TEST= md5test | 42 | MD5TEST= md5test |
| 42 | HMACTEST= hmactest | 43 | HMACTEST= hmactest |
| 43 | RC2TEST= rc2test | 44 | RC2TEST= rc2test |
| @@ -52,24 +53,27 @@ DSATEST= dsatest | |||
| 52 | METHTEST= methtest | 53 | METHTEST= methtest |
| 53 | SSLTEST= ssltest | 54 | SSLTEST= ssltest |
| 54 | RSATEST= rsa_test | 55 | RSATEST= rsa_test |
| 56 | ENGINETEST= enginetest | ||
| 55 | 57 | ||
| 56 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ | 58 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD4TEST) $(MD5TEST) $(HMACTEST) \ |
| 57 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | 59 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ |
| 58 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | 60 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ |
| 59 | $(RANDTEST) $(DHTEST) \ | 61 | $(RANDTEST) $(DHTEST) $(ENGINETEST) \ |
| 60 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(RSATEST) | 62 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(RSATEST) |
| 61 | 63 | ||
| 62 | # $(METHTEST) | 64 | # $(METHTEST) |
| 63 | 65 | ||
| 64 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD5TEST).o $(HMACTEST).o \ | 66 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \ |
| 67 | $(HMACTEST).o \ | ||
| 65 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | 68 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ |
| 66 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | 69 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ |
| 67 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ | 70 | $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ |
| 68 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o | 71 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o |
| 69 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ | 72 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ |
| 73 | $(HMACTEST).c \ | ||
| 70 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | 74 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ |
| 71 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | 75 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ |
| 72 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ | 76 | $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \ |
| 73 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c | 77 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c |
| 74 | 78 | ||
| 75 | EXHEADER= | 79 | EXHEADER= |
| @@ -98,11 +102,12 @@ tags: | |||
| 98 | ctags $(SRC) | 102 | ctags $(SRC) |
| 99 | 103 | ||
| 100 | tests: exe apps \ | 104 | tests: exe apps \ |
| 101 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ | 105 | test_des test_idea test_sha test_md4 test_md5 test_hmac \ |
| 106 | test_md2 test_mdc2 \ | ||
| 102 | test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast \ | 107 | test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast \ |
| 103 | test_rand test_bn test_enc test_x509 test_rsa test_crl test_sid \ | 108 | test_rand test_bn test_enc test_x509 test_rsa test_crl test_sid \ |
| 104 | test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ | 109 | test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ |
| 105 | test_ss test_ssl test_ca | 110 | test_ss test_ca test_engine test_ssl |
| 106 | 111 | ||
| 107 | apps: | 112 | apps: |
| 108 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) | 113 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) |
| @@ -123,6 +128,9 @@ test_mdc2: | |||
| 123 | test_md5: | 128 | test_md5: |
| 124 | ./$(MD5TEST) | 129 | ./$(MD5TEST) |
| 125 | 130 | ||
| 131 | test_md4: | ||
| 132 | ./$(MD4TEST) | ||
| 133 | |||
| 126 | test_hmac: | 134 | test_hmac: |
| 127 | ./$(HMACTEST) | 135 | ./$(HMACTEST) |
| 128 | 136 | ||
| @@ -210,6 +218,10 @@ test_ss: | |||
| 210 | @echo "Generate and certify a test certificate" | 218 | @echo "Generate and certify a test certificate" |
| 211 | @sh ./testss | 219 | @sh ./testss |
| 212 | 220 | ||
| 221 | test_engine: | ||
| 222 | @echo "Manipulate the ENGINE structures" | ||
| 223 | ./$(ENGINETEST) | ||
| 224 | |||
| 213 | test_ssl: | 225 | test_ssl: |
| 214 | @echo "test SSL protocol" | 226 | @echo "test SSL protocol" |
| 215 | @sh ./testssl | 227 | @sh ./testssl |
| @@ -264,6 +276,9 @@ $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) | |||
| 264 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) | 276 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) |
| 265 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | 277 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) |
| 266 | 278 | ||
| 279 | $(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO) | ||
| 280 | $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 281 | |||
| 267 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) | 282 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) |
| 268 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | 283 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) |
| 269 | 284 | ||
| @@ -303,25 +318,31 @@ $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) | |||
| 303 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | 318 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) |
| 304 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | 319 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) |
| 305 | 320 | ||
| 321 | $(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO) | ||
| 322 | $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 323 | |||
| 306 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 324 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 307 | 325 | ||
| 308 | bftest.o: ../include/openssl/blowfish.h | 326 | bftest.o: ../include/openssl/blowfish.h |
| 309 | bntest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 327 | bntest.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 310 | bntest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 328 | bntest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 311 | bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | 329 | bntest.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 312 | bntest.o: ../include/openssl/des.h ../include/openssl/dh.h | 330 | bntest.o: ../include/openssl/crypto.h ../include/openssl/des.h |
| 313 | bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | 331 | bntest.o: ../include/openssl/dh.h ../include/openssl/dsa.h |
| 314 | bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h | 332 | bntest.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h |
| 315 | bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h | 333 | bntest.o: ../include/openssl/err.h ../include/openssl/evp.h |
| 316 | bntest.o: ../include/openssl/md2.h ../include/openssl/md5.h | 334 | bntest.o: ../include/openssl/idea.h ../include/openssl/lhash.h |
| 317 | bntest.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 335 | bntest.o: ../include/openssl/md2.h ../include/openssl/md4.h |
| 336 | bntest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
| 337 | bntest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
| 318 | bntest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 338 | bntest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 319 | bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | 339 | bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h |
| 320 | bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 340 | bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h |
| 321 | bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 341 | bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h |
| 322 | bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 342 | bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 323 | bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h | 343 | bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h |
| 324 | bntest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | 344 | bntest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h |
| 345 | bntest.o: ../include/openssl/x509_vfy.h | ||
| 325 | casttest.o: ../include/openssl/cast.h | 346 | casttest.o: ../include/openssl/cast.h |
| 326 | destest.o: ../include/openssl/des.h ../include/openssl/e_os2.h | 347 | destest.o: ../include/openssl/des.h ../include/openssl/e_os2.h |
| 327 | destest.o: ../include/openssl/opensslconf.h | 348 | destest.o: ../include/openssl/opensslconf.h |
| @@ -329,18 +350,37 @@ dhtest.o: ../include/openssl/bio.h ../include/openssl/bn.h | |||
| 329 | dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h | 350 | dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h |
| 330 | dhtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 351 | dhtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h |
| 331 | dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h | 352 | dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h |
| 332 | dhtest.o: ../include/openssl/stack.h | 353 | dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 333 | dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h | 354 | dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h |
| 334 | dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h | 355 | dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h |
| 335 | dsatest.o: ../include/openssl/dsa.h ../include/openssl/err.h | 356 | dsatest.o: ../include/openssl/dsa.h ../include/openssl/err.h |
| 336 | dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 357 | dsatest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 337 | dsatest.o: ../include/openssl/rand.h ../include/openssl/safestack.h | 358 | dsatest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h |
| 338 | dsatest.o: ../include/openssl/stack.h | 359 | dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h |
| 360 | dsatest.o: ../include/openssl/symhacks.h | ||
| 361 | enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
| 362 | enginetest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | ||
| 363 | enginetest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | ||
| 364 | enginetest.o: ../include/openssl/des.h ../include/openssl/dh.h | ||
| 365 | enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
| 366 | enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
| 367 | enginetest.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
| 368 | enginetest.o: ../include/openssl/lhash.h ../include/openssl/md2.h | ||
| 369 | enginetest.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
| 370 | enginetest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 371 | enginetest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | ||
| 372 | enginetest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h | ||
| 373 | enginetest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | ||
| 374 | enginetest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | ||
| 375 | enginetest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | ||
| 376 | enginetest.o: ../include/openssl/sha.h ../include/openssl/stack.h | ||
| 377 | enginetest.o: ../include/openssl/symhacks.h | ||
| 339 | exptest.o: ../include/openssl/bio.h ../include/openssl/bn.h | 378 | exptest.o: ../include/openssl/bio.h ../include/openssl/bn.h |
| 340 | exptest.o: ../include/openssl/crypto.h ../include/openssl/err.h | 379 | exptest.o: ../include/openssl/crypto.h ../include/openssl/err.h |
| 341 | exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 380 | exptest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h |
| 342 | exptest.o: ../include/openssl/rand.h ../include/openssl/safestack.h | 381 | exptest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h |
| 343 | exptest.o: ../include/openssl/stack.h | 382 | exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h |
| 383 | exptest.o: ../include/openssl/symhacks.h | ||
| 344 | hmactest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 384 | hmactest.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 345 | hmactest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 385 | hmactest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 346 | hmactest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | 386 | hmactest.o: ../include/openssl/cast.h ../include/openssl/crypto.h |
| @@ -348,15 +388,17 @@ hmactest.o: ../include/openssl/des.h ../include/openssl/dh.h | |||
| 348 | hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | 388 | hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h |
| 349 | hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h | 389 | hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h |
| 350 | hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h | 390 | hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h |
| 351 | hmactest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | 391 | hmactest.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 392 | hmactest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
| 352 | hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | 393 | hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 353 | hmactest.o: ../include/openssl/opensslv.h ../include/openssl/rc2.h | 394 | hmactest.o: ../include/openssl/opensslv.h ../include/openssl/rc2.h |
| 354 | hmactest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | 395 | hmactest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 355 | hmactest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | 396 | hmactest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 356 | hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h | 397 | hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 357 | hmactest.o: ../include/openssl/stack.h | 398 | hmactest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 358 | ideatest.o: ../include/openssl/idea.h ../include/openssl/opensslconf.h | 399 | ideatest.o: ../include/openssl/idea.h ../include/openssl/opensslconf.h |
| 359 | md2test.o: ../include/openssl/md2.h ../include/openssl/opensslconf.h | 400 | md2test.o: ../include/openssl/md2.h ../include/openssl/opensslconf.h |
| 401 | md4test.o: ../include/openssl/md4.h | ||
| 360 | md5test.o: ../include/openssl/md5.h | 402 | md5test.o: ../include/openssl/md5.h |
| 361 | mdc2test.o: ../include/openssl/des.h ../include/openssl/e_os2.h | 403 | mdc2test.o: ../include/openssl/des.h ../include/openssl/e_os2.h |
| 362 | mdc2test.o: ../include/openssl/mdc2.h ../include/openssl/opensslconf.h | 404 | mdc2test.o: ../include/openssl/mdc2.h ../include/openssl/opensslconf.h |
| @@ -365,32 +407,35 @@ rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h | |||
| 365 | rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h | 407 | rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h |
| 366 | rc5test.o: ../include/openssl/rc5.h | 408 | rc5test.o: ../include/openssl/rc5.h |
| 367 | rmdtest.o: ../include/openssl/ripemd.h | 409 | rmdtest.o: ../include/openssl/ripemd.h |
| 368 | rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h | 410 | rsa_test.o: ../include/openssl/bio.h ../include/openssl/bn.h |
| 369 | rsa_test.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 411 | rsa_test.o: ../include/openssl/crypto.h ../include/openssl/e_os.h |
| 370 | rsa_test.o: ../include/openssl/err.h ../include/openssl/opensslconf.h | 412 | rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 413 | rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | ||
| 371 | rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/rand.h | 414 | rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/rand.h |
| 372 | rsa_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 415 | rsa_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h |
| 373 | rsa_test.o: ../include/openssl/stack.h | 416 | rsa_test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h |
| 374 | sha1test.o: ../include/openssl/sha.h | 417 | sha1test.o: ../include/openssl/sha.h |
| 375 | shatest.o: ../include/openssl/sha.h | 418 | shatest.o: ../include/openssl/sha.h |
| 376 | ssltest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | 419 | ssltest.o: ../include/openssl/asn1.h ../include/openssl/bio.h |
| 377 | ssltest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | 420 | ssltest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h |
| 378 | ssltest.o: ../include/openssl/buffer.h ../include/openssl/cast.h | 421 | ssltest.o: ../include/openssl/buffer.h ../include/openssl/cast.h |
| 379 | ssltest.o: ../include/openssl/crypto.h ../include/openssl/des.h | 422 | ssltest.o: ../include/openssl/comp.h ../include/openssl/crypto.h |
| 380 | ssltest.o: ../include/openssl/dh.h ../include/openssl/dsa.h | 423 | ssltest.o: ../include/openssl/des.h ../include/openssl/dh.h |
| 381 | ssltest.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | 424 | ssltest.o: ../include/openssl/dsa.h ../include/openssl/e_os.h |
| 382 | ssltest.o: ../include/openssl/err.h ../include/openssl/evp.h | 425 | ssltest.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
| 383 | ssltest.o: ../include/openssl/idea.h ../include/openssl/lhash.h | 426 | ssltest.o: ../include/openssl/evp.h ../include/openssl/idea.h |
| 384 | ssltest.o: ../include/openssl/md2.h ../include/openssl/md5.h | 427 | ssltest.o: ../include/openssl/lhash.h ../include/openssl/md2.h |
| 385 | ssltest.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | 428 | ssltest.o: ../include/openssl/md4.h ../include/openssl/md5.h |
| 386 | ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | 429 | ssltest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h |
| 387 | ssltest.o: ../include/openssl/pem.h ../include/openssl/pem2.h | 430 | ssltest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h |
| 388 | ssltest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | 431 | ssltest.o: ../include/openssl/opensslv.h ../include/openssl/pem.h |
| 389 | ssltest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | 432 | ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h |
| 390 | ssltest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | 433 | ssltest.o: ../include/openssl/rand.h ../include/openssl/rc2.h |
| 391 | ssltest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | 434 | ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h |
| 392 | ssltest.o: ../include/openssl/sha.h ../include/openssl/ssl.h | 435 | ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h |
| 393 | ssltest.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h | 436 | ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h |
| 394 | ssltest.o: ../include/openssl/ssl3.h ../include/openssl/stack.h | 437 | ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h |
| 438 | ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | ||
| 439 | ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
| 395 | ssltest.o: ../include/openssl/tls1.h ../include/openssl/x509.h | 440 | ssltest.o: ../include/openssl/tls1.h ../include/openssl/x509.h |
| 396 | ssltest.o: ../include/openssl/x509_vfy.h | 441 | ssltest.o: ../include/openssl/x509_vfy.h |
diff --git a/src/lib/libssl/test/enginetest.c b/src/lib/libssl/test/enginetest.c new file mode 100644 index 0000000000..a5a3c47fcb --- /dev/null +++ b/src/lib/libssl/test/enginetest.c | |||
| @@ -0,0 +1,251 @@ | |||
| 1 | /* crypto/engine/enginetest.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <openssl/engine.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | |||
| 64 | static void display_engine_list() | ||
| 65 | { | ||
| 66 | ENGINE *h; | ||
| 67 | int loop; | ||
| 68 | |||
| 69 | h = ENGINE_get_first(); | ||
| 70 | loop = 0; | ||
| 71 | printf("listing available engine types\n"); | ||
| 72 | while(h) | ||
| 73 | { | ||
| 74 | printf("engine %i, id = \"%s\", name = \"%s\"\n", | ||
| 75 | loop++, ENGINE_get_id(h), ENGINE_get_name(h)); | ||
| 76 | h = ENGINE_get_next(h); | ||
| 77 | } | ||
| 78 | printf("end of list\n"); | ||
| 79 | } | ||
| 80 | |||
| 81 | int main(int argc, char *argv[]) | ||
| 82 | { | ||
| 83 | ENGINE *block[512]; | ||
| 84 | char buf[256]; | ||
| 85 | const char *id, *name; | ||
| 86 | ENGINE *ptr; | ||
| 87 | int loop; | ||
| 88 | int to_return = 1; | ||
| 89 | ENGINE *new_h1 = NULL; | ||
| 90 | ENGINE *new_h2 = NULL; | ||
| 91 | ENGINE *new_h3 = NULL; | ||
| 92 | ENGINE *new_h4 = NULL; | ||
| 93 | |||
| 94 | ERR_load_crypto_strings(); | ||
| 95 | |||
| 96 | memset(block, 0, 512 * sizeof(ENGINE *)); | ||
| 97 | if(((new_h1 = ENGINE_new()) == NULL) || | ||
| 98 | !ENGINE_set_id(new_h1, "test_id0") || | ||
| 99 | !ENGINE_set_name(new_h1, "First test item") || | ||
| 100 | ((new_h2 = ENGINE_new()) == NULL) || | ||
| 101 | !ENGINE_set_id(new_h2, "test_id1") || | ||
| 102 | !ENGINE_set_name(new_h2, "Second test item") || | ||
| 103 | ((new_h3 = ENGINE_new()) == NULL) || | ||
| 104 | !ENGINE_set_id(new_h3, "test_id2") || | ||
| 105 | !ENGINE_set_name(new_h3, "Third test item") || | ||
| 106 | ((new_h4 = ENGINE_new()) == NULL) || | ||
| 107 | !ENGINE_set_id(new_h4, "test_id3") || | ||
| 108 | !ENGINE_set_name(new_h4, "Fourth test item")) | ||
| 109 | { | ||
| 110 | printf("Couldn't set up test ENGINE structures\n"); | ||
| 111 | goto end; | ||
| 112 | } | ||
| 113 | printf("\nenginetest beginning\n\n"); | ||
| 114 | display_engine_list(); | ||
| 115 | if(!ENGINE_add(new_h1)) | ||
| 116 | { | ||
| 117 | printf("Add failed!\n"); | ||
| 118 | goto end; | ||
| 119 | } | ||
| 120 | display_engine_list(); | ||
| 121 | ptr = ENGINE_get_first(); | ||
| 122 | if(!ENGINE_remove(ptr)) | ||
| 123 | { | ||
| 124 | printf("Remove failed!\n"); | ||
| 125 | goto end; | ||
| 126 | } | ||
| 127 | display_engine_list(); | ||
| 128 | if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) | ||
| 129 | { | ||
| 130 | printf("Add failed!\n"); | ||
| 131 | goto end; | ||
| 132 | } | ||
| 133 | display_engine_list(); | ||
| 134 | if(!ENGINE_remove(new_h2)) | ||
| 135 | { | ||
| 136 | printf("Remove failed!\n"); | ||
| 137 | goto end; | ||
| 138 | } | ||
| 139 | display_engine_list(); | ||
| 140 | if(!ENGINE_add(new_h4)) | ||
| 141 | { | ||
| 142 | printf("Add failed!\n"); | ||
| 143 | goto end; | ||
| 144 | } | ||
| 145 | display_engine_list(); | ||
| 146 | if(ENGINE_add(new_h3)) | ||
| 147 | { | ||
| 148 | printf("Add *should* have failed but didn't!\n"); | ||
| 149 | goto end; | ||
| 150 | } | ||
| 151 | else | ||
| 152 | printf("Add that should fail did.\n"); | ||
| 153 | ERR_clear_error(); | ||
| 154 | if(ENGINE_remove(new_h2)) | ||
| 155 | { | ||
| 156 | printf("Remove *should* have failed but didn't!\n"); | ||
| 157 | goto end; | ||
| 158 | } | ||
| 159 | else | ||
| 160 | printf("Remove that should fail did.\n"); | ||
| 161 | if(!ENGINE_remove(new_h1)) | ||
| 162 | { | ||
| 163 | printf("Remove failed!\n"); | ||
| 164 | goto end; | ||
| 165 | } | ||
| 166 | display_engine_list(); | ||
| 167 | if(!ENGINE_remove(new_h3)) | ||
| 168 | { | ||
| 169 | printf("Remove failed!\n"); | ||
| 170 | goto end; | ||
| 171 | } | ||
| 172 | display_engine_list(); | ||
| 173 | if(!ENGINE_remove(new_h4)) | ||
| 174 | { | ||
| 175 | printf("Remove failed!\n"); | ||
| 176 | goto end; | ||
| 177 | } | ||
| 178 | display_engine_list(); | ||
| 179 | /* Depending on whether there's any hardware support compiled | ||
| 180 | * in, this remove may be destined to fail. */ | ||
| 181 | ptr = ENGINE_get_first(); | ||
| 182 | if(ptr) | ||
| 183 | if(!ENGINE_remove(ptr)) | ||
| 184 | printf("Remove failed!i - probably no hardware " | ||
| 185 | "support present.\n"); | ||
| 186 | display_engine_list(); | ||
| 187 | if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) | ||
| 188 | { | ||
| 189 | printf("Couldn't add and remove to an empty list!\n"); | ||
| 190 | goto end; | ||
| 191 | } | ||
| 192 | else | ||
| 193 | printf("Successfully added and removed to an empty list!\n"); | ||
| 194 | printf("About to beef up the engine-type list\n"); | ||
| 195 | for(loop = 0; loop < 512; loop++) | ||
| 196 | { | ||
| 197 | sprintf(buf, "id%i", loop); | ||
| 198 | id = strdup(buf); | ||
| 199 | sprintf(buf, "Fake engine type %i", loop); | ||
| 200 | name = strdup(buf); | ||
| 201 | if(((block[loop] = ENGINE_new()) == NULL) || | ||
| 202 | !ENGINE_set_id(block[loop], id) || | ||
| 203 | !ENGINE_set_name(block[loop], name)) | ||
| 204 | { | ||
| 205 | printf("Couldn't create block of ENGINE structures.\n" | ||
| 206 | "I'll probably also core-dump now, damn.\n"); | ||
| 207 | goto end; | ||
| 208 | } | ||
| 209 | } | ||
| 210 | for(loop = 0; loop < 512; loop++) | ||
| 211 | { | ||
| 212 | if(!ENGINE_add(block[loop])) | ||
| 213 | { | ||
| 214 | printf("\nAdding stopped at %i, (%s,%s)\n", | ||
| 215 | loop, ENGINE_get_id(block[loop]), | ||
| 216 | ENGINE_get_name(block[loop])); | ||
| 217 | goto cleanup_loop; | ||
| 218 | } | ||
| 219 | else | ||
| 220 | printf("."); fflush(stdout); | ||
| 221 | } | ||
| 222 | cleanup_loop: | ||
| 223 | printf("\nAbout to empty the engine-type list\n"); | ||
| 224 | while((ptr = ENGINE_get_first()) != NULL) | ||
| 225 | { | ||
| 226 | if(!ENGINE_remove(ptr)) | ||
| 227 | { | ||
| 228 | printf("\nRemove failed!\n"); | ||
| 229 | goto end; | ||
| 230 | } | ||
| 231 | printf("."); fflush(stdout); | ||
| 232 | } | ||
| 233 | for(loop = 0; loop < 512; loop++) | ||
| 234 | { | ||
| 235 | free((char *)(ENGINE_get_id(block[loop]))); | ||
| 236 | free((char *)(ENGINE_get_name(block[loop]))); | ||
| 237 | } | ||
| 238 | printf("\nTests completed happily\n"); | ||
| 239 | to_return = 0; | ||
| 240 | end: | ||
| 241 | if(to_return) | ||
| 242 | ERR_print_errors_fp(stderr); | ||
| 243 | if(new_h1) ENGINE_free(new_h1); | ||
| 244 | if(new_h2) ENGINE_free(new_h2); | ||
| 245 | if(new_h3) ENGINE_free(new_h3); | ||
| 246 | if(new_h4) ENGINE_free(new_h4); | ||
| 247 | for(loop = 0; loop < 512; loop++) | ||
| 248 | if(block[loop]) | ||
| 249 | ENGINE_free(block[loop]); | ||
| 250 | return to_return; | ||
| 251 | } | ||
diff --git a/src/lib/libssl/test/maketests.com b/src/lib/libssl/test/maketests.com index 1246d9a077..135e0bfeb9 100644 --- a/src/lib/libssl/test/maketests.com +++ b/src/lib/libssl/test/maketests.com | |||
| @@ -143,7 +143,7 @@ $ GOSUB CHECK_OPT_FILE | |||
| 143 | $! | 143 | $! |
| 144 | $! Define The TEST Files. | 144 | $! Define The TEST Files. |
| 145 | $! | 145 | $! |
| 146 | $ TEST_FILES = "BNTEST,IDEATEST,MD2TEST,MD5TEST,HMACTEST,"+ - | 146 | $ TEST_FILES = "BNTEST,IDEATEST,MD2TEST,MD4TEST,MD5TEST,HMACTEST,"+ - |
| 147 | "RC2TEST,RC4TEST,RC5TEST,"+ - | 147 | "RC2TEST,RC4TEST,RC5TEST,"+ - |
| 148 | "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ - | 148 | "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ - |
| 149 | "RANDTEST,DHTEST,"+ - | 149 | "RANDTEST,DHTEST,"+ - |
diff --git a/src/lib/libssl/test/md4test.c b/src/lib/libssl/test/md4test.c new file mode 100644 index 0000000000..97e6e21efd --- /dev/null +++ b/src/lib/libssl/test/md4test.c | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | /* crypto/md4/md4test.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <string.h> | ||
| 61 | #include <stdlib.h> | ||
| 62 | |||
| 63 | #ifdef NO_MD4 | ||
| 64 | int main(int argc, char *argv[]) | ||
| 65 | { | ||
| 66 | printf("No MD4 support\n"); | ||
| 67 | return(0); | ||
| 68 | } | ||
| 69 | #else | ||
| 70 | #include <openssl/md4.h> | ||
| 71 | |||
| 72 | static char *test[]={ | ||
| 73 | "", | ||
| 74 | "a", | ||
| 75 | "abc", | ||
| 76 | "message digest", | ||
| 77 | "abcdefghijklmnopqrstuvwxyz", | ||
| 78 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", | ||
| 79 | "12345678901234567890123456789012345678901234567890123456789012345678901234567890", | ||
| 80 | NULL, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static char *ret[]={ | ||
| 84 | "31d6cfe0d16ae931b73c59d7e0c089c0", | ||
| 85 | "bde52cb31de33e46245e05fbdbd6fb24", | ||
| 86 | "a448017aaf21d8525fc10ae87aa6729d", | ||
| 87 | "d9130a8164549fe818874806e1c7014b", | ||
| 88 | "d79e1c308aa5bbcdeea8ed63df412da9", | ||
| 89 | "043f8582f241db351ce627e153e7f0e4", | ||
| 90 | "e33b4ddc9c38f2199c3e7b164fcc0536", | ||
| 91 | }; | ||
| 92 | |||
| 93 | static char *pt(unsigned char *md); | ||
| 94 | int main(int argc, char *argv[]) | ||
| 95 | { | ||
| 96 | int i,err=0; | ||
| 97 | unsigned char **P,**R; | ||
| 98 | char *p; | ||
| 99 | |||
| 100 | P=(unsigned char **)test; | ||
| 101 | R=(unsigned char **)ret; | ||
| 102 | i=1; | ||
| 103 | while (*P != NULL) | ||
| 104 | { | ||
| 105 | p=pt(MD4(&(P[0][0]),(unsigned long)strlen((char *)*P),NULL)); | ||
| 106 | if (strcmp(p,(char *)*R) != 0) | ||
| 107 | { | ||
| 108 | printf("error calculating MD4 on '%s'\n",*P); | ||
| 109 | printf("got %s instead of %s\n",p,*R); | ||
| 110 | err++; | ||
| 111 | } | ||
| 112 | else | ||
| 113 | printf("test %d ok\n",i); | ||
| 114 | i++; | ||
| 115 | R++; | ||
| 116 | P++; | ||
| 117 | } | ||
| 118 | exit(err); | ||
| 119 | return(0); | ||
| 120 | } | ||
| 121 | |||
| 122 | static char *pt(unsigned char *md) | ||
| 123 | { | ||
| 124 | int i; | ||
| 125 | static char buf[80]; | ||
| 126 | |||
| 127 | for (i=0; i<MD4_DIGEST_LENGTH; i++) | ||
| 128 | sprintf(&(buf[i*2]),"%02x",md[i]); | ||
| 129 | return(buf); | ||
| 130 | } | ||
| 131 | #endif | ||
diff --git a/src/lib/libssl/test/testp7.pem b/src/lib/libssl/test/testp7.pem index 6bba16f137..e5b7866c31 100644 --- a/src/lib/libssl/test/testp7.pem +++ b/src/lib/libssl/test/testp7.pem | |||
| @@ -1,46 +1,46 @@ | |||
| 1 | -----BEGIN PKCS7----- | 1 | -----BEGIN PKCS7----- |
| 2 | MIAGCSqGSIb3DQEHAqCAMIIIBwIBATEAMIAGCSqGSIb3DQEHAQAAoIIGPDCCBHIw | 2 | MIIIGAYJKoZIhvcNAQcCoIIICTCCCAUCAQExADALBgkqhkiG9w0BBwGgggY8MIIE |
| 3 | ggQcoAMCAQICEHkvjiX1iVGQMenF9HgIjI8wDQYJKoZIhvcNAQEEBQAwYjERMA8G | 3 | cjCCBBygAwIBAgIQeS+OJfWJUZAx6cX0eAiMjzANBgkqhkiG9w0BAQQFADBiMREw |
| 4 | A1UEBxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQL | 4 | DwYDVQQHEwhJbnRlcm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNV |
| 5 | EytWZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMB4X | 5 | BAsTK1ZlcmlTaWduIENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXIw |
| 6 | DTk2MDcxOTAwMDAwMFoXDTk3MDMzMDIzNTk1OVowgdUxETAPBgNVBAcTCEludGVy | 6 | HhcNOTYwNzE5MDAwMDAwWhcNOTcwMzMwMjM1OTU5WjCB1TERMA8GA1UEBxMISW50 |
| 7 | bmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24g | 7 | ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJpU2ln |
| 8 | Q2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjEoMCYGA1UECxMfRGln | 8 | biBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMSgwJgYDVQQLEx9E |
| 9 | aXRhbCBJRCBDbGFzcyAxIC0gU01JTUUgVGVzdDFHMEUGA1UECxM+d3d3LnZlcmlz | 9 | aWdpdGFsIElEIENsYXNzIDEgLSBTTUlNRSBUZXN0MUcwRQYDVQQLEz53d3cudmVy |
| 10 | aWduLmNvbS9yZXBvc2l0b3J5L0NQUy0xLjAgSW5jLiBieSBSZWYuLExJQUIuTFRE | 10 | aXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEuMCBJbmMuIGJ5IFJlZi4sTElBQi5M |
| 11 | KGMpOTYwWzANBgkqhkiG9w0BAQEFAANKADBHAkAOy7xxCAIkOfuIA2LyRpxgKlDO | 11 | VEQoYyk5NjBbMA0GCSqGSIb3DQEBAQUAA0oAMEcCQA7LvHEIAiQ5+4gDYvJGnGAq |
| 12 | Rl8htdXYhF5iBGUx1GYaK6KF+bK/CCI0l4j2OfWGFBUrwGoWqxTNcWgTfMzRAgMB | 12 | UM5GXyG11diEXmIEZTHUZhorooX5sr8IIjSXiPY59YYUFSvAaharFM1xaBN8zNEC |
| 13 | AAGjggI5MIICNTAJBgNVHRMEAjAAMIICJgYDVR0DBIICHTCCAhkwggIVMIICEQYL | 13 | AwEAAaOCAjkwggI1MAkGA1UdEwQCMAAwggImBgNVHQMEggIdMIICGTCCAhUwggIR |
| 14 | YIZIAYb4RQEHAQEwggIAFoIBq1RoaXMgY2VydGlmaWNhdGUgaW5jb3Jwb3JhdGVz | 14 | BgtghkgBhvhFAQcBATCCAgAWggGrVGhpcyBjZXJ0aWZpY2F0ZSBpbmNvcnBvcmF0 |
| 15 | IGJ5IHJlZmVyZW5jZSwgYW5kIGl0cyB1c2UgaXMgc3RyaWN0bHkgc3ViamVjdCB0 | 15 | ZXMgYnkgcmVmZXJlbmNlLCBhbmQgaXRzIHVzZSBpcyBzdHJpY3RseSBzdWJqZWN0 |
| 16 | bywgdGhlIFZlcmlTaWduIENlcnRpZmljYXRpb24gUHJhY3RpY2UgU3RhdGVtZW50 | 16 | IHRvLCB0aGUgVmVyaVNpZ24gQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0ZW1l |
| 17 | IChDUFMpLCBhdmFpbGFibGUgYXQ6IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9D | 17 | bnQgKENQUyksIGF2YWlsYWJsZSBhdDogaHR0cHM6Ly93d3cudmVyaXNpZ24uY29t |
| 18 | UFMtMS4wOyBieSBFLW1haWwgYXQgQ1BTLXJlcXVlc3RzQHZlcmlzaWduLmNvbTsg | 18 | L0NQUy0xLjA7IGJ5IEUtbWFpbCBhdCBDUFMtcmVxdWVzdHNAdmVyaXNpZ24uY29t |
| 19 | b3IgYnkgbWFpbCBhdCBWZXJpU2lnbiwgSW5jLiwgMjU5MyBDb2FzdCBBdmUuLCBN | 19 | OyBvciBieSBtYWlsIGF0IFZlcmlTaWduLCBJbmMuLCAyNTkzIENvYXN0IEF2ZS4s |
| 20 | b3VudGFpbiBWaWV3LCBDQSA5NDA0MyBVU0EgVGVsLiArMSAoNDE1KSA5NjEtODgz | 20 | IE1vdW50YWluIFZpZXcsIENBIDk0MDQzIFVTQSBUZWwuICsxICg0MTUpIDk2MS04 |
| 21 | MCBDb3B5cmlnaHQgKGMpIDE5OTYgVmVyaVNpZ24sIEluYy4gIEFsbCBSaWdodHMg | 21 | ODMwIENvcHlyaWdodCAoYykgMTk5NiBWZXJpU2lnbiwgSW5jLiAgQWxsIFJpZ2h0 |
| 22 | UmVzZXJ2ZWQuIENFUlRBSU4gV0FSUkFOVElFUyBESVNDTEFJTUVEIGFuZCBMSUFC | 22 | cyBSZXNlcnZlZC4gQ0VSVEFJTiBXQVJSQU5USUVTIERJU0NMQUlNRUQgYW5kIExJ |
| 23 | SUxJVFkgTElNSVRFRC6gDgYMYIZIAYb4RQEHAQEBoQ4GDGCGSAGG+EUBBwEBAjAv | 23 | QUJJTElUWSBMSU1JVEVELqAOBgxghkgBhvhFAQcBAQGhDgYMYIZIAYb4RQEHAQEC |
| 24 | MC0WK2h0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9yZXBvc2l0b3J5L0NQUy0xLgMw | 24 | MC8wLRYraHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEu |
| 25 | DQYJKoZIhvcNAQEEBQADQQDAmA7km/3iJWEsWN9Z2WU2gmZAknx45WnDKHxMa3Bf | 25 | AzANBgkqhkiG9w0BAQQFAANBAMCYDuSb/eIlYSxY31nZZTaCZkCSfHjlacMofExr |
| 26 | gNsh6BLk/ngkJKjNKTDR13XVHqEPUY1flbjATZputw1GMIIBwjCCAWygAwIBAgIQ | 26 | cF+A2yHoEuT+eCQkqM0pMNHXddUeoQ9RjV+VuMBNmm63DUYwggHCMIIBbKADAgEC |
| 27 | fAmE6tW5ERSQWDneu3KfSTANBgkqhkiG9w0BAQIFADA+MQswCQYDVQQGEwJVUzEX | 27 | AhB8CYTq1bkRFJBYOd67cp9JMA0GCSqGSIb3DQEBAgUAMD4xCzAJBgNVBAYTAlVT |
| 28 | MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xFjAUBgNVBAsTDVRFU1QgUm9vdCBQQ0Ew | 28 | MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEWMBQGA1UECxMNVEVTVCBSb290IFBD |
| 29 | HhcNOTYwNzE3MDAwMDAwWhcNOTcwNzE3MjM1OTU5WjBiMREwDwYDVQQHEwhJbnRl | 29 | QTAeFw05NjA3MTcwMDAwMDBaFw05NzA3MTcyMzU5NTlaMGIxETAPBgNVBAcTCElu |
| 30 | cm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNVBAsTK1ZlcmlTaWdu | 30 | dGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNp |
| 31 | IENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXIwXDANBgkqhkiG9w0B | 31 | Z24gQ2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjBcMA0GCSqGSIb3 |
| 32 | AQEFAANLADBIAkEA7Fc6zYJw4WwCWa1ni3fYNbzGSQNluuw990024GusjLfhEk1h | 32 | DQEBAQUAA0sAMEgCQQDsVzrNgnDhbAJZrWeLd9g1vMZJA2W67D33TTbga6yMt+ES |
| 33 | MsIUukTT/n8yxoO7rYp4x+LS+tHF2tBtuxg7CwIDAQABoyIwIDALBgNVHQ8EBAMC | 33 | TWEywhS6RNP+fzLGg7utinjH4tL60cXa0G27GDsLAgMBAAGjIjAgMAsGA1UdDwQE |
| 34 | AQYwEQYJYIZIAYb4QgEBBAQDAgIEMA0GCSqGSIb3DQEBAgUAA0EAFKem0cJGg9nd | 34 | AwIBBjARBglghkgBhvhCAQEEBAMCAgQwDQYJKoZIhvcNAQECBQADQQAUp6bRwkaD |
| 35 | TAbP5o1HIEyNn11ZlvLU5v1Hejs1MKQt72IMm4jjgOH+pjguXW8lB6yzrK4oVOO2 | 35 | 2d1MBs/mjUcgTI2fXVmW8tTm/Ud6OzUwpC3vYgybiOOA4f6mOC5dbyUHrLOsrihU |
| 36 | UNCaNQ1H26GCAa0wgcEwbTANBgkqhkiG9w0BAQIFADA+MQswCQYDVQQGEwJVUzEX | 36 | 47ZQ0Jo1DUfboYIBrTCBwTBtMA0GCSqGSIb3DQEBAgUAMD4xCzAJBgNVBAYTAlVT |
| 37 | MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xFjAUBgNVBAsTDVRFU1QgUm9vdCBQQ0EX | 37 | MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEWMBQGA1UECxMNVEVTVCBSb290IFBD |
| 38 | DTk2MDcxNzE3NDQwOVoXDTk4MDcxNzAwMDAwMFowDQYJKoZIhvcNAQECBQADQQB4 | 38 | QRcNOTYwNzE3MTc0NDA5WhcNOTgwNzE3MDAwMDAwWjANBgkqhkiG9w0BAQIFAANB |
| 39 | rQNP8QLpAox83odQDE/5dqAuvDfshW/miTxwQTMXOoBtjGiowTcG+YXF1JZTJRMT | 39 | AHitA0/xAukCjHzeh1AMT/l2oC68N+yFb+aJPHBBMxc6gG2MaKjBNwb5hcXUllMl |
| 40 | jQN47tdH+6MCKt7N8MddMIHmMIGRMA0GCSqGSIb3DQEBAgUAMGIxETAPBgNVBAcT | 40 | ExONA3ju10f7owIq3s3wx10wgeYwgZEwDQYJKoZIhvcNAQECBQAwYjERMA8GA1UE |
| 41 | CEludGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVy | 41 | BxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytW |
| 42 | aVNpZ24gQ2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlchcNOTYwNzE3 | 42 | ZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyFw05NjA3 |
| 43 | MTc1OTI5WhcNOTcwNzE4MDAwMDAwWjANBgkqhkiG9w0BAQIFAANBALm1VmE7FrEJ | 43 | MTcxNzU5MjlaFw05NzA3MTgwMDAwMDBaMA0GCSqGSIb3DQEBAgUAA0EAubVWYTsW |
| 44 | rLXvX/lIDMPAZIw5TNuX8EC6wn5ppy8Y3sHstdJEkTsqVGiS2/q+KEQC3NHxvV32 | 44 | sQmste9f+UgMw8BkjDlM25fwQLrCfmmnLxjewey10kSROypUaJLb+r4oRALc0fG9 |
| 45 | bGooiIKLUB4xAAAAAAA= | 45 | XfZsaiiIgotQHjEA |
| 46 | -----END PKCS7----- | 46 | -----END PKCS7----- |
diff --git a/src/lib/libssl/test/tests.com b/src/lib/libssl/test/tests.com index 040dafab8d..df8f46e75d 100644 --- a/src/lib/libssl/test/tests.com +++ b/src/lib/libssl/test/tests.com | |||
| @@ -19,11 +19,12 @@ $ then | |||
| 19 | $ tests = p1 | 19 | $ tests = p1 |
| 20 | $ else | 20 | $ else |
| 21 | $ tests := - | 21 | $ tests := - |
| 22 | test_des,test_idea,test_sha,test_md5,test_hmac,test_md2,test_mdc2,- | 22 | test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,- |
| 23 | test_md2,test_mdc2,- | ||
| 23 | test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,- | 24 | test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,- |
| 24 | test_rand,test_bn,test_enc,test_x509,test_rsa,test_crl,test_sid,- | 25 | test_rand,test_bn,test_enc,test_x509,test_rsa,test_crl,test_sid,- |
| 25 | test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- | 26 | test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- |
| 26 | test_ss,test_ssl,test_ca | 27 | test_ss,test_ca,test_ssl |
| 27 | $ endif | 28 | $ endif |
| 28 | $ tests = f$edit(tests,"COLLAPSE") | 29 | $ tests = f$edit(tests,"COLLAPSE") |
| 29 | $ | 30 | $ |
| @@ -35,6 +36,7 @@ $ SHA1TEST := sha1test | |||
| 35 | $ MDC2TEST := mdc2test | 36 | $ MDC2TEST := mdc2test |
| 36 | $ RMDTEST := rmdtest | 37 | $ RMDTEST := rmdtest |
| 37 | $ MD2TEST := md2test | 38 | $ MD2TEST := md2test |
| 39 | $ MD4TEST := md4test | ||
| 38 | $ MD5TEST := md5test | 40 | $ MD5TEST := md5test |
| 39 | $ HMACTEST := hmactest | 41 | $ HMACTEST := hmactest |
| 40 | $ RC2TEST := rc2test | 42 | $ RC2TEST := rc2test |
| @@ -55,54 +57,58 @@ $ loop_tests: | |||
| 55 | $ tests_e = f$element(tests_i,",",tests) | 57 | $ tests_e = f$element(tests_i,",",tests) |
| 56 | $ tests_i = tests_i + 1 | 58 | $ tests_i = tests_i + 1 |
| 57 | $ if tests_e .eqs. "," then goto exit | 59 | $ if tests_e .eqs. "," then goto exit |
| 58 | $ goto 'tests_e' | 60 | $ gosub 'tests_e' |
| 61 | $ goto loop_tests | ||
| 59 | $ | 62 | $ |
| 60 | $ test_des: | 63 | $ test_des: |
| 61 | $ mcr 'texe_dir''destest' | 64 | $ mcr 'texe_dir''destest' |
| 62 | $ goto loop_tests | 65 | $ return |
| 63 | $ test_idea: | 66 | $ test_idea: |
| 64 | $ mcr 'texe_dir''ideatest' | 67 | $ mcr 'texe_dir''ideatest' |
| 65 | $ goto loop_tests | 68 | $ return |
| 66 | $ test_sha: | 69 | $ test_sha: |
| 67 | $ mcr 'texe_dir''shatest' | 70 | $ mcr 'texe_dir''shatest' |
| 68 | $ mcr 'texe_dir''sha1test' | 71 | $ mcr 'texe_dir''sha1test' |
| 69 | $ goto loop_tests | 72 | $ return |
| 70 | $ test_mdc2: | 73 | $ test_mdc2: |
| 71 | $ mcr 'texe_dir''mdc2test' | 74 | $ mcr 'texe_dir''mdc2test' |
| 72 | $ goto loop_tests | 75 | $ return |
| 73 | $ test_md5: | 76 | $ test_md5: |
| 74 | $ mcr 'texe_dir''md5test' | 77 | $ mcr 'texe_dir''md5test' |
| 75 | $ goto loop_tests | 78 | $ return |
| 79 | $ test_md4: | ||
| 80 | $ mcr 'texe_dir''md4test' | ||
| 81 | $ return | ||
| 76 | $ test_hmac: | 82 | $ test_hmac: |
| 77 | $ mcr 'texe_dir''hmactest' | 83 | $ mcr 'texe_dir''hmactest' |
| 78 | $ goto loop_tests | 84 | $ return |
| 79 | $ test_md2: | 85 | $ test_md2: |
| 80 | $ mcr 'texe_dir''md2test' | 86 | $ mcr 'texe_dir''md2test' |
| 81 | $ goto loop_tests | 87 | $ return |
| 82 | $ test_rmd: | 88 | $ test_rmd: |
| 83 | $ mcr 'texe_dir''rmdtest' | 89 | $ mcr 'texe_dir''rmdtest' |
| 84 | $ goto loop_tests | 90 | $ return |
| 85 | $ test_bf: | 91 | $ test_bf: |
| 86 | $ mcr 'texe_dir''bftest' | 92 | $ mcr 'texe_dir''bftest' |
| 87 | $ goto loop_tests | 93 | $ return |
| 88 | $ test_cast: | 94 | $ test_cast: |
| 89 | $ mcr 'texe_dir''casttest' | 95 | $ mcr 'texe_dir''casttest' |
| 90 | $ goto loop_tests | 96 | $ return |
| 91 | $ test_rc2: | 97 | $ test_rc2: |
| 92 | $ mcr 'texe_dir''rc2test' | 98 | $ mcr 'texe_dir''rc2test' |
| 93 | $ goto loop_tests | 99 | $ return |
| 94 | $ test_rc4: | 100 | $ test_rc4: |
| 95 | $ mcr 'texe_dir''rc4test' | 101 | $ mcr 'texe_dir''rc4test' |
| 96 | $ goto loop_tests | 102 | $ return |
| 97 | $ test_rc5: | 103 | $ test_rc5: |
| 98 | $ mcr 'texe_dir''rc5test' | 104 | $ mcr 'texe_dir''rc5test' |
| 99 | $ goto loop_tests | 105 | $ return |
| 100 | $ test_rand: | 106 | $ test_rand: |
| 101 | $ mcr 'texe_dir''randtest' | 107 | $ mcr 'texe_dir''randtest' |
| 102 | $ goto loop_tests | 108 | $ return |
| 103 | $ test_enc: | 109 | $ test_enc: |
| 104 | $ @testenc.com | 110 | $ @testenc.com |
| 105 | $ goto loop_tests | 111 | $ return |
| 106 | $ test_x509: | 112 | $ test_x509: |
| 107 | $ define sys$error nla0: | 113 | $ define sys$error nla0: |
| 108 | $ write sys$output "test normal x509v1 certificate" | 114 | $ write sys$output "test normal x509v1 certificate" |
| @@ -112,35 +118,35 @@ $ @tx509.com v3-cert1.pem | |||
| 112 | $ write sys$output "test second x509v3 certificate" | 118 | $ write sys$output "test second x509v3 certificate" |
| 113 | $ @tx509.com v3-cert2.pem | 119 | $ @tx509.com v3-cert2.pem |
| 114 | $ deassign sys$error | 120 | $ deassign sys$error |
| 115 | $ goto loop_tests | 121 | $ return |
| 116 | $ test_rsa: | 122 | $ test_rsa: |
| 117 | $ define sys$error nla0: | 123 | $ define sys$error nla0: |
| 118 | $ @trsa.com | 124 | $ @trsa.com |
| 119 | $ deassign sys$error | 125 | $ deassign sys$error |
| 120 | $ mcr 'texe_dir''rsatest' | 126 | $ mcr 'texe_dir''rsatest' |
| 121 | $ goto loop_tests | 127 | $ return |
| 122 | $ test_crl: | 128 | $ test_crl: |
| 123 | $ define sys$error nla0: | 129 | $ define sys$error nla0: |
| 124 | $ @tcrl.com | 130 | $ @tcrl.com |
| 125 | $ deassign sys$error | 131 | $ deassign sys$error |
| 126 | $ goto loop_tests | 132 | $ return |
| 127 | $ test_sid: | 133 | $ test_sid: |
| 128 | $ define sys$error nla0: | 134 | $ define sys$error nla0: |
| 129 | $ @tsid.com | 135 | $ @tsid.com |
| 130 | $ deassign sys$error | 136 | $ deassign sys$error |
| 131 | $ goto loop_tests | 137 | $ return |
| 132 | $ test_req: | 138 | $ test_req: |
| 133 | $ define sys$error nla0: | 139 | $ define sys$error nla0: |
| 134 | $ @treq.com | 140 | $ @treq.com |
| 135 | $ @treq.com testreq2.pem | 141 | $ @treq.com testreq2.pem |
| 136 | $ deassign sys$error | 142 | $ deassign sys$error |
| 137 | $ goto loop_tests | 143 | $ return |
| 138 | $ test_pkcs7: | 144 | $ test_pkcs7: |
| 139 | $ define sys$error nla0: | 145 | $ define sys$error nla0: |
| 140 | $ @tpkcs7.com | 146 | $ @tpkcs7.com |
| 141 | $ @tpkcs7d.com | 147 | $ @tpkcs7d.com |
| 142 | $ deassign sys$error | 148 | $ deassign sys$error |
| 143 | $ goto loop_tests | 149 | $ return |
| 144 | $ test_bn: | 150 | $ test_bn: |
| 145 | $ write sys$output "starting big number library test, could take a while..." | 151 | $ write sys$output "starting big number library test, could take a while..." |
| 146 | $ create bntest-vms.fdl | 152 | $ create bntest-vms.fdl |
| @@ -164,36 +170,56 @@ $ write sys$output "-- through sh or bash to verify that the bignum operations w | |||
| 164 | $ write sys$output "" | 170 | $ write sys$output "" |
| 165 | $ write sys$output "test a^b%c implementations" | 171 | $ write sys$output "test a^b%c implementations" |
| 166 | $ mcr 'texe_dir''exptest' | 172 | $ mcr 'texe_dir''exptest' |
| 167 | $ goto loop_tests | 173 | $ return |
| 168 | $ test_verify: | 174 | $ test_verify: |
| 169 | $ write sys$output "The following command should have some OK's and some failures" | 175 | $ write sys$output "The following command should have some OK's and some failures" |
| 170 | $ write sys$output "There are definitly a few expired certificates" | 176 | $ write sys$output "There are definitly a few expired certificates" |
| 171 | $ @tverify.com | 177 | $ @tverify.com |
| 172 | $ goto loop_tests | 178 | $ return |
| 173 | $ test_dh: | 179 | $ test_dh: |
| 174 | $ write sys$output "Generate a set of DH parameters" | 180 | $ write sys$output "Generate a set of DH parameters" |
| 175 | $ mcr 'texe_dir''dhtest' | 181 | $ mcr 'texe_dir''dhtest' |
| 176 | $ goto loop_tests | 182 | $ return |
| 177 | $ test_dsa: | 183 | $ test_dsa: |
| 178 | $ write sys$output "Generate a set of DSA parameters" | 184 | $ write sys$output "Generate a set of DSA parameters" |
| 179 | $ mcr 'texe_dir''dsatest' | 185 | $ mcr 'texe_dir''dsatest' |
| 180 | $ goto loop_tests | 186 | $ return |
| 181 | $ test_gen: | 187 | $ test_gen: |
| 182 | $ write sys$output "Generate and verify a certificate request" | 188 | $ write sys$output "Generate and verify a certificate request" |
| 183 | $ @testgen.com | 189 | $ @testgen.com |
| 184 | $ goto loop_tests | 190 | $ return |
| 191 | $ maybe_test_ss: | ||
| 192 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) | ||
| 193 | $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then - | ||
| 194 | goto test_ss | ||
| 195 | $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then - | ||
| 196 | goto test_ss | ||
| 197 | $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then - | ||
| 198 | goto test_ss | ||
| 199 | $ return | ||
| 185 | $ test_ss: | 200 | $ test_ss: |
| 186 | $ write sys$output "Generate and certify a test certificate" | 201 | $ write sys$output "Generate and certify a test certificate" |
| 187 | $ @testss.com | 202 | $ @testss.com |
| 188 | $ goto loop_tests | 203 | $ return |
| 189 | $ test_ssl: | 204 | $ test_ssl: |
| 190 | $ write sys$output "test SSL protocol" | 205 | $ write sys$output "test SSL protocol" |
| 191 | $ @testssl.com | 206 | $ gosub maybe_test_ss |
| 192 | $ goto loop_tests | 207 | $ @testssl.com keyU.ss certU.ss certCA.ss |
| 208 | $ return | ||
| 193 | $ test_ca: | 209 | $ test_ca: |
| 194 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | 210 | $ set noon |
| 195 | $ @testca.com | 211 | $ define/user sys$output nla0: |
| 196 | $ goto loop_tests | 212 | $ mcr 'exe_dir'openssl no-rsa |
| 213 | $ save_severity=$SEVERITY | ||
| 214 | $ set on | ||
| 215 | $ if save_severity | ||
| 216 | $ then | ||
| 217 | $ write sys$output "skipping CA.com test -- requires RSA" | ||
| 218 | $ else | ||
| 219 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | ||
| 220 | $ @testca.com | ||
| 221 | $ endif | ||
| 222 | $ return | ||
| 197 | $ | 223 | $ |
| 198 | $ | 224 | $ |
| 199 | $ exit: | 225 | $ exit: |
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h index 6e2b06d34f..cf92ae034f 100644 --- a/src/lib/libssl/tls1.h +++ b/src/lib/libssl/tls1.h | |||
| @@ -84,6 +84,10 @@ extern "C" { | |||
| 84 | #define TLS1_AD_USER_CANCELLED 90 | 84 | #define TLS1_AD_USER_CANCELLED 90 |
| 85 | #define TLS1_AD_NO_RENEGOTIATION 100 | 85 | #define TLS1_AD_NO_RENEGOTIATION 100 |
| 86 | 86 | ||
| 87 | /* Additional TLS ciphersuites from draft-ietf-tls-56-bit-ciphersuites-00.txt | ||
| 88 | * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see | ||
| 89 | * s3_lib.c). We actually treat them like SSL 3.0 ciphers, which we probably | ||
| 90 | * shouldn't. */ | ||
| 87 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 | 91 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 |
| 88 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 | 92 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 |
| 89 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 | 93 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 |
| @@ -92,6 +96,13 @@ extern "C" { | |||
| 92 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065 | 96 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065 |
| 93 | #define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066 | 97 | #define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066 |
| 94 | 98 | ||
| 99 | /* XXX | ||
| 100 | * Inconsistency alert: | ||
| 101 | * The OpenSSL names of ciphers with ephemeral DH here include the string | ||
| 102 | * "DHE", while elsewhere it has always been "EDH". | ||
| 103 | * (The alias for the list of all such ciphers also is "EDH".) | ||
| 104 | * The specifications speak of "EDH"; maybe we should allow both forms | ||
| 105 | * for everything. */ | ||
| 95 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5" | 106 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5" |
| 96 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5" | 107 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5" |
| 97 | #define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA" | 108 | #define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA" |
