summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl')
-rw-r--r--src/lib/libssl/LICENSE127
-rw-r--r--src/lib/libssl/Makefile11
-rw-r--r--src/lib/libssl/bio_ssl.c598
-rw-r--r--src/lib/libssl/crypto/Makefile294
-rw-r--r--src/lib/libssl/crypto/arch/alpha/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/amd64/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/arm/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/hppa/opensslconf.h (renamed from src/lib/libssl/src/crypto/opensslconf.h)10
-rw-r--r--src/lib/libssl/crypto/arch/i386/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/m68k/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/m88k/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/mips/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/powerpc/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/sparc/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/sparc64/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/arch/vax/bn_asm_vax.S436
-rw-r--r--src/lib/libssl/crypto/arch/vax/opensslconf.h180
-rw-r--r--src/lib/libssl/crypto/shlib_version2
-rw-r--r--src/lib/libssl/doc/openssl.cnf255
-rw-r--r--src/lib/libssl/doc/openssl.txt1235
-rw-r--r--src/lib/libssl/doc/standards.txt257
-rw-r--r--src/lib/libssl/man/Makefile799
-rw-r--r--src/lib/libssl/openssl.cnf65
-rw-r--r--src/lib/libssl/s23_clnt.c490
-rw-r--r--src/lib/libssl/s23_lib.c236
-rw-r--r--src/lib/libssl/s23_pkt.c117
-rw-r--r--src/lib/libssl/s23_srvr.c596
-rw-r--r--src/lib/libssl/s3_both.c635
-rw-r--r--src/lib/libssl/s3_clnt.c1980
-rw-r--r--src/lib/libssl/s3_lib.c1799
-rw-r--r--src/lib/libssl/s3_pkt.c1310
-rw-r--r--src/lib/libssl/s3_srvr.c2077
-rw-r--r--src/lib/libssl/shlib_version2
-rw-r--r--src/lib/libssl/src/CHANGES45
-rw-r--r--src/lib/libssl/src/Configure19
-rw-r--r--src/lib/libssl/src/FAQ7
-rw-r--r--src/lib/libssl/src/LICENSE2
-rw-r--r--src/lib/libssl/src/Makefile.org10
-rw-r--r--src/lib/libssl/src/NEWS8
-rw-r--r--src/lib/libssl/src/PROBLEMS131
-rw-r--r--src/lib/libssl/src/README4
-rw-r--r--src/lib/libssl/src/apps/CA.pl173
-rw-r--r--src/lib/libssl/src/apps/Makefile.ssl1146
-rw-r--r--src/lib/libssl/src/apps/apps.c559
-rw-r--r--src/lib/libssl/src/apps/apps.h33
-rw-r--r--src/lib/libssl/src/apps/asn1pars.c10
-rw-r--r--src/lib/libssl/src/apps/ca.c540
-rw-r--r--src/lib/libssl/src/apps/der_chop.in305
-rw-r--r--src/lib/libssl/src/apps/dgst.c2
-rw-r--r--src/lib/libssl/src/apps/dhparam.c2
-rw-r--r--src/lib/libssl/src/apps/enc.c6
-rw-r--r--src/lib/libssl/src/apps/engine.c4
-rw-r--r--src/lib/libssl/src/apps/ocsp.c46
-rw-r--r--src/lib/libssl/src/apps/openssl.cnf5
-rw-r--r--src/lib/libssl/src/apps/pkcs12.c4
-rw-r--r--src/lib/libssl/src/apps/pkcs7.c3
-rw-r--r--src/lib/libssl/src/apps/req.c34
-rw-r--r--src/lib/libssl/src/apps/rsautl.c12
-rw-r--r--src/lib/libssl/src/apps/s_apps.h4
-rw-r--r--src/lib/libssl/src/apps/s_client.c18
-rw-r--r--src/lib/libssl/src/apps/s_socket.c123
-rw-r--r--src/lib/libssl/src/apps/s_time.c6
-rw-r--r--src/lib/libssl/src/apps/speed.c7
-rw-r--r--src/lib/libssl/src/apps/x509.c78
-rw-r--r--src/lib/libssl/src/certs/ICE-CA.pem59
-rw-r--r--src/lib/libssl/src/certs/ICE-root.pem48
-rw-r--r--src/lib/libssl/src/certs/ICE-user.pem63
-rw-r--r--src/lib/libssl/src/certs/ICE.crl9
-rw-r--r--src/lib/libssl/src/certs/RegTP-4R.pem19
-rw-r--r--src/lib/libssl/src/certs/ca-cert.pem33
-rw-r--r--src/lib/libssl/src/certs/dsa-ca.pem43
-rw-r--r--src/lib/libssl/src/certs/dsa-pca.pem49
-rw-r--r--src/lib/libssl/src/certs/factory.pem15
-rw-r--r--src/lib/libssl/src/certs/nortelCA.pem16
-rw-r--r--src/lib/libssl/src/certs/pca-cert.pem33
-rw-r--r--src/lib/libssl/src/certs/rsa-cca.pem19
-rw-r--r--src/lib/libssl/src/certs/timCA.pem16
-rw-r--r--src/lib/libssl/src/certs/tjhCA.pem15
-rw-r--r--src/lib/libssl/src/certs/vsign2.pem18
-rw-r--r--src/lib/libssl/src/certs/vsign3.pem27
-rw-r--r--src/lib/libssl/src/certs/vsigntca.pem18
-rw-r--r--src/lib/libssl/src/config13
-rw-r--r--src/lib/libssl/src/crypto/Makefile133
-rw-r--r--src/lib/libssl/src/crypto/Makefile.ssl218
-rw-r--r--src/lib/libssl/src/crypto/acss/acss.h47
-rw-r--r--src/lib/libssl/src/crypto/acss/acss_enc.c177
-rw-r--r--src/lib/libssl/src/crypto/acss/acss_skey.c86
-rw-r--r--src/lib/libssl/src/crypto/aes/Makefile.ssl103
-rw-r--r--src/lib/libssl/src/crypto/aes/aes_cbc.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/Makefile.ssl1152
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_bytes.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_gentm.c6
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_mbstr.c4
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_strex.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_time.c6
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_utctm.c6
-rw-r--r--src/lib/libssl/src/crypto/asn1/asn1_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/asn1/asn1_par.c6
-rw-r--r--src/lib/libssl/src/crypto/asn1/asn_moid.c9
-rw-r--r--src/lib/libssl/src/crypto/asn1/f.c80
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_pkey.c4
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_x509.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_cinf.c201
-rw-r--r--src/lib/libssl/src/crypto/bf/Makefile.ssl114
-rw-r--r--src/lib/libssl/src/crypto/bf/asm/bf-586.pl2
-rw-r--r--src/lib/libssl/src/crypto/bio/Makefile.ssl216
-rw-r--r--src/lib/libssl/src/crypto/bio/b_dump.c24
-rw-r--r--src/lib/libssl/src/crypto/bio/b_print.c12
-rw-r--r--src/lib/libssl/src/crypto/bio/b_sock.c12
-rw-r--r--src/lib/libssl/src/crypto/bio/bio_cb.c30
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_conn.c6
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_file.c10
-rw-r--r--src/lib/libssl/src/crypto/bn/Makefile.ssl323
-rw-r--r--src/lib/libssl/src/crypto/bn/asm/bn-586.pl2
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_lcl.h17
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_lib.c8
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_print.c10
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_word.c6
-rw-r--r--src/lib/libssl/src/crypto/bn/bntest.c4
-rw-r--r--src/lib/libssl/src/crypto/buffer/Makefile.ssl94
-rw-r--r--src/lib/libssl/src/crypto/cast/Makefile.ssl119
-rw-r--r--src/lib/libssl/src/crypto/cast/asm/cast-586.pl2
-rw-r--r--src/lib/libssl/src/crypto/cast/c_enc.c2
-rw-r--r--src/lib/libssl/src/crypto/comp/Makefile.ssl114
-rw-r--r--src/lib/libssl/src/crypto/conf/Makefile.ssl183
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_def.c6
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_mod.c12
-rw-r--r--src/lib/libssl/src/crypto/cversion.c6
-rw-r--r--src/lib/libssl/src/crypto/des/Makefile.ssl314
-rw-r--r--src/lib/libssl/src/crypto/des/asm/des-586.pl12
-rw-r--r--src/lib/libssl/src/crypto/des/cfb_enc.c21
-rw-r--r--src/lib/libssl/src/crypto/des/des.h6
-rw-r--r--src/lib/libssl/src/crypto/des/des_enc.c2
-rw-r--r--src/lib/libssl/src/crypto/des/des_old.h6
-rw-r--r--src/lib/libssl/src/crypto/des/ecb_enc.c5
-rw-r--r--src/lib/libssl/src/crypto/dh/Makefile.ssl133
-rw-r--r--src/lib/libssl/src/crypto/dh/dh.h2
-rw-r--r--src/lib/libssl/src/crypto/dsa/Makefile.ssl171
-rw-r--r--src/lib/libssl/src/crypto/dso/Makefile.ssl142
-rw-r--r--src/lib/libssl/src/crypto/dso/dso_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/ec/Makefile.ssl128
-rw-r--r--src/lib/libssl/src/crypto/ec/ecp_smpl.c2
-rw-r--r--src/lib/libssl/src/crypto/ec/ectest.c2
-rw-r--r--src/lib/libssl/src/crypto/engine/Makefile.ssl538
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_ctrl.c14
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_fat.c6
-rw-r--r--src/lib/libssl/src/crypto/engine/engine.h27
-rw-r--r--src/lib/libssl/src/crypto/engine/hw_cryptodev.c332
-rw-r--r--src/lib/libssl/src/crypto/err/Makefile.ssl119
-rw-r--r--src/lib/libssl/src/crypto/err/err.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/Makefile.ssl1059
-rw-r--r--src/lib/libssl/src/crypto/evp/digest.c15
-rw-r--r--src/lib/libssl/src/crypto/evp/e_acss.c85
-rw-r--r--src/lib/libssl/src/crypto/evp/evp.h60
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_enc.c14
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_pbe.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_pkey.c2
-rw-r--r--src/lib/libssl/src/crypto/hmac/Makefile.ssl101
-rw-r--r--src/lib/libssl/src/crypto/idea/Makefile.ssl91
-rw-r--r--src/lib/libssl/src/crypto/krb5/Makefile.ssl90
-rw-r--r--src/lib/libssl/src/crypto/lhash/Makefile.ssl93
-rw-r--r--src/lib/libssl/src/crypto/md2/Makefile.ssl93
-rw-r--r--src/lib/libssl/src/crypto/md4/Makefile.ssl91
-rw-r--r--src/lib/libssl/src/crypto/md5/Makefile.ssl127
-rw-r--r--src/lib/libssl/src/crypto/mdc2/Makefile.ssl98
-rw-r--r--src/lib/libssl/src/crypto/mem.c8
-rw-r--r--src/lib/libssl/src/crypto/mem_dbg.c16
-rw-r--r--src/lib/libssl/src/crypto/objects/Makefile.ssl123
-rw-r--r--src/lib/libssl/src/crypto/objects/obj_dat.c4
-rw-r--r--src/lib/libssl/src/crypto/objects/obj_dat.h3644
-rw-r--r--src/lib/libssl/src/crypto/objects/obj_mac.h2868
-rw-r--r--src/lib/libssl/src/crypto/objects/objects.pl13
-rw-r--r--src/lib/libssl/src/crypto/ocsp/Makefile.ssl293
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_ext.c24
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_lib.c1
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c6
-rw-r--r--src/lib/libssl/src/crypto/opensslv.h4
-rw-r--r--src/lib/libssl/src/crypto/pem/Makefile.ssl336
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_lib.c19
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_pkey.c4
-rw-r--r--src/lib/libssl/src/crypto/perlasm/x86asm.pl8
-rw-r--r--src/lib/libssl/src/crypto/perlasm/x86unix.pl35
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/Makefile.ssl417
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/Makefile.ssl243
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pk7_doit.c58
-rw-r--r--src/lib/libssl/src/crypto/rand/Makefile.ssl194
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_egd.c3
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_win.c2
-rw-r--r--src/lib/libssl/src/crypto/rand/randfile.c26
-rw-r--r--src/lib/libssl/src/crypto/rc2/Makefile.ssl91
-rw-r--r--src/lib/libssl/src/crypto/rc4/Makefile.ssl109
-rw-r--r--src/lib/libssl/src/crypto/rc5/Makefile.ssl107
-rw-r--r--src/lib/libssl/src/crypto/ripemd/Makefile.ssl107
-rw-r--r--src/lib/libssl/src/crypto/ripemd/rmd_dgst.c4
-rw-r--r--src/lib/libssl/src/crypto/rsa/Makefile.ssl241
-rw-r--r--src/lib/libssl/src/crypto/sha/Makefile.ssl115
-rw-r--r--src/lib/libssl/src/crypto/sha/asm/sha1-586.pl291
-rw-r--r--src/lib/libssl/src/crypto/stack/Makefile.ssl88
-rw-r--r--src/lib/libssl/src/crypto/threads/mttest.c2
-rw-r--r--src/lib/libssl/src/crypto/txt_db/Makefile.ssl88
-rw-r--r--src/lib/libssl/src/crypto/ui/Makefile.ssl117
-rw-r--r--src/lib/libssl/src/crypto/ui/ui_lib.c14
-rw-r--r--src/lib/libssl/src/crypto/x509/Makefile.ssl594
-rw-r--r--src/lib/libssl/src/crypto/x509/by_dir.c34
-rw-r--r--src/lib/libssl/src/crypto/x509/x509.h4
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_txt.c8
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_vfy.c55
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_vfy.h19
-rw-r--r--src/lib/libssl/src/crypto/x509/x509type.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/Makefile.ssl603
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_alt.c4
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_crld.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_info.c6
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_purp.c5
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_utl.c2
-rw-r--r--src/lib/libssl/src/demos/easy_tls/Makefile2
-rw-r--r--src/lib/libssl/src/demos/easy_tls/cacerts.pem2
-rw-r--r--src/lib/libssl/src/demos/easy_tls/cert.pem2
-rw-r--r--src/lib/libssl/src/demos/easy_tls/easy-tls.c4
-rw-r--r--src/lib/libssl/src/demos/easy_tls/easy-tls.h2
-rw-r--r--src/lib/libssl/src/demos/easy_tls/test.c2
-rw-r--r--src/lib/libssl/src/demos/easy_tls/test.h2
-rw-r--r--src/lib/libssl/src/doc/apps/config.pod140
-rw-r--r--src/lib/libssl/src/doc/apps/openssl.pod3
-rw-r--r--src/lib/libssl/src/doc/apps/s_client.pod6
-rw-r--r--src/lib/libssl/src/doc/apps/smime.pod11
-rw-r--r--src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod6
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_BytesToKey.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod8
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_SignInit.pod8
-rw-r--r--src/lib/libssl/src/doc/crypto/acss.pod66
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod5
-rw-r--r--src/lib/libssl/src/doc/crypto/des.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/des_modes.pod5
-rw-r--r--src/lib/libssl/src/doc/crypto/dsa.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/hmac.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/mdc2.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/pem.pod6
-rw-r--r--src/lib/libssl/src/doc/crypto/ripemd.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/sha.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/ui.pod2
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod2
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_COMP_add_compression_method.pod4
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod2
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod2
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_free.pod2
-rw-r--r--src/lib/libssl/src/doc/ssl/ssl.pod2
-rw-r--r--src/lib/libssl/src/doc/ssleay.txt2
-rw-r--r--src/lib/libssl/src/openssl.spec2
-rw-r--r--src/lib/libssl/src/os2/OS2-EMX.cmd36
-rw-r--r--src/lib/libssl/src/ssl/Makefile.ssl1024
-rw-r--r--src/lib/libssl/src/ssl/kssl.c4
-rw-r--r--src/lib/libssl/src/ssl/s3_clnt.c6
-rw-r--r--src/lib/libssl/src/ssl/s3_enc.c12
-rw-r--r--src/lib/libssl/src/ssl/ssl.h4
-rw-r--r--src/lib/libssl/src/ssl/ssl_cert.c12
-rw-r--r--src/lib/libssl/src/ssl/ssl_ciph.c85
-rw-r--r--src/lib/libssl/src/ssl/ssltest.c14
-rw-r--r--src/lib/libssl/src/test/Makefile.ssl796
-rw-r--r--src/lib/libssl/src/test/enginetest.c274
-rw-r--r--src/lib/libssl/src/test/md4test.c134
-rw-r--r--src/lib/libssl/src/test/rsa_test.c318
-rw-r--r--src/lib/libssl/src/tools/Makefile.ssl64
-rw-r--r--src/lib/libssl/src/tools/c_rehash160
-rw-r--r--src/lib/libssl/src/util/mk1mf.pl2
-rw-r--r--src/lib/libssl/src/util/mkdef.pl38
-rw-r--r--src/lib/libssl/src/util/pl/OS2-EMX.pl42
-rw-r--r--src/lib/libssl/ssl.h1854
-rw-r--r--src/lib/libssl/ssl/Makefile55
-rw-r--r--src/lib/libssl/ssl/shlib_version2
-rw-r--r--src/lib/libssl/ssl2.h268
-rw-r--r--src/lib/libssl/ssl23.h83
-rw-r--r--src/lib/libssl/ssl3.h526
-rw-r--r--src/lib/libssl/ssl_algs.c111
-rw-r--r--src/lib/libssl/ssl_asn1.c398
-rw-r--r--src/lib/libssl/ssl_cert.c860
-rw-r--r--src/lib/libssl/ssl_ciph.c1145
-rw-r--r--src/lib/libssl/ssl_err.c461
-rw-r--r--src/lib/libssl/ssl_err2.c70
-rw-r--r--src/lib/libssl/ssl_lib.c2319
-rw-r--r--src/lib/libssl/ssl_locl.h620
-rw-r--r--src/lib/libssl/ssl_rsa.c817
-rw-r--r--src/lib/libssl/ssl_sess.c754
-rw-r--r--src/lib/libssl/ssl_stat.c502
-rw-r--r--src/lib/libssl/ssl_txt.c186
-rw-r--r--src/lib/libssl/ssleay.cnf65
-rw-r--r--src/lib/libssl/t1_clnt.c97
-rw-r--r--src/lib/libssl/t1_enc.c814
-rw-r--r--src/lib/libssl/t1_lib.c149
-rw-r--r--src/lib/libssl/t1_meth.c96
-rw-r--r--src/lib/libssl/t1_srvr.c98
-rw-r--r--src/lib/libssl/test/CAss.cnf25
-rw-r--r--src/lib/libssl/test/CAssdh.cnf24
-rw-r--r--src/lib/libssl/test/CAssdsa.cnf23
-rw-r--r--src/lib/libssl/test/CAssrsa.cnf24
-rw-r--r--src/lib/libssl/test/Makefile.ssl796
-rw-r--r--src/lib/libssl/test/Sssdsa.cnf27
-rw-r--r--src/lib/libssl/test/Sssrsa.cnf26
-rw-r--r--src/lib/libssl/test/Uss.cnf28
-rw-r--r--src/lib/libssl/test/VMSca-response.11
-rw-r--r--src/lib/libssl/test/VMSca-response.22
-rw-r--r--src/lib/libssl/test/bctest111
-rw-r--r--src/lib/libssl/test/enginetest.c274
-rw-r--r--src/lib/libssl/test/md4test.c134
-rw-r--r--src/lib/libssl/test/methtest.c105
-rw-r--r--src/lib/libssl/test/pkcs7-1.pem15
-rw-r--r--src/lib/libssl/test/pkcs7.pem54
-rw-r--r--src/lib/libssl/test/r160test.c57
-rw-r--r--src/lib/libssl/test/rsa_test.c318
-rw-r--r--src/lib/libssl/test/tcrl85
-rw-r--r--src/lib/libssl/test/test.cnf88
-rw-r--r--src/lib/libssl/test/testca48
-rw-r--r--src/lib/libssl/test/testcrl.pem16
-rw-r--r--src/lib/libssl/test/testenc54
-rw-r--r--src/lib/libssl/test/testgen44
-rw-r--r--src/lib/libssl/test/testp7.pem46
-rw-r--r--src/lib/libssl/test/testreq2.pem7
-rw-r--r--src/lib/libssl/test/testrsa.pem9
-rw-r--r--src/lib/libssl/test/testsid.pem12
-rw-r--r--src/lib/libssl/test/testss99
-rw-r--r--src/lib/libssl/test/testssl145
-rw-r--r--src/lib/libssl/test/testx509.pem10
-rw-r--r--src/lib/libssl/test/times113
-rw-r--r--src/lib/libssl/test/tpkcs755
-rw-r--r--src/lib/libssl/test/tpkcs7d48
-rw-r--r--src/lib/libssl/test/treq90
-rw-r--r--src/lib/libssl/test/trsa90
-rw-r--r--src/lib/libssl/test/tsid85
-rw-r--r--src/lib/libssl/test/tx50985
-rw-r--r--src/lib/libssl/test/v3-cert1.pem16
-rw-r--r--src/lib/libssl/test/v3-cert2.pem16
-rw-r--r--src/lib/libssl/tls1.h195
-rw-r--r--src/lib/libssl/x509v3.cnf26
333 files changed, 47933 insertions, 9107 deletions
diff --git a/src/lib/libssl/LICENSE b/src/lib/libssl/LICENSE
new file mode 100644
index 0000000000..dddb07842b
--- /dev/null
+++ b/src/lib/libssl/LICENSE
@@ -0,0 +1,127 @@
1
2 LICENSE ISSUES
3 ==============
4
5 The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
6 the OpenSSL License and the original SSLeay license apply to the toolkit.
7 See below for the actual license texts. Actually both licenses are BSD-style
8 Open Source licenses. In case of any license issues related to OpenSSL
9 please contact openssl-core@openssl.org.
10
11 OpenSSL License
12 ---------------
13
14/* ====================================================================
15 * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 *
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 *
24 * 2. Redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in
26 * the documentation and/or other materials provided with the
27 * distribution.
28 *
29 * 3. All advertising materials mentioning features or use of this
30 * software must display the following acknowledgment:
31 * "This product includes software developed by the OpenSSL Project
32 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
33 *
34 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
35 * endorse or promote products derived from this software without
36 * prior written permission. For written permission, please contact
37 * openssl-core@openssl.org.
38 *
39 * 5. Products derived from this software may not be called "OpenSSL"
40 * nor may "OpenSSL" appear in their names without prior written
41 * permission of the OpenSSL Project.
42 *
43 * 6. Redistributions of any form whatsoever must retain the following
44 * acknowledgment:
45 * "This product includes software developed by the OpenSSL Project
46 * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
47 *
48 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
49 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
50 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
51 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
52 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
53 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
54 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
55 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
57 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
58 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59 * OF THE POSSIBILITY OF SUCH DAMAGE.
60 * ====================================================================
61 *
62 * This product includes cryptographic software written by Eric Young
63 * (eay@cryptsoft.com). This product includes software written by Tim
64 * Hudson (tjh@cryptsoft.com).
65 *
66 */
67
68 Original SSLeay License
69 -----------------------
70
71/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
72 * All rights reserved.
73 *
74 * This package is an SSL implementation written
75 * by Eric Young (eay@cryptsoft.com).
76 * The implementation was written so as to conform with Netscapes SSL.
77 *
78 * This library is free for commercial and non-commercial use as long as
79 * the following conditions are aheared to. The following conditions
80 * apply to all code found in this distribution, be it the RC4, RSA,
81 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
82 * included with this distribution is covered by the same copyright terms
83 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
84 *
85 * Copyright remains Eric Young's, and as such any Copyright notices in
86 * the code are not to be removed.
87 * If this package is used in a product, Eric Young should be given attribution
88 * as the author of the parts of the library used.
89 * This can be in the form of a textual message at program startup or
90 * in documentation (online or textual) provided with the package.
91 *
92 * Redistribution and use in source and binary forms, with or without
93 * modification, are permitted provided that the following conditions
94 * are met:
95 * 1. Redistributions of source code must retain the copyright
96 * notice, this list of conditions and the following disclaimer.
97 * 2. Redistributions in binary form must reproduce the above copyright
98 * notice, this list of conditions and the following disclaimer in the
99 * documentation and/or other materials provided with the distribution.
100 * 3. All advertising materials mentioning features or use of this software
101 * must display the following acknowledgement:
102 * "This product includes cryptographic software written by
103 * Eric Young (eay@cryptsoft.com)"
104 * The word 'cryptographic' can be left out if the rouines from the library
105 * being used are not cryptographic related :-).
106 * 4. If you include any Windows specific code (or a derivative thereof) from
107 * the apps directory (application code) you must include an acknowledgement:
108 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
109 *
110 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
111 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
112 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
113 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
114 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
115 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
116 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
117 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
118 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
119 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
120 * SUCH DAMAGE.
121 *
122 * The licence and distribution terms for any publically available version or
123 * derivative of this code cannot be changed. i.e. this code cannot simply be
124 * copied and put under another distribution licence
125 * [including the GNU Public Licence.]
126 */
127
diff --git a/src/lib/libssl/Makefile b/src/lib/libssl/Makefile
new file mode 100644
index 0000000000..80fb532c3c
--- /dev/null
+++ b/src/lib/libssl/Makefile
@@ -0,0 +1,11 @@
1# $OpenBSD: Makefile,v 1.13 2002/09/03 18:59:55 markus Exp $
2
3SUBDIR=crypto ssl man
4
5distribution:
6 ${INSTALL} ${INSTALL_COPY} -g ${BINGRP} -m 444 \
7 ${.CURDIR}/openssl.cnf ${DESTDIR}/etc/ssl/openssl.cnf && \
8 ${INSTALL} ${INSTALL_COPY} -g ${BINGRP} -m 444 \
9 ${.CURDIR}/x509v3.cnf ${DESTDIR}/etc/ssl/x509v3.cnf
10
11.include <bsd.subdir.mk>
diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c
new file mode 100644
index 0000000000..d683ee43e1
--- /dev/null
+++ b/src/lib/libssl/bio_ssl.c
@@ -0,0 +1,598 @@
1/* ssl/bio_ssl.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 <string.h>
62#include <errno.h>
63#include <openssl/crypto.h>
64#include <openssl/bio.h>
65#include <openssl/err.h>
66#include <openssl/ssl.h>
67
68static int ssl_write(BIO *h, const char *buf, int num);
69static int ssl_read(BIO *h, char *buf, int size);
70static int ssl_puts(BIO *h, const char *str);
71static long ssl_ctrl(BIO *h, int cmd, long arg1, void *arg2);
72static int ssl_new(BIO *h);
73static int ssl_free(BIO *data);
74static long ssl_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
75typedef struct bio_ssl_st
76 {
77 SSL *ssl; /* The ssl handle :-) */
78 /* re-negotiate every time the total number of bytes is this size */
79 int num_renegotiates;
80 unsigned long renegotiate_count;
81 unsigned long byte_count;
82 unsigned long renegotiate_timeout;
83 unsigned long last_time;
84 } BIO_SSL;
85
86static BIO_METHOD methods_sslp=
87 {
88 BIO_TYPE_SSL,"ssl",
89 ssl_write,
90 ssl_read,
91 ssl_puts,
92 NULL, /* ssl_gets, */
93 ssl_ctrl,
94 ssl_new,
95 ssl_free,
96 ssl_callback_ctrl,
97 };
98
99BIO_METHOD *BIO_f_ssl(void)
100 {
101 return(&methods_sslp);
102 }
103
104static int ssl_new(BIO *bi)
105 {
106 BIO_SSL *bs;
107
108 bs=(BIO_SSL *)OPENSSL_malloc(sizeof(BIO_SSL));
109 if (bs == NULL)
110 {
111 BIOerr(BIO_F_SSL_NEW,ERR_R_MALLOC_FAILURE);
112 return(0);
113 }
114 memset(bs,0,sizeof(BIO_SSL));
115 bi->init=0;
116 bi->ptr=(char *)bs;
117 bi->flags=0;
118 return(1);
119 }
120
121static int ssl_free(BIO *a)
122 {
123 BIO_SSL *bs;
124
125 if (a == NULL) return(0);
126 bs=(BIO_SSL *)a->ptr;
127 if (bs->ssl != NULL) SSL_shutdown(bs->ssl);
128 if (a->shutdown)
129 {
130 if (a->init && (bs->ssl != NULL))
131 SSL_free(bs->ssl);
132 a->init=0;
133 a->flags=0;
134 }
135 if (a->ptr != NULL)
136 OPENSSL_free(a->ptr);
137 return(1);
138 }
139
140static int ssl_read(BIO *b, char *out, int outl)
141 {
142 int ret=1;
143 BIO_SSL *sb;
144 SSL *ssl;
145 int retry_reason=0;
146 int r=0;
147
148 if (out == NULL) return(0);
149 sb=(BIO_SSL *)b->ptr;
150 ssl=sb->ssl;
151
152 BIO_clear_retry_flags(b);
153
154#if 0
155 if (!SSL_is_init_finished(ssl))
156 {
157/* ret=SSL_do_handshake(ssl); */
158 if (ret > 0)
159 {
160
161 outflags=(BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY);
162 ret= -1;
163 goto end;
164 }
165 }
166#endif
167/* if (ret > 0) */
168 ret=SSL_read(ssl,out,outl);
169
170 switch (SSL_get_error(ssl,ret))
171 {
172 case SSL_ERROR_NONE:
173 if (ret <= 0) break;
174 if (sb->renegotiate_count > 0)
175 {
176 sb->byte_count+=ret;
177 if (sb->byte_count > sb->renegotiate_count)
178 {
179 sb->byte_count=0;
180 sb->num_renegotiates++;
181 SSL_renegotiate(ssl);
182 r=1;
183 }
184 }
185 if ((sb->renegotiate_timeout > 0) && (!r))
186 {
187 unsigned long tm;
188
189 tm=(unsigned long)time(NULL);
190 if (tm > sb->last_time+sb->renegotiate_timeout)
191 {
192 sb->last_time=tm;
193 sb->num_renegotiates++;
194 SSL_renegotiate(ssl);
195 }
196 }
197
198 break;
199 case SSL_ERROR_WANT_READ:
200 BIO_set_retry_read(b);
201 break;
202 case SSL_ERROR_WANT_WRITE:
203 BIO_set_retry_write(b);
204 break;
205 case SSL_ERROR_WANT_X509_LOOKUP:
206 BIO_set_retry_special(b);
207 retry_reason=BIO_RR_SSL_X509_LOOKUP;
208 break;
209 case SSL_ERROR_WANT_ACCEPT:
210 BIO_set_retry_special(b);
211 retry_reason=BIO_RR_ACCEPT;
212 break;
213 case SSL_ERROR_WANT_CONNECT:
214 BIO_set_retry_special(b);
215 retry_reason=BIO_RR_CONNECT;
216 break;
217 case SSL_ERROR_SYSCALL:
218 case SSL_ERROR_SSL:
219 case SSL_ERROR_ZERO_RETURN:
220 default:
221 break;
222 }
223
224 b->retry_reason=retry_reason;
225 return(ret);
226 }
227
228static int ssl_write(BIO *b, const char *out, int outl)
229 {
230 int ret,r=0;
231 int retry_reason=0;
232 SSL *ssl;
233 BIO_SSL *bs;
234
235 if (out == NULL) return(0);
236 bs=(BIO_SSL *)b->ptr;
237 ssl=bs->ssl;
238
239 BIO_clear_retry_flags(b);
240
241/* ret=SSL_do_handshake(ssl);
242 if (ret > 0) */
243 ret=SSL_write(ssl,out,outl);
244
245 switch (SSL_get_error(ssl,ret))
246 {
247 case SSL_ERROR_NONE:
248 if (ret <= 0) break;
249 if (bs->renegotiate_count > 0)
250 {
251 bs->byte_count+=ret;
252 if (bs->byte_count > bs->renegotiate_count)
253 {
254 bs->byte_count=0;
255 bs->num_renegotiates++;
256 SSL_renegotiate(ssl);
257 r=1;
258 }
259 }
260 if ((bs->renegotiate_timeout > 0) && (!r))
261 {
262 unsigned long tm;
263
264 tm=(unsigned long)time(NULL);
265 if (tm > bs->last_time+bs->renegotiate_timeout)
266 {
267 bs->last_time=tm;
268 bs->num_renegotiates++;
269 SSL_renegotiate(ssl);
270 }
271 }
272 break;
273 case SSL_ERROR_WANT_WRITE:
274 BIO_set_retry_write(b);
275 break;
276 case SSL_ERROR_WANT_READ:
277 BIO_set_retry_read(b);
278 break;
279 case SSL_ERROR_WANT_X509_LOOKUP:
280 BIO_set_retry_special(b);
281 retry_reason=BIO_RR_SSL_X509_LOOKUP;
282 break;
283 case SSL_ERROR_WANT_CONNECT:
284 BIO_set_retry_special(b);
285 retry_reason=BIO_RR_CONNECT;
286 case SSL_ERROR_SYSCALL:
287 case SSL_ERROR_SSL:
288 default:
289 break;
290 }
291
292 b->retry_reason=retry_reason;
293 return(ret);
294 }
295
296static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr)
297 {
298 SSL **sslp,*ssl;
299 BIO_SSL *bs;
300 BIO *dbio,*bio;
301 long ret=1;
302
303 bs=(BIO_SSL *)b->ptr;
304 ssl=bs->ssl;
305 if ((ssl == NULL) && (cmd != BIO_C_SET_SSL))
306 return(0);
307 switch (cmd)
308 {
309 case BIO_CTRL_RESET:
310 SSL_shutdown(ssl);
311
312 if (ssl->handshake_func == ssl->method->ssl_connect)
313 SSL_set_connect_state(ssl);
314 else if (ssl->handshake_func == ssl->method->ssl_accept)
315 SSL_set_accept_state(ssl);
316
317 SSL_clear(ssl);
318
319 if (b->next_bio != NULL)
320 ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
321 else if (ssl->rbio != NULL)
322 ret=BIO_ctrl(ssl->rbio,cmd,num,ptr);
323 else
324 ret=1;
325 break;
326 case BIO_CTRL_INFO:
327 ret=0;
328 break;
329 case BIO_C_SSL_MODE:
330 if (num) /* client mode */
331 SSL_set_connect_state(ssl);
332 else
333 SSL_set_accept_state(ssl);
334 break;
335 case BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT:
336 ret=bs->renegotiate_timeout;
337 if (num < 60) num=5;
338 bs->renegotiate_timeout=(unsigned long)num;
339 bs->last_time=(unsigned long)time(NULL);
340 break;
341 case BIO_C_SET_SSL_RENEGOTIATE_BYTES:
342 ret=bs->renegotiate_count;
343 if ((long)num >=512)
344 bs->renegotiate_count=(unsigned long)num;
345 break;
346 case BIO_C_GET_SSL_NUM_RENEGOTIATES:
347 ret=bs->num_renegotiates;
348 break;
349 case BIO_C_SET_SSL:
350 if (ssl != NULL)
351 ssl_free(b);
352 b->shutdown=(int)num;
353 ssl=(SSL *)ptr;
354 ((BIO_SSL *)b->ptr)->ssl=ssl;
355 bio=SSL_get_rbio(ssl);
356 if (bio != NULL)
357 {
358 if (b->next_bio != NULL)
359 BIO_push(bio,b->next_bio);
360 b->next_bio=bio;
361 CRYPTO_add(&bio->references,1,CRYPTO_LOCK_BIO);
362 }
363 b->init=1;
364 break;
365 case BIO_C_GET_SSL:
366 if (ptr != NULL)
367 {
368 sslp=(SSL **)ptr;
369 *sslp=ssl;
370 }
371 else
372 ret=0;
373 break;
374 case BIO_CTRL_GET_CLOSE:
375 ret=b->shutdown;
376 break;
377 case BIO_CTRL_SET_CLOSE:
378 b->shutdown=(int)num;
379 break;
380 case BIO_CTRL_WPENDING:
381 ret=BIO_ctrl(ssl->wbio,cmd,num,ptr);
382 break;
383 case BIO_CTRL_PENDING:
384 ret=SSL_pending(ssl);
385 if (ret == 0)
386 ret=BIO_pending(ssl->rbio);
387 break;
388 case BIO_CTRL_FLUSH:
389 BIO_clear_retry_flags(b);
390 ret=BIO_ctrl(ssl->wbio,cmd,num,ptr);
391 BIO_copy_next_retry(b);
392 break;
393 case BIO_CTRL_PUSH:
394 if ((b->next_bio != NULL) && (b->next_bio != ssl->rbio))
395 {
396 SSL_set_bio(ssl,b->next_bio,b->next_bio);
397 CRYPTO_add(&b->next_bio->references,1,CRYPTO_LOCK_BIO);
398 }
399 break;
400 case BIO_CTRL_POP:
401 /* ugly bit of a hack */
402 if (ssl->rbio != ssl->wbio) /* we are in trouble :-( */
403 {
404 BIO_free_all(ssl->wbio);
405 }
406 if (b->next_bio != NULL)
407 {
408 CRYPTO_add(&b->next_bio->references,1,CRYPTO_LOCK_BIO);
409 }
410 ssl->wbio=NULL;
411 ssl->rbio=NULL;
412 break;
413 case BIO_C_DO_STATE_MACHINE:
414 BIO_clear_retry_flags(b);
415
416 b->retry_reason=0;
417 ret=(int)SSL_do_handshake(ssl);
418
419 switch (SSL_get_error(ssl,(int)ret))
420 {
421 case SSL_ERROR_WANT_READ:
422 BIO_set_flags(b,
423 BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY);
424 break;
425 case SSL_ERROR_WANT_WRITE:
426 BIO_set_flags(b,
427 BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY);
428 break;
429 case SSL_ERROR_WANT_CONNECT:
430 BIO_set_flags(b,
431 BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY);
432 b->retry_reason=b->next_bio->retry_reason;
433 break;
434 default:
435 break;
436 }
437 break;
438 case BIO_CTRL_DUP:
439 dbio=(BIO *)ptr;
440 if (((BIO_SSL *)dbio->ptr)->ssl != NULL)
441 SSL_free(((BIO_SSL *)dbio->ptr)->ssl);
442 ((BIO_SSL *)dbio->ptr)->ssl=SSL_dup(ssl);
443 ((BIO_SSL *)dbio->ptr)->renegotiate_count=
444 ((BIO_SSL *)b->ptr)->renegotiate_count;
445 ((BIO_SSL *)dbio->ptr)->byte_count=
446 ((BIO_SSL *)b->ptr)->byte_count;
447 ((BIO_SSL *)dbio->ptr)->renegotiate_timeout=
448 ((BIO_SSL *)b->ptr)->renegotiate_timeout;
449 ((BIO_SSL *)dbio->ptr)->last_time=
450 ((BIO_SSL *)b->ptr)->last_time;
451 ret=(((BIO_SSL *)dbio->ptr)->ssl != NULL);
452 break;
453 case BIO_C_GET_FD:
454 ret=BIO_ctrl(ssl->rbio,cmd,num,ptr);
455 break;
456 case BIO_CTRL_SET_CALLBACK:
457 {
458#if 0 /* FIXME: Should this be used? -- Richard Levitte */
459 BIOerr(SSL_F_SSL_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
460 ret = -1;
461#else
462 ret=0;
463#endif
464 }
465 break;
466 case BIO_CTRL_GET_CALLBACK:
467 {
468 void (**fptr)();
469
470 fptr=(void (**)())ptr;
471 *fptr=SSL_get_info_callback(ssl);
472 }
473 break;
474 default:
475 ret=BIO_ctrl(ssl->rbio,cmd,num,ptr);
476 break;
477 }
478 return(ret);
479 }
480
481static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
482 {
483 SSL *ssl;
484 BIO_SSL *bs;
485 long ret=1;
486
487 bs=(BIO_SSL *)b->ptr;
488 ssl=bs->ssl;
489 switch (cmd)
490 {
491 case BIO_CTRL_SET_CALLBACK:
492 {
493 /* FIXME: setting this via a completely different prototype
494 seems like a crap idea */
495 SSL_set_info_callback(ssl,(void (*)(const SSL *,int,int))fp);
496 }
497 break;
498 default:
499 ret=BIO_callback_ctrl(ssl->rbio,cmd,fp);
500 break;
501 }
502 return(ret);
503 }
504
505static int ssl_puts(BIO *bp, const char *str)
506 {
507 int n,ret;
508
509 n=strlen(str);
510 ret=BIO_write(bp,str,n);
511 return(ret);
512 }
513
514BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx)
515 {
516#ifndef OPENSSL_NO_SOCK
517 BIO *ret=NULL,*buf=NULL,*ssl=NULL;
518
519 if ((buf=BIO_new(BIO_f_buffer())) == NULL)
520 return(NULL);
521 if ((ssl=BIO_new_ssl_connect(ctx)) == NULL)
522 goto err;
523 if ((ret=BIO_push(buf,ssl)) == NULL)
524 goto err;
525 return(ret);
526err:
527 if (buf != NULL) BIO_free(buf);
528 if (ssl != NULL) BIO_free(ssl);
529#endif
530 return(NULL);
531 }
532
533BIO *BIO_new_ssl_connect(SSL_CTX *ctx)
534 {
535 BIO *ret=NULL,*con=NULL,*ssl=NULL;
536
537 if ((con=BIO_new(BIO_s_connect())) == NULL)
538 return(NULL);
539 if ((ssl=BIO_new_ssl(ctx,1)) == NULL)
540 goto err;
541 if ((ret=BIO_push(ssl,con)) == NULL)
542 goto err;
543 return(ret);
544err:
545 if (con != NULL) BIO_free(con);
546 if (ret != NULL) BIO_free(ret);
547 return(NULL);
548 }
549
550BIO *BIO_new_ssl(SSL_CTX *ctx, int client)
551 {
552 BIO *ret;
553 SSL *ssl;
554
555 if ((ret=BIO_new(BIO_f_ssl())) == NULL)
556 return(NULL);
557 if ((ssl=SSL_new(ctx)) == NULL)
558 {
559 BIO_free(ret);
560 return(NULL);
561 }
562 if (client)
563 SSL_set_connect_state(ssl);
564 else
565 SSL_set_accept_state(ssl);
566
567 BIO_set_ssl(ret,ssl,BIO_CLOSE);
568 return(ret);
569 }
570
571int BIO_ssl_copy_session_id(BIO *t, BIO *f)
572 {
573 t=BIO_find_type(t,BIO_TYPE_SSL);
574 f=BIO_find_type(f,BIO_TYPE_SSL);
575 if ((t == NULL) || (f == NULL))
576 return(0);
577 if ( (((BIO_SSL *)t->ptr)->ssl == NULL) ||
578 (((BIO_SSL *)f->ptr)->ssl == NULL))
579 return(0);
580 SSL_copy_session_id(((BIO_SSL *)t->ptr)->ssl,((BIO_SSL *)f->ptr)->ssl);
581 return(1);
582 }
583
584void BIO_ssl_shutdown(BIO *b)
585 {
586 SSL *s;
587
588 while (b != NULL)
589 {
590 if (b->method->type == BIO_TYPE_SSL)
591 {
592 s=((BIO_SSL *)b->ptr)->ssl;
593 SSL_shutdown(s);
594 break;
595 }
596 b=b->next_bio;
597 }
598 }
diff --git a/src/lib/libssl/crypto/Makefile b/src/lib/libssl/crypto/Makefile
new file mode 100644
index 0000000000..9baf729b5b
--- /dev/null
+++ b/src/lib/libssl/crypto/Makefile
@@ -0,0 +1,294 @@
1# $OpenBSD: Makefile,v 1.36 2004/02/27 17:36:13 deraadt Exp $
2
3LIB= crypto
4
5SSLEAYDIST= src
6SSL_SRC= ${.CURDIR}/../${SSLEAYDIST}
7LCRYPTO_SRC= ${SSL_SRC}/crypto
8
9.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" || \
10 ${MACHINE_ARCH} == "vax" || ${MACHINE_ARCH} == "amd64" || \
11 ${MACHINE_ARCH} == "alpha"
12CFLAGS+= -DL_ENDIAN
13.else
14CFLAGS+= -DB_ENDIAN
15.endif
16
17CFLAGS+= -DOPENSSL_NO_IDEA -DTERMIOS -DANSI_SOURCE -DNO_ERR -DOPENSSL_NO_ASM
18CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5 -DSO_DLFCN -DHAVE_DLFCN_H
19CFLAGS+= -DOPENSSL_NO_MDC2
20CFLAGS+= -DNO_WINDOWS_BRAINDEATH
21CFLAGS+= -DOPENSSL_NO_HW_CSWIFT -DOPENSSL_NO_HW_NCIPHER -DOPENSSL_NO_HW_ATALLA
22CFLAGS+= -DOPENSSL_NO_HW_NURON -DOPENSSL_NO_HW_UBSEC -DOPENSSL_NO_HW_AEP
23CFLAGS+= -DOPENSSL_NO_HW_SUREWARE -DOPENSSL_NO_HW_4758_CCA
24CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST}
25CFLAGS+= -I${LCRYPTO_SRC}
26SRCS+= o_time.c
27SRCS+= cryptlib.c ex_data.c cpt_err.c mem.c mem_dbg.c mem_clr.c
28SRCS+= tmdiff.c cversion.c uid.c
29SRCS+= md2_dgst.c md2_one.c
30SRCS+= md5_dgst.c md5_one.c
31SRCS+= sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
32#SRCS+= mdc2dgst.c mdc2_one.c
33SRCS+= hmac.c
34SRCS+= rmd_dgst.c rmd_one.c
35SRCS+= acss_skey.c acss_enc.c
36SRCS+= aes_cbc.c aes_cfb.c aes_ctr.c aes_ecb.c aes_ofb.c aes_misc.c aes_core.c
37SRCS+= cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c \
38 ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c \
39 ofb64enc.c ofb_enc.c pcbc_enc.c \
40 qud_cksm.c rand_key.c rpc_enc.c set_key.c \
41 des_enc.c des_old2.c fcrypt_b.c \
42 fcrypt.c xcbc_enc.c ede_cbcm_enc.c \
43 str2key.c cfb64ede.c ofb64ede.c \
44 des_old.c read2pwd.c
45SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c
46SRCS+= rc2ofb64.c
47SRCS+= rc4_skey.c
48#SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5cfb64.c
49#SRCS+= rc5ofb64.c rc5_enc.c
50#SRCS+= i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c
51#SRCS+= i_skey.c
52SRCS+= bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c
53SRCS+= c_skey.c c_ecb.c c_cfb64.c c_ofb64.c c_enc.c
54SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c
55SRCS+= bn_mul.c bn_print.c bn_rand.c bn_shift.c
56SRCS+= bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c
57SRCS+= bn_sqr.c bn_recp.c bn_mont.c bn_mpi.c bn_mod.c
58SRCS+= bn_exp2.c bn_ctx.c
59SRCS+= bn_sqrt.c bn_kron.c
60SRCS+= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c
61SRCS+= rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c
62SRCS+= rsa_none.c rsa_chk.c rsa_oaep.c rsa_null.c rsa_asn1.c
63SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c
64SRCS+= dsa_sign.c dsa_err.c dsa_asn1.c dsa_ossl.c
65SRCS+= dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c dh_asn1.c
66SRCS+= buffer.c buf_err.c
67SRCS+= bio_lib.c bio_cb.c bio_err.c bss_mem.c
68SRCS+= bss_null.c bss_fd.c bss_file.c bss_sock.c
69SRCS+= bss_conn.c bf_null.c bf_buff.c
70SRCS+= b_print.c b_dump.c b_sock.c bss_acpt.c
71SRCS+= bf_nbio.c bss_bio.c bss_log.c
72SRCS+= stack.c
73SRCS+= lhash.c lh_stats.c
74SRCS+= md_rand.c randfile.c rand_lib.c rand_egd.c rand_err.c rand_unix.c
75SRCS+= err.c err_all.c err_prn.c
76SRCS+= obj_dat.c obj_lib.c obj_err.c o_names.c
77SRCS+= bio_b64.c e_bf.c m_sha.c p_open.c
78SRCS+= bio_enc.c e_cast.c e_xcbc_d.c m_dss.c m_sha1.c p_seal.c
79SRCS+= bio_md.c e_des.c encode.c m_dss1.c names.c p_sign.c
80SRCS+= bio_ok.c e_des3.c evp_enc.c m_md2.c p_verify.c
81SRCS+= c_all.c evp_err.c evp_acnf.c m_md4.c p5_crpt.c
82SRCS+= c_allc.c evp_key.c m_md5.c p5_crpt2.c
83SRCS+= c_alld.c e_null.c evp_lib.c p_dec.c
84SRCS+= digest.c e_rc2.c evp_pbe.c m_null.c p_enc.c
85SRCS+= e_acss.c e_aes.c e_rc4.c evp_pkey.c m_ripemd.c p_lib.c
86SRCS+= md4_dgst.c md4_one.c
87SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_pkey.c
88SRCS+= pem_all.c pem_err.c pem_x509.c pem_pk8.c pem_oth.c pem_xaux.c
89SRCS+= ui_err.c ui_lib.c ui_openssl.c ui_compat.c ui_util.c
90SRCS+= a_bitstr.c a_mbstr.c a_utctm.c f_enum.c t_bitst.c x_name.c
91SRCS+= a_bool.c a_meth.c a_utf8.c f_int.c t_crl.c tasn_typ.c x_pkey.c
92SRCS+= a_bytes.c a_object.c a_verify.c f_string.c t_pkey.c tasn_utl.c x_pubkey.c
93SRCS+= a_d2i_fp.c a_octet.c asn1_err.c i2d_pr.c t_req.c x_algor.c x_req.c
94SRCS+= a_digest.c a_print.c asn1_lib.c i2d_pu.c t_spki.c x_attrib.c x_sig.c
95SRCS+= a_dup.c a_set.c asn1_par.c n_pkey.c t_x509.c x_bignum.c x_spki.c
96SRCS+= a_enum.c a_sign.c asn_pack.c nsseq.c t_x509a.c x_val.c
97SRCS+= a_gentm.c a_strex.c d2i_pr.c p5_pbe.c tasn_dec.c x_crl.c x_x509.c
98SRCS+= a_hdr.c a_strnid.c d2i_pu.c p5_pbev2.c tasn_enc.c x_exten.c x_x509a.c
99SRCS+= a_i2d_fp.c a_time.c evp_asn1.c tasn_fre.c x_info.c
100SRCS+=a_int.c a_type.c p8_pkey.c tasn_new.c x_long.c asn_moid.c
101SRCS+= x509_d2.c x509_lu.c x509_set.c x509_vfy.c x509spki.c by_dir.c
102SRCS+= x509_def.c x509_obj.c x509_trs.c x509cset.c x509type.c by_file.c
103SRCS+= x509_att.c x509_err.c x509_r2x.c x509_txt.c x509name.c x_all.c
104SRCS+= x509_cmp.c x509_ext.c x509_req.c x509_v3.c x509rset.c
105SRCS+= v3_akey.c v3_alt.c v3_bcons.c v3_bitst.c v3_conf.c v3_cpols.c
106SRCS+= v3_crld.c v3_enum.c v3_extku.c v3_genn.c v3_ia5.c v3_int.c
107SRCS+= v3_lib.c v3_pku.c v3_prn.c v3_skey.c v3_sxnet.c v3_utl.c
108SRCS+= v3err.c v3_info.c v3_purp.c v3_ocsp.c v3_akeya.c
109SRCS+= conf_err.c conf_lib.c conf_def.c conf_api.c conf_mod.c conf_mall.c
110SRCS+= conf_sap.c
111SRCS+= txt_db.c
112SRCS+= pk7_lib.c pkcs7err.c
113SRCS+= pk7_asn1.c pk7_doit.c pk7_mime.c
114SRCS+= pk7_attr.c pk7_smime.c
115SRCS+= c_rle.c c_zlib.c comp_lib.c comp_err.c
116SRCS+= p12_add.c p12_crpt.c p12_init.c p12_mutl.c p12_p8e.c
117SRCS+= p12_asn.c p12_crt.c p12_key.c p12_npas.c p12_utl.c
118SRCS+= p12_attr.c p12_decr.c p12_kiss.c p12_p8d.c pk12err.c
119SRCS+= eng_all.c eng_openssl.c eng_ctrl.c eng_pkey.c
120SRCS+= eng_dyn.c eng_table.c tb_cipher.c eng_err.c tb_rsa.c
121SRCS+= hw_cryptodev.c eng_cnf.c
122SRCS+= tb_dh.c eng_fat.c tb_digest.c eng_init.c
123SRCS+= tb_dsa.c eng_lib.c tb_rand.c eng_list.c
124SRCs+= tb_rsa.c
125SRCS+= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c
126SRCS+= dso_openssl.c dso_win32.c dso_vms.c
127SRCS+= ocsp_asn.c ocsp_err.c ocsp_ht.c ocsp_prn.c ocsp_vfy.c
128SRCS+= ocsp_cl.c ocsp_ext.c ocsp_lib.c ocsp_srv.c
129SRCS+= ec_cvt.c ec_lib.c ecp_mont.c ecp_recp.c
130SRCS+= ec_err.c ec_mult.c ecp_nist.c ecp_smpl.c
131
132.PATH: ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 ${LCRYPTO_SRC}/sha \
133 ${LCRYPTO_SRC}/mdc2 ${LCRYPTO_SRC}/hmac ${LCRYPTO_SRC}/ripemd \
134 ${LCRYPTO_SRC}/des ${LCRYPTO_SRC}/rc2 ${LCRYPTO_SRC}/rc4 \
135 ${LCRYPTO_SRC}/rc5 ${LCRYPTO_SRC}/idea ${LCRYPTO_SRC}/bf \
136 ${LCRYPTO_SRC}/cast ${LCRYPTO_SRC}/bn ${LCRYPTO_SRC}/rsa \
137 ${LCRYPTO_SRC}/dsa ${LCRYPTO_SRC}/dh ${LCRYPTO_SRC}/buffer \
138 ${LCRYPTO_SRC}/bio ${LCRYPTO_SRC}/stack ${LCRYPTO_SRC}/lhash \
139 ${LCRYPTO_SRC}/rand ${LCRYPTO_SRC}/err ${LCRYPTO_SRC}/objects \
140 ${LCRYPTO_SRC}/evp ${LCRYPTO_SRC}/pem ${LCRYPTO_SRC}/asn1 \
141 ${LCRYPTO_SRC}/asn1 ${LCRYPTO_SRC}/x509 ${LCRYPTO_SRC}/conf \
142 ${LCRYPTO_SRC}/pkcs7 ${LCRYPTO_SRC}/x509v3 ${LCRYPTO_SRC}/pkcs12 \
143 ${LCRYPTO_SRC}/comp ${LCRYPTO_SRC}/txt_db ${LCRYPTO_SRC}/md4 \
144 ${LCRYPTO_SRC}/engine ${LCRYPTO_SRC}/dso ${LCRYPTO_SRC}/ui \
145 ${LCRYPTO_SRC}/ocsp ${LCRYPTO_SRC}/ec ${LCRYPTO_SRC}/aes ${LCRYPTO_SRC} \
146 ${LCRYPTO_SRC}/acss ${.CURDIR}/arch/${MACHINE_ARCH}
147
148HDRS=\
149 crypto/acss/acss.h \
150 crypto/aes/aes.h \
151 crypto/asn1/asn1.h \
152 crypto/asn1/asn1_mac.h \
153 crypto/asn1/asn1t.h \
154 crypto/bf/blowfish.h \
155 crypto/bio/bio.h \
156 crypto/bn/bn.h \
157 crypto/buffer/buffer.h \
158 crypto/cast/cast.h \
159 crypto/comp/comp.h \
160 crypto/conf/conf.h \
161 crypto/conf/conf_api.h \
162 crypto/crypto.h \
163 crypto/des/des.h \
164 crypto/des/des_old.h \
165 crypto/dh/dh.h \
166 crypto/dsa/dsa.h \
167 crypto/dso/dso.h \
168 crypto/ebcdic.h \
169 crypto/ec/ec.h \
170 crypto/engine/engine.h \
171 crypto/err/err.h \
172 crypto/evp/evp.h \
173 crypto/hmac/hmac.h \
174 crypto/idea/idea.h \
175 crypto/lhash/lhash.h \
176 crypto/md2/md2.h \
177 crypto/md4/md4.h \
178 crypto/md5/md5.h \
179 crypto/mdc2/mdc2.h \
180 crypto/objects/objects.h \
181 crypto/ocsp/ocsp.h \
182 crypto/opensslv.h \
183 crypto/ossl_typ.h \
184 crypto/pem/pem.h \
185 crypto/pem/pem2.h \
186 crypto/pkcs12/pkcs12.h \
187 crypto/pkcs7/pkcs7.h \
188 crypto/rand/rand.h \
189 crypto/rc2/rc2.h \
190 crypto/rc4/rc4.h \
191 crypto/rc5/rc5.h \
192 crypto/ripemd/ripemd.h \
193 crypto/rsa/rsa.h \
194 crypto/sha/sha.h \
195 crypto/stack/safestack.h \
196 crypto/stack/stack.h \
197 crypto/symhacks.h \
198 crypto/tmdiff.h \
199 crypto/txt_db/txt_db.h \
200 crypto/ui/ui.h \
201 crypto/ui/ui_compat.h \
202 crypto/x509/x509.h \
203 crypto/x509/x509_vfy.h \
204 crypto/x509v3/x509v3.h \
205 e_os2.h
206
207HDRS_GEN=\
208 ${.CURDIR}/arch/${MACHINE_ARCH}/opensslconf.h \
209 ${.OBJDIR}/obj_mac.h
210
211includes: obj_mac.h
212 @test -d ${DESTDIR}/usr/include/openssl || \
213 mkdir ${DESTDIR}/usr/include/openssl
214 @cd ${SSL_SRC}; \
215 for i in $(HDRS); do \
216 j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
217 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i\
218 ${DESTDIR}/usr/include/openssl"; \
219 echo $$j; \
220 eval "$$j"; \
221 done; \
222 for i in $(HDRS_GEN); do \
223 j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
224 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i\
225 ${DESTDIR}/usr/include/openssl"; \
226 echo $$j; \
227 eval "$$j"; \
228 done;
229
230# generated
231CFLAGS+= -I${.OBJDIR}
232
233GENERATED=obj_mac.h obj_dat.h
234CLEANFILES=${GENERATED} obj_mac.num.tmp
235SSL_OBJECTS=${SSL_SRC}/crypto/objects
236
237obj_mac.h: ${SSL_OBJECTS}/objects.h ${SSL_OBJECTS}/obj_mac.num ${SSL_OBJECTS}/objects.txt
238 cat ${SSL_OBJECTS}/obj_mac.num > obj_mac.num.tmp
239 /usr/bin/perl ${SSL_OBJECTS}/objects.pl ${SSL_OBJECTS}/objects.txt obj_mac.num.tmp obj_mac.h
240
241obj_dat.h: obj_mac.h
242 /usr/bin/perl ${SSL_OBJECTS}/obj_dat.pl obj_mac.h obj_dat.h
243
244.if (${MACHINE_ARCH} == "vax")
245# egcs bombs optimising this file on vax
246a_strnid.o:
247 ${CC} ${CFLAGS} -O0 ${CPPFLAGS} -c ${.IMPSRC}
248a_strnid.po:
249 ${CC} ${CFLAGS} -O0 ${CPPFLAGS} -c ${.IMPSRC} -o $@
250des_enc.o:
251 ${CC} ${CFLAGS} -O1 ${CPPFLAGS} -c ${.IMPSRC}
252des_enc.po:
253 ${CC} ${CFLAGS} -O1 ${CPPFLAGS} -c ${.IMPSRC} -o $@
254.endif
255
256.if (${MACHINE_ARCH} == "i386")
257CFLAGS+= -DMD5_ASM
258CFLAGS+= -DSHA1_ASM
259CFLAGS+= -DRMD160_ASM
260CFLAGS+= -DOPENBSD_CAST_ASM
261CFLAGS+= -DOPENBSD_DES_ASM
262SSLASM=\
263 bf bf-586 \
264 bn bn-586 \
265 bn co-586 \
266 cast cast-586 \
267 des des-586 \
268 md5 md5-586 \
269 rc4 rc4-586 \
270 ripemd rmd-586 \
271 sha sha1-586
272.for dir f in ${SSLASM}
273SRCS+= ${f}.S
274GENERATED+=${f}.S
275${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl ${LCRYPTO_SRC}/perlasm/x86unix.pl
276 /usr/bin/perl -I${LCRYPTO_SRC}/perlasm -I${LCRYPTO_SRC}/${dir}/asm \
277 ${LCRYPTO_SRC}/${dir}/asm/${f}.pl openbsd-elf 386 > ${.TARGET}
278.endfor
279SRCS+= bf_cbc.c
280.else
281.if (${MACHINE_ARCH} == "vax")
282SRCS+= bf_enc.c
283SRCS+= bn_asm_vax.S
284SRCS+= rc4_enc.c
285.else
286SRCS+= bf_enc.c
287SRCS+= bn_asm.c
288SRCS+= rc4_enc.c
289.endif
290.endif
291
292all beforedepend: ${GENERATED}
293
294.include <bsd.lib.mk>
diff --git a/src/lib/libssl/crypto/arch/alpha/opensslconf.h b/src/lib/libssl/crypto/arch/alpha/opensslconf.h
new file mode 100644
index 0000000000..c33ccc8a0f
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/alpha/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#undef BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#define SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#undef THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#undef RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#define DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#define DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#undef DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/amd64/opensslconf.h b/src/lib/libssl/crypto/arch/amd64/opensslconf.h
new file mode 100644
index 0000000000..c33ccc8a0f
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/amd64/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#undef BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#define SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#undef THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#undef RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#define DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#define DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#undef DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/arm/opensslconf.h b/src/lib/libssl/crypto/arch/arm/opensslconf.h
new file mode 100644
index 0000000000..47a6dd8596
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/arm/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#define BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#undef SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#define THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#define RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#undef DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#undef DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#define DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/src/crypto/opensslconf.h b/src/lib/libssl/crypto/arch/hppa/opensslconf.h
index 492041bc7c..0334dbdfc6 100644
--- a/src/lib/libssl/src/crypto/opensslconf.h
+++ b/src/lib/libssl/crypto/arch/hppa/opensslconf.h
@@ -27,7 +27,7 @@
27 27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ 28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) 29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/usr/local/ssl" 30#define OPENSSLDIR "/etc/ssl"
31#endif 31#endif
32#endif 32#endif
33 33
@@ -69,7 +69,7 @@
69#endif 69#endif
70#endif 70#endif
71 71
72#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) 72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a 73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */ 74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG 75#ifndef DES_LONG
@@ -79,7 +79,7 @@
79 79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) 80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H 81#define CONFIG_HEADER_BN_H
82#undef BN_LLONG 82#define BN_LLONG
83 83
84/* Should we define BN_DIV2W here? */ 84/* Should we define BN_DIV2W here? */
85 85
@@ -98,7 +98,7 @@
98#define CONFIG_HEADER_RC4_LOCL_H 98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20 99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */ 100 * speedup on x86 */
101#undef RC4_INDEX 101#define RC4_INDEX
102#endif 102#endif
103 103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
@@ -133,7 +133,7 @@ YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
133/* Unroll the inner loop, this sometimes helps, sometimes hinders. 133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */ 134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL 135#ifndef DES_UNROLL
136#undef DES_UNROLL 136#define DES_UNROLL
137#endif 137#endif
138 138
139/* These default values were supplied by 139/* These default values were supplied by
diff --git a/src/lib/libssl/crypto/arch/i386/opensslconf.h b/src/lib/libssl/crypto/arch/i386/opensslconf.h
new file mode 100644
index 0000000000..7361ac56a1
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/i386/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned long
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#define BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#undef SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#define THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#define RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#define DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#define DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#undef DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#define DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/m68k/opensslconf.h b/src/lib/libssl/crypto/arch/m68k/opensslconf.h
new file mode 100644
index 0000000000..47a6dd8596
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/m68k/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#define BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#undef SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#define THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#define RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#undef DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#undef DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#define DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/m88k/opensslconf.h b/src/lib/libssl/crypto/arch/m88k/opensslconf.h
new file mode 100644
index 0000000000..47a6dd8596
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/m88k/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#define BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#undef SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#define THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#define RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#undef DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#undef DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#define DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/mips/opensslconf.h b/src/lib/libssl/crypto/arch/mips/opensslconf.h
new file mode 100644
index 0000000000..2b030ba088
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/mips/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#define BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#undef SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#define THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#define RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#undef DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#define DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#define DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/powerpc/opensslconf.h b/src/lib/libssl/crypto/arch/powerpc/opensslconf.h
new file mode 100644
index 0000000000..47a6dd8596
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/powerpc/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#define BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#undef SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#define THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#define RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#undef DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#undef DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#define DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/sparc/opensslconf.h b/src/lib/libssl/crypto/arch/sparc/opensslconf.h
new file mode 100644
index 0000000000..47a6dd8596
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/sparc/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#define BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#undef SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#define THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#define RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#undef DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#undef DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#define DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/sparc64/opensslconf.h b/src/lib/libssl/crypto/arch/sparc64/opensslconf.h
new file mode 100644
index 0000000000..053308653b
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/sparc64/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#undef BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#define SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#undef THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#undef RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#define BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#define DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#define DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#undef DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/arch/vax/bn_asm_vax.S b/src/lib/libssl/crypto/arch/vax/bn_asm_vax.S
new file mode 100644
index 0000000000..bd067a55d3
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/vax/bn_asm_vax.S
@@ -0,0 +1,436 @@
1# $OpenBSD: bn_asm_vax.S,v 1.1 2003/11/18 12:39:05 markus Exp $
2# $NetBSD: bn_asm_vax.S,v 1.1 2003/11/03 10:22:28 ragge Exp $
3
4#include <machine/asm.h>
5
6# w.j.m. 15-jan-1999
7#
8# it's magic ...
9#
10# ULONG bn_mul_add_words(ULONG r[],ULONG a[],int n,ULONG w) {
11# ULONG c = 0;
12# int i;
13# for(i = 0; i < n; i++) <c,r[i]> := r[i] + c + a[i] * w ;
14# return c;
15# }
16
17ENTRY(bn_mul_add_words,R6)
18 movl 4(ap),r2 # *r
19 movl 8(ap),r3 # *a
20 movl 12(ap),r4 # n
21 movl 16(ap),r5 # w
22 clrl r6 # return value ("carry")
23
240: emul r5,(r3),(r2),r0 # w * a[0] + r[0] -> r0
25
26 # fixup for "negative" r[]
27 tstl (r2)
28 bgeq 1f
29 incl r1 # add 1 to highword
30
311: # add saved carry to result
32 addl2 r6,r0
33 adwc $0,r1
34
35 # combined fixup for "negative" w, a[]
36 tstl r5 # if w is negative...
37 bgeq 1f
38 addl2 (r3),r1 # ...add a[0] again to highword
391: tstl (r3) # if a[0] is negative...
40 bgeq 1f
41 addl2 r5,r1 # ...add w again to highword
421:
43 movl r0,(r2)+ # save low word in dest & advance *r
44 addl2 $4,r3 # advance *a
45 movl r1,r6 # high word in r6 for return value
46
47 sobgtr r4,0b # loop?
48
49 movl r6,r0
50 ret
51
52# .title vax_bn_mul_words unsigned multiply & add, 32*32+32=>64
53#;
54#; w.j.m. 15-jan-1999
55#;
56#; it's magic ...
57#;
58#; ULONG bn_mul_words(ULONG r[],ULONG a[],int n,ULONG w) {
59#; ULONG c = 0;
60#; int i;
61#; for(i = 0; i < num; i++) <c,r[i]> := a[i] * w + c ;
62#; return(c);
63#; }
64#
65
66ENTRY(bn_mul_words,R6)
67 movl 4(ap),r2 # *r
68 movl 8(ap),r3 # *a
69 movl 12(ap),r4 # n
70 movl 16(ap),r5 # w
71 clrl r6 # carry
72
730: emul r5,(r3),r6,r0 # w * a[0] + carry -> r0
74
75 # fixup for "negative" carry
76 tstl r6
77 bgeq 1f
78 incl r1
79
801: # combined fixup for "negative" w, a[]
81 tstl r5
82 bgeq 1f
83 addl2 (r3),r1
841: tstl (r3)
85 bgeq 1f
86 addl2 r5,r1
87
881: movl r0,(r2)+
89 addl2 $4,r3
90 movl r1,r6
91
92 sobgtr r4,0b
93
94 movl r6,r0
95 ret
96
97
98
99# .title vax_bn_sqr_words unsigned square, 32*32=>64
100#;
101#; w.j.m. 15-jan-1999
102#;
103#; it's magic ...
104#;
105#; void bn_sqr_words(ULONG r[],ULONG a[],int n) {
106#; int i;
107#; for(i = 0; i < n; i++) <r[2*i+1],r[2*i]> := a[i] * a[i] ;
108#; }
109#
110
111ENTRY(bn_sqr_words,0)
112 movl 4(ap),r2 # r
113 movl 8(ap),r3 # a
114 movl 12(ap),r4 # n
115
1160: movl (r3)+,r5 # r5 = a[] & advance
117
118 emul r5,r5,$0,r0 # a[0] * a[0] + 0 -> r0
119
120 # fixup for "negative" a[]
121 tstl r5
122 bgeq 1f
123 addl2 r5,r1
124 addl2 r5,r1
125
1261: movq r0,(r2)+ # store 64-bit result
127
128 sobgtr r4,0b # loop
129
130 ret
131
132
133# .title vax_bn_div_words unsigned divide
134#;
135#; Richard Levitte 20-Nov-2000
136#;
137#; ULONG bn_div_words(ULONG h, ULONG l, ULONG d)
138#; {
139#; return ((ULONG)((((ULLONG)h)<<32)|l) / (ULLONG)d);
140#; }
141#;
142#; Using EDIV would be very easy, if it didn't do signed calculations.
143#; Any time any of the input numbers are signed, there are problems,
144#; usually with integer overflow, at which point it returns useless
145#; data (the quotient gets the value of l, and the remainder becomes 0).
146#;
147#; If it was just for the dividend, it would be very easy, just divide
148#; it by 2 (unsigned), do the division, multiply the resulting quotient
149#; and remainder by 2, add the bit that was dropped when dividing by 2
150#; to the remainder, and do some adjustment so the remainder doesn't
151#; end up larger than the divisor. For some cases when the divisor is
152#; negative (from EDIV's point of view, i.e. when the highest bit is set),
153#; dividing the dividend by 2 isn't enough, and since some operations
154#; might generate integer overflows even when the dividend is divided by
155#; 4 (when the high part of the shifted down dividend ends up being exactly
156#; half of the divisor, the result is the quotient 0x80000000, which is
157#; negative...) it needs to be divided by 8. Furthermore, the divisor needs
158#; to be divided by 2 (unsigned) as well, to avoid more problems with the sign.
159#; In this case, a little extra fiddling with the remainder is required.
160#;
161#; So, the simplest way to handle this is always to divide the dividend
162#; by 8, and to divide the divisor by 2 if it's highest bit is set.
163#; After EDIV has been used, the quotient gets multiplied by 8 if the
164#; original divisor was positive, otherwise 4. The remainder, oddly
165#; enough, is *always* multiplied by 8.
166#; NOTE: in the case mentioned above, where the high part of the shifted
167#; down dividend ends up being exactly half the shifted down divisor, we
168#; end up with a 33 bit quotient. That's no problem however, it usually
169#; means we have ended up with a too large remainder as well, and the
170#; problem is fixed by the last part of the algorithm (next paragraph).
171#;
172#; The routine ends with comparing the resulting remainder with the
173#; original divisor and if the remainder is larger, subtract the
174#; original divisor from it, and increase the quotient by 1. This is
175#; done until the remainder is smaller than the divisor.
176#;
177#; The complete algorithm looks like this:
178#;
179#; d' = d
180#; l' = l & 7
181#; [h,l] = [h,l] >> 3
182#; [q,r] = floor([h,l] / d) # This is the EDIV operation
183#; if (q < 0) q = -q # I doubt this is necessary any more
184#;
185#; r' = r >> 29
186#; if (d' >= 0)
187#; q' = q >> 29
188#; q = q << 3
189#; else
190#; q' = q >> 30
191#; q = q << 2
192#; r = (r << 3) + l'
193#;
194#; if (d' < 0)
195#; {
196#; [r',r] = [r',r] - q
197#; while ([r',r] < 0)
198#; {
199#; [r',r] = [r',r] + d
200#; [q',q] = [q',q] - 1
201#; }
202#; }
203#;
204#; while ([r',r] >= d')
205#; {
206#; [r',r] = [r',r] - d'
207#; [q',q] = [q',q] + 1
208#; }
209#;
210#; return q
211#
212#;r2 = l, q
213#;r3 = h, r
214#;r4 = d
215#;r5 = l'
216#;r6 = r'
217#;r7 = d'
218#;r8 = q'
219#
220
221ENTRY(bn_div_words,R6|R7|R8)
222 movl 4(ap),r3 # h
223 movl 8(ap),r2 # l
224 movl 12(ap),r4 # d
225
226 bicl3 $-8,r2,r5 # l' = l & 7
227 bicl3 $7,r2,r2
228
229 bicl3 $-8,r3,r6
230 bicl3 $7,r3,r3
231
232 addl2 r6,r2
233
234 rotl $-3,r2,r2 # l = l >> 3
235 rotl $-3,r3,r3 # h = h >> 3
236
237 movl r4,r7 # d' = d
238
239 clrl r6 # r' = 0
240 clrl r8 # q' = 0
241
242 tstl r4
243 beql 0f # Uh-oh, the divisor is 0...
244 bgtr 1f
245 rotl $-1,r4,r4 # If d is negative, shift it right.
246 bicl2 $0x80000000,r4 # Since d is then a large number, the
247 # lowest bit is insignificant
248 # (contradict that, and I'll fix the problem!)
2491:
250 ediv r4,r2,r2,r3 # Do the actual division
251
252 tstl r2
253 bgeq 1f
254 mnegl r2,r2 # if q < 0, negate it
2551:
256 tstl r7
257 blss 1f
258 rotl $3,r2,r2 # q = q << 3
259 bicl3 $-8,r2,r8 # q' gets the high bits from q
260 bicl3 $7,r2,r2
261 brb 2f
262
2631: # else
264 rotl $2,r2,r2 # q = q << 2
265 bicl3 $-4,r2,r8 # q' gets the high bits from q
266 bicl3 $3,r2,r2
2672:
268 rotl $3,r3,r3 # r = r << 3
269 bicl3 $-8,r3,r6 # r' gets the high bits from r
270 bicl3 $7,r3,r3
271 addl2 r5,r3 # r = r + l'
272
273 tstl r7
274 bgeq 5f
275 bitl $1,r7
276 beql 5f # if d' < 0 && d' & 1
277 subl2 r2,r3 # [r',r] = [r',r] - [q',q]
278 sbwc r8,r6
2793:
280 bgeq 5f # while r < 0
281 decl r2 # [q',q] = [q',q] - 1
282 sbwc $0,r8
283 addl2 r7,r3 # [r',r] = [r',r] + d'
284 adwc $0,r6
285 brb 3b
286
287# The return points are placed in the middle to keep a short distance from
288# all the branch points
2891:
290# movl r3,r1
291 movl r2,r0
292 ret
2930:
294 movl $-1,r0
295 ret
2965:
297 tstl r6
298 bneq 6f
299 cmpl r3,r7
300 blssu 1b # while [r',r] >= d'
3016:
302 subl2 r7,r3 # [r',r] = [r',r] - d'
303 sbwc $0,r6
304 incl r2 # [q',q] = [q',q] + 1
305 adwc $0,r8
306 brb 5b
307
308
309
310# .title vax_bn_add_words unsigned add of two arrays
311#;
312#; Richard Levitte 20-Nov-2000
313#;
314#; ULONG bn_add_words(ULONG r[], ULONG a[], ULONG b[], int n) {
315#; ULONG c = 0;
316#; int i;
317#; for (i = 0; i < n; i++) <c,r[i]> = a[i] + b[i] + c;
318#; return(c);
319#; }
320#
321
322ENTRY(bn_add_words,0)
323 movl 4(ap),r2 # r
324 movl 8(ap),r3 # a
325 movl 12(ap),r4 # b
326 movl 16(ap),r5 # n
327 clrl r0
328
329 tstl r5
330 bleq 1f
331
3320: movl (r3)+,r1 # carry untouched
333 adwc (r4)+,r1 # carry used and touched
334 movl r1,(r2)+ # carry untouched
335 sobgtr r5,0b # carry untouched
336
337 adwc $0,r0
3381: ret
339
340#;
341#; Richard Levitte 20-Nov-2000
342#;
343#; ULONG bn_sub_words(ULONG r[], ULONG a[], ULONG b[], int n) {
344#; ULONG c = 0;
345#; int i;
346#; for (i = 0; i < n; i++) <c,r[i]> = a[i] - b[i] - c;
347#; return(c);
348#; }
349#
350
351ENTRY(bn_sub_words,R6)
352 movl 4(ap),r2 # r
353 movl 8(ap),r3 # a
354 movl 12(ap),r4 # b
355 movl 16(ap),r5 # n
356 clrl r0
357
358 tstl r5
359 bleq 1f
360
3610: movl (r3)+,r6 # carry untouched
362 sbwc (r4)+,r6 # carry used and touched
363 movl r6,(r2)+ # carry untouched
364 sobgtr r5,0b # carry untouched
365
3661: adwc $0,r0
367 ret
368
369#
370# Ragge 20-Sep-2003
371#
372# Multiply a vector of 4/8 longword by another.
373# Uses two loops and 16/64 emuls.
374#
375
376ENTRY(bn_mul_comba4,R6|R7|R8|R9)
377 movl $4,r9 # 4*4
378 brb 6f
379
380ENTRY(bn_mul_comba8,R6|R7|R8|R9)
381 movl $8,r9 # 8*8
382
3836: movl 8(ap),r3 # a[]
384 movl 12(ap),r7 # b[]
385 brb 5f
386
387ENTRY(bn_sqr_comba4,R6|R7|R8|R9)
388 movl $4,r9 # 4*4
389 brb 0f
390
391ENTRY(bn_sqr_comba8,R6|R7|R8|R9)
392 movl $8,r9 # 8*8
393
3940:
395 movl 8(ap),r3 # a[]
396 movl r3,r7 # a[]
397
3985: movl 4(ap),r5 # r[]
399 movl r9,r8
400
401 clrq (r5) # clear destinatino, for add.
402 clrq 8(r5)
403 clrq 16(r5) # these only needed for comba8
404 clrq 24(r5)
405
4062: clrl r4 # carry
407 movl r9,r6 # inner loop count
408 movl (r7)+,r2 # value to multiply with
409
4101: emul r2,(r3),r4,r0
411 tstl r4
412 bgeq 3f
413 incl r1
4143: tstl r2
415 bgeq 3f
416 addl2 (r3),r1
4173: tstl (r3)
418 bgeq 3f
419 addl2 r2,r1
420
4213: addl2 r0,(r5)+ # add to destination
422 adwc $0,r1 # remember carry
423 movl r1,r4 # add carry in next emul
424 addl2 $4,r3
425 sobgtr r6,1b
426
427 movl r4,(r5) # save highest add result
428
429 ashl $2,r9,r4
430 subl2 r4,r3
431 subl2 $4,r4
432 subl2 r4,r5
433
434 sobgtr r8,2b
435
436 ret
diff --git a/src/lib/libssl/crypto/arch/vax/opensslconf.h b/src/lib/libssl/crypto/arch/vax/opensslconf.h
new file mode 100644
index 0000000000..47a6dd8596
--- /dev/null
+++ b/src/lib/libssl/crypto/arch/vax/opensslconf.h
@@ -0,0 +1,180 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7#ifndef OPENSSL_NO_KRB5
8# define OPENSSL_NO_KRB5
9#endif
10
11#endif /* OPENSSL_DOING_MAKEDEPEND */
12
13/* The OPENSSL_NO_* macros are also defined as NO_* if the application
14 asks for it. This is a transient feature that is provided for those
15 who haven't had the time to do the appropriate changes in their
16 applications. */
17#ifdef OPENSSL_ALGORITHM_DEFINES
18# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
19# define NO_KRB5
20# endif
21#endif
22
23/* crypto/opensslconf.h.in */
24
25/* Generate 80386 code? */
26#undef I386_ONLY
27
28#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
29#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
30#define OPENSSLDIR "/etc/ssl"
31#endif
32#endif
33
34#undef OPENSSL_UNISTD
35#define OPENSSL_UNISTD <unistd.h>
36
37#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
38
39#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
40#define IDEA_INT unsigned int
41#endif
42
43#if defined(HEADER_MD2_H) && !defined(MD2_INT)
44#define MD2_INT unsigned int
45#endif
46
47#if defined(HEADER_RC2_H) && !defined(RC2_INT)
48/* I need to put in a mod for the alpha - eay */
49#define RC2_INT unsigned int
50#endif
51
52#if defined(HEADER_RC4_H)
53#if !defined(RC4_INT)
54/* using int types make the structure larger but make the code faster
55 * on most boxes I have tested - up to %20 faster. */
56/*
57 * I don't know what does "most" mean, but declaring "int" is a must on:
58 * - Intel P6 because partial register stalls are very expensive;
59 * - elder Alpha because it lacks byte load/store instructions;
60 */
61#define RC4_INT unsigned int
62#endif
63#if !defined(RC4_CHUNK)
64/*
65 * This enables code handling data aligned at natural CPU word
66 * boundary. See crypto/rc4/rc4_enc.c for further details.
67 */
68#undef RC4_CHUNK
69#endif
70#endif
71
72#if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG)
73/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
74 * %20 speed up (longs are 8 bytes, int's are 4). */
75#ifndef DES_LONG
76#define DES_LONG unsigned int
77#endif
78#endif
79
80#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
81#define CONFIG_HEADER_BN_H
82#define BN_LLONG
83
84/* Should we define BN_DIV2W here? */
85
86/* Only one for the following should be defined */
87/* The prime number generation stuff may not work when
88 * EIGHT_BIT but I don't care since I've only used this mode
89 * for debuging the bignum libraries */
90#undef SIXTY_FOUR_BIT_LONG
91#undef SIXTY_FOUR_BIT
92#define THIRTY_TWO_BIT
93#undef SIXTEEN_BIT
94#undef EIGHT_BIT
95#endif
96
97#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
98#define CONFIG_HEADER_RC4_LOCL_H
99/* if this is defined data[i] is used instead of *data, this is a %20
100 * speedup on x86 */
101#define RC4_INDEX
102#endif
103
104#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
105#define CONFIG_HEADER_BF_LOCL_H
106#undef BF_PTR
107#endif /* HEADER_BF_LOCL_H */
108
109#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
110#define CONFIG_HEADER_DES_LOCL_H
111#ifndef DES_DEFAULT_OPTIONS
112/* the following is tweaked from a config script, that is why it is a
113 * protected undef/define */
114#ifndef DES_PTR
115#undef DES_PTR
116#endif
117
118/* This helps C compiler generate the correct code for multiple functional
119 * units. It reduces register dependancies at the expense of 2 more
120 * registers */
121#ifndef DES_RISC1
122#undef DES_RISC1
123#endif
124
125#ifndef DES_RISC2
126#undef DES_RISC2
127#endif
128
129#if defined(DES_RISC1) && defined(DES_RISC2)
130YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
131#endif
132
133/* Unroll the inner loop, this sometimes helps, sometimes hinders.
134 * Very mucy CPU dependant */
135#ifndef DES_UNROLL
136#define DES_UNROLL
137#endif
138
139/* These default values were supplied by
140 * Peter Gutman <pgut001@cs.auckland.ac.nz>
141 * They are only used if nothing else has been defined */
142#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
143/* Special defines which change the way the code is built depending on the
144 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
145 even newer MIPS CPU's, but at the moment one size fits all for
146 optimization options. Older Sparc's work better with only UNROLL, but
147 there's no way to tell at compile time what it is you're running on */
148
149#if defined( sun ) /* Newer Sparc's */
150# define DES_PTR
151# define DES_RISC1
152# define DES_UNROLL
153#elif defined( __ultrix ) /* Older MIPS */
154# define DES_PTR
155# define DES_RISC2
156# define DES_UNROLL
157#elif defined( __osf1__ ) /* Alpha */
158# define DES_PTR
159# define DES_RISC2
160#elif defined ( _AIX ) /* RS6000 */
161 /* Unknown */
162#elif defined( __hpux ) /* HP-PA */
163 /* Unknown */
164#elif defined( __aux ) /* 68K */
165 /* Unknown */
166#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
167# define DES_UNROLL
168#elif defined( __sgi ) /* Newer MIPS */
169# define DES_PTR
170# define DES_RISC2
171# define DES_UNROLL
172#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
173# define DES_PTR
174# define DES_RISC1
175# define DES_UNROLL
176#endif /* Systems-specific speed defines */
177#endif
178
179#endif /* DES_DEFAULT_OPTIONS */
180#endif /* HEADER_DES_LOCL_H */
diff --git a/src/lib/libssl/crypto/shlib_version b/src/lib/libssl/crypto/shlib_version
new file mode 100644
index 0000000000..c6fa1d0271
--- /dev/null
+++ b/src/lib/libssl/crypto/shlib_version
@@ -0,0 +1,2 @@
1major=10
2minor=3
diff --git a/src/lib/libssl/doc/openssl.cnf b/src/lib/libssl/doc/openssl.cnf
new file mode 100644
index 0000000000..eca51c3322
--- /dev/null
+++ b/src/lib/libssl/doc/openssl.cnf
@@ -0,0 +1,255 @@
1#
2# OpenSSL example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5
6# This definition stops the following lines choking if HOME isn't
7# defined.
8HOME = .
9RANDFILE = $ENV::HOME/.rnd
10
11# Extra OBJECT IDENTIFIER info:
12#oid_file = $ENV::HOME/.oid
13oid_section = new_oids
14
15# To use this configuration file with the "-extfile" option of the
16# "openssl x509" utility, name here the section containing the
17# X.509v3 extensions to use:
18# extensions =
19# (Alternatively, use a configuration file that has only
20# X.509v3 extensions in its main [= default] section.)
21
22[ new_oids ]
23
24# We can add new OIDs in here for use by 'ca' and 'req'.
25# Add a simple OID like this:
26# testoid1=1.2.3.4
27# Or use config file substitution like this:
28# testoid2=${testoid1}.5.6
29
30####################################################################
31[ ca ]
32default_ca = CA_default # The default ca section
33
34####################################################################
35[ CA_default ]
36
37dir = ./demoCA # Where everything is kept
38certs = $dir/certs # Where the issued certs are kept
39crl_dir = $dir/crl # Where the issued crl are kept
40database = $dir/index.txt # database index file.
41new_certs_dir = $dir/newcerts # default place for new certs.
42
43certificate = $dir/cacert.pem # The CA certificate
44serial = $dir/serial # The current serial number
45crl = $dir/crl.pem # The current CRL
46private_key = $dir/private/cakey.pem# The private key
47RANDFILE = $dir/private/.rand # private random number file
48
49x509_extensions = usr_cert # The extentions to add to the cert
50
51# Comment out the following two lines for the "traditional"
52# (and highly broken) format.
53name_opt = ca_default # Subject Name options
54cert_opt = ca_default # Certificate field options
55
56# Extension copying option: use with caution.
57# copy_extensions = copy
58
59# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
60# so this is commented out by default to leave a V1 CRL.
61# crl_extensions = crl_ext
62
63default_days = 365 # how long to certify for
64default_crl_days= 30 # how long before next CRL
65default_md = md5 # which md to use.
66preserve = no # keep passed DN ordering
67
68# A few difference way of specifying how similar the request should look
69# For type CA, the listed attributes must be the same, and the optional
70# and supplied fields are just that :-)
71policy = policy_match
72
73# For the CA policy
74[ policy_match ]
75countryName = match
76stateOrProvinceName = match
77organizationName = match
78organizationalUnitName = optional
79commonName = supplied
80emailAddress = optional
81
82# For the 'anything' policy
83# At this point in time, you must list all acceptable 'object'
84# types.
85[ policy_anything ]
86countryName = optional
87stateOrProvinceName = optional
88localityName = optional
89organizationName = optional
90organizationalUnitName = optional
91commonName = supplied
92emailAddress = optional
93
94####################################################################
95[ req ]
96default_bits = 1024
97default_keyfile = privkey.pem
98distinguished_name = req_distinguished_name
99attributes = req_attributes
100x509_extensions = v3_ca # The extentions to add to the self signed cert
101
102# Passwords for private keys if not present they will be prompted for
103# input_password = secret
104# output_password = secret
105
106# This sets a mask for permitted string types. There are several options.
107# default: PrintableString, T61String, BMPString.
108# pkix : PrintableString, BMPString.
109# utf8only: only UTF8Strings.
110# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
111# MASK:XXXX a literal mask value.
112# WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings
113# so use this option with caution!
114string_mask = nombstr
115
116# req_extensions = v3_req # The extensions to add to a certificate request
117
118[ req_distinguished_name ]
119countryName = Country Name (2 letter code)
120countryName_default = AU
121countryName_min = 2
122countryName_max = 2
123
124stateOrProvinceName = State or Province Name (full name)
125stateOrProvinceName_default = Some-State
126
127localityName = Locality Name (eg, city)
128
1290.organizationName = Organization Name (eg, company)
1300.organizationName_default = Internet Widgits Pty Ltd
131
132# we can do this but it is not needed normally :-)
133#1.organizationName = Second Organization Name (eg, company)
134#1.organizationName_default = World Wide Web Pty Ltd
135
136organizationalUnitName = Organizational Unit Name (eg, section)
137#organizationalUnitName_default =
138
139commonName = Common Name (eg, YOUR name)
140commonName_max = 64
141
142emailAddress = Email Address
143emailAddress_max = 64
144
145# SET-ex3 = SET extension number 3
146
147[ req_attributes ]
148challengePassword = A challenge password
149challengePassword_min = 4
150challengePassword_max = 20
151
152unstructuredName = An optional company name
153
154[ usr_cert ]
155
156# These extensions are added when 'ca' signs a request.
157
158# This goes against PKIX guidelines but some CAs do it and some software
159# requires this to avoid interpreting an end user certificate as a CA.
160
161basicConstraints=CA:FALSE
162
163# Here are some examples of the usage of nsCertType. If it is omitted
164# the certificate can be used for anything *except* object signing.
165
166# This is OK for an SSL server.
167# nsCertType = server
168
169# For an object signing certificate this would be used.
170# nsCertType = objsign
171
172# For normal client use this is typical
173# nsCertType = client, email
174
175# and for everything including object signing:
176# nsCertType = client, email, objsign
177
178# This is typical in keyUsage for a client certificate.
179# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
180
181# This will be displayed in Netscape's comment listbox.
182nsComment = "OpenSSL Generated Certificate"
183
184# PKIX recommendations harmless if included in all certificates.
185subjectKeyIdentifier=hash
186authorityKeyIdentifier=keyid,issuer:always
187
188# This stuff is for subjectAltName and issuerAltname.
189# Import the email address.
190# subjectAltName=email:copy
191# An alternative to produce certificates that aren't
192# deprecated according to PKIX.
193# subjectAltName=email:move
194
195# Copy subject details
196# issuerAltName=issuer:copy
197
198#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
199#nsBaseUrl
200#nsRevocationUrl
201#nsRenewalUrl
202#nsCaPolicyUrl
203#nsSslServerName
204
205[ v3_req ]
206
207# Extensions to add to a certificate request
208
209basicConstraints = CA:FALSE
210keyUsage = nonRepudiation, digitalSignature, keyEncipherment
211
212[ v3_ca ]
213
214
215# Extensions for a typical CA
216
217
218# PKIX recommendation.
219
220subjectKeyIdentifier=hash
221
222authorityKeyIdentifier=keyid:always,issuer:always
223
224# This is what PKIX recommends but some broken software chokes on critical
225# extensions.
226#basicConstraints = critical,CA:true
227# So we do this instead.
228basicConstraints = CA:true
229
230# Key usage: this is typical for a CA certificate. However since it will
231# prevent it being used as an test self-signed certificate it is best
232# left out by default.
233# keyUsage = cRLSign, keyCertSign
234
235# Some might want this also
236# nsCertType = sslCA, emailCA
237
238# Include email address in subject alt name: another PKIX recommendation
239# subjectAltName=email:copy
240# Copy issuer details
241# issuerAltName=issuer:copy
242
243# DER hex encoding of an extension: beware experts only!
244# obj=DER:02:03
245# Where 'obj' is a standard or added object
246# You can even override a supported extension:
247# basicConstraints= critical, DER:30:03:01:01:FF
248
249[ crl_ext ]
250
251# CRL extensions.
252# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
253
254# issuerAltName=issuer:copy
255authorityKeyIdentifier=keyid:always,issuer:always
diff --git a/src/lib/libssl/doc/openssl.txt b/src/lib/libssl/doc/openssl.txt
new file mode 100644
index 0000000000..432a17b66c
--- /dev/null
+++ b/src/lib/libssl/doc/openssl.txt
@@ -0,0 +1,1235 @@
1
2This is some preliminary documentation for OpenSSL.
3
4Contents:
5
6 OpenSSL X509V3 extension configuration
7 X509V3 Extension code: programmers guide
8 PKCS#12 Library
9
10
11==============================================================================
12 OpenSSL X509V3 extension configuration
13==============================================================================
14
15OpenSSL X509V3 extension configuration: preliminary documentation.
16
17INTRODUCTION.
18
19For OpenSSL 0.9.2 the extension code has be considerably enhanced. It is now
20possible to add and print out common X509 V3 certificate and CRL extensions.
21
22BEGINNERS NOTE
23
24For most simple applications you don't need to know too much about extensions:
25the default openssl.cnf values will usually do sensible things.
26
27If you want to know more you can initially quickly look through the sections
28describing how the standard OpenSSL utilities display and add extensions and
29then the list of supported extensions.
30
31For more technical information about the meaning of extensions see:
32
33http://www.imc.org/ietf-pkix/
34http://home.netscape.com/eng/security/certs.html
35
36PRINTING EXTENSIONS.
37
38Extension values are automatically printed out for supported extensions.
39
40openssl x509 -in cert.pem -text
41openssl crl -in crl.pem -text
42
43will give information in the extension printout, for example:
44
45 X509v3 extensions:
46 X509v3 Basic Constraints:
47 CA:TRUE
48 X509v3 Subject Key Identifier:
49 73:FE:F7:59:A7:E1:26:84:44:D6:44:36:EE:79:1A:95:7C:B1:4B:15
50 X509v3 Authority Key Identifier:
51 keyid:73:FE:F7:59:A7:E1:26:84:44:D6:44:36:EE:79:1A:95:7C:B1:4B:15, DirName:/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd/Email=email@1.address/Email=email@2.address, serial:00
52 X509v3 Key Usage:
53 Certificate Sign, CRL Sign
54 X509v3 Subject Alternative Name:
55 email:email@1.address, email:email@2.address
56
57CONFIGURATION FILES.
58
59The OpenSSL utilities 'ca' and 'req' can now have extension sections listing
60which certificate extensions to include. In each case a line:
61
62x509_extensions = extension_section
63
64indicates which section contains the extensions. In the case of 'req' the
65extension section is used when the -x509 option is present to create a
66self signed root certificate.
67
68The 'x509' utility also supports extensions when it signs a certificate.
69The -extfile option is used to set the configuration file containing the
70extensions. In this case a line with:
71
72extensions = extension_section
73
74in the nameless (default) section is used. If no such line is included then
75it uses the default section.
76
77You can also add extensions to CRLs: a line
78
79crl_extensions = crl_extension_section
80
81will include extensions when the -gencrl option is used with the 'ca' utility.
82You can add any extension to a CRL but of the supported extensions only
83issuerAltName and authorityKeyIdentifier make any real sense. Note: these are
84CRL extensions NOT CRL *entry* extensions which cannot currently be generated.
85CRL entry extensions can be displayed.
86
87NB. At this time Netscape Communicator rejects V2 CRLs: to get an old V1 CRL
88you should not include a crl_extensions line in the configuration file.
89
90As with all configuration files you can use the inbuilt environment expansion
91to allow the values to be passed in the environment. Therefore if you have
92several extension sections used for different purposes you can have a line:
93
94x509_extensions = $ENV::ENV_EXT
95
96and set the ENV_EXT environment variable before calling the relevant utility.
97
98EXTENSION SYNTAX.
99
100Extensions have the basic form:
101
102extension_name=[critical,] extension_options
103
104the use of the critical option makes the extension critical. Extreme caution
105should be made when using the critical flag. If an extension is marked
106as critical then any client that does not understand the extension should
107reject it as invalid. Some broken software will reject certificates which
108have *any* critical extensions (these violates PKIX but we have to live
109with it).
110
111There are three main types of extension: string extensions, multi-valued
112extensions, and raw extensions.
113
114String extensions simply have a string which contains either the value itself
115or how it is obtained.
116
117For example:
118
119nsComment="This is a Comment"
120
121Multi-valued extensions have a short form and a long form. The short form
122is a list of names and values:
123
124basicConstraints=critical,CA:true,pathlen:1
125
126The long form allows the values to be placed in a separate section:
127
128basicConstraints=critical,@bs_section
129
130[bs_section]
131
132CA=true
133pathlen=1
134
135Both forms are equivalent. However it should be noted that in some cases the
136same name can appear multiple times, for example,
137
138subjectAltName=email:steve@here,email:steve@there
139
140in this case an equivalent long form is:
141
142subjectAltName=@alt_section
143
144[alt_section]
145
146email.1=steve@here
147email.2=steve@there
148
149This is because the configuration file code cannot handle the same name
150occurring twice in the same section.
151
152The syntax of raw extensions is governed by the extension code: it can
153for example contain data in multiple sections. The correct syntax to
154use is defined by the extension code itself: check out the certificate
155policies extension for an example.
156
157In addition it is also possible to use the word DER to include arbitrary
158data in any extension.
159
1601.2.3.4=critical,DER:01:02:03:04
1611.2.3.4=DER:01020304
162
163The value following DER is a hex dump of the DER encoding of the extension
164Any extension can be placed in this form to override the default behaviour.
165For example:
166
167basicConstraints=critical,DER:00:01:02:03
168
169WARNING: DER should be used with caution. It is possible to create totally
170invalid extensions unless care is taken.
171
172CURRENTLY SUPPORTED EXTENSIONS.
173
174If you aren't sure about extensions then they can be largely ignored: its only
175when you want to do things like restrict certificate usage when you need to
176worry about them.
177
178The only extension that a beginner might want to look at is Basic Constraints.
179If in addition you want to try Netscape object signing the you should also
180look at Netscape Certificate Type.
181
182Literal String extensions.
183
184In each case the 'value' of the extension is placed directly in the
185extension. Currently supported extensions in this category are: nsBaseUrl,
186nsRevocationUrl, nsCaRevocationUrl, nsRenewalUrl, nsCaPolicyUrl,
187nsSslServerName and nsComment.
188
189For example:
190
191nsComment="This is a test comment"
192
193Bit Strings.
194
195Bit string extensions just consist of a list of supported bits, currently
196two extensions are in this category: PKIX keyUsage and the Netscape specific
197nsCertType.
198
199nsCertType (netscape certificate type) takes the flags: client, server, email,
200objsign, reserved, sslCA, emailCA, objCA.
201
202keyUsage (PKIX key usage) takes the flags: digitalSignature, nonRepudiation,
203keyEncipherment, dataEncipherment, keyAgreement, keyCertSign, cRLSign,
204encipherOnly, decipherOnly.
205
206For example:
207
208nsCertType=server
209
210keyUsage=digitalSignature, nonRepudiation
211
212Hints on Netscape Certificate Type.
213
214Other than Basic Constraints this is the only extension a beginner might
215want to use, if you want to try Netscape object signing, otherwise it can
216be ignored.
217
218If you want a certificate that can be used just for object signing then:
219
220nsCertType=objsign
221
222will do the job. If you want to use it as a normal end user and server
223certificate as well then
224
225nsCertType=objsign,email,server
226
227is more appropriate. You cannot use a self signed certificate for object
228signing (well Netscape signtool can but it cheats!) so you need to create
229a CA certificate and sign an end user certificate with it.
230
231Side note: If you want to conform to the Netscape specifications then you
232should really also set:
233
234nsCertType=objCA
235
236in the *CA* certificate for just an object signing CA and
237
238nsCertType=objCA,emailCA,sslCA
239
240for everything. Current Netscape software doesn't enforce this so it can
241be omitted.
242
243Basic Constraints.
244
245This is generally the only extension you need to worry about for simple
246applications. If you want your certificate to be usable as a CA certificate
247(in addition to an end user certificate) then you set this to:
248
249basicConstraints=CA:TRUE
250
251if you want to be certain the certificate cannot be used as a CA then do:
252
253basicConstraints=CA:FALSE
254
255The rest of this section describes more advanced usage.
256
257Basic constraints is a multi-valued extension that supports a CA and an
258optional pathlen option. The CA option takes the values true and false and
259pathlen takes an integer. Note if the CA option is false the pathlen option
260should be omitted.
261
262The pathlen parameter indicates the maximum number of CAs that can appear
263below this one in a chain. So if you have a CA with a pathlen of zero it can
264only be used to sign end user certificates and not further CAs. This all
265assumes that the software correctly interprets this extension of course.
266
267Examples:
268
269basicConstraints=CA:TRUE
270basicConstraints=critical,CA:TRUE, pathlen:0
271
272NOTE: for a CA to be considered valid it must have the CA option set to
273TRUE. An end user certificate MUST NOT have the CA value set to true.
274According to PKIX recommendations it should exclude the extension entirely,
275however some software may require CA set to FALSE for end entity certificates.
276
277Extended Key Usage.
278
279This extensions consists of a list of usages.
280
281These can either be object short names of the dotted numerical form of OIDs.
282While any OID can be used only certain values make sense. In particular the
283following PKIX, NS and MS values are meaningful:
284
285Value Meaning
286----- -------
287serverAuth SSL/TLS Web Server Authentication.
288clientAuth SSL/TLS Web Client Authentication.
289codeSigning Code signing.
290emailProtection E-mail Protection (S/MIME).
291timeStamping Trusted Timestamping
292msCodeInd Microsoft Individual Code Signing (authenticode)
293msCodeCom Microsoft Commercial Code Signing (authenticode)
294msCTLSign Microsoft Trust List Signing
295msSGC Microsoft Server Gated Crypto
296msEFS Microsoft Encrypted File System
297nsSGC Netscape Server Gated Crypto
298
299For example, under IE5 a CA can be used for any purpose: by including a list
300of the above usages the CA can be restricted to only authorised uses.
301
302Note: software packages may place additional interpretations on certificate
303use, in particular some usages may only work for selected CAs. Don't for example
304expect just including msSGC or nsSGC will automatically mean that a certificate
305can be used for SGC ("step up" encryption) otherwise anyone could use it.
306
307Examples:
308
309extendedKeyUsage=critical,codeSigning,1.2.3.4
310extendedKeyUsage=nsSGC,msSGC
311
312Subject Key Identifier.
313
314This is really a string extension and can take two possible values. Either
315a hex string giving details of the extension value to include or the word
316'hash' which then automatically follow PKIX guidelines in selecting and
317appropriate key identifier. The use of the hex string is strongly discouraged.
318
319Example: subjectKeyIdentifier=hash
320
321Authority Key Identifier.
322
323The authority key identifier extension permits two options. keyid and issuer:
324both can take the optional value "always".
325
326If the keyid option is present an attempt is made to copy the subject key
327identifier from the parent certificate. If the value "always" is present
328then an error is returned if the option fails.
329
330The issuer option copies the issuer and serial number from the issuer
331certificate. Normally this will only be done if the keyid option fails or
332is not included: the "always" flag will always include the value.
333
334Subject Alternative Name.
335
336The subject alternative name extension allows various literal values to be
337included in the configuration file. These include "email" (an email address)
338"URI" a uniform resource indicator, "DNS" (a DNS domain name), RID (a
339registered ID: OBJECT IDENTIFIER) and IP (and IP address).
340
341Also the email option include a special 'copy' value. This will automatically
342include and email addresses contained in the certificate subject name in
343the extension.
344
345Examples:
346
347subjectAltName=email:copy,email:my@other.address,URI:http://my.url.here/
348subjectAltName=email:my@other.address,RID:1.2.3.4
349
350Issuer Alternative Name.
351
352The issuer alternative name option supports all the literal options of
353subject alternative name. It does *not* support the email:copy option because
354that would not make sense. It does support an additional issuer:copy option
355that will copy all the subject alternative name values from the issuer
356certificate (if possible).
357
358Example:
359
360issuserAltName = issuer:copy
361
362Authority Info Access.
363
364The authority information access extension gives details about how to access
365certain information relating to the CA. Its syntax is accessOID;location
366where 'location' has the same syntax as subject alternative name (except
367that email:copy is not supported). accessOID can be any valid OID but only
368certain values are meaningful for example OCSP and caIssuers. OCSP gives the
369location of an OCSP responder: this is used by Netscape PSM and other software.
370
371Example:
372
373authorityInfoAccess = OCSP;URI:http://ocsp.my.host/
374authorityInfoAccess = caIssuers;URI:http://my.ca/ca.html
375
376CRL distribution points.
377
378This is a multi-valued extension that supports all the literal options of
379subject alternative name. Of the few software packages that currently interpret
380this extension most only interpret the URI option.
381
382Currently each option will set a new DistributionPoint with the fullName
383field set to the given value.
384
385Other fields like cRLissuer and reasons cannot currently be set or displayed:
386at this time no examples were available that used these fields.
387
388If you see this extension with <UNSUPPORTED> when you attempt to print it out
389or it doesn't appear to display correctly then let me know, including the
390certificate (mail me at steve@openssl.org) .
391
392Examples:
393
394crlDistributionPoints=URI:http://www.myhost.com/myca.crl
395crlDistributionPoints=URI:http://www.my.com/my.crl,URI:http://www.oth.com/my.crl
396
397Certificate Policies.
398
399This is a RAW extension. It attempts to display the contents of this extension:
400unfortunately this extension is often improperly encoded.
401
402The certificate policies extension will rarely be used in practice: few
403software packages interpret it correctly or at all. IE5 does partially
404support this extension: but it needs the 'ia5org' option because it will
405only correctly support a broken encoding. Of the options below only the
406policy OID, explicitText and CPS options are displayed with IE5.
407
408All the fields of this extension can be set by using the appropriate syntax.
409
410If you follow the PKIX recommendations of not including any qualifiers and just
411using only one OID then you just include the value of that OID. Multiple OIDs
412can be set separated by commas, for example:
413
414certificatePolicies= 1.2.4.5, 1.1.3.4
415
416If you wish to include qualifiers then the policy OID and qualifiers need to
417be specified in a separate section: this is done by using the @section syntax
418instead of a literal OID value.
419
420The section referred to must include the policy OID using the name
421policyIdentifier, cPSuri qualifiers can be included using the syntax:
422
423CPS.nnn=value
424
425userNotice qualifiers can be set using the syntax:
426
427userNotice.nnn=@notice
428
429The value of the userNotice qualifier is specified in the relevant section.
430This section can include explicitText, organization and noticeNumbers
431options. explicitText and organization are text strings, noticeNumbers is a
432comma separated list of numbers. The organization and noticeNumbers options
433(if included) must BOTH be present. If you use the userNotice option with IE5
434then you need the 'ia5org' option at the top level to modify the encoding:
435otherwise it will not be interpreted properly.
436
437Example:
438
439certificatePolicies=ia5org,1.2.3.4,1.5.6.7.8,@polsect
440
441[polsect]
442
443policyIdentifier = 1.3.5.8
444CPS.1="http://my.host.name/"
445CPS.2="http://my.your.name/"
446userNotice.1=@notice
447
448[notice]
449
450explicitText="Explicit Text Here"
451organization="Organisation Name"
452noticeNumbers=1,2,3,4
453
454TECHNICAL NOTE: the ia5org option changes the type of the 'organization' field,
455according to PKIX it should be of type DisplayText but Verisign uses an
456IA5STRING and IE5 needs this too.
457
458Display only extensions.
459
460Some extensions are only partially supported and currently are only displayed
461but cannot be set. These include private key usage period, CRL number, and
462CRL reason.
463
464==============================================================================
465 X509V3 Extension code: programmers guide
466==============================================================================
467
468The purpose of the extension code is twofold. It allows an extension to be
469created from a string or structure describing its contents and it prints out an
470extension in a human or machine readable form.
471
4721. Initialisation and cleanup.
473
474No special initialisation is needed before calling the extension functions.
475You used to have to call X509V3_add_standard_extensions(); but this is no longer
476required and this function no longer does anything.
477
478void X509V3_EXT_cleanup(void);
479
480This function should be called to cleanup the extension code if any custom
481extensions have been added. If no custom extensions have been added then this
482call does nothing. After this call all custom extension code is freed up but
483you can still use the standard extensions.
484
4852. Printing and parsing extensions.
486
487The simplest way to print out extensions is via the standard X509 printing
488routines: if you use the standard X509_print() function, the supported
489extensions will be printed out automatically.
490
491The following functions allow finer control over extension display:
492
493int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent);
494int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);
495
496These two functions print out an individual extension to a BIO or FILE pointer.
497Currently the flag argument is unused and should be set to 0. The 'indent'
498argument is the number of spaces to indent each line.
499
500void *X509V3_EXT_d2i(X509_EXTENSION *ext);
501
502This function parses an extension and returns its internal structure. The
503precise structure you get back depends on the extension being parsed. If the
504extension if basicConstraints you will get back a pointer to a
505BASIC_CONSTRAINTS structure. Check out the source in crypto/x509v3 for more
506details about the structures returned. The returned structure should be freed
507after use using the relevant free function, BASIC_CONSTRAINTS_free() for
508example.
509
510void * X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
511void * X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
512void * X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
513void * X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx);
514
515These functions combine the operations of searching for extensions and
516parsing them. They search a certificate, a CRL a CRL entry or a stack
517of extensions respectively for extension whose NID is 'nid' and return
518the parsed result of NULL if an error occurred. For example:
519
520BASIC_CONSTRAINTS *bs;
521bs = X509_get_ext_d2i(cert, NID_basic_constraints, NULL, NULL);
522
523This will search for the basicConstraints extension and either return
524it value or NULL. NULL can mean either the extension was not found, it
525occurred more than once or it could not be parsed.
526
527If 'idx' is NULL then an extension is only parsed if it occurs precisely
528once. This is standard behaviour because extensions normally cannot occur
529more than once. If however more than one extension of the same type can
530occur it can be used to parse successive extensions for example:
531
532int i;
533void *ext;
534
535i = -1;
536for(;;) {
537 ext = X509_get_ext_d2i(x, nid, crit, &idx);
538 if(ext == NULL) break;
539 /* Do something with ext */
540}
541
542If 'crit' is not NULL and the extension was found then the int it points to
543is set to 1 for critical extensions and 0 for non critical. Therefore if the
544function returns NULL but 'crit' is set to 0 or 1 then the extension was
545found but it could not be parsed.
546
547The int pointed to by crit will be set to -1 if the extension was not found
548and -2 if the extension occurred more than once (this will only happen if
549idx is NULL). In both cases the function will return NULL.
550
5513. Generating extensions.
552
553An extension will typically be generated from a configuration file, or some
554other kind of configuration database.
555
556int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section,
557 X509 *cert);
558int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section,
559 X509_CRL *crl);
560
561These functions add all the extensions in the given section to the given
562certificate or CRL. They will normally be called just before the certificate
563or CRL is due to be signed. Both return 0 on error on non zero for success.
564
565In each case 'conf' is the LHASH pointer of the configuration file to use
566and 'section' is the section containing the extension details.
567
568See the 'context functions' section for a description of the ctx parameter.
569
570
571X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name,
572 char *value);
573
574This function returns an extension based on a name and value pair, if the
575pair will not need to access other sections in a config file (or there is no
576config file) then the 'conf' parameter can be set to NULL.
577
578X509_EXTENSION *X509V3_EXT_conf_nid(char *conf, X509V3_CTX *ctx, int nid,
579 char *value);
580
581This function creates an extension in the same way as X509V3_EXT_conf() but
582takes the NID of the extension rather than its name.
583
584For example to produce basicConstraints with the CA flag and a path length of
58510:
586
587x = X509V3_EXT_conf_nid(NULL, NULL, NID_basic_constraints,"CA:TRUE,pathlen:10");
588
589
590X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc);
591
592This function sets up an extension from its internal structure. The ext_nid
593parameter is the NID of the extension and 'crit' is the critical flag.
594
5954. Context functions.
596
597The following functions set and manipulate an extension context structure.
598The purpose of the extension context is to allow the extension code to
599access various structures relating to the "environment" of the certificate:
600for example the issuers certificate or the certificate request.
601
602void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject,
603 X509_REQ *req, X509_CRL *crl, int flags);
604
605This function sets up an X509V3_CTX structure with details of the certificate
606environment: specifically the issuers certificate, the subject certificate,
607the certificate request and the CRL: if these are not relevant or not
608available then they can be set to NULL. The 'flags' parameter should be set
609to zero.
610
611X509V3_set_ctx_test(ctx)
612
613This macro is used to set the 'ctx' structure to a 'test' value: this is to
614allow the syntax of an extension (or configuration file) to be tested.
615
616X509V3_set_ctx_nodb(ctx)
617
618This macro is used when no configuration database is present.
619
620void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash);
621
622This function is used to set the configuration database when it is an LHASH
623structure: typically a configuration file.
624
625The following functions are used to access a configuration database: they
626should only be used in RAW extensions.
627
628char * X509V3_get_string(X509V3_CTX *ctx, char *name, char *section);
629
630This function returns the value of the parameter "name" in "section", or NULL
631if there has been an error.
632
633void X509V3_string_free(X509V3_CTX *ctx, char *str);
634
635This function frees up the string returned by the above function.
636
637STACK_OF(CONF_VALUE) * X509V3_get_section(X509V3_CTX *ctx, char *section);
638
639This function returns a whole section as a STACK_OF(CONF_VALUE) .
640
641void X509V3_section_free( X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section);
642
643This function frees up the STACK returned by the above function.
644
645Note: it is possible to use the extension code with a custom configuration
646database. To do this the "db_meth" element of the X509V3_CTX structure should
647be set to an X509V3_CTX_METHOD structure. This structure contains the following
648function pointers:
649
650char * (*get_string)(void *db, char *section, char *value);
651STACK_OF(CONF_VALUE) * (*get_section)(void *db, char *section);
652void (*free_string)(void *db, char * string);
653void (*free_section)(void *db, STACK_OF(CONF_VALUE) *section);
654
655these will be called and passed the 'db' element in the X509V3_CTX structure
656to access the database. If a given function is not implemented or not required
657it can be set to NULL.
658
6595. String helper functions.
660
661There are several "i2s" and "s2i" functions that convert structures to and
662from ASCII strings. In all the "i2s" cases the returned string should be
663freed using Free() after use. Since some of these are part of other extension
664code they may take a 'method' parameter. Unless otherwise stated it can be
665safely set to NULL.
666
667char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *oct);
668
669This returns a hex string from an ASN1_OCTET_STRING.
670
671char * i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint);
672char * i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint);
673
674These return a string decimal representations of an ASN1_INTEGER and an
675ASN1_ENUMERATED type, respectively.
676
677ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
678 X509V3_CTX *ctx, char *str);
679
680This converts an ASCII hex string to an ASN1_OCTET_STRING.
681
682ASN1_INTEGER * s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, char *value);
683
684This converts a decimal ASCII string into an ASN1_INTEGER.
685
6866. Multi valued extension helper functions.
687
688The following functions can be used to manipulate STACKs of CONF_VALUE
689structures, as used by multi valued extensions.
690
691int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool);
692
693This function expects a boolean value in 'value' and sets 'asn1_bool' to
694it. That is it sets it to 0 for FALSE or 0xff for TRUE. The following
695strings are acceptable: "TRUE", "true", "Y", "y", "YES", "yes", "FALSE"
696"false", "N", "n", "NO" or "no".
697
698int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint);
699
700This accepts a decimal integer of arbitrary length and sets an ASN1_INTEGER.
701
702int X509V3_add_value(const char *name, const char *value,
703 STACK_OF(CONF_VALUE) **extlist);
704
705This simply adds a string name and value pair.
706
707int X509V3_add_value_uchar(const char *name, const unsigned char *value,
708 STACK_OF(CONF_VALUE) **extlist);
709
710The same as above but for an unsigned character value.
711
712int X509V3_add_value_bool(const char *name, int asn1_bool,
713 STACK_OF(CONF_VALUE) **extlist);
714
715This adds either "TRUE" or "FALSE" depending on the value of 'asn1_bool'
716
717int X509V3_add_value_bool_nf(char *name, int asn1_bool,
718 STACK_OF(CONF_VALUE) **extlist);
719
720This is the same as above except it adds nothing if asn1_bool is FALSE.
721
722int X509V3_add_value_int(const char *name, ASN1_INTEGER *aint,
723 STACK_OF(CONF_VALUE) **extlist);
724
725This function adds the value of the ASN1_INTEGER in decimal form.
726
7277. Other helper functions.
728
729<to be added>
730
731ADDING CUSTOM EXTENSIONS.
732
733Currently there are three types of supported extensions.
734
735String extensions are simple strings where the value is placed directly in the
736extensions, and the string returned is printed out.
737
738Multi value extensions are passed a STACK_OF(CONF_VALUE) name and value pairs
739or return a STACK_OF(CONF_VALUE).
740
741Raw extensions are just passed a BIO or a value and it is the extensions
742responsibility to handle all the necessary printing.
743
744There are two ways to add an extension. One is simply as an alias to an already
745existing extension. An alias is an extension that is identical in ASN1 structure
746to an existing extension but has a different OBJECT IDENTIFIER. This can be
747done by calling:
748
749int X509V3_EXT_add_alias(int nid_to, int nid_from);
750
751'nid_to' is the new extension NID and 'nid_from' is the already existing
752extension NID.
753
754Alternatively an extension can be written from scratch. This involves writing
755the ASN1 code to encode and decode the extension and functions to print out and
756generate the extension from strings. The relevant functions are then placed in
757a X509V3_EXT_METHOD structure and int X509V3_EXT_add(X509V3_EXT_METHOD *ext);
758called.
759
760The X509V3_EXT_METHOD structure is described below.
761
762strut {
763int ext_nid;
764int ext_flags;
765X509V3_EXT_NEW ext_new;
766X509V3_EXT_FREE ext_free;
767X509V3_EXT_D2I d2i;
768X509V3_EXT_I2D i2d;
769X509V3_EXT_I2S i2s;
770X509V3_EXT_S2I s2i;
771X509V3_EXT_I2V i2v;
772X509V3_EXT_V2I v2i;
773X509V3_EXT_R2I r2i;
774X509V3_EXT_I2R i2r;
775
776void *usr_data;
777};
778
779The elements have the following meanings.
780
781ext_nid is the NID of the object identifier of the extension.
782
783ext_flags is set of flags. Currently the only external flag is
784 X509V3_EXT_MULTILINE which means a multi valued extensions
785 should be printed on separate lines.
786
787usr_data is an extension specific pointer to any relevant data. This
788 allows extensions to share identical code but have different
789 uses. An example of this is the bit string extension which uses
790 usr_data to contain a list of the bit names.
791
792All the remaining elements are function pointers.
793
794ext_new is a pointer to a function that allocates memory for the
795 extension ASN1 structure: for example ASN1_OBJECT_new().
796
797ext_free is a pointer to a function that free up memory of the extension
798 ASN1 structure: for example ASN1_OBJECT_free().
799
800d2i is the standard ASN1 function that converts a DER buffer into
801 the internal ASN1 structure: for example d2i_ASN1_IA5STRING().
802
803i2d is the standard ASN1 function that converts the internal
804 structure into the DER representation: for example
805 i2d_ASN1_IA5STRING().
806
807The remaining functions are depend on the type of extension. One i2X and
808one X2i should be set and the rest set to NULL. The types set do not need
809to match up, for example the extension could be set using the multi valued
810v2i function and printed out using the raw i2r.
811
812All functions have the X509V3_EXT_METHOD passed to them in the 'method'
813parameter and an X509V3_CTX structure. Extension code can then access the
814parent structure via the 'method' parameter to for example make use of the value
815of usr_data. If the code needs to use detail relating to the request it can
816use the 'ctx' parameter.
817
818A note should be given here about the 'flags' member of the 'ctx' parameter.
819If it has the value CTX_TEST then the configuration syntax is being checked
820and no actual certificate or CRL exists. Therefore any attempt in the config
821file to access such information should silently succeed. If the syntax is OK
822then it should simply return a (possibly bogus) extension, otherwise it
823should return NULL.
824
825char *i2s(struct v3_ext_method *method, void *ext);
826
827This function takes the internal structure in the ext parameter and returns
828a Malloc'ed string representing its value.
829
830void * s2i(struct v3_ext_method *method, struct v3_ext_ctx *ctx, char *str);
831
832This function takes the string representation in the ext parameter and returns
833an allocated internal structure: ext_free() will be used on this internal
834structure after use.
835
836i2v and v2i handle a STACK_OF(CONF_VALUE):
837
838typedef struct
839{
840 char *section;
841 char *name;
842 char *value;
843} CONF_VALUE;
844
845Only the name and value members are currently used.
846
847STACK_OF(CONF_VALUE) * i2v(struct v3_ext_method *method, void *ext);
848
849This function is passed the internal structure in the ext parameter and
850returns a STACK of CONF_VALUE structures. The values of name, value,
851section and the structure itself will be freed up with Free after use.
852Several helper functions are available to add values to this STACK.
853
854void * v2i(struct v3_ext_method *method, struct v3_ext_ctx *ctx,
855 STACK_OF(CONF_VALUE) *values);
856
857This function takes a STACK_OF(CONF_VALUE) structures and should set the
858values of the external structure. This typically uses the name element to
859determine which structure element to set and the value element to determine
860what to set it to. Several helper functions are available for this
861purpose (see above).
862
863int i2r(struct v3_ext_method *method, void *ext, BIO *out, int indent);
864
865This function is passed the internal extension structure in the ext parameter
866and sends out a human readable version of the extension to out. The 'indent'
867parameter should be noted to determine the necessary amount of indentation
868needed on the output.
869
870void * r2i(struct v3_ext_method *method, struct v3_ext_ctx *ctx, char *str);
871
872This is just passed the string representation of the extension. It is intended
873to be used for more elaborate extensions where the standard single and multi
874valued options are insufficient. They can use the 'ctx' parameter to parse the
875configuration database themselves. See the context functions section for details
876of how to do this.
877
878Note: although this type takes the same parameters as the "r2s" function there
879is a subtle difference. Whereas an "r2i" function can access a configuration
880database an "s2i" function MUST NOT. This is so the internal code can safely
881assume that an "s2i" function will work without a configuration database.
882
883==============================================================================
884 PKCS#12 Library
885==============================================================================
886
887This section describes the internal PKCS#12 support. There are very few
888differences between the old external library and the new internal code at
889present. This may well change because the external library will not be updated
890much in future.
891
892This version now includes a couple of high level PKCS#12 functions which
893generally "do the right thing" and should make it much easier to handle PKCS#12
894structures.
895
896HIGH LEVEL FUNCTIONS.
897
898For most applications you only need concern yourself with the high level
899functions. They can parse and generate simple PKCS#12 files as produced by
900Netscape and MSIE or indeed any compliant PKCS#12 file containing a single
901private key and certificate pair.
902
9031. Initialisation and cleanup.
904
905No special initialisation is needed for the internal PKCS#12 library: the
906standard SSLeay_add_all_algorithms() is sufficient. If you do not wish to
907add all algorithms (you should at least add SHA1 though) then you can manually
908initialise the PKCS#12 library with:
909
910PKCS12_PBE_add();
911
912The memory allocated by the PKCS#12 library is freed up when EVP_cleanup() is
913called or it can be directly freed with:
914
915EVP_PBE_cleanup();
916
917after this call (or EVP_cleanup() ) no more PKCS#12 library functions should
918be called.
919
9202. I/O functions.
921
922i2d_PKCS12_bio(bp, p12)
923
924This writes out a PKCS12 structure to a BIO.
925
926i2d_PKCS12_fp(fp, p12)
927
928This is the same but for a FILE pointer.
929
930d2i_PKCS12_bio(bp, p12)
931
932This reads in a PKCS12 structure from a BIO.
933
934d2i_PKCS12_fp(fp, p12)
935
936This is the same but for a FILE pointer.
937
9383. High level functions.
939
9403.1 Parsing with PKCS12_parse().
941
942int PKCS12_parse(PKCS12 *p12, char *pass, EVP_PKEY **pkey, X509 **cert,
943 STACK **ca);
944
945This function takes a PKCS12 structure and a password (ASCII, null terminated)
946and returns the private key, the corresponding certificate and any CA
947certificates. If any of these is not required it can be passed as a NULL.
948The 'ca' parameter should be either NULL, a pointer to NULL or a valid STACK
949structure. Typically to read in a PKCS#12 file you might do:
950
951p12 = d2i_PKCS12_fp(fp, NULL);
952PKCS12_parse(p12, password, &pkey, &cert, NULL); /* CAs not wanted */
953PKCS12_free(p12);
954
9553.2 PKCS#12 creation with PKCS12_create().
956
957PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
958 STACK *ca, int nid_key, int nid_cert, int iter,
959 int mac_iter, int keytype);
960
961This function will create a PKCS12 structure from a given password, name,
962private key, certificate and optional STACK of CA certificates. The remaining
9635 parameters can be set to 0 and sensible defaults will be used.
964
965The parameters nid_key and nid_cert are the key and certificate encryption
966algorithms, iter is the encryption iteration count, mac_iter is the MAC
967iteration count and keytype is the type of private key. If you really want
968to know what these last 5 parameters do then read the low level section.
969
970Typically to create a PKCS#12 file the following could be used:
971
972p12 = PKCS12_create(pass, "My Certificate", pkey, cert, NULL, 0,0,0,0,0);
973i2d_PKCS12_fp(fp, p12);
974PKCS12_free(p12);
975
9763.3 Changing a PKCS#12 structure password.
977
978int PKCS12_newpass(PKCS12 *p12, char *oldpass, char *newpass);
979
980This changes the password of an already existing PKCS#12 structure. oldpass
981is the old password and newpass is the new one. An error occurs if the old
982password is incorrect.
983
984LOW LEVEL FUNCTIONS.
985
986In some cases the high level functions do not provide the necessary
987functionality. For example if you want to generate or parse more complex
988PKCS#12 files. The sample pkcs12 application uses the low level functions
989to display details about the internal structure of a PKCS#12 file.
990
991Introduction.
992
993This is a brief description of how a PKCS#12 file is represented internally:
994some knowledge of PKCS#12 is assumed.
995
996A PKCS#12 object contains several levels.
997
998At the lowest level is a PKCS12_SAFEBAG. This can contain a certificate, a
999CRL, a private key, encrypted or unencrypted, a set of safebags (so the
1000structure can be nested) or other secrets (not documented at present).
1001A safebag can optionally have attributes, currently these are: a unicode
1002friendlyName (a Unicode string) or a localKeyID (a string of bytes).
1003
1004At the next level is an authSafe which is a set of safebags collected into
1005a PKCS#7 ContentInfo. This can be just plain data, or encrypted itself.
1006
1007At the top level is the PKCS12 structure itself which contains a set of
1008authSafes in an embedded PKCS#7 Contentinfo of type data. In addition it
1009contains a MAC which is a kind of password protected digest to preserve
1010integrity (so any unencrypted stuff below can't be tampered with).
1011
1012The reason for these levels is so various objects can be encrypted in various
1013ways. For example you might want to encrypt a set of private keys with
1014triple-DES and then include the related certificates either unencrypted or
1015with lower encryption. Yes it's the dreaded crypto laws at work again which
1016allow strong encryption on private keys and only weak encryption on other
1017stuff.
1018
1019To build one of these things you turn all certificates and keys into safebags
1020(with optional attributes). You collect the safebags into (one or more) STACKS
1021and convert these into authsafes (encrypted or unencrypted). The authsafes
1022are collected into a STACK and added to a PKCS12 structure. Finally a MAC
1023inserted.
1024
1025Pulling one apart is basically the reverse process. The MAC is verified against
1026the given password. The authsafes are extracted and each authsafe split into
1027a set of safebags (possibly involving decryption). Finally the safebags are
1028decomposed into the original keys and certificates and the attributes used to
1029match up private key and certificate pairs.
1030
1031Anyway here are the functions that do the dirty work.
1032
10331. Construction functions.
1034
10351.1 Safebag functions.
1036
1037M_PKCS12_x5092certbag(x509)
1038
1039This macro takes an X509 structure and returns a certificate bag. The
1040X509 structure can be freed up after calling this function.
1041
1042M_PKCS12_x509crl2certbag(crl)
1043
1044As above but for a CRL.
1045
1046PKCS8_PRIV_KEY_INFO *PKEY2PKCS8(EVP_PKEY *pkey)
1047
1048Take a private key and convert it into a PKCS#8 PrivateKeyInfo structure.
1049Works for both RSA and DSA private keys. NB since the PKCS#8 PrivateKeyInfo
1050structure contains a private key data in plain text form it should be free'd
1051up as soon as it has been encrypted for security reasons (freeing up the
1052structure zeros out the sensitive data). This can be done with
1053PKCS8_PRIV_KEY_INFO_free().
1054
1055PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage)
1056
1057This sets the key type when a key is imported into MSIE or Outlook 98. Two
1058values are currently supported: KEY_EX and KEY_SIG. KEY_EX is an exchange type
1059key that can also be used for signing but its size is limited in the export
1060versions of MS software to 512 bits, it is also the default. KEY_SIG is a
1061signing only key but the keysize is unlimited (well 16K is supposed to work).
1062If you are using the domestic version of MSIE then you can ignore this because
1063KEY_EX is not limited and can be used for both.
1064
1065PKCS12_SAFEBAG *PKCS12_MAKE_KEYBAG(PKCS8_PRIV_KEY_INFO *p8)
1066
1067Convert a PKCS8 private key structure into a keybag. This routine embeds the
1068p8 structure in the keybag so p8 should not be freed up or used after it is
1069called. The p8 structure will be freed up when the safebag is freed.
1070
1071PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG(int pbe_nid, unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8)
1072
1073Convert a PKCS#8 structure into a shrouded key bag (encrypted). p8 is not
1074embedded and can be freed up after use.
1075
1076int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen)
1077int PKCS12_add_friendlyname(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen)
1078
1079Add a local key id or a friendlyname to a safebag.
1080
10811.2 Authsafe functions.
1082
1083PKCS7 *PKCS12_pack_p7data(STACK *sk)
1084Take a stack of safebags and convert them into an unencrypted authsafe. The
1085stack of safebags can be freed up after calling this function.
1086
1087PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int iter, STACK *bags);
1088
1089As above but encrypted.
1090
10911.3 PKCS12 functions.
1092
1093PKCS12 *PKCS12_init(int mode)
1094
1095Initialise a PKCS12 structure (currently mode should be NID_pkcs7_data).
1096
1097M_PKCS12_pack_authsafes(p12, safes)
1098
1099This macro takes a STACK of authsafes and adds them to a PKCS#12 structure.
1100
1101int PKCS12_set_mac(PKCS12 *p12, unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int iter, EVP_MD *md_type);
1102
1103Add a MAC to a PKCS12 structure. If EVP_MD is NULL use SHA-1, the spec suggests
1104that SHA-1 should be used.
1105
11062. Extraction Functions.
1107
11082.1 Safebags.
1109
1110M_PKCS12_bag_type(bag)
1111
1112Return the type of "bag". Returns one of the following
1113
1114NID_keyBag
1115NID_pkcs8ShroudedKeyBag 7
1116NID_certBag 8
1117NID_crlBag 9
1118NID_secretBag 10
1119NID_safeContentsBag 11
1120
1121M_PKCS12_cert_bag_type(bag)
1122
1123Returns type of certificate bag, following are understood.
1124
1125NID_x509Certificate 14
1126NID_sdsiCertificate 15
1127
1128M_PKCS12_crl_bag_type(bag)
1129
1130Returns crl bag type, currently only NID_crlBag is recognised.
1131
1132M_PKCS12_certbag2x509(bag)
1133
1134This macro extracts an X509 certificate from a certificate bag.
1135
1136M_PKCS12_certbag2x509crl(bag)
1137
1138As above but for a CRL.
1139
1140EVP_PKEY * PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8)
1141
1142Extract a private key from a PKCS8 private key info structure.
1143
1144M_PKCS12_decrypt_skey(bag, pass, passlen)
1145
1146Decrypt a shrouded key bag and return a PKCS8 private key info structure.
1147Works with both RSA and DSA keys
1148
1149char *PKCS12_get_friendlyname(bag)
1150
1151Returns the friendlyName of a bag if present or NULL if none. The returned
1152string is a null terminated ASCII string allocated with Malloc(). It should
1153thus be freed up with Free() after use.
1154
11552.2 AuthSafe functions.
1156
1157M_PKCS12_unpack_p7data(p7)
1158
1159Extract a STACK of safe bags from a PKCS#7 data ContentInfo.
1160
1161#define M_PKCS12_unpack_p7encdata(p7, pass, passlen)
1162
1163As above but for an encrypted content info.
1164
11652.3 PKCS12 functions.
1166
1167M_PKCS12_unpack_authsafes(p12)
1168
1169Extract a STACK of authsafes from a PKCS12 structure.
1170
1171M_PKCS12_mac_present(p12)
1172
1173Check to see if a MAC is present.
1174
1175int PKCS12_verify_mac(PKCS12 *p12, unsigned char *pass, int passlen)
1176
1177Verify a MAC on a PKCS12 structure. Returns an error if MAC not present.
1178
1179
1180Notes.
1181
11821. All the function return 0 or NULL on error.
11832. Encryption based functions take a common set of parameters. These are
1184described below.
1185
1186pass, passlen
1187ASCII password and length. The password on the MAC is called the "integrity
1188password" the encryption password is called the "privacy password" in the
1189PKCS#12 documentation. The passwords do not have to be the same. If -1 is
1190passed for the length it is worked out by the function itself (currently
1191this is sometimes done whatever is passed as the length but that may change).
1192
1193salt, saltlen
1194A 'salt' if salt is NULL a random salt is used. If saltlen is also zero a
1195default length is used.
1196
1197iter
1198Iteration count. This is a measure of how many times an internal function is
1199called to encrypt the data. The larger this value is the longer it takes, it
1200makes dictionary attacks on passwords harder. NOTE: Some implementations do
1201not support an iteration count on the MAC. If the password for the MAC and
1202encryption is the same then there is no point in having a high iteration
1203count for encryption if the MAC has no count. The MAC could be attacked
1204and the password used for the main decryption.
1205
1206pbe_nid
1207This is the NID of the password based encryption method used. The following are
1208supported.
1209NID_pbe_WithSHA1And128BitRC4
1210NID_pbe_WithSHA1And40BitRC4
1211NID_pbe_WithSHA1And3_Key_TripleDES_CBC
1212NID_pbe_WithSHA1And2_Key_TripleDES_CBC
1213NID_pbe_WithSHA1And128BitRC2_CBC
1214NID_pbe_WithSHA1And40BitRC2_CBC
1215
1216Which you use depends on the implementation you are exporting to. "Export
1217grade" (i.e. cryptographically challenged) products cannot support all
1218algorithms. Typically you may be able to use any encryption on shrouded key
1219bags but they must then be placed in an unencrypted authsafe. Other authsafes
1220may only support 40bit encryption. Of course if you are using SSLeay
1221throughout you can strongly encrypt everything and have high iteration counts
1222on everything.
1223
12243. For decryption routines only the password and length are needed.
1225
12264. Unlike the external version the nid's of objects are the values of the
1227constants: that is NID_certBag is the real nid, therefore there is no
1228PKCS12_obj_offset() function. Note the object constants are not the same as
1229those of the external version. If you use these constants then you will need
1230to recompile your code.
1231
12325. With the exception of PKCS12_MAKE_KEYBAG(), after calling any function or
1233macro of the form PKCS12_MAKE_SOMETHING(other) the "other" structure can be
1234reused or freed up safely.
1235
diff --git a/src/lib/libssl/doc/standards.txt b/src/lib/libssl/doc/standards.txt
new file mode 100644
index 0000000000..edbe2f3a57
--- /dev/null
+++ b/src/lib/libssl/doc/standards.txt
@@ -0,0 +1,257 @@
1Standards 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
11All pointers in here will be either URL's or blobs of text borrowed
12from miscellaneous indexes, like rfc-index.txt (index of RFCs),
131id-index.txt (index of Internet drafts) and the like.
14
15To find the latest possible RFCs, it's recommended to either browse
16ftp://ftp.isi.edu/in-notes/ or go to http://www.rfc-editor.org/ and
17use the search mechanism found there.
18To find the latest possible Internet drafts, it's recommended to
19browse ftp://ftp.isi.edu/internet-drafts/.
20To find the latest possible PKCS, it's recommended to browse
21http://www.rsasecurity.com/rsalabs/pkcs/.
22
23
24Implemented:
25------------
26
27These are documents that describe things that are implemented (in
28whole or at least great parts) in OpenSSL.
29
301319 The MD2 Message-Digest Algorithm. B. Kaliski. April 1992.
31 (Format: TXT=25661 bytes) (Status: INFORMATIONAL)
32
331320 The MD4 Message-Digest Algorithm. R. Rivest. April 1992. (Format:
34 TXT=32407 bytes) (Status: INFORMATIONAL)
35
361321 The MD5 Message-Digest Algorithm. R. Rivest. April 1992. (Format:
37 TXT=35222 bytes) (Status: INFORMATIONAL)
38
392246 The TLS Protocol Version 1.0. T. Dierks, C. Allen. January 1999.
40 (Format: TXT=170401 bytes) (Status: PROPOSED STANDARD)
41
422268 A Description of the RC2(r) Encryption Algorithm. R. Rivest.
43 January 1998. (Format: TXT=19048 bytes) (Status: INFORMATIONAL)
44
452315 PKCS 7: Cryptographic Message Syntax Version 1.5. B. Kaliski.
46 March 1998. (Format: TXT=69679 bytes) (Status: INFORMATIONAL)
47
48PKCS#8: Private-Key Information Syntax Standard
49
50PKCS#12: Personal Information Exchange Syntax Standard, version 1.0.
51
522560 X.509 Internet Public Key Infrastructure Online Certificate
53 Status Protocol - OCSP. M. Myers, R. Ankney, A. Malpani, S. Galperin,
54 C. Adams. June 1999. (Format: TXT=43243 bytes) (Status: PROPOSED
55 STANDARD)
56
572712 Addition of Kerberos Cipher Suites to Transport Layer Security
58 (TLS). A. Medvinsky, M. Hur. October 1999. (Format: TXT=13763 bytes)
59 (Status: PROPOSED STANDARD)
60
612898 PKCS #5: Password-Based Cryptography Specification Version 2.0.
62 B. Kaliski. September 2000. (Format: TXT=68692 bytes) (Status:
63 INFORMATIONAL)
64
652986 PKCS #10: Certification Request Syntax Specification Version 1.7.
66 M. Nystrom, B. Kaliski. November 2000. (Format: TXT=27794 bytes)
67 (Obsoletes RFC2314) (Status: INFORMATIONAL)
68
693174 US Secure Hash Algorithm 1 (SHA1). D. Eastlake 3rd, P. Jones.
70 September 2001. (Format: TXT=35525 bytes) (Status: INFORMATIONAL)
71
723268 Advanced Encryption Standard (AES) Ciphersuites for Transport
73 Layer Security (TLS). P. Chown. June 2002. (Format: TXT=13530 bytes)
74 (Status: PROPOSED STANDARD)
75
763279 Algorithms and Identifiers for the Internet X.509 Public Key
77 Infrastructure Certificate and Certificate Revocation List (CRL)
78 Profile. L. Bassham, W. Polk, R. Housley. April 2002. (Format:
79 TXT=53833 bytes) (Status: PROPOSED STANDARD)
80
813280 Internet X.509 Public Key Infrastructure Certificate and
82 Certificate Revocation List (CRL) Profile. R. Housley, W. Polk, W.
83 Ford, D. Solo. April 2002. (Format: TXT=295556 bytes) (Obsoletes
84 RFC2459) (Status: PROPOSED STANDARD)
85
863447 Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography
87 Specifications Version 2.1. J. Jonsson, B. Kaliski. February 2003.
88 (Format: TXT=143173 bytes) (Obsoletes RFC2437) (Status:
89 INFORMATIONAL)
90
91
92Related:
93--------
94
95These are documents that are close to OpenSSL, for example the
96STARTTLS documents.
97
981421 Privacy Enhancement for Internet Electronic Mail: Part I: Message
99 Encryption and Authentication Procedures. J. Linn. February 1993.
100 (Format: TXT=103894 bytes) (Obsoletes RFC1113) (Status: PROPOSED
101 STANDARD)
102
1031422 Privacy Enhancement for Internet Electronic Mail: Part II:
104 Certificate-Based Key Management. S. Kent. February 1993. (Format:
105 TXT=86085 bytes) (Obsoletes RFC1114) (Status: PROPOSED STANDARD)
106
1071423 Privacy Enhancement for Internet Electronic Mail: Part III:
108 Algorithms, Modes, and Identifiers. D. Balenson. February 1993.
109 (Format: TXT=33277 bytes) (Obsoletes RFC1115) (Status: PROPOSED
110 STANDARD)
111
1121424 Privacy Enhancement for Internet Electronic Mail: Part IV: Key
113 Certification and Related Services. B. Kaliski. February 1993.
114 (Format: TXT=17537 bytes) (Status: PROPOSED STANDARD)
115
1162025 The Simple Public-Key GSS-API Mechanism (SPKM). C. Adams. October
117 1996. (Format: TXT=101692 bytes) (Status: PROPOSED STANDARD)
118
1192510 Internet X.509 Public Key Infrastructure Certificate Management
120 Protocols. C. Adams, S. Farrell. March 1999. (Format: TXT=158178
121 bytes) (Status: PROPOSED STANDARD)
122
1232511 Internet X.509 Certificate Request Message Format. M. Myers, C.
124 Adams, D. Solo, D. Kemp. March 1999. (Format: TXT=48278 bytes)
125 (Status: PROPOSED STANDARD)
126
1272527 Internet X.509 Public Key Infrastructure Certificate Policy and
128 Certification Practices Framework. S. Chokhani, W. Ford. March 1999.
129 (Format: TXT=91860 bytes) (Status: INFORMATIONAL)
130
1312538 Storing Certificates in the Domain Name System (DNS). D. Eastlake
132 3rd, O. Gudmundsson. March 1999. (Format: TXT=19857 bytes) (Status:
133 PROPOSED STANDARD)
134
1352539 Storage of Diffie-Hellman Keys in the Domain Name System (DNS).
136 D. Eastlake 3rd. March 1999. (Format: TXT=21049 bytes) (Status:
137 PROPOSED STANDARD)
138
1392559 Internet X.509 Public Key Infrastructure Operational Protocols -
140 LDAPv2. S. Boeyen, T. Howes, P. Richard. April 1999. (Format:
141 TXT=22889 bytes) (Updates RFC1778) (Status: PROPOSED STANDARD)
142
1432585 Internet X.509 Public Key Infrastructure Operational Protocols:
144 FTP and HTTP. R. Housley, P. Hoffman. May 1999. (Format: TXT=14813
145 bytes) (Status: PROPOSED STANDARD)
146
1472587 Internet X.509 Public Key Infrastructure LDAPv2 Schema. S.
148 Boeyen, T. Howes, P. Richard. June 1999. (Format: TXT=15102 bytes)
149 (Status: PROPOSED STANDARD)
150
1512595 Using TLS with IMAP, POP3 and ACAP. C. Newman. June 1999.
152 (Format: TXT=32440 bytes) (Status: PROPOSED STANDARD)
153
1542631 Diffie-Hellman Key Agreement Method. E. Rescorla. June 1999.
155 (Format: TXT=25932 bytes) (Status: PROPOSED STANDARD)
156
1572632 S/MIME Version 3 Certificate Handling. B. Ramsdell, Ed.. June
158 1999. (Format: TXT=27925 bytes) (Status: PROPOSED STANDARD)
159
1602716 PPP EAP TLS Authentication Protocol. B. Aboba, D. Simon. October
161 1999. (Format: TXT=50108 bytes) (Status: EXPERIMENTAL)
162
1632773 Encryption using KEA and SKIPJACK. R. Housley, P. Yee, W. Nace.
164 February 2000. (Format: TXT=20008 bytes) (Updates RFC0959) (Status:
165 EXPERIMENTAL)
166
1672797 Certificate Management Messages over CMS. M. Myers, X. Liu, J.
168 Schaad, J. Weinstein. April 2000. (Format: TXT=103357 bytes) (Status:
169 PROPOSED STANDARD)
170
1712817 Upgrading to TLS Within HTTP/1.1. R. Khare, S. Lawrence. May
172 2000. (Format: TXT=27598 bytes) (Updates RFC2616) (Status: PROPOSED
173 STANDARD)
174
1752818 HTTP Over TLS. E. Rescorla. May 2000. (Format: TXT=15170 bytes)
176 (Status: INFORMATIONAL)
177
1782876 Use of the KEA and SKIPJACK Algorithms in CMS. J. Pawling. July
179 2000. (Format: TXT=29265 bytes) (Status: INFORMATIONAL)
180
1812984 Use of the CAST-128 Encryption Algorithm in CMS. C. Adams.
182 October 2000. (Format: TXT=11591 bytes) (Status: PROPOSED STANDARD)
183
1842985 PKCS #9: Selected Object Classes and Attribute Types Version 2.0.
185 M. Nystrom, B. Kaliski. November 2000. (Format: TXT=70703 bytes)
186 (Status: INFORMATIONAL)
187
1883029 Internet X.509 Public Key Infrastructure Data Validation and
189 Certification Server Protocols. C. Adams, P. Sylvester, M. Zolotarev,
190 R. Zuccherato. February 2001. (Format: TXT=107347 bytes) (Status:
191 EXPERIMENTAL)
192
1933039 Internet X.509 Public Key Infrastructure Qualified Certificates
194 Profile. S. Santesson, W. Polk, P. Barzin, M. Nystrom. January 2001.
195 (Format: TXT=67619 bytes) (Status: PROPOSED STANDARD)
196
1973058 Use of the IDEA Encryption Algorithm in CMS. S. Teiwes, P.
198 Hartmann, D. Kuenzi. February 2001. (Format: TXT=17257 bytes)
199 (Status: INFORMATIONAL)
200
2013161 Internet X.509 Public Key Infrastructure Time-Stamp Protocol
202 (TSP). C. Adams, P. Cain, D. Pinkas, R. Zuccherato. August 2001.
203 (Format: TXT=54585 bytes) (Status: PROPOSED STANDARD)
204
2053185 Reuse of CMS Content Encryption Keys. S. Farrell, S. Turner.
206 October 2001. (Format: TXT=20404 bytes) (Status: PROPOSED STANDARD)
207
2083207 SMTP Service Extension for Secure SMTP over Transport Layer
209 Security. P. Hoffman. February 2002. (Format: TXT=18679 bytes)
210 (Obsoletes RFC2487) (Status: PROPOSED STANDARD)
211
2123217 Triple-DES and RC2 Key Wrapping. R. Housley. December 2001.
213 (Format: TXT=19855 bytes) (Status: INFORMATIONAL)
214
2153274 Compressed Data Content Type for Cryptographic Message Syntax
216 (CMS). P. Gutmann. June 2002. (Format: TXT=11276 bytes) (Status:
217 PROPOSED STANDARD)
218
2193278 Use of Elliptic Curve Cryptography (ECC) Algorithms in
220 Cryptographic Message Syntax (CMS). S. Blake-Wilson, D. Brown, P.
221 Lambert. April 2002. (Format: TXT=33779 bytes) (Status:
222 INFORMATIONAL)
223
2243281 An Internet Attribute Certificate Profile for Authorization. S.
225 Farrell, R. Housley. April 2002. (Format: TXT=90580 bytes) (Status:
226 PROPOSED STANDARD)
227
2283369 Cryptographic Message Syntax (CMS). R. Housley. August 2002.
229 (Format: TXT=113975 bytes) (Obsoletes RFC2630, RFC3211) (Status:
230 PROPOSED STANDARD)
231
2323370 Cryptographic Message Syntax (CMS) Algorithms. R. Housley. August
233 2002. (Format: TXT=51001 bytes) (Obsoletes RFC2630, RFC3211) (Status:
234 PROPOSED STANDARD)
235
2363377 Lightweight Directory Access Protocol (v3): Technical
237 Specification. J. Hodges, R. Morgan. September 2002. (Format:
238 TXT=9981 bytes) (Updates RFC2251, RFC2252, RFC2253, RFC2254, RFC2255,
239 RFC2256, RFC2829, RFC2830) (Status: PROPOSED STANDARD)
240
2413394 Advanced Encryption Standard (AES) Key Wrap Algorithm. J. Schaad,
242 R. Housley. September 2002. (Format: TXT=73072 bytes) (Status:
243 INFORMATIONAL)
244
2453436 Transport Layer Security over Stream Control Transmission
246 Protocol. A. Jungmaier, E. Rescorla, M. Tuexen. December 2002.
247 (Format: TXT=16333 bytes) (Status: PROPOSED STANDARD)
248
249 "Securing FTP with TLS", 01/27/2000, <draft-murray-auth-ftp-ssl-05.txt>
250
251
252To be implemented:
253------------------
254
255These are documents that describe things that are planed to be
256implemented in the hopefully short future.
257
diff --git a/src/lib/libssl/man/Makefile b/src/lib/libssl/man/Makefile
new file mode 100644
index 0000000000..5cace2fd36
--- /dev/null
+++ b/src/lib/libssl/man/Makefile
@@ -0,0 +1,799 @@
1# $OpenBSD: Makefile,v 1.7 2004/02/09 18:31:19 espie Exp $
2
3.include <bsd.own.mk> # for NOMAN
4
5
6POD2MAN=pod2man --official --release="OpenBSD ${OSREV}" --center=OpenSSL
7
8.ifndef NOMAN
9MANALL= \
10 BN_CTX_new.cat3 \
11 BN_CTX_start.cat3 \
12 BN_add.cat3 \
13 BN_add_word.cat3 \
14 BN_bn2bin.cat3 \
15 BN_cmp.cat3 \
16 BN_copy.cat3 \
17 BN_generate_prime.cat3 \
18 BN_mod_inverse.cat3 \
19 BN_mod_mul_montgomery.cat3 \
20 BN_mod_mul_reciprocal.cat3 \
21 BN_new.cat3 \
22 BN_num_bytes.cat3 \
23 BN_rand.cat3 \
24 BN_set_bit.cat3 \
25 BN_swap.cat3 \
26 BN_zero.cat3 \
27 BUF_MEM_new.cat3 \
28 BUF_MEM_new.cat3 \
29 CRYPTO_set_ex_data.cat3 \
30 CRYPTO_set_locking_callback.cat3 \
31 DH_generate_key.cat3 \
32 DH_generate_parameters.cat3 \
33 DH_get_ex_new_index.cat3 \
34 DH_new.cat3 \
35 DH_set_method.cat3 \
36 DH_size.cat3 \
37 DSA_SIG_new.cat3 \
38 DSA_do_sign.cat3 \
39 DSA_dup_DH.cat3 \
40 DSA_generate_key.cat3 \
41 DSA_generate_parameters.cat3 \
42 DSA_get_ex_new_index.cat3 \
43 DSA_new.cat3 \
44 DSA_set_method.cat3 \
45 DSA_sign.cat3 \
46 DSA_size.cat3 \
47 ERR_GET_LIB.cat3 \
48 ERR_clear_error.cat3 \
49 ERR_error_string.cat3 \
50 ERR_get_error.cat3 \
51 ERR_load_crypto_strings.cat3 \
52 ERR_load_strings.cat3 \
53 ERR_print_errors.cat3 \
54 ERR_put_error.cat3 \
55 ERR_remove_state.cat3 \
56 EVP_BytesToKey.cat3 \
57 EVP_DigestInit.cat3 \
58 EVP_EncryptInit.cat3 \
59 EVP_OpenInit.cat3 \
60 EVP_SealInit.cat3 \
61 EVP_SignInit.cat3 \
62 EVP_VerifyInit.cat3 \
63 HMAC.cat3 \
64 MD5.cat3 \
65 OPENSSL_VERSION_NUMBER.cat3 \
66 OpenSSL_add_all_algorithms.cat3 \
67 RAND_add.cat3 \
68 RAND_bytes.cat3 \
69 RAND_cleanup.cat3 \
70 RAND_egd.cat3 \
71 RAND_load_file.cat3 \
72 RAND_set_rand_method.cat3 \
73 RC4.cat3 \
74 RIPEMD160.cat3 \
75 RSA_blinding_on.cat3 \
76 RSA_check_key.cat3 \
77 RSA_generate_key.cat3 \
78 RSA_get_ex_new_index.cat3 \
79 RSA_new.cat3 \
80 RSA_padding_add_PKCS1_type_1.cat3 \
81 RSA_print.cat3 \
82 RSA_private_encrypt.cat3 \
83 RSA_public_encrypt.cat3 \
84 RSA_set_method.cat3 \
85 RSA_sign.cat3 \
86 RSA_sign_ASN1_OCTET_STRING.cat3 \
87 RSA_size.cat3 \
88 SHA1.cat3 \
89 SSL_CIPHER_get_name.cat3 \
90 SSL_COMP_add_compression_method.cat3 \
91 SSL_CTX_add_extra_chain_cert.cat3 \
92 SSL_CTX_add_session.cat3 \
93 SSL_CTX_ctrl.cat3 \
94 SSL_CTX_flush_sessions.cat3 \
95 SSL_CTX_free.cat3 \
96 SSL_CTX_get_ex_new_index.cat3 \
97 SSL_CTX_get_verify_mode.cat3 \
98 SSL_CTX_load_verify_locations.cat3 \
99 SSL_CTX_new.cat3 \
100 SSL_CTX_sess_number.cat3 \
101 SSL_CTX_sess_set_cache_size.cat3 \
102 SSL_CTX_sess_set_get_cb.cat3 \
103 SSL_CTX_sessions.cat3 \
104 SSL_CTX_set_cert_store.cat3 \
105 SSL_CTX_set_cert_verify_callback.cat3 \
106 SSL_CTX_set_cipher_list.cat3 \
107 SSL_CTX_set_client_CA_list.cat3 \
108 SSL_CTX_set_client_cert_cb.cat3 \
109 SSL_CTX_set_default_passwd_cb.cat3 \
110 SSL_CTX_set_generate_session_id.cat3 \
111 SSL_CTX_set_info_callback.cat3 \
112 SSL_CTX_set_max_cert_list.cat3 \
113 SSL_CTX_set_mode.cat3 \
114 SSL_CTX_set_msg_callback.cat3 \
115 SSL_CTX_set_options.cat3 \
116 SSL_CTX_set_quiet_shutdown.cat3 \
117 SSL_CTX_set_session_cache_mode.cat3 \
118 SSL_CTX_set_session_id_context.cat3 \
119 SSL_CTX_set_ssl_version.cat3 \
120 SSL_CTX_set_timeout.cat3 \
121 SSL_CTX_set_tmp_dh_callback.cat3 \
122 SSL_CTX_set_tmp_rsa_callback.cat3 \
123 SSL_CTX_set_verify.cat3 \
124 SSL_CTX_use_certificate.cat3 \
125 SSL_SESSION_free.cat3 \
126 SSL_SESSION_get_ex_new_index.cat3 \
127 SSL_SESSION_get_time.cat3 \
128 SSL_accept.cat3 \
129 SSL_alert_type_string.cat3 \
130 SSL_clear.cat3 \
131 SSL_connect.cat3 \
132 SSL_do_handshake.cat3 \
133 SSL_free.cat3 \
134 SSL_get_SSL_CTX.cat3 \
135 SSL_get_ciphers.cat3 \
136 SSL_get_client_CA_list.cat3 \
137 SSL_get_current_cipher.cat3 \
138 SSL_get_default_timeout.cat3 \
139 SSL_get_error.cat3 \
140 SSL_get_ex_data_X509_STORE_CTX_idx.cat3 \
141 SSL_get_ex_new_index.cat3 \
142 SSL_get_fd.cat3 \
143 SSL_get_peer_cert_chain.cat3 \
144 SSL_get_peer_certificate.cat3 \
145 SSL_get_rbio.cat3 \
146 SSL_get_session.cat3 \
147 SSL_get_verify_result.cat3 \
148 SSL_get_version.cat3 \
149 SSL_library_init.cat3 \
150 SSL_load_client_CA_file.cat3 \
151 SSL_new.cat3 \
152 SSL_pending.cat3 \
153 SSL_read.cat3 \
154 SSL_rstate_string.cat3 \
155 SSL_session_reused.cat3 \
156 SSL_set_bio.cat3 \
157 SSL_set_connect_state.cat3 \
158 SSL_set_fd.cat3 \
159 SSL_set_session.cat3 \
160 SSL_set_shutdown.cat3 \
161 SSL_set_verify_result.cat3 \
162 SSL_shutdown.cat3 \
163 SSL_state_string.cat3 \
164 SSL_want.cat3 \
165 SSL_write.cat3 \
166 blowfish.cat3 \
167 acss.cat3 \
168 bn.cat3 \
169 bn_internal.cat3 \
170 crypto.cat3 \
171 d2i_DHparams.cat3 \
172 d2i_RSAPublicKey.cat3 \
173 d2i_SSL_SESSION.cat3 \
174 des_modes.cat7 \
175 des_random_key.cat3 \
176 dh.cat3 \
177 dsa.cat3 \
178 lh_stats.cat3 \
179 lhash.cat3 \
180 rsa.cat3 \
181 ssl.cat3
182
183.if MANPS
184PSALL= ${MANALL:S/.cat1/.ps1/g:S/.cat2/.ps2/g:S/.cat3/.ps3/g:S/.cat4/.ps4/g:S/.cat5/.ps5/g:S/.cat6/.ps6/g:S/.cat7/.ps7/g:S/.cat8/.ps8/g:S/.cat9/.ps9/g}
185.endif
186
187# these are is a real problem, since they re-document functions described in
188# other pages.
189#
190# err.pod -> ERR_get_error.pod
191# ERR_peek_error ERR_get_error_line
192# ERR_peek_error_line ERR_get_error_line_data ERR_peek_error_line_data
193# ERR_GET_LIB ERR_GET_FUNC ERR_GET_REASON ERR_clear_error ERR_error_string
194# ERR_lib_error_string ERR_func_error_string ERR_reason_error_string
195# ERR_print_errors ERR_print_errors_fp ERR_load_crypto_strings ERR_free_strings
196# ERR_remove_state ERR_put_error ERR_add_error_data ERR_load_strings ERR_PACK
197# ERR_get_next_error_library
198#
199# rand.pod -> RAND_bytes.pod
200# RAND_pseudo_bytes RAND_seed RAND_add RAND_status RAND_event
201# RAND_screen RAND_load_file RAND_write_file RAND_file_name RAND_egd
202# RAND_set_rand_method RAND_get_rand_method RAND_SSLeay RAND_cleanup
203
204# buffer.pod -> BUF_MEM_new.pod
205# BUF_MEM_free BUF_MEM_grow BUF_strdup
206
207# rc4.pod -> RC4.pod
208# RC4_set_key
209
210# threads.pod -> CRYPTO_set_locking_callback.pod
211# CRYPTO_set_id_callback CRYPTO_num_locks
212
213# ripemd.pod -> RIPEMD160.pod
214# RIPEMD160_Init RIPEMD160_Update RIPEMD160_Final
215
216# sha.pod -> SHA1.pod
217
218# md5.pod -> MD5.pod
219
220# hmac.pod -> HMAC.pod
221
222# des.pod -> des_random_key, des_set_key, des_key_sched, des_set_key_checked,
223# des_set_key_unchecked, des_set_odd_parity, des_is_weak_key, des_ecb_encrypt,
224# des_ecb2_encrypt, des_ecb3_encrypt, des_ncbc_encrypt, des_cfb_encrypt,
225# des_ofb_encrypt, des_pcbc_encrypt, des_cfb64_encrypt, des_ofb64_encrypt,
226# des_xcbc_encrypt, des_ede2_cbc_encrypt, des_ede2_cfb64_encrypt,
227# des_ede2_ofb64_encrypt, des_ede3_cbc_encrypt, des_ede3_cbcm_encrypt,
228# des_ede3_cfb64_encrypt, des_ede3_ofb64_encrypt, des_read_password,
229# des_read_2passwords, des_read_pw_string, des_cbc_cksum, des_quad_cksum,
230# des_string_to_key, des_string_to_2keys, des_fcrypt, des_crypt,
231# des_enc_read, des_enc_write
232
233.for page src in \
234 BUF_MEM_new buffer \
235 RC4 rc4 \
236 CRYPTO_set_locking_callback threads \
237 RIPEMD160 ripemd \
238 SHA1 sha \
239 MD5 md5 \
240 HMAC hmac \
241 des_random_key des
242
243${page}.cat3: ${src}.pod
244 ${POD2MAN} --section=3 --name=${page:U} ${.ALLSRC} | \
245 nroff -Tascii -mandoc > ${.TARGET}
246. if MANPS
247${page}.ps3: ${src}.pod
248 ${POD2MAN} --section=3 --name=${page:U} ${.ALLSRC} | \
249 nroff -Tps -mandoc > ${.TARGET}
250. endif
251.endfor
252
253MLINKS+=\
254 BN_CTX_new.3 BN_CTX_free.3 \
255 BN_CTX_new.3 BN_CTX_init.3 \
256 BN_CTX_start.3 BN_CTX_end.3 \
257 BN_CTX_start.3 BN_CTX_get.3 \
258 BN_add.3 BN_div.3 \
259 BN_add.3 BN_exp.3 \
260 BN_add.3 BN_gcd.3 \
261 BN_add.3 BN_mod.3 \
262 BN_add.3 BN_mod_exp.3 \
263 BN_add.3 BN_mod_mul.3 \
264 BN_add.3 BN_mul.3 \
265 BN_add.3 BN_sqr.3 \
266 BN_add.3 BN_sub.3 \
267 BN_add_word.3 BN_div_word.3 \
268 BN_add_word.3 BN_mod_word.3 \
269 BN_add_word.3 BN_mul_word.3 \
270 BN_add_word.3 BN_sub_word.3 \
271 BN_bn2bin.3 BN_bin2bn.3 \
272 BN_bn2bin.3 BN_bn2dec.3 \
273 BN_bn2bin.3 BN_bn2hex.3 \
274 BN_bn2bin.3 BN_bn2mpi.3 \
275 BN_bn2bin.3 BN_dec2bn.3 \
276 BN_bn2bin.3 BN_hex2bn.3 \
277 BN_bn2bin.3 BN_mpi2bn.3 \
278 BN_bn2bin.3 BN_print.3 \
279 BN_bn2bin.3 BN_print_fp.3 \
280 BN_cmp.3 BN_is_odd.3 \
281 BN_cmp.3 BN_is_one.3 \
282 BN_cmp.3 BN_is_word.3 \
283 BN_cmp.3 BN_is_zero.3 \
284 BN_cmp.3 BN_ucmp.3 \
285 BN_copy.3 BN_dup.3 \
286 BN_generate_prime.3 BN_is_prime.3 \
287 BN_generate_prime.3 BN_is_prime_fasttest.3 \
288 BN_mod_mul_montgomery.3 BN_MONT_CTX_copy.3 \
289 BN_mod_mul_montgomery.3 BN_MONT_CTX_free.3 \
290 BN_mod_mul_montgomery.3 BN_MONT_CTX_init.3 \
291 BN_mod_mul_montgomery.3 BN_MONT_CTX_new.3 \
292 BN_mod_mul_montgomery.3 BN_MONT_CTX_set.3 \
293 BN_mod_mul_montgomery.3 BN_from_montgomery.3 \
294 BN_mod_mul_montgomery.3 BN_to_montgomery.3 \
295 BN_mod_mul_reciprocal.3 BN_RECP_CTX_free.3 \
296 BN_mod_mul_reciprocal.3 BN_RECP_CTX_init.3 \
297 BN_mod_mul_reciprocal.3 BN_RECP_CTX_new.3 \
298 BN_mod_mul_reciprocal.3 BN_RECP_CTX_set.3 \
299 BN_mod_mul_reciprocal.3 BN_div_recp.3 \
300 BN_new.3 BN_clear.3 \
301 BN_new.3 BN_clear_free.3 \
302 BN_new.3 BN_free.3 \
303 BN_new.3 BN_init.3 \
304 BN_num_bytes.3 BN_num_bits.3 \
305 BN_num_bytes.3 BN_num_bits_word.3 \
306 BN_rand.3 BN_pseudo_rand.3 \
307 BN_rand.3 BN_rand_range.3 \
308 BN_set_bit.3 BN_clear_bit.3 \
309 BN_set_bit.3 BN_is_bit_set.3 \
310 BN_set_bit.3 BN_lshift.3 \
311 BN_set_bit.3 BN_lshift1.3 \
312 BN_set_bit.3 BN_mask_bits.3 \
313 BN_set_bit.3 BN_rshift.3 \
314 BN_set_bit.3 BN_rshift1.3 \
315 BN_zero.3 BN_get_word.3 \
316 BN_zero.3 BN_one.3 \
317 BN_zero.3 BN_set_word.3 \
318 BN_zero.3 BN_value_one.3 \
319 BUF_MEM_new.3 BUF_MEM_free.3 \
320 BUF_MEM_new.3 BUF_MEM_grow.3 \
321 BUF_MEM_new.3 BUF_strdup.3 \
322 CRYPTO_set_ex_data.3 CRYPTO_get_ex_data.3 \
323 CRYPTO_set_locking_callback.3 CRYPTO_add.3 \
324 CRYPTO_set_locking_callback.3 CRYPTO_add_lock.3 \
325 CRYPTO_set_locking_callback.3 CRYPTO_destroy_dynlockid.3 \
326 CRYPTO_set_locking_callback.3 CRYPTO_get_new_dynlockid.3 \
327 CRYPTO_set_locking_callback.3 CRYPTO_lock.3 \
328 CRYPTO_set_locking_callback.3 CRYPTO_num_locks.3 \
329 CRYPTO_set_locking_callback.3 CRYPTO_r_lock.3 \
330 CRYPTO_set_locking_callback.3 CRYPTO_r_unlock.3 \
331 CRYPTO_set_locking_callback.3 CRYPTO_set_dynlock_create_callback.3 \
332 CRYPTO_set_locking_callback.3 CRYPTO_set_dynlock_destroy_callback.3 \
333 CRYPTO_set_locking_callback.3 CRYPTO_set_dynlock_lock_callback.3 \
334 CRYPTO_set_locking_callback.3 CRYPTO_set_id_callback.3 \
335 CRYPTO_set_locking_callback.3 CRYPTO_w_lock.3 \
336 CRYPTO_set_locking_callback.3 CRYPTO_w_unlock.3 \
337 DH_generate_key.3 DH_compute_key.3 \
338 DH_generate_parameters.3 DH_check.3 \
339 DH_get_ex_new_index.3 DH_get_ex_data.3 \
340 DH_get_ex_new_index.3 DH_set_ex_data.3 \
341 DH_new.3 DH_free.3 \
342 DH_set_method.3 DH_OpenSSL.3 \
343 DH_set_method.3 DH_get_default_method.3 \
344 DH_set_method.3 DH_get_default_openssl_method.3 \
345 DH_set_method.3 DH_new_method.3 \
346 DH_set_method.3 DH_set_default_method.3 \
347 DH_set_method.3 DH_set_default_openssl_method.3 \
348 DSA_new.3 DSA_free.3 \
349 DSA_set_method.3 DSA_OpenSSL.3 \
350 DSA_set_method.3 DSA_get_default_method.3 \
351 DSA_set_method.3 DSA_get_default_openssl_method.3 \
352 DSA_set_method.3 DSA_new_method.3 \
353 DSA_set_method.3 DSA_set_default_method.3 \
354 DSA_set_method.3 DSA_set_default_openssl_method.3 \
355 DSA_sign.3 DSA_sign_setup.3 \
356 DSA_sign.3 DSA_verify.3 \
357 ERR_GET_LIB.3 ERR_GET_FUNC.3 \
358 ERR_GET_LIB.3 ERR_GET_REASON.3 \
359 ERR_error_string.3 ERR_error_string_n.3 \
360 ERR_error_string.3 ERR_func_error_string.3 \
361 ERR_error_string.3 ERR_lib_error_string.3 \
362 ERR_error_string.3 ERR_reason_error_string.3 \
363 ERR_get_error.3 ERR_get_error_line.3 \
364 ERR_get_error.3 ERR_get_error_line_data.3 \
365 ERR_get_error.3 ERR_peek_error.3 \
366 ERR_get_error.3 ERR_peek_error_line.3 \
367 ERR_get_error.3 ERR_peek_error_line_data.3 \
368 ERR_load_crypto_strings.3 ERR_free_strings.3 \
369 ERR_load_crypto_strings.3 SSL_load_error_strings.3 \
370 ERR_load_strings.3 ERR_PACK.3 \
371 ERR_load_strings.3 ERR_get_next_error_library.3 \
372 ERR_print_errors.3 ERR_print_errors_fp.3 \
373 ERR_put_error.3 ERR_add_error_data.3 \
374 EVP_DigestInit.3 EVP_DigestFinal.3 \
375 EVP_DigestInit.3 EVP_DigestUpdate.3 \
376 EVP_DigestInit.3 EVP_MD_CTX_block_size.3 \
377 EVP_DigestInit.3 EVP_MD_CTX_copy.3 \
378 EVP_DigestInit.3 EVP_MD_CTX_md.3 \
379 EVP_DigestInit.3 EVP_MD_CTX_size.3 \
380 EVP_DigestInit.3 EVP_MD_CTX_type.3 \
381 EVP_DigestInit.3 EVP_MD_block_size.3 \
382 EVP_DigestInit.3 EVP_MD_block_size.3 \
383 EVP_DigestInit.3 EVP_MD_pkey_type.3 \
384 EVP_DigestInit.3 EVP_MD_size.3 \
385 EVP_DigestInit.3 EVP_MD_size.3 \
386 EVP_DigestInit.3 EVP_MD_type.3 \
387 EVP_DigestInit.3 EVP_MD_type.3 \
388 EVP_DigestInit.3 EVP_dss.3 \
389 EVP_DigestInit.3 EVP_dss1.3 \
390 EVP_DigestInit.3 EVP_get_digestbyname.3 \
391 EVP_DigestInit.3 EVP_get_digestbyname.3 \
392 EVP_DigestInit.3 EVP_get_digestbynid.3 \
393 EVP_DigestInit.3 EVP_get_digestbynid.3 \
394 EVP_DigestInit.3 EVP_get_digestbyobj.3 \
395 EVP_DigestInit.3 EVP_md2.3 \
396 EVP_DigestInit.3 EVP_md5.3 \
397 EVP_DigestInit.3 EVP_md_null.3 \
398 EVP_DigestInit.3 EVP_mdc2.3 \
399 EVP_DigestInit.3 EVP_ripemd160.3 \
400 EVP_DigestInit.3 EVP_sha.3 \
401 EVP_DigestInit.3 EVP_sha1.3 \
402 EVP_DigestInit.3 OBJ_nid2sn.3 \
403 EVP_DigestInit.3 OBJ_obj2nid.3 \
404 EVP_EncryptInit.3 EVP_CIPHER_CTX_block_size.3 \
405 EVP_EncryptInit.3 EVP_CIPHER_CTX_cipher.3 \
406 EVP_EncryptInit.3 EVP_CIPHER_CTX_cipher.3 \
407 EVP_EncryptInit.3 EVP_CIPHER_CTX_cleanup.3 \
408 EVP_EncryptInit.3 EVP_CIPHER_CTX_ctrl.3 \
409 EVP_EncryptInit.3 EVP_CIPHER_CTX_iv_length.3 \
410 EVP_EncryptInit.3 EVP_CIPHER_CTX_key_length.3 \
411 EVP_EncryptInit.3 EVP_CIPHER_CTX_nid.3 \
412 EVP_EncryptInit.3 EVP_CIPHER_CTX_set_key_length.3 \
413 EVP_EncryptInit.3 EVP_CIPHER_CTX_type.3 \
414 EVP_EncryptInit.3 EVP_CIPHER_asn1_to_param.3 \
415 EVP_EncryptInit.3 EVP_CIPHER_block_size.3 \
416 EVP_EncryptInit.3 EVP_CIPHER_iv_length.3 \
417 EVP_EncryptInit.3 EVP_CIPHER_key_length.3 \
418 EVP_EncryptInit.3 EVP_CIPHER_nid.3 \
419 EVP_EncryptInit.3 EVP_CIPHER_param_to_asn1.3 \
420 EVP_EncryptInit.3 EVP_CIPHER_type.3 \
421 EVP_EncryptInit.3 EVP_CIPHER_type.3 \
422 EVP_EncryptInit.3 EVP_CipherFinal.3 \
423 EVP_EncryptInit.3 EVP_CipherInit.3 \
424 EVP_EncryptInit.3 EVP_CipherUpdate.3 \
425 EVP_EncryptInit.3 EVP_DecryptFinal.3 \
426 EVP_EncryptInit.3 EVP_DecryptInit.3 \
427 EVP_EncryptInit.3 EVP_DecryptUpdate.3 \
428 EVP_EncryptInit.3 EVP_EncryptFinal.3 \
429 EVP_EncryptInit.3 EVP_EncryptUpdate.3 \
430 EVP_EncryptInit.3 EVP_get_cipherbyname.3 \
431 EVP_EncryptInit.3 EVP_get_cipherbyname.3 \
432 EVP_EncryptInit.3 EVP_get_cipherbynid.3 \
433 EVP_EncryptInit.3 EVP_get_cipherbynid.3 \
434 EVP_EncryptInit.3 EVP_get_cipherbyobj.3 \
435 EVP_EncryptInit.3 OBJ_nid2sn.3 \
436 EVP_EncryptInit.3 OBJ_obj2nid.3 \
437 EVP_OpenInit.3 EVP_OpenFinal.3 \
438 EVP_OpenInit.3 EVP_OpenUpdate.3 \
439 EVP_SealInit.3 EVP_SealFinal.3 \
440 EVP_SealInit.3 EVP_SealUpdate.3 \
441 EVP_SignInit.3 EVP_PKEY_size.3 \
442 EVP_SignInit.3 EVP_SignFinal.3 \
443 EVP_SignInit.3 EVP_SignUpdate.3 \
444 EVP_VerifyInit.3 EVP_VerifyFinal.3 \
445 EVP_VerifyInit.3 EVP_VerifyUpdate.3 \
446 HMAC.3 HMAC_Final.3 \
447 HMAC.3 HMAC_Init.3 \
448 HMAC.3 HMAC_Update.3 \
449 HMAC.3 HMAC_cleanup.3 \
450 MD5.3 MD2.3 \
451 MD5.3 MD2_Final.3 \
452 MD5.3 MD2_Init.3 \
453 MD5.3 MD2_Update.3 \
454 MD5.3 MD4.3 \
455 MD5.3 MD4_Final.3 \
456 MD5.3 MD4_Init.3 \
457 MD5.3 MD4_Update.3 \
458 MD5.3 MD5_Final.3 \
459 MD5.3 MD5_Init.3 \
460 MD5.3 MD5_Update.3 \
461 OPENSSL_VERSION_NUMBER.3 SSLeay.3 \
462 OPENSSL_VERSION_NUMBER.3 SSLeay_version.3 \
463 OpenSSL_add_all_algorithms.3 EVP_cleanup.3 \
464 OpenSSL_add_all_algorithms.3 OpenSSL_add_all_ciphers.3 \
465 OpenSSL_add_all_algorithms.3 OpenSSL_add_all_digests.3 \
466 RAND_add.3 RAND_event.3 \
467 RAND_add.3 RAND_screen.3 \
468 RAND_add.3 RAND_seed.3 \
469 RAND_add.3 RAND_status.3 \
470 RAND_bytes.3 RAND_pseudo_bytes.3 \
471 RAND_bytes.3 RAND_pseudo_bytes.3 \
472 RAND_egd.3 RAND_egd_bytes.3 \
473 RAND_load_file.3 RAND_file_name.3 \
474 RAND_load_file.3 RAND_file_name.3 \
475 RAND_load_file.3 RAND_write_file.3 \
476 RAND_load_file.3 RAND_write_file.3 \
477 RAND_set_rand_method.3 RAND_SSLeay.3 \
478 RAND_set_rand_method.3 RAND_SSLeay.3 \
479 RAND_set_rand_method.3 RAND_get_rand_method.3 \
480 RAND_set_rand_method.3 RAND_get_rand_method.3 \
481 RC4.3 RC4_set_key.3 \
482 RIPEMD160.3 RIPEMD160_Final.3 \
483 RIPEMD160.3 RIPEMD160_Init.3 \
484 RIPEMD160.3 RIPEMD160_Update.3 \
485 RSA_blinding_on.3 RSA_blinding_off.3 \
486 RSA_get_ex_new_index.3 RSA_get_ex_data.3 \
487 RSA_get_ex_new_index.3 RSA_set_ex_data.3 \
488 RSA_new.3 RSA_free.3 \
489 RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_PKCS1_OAEP.3 \
490 RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_PKCS1_type_2.3 \
491 RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_SSLv23.3 \
492 RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_none.3 \
493 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_OAEP.3 \
494 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_type_1.3 \
495 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_type_2.3 \
496 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_SSLv23.3 \
497 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_none.3 \
498 RSA_print.3 DHparams_print.3 \
499 RSA_print.3 DHparams_print.3 \
500 RSA_print.3 DHparams_print_fp.3 \
501 RSA_print.3 DHparams_print_fp.3 \
502 RSA_print.3 DSA_print.3 \
503 RSA_print.3 DSA_print_fp.3 \
504 RSA_print.3 DSA_print_fp.3 \
505 RSA_print.3 DSAparams_print.3 \
506 RSA_print.3 DSAparams_print.3 \
507 RSA_print.3 DSAparams_print_fp.3 \
508 RSA_print.3 DSAparams_print_fp.3 \
509 RSA_print.3 RSA_print_fp.3 \
510 RSA_print.3 RSA_print_fp.3 \
511 RSA_private_encrypt.3 RSA_public_decrypt.3 \
512 RSA_public_encrypt.3 RSA_private_decrypt.3 \
513 RSA_set_method.3 RSA_PKCS1_RSAref.3 \
514 RSA_set_method.3 RSA_PKCS1_SSLeay.3 \
515 RSA_set_method.3 RSA_flags.3 \
516 RSA_set_method.3 RSA_get_default_method.3 \
517 RSA_set_method.3 RSA_get_default_openssl_method.3 \
518 RSA_set_method.3 RSA_get_method.3 \
519 RSA_set_method.3 RSA_new_method.3 \
520 RSA_set_method.3 RSA_null_method.3 \
521 RSA_set_method.3 RSA_set_default_method.3 \
522 RSA_set_method.3 RSA_set_default_openssl_method.3 \
523 RSA_sign.3 RSA_verify.3 \
524 RSA_sign_ASN1_OCTET_STRING.3 RSA_verify_ASN1_OCTET_STRING.3 \
525 SHA1.3 SHA1_Final.3 \
526 SHA1.3 SHA1_Init.3 \
527 SHA1.3 SHA1_Update.3 \
528 SSL_CIPHER_get_name.3 SSL_CIPHER_description.3 \
529 SSL_CIPHER_get_name.3 SSL_CIPHER_get_bits.3 \
530 SSL_CIPHER_get_name.3 SSL_CIPHER_get_version.3 \
531 SSL_CTX_add_session.3 SSL_CTX_remove_session.3 \
532 SSL_CTX_add_session.3 SSL_add_session.3 \
533 SSL_CTX_add_session.3 SSL_remove_session.3 \
534 SSL_CTX_ctrl.3 SSL_CTX_callback_ctrl.3 \
535 SSL_CTX_ctrl.3 SSL_callback_ctrl.3 \
536 SSL_CTX_ctrl.3 SSL_ctrl.3 \
537 SSL_CTX_flush_sessions.3 SSL_flush_sessions.3 \
538 SSL_CTX_get_ex_new_index.3 SSL_CTX_get_ex_data.3 \
539 SSL_CTX_get_ex_new_index.3 SSL_CTX_set_ex_data.3 \
540 SSL_CTX_get_verify_mode.3 SSL_CTX_get_verify_callback.3 \
541 SSL_CTX_get_verify_mode.3 SSL_CTX_get_verify_depth.3 \
542 SSL_CTX_get_verify_mode.3 SSL_get_verify_callback.3 \
543 SSL_CTX_get_verify_mode.3 SSL_get_verify_depth.3 \
544 SSL_CTX_get_verify_mode.3 SSL_get_verify_mode.3 \
545 SSL_CTX_sess_number.3 SSL_CTX_sess_accept.3 \
546 SSL_CTX_sess_number.3 SSL_CTX_sess_accept_good.3 \
547 SSL_CTX_sess_number.3 SSL_CTX_sess_accept_renegotiate.3 \
548 SSL_CTX_sess_number.3 SSL_CTX_sess_cache_full.3 \
549 SSL_CTX_sess_number.3 SSL_CTX_sess_cb_hits.3 \
550 SSL_CTX_sess_number.3 SSL_CTX_sess_connect.3 \
551 SSL_CTX_sess_number.3 SSL_CTX_sess_connect_good.3 \
552 SSL_CTX_sess_number.3 SSL_CTX_sess_connect_renegotiate.3 \
553 SSL_CTX_sess_number.3 SSL_CTX_sess_hits.3 \
554 SSL_CTX_sess_number.3 SSL_CTX_sess_misses.3 \
555 SSL_CTX_sess_number.3 SSL_CTX_sess_timeouts.3 \
556 SSL_CTX_sess_set_cache_size.3 SSL_CTX_sess_get_cache_size.3 \
557 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_get_get_cb.3 \
558 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_get_new_cb.3 \
559 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_get_remove_cb.3 \
560 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_set_new_cb.3 \
561 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_set_remove.3 \
562 SSL_CTX_set_cert_store.3 SSL_CTX_get_cert_store.3 \
563 SSL_CTX_set_cipher_list.3 SSL_set_cipher_list.3 \
564 SSL_CTX_set_client_CA_list.3 SSL_CTX_add_client_CA.3 \
565 SSL_CTX_set_client_CA_list.3 SSL_add_client_CA.3 \
566 SSL_CTX_set_client_CA_list.3 SSL_set_client_CA_list.3 \
567 SSL_CTX_set_default_passwd_cb.3 \
568 SSL_CTX_set_default_passwd_cb_userdata.3 \
569 SSL_CTX_set_max_cert_list.3 SSL_CTX_get_max_cert_list.3 \
570 SSL_CTX_set_max_cert_list.3 SSL_get_max_cert_list.3 \
571 SSL_CTX_set_max_cert_list.3 SSL_set_max_cert_list.3 \
572 SSL_CTX_set_mode.3 SSL_CTX_get_mode.3 \
573 SSL_CTX_set_mode.3 SSL_get_mode.3 \
574 SSL_CTX_set_mode.3 SSL_set_mode.3 \
575 SSL_CTX_set_msg_callback.3 SSL_CTX_set_msg_callback_arg.3 \
576 SSL_CTX_set_msg_callback.3 SSL_set_msg_callback.3 \
577 SSL_CTX_set_msg_callback.3 SSL_set_msg_callback_arg.3 \
578 SSL_CTX_set_options.3 SSL_CTX_get_options.3 \
579 SSL_CTX_set_options.3 SSL_get_options.3 \
580 SSL_CTX_set_options.3 SSL_set_options.3 \
581 SSL_CTX_set_quiet_shutdown.3 SSL_CTX_get_quiet_shutdown.3 \
582 SSL_CTX_set_quiet_shutdown.3 SSL_get_quiet_shutdown.3 \
583 SSL_CTX_set_quiet_shutdown.3 SSL_set_quiet_shutdown.3 \
584 SSL_CTX_set_session_cache_mode.3 SSL_CTX_get_session_cache_mode.3 \
585 SSL_CTX_set_session_id_context.3 SSL_set_session_id_context.3 \
586 SSL_CTX_set_ssl_version.3 SSL_get_ssl_method.3 \
587 SSL_CTX_set_ssl_version.3 SSL_set_ssl_method.3 \
588 SSL_CTX_set_timeout.3 SSL_CTX_get_timeout.3 \
589 SSL_CTX_set_tmp_dh_callback.3 SSL_CTX_set_tmp_dh.3 \
590 SSL_CTX_set_tmp_dh_callback.3 SSL_set_tmp_dh.3 \
591 SSL_CTX_set_tmp_dh_callback.3 SSL_set_tmp_dh_callback.3 \
592 SSL_CTX_set_tmp_rsa_callback.3 SSL_CTX_need_tmp_rsa.3 \
593 SSL_CTX_set_tmp_rsa_callback.3 SSL_CTX_set_tmp_rsa.3 \
594 SSL_CTX_set_tmp_rsa_callback.3 SSL_need_tmp_rsa.3 \
595 SSL_CTX_set_tmp_rsa_callback.3 SSL_set_tmp_rsa.3 \
596 SSL_CTX_set_tmp_rsa_callback.3 SSL_set_tmp_rsa_callback.3 \
597 SSL_CTX_set_verify.3 SSL_CTX_set_verify_depth.3 \
598 SSL_CTX_set_verify.3 SSL_set_verify.3 \
599 SSL_CTX_set_verify.3 SSL_set_verify_depth.3 \
600 SSL_CTX_use_certificate.3 SSL_CTX_check_private_key.3 \
601 SSL_CTX_use_certificate.3 SSL_CTX_use_PrivateKey.3 \
602 SSL_CTX_use_certificate.3 SSL_CTX_use_PrivateKey_ASN1.3 \
603 SSL_CTX_use_certificate.3 SSL_CTX_use_PrivateKey_file.3 \
604 SSL_CTX_use_certificate.3 SSL_CTX_use_RSAPrivateKey.3 \
605 SSL_CTX_use_certificate.3 SSL_CTX_use_RSAPrivateKey_ASN1.3 \
606 SSL_CTX_use_certificate.3 SSL_CTX_use_RSAPrivateKey_file.3 \
607 SSL_CTX_use_certificate.3 SSL_CTX_use_certificate_ASN1.3 \
608 SSL_CTX_use_certificate.3 SSL_CTX_use_certificate_chain_file.3 \
609 SSL_CTX_use_certificate.3 SSL_CTX_use_certificate_file.3 \
610 SSL_CTX_use_certificate.3 SSL_check_private_key.3 \
611 SSL_CTX_use_certificate.3 SSL_use_PrivateKey.3 \
612 SSL_CTX_use_certificate.3 SSL_use_PrivateKey_ASN1.3 \
613 SSL_CTX_use_certificate.3 SSL_use_PrivateKey_file.3 \
614 SSL_CTX_use_certificate.3 SSL_use_RSAPrivateKey.3 \
615 SSL_CTX_use_certificate.3 SSL_use_RSAPrivateKey_ASN1.3 \
616 SSL_CTX_use_certificate.3 SSL_use_RSAPrivateKey_file.3 \
617 SSL_CTX_use_certificate.3 SSL_use_certificate.3 \
618 SSL_CTX_use_certificate.3 SSL_use_certificate_ASN1.3 \
619 SSL_CTX_use_certificate.3 SSL_use_certificate_file.3 \
620 SSL_SESSION_get_ex_new_index.3 SSL_SESSION_get_ex_data.3 \
621 SSL_SESSION_get_ex_new_index.3 SSL_SESSION_set_ex_data.3 \
622 SSL_SESSION_get_time.3 SSL_SESSION_get_timeout.3 \
623 SSL_SESSION_get_time.3 SSL_SESSION_set_time.3 \
624 SSL_SESSION_get_time.3 SSL_SESSION_set_timeout.3 \
625 SSL_SESSION_get_time.3 SSL_get_time.3 \
626 SSL_SESSION_get_time.3 SSL_get_timeout.3 \
627 SSL_SESSION_get_time.3 SSL_set_time.3 \
628 SSL_SESSION_get_time.3 SSL_set_timeout.3 \
629 SSL_alert_type_string.3 SSL_alert_desc_string.3 \
630 SSL_alert_type_string.3 SSL_alert_desc_string_long.3 \
631 SSL_alert_type_string.3 SSL_alert_type_string_long.3 \
632 SSL_get_ciphers.3 SSL_get_cipher_list.3 \
633 SSL_get_client_CA_list.3 SSL_CTX_get_client_CA_list.3 \
634 SSL_get_current_cipher.3 SSL_get_cipher.3 \
635 SSL_get_current_cipher.3 SSL_get_cipher_bits.3 \
636 SSL_get_current_cipher.3 SSL_get_cipher_name.3 \
637 SSL_get_current_cipher.3 SSL_get_cipher_version.3 \
638 SSL_get_ex_new_index.3 SSL_get_ex_data.3 \
639 SSL_get_ex_new_index.3 SSL_set_ex_data.3 \
640 SSL_get_fd.3 SSL_get_rfd.3 \
641 SSL_get_fd.3 SSL_get_wfd.3 \
642 SSL_get_rbio.3 SSL_get_wbio.3 \
643 SSL_get_session.3 SSL_get0_session.3 \
644 SSL_get_session.3 SSL_get1_session.3 \
645 SSL_library_init.3 OpenSSL_add_ssl_algorithms.3 \
646 SSL_library_init.3 SSLeay_add_ssl_algorithms.3 \
647 SSL_rstate_string.3 SSL_rstate_string_long.3 \
648 SSL_set_connect_state.3 SSL_set_accept_state.3 \
649 SSL_set_fd.3 SSL_set_rfd.3 \
650 SSL_set_fd.3 SSL_set_wfd.3 \
651 SSL_set_shutdown.3 SSL_get_shutdown.3 \
652 SSL_state_string.3 SSL_state_string_long.3 \
653 SSL_want.3 SSL_want_nothing.3 \
654 SSL_want.3 SSL_want_read.3 \
655 SSL_want.3 SSL_want_write.3 \
656 SSL_want.3 SSL_want_x509_lookup.3 \
657 acss.3 acss_setkey.3 \
658 blowfish.3 BF_cbc.3 \
659 blowfish.3 BF_cbc_encrypt.3 \
660 blowfish.3 BF_cfb64_encrypt.3 \
661 blowfish.3 BF_decrypt.3 \
662 blowfish.3 BF_ecb.3 \
663 blowfish.3 BF_ecb_encrypt.3 \
664 blowfish.3 BF_encrypt.3 \
665 blowfish.3 BF_ofb64_encrypt.3 \
666 blowfish.3 BF_options.3 \
667 blowfish.3 BF_set_key.3 \
668 bn_internal.3 bn_add_words.3 \
669 bn_internal.3 bn_check_top.3 \
670 bn_internal.3 bn_cmp_words.3 \
671 bn_internal.3 bn_div_words.3 \
672 bn_internal.3 bn_dump.3 \
673 bn_internal.3 bn_expand.3 \
674 bn_internal.3 bn_expand2.3 \
675 bn_internal.3 bn_fix_top.3 \
676 bn_internal.3 bn_mul_add_words.3 \
677 bn_internal.3 bn_mul_comba4.3 \
678 bn_internal.3 bn_mul_comba8.3 \
679 bn_internal.3 bn_mul_high.3 \
680 bn_internal.3 bn_mul_low_normal.3 \
681 bn_internal.3 bn_mul_low_recursive.3 \
682 bn_internal.3 bn_mul_normal.3 \
683 bn_internal.3 bn_mul_part_recursive.3 \
684 bn_internal.3 bn_mul_recursive.3 \
685 bn_internal.3 bn_mul_words.3 \
686 bn_internal.3 bn_print.3 \
687 bn_internal.3 bn_set_high.3 \
688 bn_internal.3 bn_set_low.3 \
689 bn_internal.3 bn_set_max.3 \
690 bn_internal.3 bn_sqr_comba4.3 \
691 bn_internal.3 bn_sqr_comba8.3 \
692 bn_internal.3 bn_sqr_normal.3 \
693 bn_internal.3 bn_sqr_recursive.3 \
694 bn_internal.3 bn_sqr_words.3 \
695 bn_internal.3 bn_sub_words.3 \
696 bn_internal.3 bn_wexpand.3 \
697 bn_internal.3 mul.3 \
698 bn_internal.3 mul_add.3 \
699 bn_internal.3 sqr.3 \
700 d2i_DHparams.3 i2d_DHparams.3 \
701 d2i_RSAPublicKey.3 d2i_Netscape_RSA.3 \
702 d2i_RSAPublicKey.3 d2i_RSAPrivateKey.3 \
703 d2i_RSAPublicKey.3 i2d_Netscape_RSA.3 \
704 d2i_RSAPublicKey.3 i2d_RSAPrivateKey.3 \
705 d2i_RSAPublicKey.3 i2d_RSAPublicKey.3 \
706 d2i_SSL_SESSION.3 i2d_SSL_SESSION.3 \
707 des_crypt.3 des_string_to_2keys.3 \
708 des_random_key.3 des_cbc_cksum.3 \
709 des_random_key.3 des_cfb64_encrypt.3 \
710 des_random_key.3 des_cfb_encrypt.3 \
711 des_random_key.3 des_crypt.3 \
712 des_random_key.3 des_ecb2_encrypt.3 \
713 des_random_key.3 des_ecb3_encrypt.3 \
714 des_random_key.3 des_ecb_encrypt.3 \
715 des_random_key.3 des_ede2_cbc_encrypt.3 \
716 des_random_key.3 des_ede2_cfb64_encrypt.3 \
717 des_random_key.3 des_ede2_ofb64_encrypt.3 \
718 des_random_key.3 des_ede3_cbc_encrypt.3 \
719 des_random_key.3 des_ede3_cbcm_encrypt.3 \
720 des_random_key.3 des_ede3_cfb64_encrypt.3 \
721 des_random_key.3 des_ede3_ofb64_encrypt.3 \
722 des_random_key.3 des_enc_read.3 \
723 des_random_key.3 des_enc_write.3 \
724 des_random_key.3 des_fcrypt.3 \
725 des_random_key.3 des_is_weak_key.3 \
726 des_random_key.3 des_key_sched.3 \
727 des_random_key.3 des_ncbc_encrypt.3 \
728 des_random_key.3 des_ofb64_encrypt.3 \
729 des_random_key.3 des_ofb_encrypt.3 \
730 des_random_key.3 des_pcbc_encrypt.3 \
731 des_random_key.3 des_quad_cksum.3 \
732 des_random_key.3 des_read_2passwords.3 \
733 des_random_key.3 des_read_password.3 \
734 des_random_key.3 des_read_pw_string.3 \
735 des_random_key.3 des_set_key.3 \
736 des_random_key.3 des_set_key_checked.3 \
737 des_random_key.3 des_set_key_unchecked.3 \
738 des_random_key.3 des_set_odd_parity.3 \
739 des_random_key.3 des_string_to_2keys.3 \
740 des_random_key.3 des_string_to_key.3 \
741 des_random_key.3 des_xcbc_encrypt.3 \
742 dsa.3 DSA_OpenSSL.3 \
743 dsa.3 DSA_SIG_free.3 \
744 dsa.3 DSA_do_verify.3 \
745 dsa.3 DSA_free.3 \
746 dsa.3 DSA_get_default_method.3 \
747 dsa.3 DSA_get_ex_data.3 \
748 dsa.3 DSA_new_method.3 \
749 dsa.3 DSA_set_default_method.3 \
750 dsa.3 DSA_set_ex_data.3 \
751 dsa.3 DSA_sign_setup.3 \
752 dsa.3 DSA_verify.3 \
753 dsa.3 d2i_DSAPrivateKey.3 \
754 dsa.3 d2i_DSAPublicKey.3 \
755 dsa.3 d2i_DSA_SIG.3 \
756 dsa.3 d2i_DSAparams.3 \
757 dsa.3 i2d_DSAPrivateKey.3 \
758 dsa.3 i2d_DSAPublicKey.3 \
759 dsa.3 i2d_DSA_SIG.3 \
760 dsa.3 i2d_DSAparams.3 \
761 lh_stats.3 lh_node_stats.3 \
762 lh_stats.3 lh_node_stats_bio.3 \
763 lh_stats.3 lh_node_usage_stats.3 \
764 lh_stats.3 lh_node_usage_stats_bio.3 \
765 lh_stats.3 lh_stats_bio.3 \
766 lhash.3 lh_delete.3 \
767 lhash.3 lh_doall.3 \
768 lhash.3 lh_doall_arg.3 \
769 lhash.3 lh_error.3 \
770 lhash.3 lh_free.3 \
771 lhash.3 lh_insert.3 \
772 lhash.3 lh_new.3 \
773 lhash.3 lh_retrieve.3
774
775.include <bsd.man.mk>
776.else
777maninstall:
778
779.endif
780
781# XXX .PATH order is critical because of non-unique filenames
782.PATH: ${.CURDIR}/../src/doc/crypto ${.CURDIR}/../src/doc/ssl ${.CURDIR}/../src/doc/apps
783.SUFFIXES: .pod
784.for sect in 1 3 7
785
786.pod.cat${sect}:
787 ${POD2MAN} --section=${sect} --name=${*:U} ${.ALLSRC} | \
788 nroff -Tascii -mandoc > ${.TARGET}
789
790.pod.ps${sect}:
791 ${POD2MAN} --section=${sect} --name=${*:U} ${.ALLSRC} | \
792 nroff -Tps -mandoc > ${.TARGET}
793.endfor
794
795.include <bsd.obj.mk>
796.include <bsd.subdir.mk>
797
798clean cleandir:
799 rm -f ${CLEANFILES}
diff --git a/src/lib/libssl/openssl.cnf b/src/lib/libssl/openssl.cnf
new file mode 100644
index 0000000000..bb97b155b8
--- /dev/null
+++ b/src/lib/libssl/openssl.cnf
@@ -0,0 +1,65 @@
1#
2# OpenSSL example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5
6RANDFILE = /dev/arandom
7
8####################################################################
9[ req ]
10default_bits = 1024
11default_keyfile = privkey.pem
12distinguished_name = req_distinguished_name
13attributes = req_attributes
14
15[ req_distinguished_name ]
16countryName = Country Name (2 letter code)
17#countryName_default = AU
18countryName_min = 2
19countryName_max = 2
20
21stateOrProvinceName = State or Province Name (full name)
22#stateOrProvinceName_default = Some-State
23
24localityName = Locality Name (eg, city)
25
260.organizationName = Organization Name (eg, company)
27#0.organizationName_default = Internet Widgits Pty Ltd
28
29# we can do this but it is not needed normally :-)
30#1.organizationName = Second Organization Name (eg, company)
31#1.organizationName_default = CryptSoft Pty Ltd
32
33organizationalUnitName = Organizational Unit Name (eg, section)
34#organizationalUnitName_default =
35
36commonName = Common Name (eg, fully qualified host name)
37commonName_max = 64
38
39emailAddress = Email Address
40emailAddress_max = 64
41
42[ req_attributes ]
43challengePassword = A challenge password
44challengePassword_min = 4
45challengePassword_max = 20
46
47unstructuredName = An optional company name
48
49[ x509v3_extensions ]
50
51nsCaRevocationUrl = http://www.cryptsoft.com/ca-crl.pem
52nsComment = "This is a comment"
53
54# under ASN.1, the 0 bit would be encoded as 80
55nsCertType = 0x40
56
57#nsBaseUrl
58#nsRevocationUrl
59#nsRenewalUrl
60#nsCaPolicyUrl
61#nsSslServerName
62#nsCertSequence
63#nsCertExt
64#nsDataType
65
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c
new file mode 100644
index 0000000000..64ee4269ec
--- /dev/null
+++ b/src/lib/libssl/s23_clnt.c
@@ -0,0 +1,490 @@
1/* ssl/s23_clnt.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 "ssl_locl.h"
61#include <openssl/buffer.h>
62#include <openssl/rand.h>
63#include <openssl/objects.h>
64#include <openssl/evp.h>
65
66static SSL_METHOD *ssl23_get_client_method(int ver);
67static int ssl23_client_hello(SSL *s);
68static int ssl23_get_server_hello(SSL *s);
69static SSL_METHOD *ssl23_get_client_method(int ver)
70 {
71#ifndef OPENSSL_NO_SSL2
72 if (ver == SSL2_VERSION)
73 return(SSLv2_client_method());
74#endif
75 if (ver == SSL3_VERSION)
76 return(SSLv3_client_method());
77 else if (ver == TLS1_VERSION)
78 return(TLSv1_client_method());
79 else
80 return(NULL);
81 }
82
83SSL_METHOD *SSLv23_client_method(void)
84 {
85 static int init=1;
86 static SSL_METHOD SSLv23_client_data;
87
88 if (init)
89 {
90 CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
91
92 if (init)
93 {
94 memcpy((char *)&SSLv23_client_data,
95 (char *)sslv23_base_method(),sizeof(SSL_METHOD));
96 SSLv23_client_data.ssl_connect=ssl23_connect;
97 SSLv23_client_data.get_ssl_method=ssl23_get_client_method;
98 init=0;
99 }
100
101 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
102 }
103 return(&SSLv23_client_data);
104 }
105
106int ssl23_connect(SSL *s)
107 {
108 BUF_MEM *buf=NULL;
109 unsigned long Time=time(NULL);
110 void (*cb)(const SSL *ssl,int type,int val)=NULL;
111 int ret= -1;
112 int new_state,state;
113
114 RAND_add(&Time,sizeof(Time),0);
115 ERR_clear_error();
116 clear_sys_error();
117
118 if (s->info_callback != NULL)
119 cb=s->info_callback;
120 else if (s->ctx->info_callback != NULL)
121 cb=s->ctx->info_callback;
122
123 s->in_handshake++;
124 if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
125
126 for (;;)
127 {
128 state=s->state;
129
130 switch(s->state)
131 {
132 case SSL_ST_BEFORE:
133 case SSL_ST_CONNECT:
134 case SSL_ST_BEFORE|SSL_ST_CONNECT:
135 case SSL_ST_OK|SSL_ST_CONNECT:
136
137 if (s->session != NULL)
138 {
139 SSLerr(SSL_F_SSL23_CONNECT,SSL_R_SSL23_DOING_SESSION_ID_REUSE);
140 ret= -1;
141 goto end;
142 }
143 s->server=0;
144 if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1);
145
146 /* s->version=TLS1_VERSION; */
147 s->type=SSL_ST_CONNECT;
148
149 if (s->init_buf == NULL)
150 {
151 if ((buf=BUF_MEM_new()) == NULL)
152 {
153 ret= -1;
154 goto end;
155 }
156 if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
157 {
158 ret= -1;
159 goto end;
160 }
161 s->init_buf=buf;
162 buf=NULL;
163 }
164
165 if (!ssl3_setup_buffers(s)) { ret= -1; goto end; }
166
167 ssl3_init_finished_mac(s);
168
169 s->state=SSL23_ST_CW_CLNT_HELLO_A;
170 s->ctx->stats.sess_connect++;
171 s->init_num=0;
172 break;
173
174 case SSL23_ST_CW_CLNT_HELLO_A:
175 case SSL23_ST_CW_CLNT_HELLO_B:
176
177 s->shutdown=0;
178 ret=ssl23_client_hello(s);
179 if (ret <= 0) goto end;
180 s->state=SSL23_ST_CR_SRVR_HELLO_A;
181 s->init_num=0;
182
183 break;
184
185 case SSL23_ST_CR_SRVR_HELLO_A:
186 case SSL23_ST_CR_SRVR_HELLO_B:
187 ret=ssl23_get_server_hello(s);
188 if (ret >= 0) cb=NULL;
189 goto end;
190 /* break; */
191
192 default:
193 SSLerr(SSL_F_SSL23_CONNECT,SSL_R_UNKNOWN_STATE);
194 ret= -1;
195 goto end;
196 /* break; */
197 }
198
199 if (s->debug) { (void)BIO_flush(s->wbio); }
200
201 if ((cb != NULL) && (s->state != state))
202 {
203 new_state=s->state;
204 s->state=state;
205 cb(s,SSL_CB_CONNECT_LOOP,1);
206 s->state=new_state;
207 }
208 }
209end:
210 s->in_handshake--;
211 if (buf != NULL)
212 BUF_MEM_free(buf);
213 if (cb != NULL)
214 cb(s,SSL_CB_CONNECT_EXIT,ret);
215 return(ret);
216 }
217
218
219static int ssl23_client_hello(SSL *s)
220 {
221 unsigned char *buf;
222 unsigned char *p,*d;
223 int i,ch_len;
224 int ret;
225
226 buf=(unsigned char *)s->init_buf->data;
227 if (s->state == SSL23_ST_CW_CLNT_HELLO_A)
228 {
229#if 0
230 /* don't reuse session-id's */
231 if (!ssl_get_new_session(s,0))
232 {
233 return(-1);
234 }
235#endif
236
237 p=s->s3->client_random;
238 RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE);
239
240 /* Do the message type and length last */
241 d= &(buf[2]);
242 p=d+9;
243
244 *(d++)=SSL2_MT_CLIENT_HELLO;
245 if (!(s->options & SSL_OP_NO_TLSv1))
246 {
247 *(d++)=TLS1_VERSION_MAJOR;
248 *(d++)=TLS1_VERSION_MINOR;
249 s->client_version=TLS1_VERSION;
250 }
251 else if (!(s->options & SSL_OP_NO_SSLv3))
252 {
253 *(d++)=SSL3_VERSION_MAJOR;
254 *(d++)=SSL3_VERSION_MINOR;
255 s->client_version=SSL3_VERSION;
256 }
257 else if (!(s->options & SSL_OP_NO_SSLv2))
258 {
259 *(d++)=SSL2_VERSION_MAJOR;
260 *(d++)=SSL2_VERSION_MINOR;
261 s->client_version=SSL2_VERSION;
262 }
263 else
264 {
265 SSLerr(SSL_F_SSL23_CLIENT_HELLO,SSL_R_NO_PROTOCOLS_AVAILABLE);
266 return(-1);
267 }
268
269 /* Ciphers supported */
270 i=ssl_cipher_list_to_bytes(s,SSL_get_ciphers(s),p);
271 if (i == 0)
272 {
273 /* no ciphers */
274 SSLerr(SSL_F_SSL23_CLIENT_HELLO,SSL_R_NO_CIPHERS_AVAILABLE);
275 return(-1);
276 }
277 s2n(i,d);
278 p+=i;
279
280 /* put in the session-id, zero since there is no
281 * reuse. */
282#if 0
283 s->session->session_id_length=0;
284#endif
285 s2n(0,d);
286
287 if (s->options & SSL_OP_NETSCAPE_CHALLENGE_BUG)
288 ch_len=SSL2_CHALLENGE_LENGTH;
289 else
290 ch_len=SSL2_MAX_CHALLENGE_LENGTH;
291
292 /* write out sslv2 challenge */
293 if (SSL3_RANDOM_SIZE < ch_len)
294 i=SSL3_RANDOM_SIZE;
295 else
296 i=ch_len;
297 s2n(i,d);
298 memset(&(s->s3->client_random[0]),0,SSL3_RANDOM_SIZE);
299 RAND_pseudo_bytes(&(s->s3->client_random[SSL3_RANDOM_SIZE-i]),i);
300 memcpy(p,&(s->s3->client_random[SSL3_RANDOM_SIZE-i]),i);
301 p+=i;
302
303 i= p- &(buf[2]);
304 buf[0]=((i>>8)&0xff)|0x80;
305 buf[1]=(i&0xff);
306
307 s->state=SSL23_ST_CW_CLNT_HELLO_B;
308 /* number of bytes to write */
309 s->init_num=i+2;
310 s->init_off=0;
311
312 ssl3_finish_mac(s,&(buf[2]),i);
313 }
314
315 /* SSL3_ST_CW_CLNT_HELLO_B */
316 ret = ssl23_write_bytes(s);
317 if (ret >= 2)
318 if (s->msg_callback)
319 s->msg_callback(1, SSL2_VERSION, 0, s->init_buf->data+2, ret-2, s, s->msg_callback_arg); /* CLIENT-HELLO */
320 return ret;
321 }
322
323static int ssl23_get_server_hello(SSL *s)
324 {
325 char buf[8];
326 unsigned char *p;
327 int i;
328 int n;
329
330 n=ssl23_read_bytes(s,7);
331
332 if (n != 7) return(n);
333 p=s->packet;
334
335 memcpy(buf,p,n);
336
337 if ((p[0] & 0x80) && (p[2] == SSL2_MT_SERVER_HELLO) &&
338 (p[5] == 0x00) && (p[6] == 0x02))
339 {
340#ifdef OPENSSL_NO_SSL2
341 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
342 goto err;
343#else
344 /* we are talking sslv2 */
345 /* we need to clean up the SSLv3 setup and put in the
346 * sslv2 stuff. */
347 int ch_len;
348
349 if (s->options & SSL_OP_NO_SSLv2)
350 {
351 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
352 goto err;
353 }
354 if (s->s2 == NULL)
355 {
356 if (!ssl2_new(s))
357 goto err;
358 }
359 else
360 ssl2_clear(s);
361
362 if (s->options & SSL_OP_NETSCAPE_CHALLENGE_BUG)
363 ch_len=SSL2_CHALLENGE_LENGTH;
364 else
365 ch_len=SSL2_MAX_CHALLENGE_LENGTH;
366
367 /* write out sslv2 challenge */
368 i=(SSL3_RANDOM_SIZE < ch_len)
369 ?SSL3_RANDOM_SIZE:ch_len;
370 s->s2->challenge_length=i;
371 memcpy(s->s2->challenge,
372 &(s->s3->client_random[SSL3_RANDOM_SIZE-i]),i);
373
374 if (s->s3 != NULL) ssl3_free(s);
375
376 if (!BUF_MEM_grow_clean(s->init_buf,
377 SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER))
378 {
379 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,ERR_R_BUF_LIB);
380 goto err;
381 }
382
383 s->state=SSL2_ST_GET_SERVER_HELLO_A;
384 if (!(s->client_version == SSL2_VERSION))
385 /* use special padding (SSL 3.0 draft/RFC 2246, App. E.2) */
386 s->s2->ssl2_rollback=1;
387
388 /* setup the 5 bytes we have read so we get them from
389 * the sslv2 buffer */
390 s->rstate=SSL_ST_READ_HEADER;
391 s->packet_length=n;
392 s->packet= &(s->s2->rbuf[0]);
393 memcpy(s->packet,buf,n);
394 s->s2->rbuf_left=n;
395 s->s2->rbuf_offs=0;
396
397 /* we have already written one */
398 s->s2->write_sequence=1;
399
400 s->method=SSLv2_client_method();
401 s->handshake_func=s->method->ssl_connect;
402#endif
403 }
404 else if ((p[0] == SSL3_RT_HANDSHAKE) &&
405 (p[1] == SSL3_VERSION_MAJOR) &&
406 ((p[2] == SSL3_VERSION_MINOR) ||
407 (p[2] == TLS1_VERSION_MINOR)) &&
408 (p[5] == SSL3_MT_SERVER_HELLO))
409 {
410 /* we have sslv3 or tls1 */
411
412 if (!ssl_init_wbio_buffer(s,1)) goto err;
413
414 /* we are in this state */
415 s->state=SSL3_ST_CR_SRVR_HELLO_A;
416
417 /* put the 5 bytes we have read into the input buffer
418 * for SSLv3 */
419 s->rstate=SSL_ST_READ_HEADER;
420 s->packet_length=n;
421 s->packet= &(s->s3->rbuf.buf[0]);
422 memcpy(s->packet,buf,n);
423 s->s3->rbuf.left=n;
424 s->s3->rbuf.offset=0;
425
426 if ((p[2] == SSL3_VERSION_MINOR) &&
427 !(s->options & SSL_OP_NO_SSLv3))
428 {
429 s->version=SSL3_VERSION;
430 s->method=SSLv3_client_method();
431 }
432 else if ((p[2] == TLS1_VERSION_MINOR) &&
433 !(s->options & SSL_OP_NO_TLSv1))
434 {
435 s->version=TLS1_VERSION;
436 s->method=TLSv1_client_method();
437 }
438 else
439 {
440 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
441 goto err;
442 }
443
444 s->handshake_func=s->method->ssl_connect;
445 }
446 else if ((p[0] == SSL3_RT_ALERT) &&
447 (p[1] == SSL3_VERSION_MAJOR) &&
448 ((p[2] == SSL3_VERSION_MINOR) ||
449 (p[2] == TLS1_VERSION_MINOR)) &&
450 (p[3] == 0) &&
451 (p[4] == 2))
452 {
453 void (*cb)(const SSL *ssl,int type,int val)=NULL;
454 int j;
455
456 /* An alert */
457 if (s->info_callback != NULL)
458 cb=s->info_callback;
459 else if (s->ctx->info_callback != NULL)
460 cb=s->ctx->info_callback;
461
462 i=p[5];
463 if (cb != NULL)
464 {
465 j=(i<<8)|p[6];
466 cb(s,SSL_CB_READ_ALERT,j);
467 }
468
469 s->rwstate=SSL_NOTHING;
470 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_AD_REASON_OFFSET+p[6]);
471 goto err;
472 }
473 else
474 {
475 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNKNOWN_PROTOCOL);
476 goto err;
477 }
478 s->init_num=0;
479
480 /* Since, if we are sending a ssl23 client hello, we are not
481 * reusing a session-id */
482 if (!ssl_get_new_session(s,0))
483 goto err;
484
485 s->first_packet=1;
486 return(SSL_connect(s));
487err:
488 return(-1);
489 }
490
diff --git a/src/lib/libssl/s23_lib.c b/src/lib/libssl/s23_lib.c
new file mode 100644
index 0000000000..b70002a647
--- /dev/null
+++ b/src/lib/libssl/s23_lib.c
@@ -0,0 +1,236 @@
1/* ssl/s23_lib.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 <openssl/objects.h>
61#include "ssl_locl.h"
62
63static int ssl23_num_ciphers(void );
64static SSL_CIPHER *ssl23_get_cipher(unsigned int u);
65static int ssl23_read(SSL *s, void *buf, int len);
66static int ssl23_peek(SSL *s, void *buf, int len);
67static int ssl23_write(SSL *s, const void *buf, int len);
68static long ssl23_default_timeout(void );
69static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p);
70static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p);
71const char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT;
72
73static SSL_METHOD SSLv23_data= {
74 TLS1_VERSION,
75 tls1_new,
76 tls1_clear,
77 tls1_free,
78 ssl_undefined_function,
79 ssl_undefined_function,
80 ssl23_read,
81 ssl23_peek,
82 ssl23_write,
83 ssl_undefined_function,
84 ssl_undefined_function,
85 ssl_ok,
86 ssl3_ctrl,
87 ssl3_ctx_ctrl,
88 ssl23_get_cipher_by_char,
89 ssl23_put_cipher_by_char,
90 ssl_undefined_function,
91 ssl23_num_ciphers,
92 ssl23_get_cipher,
93 ssl_bad_method,
94 ssl23_default_timeout,
95 &ssl3_undef_enc_method,
96 ssl_undefined_function,
97 ssl3_callback_ctrl,
98 ssl3_ctx_callback_ctrl,
99 };
100
101static long ssl23_default_timeout(void)
102 {
103 return(300);
104 }
105
106SSL_METHOD *sslv23_base_method(void)
107 {
108 return(&SSLv23_data);
109 }
110
111static int ssl23_num_ciphers(void)
112 {
113 return(ssl3_num_ciphers()
114#ifndef OPENSSL_NO_SSL2
115 + ssl2_num_ciphers()
116#endif
117 );
118 }
119
120static SSL_CIPHER *ssl23_get_cipher(unsigned int u)
121 {
122 unsigned int uu=ssl3_num_ciphers();
123
124 if (u < uu)
125 return(ssl3_get_cipher(u));
126 else
127#ifndef OPENSSL_NO_SSL2
128 return(ssl2_get_cipher(u-uu));
129#else
130 return(NULL);
131#endif
132 }
133
134/* This function needs to check if the ciphers required are actually
135 * available */
136static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p)
137 {
138 SSL_CIPHER c,*cp;
139 unsigned long id;
140 int n;
141
142 n=ssl3_num_ciphers();
143 id=0x03000000|((unsigned long)p[0]<<16L)|
144 ((unsigned long)p[1]<<8L)|(unsigned long)p[2];
145 c.id=id;
146 cp=ssl3_get_cipher_by_char(p);
147#ifndef OPENSSL_NO_SSL2
148 if (cp == NULL)
149 cp=ssl2_get_cipher_by_char(p);
150#endif
151 return(cp);
152 }
153
154static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
155 {
156 long l;
157
158 /* We can write SSLv2 and SSLv3 ciphers */
159 if (p != NULL)
160 {
161 l=c->id;
162 p[0]=((unsigned char)(l>>16L))&0xFF;
163 p[1]=((unsigned char)(l>> 8L))&0xFF;
164 p[2]=((unsigned char)(l ))&0xFF;
165 }
166 return(3);
167 }
168
169static int ssl23_read(SSL *s, void *buf, int len)
170 {
171 int n;
172
173 clear_sys_error();
174 if (SSL_in_init(s) && (!s->in_handshake))
175 {
176 n=s->handshake_func(s);
177 if (n < 0) return(n);
178 if (n == 0)
179 {
180 SSLerr(SSL_F_SSL23_READ,SSL_R_SSL_HANDSHAKE_FAILURE);
181 return(-1);
182 }
183 return(SSL_read(s,buf,len));
184 }
185 else
186 {
187 ssl_undefined_function(s);
188 return(-1);
189 }
190 }
191
192static int ssl23_peek(SSL *s, void *buf, int len)
193 {
194 int n;
195
196 clear_sys_error();
197 if (SSL_in_init(s) && (!s->in_handshake))
198 {
199 n=s->handshake_func(s);
200 if (n < 0) return(n);
201 if (n == 0)
202 {
203 SSLerr(SSL_F_SSL23_PEEK,SSL_R_SSL_HANDSHAKE_FAILURE);
204 return(-1);
205 }
206 return(SSL_peek(s,buf,len));
207 }
208 else
209 {
210 ssl_undefined_function(s);
211 return(-1);
212 }
213 }
214
215static int ssl23_write(SSL *s, const void *buf, int len)
216 {
217 int n;
218
219 clear_sys_error();
220 if (SSL_in_init(s) && (!s->in_handshake))
221 {
222 n=s->handshake_func(s);
223 if (n < 0) return(n);
224 if (n == 0)
225 {
226 SSLerr(SSL_F_SSL23_WRITE,SSL_R_SSL_HANDSHAKE_FAILURE);
227 return(-1);
228 }
229 return(SSL_write(s,buf,len));
230 }
231 else
232 {
233 ssl_undefined_function(s);
234 return(-1);
235 }
236 }
diff --git a/src/lib/libssl/s23_pkt.c b/src/lib/libssl/s23_pkt.c
new file mode 100644
index 0000000000..4ca6a1b258
--- /dev/null
+++ b/src/lib/libssl/s23_pkt.c
@@ -0,0 +1,117 @@
1/* ssl/s23_pkt.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#define USE_SOCKETS
62#include "ssl_locl.h"
63#include <openssl/evp.h>
64#include <openssl/buffer.h>
65
66int ssl23_write_bytes(SSL *s)
67 {
68 int i,num,tot;
69 char *buf;
70
71 buf=s->init_buf->data;
72 tot=s->init_off;
73 num=s->init_num;
74 for (;;)
75 {
76 s->rwstate=SSL_WRITING;
77 i=BIO_write(s->wbio,&(buf[tot]),num);
78 if (i <= 0)
79 {
80 s->init_off=tot;
81 s->init_num=num;
82 return(i);
83 }
84 s->rwstate=SSL_NOTHING;
85 if (i == num) return(tot+i);
86
87 num-=i;
88 tot+=i;
89 }
90 }
91
92/* return regularly only when we have read (at least) 'n' bytes */
93int ssl23_read_bytes(SSL *s, int n)
94 {
95 unsigned char *p;
96 int j;
97
98 if (s->packet_length < (unsigned int)n)
99 {
100 p=s->packet;
101
102 for (;;)
103 {
104 s->rwstate=SSL_READING;
105 j=BIO_read(s->rbio,(char *)&(p[s->packet_length]),
106 n-s->packet_length);
107 if (j <= 0)
108 return(j);
109 s->rwstate=SSL_NOTHING;
110 s->packet_length+=j;
111 if (s->packet_length >= (unsigned int)n)
112 return(s->packet_length);
113 }
114 }
115 return(n);
116 }
117
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c
new file mode 100644
index 0000000000..c5404ca0bc
--- /dev/null
+++ b/src/lib/libssl/s23_srvr.c
@@ -0,0 +1,596 @@
1/* ssl/s23_srvr.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-2001 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 <stdio.h>
113#include "ssl_locl.h"
114#include <openssl/buffer.h>
115#include <openssl/rand.h>
116#include <openssl/objects.h>
117#include <openssl/evp.h>
118
119static SSL_METHOD *ssl23_get_server_method(int ver);
120int ssl23_get_client_hello(SSL *s);
121static SSL_METHOD *ssl23_get_server_method(int ver)
122 {
123#ifndef OPENSSL_NO_SSL2
124 if (ver == SSL2_VERSION)
125 return(SSLv2_server_method());
126#endif
127 if (ver == SSL3_VERSION)
128 return(SSLv3_server_method());
129 else if (ver == TLS1_VERSION)
130 return(TLSv1_server_method());
131 else
132 return(NULL);
133 }
134
135SSL_METHOD *SSLv23_server_method(void)
136 {
137 static int init=1;
138 static SSL_METHOD SSLv23_server_data;
139
140 if (init)
141 {
142 CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
143
144 if (init)
145 {
146 memcpy((char *)&SSLv23_server_data,
147 (char *)sslv23_base_method(),sizeof(SSL_METHOD));
148 SSLv23_server_data.ssl_accept=ssl23_accept;
149 SSLv23_server_data.get_ssl_method=ssl23_get_server_method;
150 init=0;
151 }
152
153 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
154 }
155 return(&SSLv23_server_data);
156 }
157
158int ssl23_accept(SSL *s)
159 {
160 BUF_MEM *buf;
161 unsigned long Time=time(NULL);
162 void (*cb)(const SSL *ssl,int type,int val)=NULL;
163 int ret= -1;
164 int new_state,state;
165
166 RAND_add(&Time,sizeof(Time),0);
167 ERR_clear_error();
168 clear_sys_error();
169
170 if (s->info_callback != NULL)
171 cb=s->info_callback;
172 else if (s->ctx->info_callback != NULL)
173 cb=s->ctx->info_callback;
174
175 s->in_handshake++;
176 if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
177
178 for (;;)
179 {
180 state=s->state;
181
182 switch(s->state)
183 {
184 case SSL_ST_BEFORE:
185 case SSL_ST_ACCEPT:
186 case SSL_ST_BEFORE|SSL_ST_ACCEPT:
187 case SSL_ST_OK|SSL_ST_ACCEPT:
188
189 s->server=1;
190 if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1);
191
192 /* s->version=SSL3_VERSION; */
193 s->type=SSL_ST_ACCEPT;
194
195 if (s->init_buf == NULL)
196 {
197 if ((buf=BUF_MEM_new()) == NULL)
198 {
199 ret= -1;
200 goto end;
201 }
202 if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
203 {
204 ret= -1;
205 goto end;
206 }
207 s->init_buf=buf;
208 }
209
210 ssl3_init_finished_mac(s);
211
212 s->state=SSL23_ST_SR_CLNT_HELLO_A;
213 s->ctx->stats.sess_accept++;
214 s->init_num=0;
215 break;
216
217 case SSL23_ST_SR_CLNT_HELLO_A:
218 case SSL23_ST_SR_CLNT_HELLO_B:
219
220 s->shutdown=0;
221 ret=ssl23_get_client_hello(s);
222 if (ret >= 0) cb=NULL;
223 goto end;
224 /* break; */
225
226 default:
227 SSLerr(SSL_F_SSL23_ACCEPT,SSL_R_UNKNOWN_STATE);
228 ret= -1;
229 goto end;
230 /* break; */
231 }
232
233 if ((cb != NULL) && (s->state != state))
234 {
235 new_state=s->state;
236 s->state=state;
237 cb(s,SSL_CB_ACCEPT_LOOP,1);
238 s->state=new_state;
239 }
240 }
241end:
242 s->in_handshake--;
243 if (cb != NULL)
244 cb(s,SSL_CB_ACCEPT_EXIT,ret);
245 return(ret);
246 }
247
248
249int ssl23_get_client_hello(SSL *s)
250 {
251 char buf_space[11]; /* Request this many bytes in initial read.
252 * We can detect SSL 3.0/TLS 1.0 Client Hellos
253 * ('type == 3') correctly only when the following
254 * is in a single record, which is not guaranteed by
255 * the protocol specification:
256 * Byte Content
257 * 0 type \
258 * 1/2 version > record header
259 * 3/4 length /
260 * 5 msg_type \
261 * 6-8 length > Client Hello message
262 * 9/10 client_version /
263 */
264 char *buf= &(buf_space[0]);
265 unsigned char *p,*d,*d_len,*dd;
266 unsigned int i;
267 unsigned int csl,sil,cl;
268 int n=0,j;
269 int type=0;
270 int v[2];
271#ifndef OPENSSL_NO_RSA
272 int use_sslv2_strong=0;
273#endif
274
275 if (s->state == SSL23_ST_SR_CLNT_HELLO_A)
276 {
277 /* read the initial header */
278 v[0]=v[1]=0;
279
280 if (!ssl3_setup_buffers(s)) goto err;
281
282 n=ssl23_read_bytes(s, sizeof buf_space);
283 if (n != sizeof buf_space) return(n); /* n == -1 || n == 0 */
284
285 p=s->packet;
286
287 memcpy(buf,p,n);
288
289 if ((p[0] & 0x80) && (p[2] == SSL2_MT_CLIENT_HELLO))
290 {
291 /*
292 * SSLv2 header
293 */
294 if ((p[3] == 0x00) && (p[4] == 0x02))
295 {
296 v[0]=p[3]; v[1]=p[4];
297 /* SSLv2 */
298 if (!(s->options & SSL_OP_NO_SSLv2))
299 type=1;
300 }
301 else if (p[3] == SSL3_VERSION_MAJOR)
302 {
303 v[0]=p[3]; v[1]=p[4];
304 /* SSLv3/TLSv1 */
305 if (p[4] >= TLS1_VERSION_MINOR)
306 {
307 if (!(s->options & SSL_OP_NO_TLSv1))
308 {
309 s->version=TLS1_VERSION;
310 /* type=2; */ /* done later to survive restarts */
311 s->state=SSL23_ST_SR_CLNT_HELLO_B;
312 }
313 else if (!(s->options & SSL_OP_NO_SSLv3))
314 {
315 s->version=SSL3_VERSION;
316 /* type=2; */
317 s->state=SSL23_ST_SR_CLNT_HELLO_B;
318 }
319 else if (!(s->options & SSL_OP_NO_SSLv2))
320 {
321 type=1;
322 }
323 }
324 else if (!(s->options & SSL_OP_NO_SSLv3))
325 {
326 s->version=SSL3_VERSION;
327 /* type=2; */
328 s->state=SSL23_ST_SR_CLNT_HELLO_B;
329 }
330 else if (!(s->options & SSL_OP_NO_SSLv2))
331 type=1;
332
333 }
334 }
335 else if ((p[0] == SSL3_RT_HANDSHAKE) &&
336 (p[1] == SSL3_VERSION_MAJOR) &&
337 (p[5] == SSL3_MT_CLIENT_HELLO) &&
338 ((p[3] == 0 && p[4] < 5 /* silly record length? */)
339 || (p[9] == p[1])))
340 {
341 /*
342 * SSLv3 or tls1 header
343 */
344
345 v[0]=p[1]; /* major version (= SSL3_VERSION_MAJOR) */
346 /* We must look at client_version inside the Client Hello message
347 * to get the correct minor version.
348 * However if we have only a pathologically small fragment of the
349 * Client Hello message, this would be difficult, and we'd have
350 * to read more records to find out.
351 * No known SSL 3.0 client fragments ClientHello like this,
352 * so we simply assume TLS 1.0 to avoid protocol version downgrade
353 * attacks. */
354 if (p[3] == 0 && p[4] < 6)
355 {
356#if 0
357 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_SMALL);
358 goto err;
359#else
360 v[1] = TLS1_VERSION_MINOR;
361#endif
362 }
363 else
364 v[1]=p[10]; /* minor version according to client_version */
365 if (v[1] >= TLS1_VERSION_MINOR)
366 {
367 if (!(s->options & SSL_OP_NO_TLSv1))
368 {
369 s->version=TLS1_VERSION;
370 type=3;
371 }
372 else if (!(s->options & SSL_OP_NO_SSLv3))
373 {
374 s->version=SSL3_VERSION;
375 type=3;
376 }
377 }
378 else
379 {
380 /* client requests SSL 3.0 */
381 if (!(s->options & SSL_OP_NO_SSLv3))
382 {
383 s->version=SSL3_VERSION;
384 type=3;
385 }
386 else if (!(s->options & SSL_OP_NO_TLSv1))
387 {
388 /* we won't be able to use TLS of course,
389 * but this will send an appropriate alert */
390 s->version=TLS1_VERSION;
391 type=3;
392 }
393 }
394 }
395 else if ((strncmp("GET ", (char *)p,4) == 0) ||
396 (strncmp("POST ",(char *)p,5) == 0) ||
397 (strncmp("HEAD ",(char *)p,5) == 0) ||
398 (strncmp("PUT ", (char *)p,4) == 0))
399 {
400 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_HTTP_REQUEST);
401 goto err;
402 }
403 else if (strncmp("CONNECT",(char *)p,7) == 0)
404 {
405 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_HTTPS_PROXY_REQUEST);
406 goto err;
407 }
408 }
409
410 if (s->state == SSL23_ST_SR_CLNT_HELLO_B)
411 {
412 /* we have SSLv3/TLSv1 in an SSLv2 header
413 * (other cases skip this state) */
414
415 type=2;
416 p=s->packet;
417 v[0] = p[3]; /* == SSL3_VERSION_MAJOR */
418 v[1] = p[4];
419
420 n=((p[0]&0x7f)<<8)|p[1];
421 if (n > (1024*4))
422 {
423 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_LARGE);
424 goto err;
425 }
426
427 j=ssl23_read_bytes(s,n+2);
428 if (j <= 0) return(j);
429
430 ssl3_finish_mac(s, s->packet+2, s->packet_length-2);
431 if (s->msg_callback)
432 s->msg_callback(0, SSL2_VERSION, 0, s->packet+2, s->packet_length-2, s, s->msg_callback_arg); /* CLIENT-HELLO */
433
434 p=s->packet;
435 p+=5;
436 n2s(p,csl);
437 n2s(p,sil);
438 n2s(p,cl);
439 d=(unsigned char *)s->init_buf->data;
440 if ((csl+sil+cl+11) != s->packet_length)
441 {
442 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_LENGTH_MISMATCH);
443 goto err;
444 }
445
446 /* record header: msg_type ... */
447 *(d++) = SSL3_MT_CLIENT_HELLO;
448 /* ... and length (actual value will be written later) */
449 d_len = d;
450 d += 3;
451
452 /* client_version */
453 *(d++) = SSL3_VERSION_MAJOR; /* == v[0] */
454 *(d++) = v[1];
455
456 /* lets populate the random area */
457 /* get the challenge_length */
458 i=(cl > SSL3_RANDOM_SIZE)?SSL3_RANDOM_SIZE:cl;
459 memset(d,0,SSL3_RANDOM_SIZE);
460 memcpy(&(d[SSL3_RANDOM_SIZE-i]),&(p[csl+sil]),i);
461 d+=SSL3_RANDOM_SIZE;
462
463 /* no session-id reuse */
464 *(d++)=0;
465
466 /* ciphers */
467 j=0;
468 dd=d;
469 d+=2;
470 for (i=0; i<csl; i+=3)
471 {
472 if (p[i] != 0) continue;
473 *(d++)=p[i+1];
474 *(d++)=p[i+2];
475 j+=2;
476 }
477 s2n(j,dd);
478
479 /* COMPRESSION */
480 *(d++)=1;
481 *(d++)=0;
482
483 i = (d-(unsigned char *)s->init_buf->data) - 4;
484 l2n3((long)i, d_len);
485
486 /* get the data reused from the init_buf */
487 s->s3->tmp.reuse_message=1;
488 s->s3->tmp.message_type=SSL3_MT_CLIENT_HELLO;
489 s->s3->tmp.message_size=i;
490 }
491
492 /* imaginary new state (for program structure): */
493 /* s->state = SSL23_SR_CLNT_HELLO_C */
494
495 if (type == 1)
496 {
497#ifdef OPENSSL_NO_SSL2
498 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
499 goto err;
500#else
501 /* we are talking sslv2 */
502 /* we need to clean up the SSLv3/TLSv1 setup and put in the
503 * sslv2 stuff. */
504
505 if (s->s2 == NULL)
506 {
507 if (!ssl2_new(s))
508 goto err;
509 }
510 else
511 ssl2_clear(s);
512
513 if (s->s3 != NULL) ssl3_free(s);
514
515 if (!BUF_MEM_grow_clean(s->init_buf,
516 SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER))
517 {
518 goto err;
519 }
520
521 s->state=SSL2_ST_GET_CLIENT_HELLO_A;
522 if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) ||
523 use_sslv2_strong ||
524 (s->options & SSL_OP_NO_TLSv1 && s->options & SSL_OP_NO_SSLv3))
525 s->s2->ssl2_rollback=0;
526 else
527 /* reject SSL 2.0 session if client supports SSL 3.0 or TLS 1.0
528 * (SSL 3.0 draft/RFC 2246, App. E.2) */
529 s->s2->ssl2_rollback=1;
530
531 /* setup the n bytes we have read so we get them from
532 * the sslv2 buffer */
533 s->rstate=SSL_ST_READ_HEADER;
534 s->packet_length=n;
535 s->packet= &(s->s2->rbuf[0]);
536 memcpy(s->packet,buf,n);
537 s->s2->rbuf_left=n;
538 s->s2->rbuf_offs=0;
539
540 s->method=SSLv2_server_method();
541 s->handshake_func=s->method->ssl_accept;
542#endif
543 }
544
545 if ((type == 2) || (type == 3))
546 {
547 /* we have SSLv3/TLSv1 (type 2: SSL2 style, type 3: SSL3/TLS style) */
548
549 if (!ssl_init_wbio_buffer(s,1)) goto err;
550
551 /* we are in this state */
552 s->state=SSL3_ST_SR_CLNT_HELLO_A;
553
554 if (type == 3)
555 {
556 /* put the 'n' bytes we have read into the input buffer
557 * for SSLv3 */
558 s->rstate=SSL_ST_READ_HEADER;
559 s->packet_length=n;
560 s->packet= &(s->s3->rbuf.buf[0]);
561 memcpy(s->packet,buf,n);
562 s->s3->rbuf.left=n;
563 s->s3->rbuf.offset=0;
564 }
565 else
566 {
567 s->packet_length=0;
568 s->s3->rbuf.left=0;
569 s->s3->rbuf.offset=0;
570 }
571
572 if (s->version == TLS1_VERSION)
573 s->method = TLSv1_server_method();
574 else
575 s->method = SSLv3_server_method();
576#if 0 /* ssl3_get_client_hello does this */
577 s->client_version=(v[0]<<8)|v[1];
578#endif
579 s->handshake_func=s->method->ssl_accept;
580 }
581
582 if ((type < 1) || (type > 3))
583 {
584 /* bad, very bad */
585 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_UNKNOWN_PROTOCOL);
586 goto err;
587 }
588 s->init_num=0;
589
590 if (buf != buf_space) OPENSSL_free(buf);
591 s->first_packet=1;
592 return(SSL_accept(s));
593err:
594 if (buf != buf_space) OPENSSL_free(buf);
595 return(-1);
596 }
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c
new file mode 100644
index 0000000000..64d317b7ac
--- /dev/null
+++ b/src/lib/libssl/s3_both.c
@@ -0,0 +1,635 @@
1/* ssl/s3_both.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-2002 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 <limits.h>
113#include <string.h>
114#include <stdio.h>
115#include "ssl_locl.h"
116#include <openssl/buffer.h>
117#include <openssl/rand.h>
118#include <openssl/objects.h>
119#include <openssl/evp.h>
120#include <openssl/x509.h>
121
122/* send s->init_buf in records of type 'type' (SSL3_RT_HANDSHAKE or SSL3_RT_CHANGE_CIPHER_SPEC) */
123int ssl3_do_write(SSL *s, int type)
124 {
125 int ret;
126
127 ret=ssl3_write_bytes(s,type,&s->init_buf->data[s->init_off],
128 s->init_num);
129 if (ret < 0) return(-1);
130 if (type == SSL3_RT_HANDSHAKE)
131 /* should not be done for 'Hello Request's, but in that case
132 * we'll ignore the result anyway */
133 ssl3_finish_mac(s,(unsigned char *)&s->init_buf->data[s->init_off],ret);
134
135 if (ret == s->init_num)
136 {
137 if (s->msg_callback)
138 s->msg_callback(1, s->version, type, s->init_buf->data, (size_t)(s->init_off + s->init_num), s, s->msg_callback_arg);
139 return(1);
140 }
141 s->init_off+=ret;
142 s->init_num-=ret;
143 return(0);
144 }
145
146int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen)
147 {
148 unsigned char *p,*d;
149 int i;
150 unsigned long l;
151
152 if (s->state == a)
153 {
154 d=(unsigned char *)s->init_buf->data;
155 p= &(d[4]);
156
157 i=s->method->ssl3_enc->final_finish_mac(s,
158 &(s->s3->finish_dgst1),
159 &(s->s3->finish_dgst2),
160 sender,slen,s->s3->tmp.finish_md);
161 s->s3->tmp.finish_md_len = i;
162 memcpy(p, s->s3->tmp.finish_md, i);
163 p+=i;
164 l=i;
165
166#ifdef OPENSSL_SYS_WIN16
167 /* MSVC 1.5 does not clear the top bytes of the word unless
168 * I do this.
169 */
170 l&=0xffff;
171#endif
172
173 *(d++)=SSL3_MT_FINISHED;
174 l2n3(l,d);
175 s->init_num=(int)l+4;
176 s->init_off=0;
177
178 s->state=b;
179 }
180
181 /* SSL3_ST_SEND_xxxxxx_HELLO_B */
182 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
183 }
184
185int ssl3_get_finished(SSL *s, int a, int b)
186 {
187 int al,i,ok;
188 long n;
189 unsigned char *p;
190
191 /* the mac has already been generated when we received the
192 * change cipher spec message and is in s->s3->tmp.peer_finish_md
193 */
194
195 n=ssl3_get_message(s,
196 a,
197 b,
198 SSL3_MT_FINISHED,
199 64, /* should actually be 36+4 :-) */
200 &ok);
201
202 if (!ok) return((int)n);
203
204 /* If this occurs, we have missed a message */
205 if (!s->s3->change_cipher_spec)
206 {
207 al=SSL_AD_UNEXPECTED_MESSAGE;
208 SSLerr(SSL_F_SSL3_GET_FINISHED,SSL_R_GOT_A_FIN_BEFORE_A_CCS);
209 goto f_err;
210 }
211 s->s3->change_cipher_spec=0;
212
213 p = (unsigned char *)s->init_msg;
214 i = s->s3->tmp.peer_finish_md_len;
215
216 if (i != n)
217 {
218 al=SSL_AD_DECODE_ERROR;
219 SSLerr(SSL_F_SSL3_GET_FINISHED,SSL_R_BAD_DIGEST_LENGTH);
220 goto f_err;
221 }
222
223 if (memcmp(p, s->s3->tmp.peer_finish_md, i) != 0)
224 {
225 al=SSL_AD_DECRYPT_ERROR;
226 SSLerr(SSL_F_SSL3_GET_FINISHED,SSL_R_DIGEST_CHECK_FAILED);
227 goto f_err;
228 }
229
230 return(1);
231f_err:
232 ssl3_send_alert(s,SSL3_AL_FATAL,al);
233 return(0);
234 }
235
236/* for these 2 messages, we need to
237 * ssl->enc_read_ctx re-init
238 * ssl->s3->read_sequence zero
239 * ssl->s3->read_mac_secret re-init
240 * ssl->session->read_sym_enc assign
241 * ssl->session->read_compression assign
242 * ssl->session->read_hash assign
243 */
244int ssl3_send_change_cipher_spec(SSL *s, int a, int b)
245 {
246 unsigned char *p;
247
248 if (s->state == a)
249 {
250 p=(unsigned char *)s->init_buf->data;
251 *p=SSL3_MT_CCS;
252 s->init_num=1;
253 s->init_off=0;
254
255 s->state=b;
256 }
257
258 /* SSL3_ST_CW_CHANGE_B */
259 return(ssl3_do_write(s,SSL3_RT_CHANGE_CIPHER_SPEC));
260 }
261
262unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
263 {
264 unsigned char *p;
265 int n,i;
266 unsigned long l=7;
267 BUF_MEM *buf;
268 X509_STORE_CTX xs_ctx;
269 X509_OBJECT obj;
270
271 int no_chain;
272
273 if ((s->mode & SSL_MODE_NO_AUTO_CHAIN) || s->ctx->extra_certs)
274 no_chain = 1;
275 else
276 no_chain = 0;
277
278 /* TLSv1 sends a chain with nothing in it, instead of an alert */
279 buf=s->init_buf;
280 if (!BUF_MEM_grow_clean(buf,10))
281 {
282 SSLerr(SSL_F_SSL3_OUTPUT_CERT_CHAIN,ERR_R_BUF_LIB);
283 return(0);
284 }
285 if (x != NULL)
286 {
287 if(!no_chain && !X509_STORE_CTX_init(&xs_ctx,s->ctx->cert_store,NULL,NULL))
288 {
289 SSLerr(SSL_F_SSL3_OUTPUT_CERT_CHAIN,ERR_R_X509_LIB);
290 return(0);
291 }
292
293 for (;;)
294 {
295 n=i2d_X509(x,NULL);
296 if (!BUF_MEM_grow_clean(buf,(int)(n+l+3)))
297 {
298 SSLerr(SSL_F_SSL3_OUTPUT_CERT_CHAIN,ERR_R_BUF_LIB);
299 return(0);
300 }
301 p=(unsigned char *)&(buf->data[l]);
302 l2n3(n,p);
303 i2d_X509(x,&p);
304 l+=n+3;
305
306 if (no_chain)
307 break;
308
309 if (X509_NAME_cmp(X509_get_subject_name(x),
310 X509_get_issuer_name(x)) == 0) break;
311
312 i=X509_STORE_get_by_subject(&xs_ctx,X509_LU_X509,
313 X509_get_issuer_name(x),&obj);
314 if (i <= 0) break;
315 x=obj.data.x509;
316 /* Count is one too high since the X509_STORE_get uped the
317 * ref count */
318 X509_free(x);
319 }
320 if (!no_chain)
321 X509_STORE_CTX_cleanup(&xs_ctx);
322 }
323
324 /* Thawte special :-) */
325 if (s->ctx->extra_certs != NULL)
326 for (i=0; i<sk_X509_num(s->ctx->extra_certs); i++)
327 {
328 x=sk_X509_value(s->ctx->extra_certs,i);
329 n=i2d_X509(x,NULL);
330 if (!BUF_MEM_grow_clean(buf,(int)(n+l+3)))
331 {
332 SSLerr(SSL_F_SSL3_OUTPUT_CERT_CHAIN,ERR_R_BUF_LIB);
333 return(0);
334 }
335 p=(unsigned char *)&(buf->data[l]);
336 l2n3(n,p);
337 i2d_X509(x,&p);
338 l+=n+3;
339 }
340
341 l-=7;
342 p=(unsigned char *)&(buf->data[4]);
343 l2n3(l,p);
344 l+=3;
345 p=(unsigned char *)&(buf->data[0]);
346 *(p++)=SSL3_MT_CERTIFICATE;
347 l2n3(l,p);
348 l+=4;
349 return(l);
350 }
351
352/* Obtain handshake message of message type 'mt' (any if mt == -1),
353 * maximum acceptable body length 'max'.
354 * The first four bytes (msg_type and length) are read in state 'st1',
355 * the body is read in state 'stn'.
356 */
357long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
358 {
359 unsigned char *p;
360 unsigned long l;
361 long n;
362 int i,al;
363
364 if (s->s3->tmp.reuse_message)
365 {
366 s->s3->tmp.reuse_message=0;
367 if ((mt >= 0) && (s->s3->tmp.message_type != mt))
368 {
369 al=SSL_AD_UNEXPECTED_MESSAGE;
370 SSLerr(SSL_F_SSL3_GET_MESSAGE,SSL_R_UNEXPECTED_MESSAGE);
371 goto f_err;
372 }
373 *ok=1;
374 s->init_msg = s->init_buf->data + 4;
375 s->init_num = (int)s->s3->tmp.message_size;
376 return s->init_num;
377 }
378
379 p=(unsigned char *)s->init_buf->data;
380
381 if (s->state == st1) /* s->init_num < 4 */
382 {
383 int skip_message;
384
385 do
386 {
387 while (s->init_num < 4)
388 {
389 i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,&p[s->init_num],
390 4 - s->init_num, 0);
391 if (i <= 0)
392 {
393 s->rwstate=SSL_READING;
394 *ok = 0;
395 return i;
396 }
397 s->init_num+=i;
398 }
399
400 skip_message = 0;
401 if (!s->server)
402 if (p[0] == SSL3_MT_HELLO_REQUEST)
403 /* The server may always send 'Hello Request' messages --
404 * we are doing a handshake anyway now, so ignore them
405 * if their format is correct. Does not count for
406 * 'Finished' MAC. */
407 if (p[1] == 0 && p[2] == 0 &&p[3] == 0)
408 {
409 s->init_num = 0;
410 skip_message = 1;
411
412 if (s->msg_callback)
413 s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, p, 4, s, s->msg_callback_arg);
414 }
415 }
416 while (skip_message);
417
418 /* s->init_num == 4 */
419
420 if ((mt >= 0) && (*p != mt))
421 {
422 al=SSL_AD_UNEXPECTED_MESSAGE;
423 SSLerr(SSL_F_SSL3_GET_MESSAGE,SSL_R_UNEXPECTED_MESSAGE);
424 goto f_err;
425 }
426 if ((mt < 0) && (*p == SSL3_MT_CLIENT_HELLO) &&
427 (st1 == SSL3_ST_SR_CERT_A) &&
428 (stn == SSL3_ST_SR_CERT_B))
429 {
430 /* At this point we have got an MS SGC second client
431 * hello (maybe we should always allow the client to
432 * start a new handshake?). We need to restart the mac.
433 * Don't increment {num,total}_renegotiations because
434 * we have not completed the handshake. */
435 ssl3_init_finished_mac(s);
436 }
437
438 s->s3->tmp.message_type= *(p++);
439
440 n2l3(p,l);
441 if (l > (unsigned long)max)
442 {
443 al=SSL_AD_ILLEGAL_PARAMETER;
444 SSLerr(SSL_F_SSL3_GET_MESSAGE,SSL_R_EXCESSIVE_MESSAGE_SIZE);
445 goto f_err;
446 }
447 if (l > (INT_MAX-4)) /* BUF_MEM_grow takes an 'int' parameter */
448 {
449 al=SSL_AD_ILLEGAL_PARAMETER;
450 SSLerr(SSL_F_SSL3_GET_MESSAGE,SSL_R_EXCESSIVE_MESSAGE_SIZE);
451 goto f_err;
452 }
453 if (l && !BUF_MEM_grow_clean(s->init_buf,(int)l+4))
454 {
455 SSLerr(SSL_F_SSL3_GET_MESSAGE,ERR_R_BUF_LIB);
456 goto err;
457 }
458 s->s3->tmp.message_size=l;
459 s->state=stn;
460
461 s->init_msg = s->init_buf->data + 4;
462 s->init_num = 0;
463 }
464
465 /* next state (stn) */
466 p = s->init_msg;
467 n = s->s3->tmp.message_size - s->init_num;
468 while (n > 0)
469 {
470 i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,&p[s->init_num],n,0);
471 if (i <= 0)
472 {
473 s->rwstate=SSL_READING;
474 *ok = 0;
475 return i;
476 }
477 s->init_num += i;
478 n -= i;
479 }
480 ssl3_finish_mac(s, (unsigned char *)s->init_buf->data, s->init_num + 4);
481 if (s->msg_callback)
482 s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->init_buf->data, (size_t)s->init_num + 4, s, s->msg_callback_arg);
483 *ok=1;
484 return s->init_num;
485f_err:
486 ssl3_send_alert(s,SSL3_AL_FATAL,al);
487err:
488 *ok=0;
489 return(-1);
490 }
491
492int ssl_cert_type(X509 *x, EVP_PKEY *pkey)
493 {
494 EVP_PKEY *pk;
495 int ret= -1,i,j;
496
497 if (pkey == NULL)
498 pk=X509_get_pubkey(x);
499 else
500 pk=pkey;
501 if (pk == NULL) goto err;
502
503 i=pk->type;
504 if (i == EVP_PKEY_RSA)
505 {
506 ret=SSL_PKEY_RSA_ENC;
507 if (x != NULL)
508 {
509 j=X509_get_ext_count(x);
510 /* check to see if this is a signing only certificate */
511 /* EAY EAY EAY EAY */
512 }
513 }
514 else if (i == EVP_PKEY_DSA)
515 {
516 ret=SSL_PKEY_DSA_SIGN;
517 }
518 else if (i == EVP_PKEY_DH)
519 {
520 /* if we just have a key, we needs to be guess */
521
522 if (x == NULL)
523 ret=SSL_PKEY_DH_DSA;
524 else
525 {
526 j=X509_get_signature_type(x);
527 if (j == EVP_PKEY_RSA)
528 ret=SSL_PKEY_DH_RSA;
529 else if (j== EVP_PKEY_DSA)
530 ret=SSL_PKEY_DH_DSA;
531 else ret= -1;
532 }
533 }
534 else
535 ret= -1;
536
537err:
538 if(!pkey) EVP_PKEY_free(pk);
539 return(ret);
540 }
541
542int ssl_verify_alarm_type(long type)
543 {
544 int al;
545
546 switch(type)
547 {
548 case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
549 case X509_V_ERR_UNABLE_TO_GET_CRL:
550 case X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER:
551 al=SSL_AD_UNKNOWN_CA;
552 break;
553 case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE:
554 case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE:
555 case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY:
556 case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
557 case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
558 case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD:
559 case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD:
560 case X509_V_ERR_CERT_NOT_YET_VALID:
561 case X509_V_ERR_CRL_NOT_YET_VALID:
562 case X509_V_ERR_CERT_UNTRUSTED:
563 case X509_V_ERR_CERT_REJECTED:
564 al=SSL_AD_BAD_CERTIFICATE;
565 break;
566 case X509_V_ERR_CERT_SIGNATURE_FAILURE:
567 case X509_V_ERR_CRL_SIGNATURE_FAILURE:
568 al=SSL_AD_DECRYPT_ERROR;
569 break;
570 case X509_V_ERR_CERT_HAS_EXPIRED:
571 case X509_V_ERR_CRL_HAS_EXPIRED:
572 al=SSL_AD_CERTIFICATE_EXPIRED;
573 break;
574 case X509_V_ERR_CERT_REVOKED:
575 al=SSL_AD_CERTIFICATE_REVOKED;
576 break;
577 case X509_V_ERR_OUT_OF_MEM:
578 al=SSL_AD_INTERNAL_ERROR;
579 break;
580 case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
581 case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN:
582 case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY:
583 case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
584 case X509_V_ERR_CERT_CHAIN_TOO_LONG:
585 case X509_V_ERR_PATH_LENGTH_EXCEEDED:
586 case X509_V_ERR_INVALID_CA:
587 al=SSL_AD_UNKNOWN_CA;
588 break;
589 case X509_V_ERR_APPLICATION_VERIFICATION:
590 al=SSL_AD_HANDSHAKE_FAILURE;
591 break;
592 case X509_V_ERR_INVALID_PURPOSE:
593 al=SSL_AD_UNSUPPORTED_CERTIFICATE;
594 break;
595 default:
596 al=SSL_AD_CERTIFICATE_UNKNOWN;
597 break;
598 }
599 return(al);
600 }
601
602int ssl3_setup_buffers(SSL *s)
603 {
604 unsigned char *p;
605 unsigned int extra;
606 size_t len;
607
608 if (s->s3->rbuf.buf == NULL)
609 {
610 if (s->options & SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER)
611 extra=SSL3_RT_MAX_EXTRA;
612 else
613 extra=0;
614 len = SSL3_RT_MAX_PACKET_SIZE + extra;
615 if ((p=OPENSSL_malloc(len)) == NULL)
616 goto err;
617 s->s3->rbuf.buf = p;
618 s->s3->rbuf.len = len;
619 }
620
621 if (s->s3->wbuf.buf == NULL)
622 {
623 len = SSL3_RT_MAX_PACKET_SIZE;
624 len += SSL3_RT_HEADER_LENGTH + 256; /* extra space for empty fragment */
625 if ((p=OPENSSL_malloc(len)) == NULL)
626 goto err;
627 s->s3->wbuf.buf = p;
628 s->s3->wbuf.len = len;
629 }
630 s->packet= &(s->s3->rbuf.buf[0]);
631 return(1);
632err:
633 SSLerr(SSL_F_SSL3_SETUP_BUFFERS,ERR_R_MALLOC_FAILURE);
634 return(0);
635 }
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c
new file mode 100644
index 0000000000..d51b60e343
--- /dev/null
+++ b/src/lib/libssl/s3_clnt.c
@@ -0,0 +1,1980 @@
1/* ssl/s3_clnt.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-2002 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 <stdio.h>
113#include "ssl_locl.h"
114#include "kssl_lcl.h"
115#include <openssl/buffer.h>
116#include <openssl/rand.h>
117#include <openssl/objects.h>
118#include <openssl/evp.h>
119#include <openssl/md5.h>
120
121static SSL_METHOD *ssl3_get_client_method(int ver);
122static int ssl3_client_hello(SSL *s);
123static int ssl3_get_server_hello(SSL *s);
124static int ssl3_get_certificate_request(SSL *s);
125static int ca_dn_cmp(const X509_NAME * const *a,const X509_NAME * const *b);
126static int ssl3_get_server_done(SSL *s);
127static int ssl3_send_client_verify(SSL *s);
128static int ssl3_send_client_certificate(SSL *s);
129static int ssl3_send_client_key_exchange(SSL *s);
130static int ssl3_get_key_exchange(SSL *s);
131static int ssl3_get_server_certificate(SSL *s);
132static int ssl3_check_cert_and_algorithm(SSL *s);
133static SSL_METHOD *ssl3_get_client_method(int ver)
134 {
135 if (ver == SSL3_VERSION)
136 return(SSLv3_client_method());
137 else
138 return(NULL);
139 }
140
141SSL_METHOD *SSLv3_client_method(void)
142 {
143 static int init=1;
144 static SSL_METHOD SSLv3_client_data;
145
146 if (init)
147 {
148 CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
149
150 if (init)
151 {
152 memcpy((char *)&SSLv3_client_data,(char *)sslv3_base_method(),
153 sizeof(SSL_METHOD));
154 SSLv3_client_data.ssl_connect=ssl3_connect;
155 SSLv3_client_data.get_ssl_method=ssl3_get_client_method;
156 init=0;
157 }
158
159 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
160 }
161 return(&SSLv3_client_data);
162 }
163
164int ssl3_connect(SSL *s)
165 {
166 BUF_MEM *buf=NULL;
167 unsigned long Time=time(NULL),l;
168 long num1;
169 void (*cb)(const SSL *ssl,int type,int val)=NULL;
170 int ret= -1;
171 int new_state,state,skip=0;
172
173 RAND_add(&Time,sizeof(Time),0);
174 ERR_clear_error();
175 clear_sys_error();
176
177 if (s->info_callback != NULL)
178 cb=s->info_callback;
179 else if (s->ctx->info_callback != NULL)
180 cb=s->ctx->info_callback;
181
182 s->in_handshake++;
183 if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
184
185 for (;;)
186 {
187 state=s->state;
188
189 switch(s->state)
190 {
191 case SSL_ST_RENEGOTIATE:
192 s->new_session=1;
193 s->state=SSL_ST_CONNECT;
194 s->ctx->stats.sess_connect_renegotiate++;
195 /* break */
196 case SSL_ST_BEFORE:
197 case SSL_ST_CONNECT:
198 case SSL_ST_BEFORE|SSL_ST_CONNECT:
199 case SSL_ST_OK|SSL_ST_CONNECT:
200
201 s->server=0;
202 if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1);
203
204 if ((s->version & 0xff00 ) != 0x0300)
205 {
206 SSLerr(SSL_F_SSL3_CONNECT, ERR_R_INTERNAL_ERROR);
207 ret = -1;
208 goto end;
209 }
210
211 /* s->version=SSL3_VERSION; */
212 s->type=SSL_ST_CONNECT;
213
214 if (s->init_buf == NULL)
215 {
216 if ((buf=BUF_MEM_new()) == NULL)
217 {
218 ret= -1;
219 goto end;
220 }
221 if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
222 {
223 ret= -1;
224 goto end;
225 }
226 s->init_buf=buf;
227 buf=NULL;
228 }
229
230 if (!ssl3_setup_buffers(s)) { ret= -1; goto end; }
231
232 /* setup buffing BIO */
233 if (!ssl_init_wbio_buffer(s,0)) { ret= -1; goto end; }
234
235 /* don't push the buffering BIO quite yet */
236
237 ssl3_init_finished_mac(s);
238
239 s->state=SSL3_ST_CW_CLNT_HELLO_A;
240 s->ctx->stats.sess_connect++;
241 s->init_num=0;
242 break;
243
244 case SSL3_ST_CW_CLNT_HELLO_A:
245 case SSL3_ST_CW_CLNT_HELLO_B:
246
247 s->shutdown=0;
248 ret=ssl3_client_hello(s);
249 if (ret <= 0) goto end;
250 s->state=SSL3_ST_CR_SRVR_HELLO_A;
251 s->init_num=0;
252
253 /* turn on buffering for the next lot of output */
254 if (s->bbio != s->wbio)
255 s->wbio=BIO_push(s->bbio,s->wbio);
256
257 break;
258
259 case SSL3_ST_CR_SRVR_HELLO_A:
260 case SSL3_ST_CR_SRVR_HELLO_B:
261 ret=ssl3_get_server_hello(s);
262 if (ret <= 0) goto end;
263 if (s->hit)
264 s->state=SSL3_ST_CR_FINISHED_A;
265 else
266 s->state=SSL3_ST_CR_CERT_A;
267 s->init_num=0;
268 break;
269
270 case SSL3_ST_CR_CERT_A:
271 case SSL3_ST_CR_CERT_B:
272 /* Check if it is anon DH */
273 if (!(s->s3->tmp.new_cipher->algorithms & SSL_aNULL))
274 {
275 ret=ssl3_get_server_certificate(s);
276 if (ret <= 0) goto end;
277 }
278 else
279 skip=1;
280 s->state=SSL3_ST_CR_KEY_EXCH_A;
281 s->init_num=0;
282 break;
283
284 case SSL3_ST_CR_KEY_EXCH_A:
285 case SSL3_ST_CR_KEY_EXCH_B:
286 ret=ssl3_get_key_exchange(s);
287 if (ret <= 0) goto end;
288 s->state=SSL3_ST_CR_CERT_REQ_A;
289 s->init_num=0;
290
291 /* at this point we check that we have the
292 * required stuff from the server */
293 if (!ssl3_check_cert_and_algorithm(s))
294 {
295 ret= -1;
296 goto end;
297 }
298 break;
299
300 case SSL3_ST_CR_CERT_REQ_A:
301 case SSL3_ST_CR_CERT_REQ_B:
302 ret=ssl3_get_certificate_request(s);
303 if (ret <= 0) goto end;
304 s->state=SSL3_ST_CR_SRVR_DONE_A;
305 s->init_num=0;
306 break;
307
308 case SSL3_ST_CR_SRVR_DONE_A:
309 case SSL3_ST_CR_SRVR_DONE_B:
310 ret=ssl3_get_server_done(s);
311 if (ret <= 0) goto end;
312 if (s->s3->tmp.cert_req)
313 s->state=SSL3_ST_CW_CERT_A;
314 else
315 s->state=SSL3_ST_CW_KEY_EXCH_A;
316 s->init_num=0;
317
318 break;
319
320 case SSL3_ST_CW_CERT_A:
321 case SSL3_ST_CW_CERT_B:
322 case SSL3_ST_CW_CERT_C:
323 case SSL3_ST_CW_CERT_D:
324 ret=ssl3_send_client_certificate(s);
325 if (ret <= 0) goto end;
326 s->state=SSL3_ST_CW_KEY_EXCH_A;
327 s->init_num=0;
328 break;
329
330 case SSL3_ST_CW_KEY_EXCH_A:
331 case SSL3_ST_CW_KEY_EXCH_B:
332 ret=ssl3_send_client_key_exchange(s);
333 if (ret <= 0) goto end;
334 l=s->s3->tmp.new_cipher->algorithms;
335 /* EAY EAY EAY need to check for DH fix cert
336 * sent back */
337 /* For TLS, cert_req is set to 2, so a cert chain
338 * of nothing is sent, but no verify packet is sent */
339 if (s->s3->tmp.cert_req == 1)
340 {
341 s->state=SSL3_ST_CW_CERT_VRFY_A;
342 }
343 else
344 {
345 s->state=SSL3_ST_CW_CHANGE_A;
346 s->s3->change_cipher_spec=0;
347 }
348
349 s->init_num=0;
350 break;
351
352 case SSL3_ST_CW_CERT_VRFY_A:
353 case SSL3_ST_CW_CERT_VRFY_B:
354 ret=ssl3_send_client_verify(s);
355 if (ret <= 0) goto end;
356 s->state=SSL3_ST_CW_CHANGE_A;
357 s->init_num=0;
358 s->s3->change_cipher_spec=0;
359 break;
360
361 case SSL3_ST_CW_CHANGE_A:
362 case SSL3_ST_CW_CHANGE_B:
363 ret=ssl3_send_change_cipher_spec(s,
364 SSL3_ST_CW_CHANGE_A,SSL3_ST_CW_CHANGE_B);
365 if (ret <= 0) goto end;
366 s->state=SSL3_ST_CW_FINISHED_A;
367 s->init_num=0;
368
369 s->session->cipher=s->s3->tmp.new_cipher;
370 if (s->s3->tmp.new_compression == NULL)
371 s->session->compress_meth=0;
372 else
373 s->session->compress_meth=
374 s->s3->tmp.new_compression->id;
375 if (!s->method->ssl3_enc->setup_key_block(s))
376 {
377 ret= -1;
378 goto end;
379 }
380
381 if (!s->method->ssl3_enc->change_cipher_state(s,
382 SSL3_CHANGE_CIPHER_CLIENT_WRITE))
383 {
384 ret= -1;
385 goto end;
386 }
387
388 break;
389
390 case SSL3_ST_CW_FINISHED_A:
391 case SSL3_ST_CW_FINISHED_B:
392 ret=ssl3_send_finished(s,
393 SSL3_ST_CW_FINISHED_A,SSL3_ST_CW_FINISHED_B,
394 s->method->ssl3_enc->client_finished_label,
395 s->method->ssl3_enc->client_finished_label_len);
396 if (ret <= 0) goto end;
397 s->state=SSL3_ST_CW_FLUSH;
398
399 /* clear flags */
400 s->s3->flags&= ~SSL3_FLAGS_POP_BUFFER;
401 if (s->hit)
402 {
403 s->s3->tmp.next_state=SSL_ST_OK;
404 if (s->s3->flags & SSL3_FLAGS_DELAY_CLIENT_FINISHED)
405 {
406 s->state=SSL_ST_OK;
407 s->s3->flags|=SSL3_FLAGS_POP_BUFFER;
408 s->s3->delay_buf_pop_ret=0;
409 }
410 }
411 else
412 {
413 s->s3->tmp.next_state=SSL3_ST_CR_FINISHED_A;
414 }
415 s->init_num=0;
416 break;
417
418 case SSL3_ST_CR_FINISHED_A:
419 case SSL3_ST_CR_FINISHED_B:
420
421 ret=ssl3_get_finished(s,SSL3_ST_CR_FINISHED_A,
422 SSL3_ST_CR_FINISHED_B);
423 if (ret <= 0) goto end;
424
425 if (s->hit)
426 s->state=SSL3_ST_CW_CHANGE_A;
427 else
428 s->state=SSL_ST_OK;
429 s->init_num=0;
430 break;
431
432 case SSL3_ST_CW_FLUSH:
433 /* number of bytes to be flushed */
434 num1=BIO_ctrl(s->wbio,BIO_CTRL_INFO,0,NULL);
435 if (num1 > 0)
436 {
437 s->rwstate=SSL_WRITING;
438 num1=BIO_flush(s->wbio);
439 if (num1 <= 0) { ret= -1; goto end; }
440 s->rwstate=SSL_NOTHING;
441 }
442
443 s->state=s->s3->tmp.next_state;
444 break;
445
446 case SSL_ST_OK:
447 /* clean a few things up */
448 ssl3_cleanup_key_block(s);
449
450 if (s->init_buf != NULL)
451 {
452 BUF_MEM_free(s->init_buf);
453 s->init_buf=NULL;
454 }
455
456 /* If we are not 'joining' the last two packets,
457 * remove the buffering now */
458 if (!(s->s3->flags & SSL3_FLAGS_POP_BUFFER))
459 ssl_free_wbio_buffer(s);
460 /* else do it later in ssl3_write */
461
462 s->init_num=0;
463 s->new_session=0;
464
465 ssl_update_cache(s,SSL_SESS_CACHE_CLIENT);
466 if (s->hit) s->ctx->stats.sess_hit++;
467
468 ret=1;
469 /* s->server=0; */
470 s->handshake_func=ssl3_connect;
471 s->ctx->stats.sess_connect_good++;
472
473 if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_DONE,1);
474
475 goto end;
476 /* break; */
477
478 default:
479 SSLerr(SSL_F_SSL3_CONNECT,SSL_R_UNKNOWN_STATE);
480 ret= -1;
481 goto end;
482 /* break; */
483 }
484
485 /* did we do anything */
486 if (!s->s3->tmp.reuse_message && !skip)
487 {
488 if (s->debug)
489 {
490 if ((ret=BIO_flush(s->wbio)) <= 0)
491 goto end;
492 }
493
494 if ((cb != NULL) && (s->state != state))
495 {
496 new_state=s->state;
497 s->state=state;
498 cb(s,SSL_CB_CONNECT_LOOP,1);
499 s->state=new_state;
500 }
501 }
502 skip=0;
503 }
504end:
505 s->in_handshake--;
506 if (buf != NULL)
507 BUF_MEM_free(buf);
508 if (cb != NULL)
509 cb(s,SSL_CB_CONNECT_EXIT,ret);
510 return(ret);
511 }
512
513
514static int ssl3_client_hello(SSL *s)
515 {
516 unsigned char *buf;
517 unsigned char *p,*d;
518 int i,j;
519 unsigned long Time,l;
520 SSL_COMP *comp;
521
522 buf=(unsigned char *)s->init_buf->data;
523 if (s->state == SSL3_ST_CW_CLNT_HELLO_A)
524 {
525 if ((s->session == NULL) ||
526 (s->session->ssl_version != s->version) ||
527 (s->session->not_resumable))
528 {
529 if (!ssl_get_new_session(s,0))
530 goto err;
531 }
532 /* else use the pre-loaded session */
533
534 p=s->s3->client_random;
535 Time=time(NULL); /* Time */
536 l2n(Time,p);
537 RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
538
539 /* Do the message type and length last */
540 d=p= &(buf[4]);
541
542 *(p++)=s->version>>8;
543 *(p++)=s->version&0xff;
544 s->client_version=s->version;
545
546 /* Random stuff */
547 memcpy(p,s->s3->client_random,SSL3_RANDOM_SIZE);
548 p+=SSL3_RANDOM_SIZE;
549
550 /* Session ID */
551 if (s->new_session)
552 i=0;
553 else
554 i=s->session->session_id_length;
555 *(p++)=i;
556 if (i != 0)
557 {
558 if (i > sizeof s->session->session_id)
559 {
560 SSLerr(SSL_F_SSL3_CLIENT_HELLO, ERR_R_INTERNAL_ERROR);
561 goto err;
562 }
563 memcpy(p,s->session->session_id,i);
564 p+=i;
565 }
566
567 /* Ciphers supported */
568 i=ssl_cipher_list_to_bytes(s,SSL_get_ciphers(s),&(p[2]));
569 if (i == 0)
570 {
571 SSLerr(SSL_F_SSL3_CLIENT_HELLO,SSL_R_NO_CIPHERS_AVAILABLE);
572 goto err;
573 }
574 s2n(i,p);
575 p+=i;
576
577 /* COMPRESSION */
578 if (s->ctx->comp_methods == NULL)
579 j=0;
580 else
581 j=sk_SSL_COMP_num(s->ctx->comp_methods);
582 *(p++)=1+j;
583 for (i=0; i<j; i++)
584 {
585 comp=sk_SSL_COMP_value(s->ctx->comp_methods,i);
586 *(p++)=comp->id;
587 }
588 *(p++)=0; /* Add the NULL method */
589
590 l=(p-d);
591 d=buf;
592 *(d++)=SSL3_MT_CLIENT_HELLO;
593 l2n3(l,d);
594
595 s->state=SSL3_ST_CW_CLNT_HELLO_B;
596 /* number of bytes to write */
597 s->init_num=p-buf;
598 s->init_off=0;
599 }
600
601 /* SSL3_ST_CW_CLNT_HELLO_B */
602 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
603err:
604 return(-1);
605 }
606
607static int ssl3_get_server_hello(SSL *s)
608 {
609 STACK_OF(SSL_CIPHER) *sk;
610 SSL_CIPHER *c;
611 unsigned char *p,*d;
612 int i,al,ok;
613 unsigned int j;
614 long n;
615 SSL_COMP *comp;
616
617 n=ssl3_get_message(s,
618 SSL3_ST_CR_SRVR_HELLO_A,
619 SSL3_ST_CR_SRVR_HELLO_B,
620 SSL3_MT_SERVER_HELLO,
621 300, /* ?? */
622 &ok);
623
624 if (!ok) return((int)n);
625 d=p=(unsigned char *)s->init_msg;
626
627 if ((p[0] != (s->version>>8)) || (p[1] != (s->version&0xff)))
628 {
629 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_WRONG_SSL_VERSION);
630 s->version=(s->version&0xff00)|p[1];
631 al=SSL_AD_PROTOCOL_VERSION;
632 goto f_err;
633 }
634 p+=2;
635
636 /* load the server hello data */
637 /* load the server random */
638 memcpy(s->s3->server_random,p,SSL3_RANDOM_SIZE);
639 p+=SSL3_RANDOM_SIZE;
640
641 /* get the session-id */
642 j= *(p++);
643
644 if ((j > sizeof s->session->session_id) || (j > SSL3_SESSION_ID_SIZE))
645 {
646 al=SSL_AD_ILLEGAL_PARAMETER;
647 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_SSL3_SESSION_ID_TOO_LONG);
648 goto f_err;
649 }
650
651 if (j != 0 && j == s->session->session_id_length
652 && memcmp(p,s->session->session_id,j) == 0)
653 {
654 if(s->sid_ctx_length != s->session->sid_ctx_length
655 || memcmp(s->session->sid_ctx,s->sid_ctx,s->sid_ctx_length))
656 {
657 /* actually a client application bug */
658 al=SSL_AD_ILLEGAL_PARAMETER;
659 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
660 goto f_err;
661 }
662 s->hit=1;
663 }
664 else /* a miss or crap from the other end */
665 {
666 /* If we were trying for session-id reuse, make a new
667 * SSL_SESSION so we don't stuff up other people */
668 s->hit=0;
669 if (s->session->session_id_length > 0)
670 {
671 if (!ssl_get_new_session(s,0))
672 {
673 al=SSL_AD_INTERNAL_ERROR;
674 goto f_err;
675 }
676 }
677 s->session->session_id_length=j;
678 memcpy(s->session->session_id,p,j); /* j could be 0 */
679 }
680 p+=j;
681 c=ssl_get_cipher_by_char(s,p);
682 if (c == NULL)
683 {
684 /* unknown cipher */
685 al=SSL_AD_ILLEGAL_PARAMETER;
686 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_UNKNOWN_CIPHER_RETURNED);
687 goto f_err;
688 }
689 p+=ssl_put_cipher_by_char(s,NULL,NULL);
690
691 sk=ssl_get_ciphers_by_id(s);
692 i=sk_SSL_CIPHER_find(sk,c);
693 if (i < 0)
694 {
695 /* we did not say we would use this cipher */
696 al=SSL_AD_ILLEGAL_PARAMETER;
697 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_WRONG_CIPHER_RETURNED);
698 goto f_err;
699 }
700
701 /* Depending on the session caching (internal/external), the cipher
702 and/or cipher_id values may not be set. Make sure that
703 cipher_id is set and use it for comparison. */
704 if (s->session->cipher)
705 s->session->cipher_id = s->session->cipher->id;
706 if (s->hit && (s->session->cipher_id != c->id))
707 {
708 if (!(s->options &
709 SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG))
710 {
711 al=SSL_AD_ILLEGAL_PARAMETER;
712 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED);
713 goto f_err;
714 }
715 }
716 s->s3->tmp.new_cipher=c;
717
718 /* lets get the compression algorithm */
719 /* COMPRESSION */
720 j= *(p++);
721 if (j == 0)
722 comp=NULL;
723 else
724 comp=ssl3_comp_find(s->ctx->comp_methods,j);
725
726 if ((j != 0) && (comp == NULL))
727 {
728 al=SSL_AD_ILLEGAL_PARAMETER;
729 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
730 goto f_err;
731 }
732 else
733 {
734 s->s3->tmp.new_compression=comp;
735 }
736
737 if (p != (d+n))
738 {
739 /* wrong packet length */
740 al=SSL_AD_DECODE_ERROR;
741 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_BAD_PACKET_LENGTH);
742 goto err;
743 }
744
745 return(1);
746f_err:
747 ssl3_send_alert(s,SSL3_AL_FATAL,al);
748err:
749 return(-1);
750 }
751
752static int ssl3_get_server_certificate(SSL *s)
753 {
754 int al,i,ok,ret= -1;
755 unsigned long n,nc,llen,l;
756 X509 *x=NULL;
757 unsigned char *p,*d,*q;
758 STACK_OF(X509) *sk=NULL;
759 SESS_CERT *sc;
760 EVP_PKEY *pkey=NULL;
761 int need_cert = 1; /* VRS: 0=> will allow null cert if auth == KRB5 */
762
763 n=ssl3_get_message(s,
764 SSL3_ST_CR_CERT_A,
765 SSL3_ST_CR_CERT_B,
766 -1,
767 s->max_cert_list,
768 &ok);
769
770 if (!ok) return((int)n);
771
772 if (s->s3->tmp.message_type == SSL3_MT_SERVER_KEY_EXCHANGE)
773 {
774 s->s3->tmp.reuse_message=1;
775 return(1);
776 }
777
778 if (s->s3->tmp.message_type != SSL3_MT_CERTIFICATE)
779 {
780 al=SSL_AD_UNEXPECTED_MESSAGE;
781 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_BAD_MESSAGE_TYPE);
782 goto f_err;
783 }
784 d=p=(unsigned char *)s->init_msg;
785
786 if ((sk=sk_X509_new_null()) == NULL)
787 {
788 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,ERR_R_MALLOC_FAILURE);
789 goto err;
790 }
791
792 n2l3(p,llen);
793 if (llen+3 != n)
794 {
795 al=SSL_AD_DECODE_ERROR;
796 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_LENGTH_MISMATCH);
797 goto f_err;
798 }
799 for (nc=0; nc<llen; )
800 {
801 n2l3(p,l);
802 if ((l+nc+3) > llen)
803 {
804 al=SSL_AD_DECODE_ERROR;
805 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_CERT_LENGTH_MISMATCH);
806 goto f_err;
807 }
808
809 q=p;
810 x=d2i_X509(NULL,&q,l);
811 if (x == NULL)
812 {
813 al=SSL_AD_BAD_CERTIFICATE;
814 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,ERR_R_ASN1_LIB);
815 goto f_err;
816 }
817 if (q != (p+l))
818 {
819 al=SSL_AD_DECODE_ERROR;
820 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_CERT_LENGTH_MISMATCH);
821 goto f_err;
822 }
823 if (!sk_X509_push(sk,x))
824 {
825 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,ERR_R_MALLOC_FAILURE);
826 goto err;
827 }
828 x=NULL;
829 nc+=l+3;
830 p=q;
831 }
832
833 i=ssl_verify_cert_chain(s,sk);
834 if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)
835#ifndef OPENSSL_NO_KRB5
836 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK))
837 != (SSL_aKRB5|SSL_kKRB5)
838#endif /* OPENSSL_NO_KRB5 */
839 )
840 {
841 al=ssl_verify_alarm_type(s->verify_result);
842 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED);
843 goto f_err;
844 }
845 ERR_clear_error(); /* but we keep s->verify_result */
846
847 sc=ssl_sess_cert_new();
848 if (sc == NULL) goto err;
849
850 if (s->session->sess_cert) ssl_sess_cert_free(s->session->sess_cert);
851 s->session->sess_cert=sc;
852
853 sc->cert_chain=sk;
854 /* Inconsistency alert: cert_chain does include the peer's
855 * certificate, which we don't include in s3_srvr.c */
856 x=sk_X509_value(sk,0);
857 sk=NULL;
858 /* VRS 19990621: possible memory leak; sk=null ==> !sk_pop_free() @end*/
859
860 pkey=X509_get_pubkey(x);
861
862 /* VRS: allow null cert if auth == KRB5 */
863 need_cert = ((s->s3->tmp.new_cipher->algorithms
864 & (SSL_MKEY_MASK|SSL_AUTH_MASK))
865 == (SSL_aKRB5|SSL_kKRB5))? 0: 1;
866
867#ifdef KSSL_DEBUG
868 printf("pkey,x = %p, %p\n", pkey,x);
869 printf("ssl_cert_type(x,pkey) = %d\n", ssl_cert_type(x,pkey));
870 printf("cipher, alg, nc = %s, %lx, %d\n", s->s3->tmp.new_cipher->name,
871 s->s3->tmp.new_cipher->algorithms, need_cert);
872#endif /* KSSL_DEBUG */
873
874 if (need_cert && ((pkey == NULL) || EVP_PKEY_missing_parameters(pkey)))
875 {
876 x=NULL;
877 al=SSL3_AL_FATAL;
878 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,
879 SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS);
880 goto f_err;
881 }
882
883 i=ssl_cert_type(x,pkey);
884 if (need_cert && i < 0)
885 {
886 x=NULL;
887 al=SSL3_AL_FATAL;
888 SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,
889 SSL_R_UNKNOWN_CERTIFICATE_TYPE);
890 goto f_err;
891 }
892
893 if (need_cert)
894 {
895 sc->peer_cert_type=i;
896 CRYPTO_add(&x->references,1,CRYPTO_LOCK_X509);
897 /* Why would the following ever happen?
898 * We just created sc a couple of lines ago. */
899 if (sc->peer_pkeys[i].x509 != NULL)
900 X509_free(sc->peer_pkeys[i].x509);
901 sc->peer_pkeys[i].x509=x;
902 sc->peer_key= &(sc->peer_pkeys[i]);
903
904 if (s->session->peer != NULL)
905 X509_free(s->session->peer);
906 CRYPTO_add(&x->references,1,CRYPTO_LOCK_X509);
907 s->session->peer=x;
908 }
909 else
910 {
911 sc->peer_cert_type=i;
912 sc->peer_key= NULL;
913
914 if (s->session->peer != NULL)
915 X509_free(s->session->peer);
916 s->session->peer=NULL;
917 }
918 s->session->verify_result = s->verify_result;
919
920 x=NULL;
921 ret=1;
922
923 if (0)
924 {
925f_err:
926 ssl3_send_alert(s,SSL3_AL_FATAL,al);
927 }
928err:
929 EVP_PKEY_free(pkey);
930 X509_free(x);
931 sk_X509_pop_free(sk,X509_free);
932 return(ret);
933 }
934
935static int ssl3_get_key_exchange(SSL *s)
936 {
937#ifndef OPENSSL_NO_RSA
938 unsigned char *q,md_buf[EVP_MAX_MD_SIZE*2];
939#endif
940 EVP_MD_CTX md_ctx;
941 unsigned char *param,*p;
942 int al,i,j,param_len,ok;
943 long n,alg;
944 EVP_PKEY *pkey=NULL;
945#ifndef OPENSSL_NO_RSA
946 RSA *rsa=NULL;
947#endif
948#ifndef OPENSSL_NO_DH
949 DH *dh=NULL;
950#endif
951
952 /* use same message size as in ssl3_get_certificate_request()
953 * as ServerKeyExchange message may be skipped */
954 n=ssl3_get_message(s,
955 SSL3_ST_CR_KEY_EXCH_A,
956 SSL3_ST_CR_KEY_EXCH_B,
957 -1,
958 s->max_cert_list,
959 &ok);
960
961 if (!ok) return((int)n);
962
963 if (s->s3->tmp.message_type != SSL3_MT_SERVER_KEY_EXCHANGE)
964 {
965 s->s3->tmp.reuse_message=1;
966 return(1);
967 }
968
969 param=p=(unsigned char *)s->init_msg;
970
971 if (s->session->sess_cert != NULL)
972 {
973#ifndef OPENSSL_NO_RSA
974 if (s->session->sess_cert->peer_rsa_tmp != NULL)
975 {
976 RSA_free(s->session->sess_cert->peer_rsa_tmp);
977 s->session->sess_cert->peer_rsa_tmp=NULL;
978 }
979#endif
980#ifndef OPENSSL_NO_DH
981 if (s->session->sess_cert->peer_dh_tmp)
982 {
983 DH_free(s->session->sess_cert->peer_dh_tmp);
984 s->session->sess_cert->peer_dh_tmp=NULL;
985 }
986#endif
987 }
988 else
989 {
990 s->session->sess_cert=ssl_sess_cert_new();
991 }
992
993 param_len=0;
994 alg=s->s3->tmp.new_cipher->algorithms;
995 EVP_MD_CTX_init(&md_ctx);
996
997#ifndef OPENSSL_NO_RSA
998 if (alg & SSL_kRSA)
999 {
1000 if ((rsa=RSA_new()) == NULL)
1001 {
1002 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
1003 goto err;
1004 }
1005 n2s(p,i);
1006 param_len=i+2;
1007 if (param_len > n)
1008 {
1009 al=SSL_AD_DECODE_ERROR;
1010 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_RSA_MODULUS_LENGTH);
1011 goto f_err;
1012 }
1013 if (!(rsa->n=BN_bin2bn(p,i,rsa->n)))
1014 {
1015 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_BN_LIB);
1016 goto err;
1017 }
1018 p+=i;
1019
1020 n2s(p,i);
1021 param_len+=i+2;
1022 if (param_len > n)
1023 {
1024 al=SSL_AD_DECODE_ERROR;
1025 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_RSA_E_LENGTH);
1026 goto f_err;
1027 }
1028 if (!(rsa->e=BN_bin2bn(p,i,rsa->e)))
1029 {
1030 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_BN_LIB);
1031 goto err;
1032 }
1033 p+=i;
1034 n-=param_len;
1035
1036 /* this should be because we are using an export cipher */
1037 if (alg & SSL_aRSA)
1038 pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509);
1039 else
1040 {
1041 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR);
1042 goto err;
1043 }
1044 s->session->sess_cert->peer_rsa_tmp=rsa;
1045 rsa=NULL;
1046 }
1047#else /* OPENSSL_NO_RSA */
1048 if (0)
1049 ;
1050#endif
1051#ifndef OPENSSL_NO_DH
1052 else if (alg & SSL_kEDH)
1053 {
1054 if ((dh=DH_new()) == NULL)
1055 {
1056 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_DH_LIB);
1057 goto err;
1058 }
1059 n2s(p,i);
1060 param_len=i+2;
1061 if (param_len > n)
1062 {
1063 al=SSL_AD_DECODE_ERROR;
1064 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_DH_P_LENGTH);
1065 goto f_err;
1066 }
1067 if (!(dh->p=BN_bin2bn(p,i,NULL)))
1068 {
1069 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_BN_LIB);
1070 goto err;
1071 }
1072 p+=i;
1073
1074 n2s(p,i);
1075 param_len+=i+2;
1076 if (param_len > n)
1077 {
1078 al=SSL_AD_DECODE_ERROR;
1079 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_DH_G_LENGTH);
1080 goto f_err;
1081 }
1082 if (!(dh->g=BN_bin2bn(p,i,NULL)))
1083 {
1084 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_BN_LIB);
1085 goto err;
1086 }
1087 p+=i;
1088
1089 n2s(p,i);
1090 param_len+=i+2;
1091 if (param_len > n)
1092 {
1093 al=SSL_AD_DECODE_ERROR;
1094 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_DH_PUB_KEY_LENGTH);
1095 goto f_err;
1096 }
1097 if (!(dh->pub_key=BN_bin2bn(p,i,NULL)))
1098 {
1099 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_BN_LIB);
1100 goto err;
1101 }
1102 p+=i;
1103 n-=param_len;
1104
1105#ifndef OPENSSL_NO_RSA
1106 if (alg & SSL_aRSA)
1107 pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509);
1108#else
1109 if (0)
1110 ;
1111#endif
1112#ifndef OPENSSL_NO_DSA
1113 else if (alg & SSL_aDSS)
1114 pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_DSA_SIGN].x509);
1115#endif
1116 /* else anonymous DH, so no certificate or pkey. */
1117
1118 s->session->sess_cert->peer_dh_tmp=dh;
1119 dh=NULL;
1120 }
1121 else if ((alg & SSL_kDHr) || (alg & SSL_kDHd))
1122 {
1123 al=SSL_AD_ILLEGAL_PARAMETER;
1124 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER);
1125 goto f_err;
1126 }
1127#endif /* !OPENSSL_NO_DH */
1128 if (alg & SSL_aFZA)
1129 {
1130 al=SSL_AD_HANDSHAKE_FAILURE;
1131 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER);
1132 goto f_err;
1133 }
1134
1135
1136 /* p points to the next byte, there are 'n' bytes left */
1137
1138
1139 /* if it was signed, check the signature */
1140 if (pkey != NULL)
1141 {
1142 n2s(p,i);
1143 n-=2;
1144 j=EVP_PKEY_size(pkey);
1145
1146 if ((i != n) || (n > j) || (n <= 0))
1147 {
1148 /* wrong packet length */
1149 al=SSL_AD_DECODE_ERROR;
1150 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_WRONG_SIGNATURE_LENGTH);
1151 goto f_err;
1152 }
1153
1154#ifndef OPENSSL_NO_RSA
1155 if (pkey->type == EVP_PKEY_RSA)
1156 {
1157 int num;
1158
1159 j=0;
1160 q=md_buf;
1161 for (num=2; num > 0; num--)
1162 {
1163 EVP_DigestInit_ex(&md_ctx,(num == 2)
1164 ?s->ctx->md5:s->ctx->sha1, NULL);
1165 EVP_DigestUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
1166 EVP_DigestUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
1167 EVP_DigestUpdate(&md_ctx,param,param_len);
1168 EVP_DigestFinal_ex(&md_ctx,q,(unsigned int *)&i);
1169 q+=i;
1170 j+=i;
1171 }
1172 i=RSA_verify(NID_md5_sha1, md_buf, j, p, n,
1173 pkey->pkey.rsa);
1174 if (i < 0)
1175 {
1176 al=SSL_AD_DECRYPT_ERROR;
1177 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT);
1178 goto f_err;
1179 }
1180 if (i == 0)
1181 {
1182 /* bad signature */
1183 al=SSL_AD_DECRYPT_ERROR;
1184 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_SIGNATURE);
1185 goto f_err;
1186 }
1187 }
1188 else
1189#endif
1190#ifndef OPENSSL_NO_DSA
1191 if (pkey->type == EVP_PKEY_DSA)
1192 {
1193 /* lets do DSS */
1194 EVP_VerifyInit_ex(&md_ctx,EVP_dss1(), NULL);
1195 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
1196 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
1197 EVP_VerifyUpdate(&md_ctx,param,param_len);
1198 if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey))
1199 {
1200 /* bad signature */
1201 al=SSL_AD_DECRYPT_ERROR;
1202 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_SIGNATURE);
1203 goto f_err;
1204 }
1205 }
1206 else
1207#endif
1208 {
1209 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR);
1210 goto err;
1211 }
1212 }
1213 else
1214 {
1215 /* still data left over */
1216 if (!(alg & SSL_aNULL))
1217 {
1218 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR);
1219 goto err;
1220 }
1221 if (n != 0)
1222 {
1223 al=SSL_AD_DECODE_ERROR;
1224 SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_EXTRA_DATA_IN_MESSAGE);
1225 goto f_err;
1226 }
1227 }
1228 EVP_PKEY_free(pkey);
1229 EVP_MD_CTX_cleanup(&md_ctx);
1230 return(1);
1231f_err:
1232 ssl3_send_alert(s,SSL3_AL_FATAL,al);
1233err:
1234 EVP_PKEY_free(pkey);
1235#ifndef OPENSSL_NO_RSA
1236 if (rsa != NULL)
1237 RSA_free(rsa);
1238#endif
1239#ifndef OPENSSL_NO_DH
1240 if (dh != NULL)
1241 DH_free(dh);
1242#endif
1243 EVP_MD_CTX_cleanup(&md_ctx);
1244 return(-1);
1245 }
1246
1247static int ssl3_get_certificate_request(SSL *s)
1248 {
1249 int ok,ret=0;
1250 unsigned long n,nc,l;
1251 unsigned int llen,ctype_num,i;
1252 X509_NAME *xn=NULL;
1253 unsigned char *p,*d,*q;
1254 STACK_OF(X509_NAME) *ca_sk=NULL;
1255
1256 n=ssl3_get_message(s,
1257 SSL3_ST_CR_CERT_REQ_A,
1258 SSL3_ST_CR_CERT_REQ_B,
1259 -1,
1260 s->max_cert_list,
1261 &ok);
1262
1263 if (!ok) return((int)n);
1264
1265 s->s3->tmp.cert_req=0;
1266
1267 if (s->s3->tmp.message_type == SSL3_MT_SERVER_DONE)
1268 {
1269 s->s3->tmp.reuse_message=1;
1270 return(1);
1271 }
1272
1273 if (s->s3->tmp.message_type != SSL3_MT_CERTIFICATE_REQUEST)
1274 {
1275 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE);
1276 SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST,SSL_R_WRONG_MESSAGE_TYPE);
1277 goto err;
1278 }
1279
1280 /* TLS does not like anon-DH with client cert */
1281 if (s->version > SSL3_VERSION)
1282 {
1283 l=s->s3->tmp.new_cipher->algorithms;
1284 if (l & SSL_aNULL)
1285 {
1286 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE);
1287 SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST,SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER);
1288 goto err;
1289 }
1290 }
1291
1292 d=p=(unsigned char *)s->init_msg;
1293
1294 if ((ca_sk=sk_X509_NAME_new(ca_dn_cmp)) == NULL)
1295 {
1296 SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST,ERR_R_MALLOC_FAILURE);
1297 goto err;
1298 }
1299
1300 /* get the certificate types */
1301 ctype_num= *(p++);
1302 if (ctype_num > SSL3_CT_NUMBER)
1303 ctype_num=SSL3_CT_NUMBER;
1304 for (i=0; i<ctype_num; i++)
1305 s->s3->tmp.ctype[i]= p[i];
1306 p+=ctype_num;
1307
1308 /* get the CA RDNs */
1309 n2s(p,llen);
1310#if 0
1311{
1312FILE *out;
1313out=fopen("/tmp/vsign.der","w");
1314fwrite(p,1,llen,out);
1315fclose(out);
1316}
1317#endif
1318
1319 if ((llen+ctype_num+2+1) != n)
1320 {
1321 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECODE_ERROR);
1322 SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST,SSL_R_LENGTH_MISMATCH);
1323 goto err;
1324 }
1325
1326 for (nc=0; nc<llen; )
1327 {
1328 n2s(p,l);
1329 if ((l+nc+2) > llen)
1330 {
1331 if ((s->options & SSL_OP_NETSCAPE_CA_DN_BUG))
1332 goto cont; /* netscape bugs */
1333 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECODE_ERROR);
1334 SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST,SSL_R_CA_DN_TOO_LONG);
1335 goto err;
1336 }
1337
1338 q=p;
1339
1340 if ((xn=d2i_X509_NAME(NULL,&q,l)) == NULL)
1341 {
1342 /* If netscape tolerance is on, ignore errors */
1343 if (s->options & SSL_OP_NETSCAPE_CA_DN_BUG)
1344 goto cont;
1345 else
1346 {
1347 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECODE_ERROR);
1348 SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST,ERR_R_ASN1_LIB);
1349 goto err;
1350 }
1351 }
1352
1353 if (q != (p+l))
1354 {
1355 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECODE_ERROR);
1356 SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST,SSL_R_CA_DN_LENGTH_MISMATCH);
1357 goto err;
1358 }
1359 if (!sk_X509_NAME_push(ca_sk,xn))
1360 {
1361 SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST,ERR_R_MALLOC_FAILURE);
1362 goto err;
1363 }
1364
1365 p+=l;
1366 nc+=l+2;
1367 }
1368
1369 if (0)
1370 {
1371cont:
1372 ERR_clear_error();
1373 }
1374
1375 /* we should setup a certificate to return.... */
1376 s->s3->tmp.cert_req=1;
1377 s->s3->tmp.ctype_num=ctype_num;
1378 if (s->s3->tmp.ca_names != NULL)
1379 sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free);
1380 s->s3->tmp.ca_names=ca_sk;
1381 ca_sk=NULL;
1382
1383 ret=1;
1384err:
1385 if (ca_sk != NULL) sk_X509_NAME_pop_free(ca_sk,X509_NAME_free);
1386 return(ret);
1387 }
1388
1389static int ca_dn_cmp(const X509_NAME * const *a, const X509_NAME * const *b)
1390 {
1391 return(X509_NAME_cmp(*a,*b));
1392 }
1393
1394static int ssl3_get_server_done(SSL *s)
1395 {
1396 int ok,ret=0;
1397 long n;
1398
1399 n=ssl3_get_message(s,
1400 SSL3_ST_CR_SRVR_DONE_A,
1401 SSL3_ST_CR_SRVR_DONE_B,
1402 SSL3_MT_SERVER_DONE,
1403 30, /* should be very small, like 0 :-) */
1404 &ok);
1405
1406 if (!ok) return((int)n);
1407 if (n > 0)
1408 {
1409 /* should contain no data */
1410 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECODE_ERROR);
1411 SSLerr(SSL_F_SSL3_GET_SERVER_DONE,SSL_R_LENGTH_MISMATCH);
1412 return -1;
1413 }
1414 ret=1;
1415 return(ret);
1416 }
1417
1418static int ssl3_send_client_key_exchange(SSL *s)
1419 {
1420 unsigned char *p,*d;
1421 int n;
1422 unsigned long l;
1423#ifndef OPENSSL_NO_RSA
1424 unsigned char *q;
1425 EVP_PKEY *pkey=NULL;
1426#endif
1427#ifndef OPENSSL_NO_KRB5
1428 KSSL_ERR kssl_err;
1429#endif /* OPENSSL_NO_KRB5 */
1430
1431 if (s->state == SSL3_ST_CW_KEY_EXCH_A)
1432 {
1433 d=(unsigned char *)s->init_buf->data;
1434 p= &(d[4]);
1435
1436 l=s->s3->tmp.new_cipher->algorithms;
1437
1438 /* Fool emacs indentation */
1439 if (0) {}
1440#ifndef OPENSSL_NO_RSA
1441 else if (l & SSL_kRSA)
1442 {
1443 RSA *rsa;
1444 unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH];
1445
1446 if (s->session->sess_cert->peer_rsa_tmp != NULL)
1447 rsa=s->session->sess_cert->peer_rsa_tmp;
1448 else
1449 {
1450 pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509);
1451 if ((pkey == NULL) ||
1452 (pkey->type != EVP_PKEY_RSA) ||
1453 (pkey->pkey.rsa == NULL))
1454 {
1455 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR);
1456 goto err;
1457 }
1458 rsa=pkey->pkey.rsa;
1459 EVP_PKEY_free(pkey);
1460 }
1461
1462 tmp_buf[0]=s->client_version>>8;
1463 tmp_buf[1]=s->client_version&0xff;
1464 if (RAND_bytes(&(tmp_buf[2]),sizeof tmp_buf-2) <= 0)
1465 goto err;
1466
1467 s->session->master_key_length=sizeof tmp_buf;
1468
1469 q=p;
1470 /* Fix buf for TLS and beyond */
1471 if (s->version > SSL3_VERSION)
1472 p+=2;
1473 n=RSA_public_encrypt(sizeof tmp_buf,
1474 tmp_buf,p,rsa,RSA_PKCS1_PADDING);
1475#ifdef PKCS1_CHECK
1476 if (s->options & SSL_OP_PKCS1_CHECK_1) p[1]++;
1477 if (s->options & SSL_OP_PKCS1_CHECK_2) tmp_buf[0]=0x70;
1478#endif
1479 if (n <= 0)
1480 {
1481 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_ENCRYPT);
1482 goto err;
1483 }
1484
1485 /* Fix buf for TLS and beyond */
1486 if (s->version > SSL3_VERSION)
1487 {
1488 s2n(n,q);
1489 n+=2;
1490 }
1491
1492 s->session->master_key_length=
1493 s->method->ssl3_enc->generate_master_secret(s,
1494 s->session->master_key,
1495 tmp_buf,sizeof tmp_buf);
1496 OPENSSL_cleanse(tmp_buf,sizeof tmp_buf);
1497 }
1498#endif
1499#ifndef OPENSSL_NO_KRB5
1500 else if (l & SSL_kKRB5)
1501 {
1502 krb5_error_code krb5rc;
1503 KSSL_CTX *kssl_ctx = s->kssl_ctx;
1504 /* krb5_data krb5_ap_req; */
1505 krb5_data *enc_ticket;
1506 krb5_data authenticator, *authp = NULL;
1507 EVP_CIPHER_CTX ciph_ctx;
1508 EVP_CIPHER *enc = NULL;
1509 unsigned char iv[EVP_MAX_IV_LENGTH];
1510 unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH];
1511 unsigned char epms[SSL_MAX_MASTER_KEY_LENGTH
1512 + EVP_MAX_IV_LENGTH];
1513 int padl, outl = sizeof(epms);
1514
1515 EVP_CIPHER_CTX_init(&ciph_ctx);
1516
1517#ifdef KSSL_DEBUG
1518 printf("ssl3_send_client_key_exchange(%lx & %lx)\n",
1519 l, SSL_kKRB5);
1520#endif /* KSSL_DEBUG */
1521
1522 authp = NULL;
1523#ifdef KRB5SENDAUTH
1524 if (KRB5SENDAUTH) authp = &authenticator;
1525#endif /* KRB5SENDAUTH */
1526
1527 krb5rc = kssl_cget_tkt(kssl_ctx, &enc_ticket, authp,
1528 &kssl_err);
1529 enc = kssl_map_enc(kssl_ctx->enctype);
1530 if (enc == NULL)
1531 goto err;
1532#ifdef KSSL_DEBUG
1533 {
1534 printf("kssl_cget_tkt rtn %d\n", krb5rc);
1535 if (krb5rc && kssl_err.text)
1536 printf("kssl_cget_tkt kssl_err=%s\n", kssl_err.text);
1537 }
1538#endif /* KSSL_DEBUG */
1539
1540 if (krb5rc)
1541 {
1542 ssl3_send_alert(s,SSL3_AL_FATAL,
1543 SSL_AD_HANDSHAKE_FAILURE);
1544 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,
1545 kssl_err.reason);
1546 goto err;
1547 }
1548
1549 /* 20010406 VRS - Earlier versions used KRB5 AP_REQ
1550 ** in place of RFC 2712 KerberosWrapper, as in:
1551 **
1552 ** Send ticket (copy to *p, set n = length)
1553 ** n = krb5_ap_req.length;
1554 ** memcpy(p, krb5_ap_req.data, krb5_ap_req.length);
1555 ** if (krb5_ap_req.data)
1556 ** kssl_krb5_free_data_contents(NULL,&krb5_ap_req);
1557 **
1558 ** Now using real RFC 2712 KerberosWrapper
1559 ** (Thanks to Simon Wilkinson <sxw@sxw.org.uk>)
1560 ** Note: 2712 "opaque" types are here replaced
1561 ** with a 2-byte length followed by the value.
1562 ** Example:
1563 ** KerberosWrapper= xx xx asn1ticket 0 0 xx xx encpms
1564 ** Where "xx xx" = length bytes. Shown here with
1565 ** optional authenticator omitted.
1566 */
1567
1568 /* KerberosWrapper.Ticket */
1569 s2n(enc_ticket->length,p);
1570 memcpy(p, enc_ticket->data, enc_ticket->length);
1571 p+= enc_ticket->length;
1572 n = enc_ticket->length + 2;
1573
1574 /* KerberosWrapper.Authenticator */
1575 if (authp && authp->length)
1576 {
1577 s2n(authp->length,p);
1578 memcpy(p, authp->data, authp->length);
1579 p+= authp->length;
1580 n+= authp->length + 2;
1581
1582 free(authp->data);
1583 authp->data = NULL;
1584 authp->length = 0;
1585 }
1586 else
1587 {
1588 s2n(0,p);/* null authenticator length */
1589 n+=2;
1590 }
1591
1592 if (RAND_bytes(tmp_buf,sizeof tmp_buf) <= 0)
1593 goto err;
1594
1595 /* 20010420 VRS. Tried it this way; failed.
1596 ** EVP_EncryptInit_ex(&ciph_ctx,enc, NULL,NULL);
1597 ** EVP_CIPHER_CTX_set_key_length(&ciph_ctx,
1598 ** kssl_ctx->length);
1599 ** EVP_EncryptInit_ex(&ciph_ctx,NULL, key,iv);
1600 */
1601
1602 memset(iv, 0, sizeof iv); /* per RFC 1510 */
1603 EVP_EncryptInit_ex(&ciph_ctx,enc, NULL,
1604 kssl_ctx->key,iv);
1605 EVP_EncryptUpdate(&ciph_ctx,epms,&outl,tmp_buf,
1606 sizeof tmp_buf);
1607 EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl);
1608 outl += padl;
1609 if (outl > sizeof epms)
1610 {
1611 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
1612 goto err;
1613 }
1614 EVP_CIPHER_CTX_cleanup(&ciph_ctx);
1615
1616 /* KerberosWrapper.EncryptedPreMasterSecret */
1617 s2n(outl,p);
1618 memcpy(p, epms, outl);
1619 p+=outl;
1620 n+=outl + 2;
1621
1622 s->session->master_key_length=
1623 s->method->ssl3_enc->generate_master_secret(s,
1624 s->session->master_key,
1625 tmp_buf, sizeof tmp_buf);
1626
1627 OPENSSL_cleanse(tmp_buf, sizeof tmp_buf);
1628 OPENSSL_cleanse(epms, outl);
1629 }
1630#endif
1631#ifndef OPENSSL_NO_DH
1632 else if (l & (SSL_kEDH|SSL_kDHr|SSL_kDHd))
1633 {
1634 DH *dh_srvr,*dh_clnt;
1635
1636 if (s->session->sess_cert->peer_dh_tmp != NULL)
1637 dh_srvr=s->session->sess_cert->peer_dh_tmp;
1638 else
1639 {
1640 /* we get them from the cert */
1641 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_HANDSHAKE_FAILURE);
1642 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNABLE_TO_FIND_DH_PARAMETERS);
1643 goto err;
1644 }
1645
1646 /* generate a new random key */
1647 if ((dh_clnt=DHparams_dup(dh_srvr)) == NULL)
1648 {
1649 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB);
1650 goto err;
1651 }
1652 if (!DH_generate_key(dh_clnt))
1653 {
1654 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB);
1655 goto err;
1656 }
1657
1658 /* use the 'p' output buffer for the DH key, but
1659 * make sure to clear it out afterwards */
1660
1661 n=DH_compute_key(p,dh_srvr->pub_key,dh_clnt);
1662
1663 if (n <= 0)
1664 {
1665 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB);
1666 goto err;
1667 }
1668
1669 /* generate master key from the result */
1670 s->session->master_key_length=
1671 s->method->ssl3_enc->generate_master_secret(s,
1672 s->session->master_key,p,n);
1673 /* clean up */
1674 memset(p,0,n);
1675
1676 /* send off the data */
1677 n=BN_num_bytes(dh_clnt->pub_key);
1678 s2n(n,p);
1679 BN_bn2bin(dh_clnt->pub_key,p);
1680 n+=2;
1681
1682 DH_free(dh_clnt);
1683
1684 /* perhaps clean things up a bit EAY EAY EAY EAY*/
1685 }
1686#endif
1687 else
1688 {
1689 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_HANDSHAKE_FAILURE);
1690 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR);
1691 goto err;
1692 }
1693
1694 *(d++)=SSL3_MT_CLIENT_KEY_EXCHANGE;
1695 l2n3(n,d);
1696
1697 s->state=SSL3_ST_CW_KEY_EXCH_B;
1698 /* number of bytes to write */
1699 s->init_num=n+4;
1700 s->init_off=0;
1701 }
1702
1703 /* SSL3_ST_CW_KEY_EXCH_B */
1704 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
1705err:
1706 return(-1);
1707 }
1708
1709static int ssl3_send_client_verify(SSL *s)
1710 {
1711 unsigned char *p,*d;
1712 unsigned char data[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH];
1713 EVP_PKEY *pkey;
1714#ifndef OPENSSL_NO_RSA
1715 unsigned u=0;
1716#endif
1717 unsigned long n;
1718#ifndef OPENSSL_NO_DSA
1719 int j;
1720#endif
1721
1722 if (s->state == SSL3_ST_CW_CERT_VRFY_A)
1723 {
1724 d=(unsigned char *)s->init_buf->data;
1725 p= &(d[4]);
1726 pkey=s->cert->key->privatekey;
1727
1728 s->method->ssl3_enc->cert_verify_mac(s,&(s->s3->finish_dgst2),
1729 &(data[MD5_DIGEST_LENGTH]));
1730
1731#ifndef OPENSSL_NO_RSA
1732 if (pkey->type == EVP_PKEY_RSA)
1733 {
1734 s->method->ssl3_enc->cert_verify_mac(s,
1735 &(s->s3->finish_dgst1),&(data[0]));
1736 if (RSA_sign(NID_md5_sha1, data,
1737 MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH,
1738 &(p[2]), &u, pkey->pkey.rsa) <= 0 )
1739 {
1740 SSLerr(SSL_F_SSL3_SEND_CLIENT_VERIFY,ERR_R_RSA_LIB);
1741 goto err;
1742 }
1743 s2n(u,p);
1744 n=u+2;
1745 }
1746 else
1747#endif
1748#ifndef OPENSSL_NO_DSA
1749 if (pkey->type == EVP_PKEY_DSA)
1750 {
1751 if (!DSA_sign(pkey->save_type,
1752 &(data[MD5_DIGEST_LENGTH]),
1753 SHA_DIGEST_LENGTH,&(p[2]),
1754 (unsigned int *)&j,pkey->pkey.dsa))
1755 {
1756 SSLerr(SSL_F_SSL3_SEND_CLIENT_VERIFY,ERR_R_DSA_LIB);
1757 goto err;
1758 }
1759 s2n(j,p);
1760 n=j+2;
1761 }
1762 else
1763#endif
1764 {
1765 SSLerr(SSL_F_SSL3_SEND_CLIENT_VERIFY,ERR_R_INTERNAL_ERROR);
1766 goto err;
1767 }
1768 *(d++)=SSL3_MT_CERTIFICATE_VERIFY;
1769 l2n3(n,d);
1770
1771 s->state=SSL3_ST_CW_CERT_VRFY_B;
1772 s->init_num=(int)n+4;
1773 s->init_off=0;
1774 }
1775 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
1776err:
1777 return(-1);
1778 }
1779
1780static int ssl3_send_client_certificate(SSL *s)
1781 {
1782 X509 *x509=NULL;
1783 EVP_PKEY *pkey=NULL;
1784 int i;
1785 unsigned long l;
1786
1787 if (s->state == SSL3_ST_CW_CERT_A)
1788 {
1789 if ((s->cert == NULL) ||
1790 (s->cert->key->x509 == NULL) ||
1791 (s->cert->key->privatekey == NULL))
1792 s->state=SSL3_ST_CW_CERT_B;
1793 else
1794 s->state=SSL3_ST_CW_CERT_C;
1795 }
1796
1797 /* We need to get a client cert */
1798 if (s->state == SSL3_ST_CW_CERT_B)
1799 {
1800 /* If we get an error, we need to
1801 * ssl->rwstate=SSL_X509_LOOKUP; return(-1);
1802 * We then get retied later */
1803 i=0;
1804 if (s->ctx->client_cert_cb != NULL)
1805 i=s->ctx->client_cert_cb(s,&(x509),&(pkey));
1806 if (i < 0)
1807 {
1808 s->rwstate=SSL_X509_LOOKUP;
1809 return(-1);
1810 }
1811 s->rwstate=SSL_NOTHING;
1812 if ((i == 1) && (pkey != NULL) && (x509 != NULL))
1813 {
1814 s->state=SSL3_ST_CW_CERT_B;
1815 if ( !SSL_use_certificate(s,x509) ||
1816 !SSL_use_PrivateKey(s,pkey))
1817 i=0;
1818 }
1819 else if (i == 1)
1820 {
1821 i=0;
1822 SSLerr(SSL_F_SSL3_SEND_CLIENT_CERTIFICATE,SSL_R_BAD_DATA_RETURNED_BY_CALLBACK);
1823 }
1824
1825 if (x509 != NULL) X509_free(x509);
1826 if (pkey != NULL) EVP_PKEY_free(pkey);
1827 if (i == 0)
1828 {
1829 if (s->version == SSL3_VERSION)
1830 {
1831 s->s3->tmp.cert_req=0;
1832 ssl3_send_alert(s,SSL3_AL_WARNING,SSL_AD_NO_CERTIFICATE);
1833 return(1);
1834 }
1835 else
1836 {
1837 s->s3->tmp.cert_req=2;
1838 }
1839 }
1840
1841 /* Ok, we have a cert */
1842 s->state=SSL3_ST_CW_CERT_C;
1843 }
1844
1845 if (s->state == SSL3_ST_CW_CERT_C)
1846 {
1847 s->state=SSL3_ST_CW_CERT_D;
1848 l=ssl3_output_cert_chain(s,
1849 (s->s3->tmp.cert_req == 2)?NULL:s->cert->key->x509);
1850 s->init_num=(int)l;
1851 s->init_off=0;
1852 }
1853 /* SSL3_ST_CW_CERT_D */
1854 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
1855 }
1856
1857#define has_bits(i,m) (((i)&(m)) == (m))
1858
1859static int ssl3_check_cert_and_algorithm(SSL *s)
1860 {
1861 int i,idx;
1862 long algs;
1863 EVP_PKEY *pkey=NULL;
1864 SESS_CERT *sc;
1865#ifndef OPENSSL_NO_RSA
1866 RSA *rsa;
1867#endif
1868#ifndef OPENSSL_NO_DH
1869 DH *dh;
1870#endif
1871
1872 sc=s->session->sess_cert;
1873
1874 if (sc == NULL)
1875 {
1876 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,ERR_R_INTERNAL_ERROR);
1877 goto err;
1878 }
1879
1880 algs=s->s3->tmp.new_cipher->algorithms;
1881
1882 /* we don't have a certificate */
1883 if (algs & (SSL_aDH|SSL_aNULL|SSL_aKRB5))
1884 return(1);
1885
1886#ifndef OPENSSL_NO_RSA
1887 rsa=s->session->sess_cert->peer_rsa_tmp;
1888#endif
1889#ifndef OPENSSL_NO_DH
1890 dh=s->session->sess_cert->peer_dh_tmp;
1891#endif
1892
1893 /* This is the passed certificate */
1894
1895 idx=sc->peer_cert_type;
1896 pkey=X509_get_pubkey(sc->peer_pkeys[idx].x509);
1897 i=X509_certificate_type(sc->peer_pkeys[idx].x509,pkey);
1898 EVP_PKEY_free(pkey);
1899
1900
1901 /* Check that we have a certificate if we require one */
1902 if ((algs & SSL_aRSA) && !has_bits(i,EVP_PK_RSA|EVP_PKT_SIGN))
1903 {
1904 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_RSA_SIGNING_CERT);
1905 goto f_err;
1906 }
1907#ifndef OPENSSL_NO_DSA
1908 else if ((algs & SSL_aDSS) && !has_bits(i,EVP_PK_DSA|EVP_PKT_SIGN))
1909 {
1910 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DSA_SIGNING_CERT);
1911 goto f_err;
1912 }
1913#endif
1914#ifndef OPENSSL_NO_RSA
1915 if ((algs & SSL_kRSA) &&
1916 !(has_bits(i,EVP_PK_RSA|EVP_PKT_ENC) || (rsa != NULL)))
1917 {
1918 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_RSA_ENCRYPTING_CERT);
1919 goto f_err;
1920 }
1921#endif
1922#ifndef OPENSSL_NO_DH
1923 if ((algs & SSL_kEDH) &&
1924 !(has_bits(i,EVP_PK_DH|EVP_PKT_EXCH) || (dh != NULL)))
1925 {
1926 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_KEY);
1927 goto f_err;
1928 }
1929 else if ((algs & SSL_kDHr) && !has_bits(i,EVP_PK_DH|EVP_PKS_RSA))
1930 {
1931 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_RSA_CERT);
1932 goto f_err;
1933 }
1934#ifndef OPENSSL_NO_DSA
1935 else if ((algs & SSL_kDHd) && !has_bits(i,EVP_PK_DH|EVP_PKS_DSA))
1936 {
1937 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_DSA_CERT);
1938 goto f_err;
1939 }
1940#endif
1941#endif
1942
1943 if (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && !has_bits(i,EVP_PKT_EXP))
1944 {
1945#ifndef OPENSSL_NO_RSA
1946 if (algs & SSL_kRSA)
1947 {
1948 if (rsa == NULL
1949 || RSA_size(rsa) > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher))
1950 {
1951 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_EXPORT_TMP_RSA_KEY);
1952 goto f_err;
1953 }
1954 }
1955 else
1956#endif
1957#ifndef OPENSSL_NO_DH
1958 if (algs & (SSL_kEDH|SSL_kDHr|SSL_kDHd))
1959 {
1960 if (dh == NULL
1961 || DH_size(dh) > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher))
1962 {
1963 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_EXPORT_TMP_DH_KEY);
1964 goto f_err;
1965 }
1966 }
1967 else
1968#endif
1969 {
1970 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE);
1971 goto f_err;
1972 }
1973 }
1974 return(1);
1975f_err:
1976 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_HANDSHAKE_FAILURE);
1977err:
1978 return(0);
1979 }
1980
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c
new file mode 100644
index 0000000000..d04096016c
--- /dev/null
+++ b/src/lib/libssl/s3_lib.c
@@ -0,0 +1,1799 @@
1/* ssl/s3_lib.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-2002 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 <stdio.h>
113#include <openssl/objects.h>
114#include "ssl_locl.h"
115#include "kssl_lcl.h"
116#include <openssl/md5.h>
117
118const char *ssl3_version_str="SSLv3" OPENSSL_VERSION_PTEXT;
119
120#define SSL3_NUM_CIPHERS (sizeof(ssl3_ciphers)/sizeof(SSL_CIPHER))
121
122static long ssl3_default_timeout(void );
123
124OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
125/* The RSA ciphers */
126/* Cipher 01 */
127 {
128 1,
129 SSL3_TXT_RSA_NULL_MD5,
130 SSL3_CK_RSA_NULL_MD5,
131 SSL_kRSA|SSL_aRSA|SSL_eNULL |SSL_MD5|SSL_SSLV3,
132 SSL_NOT_EXP|SSL_STRONG_NONE,
133 0,
134 0,
135 0,
136 SSL_ALL_CIPHERS,
137 SSL_ALL_STRENGTHS,
138 },
139/* Cipher 02 */
140 {
141 1,
142 SSL3_TXT_RSA_NULL_SHA,
143 SSL3_CK_RSA_NULL_SHA,
144 SSL_kRSA|SSL_aRSA|SSL_eNULL |SSL_SHA1|SSL_SSLV3,
145 SSL_NOT_EXP|SSL_STRONG_NONE,
146 0,
147 0,
148 0,
149 SSL_ALL_CIPHERS,
150 SSL_ALL_STRENGTHS,
151 },
152
153/* anon DH */
154/* Cipher 17 */
155 {
156 1,
157 SSL3_TXT_ADH_RC4_40_MD5,
158 SSL3_CK_ADH_RC4_40_MD5,
159 SSL_kEDH |SSL_aNULL|SSL_RC4 |SSL_MD5 |SSL_SSLV3,
160 SSL_EXPORT|SSL_EXP40,
161 0,
162 40,
163 128,
164 SSL_ALL_CIPHERS,
165 SSL_ALL_STRENGTHS,
166 },
167/* Cipher 18 */
168 {
169 1,
170 SSL3_TXT_ADH_RC4_128_MD5,
171 SSL3_CK_ADH_RC4_128_MD5,
172 SSL_kEDH |SSL_aNULL|SSL_RC4 |SSL_MD5 |SSL_SSLV3,
173 SSL_NOT_EXP|SSL_MEDIUM,
174 0,
175 128,
176 128,
177 SSL_ALL_CIPHERS,
178 SSL_ALL_STRENGTHS,
179 },
180/* Cipher 19 */
181 {
182 1,
183 SSL3_TXT_ADH_DES_40_CBC_SHA,
184 SSL3_CK_ADH_DES_40_CBC_SHA,
185 SSL_kEDH |SSL_aNULL|SSL_DES|SSL_SHA1|SSL_SSLV3,
186 SSL_EXPORT|SSL_EXP40,
187 0,
188 40,
189 128,
190 SSL_ALL_CIPHERS,
191 SSL_ALL_STRENGTHS,
192 },
193/* Cipher 1A */
194 {
195 1,
196 SSL3_TXT_ADH_DES_64_CBC_SHA,
197 SSL3_CK_ADH_DES_64_CBC_SHA,
198 SSL_kEDH |SSL_aNULL|SSL_DES |SSL_SHA1|SSL_SSLV3,
199 SSL_NOT_EXP|SSL_LOW,
200 0,
201 56,
202 56,
203 SSL_ALL_CIPHERS,
204 SSL_ALL_STRENGTHS,
205 },
206/* Cipher 1B */
207 {
208 1,
209 SSL3_TXT_ADH_DES_192_CBC_SHA,
210 SSL3_CK_ADH_DES_192_CBC_SHA,
211 SSL_kEDH |SSL_aNULL|SSL_3DES |SSL_SHA1|SSL_SSLV3,
212 SSL_NOT_EXP|SSL_HIGH,
213 0,
214 168,
215 168,
216 SSL_ALL_CIPHERS,
217 SSL_ALL_STRENGTHS,
218 },
219
220/* RSA again */
221/* Cipher 03 */
222 {
223 1,
224 SSL3_TXT_RSA_RC4_40_MD5,
225 SSL3_CK_RSA_RC4_40_MD5,
226 SSL_kRSA|SSL_aRSA|SSL_RC4 |SSL_MD5 |SSL_SSLV3,
227 SSL_EXPORT|SSL_EXP40,
228 0,
229 40,
230 128,
231 SSL_ALL_CIPHERS,
232 SSL_ALL_STRENGTHS,
233 },
234/* Cipher 04 */
235 {
236 1,
237 SSL3_TXT_RSA_RC4_128_MD5,
238 SSL3_CK_RSA_RC4_128_MD5,
239 SSL_kRSA|SSL_aRSA|SSL_RC4 |SSL_MD5|SSL_SSLV3,
240 SSL_NOT_EXP|SSL_MEDIUM,
241 0,
242 128,
243 128,
244 SSL_ALL_CIPHERS,
245 SSL_ALL_STRENGTHS,
246 },
247/* Cipher 05 */
248 {
249 1,
250 SSL3_TXT_RSA_RC4_128_SHA,
251 SSL3_CK_RSA_RC4_128_SHA,
252 SSL_kRSA|SSL_aRSA|SSL_RC4 |SSL_SHA1|SSL_SSLV3,
253 SSL_NOT_EXP|SSL_MEDIUM,
254 0,
255 128,
256 128,
257 SSL_ALL_CIPHERS,
258 SSL_ALL_STRENGTHS,
259 },
260/* Cipher 06 */
261 {
262 1,
263 SSL3_TXT_RSA_RC2_40_MD5,
264 SSL3_CK_RSA_RC2_40_MD5,
265 SSL_kRSA|SSL_aRSA|SSL_RC2 |SSL_MD5 |SSL_SSLV3,
266 SSL_EXPORT|SSL_EXP40,
267 0,
268 40,
269 128,
270 SSL_ALL_CIPHERS,
271 SSL_ALL_STRENGTHS,
272 },
273/* Cipher 07 */
274#ifndef OPENSSL_NO_IDEA
275 {
276 1,
277 SSL3_TXT_RSA_IDEA_128_SHA,
278 SSL3_CK_RSA_IDEA_128_SHA,
279 SSL_kRSA|SSL_aRSA|SSL_IDEA |SSL_SHA1|SSL_SSLV3,
280 SSL_NOT_EXP|SSL_MEDIUM,
281 0,
282 128,
283 128,
284 SSL_ALL_CIPHERS,
285 SSL_ALL_STRENGTHS,
286 },
287#endif
288/* Cipher 08 */
289 {
290 1,
291 SSL3_TXT_RSA_DES_40_CBC_SHA,
292 SSL3_CK_RSA_DES_40_CBC_SHA,
293 SSL_kRSA|SSL_aRSA|SSL_DES|SSL_SHA1|SSL_SSLV3,
294 SSL_EXPORT|SSL_EXP40,
295 0,
296 40,
297 56,
298 SSL_ALL_CIPHERS,
299 SSL_ALL_STRENGTHS,
300 },
301/* Cipher 09 */
302 {
303 1,
304 SSL3_TXT_RSA_DES_64_CBC_SHA,
305 SSL3_CK_RSA_DES_64_CBC_SHA,
306 SSL_kRSA|SSL_aRSA|SSL_DES |SSL_SHA1|SSL_SSLV3,
307 SSL_NOT_EXP|SSL_LOW,
308 0,
309 56,
310 56,
311 SSL_ALL_CIPHERS,
312 SSL_ALL_STRENGTHS,
313 },
314/* Cipher 0A */
315 {
316 1,
317 SSL3_TXT_RSA_DES_192_CBC3_SHA,
318 SSL3_CK_RSA_DES_192_CBC3_SHA,
319 SSL_kRSA|SSL_aRSA|SSL_3DES |SSL_SHA1|SSL_SSLV3,
320 SSL_NOT_EXP|SSL_HIGH,
321 0,
322 168,
323 168,
324 SSL_ALL_CIPHERS,
325 SSL_ALL_STRENGTHS,
326 },
327
328/* The DH ciphers */
329/* Cipher 0B */
330 {
331 0,
332 SSL3_TXT_DH_DSS_DES_40_CBC_SHA,
333 SSL3_CK_DH_DSS_DES_40_CBC_SHA,
334 SSL_kDHd |SSL_aDH|SSL_DES|SSL_SHA1|SSL_SSLV3,
335 SSL_EXPORT|SSL_EXP40,
336 0,
337 40,
338 56,
339 SSL_ALL_CIPHERS,
340 SSL_ALL_STRENGTHS,
341 },
342/* Cipher 0C */
343 {
344 0,
345 SSL3_TXT_DH_DSS_DES_64_CBC_SHA,
346 SSL3_CK_DH_DSS_DES_64_CBC_SHA,
347 SSL_kDHd |SSL_aDH|SSL_DES |SSL_SHA1|SSL_SSLV3,
348 SSL_NOT_EXP|SSL_LOW,
349 0,
350 56,
351 56,
352 SSL_ALL_CIPHERS,
353 SSL_ALL_STRENGTHS,
354 },
355/* Cipher 0D */
356 {
357 0,
358 SSL3_TXT_DH_DSS_DES_192_CBC3_SHA,
359 SSL3_CK_DH_DSS_DES_192_CBC3_SHA,
360 SSL_kDHd |SSL_aDH|SSL_3DES |SSL_SHA1|SSL_SSLV3,
361 SSL_NOT_EXP|SSL_HIGH,
362 0,
363 168,
364 168,
365 SSL_ALL_CIPHERS,
366 SSL_ALL_STRENGTHS,
367 },
368/* Cipher 0E */
369 {
370 0,
371 SSL3_TXT_DH_RSA_DES_40_CBC_SHA,
372 SSL3_CK_DH_RSA_DES_40_CBC_SHA,
373 SSL_kDHr |SSL_aDH|SSL_DES|SSL_SHA1|SSL_SSLV3,
374 SSL_EXPORT|SSL_EXP40,
375 0,
376 40,
377 56,
378 SSL_ALL_CIPHERS,
379 SSL_ALL_STRENGTHS,
380 },
381/* Cipher 0F */
382 {
383 0,
384 SSL3_TXT_DH_RSA_DES_64_CBC_SHA,
385 SSL3_CK_DH_RSA_DES_64_CBC_SHA,
386 SSL_kDHr |SSL_aDH|SSL_DES |SSL_SHA1|SSL_SSLV3,
387 SSL_NOT_EXP|SSL_LOW,
388 0,
389 56,
390 56,
391 SSL_ALL_CIPHERS,
392 SSL_ALL_STRENGTHS,
393 },
394/* Cipher 10 */
395 {
396 0,
397 SSL3_TXT_DH_RSA_DES_192_CBC3_SHA,
398 SSL3_CK_DH_RSA_DES_192_CBC3_SHA,
399 SSL_kDHr |SSL_aDH|SSL_3DES |SSL_SHA1|SSL_SSLV3,
400 SSL_NOT_EXP|SSL_HIGH,
401 0,
402 168,
403 168,
404 SSL_ALL_CIPHERS,
405 SSL_ALL_STRENGTHS,
406 },
407
408/* The Ephemeral DH ciphers */
409/* Cipher 11 */
410 {
411 1,
412 SSL3_TXT_EDH_DSS_DES_40_CBC_SHA,
413 SSL3_CK_EDH_DSS_DES_40_CBC_SHA,
414 SSL_kEDH|SSL_aDSS|SSL_DES|SSL_SHA1|SSL_SSLV3,
415 SSL_EXPORT|SSL_EXP40,
416 0,
417 40,
418 56,
419 SSL_ALL_CIPHERS,
420 SSL_ALL_STRENGTHS,
421 },
422/* Cipher 12 */
423 {
424 1,
425 SSL3_TXT_EDH_DSS_DES_64_CBC_SHA,
426 SSL3_CK_EDH_DSS_DES_64_CBC_SHA,
427 SSL_kEDH|SSL_aDSS|SSL_DES |SSL_SHA1|SSL_SSLV3,
428 SSL_NOT_EXP|SSL_LOW,
429 0,
430 56,
431 56,
432 SSL_ALL_CIPHERS,
433 SSL_ALL_STRENGTHS,
434 },
435/* Cipher 13 */
436 {
437 1,
438 SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA,
439 SSL3_CK_EDH_DSS_DES_192_CBC3_SHA,
440 SSL_kEDH|SSL_aDSS|SSL_3DES |SSL_SHA1|SSL_SSLV3,
441 SSL_NOT_EXP|SSL_HIGH,
442 0,
443 168,
444 168,
445 SSL_ALL_CIPHERS,
446 SSL_ALL_STRENGTHS,
447 },
448/* Cipher 14 */
449 {
450 1,
451 SSL3_TXT_EDH_RSA_DES_40_CBC_SHA,
452 SSL3_CK_EDH_RSA_DES_40_CBC_SHA,
453 SSL_kEDH|SSL_aRSA|SSL_DES|SSL_SHA1|SSL_SSLV3,
454 SSL_EXPORT|SSL_EXP40,
455 0,
456 40,
457 56,
458 SSL_ALL_CIPHERS,
459 SSL_ALL_STRENGTHS,
460 },
461/* Cipher 15 */
462 {
463 1,
464 SSL3_TXT_EDH_RSA_DES_64_CBC_SHA,
465 SSL3_CK_EDH_RSA_DES_64_CBC_SHA,
466 SSL_kEDH|SSL_aRSA|SSL_DES |SSL_SHA1|SSL_SSLV3,
467 SSL_NOT_EXP|SSL_LOW,
468 0,
469 56,
470 56,
471 SSL_ALL_CIPHERS,
472 SSL_ALL_STRENGTHS,
473 },
474/* Cipher 16 */
475 {
476 1,
477 SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA,
478 SSL3_CK_EDH_RSA_DES_192_CBC3_SHA,
479 SSL_kEDH|SSL_aRSA|SSL_3DES |SSL_SHA1|SSL_SSLV3,
480 SSL_NOT_EXP|SSL_HIGH,
481 0,
482 168,
483 168,
484 SSL_ALL_CIPHERS,
485 SSL_ALL_STRENGTHS,
486 },
487
488/* Fortezza */
489/* Cipher 1C */
490 {
491 0,
492 SSL3_TXT_FZA_DMS_NULL_SHA,
493 SSL3_CK_FZA_DMS_NULL_SHA,
494 SSL_kFZA|SSL_aFZA |SSL_eNULL |SSL_SHA1|SSL_SSLV3,
495 SSL_NOT_EXP|SSL_STRONG_NONE,
496 0,
497 0,
498 0,
499 SSL_ALL_CIPHERS,
500 SSL_ALL_STRENGTHS,
501 },
502
503/* Cipher 1D */
504 {
505 0,
506 SSL3_TXT_FZA_DMS_FZA_SHA,
507 SSL3_CK_FZA_DMS_FZA_SHA,
508 SSL_kFZA|SSL_aFZA |SSL_eFZA |SSL_SHA1|SSL_SSLV3,
509 SSL_NOT_EXP|SSL_STRONG_NONE,
510 0,
511 0,
512 0,
513 SSL_ALL_CIPHERS,
514 SSL_ALL_STRENGTHS,
515 },
516
517#if 0
518/* Cipher 1E */
519 {
520 0,
521 SSL3_TXT_FZA_DMS_RC4_SHA,
522 SSL3_CK_FZA_DMS_RC4_SHA,
523 SSL_kFZA|SSL_aFZA |SSL_RC4 |SSL_SHA1|SSL_SSLV3,
524 SSL_NOT_EXP|SSL_MEDIUM,
525 0,
526 128,
527 128,
528 SSL_ALL_CIPHERS,
529 SSL_ALL_STRENGTHS,
530 },
531#endif
532
533#ifndef OPENSSL_NO_KRB5
534/* The Kerberos ciphers
535** 20000107 VRS: And the first shall be last,
536** in hopes of avoiding the lynx ssl renegotiation problem.
537*/
538/* Cipher 1E VRS */
539 {
540 1,
541 SSL3_TXT_KRB5_DES_64_CBC_SHA,
542 SSL3_CK_KRB5_DES_64_CBC_SHA,
543 SSL_kKRB5|SSL_aKRB5| SSL_DES|SSL_SHA1 |SSL_SSLV3,
544 SSL_NOT_EXP|SSL_LOW,
545 0,
546 56,
547 56,
548 SSL_ALL_CIPHERS,
549 SSL_ALL_STRENGTHS,
550 },
551
552/* Cipher 1F VRS */
553 {
554 1,
555 SSL3_TXT_KRB5_DES_192_CBC3_SHA,
556 SSL3_CK_KRB5_DES_192_CBC3_SHA,
557 SSL_kKRB5|SSL_aKRB5| SSL_3DES|SSL_SHA1 |SSL_SSLV3,
558 SSL_NOT_EXP|SSL_HIGH,
559 0,
560 112,
561 168,
562 SSL_ALL_CIPHERS,
563 SSL_ALL_STRENGTHS,
564 },
565
566/* Cipher 20 VRS */
567 {
568 1,
569 SSL3_TXT_KRB5_RC4_128_SHA,
570 SSL3_CK_KRB5_RC4_128_SHA,
571 SSL_kKRB5|SSL_aKRB5| SSL_RC4|SSL_SHA1 |SSL_SSLV3,
572 SSL_NOT_EXP|SSL_MEDIUM,
573 0,
574 128,
575 128,
576 SSL_ALL_CIPHERS,
577 SSL_ALL_STRENGTHS,
578 },
579
580/* Cipher 21 VRS */
581 {
582 1,
583 SSL3_TXT_KRB5_IDEA_128_CBC_SHA,
584 SSL3_CK_KRB5_IDEA_128_CBC_SHA,
585 SSL_kKRB5|SSL_aKRB5| SSL_IDEA|SSL_SHA1 |SSL_SSLV3,
586 SSL_NOT_EXP|SSL_MEDIUM,
587 0,
588 128,
589 128,
590 SSL_ALL_CIPHERS,
591 SSL_ALL_STRENGTHS,
592 },
593
594/* Cipher 22 VRS */
595 {
596 1,
597 SSL3_TXT_KRB5_DES_64_CBC_MD5,
598 SSL3_CK_KRB5_DES_64_CBC_MD5,
599 SSL_kKRB5|SSL_aKRB5| SSL_DES|SSL_MD5 |SSL_SSLV3,
600 SSL_NOT_EXP|SSL_LOW,
601 0,
602 56,
603 56,
604 SSL_ALL_CIPHERS,
605 SSL_ALL_STRENGTHS,
606 },
607
608/* Cipher 23 VRS */
609 {
610 1,
611 SSL3_TXT_KRB5_DES_192_CBC3_MD5,
612 SSL3_CK_KRB5_DES_192_CBC3_MD5,
613 SSL_kKRB5|SSL_aKRB5| SSL_3DES|SSL_MD5 |SSL_SSLV3,
614 SSL_NOT_EXP|SSL_HIGH,
615 0,
616 112,
617 168,
618 SSL_ALL_CIPHERS,
619 SSL_ALL_STRENGTHS,
620 },
621
622/* Cipher 24 VRS */
623 {
624 1,
625 SSL3_TXT_KRB5_RC4_128_MD5,
626 SSL3_CK_KRB5_RC4_128_MD5,
627 SSL_kKRB5|SSL_aKRB5| SSL_RC4|SSL_MD5 |SSL_SSLV3,
628 SSL_NOT_EXP|SSL_MEDIUM,
629 0,
630 128,
631 128,
632 SSL_ALL_CIPHERS,
633 SSL_ALL_STRENGTHS,
634 },
635
636/* Cipher 25 VRS */
637 {
638 1,
639 SSL3_TXT_KRB5_IDEA_128_CBC_MD5,
640 SSL3_CK_KRB5_IDEA_128_CBC_MD5,
641 SSL_kKRB5|SSL_aKRB5| SSL_IDEA|SSL_MD5 |SSL_SSLV3,
642 SSL_NOT_EXP|SSL_MEDIUM,
643 0,
644 128,
645 128,
646 SSL_ALL_CIPHERS,
647 SSL_ALL_STRENGTHS,
648 },
649
650/* Cipher 26 VRS */
651 {
652 1,
653 SSL3_TXT_KRB5_DES_40_CBC_SHA,
654 SSL3_CK_KRB5_DES_40_CBC_SHA,
655 SSL_kKRB5|SSL_aKRB5| SSL_DES|SSL_SHA1 |SSL_SSLV3,
656 SSL_EXPORT|SSL_EXP40,
657 0,
658 40,
659 56,
660 SSL_ALL_CIPHERS,
661 SSL_ALL_STRENGTHS,
662 },
663
664/* Cipher 27 VRS */
665 {
666 1,
667 SSL3_TXT_KRB5_RC2_40_CBC_SHA,
668 SSL3_CK_KRB5_RC2_40_CBC_SHA,
669 SSL_kKRB5|SSL_aKRB5| SSL_RC2|SSL_SHA1 |SSL_SSLV3,
670 SSL_EXPORT|SSL_EXP40,
671 0,
672 40,
673 128,
674 SSL_ALL_CIPHERS,
675 SSL_ALL_STRENGTHS,
676 },
677
678/* Cipher 28 VRS */
679 {
680 1,
681 SSL3_TXT_KRB5_RC4_40_SHA,
682 SSL3_CK_KRB5_RC4_40_SHA,
683 SSL_kKRB5|SSL_aKRB5| SSL_RC4|SSL_SHA1 |SSL_SSLV3,
684 SSL_EXPORT|SSL_EXP40,
685 0,
686 128,
687 128,
688 SSL_ALL_CIPHERS,
689 SSL_ALL_STRENGTHS,
690 },
691
692/* Cipher 29 VRS */
693 {
694 1,
695 SSL3_TXT_KRB5_DES_40_CBC_MD5,
696 SSL3_CK_KRB5_DES_40_CBC_MD5,
697 SSL_kKRB5|SSL_aKRB5| SSL_DES|SSL_MD5 |SSL_SSLV3,
698 SSL_EXPORT|SSL_EXP40,
699 0,
700 40,
701 56,
702 SSL_ALL_CIPHERS,
703 SSL_ALL_STRENGTHS,
704 },
705
706/* Cipher 2A VRS */
707 {
708 1,
709 SSL3_TXT_KRB5_RC2_40_CBC_MD5,
710 SSL3_CK_KRB5_RC2_40_CBC_MD5,
711 SSL_kKRB5|SSL_aKRB5| SSL_RC2|SSL_MD5 |SSL_SSLV3,
712 SSL_EXPORT|SSL_EXP40,
713 0,
714 40,
715 128,
716 SSL_ALL_CIPHERS,
717 SSL_ALL_STRENGTHS,
718 },
719
720/* Cipher 2B VRS */
721 {
722 1,
723 SSL3_TXT_KRB5_RC4_40_MD5,
724 SSL3_CK_KRB5_RC4_40_MD5,
725 SSL_kKRB5|SSL_aKRB5| SSL_RC4|SSL_MD5 |SSL_SSLV3,
726 SSL_EXPORT|SSL_EXP40,
727 0,
728 128,
729 128,
730 SSL_ALL_CIPHERS,
731 SSL_ALL_STRENGTHS,
732 },
733#endif /* OPENSSL_NO_KRB5 */
734
735
736#if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES
737 /* New TLS Export CipherSuites */
738 /* Cipher 60 */
739 {
740 1,
741 TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5,
742 TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5,
743 SSL_kRSA|SSL_aRSA|SSL_RC4|SSL_MD5|SSL_TLSV1,
744 SSL_EXPORT|SSL_EXP56,
745 0,
746 56,
747 128,
748 SSL_ALL_CIPHERS,
749 SSL_ALL_STRENGTHS,
750 },
751 /* Cipher 61 */
752 {
753 1,
754 TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5,
755 TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5,
756 SSL_kRSA|SSL_aRSA|SSL_RC2|SSL_MD5|SSL_TLSV1,
757 SSL_EXPORT|SSL_EXP56,
758 0,
759 56,
760 128,
761 SSL_ALL_CIPHERS,
762 SSL_ALL_STRENGTHS,
763 },
764 /* Cipher 62 */
765 {
766 1,
767 TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA,
768 TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA,
769 SSL_kRSA|SSL_aRSA|SSL_DES|SSL_SHA|SSL_TLSV1,
770 SSL_EXPORT|SSL_EXP56,
771 0,
772 56,
773 56,
774 SSL_ALL_CIPHERS,
775 SSL_ALL_STRENGTHS,
776 },
777 /* Cipher 63 */
778 {
779 1,
780 TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA,
781 TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA,
782 SSL_kEDH|SSL_aDSS|SSL_DES|SSL_SHA|SSL_TLSV1,
783 SSL_EXPORT|SSL_EXP56,
784 0,
785 56,
786 56,
787 SSL_ALL_CIPHERS,
788 SSL_ALL_STRENGTHS,
789 },
790 /* Cipher 64 */
791 {
792 1,
793 TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA,
794 TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA,
795 SSL_kRSA|SSL_aRSA|SSL_RC4|SSL_SHA|SSL_TLSV1,
796 SSL_EXPORT|SSL_EXP56,
797 0,
798 56,
799 128,
800 SSL_ALL_CIPHERS,
801 SSL_ALL_STRENGTHS,
802 },
803 /* Cipher 65 */
804 {
805 1,
806 TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA,
807 TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA,
808 SSL_kEDH|SSL_aDSS|SSL_RC4|SSL_SHA|SSL_TLSV1,
809 SSL_EXPORT|SSL_EXP56,
810 0,
811 56,
812 128,
813 SSL_ALL_CIPHERS,
814 SSL_ALL_STRENGTHS,
815 },
816 /* Cipher 66 */
817 {
818 1,
819 TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA,
820 TLS1_CK_DHE_DSS_WITH_RC4_128_SHA,
821 SSL_kEDH|SSL_aDSS|SSL_RC4|SSL_SHA|SSL_TLSV1,
822 SSL_NOT_EXP|SSL_MEDIUM,
823 0,
824 128,
825 128,
826 SSL_ALL_CIPHERS,
827 SSL_ALL_STRENGTHS
828 },
829#endif
830 /* New AES ciphersuites */
831
832 /* Cipher 2F */
833 {
834 1,
835 TLS1_TXT_RSA_WITH_AES_128_SHA,
836 TLS1_CK_RSA_WITH_AES_128_SHA,
837 SSL_kRSA|SSL_aRSA|SSL_AES|SSL_SHA |SSL_TLSV1,
838 SSL_NOT_EXP|SSL_MEDIUM,
839 0,
840 128,
841 128,
842 SSL_ALL_CIPHERS,
843 SSL_ALL_STRENGTHS,
844 },
845 /* Cipher 30 */
846 {
847 0,
848 TLS1_TXT_DH_DSS_WITH_AES_128_SHA,
849 TLS1_CK_DH_DSS_WITH_AES_128_SHA,
850 SSL_kDHd|SSL_aDH|SSL_AES|SSL_SHA|SSL_TLSV1,
851 SSL_NOT_EXP|SSL_MEDIUM,
852 0,
853 128,
854 128,
855 SSL_ALL_CIPHERS,
856 SSL_ALL_STRENGTHS,
857 },
858 /* Cipher 31 */
859 {
860 0,
861 TLS1_TXT_DH_RSA_WITH_AES_128_SHA,
862 TLS1_CK_DH_RSA_WITH_AES_128_SHA,
863 SSL_kDHr|SSL_aDH|SSL_AES|SSL_SHA|SSL_TLSV1,
864 SSL_NOT_EXP|SSL_MEDIUM,
865 0,
866 128,
867 128,
868 SSL_ALL_CIPHERS,
869 SSL_ALL_STRENGTHS,
870 },
871 /* Cipher 32 */
872 {
873 1,
874 TLS1_TXT_DHE_DSS_WITH_AES_128_SHA,
875 TLS1_CK_DHE_DSS_WITH_AES_128_SHA,
876 SSL_kEDH|SSL_aDSS|SSL_AES|SSL_SHA|SSL_TLSV1,
877 SSL_NOT_EXP|SSL_MEDIUM,
878 0,
879 128,
880 128,
881 SSL_ALL_CIPHERS,
882 SSL_ALL_STRENGTHS,
883 },
884 /* Cipher 33 */
885 {
886 1,
887 TLS1_TXT_DHE_RSA_WITH_AES_128_SHA,
888 TLS1_CK_DHE_RSA_WITH_AES_128_SHA,
889 SSL_kEDH|SSL_aRSA|SSL_AES|SSL_SHA|SSL_TLSV1,
890 SSL_NOT_EXP|SSL_MEDIUM,
891 0,
892 128,
893 128,
894 SSL_ALL_CIPHERS,
895 SSL_ALL_STRENGTHS,
896 },
897 /* Cipher 34 */
898 {
899 1,
900 TLS1_TXT_ADH_WITH_AES_128_SHA,
901 TLS1_CK_ADH_WITH_AES_128_SHA,
902 SSL_kEDH|SSL_aNULL|SSL_AES|SSL_SHA|SSL_TLSV1,
903 SSL_NOT_EXP|SSL_MEDIUM,
904 0,
905 128,
906 128,
907 SSL_ALL_CIPHERS,
908 SSL_ALL_STRENGTHS,
909 },
910
911 /* Cipher 35 */
912 {
913 1,
914 TLS1_TXT_RSA_WITH_AES_256_SHA,
915 TLS1_CK_RSA_WITH_AES_256_SHA,
916 SSL_kRSA|SSL_aRSA|SSL_AES|SSL_SHA |SSL_TLSV1,
917 SSL_NOT_EXP|SSL_HIGH,
918 0,
919 256,
920 256,
921 SSL_ALL_CIPHERS,
922 SSL_ALL_STRENGTHS,
923 },
924 /* Cipher 36 */
925 {
926 0,
927 TLS1_TXT_DH_DSS_WITH_AES_256_SHA,
928 TLS1_CK_DH_DSS_WITH_AES_256_SHA,
929 SSL_kDHd|SSL_aDH|SSL_AES|SSL_SHA|SSL_TLSV1,
930 SSL_NOT_EXP|SSL_HIGH,
931 0,
932 256,
933 256,
934 SSL_ALL_CIPHERS,
935 SSL_ALL_STRENGTHS,
936 },
937 /* Cipher 37 */
938 {
939 0,
940 TLS1_TXT_DH_RSA_WITH_AES_256_SHA,
941 TLS1_CK_DH_RSA_WITH_AES_256_SHA,
942 SSL_kDHr|SSL_aDH|SSL_AES|SSL_SHA|SSL_TLSV1,
943 SSL_NOT_EXP|SSL_HIGH,
944 0,
945 256,
946 256,
947 SSL_ALL_CIPHERS,
948 SSL_ALL_STRENGTHS,
949 },
950 /* Cipher 38 */
951 {
952 1,
953 TLS1_TXT_DHE_DSS_WITH_AES_256_SHA,
954 TLS1_CK_DHE_DSS_WITH_AES_256_SHA,
955 SSL_kEDH|SSL_aDSS|SSL_AES|SSL_SHA|SSL_TLSV1,
956 SSL_NOT_EXP|SSL_HIGH,
957 0,
958 256,
959 256,
960 SSL_ALL_CIPHERS,
961 SSL_ALL_STRENGTHS,
962 },
963 /* Cipher 39 */
964 {
965 1,
966 TLS1_TXT_DHE_RSA_WITH_AES_256_SHA,
967 TLS1_CK_DHE_RSA_WITH_AES_256_SHA,
968 SSL_kEDH|SSL_aRSA|SSL_AES|SSL_SHA|SSL_TLSV1,
969 SSL_NOT_EXP|SSL_HIGH,
970 0,
971 256,
972 256,
973 SSL_ALL_CIPHERS,
974 SSL_ALL_STRENGTHS,
975 },
976 /* Cipher 3A */
977 {
978 1,
979 TLS1_TXT_ADH_WITH_AES_256_SHA,
980 TLS1_CK_ADH_WITH_AES_256_SHA,
981 SSL_kEDH|SSL_aNULL|SSL_AES|SSL_SHA|SSL_TLSV1,
982 SSL_NOT_EXP|SSL_HIGH,
983 0,
984 256,
985 256,
986 SSL_ALL_CIPHERS,
987 SSL_ALL_STRENGTHS,
988 },
989
990/* end of list */
991 };
992
993static SSL3_ENC_METHOD SSLv3_enc_data={
994 ssl3_enc,
995 ssl3_mac,
996 ssl3_setup_key_block,
997 ssl3_generate_master_secret,
998 ssl3_change_cipher_state,
999 ssl3_final_finish_mac,
1000 MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH,
1001 ssl3_cert_verify_mac,
1002 SSL3_MD_CLIENT_FINISHED_CONST,4,
1003 SSL3_MD_SERVER_FINISHED_CONST,4,
1004 ssl3_alert_code,
1005 };
1006
1007static SSL_METHOD SSLv3_data= {
1008 SSL3_VERSION,
1009 ssl3_new,
1010 ssl3_clear,
1011 ssl3_free,
1012 ssl_undefined_function,
1013 ssl_undefined_function,
1014 ssl3_read,
1015 ssl3_peek,
1016 ssl3_write,
1017 ssl3_shutdown,
1018 ssl3_renegotiate,
1019 ssl3_renegotiate_check,
1020 ssl3_ctrl,
1021 ssl3_ctx_ctrl,
1022 ssl3_get_cipher_by_char,
1023 ssl3_put_cipher_by_char,
1024 ssl3_pending,
1025 ssl3_num_ciphers,
1026 ssl3_get_cipher,
1027 ssl_bad_method,
1028 ssl3_default_timeout,
1029 &SSLv3_enc_data,
1030 ssl_undefined_function,
1031 ssl3_callback_ctrl,
1032 ssl3_ctx_callback_ctrl,
1033 };
1034
1035static long ssl3_default_timeout(void)
1036 {
1037 /* 2 hours, the 24 hours mentioned in the SSLv3 spec
1038 * is way too long for http, the cache would over fill */
1039 return(60*60*2);
1040 }
1041
1042SSL_METHOD *sslv3_base_method(void)
1043 {
1044 return(&SSLv3_data);
1045 }
1046
1047int ssl3_num_ciphers(void)
1048 {
1049 return(SSL3_NUM_CIPHERS);
1050 }
1051
1052SSL_CIPHER *ssl3_get_cipher(unsigned int u)
1053 {
1054 if (u < SSL3_NUM_CIPHERS)
1055 return(&(ssl3_ciphers[SSL3_NUM_CIPHERS-1-u]));
1056 else
1057 return(NULL);
1058 }
1059
1060int ssl3_pending(SSL *s)
1061 {
1062 if (s->rstate == SSL_ST_READ_BODY)
1063 return 0;
1064
1065 return (s->s3->rrec.type == SSL3_RT_APPLICATION_DATA) ? s->s3->rrec.length : 0;
1066 }
1067
1068int ssl3_new(SSL *s)
1069 {
1070 SSL3_STATE *s3;
1071
1072 if ((s3=OPENSSL_malloc(sizeof *s3)) == NULL) goto err;
1073 memset(s3,0,sizeof *s3);
1074 EVP_MD_CTX_init(&s3->finish_dgst1);
1075 EVP_MD_CTX_init(&s3->finish_dgst2);
1076
1077 s->s3=s3;
1078
1079 s->method->ssl_clear(s);
1080 return(1);
1081err:
1082 return(0);
1083 }
1084
1085void ssl3_free(SSL *s)
1086 {
1087 if(s == NULL)
1088 return;
1089
1090 ssl3_cleanup_key_block(s);
1091 if (s->s3->rbuf.buf != NULL)
1092 OPENSSL_free(s->s3->rbuf.buf);
1093 if (s->s3->wbuf.buf != NULL)
1094 OPENSSL_free(s->s3->wbuf.buf);
1095 if (s->s3->rrec.comp != NULL)
1096 OPENSSL_free(s->s3->rrec.comp);
1097#ifndef OPENSSL_NO_DH
1098 if (s->s3->tmp.dh != NULL)
1099 DH_free(s->s3->tmp.dh);
1100#endif
1101 if (s->s3->tmp.ca_names != NULL)
1102 sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free);
1103 EVP_MD_CTX_cleanup(&s->s3->finish_dgst1);
1104 EVP_MD_CTX_cleanup(&s->s3->finish_dgst2);
1105 OPENSSL_cleanse(s->s3,sizeof *s->s3);
1106 OPENSSL_free(s->s3);
1107 s->s3=NULL;
1108 }
1109
1110void ssl3_clear(SSL *s)
1111 {
1112 unsigned char *rp,*wp;
1113 size_t rlen, wlen;
1114
1115 ssl3_cleanup_key_block(s);
1116 if (s->s3->tmp.ca_names != NULL)
1117 sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free);
1118
1119 if (s->s3->rrec.comp != NULL)
1120 {
1121 OPENSSL_free(s->s3->rrec.comp);
1122 s->s3->rrec.comp=NULL;
1123 }
1124#ifndef OPENSSL_NO_DH
1125 if (s->s3->tmp.dh != NULL)
1126 DH_free(s->s3->tmp.dh);
1127#endif
1128
1129 rp = s->s3->rbuf.buf;
1130 wp = s->s3->wbuf.buf;
1131 rlen = s->s3->rbuf.len;
1132 wlen = s->s3->wbuf.len;
1133
1134 EVP_MD_CTX_cleanup(&s->s3->finish_dgst1);
1135 EVP_MD_CTX_cleanup(&s->s3->finish_dgst2);
1136
1137 memset(s->s3,0,sizeof *s->s3);
1138 s->s3->rbuf.buf = rp;
1139 s->s3->wbuf.buf = wp;
1140 s->s3->rbuf.len = rlen;
1141 s->s3->wbuf.len = wlen;
1142
1143 ssl_free_wbio_buffer(s);
1144
1145 s->packet_length=0;
1146 s->s3->renegotiate=0;
1147 s->s3->total_renegotiations=0;
1148 s->s3->num_renegotiations=0;
1149 s->s3->in_read_app_data=0;
1150 s->version=SSL3_VERSION;
1151 }
1152
1153long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
1154 {
1155 int ret=0;
1156
1157#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_RSA)
1158 if (
1159#ifndef OPENSSL_NO_RSA
1160 cmd == SSL_CTRL_SET_TMP_RSA ||
1161 cmd == SSL_CTRL_SET_TMP_RSA_CB ||
1162#endif
1163#ifndef OPENSSL_NO_DSA
1164 cmd == SSL_CTRL_SET_TMP_DH ||
1165 cmd == SSL_CTRL_SET_TMP_DH_CB ||
1166#endif
1167 0)
1168 {
1169 if (!ssl_cert_inst(&s->cert))
1170 {
1171 SSLerr(SSL_F_SSL3_CTRL, ERR_R_MALLOC_FAILURE);
1172 return(0);
1173 }
1174 }
1175#endif
1176
1177 switch (cmd)
1178 {
1179 case SSL_CTRL_GET_SESSION_REUSED:
1180 ret=s->hit;
1181 break;
1182 case SSL_CTRL_GET_CLIENT_CERT_REQUEST:
1183 break;
1184 case SSL_CTRL_GET_NUM_RENEGOTIATIONS:
1185 ret=s->s3->num_renegotiations;
1186 break;
1187 case SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS:
1188 ret=s->s3->num_renegotiations;
1189 s->s3->num_renegotiations=0;
1190 break;
1191 case SSL_CTRL_GET_TOTAL_RENEGOTIATIONS:
1192 ret=s->s3->total_renegotiations;
1193 break;
1194 case SSL_CTRL_GET_FLAGS:
1195 ret=(int)(s->s3->flags);
1196 break;
1197#ifndef OPENSSL_NO_RSA
1198 case SSL_CTRL_NEED_TMP_RSA:
1199 if ((s->cert != NULL) && (s->cert->rsa_tmp == NULL) &&
1200 ((s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL) ||
1201 (EVP_PKEY_size(s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey) > (512/8))))
1202 ret = 1;
1203 break;
1204 case SSL_CTRL_SET_TMP_RSA:
1205 {
1206 RSA *rsa = (RSA *)parg;
1207 if (rsa == NULL)
1208 {
1209 SSLerr(SSL_F_SSL3_CTRL, ERR_R_PASSED_NULL_PARAMETER);
1210 return(ret);
1211 }
1212 if ((rsa = RSAPrivateKey_dup(rsa)) == NULL)
1213 {
1214 SSLerr(SSL_F_SSL3_CTRL, ERR_R_RSA_LIB);
1215 return(ret);
1216 }
1217 if (s->cert->rsa_tmp != NULL)
1218 RSA_free(s->cert->rsa_tmp);
1219 s->cert->rsa_tmp = rsa;
1220 ret = 1;
1221 }
1222 break;
1223 case SSL_CTRL_SET_TMP_RSA_CB:
1224 {
1225 SSLerr(SSL_F_SSL3_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
1226 return(ret);
1227 }
1228 break;
1229#endif
1230#ifndef OPENSSL_NO_DH
1231 case SSL_CTRL_SET_TMP_DH:
1232 {
1233 DH *dh = (DH *)parg;
1234 if (dh == NULL)
1235 {
1236 SSLerr(SSL_F_SSL3_CTRL, ERR_R_PASSED_NULL_PARAMETER);
1237 return(ret);
1238 }
1239 if ((dh = DHparams_dup(dh)) == NULL)
1240 {
1241 SSLerr(SSL_F_SSL3_CTRL, ERR_R_DH_LIB);
1242 return(ret);
1243 }
1244 if (!(s->options & SSL_OP_SINGLE_DH_USE))
1245 {
1246 if (!DH_generate_key(dh))
1247 {
1248 DH_free(dh);
1249 SSLerr(SSL_F_SSL3_CTRL, ERR_R_DH_LIB);
1250 return(ret);
1251 }
1252 }
1253 if (s->cert->dh_tmp != NULL)
1254 DH_free(s->cert->dh_tmp);
1255 s->cert->dh_tmp = dh;
1256 ret = 1;
1257 }
1258 break;
1259 case SSL_CTRL_SET_TMP_DH_CB:
1260 {
1261 SSLerr(SSL_F_SSL3_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
1262 return(ret);
1263 }
1264 break;
1265#endif
1266 default:
1267 break;
1268 }
1269 return(ret);
1270 }
1271
1272long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)())
1273 {
1274 int ret=0;
1275
1276#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_RSA)
1277 if (
1278#ifndef OPENSSL_NO_RSA
1279 cmd == SSL_CTRL_SET_TMP_RSA_CB ||
1280#endif
1281#ifndef OPENSSL_NO_DSA
1282 cmd == SSL_CTRL_SET_TMP_DH_CB ||
1283#endif
1284 0)
1285 {
1286 if (!ssl_cert_inst(&s->cert))
1287 {
1288 SSLerr(SSL_F_SSL3_CALLBACK_CTRL, ERR_R_MALLOC_FAILURE);
1289 return(0);
1290 }
1291 }
1292#endif
1293
1294 switch (cmd)
1295 {
1296#ifndef OPENSSL_NO_RSA
1297 case SSL_CTRL_SET_TMP_RSA_CB:
1298 {
1299 s->cert->rsa_tmp_cb = (RSA *(*)(SSL *, int, int))fp;
1300 }
1301 break;
1302#endif
1303#ifndef OPENSSL_NO_DH
1304 case SSL_CTRL_SET_TMP_DH_CB:
1305 {
1306 s->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
1307 }
1308 break;
1309#endif
1310 default:
1311 break;
1312 }
1313 return(ret);
1314 }
1315
1316long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
1317 {
1318 CERT *cert;
1319
1320 cert=ctx->cert;
1321
1322 switch (cmd)
1323 {
1324#ifndef OPENSSL_NO_RSA
1325 case SSL_CTRL_NEED_TMP_RSA:
1326 if ( (cert->rsa_tmp == NULL) &&
1327 ((cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL) ||
1328 (EVP_PKEY_size(cert->pkeys[SSL_PKEY_RSA_ENC].privatekey) > (512/8)))
1329 )
1330 return(1);
1331 else
1332 return(0);
1333 /* break; */
1334 case SSL_CTRL_SET_TMP_RSA:
1335 {
1336 RSA *rsa;
1337 int i;
1338
1339 rsa=(RSA *)parg;
1340 i=1;
1341 if (rsa == NULL)
1342 i=0;
1343 else
1344 {
1345 if ((rsa=RSAPrivateKey_dup(rsa)) == NULL)
1346 i=0;
1347 }
1348 if (!i)
1349 {
1350 SSLerr(SSL_F_SSL3_CTX_CTRL,ERR_R_RSA_LIB);
1351 return(0);
1352 }
1353 else
1354 {
1355 if (cert->rsa_tmp != NULL)
1356 RSA_free(cert->rsa_tmp);
1357 cert->rsa_tmp=rsa;
1358 return(1);
1359 }
1360 }
1361 /* break; */
1362 case SSL_CTRL_SET_TMP_RSA_CB:
1363 {
1364 SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
1365 return(0);
1366 }
1367 break;
1368#endif
1369#ifndef OPENSSL_NO_DH
1370 case SSL_CTRL_SET_TMP_DH:
1371 {
1372 DH *new=NULL,*dh;
1373
1374 dh=(DH *)parg;
1375 if ((new=DHparams_dup(dh)) == NULL)
1376 {
1377 SSLerr(SSL_F_SSL3_CTX_CTRL,ERR_R_DH_LIB);
1378 return 0;
1379 }
1380 if (!(ctx->options & SSL_OP_SINGLE_DH_USE))
1381 {
1382 if (!DH_generate_key(new))
1383 {
1384 SSLerr(SSL_F_SSL3_CTX_CTRL,ERR_R_DH_LIB);
1385 DH_free(new);
1386 return 0;
1387 }
1388 }
1389 if (cert->dh_tmp != NULL)
1390 DH_free(cert->dh_tmp);
1391 cert->dh_tmp=new;
1392 return 1;
1393 }
1394 /*break; */
1395 case SSL_CTRL_SET_TMP_DH_CB:
1396 {
1397 SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
1398 return(0);
1399 }
1400 break;
1401#endif
1402 /* A Thawte special :-) */
1403 case SSL_CTRL_EXTRA_CHAIN_CERT:
1404 if (ctx->extra_certs == NULL)
1405 {
1406 if ((ctx->extra_certs=sk_X509_new_null()) == NULL)
1407 return(0);
1408 }
1409 sk_X509_push(ctx->extra_certs,(X509 *)parg);
1410 break;
1411
1412 default:
1413 return(0);
1414 }
1415 return(1);
1416 }
1417
1418long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)())
1419 {
1420 CERT *cert;
1421
1422 cert=ctx->cert;
1423
1424 switch (cmd)
1425 {
1426#ifndef OPENSSL_NO_RSA
1427 case SSL_CTRL_SET_TMP_RSA_CB:
1428 {
1429 cert->rsa_tmp_cb = (RSA *(*)(SSL *, int, int))fp;
1430 }
1431 break;
1432#endif
1433#ifndef OPENSSL_NO_DH
1434 case SSL_CTRL_SET_TMP_DH_CB:
1435 {
1436 cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
1437 }
1438 break;
1439#endif
1440 default:
1441 return(0);
1442 }
1443 return(1);
1444 }
1445
1446/* This function needs to check if the ciphers required are actually
1447 * available */
1448SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p)
1449 {
1450 static int init=1;
1451 static SSL_CIPHER *sorted[SSL3_NUM_CIPHERS];
1452 SSL_CIPHER c,*cp= &c,**cpp;
1453 unsigned long id;
1454 int i;
1455
1456 if (init)
1457 {
1458 CRYPTO_w_lock(CRYPTO_LOCK_SSL);
1459
1460 if (init)
1461 {
1462 for (i=0; i<SSL3_NUM_CIPHERS; i++)
1463 sorted[i]= &(ssl3_ciphers[i]);
1464
1465 qsort(sorted,
1466 SSL3_NUM_CIPHERS,sizeof(SSL_CIPHER *),
1467 FP_ICC ssl_cipher_ptr_id_cmp);
1468
1469 init=0;
1470 }
1471
1472 CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
1473 }
1474
1475 id=0x03000000L|((unsigned long)p[0]<<8L)|(unsigned long)p[1];
1476 c.id=id;
1477 cpp=(SSL_CIPHER **)OBJ_bsearch((char *)&cp,
1478 (char *)sorted,
1479 SSL3_NUM_CIPHERS,sizeof(SSL_CIPHER *),
1480 FP_ICC ssl_cipher_ptr_id_cmp);
1481 if ((cpp == NULL) || !(*cpp)->valid)
1482 return(NULL);
1483 else
1484 return(*cpp);
1485 }
1486
1487int ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
1488 {
1489 long l;
1490
1491 if (p != NULL)
1492 {
1493 l=c->id;
1494 if ((l & 0xff000000) != 0x03000000) return(0);
1495 p[0]=((unsigned char)(l>> 8L))&0xFF;
1496 p[1]=((unsigned char)(l ))&0xFF;
1497 }
1498 return(2);
1499 }
1500
1501SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
1502 STACK_OF(SSL_CIPHER) *srvr)
1503 {
1504 SSL_CIPHER *c,*ret=NULL;
1505 STACK_OF(SSL_CIPHER) *prio, *allow;
1506 int i,j,ok;
1507 CERT *cert;
1508 unsigned long alg,mask,emask;
1509
1510 /* Let's see which ciphers we can support */
1511 cert=s->cert;
1512
1513#if 0
1514 /* Do not set the compare functions, because this may lead to a
1515 * reordering by "id". We want to keep the original ordering.
1516 * We may pay a price in performance during sk_SSL_CIPHER_find(),
1517 * but would have to pay with the price of sk_SSL_CIPHER_dup().
1518 */
1519 sk_SSL_CIPHER_set_cmp_func(srvr, ssl_cipher_ptr_id_cmp);
1520 sk_SSL_CIPHER_set_cmp_func(clnt, ssl_cipher_ptr_id_cmp);
1521#endif
1522
1523#ifdef CIPHER_DEBUG
1524 printf("Server has %d from %p:\n", sk_SSL_CIPHER_num(srvr), srvr);
1525 for(i=0 ; i < sk_SSL_CIPHER_num(srvr) ; ++i)
1526 {
1527 c=sk_SSL_CIPHER_value(srvr,i);
1528 printf("%p:%s\n",c,c->name);
1529 }
1530 printf("Client sent %d from %p:\n", sk_SSL_CIPHER_num(clnt), clnt);
1531 for(i=0 ; i < sk_SSL_CIPHER_num(clnt) ; ++i)
1532 {
1533 c=sk_SSL_CIPHER_value(clnt,i);
1534 printf("%p:%s\n",c,c->name);
1535 }
1536#endif
1537
1538 if (s->options & SSL_OP_CIPHER_SERVER_PREFERENCE)
1539 {
1540 prio = srvr;
1541 allow = clnt;
1542 }
1543 else
1544 {
1545 prio = clnt;
1546 allow = srvr;
1547 }
1548
1549 for (i=0; i<sk_SSL_CIPHER_num(prio); i++)
1550 {
1551 c=sk_SSL_CIPHER_value(prio,i);
1552
1553 ssl_set_cert_masks(cert,c);
1554 mask=cert->mask;
1555 emask=cert->export_mask;
1556
1557#ifdef KSSL_DEBUG
1558 printf("ssl3_choose_cipher %d alg= %lx\n", i,c->algorithms);
1559#endif /* KSSL_DEBUG */
1560
1561 alg=c->algorithms&(SSL_MKEY_MASK|SSL_AUTH_MASK);
1562#ifndef OPENSSL_NO_KRB5
1563 if (alg & SSL_KRB5)
1564 {
1565 if ( !kssl_keytab_is_available(s->kssl_ctx) )
1566 continue;
1567 }
1568#endif /* OPENSSL_NO_KRB5 */
1569 if (SSL_C_IS_EXPORT(c))
1570 {
1571 ok=((alg & emask) == alg)?1:0;
1572#ifdef CIPHER_DEBUG
1573 printf("%d:[%08lX:%08lX]%p:%s (export)\n",ok,alg,emask,
1574 c,c->name);
1575#endif
1576 }
1577 else
1578 {
1579 ok=((alg & mask) == alg)?1:0;
1580#ifdef CIPHER_DEBUG
1581 printf("%d:[%08lX:%08lX]%p:%s\n",ok,alg,mask,c,
1582 c->name);
1583#endif
1584 }
1585
1586 if (!ok) continue;
1587
1588 j=sk_SSL_CIPHER_find(allow,c);
1589 if (j >= 0)
1590 {
1591 ret=sk_SSL_CIPHER_value(allow,j);
1592 break;
1593 }
1594 }
1595 return(ret);
1596 }
1597
1598int ssl3_get_req_cert_type(SSL *s, unsigned char *p)
1599 {
1600 int ret=0;
1601 unsigned long alg;
1602
1603 alg=s->s3->tmp.new_cipher->algorithms;
1604
1605#ifndef OPENSSL_NO_DH
1606 if (alg & (SSL_kDHr|SSL_kEDH))
1607 {
1608# ifndef OPENSSL_NO_RSA
1609 p[ret++]=SSL3_CT_RSA_FIXED_DH;
1610# endif
1611# ifndef OPENSSL_NO_DSA
1612 p[ret++]=SSL3_CT_DSS_FIXED_DH;
1613# endif
1614 }
1615 if ((s->version == SSL3_VERSION) &&
1616 (alg & (SSL_kEDH|SSL_kDHd|SSL_kDHr)))
1617 {
1618# ifndef OPENSSL_NO_RSA
1619 p[ret++]=SSL3_CT_RSA_EPHEMERAL_DH;
1620# endif
1621# ifndef OPENSSL_NO_DSA
1622 p[ret++]=SSL3_CT_DSS_EPHEMERAL_DH;
1623# endif
1624 }
1625#endif /* !OPENSSL_NO_DH */
1626#ifndef OPENSSL_NO_RSA
1627 p[ret++]=SSL3_CT_RSA_SIGN;
1628#endif
1629#ifndef OPENSSL_NO_DSA
1630 p[ret++]=SSL3_CT_DSS_SIGN;
1631#endif
1632 return(ret);
1633 }
1634
1635int ssl3_shutdown(SSL *s)
1636 {
1637
1638 /* Don't do anything much if we have not done the handshake or
1639 * we don't want to send messages :-) */
1640 if ((s->quiet_shutdown) || (s->state == SSL_ST_BEFORE))
1641 {
1642 s->shutdown=(SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
1643 return(1);
1644 }
1645
1646 if (!(s->shutdown & SSL_SENT_SHUTDOWN))
1647 {
1648 s->shutdown|=SSL_SENT_SHUTDOWN;
1649#if 1
1650 ssl3_send_alert(s,SSL3_AL_WARNING,SSL_AD_CLOSE_NOTIFY);
1651#endif
1652 /* our shutdown alert has been sent now, and if it still needs
1653 * to be written, s->s3->alert_dispatch will be true */
1654 }
1655 else if (s->s3->alert_dispatch)
1656 {
1657 /* resend it if not sent */
1658#if 1
1659 ssl3_dispatch_alert(s);
1660#endif
1661 }
1662 else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN))
1663 {
1664 /* If we are waiting for a close from our peer, we are closed */
1665 ssl3_read_bytes(s,0,NULL,0,0);
1666 }
1667
1668 if ((s->shutdown == (SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN)) &&
1669 !s->s3->alert_dispatch)
1670 return(1);
1671 else
1672 return(0);
1673 }
1674
1675int ssl3_write(SSL *s, const void *buf, int len)
1676 {
1677 int ret,n;
1678
1679#if 0
1680 if (s->shutdown & SSL_SEND_SHUTDOWN)
1681 {
1682 s->rwstate=SSL_NOTHING;
1683 return(0);
1684 }
1685#endif
1686 clear_sys_error();
1687 if (s->s3->renegotiate) ssl3_renegotiate_check(s);
1688
1689 /* This is an experimental flag that sends the
1690 * last handshake message in the same packet as the first
1691 * use data - used to see if it helps the TCP protocol during
1692 * session-id reuse */
1693 /* The second test is because the buffer may have been removed */
1694 if ((s->s3->flags & SSL3_FLAGS_POP_BUFFER) && (s->wbio == s->bbio))
1695 {
1696 /* First time through, we write into the buffer */
1697 if (s->s3->delay_buf_pop_ret == 0)
1698 {
1699 ret=ssl3_write_bytes(s,SSL3_RT_APPLICATION_DATA,
1700 buf,len);
1701 if (ret <= 0) return(ret);
1702
1703 s->s3->delay_buf_pop_ret=ret;
1704 }
1705
1706 s->rwstate=SSL_WRITING;
1707 n=BIO_flush(s->wbio);
1708 if (n <= 0) return(n);
1709 s->rwstate=SSL_NOTHING;
1710
1711 /* We have flushed the buffer, so remove it */
1712 ssl_free_wbio_buffer(s);
1713 s->s3->flags&= ~SSL3_FLAGS_POP_BUFFER;
1714
1715 ret=s->s3->delay_buf_pop_ret;
1716 s->s3->delay_buf_pop_ret=0;
1717 }
1718 else
1719 {
1720 ret=ssl3_write_bytes(s,SSL3_RT_APPLICATION_DATA,
1721 buf,len);
1722 if (ret <= 0) return(ret);
1723 }
1724
1725 return(ret);
1726 }
1727
1728static int ssl3_read_internal(SSL *s, void *buf, int len, int peek)
1729 {
1730 int ret;
1731
1732 clear_sys_error();
1733 if (s->s3->renegotiate) ssl3_renegotiate_check(s);
1734 s->s3->in_read_app_data=1;
1735 ret=ssl3_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
1736 if ((ret == -1) && (s->s3->in_read_app_data == 2))
1737 {
1738 /* ssl3_read_bytes decided to call s->handshake_func, which
1739 * called ssl3_read_bytes to read handshake data.
1740 * However, ssl3_read_bytes actually found application data
1741 * and thinks that application data makes sense here; so disable
1742 * handshake processing and try to read application data again. */
1743 s->in_handshake++;
1744 ret=ssl3_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
1745 s->in_handshake--;
1746 }
1747 else
1748 s->s3->in_read_app_data=0;
1749
1750 return(ret);
1751 }
1752
1753int ssl3_read(SSL *s, void *buf, int len)
1754 {
1755 return ssl3_read_internal(s, buf, len, 0);
1756 }
1757
1758int ssl3_peek(SSL *s, void *buf, int len)
1759 {
1760 return ssl3_read_internal(s, buf, len, 1);
1761 }
1762
1763int ssl3_renegotiate(SSL *s)
1764 {
1765 if (s->handshake_func == NULL)
1766 return(1);
1767
1768 if (s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)
1769 return(0);
1770
1771 s->s3->renegotiate=1;
1772 return(1);
1773 }
1774
1775int ssl3_renegotiate_check(SSL *s)
1776 {
1777 int ret=0;
1778
1779 if (s->s3->renegotiate)
1780 {
1781 if ( (s->s3->rbuf.left == 0) &&
1782 (s->s3->wbuf.left == 0) &&
1783 !SSL_in_init(s))
1784 {
1785/*
1786if we are the server, and we have sent a 'RENEGOTIATE' message, we
1787need to go to SSL_ST_ACCEPT.
1788*/
1789 /* SSL_ST_ACCEPT */
1790 s->state=SSL_ST_RENEGOTIATE;
1791 s->s3->renegotiate=0;
1792 s->s3->num_renegotiations++;
1793 s->s3->total_renegotiations++;
1794 ret=1;
1795 }
1796 }
1797 return(ret);
1798 }
1799
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c
new file mode 100644
index 0000000000..9f3e5139ad
--- /dev/null
+++ b/src/lib/libssl/s3_pkt.c
@@ -0,0 +1,1310 @@
1/* ssl/s3_pkt.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-2002 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 <stdio.h>
113#include <errno.h>
114#define USE_SOCKETS
115#include "ssl_locl.h"
116#include <openssl/evp.h>
117#include <openssl/buffer.h>
118
119static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
120 unsigned int len, int create_empty_fragment);
121static int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
122 unsigned int len);
123static int ssl3_get_record(SSL *s);
124static int do_compress(SSL *ssl);
125static int do_uncompress(SSL *ssl);
126static int do_change_cipher_spec(SSL *ssl);
127
128/* used only by ssl3_get_record */
129static int ssl3_read_n(SSL *s, int n, int max, int extend)
130 {
131 /* If extend == 0, obtain new n-byte packet; if extend == 1, increase
132 * packet by another n bytes.
133 * The packet will be in the sub-array of s->s3->rbuf.buf specified
134 * by s->packet and s->packet_length.
135 * (If s->read_ahead is set, 'max' bytes may be stored in rbuf
136 * [plus s->packet_length bytes if extend == 1].)
137 */
138 int i,off,newb;
139
140 if (!extend)
141 {
142 /* start with empty packet ... */
143 if (s->s3->rbuf.left == 0)
144 s->s3->rbuf.offset = 0;
145 s->packet = s->s3->rbuf.buf + s->s3->rbuf.offset;
146 s->packet_length = 0;
147 /* ... now we can act as if 'extend' was set */
148 }
149
150 /* if there is enough in the buffer from a previous read, take some */
151 if (s->s3->rbuf.left >= (int)n)
152 {
153 s->packet_length+=n;
154 s->s3->rbuf.left-=n;
155 s->s3->rbuf.offset+=n;
156 return(n);
157 }
158
159 /* else we need to read more data */
160 if (!s->read_ahead)
161 max=n;
162
163 {
164 /* avoid buffer overflow */
165 int max_max = s->s3->rbuf.len - s->packet_length;
166 if (max > max_max)
167 max = max_max;
168 }
169 if (n > max) /* does not happen */
170 {
171 SSLerr(SSL_F_SSL3_READ_N,ERR_R_INTERNAL_ERROR);
172 return -1;
173 }
174
175 off = s->packet_length;
176 newb = s->s3->rbuf.left;
177 /* Move any available bytes to front of buffer:
178 * 'off' bytes already pointed to by 'packet',
179 * 'newb' extra ones at the end */
180 if (s->packet != s->s3->rbuf.buf)
181 {
182 /* off > 0 */
183 memmove(s->s3->rbuf.buf, s->packet, off+newb);
184 s->packet = s->s3->rbuf.buf;
185 }
186
187 while (newb < n)
188 {
189 /* Now we have off+newb bytes at the front of s->s3->rbuf.buf and need
190 * to read in more until we have off+n (up to off+max if possible) */
191
192 clear_sys_error();
193 if (s->rbio != NULL)
194 {
195 s->rwstate=SSL_READING;
196 i=BIO_read(s->rbio, &(s->s3->rbuf.buf[off+newb]), max-newb);
197 }
198 else
199 {
200 SSLerr(SSL_F_SSL3_READ_N,SSL_R_READ_BIO_NOT_SET);
201 i = -1;
202 }
203
204 if (i <= 0)
205 {
206 s->s3->rbuf.left = newb;
207 return(i);
208 }
209 newb+=i;
210 }
211
212 /* done reading, now the book-keeping */
213 s->s3->rbuf.offset = off + n;
214 s->s3->rbuf.left = newb - n;
215 s->packet_length += n;
216 s->rwstate=SSL_NOTHING;
217 return(n);
218 }
219
220/* Call this to get a new input record.
221 * It will return <= 0 if more data is needed, normally due to an error
222 * or non-blocking IO.
223 * When it finishes, one packet has been decoded and can be found in
224 * ssl->s3->rrec.type - is the type of record
225 * ssl->s3->rrec.data, - data
226 * ssl->s3->rrec.length, - number of bytes
227 */
228/* used only by ssl3_read_bytes */
229static int ssl3_get_record(SSL *s)
230 {
231 int ssl_major,ssl_minor,al;
232 int enc_err,n,i,ret= -1;
233 SSL3_RECORD *rr;
234 SSL_SESSION *sess;
235 unsigned char *p;
236 unsigned char md[EVP_MAX_MD_SIZE];
237 short version;
238 unsigned int mac_size;
239 int clear=0;
240 size_t extra;
241 int decryption_failed_or_bad_record_mac = 0;
242 unsigned char *mac = NULL;
243
244 rr= &(s->s3->rrec);
245 sess=s->session;
246
247 if (s->options & SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER)
248 extra=SSL3_RT_MAX_EXTRA;
249 else
250 extra=0;
251 if (extra != s->s3->rbuf.len - SSL3_RT_MAX_PACKET_SIZE)
252 {
253 /* actually likely an application error: SLS_OP_MICROSOFT_BIG_SSLV3_BUFFER
254 * set after ssl3_setup_buffers() was done */
255 SSLerr(SSL_F_SSL3_GET_RECORD, ERR_R_INTERNAL_ERROR);
256 return -1;
257 }
258
259again:
260 /* check if we have the header */
261 if ( (s->rstate != SSL_ST_READ_BODY) ||
262 (s->packet_length < SSL3_RT_HEADER_LENGTH))
263 {
264 n=ssl3_read_n(s, SSL3_RT_HEADER_LENGTH, s->s3->rbuf.len, 0);
265 if (n <= 0) return(n); /* error or non-blocking */
266 s->rstate=SSL_ST_READ_BODY;
267
268 p=s->packet;
269
270 /* Pull apart the header into the SSL3_RECORD */
271 rr->type= *(p++);
272 ssl_major= *(p++);
273 ssl_minor= *(p++);
274 version=(ssl_major<<8)|ssl_minor;
275 n2s(p,rr->length);
276
277 /* Lets check version */
278 if (s->first_packet)
279 {
280 s->first_packet=0;
281 }
282 else
283 {
284 if (version != s->version)
285 {
286 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER);
287 /* Send back error using their
288 * version number :-) */
289 s->version=version;
290 al=SSL_AD_PROTOCOL_VERSION;
291 goto f_err;
292 }
293 }
294
295 if ((version>>8) != SSL3_VERSION_MAJOR)
296 {
297 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER);
298 goto err;
299 }
300
301 if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH+extra)
302 {
303 al=SSL_AD_RECORD_OVERFLOW;
304 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_PACKET_LENGTH_TOO_LONG);
305 goto f_err;
306 }
307
308 /* now s->rstate == SSL_ST_READ_BODY */
309 }
310
311 /* s->rstate == SSL_ST_READ_BODY, get and decode the data */
312
313 if (rr->length > s->packet_length-SSL3_RT_HEADER_LENGTH)
314 {
315 /* now s->packet_length == SSL3_RT_HEADER_LENGTH */
316 i=rr->length;
317 n=ssl3_read_n(s,i,i,1);
318 if (n <= 0) return(n); /* error or non-blocking io */
319 /* now n == rr->length,
320 * and s->packet_length == SSL3_RT_HEADER_LENGTH + rr->length */
321 }
322
323 s->rstate=SSL_ST_READ_HEADER; /* set state for later operations */
324
325 /* At this point, s->packet_length == SSL3_RT_HEADER_LNGTH + rr->length,
326 * and we have that many bytes in s->packet
327 */
328 rr->input= &(s->packet[SSL3_RT_HEADER_LENGTH]);
329
330 /* ok, we can now read from 's->packet' data into 'rr'
331 * rr->input points at rr->length bytes, which
332 * need to be copied into rr->data by either
333 * the decryption or by the decompression
334 * When the data is 'copied' into the rr->data buffer,
335 * rr->input will be pointed at the new buffer */
336
337 /* We now have - encrypted [ MAC [ compressed [ plain ] ] ]
338 * rr->length bytes of encrypted compressed stuff. */
339
340 /* check is not needed I believe */
341 if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH+extra)
342 {
343 al=SSL_AD_RECORD_OVERFLOW;
344 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_ENCRYPTED_LENGTH_TOO_LONG);
345 goto f_err;
346 }
347
348 /* decrypt in place in 'rr->input' */
349 rr->data=rr->input;
350
351 enc_err = s->method->ssl3_enc->enc(s,0);
352 if (enc_err <= 0)
353 {
354 if (enc_err == 0)
355 /* SSLerr() and ssl3_send_alert() have been called */
356 goto err;
357
358 /* Otherwise enc_err == -1, which indicates bad padding
359 * (rec->length has not been changed in this case).
360 * To minimize information leaked via timing, we will perform
361 * the MAC computation anyway. */
362 decryption_failed_or_bad_record_mac = 1;
363 }
364
365#ifdef TLS_DEBUG
366printf("dec %d\n",rr->length);
367{ unsigned int z; for (z=0; z<rr->length; z++) printf("%02X%c",rr->data[z],((z+1)%16)?' ':'\n'); }
368printf("\n");
369#endif
370
371 /* r->length is now the compressed data plus mac */
372 if ( (sess == NULL) ||
373 (s->enc_read_ctx == NULL) ||
374 (s->read_hash == NULL))
375 clear=1;
376
377 if (!clear)
378 {
379 mac_size=EVP_MD_size(s->read_hash);
380
381 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH+extra+mac_size)
382 {
383#if 0 /* OK only for stream ciphers (then rr->length is visible from ciphertext anyway) */
384 al=SSL_AD_RECORD_OVERFLOW;
385 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_PRE_MAC_LENGTH_TOO_LONG);
386 goto f_err;
387#else
388 decryption_failed_or_bad_record_mac = 1;
389#endif
390 }
391 /* check the MAC for rr->input (it's in mac_size bytes at the tail) */
392 if (rr->length >= mac_size)
393 {
394 rr->length -= mac_size;
395 mac = &rr->data[rr->length];
396 }
397 else
398 {
399 /* record (minus padding) is too short to contain a MAC */
400#if 0 /* OK only for stream ciphers */
401 al=SSL_AD_DECODE_ERROR;
402 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_LENGTH_TOO_SHORT);
403 goto f_err;
404#else
405 decryption_failed_or_bad_record_mac = 1;
406 rr->length = 0;
407#endif
408 }
409 i=s->method->ssl3_enc->mac(s,md,0);
410 if (mac == NULL || memcmp(md, mac, mac_size) != 0)
411 {
412 decryption_failed_or_bad_record_mac = 1;
413 }
414 }
415
416 if (decryption_failed_or_bad_record_mac)
417 {
418 /* A separate 'decryption_failed' alert was introduced with TLS 1.0,
419 * SSL 3.0 only has 'bad_record_mac'. But unless a decryption
420 * failure is directly visible from the ciphertext anyway,
421 * we should not reveal which kind of error occured -- this
422 * might become visible to an attacker (e.g. via a logfile) */
423 al=SSL_AD_BAD_RECORD_MAC;
424 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
425 goto f_err;
426 }
427
428 /* r->length is now just compressed */
429 if (s->expand != NULL)
430 {
431 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH+extra)
432 {
433 al=SSL_AD_RECORD_OVERFLOW;
434 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_COMPRESSED_LENGTH_TOO_LONG);
435 goto f_err;
436 }
437 if (!do_uncompress(s))
438 {
439 al=SSL_AD_DECOMPRESSION_FAILURE;
440 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_BAD_DECOMPRESSION);
441 goto f_err;
442 }
443 }
444
445 if (rr->length > SSL3_RT_MAX_PLAIN_LENGTH+extra)
446 {
447 al=SSL_AD_RECORD_OVERFLOW;
448 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_DATA_LENGTH_TOO_LONG);
449 goto f_err;
450 }
451
452 rr->off=0;
453 /* So at this point the following is true
454 * ssl->s3->rrec.type is the type of record
455 * ssl->s3->rrec.length == number of bytes in record
456 * ssl->s3->rrec.off == offset to first valid byte
457 * ssl->s3->rrec.data == where to take bytes from, increment
458 * after use :-).
459 */
460
461 /* we have pulled in a full packet so zero things */
462 s->packet_length=0;
463
464 /* just read a 0 length packet */
465 if (rr->length == 0) goto again;
466
467 return(1);
468
469f_err:
470 ssl3_send_alert(s,SSL3_AL_FATAL,al);
471err:
472 return(ret);
473 }
474
475static int do_uncompress(SSL *ssl)
476 {
477 int i;
478 SSL3_RECORD *rr;
479
480 rr= &(ssl->s3->rrec);
481 i=COMP_expand_block(ssl->expand,rr->comp,
482 SSL3_RT_MAX_PLAIN_LENGTH,rr->data,(int)rr->length);
483 if (i < 0)
484 return(0);
485 else
486 rr->length=i;
487 rr->data=rr->comp;
488
489 return(1);
490 }
491
492static int do_compress(SSL *ssl)
493 {
494 int i;
495 SSL3_RECORD *wr;
496
497 wr= &(ssl->s3->wrec);
498 i=COMP_compress_block(ssl->compress,wr->data,
499 SSL3_RT_MAX_COMPRESSED_LENGTH,
500 wr->input,(int)wr->length);
501 if (i < 0)
502 return(0);
503 else
504 wr->length=i;
505
506 wr->input=wr->data;
507 return(1);
508 }
509
510/* Call this to write data in records of type 'type'
511 * It will return <= 0 if not all data has been sent or non-blocking IO.
512 */
513int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
514 {
515 const unsigned char *buf=buf_;
516 unsigned int tot,n,nw;
517 int i;
518
519 s->rwstate=SSL_NOTHING;
520 tot=s->s3->wnum;
521 s->s3->wnum=0;
522
523 if (SSL_in_init(s) && !s->in_handshake)
524 {
525 i=s->handshake_func(s);
526 if (i < 0) return(i);
527 if (i == 0)
528 {
529 SSLerr(SSL_F_SSL3_WRITE_BYTES,SSL_R_SSL_HANDSHAKE_FAILURE);
530 return -1;
531 }
532 }
533
534 n=(len-tot);
535 for (;;)
536 {
537 if (n > SSL3_RT_MAX_PLAIN_LENGTH)
538 nw=SSL3_RT_MAX_PLAIN_LENGTH;
539 else
540 nw=n;
541
542 i=do_ssl3_write(s, type, &(buf[tot]), nw, 0);
543 if (i <= 0)
544 {
545 s->s3->wnum=tot;
546 return i;
547 }
548
549 if ((i == (int)n) ||
550 (type == SSL3_RT_APPLICATION_DATA &&
551 (s->mode & SSL_MODE_ENABLE_PARTIAL_WRITE)))
552 {
553 /* next chunk of data should get another prepended empty fragment
554 * in ciphersuites with known-IV weakness: */
555 s->s3->empty_fragment_done = 0;
556
557 return tot+i;
558 }
559
560 n-=i;
561 tot+=i;
562 }
563 }
564
565static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
566 unsigned int len, int create_empty_fragment)
567 {
568 unsigned char *p,*plen;
569 int i,mac_size,clear=0;
570 int prefix_len = 0;
571 SSL3_RECORD *wr;
572 SSL3_BUFFER *wb;
573 SSL_SESSION *sess;
574
575 /* first check if there is a SSL3_BUFFER still being written
576 * out. This will happen with non blocking IO */
577 if (s->s3->wbuf.left != 0)
578 return(ssl3_write_pending(s,type,buf,len));
579
580 /* If we have an alert to send, lets send it */
581 if (s->s3->alert_dispatch)
582 {
583 i=ssl3_dispatch_alert(s);
584 if (i <= 0)
585 return(i);
586 /* if it went, fall through and send more stuff */
587 }
588
589 if (len == 0 && !create_empty_fragment)
590 return 0;
591
592 wr= &(s->s3->wrec);
593 wb= &(s->s3->wbuf);
594 sess=s->session;
595
596 if ( (sess == NULL) ||
597 (s->enc_write_ctx == NULL) ||
598 (s->write_hash == NULL))
599 clear=1;
600
601 if (clear)
602 mac_size=0;
603 else
604 mac_size=EVP_MD_size(s->write_hash);
605
606 /* 'create_empty_fragment' is true only when this function calls itself */
607 if (!clear && !create_empty_fragment && !s->s3->empty_fragment_done)
608 {
609 /* countermeasure against known-IV weakness in CBC ciphersuites
610 * (see http://www.openssl.org/~bodo/tls-cbc.txt) */
611
612 if (s->s3->need_empty_fragments && type == SSL3_RT_APPLICATION_DATA)
613 {
614 /* recursive function call with 'create_empty_fragment' set;
615 * this prepares and buffers the data for an empty fragment
616 * (these 'prefix_len' bytes are sent out later
617 * together with the actual payload) */
618 prefix_len = do_ssl3_write(s, type, buf, 0, 1);
619 if (prefix_len <= 0)
620 goto err;
621
622 if (s->s3->wbuf.len < (size_t)prefix_len + SSL3_RT_MAX_PACKET_SIZE)
623 {
624 /* insufficient space */
625 SSLerr(SSL_F_DO_SSL3_WRITE, ERR_R_INTERNAL_ERROR);
626 goto err;
627 }
628 }
629
630 s->s3->empty_fragment_done = 1;
631 }
632
633 p = wb->buf + prefix_len;
634
635 /* write the header */
636
637 *(p++)=type&0xff;
638 wr->type=type;
639
640 *(p++)=(s->version>>8);
641 *(p++)=s->version&0xff;
642
643 /* field where we are to write out packet length */
644 plen=p;
645 p+=2;
646
647 /* lets setup the record stuff. */
648 wr->data=p;
649 wr->length=(int)len;
650 wr->input=(unsigned char *)buf;
651
652 /* we now 'read' from wr->input, wr->length bytes into
653 * wr->data */
654
655 /* first we compress */
656 if (s->compress != NULL)
657 {
658 if (!do_compress(s))
659 {
660 SSLerr(SSL_F_DO_SSL3_WRITE,SSL_R_COMPRESSION_FAILURE);
661 goto err;
662 }
663 }
664 else
665 {
666 memcpy(wr->data,wr->input,wr->length);
667 wr->input=wr->data;
668 }
669
670 /* we should still have the output to wr->data and the input
671 * from wr->input. Length should be wr->length.
672 * wr->data still points in the wb->buf */
673
674 if (mac_size != 0)
675 {
676 s->method->ssl3_enc->mac(s,&(p[wr->length]),1);
677 wr->length+=mac_size;
678 wr->input=p;
679 wr->data=p;
680 }
681
682 /* ssl3_enc can only have an error on read */
683 s->method->ssl3_enc->enc(s,1);
684
685 /* record length after mac and block padding */
686 s2n(wr->length,plen);
687
688 /* we should now have
689 * wr->data pointing to the encrypted data, which is
690 * wr->length long */
691 wr->type=type; /* not needed but helps for debugging */
692 wr->length+=SSL3_RT_HEADER_LENGTH;
693
694 if (create_empty_fragment)
695 {
696 /* we are in a recursive call;
697 * just return the length, don't write out anything here
698 */
699 return wr->length;
700 }
701
702 /* now let's set up wb */
703 wb->left = prefix_len + wr->length;
704 wb->offset = 0;
705
706 /* memorize arguments so that ssl3_write_pending can detect bad write retries later */
707 s->s3->wpend_tot=len;
708 s->s3->wpend_buf=buf;
709 s->s3->wpend_type=type;
710 s->s3->wpend_ret=len;
711
712 /* we now just need to write the buffer */
713 return ssl3_write_pending(s,type,buf,len);
714err:
715 return -1;
716 }
717
718/* if s->s3->wbuf.left != 0, we need to call this */
719static int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
720 unsigned int len)
721 {
722 int i;
723
724/* XXXX */
725 if ((s->s3->wpend_tot > (int)len)
726 || ((s->s3->wpend_buf != buf) &&
727 !(s->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER))
728 || (s->s3->wpend_type != type))
729 {
730 SSLerr(SSL_F_SSL3_WRITE_PENDING,SSL_R_BAD_WRITE_RETRY);
731 return(-1);
732 }
733
734 for (;;)
735 {
736 clear_sys_error();
737 if (s->wbio != NULL)
738 {
739 s->rwstate=SSL_WRITING;
740 i=BIO_write(s->wbio,
741 (char *)&(s->s3->wbuf.buf[s->s3->wbuf.offset]),
742 (unsigned int)s->s3->wbuf.left);
743 }
744 else
745 {
746 SSLerr(SSL_F_SSL3_WRITE_PENDING,SSL_R_BIO_NOT_SET);
747 i= -1;
748 }
749 if (i == s->s3->wbuf.left)
750 {
751 s->s3->wbuf.left=0;
752 s->rwstate=SSL_NOTHING;
753 return(s->s3->wpend_ret);
754 }
755 else if (i <= 0)
756 return(i);
757 s->s3->wbuf.offset+=i;
758 s->s3->wbuf.left-=i;
759 }
760 }
761
762/* Return up to 'len' payload bytes received in 'type' records.
763 * 'type' is one of the following:
764 *
765 * - SSL3_RT_HANDSHAKE (when ssl3_get_message calls us)
766 * - SSL3_RT_APPLICATION_DATA (when ssl3_read calls us)
767 * - 0 (during a shutdown, no data has to be returned)
768 *
769 * If we don't have stored data to work from, read a SSL/TLS record first
770 * (possibly multiple records if we still don't have anything to return).
771 *
772 * This function must handle any surprises the peer may have for us, such as
773 * Alert records (e.g. close_notify), ChangeCipherSpec records (not really
774 * a surprise, but handled as if it were), or renegotiation requests.
775 * Also if record payloads contain fragments too small to process, we store
776 * them until there is enough for the respective protocol (the record protocol
777 * may use arbitrary fragmentation and even interleaving):
778 * Change cipher spec protocol
779 * just 1 byte needed, no need for keeping anything stored
780 * Alert protocol
781 * 2 bytes needed (AlertLevel, AlertDescription)
782 * Handshake protocol
783 * 4 bytes needed (HandshakeType, uint24 length) -- we just have
784 * to detect unexpected Client Hello and Hello Request messages
785 * here, anything else is handled by higher layers
786 * Application data protocol
787 * none of our business
788 */
789int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
790 {
791 int al,i,j,ret;
792 unsigned int n;
793 SSL3_RECORD *rr;
794 void (*cb)(const SSL *ssl,int type2,int val)=NULL;
795
796 if (s->s3->rbuf.buf == NULL) /* Not initialized yet */
797 if (!ssl3_setup_buffers(s))
798 return(-1);
799
800 if ((type && (type != SSL3_RT_APPLICATION_DATA) && (type != SSL3_RT_HANDSHAKE) && type) ||
801 (peek && (type != SSL3_RT_APPLICATION_DATA)))
802 {
803 SSLerr(SSL_F_SSL3_READ_BYTES, ERR_R_INTERNAL_ERROR);
804 return -1;
805 }
806
807 if ((type == SSL3_RT_HANDSHAKE) && (s->s3->handshake_fragment_len > 0))
808 /* (partially) satisfy request from storage */
809 {
810 unsigned char *src = s->s3->handshake_fragment;
811 unsigned char *dst = buf;
812 unsigned int k;
813
814 /* peek == 0 */
815 n = 0;
816 while ((len > 0) && (s->s3->handshake_fragment_len > 0))
817 {
818 *dst++ = *src++;
819 len--; s->s3->handshake_fragment_len--;
820 n++;
821 }
822 /* move any remaining fragment bytes: */
823 for (k = 0; k < s->s3->handshake_fragment_len; k++)
824 s->s3->handshake_fragment[k] = *src++;
825 return n;
826 }
827
828 /* Now s->s3->handshake_fragment_len == 0 if type == SSL3_RT_HANDSHAKE. */
829
830 if (!s->in_handshake && SSL_in_init(s))
831 {
832 /* type == SSL3_RT_APPLICATION_DATA */
833 i=s->handshake_func(s);
834 if (i < 0) return(i);
835 if (i == 0)
836 {
837 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_SSL_HANDSHAKE_FAILURE);
838 return(-1);
839 }
840 }
841start:
842 s->rwstate=SSL_NOTHING;
843
844 /* s->s3->rrec.type - is the type of record
845 * s->s3->rrec.data, - data
846 * s->s3->rrec.off, - offset into 'data' for next read
847 * s->s3->rrec.length, - number of bytes. */
848 rr = &(s->s3->rrec);
849
850 /* get new packet if necessary */
851 if ((rr->length == 0) || (s->rstate == SSL_ST_READ_BODY))
852 {
853 ret=ssl3_get_record(s);
854 if (ret <= 0) return(ret);
855 }
856
857 /* we now have a packet which can be read and processed */
858
859 if (s->s3->change_cipher_spec /* set when we receive ChangeCipherSpec,
860 * reset by ssl3_get_finished */
861 && (rr->type != SSL3_RT_HANDSHAKE))
862 {
863 al=SSL_AD_UNEXPECTED_MESSAGE;
864 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_DATA_BETWEEN_CCS_AND_FINISHED);
865 goto err;
866 }
867
868 /* If the other end has shut down, throw anything we read away
869 * (even in 'peek' mode) */
870 if (s->shutdown & SSL_RECEIVED_SHUTDOWN)
871 {
872 rr->length=0;
873 s->rwstate=SSL_NOTHING;
874 return(0);
875 }
876
877
878 if (type == rr->type) /* SSL3_RT_APPLICATION_DATA or SSL3_RT_HANDSHAKE */
879 {
880 /* make sure that we are not getting application data when we
881 * are doing a handshake for the first time */
882 if (SSL_in_init(s) && (type == SSL3_RT_APPLICATION_DATA) &&
883 (s->enc_read_ctx == NULL))
884 {
885 al=SSL_AD_UNEXPECTED_MESSAGE;
886 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_APP_DATA_IN_HANDSHAKE);
887 goto f_err;
888 }
889
890 if (len <= 0) return(len);
891
892 if ((unsigned int)len > rr->length)
893 n = rr->length;
894 else
895 n = (unsigned int)len;
896
897 memcpy(buf,&(rr->data[rr->off]),n);
898 if (!peek)
899 {
900 rr->length-=n;
901 rr->off+=n;
902 if (rr->length == 0)
903 {
904 s->rstate=SSL_ST_READ_HEADER;
905 rr->off=0;
906 }
907 }
908 return(n);
909 }
910
911
912 /* If we get here, then type != rr->type; if we have a handshake
913 * message, then it was unexpected (Hello Request or Client Hello). */
914
915 /* In case of record types for which we have 'fragment' storage,
916 * fill that so that we can process the data at a fixed place.
917 */
918 {
919 unsigned int dest_maxlen = 0;
920 unsigned char *dest = NULL;
921 unsigned int *dest_len = NULL;
922
923 if (rr->type == SSL3_RT_HANDSHAKE)
924 {
925 dest_maxlen = sizeof s->s3->handshake_fragment;
926 dest = s->s3->handshake_fragment;
927 dest_len = &s->s3->handshake_fragment_len;
928 }
929 else if (rr->type == SSL3_RT_ALERT)
930 {
931 dest_maxlen = sizeof s->s3->alert_fragment;
932 dest = s->s3->alert_fragment;
933 dest_len = &s->s3->alert_fragment_len;
934 }
935
936 if (dest_maxlen > 0)
937 {
938 n = dest_maxlen - *dest_len; /* available space in 'dest' */
939 if (rr->length < n)
940 n = rr->length; /* available bytes */
941
942 /* now move 'n' bytes: */
943 while (n-- > 0)
944 {
945 dest[(*dest_len)++] = rr->data[rr->off++];
946 rr->length--;
947 }
948
949 if (*dest_len < dest_maxlen)
950 goto start; /* fragment was too small */
951 }
952 }
953
954 /* s->s3->handshake_fragment_len == 4 iff rr->type == SSL3_RT_HANDSHAKE;
955 * s->s3->alert_fragment_len == 2 iff rr->type == SSL3_RT_ALERT.
956 * (Possibly rr is 'empty' now, i.e. rr->length may be 0.) */
957
958 /* If we are a client, check for an incoming 'Hello Request': */
959 if ((!s->server) &&
960 (s->s3->handshake_fragment_len >= 4) &&
961 (s->s3->handshake_fragment[0] == SSL3_MT_HELLO_REQUEST) &&
962 (s->session != NULL) && (s->session->cipher != NULL))
963 {
964 s->s3->handshake_fragment_len = 0;
965
966 if ((s->s3->handshake_fragment[1] != 0) ||
967 (s->s3->handshake_fragment[2] != 0) ||
968 (s->s3->handshake_fragment[3] != 0))
969 {
970 al=SSL_AD_DECODE_ERROR;
971 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_BAD_HELLO_REQUEST);
972 goto err;
973 }
974
975 if (s->msg_callback)
976 s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->s3->handshake_fragment, 4, s, s->msg_callback_arg);
977
978 if (SSL_is_init_finished(s) &&
979 !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) &&
980 !s->s3->renegotiate)
981 {
982 ssl3_renegotiate(s);
983 if (ssl3_renegotiate_check(s))
984 {
985 i=s->handshake_func(s);
986 if (i < 0) return(i);
987 if (i == 0)
988 {
989 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_SSL_HANDSHAKE_FAILURE);
990 return(-1);
991 }
992
993 if (!(s->mode & SSL_MODE_AUTO_RETRY))
994 {
995 if (s->s3->rbuf.left == 0) /* no read-ahead left? */
996 {
997 BIO *bio;
998 /* In the case where we try to read application data,
999 * but we trigger an SSL handshake, we return -1 with
1000 * the retry option set. Otherwise renegotiation may
1001 * cause nasty problems in the blocking world */
1002 s->rwstate=SSL_READING;
1003 bio=SSL_get_rbio(s);
1004 BIO_clear_retry_flags(bio);
1005 BIO_set_retry_read(bio);
1006 return(-1);
1007 }
1008 }
1009 }
1010 }
1011 /* we either finished a handshake or ignored the request,
1012 * now try again to obtain the (application) data we were asked for */
1013 goto start;
1014 }
1015
1016 if (s->s3->alert_fragment_len >= 2)
1017 {
1018 int alert_level = s->s3->alert_fragment[0];
1019 int alert_descr = s->s3->alert_fragment[1];
1020
1021 s->s3->alert_fragment_len = 0;
1022
1023 if (s->msg_callback)
1024 s->msg_callback(0, s->version, SSL3_RT_ALERT, s->s3->alert_fragment, 2, s, s->msg_callback_arg);
1025
1026 if (s->info_callback != NULL)
1027 cb=s->info_callback;
1028 else if (s->ctx->info_callback != NULL)
1029 cb=s->ctx->info_callback;
1030
1031 if (cb != NULL)
1032 {
1033 j = (alert_level << 8) | alert_descr;
1034 cb(s, SSL_CB_READ_ALERT, j);
1035 }
1036
1037 if (alert_level == 1) /* warning */
1038 {
1039 s->s3->warn_alert = alert_descr;
1040 if (alert_descr == SSL_AD_CLOSE_NOTIFY)
1041 {
1042 s->shutdown |= SSL_RECEIVED_SHUTDOWN;
1043 return(0);
1044 }
1045 }
1046 else if (alert_level == 2) /* fatal */
1047 {
1048 char tmp[16];
1049
1050 s->rwstate=SSL_NOTHING;
1051 s->s3->fatal_alert = alert_descr;
1052 SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr);
1053 BIO_snprintf(tmp,sizeof tmp,"%d",alert_descr);
1054 ERR_add_error_data(2,"SSL alert number ",tmp);
1055 s->shutdown|=SSL_RECEIVED_SHUTDOWN;
1056 SSL_CTX_remove_session(s->ctx,s->session);
1057 return(0);
1058 }
1059 else
1060 {
1061 al=SSL_AD_ILLEGAL_PARAMETER;
1062 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_UNKNOWN_ALERT_TYPE);
1063 goto f_err;
1064 }
1065
1066 goto start;
1067 }
1068
1069 if (s->shutdown & SSL_SENT_SHUTDOWN) /* but we have not received a shutdown */
1070 {
1071 s->rwstate=SSL_NOTHING;
1072 rr->length=0;
1073 return(0);
1074 }
1075
1076 if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC)
1077 {
1078 /* 'Change Cipher Spec' is just a single byte, so we know
1079 * exactly what the record payload has to look like */
1080 if ( (rr->length != 1) || (rr->off != 0) ||
1081 (rr->data[0] != SSL3_MT_CCS))
1082 {
1083 i=SSL_AD_ILLEGAL_PARAMETER;
1084 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_BAD_CHANGE_CIPHER_SPEC);
1085 goto err;
1086 }
1087
1088 /* Check we have a cipher to change to */
1089 if (s->s3->tmp.new_cipher == NULL)
1090 {
1091 i=SSL_AD_UNEXPECTED_MESSAGE;
1092 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_CCS_RECEIVED_EARLY);
1093 goto err;
1094 }
1095
1096 rr->length=0;
1097
1098 if (s->msg_callback)
1099 s->msg_callback(0, s->version, SSL3_RT_CHANGE_CIPHER_SPEC, rr->data, 1, s, s->msg_callback_arg);
1100
1101 s->s3->change_cipher_spec=1;
1102 if (!do_change_cipher_spec(s))
1103 goto err;
1104 else
1105 goto start;
1106 }
1107
1108 /* Unexpected handshake message (Client Hello, or protocol violation) */
1109 if ((s->s3->handshake_fragment_len >= 4) && !s->in_handshake)
1110 {
1111 if (((s->state&SSL_ST_MASK) == SSL_ST_OK) &&
1112 !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS))
1113 {
1114#if 0 /* worked only because C operator preferences are not as expected (and
1115 * because this is not really needed for clients except for detecting
1116 * protocol violations): */
1117 s->state=SSL_ST_BEFORE|(s->server)
1118 ?SSL_ST_ACCEPT
1119 :SSL_ST_CONNECT;
1120#else
1121 s->state = s->server ? SSL_ST_ACCEPT : SSL_ST_CONNECT;
1122#endif
1123 s->new_session=1;
1124 }
1125 i=s->handshake_func(s);
1126 if (i < 0) return(i);
1127 if (i == 0)
1128 {
1129 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_SSL_HANDSHAKE_FAILURE);
1130 return(-1);
1131 }
1132
1133 if (!(s->mode & SSL_MODE_AUTO_RETRY))
1134 {
1135 if (s->s3->rbuf.left == 0) /* no read-ahead left? */
1136 {
1137 BIO *bio;
1138 /* In the case where we try to read application data,
1139 * but we trigger an SSL handshake, we return -1 with
1140 * the retry option set. Otherwise renegotiation may
1141 * cause nasty problems in the blocking world */
1142 s->rwstate=SSL_READING;
1143 bio=SSL_get_rbio(s);
1144 BIO_clear_retry_flags(bio);
1145 BIO_set_retry_read(bio);
1146 return(-1);
1147 }
1148 }
1149 goto start;
1150 }
1151
1152 switch (rr->type)
1153 {
1154 default:
1155#ifndef OPENSSL_NO_TLS
1156 /* TLS just ignores unknown message types */
1157 if (s->version == TLS1_VERSION)
1158 {
1159 rr->length = 0;
1160 goto start;
1161 }
1162#endif
1163 al=SSL_AD_UNEXPECTED_MESSAGE;
1164 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_UNEXPECTED_RECORD);
1165 goto f_err;
1166 case SSL3_RT_CHANGE_CIPHER_SPEC:
1167 case SSL3_RT_ALERT:
1168 case SSL3_RT_HANDSHAKE:
1169 /* we already handled all of these, with the possible exception
1170 * of SSL3_RT_HANDSHAKE when s->in_handshake is set, but that
1171 * should not happen when type != rr->type */
1172 al=SSL_AD_UNEXPECTED_MESSAGE;
1173 SSLerr(SSL_F_SSL3_READ_BYTES,ERR_R_INTERNAL_ERROR);
1174 goto f_err;
1175 case SSL3_RT_APPLICATION_DATA:
1176 /* At this point, we were expecting handshake data,
1177 * but have application data. If the library was
1178 * running inside ssl3_read() (i.e. in_read_app_data
1179 * is set) and it makes sense to read application data
1180 * at this point (session renegotiation not yet started),
1181 * we will indulge it.
1182 */
1183 if (s->s3->in_read_app_data &&
1184 (s->s3->total_renegotiations != 0) &&
1185 ((
1186 (s->state & SSL_ST_CONNECT) &&
1187 (s->state >= SSL3_ST_CW_CLNT_HELLO_A) &&
1188 (s->state <= SSL3_ST_CR_SRVR_HELLO_A)
1189 ) || (
1190 (s->state & SSL_ST_ACCEPT) &&
1191 (s->state <= SSL3_ST_SW_HELLO_REQ_A) &&
1192 (s->state >= SSL3_ST_SR_CLNT_HELLO_A)
1193 )
1194 ))
1195 {
1196 s->s3->in_read_app_data=2;
1197 return(-1);
1198 }
1199 else
1200 {
1201 al=SSL_AD_UNEXPECTED_MESSAGE;
1202 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_UNEXPECTED_RECORD);
1203 goto f_err;
1204 }
1205 }
1206 /* not reached */
1207
1208f_err:
1209 ssl3_send_alert(s,SSL3_AL_FATAL,al);
1210err:
1211 return(-1);
1212 }
1213
1214static int do_change_cipher_spec(SSL *s)
1215 {
1216 int i;
1217 const char *sender;
1218 int slen;
1219
1220 if (s->state & SSL_ST_ACCEPT)
1221 i=SSL3_CHANGE_CIPHER_SERVER_READ;
1222 else
1223 i=SSL3_CHANGE_CIPHER_CLIENT_READ;
1224
1225 if (s->s3->tmp.key_block == NULL)
1226 {
1227 s->session->cipher=s->s3->tmp.new_cipher;
1228 if (!s->method->ssl3_enc->setup_key_block(s)) return(0);
1229 }
1230
1231 if (!s->method->ssl3_enc->change_cipher_state(s,i))
1232 return(0);
1233
1234 /* we have to record the message digest at
1235 * this point so we can get it before we read
1236 * the finished message */
1237 if (s->state & SSL_ST_CONNECT)
1238 {
1239 sender=s->method->ssl3_enc->server_finished_label;
1240 slen=s->method->ssl3_enc->server_finished_label_len;
1241 }
1242 else
1243 {
1244 sender=s->method->ssl3_enc->client_finished_label;
1245 slen=s->method->ssl3_enc->client_finished_label_len;
1246 }
1247
1248 s->s3->tmp.peer_finish_md_len = s->method->ssl3_enc->final_finish_mac(s,
1249 &(s->s3->finish_dgst1),
1250 &(s->s3->finish_dgst2),
1251 sender,slen,s->s3->tmp.peer_finish_md);
1252
1253 return(1);
1254 }
1255
1256void ssl3_send_alert(SSL *s, int level, int desc)
1257 {
1258 /* Map tls/ssl alert value to correct one */
1259 desc=s->method->ssl3_enc->alert_value(desc);
1260 if (s->version == SSL3_VERSION && desc == SSL_AD_PROTOCOL_VERSION)
1261 desc = SSL_AD_HANDSHAKE_FAILURE; /* SSL 3.0 does not have protocol_version alerts */
1262 if (desc < 0) return;
1263 /* If a fatal one, remove from cache */
1264 if ((level == 2) && (s->session != NULL))
1265 SSL_CTX_remove_session(s->ctx,s->session);
1266
1267 s->s3->alert_dispatch=1;
1268 s->s3->send_alert[0]=level;
1269 s->s3->send_alert[1]=desc;
1270 if (s->s3->wbuf.left == 0) /* data still being written out? */
1271 ssl3_dispatch_alert(s);
1272 /* else data is still being written out, we will get written
1273 * some time in the future */
1274 }
1275
1276int ssl3_dispatch_alert(SSL *s)
1277 {
1278 int i,j;
1279 void (*cb)(const SSL *ssl,int type,int val)=NULL;
1280
1281 s->s3->alert_dispatch=0;
1282 i = do_ssl3_write(s, SSL3_RT_ALERT, &s->s3->send_alert[0], 2, 0);
1283 if (i <= 0)
1284 {
1285 s->s3->alert_dispatch=1;
1286 }
1287 else
1288 {
1289 /* Alert sent to BIO. If it is important, flush it now.
1290 * If the message does not get sent due to non-blocking IO,
1291 * we will not worry too much. */
1292 if (s->s3->send_alert[0] == SSL3_AL_FATAL)
1293 (void)BIO_flush(s->wbio);
1294
1295 if (s->msg_callback)
1296 s->msg_callback(1, s->version, SSL3_RT_ALERT, s->s3->send_alert, 2, s, s->msg_callback_arg);
1297
1298 if (s->info_callback != NULL)
1299 cb=s->info_callback;
1300 else if (s->ctx->info_callback != NULL)
1301 cb=s->ctx->info_callback;
1302
1303 if (cb != NULL)
1304 {
1305 j=(s->s3->send_alert[0]<<8)|s->s3->send_alert[1];
1306 cb(s,SSL_CB_WRITE_ALERT,j);
1307 }
1308 }
1309 return(i);
1310 }
diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c
new file mode 100644
index 0000000000..deb3cffabe
--- /dev/null
+++ b/src/lib/libssl/s3_srvr.c
@@ -0,0 +1,2077 @@
1/* ssl/s3_srvr.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-2002 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#define REUSE_CIPHER_BUG
113#define NETSCAPE_HANG_BUG
114
115
116#include <stdio.h>
117#include "ssl_locl.h"
118#include "kssl_lcl.h"
119#include <openssl/buffer.h>
120#include <openssl/rand.h>
121#include <openssl/objects.h>
122#include <openssl/evp.h>
123#include <openssl/x509.h>
124#ifndef OPENSSL_NO_KRB5
125#include <openssl/krb5_asn.h>
126#endif
127#include <openssl/md5.h>
128
129static SSL_METHOD *ssl3_get_server_method(int ver);
130static int ssl3_get_client_hello(SSL *s);
131static int ssl3_check_client_hello(SSL *s);
132static int ssl3_send_server_hello(SSL *s);
133static int ssl3_send_server_key_exchange(SSL *s);
134static int ssl3_send_certificate_request(SSL *s);
135static int ssl3_send_server_done(SSL *s);
136static int ssl3_get_client_key_exchange(SSL *s);
137static int ssl3_get_client_certificate(SSL *s);
138static int ssl3_get_cert_verify(SSL *s);
139static int ssl3_send_hello_request(SSL *s);
140
141static SSL_METHOD *ssl3_get_server_method(int ver)
142 {
143 if (ver == SSL3_VERSION)
144 return(SSLv3_server_method());
145 else
146 return(NULL);
147 }
148
149SSL_METHOD *SSLv3_server_method(void)
150 {
151 static int init=1;
152 static SSL_METHOD SSLv3_server_data;
153
154 if (init)
155 {
156 CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
157
158 if (init)
159 {
160 memcpy((char *)&SSLv3_server_data,(char *)sslv3_base_method(),
161 sizeof(SSL_METHOD));
162 SSLv3_server_data.ssl_accept=ssl3_accept;
163 SSLv3_server_data.get_ssl_method=ssl3_get_server_method;
164 init=0;
165 }
166
167 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
168 }
169 return(&SSLv3_server_data);
170 }
171
172int ssl3_accept(SSL *s)
173 {
174 BUF_MEM *buf;
175 unsigned long l,Time=time(NULL);
176 void (*cb)(const SSL *ssl,int type,int val)=NULL;
177 long num1;
178 int ret= -1;
179 int new_state,state,skip=0;
180
181 RAND_add(&Time,sizeof(Time),0);
182 ERR_clear_error();
183 clear_sys_error();
184
185 if (s->info_callback != NULL)
186 cb=s->info_callback;
187 else if (s->ctx->info_callback != NULL)
188 cb=s->ctx->info_callback;
189
190 /* init things to blank */
191 s->in_handshake++;
192 if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
193
194 if (s->cert == NULL)
195 {
196 SSLerr(SSL_F_SSL3_ACCEPT,SSL_R_NO_CERTIFICATE_SET);
197 return(-1);
198 }
199
200 for (;;)
201 {
202 state=s->state;
203
204 switch (s->state)
205 {
206 case SSL_ST_RENEGOTIATE:
207 s->new_session=1;
208 /* s->state=SSL_ST_ACCEPT; */
209
210 case SSL_ST_BEFORE:
211 case SSL_ST_ACCEPT:
212 case SSL_ST_BEFORE|SSL_ST_ACCEPT:
213 case SSL_ST_OK|SSL_ST_ACCEPT:
214
215 s->server=1;
216 if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1);
217
218 if ((s->version>>8) != 3)
219 {
220 SSLerr(SSL_F_SSL3_ACCEPT, ERR_R_INTERNAL_ERROR);
221 return -1;
222 }
223 s->type=SSL_ST_ACCEPT;
224
225 if (s->init_buf == NULL)
226 {
227 if ((buf=BUF_MEM_new()) == NULL)
228 {
229 ret= -1;
230 goto end;
231 }
232 if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
233 {
234 ret= -1;
235 goto end;
236 }
237 s->init_buf=buf;
238 }
239
240 if (!ssl3_setup_buffers(s))
241 {
242 ret= -1;
243 goto end;
244 }
245
246 s->init_num=0;
247
248 if (s->state != SSL_ST_RENEGOTIATE)
249 {
250 /* Ok, we now need to push on a buffering BIO so that
251 * the output is sent in a way that TCP likes :-)
252 */
253 if (!ssl_init_wbio_buffer(s,1)) { ret= -1; goto end; }
254
255 ssl3_init_finished_mac(s);
256 s->state=SSL3_ST_SR_CLNT_HELLO_A;
257 s->ctx->stats.sess_accept++;
258 }
259 else
260 {
261 /* s->state == SSL_ST_RENEGOTIATE,
262 * we will just send a HelloRequest */
263 s->ctx->stats.sess_accept_renegotiate++;
264 s->state=SSL3_ST_SW_HELLO_REQ_A;
265 }
266 break;
267
268 case SSL3_ST_SW_HELLO_REQ_A:
269 case SSL3_ST_SW_HELLO_REQ_B:
270
271 s->shutdown=0;
272 ret=ssl3_send_hello_request(s);
273 if (ret <= 0) goto end;
274 s->s3->tmp.next_state=SSL3_ST_SW_HELLO_REQ_C;
275 s->state=SSL3_ST_SW_FLUSH;
276 s->init_num=0;
277
278 ssl3_init_finished_mac(s);
279 break;
280
281 case SSL3_ST_SW_HELLO_REQ_C:
282 s->state=SSL_ST_OK;
283 break;
284
285 case SSL3_ST_SR_CLNT_HELLO_A:
286 case SSL3_ST_SR_CLNT_HELLO_B:
287 case SSL3_ST_SR_CLNT_HELLO_C:
288
289 s->shutdown=0;
290 ret=ssl3_get_client_hello(s);
291 if (ret <= 0) goto end;
292 s->new_session = 2;
293 s->state=SSL3_ST_SW_SRVR_HELLO_A;
294 s->init_num=0;
295 break;
296
297 case SSL3_ST_SW_SRVR_HELLO_A:
298 case SSL3_ST_SW_SRVR_HELLO_B:
299 ret=ssl3_send_server_hello(s);
300 if (ret <= 0) goto end;
301
302 if (s->hit)
303 s->state=SSL3_ST_SW_CHANGE_A;
304 else
305 s->state=SSL3_ST_SW_CERT_A;
306 s->init_num=0;
307 break;
308
309 case SSL3_ST_SW_CERT_A:
310 case SSL3_ST_SW_CERT_B:
311 /* Check if it is anon DH */
312 if (!(s->s3->tmp.new_cipher->algorithms & SSL_aNULL))
313 {
314 ret=ssl3_send_server_certificate(s);
315 if (ret <= 0) goto end;
316 }
317 else
318 skip=1;
319 s->state=SSL3_ST_SW_KEY_EXCH_A;
320 s->init_num=0;
321 break;
322
323 case SSL3_ST_SW_KEY_EXCH_A:
324 case SSL3_ST_SW_KEY_EXCH_B:
325 l=s->s3->tmp.new_cipher->algorithms;
326
327 /* clear this, it may get reset by
328 * send_server_key_exchange */
329 if ((s->options & SSL_OP_EPHEMERAL_RSA)
330#ifndef OPENSSL_NO_KRB5
331 && !(l & SSL_KRB5)
332#endif /* OPENSSL_NO_KRB5 */
333 )
334 /* option SSL_OP_EPHEMERAL_RSA sends temporary RSA key
335 * even when forbidden by protocol specs
336 * (handshake may fail as clients are not required to
337 * be able to handle this) */
338 s->s3->tmp.use_rsa_tmp=1;
339 else
340 s->s3->tmp.use_rsa_tmp=0;
341
342 /* only send if a DH key exchange, fortezza or
343 * RSA but we have a sign only certificate */
344 if (s->s3->tmp.use_rsa_tmp
345 || (l & (SSL_DH|SSL_kFZA))
346 || ((l & SSL_kRSA)
347 && (s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL
348 || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher)
349 && EVP_PKEY_size(s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey)*8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)
350 )
351 )
352 )
353 )
354 {
355 ret=ssl3_send_server_key_exchange(s);
356 if (ret <= 0) goto end;
357 }
358 else
359 skip=1;
360
361 s->state=SSL3_ST_SW_CERT_REQ_A;
362 s->init_num=0;
363 break;
364
365 case SSL3_ST_SW_CERT_REQ_A:
366 case SSL3_ST_SW_CERT_REQ_B:
367 if (/* don't request cert unless asked for it: */
368 !(s->verify_mode & SSL_VERIFY_PEER) ||
369 /* if SSL_VERIFY_CLIENT_ONCE is set,
370 * don't request cert during re-negotiation: */
371 ((s->session->peer != NULL) &&
372 (s->verify_mode & SSL_VERIFY_CLIENT_ONCE)) ||
373 /* never request cert in anonymous ciphersuites
374 * (see section "Certificate request" in SSL 3 drafts
375 * and in RFC 2246): */
376 ((s->s3->tmp.new_cipher->algorithms & SSL_aNULL) &&
377 /* ... except when the application insists on verification
378 * (against the specs, but s3_clnt.c accepts this for SSL 3) */
379 !(s->verify_mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT)) ||
380 /* never request cert in Kerberos ciphersuites */
381 (s->s3->tmp.new_cipher->algorithms & SSL_aKRB5))
382 {
383 /* no cert request */
384 skip=1;
385 s->s3->tmp.cert_request=0;
386 s->state=SSL3_ST_SW_SRVR_DONE_A;
387 }
388 else
389 {
390 s->s3->tmp.cert_request=1;
391 ret=ssl3_send_certificate_request(s);
392 if (ret <= 0) goto end;
393#ifndef NETSCAPE_HANG_BUG
394 s->state=SSL3_ST_SW_SRVR_DONE_A;
395#else
396 s->state=SSL3_ST_SW_FLUSH;
397 s->s3->tmp.next_state=SSL3_ST_SR_CERT_A;
398#endif
399 s->init_num=0;
400 }
401 break;
402
403 case SSL3_ST_SW_SRVR_DONE_A:
404 case SSL3_ST_SW_SRVR_DONE_B:
405 ret=ssl3_send_server_done(s);
406 if (ret <= 0) goto end;
407 s->s3->tmp.next_state=SSL3_ST_SR_CERT_A;
408 s->state=SSL3_ST_SW_FLUSH;
409 s->init_num=0;
410 break;
411
412 case SSL3_ST_SW_FLUSH:
413 /* number of bytes to be flushed */
414 num1=BIO_ctrl(s->wbio,BIO_CTRL_INFO,0,NULL);
415 if (num1 > 0)
416 {
417 s->rwstate=SSL_WRITING;
418 num1=BIO_flush(s->wbio);
419 if (num1 <= 0) { ret= -1; goto end; }
420 s->rwstate=SSL_NOTHING;
421 }
422
423 s->state=s->s3->tmp.next_state;
424 break;
425
426 case SSL3_ST_SR_CERT_A:
427 case SSL3_ST_SR_CERT_B:
428 /* Check for second client hello (MS SGC) */
429 ret = ssl3_check_client_hello(s);
430 if (ret <= 0)
431 goto end;
432 if (ret == 2)
433 s->state = SSL3_ST_SR_CLNT_HELLO_C;
434 else {
435 if (s->s3->tmp.cert_request)
436 {
437 ret=ssl3_get_client_certificate(s);
438 if (ret <= 0) goto end;
439 }
440 s->init_num=0;
441 s->state=SSL3_ST_SR_KEY_EXCH_A;
442 }
443 break;
444
445 case SSL3_ST_SR_KEY_EXCH_A:
446 case SSL3_ST_SR_KEY_EXCH_B:
447 ret=ssl3_get_client_key_exchange(s);
448 if (ret <= 0) goto end;
449 s->state=SSL3_ST_SR_CERT_VRFY_A;
450 s->init_num=0;
451
452 /* We need to get hashes here so if there is
453 * a client cert, it can be verified */
454 s->method->ssl3_enc->cert_verify_mac(s,
455 &(s->s3->finish_dgst1),
456 &(s->s3->tmp.cert_verify_md[0]));
457 s->method->ssl3_enc->cert_verify_mac(s,
458 &(s->s3->finish_dgst2),
459 &(s->s3->tmp.cert_verify_md[MD5_DIGEST_LENGTH]));
460
461 break;
462
463 case SSL3_ST_SR_CERT_VRFY_A:
464 case SSL3_ST_SR_CERT_VRFY_B:
465
466 /* we should decide if we expected this one */
467 ret=ssl3_get_cert_verify(s);
468 if (ret <= 0) goto end;
469
470 s->state=SSL3_ST_SR_FINISHED_A;
471 s->init_num=0;
472 break;
473
474 case SSL3_ST_SR_FINISHED_A:
475 case SSL3_ST_SR_FINISHED_B:
476 ret=ssl3_get_finished(s,SSL3_ST_SR_FINISHED_A,
477 SSL3_ST_SR_FINISHED_B);
478 if (ret <= 0) goto end;
479 if (s->hit)
480 s->state=SSL_ST_OK;
481 else
482 s->state=SSL3_ST_SW_CHANGE_A;
483 s->init_num=0;
484 break;
485
486 case SSL3_ST_SW_CHANGE_A:
487 case SSL3_ST_SW_CHANGE_B:
488
489 s->session->cipher=s->s3->tmp.new_cipher;
490 if (!s->method->ssl3_enc->setup_key_block(s))
491 { ret= -1; goto end; }
492
493 ret=ssl3_send_change_cipher_spec(s,
494 SSL3_ST_SW_CHANGE_A,SSL3_ST_SW_CHANGE_B);
495
496 if (ret <= 0) goto end;
497 s->state=SSL3_ST_SW_FINISHED_A;
498 s->init_num=0;
499
500 if (!s->method->ssl3_enc->change_cipher_state(s,
501 SSL3_CHANGE_CIPHER_SERVER_WRITE))
502 {
503 ret= -1;
504 goto end;
505 }
506
507 break;
508
509 case SSL3_ST_SW_FINISHED_A:
510 case SSL3_ST_SW_FINISHED_B:
511 ret=ssl3_send_finished(s,
512 SSL3_ST_SW_FINISHED_A,SSL3_ST_SW_FINISHED_B,
513 s->method->ssl3_enc->server_finished_label,
514 s->method->ssl3_enc->server_finished_label_len);
515 if (ret <= 0) goto end;
516 s->state=SSL3_ST_SW_FLUSH;
517 if (s->hit)
518 s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A;
519 else
520 s->s3->tmp.next_state=SSL_ST_OK;
521 s->init_num=0;
522 break;
523
524 case SSL_ST_OK:
525 /* clean a few things up */
526 ssl3_cleanup_key_block(s);
527
528 BUF_MEM_free(s->init_buf);
529 s->init_buf=NULL;
530
531 /* remove buffering on output */
532 ssl_free_wbio_buffer(s);
533
534 s->init_num=0;
535
536 if (s->new_session == 2) /* skipped if we just sent a HelloRequest */
537 {
538 /* actually not necessarily a 'new' session unless
539 * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set */
540
541 s->new_session=0;
542
543 ssl_update_cache(s,SSL_SESS_CACHE_SERVER);
544
545 s->ctx->stats.sess_accept_good++;
546 /* s->server=1; */
547 s->handshake_func=ssl3_accept;
548
549 if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_DONE,1);
550 }
551
552 ret = 1;
553 goto end;
554 /* break; */
555
556 default:
557 SSLerr(SSL_F_SSL3_ACCEPT,SSL_R_UNKNOWN_STATE);
558 ret= -1;
559 goto end;
560 /* break; */
561 }
562
563 if (!s->s3->tmp.reuse_message && !skip)
564 {
565 if (s->debug)
566 {
567 if ((ret=BIO_flush(s->wbio)) <= 0)
568 goto end;
569 }
570
571
572 if ((cb != NULL) && (s->state != state))
573 {
574 new_state=s->state;
575 s->state=state;
576 cb(s,SSL_CB_ACCEPT_LOOP,1);
577 s->state=new_state;
578 }
579 }
580 skip=0;
581 }
582end:
583 /* BIO_flush(s->wbio); */
584
585 s->in_handshake--;
586 if (cb != NULL)
587 cb(s,SSL_CB_ACCEPT_EXIT,ret);
588 return(ret);
589 }
590
591static int ssl3_send_hello_request(SSL *s)
592 {
593 unsigned char *p;
594
595 if (s->state == SSL3_ST_SW_HELLO_REQ_A)
596 {
597 p=(unsigned char *)s->init_buf->data;
598 *(p++)=SSL3_MT_HELLO_REQUEST;
599 *(p++)=0;
600 *(p++)=0;
601 *(p++)=0;
602
603 s->state=SSL3_ST_SW_HELLO_REQ_B;
604 /* number of bytes to write */
605 s->init_num=4;
606 s->init_off=0;
607 }
608
609 /* SSL3_ST_SW_HELLO_REQ_B */
610 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
611 }
612
613static int ssl3_check_client_hello(SSL *s)
614 {
615 int ok;
616 long n;
617
618 /* this function is called when we really expect a Certificate message,
619 * so permit appropriate message length */
620 n=ssl3_get_message(s,
621 SSL3_ST_SR_CERT_A,
622 SSL3_ST_SR_CERT_B,
623 -1,
624 s->max_cert_list,
625 &ok);
626 if (!ok) return((int)n);
627 s->s3->tmp.reuse_message = 1;
628 if (s->s3->tmp.message_type == SSL3_MT_CLIENT_HELLO)
629 {
630 /* Throw away what we have done so far in the current handshake,
631 * which will now be aborted. (A full SSL_clear would be too much.)
632 * I hope that tmp.dh is the only thing that may need to be cleared
633 * when a handshake is not completed ... */
634#ifndef OPENSSL_NO_DH
635 if (s->s3->tmp.dh != NULL)
636 {
637 DH_free(s->s3->tmp.dh);
638 s->s3->tmp.dh = NULL;
639 }
640#endif
641 return 2;
642 }
643 return 1;
644}
645
646static int ssl3_get_client_hello(SSL *s)
647 {
648 int i,j,ok,al,ret= -1;
649 long n;
650 unsigned long id;
651 unsigned char *p,*d,*q;
652 SSL_CIPHER *c;
653 SSL_COMP *comp=NULL;
654 STACK_OF(SSL_CIPHER) *ciphers=NULL;
655
656 /* We do this so that we will respond with our native type.
657 * If we are TLSv1 and we get SSLv3, we will respond with TLSv1,
658 * This down switching should be handled by a different method.
659 * If we are SSLv3, we will respond with SSLv3, even if prompted with
660 * TLSv1.
661 */
662 if (s->state == SSL3_ST_SR_CLNT_HELLO_A)
663 {
664 s->first_packet=1;
665 s->state=SSL3_ST_SR_CLNT_HELLO_B;
666 }
667 n=ssl3_get_message(s,
668 SSL3_ST_SR_CLNT_HELLO_B,
669 SSL3_ST_SR_CLNT_HELLO_C,
670 SSL3_MT_CLIENT_HELLO,
671 SSL3_RT_MAX_PLAIN_LENGTH,
672 &ok);
673
674 if (!ok) return((int)n);
675 d=p=(unsigned char *)s->init_msg;
676
677 /* use version from inside client hello, not from record header
678 * (may differ: see RFC 2246, Appendix E, second paragraph) */
679 s->client_version=(((int)p[0])<<8)|(int)p[1];
680 p+=2;
681
682 if (s->client_version < s->version)
683 {
684 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_WRONG_VERSION_NUMBER);
685 if ((s->client_version>>8) == SSL3_VERSION_MAJOR)
686 {
687 /* similar to ssl3_get_record, send alert using remote version number */
688 s->version = s->client_version;
689 }
690 al = SSL_AD_PROTOCOL_VERSION;
691 goto f_err;
692 }
693
694 /* load the client random */
695 memcpy(s->s3->client_random,p,SSL3_RANDOM_SIZE);
696 p+=SSL3_RANDOM_SIZE;
697
698 /* get the session-id */
699 j= *(p++);
700
701 s->hit=0;
702 /* Versions before 0.9.7 always allow session reuse during renegotiation
703 * (i.e. when s->new_session is true), option
704 * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is new with 0.9.7.
705 * Maybe this optional behaviour should always have been the default,
706 * but we cannot safely change the default behaviour (or new applications
707 * might be written that become totally unsecure when compiled with
708 * an earlier library version)
709 */
710 if (j == 0 || (s->new_session && (s->options & SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION)))
711 {
712 if (!ssl_get_new_session(s,1))
713 goto err;
714 }
715 else
716 {
717 i=ssl_get_prev_session(s,p,j);
718 if (i == 1)
719 { /* previous session */
720 s->hit=1;
721 }
722 else if (i == -1)
723 goto err;
724 else /* i == 0 */
725 {
726 if (!ssl_get_new_session(s,1))
727 goto err;
728 }
729 }
730
731 p+=j;
732 n2s(p,i);
733 if ((i == 0) && (j != 0))
734 {
735 /* we need a cipher if we are not resuming a session */
736 al=SSL_AD_ILLEGAL_PARAMETER;
737 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_NO_CIPHERS_SPECIFIED);
738 goto f_err;
739 }
740 if ((p+i) >= (d+n))
741 {
742 /* not enough data */
743 al=SSL_AD_DECODE_ERROR;
744 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_LENGTH_MISMATCH);
745 goto f_err;
746 }
747 if ((i > 0) && (ssl_bytes_to_cipher_list(s,p,i,&(ciphers))
748 == NULL))
749 {
750 goto err;
751 }
752 p+=i;
753
754 /* If it is a hit, check that the cipher is in the list */
755 if ((s->hit) && (i > 0))
756 {
757 j=0;
758 id=s->session->cipher->id;
759
760#ifdef CIPHER_DEBUG
761 printf("client sent %d ciphers\n",sk_num(ciphers));
762#endif
763 for (i=0; i<sk_SSL_CIPHER_num(ciphers); i++)
764 {
765 c=sk_SSL_CIPHER_value(ciphers,i);
766#ifdef CIPHER_DEBUG
767 printf("client [%2d of %2d]:%s\n",
768 i,sk_num(ciphers),SSL_CIPHER_get_name(c));
769#endif
770 if (c->id == id)
771 {
772 j=1;
773 break;
774 }
775 }
776 if (j == 0)
777 {
778 if ((s->options & SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG) && (sk_SSL_CIPHER_num(ciphers) == 1))
779 {
780 /* Very bad for multi-threading.... */
781 s->session->cipher=sk_SSL_CIPHER_value(ciphers,
782 0);
783 }
784 else
785 {
786 /* we need to have the cipher in the cipher
787 * list if we are asked to reuse it */
788 al=SSL_AD_ILLEGAL_PARAMETER;
789 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_REQUIRED_CIPHER_MISSING);
790 goto f_err;
791 }
792 }
793 }
794
795 /* compression */
796 i= *(p++);
797 if ((p+i) > (d+n))
798 {
799 /* not enough data */
800 al=SSL_AD_DECODE_ERROR;
801 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_LENGTH_MISMATCH);
802 goto f_err;
803 }
804 q=p;
805 for (j=0; j<i; j++)
806 {
807 if (p[j] == 0) break;
808 }
809
810 p+=i;
811 if (j >= i)
812 {
813 /* no compress */
814 al=SSL_AD_DECODE_ERROR;
815 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_NO_COMPRESSION_SPECIFIED);
816 goto f_err;
817 }
818
819 /* Worst case, we will use the NULL compression, but if we have other
820 * options, we will now look for them. We have i-1 compression
821 * algorithms from the client, starting at q. */
822 s->s3->tmp.new_compression=NULL;
823 if (s->ctx->comp_methods != NULL)
824 { /* See if we have a match */
825 int m,nn,o,v,done=0;
826
827 nn=sk_SSL_COMP_num(s->ctx->comp_methods);
828 for (m=0; m<nn; m++)
829 {
830 comp=sk_SSL_COMP_value(s->ctx->comp_methods,m);
831 v=comp->id;
832 for (o=0; o<i; o++)
833 {
834 if (v == q[o])
835 {
836 done=1;
837 break;
838 }
839 }
840 if (done) break;
841 }
842 if (done)
843 s->s3->tmp.new_compression=comp;
844 else
845 comp=NULL;
846 }
847
848 /* TLS does not mind if there is extra stuff */
849#if 0 /* SSL 3.0 does not mind either, so we should disable this test
850 * (was enabled in 0.9.6d through 0.9.6j and 0.9.7 through 0.9.7b,
851 * in earlier SSLeay/OpenSSL releases this test existed but was buggy) */
852 if (s->version == SSL3_VERSION)
853 {
854 if (p < (d+n))
855 {
856 /* wrong number of bytes,
857 * there could be more to follow */
858 al=SSL_AD_DECODE_ERROR;
859 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_LENGTH_MISMATCH);
860 goto f_err;
861 }
862 }
863#endif
864
865 /* Given s->session->ciphers and SSL_get_ciphers, we must
866 * pick a cipher */
867
868 if (!s->hit)
869 {
870 s->session->compress_meth=(comp == NULL)?0:comp->id;
871 if (s->session->ciphers != NULL)
872 sk_SSL_CIPHER_free(s->session->ciphers);
873 s->session->ciphers=ciphers;
874 if (ciphers == NULL)
875 {
876 al=SSL_AD_ILLEGAL_PARAMETER;
877 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_NO_CIPHERS_PASSED);
878 goto f_err;
879 }
880 ciphers=NULL;
881 c=ssl3_choose_cipher(s,s->session->ciphers,
882 SSL_get_ciphers(s));
883
884 if (c == NULL)
885 {
886 al=SSL_AD_HANDSHAKE_FAILURE;
887 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_NO_SHARED_CIPHER);
888 goto f_err;
889 }
890 s->s3->tmp.new_cipher=c;
891 }
892 else
893 {
894 /* Session-id reuse */
895#ifdef REUSE_CIPHER_BUG
896 STACK_OF(SSL_CIPHER) *sk;
897 SSL_CIPHER *nc=NULL;
898 SSL_CIPHER *ec=NULL;
899
900 if (s->options & SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG)
901 {
902 sk=s->session->ciphers;
903 for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
904 {
905 c=sk_SSL_CIPHER_value(sk,i);
906 if (c->algorithms & SSL_eNULL)
907 nc=c;
908 if (SSL_C_IS_EXPORT(c))
909 ec=c;
910 }
911 if (nc != NULL)
912 s->s3->tmp.new_cipher=nc;
913 else if (ec != NULL)
914 s->s3->tmp.new_cipher=ec;
915 else
916 s->s3->tmp.new_cipher=s->session->cipher;
917 }
918 else
919#endif
920 s->s3->tmp.new_cipher=s->session->cipher;
921 }
922
923 /* we now have the following setup.
924 * client_random
925 * cipher_list - our prefered list of ciphers
926 * ciphers - the clients prefered list of ciphers
927 * compression - basically ignored right now
928 * ssl version is set - sslv3
929 * s->session - The ssl session has been setup.
930 * s->hit - session reuse flag
931 * s->tmp.new_cipher - the new cipher to use.
932 */
933
934 ret=1;
935 if (0)
936 {
937f_err:
938 ssl3_send_alert(s,SSL3_AL_FATAL,al);
939 }
940err:
941 if (ciphers != NULL) sk_SSL_CIPHER_free(ciphers);
942 return(ret);
943 }
944
945static int ssl3_send_server_hello(SSL *s)
946 {
947 unsigned char *buf;
948 unsigned char *p,*d;
949 int i,sl;
950 unsigned long l,Time;
951
952 if (s->state == SSL3_ST_SW_SRVR_HELLO_A)
953 {
954 buf=(unsigned char *)s->init_buf->data;
955 p=s->s3->server_random;
956 Time=time(NULL); /* Time */
957 l2n(Time,p);
958 RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
959 /* Do the message type and length last */
960 d=p= &(buf[4]);
961
962 *(p++)=s->version>>8;
963 *(p++)=s->version&0xff;
964
965 /* Random stuff */
966 memcpy(p,s->s3->server_random,SSL3_RANDOM_SIZE);
967 p+=SSL3_RANDOM_SIZE;
968
969 /* now in theory we have 3 options to sending back the
970 * session id. If it is a re-use, we send back the
971 * old session-id, if it is a new session, we send
972 * back the new session-id or we send back a 0 length
973 * session-id if we want it to be single use.
974 * Currently I will not implement the '0' length session-id
975 * 12-Jan-98 - I'll now support the '0' length stuff.
976 */
977 if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER))
978 s->session->session_id_length=0;
979
980 sl=s->session->session_id_length;
981 if (sl > sizeof s->session->session_id)
982 {
983 SSLerr(SSL_F_SSL3_SEND_SERVER_HELLO, ERR_R_INTERNAL_ERROR);
984 return -1;
985 }
986 *(p++)=sl;
987 memcpy(p,s->session->session_id,sl);
988 p+=sl;
989
990 /* put the cipher */
991 i=ssl3_put_cipher_by_char(s->s3->tmp.new_cipher,p);
992 p+=i;
993
994 /* put the compression method */
995 if (s->s3->tmp.new_compression == NULL)
996 *(p++)=0;
997 else
998 *(p++)=s->s3->tmp.new_compression->id;
999
1000 /* do the header */
1001 l=(p-d);
1002 d=buf;
1003 *(d++)=SSL3_MT_SERVER_HELLO;
1004 l2n3(l,d);
1005
1006 s->state=SSL3_ST_CW_CLNT_HELLO_B;
1007 /* number of bytes to write */
1008 s->init_num=p-buf;
1009 s->init_off=0;
1010 }
1011
1012 /* SSL3_ST_CW_CLNT_HELLO_B */
1013 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
1014 }
1015
1016static int ssl3_send_server_done(SSL *s)
1017 {
1018 unsigned char *p;
1019
1020 if (s->state == SSL3_ST_SW_SRVR_DONE_A)
1021 {
1022 p=(unsigned char *)s->init_buf->data;
1023
1024 /* do the header */
1025 *(p++)=SSL3_MT_SERVER_DONE;
1026 *(p++)=0;
1027 *(p++)=0;
1028 *(p++)=0;
1029
1030 s->state=SSL3_ST_SW_SRVR_DONE_B;
1031 /* number of bytes to write */
1032 s->init_num=4;
1033 s->init_off=0;
1034 }
1035
1036 /* SSL3_ST_CW_CLNT_HELLO_B */
1037 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
1038 }
1039
1040static int ssl3_send_server_key_exchange(SSL *s)
1041 {
1042#ifndef OPENSSL_NO_RSA
1043 unsigned char *q;
1044 int j,num;
1045 RSA *rsa;
1046 unsigned char md_buf[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH];
1047 unsigned int u;
1048#endif
1049#ifndef OPENSSL_NO_DH
1050 DH *dh=NULL,*dhp;
1051#endif
1052 EVP_PKEY *pkey;
1053 unsigned char *p,*d;
1054 int al,i;
1055 unsigned long type;
1056 int n;
1057 CERT *cert;
1058 BIGNUM *r[4];
1059 int nr[4],kn;
1060 BUF_MEM *buf;
1061 EVP_MD_CTX md_ctx;
1062
1063 EVP_MD_CTX_init(&md_ctx);
1064 if (s->state == SSL3_ST_SW_KEY_EXCH_A)
1065 {
1066 type=s->s3->tmp.new_cipher->algorithms & SSL_MKEY_MASK;
1067 cert=s->cert;
1068
1069 buf=s->init_buf;
1070
1071 r[0]=r[1]=r[2]=r[3]=NULL;
1072 n=0;
1073#ifndef OPENSSL_NO_RSA
1074 if (type & SSL_kRSA)
1075 {
1076 rsa=cert->rsa_tmp;
1077 if ((rsa == NULL) && (s->cert->rsa_tmp_cb != NULL))
1078 {
1079 rsa=s->cert->rsa_tmp_cb(s,
1080 SSL_C_IS_EXPORT(s->s3->tmp.new_cipher),
1081 SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher));
1082 if(rsa == NULL)
1083 {
1084 al=SSL_AD_HANDSHAKE_FAILURE;
1085 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_ERROR_GENERATING_TMP_RSA_KEY);
1086 goto f_err;
1087 }
1088 RSA_up_ref(rsa);
1089 cert->rsa_tmp=rsa;
1090 }
1091 if (rsa == NULL)
1092 {
1093 al=SSL_AD_HANDSHAKE_FAILURE;
1094 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_MISSING_TMP_RSA_KEY);
1095 goto f_err;
1096 }
1097 r[0]=rsa->n;
1098 r[1]=rsa->e;
1099 s->s3->tmp.use_rsa_tmp=1;
1100 }
1101 else
1102#endif
1103#ifndef OPENSSL_NO_DH
1104 if (type & SSL_kEDH)
1105 {
1106 dhp=cert->dh_tmp;
1107 if ((dhp == NULL) && (s->cert->dh_tmp_cb != NULL))
1108 dhp=s->cert->dh_tmp_cb(s,
1109 SSL_C_IS_EXPORT(s->s3->tmp.new_cipher),
1110 SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher));
1111 if (dhp == NULL)
1112 {
1113 al=SSL_AD_HANDSHAKE_FAILURE;
1114 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_MISSING_TMP_DH_KEY);
1115 goto f_err;
1116 }
1117
1118 if (s->s3->tmp.dh != NULL)
1119 {
1120 DH_free(dh);
1121 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
1122 goto err;
1123 }
1124
1125 if ((dh=DHparams_dup(dhp)) == NULL)
1126 {
1127 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_DH_LIB);
1128 goto err;
1129 }
1130
1131 s->s3->tmp.dh=dh;
1132 if ((dhp->pub_key == NULL ||
1133 dhp->priv_key == NULL ||
1134 (s->options & SSL_OP_SINGLE_DH_USE)))
1135 {
1136 if(!DH_generate_key(dh))
1137 {
1138 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,
1139 ERR_R_DH_LIB);
1140 goto err;
1141 }
1142 }
1143 else
1144 {
1145 dh->pub_key=BN_dup(dhp->pub_key);
1146 dh->priv_key=BN_dup(dhp->priv_key);
1147 if ((dh->pub_key == NULL) ||
1148 (dh->priv_key == NULL))
1149 {
1150 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_DH_LIB);
1151 goto err;
1152 }
1153 }
1154 r[0]=dh->p;
1155 r[1]=dh->g;
1156 r[2]=dh->pub_key;
1157 }
1158 else
1159#endif
1160 {
1161 al=SSL_AD_HANDSHAKE_FAILURE;
1162 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE);
1163 goto f_err;
1164 }
1165 for (i=0; r[i] != NULL; i++)
1166 {
1167 nr[i]=BN_num_bytes(r[i]);
1168 n+=2+nr[i];
1169 }
1170
1171 if (!(s->s3->tmp.new_cipher->algorithms & SSL_aNULL))
1172 {
1173 if ((pkey=ssl_get_sign_pkey(s,s->s3->tmp.new_cipher))
1174 == NULL)
1175 {
1176 al=SSL_AD_DECODE_ERROR;
1177 goto f_err;
1178 }
1179 kn=EVP_PKEY_size(pkey);
1180 }
1181 else
1182 {
1183 pkey=NULL;
1184 kn=0;
1185 }
1186
1187 if (!BUF_MEM_grow_clean(buf,n+4+kn))
1188 {
1189 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_LIB_BUF);
1190 goto err;
1191 }
1192 d=(unsigned char *)s->init_buf->data;
1193 p= &(d[4]);
1194
1195 for (i=0; r[i] != NULL; i++)
1196 {
1197 s2n(nr[i],p);
1198 BN_bn2bin(r[i],p);
1199 p+=nr[i];
1200 }
1201
1202 /* not anonymous */
1203 if (pkey != NULL)
1204 {
1205 /* n is the length of the params, they start at &(d[4])
1206 * and p points to the space at the end. */
1207#ifndef OPENSSL_NO_RSA
1208 if (pkey->type == EVP_PKEY_RSA)
1209 {
1210 q=md_buf;
1211 j=0;
1212 for (num=2; num > 0; num--)
1213 {
1214 EVP_DigestInit_ex(&md_ctx,(num == 2)
1215 ?s->ctx->md5:s->ctx->sha1, NULL);
1216 EVP_DigestUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
1217 EVP_DigestUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
1218 EVP_DigestUpdate(&md_ctx,&(d[4]),n);
1219 EVP_DigestFinal_ex(&md_ctx,q,
1220 (unsigned int *)&i);
1221 q+=i;
1222 j+=i;
1223 }
1224 if (RSA_sign(NID_md5_sha1, md_buf, j,
1225 &(p[2]), &u, pkey->pkey.rsa) <= 0)
1226 {
1227 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_LIB_RSA);
1228 goto err;
1229 }
1230 s2n(u,p);
1231 n+=u+2;
1232 }
1233 else
1234#endif
1235#if !defined(OPENSSL_NO_DSA)
1236 if (pkey->type == EVP_PKEY_DSA)
1237 {
1238 /* lets do DSS */
1239 EVP_SignInit_ex(&md_ctx,EVP_dss1(), NULL);
1240 EVP_SignUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
1241 EVP_SignUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
1242 EVP_SignUpdate(&md_ctx,&(d[4]),n);
1243 if (!EVP_SignFinal(&md_ctx,&(p[2]),
1244 (unsigned int *)&i,pkey))
1245 {
1246 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_LIB_DSA);
1247 goto err;
1248 }
1249 s2n(i,p);
1250 n+=i+2;
1251 }
1252 else
1253#endif
1254 {
1255 /* Is this error check actually needed? */
1256 al=SSL_AD_HANDSHAKE_FAILURE;
1257 SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_UNKNOWN_PKEY_TYPE);
1258 goto f_err;
1259 }
1260 }
1261
1262 *(d++)=SSL3_MT_SERVER_KEY_EXCHANGE;
1263 l2n3(n,d);
1264
1265 /* we should now have things packed up, so lets send
1266 * it off */
1267 s->init_num=n+4;
1268 s->init_off=0;
1269 }
1270
1271 s->state = SSL3_ST_SW_KEY_EXCH_B;
1272 EVP_MD_CTX_cleanup(&md_ctx);
1273 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
1274f_err:
1275 ssl3_send_alert(s,SSL3_AL_FATAL,al);
1276err:
1277 EVP_MD_CTX_cleanup(&md_ctx);
1278 return(-1);
1279 }
1280
1281static int ssl3_send_certificate_request(SSL *s)
1282 {
1283 unsigned char *p,*d;
1284 int i,j,nl,off,n;
1285 STACK_OF(X509_NAME) *sk=NULL;
1286 X509_NAME *name;
1287 BUF_MEM *buf;
1288
1289 if (s->state == SSL3_ST_SW_CERT_REQ_A)
1290 {
1291 buf=s->init_buf;
1292
1293 d=p=(unsigned char *)&(buf->data[4]);
1294
1295 /* get the list of acceptable cert types */
1296 p++;
1297 n=ssl3_get_req_cert_type(s,p);
1298 d[0]=n;
1299 p+=n;
1300 n++;
1301
1302 off=n;
1303 p+=2;
1304 n+=2;
1305
1306 sk=SSL_get_client_CA_list(s);
1307 nl=0;
1308 if (sk != NULL)
1309 {
1310 for (i=0; i<sk_X509_NAME_num(sk); i++)
1311 {
1312 name=sk_X509_NAME_value(sk,i);
1313 j=i2d_X509_NAME(name,NULL);
1314 if (!BUF_MEM_grow_clean(buf,4+n+j+2))
1315 {
1316 SSLerr(SSL_F_SSL3_SEND_CERTIFICATE_REQUEST,ERR_R_BUF_LIB);
1317 goto err;
1318 }
1319 p=(unsigned char *)&(buf->data[4+n]);
1320 if (!(s->options & SSL_OP_NETSCAPE_CA_DN_BUG))
1321 {
1322 s2n(j,p);
1323 i2d_X509_NAME(name,&p);
1324 n+=2+j;
1325 nl+=2+j;
1326 }
1327 else
1328 {
1329 d=p;
1330 i2d_X509_NAME(name,&p);
1331 j-=2; s2n(j,d); j+=2;
1332 n+=j;
1333 nl+=j;
1334 }
1335 }
1336 }
1337 /* else no CA names */
1338 p=(unsigned char *)&(buf->data[4+off]);
1339 s2n(nl,p);
1340
1341 d=(unsigned char *)buf->data;
1342 *(d++)=SSL3_MT_CERTIFICATE_REQUEST;
1343 l2n3(n,d);
1344
1345 /* we should now have things packed up, so lets send
1346 * it off */
1347
1348 s->init_num=n+4;
1349 s->init_off=0;
1350#ifdef NETSCAPE_HANG_BUG
1351 p=(unsigned char *)s->init_buf->data + s->init_num;
1352
1353 /* do the header */
1354 *(p++)=SSL3_MT_SERVER_DONE;
1355 *(p++)=0;
1356 *(p++)=0;
1357 *(p++)=0;
1358 s->init_num += 4;
1359#endif
1360
1361 s->state = SSL3_ST_SW_CERT_REQ_B;
1362 }
1363
1364 /* SSL3_ST_SW_CERT_REQ_B */
1365 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
1366err:
1367 return(-1);
1368 }
1369
1370static int ssl3_get_client_key_exchange(SSL *s)
1371 {
1372 int i,al,ok;
1373 long n;
1374 unsigned long l;
1375 unsigned char *p;
1376#ifndef OPENSSL_NO_RSA
1377 RSA *rsa=NULL;
1378 EVP_PKEY *pkey=NULL;
1379#endif
1380#ifndef OPENSSL_NO_DH
1381 BIGNUM *pub=NULL;
1382 DH *dh_srvr;
1383#endif
1384#ifndef OPENSSL_NO_KRB5
1385 KSSL_ERR kssl_err;
1386#endif /* OPENSSL_NO_KRB5 */
1387
1388 n=ssl3_get_message(s,
1389 SSL3_ST_SR_KEY_EXCH_A,
1390 SSL3_ST_SR_KEY_EXCH_B,
1391 SSL3_MT_CLIENT_KEY_EXCHANGE,
1392 2048, /* ??? */
1393 &ok);
1394
1395 if (!ok) return((int)n);
1396 p=(unsigned char *)s->init_msg;
1397
1398 l=s->s3->tmp.new_cipher->algorithms;
1399
1400#ifndef OPENSSL_NO_RSA
1401 if (l & SSL_kRSA)
1402 {
1403 /* FIX THIS UP EAY EAY EAY EAY */
1404 if (s->s3->tmp.use_rsa_tmp)
1405 {
1406 if ((s->cert != NULL) && (s->cert->rsa_tmp != NULL))
1407 rsa=s->cert->rsa_tmp;
1408 /* Don't do a callback because rsa_tmp should
1409 * be sent already */
1410 if (rsa == NULL)
1411 {
1412 al=SSL_AD_HANDSHAKE_FAILURE;
1413 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_MISSING_TMP_RSA_PKEY);
1414 goto f_err;
1415
1416 }
1417 }
1418 else
1419 {
1420 pkey=s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey;
1421 if ( (pkey == NULL) ||
1422 (pkey->type != EVP_PKEY_RSA) ||
1423 (pkey->pkey.rsa == NULL))
1424 {
1425 al=SSL_AD_HANDSHAKE_FAILURE;
1426 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_MISSING_RSA_CERTIFICATE);
1427 goto f_err;
1428 }
1429 rsa=pkey->pkey.rsa;
1430 }
1431
1432 /* TLS */
1433 if (s->version > SSL3_VERSION)
1434 {
1435 n2s(p,i);
1436 if (n != i+2)
1437 {
1438 if (!(s->options & SSL_OP_TLS_D5_BUG))
1439 {
1440 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG);
1441 goto err;
1442 }
1443 else
1444 p-=2;
1445 }
1446 else
1447 n=i;
1448 }
1449
1450 i=RSA_private_decrypt((int)n,p,p,rsa,RSA_PKCS1_PADDING);
1451
1452 al = -1;
1453
1454 if (i != SSL_MAX_MASTER_KEY_LENGTH)
1455 {
1456 al=SSL_AD_DECODE_ERROR;
1457 /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); */
1458 }
1459
1460 if ((al == -1) && !((p[0] == (s->client_version>>8)) && (p[1] == (s->client_version & 0xff))))
1461 {
1462 /* The premaster secret must contain the same version number as the
1463 * ClientHello to detect version rollback attacks (strangely, the
1464 * protocol does not offer such protection for DH ciphersuites).
1465 * However, buggy clients exist that send the negotiated protocol
1466 * version instead if the server does not support the requested
1467 * protocol version.
1468 * If SSL_OP_TLS_ROLLBACK_BUG is set, tolerate such clients. */
1469 if (!((s->options & SSL_OP_TLS_ROLLBACK_BUG) &&
1470 (p[0] == (s->version>>8)) && (p[1] == (s->version & 0xff))))
1471 {
1472 al=SSL_AD_DECODE_ERROR;
1473 /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); */
1474
1475 /* The Klima-Pokorny-Rosa extension of Bleichenbacher's attack
1476 * (http://eprint.iacr.org/2003/052/) exploits the version
1477 * number check as a "bad version oracle" -- an alert would
1478 * reveal that the plaintext corresponding to some ciphertext
1479 * made up by the adversary is properly formatted except
1480 * that the version number is wrong. To avoid such attacks,
1481 * we should treat this just like any other decryption error. */
1482 }
1483 }
1484
1485 if (al != -1)
1486 {
1487 /* Some decryption failure -- use random value instead as countermeasure
1488 * against Bleichenbacher's attack on PKCS #1 v1.5 RSA padding
1489 * (see RFC 2246, section 7.4.7.1). */
1490 ERR_clear_error();
1491 i = SSL_MAX_MASTER_KEY_LENGTH;
1492 p[0] = s->client_version >> 8;
1493 p[1] = s->client_version & 0xff;
1494 RAND_pseudo_bytes(p+2, i-2); /* should be RAND_bytes, but we cannot work around a failure */
1495 }
1496
1497 s->session->master_key_length=
1498 s->method->ssl3_enc->generate_master_secret(s,
1499 s->session->master_key,
1500 p,i);
1501 OPENSSL_cleanse(p,i);
1502 }
1503 else
1504#endif
1505#ifndef OPENSSL_NO_DH
1506 if (l & (SSL_kEDH|SSL_kDHr|SSL_kDHd))
1507 {
1508 n2s(p,i);
1509 if (n != i+2)
1510 {
1511 if (!(s->options & SSL_OP_SSLEAY_080_CLIENT_DH_BUG))
1512 {
1513 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG);
1514 goto err;
1515 }
1516 else
1517 {
1518 p-=2;
1519 i=(int)n;
1520 }
1521 }
1522
1523 if (n == 0L) /* the parameters are in the cert */
1524 {
1525 al=SSL_AD_HANDSHAKE_FAILURE;
1526 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_UNABLE_TO_DECODE_DH_CERTS);
1527 goto f_err;
1528 }
1529 else
1530 {
1531 if (s->s3->tmp.dh == NULL)
1532 {
1533 al=SSL_AD_HANDSHAKE_FAILURE;
1534 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_MISSING_TMP_DH_KEY);
1535 goto f_err;
1536 }
1537 else
1538 dh_srvr=s->s3->tmp.dh;
1539 }
1540
1541 pub=BN_bin2bn(p,i,NULL);
1542 if (pub == NULL)
1543 {
1544 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BN_LIB);
1545 goto err;
1546 }
1547
1548 i=DH_compute_key(p,pub,dh_srvr);
1549
1550 if (i <= 0)
1551 {
1552 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB);
1553 goto err;
1554 }
1555
1556 DH_free(s->s3->tmp.dh);
1557 s->s3->tmp.dh=NULL;
1558
1559 BN_clear_free(pub);
1560 pub=NULL;
1561 s->session->master_key_length=
1562 s->method->ssl3_enc->generate_master_secret(s,
1563 s->session->master_key,p,i);
1564 OPENSSL_cleanse(p,i);
1565 }
1566 else
1567#endif
1568#ifndef OPENSSL_NO_KRB5
1569 if (l & SSL_kKRB5)
1570 {
1571 krb5_error_code krb5rc;
1572 krb5_data enc_ticket;
1573 krb5_data authenticator;
1574 krb5_data enc_pms;
1575 KSSL_CTX *kssl_ctx = s->kssl_ctx;
1576 EVP_CIPHER_CTX ciph_ctx;
1577 EVP_CIPHER *enc = NULL;
1578 unsigned char iv[EVP_MAX_IV_LENGTH];
1579 unsigned char pms[SSL_MAX_MASTER_KEY_LENGTH
1580 + EVP_MAX_BLOCK_LENGTH];
1581 int padl, outl;
1582 krb5_timestamp authtime = 0;
1583 krb5_ticket_times ttimes;
1584
1585 EVP_CIPHER_CTX_init(&ciph_ctx);
1586
1587 if (!kssl_ctx) kssl_ctx = kssl_ctx_new();
1588
1589 n2s(p,i);
1590 enc_ticket.length = i;
1591
1592 if (n < enc_ticket.length + 6)
1593 {
1594 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1595 SSL_R_DATA_LENGTH_TOO_LONG);
1596 goto err;
1597 }
1598
1599 enc_ticket.data = (char *)p;
1600 p+=enc_ticket.length;
1601
1602 n2s(p,i);
1603 authenticator.length = i;
1604
1605 if (n < enc_ticket.length + authenticator.length + 6)
1606 {
1607 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1608 SSL_R_DATA_LENGTH_TOO_LONG);
1609 goto err;
1610 }
1611
1612 authenticator.data = (char *)p;
1613 p+=authenticator.length;
1614
1615 n2s(p,i);
1616 enc_pms.length = i;
1617 enc_pms.data = (char *)p;
1618 p+=enc_pms.length;
1619
1620 /* Note that the length is checked again below,
1621 ** after decryption
1622 */
1623 if(enc_pms.length > sizeof pms)
1624 {
1625 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1626 SSL_R_DATA_LENGTH_TOO_LONG);
1627 goto err;
1628 }
1629
1630 if (n != enc_ticket.length + authenticator.length +
1631 enc_pms.length + 6)
1632 {
1633 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1634 SSL_R_DATA_LENGTH_TOO_LONG);
1635 goto err;
1636 }
1637
1638 if ((krb5rc = kssl_sget_tkt(kssl_ctx, &enc_ticket, &ttimes,
1639 &kssl_err)) != 0)
1640 {
1641#ifdef KSSL_DEBUG
1642 printf("kssl_sget_tkt rtn %d [%d]\n",
1643 krb5rc, kssl_err.reason);
1644 if (kssl_err.text)
1645 printf("kssl_err text= %s\n", kssl_err.text);
1646#endif /* KSSL_DEBUG */
1647 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,
1648 kssl_err.reason);
1649 goto err;
1650 }
1651
1652 /* Note: no authenticator is not considered an error,
1653 ** but will return authtime == 0.
1654 */
1655 if ((krb5rc = kssl_check_authent(kssl_ctx, &authenticator,
1656 &authtime, &kssl_err)) != 0)
1657 {
1658#ifdef KSSL_DEBUG
1659 printf("kssl_check_authent rtn %d [%d]\n",
1660 krb5rc, kssl_err.reason);
1661 if (kssl_err.text)
1662 printf("kssl_err text= %s\n", kssl_err.text);
1663#endif /* KSSL_DEBUG */
1664 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,
1665 kssl_err.reason);
1666 goto err;
1667 }
1668
1669 if ((krb5rc = kssl_validate_times(authtime, &ttimes)) != 0)
1670 {
1671 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, krb5rc);
1672 goto err;
1673 }
1674
1675#ifdef KSSL_DEBUG
1676 kssl_ctx_show(kssl_ctx);
1677#endif /* KSSL_DEBUG */
1678
1679 enc = kssl_map_enc(kssl_ctx->enctype);
1680 if (enc == NULL)
1681 goto err;
1682
1683 memset(iv, 0, sizeof iv); /* per RFC 1510 */
1684
1685 if (!EVP_DecryptInit_ex(&ciph_ctx,enc,NULL,kssl_ctx->key,iv))
1686 {
1687 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1688 SSL_R_DECRYPTION_FAILED);
1689 goto err;
1690 }
1691 if (!EVP_DecryptUpdate(&ciph_ctx, pms,&outl,
1692 (unsigned char *)enc_pms.data, enc_pms.length))
1693 {
1694 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1695 SSL_R_DECRYPTION_FAILED);
1696 goto err;
1697 }
1698 if (outl > SSL_MAX_MASTER_KEY_LENGTH)
1699 {
1700 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1701 SSL_R_DATA_LENGTH_TOO_LONG);
1702 goto err;
1703 }
1704 if (!EVP_DecryptFinal_ex(&ciph_ctx,&(pms[outl]),&padl))
1705 {
1706 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1707 SSL_R_DECRYPTION_FAILED);
1708 goto err;
1709 }
1710 outl += padl;
1711 if (outl > SSL_MAX_MASTER_KEY_LENGTH)
1712 {
1713 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1714 SSL_R_DATA_LENGTH_TOO_LONG);
1715 goto err;
1716 }
1717 EVP_CIPHER_CTX_cleanup(&ciph_ctx);
1718
1719 s->session->master_key_length=
1720 s->method->ssl3_enc->generate_master_secret(s,
1721 s->session->master_key, pms, outl);
1722
1723 if (kssl_ctx->client_princ)
1724 {
1725 int len = strlen(kssl_ctx->client_princ);
1726 if ( len < SSL_MAX_KRB5_PRINCIPAL_LENGTH )
1727 {
1728 s->session->krb5_client_princ_len = len;
1729 memcpy(s->session->krb5_client_princ,kssl_ctx->client_princ,len);
1730 }
1731 }
1732
1733
1734 /* Was doing kssl_ctx_free() here,
1735 ** but it caused problems for apache.
1736 ** kssl_ctx = kssl_ctx_free(kssl_ctx);
1737 ** if (s->kssl_ctx) s->kssl_ctx = NULL;
1738 */
1739 }
1740 else
1741#endif /* OPENSSL_NO_KRB5 */
1742 {
1743 al=SSL_AD_HANDSHAKE_FAILURE;
1744 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1745 SSL_R_UNKNOWN_CIPHER_TYPE);
1746 goto f_err;
1747 }
1748
1749 return(1);
1750f_err:
1751 ssl3_send_alert(s,SSL3_AL_FATAL,al);
1752#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA)
1753err:
1754#endif
1755 return(-1);
1756 }
1757
1758static int ssl3_get_cert_verify(SSL *s)
1759 {
1760 EVP_PKEY *pkey=NULL;
1761 unsigned char *p;
1762 int al,ok,ret=0;
1763 long n;
1764 int type=0,i,j;
1765 X509 *peer;
1766
1767 n=ssl3_get_message(s,
1768 SSL3_ST_SR_CERT_VRFY_A,
1769 SSL3_ST_SR_CERT_VRFY_B,
1770 -1,
1771 514, /* 514? */
1772 &ok);
1773
1774 if (!ok) return((int)n);
1775
1776 if (s->session->peer != NULL)
1777 {
1778 peer=s->session->peer;
1779 pkey=X509_get_pubkey(peer);
1780 type=X509_certificate_type(peer,pkey);
1781 }
1782 else
1783 {
1784 peer=NULL;
1785 pkey=NULL;
1786 }
1787
1788 if (s->s3->tmp.message_type != SSL3_MT_CERTIFICATE_VERIFY)
1789 {
1790 s->s3->tmp.reuse_message=1;
1791 if ((peer != NULL) && (type | EVP_PKT_SIGN))
1792 {
1793 al=SSL_AD_UNEXPECTED_MESSAGE;
1794 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_MISSING_VERIFY_MESSAGE);
1795 goto f_err;
1796 }
1797 ret=1;
1798 goto end;
1799 }
1800
1801 if (peer == NULL)
1802 {
1803 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_NO_CLIENT_CERT_RECEIVED);
1804 al=SSL_AD_UNEXPECTED_MESSAGE;
1805 goto f_err;
1806 }
1807
1808 if (!(type & EVP_PKT_SIGN))
1809 {
1810 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE);
1811 al=SSL_AD_ILLEGAL_PARAMETER;
1812 goto f_err;
1813 }
1814
1815 if (s->s3->change_cipher_spec)
1816 {
1817 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_CCS_RECEIVED_EARLY);
1818 al=SSL_AD_UNEXPECTED_MESSAGE;
1819 goto f_err;
1820 }
1821
1822 /* we now have a signature that we need to verify */
1823 p=(unsigned char *)s->init_msg;
1824 n2s(p,i);
1825 n-=2;
1826 if (i > n)
1827 {
1828 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_LENGTH_MISMATCH);
1829 al=SSL_AD_DECODE_ERROR;
1830 goto f_err;
1831 }
1832
1833 j=EVP_PKEY_size(pkey);
1834 if ((i > j) || (n > j) || (n <= 0))
1835 {
1836 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_WRONG_SIGNATURE_SIZE);
1837 al=SSL_AD_DECODE_ERROR;
1838 goto f_err;
1839 }
1840
1841#ifndef OPENSSL_NO_RSA
1842 if (pkey->type == EVP_PKEY_RSA)
1843 {
1844 i=RSA_verify(NID_md5_sha1, s->s3->tmp.cert_verify_md,
1845 MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH, p, i,
1846 pkey->pkey.rsa);
1847 if (i < 0)
1848 {
1849 al=SSL_AD_DECRYPT_ERROR;
1850 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_BAD_RSA_DECRYPT);
1851 goto f_err;
1852 }
1853 if (i == 0)
1854 {
1855 al=SSL_AD_DECRYPT_ERROR;
1856 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_BAD_RSA_SIGNATURE);
1857 goto f_err;
1858 }
1859 }
1860 else
1861#endif
1862#ifndef OPENSSL_NO_DSA
1863 if (pkey->type == EVP_PKEY_DSA)
1864 {
1865 j=DSA_verify(pkey->save_type,
1866 &(s->s3->tmp.cert_verify_md[MD5_DIGEST_LENGTH]),
1867 SHA_DIGEST_LENGTH,p,i,pkey->pkey.dsa);
1868 if (j <= 0)
1869 {
1870 /* bad signature */
1871 al=SSL_AD_DECRYPT_ERROR;
1872 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_BAD_DSA_SIGNATURE);
1873 goto f_err;
1874 }
1875 }
1876 else
1877#endif
1878 {
1879 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,ERR_R_INTERNAL_ERROR);
1880 al=SSL_AD_UNSUPPORTED_CERTIFICATE;
1881 goto f_err;
1882 }
1883
1884
1885 ret=1;
1886 if (0)
1887 {
1888f_err:
1889 ssl3_send_alert(s,SSL3_AL_FATAL,al);
1890 }
1891end:
1892 EVP_PKEY_free(pkey);
1893 return(ret);
1894 }
1895
1896static int ssl3_get_client_certificate(SSL *s)
1897 {
1898 int i,ok,al,ret= -1;
1899 X509 *x=NULL;
1900 unsigned long l,nc,llen,n;
1901 unsigned char *p,*d,*q;
1902 STACK_OF(X509) *sk=NULL;
1903
1904 n=ssl3_get_message(s,
1905 SSL3_ST_SR_CERT_A,
1906 SSL3_ST_SR_CERT_B,
1907 -1,
1908 s->max_cert_list,
1909 &ok);
1910
1911 if (!ok) return((int)n);
1912
1913 if (s->s3->tmp.message_type == SSL3_MT_CLIENT_KEY_EXCHANGE)
1914 {
1915 if ( (s->verify_mode & SSL_VERIFY_PEER) &&
1916 (s->verify_mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT))
1917 {
1918 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE);
1919 al=SSL_AD_HANDSHAKE_FAILURE;
1920 goto f_err;
1921 }
1922 /* If tls asked for a client cert, the client must return a 0 list */
1923 if ((s->version > SSL3_VERSION) && s->s3->tmp.cert_request)
1924 {
1925 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST);
1926 al=SSL_AD_UNEXPECTED_MESSAGE;
1927 goto f_err;
1928 }
1929 s->s3->tmp.reuse_message=1;
1930 return(1);
1931 }
1932
1933 if (s->s3->tmp.message_type != SSL3_MT_CERTIFICATE)
1934 {
1935 al=SSL_AD_UNEXPECTED_MESSAGE;
1936 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_WRONG_MESSAGE_TYPE);
1937 goto f_err;
1938 }
1939 d=p=(unsigned char *)s->init_msg;
1940
1941 if ((sk=sk_X509_new_null()) == NULL)
1942 {
1943 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,ERR_R_MALLOC_FAILURE);
1944 goto err;
1945 }
1946
1947 n2l3(p,llen);
1948 if (llen+3 != n)
1949 {
1950 al=SSL_AD_DECODE_ERROR;
1951 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_LENGTH_MISMATCH);
1952 goto f_err;
1953 }
1954 for (nc=0; nc<llen; )
1955 {
1956 n2l3(p,l);
1957 if ((l+nc+3) > llen)
1958 {
1959 al=SSL_AD_DECODE_ERROR;
1960 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_CERT_LENGTH_MISMATCH);
1961 goto f_err;
1962 }
1963
1964 q=p;
1965 x=d2i_X509(NULL,&p,l);
1966 if (x == NULL)
1967 {
1968 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,ERR_R_ASN1_LIB);
1969 goto err;
1970 }
1971 if (p != (q+l))
1972 {
1973 al=SSL_AD_DECODE_ERROR;
1974 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_CERT_LENGTH_MISMATCH);
1975 goto f_err;
1976 }
1977 if (!sk_X509_push(sk,x))
1978 {
1979 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,ERR_R_MALLOC_FAILURE);
1980 goto err;
1981 }
1982 x=NULL;
1983 nc+=l+3;
1984 }
1985
1986 if (sk_X509_num(sk) <= 0)
1987 {
1988 /* TLS does not mind 0 certs returned */
1989 if (s->version == SSL3_VERSION)
1990 {
1991 al=SSL_AD_HANDSHAKE_FAILURE;
1992 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATES_RETURNED);
1993 goto f_err;
1994 }
1995 /* Fail for TLS only if we required a certificate */
1996 else if ((s->verify_mode & SSL_VERIFY_PEER) &&
1997 (s->verify_mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT))
1998 {
1999 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE);
2000 al=SSL_AD_HANDSHAKE_FAILURE;
2001 goto f_err;
2002 }
2003 }
2004 else
2005 {
2006 i=ssl_verify_cert_chain(s,sk);
2007 if (!i)
2008 {
2009 al=ssl_verify_alarm_type(s->verify_result);
2010 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED);
2011 goto f_err;
2012 }
2013 }
2014
2015 if (s->session->peer != NULL) /* This should not be needed */
2016 X509_free(s->session->peer);
2017 s->session->peer=sk_X509_shift(sk);
2018 s->session->verify_result = s->verify_result;
2019
2020 /* With the current implementation, sess_cert will always be NULL
2021 * when we arrive here. */
2022 if (s->session->sess_cert == NULL)
2023 {
2024 s->session->sess_cert = ssl_sess_cert_new();
2025 if (s->session->sess_cert == NULL)
2026 {
2027 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE, ERR_R_MALLOC_FAILURE);
2028 goto err;
2029 }
2030 }
2031 if (s->session->sess_cert->cert_chain != NULL)
2032 sk_X509_pop_free(s->session->sess_cert->cert_chain, X509_free);
2033 s->session->sess_cert->cert_chain=sk;
2034 /* Inconsistency alert: cert_chain does *not* include the
2035 * peer's own certificate, while we do include it in s3_clnt.c */
2036
2037 sk=NULL;
2038
2039 ret=1;
2040 if (0)
2041 {
2042f_err:
2043 ssl3_send_alert(s,SSL3_AL_FATAL,al);
2044 }
2045err:
2046 if (x != NULL) X509_free(x);
2047 if (sk != NULL) sk_X509_pop_free(sk,X509_free);
2048 return(ret);
2049 }
2050
2051int ssl3_send_server_certificate(SSL *s)
2052 {
2053 unsigned long l;
2054 X509 *x;
2055
2056 if (s->state == SSL3_ST_SW_CERT_A)
2057 {
2058 x=ssl_get_server_send_cert(s);
2059 if (x == NULL &&
2060 /* VRS: allow null cert if auth == KRB5 */
2061 (s->s3->tmp.new_cipher->algorithms
2062 & (SSL_MKEY_MASK|SSL_AUTH_MASK))
2063 != (SSL_aKRB5|SSL_kKRB5))
2064 {
2065 SSLerr(SSL_F_SSL3_SEND_SERVER_CERTIFICATE,ERR_R_INTERNAL_ERROR);
2066 return(0);
2067 }
2068
2069 l=ssl3_output_cert_chain(s,x);
2070 s->state=SSL3_ST_SW_CERT_B;
2071 s->init_num=(int)l;
2072 s->init_off=0;
2073 }
2074
2075 /* SSL3_ST_SW_CERT_B */
2076 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
2077 }
diff --git a/src/lib/libssl/shlib_version b/src/lib/libssl/shlib_version
new file mode 100644
index 0000000000..d0f0988b41
--- /dev/null
+++ b/src/lib/libssl/shlib_version
@@ -0,0 +1,2 @@
1major=8
2minor=0
diff --git a/src/lib/libssl/src/CHANGES b/src/lib/libssl/src/CHANGES
index 4a0363a1c2..b8630792ad 100644
--- a/src/lib/libssl/src/CHANGES
+++ b/src/lib/libssl/src/CHANGES
@@ -2,51 +2,6 @@
2 OpenSSL CHANGES 2 OpenSSL CHANGES
3 _______________ 3 _______________
4 4
5 Changes between 0.9.7c and 0.9.7d [17 Mar 2004]
6
7 *) Fix null-pointer assignment in do_change_cipher_spec() revealed
8 by using the Codenomicon TLS Test Tool (CAN-2004-0079)
9 [Joe Orton, Steve Henson]
10
11 *) Fix flaw in SSL/TLS handshaking when using Kerberos ciphersuites
12 (CAN-2004-0112)
13 [Joe Orton, Steve Henson]
14
15 *) Make it possible to have multiple active certificates with the same
16 subject in the CA index file. This is done only if the keyword
17 'unique_subject' is set to 'no' in the main CA section (default
18 if 'CA_default') of the configuration file. The value is saved
19 with the database itself in a separate index attribute file,
20 named like the index file with '.attr' appended to the name.
21 [Richard Levitte]
22
23 *) X509 verify fixes. Disable broken certificate workarounds when
24 X509_V_FLAGS_X509_STRICT is set. Check CRL issuer has cRLSign set if
25 keyUsage extension present. Don't accept CRLs with unhandled critical
26 extensions: since verify currently doesn't process CRL extensions this
27 rejects a CRL with *any* critical extensions. Add new verify error codes
28 for these cases.
29 [Steve Henson]
30
31 *) When creating an OCSP nonce use an OCTET STRING inside the extnValue.
32 A clarification of RFC2560 will require the use of OCTET STRINGs and
33 some implementations cannot handle the current raw format. Since OpenSSL
34 copies and compares OCSP nonces as opaque blobs without any attempt at
35 parsing them this should not create any compatibility issues.
36 [Steve Henson]
37
38 *) New md flag EVP_MD_CTX_FLAG_REUSE this allows md_data to be reused when
39 calling EVP_MD_CTX_copy_ex() to avoid calling OPENSSL_malloc(). Without
40 this HMAC (and other) operations are several times slower than OpenSSL
41 < 0.9.7.
42 [Steve Henson]
43
44 *) Print out GeneralizedTime and UTCTime in ASN1_STRING_print_ex().
45 [Peter Sylvester <Peter.Sylvester@EdelWeb.fr>]
46
47 *) Use the correct content when signing type "other".
48 [Steve Henson]
49
50 Changes between 0.9.7b and 0.9.7c [30 Sep 2003] 5 Changes between 0.9.7b and 0.9.7c [30 Sep 2003]
51 6
52 *) Fix various bugs revealed by running the NISCC test suite: 7 *) Fix various bugs revealed by running the NISCC test suite:
diff --git a/src/lib/libssl/src/Configure b/src/lib/libssl/src/Configure
index 4e7883c17a..61331dbb51 100644
--- a/src/lib/libssl/src/Configure
+++ b/src/lib/libssl/src/Configure
@@ -145,10 +145,10 @@ my %table=(
145"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}", 145"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}",
146"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", 146"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
147"debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT::dlfcn", 147"debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT::dlfcn",
148"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 148"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
149"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 149"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
150"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 150"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
151"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 151"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
152"dist", "cc:-O::(unknown)::::::", 152"dist", "cc:-O::(unknown)::::::",
153 153
154# Basic configs that should work on any (32 and less bit) box 154# Basic configs that should work on any (32 and less bit) box
@@ -216,13 +216,13 @@ my %table=(
216"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 216"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
217#### IRIX 6.x configs 217#### IRIX 6.x configs
218# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke 218# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
219# './Configure irix-cc -o32' manually. 219# './Configure irix-[g]cc' manually.
220# -mips4 flag is added by ./config when appropriate. 220# -mips4 flag is added by ./config when appropriate.
221"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:${mips3_irix_asm}:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 221"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:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
222"irix-mips3-cc", "cc:-n32 -mips3 -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:${mips3_irix_asm}:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 222"irix-mips3-cc", "cc:-n32 -mips3 -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:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
223# N64 ABI builds. 223# N64 ABI builds.
224"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:${mips3_irix_asm}:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 224"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:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
225"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:${mips3_irix_asm}:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 225"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:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
226 226
227#### Unified HP-UX ANSI C configs. 227#### Unified HP-UX ANSI C configs.
228# Special notes: 228# Special notes:
@@ -260,7 +260,6 @@ my %table=(
260# 64bit PARISC for GCC without optimization, which seems to make problems. 260# 64bit PARISC for GCC without optimization, which seems to make problems.
261# Submitted by <ross.alexander@uk.neceur.com> 261# Submitted by <ross.alexander@uk.neceur.com>
262"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 262"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
263"hpux64-parisc2-gcc","gcc:-O3 -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:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
264 263
265# IA-64 targets 264# IA-64 targets
266"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 265"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/src/lib/libssl/src/FAQ b/src/lib/libssl/src/FAQ
index 0b40039ef8..ca5683def7 100644
--- a/src/lib/libssl/src/FAQ
+++ b/src/lib/libssl/src/FAQ
@@ -68,7 +68,7 @@ OpenSSL - Frequently Asked Questions
68* Which is the current version of OpenSSL? 68* Which is the current version of OpenSSL?
69 69
70The current version is available from <URL: http://www.openssl.org>. 70The current version is available from <URL: http://www.openssl.org>.
71OpenSSL 0.9.7d was released on March 17, 2004. 71OpenSSL 0.9.7c was released on September 30, 2003.
72 72
73In addition to the current stable release, you can also access daily 73In addition to the current stable release, you can also access daily
74snapshots of the OpenSSL development version at <URL: 74snapshots of the OpenSSL development version at <URL:
@@ -116,14 +116,11 @@ OpenSSL. Information on the OpenSSL mailing lists is available from
116 116
117* Where can I get a compiled version of OpenSSL? 117* Where can I get a compiled version of OpenSSL?
118 118
119You can finder pointers to binary distributions in
120http://www.openssl.org/related/binaries.html .
121
122Some applications that use OpenSSL are distributed in binary form. 119Some applications that use OpenSSL are distributed in binary form.
123When using such an application, you don't need to install OpenSSL 120When using such an application, you don't need to install OpenSSL
124yourself; the application will include the required parts (e.g. DLLs). 121yourself; the application will include the required parts (e.g. DLLs).
125 122
126If you want to build OpenSSL on a Windows system and you don't have 123If you want to install OpenSSL on a Windows system and you don't have
127a C compiler, read the "Mingw32" section of INSTALL.W32 for information 124a C compiler, read the "Mingw32" section of INSTALL.W32 for information
128on how to obtain and install the free GNU C compiler. 125on how to obtain and install the free GNU C compiler.
129 126
diff --git a/src/lib/libssl/src/LICENSE b/src/lib/libssl/src/LICENSE
index 40277883a5..dddb07842b 100644
--- a/src/lib/libssl/src/LICENSE
+++ b/src/lib/libssl/src/LICENSE
@@ -12,7 +12,7 @@
12 --------------- 12 ---------------
13 13
14/* ==================================================================== 14/* ====================================================================
15 * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. 15 * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
16 * 16 *
17 * Redistribution and use in source and binary forms, with or without 17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions 18 * modification, are permitted provided that the following conditions
diff --git a/src/lib/libssl/src/Makefile.org b/src/lib/libssl/src/Makefile.org
index a987a0298b..e80b22a32a 100644
--- a/src/lib/libssl/src/Makefile.org
+++ b/src/lib/libssl/src/Makefile.org
@@ -456,12 +456,10 @@ do_irix-shared:
456 if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ 456 if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
457 libs="$(LIBKRB5) $$libs"; \ 457 libs="$(LIBKRB5) $$libs"; \
458 fi; \ 458 fi; \
459 ( WHOLELIB="-all lib$$i.a -notall"; \ 459 ( set -x; ${CC} ${SHARED_LDFLAGS} \
460 (${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-notall"; \
461 set -x; ${CC} ${SHARED_LDFLAGS} \
462 -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ 460 -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
463 -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ 461 -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
464 $${WHOLELIB} $$libs ${EX_LIBS} -lc) || exit 1; \ 462 -all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \
465 libs="-l$$i $$libs"; \ 463 libs="-l$$i $$libs"; \
466 done; \ 464 done; \
467 fi 465 fi
@@ -834,7 +832,7 @@ install: all install_docs
834 fi; \ 832 fi; \
835 fi 833 fi
836 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig 834 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
837 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc 835 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
838 836
839install_docs: 837install_docs:
840 @$(PERL) $(TOP)/util/mkdir-p.pl \ 838 @$(PERL) $(TOP)/util/mkdir-p.pl \
@@ -859,7 +857,6 @@ install_docs:
859 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ 857 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
860 $(PERL) util/extract-names.pl < $$i | \ 858 $(PERL) util/extract-names.pl < $$i | \
861 grep -v $$filecase "^$$fn\$$" | \ 859 grep -v $$filecase "^$$fn\$$" | \
862 grep -v "[ ]" | \
863 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ 860 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
864 while read n; do \ 861 while read n; do \
865 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ 862 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
@@ -876,7 +873,6 @@ install_docs:
876 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ 873 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
877 $(PERL) util/extract-names.pl < $$i | \ 874 $(PERL) util/extract-names.pl < $$i | \
878 grep -v $$filecase "^$$fn\$$" | \ 875 grep -v $$filecase "^$$fn\$$" | \
879 grep -v "[ ]" | \
880 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ 876 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
881 while read n; do \ 877 while read n; do \
882 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ 878 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
diff --git a/src/lib/libssl/src/NEWS b/src/lib/libssl/src/NEWS
index 4c1ba0a241..f0282ebb87 100644
--- a/src/lib/libssl/src/NEWS
+++ b/src/lib/libssl/src/NEWS
@@ -5,14 +5,6 @@
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.7c and OpenSSL 0.9.7d:
9
10 o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug
11 o Security: Fix null-pointer assignment in do_change_cipher_spec()
12 o Allow multiple active certificates with same subject in CA index
13 o Multiple X590 verification fixes
14 o Speed up HMAC and other operations
15
16 Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c: 8 Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c:
17 9
18 o Security: fix various ASN1 parsing bugs. 10 o Security: fix various ASN1 parsing bugs.
diff --git a/src/lib/libssl/src/PROBLEMS b/src/lib/libssl/src/PROBLEMS
deleted file mode 100644
index 85e96a5ebe..0000000000
--- a/src/lib/libssl/src/PROBLEMS
+++ /dev/null
@@ -1,131 +0,0 @@
1* System libcrypto.dylib and libssl.dylib are used by system ld on MacOS X.
2
3
4 NOTE: The problem described here only applies when OpenSSL isn't built
5 with shared library support (i.e. without the "shared" configuration
6 option). If you build with shared library support, you will have no
7 problems as long as you set up DYLD_LIBRARY_PATH properly at all times.
8
9
10This is really a misfeature in ld, which seems to look for .dylib libraries
11along the whole library path before it bothers looking for .a libraries. This
12means that -L switches won't matter unless OpenSSL is built with shared
13library support.
14
15The workaround may be to change the following lines in apps/Makefile.ssl and
16test/Makefile.ssl:
17
18 LIBCRYPTO=-L.. -lcrypto
19 LIBSSL=-L.. -lssl
20
21to:
22
23 LIBCRYPTO=../libcrypto.a
24 LIBSSL=../libssl.a
25
26It's possible that something similar is needed for shared library support
27as well. That hasn't been well tested yet.
28
29
30Another solution that many seem to recommend is to move the libraries
31/usr/lib/libcrypto.0.9.dylib, /usr/lib/libssl.0.9.dylib to a different
32directory, build and install OpenSSL and anything that depends on your
33build, then move libcrypto.0.9.dylib and libssl.0.9.dylib back to their
34original places. Note that the version numbers on those two libraries
35may differ on your machine.
36
37
38As long as Apple doesn't fix the problem with ld, this problem building
39OpenSSL will remain as is.
40
41
42* Parallell make leads to errors
43
44While running tests, running a parallell make is a bad idea. Many test
45scripts use the same name for output and input files, which means different
46will interfere with each other and lead to test failure.
47
48The solution is simple for now: don't run parallell make when testing.
49
50
51* Bugs in gcc 3.0 triggered
52
53According to a problem report, there are bugs in gcc 3.0 that are
54triggered by some of the code in OpenSSL, more specifically in
55PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
56
57 header+=11;
58 if (*header != '4') return(0); header++;
59 if (*header != ',') return(0); header++;
60
61What happens is that gcc might optimize a little too agressively, and
62you end up with an extra incrementation when *header != '4'.
63
64We recommend that you upgrade gcc to as high a 3.x version as you can.
65
66* solaris64-sparcv9-cc SHA-1 performance with WorkShop 6 compiler.
67
68As subject suggests SHA-1 might perform poorly (4 times slower)
69if compiled with WorkShop 6 compiler and -xarch=v9. The cause for
70this seems to be the fact that compiler emits multiplication to
71perform shift operations:-( To work the problem around configure
72with './Configure solaris64-sparcv9-cc -DMD32_REG_T=int'.
73
74* Problems with hp-parisc2-cc target when used with "no-asm" flag
75
76When using the hp-parisc2-cc target, wrong bignum code is generated.
77This is due to the SIXTY_FOUR_BIT build being compiled with the +O3
78aggressive optimization.
79The problem manifests itself by the BN_kronecker test hanging in an
80endless loop. Reason: the BN_kronecker test calls BN_generate_prime()
81which itself hangs. The reason could be tracked down to the bn_mul_comba8()
82function in bn_asm.c. At some occasions the higher 32bit value of r[7]
83is off by 1 (meaning: calculated=shouldbe+1). Further analysis failed,
84as no debugger support possible at +O3 and additional fprintf()'s
85introduced fixed the bug, therefore it is most likely a bug in the
86optimizer.
87The bug was found in the BN_kronecker test but may also lead to
88failures in other parts of the code.
89(See Ticket #426.)
90
91Workaround: modify the target to +O2 when building with no-asm.
92
93* Poor support for AIX shared builds.
94
95do_aix-shared rule is not flexible enough to parameterize through a
96config-line. './Configure aix43-cc shared' is working, but not
97'./Configure aix64-gcc shared'. In latter case make fails to create shared
98libraries. It's possible to build 64-bit shared libraries by running
99'env OBJECT_MODE=64 make', but we need more elegant solution. Preferably one
100supporting even gcc shared builds. See RT#463 for background information.
101
102* Problems building shared libraries on SCO OpenServer Release 5.0.6
103 with gcc 2.95.3
104
105The symptoms appear when running the test suite, more specifically
106test/ectest, with the following result:
107
108OSSL_LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH="$OSSL_LIBPATH:$LD_LIBRARY_PATH"; DYLD_LIBRARY_PATH="$OSSL_LIBPATH:$DYLD_LIBRARY_PATH"; SHLIB_PATH="$OSSL_LIBPATH:$SHLIB_PATH"; LIBPATH="$OSSL_LIBPATH:$LIBPATH"; if [ "debug-sco5-gcc" = "Cygwin" ]; then PATH="${LIBPATH}:$PATH"; fi; export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; ./ectest
109ectest.c:186: ABORT
110
111The cause of the problem seems to be that isxdigit(), called from
112BN_hex2bn(), returns 0 on a perfectly legitimate hex digit. Further
113investigation shows that any of the isxxx() macros return 0 on any
114input. A direct look in the information array that the isxxx() use,
115called __ctype, shows that it contains all zeroes...
116
117Taking a look at the newly created libcrypto.so with nm, one can see
118that the variable __ctype is defined in libcrypto's .bss (which
119explains why it is filled with zeroes):
120
121$ nm -Pg libcrypto.so | grep __ctype
122__ctype B 0011659c
123__ctype2 U
124
125Curiously, __ctype2 is undefined, in spite of being declared in
126/usr/include/ctype.h in exactly the same way as __ctype.
127
128Any information helping to solve this issue would be deeply
129appreciated.
130
131NOTE: building non-shared doesn't come with this problem.
diff --git a/src/lib/libssl/src/README b/src/lib/libssl/src/README
index f72a21036f..65e3a12426 100644
--- a/src/lib/libssl/src/README
+++ b/src/lib/libssl/src/README
@@ -1,7 +1,7 @@
1 1
2 OpenSSL 0.9.7d 17 Mar 2004 2 OpenSSL 0.9.7c 30 Sep 2003
3 3
4 Copyright (c) 1998-2004 The OpenSSL Project 4 Copyright (c) 1998-2003 The OpenSSL Project
5 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson 5 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
6 All rights reserved. 6 All rights reserved.
7 7
diff --git a/src/lib/libssl/src/apps/CA.pl b/src/lib/libssl/src/apps/CA.pl
deleted file mode 100644
index 8b2ce7ea42..0000000000
--- a/src/lib/libssl/src/apps/CA.pl
+++ /dev/null
@@ -1,173 +0,0 @@
1#!/usr/local/bin/perl
2#
3# CA - wrapper around ca to make it easier to use ... basically ca requires
4# some setup stuff to be done before you can use it and this makes
5# things easier between now and when Eric is convinced to fix it :-)
6#
7# CA -newca ... will setup the right stuff
8# CA -newreq[-nodes] ... will generate a certificate request
9# CA -sign ... will sign the generated request and output
10#
11# At the end of that grab newreq.pem and newcert.pem (one has the key
12# and the other the certificate) and cat them together and that is what
13# you want/need ... I'll make even this a little cleaner later.
14#
15#
16# 12-Jan-96 tjh Added more things ... including CA -signcert which
17# converts a certificate to a request and then signs it.
18# 10-Jan-96 eay Fixed a few more bugs and added the SSLEAY_CONFIG
19# environment variable so this can be driven from
20# a script.
21# 25-Jul-96 eay Cleaned up filenames some more.
22# 11-Jun-96 eay Fixed a few filename missmatches.
23# 03-May-96 eay Modified to use 'ssleay cmd' instead of 'cmd'.
24# 18-Apr-96 tjh Original hacking
25#
26# Tim Hudson
27# tjh@cryptsoft.com
28#
29
30# 27-Apr-98 snh Translation into perl, fix existing CA bug.
31#
32#
33# Steve Henson
34# shenson@bigfoot.com
35
36# default openssl.cnf file has setup as per the following
37# demoCA ... where everything is stored
38
39$SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"};
40$DAYS="-days 365";
41$REQ="openssl req $SSLEAY_CONFIG";
42$CA="openssl ca $SSLEAY_CONFIG";
43$VERIFY="openssl verify";
44$X509="openssl x509";
45$PKCS12="openssl pkcs12";
46
47$CATOP="./demoCA";
48$CAKEY="cakey.pem";
49$CACERT="cacert.pem";
50
51$DIRMODE = 0777;
52
53$RET = 0;
54
55foreach (@ARGV) {
56 if ( /^(-\?|-h|-help)$/ ) {
57 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
58 exit 0;
59 } elsif (/^-newcert$/) {
60 # create a certificate
61 system ("$REQ -new -x509 -keyout newreq.pem -out newreq.pem $DAYS");
62 $RET=$?;
63 print "Certificate (and private key) is in newreq.pem\n"
64 } elsif (/^-newreq$/) {
65 # create a certificate request
66 system ("$REQ -new -keyout newreq.pem -out newreq.pem $DAYS");
67 $RET=$?;
68 print "Request (and private key) is in newreq.pem\n";
69 } elsif (/^-newreq-nodes$/) {
70 # create a certificate request
71 system ("$REQ -new -nodes -keyout newreq.pem -out newreq.pem $DAYS");
72 $RET=$?;
73 print "Request (and private key) is in newreq.pem\n";
74 } elsif (/^-newca$/) {
75 # if explicitly asked for or it doesn't exist then setup the
76 # directory structure that Eric likes to manage things
77 $NEW="1";
78 if ( "$NEW" || ! -f "${CATOP}/serial" ) {
79 # create the directory hierarchy
80 mkdir $CATOP, $DIRMODE;
81 mkdir "${CATOP}/certs", $DIRMODE;
82 mkdir "${CATOP}/crl", $DIRMODE ;
83 mkdir "${CATOP}/newcerts", $DIRMODE;
84 mkdir "${CATOP}/private", $DIRMODE;
85 open OUT, ">${CATOP}/serial";
86 print OUT "01\n";
87 close OUT;
88 open OUT, ">${CATOP}/index.txt";
89 close OUT;
90 }
91 if ( ! -f "${CATOP}/private/$CAKEY" ) {
92 print "CA certificate filename (or enter to create)\n";
93 $FILE = <STDIN>;
94
95 chop $FILE;
96
97 # ask user for existing CA certificate
98 if ($FILE) {
99 cp_pem($FILE,"${CATOP}/private/$CAKEY", "PRIVATE");
100 cp_pem($FILE,"${CATOP}/$CACERT", "CERTIFICATE");
101 $RET=$?;
102 } else {
103 print "Making CA certificate ...\n";
104 system ("$REQ -new -x509 -keyout " .
105 "${CATOP}/private/$CAKEY -out ${CATOP}/$CACERT $DAYS");
106 $RET=$?;
107 }
108 }
109 } elsif (/^-pkcs12$/) {
110 my $cname = $ARGV[1];
111 $cname = "My Certificate" unless defined $cname;
112 system ("$PKCS12 -in newcert.pem -inkey newreq.pem " .
113 "-certfile ${CATOP}/$CACERT -out newcert.p12 " .
114 "-export -name \"$cname\"");
115 $RET=$?;
116 exit $RET;
117 } elsif (/^-xsign$/) {
118 system ("$CA -policy policy_anything -infiles newreq.pem");
119 $RET=$?;
120 } elsif (/^(-sign|-signreq)$/) {
121 system ("$CA -policy policy_anything -out newcert.pem " .
122 "-infiles newreq.pem");
123 $RET=$?;
124 print "Signed certificate is in newcert.pem\n";
125 } elsif (/^(-signCA)$/) {
126 system ("$CA -policy policy_anything -out newcert.pem " .
127 "-extensions v3_ca -infiles newreq.pem");
128 $RET=$?;
129 print "Signed CA certificate is in newcert.pem\n";
130 } elsif (/^-signcert$/) {
131 system ("$X509 -x509toreq -in newreq.pem -signkey newreq.pem " .
132 "-out tmp.pem");
133 system ("$CA -policy policy_anything -out newcert.pem " .
134 "-infiles tmp.pem");
135 $RET = $?;
136 print "Signed certificate is in newcert.pem\n";
137 } elsif (/^-verify$/) {
138 if (shift) {
139 foreach $j (@ARGV) {
140 system ("$VERIFY -CAfile $CATOP/$CACERT $j");
141 $RET=$? if ($? != 0);
142 }
143 exit $RET;
144 } else {
145 system ("$VERIFY -CAfile $CATOP/$CACERT newcert.pem");
146 $RET=$?;
147 exit 0;
148 }
149 } else {
150 print STDERR "Unknown arg $_\n";
151 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
152 exit 1;
153 }
154}
155
156exit $RET;
157
158sub cp_pem {
159my ($infile, $outfile, $bound) = @_;
160open IN, $infile;
161open OUT, ">$outfile";
162my $flag = 0;
163while (<IN>) {
164 $flag = 1 if (/^-----BEGIN.*$bound/) ;
165 print OUT $_ if ($flag);
166 if (/^-----END.*$bound/) {
167 close IN;
168 close OUT;
169 return;
170 }
171}
172}
173
diff --git a/src/lib/libssl/src/apps/Makefile.ssl b/src/lib/libssl/src/apps/Makefile.ssl
new file mode 100644
index 0000000000..7068286204
--- /dev/null
+++ b/src/lib/libssl/src/apps/Makefile.ssl
@@ -0,0 +1,1146 @@
1#
2# apps/Makefile.ssl
3#
4
5DIR= apps
6TOP= ..
7CC= cc
8INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES)
9CFLAG= -g -static
10INSTALL_PREFIX=
11INSTALLTOP= /usr/local/ssl
12OPENSSLDIR= /usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17PERL= perl
18RM= rm -f
19# KRB5 stuff
20KRB5_INCLUDES=
21LIBKRB5=
22
23PEX_LIBS=
24EX_LIBS=
25EXE_EXT=
26
27SHLIB_TARGET=
28
29CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG)
30
31GENERAL=Makefile makeapps.com install.com
32
33DLIBCRYPTO=../libcrypto.a
34DLIBSSL=../libssl.a
35LIBCRYPTO=-L.. -lcrypto
36LIBSSL=-L.. -lssl
37
38PROGRAM= openssl
39
40SCRIPTS=CA.sh CA.pl der_chop
41
42EXE= $(PROGRAM)$(EXE_EXT)
43
44E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \
45 ca crl rsa rsautl dsa dsaparam \
46 x509 genrsa gendsa s_server s_client speed \
47 s_time version pkcs7 crl2pkcs7 sess_id ciphers nseq pkcs12 \
48 pkcs8 spkac smime rand engine ocsp
49
50PROGS= $(PROGRAM).c
51
52A_OBJ=apps.o
53A_SRC=apps.c
54S_OBJ= s_cb.o s_socket.o
55S_SRC= s_cb.c s_socket.c
56RAND_OBJ=app_rand.o
57RAND_SRC=app_rand.c
58
59E_OBJ= verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o \
60 ca.o pkcs7.o crl2p7.o crl.o \
61 rsa.o rsautl.o dsa.o dsaparam.o \
62 x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o \
63 s_time.o $(A_OBJ) $(S_OBJ) $(RAND_OBJ) version.o sess_id.o \
64 ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o
65
66E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c passwd.c gendh.c errstr.c ca.c \
67 pkcs7.c crl2p7.c crl.c \
68 rsa.c rsautl.c dsa.c dsaparam.c \
69 x509.c genrsa.c gendsa.c s_server.c s_client.c speed.c \
70 s_time.c $(A_SRC) $(S_SRC) $(RAND_SRC) version.c sess_id.c \
71 ciphers.c nseq.c pkcs12.c pkcs8.c spkac.c smime.c rand.c engine.c ocsp.c
72
73SRC=$(E_SRC)
74
75EXHEADER=
76HEADER= apps.h progs.h s_apps.h \
77 testdsa.h testrsa.h \
78 $(EXHEADER)
79
80ALL= $(GENERAL) $(SRC) $(HEADER)
81
82top:
83 @(cd ..; $(MAKE) DIRS=$(DIR) all)
84
85all: exe
86
87exe: $(PROGRAM)
88
89req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
90 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
91 $(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
92
93sreq.o: req.c
94 $(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c
95
96files:
97 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
98
99install:
100 @for i in $(EXE); \
101 do \
102 (echo installing $$i; \
103 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
104 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
105 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
106 done;
107 @for i in $(SCRIPTS); \
108 do \
109 (echo installing $$i; \
110 cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
111 chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
112 mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
113 done
114 @cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
115 chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
116 mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
117
118tags:
119 ctags $(SRC)
120
121tests:
122
123links:
124 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
125
126lint:
127 lint -DLINT $(INCLUDES) $(SRC)>fluff
128
129depend:
130 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC)
131
132dclean:
133 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
134 mv -f Makefile.new $(MAKEFILE)
135
136clean:
137 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
138 rm -f req
139
140$(DLIBSSL):
141 (cd ..; $(MAKE) DIRS=ssl all)
142
143$(DLIBCRYPTO):
144 (cd ..; $(MAKE) DIRS=crypto all)
145
146$(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
147 $(RM) $(PROGRAM)
148 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
149 $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
150 else \
151 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
152 $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
153 fi
154 -(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; \
155 LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
156 DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
157 SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
158 LIBPATH="`pwd`:$$LIBPATH"; \
159 if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
160 export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
161 $(PERL) tools/c_rehash certs)
162
163progs.h: progs.pl
164 $(PERL) progs.pl $(E_EXE) >progs.h
165 $(RM) $(PROGRAM).o
166
167# DO NOT DELETE THIS LINE -- make depend depends on it.
168
169app_rand.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
170app_rand.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
171app_rand.o: ../include/openssl/bn.h ../include/openssl/buffer.h
172app_rand.o: ../include/openssl/cast.h ../include/openssl/conf.h
173app_rand.o: ../include/openssl/crypto.h ../include/openssl/des.h
174app_rand.o: ../include/openssl/des_old.h ../include/openssl/dh.h
175app_rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
176app_rand.o: ../include/openssl/engine.h ../include/openssl/err.h
177app_rand.o: ../include/openssl/evp.h ../include/openssl/idea.h
178app_rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h
179app_rand.o: ../include/openssl/md4.h ../include/openssl/md5.h
180app_rand.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
181app_rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
182app_rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
183app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
184app_rand.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
185app_rand.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
186app_rand.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
187app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h
188app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
189app_rand.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
190app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h app_rand.c
191app_rand.o: apps.h
192apps.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
193apps.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
194apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h
195apps.o: ../include/openssl/cast.h ../include/openssl/conf.h
196apps.o: ../include/openssl/crypto.h ../include/openssl/des.h
197apps.o: ../include/openssl/des_old.h ../include/openssl/dh.h
198apps.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
199apps.o: ../include/openssl/engine.h ../include/openssl/err.h
200apps.o: ../include/openssl/evp.h ../include/openssl/idea.h
201apps.o: ../include/openssl/lhash.h ../include/openssl/md2.h
202apps.o: ../include/openssl/md4.h ../include/openssl/md5.h
203apps.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
204apps.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
205apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
206apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h
207apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
208apps.o: ../include/openssl/rand.h ../include/openssl/rc2.h
209apps.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
210apps.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
211apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h
212apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
213apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
214apps.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
215apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h
216asn1pars.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
217asn1pars.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
218asn1pars.o: ../include/openssl/bn.h ../include/openssl/buffer.h
219asn1pars.o: ../include/openssl/cast.h ../include/openssl/conf.h
220asn1pars.o: ../include/openssl/crypto.h ../include/openssl/des.h
221asn1pars.o: ../include/openssl/des_old.h ../include/openssl/dh.h
222asn1pars.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
223asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h
224asn1pars.o: ../include/openssl/evp.h ../include/openssl/idea.h
225asn1pars.o: ../include/openssl/lhash.h ../include/openssl/md2.h
226asn1pars.o: ../include/openssl/md4.h ../include/openssl/md5.h
227asn1pars.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
228asn1pars.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
229asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
230asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h
231asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
232asn1pars.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
233asn1pars.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
234asn1pars.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
235asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h
236asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
237asn1pars.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
238asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
239asn1pars.o: asn1pars.c
240ca.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
241ca.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
242ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h
243ca.o: ../include/openssl/cast.h ../include/openssl/conf.h
244ca.o: ../include/openssl/crypto.h ../include/openssl/des.h
245ca.o: ../include/openssl/des_old.h ../include/openssl/dh.h
246ca.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
247ca.o: ../include/openssl/engine.h ../include/openssl/err.h
248ca.o: ../include/openssl/evp.h ../include/openssl/idea.h
249ca.o: ../include/openssl/lhash.h ../include/openssl/md2.h
250ca.o: ../include/openssl/md4.h ../include/openssl/md5.h
251ca.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
252ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
253ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
254ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
255ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
256ca.o: ../include/openssl/rand.h ../include/openssl/rc2.h
257ca.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
258ca.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
259ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h
260ca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
261ca.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
262ca.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
263ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c
264ciphers.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
265ciphers.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
266ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h
267ciphers.o: ../include/openssl/cast.h ../include/openssl/comp.h
268ciphers.o: ../include/openssl/conf.h ../include/openssl/crypto.h
269ciphers.o: ../include/openssl/des.h ../include/openssl/des_old.h
270ciphers.o: ../include/openssl/dh.h ../include/openssl/dsa.h
271ciphers.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
272ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h
273ciphers.o: ../include/openssl/idea.h ../include/openssl/kssl.h
274ciphers.o: ../include/openssl/lhash.h ../include/openssl/md2.h
275ciphers.o: ../include/openssl/md4.h ../include/openssl/md5.h
276ciphers.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
277ciphers.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
278ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
279ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h
280ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
281ciphers.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
282ciphers.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
283ciphers.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
284ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h
285ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
286ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
287ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
288ciphers.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
289ciphers.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
290ciphers.o: ../include/openssl/x509_vfy.h apps.h ciphers.c
291crl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
292crl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
293crl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
294crl.o: ../include/openssl/cast.h ../include/openssl/conf.h
295crl.o: ../include/openssl/crypto.h ../include/openssl/des.h
296crl.o: ../include/openssl/des_old.h ../include/openssl/dh.h
297crl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
298crl.o: ../include/openssl/engine.h ../include/openssl/err.h
299crl.o: ../include/openssl/evp.h ../include/openssl/idea.h
300crl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
301crl.o: ../include/openssl/md4.h ../include/openssl/md5.h
302crl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
303crl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
304crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
305crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
306crl.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
307crl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
308crl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
309crl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
310crl.o: ../include/openssl/sha.h ../include/openssl/stack.h
311crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
312crl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
313crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
314crl.o: ../include/openssl/x509v3.h apps.h crl.c
315crl2p7.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
316crl2p7.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
317crl2p7.o: ../include/openssl/bn.h ../include/openssl/buffer.h
318crl2p7.o: ../include/openssl/cast.h ../include/openssl/conf.h
319crl2p7.o: ../include/openssl/crypto.h ../include/openssl/des.h
320crl2p7.o: ../include/openssl/des_old.h ../include/openssl/dh.h
321crl2p7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
322crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h
323crl2p7.o: ../include/openssl/evp.h ../include/openssl/idea.h
324crl2p7.o: ../include/openssl/lhash.h ../include/openssl/md2.h
325crl2p7.o: ../include/openssl/md4.h ../include/openssl/md5.h
326crl2p7.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
327crl2p7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
328crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
329crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
330crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
331crl2p7.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
332crl2p7.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
333crl2p7.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
334crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h
335crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
336crl2p7.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
337crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
338crl2p7.o: crl2p7.c
339dgst.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
340dgst.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
341dgst.o: ../include/openssl/bn.h ../include/openssl/buffer.h
342dgst.o: ../include/openssl/cast.h ../include/openssl/conf.h
343dgst.o: ../include/openssl/crypto.h ../include/openssl/des.h
344dgst.o: ../include/openssl/des_old.h ../include/openssl/dh.h
345dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
346dgst.o: ../include/openssl/engine.h ../include/openssl/err.h
347dgst.o: ../include/openssl/evp.h ../include/openssl/idea.h
348dgst.o: ../include/openssl/lhash.h ../include/openssl/md2.h
349dgst.o: ../include/openssl/md4.h ../include/openssl/md5.h
350dgst.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
351dgst.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
352dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
353dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h
354dgst.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
355dgst.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
356dgst.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
357dgst.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
358dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h
359dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
360dgst.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
361dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dgst.c
362dh.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
363dh.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
364dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
365dh.o: ../include/openssl/cast.h ../include/openssl/conf.h
366dh.o: ../include/openssl/crypto.h ../include/openssl/des.h
367dh.o: ../include/openssl/des_old.h ../include/openssl/dh.h
368dh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
369dh.o: ../include/openssl/engine.h ../include/openssl/err.h
370dh.o: ../include/openssl/evp.h ../include/openssl/idea.h
371dh.o: ../include/openssl/lhash.h ../include/openssl/md2.h
372dh.o: ../include/openssl/md4.h ../include/openssl/md5.h
373dh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
374dh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
375dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
376dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
377dh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
378dh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
379dh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
380dh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
381dh.o: ../include/openssl/sha.h ../include/openssl/stack.h
382dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
383dh.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
384dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dh.c
385dsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
386dsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
387dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
388dsa.o: ../include/openssl/cast.h ../include/openssl/conf.h
389dsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
390dsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
391dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
392dsa.o: ../include/openssl/engine.h ../include/openssl/err.h
393dsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
394dsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
395dsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
396dsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
397dsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
398dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
399dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
400dsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
401dsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
402dsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
403dsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
404dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
405dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
406dsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
407dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dsa.c
408dsaparam.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
409dsaparam.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
410dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h
411dsaparam.o: ../include/openssl/cast.h ../include/openssl/conf.h
412dsaparam.o: ../include/openssl/crypto.h ../include/openssl/des.h
413dsaparam.o: ../include/openssl/des_old.h ../include/openssl/dh.h
414dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
415dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h
416dsaparam.o: ../include/openssl/evp.h ../include/openssl/idea.h
417dsaparam.o: ../include/openssl/lhash.h ../include/openssl/md2.h
418dsaparam.o: ../include/openssl/md4.h ../include/openssl/md5.h
419dsaparam.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
420dsaparam.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
421dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
422dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h
423dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
424dsaparam.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
425dsaparam.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
426dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
427dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h
428dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
429dsaparam.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
430dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
431dsaparam.o: dsaparam.c
432enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
433enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
434enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
435enc.o: ../include/openssl/cast.h ../include/openssl/conf.h
436enc.o: ../include/openssl/crypto.h ../include/openssl/des.h
437enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h
438enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
439enc.o: ../include/openssl/engine.h ../include/openssl/err.h
440enc.o: ../include/openssl/evp.h ../include/openssl/idea.h
441enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h
442enc.o: ../include/openssl/md4.h ../include/openssl/md5.h
443enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
444enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
445enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
446enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
447enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
448enc.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
449enc.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
450enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
451enc.o: ../include/openssl/sha.h ../include/openssl/stack.h
452enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
453enc.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
454enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h enc.c
455engine.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
456engine.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
457engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h
458engine.o: ../include/openssl/cast.h ../include/openssl/comp.h
459engine.o: ../include/openssl/conf.h ../include/openssl/crypto.h
460engine.o: ../include/openssl/des.h ../include/openssl/des_old.h
461engine.o: ../include/openssl/dh.h ../include/openssl/dsa.h
462engine.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
463engine.o: ../include/openssl/err.h ../include/openssl/evp.h
464engine.o: ../include/openssl/idea.h ../include/openssl/kssl.h
465engine.o: ../include/openssl/lhash.h ../include/openssl/md2.h
466engine.o: ../include/openssl/md4.h ../include/openssl/md5.h
467engine.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
468engine.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
469engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
470engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h
471engine.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
472engine.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
473engine.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
474engine.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
475engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h
476engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
477engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
478engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
479engine.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
480engine.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
481engine.o: ../include/openssl/x509_vfy.h apps.h engine.c
482errstr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
483errstr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
484errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
485errstr.o: ../include/openssl/cast.h ../include/openssl/comp.h
486errstr.o: ../include/openssl/conf.h ../include/openssl/crypto.h
487errstr.o: ../include/openssl/des.h ../include/openssl/des_old.h
488errstr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
489errstr.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
490errstr.o: ../include/openssl/err.h ../include/openssl/evp.h
491errstr.o: ../include/openssl/idea.h ../include/openssl/kssl.h
492errstr.o: ../include/openssl/lhash.h ../include/openssl/md2.h
493errstr.o: ../include/openssl/md4.h ../include/openssl/md5.h
494errstr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
495errstr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
496errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
497errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
498errstr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
499errstr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
500errstr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
501errstr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
502errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
503errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
504errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
505errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
506errstr.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
507errstr.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
508errstr.o: ../include/openssl/x509_vfy.h apps.h errstr.c
509gendh.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
510gendh.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
511gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
512gendh.o: ../include/openssl/cast.h ../include/openssl/conf.h
513gendh.o: ../include/openssl/crypto.h ../include/openssl/des.h
514gendh.o: ../include/openssl/des_old.h ../include/openssl/dh.h
515gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
516gendh.o: ../include/openssl/engine.h ../include/openssl/err.h
517gendh.o: ../include/openssl/evp.h ../include/openssl/idea.h
518gendh.o: ../include/openssl/lhash.h ../include/openssl/md2.h
519gendh.o: ../include/openssl/md4.h ../include/openssl/md5.h
520gendh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
521gendh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
522gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
523gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
524gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
525gendh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
526gendh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
527gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
528gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h
529gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
530gendh.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
531gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h gendh.c
532gendsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
533gendsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
534gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
535gendsa.o: ../include/openssl/cast.h ../include/openssl/conf.h
536gendsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
537gendsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
538gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
539gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h
540gendsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
541gendsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
542gendsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
543gendsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
544gendsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
545gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
546gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
547gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
548gendsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
549gendsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
550gendsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
551gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
552gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
553gendsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
554gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
555gendsa.o: gendsa.c
556genrsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
557genrsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
558genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
559genrsa.o: ../include/openssl/cast.h ../include/openssl/conf.h
560genrsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
561genrsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
562genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
563genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h
564genrsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
565genrsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
566genrsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
567genrsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
568genrsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
569genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
570genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
571genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
572genrsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
573genrsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
574genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
575genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
576genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
577genrsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
578genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
579genrsa.o: genrsa.c
580nseq.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
581nseq.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
582nseq.o: ../include/openssl/bn.h ../include/openssl/buffer.h
583nseq.o: ../include/openssl/cast.h ../include/openssl/conf.h
584nseq.o: ../include/openssl/crypto.h ../include/openssl/des.h
585nseq.o: ../include/openssl/des_old.h ../include/openssl/dh.h
586nseq.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
587nseq.o: ../include/openssl/engine.h ../include/openssl/err.h
588nseq.o: ../include/openssl/evp.h ../include/openssl/idea.h
589nseq.o: ../include/openssl/lhash.h ../include/openssl/md2.h
590nseq.o: ../include/openssl/md4.h ../include/openssl/md5.h
591nseq.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
592nseq.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
593nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
594nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h
595nseq.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
596nseq.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
597nseq.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
598nseq.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
599nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h
600nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
601nseq.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
602nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h nseq.c
603ocsp.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
604ocsp.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
605ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h
606ocsp.o: ../include/openssl/cast.h ../include/openssl/comp.h
607ocsp.o: ../include/openssl/conf.h ../include/openssl/crypto.h
608ocsp.o: ../include/openssl/des.h ../include/openssl/des_old.h
609ocsp.o: ../include/openssl/dh.h ../include/openssl/dsa.h
610ocsp.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
611ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h
612ocsp.o: ../include/openssl/idea.h ../include/openssl/kssl.h
613ocsp.o: ../include/openssl/lhash.h ../include/openssl/md2.h
614ocsp.o: ../include/openssl/md4.h ../include/openssl/md5.h
615ocsp.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
616ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
617ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
618ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
619ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
620ocsp.o: ../include/openssl/rand.h ../include/openssl/rc2.h
621ocsp.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
622ocsp.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
623ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h
624ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
625ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
626ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
627ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
628ocsp.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
629ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
630ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c
631openssl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
632openssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
633openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
634openssl.o: ../include/openssl/cast.h ../include/openssl/comp.h
635openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h
636openssl.o: ../include/openssl/des.h ../include/openssl/des_old.h
637openssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h
638openssl.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
639openssl.o: ../include/openssl/err.h ../include/openssl/evp.h
640openssl.o: ../include/openssl/idea.h ../include/openssl/kssl.h
641openssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
642openssl.o: ../include/openssl/md4.h ../include/openssl/md5.h
643openssl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
644openssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
645openssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
646openssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
647openssl.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
648openssl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
649openssl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
650openssl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
651openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
652openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
653openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
654openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
655openssl.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
656openssl.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
657openssl.o: ../include/openssl/x509_vfy.h apps.h openssl.c progs.h s_apps.h
658passwd.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
659passwd.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
660passwd.o: ../include/openssl/bn.h ../include/openssl/buffer.h
661passwd.o: ../include/openssl/cast.h ../include/openssl/conf.h
662passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h
663passwd.o: ../include/openssl/des_old.h ../include/openssl/dh.h
664passwd.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
665passwd.o: ../include/openssl/engine.h ../include/openssl/err.h
666passwd.o: ../include/openssl/evp.h ../include/openssl/idea.h
667passwd.o: ../include/openssl/lhash.h ../include/openssl/md2.h
668passwd.o: ../include/openssl/md4.h ../include/openssl/md5.h
669passwd.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
670passwd.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
671passwd.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
672passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
673passwd.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
674passwd.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
675passwd.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
676passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h
677passwd.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
678passwd.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
679passwd.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
680passwd.o: passwd.c
681pkcs12.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
682pkcs12.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
683pkcs12.o: ../include/openssl/bn.h ../include/openssl/buffer.h
684pkcs12.o: ../include/openssl/cast.h ../include/openssl/conf.h
685pkcs12.o: ../include/openssl/crypto.h ../include/openssl/des.h
686pkcs12.o: ../include/openssl/des_old.h ../include/openssl/dh.h
687pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
688pkcs12.o: ../include/openssl/engine.h ../include/openssl/err.h
689pkcs12.o: ../include/openssl/evp.h ../include/openssl/idea.h
690pkcs12.o: ../include/openssl/lhash.h ../include/openssl/md2.h
691pkcs12.o: ../include/openssl/md4.h ../include/openssl/md5.h
692pkcs12.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
693pkcs12.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
694pkcs12.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
695pkcs12.o: ../include/openssl/pem.h ../include/openssl/pem2.h
696pkcs12.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
697pkcs12.o: ../include/openssl/rand.h ../include/openssl/rc2.h
698pkcs12.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
699pkcs12.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
700pkcs12.o: ../include/openssl/safestack.h ../include/openssl/sha.h
701pkcs12.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
702pkcs12.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
703pkcs12.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
704pkcs12.o: ../include/openssl/x509_vfy.h apps.h pkcs12.c
705pkcs7.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
706pkcs7.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
707pkcs7.o: ../include/openssl/bn.h ../include/openssl/buffer.h
708pkcs7.o: ../include/openssl/cast.h ../include/openssl/conf.h
709pkcs7.o: ../include/openssl/crypto.h ../include/openssl/des.h
710pkcs7.o: ../include/openssl/des_old.h ../include/openssl/dh.h
711pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
712pkcs7.o: ../include/openssl/engine.h ../include/openssl/err.h
713pkcs7.o: ../include/openssl/evp.h ../include/openssl/idea.h
714pkcs7.o: ../include/openssl/lhash.h ../include/openssl/md2.h
715pkcs7.o: ../include/openssl/md4.h ../include/openssl/md5.h
716pkcs7.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
717pkcs7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
718pkcs7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
719pkcs7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
720pkcs7.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
721pkcs7.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
722pkcs7.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
723pkcs7.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
724pkcs7.o: ../include/openssl/sha.h ../include/openssl/stack.h
725pkcs7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
726pkcs7.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
727pkcs7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h pkcs7.c
728pkcs8.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
729pkcs8.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
730pkcs8.o: ../include/openssl/bn.h ../include/openssl/buffer.h
731pkcs8.o: ../include/openssl/cast.h ../include/openssl/conf.h
732pkcs8.o: ../include/openssl/crypto.h ../include/openssl/des.h
733pkcs8.o: ../include/openssl/des_old.h ../include/openssl/dh.h
734pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
735pkcs8.o: ../include/openssl/engine.h ../include/openssl/err.h
736pkcs8.o: ../include/openssl/evp.h ../include/openssl/idea.h
737pkcs8.o: ../include/openssl/lhash.h ../include/openssl/md2.h
738pkcs8.o: ../include/openssl/md4.h ../include/openssl/md5.h
739pkcs8.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
740pkcs8.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
741pkcs8.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
742pkcs8.o: ../include/openssl/pem.h ../include/openssl/pem2.h
743pkcs8.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
744pkcs8.o: ../include/openssl/rand.h ../include/openssl/rc2.h
745pkcs8.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
746pkcs8.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
747pkcs8.o: ../include/openssl/safestack.h ../include/openssl/sha.h
748pkcs8.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
749pkcs8.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
750pkcs8.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
751pkcs8.o: ../include/openssl/x509_vfy.h apps.h pkcs8.c
752rand.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
753rand.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
754rand.o: ../include/openssl/bn.h ../include/openssl/buffer.h
755rand.o: ../include/openssl/cast.h ../include/openssl/conf.h
756rand.o: ../include/openssl/crypto.h ../include/openssl/des.h
757rand.o: ../include/openssl/des_old.h ../include/openssl/dh.h
758rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
759rand.o: ../include/openssl/engine.h ../include/openssl/err.h
760rand.o: ../include/openssl/evp.h ../include/openssl/idea.h
761rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h
762rand.o: ../include/openssl/md4.h ../include/openssl/md5.h
763rand.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
764rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
765rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
766rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
767rand.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
768rand.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
769rand.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
770rand.o: ../include/openssl/sha.h ../include/openssl/stack.h
771rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
772rand.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
773rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h rand.c
774req.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
775req.o: ../include/openssl/asn1.h ../include/openssl/bio.h
776req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
777req.o: ../include/openssl/buffer.h ../include/openssl/cast.h
778req.o: ../include/openssl/conf.h ../include/openssl/crypto.h
779req.o: ../include/openssl/des.h ../include/openssl/des_old.h
780req.o: ../include/openssl/dh.h ../include/openssl/dsa.h
781req.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
782req.o: ../include/openssl/err.h ../include/openssl/evp.h
783req.o: ../include/openssl/idea.h ../include/openssl/lhash.h
784req.o: ../include/openssl/md2.h ../include/openssl/md4.h
785req.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
786req.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
787req.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
788req.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
789req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
790req.o: ../include/openssl/rand.h ../include/openssl/rc2.h
791req.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
792req.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
793req.o: ../include/openssl/safestack.h ../include/openssl/sha.h
794req.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
795req.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
796req.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
797req.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h req.c
798rsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
799rsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
800rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
801rsa.o: ../include/openssl/cast.h ../include/openssl/conf.h
802rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
803rsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
804rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
805rsa.o: ../include/openssl/engine.h ../include/openssl/err.h
806rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
807rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
808rsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
809rsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
810rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
811rsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
812rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
813rsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
814rsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
815rsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
816rsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
817rsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
818rsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
819rsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
820rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h rsa.c
821rsautl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
822rsautl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
823rsautl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
824rsautl.o: ../include/openssl/cast.h ../include/openssl/conf.h
825rsautl.o: ../include/openssl/crypto.h ../include/openssl/des.h
826rsautl.o: ../include/openssl/des_old.h ../include/openssl/dh.h
827rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
828rsautl.o: ../include/openssl/engine.h ../include/openssl/err.h
829rsautl.o: ../include/openssl/evp.h ../include/openssl/idea.h
830rsautl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
831rsautl.o: ../include/openssl/md4.h ../include/openssl/md5.h
832rsautl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
833rsautl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
834rsautl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
835rsautl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
836rsautl.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
837rsautl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
838rsautl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
839rsautl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
840rsautl.o: ../include/openssl/sha.h ../include/openssl/stack.h
841rsautl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
842rsautl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
843rsautl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
844rsautl.o: rsautl.c
845s_cb.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
846s_cb.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
847s_cb.o: ../include/openssl/bn.h ../include/openssl/buffer.h
848s_cb.o: ../include/openssl/cast.h ../include/openssl/comp.h
849s_cb.o: ../include/openssl/conf.h ../include/openssl/crypto.h
850s_cb.o: ../include/openssl/des.h ../include/openssl/des_old.h
851s_cb.o: ../include/openssl/dh.h ../include/openssl/dsa.h
852s_cb.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
853s_cb.o: ../include/openssl/err.h ../include/openssl/evp.h
854s_cb.o: ../include/openssl/idea.h ../include/openssl/kssl.h
855s_cb.o: ../include/openssl/lhash.h ../include/openssl/md2.h
856s_cb.o: ../include/openssl/md4.h ../include/openssl/md5.h
857s_cb.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
858s_cb.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
859s_cb.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
860s_cb.o: ../include/openssl/pem.h ../include/openssl/pem2.h
861s_cb.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
862s_cb.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
863s_cb.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
864s_cb.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
865s_cb.o: ../include/openssl/sha.h ../include/openssl/ssl.h
866s_cb.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
867s_cb.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
868s_cb.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
869s_cb.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
870s_cb.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
871s_cb.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_cb.c
872s_client.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
873s_client.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
874s_client.o: ../include/openssl/bn.h ../include/openssl/buffer.h
875s_client.o: ../include/openssl/cast.h ../include/openssl/comp.h
876s_client.o: ../include/openssl/conf.h ../include/openssl/crypto.h
877s_client.o: ../include/openssl/des.h ../include/openssl/des_old.h
878s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h
879s_client.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
880s_client.o: ../include/openssl/err.h ../include/openssl/evp.h
881s_client.o: ../include/openssl/idea.h ../include/openssl/kssl.h
882s_client.o: ../include/openssl/lhash.h ../include/openssl/md2.h
883s_client.o: ../include/openssl/md4.h ../include/openssl/md5.h
884s_client.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
885s_client.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
886s_client.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
887s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h
888s_client.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
889s_client.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
890s_client.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
891s_client.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
892s_client.o: ../include/openssl/sha.h ../include/openssl/ssl.h
893s_client.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
894s_client.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
895s_client.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
896s_client.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
897s_client.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
898s_client.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_client.c
899s_server.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
900s_server.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
901s_server.o: ../include/openssl/bn.h ../include/openssl/buffer.h
902s_server.o: ../include/openssl/cast.h ../include/openssl/comp.h
903s_server.o: ../include/openssl/conf.h ../include/openssl/crypto.h
904s_server.o: ../include/openssl/des.h ../include/openssl/des_old.h
905s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h
906s_server.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
907s_server.o: ../include/openssl/err.h ../include/openssl/evp.h
908s_server.o: ../include/openssl/idea.h ../include/openssl/kssl.h
909s_server.o: ../include/openssl/lhash.h ../include/openssl/md2.h
910s_server.o: ../include/openssl/md4.h ../include/openssl/md5.h
911s_server.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
912s_server.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
913s_server.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
914s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h
915s_server.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
916s_server.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
917s_server.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
918s_server.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
919s_server.o: ../include/openssl/sha.h ../include/openssl/ssl.h
920s_server.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
921s_server.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
922s_server.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
923s_server.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
924s_server.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
925s_server.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_server.c
926s_socket.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
927s_socket.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
928s_socket.o: ../include/openssl/bn.h ../include/openssl/buffer.h
929s_socket.o: ../include/openssl/cast.h ../include/openssl/comp.h
930s_socket.o: ../include/openssl/conf.h ../include/openssl/crypto.h
931s_socket.o: ../include/openssl/des.h ../include/openssl/des_old.h
932s_socket.o: ../include/openssl/dh.h ../include/openssl/dsa.h
933s_socket.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
934s_socket.o: ../include/openssl/err.h ../include/openssl/evp.h
935s_socket.o: ../include/openssl/idea.h ../include/openssl/kssl.h
936s_socket.o: ../include/openssl/lhash.h ../include/openssl/md2.h
937s_socket.o: ../include/openssl/md4.h ../include/openssl/md5.h
938s_socket.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
939s_socket.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
940s_socket.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
941s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h
942s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
943s_socket.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
944s_socket.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
945s_socket.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
946s_socket.o: ../include/openssl/sha.h ../include/openssl/ssl.h
947s_socket.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
948s_socket.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
949s_socket.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
950s_socket.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
951s_socket.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
952s_socket.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_socket.c
953s_time.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
954s_time.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
955s_time.o: ../include/openssl/bn.h ../include/openssl/buffer.h
956s_time.o: ../include/openssl/cast.h ../include/openssl/comp.h
957s_time.o: ../include/openssl/conf.h ../include/openssl/crypto.h
958s_time.o: ../include/openssl/des.h ../include/openssl/des_old.h
959s_time.o: ../include/openssl/dh.h ../include/openssl/dsa.h
960s_time.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
961s_time.o: ../include/openssl/err.h ../include/openssl/evp.h
962s_time.o: ../include/openssl/idea.h ../include/openssl/kssl.h
963s_time.o: ../include/openssl/lhash.h ../include/openssl/md2.h
964s_time.o: ../include/openssl/md4.h ../include/openssl/md5.h
965s_time.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
966s_time.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
967s_time.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
968s_time.o: ../include/openssl/pem.h ../include/openssl/pem2.h
969s_time.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
970s_time.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
971s_time.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
972s_time.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
973s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h
974s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
975s_time.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
976s_time.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
977s_time.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
978s_time.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
979s_time.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_time.c
980sess_id.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
981sess_id.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
982sess_id.o: ../include/openssl/bn.h ../include/openssl/buffer.h
983sess_id.o: ../include/openssl/cast.h ../include/openssl/comp.h
984sess_id.o: ../include/openssl/conf.h ../include/openssl/crypto.h
985sess_id.o: ../include/openssl/des.h ../include/openssl/des_old.h
986sess_id.o: ../include/openssl/dh.h ../include/openssl/dsa.h
987sess_id.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
988sess_id.o: ../include/openssl/err.h ../include/openssl/evp.h
989sess_id.o: ../include/openssl/idea.h ../include/openssl/kssl.h
990sess_id.o: ../include/openssl/lhash.h ../include/openssl/md2.h
991sess_id.o: ../include/openssl/md4.h ../include/openssl/md5.h
992sess_id.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
993sess_id.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
994sess_id.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
995sess_id.o: ../include/openssl/pem.h ../include/openssl/pem2.h
996sess_id.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
997sess_id.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
998sess_id.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
999sess_id.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
1000sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h
1001sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
1002sess_id.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
1003sess_id.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
1004sess_id.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
1005sess_id.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
1006sess_id.o: ../include/openssl/x509_vfy.h apps.h sess_id.c
1007smime.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
1008smime.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
1009smime.o: ../include/openssl/bn.h ../include/openssl/buffer.h
1010smime.o: ../include/openssl/cast.h ../include/openssl/conf.h
1011smime.o: ../include/openssl/crypto.h ../include/openssl/des.h
1012smime.o: ../include/openssl/des_old.h ../include/openssl/dh.h
1013smime.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
1014smime.o: ../include/openssl/engine.h ../include/openssl/err.h
1015smime.o: ../include/openssl/evp.h ../include/openssl/idea.h
1016smime.o: ../include/openssl/lhash.h ../include/openssl/md2.h
1017smime.o: ../include/openssl/md4.h ../include/openssl/md5.h
1018smime.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
1019smime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
1020smime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
1021smime.o: ../include/openssl/pem.h ../include/openssl/pem2.h
1022smime.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
1023smime.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
1024smime.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
1025smime.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
1026smime.o: ../include/openssl/sha.h ../include/openssl/stack.h
1027smime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
1028smime.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
1029smime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h smime.c
1030speed.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
1031speed.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
1032speed.o: ../include/openssl/bn.h ../include/openssl/buffer.h
1033speed.o: ../include/openssl/cast.h ../include/openssl/conf.h
1034speed.o: ../include/openssl/crypto.h ../include/openssl/des.h
1035speed.o: ../include/openssl/des_old.h ../include/openssl/dh.h
1036speed.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
1037speed.o: ../include/openssl/engine.h ../include/openssl/err.h
1038speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h
1039speed.o: ../include/openssl/idea.h ../include/openssl/lhash.h
1040speed.o: ../include/openssl/md2.h ../include/openssl/md4.h
1041speed.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
1042speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
1043speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
1044speed.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
1045speed.o: ../include/openssl/rand.h ../include/openssl/rc2.h
1046speed.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
1047speed.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
1048speed.o: ../include/openssl/safestack.h ../include/openssl/sha.h
1049speed.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
1050speed.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
1051speed.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
1052speed.o: ../include/openssl/x509_vfy.h apps.h speed.c testdsa.h testrsa.h
1053spkac.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
1054spkac.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
1055spkac.o: ../include/openssl/bn.h ../include/openssl/buffer.h
1056spkac.o: ../include/openssl/cast.h ../include/openssl/conf.h
1057spkac.o: ../include/openssl/crypto.h ../include/openssl/des.h
1058spkac.o: ../include/openssl/des_old.h ../include/openssl/dh.h
1059spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
1060spkac.o: ../include/openssl/engine.h ../include/openssl/err.h
1061spkac.o: ../include/openssl/evp.h ../include/openssl/idea.h
1062spkac.o: ../include/openssl/lhash.h ../include/openssl/md2.h
1063spkac.o: ../include/openssl/md4.h ../include/openssl/md5.h
1064spkac.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
1065spkac.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
1066spkac.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
1067spkac.o: ../include/openssl/pem.h ../include/openssl/pem2.h
1068spkac.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
1069spkac.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
1070spkac.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
1071spkac.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
1072spkac.o: ../include/openssl/sha.h ../include/openssl/stack.h
1073spkac.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
1074spkac.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
1075spkac.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h spkac.c
1076verify.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
1077verify.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
1078verify.o: ../include/openssl/bn.h ../include/openssl/buffer.h
1079verify.o: ../include/openssl/cast.h ../include/openssl/conf.h
1080verify.o: ../include/openssl/crypto.h ../include/openssl/des.h
1081verify.o: ../include/openssl/des_old.h ../include/openssl/dh.h
1082verify.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
1083verify.o: ../include/openssl/engine.h ../include/openssl/err.h
1084verify.o: ../include/openssl/evp.h ../include/openssl/idea.h
1085verify.o: ../include/openssl/lhash.h ../include/openssl/md2.h
1086verify.o: ../include/openssl/md4.h ../include/openssl/md5.h
1087verify.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
1088verify.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
1089verify.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
1090verify.o: ../include/openssl/pem.h ../include/openssl/pem2.h
1091verify.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
1092verify.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
1093verify.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
1094verify.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
1095verify.o: ../include/openssl/sha.h ../include/openssl/stack.h
1096verify.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
1097verify.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
1098verify.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
1099verify.o: ../include/openssl/x509v3.h apps.h verify.c
1100version.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
1101version.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
1102version.o: ../include/openssl/bn.h ../include/openssl/buffer.h
1103version.o: ../include/openssl/cast.h ../include/openssl/conf.h
1104version.o: ../include/openssl/crypto.h ../include/openssl/des.h
1105version.o: ../include/openssl/des_old.h ../include/openssl/dh.h
1106version.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
1107version.o: ../include/openssl/engine.h ../include/openssl/err.h
1108version.o: ../include/openssl/evp.h ../include/openssl/idea.h
1109version.o: ../include/openssl/lhash.h ../include/openssl/md2.h
1110version.o: ../include/openssl/md4.h ../include/openssl/md5.h
1111version.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
1112version.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
1113version.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
1114version.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
1115version.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
1116version.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
1117version.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
1118version.o: ../include/openssl/sha.h ../include/openssl/stack.h
1119version.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
1120version.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
1121version.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
1122version.o: version.c
1123x509.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
1124x509.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
1125x509.o: ../include/openssl/bn.h ../include/openssl/buffer.h
1126x509.o: ../include/openssl/cast.h ../include/openssl/conf.h
1127x509.o: ../include/openssl/crypto.h ../include/openssl/des.h
1128x509.o: ../include/openssl/des_old.h ../include/openssl/dh.h
1129x509.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
1130x509.o: ../include/openssl/engine.h ../include/openssl/err.h
1131x509.o: ../include/openssl/evp.h ../include/openssl/idea.h
1132x509.o: ../include/openssl/lhash.h ../include/openssl/md2.h
1133x509.o: ../include/openssl/md4.h ../include/openssl/md5.h
1134x509.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
1135x509.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
1136x509.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
1137x509.o: ../include/openssl/pem.h ../include/openssl/pem2.h
1138x509.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
1139x509.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
1140x509.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
1141x509.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
1142x509.o: ../include/openssl/sha.h ../include/openssl/stack.h
1143x509.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
1144x509.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
1145x509.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
1146x509.o: ../include/openssl/x509v3.h apps.h x509.c
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c
index 93a665e788..c4dfafd778 100644
--- a/src/lib/libssl/src/apps/apps.c
+++ b/src/lib/libssl/src/apps/apps.c
@@ -501,7 +501,7 @@ static int ui_read(UI *ui, UI_STRING *uis)
501 { 501 {
502 const char *password = 502 const char *password =
503 ((PW_CB_DATA *)UI_get0_user_data(ui))->password; 503 ((PW_CB_DATA *)UI_get0_user_data(ui))->password;
504 if (password && password[0] != '\0') 504 if (password[0] != '\0')
505 { 505 {
506 UI_set_result(ui, uis, password); 506 UI_set_result(ui, uis, password);
507 return 1; 507 return 1;
@@ -525,7 +525,7 @@ static int ui_write(UI *ui, UI_STRING *uis)
525 { 525 {
526 const char *password = 526 const char *password =
527 ((PW_CB_DATA *)UI_get0_user_data(ui))->password; 527 ((PW_CB_DATA *)UI_get0_user_data(ui))->password;
528 if (password && password[0] != '\0') 528 if (password[0] != '\0')
529 return 1; 529 return 1;
530 } 530 }
531 default: 531 default:
@@ -1416,560 +1416,11 @@ char *make_config_name()
1416 1416
1417 len=strlen(t)+strlen(OPENSSL_CONF)+2; 1417 len=strlen(t)+strlen(OPENSSL_CONF)+2;
1418 p=OPENSSL_malloc(len); 1418 p=OPENSSL_malloc(len);
1419 BUF_strlcpy(p,t,len); 1419 strlcpy(p,t,len);
1420#ifndef OPENSSL_SYS_VMS 1420#ifndef OPENSSL_SYS_VMS
1421 BUF_strlcat(p,"/",len); 1421 strlcat(p,"/",len);
1422#endif 1422#endif
1423 BUF_strlcat(p,OPENSSL_CONF,len); 1423 strlcat(p,OPENSSL_CONF,len);
1424 1424
1425 return p; 1425 return p;
1426 } 1426 }
1427
1428static unsigned long index_serial_hash(const char **a)
1429 {
1430 const char *n;
1431
1432 n=a[DB_serial];
1433 while (*n == '0') n++;
1434 return(lh_strhash(n));
1435 }
1436
1437static int index_serial_cmp(const char **a, const char **b)
1438 {
1439 const char *aa,*bb;
1440
1441 for (aa=a[DB_serial]; *aa == '0'; aa++);
1442 for (bb=b[DB_serial]; *bb == '0'; bb++);
1443 return(strcmp(aa,bb));
1444 }
1445
1446static int index_name_qual(char **a)
1447 { return(a[0][0] == 'V'); }
1448
1449static unsigned long index_name_hash(const char **a)
1450 { return(lh_strhash(a[DB_name])); }
1451
1452int index_name_cmp(const char **a, const char **b)
1453 { return(strcmp(a[DB_name],
1454 b[DB_name])); }
1455
1456static IMPLEMENT_LHASH_HASH_FN(index_serial_hash,const char **)
1457static IMPLEMENT_LHASH_COMP_FN(index_serial_cmp,const char **)
1458static IMPLEMENT_LHASH_HASH_FN(index_name_hash,const char **)
1459static IMPLEMENT_LHASH_COMP_FN(index_name_cmp,const char **)
1460
1461#undef BSIZE
1462#define BSIZE 256
1463
1464BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai)
1465 {
1466 BIO *in=NULL;
1467 BIGNUM *ret=NULL;
1468 MS_STATIC char buf[1024];
1469 ASN1_INTEGER *ai=NULL;
1470
1471 ai=ASN1_INTEGER_new();
1472 if (ai == NULL) goto err;
1473
1474 if ((in=BIO_new(BIO_s_file())) == NULL)
1475 {
1476 ERR_print_errors(bio_err);
1477 goto err;
1478 }
1479
1480 if (BIO_read_filename(in,serialfile) <= 0)
1481 {
1482 if (!create)
1483 {
1484 perror(serialfile);
1485 goto err;
1486 }
1487 else
1488 {
1489 ASN1_INTEGER_set(ai,1);
1490 ret=BN_new();
1491 if (ret == NULL)
1492 BIO_printf(bio_err, "Out of memory\n");
1493 else
1494 BN_one(ret);
1495 }
1496 }
1497 else
1498 {
1499 if (!a2i_ASN1_INTEGER(in,ai,buf,1024))
1500 {
1501 BIO_printf(bio_err,"unable to load number from %s\n",
1502 serialfile);
1503 goto err;
1504 }
1505 ret=ASN1_INTEGER_to_BN(ai,NULL);
1506 if (ret == NULL)
1507 {
1508 BIO_printf(bio_err,"error converting number from bin to BIGNUM\n");
1509 goto err;
1510 }
1511 }
1512
1513 if (ret && retai)
1514 {
1515 *retai = ai;
1516 ai = NULL;
1517 }
1518 err:
1519 if (in != NULL) BIO_free(in);
1520 if (ai != NULL) ASN1_INTEGER_free(ai);
1521 return(ret);
1522 }
1523
1524int save_serial(char *serialfile, char *suffix, BIGNUM *serial, ASN1_INTEGER **retai)
1525 {
1526 char buf[1][BSIZE];
1527 BIO *out = NULL;
1528 int ret=0;
1529 ASN1_INTEGER *ai=NULL;
1530 int j;
1531
1532 if (suffix == NULL)
1533 j = strlen(serialfile);
1534 else
1535 j = strlen(serialfile) + strlen(suffix) + 1;
1536 if (j >= BSIZE)
1537 {
1538 BIO_printf(bio_err,"file name too long\n");
1539 goto err;
1540 }
1541
1542 if (suffix == NULL)
1543 BUF_strlcpy(buf[0], serialfile, BSIZE);
1544 else
1545 {
1546#ifndef OPENSSL_SYS_VMS
1547 j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s", serialfile, suffix);
1548#else
1549 j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s", serialfile, suffix);
1550#endif
1551 }
1552#ifdef RL_DEBUG
1553 BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]);
1554#endif
1555 out=BIO_new(BIO_s_file());
1556 if (out == NULL)
1557 {
1558 ERR_print_errors(bio_err);
1559 goto err;
1560 }
1561 if (BIO_write_filename(out,buf[0]) <= 0)
1562 {
1563 perror(serialfile);
1564 goto err;
1565 }
1566
1567 if ((ai=BN_to_ASN1_INTEGER(serial,NULL)) == NULL)
1568 {
1569 BIO_printf(bio_err,"error converting serial to ASN.1 format\n");
1570 goto err;
1571 }
1572 i2a_ASN1_INTEGER(out,ai);
1573 BIO_puts(out,"\n");
1574 ret=1;
1575 if (retai)
1576 {
1577 *retai = ai;
1578 ai = NULL;
1579 }
1580err:
1581 if (out != NULL) BIO_free_all(out);
1582 if (ai != NULL) ASN1_INTEGER_free(ai);
1583 return(ret);
1584 }
1585
1586int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix)
1587 {
1588 char buf[5][BSIZE];
1589 int i,j;
1590 struct stat sb;
1591
1592 i = strlen(serialfile) + strlen(old_suffix);
1593 j = strlen(serialfile) + strlen(new_suffix);
1594 if (i > j) j = i;
1595 if (j + 1 >= BSIZE)
1596 {
1597 BIO_printf(bio_err,"file name too long\n");
1598 goto err;
1599 }
1600
1601#ifndef OPENSSL_SYS_VMS
1602 j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s",
1603 serialfile, new_suffix);
1604#else
1605 j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s",
1606 serialfile, new_suffix);
1607#endif
1608#ifndef OPENSSL_SYS_VMS
1609 j = BIO_snprintf(buf[1], sizeof buf[1], "%s.%s",
1610 serialfile, old_suffix);
1611#else
1612 j = BIO_snprintf(buf[1], sizeof buf[1], "%s-%s",
1613 serialfile, old_suffix);
1614#endif
1615 if (stat(serialfile,&sb) < 0)
1616 {
1617 if (errno != ENOENT
1618#ifdef ENOTDIR
1619 && errno != ENOTDIR)
1620#endif
1621 goto err;
1622 }
1623 else
1624 {
1625#ifdef RL_DEBUG
1626 BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
1627 serialfile, buf[1]);
1628#endif
1629 if (rename(serialfile,buf[1]) < 0)
1630 {
1631 BIO_printf(bio_err,
1632 "unable to rename %s to %s\n",
1633 serialfile, buf[1]);
1634 perror("reason");
1635 goto err;
1636 }
1637 }
1638#ifdef RL_DEBUG
1639 BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
1640 buf[0],serialfile);
1641#endif
1642 if (rename(buf[0],serialfile) < 0)
1643 {
1644 BIO_printf(bio_err,
1645 "unable to rename %s to %s\n",
1646 buf[0],serialfile);
1647 perror("reason");
1648 rename(buf[1],serialfile);
1649 goto err;
1650 }
1651 return 1;
1652 err:
1653 return 0;
1654 }
1655
1656CA_DB *load_index(char *dbfile, DB_ATTR *db_attr)
1657 {
1658 CA_DB *retdb = NULL;
1659 TXT_DB *tmpdb = NULL;
1660 BIO *in = BIO_new(BIO_s_file());
1661 CONF *dbattr_conf = NULL;
1662 char buf[1][BSIZE];
1663 long errorline= -1;
1664
1665 if (in == NULL)
1666 {
1667 ERR_print_errors(bio_err);
1668 goto err;
1669 }
1670 if (BIO_read_filename(in,dbfile) <= 0)
1671 {
1672 perror(dbfile);
1673 BIO_printf(bio_err,"unable to open '%s'\n",dbfile);
1674 goto err;
1675 }
1676 if ((tmpdb = TXT_DB_read(in,DB_NUMBER)) == NULL)
1677 {
1678 if (tmpdb != NULL) TXT_DB_free(tmpdb);
1679 goto err;
1680 }
1681
1682#ifndef OPENSSL_SYS_VMS
1683 BIO_snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile);
1684#else
1685 BIO_snprintf(buf[0], sizeof buf[0], "%s-attr", dbfile);
1686#endif
1687 dbattr_conf = NCONF_new(NULL);
1688 if (NCONF_load(dbattr_conf,buf[0],&errorline) <= 0)
1689 {
1690 if (errorline > 0)
1691 {
1692 BIO_printf(bio_err,
1693 "error on line %ld of db attribute file '%s'\n"
1694 ,errorline,buf[0]);
1695 goto err;
1696 }
1697 else
1698 {
1699 NCONF_free(dbattr_conf);
1700 dbattr_conf = NULL;
1701 }
1702 }
1703
1704 if ((retdb = OPENSSL_malloc(sizeof(CA_DB))) == NULL)
1705 {
1706 fprintf(stderr, "Out of memory\n");
1707 goto err;
1708 }
1709
1710 retdb->db = tmpdb;
1711 tmpdb = NULL;
1712 if (db_attr)
1713 retdb->attributes = *db_attr;
1714 else
1715 {
1716 retdb->attributes.unique_subject = 1;
1717 }
1718
1719 if (dbattr_conf)
1720 {
1721 char *p = NCONF_get_string(dbattr_conf,NULL,"unique_subject");
1722 if (p)
1723 {
1724 BIO_printf(bio_err, "DEBUG[load_index]: unique_subject = \"%s\"\n", p);
1725 switch(*p)
1726 {
1727 case 'f': /* false */
1728 case 'F': /* FALSE */
1729 case 'n': /* no */
1730 case 'N': /* NO */
1731 retdb->attributes.unique_subject = 0;
1732 break;
1733 case 't': /* true */
1734 case 'T': /* TRUE */
1735 case 'y': /* yes */
1736 case 'Y': /* YES */
1737 default:
1738 retdb->attributes.unique_subject = 1;
1739 break;
1740 }
1741 }
1742 }
1743
1744 err:
1745 if (dbattr_conf) NCONF_free(dbattr_conf);
1746 if (tmpdb) TXT_DB_free(tmpdb);
1747 if (in) BIO_free_all(in);
1748 return retdb;
1749 }
1750
1751int index_index(CA_DB *db)
1752 {
1753 if (!TXT_DB_create_index(db->db, DB_serial, NULL,
1754 LHASH_HASH_FN(index_serial_hash),
1755 LHASH_COMP_FN(index_serial_cmp)))
1756 {
1757 BIO_printf(bio_err,
1758 "error creating serial number index:(%ld,%ld,%ld)\n",
1759 db->db->error,db->db->arg1,db->db->arg2);
1760 return 0;
1761 }
1762
1763 if (db->attributes.unique_subject
1764 && !TXT_DB_create_index(db->db, DB_name, index_name_qual,
1765 LHASH_HASH_FN(index_name_hash),
1766 LHASH_COMP_FN(index_name_cmp)))
1767 {
1768 BIO_printf(bio_err,"error creating name index:(%ld,%ld,%ld)\n",
1769 db->db->error,db->db->arg1,db->db->arg2);
1770 return 0;
1771 }
1772 return 1;
1773 }
1774
1775int save_index(char *dbfile, char *suffix, CA_DB *db)
1776 {
1777 char buf[3][BSIZE];
1778 BIO *out = BIO_new(BIO_s_file());
1779 int j;
1780
1781 if (out == NULL)
1782 {
1783 ERR_print_errors(bio_err);
1784 goto err;
1785 }
1786
1787 j = strlen(dbfile) + strlen(suffix);
1788 if (j + 6 >= BSIZE)
1789 {
1790 BIO_printf(bio_err,"file name too long\n");
1791 goto err;
1792 }
1793
1794#ifndef OPENSSL_SYS_VMS
1795 j = BIO_snprintf(buf[2], sizeof buf[2], "%s.attr", dbfile);
1796#else
1797 j = BIO_snprintf(buf[2], sizeof buf[2], "%s-attr", dbfile);
1798#endif
1799#ifndef OPENSSL_SYS_VMS
1800 j = BIO_snprintf(buf[1], sizeof buf[1], "%s.attr.%s", dbfile, suffix);
1801#else
1802 j = BIO_snprintf(buf[1], sizeof buf[1], "%s-attr-%s", dbfile, suffix);
1803#endif
1804#ifndef OPENSSL_SYS_VMS
1805 j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s", dbfile, suffix);
1806#else
1807 j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s", dbfile, suffix);
1808#endif
1809#ifdef RL_DEBUG
1810 BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]);
1811#endif
1812 if (BIO_write_filename(out,buf[0]) <= 0)
1813 {
1814 perror(dbfile);
1815 BIO_printf(bio_err,"unable to open '%s'\n", dbfile);
1816 goto err;
1817 }
1818 j=TXT_DB_write(out,db->db);
1819 if (j <= 0) goto err;
1820
1821 BIO_free(out);
1822
1823 out = BIO_new(BIO_s_file());
1824#ifdef RL_DEBUG
1825 BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[1]);
1826#endif
1827 if (BIO_write_filename(out,buf[1]) <= 0)
1828 {
1829 perror(buf[2]);
1830 BIO_printf(bio_err,"unable to open '%s'\n", buf[2]);
1831 goto err;
1832 }
1833 BIO_printf(out,"unique_subject = %s\n",
1834 db->attributes.unique_subject ? "yes" : "no");
1835 BIO_free(out);
1836
1837 return 1;
1838 err:
1839 return 0;
1840 }
1841
1842int rotate_index(char *dbfile, char *new_suffix, char *old_suffix)
1843 {
1844 char buf[5][BSIZE];
1845 int i,j;
1846 struct stat sb;
1847
1848 i = strlen(dbfile) + strlen(old_suffix);
1849 j = strlen(dbfile) + strlen(new_suffix);
1850 if (i > j) j = i;
1851 if (j + 6 >= BSIZE)
1852 {
1853 BIO_printf(bio_err,"file name too long\n");
1854 goto err;
1855 }
1856
1857#ifndef OPENSSL_SYS_VMS
1858 j = BIO_snprintf(buf[4], sizeof buf[4], "%s.attr", dbfile);
1859#else
1860 j = BIO_snprintf(buf[4], sizeof buf[4], "%s-attr", dbfile);
1861#endif
1862#ifndef OPENSSL_SYS_VMS
1863 j = BIO_snprintf(buf[2], sizeof buf[2], "%s.attr.%s",
1864 dbfile, new_suffix);
1865#else
1866 j = BIO_snprintf(buf[2], sizeof buf[2], "%s-attr-%s",
1867 dbfile, new_suffix);
1868#endif
1869#ifndef OPENSSL_SYS_VMS
1870 j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s",
1871 dbfile, new_suffix);
1872#else
1873 j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s",
1874 dbfile, new_suffix);
1875#endif
1876#ifndef OPENSSL_SYS_VMS
1877 j = BIO_snprintf(buf[1], sizeof buf[1], "%s.%s",
1878 dbfile, old_suffix);
1879#else
1880 j = BIO_snprintf(buf[1], sizeof buf[1], "%s-%s",
1881 dbfile, old_suffix);
1882#endif
1883#ifndef OPENSSL_SYS_VMS
1884 j = BIO_snprintf(buf[3], sizeof buf[3], "%s.attr.%s",
1885 dbfile, old_suffix);
1886#else
1887 j = BIO_snprintf(buf[3], sizeof buf[3], "%s-attr-%s",
1888 dbfile, old_suffix);
1889#endif
1890 if (stat(dbfile,&sb) < 0)
1891 {
1892 if (errno != ENOENT
1893#ifdef ENOTDIR
1894 && errno != ENOTDIR)
1895#endif
1896 goto err;
1897 }
1898 else
1899 {
1900#ifdef RL_DEBUG
1901 BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
1902 dbfile, buf[1]);
1903#endif
1904 if (rename(dbfile,buf[1]) < 0)
1905 {
1906 BIO_printf(bio_err,
1907 "unable to rename %s to %s\n",
1908 dbfile, buf[1]);
1909 perror("reason");
1910 goto err;
1911 }
1912 }
1913#ifdef RL_DEBUG
1914 BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
1915 buf[0],dbfile);
1916#endif
1917 if (rename(buf[0],dbfile) < 0)
1918 {
1919 BIO_printf(bio_err,
1920 "unable to rename %s to %s\n",
1921 buf[0],dbfile);
1922 perror("reason");
1923 rename(buf[1],dbfile);
1924 goto err;
1925 }
1926 if (stat(buf[4],&sb) < 0)
1927 {
1928 if (errno != ENOENT
1929#ifdef ENOTDIR
1930 && errno != ENOTDIR)
1931#endif
1932 goto err;
1933 }
1934 else
1935 {
1936#ifdef RL_DEBUG
1937 BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
1938 buf[4],buf[3]);
1939#endif
1940 if (rename(buf[4],buf[3]) < 0)
1941 {
1942 BIO_printf(bio_err,
1943 "unable to rename %s to %s\n",
1944 buf[4], buf[3]);
1945 perror("reason");
1946 rename(dbfile,buf[0]);
1947 rename(buf[1],dbfile);
1948 goto err;
1949 }
1950 }
1951#ifdef RL_DEBUG
1952 BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
1953 buf[2],buf[4]);
1954#endif
1955 if (rename(buf[2],buf[4]) < 0)
1956 {
1957 BIO_printf(bio_err,
1958 "unable to rename %s to %s\n",
1959 buf[2],buf[4]);
1960 perror("reason");
1961 rename(buf[3],buf[4]);
1962 rename(dbfile,buf[0]);
1963 rename(buf[1],dbfile);
1964 goto err;
1965 }
1966 return 1;
1967 err:
1968 return 0;
1969 }
1970
1971void free_index(CA_DB *db)
1972 {
1973 TXT_DB_free(db->db);
1974 OPENSSL_free(db);
1975 }
diff --git a/src/lib/libssl/src/apps/apps.h b/src/lib/libssl/src/apps/apps.h
index 8a9c4ab0a0..c36b9d2566 100644
--- a/src/lib/libssl/src/apps/apps.h
+++ b/src/lib/libssl/src/apps/apps.h
@@ -287,38 +287,7 @@ char *make_config_name(void);
287/* Functions defined in ca.c and also used in ocsp.c */ 287/* Functions defined in ca.c and also used in ocsp.c */
288int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, 288int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
289 ASN1_GENERALIZEDTIME **pinvtm, char *str); 289 ASN1_GENERALIZEDTIME **pinvtm, char *str);
290 290int make_serial_index(TXT_DB *db);
291#define DB_type 0
292#define DB_exp_date 1
293#define DB_rev_date 2
294#define DB_serial 3 /* index - unique */
295#define DB_file 4
296#define DB_name 5 /* index - unique when active and not disabled */
297#define DB_NUMBER 6
298
299#define DB_TYPE_REV 'R'
300#define DB_TYPE_EXP 'E'
301#define DB_TYPE_VAL 'V'
302
303typedef struct db_attr_st
304 {
305 int unique_subject;
306 } DB_ATTR;
307typedef struct ca_db_st
308 {
309 DB_ATTR attributes;
310 TXT_DB *db;
311 } CA_DB;
312
313BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai);
314int save_serial(char *serialfile, char *suffix, BIGNUM *serial, ASN1_INTEGER **retai);
315int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix);
316CA_DB *load_index(char *dbfile, DB_ATTR *dbattr);
317int index_index(CA_DB *db);
318int save_index(char *dbfile, char *suffix, CA_DB *db);
319int rotate_index(char *dbfile, char *new_suffix, char *old_suffix);
320void free_index(CA_DB *db);
321int index_name_cmp(const char **a, const char **b);
322 291
323X509_NAME *do_subject(char *str, long chtype); 292X509_NAME *do_subject(char *str, long chtype);
324 293
diff --git a/src/lib/libssl/src/apps/asn1pars.c b/src/lib/libssl/src/apps/asn1pars.c
index 7db40adf04..8367415405 100644
--- a/src/lib/libssl/src/apps/asn1pars.c
+++ b/src/lib/libssl/src/apps/asn1pars.c
@@ -304,15 +304,7 @@ bad:
304 num=tmplen; 304 num=tmplen;
305 } 305 }
306 306
307 if (offset >= num) 307 if (length == 0) length=(unsigned int)num;
308 {
309 BIO_printf(bio_err, "Error: offset too large\n");
310 goto end;
311 }
312
313 num -= offset;
314
315 if ((length == 0) || ((long)length > num)) length=(unsigned int)num;
316 if(derout) { 308 if(derout) {
317 if(BIO_write(derout, str + offset, length) != (int)length) { 309 if(BIO_write(derout, str + offset, length) != (int)length) {
318 BIO_printf(bio_err, "Error writing output\n"); 310 BIO_printf(bio_err, "Error writing output\n");
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c
index 2db61b1eae..f979dfe85f 100644
--- a/src/lib/libssl/src/apps/ca.c
+++ b/src/lib/libssl/src/apps/ca.c
@@ -122,7 +122,6 @@
122#define ENV_NEW_CERTS_DIR "new_certs_dir" 122#define ENV_NEW_CERTS_DIR "new_certs_dir"
123#define ENV_CERTIFICATE "certificate" 123#define ENV_CERTIFICATE "certificate"
124#define ENV_SERIAL "serial" 124#define ENV_SERIAL "serial"
125#define ENV_CRLNUMBER "crlnumber"
126#define ENV_CRL "crl" 125#define ENV_CRL "crl"
127#define ENV_PRIVATE_KEY "private_key" 126#define ENV_PRIVATE_KEY "private_key"
128#define ENV_RANDFILE "RANDFILE" 127#define ENV_RANDFILE "RANDFILE"
@@ -144,6 +143,18 @@
144 143
145#define ENV_DATABASE "database" 144#define ENV_DATABASE "database"
146 145
146#define DB_type 0
147#define DB_exp_date 1
148#define DB_rev_date 2
149#define DB_serial 3 /* index - unique */
150#define DB_file 4
151#define DB_name 5 /* index - unique for active */
152#define DB_NUMBER 6
153
154#define DB_TYPE_REV 'R'
155#define DB_TYPE_EXP 'E'
156#define DB_TYPE_VAL 'V'
157
147/* Additional revocation information types */ 158/* Additional revocation information types */
148 159
149#define REV_NONE 0 /* No addditional information */ 160#define REV_NONE 0 /* No addditional information */
@@ -200,36 +211,43 @@ extern int EF_ALIGNMENT;
200#endif 211#endif
201 212
202static void lookup_fail(char *name,char *tag); 213static void lookup_fail(char *name,char *tag);
214static unsigned long index_serial_hash(const char **a);
215static int index_serial_cmp(const char **a, const char **b);
216static unsigned long index_name_hash(const char **a);
217static int index_name_qual(char **a);
218static int index_name_cmp(const char **a,const char **b);
219static BIGNUM *load_serial(char *serialfile);
220static int save_serial(char *serialfile, BIGNUM *serial);
203static int certify(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509, 221static int certify(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
204 const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,CA_DB *db, 222 const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,TXT_DB *db,
205 BIGNUM *serial, char *subj, int email_dn, char *startdate, 223 BIGNUM *serial, char *subj, int email_dn, char *startdate,
206 char *enddate, long days, int batch, char *ext_sect, CONF *conf, 224 char *enddate, long days, int batch, char *ext_sect, CONF *conf,
207 int verbose, unsigned long certopt, unsigned long nameopt, 225 int verbose, unsigned long certopt, unsigned long nameopt,
208 int default_op, int ext_copy); 226 int default_op, int ext_copy);
209static int certify_cert(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509, 227static int certify_cert(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
210 const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy, 228 const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,
211 CA_DB *db, BIGNUM *serial, char *subj, int email_dn, 229 TXT_DB *db, BIGNUM *serial, char *subj, int email_dn,
212 char *startdate, char *enddate, long days, int batch, 230 char *startdate, char *enddate, long days, int batch,
213 char *ext_sect, CONF *conf,int verbose, unsigned long certopt, 231 char *ext_sect, CONF *conf,int verbose, unsigned long certopt,
214 unsigned long nameopt, int default_op, int ext_copy, 232 unsigned long nameopt, int default_op, int ext_copy,
215 ENGINE *e); 233 ENGINE *e);
216static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509, 234static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
217 const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy, 235 const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,
218 CA_DB *db, BIGNUM *serial,char *subj, int email_dn, 236 TXT_DB *db, BIGNUM *serial,char *subj, int email_dn,
219 char *startdate, char *enddate, long days, char *ext_sect, 237 char *startdate, char *enddate, long days, char *ext_sect,
220 CONF *conf, int verbose, unsigned long certopt, 238 CONF *conf, int verbose, unsigned long certopt,
221 unsigned long nameopt, int default_op, int ext_copy); 239 unsigned long nameopt, int default_op, int ext_copy);
222static int fix_data(int nid, int *type); 240static int fix_data(int nid, int *type);
223static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext); 241static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext);
224static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst, 242static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
225 STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial,char *subj, 243 STACK_OF(CONF_VALUE) *policy, TXT_DB *db, BIGNUM *serial,char *subj,
226 int email_dn, char *startdate, char *enddate, long days, int batch, 244 int email_dn, char *startdate, char *enddate, long days, int batch,
227 int verbose, X509_REQ *req, char *ext_sect, CONF *conf, 245 int verbose, X509_REQ *req, char *ext_sect, CONF *conf,
228 unsigned long certopt, unsigned long nameopt, int default_op, 246 unsigned long certopt, unsigned long nameopt, int default_op,
229 int ext_copy); 247 int ext_copy);
230static int do_revoke(X509 *x509, CA_DB *db, int ext, char *extval); 248static int do_revoke(X509 *x509, TXT_DB *db, int ext, char *extval);
231static int get_certificate_status(const char *ser_status, CA_DB *db); 249static int get_certificate_status(const char *ser_status, TXT_DB *db);
232static int do_updatedb(CA_DB *db); 250static int do_updatedb(TXT_DB *db);
233static int check_time_format(char *str); 251static int check_time_format(char *str);
234char *make_revocation_str(int rev_type, char *rev_arg); 252char *make_revocation_str(int rev_type, char *rev_arg);
235int make_revoked(X509_REVOKED *rev, char *str); 253int make_revoked(X509_REVOKED *rev, char *str);
@@ -241,6 +259,11 @@ static char *section=NULL;
241static int preserve=0; 259static int preserve=0;
242static int msie_hack=0; 260static int msie_hack=0;
243 261
262static IMPLEMENT_LHASH_HASH_FN(index_serial_hash,const char **)
263static IMPLEMENT_LHASH_COMP_FN(index_serial_cmp,const char **)
264static IMPLEMENT_LHASH_HASH_FN(index_name_hash,const char **)
265static IMPLEMENT_LHASH_COMP_FN(index_name_cmp,const char **)
266
244 267
245int MAIN(int, char **); 268int MAIN(int, char **);
246 269
@@ -277,7 +300,6 @@ int MAIN(int argc, char **argv)
277 char *outfile=NULL; 300 char *outfile=NULL;
278 char *outdir=NULL; 301 char *outdir=NULL;
279 char *serialfile=NULL; 302 char *serialfile=NULL;
280 char *crlnumberfile=NULL;
281 char *extensions=NULL; 303 char *extensions=NULL;
282 char *extfile=NULL; 304 char *extfile=NULL;
283 char *subj=NULL; 305 char *subj=NULL;
@@ -286,7 +308,6 @@ int MAIN(int argc, char **argv)
286 int rev_type = REV_NONE; 308 int rev_type = REV_NONE;
287 char *rev_arg = NULL; 309 char *rev_arg = NULL;
288 BIGNUM *serial=NULL; 310 BIGNUM *serial=NULL;
289 BIGNUM *crlnumber=NULL;
290 char *startdate=NULL; 311 char *startdate=NULL;
291 char *enddate=NULL; 312 char *enddate=NULL;
292 long days=0; 313 long days=0;
@@ -299,13 +320,14 @@ int MAIN(int argc, char **argv)
299 X509 *x=NULL; 320 X509 *x=NULL;
300 BIO *in=NULL,*out=NULL,*Sout=NULL,*Cout=NULL; 321 BIO *in=NULL,*out=NULL,*Sout=NULL,*Cout=NULL;
301 char *dbfile=NULL; 322 char *dbfile=NULL;
302 CA_DB *db=NULL; 323 TXT_DB *db=NULL;
303 X509_CRL *crl=NULL; 324 X509_CRL *crl=NULL;
304 X509_REVOKED *r=NULL; 325 X509_REVOKED *r=NULL;
305 ASN1_TIME *tmptm; 326 ASN1_TIME *tmptm;
306 ASN1_INTEGER *tmpser; 327 ASN1_INTEGER *tmpser;
307 char **pp,*p,*f; 328 char **pp,*p,*f;
308 int i,j; 329 int i,j;
330 long l;
309 const EVP_MD *dgst=NULL; 331 const EVP_MD *dgst=NULL;
310 STACK_OF(CONF_VALUE) *attribs=NULL; 332 STACK_OF(CONF_VALUE) *attribs=NULL;
311 STACK_OF(X509) *cert_sk=NULL; 333 STACK_OF(X509) *cert_sk=NULL;
@@ -317,7 +339,6 @@ int MAIN(int argc, char **argv)
317 char *engine = NULL; 339 char *engine = NULL;
318#endif 340#endif
319 char *tofree=NULL; 341 char *tofree=NULL;
320 DB_ATTR db_attr;
321 342
322#ifdef EFENCE 343#ifdef EFENCE
323EF_PROTECT_FREE=1; 344EF_PROTECT_FREE=1;
@@ -567,10 +588,10 @@ bad:
567#else 588#else
568 len = strlen(s)+sizeof(CONFIG_FILE)+1; 589 len = strlen(s)+sizeof(CONFIG_FILE)+1;
569 tofree=OPENSSL_malloc(len); 590 tofree=OPENSSL_malloc(len);
570 BUF_strlcpy(tofree,s,len); 591 strlcpy(tofree,s,len);
571 BUF_strlcat(tofree,"/",len); 592 strlcat(tofree,"/",len);
572#endif 593#endif
573 BUF_strlcat(tofree,CONFIG_FILE,len); 594 strlcat(tofree,CONFIG_FILE,len);
574 configfile=tofree; 595 configfile=tofree;
575 } 596 }
576 597
@@ -641,39 +662,6 @@ bad:
641 if (randfile == NULL) 662 if (randfile == NULL)
642 ERR_clear_error(); 663 ERR_clear_error();
643 app_RAND_load_file(randfile, bio_err, 0); 664 app_RAND_load_file(randfile, bio_err, 0);
644
645 db_attr.unique_subject = 1;
646 p = NCONF_get_string(conf, section, "unique_subject");
647 if (p)
648 {
649#ifdef RL_DEBUG
650 BIO_printf(bio_err, "DEBUG: unique_subject = \"%s\"\n", p);
651#endif
652 switch(*p)
653 {
654 case 'f': /* false */
655 case 'F': /* FALSE */
656 case 'n': /* no */
657 case 'N': /* NO */
658 db_attr.unique_subject = 0;
659 break;
660 case 't': /* true */
661 case 'T': /* TRUE */
662 case 'y': /* yes */
663 case 'Y': /* YES */
664 default:
665 db_attr.unique_subject = 1;
666 break;
667 }
668 }
669#ifdef RL_DEBUG
670 else
671 BIO_printf(bio_err, "DEBUG: unique_subject undefined\n", p);
672#endif
673#ifdef RL_DEBUG
674 BIO_printf(bio_err, "DEBUG: configured unique_subject is %d\n",
675 db_attr.unique_subject);
676#endif
677 665
678 in=BIO_new(BIO_s_file()); 666 in=BIO_new(BIO_s_file());
679 out=BIO_new(BIO_s_file()); 667 out=BIO_new(BIO_s_file());
@@ -694,10 +682,17 @@ bad:
694 lookup_fail(section,ENV_DATABASE); 682 lookup_fail(section,ENV_DATABASE);
695 goto err; 683 goto err;
696 } 684 }
697 db = load_index(dbfile,&db_attr); 685 if (BIO_read_filename(in,dbfile) <= 0)
686 {
687 perror(dbfile);
688 BIO_printf(bio_err,"unable to open '%s'\n",dbfile);
689 goto err;
690 }
691 db=TXT_DB_read(in,DB_NUMBER);
698 if (db == NULL) goto err; 692 if (db == NULL) goto err;
699 693
700 if (!index_index(db)) goto err; 694 if (!make_serial_index(db))
695 goto err;
701 696
702 if (get_certificate_status(ser_status,db) != 1) 697 if (get_certificate_status(ser_status,db) != 1)
703 BIO_printf(bio_err,"Error verifying serial %s!\n", 698 BIO_printf(bio_err,"Error verifying serial %s!\n",
@@ -857,13 +852,19 @@ bad:
857 lookup_fail(section,ENV_DATABASE); 852 lookup_fail(section,ENV_DATABASE);
858 goto err; 853 goto err;
859 } 854 }
860 db = load_index(dbfile, &db_attr); 855 if (BIO_read_filename(in,dbfile) <= 0)
856 {
857 perror(dbfile);
858 BIO_printf(bio_err,"unable to open '%s'\n",dbfile);
859 goto err;
860 }
861 db=TXT_DB_read(in,DB_NUMBER);
861 if (db == NULL) goto err; 862 if (db == NULL) goto err;
862 863
863 /* Lets check some fields */ 864 /* Lets check some fields */
864 for (i=0; i<sk_num(db->db->data); i++) 865 for (i=0; i<sk_num(db->data); i++)
865 { 866 {
866 pp=(char **)sk_value(db->db->data,i); 867 pp=(char **)sk_value(db->data,i);
867 if ((pp[DB_type][0] != DB_TYPE_REV) && 868 if ((pp[DB_type][0] != DB_TYPE_REV) &&
868 (pp[DB_rev_date][0] != '\0')) 869 (pp[DB_rev_date][0] != '\0'))
869 { 870 {
@@ -914,13 +915,23 @@ bad:
914 out = BIO_push(tmpbio, out); 915 out = BIO_push(tmpbio, out);
915 } 916 }
916#endif 917#endif
917 TXT_DB_write(out,db->db); 918 TXT_DB_write(out,db);
918 BIO_printf(bio_err,"%d entries loaded from the database\n", 919 BIO_printf(bio_err,"%d entries loaded from the database\n",
919 db->db->data->num); 920 db->data->num);
920 BIO_printf(bio_err,"generating index\n"); 921 BIO_printf(bio_err,"generating index\n");
921 } 922 }
922 923
923 if (!index_index(db)) goto err; 924 if (!make_serial_index(db))
925 goto err;
926
927 if (!TXT_DB_create_index(db, DB_name, index_name_qual,
928 LHASH_HASH_FN(index_name_hash),
929 LHASH_COMP_FN(index_name_cmp)))
930 {
931 BIO_printf(bio_err,"error creating name index:(%ld,%ld,%ld)\n",
932 db->error,db->arg1,db->arg2);
933 goto err;
934 }
924 935
925 /*****************************************************************/ 936 /*****************************************************************/
926 /* Update the db file for expired certificates */ 937 /* Update the db file for expired certificates */
@@ -943,9 +954,62 @@ bad:
943 } 954 }
944 else 955 else
945 { 956 {
946 if (!save_index(dbfile,"new",db)) goto err; 957 out = BIO_new(BIO_s_file());
947 958 if (out == NULL)
948 if (!rotate_index(dbfile,"new","old")) goto err; 959 {
960 ERR_print_errors(bio_err);
961 goto err;
962 }
963
964#ifndef OPENSSL_SYS_VMS
965 j = BIO_snprintf(buf[0], sizeof buf[0], "%s.new", dbfile);
966#else
967 j = BIO_snprintf(buf[0], sizeof buf[0], "%s-new", dbfile);
968#endif
969 if (j < 0 || j >= sizeof buf[0])
970 {
971 BIO_printf(bio_err, "file name too long\n");
972 goto err;
973 }
974 if (BIO_write_filename(out,buf[0]) <= 0)
975 {
976 perror(dbfile);
977 BIO_printf(bio_err,"unable to open '%s'\n",
978 dbfile);
979 goto err;
980 }
981 j=TXT_DB_write(out,db);
982 if (j <= 0) goto err;
983
984 BIO_free(out);
985 out = NULL;
986#ifndef OPENSSL_SYS_VMS
987 j = BIO_snprintf(buf[1], sizeof buf[1], "%s.old", dbfile);
988#else
989 j = BIO_snprintf(buf[1], sizeof buf[1], "%s-old", dbfile);
990#endif
991 if (j < 0 || j >= sizeof buf[1])
992 {
993 BIO_printf(bio_err, "file name too long\n");
994 goto err;
995 }
996 if (rename(dbfile,buf[1]) < 0)
997 {
998 BIO_printf(bio_err,
999 "unable to rename %s to %s\n",
1000 dbfile, buf[1]);
1001 perror("reason");
1002 goto err;
1003 }
1004 if (rename(buf[0],dbfile) < 0)
1005 {
1006 BIO_printf(bio_err,
1007 "unable to rename %s to %s\n",
1008 buf[0],dbfile);
1009 perror("reason");
1010 rename(buf[1],dbfile);
1011 goto err;
1012 }
949 1013
950 if (verbose) BIO_printf(bio_err, 1014 if (verbose) BIO_printf(bio_err,
951 "Done. %d entries marked as expired\n",i); 1015 "Done. %d entries marked as expired\n",i);
@@ -1106,7 +1170,7 @@ bad:
1106 goto err; 1170 goto err;
1107 } 1171 }
1108 1172
1109 if ((serial=load_serial(serialfile, 0, NULL)) == NULL) 1173 if ((serial=load_serial(serialfile)) == NULL)
1110 { 1174 {
1111 BIO_printf(bio_err,"error while loading serial number\n"); 1175 BIO_printf(bio_err,"error while loading serial number\n");
1112 goto err; 1176 goto err;
@@ -1240,9 +1304,38 @@ bad:
1240 1304
1241 BIO_printf(bio_err,"Write out database with %d new entries\n",sk_X509_num(cert_sk)); 1305 BIO_printf(bio_err,"Write out database with %d new entries\n",sk_X509_num(cert_sk));
1242 1306
1243 if (!save_serial(serialfile,"new",serial,NULL)) goto err; 1307 if(strlen(serialfile) > BSIZE-5 || strlen(dbfile) > BSIZE-5)
1308 {
1309 BIO_printf(bio_err,"file name too long\n");
1310 goto err;
1311 }
1312
1313 strcpy(buf[0],serialfile);
1314
1315#ifdef OPENSSL_SYS_VMS
1316 strcat(buf[0],"-new");
1317#else
1318 strlcat(buf[0],".new",sizeof(buf[0]));
1319#endif
1320
1321 if (!save_serial(buf[0],serial)) goto err;
1322
1323 strcpy(buf[1],dbfile);
1244 1324
1245 if (!save_index(dbfile, "new", db)) goto err; 1325#ifdef OPENSSL_SYS_VMS
1326 strcat(buf[1],"-new");
1327#else
1328 strlcat(buf[1],".new",sizeof(buf[1]));
1329#endif
1330
1331 if (BIO_write_filename(out,buf[1]) <= 0)
1332 {
1333 perror(dbfile);
1334 BIO_printf(bio_err,"unable to open '%s'\n",dbfile);
1335 goto err;
1336 }
1337 l=TXT_DB_write(out,db);
1338 if (l <= 0) goto err;
1246 } 1339 }
1247 1340
1248 if (verbose) 1341 if (verbose)
@@ -1266,7 +1359,7 @@ bad:
1266 strcpy(buf[2],outdir); 1359 strcpy(buf[2],outdir);
1267 1360
1268#ifndef OPENSSL_SYS_VMS 1361#ifndef OPENSSL_SYS_VMS
1269 BUF_strlcat(buf[2],"/",sizeof(buf[2])); 1362 strlcat(buf[2],"/",sizeof(buf[2]));
1270#endif 1363#endif
1271 1364
1272 n=(char *)&(buf[2][strlen(buf[2])]); 1365 n=(char *)&(buf[2][strlen(buf[2])]);
@@ -1276,9 +1369,9 @@ bad:
1276 { 1369 {
1277 if (n >= &(buf[2][sizeof(buf[2])])) 1370 if (n >= &(buf[2][sizeof(buf[2])]))
1278 break; 1371 break;
1279 BIO_snprintf(n, 1372 snprintf(n,
1280 &buf[2][0] + sizeof(buf[2]) - n, 1373 &buf[2][0] + sizeof(buf[2]) - n,
1281 "%02X",(unsigned char)*(p++)); 1374 "%02X",(unsigned char)*(p++));
1282 n+=2; 1375 n+=2;
1283 } 1376 }
1284 } 1377 }
@@ -1304,10 +1397,59 @@ bad:
1304 if (sk_X509_num(cert_sk)) 1397 if (sk_X509_num(cert_sk))
1305 { 1398 {
1306 /* Rename the database and the serial file */ 1399 /* Rename the database and the serial file */
1307 if (!rotate_serial(serialfile,"new","old")) goto err; 1400 strncpy(buf[2],serialfile,BSIZE-4);
1401 buf[2][BSIZE-4]='\0';
1308 1402
1309 if (!rotate_index(dbfile,"new","old")) goto err; 1403#ifdef OPENSSL_SYS_VMS
1404 strcat(buf[2],"-old");
1405#else
1406 strlcat(buf[2],".old",sizeof(buf[2]));
1407#endif
1310 1408
1409 BIO_free(in);
1410 BIO_free_all(out);
1411 in=NULL;
1412 out=NULL;
1413 if (rename(serialfile,buf[2]) < 0)
1414 {
1415 BIO_printf(bio_err,"unable to rename %s to %s\n",
1416 serialfile,buf[2]);
1417 perror("reason");
1418 goto err;
1419 }
1420 if (rename(buf[0],serialfile) < 0)
1421 {
1422 BIO_printf(bio_err,"unable to rename %s to %s\n",
1423 buf[0],serialfile);
1424 perror("reason");
1425 rename(buf[2],serialfile);
1426 goto err;
1427 }
1428
1429 strncpy(buf[2],dbfile,BSIZE-4);
1430 buf[2][BSIZE-4]='\0';
1431
1432#ifdef OPENSSL_SYS_VMS
1433 strcat(buf[2],"-old");
1434#else
1435 strlcat(buf[2],".old",sizeof(buf[2]));
1436#endif
1437
1438 if (rename(dbfile,buf[2]) < 0)
1439 {
1440 BIO_printf(bio_err,"unable to rename %s to %s\n",
1441 dbfile,buf[2]);
1442 perror("reason");
1443 goto err;
1444 }
1445 if (rename(buf[1],dbfile) < 0)
1446 {
1447 BIO_printf(bio_err,"unable to rename %s to %s\n",
1448 buf[1],dbfile);
1449 perror("reason");
1450 rename(buf[2],dbfile);
1451 goto err;
1452 }
1311 BIO_printf(bio_err,"Data Base Updated\n"); 1453 BIO_printf(bio_err,"Data Base Updated\n");
1312 } 1454 }
1313 } 1455 }
@@ -1338,14 +1480,6 @@ bad:
1338 } 1480 }
1339 } 1481 }
1340 1482
1341 if ((crlnumberfile=NCONF_get_string(conf,section,ENV_CRLNUMBER))
1342 != NULL)
1343 if ((crlnumber=load_serial(crlnumberfile,0,NULL)) == NULL)
1344 {
1345 BIO_printf(bio_err,"error while loading CRL number\n");
1346 goto err;
1347 }
1348
1349 if (!crldays && !crlhours) 1483 if (!crldays && !crlhours)
1350 { 1484 {
1351 if (!NCONF_get_number(conf,section, 1485 if (!NCONF_get_number(conf,section,
@@ -1374,9 +1508,9 @@ bad:
1374 1508
1375 ASN1_TIME_free(tmptm); 1509 ASN1_TIME_free(tmptm);
1376 1510
1377 for (i=0; i<sk_num(db->db->data); i++) 1511 for (i=0; i<sk_num(db->data); i++)
1378 { 1512 {
1379 pp=(char **)sk_value(db->db->data,i); 1513 pp=(char **)sk_value(db->data,i);
1380 if (pp[DB_type][0] == DB_TYPE_REV) 1514 if (pp[DB_type][0] == DB_TYPE_REV)
1381 { 1515 {
1382 if ((r=X509_REVOKED_new()) == NULL) goto err; 1516 if ((r=X509_REVOKED_new()) == NULL) goto err;
@@ -1422,24 +1556,14 @@ bad:
1422 1556
1423 /* Add any extensions asked for */ 1557 /* Add any extensions asked for */
1424 1558
1425 if (crl_ext || crlnumberfile != NULL) 1559 if (crl_ext)
1426 { 1560 {
1427 X509V3_CTX crlctx; 1561 X509V3_CTX crlctx;
1428 X509V3_set_ctx(&crlctx, x509, NULL, NULL, crl, 0); 1562 X509V3_set_ctx(&crlctx, x509, NULL, NULL, crl, 0);
1429 X509V3_set_nconf(&crlctx, conf); 1563 X509V3_set_nconf(&crlctx, conf);
1430 1564
1431 if (crl_ext) 1565 if (!X509V3_EXT_CRL_add_nconf(conf, &crlctx,
1432 if (!X509V3_EXT_CRL_add_nconf(conf, &crlctx, 1566 crl_ext, crl)) goto err;
1433 crl_ext, crl)) goto err;
1434 if (crlnumberfile != NULL)
1435 {
1436 tmpser = BN_to_ASN1_INTEGER(crlnumber, NULL);
1437 if (!tmpser) goto err;
1438 X509_CRL_add1_ext_i2d(crl,NID_crl_number,tmpser,0,0);
1439 ASN1_INTEGER_free(tmpser);
1440 crl_v2 = 1;
1441 if (!BN_add_word(crlnumber,1)) goto err;
1442 }
1443 } 1567 }
1444 if (crl_ext || crl_v2) 1568 if (crl_ext || crl_v2)
1445 { 1569 {
@@ -1447,17 +1571,9 @@ bad:
1447 goto err; /* version 2 CRL */ 1571 goto err; /* version 2 CRL */
1448 } 1572 }
1449 1573
1450
1451 if (crlnumberfile != NULL) /* we have a CRL number that need updating */
1452 if (!save_serial(crlnumberfile,"new",crlnumber,NULL)) goto err;
1453
1454 if (!X509_CRL_sign(crl,pkey,dgst)) goto err; 1574 if (!X509_CRL_sign(crl,pkey,dgst)) goto err;
1455 1575
1456 PEM_write_bio_X509_CRL(Sout,crl); 1576 PEM_write_bio_X509_CRL(Sout,crl);
1457
1458 if (crlnumberfile != NULL) /* Rename the crlnumber file */
1459 if (!rotate_serial(crlnumberfile,"new","old")) goto err;
1460
1461 } 1577 }
1462 /*****************************************************************/ 1578 /*****************************************************************/
1463 if (dorevoke) 1579 if (dorevoke)
@@ -1478,10 +1594,50 @@ bad:
1478 if (j <= 0) goto err; 1594 if (j <= 0) goto err;
1479 X509_free(revcert); 1595 X509_free(revcert);
1480 1596
1481 if (!save_index(dbfile, "new", db)) goto err; 1597 if(strlen(dbfile) > BSIZE-5)
1482 1598 {
1483 if (!rotate_index(dbfile, "new", "old")) goto err; 1599 BIO_printf(bio_err,"filename too long\n");
1600 goto err;
1601 }
1484 1602
1603 strcpy(buf[0],dbfile);
1604#ifndef OPENSSL_SYS_VMS
1605 strlcat(buf[0],".new",sizeof(buf[0]));
1606#else
1607 strcat(buf[0],"-new");
1608#endif
1609 if (BIO_write_filename(out,buf[0]) <= 0)
1610 {
1611 perror(dbfile);
1612 BIO_printf(bio_err,"unable to open '%s'\n",dbfile);
1613 goto err;
1614 }
1615 j=TXT_DB_write(out,db);
1616 if (j <= 0) goto err;
1617 BIO_free_all(out);
1618 out = NULL;
1619 BIO_free_all(in);
1620 in = NULL;
1621 strncpy(buf[1],dbfile,BSIZE-4);
1622 buf[1][BSIZE-4]='\0';
1623#ifndef OPENSSL_SYS_VMS
1624 strlcat(buf[1],".old",sizeof(buf[1]));
1625#else
1626 strcat(buf[1],"-old");
1627#endif
1628 if (rename(dbfile,buf[1]) < 0)
1629 {
1630 BIO_printf(bio_err,"unable to rename %s to %s\n", dbfile, buf[1]);
1631 perror("reason");
1632 goto err;
1633 }
1634 if (rename(buf[0],dbfile) < 0)
1635 {
1636 BIO_printf(bio_err,"unable to rename %s to %s\n", buf[0],dbfile);
1637 perror("reason");
1638 rename(buf[1],dbfile);
1639 goto err;
1640 }
1485 BIO_printf(bio_err,"Data Base Updated\n"); 1641 BIO_printf(bio_err,"Data Base Updated\n");
1486 } 1642 }
1487 } 1643 }
@@ -1503,7 +1659,7 @@ err:
1503 if (free_key && key) 1659 if (free_key && key)
1504 OPENSSL_free(key); 1660 OPENSSL_free(key);
1505 BN_free(serial); 1661 BN_free(serial);
1506 free_index(db); 1662 TXT_DB_free(db);
1507 EVP_PKEY_free(pkey); 1663 EVP_PKEY_free(pkey);
1508 X509_free(x509); 1664 X509_free(x509);
1509 X509_CRL_free(crl); 1665 X509_CRL_free(crl);
@@ -1518,8 +1674,106 @@ static void lookup_fail(char *name, char *tag)
1518 BIO_printf(bio_err,"variable lookup failed for %s::%s\n",name,tag); 1674 BIO_printf(bio_err,"variable lookup failed for %s::%s\n",name,tag);
1519 } 1675 }
1520 1676
1677static unsigned long index_serial_hash(const char **a)
1678 {
1679 const char *n;
1680
1681 n=a[DB_serial];
1682 while (*n == '0') n++;
1683 return(lh_strhash(n));
1684 }
1685
1686static int index_serial_cmp(const char **a, const char **b)
1687 {
1688 const char *aa,*bb;
1689
1690 for (aa=a[DB_serial]; *aa == '0'; aa++);
1691 for (bb=b[DB_serial]; *bb == '0'; bb++);
1692 return(strcmp(aa,bb));
1693 }
1694
1695static unsigned long index_name_hash(const char **a)
1696 { return(lh_strhash(a[DB_name])); }
1697
1698static int index_name_qual(char **a)
1699 { return(a[0][0] == 'V'); }
1700
1701static int index_name_cmp(const char **a, const char **b)
1702 { return(strcmp(a[DB_name],
1703 b[DB_name])); }
1704
1705static BIGNUM *load_serial(char *serialfile)
1706 {
1707 BIO *in=NULL;
1708 BIGNUM *ret=NULL;
1709 MS_STATIC char buf[1024];
1710 ASN1_INTEGER *ai=NULL;
1711
1712 if ((in=BIO_new(BIO_s_file())) == NULL)
1713 {
1714 ERR_print_errors(bio_err);
1715 goto err;
1716 }
1717
1718 if (BIO_read_filename(in,serialfile) <= 0)
1719 {
1720 perror(serialfile);
1721 goto err;
1722 }
1723 ai=ASN1_INTEGER_new();
1724 if (ai == NULL) goto err;
1725 if (!a2i_ASN1_INTEGER(in,ai,buf,1024))
1726 {
1727 BIO_printf(bio_err,"unable to load number from %s\n",
1728 serialfile);
1729 goto err;
1730 }
1731 ret=ASN1_INTEGER_to_BN(ai,NULL);
1732 if (ret == NULL)
1733 {
1734 BIO_printf(bio_err,"error converting number from bin to BIGNUM\n");
1735 goto err;
1736 }
1737err:
1738 if (in != NULL) BIO_free(in);
1739 if (ai != NULL) ASN1_INTEGER_free(ai);
1740 return(ret);
1741 }
1742
1743static int save_serial(char *serialfile, BIGNUM *serial)
1744 {
1745 BIO *out;
1746 int ret=0;
1747 ASN1_INTEGER *ai=NULL;
1748
1749 out=BIO_new(BIO_s_file());
1750 if (out == NULL)
1751 {
1752 ERR_print_errors(bio_err);
1753 goto err;
1754 }
1755 if (BIO_write_filename(out,serialfile) <= 0)
1756 {
1757 perror(serialfile);
1758 goto err;
1759 }
1760
1761 if ((ai=BN_to_ASN1_INTEGER(serial,NULL)) == NULL)
1762 {
1763 BIO_printf(bio_err,"error converting serial to ASN.1 format\n");
1764 goto err;
1765 }
1766 i2a_ASN1_INTEGER(out,ai);
1767 BIO_puts(out,"\n");
1768 ret=1;
1769err:
1770 if (out != NULL) BIO_free_all(out);
1771 if (ai != NULL) ASN1_INTEGER_free(ai);
1772 return(ret);
1773 }
1774
1521static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, 1775static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
1522 const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db, 1776 const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, TXT_DB *db,
1523 BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate, 1777 BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate,
1524 long days, int batch, char *ext_sect, CONF *lconf, int verbose, 1778 long days, int batch, char *ext_sect, CONF *lconf, int verbose,
1525 unsigned long certopt, unsigned long nameopt, int default_op, 1779 unsigned long certopt, unsigned long nameopt, int default_op,
@@ -1581,7 +1835,7 @@ err:
1581 } 1835 }
1582 1836
1583static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, 1837static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
1584 const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db, 1838 const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, TXT_DB *db,
1585 BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate, 1839 BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate,
1586 long days, int batch, char *ext_sect, CONF *lconf, int verbose, 1840 long days, int batch, char *ext_sect, CONF *lconf, int verbose,
1587 unsigned long certopt, unsigned long nameopt, int default_op, 1841 unsigned long certopt, unsigned long nameopt, int default_op,
@@ -1635,7 +1889,7 @@ err:
1635 } 1889 }
1636 1890
1637static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst, 1891static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
1638 STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj, 1892 STACK_OF(CONF_VALUE) *policy, TXT_DB *db, BIGNUM *serial, char *subj,
1639 int email_dn, char *startdate, char *enddate, long days, int batch, 1893 int email_dn, char *startdate, char *enddate, long days, int batch,
1640 int verbose, X509_REQ *req, char *ext_sect, CONF *lconf, 1894 int verbose, X509_REQ *req, char *ext_sect, CONF *lconf,
1641 unsigned long certopt, unsigned long nameopt, int default_op, 1895 unsigned long certopt, unsigned long nameopt, int default_op,
@@ -1653,7 +1907,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
1653 int ok= -1,i,j,last,nid; 1907 int ok= -1,i,j,last,nid;
1654 char *p; 1908 char *p;
1655 CONF_VALUE *cv; 1909 CONF_VALUE *cv;
1656 char *row[DB_NUMBER],**rrow=NULL,**irow=NULL; 1910 char *row[DB_NUMBER],**rrow,**irow=NULL;
1657 char buf[25]; 1911 char buf[25];
1658 1912
1659 tmptm=ASN1_UTCTIME_new(); 1913 tmptm=ASN1_UTCTIME_new();
@@ -1890,19 +2144,15 @@ again2:
1890 goto err; 2144 goto err;
1891 } 2145 }
1892 2146
1893 if (db->attributes.unique_subject) 2147 rrow=TXT_DB_get_by_index(db,DB_name,row);
2148 if (rrow != NULL)
1894 { 2149 {
1895 rrow=TXT_DB_get_by_index(db->db,DB_name,row); 2150 BIO_printf(bio_err,"ERROR:There is already a certificate for %s\n",
1896 if (rrow != NULL) 2151 row[DB_name]);
1897 {
1898 BIO_printf(bio_err,
1899 "ERROR:There is already a certificate for %s\n",
1900 row[DB_name]);
1901 }
1902 } 2152 }
1903 if (rrow == NULL) 2153 else
1904 { 2154 {
1905 rrow=TXT_DB_get_by_index(db->db,DB_serial,row); 2155 rrow=TXT_DB_get_by_index(db,DB_serial,row);
1906 if (rrow != NULL) 2156 if (rrow != NULL)
1907 { 2157 {
1908 BIO_printf(bio_err,"ERROR:Serial number %s has already been issued,\n", 2158 BIO_printf(bio_err,"ERROR:Serial number %s has already been issued,\n",
@@ -1923,7 +2173,7 @@ again2:
1923 p="Valid"; 2173 p="Valid";
1924 else 2174 else
1925 p="\ninvalid type, Data base error\n"; 2175 p="\ninvalid type, Data base error\n";
1926 BIO_printf(bio_err,"Type :%s\n",p);; 2176 BIO_printf(bio_err,"Type :%s\n",p);
1927 if (rrow[DB_type][0] == 'R') 2177 if (rrow[DB_type][0] == 'R')
1928 { 2178 {
1929 p=rrow[DB_exp_date]; if (p == NULL) p="undef"; 2179 p=rrow[DB_exp_date]; if (p == NULL) p="undef";
@@ -2109,7 +2359,7 @@ again2:
2109 BIO_printf(bio_err,"Memory allocation failure\n"); 2359 BIO_printf(bio_err,"Memory allocation failure\n");
2110 goto err; 2360 goto err;
2111 } 2361 }
2112 BUF_strlcpy(row[DB_file],"unknown",8); 2362 strlcpy(row[DB_file],"unknown",8);
2113 row[DB_type][0]='V'; 2363 row[DB_type][0]='V';
2114 row[DB_type][1]='\0'; 2364 row[DB_type][1]='\0';
2115 2365
@@ -2126,10 +2376,10 @@ again2:
2126 } 2376 }
2127 irow[DB_NUMBER]=NULL; 2377 irow[DB_NUMBER]=NULL;
2128 2378
2129 if (!TXT_DB_insert(db->db,irow)) 2379 if (!TXT_DB_insert(db,irow))
2130 { 2380 {
2131 BIO_printf(bio_err,"failed to update database\n"); 2381 BIO_printf(bio_err,"failed to update database\n");
2132 BIO_printf(bio_err,"TXT_DB error number %ld\n",db->db->error); 2382 BIO_printf(bio_err,"TXT_DB error number %ld\n",db->error);
2133 goto err; 2383 goto err;
2134 } 2384 }
2135 ok=1; 2385 ok=1;
@@ -2180,7 +2430,7 @@ static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext)
2180 } 2430 }
2181 2431
2182static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, 2432static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
2183 const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db, 2433 const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, TXT_DB *db,
2184 BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate, 2434 BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate,
2185 long days, char *ext_sect, CONF *lconf, int verbose, unsigned long certopt, 2435 long days, char *ext_sect, CONF *lconf, int verbose, unsigned long certopt,
2186 unsigned long nameopt, int default_op, int ext_copy) 2436 unsigned long nameopt, int default_op, int ext_copy)
@@ -2359,7 +2609,7 @@ static int check_time_format(char *str)
2359 return(ASN1_UTCTIME_check(&tm)); 2609 return(ASN1_UTCTIME_check(&tm));
2360 } 2610 }
2361 2611
2362static int do_revoke(X509 *x509, CA_DB *db, int type, char *value) 2612static int do_revoke(X509 *x509, TXT_DB *db, int type, char *value)
2363 { 2613 {
2364 ASN1_UTCTIME *tm=NULL; 2614 ASN1_UTCTIME *tm=NULL;
2365 char *row[DB_NUMBER],**rrow,**irow; 2615 char *row[DB_NUMBER],**rrow,**irow;
@@ -2384,10 +2634,10 @@ static int do_revoke(X509 *x509, CA_DB *db, int type, char *value)
2384 /* We have to lookup by serial number because name lookup 2634 /* We have to lookup by serial number because name lookup
2385 * skips revoked certs 2635 * skips revoked certs
2386 */ 2636 */
2387 rrow=TXT_DB_get_by_index(db->db,DB_serial,row); 2637 rrow=TXT_DB_get_by_index(db,DB_serial,row);
2388 if (rrow == NULL) 2638 if (rrow == NULL)
2389 { 2639 {
2390 BIO_printf(bio_err,"Adding Entry with serial number %s to DB for %s\n", row[DB_serial], row[DB_name]); 2640 BIO_printf(bio_err,"Adding Entry to DB for %s\n", row[DB_name]);
2391 2641
2392 /* We now just add it to the database */ 2642 /* We now just add it to the database */
2393 row[DB_type]=(char *)OPENSSL_malloc(2); 2643 row[DB_type]=(char *)OPENSSL_malloc(2);
@@ -2410,7 +2660,7 @@ static int do_revoke(X509 *x509, CA_DB *db, int type, char *value)
2410 BIO_printf(bio_err,"Memory allocation failure\n"); 2660 BIO_printf(bio_err,"Memory allocation failure\n");
2411 goto err; 2661 goto err;
2412 } 2662 }
2413 BUF_strlcpy(row[DB_file],"unknown",8); 2663 strlcpy(row[DB_file],"unknown",8);
2414 row[DB_type][0]='V'; 2664 row[DB_type][0]='V';
2415 row[DB_type][1]='\0'; 2665 row[DB_type][1]='\0';
2416 2666
@@ -2427,10 +2677,10 @@ static int do_revoke(X509 *x509, CA_DB *db, int type, char *value)
2427 } 2677 }
2428 irow[DB_NUMBER]=NULL; 2678 irow[DB_NUMBER]=NULL;
2429 2679
2430 if (!TXT_DB_insert(db->db,irow)) 2680 if (!TXT_DB_insert(db,irow))
2431 { 2681 {
2432 BIO_printf(bio_err,"failed to update database\n"); 2682 BIO_printf(bio_err,"failed to update database\n");
2433 BIO_printf(bio_err,"TXT_DB error number %ld\n",db->db->error); 2683 BIO_printf(bio_err,"TXT_DB error number %ld\n",db->error);
2434 goto err; 2684 goto err;
2435 } 2685 }
2436 2686
@@ -2475,7 +2725,7 @@ err:
2475 return(ok); 2725 return(ok);
2476 } 2726 }
2477 2727
2478static int get_certificate_status(const char *serial, CA_DB *db) 2728static int get_certificate_status(const char *serial, TXT_DB *db)
2479 { 2729 {
2480 char *row[DB_NUMBER],**rrow; 2730 char *row[DB_NUMBER],**rrow;
2481 int ok=-1,i; 2731 int ok=-1,i;
@@ -2516,7 +2766,7 @@ static int get_certificate_status(const char *serial, CA_DB *db)
2516 ok=1; 2766 ok=1;
2517 2767
2518 /* Search for the certificate */ 2768 /* Search for the certificate */
2519 rrow=TXT_DB_get_by_index(db->db,DB_serial,row); 2769 rrow=TXT_DB_get_by_index(db,DB_serial,row);
2520 if (rrow == NULL) 2770 if (rrow == NULL)
2521 { 2771 {
2522 BIO_printf(bio_err,"Serial %s not present in db.\n", 2772 BIO_printf(bio_err,"Serial %s not present in db.\n",
@@ -2563,7 +2813,7 @@ err:
2563 return(ok); 2813 return(ok);
2564 } 2814 }
2565 2815
2566static int do_updatedb (CA_DB *db) 2816static int do_updatedb (TXT_DB *db)
2567 { 2817 {
2568 ASN1_UTCTIME *a_tm = NULL; 2818 ASN1_UTCTIME *a_tm = NULL;
2569 int i, cnt = 0; 2819 int i, cnt = 0;
@@ -2589,9 +2839,9 @@ static int do_updatedb (CA_DB *db)
2589 else 2839 else
2590 a_y2k = 0; 2840 a_y2k = 0;
2591 2841
2592 for (i = 0; i < sk_num(db->db->data); i++) 2842 for (i = 0; i < sk_num(db->data); i++)
2593 { 2843 {
2594 rrow = (char **) sk_value(db->db->data, i); 2844 rrow = (char **) sk_value(db->data, i);
2595 2845
2596 if (rrow[DB_type][0] == 'V') 2846 if (rrow[DB_type][0] == 'V')
2597 { 2847 {
@@ -2734,16 +2984,16 @@ char *make_revocation_str(int rev_type, char *rev_arg)
2734 2984
2735 if (!str) return NULL; 2985 if (!str) return NULL;
2736 2986
2737 BUF_strlcpy(str, (char *)revtm->data, i); 2987 strlcpy(str, (char *)revtm->data, i);
2738 if (reason) 2988 if (reason)
2739 { 2989 {
2740 BUF_strlcat(str, ",", i); 2990 strlcat(str, ",", i);
2741 BUF_strlcat(str, reason, i); 2991 strlcat(str, reason, i);
2742 } 2992 }
2743 if (other) 2993 if (other)
2744 { 2994 {
2745 BUF_strlcat(str, ",", i); 2995 strlcat(str, ",", i);
2746 BUF_strlcat(str, other, i); 2996 strlcat(str, other, i);
2747 } 2997 }
2748 ASN1_UTCTIME_free(revtm); 2998 ASN1_UTCTIME_free(revtm);
2749 return str; 2999 return str;
@@ -3078,3 +3328,17 @@ int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_G
3078 3328
3079 return ret; 3329 return ret;
3080 } 3330 }
3331
3332int make_serial_index(TXT_DB *db)
3333 {
3334 if (!TXT_DB_create_index(db, DB_serial, NULL,
3335 LHASH_HASH_FN(index_serial_hash),
3336 LHASH_COMP_FN(index_serial_cmp)))
3337 {
3338 BIO_printf(bio_err,
3339 "error creating serial number index:(%ld,%ld,%ld)\n",
3340 db->error,db->arg1,db->arg2);
3341 return 0;
3342 }
3343 return 1;
3344 }
diff --git a/src/lib/libssl/src/apps/der_chop.in b/src/lib/libssl/src/apps/der_chop.in
new file mode 100644
index 0000000000..9070b032fc
--- /dev/null
+++ b/src/lib/libssl/src/apps/der_chop.in
@@ -0,0 +1,305 @@
1#!/usr/local/bin/perl
2#
3# der_chop ... this is one total hack that Eric is really not proud of
4# so don't look at it and don't ask for support
5#
6# The "documentation" for this (i.e. all the comments) are my fault --tjh
7#
8# This program takes the "raw" output of derparse/asn1parse and
9# converts it into tokens and then runs regular expression matches
10# to try to figure out what to grab to get the things that are needed
11# and it is possible that this will do the wrong thing as it is a *hack*
12#
13# SSLeay 0.5.2+ should have direct read support for x509 (via -inform NET)
14# [I know ... promises promises :-)]
15#
16# To convert a Netscape Certificate:
17# der_chop < ServerCert.der > cert.pem
18# To convert a Netscape Key (and encrypt it again to protect it)
19# rsa -inform NET -in ServerKey.der -des > key.pem
20#
21# 23-Apr-96 eay Added the extra ASN.1 string types, I still think this
22# is an evil hack. If nothing else the parsing should
23# be relative, not absolute.
24# 19-Apr-96 tjh hacked (with eay) into 0.5.x format
25#
26# Tim Hudson
27# tjh@cryptsoft.com
28#
29
30
31require 'getopts.pl';
32
33$debug=0;
34
35# this was the 0.4.x way of doing things ...
36$cmd="derparse";
37$x509_cmd="x509";
38$crl_cmd="crl";
39$rc4_cmd="rc4";
40$md2_cmd="md2";
41$md4_cmd="md4";
42$rsa_cmd="rsa -des -inform der ";
43
44# this was the 0.5.x way of doing things ...
45$cmd="openssl asn1parse";
46$x509_cmd="openssl x509";
47$crl_cmd="openssl crl";
48$rc4_cmd="openssl rc4";
49$md2_cmd="openssl md2";
50$md4_cmd="openssl md4";
51$rsa_cmd="openssl rsa -des -inform der ";
52
53&Getopts('vd:') || die "usage:$0 [-v] [-d num] file";
54$depth=($opt_d =~ /^\d+$/)?$opt_d:0;
55
56&init_der();
57
58if ($#ARGV != -1)
59 {
60 foreach $file (@ARGV)
61 {
62 print STDERR "doing $file\n";
63 &dofile($file);
64 }
65 }
66else
67 {
68 $file="/tmp/a$$.DER";
69 open(OUT,">$file") || die "unable to open $file:$!\n";
70 for (;;)
71 {
72 $i=sysread(STDIN,$b,1024*10);
73 last if ($i <= 0);
74 $i=syswrite(OUT,$b,$i);
75 }
76 &dofile($file);
77 unlink($file);
78 }
79
80sub dofile
81 {
82 local($file)=@_;
83 local(@p);
84
85 $b=&load_file($file);
86 @p=&load_file_parse($file);
87
88 foreach $_ (@p)
89 {
90 ($off,$d,$hl,$len)=&parse_line($_);
91 $d-=$depth;
92 next if ($d != 0);
93 next if ($len == 0);
94
95 $o=substr($b,$off,$len+$hl);
96 ($str,@data)=&der_str($o);
97 print "$str\n" if ($opt_v);
98 if ($str =~ /^$crl/)
99 {
100 open(OUT,"|$crl_cmd -inform d -hash -issuer") ||
101 die "unable to run $crl_cmd:$!\n";
102 print OUT $o;
103 close(OUT);
104 }
105 elsif ($str =~ /^$x509/)
106 {
107 open(OUT,"|$x509_cmd -inform d -hash -subject -issuer")
108 || die "unable to run $x509_cmd:$!\n";
109 print OUT $o;
110 close(OUT);
111 }
112 elsif ($str =~ /^$rsa/)
113 {
114 ($type)=($data[3] =~ /OBJECT_IDENTIFIER :(.*)\s*$/);
115 next unless ($type eq "rsaEncryption");
116 ($off,$d,$hl,$len)=&parse_line($data[5]);
117 $os=substr($o,$off+$hl,$len);
118 open(OUT,"|$rsa_cmd")
119 || die "unable to run $rsa_cmd:$!\n";
120 print OUT $os;
121 close(OUT);
122 }
123 elsif ($str =~ /^0G-1D-1G/)
124 {
125 ($off,$d,$hl,$len)=&parse_line($data[1]);
126 $os=substr($o,$off+$hl,$len);
127 print STDERR "<$os>\n" if $opt_v;
128 &do_certificate($o,@data)
129 if (($os eq "certificate") &&
130 ($str =! /^0G-1D-1G-2G-3F-3E-2D/));
131 &do_private_key($o,@data)
132 if (($os eq "private-key") &&
133 ($str =! /^0G-1D-1G-2G-3F-3E-2D/));
134 }
135 }
136 }
137
138sub der_str
139 {
140 local($str)=@_;
141 local(*OUT,*IN,@a,$t,$d,$ret);
142 local($file)="/tmp/b$$.DER";
143 local(@ret);
144
145 open(OUT,">$file");
146 print OUT $str;
147 close(OUT);
148 open(IN,"$cmd -inform 'd' -in $file |") ||
149 die "unable to run $cmd:$!\n";
150 $ret="";
151 while (<IN>)
152 {
153 chop;
154 push(@ret,$_);
155
156 print STDERR "$_\n" if ($debug);
157
158 @a=split(/\s*:\s*/);
159 ($d)=($a[1] =~ /d=\s*(\d+)/);
160 $a[2] =~ s/\s+$//;
161 $t=$DER_s2i{$a[2]};
162 $ret.="$d$t-";
163 }
164 close(IN);
165 unlink($file);
166 chop $ret;
167 $ret =~ s/(-3H(-4G-5F-5[IJKMQRS])+)+/-NAME/g;
168 $ret =~ s/(-3G-4B-4L)+/-RCERT/g;
169 return($ret,@ret);
170 }
171
172sub init_der
173 {
174 $crl= "0G-1G-2G-3F-3E-2G-NAME-2L-2L-2G-RCERT-1G-2F-2E-1C";
175 $x509="0G-1G-2B-2G-3F-3E-2G-NAME-2G-3L-3L-2G-NAME-2G-3G-4F-4E-3C-1G-2F-2E-1C";
176 $rsa= "0G-1B-1G-2F-2E-1D";
177
178 %DER_i2s=(
179 # SSLeay 0.4.x has this list
180 "A","EOC",
181 "B","INTEGER",
182 "C","BIT STRING",
183 "D","OCTET STRING",
184 "E","NULL",
185 "F","OBJECT",
186 "G","SEQUENCE",
187 "H","SET",
188 "I","PRINTABLESTRING",
189 "J","T61STRING",
190 "K","IA5STRING",
191 "L","UTCTIME",
192 "M","NUMERICSTRING",
193 "N","VIDEOTEXSTRING",
194 "O","GENERALIZEDTIME",
195 "P","GRAPHICSTRING",
196 "Q","ISO64STRING",
197 "R","GENERALSTRING",
198 "S","UNIVERSALSTRING",
199
200 # SSLeay 0.5.x changed some things ... and I'm
201 # leaving in the old stuff but adding in these
202 # to handle the new as well --tjh
203 # - Well I've just taken them out and added the extra new
204 # ones :-) - eay
205 );
206
207 foreach (keys %DER_i2s)
208 { $DER_s2i{$DER_i2s{$_}}=$_; }
209 }
210
211sub parse_line
212 {
213 local($_)=@_;
214
215 return(/\s*(\d+):d=\s*(\d+)\s+hl=\s*(\d+)\s+l=\s*(\d+|inf)\s/);
216 }
217
218# 0:d=0 hl=4 l=377 cons: univ: SEQUENCE
219# 4:d=1 hl=2 l= 11 prim: univ: OCTET_STRING
220# 17:d=1 hl=4 l=360 cons: univ: SEQUENCE
221# 21:d=2 hl=2 l= 12 cons: univ: SEQUENCE
222# 23:d=3 hl=2 l= 8 prim: univ: OBJECT_IDENTIFIER :rc4
223# 33:d=3 hl=2 l= 0 prim: univ: NULL
224# 35:d=2 hl=4 l=342 prim: univ: OCTET_STRING
225sub do_private_key
226 {
227 local($data,@struct)=@_;
228 local($file)="/tmp/b$$.DER";
229 local($off,$d,$hl,$len,$_,$b,@p,$s);
230
231 ($type)=($struct[4] =~ /OBJECT_IDENTIFIER :(.*)\s*$/);
232 if ($type eq "rc4")
233 {
234 ($off,$d,$hl,$len)=&parse_line($struct[6]);
235 open(OUT,"|$rc4_cmd >$file") ||
236 die "unable to run $rc4_cmd:$!\n";
237 print OUT substr($data,$off+$hl,$len);
238 close(OUT);
239
240 $b=&load_file($file);
241 unlink($file);
242
243 ($s,@p)=&der_str($b);
244 die "unknown rsa key type\n$s\n"
245 if ($s ne '0G-1B-1G-2F-2E-1D');
246 local($off,$d,$hl,$len)=&parse_line($p[5]);
247 $b=substr($b,$off+$hl,$len);
248 ($s,@p)=&der_str($b);
249 open(OUT,"|$rsa_cmd") || die "unable to run $rsa_cmd:$!\n";
250 print OUT $b;
251 close(OUT);
252 }
253 else
254 {
255 print "'$type' is unknown\n";
256 exit(1);
257 }
258 }
259
260sub do_certificate
261 {
262 local($data,@struct)=@_;
263 local($file)="/tmp/b$$.DER";
264 local($off,$d,$hl,$len,$_,$b,@p,$s);
265
266 ($off,$d,$hl,$len)=&parse_line($struct[2]);
267 $b=substr($data,$off,$len+$hl);
268
269 open(OUT,"|$x509_cmd -inform d") || die "unable to run $x509_cmd:$!\n";
270 print OUT $b;
271 close(OUT);
272 }
273
274sub load_file
275 {
276 local($file)=@_;
277 local(*IN,$r,$b,$i);
278
279 $r="";
280 open(IN,"<$file") || die "unable to open $file:$!\n";
281 for (;;)
282 {
283 $i=sysread(IN,$b,10240);
284 last if ($i <= 0);
285 $r.=$b;
286 }
287 close(IN);
288 return($r);
289 }
290
291sub load_file_parse
292 {
293 local($file)=@_;
294 local(*IN,$r,@ret,$_,$i,$n,$b);
295
296 open(IN,"$cmd -inform d -in $file|")
297 || die "unable to run der_parse\n";
298 while (<IN>)
299 {
300 chop;
301 push(@ret,$_);
302 }
303 return($r,@ret);
304 }
305
diff --git a/src/lib/libssl/src/apps/dgst.c b/src/lib/libssl/src/apps/dgst.c
index be25dafef7..71298b7524 100644
--- a/src/lib/libssl/src/apps/dgst.c
+++ b/src/lib/libssl/src/apps/dgst.c
@@ -349,7 +349,7 @@ int MAIN(int argc, char **argv)
349 { 349 {
350 size_t len = strlen(name)+strlen(argv[i])+5; 350 size_t len = strlen(name)+strlen(argv[i])+5;
351 tmp=tofree=OPENSSL_malloc(len); 351 tmp=tofree=OPENSSL_malloc(len);
352 BIO_snprintf(tmp,len,"%s(%s)= ",name,argv[i]); 352 snprintf(tmp,len,"%s(%s)= ",name,argv[i]);
353 } 353 }
354 else 354 else
355 tmp=""; 355 tmp="";
diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c
index dc00355b95..8fe3f18d7c 100644
--- a/src/lib/libssl/src/apps/dhparam.c
+++ b/src/lib/libssl/src/apps/dhparam.c
@@ -501,7 +501,7 @@ bad:
501 printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n"); 501 printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n");
502 printf("\t\t{ DH_free(dh); return(NULL); }\n"); 502 printf("\t\t{ DH_free(dh); return(NULL); }\n");
503 if (dh->length) 503 if (dh->length)
504 printf("\tdh->length = %ld;\n", dh->length); 504 printf("\tdh->length = %d;\n", dh->length);
505 printf("\treturn(dh);\n\t}\n"); 505 printf("\treturn(dh);\n\t}\n");
506 OPENSSL_free(data); 506 OPENSSL_free(data);
507 } 507 }
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c
index 30378a9542..9299ab3e13 100644
--- a/src/lib/libssl/src/apps/enc.c
+++ b/src/lib/libssl/src/apps/enc.c
@@ -373,9 +373,9 @@ bad:
373 { 373 {
374 char buf[200]; 374 char buf[200];
375 375
376 BIO_snprintf(buf,sizeof buf,"enter %s %s password:", 376 snprintf(buf,sizeof buf,"enter %s %s password:",
377 OBJ_nid2ln(EVP_CIPHER_nid(cipher)), 377 OBJ_nid2ln(EVP_CIPHER_nid(cipher)),
378 (enc)?"encryption":"decryption"); 378 (enc)?"encryption":"decryption");
379 strbuf[0]='\0'; 379 strbuf[0]='\0';
380 i=EVP_read_pw_string((char *)strbuf,SIZE,buf,enc); 380 i=EVP_read_pw_string((char *)strbuf,SIZE,buf,enc);
381 if (i == 0) 381 if (i == 0)
diff --git a/src/lib/libssl/src/apps/engine.c b/src/lib/libssl/src/apps/engine.c
index 12283d0aed..0e7082abb9 100644
--- a/src/lib/libssl/src/apps/engine.c
+++ b/src/lib/libssl/src/apps/engine.c
@@ -122,8 +122,8 @@ static int append_buf(char **buf, const char *s, int *size, int step)
122 return 0; 122 return 0;
123 123
124 if (**buf != '\0') 124 if (**buf != '\0')
125 BUF_strlcat(*buf, ", ", *size); 125 strlcat(*buf, ", ", *size);
126 BUF_strlcat(*buf, s, *size); 126 strlcat(*buf, s, *size);
127 127
128 return 1; 128 return 1;
129 } 129 }
diff --git a/src/lib/libssl/src/apps/ocsp.c b/src/lib/libssl/src/apps/ocsp.c
index 856b797b53..e5f186fd5e 100644
--- a/src/lib/libssl/src/apps/ocsp.c
+++ b/src/lib/libssl/src/apps/ocsp.c
@@ -68,6 +68,19 @@
68/* Maximum leeway in validity period: default 5 minutes */ 68/* Maximum leeway in validity period: default 5 minutes */
69#define MAX_VALIDITY_PERIOD (5 * 60) 69#define MAX_VALIDITY_PERIOD (5 * 60)
70 70
71/* CA index.txt definitions */
72#define DB_type 0
73#define DB_exp_date 1
74#define DB_rev_date 2
75#define DB_serial 3 /* index - unique */
76#define DB_file 4
77#define DB_name 5 /* index - unique for active */
78#define DB_NUMBER 6
79
80#define DB_TYPE_REV 'R'
81#define DB_TYPE_EXP 'E'
82#define DB_TYPE_VAL 'V'
83
71static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer, 84static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
72 STACK_OF(OCSP_CERTID) *ids); 85 STACK_OF(OCSP_CERTID) *ids);
73static int add_ocsp_serial(OCSP_REQUEST **req, char *serial, X509 *issuer, 86static int add_ocsp_serial(OCSP_REQUEST **req, char *serial, X509 *issuer,
@@ -76,12 +89,12 @@ static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
76 STACK *names, STACK_OF(OCSP_CERTID) *ids, 89 STACK *names, STACK_OF(OCSP_CERTID) *ids,
77 long nsec, long maxage); 90 long nsec, long maxage);
78 91
79static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, CA_DB *db, 92static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, TXT_DB *db,
80 X509 *ca, X509 *rcert, EVP_PKEY *rkey, 93 X509 *ca, X509 *rcert, EVP_PKEY *rkey,
81 STACK_OF(X509) *rother, unsigned long flags, 94 STACK_OF(X509) *rother, unsigned long flags,
82 int nmin, int ndays); 95 int nmin, int ndays);
83 96
84static char **lookup_serial(CA_DB *db, ASN1_INTEGER *ser); 97static char **lookup_serial(TXT_DB *db, ASN1_INTEGER *ser);
85static BIO *init_responder(char *port); 98static BIO *init_responder(char *port);
86static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port); 99static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port);
87static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp); 100static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp);
@@ -130,7 +143,7 @@ int MAIN(int argc, char **argv)
130 X509 *rca_cert = NULL; 143 X509 *rca_cert = NULL;
131 char *ridx_filename = NULL; 144 char *ridx_filename = NULL;
132 char *rca_filename = NULL; 145 char *rca_filename = NULL;
133 CA_DB *rdb = NULL; 146 TXT_DB *rdb = NULL;
134 int nmin = 0, ndays = -1; 147 int nmin = 0, ndays = -1;
135 148
136 if (bio_err == NULL) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE); 149 if (bio_err == NULL) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
@@ -687,9 +700,22 @@ int MAIN(int argc, char **argv)
687 700
688 if (ridx_filename && !rdb) 701 if (ridx_filename && !rdb)
689 { 702 {
690 rdb = load_index(ridx_filename, NULL); 703 BIO *db_bio = NULL;
691 if (!rdb) goto end; 704 db_bio = BIO_new_file(ridx_filename, "r");
692 if (!index_index(rdb)) goto end; 705 if (!db_bio)
706 {
707 BIO_printf(bio_err, "Error opening index file %s\n", ridx_filename);
708 goto end;
709 }
710 rdb = TXT_DB_read(db_bio, DB_NUMBER);
711 BIO_free(db_bio);
712 if (!rdb)
713 {
714 BIO_printf(bio_err, "Error reading index file %s\n", ridx_filename);
715 goto end;
716 }
717 if (!make_serial_index(rdb))
718 goto end;
693 } 719 }
694 720
695 if (rdb) 721 if (rdb)
@@ -873,7 +899,7 @@ end:
873 X509_free(cert); 899 X509_free(cert);
874 X509_free(rsigner); 900 X509_free(rsigner);
875 X509_free(rca_cert); 901 X509_free(rca_cert);
876 free_index(rdb); 902 TXT_DB_free(rdb);
877 BIO_free_all(cbio); 903 BIO_free_all(cbio);
878 BIO_free_all(acbio); 904 BIO_free_all(acbio);
879 BIO_free(out); 905 BIO_free(out);
@@ -1015,7 +1041,7 @@ static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
1015 } 1041 }
1016 1042
1017 1043
1018static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, CA_DB *db, 1044static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, TXT_DB *db,
1019 X509 *ca, X509 *rcert, EVP_PKEY *rkey, 1045 X509 *ca, X509 *rcert, EVP_PKEY *rkey,
1020 STACK_OF(X509) *rother, unsigned long flags, 1046 STACK_OF(X509) *rother, unsigned long flags,
1021 int nmin, int ndays) 1047 int nmin, int ndays)
@@ -1107,7 +1133,7 @@ static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, CA_DB *db
1107 1133
1108 } 1134 }
1109 1135
1110static char **lookup_serial(CA_DB *db, ASN1_INTEGER *ser) 1136static char **lookup_serial(TXT_DB *db, ASN1_INTEGER *ser)
1111 { 1137 {
1112 int i; 1138 int i;
1113 BIGNUM *bn = NULL; 1139 BIGNUM *bn = NULL;
@@ -1120,7 +1146,7 @@ static char **lookup_serial(CA_DB *db, ASN1_INTEGER *ser)
1120 itmp = BN_bn2hex(bn); 1146 itmp = BN_bn2hex(bn);
1121 row[DB_serial] = itmp; 1147 row[DB_serial] = itmp;
1122 BN_free(bn); 1148 BN_free(bn);
1123 rrow=TXT_DB_get_by_index(db->db,DB_serial,row); 1149 rrow=TXT_DB_get_by_index(db,DB_serial,row);
1124 OPENSSL_free(itmp); 1150 OPENSSL_free(itmp);
1125 return rrow; 1151 return rrow;
1126 } 1152 }
diff --git a/src/lib/libssl/src/apps/openssl.cnf b/src/lib/libssl/src/apps/openssl.cnf
index 854d1f164e..eca51c3322 100644
--- a/src/lib/libssl/src/apps/openssl.cnf
+++ b/src/lib/libssl/src/apps/openssl.cnf
@@ -38,14 +38,10 @@ dir = ./demoCA # Where everything is kept
38certs = $dir/certs # Where the issued certs are kept 38certs = $dir/certs # Where the issued certs are kept
39crl_dir = $dir/crl # Where the issued crl are kept 39crl_dir = $dir/crl # Where the issued crl are kept
40database = $dir/index.txt # database index file. 40database = $dir/index.txt # database index file.
41#unique_subject = no # Set to 'no' to allow creation of
42 # several ctificates with same subject.
43new_certs_dir = $dir/newcerts # default place for new certs. 41new_certs_dir = $dir/newcerts # default place for new certs.
44 42
45certificate = $dir/cacert.pem # The CA certificate 43certificate = $dir/cacert.pem # The CA certificate
46serial = $dir/serial # The current serial number 44serial = $dir/serial # The current serial number
47#crlnumber = $dir/crlnumber # the current crl number
48 # must be commented out to leave a V1 CRL
49crl = $dir/crl.pem # The current CRL 45crl = $dir/crl.pem # The current CRL
50private_key = $dir/private/cakey.pem# The private key 46private_key = $dir/private/cakey.pem# The private key
51RANDFILE = $dir/private/.rand # private random number file 47RANDFILE = $dir/private/.rand # private random number file
@@ -62,7 +58,6 @@ cert_opt = ca_default # Certificate field options
62 58
63# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs 59# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
64# so this is commented out by default to leave a V1 CRL. 60# so this is commented out by default to leave a V1 CRL.
65# crlnumber must also be commented out to leave a V1 CRL.
66# crl_extensions = crl_ext 61# crl_extensions = crl_ext
67 62
68default_days = 365 # how long to certify for 63default_days = 365 # how long to certify for
diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c
index 71192bdf74..bb446d6b65 100644
--- a/src/lib/libssl/src/apps/pkcs12.c
+++ b/src/lib/libssl/src/apps/pkcs12.c
@@ -557,7 +557,7 @@ int MAIN(int argc, char **argv)
557 BIO_printf (bio_err, "Can't read Password\n"); 557 BIO_printf (bio_err, "Can't read Password\n");
558 goto export_end; 558 goto export_end;
559 } 559 }
560 if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass); 560 if (!twopass) strlcpy(macpass, pass, sizeof macpass);
561 /* Turn certbags into encrypted authsafe */ 561 /* Turn certbags into encrypted authsafe */
562 authsafe = PKCS12_pack_p7encdata(cert_pbe, cpass, -1, NULL, 0, 562 authsafe = PKCS12_pack_p7encdata(cert_pbe, cpass, -1, NULL, 0,
563 iter, bags); 563 iter, bags);
@@ -658,7 +658,7 @@ int MAIN(int argc, char **argv)
658 CRYPTO_pop_info(); 658 CRYPTO_pop_info();
659#endif 659#endif
660 660
661 if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass); 661 if (!twopass) strlcpy(macpass, pass, sizeof macpass);
662 662
663 if (options & INFO) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1); 663 if (options & INFO) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1);
664 if(macver) { 664 if(macver) {
diff --git a/src/lib/libssl/src/apps/pkcs7.c b/src/lib/libssl/src/apps/pkcs7.c
index da4dbe7a07..6c58c67eb2 100644
--- a/src/lib/libssl/src/apps/pkcs7.c
+++ b/src/lib/libssl/src/apps/pkcs7.c
@@ -102,9 +102,6 @@ int MAIN(int argc, char **argv)
102 if ((bio_err=BIO_new(BIO_s_file())) != NULL) 102 if ((bio_err=BIO_new(BIO_s_file())) != NULL)
103 BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); 103 BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
104 104
105 if (!load_config(bio_err, NULL))
106 goto end;
107
108 infile=NULL; 105 infile=NULL;
109 outfile=NULL; 106 outfile=NULL;
110 informat=FORMAT_PEM; 107 informat=FORMAT_PEM;
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c
index 1a3d1d0dfa..c6464e9401 100644
--- a/src/lib/libssl/src/apps/req.c
+++ b/src/lib/libssl/src/apps/req.c
@@ -824,7 +824,7 @@ loop:
824 if ((x509ss=X509_new()) == NULL) goto end; 824 if ((x509ss=X509_new()) == NULL) goto end;
825 825
826 /* Set version to V3 */ 826 /* Set version to V3 */
827 if(extensions && !X509_set_version(x509ss, 2)) goto end; 827 if(!X509_set_version(x509ss, 2)) goto end;
828 if (serial) 828 if (serial)
829 { 829 {
830 if (!X509_set_serialNumber(x509ss, serial)) goto end; 830 if (!X509_set_serialNumber(x509ss, serial)) goto end;
@@ -1223,7 +1223,7 @@ start: for (;;)
1223 } 1223 }
1224 /* If OBJ not recognised ignore it */ 1224 /* If OBJ not recognised ignore it */
1225 if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start; 1225 if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
1226 if (BIO_snprintf(buf,sizeof buf,"%s_default",v->name) 1226 if (snprintf(buf,sizeof buf,"%s_default",v->name)
1227 >= sizeof buf) 1227 >= sizeof buf)
1228 { 1228 {
1229 BIO_printf(bio_err,"Name '%s' too long\n",v->name); 1229 BIO_printf(bio_err,"Name '%s' too long\n",v->name);
@@ -1236,21 +1236,21 @@ start: for (;;)
1236 def=""; 1236 def="";
1237 } 1237 }
1238 1238
1239 BIO_snprintf(buf,sizeof buf,"%s_value",v->name); 1239 snprintf(buf,sizeof buf,"%s_value",v->name);
1240 if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL) 1240 if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
1241 { 1241 {
1242 ERR_clear_error(); 1242 ERR_clear_error();
1243 value=NULL; 1243 value=NULL;
1244 } 1244 }
1245 1245
1246 BIO_snprintf(buf,sizeof buf,"%s_min",v->name); 1246 snprintf(buf,sizeof buf,"%s_min",v->name);
1247 if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min)) 1247 if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min))
1248 { 1248 {
1249 ERR_clear_error(); 1249 ERR_clear_error();
1250 n_min = -1; 1250 n_min = -1;
1251 } 1251 }
1252 1252
1253 BIO_snprintf(buf,sizeof buf,"%s_max",v->name); 1253 snprintf(buf,sizeof buf,"%s_max",v->name);
1254 if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max)) 1254 if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max))
1255 { 1255 {
1256 ERR_clear_error(); 1256 ERR_clear_error();
@@ -1288,7 +1288,7 @@ start2: for (;;)
1288 if ((nid=OBJ_txt2nid(type)) == NID_undef) 1288 if ((nid=OBJ_txt2nid(type)) == NID_undef)
1289 goto start2; 1289 goto start2;
1290 1290
1291 if (BIO_snprintf(buf,sizeof buf,"%s_default",type) 1291 if (snprintf(buf,sizeof buf,"%s_default",type)
1292 >= sizeof buf) 1292 >= sizeof buf)
1293 { 1293 {
1294 BIO_printf(bio_err,"Name '%s' too long\n",v->name); 1294 BIO_printf(bio_err,"Name '%s' too long\n",v->name);
@@ -1303,7 +1303,7 @@ start2: for (;;)
1303 } 1303 }
1304 1304
1305 1305
1306 BIO_snprintf(buf,sizeof buf,"%s_value",type); 1306 snprintf(buf,sizeof buf,"%s_value",type);
1307 if ((value=NCONF_get_string(req_conf,attr_sect,buf)) 1307 if ((value=NCONF_get_string(req_conf,attr_sect,buf))
1308 == NULL) 1308 == NULL)
1309 { 1309 {
@@ -1311,11 +1311,11 @@ start2: for (;;)
1311 value=NULL; 1311 value=NULL;
1312 } 1312 }
1313 1313
1314 BIO_snprintf(buf,sizeof buf,"%s_min",type); 1314 snprintf(buf,sizeof buf,"%s_min",type);
1315 if (!NCONF_get_number(req_conf,attr_sect,buf, &n_min)) 1315 if (!NCONF_get_number(req_conf,attr_sect,buf, &n_min))
1316 n_min = -1; 1316 n_min = -1;
1317 1317
1318 BIO_snprintf(buf,sizeof buf,"%s_max",type); 1318 snprintf(buf,sizeof buf,"%s_max",type);
1319 if (!NCONF_get_number(req_conf,attr_sect,buf, &n_max)) 1319 if (!NCONF_get_number(req_conf,attr_sect,buf, &n_max))
1320 n_max = -1; 1320 n_max = -1;
1321 1321
@@ -1397,8 +1397,8 @@ start:
1397 (void)BIO_flush(bio_err); 1397 (void)BIO_flush(bio_err);
1398 if(value != NULL) 1398 if(value != NULL)
1399 { 1399 {
1400 BUF_strlcpy(buf,value,sizeof buf); 1400 strlcpy(buf,value,sizeof buf);
1401 BUF_strlcat(buf,"\n",sizeof buf); 1401 strlcat(buf,"\n",sizeof buf);
1402 BIO_printf(bio_err,"%s\n",value); 1402 BIO_printf(bio_err,"%s\n",value);
1403 } 1403 }
1404 else 1404 else
@@ -1420,8 +1420,8 @@ start:
1420 { 1420 {
1421 if ((def == NULL) || (def[0] == '\0')) 1421 if ((def == NULL) || (def[0] == '\0'))
1422 return(1); 1422 return(1);
1423 BUF_strlcpy(buf,def,sizeof buf); 1423 strlcpy(buf,def,sizeof buf);
1424 BUF_strlcat(buf,"\n",sizeof buf); 1424 strlcat(buf,"\n",sizeof buf);
1425 } 1425 }
1426 else if ((buf[0] == '.') && (buf[1] == '\n')) return(1); 1426 else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
1427 1427
@@ -1455,8 +1455,8 @@ start:
1455 (void)BIO_flush(bio_err); 1455 (void)BIO_flush(bio_err);
1456 if (value != NULL) 1456 if (value != NULL)
1457 { 1457 {
1458 BUF_strlcpy(buf,value,sizeof buf); 1458 strlcpy(buf,value,sizeof buf);
1459 BUF_strlcat(buf,"\n",sizeof buf); 1459 strlcat(buf,"\n",sizeof buf);
1460 BIO_printf(bio_err,"%s\n",value); 1460 BIO_printf(bio_err,"%s\n",value);
1461 } 1461 }
1462 else 1462 else
@@ -1478,8 +1478,8 @@ start:
1478 { 1478 {
1479 if ((def == NULL) || (def[0] == '\0')) 1479 if ((def == NULL) || (def[0] == '\0'))
1480 return(1); 1480 return(1);
1481 BUF_strlcpy(buf,def,sizeof buf); 1481 strlcpy(buf,def,sizeof buf);
1482 BUF_strlcat(buf,"\n",sizeof buf); 1482 strlcat(buf,"\n",sizeof buf);
1483 } 1483 }
1484 else if ((buf[0] == '.') && (buf[1] == '\n')) return(1); 1484 else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
1485 1485
diff --git a/src/lib/libssl/src/apps/rsautl.c b/src/lib/libssl/src/apps/rsautl.c
index 5db6fe7cd7..5a6fd115f4 100644
--- a/src/lib/libssl/src/apps/rsautl.c
+++ b/src/lib/libssl/src/apps/rsautl.c
@@ -97,7 +97,6 @@ int MAIN(int argc, char **argv)
97 EVP_PKEY *pkey = NULL; 97 EVP_PKEY *pkey = NULL;
98 RSA *rsa = NULL; 98 RSA *rsa = NULL;
99 unsigned char *rsa_in = NULL, *rsa_out = NULL, pad; 99 unsigned char *rsa_in = NULL, *rsa_out = NULL, pad;
100 char *passargin = NULL, *passin = NULL;
101 int rsa_inlen, rsa_outlen = 0; 100 int rsa_inlen, rsa_outlen = 0;
102 int keysize; 101 int keysize;
103 102
@@ -125,9 +124,6 @@ int MAIN(int argc, char **argv)
125 } else if(!strcmp(*argv, "-inkey")) { 124 } else if(!strcmp(*argv, "-inkey")) {
126 if (--argc < 1) badarg = 1; 125 if (--argc < 1) badarg = 1;
127 keyfile = *(++argv); 126 keyfile = *(++argv);
128 } else if (!strcmp(*argv,"-passin")) {
129 if (--argc < 1) badarg = 1;
130 passargin= *(++argv);
131 } else if (strcmp(*argv,"-keyform") == 0) { 127 } else if (strcmp(*argv,"-keyform") == 0) {
132 if (--argc < 1) badarg = 1; 128 if (--argc < 1) badarg = 1;
133 keyform=str2fmt(*(++argv)); 129 keyform=str2fmt(*(++argv));
@@ -173,10 +169,6 @@ int MAIN(int argc, char **argv)
173#ifndef OPENSSL_NO_ENGINE 169#ifndef OPENSSL_NO_ENGINE
174 e = setup_engine(bio_err, engine, 0); 170 e = setup_engine(bio_err, engine, 0);
175#endif 171#endif
176 if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
177 BIO_printf(bio_err, "Error getting password\n");
178 goto end;
179 }
180 172
181/* FIXME: seed PRNG only if needed */ 173/* FIXME: seed PRNG only if needed */
182 app_RAND_load_file(NULL, bio_err, 0); 174 app_RAND_load_file(NULL, bio_err, 0);
@@ -184,7 +176,7 @@ int MAIN(int argc, char **argv)
184 switch(key_type) { 176 switch(key_type) {
185 case KEY_PRIVKEY: 177 case KEY_PRIVKEY:
186 pkey = load_key(bio_err, keyfile, keyform, 0, 178 pkey = load_key(bio_err, keyfile, keyform, 0,
187 passin, e, "Private Key"); 179 NULL, e, "Private Key");
188 break; 180 break;
189 181
190 case KEY_PUBKEY: 182 case KEY_PUBKEY:
@@ -298,7 +290,6 @@ int MAIN(int argc, char **argv)
298 BIO_free_all(out); 290 BIO_free_all(out);
299 if(rsa_in) OPENSSL_free(rsa_in); 291 if(rsa_in) OPENSSL_free(rsa_in);
300 if(rsa_out) OPENSSL_free(rsa_out); 292 if(rsa_out) OPENSSL_free(rsa_out);
301 if(passin) OPENSSL_free(passin);
302 return ret; 293 return ret;
303} 294}
304 295
@@ -322,7 +313,6 @@ static void usage()
322 BIO_printf(bio_err, "-hexdump hex dump output\n"); 313 BIO_printf(bio_err, "-hexdump hex dump output\n");
323#ifndef OPENSSL_NO_ENGINE 314#ifndef OPENSSL_NO_ENGINE
324 BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n"); 315 BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n");
325 BIO_printf (bio_err, "-passin arg pass phrase source\n");
326#endif 316#endif
327 317
328} 318}
diff --git a/src/lib/libssl/src/apps/s_apps.h b/src/lib/libssl/src/apps/s_apps.h
index 66b6edd442..48e7dbaddc 100644
--- a/src/lib/libssl/src/apps/s_apps.h
+++ b/src/lib/libssl/src/apps/s_apps.h
@@ -154,10 +154,10 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx);
154#ifdef HEADER_SSL_H 154#ifdef HEADER_SSL_H
155int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file); 155int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file);
156#endif 156#endif
157int init_client(int *sock, char *server, int port); 157int init_client(int *sock, char *server, char *port, int af);
158int should_retry(int i); 158int should_retry(int i);
159int extract_port(char *str, short *port_ptr); 159int extract_port(char *str, short *port_ptr);
160int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p); 160int extract_host_port(char *str,char **host_ptr,unsigned char *ip,char **p);
161 161
162long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp, 162long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp,
163 int argi, long argl, long ret); 163 int argi, long argl, long ret);
diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c
index eb6fd7c1c3..ae7c9f9ede 100644
--- a/src/lib/libssl/src/apps/s_client.c
+++ b/src/lib/libssl/src/apps/s_client.c
@@ -109,6 +109,8 @@
109 * 109 *
110 */ 110 */
111 111
112#include <sys/types.h>
113#include <netinet/in.h>
112#include <assert.h> 114#include <assert.h>
113#include <stdio.h> 115#include <stdio.h>
114#include <stdlib.h> 116#include <stdlib.h>
@@ -183,6 +185,8 @@ static void sc_usage(void)
183 { 185 {
184 BIO_printf(bio_err,"usage: s_client args\n"); 186 BIO_printf(bio_err,"usage: s_client args\n");
185 BIO_printf(bio_err,"\n"); 187 BIO_printf(bio_err,"\n");
188 BIO_printf(bio_err," -4 - Force IPv4\n");
189 BIO_printf(bio_err," -6 - Force IPv6\n");
186 BIO_printf(bio_err," -host host - use -connect instead\n"); 190 BIO_printf(bio_err," -host host - use -connect instead\n");
187 BIO_printf(bio_err," -port port - use -connect instead\n"); 191 BIO_printf(bio_err," -port port - use -connect instead\n");
188 BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR); 192 BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR);
@@ -232,12 +236,12 @@ int MAIN(int argc, char **argv)
232 int off=0; 236 int off=0;
233 SSL *con=NULL,*con2=NULL; 237 SSL *con=NULL,*con2=NULL;
234 X509_STORE *store = NULL; 238 X509_STORE *store = NULL;
235 int s,k,width,state=0; 239 int s,k,width,state=0, af=AF_UNSPEC;
236 char *cbuf=NULL,*sbuf=NULL,*mbuf=NULL; 240 char *cbuf=NULL,*sbuf=NULL,*mbuf=NULL;
237 int cbuf_len,cbuf_off; 241 int cbuf_len,cbuf_off;
238 int sbuf_len,sbuf_off; 242 int sbuf_len,sbuf_off;
239 fd_set readfds,writefds; 243 fd_set readfds,writefds;
240 short port=PORT; 244 char *port=PORT_STR;
241 int full_log=1; 245 int full_log=1;
242 char *host=SSL_HOST_NAME; 246 char *host=SSL_HOST_NAME;
243 char *cert_file=NULL,*key_file=NULL; 247 char *cert_file=NULL,*key_file=NULL;
@@ -308,8 +312,8 @@ int MAIN(int argc, char **argv)
308 else if (strcmp(*argv,"-port") == 0) 312 else if (strcmp(*argv,"-port") == 0)
309 { 313 {
310 if (--argc < 1) goto bad; 314 if (--argc < 1) goto bad;
311 port=atoi(*(++argv)); 315 port= *(++argv);
312 if (port == 0) goto bad; 316 if (port == NULL || *port == '\0') goto bad;
313 } 317 }
314 else if (strcmp(*argv,"-connect") == 0) 318 else if (strcmp(*argv,"-connect") == 0)
315 { 319 {
@@ -429,6 +433,8 @@ int MAIN(int argc, char **argv)
429 if (--argc < 1) goto bad; 433 if (--argc < 1) goto bad;
430 inrand= *(++argv); 434 inrand= *(++argv);
431 } 435 }
436 else if (strcmp(*argv,"-4") == 0) { af = AF_INET;}
437 else if (strcmp(*argv,"-6") == 0) { af = AF_INET6;}
432 else 438 else
433 { 439 {
434 BIO_printf(bio_err,"unknown option %s\n",*argv); 440 BIO_printf(bio_err,"unknown option %s\n",*argv);
@@ -524,7 +530,7 @@ bad:
524 530
525re_start: 531re_start:
526 532
527 if (init_client(&s,host,port) == 0) 533 if (init_client(&s,host,port,af) == 0)
528 { 534 {
529 BIO_printf(bio_err,"connect:errno=%d\n",get_last_socket_error()); 535 BIO_printf(bio_err,"connect:errno=%d\n",get_last_socket_error());
530 SHUTDOWN(s); 536 SHUTDOWN(s);
@@ -789,7 +795,7 @@ re_start:
789 /* goto end; */ 795 /* goto end; */
790 } 796 }
791 797
792 sbuf_len-=i;; 798 sbuf_len-=i;
793 sbuf_off+=i; 799 sbuf_off+=i;
794 if (sbuf_len <= 0) 800 if (sbuf_len <= 0)
795 { 801 {
diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c
index 1867890966..3b36d2dff8 100644
--- a/src/lib/libssl/src/apps/s_socket.c
+++ b/src/lib/libssl/src/apps/s_socket.c
@@ -86,11 +86,9 @@ static struct hostent *GetHostByName(char *name);
86static void ssl_sock_cleanup(void); 86static void ssl_sock_cleanup(void);
87#endif 87#endif
88static int ssl_sock_init(void); 88static int ssl_sock_init(void);
89static int init_client_ip(int *sock,unsigned char ip[4], int port);
90static int init_server(int *sock, int port); 89static int init_server(int *sock, int port);
91static int init_server_long(int *sock, int port,char *ip); 90static int init_server_long(int *sock, int port,char *ip);
92static int do_accept(int acc_sock, int *sock, char **host); 91static int do_accept(int acc_sock, int *sock, char **host);
93static int host_ip(char *str, unsigned char ip[4]);
94 92
95#ifdef OPENSSL_SYS_WIN16 93#ifdef OPENSSL_SYS_WIN16
96#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ 94#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
@@ -185,50 +183,41 @@ static int ssl_sock_init(void)
185 return(1); 183 return(1);
186 } 184 }
187 185
188int init_client(int *sock, char *host, int port) 186int init_client(int *sock, char *host, char *port, int af)
189 { 187 {
190 unsigned char ip[4]; 188 struct addrinfo hints, *ai_top, *ai;
191 short p=0; 189 int i, s;
192 190
193 if (!host_ip(host,&(ip[0]))) 191 memset(&hints, '\0', sizeof(hints));
192 hints.ai_family = af;
193 hints.ai_socktype = SOCK_STREAM;
194
195 if ((i = getaddrinfo(host, port, &hints, &ai_top)) != 0 ||
196 ai_top == NULL || ai_top->ai_addr == NULL)
194 { 197 {
195 return(0); 198 BIO_printf(bio_err,"getaddrinfo: %s\n", gai_strerror(i));
199 return (0);
196 } 200 }
197 if (p != 0) port=p;
198 return(init_client_ip(sock,ip,port));
199 }
200
201static int init_client_ip(int *sock, unsigned char ip[4], int port)
202 {
203 unsigned long addr;
204 struct sockaddr_in them;
205 int s,i;
206
207 if (!ssl_sock_init()) return(0);
208
209 memset((char *)&them,0,sizeof(them));
210 them.sin_family=AF_INET;
211 them.sin_port=htons((unsigned short)port);
212 addr=(unsigned long)
213 ((unsigned long)ip[0]<<24L)|
214 ((unsigned long)ip[1]<<16L)|
215 ((unsigned long)ip[2]<< 8L)|
216 ((unsigned long)ip[3]);
217 them.sin_addr.s_addr=htonl(addr);
218
219 s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
220 if (s == INVALID_SOCKET) { perror("socket"); return(0); }
221 201
202 for (ai = ai_top; ai != NULL; ai = ai->ai_next)
203 {
204 s=socket(ai->ai_addr->sa_family, SOCK_STREAM, SOCKET_PROTOCOL);
205 if (s == INVALID_SOCKET) { continue; }
222#ifndef OPENSSL_SYS_MPE 206#ifndef OPENSSL_SYS_MPE
223 i=0; 207 i=0;
224 i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); 208 i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
225 if (i < 0) { perror("keepalive"); return(0); } 209 if (i == -1) { close(s); continue; }
226#endif 210#endif
211 if ((i = connect(s, ai->ai_addr, ai->ai_addr->sa_len)) == 0)
212 { *sock=s; freeaddrinfo(ai_top); return (1);}
227 213
228 if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1) 214 close(s);
229 { close(s); perror("connect"); return(0); } 215 }
230 *sock=s; 216
231 return(1); 217 perror("connect");
218 close(s);
219 freeaddrinfo(ai_top);
220 return(0);
232 } 221 }
233 222
234int do_server(int port, int *ret, int (*cb)(), char *context) 223int do_server(int port, int *ret, int (*cb)(), char *context)
@@ -389,7 +378,7 @@ redoit:
389 perror("OPENSSL_malloc"); 378 perror("OPENSSL_malloc");
390 return(0); 379 return(0);
391 } 380 }
392 BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1); 381 strlcpy(*host,h1->h_name,strlen(h1->h_name)+1);
393 382
394 h2=GetHostByName(*host); 383 h2=GetHostByName(*host);
395 if (h2 == NULL) 384 if (h2 == NULL)
@@ -410,12 +399,13 @@ end:
410 } 399 }
411 400
412int extract_host_port(char *str, char **host_ptr, unsigned char *ip, 401int extract_host_port(char *str, char **host_ptr, unsigned char *ip,
413 short *port_ptr) 402 char **port_ptr)
414 { 403 {
415 char *h,*p; 404 char *h,*p;
416 405
417 h=str; 406 h=str;
418 p=strchr(str,':'); 407 p=strrchr(str,'/'); /* IPv6 host/port */
408 if (p == NULL) { p=strrchr(str,':'); }
419 if (p == NULL) 409 if (p == NULL)
420 { 410 {
421 BIO_printf(bio_err,"no port defined\n"); 411 BIO_printf(bio_err,"no port defined\n");
@@ -423,58 +413,11 @@ int extract_host_port(char *str, char **host_ptr, unsigned char *ip,
423 } 413 }
424 *(p++)='\0'; 414 *(p++)='\0';
425 415
426 if ((ip != NULL) && !host_ip(str,ip))
427 goto err;
428 if (host_ptr != NULL) *host_ptr=h; 416 if (host_ptr != NULL) *host_ptr=h;
429 417
430 if (!extract_port(p,port_ptr)) 418 if (port_ptr != NULL && p != NULL && *p != '\0')
431 goto err; 419 *port_ptr = p;
432 return(1);
433err:
434 return(0);
435 }
436 420
437static int host_ip(char *str, unsigned char ip[4])
438 {
439 unsigned int in[4];
440 int i;
441
442 if (sscanf(str,"%u.%u.%u.%u",&(in[0]),&(in[1]),&(in[2]),&(in[3])) == 4)
443 {
444 for (i=0; i<4; i++)
445 if (in[i] > 255)
446 {
447 BIO_printf(bio_err,"invalid IP address\n");
448 goto err;
449 }
450 ip[0]=in[0];
451 ip[1]=in[1];
452 ip[2]=in[2];
453 ip[3]=in[3];
454 }
455 else
456 { /* do a gethostbyname */
457 struct hostent *he;
458
459 if (!ssl_sock_init()) return(0);
460
461 he=GetHostByName(str);
462 if (he == NULL)
463 {
464 BIO_printf(bio_err,"gethostbyname failure\n");
465 goto err;
466 }
467 /* cast to short because of win16 winsock definition */
468 if ((short)he->h_addrtype != AF_INET)
469 {
470 BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n");
471 return(0);
472 }
473 ip[0]=he->h_addr_list[0][0];
474 ip[1]=he->h_addr_list[0][1];
475 ip[2]=he->h_addr_list[0][2];
476 ip[3]=he->h_addr_list[0][3];
477 }
478 return(1); 421 return(1);
479err: 422err:
480 return(0); 423 return(0);
diff --git a/src/lib/libssl/src/apps/s_time.c b/src/lib/libssl/src/apps/s_time.c
index 7d47057465..8a699de0ea 100644
--- a/src/lib/libssl/src/apps/s_time.c
+++ b/src/lib/libssl/src/apps/s_time.c
@@ -502,7 +502,7 @@ int MAIN(int argc, char **argv)
502 502
503 if (s_www_path != NULL) 503 if (s_www_path != NULL)
504 { 504 {
505 BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); 505 snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
506 SSL_write(scon,buf,strlen(buf)); 506 SSL_write(scon,buf,strlen(buf));
507 while ((i=SSL_read(scon,buf,sizeof(buf))) > 0) 507 while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
508 bytes_read+=i; 508 bytes_read+=i;
@@ -557,7 +557,7 @@ next:
557 557
558 if (s_www_path != NULL) 558 if (s_www_path != NULL)
559 { 559 {
560 BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); 560 snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
561 SSL_write(scon,buf,strlen(buf)); 561 SSL_write(scon,buf,strlen(buf));
562 while (SSL_read(scon,buf,sizeof(buf)) > 0) 562 while (SSL_read(scon,buf,sizeof(buf)) > 0)
563 ; 563 ;
@@ -595,7 +595,7 @@ next:
595 595
596 if (s_www_path) 596 if (s_www_path)
597 { 597 {
598 BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); 598 snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
599 SSL_write(scon,buf,strlen(buf)); 599 SSL_write(scon,buf,strlen(buf));
600 while ((i=SSL_read(scon,buf,sizeof(buf))) > 0) 600 while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
601 bytes_read+=i; 601 bytes_read+=i;
diff --git a/src/lib/libssl/src/apps/speed.c b/src/lib/libssl/src/apps/speed.c
index 2412200009..ec55b4188c 100644
--- a/src/lib/libssl/src/apps/speed.c
+++ b/src/lib/libssl/src/apps/speed.c
@@ -773,7 +773,6 @@ int MAIN(int argc, char **argv)
773 { 773 {
774 dsa_doit[R_DSA_512]=1; 774 dsa_doit[R_DSA_512]=1;
775 dsa_doit[R_DSA_1024]=1; 775 dsa_doit[R_DSA_1024]=1;
776 dsa_doit[R_DSA_2048]=1;
777 } 776 }
778 else 777 else
779#endif 778#endif
@@ -1007,9 +1006,6 @@ int MAIN(int argc, char **argv)
1007 c[D_CBC_RC5][0]=count; 1006 c[D_CBC_RC5][0]=count;
1008 c[D_CBC_BF][0]=count; 1007 c[D_CBC_BF][0]=count;
1009 c[D_CBC_CAST][0]=count; 1008 c[D_CBC_CAST][0]=count;
1010 c[D_CBC_128_AES][0]=count;
1011 c[D_CBC_192_AES][0]=count;
1012 c[D_CBC_256_AES][0]=count;
1013 1009
1014 for (i=1; i<SIZE_NUM; i++) 1010 for (i=1; i<SIZE_NUM; i++)
1015 { 1011 {
@@ -1035,9 +1031,6 @@ int MAIN(int argc, char **argv)
1035 c[D_CBC_RC5][i]=c[D_CBC_RC5][i-1]*l0/l1; 1031 c[D_CBC_RC5][i]=c[D_CBC_RC5][i-1]*l0/l1;
1036 c[D_CBC_BF][i]=c[D_CBC_BF][i-1]*l0/l1; 1032 c[D_CBC_BF][i]=c[D_CBC_BF][i-1]*l0/l1;
1037 c[D_CBC_CAST][i]=c[D_CBC_CAST][i-1]*l0/l1; 1033 c[D_CBC_CAST][i]=c[D_CBC_CAST][i-1]*l0/l1;
1038 c[D_CBC_128_AES][i]=c[D_CBC_128_AES][i-1]*l0/l1;
1039 c[D_CBC_192_AES][i]=c[D_CBC_192_AES][i-1]*l0/l1;
1040 c[D_CBC_256_AES][i]=c[D_CBC_256_AES][i-1]*l0/l1;
1041 } 1034 }
1042#ifndef OPENSSL_NO_RSA 1035#ifndef OPENSSL_NO_RSA
1043 rsa_c[R_RSA_512][0]=count/2000; 1036 rsa_c[R_RSA_512][0]=count/2000;
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c
index 9b95f7bd3f..64e233e444 100644
--- a/src/lib/libssl/src/apps/x509.c
+++ b/src/lib/libssl/src/apps/x509.c
@@ -1022,10 +1022,12 @@ end:
1022 OPENSSL_EXIT(ret); 1022 OPENSSL_EXIT(ret);
1023 } 1023 }
1024 1024
1025static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create) 1025static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
1026 { 1026 {
1027 char *buf = NULL, *p; 1027 char *buf = NULL, *p;
1028 ASN1_INTEGER *bs = NULL; 1028 MS_STATIC char buf2[1024];
1029 ASN1_INTEGER *bs = NULL, *bs2 = NULL;
1030 BIO *io = NULL;
1029 BIGNUM *serial = NULL; 1031 BIGNUM *serial = NULL;
1030 size_t len; 1032 size_t len;
1031 1033
@@ -1036,17 +1038,17 @@ static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create
1036 if (buf == NULL) { BIO_printf(bio_err,"out of mem\n"); goto end; } 1038 if (buf == NULL) { BIO_printf(bio_err,"out of mem\n"); goto end; }
1037 if (serialfile == NULL) 1039 if (serialfile == NULL)
1038 { 1040 {
1039 BUF_strlcpy(buf,CAfile,len); 1041 strlcpy(buf,CAfile,len);
1040 for (p=buf; *p; p++) 1042 for (p=buf; *p; p++)
1041 if (*p == '.') 1043 if (*p == '.')
1042 { 1044 {
1043 *p='\0'; 1045 *p='\0';
1044 break; 1046 break;
1045 } 1047 }
1046 BUF_strlcat(buf,POSTFIX,len); 1048 strlcat(buf,POSTFIX,len);
1047 } 1049 }
1048 else 1050 else
1049 BUF_strlcpy(buf,serialfile,len); 1051 strlcpy(buf,serialfile,len);
1050 serial=BN_new(); 1052 serial=BN_new();
1051 bs=ASN1_INTEGER_new(); 1053 bs=ASN1_INTEGER_new();
1052 if ((serial == NULL) || (bs == NULL)) 1054 if ((serial == NULL) || (bs == NULL))
@@ -1055,18 +1057,72 @@ static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create
1055 goto end; 1057 goto end;
1056 } 1058 }
1057 1059
1058 serial = load_serial(buf, create, NULL); 1060 io=BIO_new(BIO_s_file());
1059 if (serial == NULL) goto end; 1061 if (io == NULL)
1062 {
1063 ERR_print_errors(bio_err);
1064 goto end;
1065 }
1066
1067 if (BIO_read_filename(io,buf) <= 0)
1068 {
1069 if (!create)
1070 {
1071 perror(buf);
1072 goto end;
1073 }
1074 else
1075 {
1076 ASN1_INTEGER_set(bs,1);
1077 BN_one(serial);
1078 }
1079 }
1080 else
1081 {
1082 if (!a2i_ASN1_INTEGER(io,bs,buf2,sizeof buf2))
1083 {
1084 BIO_printf(bio_err,"unable to load serial number from %s\n",buf);
1085 ERR_print_errors(bio_err);
1086 goto end;
1087 }
1088 else
1089 {
1090 serial=BN_bin2bn(bs->data,bs->length,serial);
1091 if (serial == NULL)
1092 {
1093 BIO_printf(bio_err,"error converting bin 2 bn");
1094 goto end;
1095 }
1096 }
1097 }
1060 1098
1061 if (!BN_add_word(serial,1)) 1099 if (!BN_add_word(serial,1))
1062 { BIO_printf(bio_err,"add_word failure\n"); goto end; } 1100 { BIO_printf(bio_err,"add_word failure\n"); goto end; }
1101 if (!(bs2 = BN_to_ASN1_INTEGER(serial, NULL)))
1102 { BIO_printf(bio_err,"error converting bn 2 asn1_integer\n"); goto end; }
1103 if (BIO_write_filename(io,buf) <= 0)
1104 {
1105 BIO_printf(bio_err,"error attempting to write serial number file\n");
1106 perror(buf);
1107 goto end;
1108 }
1109 i2a_ASN1_INTEGER(io,bs2);
1110 BIO_puts(io,"\n");
1063 1111
1064 if (!save_serial(buf, NULL, serial, &bs)) goto end; 1112 BIO_free(io);
1065
1066 end:
1067 if (buf) OPENSSL_free(buf); 1113 if (buf) OPENSSL_free(buf);
1114 ASN1_INTEGER_free(bs2);
1068 BN_free(serial); 1115 BN_free(serial);
1116 io=NULL;
1069 return bs; 1117 return bs;
1118
1119 end:
1120 if (buf) OPENSSL_free(buf);
1121 BIO_free(io);
1122 ASN1_INTEGER_free(bs);
1123 BN_free(serial);
1124 return NULL;
1125
1070 } 1126 }
1071 1127
1072static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest, 1128static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
@@ -1088,7 +1144,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
1088 goto end; 1144 goto end;
1089 } 1145 }
1090 if (sno) bs = sno; 1146 if (sno) bs = sno;
1091 else if (!(bs = x509_load_serial(CAfile, serialfile, create))) 1147 else if (!(bs = load_serial(CAfile, serialfile, create)))
1092 goto end; 1148 goto end;
1093 1149
1094/* if (!X509_STORE_add_cert(ctx,x)) goto end;*/ 1150/* if (!X509_STORE_add_cert(ctx,x)) goto end;*/
diff --git a/src/lib/libssl/src/certs/ICE-CA.pem b/src/lib/libssl/src/certs/ICE-CA.pem
new file mode 100644
index 0000000000..75652366c2
--- /dev/null
+++ b/src/lib/libssl/src/certs/ICE-CA.pem
@@ -0,0 +1,59 @@
1Certificate:
2 Data:
3 Version: 3 (0x2)
4 Serial Number: 1 (0x1)
5 Signature Algorithm: md5WithRSAEncryption
6 Issuer: O=European ICE-TEL project, OU=V3-Certification Authority
7 Validity
8 Not Before: Apr 2 17:35:53 1997 GMT
9 Not After : Apr 2 17:35:53 1998 GMT
10 Subject: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt
11 Subject Public Key Info:
12 Public Key Algorithm: rsa
13 RSA Public Key: (512 bit)
14 Modulus (512 bit):
15 00:82:75:ba:f6:d1:60:b5:f9:15:b3:6a:dd:29:8f:
16 8b:a4:6f:1a:88:e0:50:43:40:0b:79:41:d5:d3:16:
17 44:7d:74:65:17:42:06:52:0b:e9:50:c8:10:cd:24:
18 e2:ae:8d:22:30:73:e6:b4:b7:93:1f:e5:6e:a2:ae:
19 49:11:a5:c9:45
20 Exponent: 65537 (0x10001)
21 X509v3 extensions:
22 X509v3 Authority Key Identifier:
23 0.........z.."p......e..
24 X509v3 Subject Key Identifier:
25 ..~r..:..B.44fu......3
26 X509v3 Key Usage: critical
27 ....
28 X509v3 Certificate Policies: critical
29 0.0...*...
30 X509v3 Subject Alternative Name:
31 0!..secude-support@darmstadt.gmd.de
32 X509v3 Issuer Alternative Name:
33 0I..ice-tel-ca@darmstadt.gmd.de.*http://www.darmstadt.gmd.de/ice-tel/euroca
34 X509v3 Basic Constraints: critical
35 0....
36 X509v3 CRL Distribution Points:
37 0200...,.*http://www.darmstadt.gmd.de/ice-tel/euroca
38 Signature Algorithm: md5WithRSAEncryption
39 17:a2:88:b7:99:5a:05:41:e4:13:34:67:e6:1f:3e:26:ec:4b:
40 69:f9:3e:28:22:be:9d:1c:ab:41:6f:0c:00:85:fe:45:74:f6:
41 98:f0:ce:9b:65:53:4a:50:42:c7:d4:92:bd:d7:a2:a8:3d:98:
42 88:73:cd:60:28:79:a3:fc:48:7a
43-----BEGIN CERTIFICATE-----
44MIICzDCCAnagAwIBAgIBATANBgkqhkiG9w0BAQQFADBIMSEwHwYDVQQKExhFdXJv
45cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g
46QXV0aG9yaXR5MB4XDTk3MDQwMjE3MzU1M1oXDTk4MDQwMjE3MzU1M1owXDEhMB8G
47A1UEChMYRXVyb3BlYW4gSUNFLVRFTCBwcm9qZWN0MSMwIQYDVQQLExpWMy1DZXJ0
48aWZpY2F0aW9uIEF1dGhvcml0eTESMBAGA1UEBxMJRGFybXN0YWR0MFkwCgYEVQgB
49AQICAgADSwAwSAJBAIJ1uvbRYLX5FbNq3SmPi6RvGojgUENAC3lB1dMWRH10ZRdC
50BlIL6VDIEM0k4q6NIjBz5rS3kx/lbqKuSRGlyUUCAwEAAaOCATgwggE0MB8GA1Ud
51IwQYMBaAFIr3yNUOx3ro1yJw4AuJ1bbsZbzPMB0GA1UdDgQWBBR+cvL4OoacQog0
52NGZ1w9T80aIRMzAOBgNVHQ8BAf8EBAMCAfYwFAYDVR0gAQH/BAowCDAGBgQqAwQF
53MCoGA1UdEQQjMCGBH3NlY3VkZS1zdXBwb3J0QGRhcm1zdGFkdC5nbWQuZGUwUgYD
54VR0SBEswSYEbaWNlLXRlbC1jYUBkYXJtc3RhZHQuZ21kLmRlhipodHRwOi8vd3d3
55LmRhcm1zdGFkdC5nbWQuZGUvaWNlLXRlbC9ldXJvY2EwDwYDVR0TAQH/BAUwAwEB
56/zA7BgNVHR8ENDAyMDCgLqAshipodHRwOi8vd3d3LmRhcm1zdGFkdC5nbWQuZGUv
57aWNlLXRlbC9ldXJvY2EwDQYJKoZIhvcNAQEEBQADQQAXooi3mVoFQeQTNGfmHz4m
587Etp+T4oIr6dHKtBbwwAhf5FdPaY8M6bZVNKUELH1JK916KoPZiIc81gKHmj/Eh6
59-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/ICE-root.pem b/src/lib/libssl/src/certs/ICE-root.pem
new file mode 100644
index 0000000000..fa991599c9
--- /dev/null
+++ b/src/lib/libssl/src/certs/ICE-root.pem
@@ -0,0 +1,48 @@
1Certificate:
2 Data:
3 Version: 3 (0x2)
4 Serial Number: 0 (0x0)
5 Signature Algorithm: md5WithRSAEncryption
6 Issuer: O=European ICE-TEL project, OU=V3-Certification Authority
7 Validity
8 Not Before: Apr 2 17:33:36 1997 GMT
9 Not After : Apr 2 17:33:36 1998 GMT
10 Subject: O=European ICE-TEL project, OU=V3-Certification Authority
11 Subject Public Key Info:
12 Public Key Algorithm: rsa
13 RSA Public Key: (512 bit)
14 Modulus (512 bit):
15 00:80:3e:eb:ae:47:a9:fe:10:54:0b:81:8b:9c:2b:
16 82:ab:3a:61:36:65:8b:f3:73:9f:ac:ac:7a:15:a7:
17 13:8f:b4:c4:ba:a3:0f:bc:a5:58:8d:cc:b1:93:31:
18 9e:81:9e:8c:19:61:86:fa:52:73:54:d1:97:76:22:
19 e7:c7:9f:41:cd
20 Exponent: 65537 (0x10001)
21 X509v3 extensions:
22 X509v3 Subject Key Identifier:
23 ........z.."p......e..
24 X509v3 Key Usage: critical
25 ....
26 X509v3 Subject Alternative Name:
27 0I.*http://www.darmstadt.gmd.de/ice-tel/euroca..ice-tel-ca@darmstadt.gmd.de
28 X509v3 Basic Constraints: critical
29 0....
30 Signature Algorithm: md5WithRSAEncryption
31 76:69:61:db:b7:cf:8b:06:9e:d8:8c:96:53:d2:4d:a8:23:a6:
32 03:44:e8:8f:24:a5:c0:84:a8:4b:77:d4:2d:2b:7d:37:91:67:
33 f2:2c:ce:02:31:4c:6b:cc:ce:f2:68:a6:11:11:ab:7d:88:b8:
34 7e:22:9f:25:06:60:bd:79:30:3d
35-----BEGIN CERTIFICATE-----
36MIICFjCCAcCgAwIBAgIBADANBgkqhkiG9w0BAQQFADBIMSEwHwYDVQQKExhFdXJv
37cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g
38QXV0aG9yaXR5MB4XDTk3MDQwMjE3MzMzNloXDTk4MDQwMjE3MzMzNlowSDEhMB8G
39A1UEChMYRXVyb3BlYW4gSUNFLVRFTCBwcm9qZWN0MSMwIQYDVQQLExpWMy1DZXJ0
40aWZpY2F0aW9uIEF1dGhvcml0eTBZMAoGBFUIAQECAgIAA0sAMEgCQQCAPuuuR6n+
41EFQLgYucK4KrOmE2ZYvzc5+srHoVpxOPtMS6ow+8pViNzLGTMZ6BnowZYYb6UnNU
420Zd2IufHn0HNAgMBAAGjgZcwgZQwHQYDVR0OBBYEFIr3yNUOx3ro1yJw4AuJ1bbs
43ZbzPMA4GA1UdDwEB/wQEAwIB9jBSBgNVHREESzBJhipodHRwOi8vd3d3LmRhcm1z
44dGFkdC5nbWQuZGUvaWNlLXRlbC9ldXJvY2GBG2ljZS10ZWwtY2FAZGFybXN0YWR0
45LmdtZC5kZTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBAUAA0EAdmlh27fP
46iwae2IyWU9JNqCOmA0TojySlwISoS3fULSt9N5Fn8izOAjFMa8zO8mimERGrfYi4
47fiKfJQZgvXkwPQ==
48-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/ICE-user.pem b/src/lib/libssl/src/certs/ICE-user.pem
new file mode 100644
index 0000000000..28065fd37d
--- /dev/null
+++ b/src/lib/libssl/src/certs/ICE-user.pem
@@ -0,0 +1,63 @@
1Certificate:
2 Data:
3 Version: 3 (0x2)
4 Serial Number: 1 (0x1)
5 Signature Algorithm: md5WithRSAEncryption
6 Issuer: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt
7 Validity
8 Not Before: Apr 2 17:35:59 1997 GMT
9 Not After : Apr 2 17:35:59 1998 GMT
10 Subject: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt, CN=USER
11 Subject Public Key Info:
12 Public Key Algorithm: rsa
13 RSA Public Key: (512 bit)
14 Modulus (512 bit):
15 00:a8:a8:53:63:49:1b:93:c3:c3:0b:6c:88:11:55:
16 de:7e:6a:e2:f9:52:a0:dc:69:25:c4:c8:bf:55:e1:
17 31:a8:ce:e4:a9:29:85:99:8a:15:9a:de:f6:2f:e1:
18 b4:50:5f:5e:04:75:a6:f4:76:dc:3c:0e:39:dc:3a:
19 be:3e:a4:61:8b
20 Exponent: 65537 (0x10001)
21 X509v3 extensions:
22 X509v3 Authority Key Identifier:
23 0...~r..:..B.44fu......3
24 X509v3 Subject Key Identifier:
25 ...... .*...1.*.......
26 X509v3 Key Usage: critical
27 ....
28 X509v3 Certificate Policies: critical
29 0.0...*...0.......
30 X509v3 Subject Alternative Name:
31 0:..user@darmstadt.gmd.de.!http://www.darmstadt.gmd.de/~user
32 X509v3 Issuer Alternative Name:
33 0....gmdca@gmd.de..http://www.gmd.de..saturn.darmstadt.gmd.de.\1!0...U.
34..European ICE-TEL project1#0!..U....V3-Certification Authority1.0...U....Darmstadt..141.12.62.26
35 X509v3 Basic Constraints: critical
36 0.
37 X509v3 CRL Distribution Points:
38 0.0.......gmdca@gmd.de
39 Signature Algorithm: md5WithRSAEncryption
40 69:0c:e1:b7:a7:f2:d8:fb:e8:69:c0:13:cd:37:ad:21:06:22:
41 4d:e8:c6:db:f1:04:0b:b7:e0:b3:d6:0c:81:03:ce:c3:6a:3e:
42 c7:e7:24:24:a4:92:64:c2:83:83:06:42:53:0e:6f:09:1e:84:
43 9a:f7:6f:63:9b:94:99:83:d6:a4
44-----BEGIN CERTIFICATE-----
45MIIDTzCCAvmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBcMSEwHwYDVQQKExhFdXJv
46cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g
47QXV0aG9yaXR5MRIwEAYDVQQHEwlEYXJtc3RhZHQwHhcNOTcwNDAyMTczNTU5WhcN
48OTgwNDAyMTczNTU5WjBrMSEwHwYDVQQKExhFdXJvcGVhbiBJQ0UtVEVMIHByb2pl
49Y3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24gQXV0aG9yaXR5MRIwEAYDVQQH
50EwlEYXJtc3RhZHQxDTALBgNVBAMTBFVTRVIwWTAKBgRVCAEBAgICAANLADBIAkEA
51qKhTY0kbk8PDC2yIEVXefmri+VKg3GklxMi/VeExqM7kqSmFmYoVmt72L+G0UF9e
52BHWm9HbcPA453Dq+PqRhiwIDAQABo4IBmDCCAZQwHwYDVR0jBBgwFoAUfnLy+DqG
53nEKINDRmdcPU/NGiETMwHQYDVR0OBBYEFJfc4B8gjSoRmLUx4Sq/ucIYiMrPMA4G
54A1UdDwEB/wQEAwIB8DAcBgNVHSABAf8EEjAQMAYGBCoDBAUwBgYECQgHBjBDBgNV
55HREEPDA6gRV1c2VyQGRhcm1zdGFkdC5nbWQuZGWGIWh0dHA6Ly93d3cuZGFybXN0
56YWR0LmdtZC5kZS9+dXNlcjCBsQYDVR0SBIGpMIGmgQxnbWRjYUBnbWQuZGWGEWh0
57dHA6Ly93d3cuZ21kLmRlghdzYXR1cm4uZGFybXN0YWR0LmdtZC5kZaRcMSEwHwYD
58VQQKExhFdXJvcGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRp
59ZmljYXRpb24gQXV0aG9yaXR5MRIwEAYDVQQHEwlEYXJtc3RhZHSHDDE0MS4xMi42
60Mi4yNjAMBgNVHRMBAf8EAjAAMB0GA1UdHwQWMBQwEqAQoA6BDGdtZGNhQGdtZC5k
61ZTANBgkqhkiG9w0BAQQFAANBAGkM4ben8tj76GnAE803rSEGIk3oxtvxBAu34LPW
62DIEDzsNqPsfnJCSkkmTCg4MGQlMObwkehJr3b2OblJmD1qQ=
63-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/ICE.crl b/src/lib/libssl/src/certs/ICE.crl
new file mode 100644
index 0000000000..21939e8cc4
--- /dev/null
+++ b/src/lib/libssl/src/certs/ICE.crl
@@ -0,0 +1,9 @@
1-----BEGIN X509 CRL-----
2MIIBNDCBnjANBgkqhkiG9w0BAQIFADBFMSEwHwYDVQQKExhFdXJvcGVhbiBJQ0Ut
3VEVMIFByb2plY3QxIDAeBgNVBAsTF0NlcnRpZmljYXRpb24gQXV0aG9yaXR5Fw05
4NzA2MDkxNDQyNDNaFw05NzA3MDkxNDQyNDNaMCgwEgIBChcNOTcwMzAzMTQ0MjU0
5WjASAgEJFw05NjEwMDIxMjI5MjdaMA0GCSqGSIb3DQEBAgUAA4GBAH4vgWo2Tej/
6i7kbiw4Imd30If91iosjClNpBFwvwUDBclPEeMuYimHbLOk4H8Nofc0fw11+U/IO
7KSNouUDcqG7B64oY7c4SXKn+i1MWOb5OJiWeodX3TehHjBlyWzoNMWCnYA8XqFP1
8mOKp8Jla1BibEZf14+/HqCi2hnZUiEXh
9-----END X509 CRL-----
diff --git a/src/lib/libssl/src/certs/RegTP-4R.pem b/src/lib/libssl/src/certs/RegTP-4R.pem
new file mode 100644
index 0000000000..6f2c6abccd
--- /dev/null
+++ b/src/lib/libssl/src/certs/RegTP-4R.pem
@@ -0,0 +1,19 @@
1issuer= CN=4R-CA 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE
2notBefore=Jan 21 16:04:53 1999 GMT
3notAfter=Jan 21 16:04:53 2004 GMT
4subject= CN=4R-CA 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE
5-----BEGIN CERTIFICATE-----
6MIICZzCCAdOgAwIBAgIEOwVn1DAKBgYrJAMDAQIFADBvMQswCQYDVQQGEwJERTE9
7MDsGA1UEChQ0UmVndWxpZXJ1bmdzYmVoyG9yZGUgZsh1ciBUZWxla29tbXVuaWth
8dGlvbiB1bmQgUG9zdDEhMAwGBwKCBgEKBxQTATEwEQYDVQQDFAo0Ui1DQSAxOlBO
9MCIYDzE5OTkwMTIxMTYwNDUzWhgPMjAwNDAxMjExNjA0NTNaMG8xCzAJBgNVBAYT
10AkRFMT0wOwYDVQQKFDRSZWd1bGllcnVuZ3NiZWjIb3JkZSBmyHVyIFRlbGVrb21t
11dW5pa2F0aW9uIHVuZCBQb3N0MSEwDAYHAoIGAQoHFBMBMTARBgNVBAMUCjRSLUNB
12IDE6UE4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGAjzHbq2asUlqeWbXTQHso
13aVF6YIPVH3c/B2cbuy9HJ/lnE6x0asOzM2DGDqi47xkdAxPc0LZ0fxO87rkmz7xs
14jJObnVrMXpyUSDSp5Y0wqKJdsFdr6mGFOQZteIti8AJnr8xMkwnWVyuOlEXsFe1h
155gxwQXrOcPinE6qu1t/3PmECBMAAAAGjEjAQMA4GA1UdDwEB/wQEAwIBBjAKBgYr
16JAMDAQIFAAOBgQA+RdocBmA2VV9E5aKPBcp01tdZAvvW9Tve3docArVKR/4/yvSX
17Z+wvzzk+uu4qBp49HN3nqPYMrzbTmjBFu4ce5fkZ7dHF0W1sSBL0rox5z36Aq2re
18JjfEOEmSnNe0+opuh4FSVOssXblXTE8lEQU0FhhItgDx2ADnWZibaxLG4w==
19-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/ca-cert.pem b/src/lib/libssl/src/certs/ca-cert.pem
new file mode 100644
index 0000000000..bcba68aefa
--- /dev/null
+++ b/src/lib/libssl/src/certs/ca-cert.pem
@@ -0,0 +1,33 @@
1-----BEGIN CERTIFICATE-----
2MIIC5TCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQQFADBcMQswCQYDVQQGEwJBVTET
3MBEGA1UECBMKUXVlZW5zbGFuZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQx
4HDAaBgNVBAMTE1Rlc3QgUENBICgxMDI0IGJpdCkwHhcNOTkxMjAyMjEzODUxWhcN
5MDUwNzEwMjEzODUxWjBbMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFu
6ZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxGzAZBgNVBAMTElRlc3QgQ0Eg
7KDEwMjQgYml0KTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAo7ujy3XXpU/p
8yDJtOxkMJmGv3mdiVm7JrdoKLUgqjO2rBaeNuYMUiuI6oYU+tlD6agwRML0Pn2JF
9b90VdK/UXrmRr9djaEuH17EIKjte5RwOzndCndsjcCYyoeODMTyg7dqPIkDMmRNM
105R5xBTabD+Aji0wzQupYxBLuW5PLj7ECAwEAAaOBtzCBtDAdBgNVHQ4EFgQU1WWA
11U42mkhi3ecgey1dsJjU61+UwgYQGA1UdIwR9MHuAFE0RaEcrj18q1dw+G6nJbsTW
12R213oWCkXjBcMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG
13A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxHDAaBgNVBAMTE1Rlc3QgUENBICgxMDI0
14IGJpdCmCAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBb39BRphHL
156aRAQyymsvBvPSCiG9+kR0R1L23aTpNbhXp2BebyFjbEQYZc2kWGiKKcHkNECA35
163d4LoqUlVey8DFyafOIJd9hxdZfg+rxlHMxnL7uCJRmx9+xB411Jtsol9/wg1uCK
17sleGpgB4j8cG2SVCz7V2MNZNK+d5QCnR7A==
18-----END CERTIFICATE-----
19-----BEGIN RSA PRIVATE KEY-----
20MIICXQIBAAKBgQCju6PLddelT+nIMm07GQwmYa/eZ2JWbsmt2gotSCqM7asFp425
21gxSK4jqhhT62UPpqDBEwvQ+fYkVv3RV0r9ReuZGv12NoS4fXsQgqO17lHA7Od0Kd
222yNwJjKh44MxPKDt2o8iQMyZE0zlHnEFNpsP4COLTDNC6ljEEu5bk8uPsQIDAQAB
23AoGAVZmpFZsDZfr0l2S9tLLwpjRWNOlKATQkno6q2WesT0eGLQufTciY+c8ypfU6
24hyio8r5iUl/VhhdjhAtKx1mRpiotftHo/eYf8rtsrnprOnWG0bWjLjtIoMbcxGn2
25J3bN6LJmbJMjDs0eJ3KnTu646F3nDUw2oGAwmpzKXA1KAP0CQQDRvQhxk2D3Pehs
26HvG665u2pB5ipYQngEFlZO7RHJZzJOZEWSLuuMqaF/7pTfA5jiBvWqCgJeCRRInL
2721ru4dlPAkEAx9jj7BgKn5TYnMoBSSe0afjsV9oApVpN1Nacb1YDtCwy+scp3++s
28nFxlv98wxIlSdpwMUn+AUWfjiWR7Tu/G/wJBAJ/KjwZIrFVxewP0x2ILYsTRYLzz
29MS4PDsO7FB+I0i7DbBOifXS2oNSpd3I0CNMwrxFnUHzynpbOStVfN3ZL5w0CQQCa
30pwFahxBRhkJKsxhjoFJBX9yl75JoY4Wvm5Tbo9ih6UJaRx3kqfkN14L2BKYcsZgb
31KY9vmDOYy6iNfjDeWTfJAkBkfPUb8oTJ/nSP5zN6sqGxSY4krc4xLxpRmxoJ8HL2
32XfhqXkTzbU13RX9JJ/NZ8vQN9Vm2NhxRGJocQkmcdVtJ
33-----END RSA PRIVATE KEY-----
diff --git a/src/lib/libssl/src/certs/dsa-ca.pem b/src/lib/libssl/src/certs/dsa-ca.pem
new file mode 100644
index 0000000000..9eb08f3ddd
--- /dev/null
+++ b/src/lib/libssl/src/certs/dsa-ca.pem
@@ -0,0 +1,43 @@
1-----BEGIN DSA PRIVATE KEY-----
2Proc-Type: 4,ENCRYPTED
3DEK-Info: DES-EDE3-CBC,C5B6C7CC9E1FE2C0
4
5svCXBcBRhMuU22UXOfiKZA+thmz6KYXpt1Yg5Rd+TYQcQ1MdvNy0B0tkP1SxzDq0
6Xh1eMeTML9/9/0rKakgNXXXbpi5RB8t6BmwRSyej89F7nn1mtR3qzoyPRpp15SDl
7Tn67C+2v+HDF3MFk88hiNCYkNbcmi7TWvChsl8N1r7wdZwtIox56yXdgxw6ZIpa/
8par0oUCzN7fiavPgCWz1kfPNSaBQSdxwH7TZi5tMHAr0J3C7a7QRnZfE09R59Uqr
9zslrq+ndIw1BZAxoY0SlBu+iFOVaBVlwToC4AsHkv7j7l8ITtr7f42YbBa44D9TO
10uOhONmkk/v3Fso4RaOEzdKZC+hnmmzvHs6TiTWm6yzJgSFwyOUK0eGmKEeVxpcH5
11rUOlHOwzen+FFtocZDZAfdFnb7QY7L/boQvyA5A+ZbRG4DUpmBQeQsSaICHM5Rxx
121QaLF413VNPXTLPbW0ilSc2H8x2iZTIVKfd33oSO6NhXPtSYQgfecEF4BvNHY5c4
13HovjT4mckbK95bcBzoCHu43vuSQkmZzdYo/ydSZt6zoPavbBLueTpgSbdXiDi827
14MVqOsYxGCb+kez0FoDSTgw==
15-----END DSA PRIVATE KEY-----
16-----BEGIN CERTIFICATE REQUEST-----
17MIICUjCCAhECAQAwUjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx
18ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDELMAkGA1UEAxMCQ0Ew
19ggG0MIIBKQYFKw4DAgwwggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaW
20sxXgUy6P4FmCc5A+dTGZR3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5m
21rmuINvvsKNzC16W75Sw5JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHk
22cJVbUM1JAhUA9wcx7fpsBgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVo
23bzDjaeHls12YuyiGSPzemQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqR
24CZ228U2cVA9YBu5JdAfOVX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxB
25F5WS6wG1c6Vqftgy7Q4CuAOBhAACgYAapll6iqz9XrZFlk2GCVcB+KihxWnH7IuH
26vSLw9YUrJahcBHmbpvt494lF4gC5w3WPM+vXJofbusk4GoQEEsQNMDaah4m49uUq
27AylOVFJJJXuirVJ+o+0TtOFDITEAl+YZZariXOD7tdOSOl9RLMPC6+daHKS9e68u
283enxhqnDGaAAMAkGBSsOAwIbBQADMAAwLQIVAJGVuFsG/0DBuSZ0jF7ypdU0/G0v
29AhQfeF5BoMMDbX/kidUVpQ6gadPlZA==
30-----END CERTIFICATE REQUEST-----
31-----BEGIN CERTIFICATE-----
32MIIBrjCCAWwCAQswCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK
33U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww
34CgYDVQQDEwNQQ0EwHhcNOTcwNjE1MDIxNDI5WhcNOTcwNzE1MDIxNDI5WjBSMQsw
35CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu
36ZXQgV2lkZ2l0cyBQdHkgTHRkMQswCQYDVQQDEwJDQTCBkjAJBgUrDgMCDAUAA4GE
37AAKBgBqmWXqKrP1etkWWTYYJVwH4qKHFacfsi4e9IvD1hSslqFwEeZum+3j3iUXi
38ALnDdY8z69cmh9u6yTgahAQSxA0wNpqHibj25SoDKU5UUkkle6KtUn6j7RO04UMh
39MQCX5hllquJc4Pu105I6X1Esw8Lr51ocpL17ry7d6fGGqcMZMAkGBSsOAwIbBQAD
40MQAwLgIVAJ4wtQsANPxHo7Q4IQZYsL12SKdbAhUAjJ9n38zxT+iai2164xS+LIfa
41C1Q=
42-----END CERTIFICATE-----
43
diff --git a/src/lib/libssl/src/certs/dsa-pca.pem b/src/lib/libssl/src/certs/dsa-pca.pem
new file mode 100644
index 0000000000..e3641ad47e
--- /dev/null
+++ b/src/lib/libssl/src/certs/dsa-pca.pem
@@ -0,0 +1,49 @@
1-----BEGIN DSA PRIVATE KEY-----
2Proc-Type: 4,ENCRYPTED
3DEK-Info: DES-EDE3-CBC,F80EEEBEEA7386C4
4
5GZ9zgFcHOlnhPoiSbVi/yXc9mGoj44A6IveD4UlpSEUt6Xbse3Fr0KHIUyQ3oGnS
6mClKoAp/eOTb5Frhto85SzdsxYtac+X1v5XwdzAMy2KowHVk1N8A5jmE2OlkNPNt
7of132MNlo2cyIRYaa35PPYBGNCmUm7YcYS8O90YtkrQZZTf4+2C4kllhMcdkQwkr
8FWSWC8YOQ7w0LHb4cX1FejHHom9Nd/0PN3vn3UyySvfOqoR7nbXkrpHXmPIr0hxX
9RcF0aXcV/CzZ1/nfXWQf4o3+oD0T22SDoVcZY60IzI0oIc3pNCbDV3uKNmgekrFd
10qOUJ+QW8oWp7oefRx62iBfIeC8DZunohMXaWAQCU0sLQOR4yEdeUCnzCSywe0bG1
11diD0KYaEe+Yub1BQH4aLsBgDjardgpJRTQLq0DUvw0/QGO1irKTJzegEDNVBKrVn
12V4AHOKT1CUKqvGNRP1UnccUDTF6miOAtaj/qpzra7sSk7dkGBvIEeFoAg84kfh9h
13hVvF1YyzC9bwZepruoqoUwke/WdNIR5ymOVZ/4Liw0JdIOcq+atbdRX08niqIRkf
14dsZrUj4leo3zdefYUQ7w4N2Ns37yDFq7
15-----END DSA PRIVATE KEY-----
16-----BEGIN CERTIFICATE REQUEST-----
17MIICVTCCAhMCAQAwUzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx
18ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEMMAoGA1UEAxMDUENB
19MIIBtTCCASkGBSsOAwIMMIIBHgKBgQCnP26Fv0FqKX3wn0cZMJCaCR3aajMexT2G
20lrMV4FMuj+BZgnOQPnUxmUd6UvuF5NmmezibaIqEm4fGHrV+hktTW1nPcWUZiG7O
21Zq5riDb77Cjcwtelu+UsOSZL2ppwGJU3lRBWI/YV7boEXt45T/23Qx+1pGVvzYAR
225HCVW1DNSQIVAPcHMe36bAYD1YWKHKycZedQZmVvAoGATd9MA6aRivUZb1BGJZnl
23aG8w42nh5bNdmLsohkj83pkEP1+IDJxzJA0gXbkqmj8YlifkYofBe3RiU/xhJ6h6
24kQmdtvFNnFQPWAbuSXQHzlV+I84W9srcWmEBfslxtU323DQph2j2XiCTs9v15Als
25QReVkusBtXOlan7YMu0OArgDgYUAAoGBAKbtuR5AdW+ICjCFe2ixjUiJJzM2IKwe
266NZEMXg39+HQ1UTPTmfLZLps+rZfolHDXuRKMXbGFdSF0nXYzotPCzi7GauwEJTZ
27yr27ZZjA1C6apGSQ9GzuwNvZ4rCXystVEagAS8OQ4H3D4dWS17Zg31ICb5o4E5r0
28z09o/Uz46u0VoAAwCQYFKw4DAhsFAAMxADAuAhUArRubTxsbIXy3AhtjQ943AbNB
29nSICFQCu+g1iW3jwF+gOcbroD4S/ZcvB3w==
30-----END CERTIFICATE REQUEST-----
31-----BEGIN CERTIFICATE-----
32MIIC0zCCApECAQAwCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK
33U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww
34CgYDVQQDEwNQQ0EwHhcNOTcwNjE0MjI1NDQ1WhcNOTcwNzE0MjI1NDQ1WjBTMQsw
35CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu
36ZXQgV2lkZ2l0cyBQdHkgTHRkMQwwCgYDVQQDEwNQQ0EwggG1MIIBKQYFKw4DAgww
37ggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaWsxXgUy6P4FmCc5A+dTGZ
38R3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5mrmuINvvsKNzC16W75Sw5
39JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHkcJVbUM1JAhUA9wcx7fps
40BgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVobzDjaeHls12YuyiGSPze
41mQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqRCZ228U2cVA9YBu5JdAfO
42VX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxBF5WS6wG1c6Vqftgy7Q4C
43uAOBhQACgYEApu25HkB1b4gKMIV7aLGNSIknMzYgrB7o1kQxeDf34dDVRM9OZ8tk
44umz6tl+iUcNe5EoxdsYV1IXSddjOi08LOLsZq7AQlNnKvbtlmMDULpqkZJD0bO7A
4529nisJfKy1URqABLw5DgfcPh1ZLXtmDfUgJvmjgTmvTPT2j9TPjq7RUwCQYFKw4D
46AhsFAAMxADAuAhUAvtv6AkMolix1Jvy3UnVEIUqdCUICFQC+jq8P49mwrY9oJ24n
475rKUjNBhSg==
48-----END CERTIFICATE-----
49
diff --git a/src/lib/libssl/src/certs/factory.pem b/src/lib/libssl/src/certs/factory.pem
new file mode 100644
index 0000000000..8e28b391b2
--- /dev/null
+++ b/src/lib/libssl/src/certs/factory.pem
@@ -0,0 +1,15 @@
1-----BEGIN CERTIFICATE-----
2MIICTTCCAbagAwIBAgIBADANBgkqhkiG9w0BAQQFADBMMQswCQYDVQQGEwJHQjEM
3MAoGA1UEChMDVUNMMRgwFgYDVQQLEw9JQ0UtVEVMIFByb2plY3QxFTATBgNVBAMT
4DFRydXN0RmFjdG9yeTAeFw05NzA0MjIxNDM5MTRaFw05ODA0MjIxNDM5MTRaMEwx
5CzAJBgNVBAYTAkdCMQwwCgYDVQQKEwNVQ0wxGDAWBgNVBAsTD0lDRS1URUwgUHJv
6amVjdDEVMBMGA1UEAxMMVHJ1c3RGYWN0b3J5MIGcMAoGBFUIAQECAgQAA4GNADCB
7iQKBgQCEieR8NcXkUW1f0G6aC6u0i8q/98JqS6RxK5YmHIGKCkuTWAUjzLfUa4dt
8U9igGCjTuxaDqlzEim+t/02pmiBZT9HaX++35MjQPUWmsChcYU5WyzGErXi+rQaw
9zlwS73zM8qiPj/97lXYycWhgL0VaiDSPxRXEUdWoaGruom4mNQIDAQABo0IwQDAd
10BgNVHQ4EFgQUHal1LZr7oVg5z6lYzrhTgZRCmcUwDgYDVR0PAQH/BAQDAgH2MA8G
11A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAfaggfl6FZoioecjv0dq8
12/DXo/u11iMZvXn08gjX/zl2b4wtPbShOSY5FhkSm8GeySasz+/Nwb/uzfnIhokWi
13lfPZHtlCWtXbIy/TN51eJyq04ceDCQDWvLC2enVg9KB+GJ34b5c5VaPRzq8MBxsA
14S7ELuYGtmYgYm9NZOIr7yU0=
15-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/nortelCA.pem b/src/lib/libssl/src/certs/nortelCA.pem
new file mode 100644
index 0000000000..207f34ab3a
--- /dev/null
+++ b/src/lib/libssl/src/certs/nortelCA.pem
@@ -0,0 +1,16 @@
1-----BEGIN CERTIFICATE-----
2MIICajCCAdMCBDGA0QUwDQYJKoZIhvcNAQEEBQAwfTELMAkGA1UEBhMCQ2ExDzAN
3BgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmlsaXR5IEFjY2VwdGVkMR8w
4HQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRwwGgYDVQQDExNFbnRydXN0
5IERlbW8gV2ViIENBMB4XDTk2MDQyNjEzMzUwMVoXDTA2MDQyNjEzMzUwMVowfTEL
6MAkGA1UEBhMCQ2ExDzANBgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmls
7aXR5IEFjY2VwdGVkMR8wHQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRww
8GgYDVQQDExNFbnRydXN0IERlbW8gV2ViIENBMIGdMA0GCSqGSIb3DQEBAQUAA4GL
9ADCBhwKBgQCaroS7O1DA0hm4IefNYU1cx/nqOmzEnk291d1XqznDeF4wEgakbkCc
10zTKxK791yNpXG5RmngqH7cygDRTHZJ6mfCRn0wGC+AI00F2vYTGqPGRQL1N3lZT0
11YDKFC0SQeMMjFIZ1aeQigroFQnHo0VB3zWIMpNkka8PY9lxHZAmWwQIBAzANBgkq
12hkiG9w0BAQQFAAOBgQBAx0UMVA1s54lMQyXjMX5kj99FJN5itb8bK1Rk+cegPQPF
13cWO9SEWyEjjBjIkjjzAwBkaEszFsNGxemxtXvwjIm1xEUMTVlPEWTs2qnDvAUA9W
14YqhWbhH0toGT36236QAsqCZ76rbTRVSSX2BHyJwJMG2tCRv7kRJ//NIgxj3H4w==
15-----END CERTIFICATE-----
16
diff --git a/src/lib/libssl/src/certs/pca-cert.pem b/src/lib/libssl/src/certs/pca-cert.pem
new file mode 100644
index 0000000000..9d754d460d
--- /dev/null
+++ b/src/lib/libssl/src/certs/pca-cert.pem
@@ -0,0 +1,33 @@
1-----BEGIN CERTIFICATE-----
2MIIC5jCCAk+gAwIBAgIBADANBgkqhkiG9w0BAQQFADBcMQswCQYDVQQGEwJBVTET
3MBEGA1UECBMKUXVlZW5zbGFuZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQx
4HDAaBgNVBAMTE1Rlc3QgUENBICgxMDI0IGJpdCkwHhcNOTkxMjAyMjEzNTQ4WhcN
5MDUwNzExMjEzNTQ4WjBcMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFu
6ZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxHDAaBgNVBAMTE1Rlc3QgUENB
7ICgxMDI0IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJ2haT/f5Zwy
8V+MiuSDjSR62adBoSiBB7Usty44lXqsp9RICw+DCCxpsn/CfxPEDXLLd4olsWXc6
9JRcxGynbYmnzk+Z6aIPPJQhK3CTvaqGnWKZsA1m+WaUIUqJCuNTK4N+7hMAGaf6S
10S3e9HVgEQ4a34gXJ7VQFVIBNV1EnZRWHAgMBAAGjgbcwgbQwHQYDVR0OBBYEFE0R
11aEcrj18q1dw+G6nJbsTWR213MIGEBgNVHSMEfTB7gBRNEWhHK49fKtXcPhupyW7E
121kdtd6FgpF4wXDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY
13BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYDVQQDExNUZXN0IFBDQSAoMTAy
14NCBiaXQpggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAUa8B3pho
15+Mvxeq9HsEzJxHIFQla05S5J/e/V+DQTYoKiRFchKPrDAdrzYSEvP3h4QJEtsNqQ
16JfOxg5M42uLFq7aPGWkF6ZZqZsYS+zA9IVT14g7gNA6Ne+5QtJqQtH9HA24st0T0
17Tga/lZ9M2ovImovaxSL/kRHbpCWcqWVxpOw=
18-----END CERTIFICATE-----
19-----BEGIN RSA PRIVATE KEY-----
20MIICXAIBAAKBgQCdoWk/3+WcMlfjIrkg40ketmnQaEogQe1LLcuOJV6rKfUSAsPg
21wgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp22Jp85PmemiDzyUIStwk72qhp1imbANZ
22vlmlCFKiQrjUyuDfu4TABmn+kkt3vR1YBEOGt+IFye1UBVSATVdRJ2UVhwIDAQAB
23AoGAba4fTtuap5l7/8ZsbE7Z1O32KJY4ZcOZukLOLUUhXxXduT+FTgGWujc0/rgc
24z9qYCLlNZHOouMYTgtSfYvuMuLZ11VIt0GYH+nRioLShE59Yy+zCRyC+gPigS1kz
25xvo14AsOIPYV14Tk/SsHyq6E0eTk7VzaIE197giiINUERPECQQDSKmtPTh/lRKw7
26HSZSM0I1mFWn/1zqrAbontRQY5w98QWIOe5qmzYyFbPXYT3d9BzlsMyhgiRNoBbD
27yvohSHXJAkEAwAHx6ezAZeWWzD5yXD36nyjpkVCw7Tk7TSmOceLJMWt1QcrCfqlS
28xA5jjpQ6Z8suU5DdtWAryM2sAir1WisYzwJAd6Zcx56jvAQ3xcPXsE6scBTVFzrj
297FqZ6E+cclPzfLQ+QQsyOBE7bpI6e/FJppY26XGZXo3YGzV8IGXrt40oOQJALETG
30h86EFXo3qGOFbmsDy4pdP5nBERCu8X1xUCSfintiD4c2DInxgS5oGclnJeMcjTvL
31QjQoJCX3UJCi/OUO1QJBAKgcDHWjMvt+l1pjJBsSEZ0HX9AAIIVx0RQmbFGS+F2Q
32hhu5l77WnnZOQ9vvhV5u7NPCUF9nhU3jh60qWWO8mkc=
33-----END RSA PRIVATE KEY-----
diff --git a/src/lib/libssl/src/certs/rsa-cca.pem b/src/lib/libssl/src/certs/rsa-cca.pem
new file mode 100644
index 0000000000..69f5c1c84c
--- /dev/null
+++ b/src/lib/libssl/src/certs/rsa-cca.pem
@@ -0,0 +1,19 @@
1subject=/C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority
2issuer= /C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority
3notBefore=941104185834Z
4notAfter =991103185834Z
5-----BEGIN X509 CERTIFICATE-----
6
7MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw
8HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy
9Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
10OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
11ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
12IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
13975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
14touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
157yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
169/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
170v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb
18MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
19-----END X509 CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/timCA.pem b/src/lib/libssl/src/certs/timCA.pem
new file mode 100644
index 0000000000..9c8d5bf9c6
--- /dev/null
+++ b/src/lib/libssl/src/certs/timCA.pem
@@ -0,0 +1,16 @@
1Tims test GCI CA
2
3-----BEGIN CERTIFICATE-----
4MIIB8DCCAZoCAQAwDQYJKoZIhvcNAQEEBQAwgYIxCzAJBgNVBAYTAkFVMRMwEQYD
5VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5
6cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2RldmVsb3BtZW50MRkwFwYDVQQDExBD
7cnlwdFNvZnQgRGV2IENBMB4XDTk3MDMyMjEzMzQwNFoXDTk4MDMyMjEzMzQwNFow
8gYIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhC
9cmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2Rl
10dmVsb3BtZW50MRkwFwYDVQQDExBDcnlwdFNvZnQgRGV2IENBMFwwDQYJKoZIhvcN
11AQEBBQADSwAwSAJBAOAOAqogG5QwAmLhzyO4CoRnx/wVy4NZP4dxJy83O1EnL0rw
12OdsamJKvPOLHgSXo3gDu9uVyvCf/QJmZAmC5ml8CAwEAATANBgkqhkiG9w0BAQQF
13AANBADRRS/GVdd7rAqRW6SdmgLJduOU2yq3avBu99kRqbp9A/dLu6r6jU+eP4oOA
14TfdbFZtAAD2Hx9jUtY3tfdrJOb8=
15-----END CERTIFICATE-----
16
diff --git a/src/lib/libssl/src/certs/tjhCA.pem b/src/lib/libssl/src/certs/tjhCA.pem
new file mode 100644
index 0000000000..67bee1b200
--- /dev/null
+++ b/src/lib/libssl/src/certs/tjhCA.pem
@@ -0,0 +1,15 @@
1-----BEGIN CERTIFICATE-----
2MIICVjCCAgACAQAwDQYJKoZIhvcNAQEEBQAwgbUxCzAJBgNVBAYTAkFVMRMwEQYD
3VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5
4cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsTI1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9O
5IEFVVEhPUklUSUVTMTQwMgYDVQQDEytaRVJPIFZBTFVFIENBIC0gREVNT05TVFJB
6VElPTiBQVVJQT1NFUyBPTkxZMB4XDTk3MDQwMzEzMjI1NFoXDTk4MDQwMzEzMjI1
7NFowgbUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH
8EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsT
9I1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9OIEFVVEhPUklUSUVTMTQwMgYDVQQDEyta
10RVJPIFZBTFVFIENBIC0gREVNT05TVFJBVElPTiBQVVJQT1NFUyBPTkxZMFwwDQYJ
11KoZIhvcNAQEBBQADSwAwSAJBAOZ7T7yqP/tyspcko3yPY1y0Cm2EmwNvzW4QgVXR
12Fjs3HmJ4xtSpXdo6mwcGezL3Abt/aQXaxv9PU8xt+Jr0OFUCAwEAATANBgkqhkiG
139w0BAQQFAANBAOQpYmGgyCqCy1OljgJhCqQOu627oVlHzK1L+t9vBaMfn40AVUR4
14WzQVWO31KTgi5vTK1U+3h46fgUWqQ0h+6rU=
15-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/vsign2.pem b/src/lib/libssl/src/certs/vsign2.pem
new file mode 100644
index 0000000000..d8bdd8c812
--- /dev/null
+++ b/src/lib/libssl/src/certs/vsign2.pem
@@ -0,0 +1,18 @@
1subject=/C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority
2notBefore=Jan 29 00:00:00 1996 GMT
3notAfter=Jan 7 23:59:59 2004 GMT
4-----BEGIN CERTIFICATE-----
5MIICPTCCAaYCEQC6WslMBTuS1qe2307QU5INMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
6BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
7c3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
8NjAxMjkwMDAwMDBaFw0wNDAxMDcyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
9VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMiBQdWJsaWMgUHJp
10bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
11jQAwgYkCgYEAtlqLow1qI4OAa885h/QhEzMGTCWi7VUSl8WngLn6g8EgoPovFQ18
12oWBrfnks+gYPOq72G2+x0v8vKFJfg31LxHq3+GYfgFT8t8KOWUoUV0bRmpO+QZED
13uxWAk1zr58wIbD8+s0r8/0tsI9VQgiZEGY4jw3HqGSRHBJ51v8imAB8CAwEAATAN
14BgkqhkiG9w0BAQIFAAOBgQC2AB+TV6QHp0DOZUA/VV7t7/pUSaUw1iF8YYfug5ML
15v7Qz8pisnwa/TqjOFIFMywROWMPPX+5815pvy0GKt3+BuP+EYcYnQ2UdDOyxAArd
16G6S7x3ggKLKi3TaVLuFUT79guXdoEZkj6OpS6KoATmdOu5C1RZtG644W78QzWzM9
171Q==
18-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/vsign3.pem b/src/lib/libssl/src/certs/vsign3.pem
index 4b8c0251cb..aa5bb4c1f3 100644
--- a/src/lib/libssl/src/certs/vsign3.pem
+++ b/src/lib/libssl/src/certs/vsign3.pem
@@ -1,17 +1,18 @@
1subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority 1subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
2notBefore=Jan 29 00:00:00 1996 GMT 2notBefore=Jan 29 00:00:00 1996 GMT
3notAfter=Aug 1 23:59:59 2028 GMT 3notAfter=Jan 7 23:59:59 2004 GMT
4-----BEGIN CERTIFICATE----- 4-----BEGIN CERTIFICATE-----
5MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG 5MIICPTCCAaYCEQDknv3zOugOz6URPhmkJAIyMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
6A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz 6BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
7cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 7c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
8MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV 8NjAxMjkwMDAwMDBaFw0wNDAxMDcyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
9BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt 9VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMgUHJp
10YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN 10bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
11ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE 11jQAwgYkCgYEAyVxZnvIbigEUtBDfBEDb41evakVAj4QMC9Ez2dkRz+4CWB8l9yqo
12BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is 12RAWq7AMfeH+ek7maAKojfdashaJjRcdyJ8z0TMZ1cdI5709C8HXfCpDGjiBvmA/4
13I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G 13rCNfcCk2pMmG57GaIMtTpYXnPb59mv4kRTPcdhXtD6JxZExlLoFoRacCAwEAATAN
14CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do 14BgkqhkiG9w0BAQIFAAOBgQBhcOwvP579K+ZoVCGwZ3kIDCCWMYoNer62Jt95LCJp
15lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc 15STbjl3diYaIy13pUITa6Ask05yXaRDWw0lyAXbOU+Pms7qRgdSoflUkjsUp89LNH
16AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k 16ciFbfperVKxi513srpvSybIk+4Kt6WcVS7qqpvCXoPawl1cAyAw8CaCCBLpB2veZ
17pA==
17-----END CERTIFICATE----- 18-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/certs/vsigntca.pem b/src/lib/libssl/src/certs/vsigntca.pem
new file mode 100644
index 0000000000..05acf76e66
--- /dev/null
+++ b/src/lib/libssl/src/certs/vsigntca.pem
@@ -0,0 +1,18 @@
1subject=/O=VeriSign, Inc/OU=www.verisign.com/repository/TestCPS Incorp. By Ref. Liab. LTD./OU=For VeriSign authorized testing only. No assurances (C)VS1997
2notBefore=Mar 4 00:00:00 1997 GMT
3notAfter=Mar 4 23:59:59 2025 GMT
4-----BEGIN CERTIFICATE-----
5MIICTTCCAfcCEEdoCqpuXxnoK27q7d58Qc4wDQYJKoZIhvcNAQEEBQAwgakxFjAU
6BgNVBAoTDVZlcmlTaWduLCBJbmMxRzBFBgNVBAsTPnd3dy52ZXJpc2lnbi5jb20v
7cmVwb3NpdG9yeS9UZXN0Q1BTIEluY29ycC4gQnkgUmVmLiBMaWFiLiBMVEQuMUYw
8RAYDVQQLEz1Gb3IgVmVyaVNpZ24gYXV0aG9yaXplZCB0ZXN0aW5nIG9ubHkuIE5v
9IGFzc3VyYW5jZXMgKEMpVlMxOTk3MB4XDTk3MDMwNDAwMDAwMFoXDTI1MDMwNDIz
10NTk1OVowgakxFjAUBgNVBAoTDVZlcmlTaWduLCBJbmMxRzBFBgNVBAsTPnd3dy52
11ZXJpc2lnbi5jb20vcmVwb3NpdG9yeS9UZXN0Q1BTIEluY29ycC4gQnkgUmVmLiBM
12aWFiLiBMVEQuMUYwRAYDVQQLEz1Gb3IgVmVyaVNpZ24gYXV0aG9yaXplZCB0ZXN0
13aW5nIG9ubHkuIE5vIGFzc3VyYW5jZXMgKEMpVlMxOTk3MFwwDQYJKoZIhvcNAQEB
14BQADSwAwSAJBAMak6xImJx44jMKcbkACy5/CyMA2fqXK4PlzTtCxRq5tFkDzne7s
15cI8oFK/J+gFZNE3bjidDxf07O3JOYG9RGx8CAwEAATANBgkqhkiG9w0BAQQFAANB
16ADT523tENOKrEheZFpsJx1UUjPrG7TwYc/C4NBHrZI4gZJcKVFIfNulftVS6UMYW
17ToLEMaUojc3DuNXHG21PDG8=
18-----END CERTIFICATE-----
diff --git a/src/lib/libssl/src/config b/src/lib/libssl/src/config
index 25a3703c1f..b3bd96bbfc 100644
--- a/src/lib/libssl/src/config
+++ b/src/lib/libssl/src/config
@@ -134,7 +134,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
134 HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'` 134 HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
135 case "$HPUXVER" in 135 case "$HPUXVER" in
136 1[0-9].*) # HPUX 10 and 11 targets are unified 136 1[0-9].*) # HPUX 10 and 11 targets are unified
137 echo "${MACHINE}-hp-hpux1x"; exit 0 137 echo "${MACHINE}-hp-hpux10"; exit 0
138 ;; 138 ;;
139 *) 139 *)
140 echo "${MACHINE}-hp-hpux"; exit 0 140 echo "${MACHINE}-hp-hpux"; exit 0
@@ -410,10 +410,9 @@ if [ "$SYSTEM" = "HP-UX" ];then
410 GCC_BITS="32" 410 GCC_BITS="32"
411 if [ $GCCVER -ge 30 ]; then 411 if [ $GCCVER -ge 30 ]; then
412 # PA64 support only came in with gcc 3.0.x. 412 # PA64 support only came in with gcc 3.0.x.
413 # We check if the preprocessor symbol __LP64__ is defined... 413 # We look for the preprocessor symbol __LP64__ indicating
414 if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then 414 # 64bit bit long and pointer. sizeof(int) == 32 on HPUX64.
415 : # __LP64__ has slipped through, it therefore is not defined 415 if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then
416 else
417 GCC_BITS="64" 416 GCC_BITS="64"
418 fi 417 fi
419 fi 418 fi
@@ -686,7 +685,7 @@ EOF
686 if [ $CC = "gcc" ]; 685 if [ $CC = "gcc" ];
687 then 686 then
688 if [ $GCC_BITS = "64" ]; then 687 if [ $GCC_BITS = "64" ]; then
689 OUT="hpux64-parisc2-gcc" 688 OUT="hpux64-parisc-gcc"
690 else 689 else
691 OUT="hpux-parisc-gcc" 690 OUT="hpux-parisc-gcc"
692 fi 691 fi
@@ -701,7 +700,7 @@ EOF
701 if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU 700 if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU
702 echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi." 701 echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi."
703 echo " If you wish to build 32-bit library, the you have to" 702 echo " If you wish to build 32-bit library, the you have to"
704 echo " invoke './Configure hpux-ia64-cc' *manually*." 703 echo " invoke './Configure hpux-ia32-cc' *manually*."
705 if [ "$TEST" = "false" ]; then 704 if [ "$TEST" = "false" ]; then
706 echo " You have about 5 seconds to press Ctrl-C to abort." 705 echo " You have about 5 seconds to press Ctrl-C to abort."
707 (stty -icanon min 0 time 50; read waste) < /dev/tty 706 (stty -icanon min 0 time 50; read waste) < /dev/tty
diff --git a/src/lib/libssl/src/crypto/Makefile b/src/lib/libssl/src/crypto/Makefile
deleted file mode 100644
index eb49323ad5..0000000000
--- a/src/lib/libssl/src/crypto/Makefile
+++ /dev/null
@@ -1,133 +0,0 @@
1LIB= crypto
2CFLAGS+= -DNO_IDEA -DTERMIOS -DL_ENDIAN -DANSI_SOURCE
3CFLAGS+= -I${.CURDIR}/../include
4SRCS+= cryptlib.c mem.c cversion.c ex_data.c cpt_err.c
5CFLAGS+= -I${.CURDIR}/md2
6SRCS+= md2_dgst.c md2_one.c
7CFLAGS+= -I${.CURDIR}/md5
8SRCS+= md5_dgst.c md5_one.c
9CFLAGS+= -I${.CURDIR}/sha
10SRCS+= sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
11CFLAGS+= -I${.CURDIR}/mdc2
12SRCS+= mdc2dgst.c mdc2_one.c
13CFLAGS+= -I${.CURDIR}/hmac
14SRCS+= hmac.c
15CFLAGS+= -I${.CURDIR}/ripemd
16SRCS+= rmd_dgst.c rmd_one.c
17CFLAGS+= -I${.CURDIR}/des
18SRCS+= set_key.c ecb_enc.c cbc_enc.c ecb3_enc.c
19SRCS+= cfb64enc.c cfb64ede.c cfb_enc.c ofb64ede.c
20SRCS+= enc_read.c enc_writ.c ofb64enc.c ofb_enc.c
21SRCS+= str2key.c pcbc_enc.c qud_cksm.c rand_key.c
22SRCS+= read2pwd.c fcrypt.c xcbc_enc.c read_pwd.c
23SRCS+= rpc_enc.c cbc_cksm.c supp.c
24CFLAGS+= -I${.CURDIR}/rc2
25SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c
26SRCS+= rc2ofb64.c
27CFLAGS+= -I${.CURDIR}/rc4
28SRCS+= rc4_skey.c
29CFLAGS+= -I${.CURDIR}/rc5
30SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5cfb64.c
31SRCS+= rc5ofb64.c
32CFLAGS+= -I${.CURDIR}/idea
33SRCS+= i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c
34SRCS+= i_skey.c
35CFLAGS+= -I${.CURDIR}/bf
36SRCS+= bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c
37CFLAGS+= -I${.CURDIR}/cast
38SRCS+= c_skey.c c_ecb.c c_cfb64.c c_ofb64.c
39CFLAGS+= -I${.CURDIR}/bn
40SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c
41SRCS+= bn_mul.c bn_print.c bn_rand.c bn_shift.c bn_sub.c
42SRCS+= bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c
43SRCS+= bn_sqr.c bn_recp.c bn_mont.c bn_mpi.c
44CFLAGS+= -I${.CURDIR}/rsa
45SRCS+= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c
46SRCS+= rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c
47SRCS+= rsa_none.c
48CFLAGS+= -I${.CURDIR}/dsa
49SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c
50SRCS+= dsa_sign.c dsa_err.c
51CFLAGS+= -I${.CURDIR}/dh
52SRCS+= dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c
53CFLAGS+= -I${.CURDIR}/buffer
54SRCS+= buffer.c buf_err.c
55CFLAGS+= -I${.CURDIR}/bio
56SRCS+= bio_lib.c bio_cb.c bio_err.c bss_mem.c
57SRCS+= bss_null.c bss_fd.c bss_file.c bss_sock.c
58SRCS+= bss_conn.c bf_null.c bf_buff.c
59SRCS+= b_print.c b_dump.c b_sock.c bss_acpt.c
60SRCS+= bf_nbio.c
61CFLAGS+= -I${.CURDIR}/stack
62SRCS+= stack.c
63CFLAGS+= -I${.CURDIR}/lhash
64SRCS+= lhash.c lh_stats.c
65CFLAGS+= -I${.CURDIR}/rand
66SRCS+= md_rand.c randfile.c
67CFLAGS+= -I${.CURDIR}/err
68SRCS+= err.c err_all.c err_prn.c
69CFLAGS+= -I${.CURDIR}/objects
70SRCS+= obj_dat.c obj_lib.c obj_err.c
71CFLAGS+= -I${.CURDIR}/evp
72SRCS+= encode.c digest.c evp_enc.c evp_key.c
73SRCS+= e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c
74SRCS+= e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c
75SRCS+= e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c
76SRCS+= e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c
77SRCS+= e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c
78SRCS+= e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c
79SRCS+= e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c
80SRCS+= e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c
81SRCS+= m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c
82SRCS+= m_dss1.c m_mdc2.c m_ripemd.c p_open.c
83SRCS+= p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c
84SRCS+= p_dec.c bio_md.c bio_b64.c bio_enc.c
85SRCS+= evp_err.c e_null.c c_all.c evp_lib.c
86CFLAGS+= -I${.CURDIR}/pem
87SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c
88SRCS+= pem_all.c pem_err.c
89CFLAGS+= -I${.CURDIR}/asn1
90SRCS+= a_object.c a_bitstr.c a_utctm.c a_int.c
91SRCS+= a_octet.c a_print.c a_type.c a_set.c
92SRCS+= a_dup.c a_d2i_fp.c a_i2d_fp.c a_sign.c
93SRCS+= a_digest.c a_verify.c x_algor.c x_val.c
94SRCS+= x_pubkey.c x_sig.c x_req.c x_attrib.c
95SRCS+= x_name.c x_cinf.c x_x509.c x_crl.c
96SRCS+= x_info.c x_spki.c d2i_r_pr.c i2d_r_pr.c
97SRCS+= d2i_r_pu.c i2d_r_pu.c d2i_s_pr.c i2d_s_pr.c
98SRCS+= d2i_s_pu.c i2d_s_pu.c d2i_pu.c d2i_pr.c
99SRCS+= i2d_pu.c i2d_pr.c t_req.c t_x509.c
100SRCS+= t_pkey.c p7_i_s.c p7_signi.c p7_signd.c
101SRCS+= p7_recip.c p7_enc_c.c p7_evp.c p7_dgst.c
102SRCS+= p7_s_e.c p7_enc.c p7_lib.c f_int.c
103SRCS+= f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c
104SRCS+= d2i_dsap.c n_pkey.c a_hdr.c x_pkey.c
105SRCS+= a_bool.c x_exten.c asn1_par.c asn1_lib.c
106SRCS+= asn1_err.c a_meth.c a_bytes.c evp_asn1.c
107CFLAGS+= -I${.CURDIR}/x509
108SRCS+= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c
109SRCS+= x509_obj.c x509_req.c x509_vfy.c x509_set.c
110SRCS+= x509rset.c x509_err.c x509name.c x509_v3.c
111SRCS+= x509_ext.c x509pack.c x509type.c x509_lu.c
112SRCS+= x_all.c x509_txt.c by_file.c by_dir.c
113SRCS+= v3_net.c v3_x509.c
114CFLAGS+= -I${.CURDIR}/conf
115SRCS+= conf.c conf_err.c
116CFLAGS+= -I${.CURDIR}/txt_db
117SRCS+= txt_db.c
118CFLAGS+= -I${.CURDIR}/pkcs7
119SRCS+= pk7_lib.c pkcs7err.c pk7_doit.c
120
121.PATH: ${.CURDIR}/md2 ${.CURDIR}/md5 ${.CURDIR}/sha ${.CURDIR}/mdc2 \
122 ${.CURDIR}/hmac ${.CURDIR}/ripemd ${.CURDIR}/des ${.CURDIR}/rc2 \
123 ${.CURDIR}/rc4 ${.CURDIR}/rc5 ${.CURDIR}/idea ${.CURDIR}/bf \
124 ${.CURDIR}/cast ${.CURDIR}/bn ${.CURDIR}/rsa ${.CURDIR}/dsa \
125 ${.CURDIR}/dh ${.CURDIR}/buffer ${.CURDIR}/bio ${.CURDIR}/stack \
126 ${.CURDIR}/lhash ${.CURDIR}/rand ${.CURDIR}/err ${.CURDIR}/objects \
127 ${.CURDIR}/evp ${.CURDIR}/pem ${.CURDIR}/asn1 ${.CURDIR}/asn1 \
128 ${.CURDIR}/x509 ${.CURDIR}/conf txt_db/txt_db.c ${.CURDIR}/pkcs7 \
129 ${.CURDIR}/txt_db
130
131.include <bsd.lib.mk>
132
133
diff --git a/src/lib/libssl/src/crypto/Makefile.ssl b/src/lib/libssl/src/crypto/Makefile.ssl
new file mode 100644
index 0000000000..3071e3cb86
--- /dev/null
+++ b/src/lib/libssl/src/crypto/Makefile.ssl
@@ -0,0 +1,218 @@
1#
2# SSLeay/crypto/Makefile
3#
4
5DIR= crypto
6TOP= ..
7CC= cc
8INCLUDE= -I. -I$(TOP) -I../include
9INCLUDES= -I.. -I../.. -I../../include
10CFLAG= -g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP= /usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18RM= rm -f
19AR= ar r
20
21PEX_LIBS=
22EX_LIBS=
23
24CFLAGS= $(INCLUDE) $(CFLAG)
25
26
27LIBS=
28
29SDIRS= md2 md5 sha mdc2 hmac ripemd \
30 des rc2 rc4 rc5 idea bf cast \
31 bn ec rsa dsa dh dso engine aes \
32 buffer bio stack lhash rand err objects \
33 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
34
35GENERAL=Makefile README crypto-lib.com install.com
36
37LIB= $(TOP)/libcrypto.a
38SHARED_LIB= libcrypto$(SHLIB_EXT)
39LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c
40LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o
41
42SRC= $(LIBSRC)
43
44EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
45 ossl_typ.h
46HEADER= cryptlib.h buildinf.h md32_common.h o_time.h $(EXHEADER)
47
48ALL= $(GENERAL) $(SRC) $(HEADER)
49
50top:
51 @(cd ..; $(MAKE) DIRS=$(DIR) all)
52
53all: buildinf.h lib subdirs shared
54
55buildinf.h: ../Makefile.ssl
56 ( echo "#ifndef MK1MF_BUILD"; \
57 echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
58 echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
59 echo ' #define PLATFORM "$(PLATFORM)"'; \
60 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
61 echo '#endif' ) >buildinf.h
62
63testapps:
64 if echo ${SDIRS} | fgrep ' des '; \
65 then cd des && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' des; fi
66 cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps
67
68subdirs:
69 @for i in $(SDIRS) ;\
70 do \
71 (cd $$i && echo "making all in crypto/$$i..." && \
72 $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
73 done;
74
75files:
76 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
77 @for i in $(SDIRS) ;\
78 do \
79 (cd $$i && echo "making 'files' in crypto/$$i..." && \
80 $(MAKE) PERL='${PERL}' files ); \
81 done;
82
83links:
84 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
85 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
86 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
87 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
88 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
89 @for i in $(SDIRS); do \
90 (cd $$i && echo "making links in crypto/$$i..." && \
91 $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
92 done;
93
94lib: $(LIBOBJ)
95 $(AR) $(LIB) $(LIBOBJ)
96 $(RANLIB) $(LIB) || echo Never mind.
97 @touch lib
98
99shared:
100 if [ -n "$(SHARED_LIBS)" ]; then \
101 (cd ..; $(MAKE) $(SHARED_LIB)); \
102 fi
103
104libs:
105 @for i in $(SDIRS) ;\
106 do \
107 (cd $$i && echo "making libs in crypto/$$i..." && \
108 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
109 done;
110
111tests:
112 @for i in $(SDIRS) ;\
113 do \
114 (cd $$i && echo "making tests in crypto/$$i..." && \
115 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
116 done;
117
118install:
119 @for i in $(EXHEADER) ;\
120 do \
121 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
122 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
123 done;
124 @for i in $(SDIRS) ;\
125 do \
126 (cd $$i && echo "making install in crypto/$$i..." && \
127 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
128 done;
129
130lint:
131 @for i in $(SDIRS) ;\
132 do \
133 (cd $$i && echo "making lint in crypto/$$i..." && \
134 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
135 done;
136
137depend:
138 if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
139 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
140 if [ ! -s buildinf.h ]; then rm buildinf.h; fi
141 @for i in $(SDIRS) ;\
142 do \
143 (cd $$i && echo "making depend in crypto/$$i..." && \
144 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
145 done;
146
147clean:
148 rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
149 @for i in $(SDIRS) ;\
150 do \
151 (cd $$i && echo "making clean in crypto/$$i..." && \
152 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
153 done;
154
155dclean:
156 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
157 mv -f Makefile.new $(MAKEFILE)
158 @for i in $(SDIRS) ;\
159 do \
160 (cd $$i && echo "making dclean in crypto/$$i..." && \
161 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
162 done;
163
164# DO NOT DELETE THIS LINE -- make depend depends on it.
165
166cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
167cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
168cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
169cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
170cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cpt_err.c
171cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
172cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
173cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
174cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
175cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h
176cryptlib.o: ../include/openssl/symhacks.h cryptlib.c cryptlib.h
177cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
178cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
179cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
180cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
181cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
182cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
183ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
184ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
185ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
186ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
187ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
188ex_data.o: ../include/openssl/safestack.h ../include/openssl/stack.h
189ex_data.o: ../include/openssl/symhacks.h cryptlib.h ex_data.c
190mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
191mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
192mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
193mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
194mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
195mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c
196mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
197mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
198mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h
199mem_clr.o: ../include/openssl/symhacks.h mem_clr.c
200mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
201mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
202mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
203mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
204mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
205mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
206o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
207o_time.o: o_time.h
208tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
209tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
210tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
211tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
212tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h
213tmdiff.o: ../include/openssl/symhacks.h ../include/openssl/tmdiff.h cryptlib.h
214tmdiff.o: tmdiff.c
215uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
216uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
217uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h
218uid.o: ../include/openssl/symhacks.h uid.c
diff --git a/src/lib/libssl/src/crypto/acss/acss.h b/src/lib/libssl/src/crypto/acss/acss.h
new file mode 100644
index 0000000000..476339fb9e
--- /dev/null
+++ b/src/lib/libssl/src/crypto/acss/acss.h
@@ -0,0 +1,47 @@
1/* $OpenBSD: acss.h,v 1.3 2004/02/13 10:05:44 hshoexer Exp $ */
2/*
3 * Copyright (c) 2004 The OpenBSD project
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef _ACSS_H_
19#define _ACSS_H_
20
21#ifdef OPENSSL_NO_ACSS
22#error acss is idsabled.
23#endif
24
25/* 40bit key */
26#define ACSS_KEYSIZE 5
27
28/* modes of acss */
29#define ACSS_MODE0 0
30#define ACSS_MODE1 1
31#define ACSS_MODE2 2
32#define ACSS_MODE3 3
33
34typedef struct acss_key_st {
35 unsigned int lfsr17; /* current state of lfsrs */
36 unsigned int lfsr25;
37 unsigned int lfsrsum;
38 unsigned char seed[ACSS_KEYSIZE];
39 unsigned char data[ACSS_KEYSIZE];
40 int encrypt;
41 int mode;
42} ACSS_KEY;
43
44void acss_setkey(ACSS_KEY *, const unsigned char *, int, int);
45void acss(ACSS_KEY *, unsigned long, const unsigned char *, unsigned char *);
46
47#endif /* ifndef _ACSS_H_ */
diff --git a/src/lib/libssl/src/crypto/acss/acss_enc.c b/src/lib/libssl/src/crypto/acss/acss_enc.c
new file mode 100644
index 0000000000..829830bc54
--- /dev/null
+++ b/src/lib/libssl/src/crypto/acss/acss_enc.c
@@ -0,0 +1,177 @@
1/* $OpenBSD: acss_enc.c,v 1.4 2004/02/13 10:05:44 hshoexer Exp $ */
2/*
3 * Copyright (c) 2004 The OpenBSD project
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#include <openssl/acss.h>
19
20/* decryption sbox */
21static unsigned char sboxdec[] = {
22 0x33, 0x73, 0x3b, 0x26, 0x63, 0x23, 0x6b, 0x76,
23 0x3e, 0x7e, 0x36, 0x2b, 0x6e, 0x2e, 0x66, 0x7b,
24 0xd3, 0x93, 0xdb, 0x06, 0x43, 0x03, 0x4b, 0x96,
25 0xde, 0x9e, 0xd6, 0x0b, 0x4e, 0x0e, 0x46, 0x9b,
26 0x57, 0x17, 0x5f, 0x82, 0xc7, 0x87, 0xcf, 0x12,
27 0x5a, 0x1a, 0x52, 0x8f, 0xca, 0x8a, 0xc2, 0x1f,
28 0xd9, 0x99, 0xd1, 0x00, 0x49, 0x09, 0x41, 0x90,
29 0xd8, 0x98, 0xd0, 0x01, 0x48, 0x08, 0x40, 0x91,
30 0x3d, 0x7d, 0x35, 0x24, 0x6d, 0x2d, 0x65, 0x74,
31 0x3c, 0x7c, 0x34, 0x25, 0x6c, 0x2c, 0x64, 0x75,
32 0xdd, 0x9d, 0xd5, 0x04, 0x4d, 0x0d, 0x45, 0x94,
33 0xdc, 0x9c, 0xd4, 0x05, 0x4c, 0x0c, 0x44, 0x95,
34 0x59, 0x19, 0x51, 0x80, 0xc9, 0x89, 0xc1, 0x10,
35 0x58, 0x18, 0x50, 0x81, 0xc8, 0x88, 0xc0, 0x11,
36 0xd7, 0x97, 0xdf, 0x02, 0x47, 0x07, 0x4f, 0x92,
37 0xda, 0x9a, 0xd2, 0x0f, 0x4a, 0x0a, 0x42, 0x9f,
38 0x53, 0x13, 0x5b, 0x86, 0xc3, 0x83, 0xcb, 0x16,
39 0x5e, 0x1e, 0x56, 0x8b, 0xce, 0x8e, 0xc6, 0x1b,
40 0xb3, 0xf3, 0xbb, 0xa6, 0xe3, 0xa3, 0xeb, 0xf6,
41 0xbe, 0xfe, 0xb6, 0xab, 0xee, 0xae, 0xe6, 0xfb,
42 0x37, 0x77, 0x3f, 0x22, 0x67, 0x27, 0x6f, 0x72,
43 0x3a, 0x7a, 0x32, 0x2f, 0x6a, 0x2a, 0x62, 0x7f,
44 0xb9, 0xf9, 0xb1, 0xa0, 0xe9, 0xa9, 0xe1, 0xf0,
45 0xb8, 0xf8, 0xb0, 0xa1, 0xe8, 0xa8, 0xe0, 0xf1,
46 0x5d, 0x1d, 0x55, 0x84, 0xcd, 0x8d, 0xc5, 0x14,
47 0x5c, 0x1c, 0x54, 0x85, 0xcc, 0x8c, 0xc4, 0x15,
48 0xbd, 0xfd, 0xb5, 0xa4, 0xed, 0xad, 0xe5, 0xf4,
49 0xbc, 0xfc, 0xb4, 0xa5, 0xec, 0xac, 0xe4, 0xf5,
50 0x39, 0x79, 0x31, 0x20, 0x69, 0x29, 0x61, 0x70,
51 0x38, 0x78, 0x30, 0x21, 0x68, 0x28, 0x60, 0x71,
52 0xb7, 0xf7, 0xbf, 0xa2, 0xe7, 0xa7, 0xef, 0xf2,
53 0xba, 0xfa, 0xb2, 0xaf, 0xea, 0xaa, 0xe2, 0xff
54};
55
56/* encryption sbox */
57static unsigned char sboxenc[] = {
58 0x33, 0x3b, 0x73, 0x15, 0x53, 0x5b, 0x13, 0x75,
59 0x3d, 0x35, 0x7d, 0x1b, 0x5d, 0x55, 0x1d, 0x7b,
60 0x67, 0x6f, 0x27, 0x81, 0xc7, 0xcf, 0x87, 0x21,
61 0x69, 0x61, 0x29, 0x8f, 0xc9, 0xc1, 0x89, 0x2f,
62 0xe3, 0xeb, 0xa3, 0x05, 0x43, 0x4b, 0x03, 0xa5,
63 0xed, 0xe5, 0xad, 0x0b, 0x4d, 0x45, 0x0d, 0xab,
64 0xea, 0xe2, 0xaa, 0x00, 0x4a, 0x42, 0x0a, 0xa0,
65 0xe8, 0xe0, 0xa8, 0x02, 0x48, 0x40, 0x08, 0xa2,
66 0x3e, 0x36, 0x7e, 0x14, 0x5e, 0x56, 0x1e, 0x74,
67 0x3c, 0x34, 0x7c, 0x16, 0x5c, 0x54, 0x1c, 0x76,
68 0x6a, 0x62, 0x2a, 0x80, 0xca, 0xc2, 0x8a, 0x20,
69 0x68, 0x60, 0x28, 0x82, 0xc8, 0xc0, 0x88, 0x22,
70 0xee, 0xe6, 0xae, 0x04, 0x4e, 0x46, 0x0e, 0xa4,
71 0xec, 0xe4, 0xac, 0x06, 0x4c, 0x44, 0x0c, 0xa6,
72 0xe7, 0xef, 0xa7, 0x01, 0x47, 0x4f, 0x07, 0xa1,
73 0xe9, 0xe1, 0xa9, 0x0f, 0x49, 0x41, 0x09, 0xaf,
74 0x63, 0x6b, 0x23, 0x85, 0xc3, 0xcb, 0x83, 0x25,
75 0x6d, 0x65, 0x2d, 0x8b, 0xcd, 0xc5, 0x8d, 0x2b,
76 0x37, 0x3f, 0x77, 0x11, 0x57, 0x5f, 0x17, 0x71,
77 0x39, 0x31, 0x79, 0x1f, 0x59, 0x51, 0x19, 0x7f,
78 0xb3, 0xbb, 0xf3, 0x95, 0xd3, 0xdb, 0x93, 0xf5,
79 0xbd, 0xb5, 0xfd, 0x9b, 0xdd, 0xd5, 0x9d, 0xfb,
80 0xba, 0xb2, 0xfa, 0x90, 0xda, 0xd2, 0x9a, 0xf0,
81 0xb8, 0xb0, 0xf8, 0x92, 0xd8, 0xd0, 0x98, 0xf2,
82 0x6e, 0x66, 0x2e, 0x84, 0xce, 0xc6, 0x8e, 0x24,
83 0x6c, 0x64, 0x2c, 0x86, 0xcc, 0xc4, 0x8c, 0x26,
84 0x3a, 0x32, 0x7a, 0x10, 0x5a, 0x52, 0x1a, 0x70,
85 0x38, 0x30, 0x78, 0x12, 0x58, 0x50, 0x18, 0x72,
86 0xbe, 0xb6, 0xfe, 0x94, 0xde, 0xd6, 0x9e, 0xf4,
87 0xbc, 0xb4, 0xfc, 0x96, 0xdc, 0xd4, 0x9c, 0xf6,
88 0xb7, 0xbf, 0xf7, 0x91, 0xd7, 0xdf, 0x97, 0xf1,
89 0xb9, 0xb1, 0xf9, 0x9f, 0xd9, 0xd1, 0x99, 0xff
90};
91
92/*
93 * Two linear feedback shift registers are used:
94 *
95 * lfsr17: polynomial of degree 17, primitive modulo 2 (listed in Schneier)
96 * x^15 + x + 1
97 * lfsr25: polynomial of degree 25, not know if primitive modulo 2
98 * x^13 + x^5 + x^4 + x + 1
99 *
100 * Output bits are discarded, instead the feedback bits are added to produce
101 * the cipher stream. Depending on the mode, feedback bytes may be inverted
102 * bit-wise before addition.
103 *
104 * The lfsrs are seeded with bytes from the raw key:
105 *
106 * lfsr17: byte 0[0:7] at bit 9
107 * byte 1[0:7] at bit 0
108 *
109 * lfsr25: byte 2[0:4] at bit 16
110 * byte 2[5:7] at bit 22
111 * byte 3[0:7] at bit 8
112 * byte 4[0:7] at bit 0
113 *
114 * To prevent 0 cycles, 1's are inject at bit 8 in lfrs17 and bit 21 in
115 * lfsr25.
116 *
117 */
118
119void
120acss(ACSS_KEY *key, unsigned long len, const unsigned char *in,
121 unsigned char *out)
122{
123 unsigned long i;
124 unsigned long lfsr17tmp, lfsr25tmp, lfsrsumtmp;
125
126 lfsrsumtmp = lfsr17tmp = lfsr25tmp = 0;
127
128 /* keystream is sum of lfsrs */
129 for (i = 0; i < len; i++) {
130 lfsr17tmp = key->lfsr17 ^ (key->lfsr17 >> 14);
131 key->lfsr17 = (key->lfsr17 >> 8)
132 ^ (lfsr17tmp << 9)
133 ^ (lfsr17tmp << 12)
134 ^ (lfsr17tmp << 15);
135 key->lfsr17 &= 0x1ffff; /* 17 bit LFSR */
136
137 lfsr25tmp = key->lfsr25
138 ^ (key->lfsr25 >> 3)
139 ^ (key->lfsr25 >> 4)
140 ^ (key->lfsr25 >> 12);
141 key->lfsr25 = (key->lfsr25 >> 8) ^ (lfsr25tmp << 17);
142 key->lfsr25 &= 0x1ffffff; /* 25 bit LFSR */
143
144 lfsrsumtmp = key->lfsrsum;
145
146 /* addition */
147 switch (key->mode) {
148 case ACSS_MODE3:
149 key->lfsrsum = 0xff & ~(key->lfsr17 >> 9);
150 key->lfsrsum += 0xff & ~(key->lfsr25 >> 17);
151 break;
152 case ACSS_MODE2:
153 key->lfsrsum = key->lfsr17 >> 9;
154 key->lfsrsum += 0xff & ~(key->lfsr25 >> 17);
155 break;
156 case ACSS_MODE1:
157 key->lfsrsum = 0xff & ~(key->lfsr17 >> 9);
158 key->lfsrsum += key->lfsr25 >> 17;
159 break;
160 case ACSS_MODE0:
161 default:
162 key->lfsrsum = key->lfsr17 >> 9;
163 key->lfsrsum += key->lfsr25 >> 17;
164 break;
165 }
166 key->lfsrsum += (lfsrsumtmp >> 8);
167
168 if (in == (unsigned char *)0)
169 /* generate only a keystream */
170 out[i] = key->lfsrsum & 0xff;
171 else if (key->encrypt) {
172 out[i] = sboxenc[(in[i] ^ key->lfsrsum) & 0xff];
173 } else {
174 out[i] = (sboxdec[in[i]] ^ key->lfsrsum) & 0xff;
175 }
176 }
177}
diff --git a/src/lib/libssl/src/crypto/acss/acss_skey.c b/src/lib/libssl/src/crypto/acss/acss_skey.c
new file mode 100644
index 0000000000..08e5685fcf
--- /dev/null
+++ b/src/lib/libssl/src/crypto/acss/acss_skey.c
@@ -0,0 +1,86 @@
1/* $OpenBSD: acss_skey.c,v 1.2 2004/01/23 19:23:33 hshoexer Exp $ */
2/*
3 * Copyright (c) 2004 The OpenBSD project
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#include <openssl/acss.h>
19
20static unsigned char reverse[] = {
21 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
22 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
23 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
24 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
25 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
26 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
27 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
28 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
29 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
30 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
31 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
32 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
33 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
34 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
35 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
36 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
37 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
38 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
39 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
40 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
41 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
42 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
43 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
44 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
45 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
46 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
47 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
48 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
49 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
50 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
51 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
52 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
53};
54
55static void
56acss_seed(ACSS_KEY *key)
57{
58 int i;
59
60 for (i = 0; i < ACSS_KEYSIZE; i++)
61 key->seed[i] = reverse[key->data[i]];
62
63 /* seed lfsrs */
64 key->lfsr17 = key->seed[1]
65 | (key->seed[0] << 9)
66 | (1 << 8); /* inject 1 at bit 9 */
67 key->lfsr25 = key->seed[4]
68 | (key->seed[3] << 8)
69 | ((key->seed[2] & 0x1f) << 16)
70 | ((key->seed[2] & 0xe0) << 17)
71 | (1 << 21); /* inject 1 at bit 22 */
72
73 key->lfsrsum = 0;
74}
75
76void
77acss_setkey(ACSS_KEY *key, const unsigned char *data, int enc, int mode)
78{
79 memcpy(key->data, data, sizeof(key->data));
80
81 if (enc != -1)
82 key->encrypt = enc;
83 key->mode = mode;
84
85 acss_seed(key);
86}
diff --git a/src/lib/libssl/src/crypto/aes/Makefile.ssl b/src/lib/libssl/src/crypto/aes/Makefile.ssl
new file mode 100644
index 0000000000..f353aeb697
--- /dev/null
+++ b/src/lib/libssl/src/crypto/aes/Makefile.ssl
@@ -0,0 +1,103 @@
1#
2# crypto/aes/Makefile
3#
4
5DIR= aes
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP= /usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr
21CFLAGS= $(INCLUDES) $(CFLAG)
22
23GENERAL=Makefile
24#TEST=aestest.c
25TEST=
26APPS=
27
28LIB=$(TOP)/libcrypto.a
29LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c aes_ctr.c
30LIBOBJ=aes_core.o aes_misc.o aes_ecb.o aes_cbc.o aes_cfb.o aes_ofb.o aes_ctr.o
31
32SRC= $(LIBSRC)
33
34EXHEADER= aes.h
35HEADER= aes_locl.h $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49$(LIBOBJ): $(LIBSRC)
50
51files:
52 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
53
54links:
55 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
56 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
57 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
58 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
59
60install: installs
61
62installs:
63 @for i in $(EXHEADER) ; \
64 do \
65 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
66 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
67 done;
68
69tags:
70 ctags $(SRC)
71
72tests:
73
74lint:
75 lint -DLINT $(INCLUDES) $(SRC)>fluff
76
77depend:
78 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
79
80dclean:
81 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
82 mv -f Makefile.new $(MAKEFILE)
83
84clean:
85 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
86
87# DO NOT DELETE THIS LINE -- make depend depends on it.
88
89aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
90aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c aes_locl.h
91aes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
92aes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c aes_locl.h
93aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
94aes_core.o: ../../include/openssl/opensslconf.h aes_core.c aes_locl.h
95aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
96aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h
97aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
98aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
99aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
100aes_misc.o: ../../include/openssl/opensslconf.h
101aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c
102aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
103aes_ofb.o: ../../include/openssl/opensslconf.h aes_locl.h aes_ofb.c
diff --git a/src/lib/libssl/src/crypto/aes/aes_cbc.c b/src/lib/libssl/src/crypto/aes/aes_cbc.c
index 1222a21002..86b27b10d6 100644
--- a/src/lib/libssl/src/crypto/aes/aes_cbc.c
+++ b/src/lib/libssl/src/crypto/aes/aes_cbc.c
@@ -104,7 +104,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
104 memcpy(tmp, in, AES_BLOCK_SIZE); 104 memcpy(tmp, in, AES_BLOCK_SIZE);
105 AES_decrypt(tmp, tmp, key); 105 AES_decrypt(tmp, tmp, key);
106 for(n=0; n < len; ++n) 106 for(n=0; n < len; ++n)
107 out[n] = tmp[n] ^ ivec[n]; 107 out[n] ^= ivec[n];
108 memcpy(ivec, tmp, AES_BLOCK_SIZE); 108 memcpy(ivec, tmp, AES_BLOCK_SIZE);
109 } 109 }
110 } 110 }
diff --git a/src/lib/libssl/src/crypto/asn1/Makefile.ssl b/src/lib/libssl/src/crypto/asn1/Makefile.ssl
new file mode 100644
index 0000000000..cb45194d48
--- /dev/null
+++ b/src/lib/libssl/src/crypto/asn1/Makefile.ssl
@@ -0,0 +1,1152 @@
1#
2# SSLeay/crypto/asn1/Makefile
3#
4
5DIR= asn1
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile README
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.c a_int.c a_octet.c \
27 a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c \
28 a_enum.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c a_strex.c \
29 x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_bignum.c \
30 x_long.c x_name.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c \
31 d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c\
32 t_req.c t_x509.c t_x509a.c t_crl.c t_pkey.c t_spki.c t_bitst.c \
33 tasn_new.c tasn_fre.c tasn_enc.c tasn_dec.c tasn_utl.c tasn_typ.c \
34 f_int.c f_string.c n_pkey.c \
35 f_enum.c a_hdr.c x_pkey.c a_bool.c x_exten.c \
36 asn1_par.c asn1_lib.c asn1_err.c a_meth.c a_bytes.c a_strnid.c \
37 evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c asn_moid.c
38LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_gentm.o a_time.o a_int.o a_octet.o \
39 a_print.o a_type.o a_set.o a_dup.o a_d2i_fp.o a_i2d_fp.o \
40 a_enum.o a_utf8.o a_sign.o a_digest.o a_verify.o a_mbstr.o a_strex.o \
41 x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o x_bignum.o \
42 x_long.o x_name.o x_x509.o x_x509a.o x_crl.o x_info.o x_spki.o nsseq.o \
43 d2i_pu.o d2i_pr.o i2d_pu.o i2d_pr.o \
44 t_req.o t_x509.o t_x509a.o t_crl.o t_pkey.o t_spki.o t_bitst.o \
45 tasn_new.o tasn_fre.o tasn_enc.o tasn_dec.o tasn_utl.o tasn_typ.o \
46 f_int.o f_string.o n_pkey.o \
47 f_enum.o a_hdr.o x_pkey.o a_bool.o x_exten.o \
48 asn1_par.o asn1_lib.o asn1_err.o a_meth.o a_bytes.o a_strnid.o \
49 evp_asn1.o asn_pack.o p5_pbe.o p5_pbev2.o p8_pkey.o asn_moid.o
50
51SRC= $(LIBSRC)
52
53EXHEADER= asn1.h asn1_mac.h asn1t.h
54HEADER= $(EXHEADER)
55
56ALL= $(GENERAL) $(SRC) $(HEADER)
57
58top:
59 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
60
61test: test.c
62 cc -g -I../../include -c test.c
63 cc -g -I../../include -o test test.o -L../.. -lcrypto
64
65pk: pk.c
66 cc -g -I../../include -c pk.c
67 cc -g -I../../include -o pk pk.o -L../.. -lcrypto
68
69all: lib
70
71lib: $(LIBOBJ)
72 $(AR) $(LIB) $(LIBOBJ)
73 $(RANLIB) $(LIB) || echo Never mind.
74 @touch lib
75
76files:
77 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
78
79links:
80 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
81 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
82 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
83 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
84
85install:
86 @for i in $(EXHEADER) ; \
87 do \
88 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
89 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
90 done;
91
92tags:
93 ctags $(SRC)
94
95tests:
96
97lint:
98 lint -DLINT $(INCLUDES) $(SRC)>fluff
99
100depend:
101 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
102
103dclean:
104 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
105 mv -f Makefile.new $(MAKEFILE)
106
107clean:
108 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
109
110
111# DO NOT DELETE THIS LINE -- make depend depends on it.
112
113a_bitstr.o: ../../e_os.h ../../include/openssl/asn1.h
114a_bitstr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
115a_bitstr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
116a_bitstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
117a_bitstr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
118a_bitstr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
119a_bitstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
120a_bitstr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bitstr.c
121a_bool.o: ../../e_os.h ../../include/openssl/asn1.h
122a_bool.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
123a_bool.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
124a_bool.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
125a_bool.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
126a_bool.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
127a_bool.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
128a_bool.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
129a_bool.o: ../cryptlib.h a_bool.c
130a_bytes.o: ../../e_os.h ../../include/openssl/asn1.h
131a_bytes.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
132a_bytes.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
133a_bytes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
134a_bytes.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
135a_bytes.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
136a_bytes.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
137a_bytes.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bytes.c
138a_d2i_fp.o: ../../e_os.h ../../include/openssl/asn1.h
139a_d2i_fp.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
140a_d2i_fp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
141a_d2i_fp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
142a_d2i_fp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
143a_d2i_fp.o: ../../include/openssl/opensslconf.h
144a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
145a_d2i_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
146a_d2i_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_d2i_fp.c
147a_digest.o: ../../e_os.h ../../include/openssl/aes.h
148a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
149a_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
150a_digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
151a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
152a_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
153a_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
154a_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
155a_digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
156a_digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
157a_digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
158a_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
159a_digest.o: ../../include/openssl/opensslconf.h
160a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
161a_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
162a_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
163a_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
164a_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
165a_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
166a_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
167a_digest.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
168a_digest.o: ../cryptlib.h a_digest.c
169a_dup.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
170a_dup.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
171a_dup.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
172a_dup.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
173a_dup.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
174a_dup.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
175a_dup.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
176a_dup.o: ../cryptlib.h a_dup.c
177a_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
178a_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
179a_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
180a_enum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
181a_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
182a_enum.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
183a_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
184a_enum.o: ../cryptlib.h a_enum.c
185a_gentm.o: ../../e_os.h ../../include/openssl/asn1.h
186a_gentm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
187a_gentm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
188a_gentm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
189a_gentm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
190a_gentm.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
191a_gentm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
192a_gentm.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_gentm.c
193a_hdr.o: ../../e_os.h ../../include/openssl/asn1.h
194a_hdr.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
195a_hdr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
196a_hdr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
197a_hdr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
198a_hdr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
199a_hdr.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
200a_hdr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
201a_hdr.o: ../cryptlib.h a_hdr.c
202a_i2d_fp.o: ../../e_os.h ../../include/openssl/asn1.h
203a_i2d_fp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
204a_i2d_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
205a_i2d_fp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
206a_i2d_fp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
207a_i2d_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
208a_i2d_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
209a_i2d_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_i2d_fp.c
210a_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
211a_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
212a_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
213a_int.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
214a_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
215a_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
216a_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
217a_int.o: ../cryptlib.h a_int.c
218a_mbstr.o: ../../e_os.h ../../include/openssl/asn1.h
219a_mbstr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
220a_mbstr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
221a_mbstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
222a_mbstr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
223a_mbstr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
224a_mbstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
225a_mbstr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_mbstr.c
226a_meth.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
227a_meth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
228a_meth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
229a_meth.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
230a_meth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
231a_meth.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
232a_meth.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
233a_meth.o: ../cryptlib.h a_meth.c
234a_object.o: ../../e_os.h ../../include/openssl/asn1.h
235a_object.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
236a_object.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
237a_object.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
238a_object.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
239a_object.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
240a_object.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
241a_object.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
242a_object.o: ../../include/openssl/symhacks.h ../cryptlib.h a_object.c
243a_octet.o: ../../e_os.h ../../include/openssl/asn1.h
244a_octet.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
245a_octet.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
246a_octet.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
247a_octet.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
248a_octet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
249a_octet.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
250a_octet.o: ../../include/openssl/symhacks.h ../cryptlib.h a_octet.c
251a_print.o: ../../e_os.h ../../include/openssl/asn1.h
252a_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
253a_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
254a_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
255a_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
256a_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
257a_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
258a_print.o: ../../include/openssl/symhacks.h ../cryptlib.h a_print.c
259a_set.o: ../../e_os.h ../../include/openssl/asn1.h
260a_set.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
261a_set.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
262a_set.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
263a_set.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
264a_set.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
265a_set.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
266a_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
267a_set.o: ../cryptlib.h a_set.c
268a_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
269a_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
270a_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
271a_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
272a_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
273a_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
274a_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
275a_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
276a_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
277a_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
278a_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
279a_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
280a_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
281a_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
282a_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
283a_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
284a_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
285a_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
286a_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
287a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
288a_sign.o: ../cryptlib.h a_sign.c
289a_strex.o: ../../e_os.h ../../include/openssl/aes.h
290a_strex.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
291a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
292a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
293a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
294a_strex.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
295a_strex.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
296a_strex.o: ../../include/openssl/err.h ../../include/openssl/evp.h
297a_strex.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
298a_strex.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
299a_strex.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
300a_strex.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
301a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
302a_strex.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
303a_strex.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
304a_strex.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
305a_strex.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
306a_strex.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
307a_strex.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
308a_strex.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
309a_strex.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_strex.c charmap.h
310a_strnid.o: ../../e_os.h ../../include/openssl/asn1.h
311a_strnid.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
312a_strnid.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
313a_strnid.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
314a_strnid.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
315a_strnid.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
316a_strnid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
317a_strnid.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
318a_strnid.o: ../../include/openssl/symhacks.h ../cryptlib.h a_strnid.c
319a_time.o: ../../e_os.h ../../include/openssl/asn1.h
320a_time.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
321a_time.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
322a_time.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
323a_time.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
324a_time.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
325a_time.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
326a_time.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
327a_time.o: ../cryptlib.h ../o_time.h a_time.c
328a_type.o: ../../e_os.h ../../include/openssl/asn1.h
329a_type.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
330a_type.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
331a_type.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
332a_type.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
333a_type.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
334a_type.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
335a_type.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
336a_type.o: ../cryptlib.h a_type.c
337a_utctm.o: ../../e_os.h ../../include/openssl/asn1.h
338a_utctm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
339a_utctm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
340a_utctm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
341a_utctm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
342a_utctm.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
343a_utctm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
344a_utctm.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_utctm.c
345a_utf8.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
346a_utf8.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
347a_utf8.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
348a_utf8.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
349a_utf8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
350a_utf8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
351a_utf8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
352a_utf8.o: ../cryptlib.h a_utf8.c
353a_verify.o: ../../e_os.h ../../include/openssl/aes.h
354a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
355a_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
356a_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
357a_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
358a_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
359a_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
360a_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h
361a_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
362a_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
363a_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
364a_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
365a_verify.o: ../../include/openssl/opensslconf.h
366a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
367a_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
368a_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
369a_verify.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
370a_verify.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
371a_verify.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
372a_verify.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
373a_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
374a_verify.o: ../cryptlib.h a_verify.c
375asn1_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
376asn1_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
377asn1_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
378asn1_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
379asn1_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
380asn1_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
381asn1_err.o: ../../include/openssl/symhacks.h asn1_err.c
382asn1_lib.o: ../../e_os.h ../../include/openssl/asn1.h
383asn1_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
384asn1_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
385asn1_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
386asn1_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
387asn1_lib.o: ../../include/openssl/opensslconf.h
388asn1_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
389asn1_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
390asn1_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_lib.c
391asn1_par.o: ../../e_os.h ../../include/openssl/asn1.h
392asn1_par.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
393asn1_par.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
394asn1_par.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
395asn1_par.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
396asn1_par.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
397asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
398asn1_par.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
399asn1_par.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c
400asn_moid.o: ../../e_os.h ../../include/openssl/aes.h
401asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
402asn_moid.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
403asn_moid.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
404asn_moid.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
405asn_moid.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
406asn_moid.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
407asn_moid.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
408asn_moid.o: ../../include/openssl/err.h ../../include/openssl/evp.h
409asn_moid.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
410asn_moid.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
411asn_moid.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
412asn_moid.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
413asn_moid.o: ../../include/openssl/opensslconf.h
414asn_moid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
415asn_moid.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
416asn_moid.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
417asn_moid.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
418asn_moid.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
419asn_moid.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
420asn_moid.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
421asn_moid.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
422asn_moid.o: ../cryptlib.h asn_moid.c
423asn_pack.o: ../../e_os.h ../../include/openssl/asn1.h
424asn_pack.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
425asn_pack.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
426asn_pack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
427asn_pack.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
428asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
429asn_pack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
430asn_pack.o: ../../include/openssl/symhacks.h ../cryptlib.h asn_pack.c
431d2i_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
432d2i_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
433d2i_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
434d2i_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
435d2i_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
436d2i_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
437d2i_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
438d2i_pr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
439d2i_pr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
440d2i_pr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
441d2i_pr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
442d2i_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
443d2i_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
444d2i_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
445d2i_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
446d2i_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
447d2i_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
448d2i_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
449d2i_pr.o: ../../include/openssl/ui_compat.h ../cryptlib.h d2i_pr.c
450d2i_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
451d2i_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
452d2i_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
453d2i_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
454d2i_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
455d2i_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
456d2i_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
457d2i_pu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
458d2i_pu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
459d2i_pu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
460d2i_pu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
461d2i_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
462d2i_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
463d2i_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
464d2i_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
465d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
466d2i_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
467d2i_pu.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
468d2i_pu.o: ../../include/openssl/ui_compat.h ../cryptlib.h d2i_pu.c
469evp_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
470evp_asn1.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
471evp_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
472evp_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
473evp_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
474evp_asn1.o: ../../include/openssl/opensslconf.h
475evp_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
476evp_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
477evp_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_asn1.c
478f_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
479f_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
480f_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
481f_enum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
482f_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
483f_enum.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
484f_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
485f_enum.o: ../cryptlib.h f_enum.c
486f_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
487f_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
488f_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
489f_int.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
490f_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
491f_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
492f_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
493f_int.o: ../cryptlib.h f_int.c
494f_string.o: ../../e_os.h ../../include/openssl/asn1.h
495f_string.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
496f_string.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
497f_string.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
498f_string.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
499f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
500f_string.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
501f_string.o: ../../include/openssl/symhacks.h ../cryptlib.h f_string.c
502i2d_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
503i2d_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
504i2d_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
505i2d_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
506i2d_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
507i2d_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
508i2d_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
509i2d_pr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
510i2d_pr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
511i2d_pr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
512i2d_pr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
513i2d_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
514i2d_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
515i2d_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
516i2d_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
517i2d_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
518i2d_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
519i2d_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
520i2d_pr.o: ../../include/openssl/ui_compat.h ../cryptlib.h i2d_pr.c
521i2d_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
522i2d_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
523i2d_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
524i2d_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
525i2d_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
526i2d_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
527i2d_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
528i2d_pu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
529i2d_pu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
530i2d_pu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
531i2d_pu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
532i2d_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
533i2d_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
534i2d_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
535i2d_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
536i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
537i2d_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
538i2d_pu.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
539i2d_pu.o: ../../include/openssl/ui_compat.h ../cryptlib.h i2d_pu.c
540n_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
541n_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h
542n_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
543n_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
544n_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
545n_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
546n_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
547n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
548n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
549n_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
550n_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
551n_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
552n_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
553n_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
554n_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
555n_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
556n_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
557n_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
558n_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
559n_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
560n_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
561n_pkey.o: ../cryptlib.h n_pkey.c
562nsseq.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
563nsseq.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
564nsseq.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
565nsseq.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
566nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
567nsseq.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
568nsseq.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
569nsseq.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
570nsseq.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
571nsseq.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
572nsseq.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
573nsseq.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
574nsseq.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
575nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
576nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
577nsseq.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
578nsseq.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
579nsseq.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
580nsseq.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
581nsseq.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h nsseq.c
582p5_pbe.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
583p5_pbe.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
584p5_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
585p5_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
586p5_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
587p5_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
588p5_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
589p5_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h
590p5_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
591p5_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
592p5_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
593p5_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
594p5_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
595p5_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
596p5_pbe.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
597p5_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
598p5_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
599p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
600p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
601p5_pbe.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
602p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
603p5_pbe.o: ../cryptlib.h p5_pbe.c
604p5_pbev2.o: ../../e_os.h ../../include/openssl/aes.h
605p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
606p5_pbev2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
607p5_pbev2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
608p5_pbev2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
609p5_pbev2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
610p5_pbev2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
611p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
612p5_pbev2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
613p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
614p5_pbev2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
615p5_pbev2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
616p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
617p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
618p5_pbev2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
619p5_pbev2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
620p5_pbev2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
621p5_pbev2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
622p5_pbev2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
623p5_pbev2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
624p5_pbev2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
625p5_pbev2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_pbev2.c
626p8_pkey.o: ../../e_os.h ../../include/openssl/aes.h
627p8_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
628p8_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
629p8_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
630p8_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
631p8_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
632p8_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
633p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
634p8_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
635p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
636p8_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
637p8_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
638p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
639p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
640p8_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
641p8_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
642p8_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
643p8_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
644p8_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
645p8_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
646p8_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
647p8_pkey.o: ../cryptlib.h p8_pkey.c
648t_bitst.o: ../../e_os.h ../../include/openssl/aes.h
649t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
650t_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
651t_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
652t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
653t_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
654t_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
655t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
656t_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
657t_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
658t_bitst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
659t_bitst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
660t_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
661t_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
662t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
663t_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
664t_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
665t_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
666t_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
667t_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
668t_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
669t_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h t_bitst.c
670t_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
671t_crl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
672t_crl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
673t_crl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
674t_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
675t_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
676t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
677t_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
678t_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
679t_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
680t_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
681t_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
682t_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
683t_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
684t_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
685t_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
686t_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
687t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
688t_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
689t_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
690t_crl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
691t_crl.o: ../cryptlib.h t_crl.c
692t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
693t_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
694t_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
695t_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
696t_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
697t_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
698t_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
699t_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
700t_pkey.o: ../../include/openssl/symhacks.h ../cryptlib.h t_pkey.c
701t_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
702t_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
703t_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
704t_req.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
705t_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
706t_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
707t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
708t_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h
709t_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
710t_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
711t_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
712t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
713t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
714t_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
715t_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
716t_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
717t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
718t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
719t_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
720t_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
721t_req.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
722t_req.o: ../cryptlib.h t_req.c
723t_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
724t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
725t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
726t_spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
727t_spki.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
728t_spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
729t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
730t_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
731t_spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
732t_spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
733t_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
734t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
735t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
736t_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
737t_spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
738t_spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
739t_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
740t_spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
741t_spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
742t_spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
743t_spki.o: ../cryptlib.h t_spki.c
744t_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
745t_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
746t_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
747t_x509.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
748t_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
749t_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
750t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
751t_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h
752t_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
753t_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
754t_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
755t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
756t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
757t_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
758t_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
759t_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
760t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
761t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
762t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
763t_x509.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
764t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
765t_x509.o: ../cryptlib.h t_x509.c
766t_x509a.o: ../../e_os.h ../../include/openssl/aes.h
767t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
768t_x509a.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
769t_x509a.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
770t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
771t_x509a.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
772t_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
773t_x509a.o: ../../include/openssl/err.h ../../include/openssl/evp.h
774t_x509a.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
775t_x509a.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
776t_x509a.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
777t_x509a.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
778t_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
779t_x509a.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
780t_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
781t_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
782t_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
783t_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
784t_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
785t_x509a.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
786t_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h t_x509a.c
787tasn_dec.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
788tasn_dec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
789tasn_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
790tasn_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
791tasn_dec.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
792tasn_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
793tasn_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
794tasn_dec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
795tasn_dec.o: ../../include/openssl/symhacks.h tasn_dec.c
796tasn_enc.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
797tasn_enc.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
798tasn_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
799tasn_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
800tasn_enc.o: ../../include/openssl/opensslconf.h
801tasn_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
802tasn_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
803tasn_enc.o: ../../include/openssl/symhacks.h tasn_enc.c
804tasn_fre.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
805tasn_fre.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
806tasn_fre.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
807tasn_fre.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
808tasn_fre.o: ../../include/openssl/opensslconf.h
809tasn_fre.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
810tasn_fre.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
811tasn_fre.o: ../../include/openssl/symhacks.h tasn_fre.c
812tasn_new.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
813tasn_new.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
814tasn_new.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
815tasn_new.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
816tasn_new.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
817tasn_new.o: ../../include/openssl/opensslconf.h
818tasn_new.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
819tasn_new.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
820tasn_new.o: ../../include/openssl/symhacks.h tasn_new.c
821tasn_typ.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
822tasn_typ.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
823tasn_typ.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
824tasn_typ.o: ../../include/openssl/opensslconf.h
825tasn_typ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
826tasn_typ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
827tasn_typ.o: ../../include/openssl/symhacks.h tasn_typ.c
828tasn_utl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
829tasn_utl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
830tasn_utl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
831tasn_utl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
832tasn_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
833tasn_utl.o: ../../include/openssl/opensslconf.h
834tasn_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
835tasn_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
836tasn_utl.o: ../../include/openssl/symhacks.h tasn_utl.c
837x_algor.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
838x_algor.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
839x_algor.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
840x_algor.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
841x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
842x_algor.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
843x_algor.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
844x_algor.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
845x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
846x_algor.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
847x_algor.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
848x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
849x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
850x_algor.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
851x_algor.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
852x_algor.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
853x_algor.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
854x_algor.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
855x_algor.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
856x_algor.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
857x_algor.o: x_algor.c
858x_attrib.o: ../../e_os.h ../../include/openssl/aes.h
859x_attrib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
860x_attrib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
861x_attrib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
862x_attrib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
863x_attrib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
864x_attrib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
865x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
866x_attrib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
867x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
868x_attrib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
869x_attrib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
870x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
871x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
872x_attrib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
873x_attrib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
874x_attrib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
875x_attrib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
876x_attrib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
877x_attrib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
878x_attrib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
879x_attrib.o: ../cryptlib.h x_attrib.c
880x_bignum.o: ../../e_os.h ../../include/openssl/asn1.h
881x_bignum.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
882x_bignum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
883x_bignum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
884x_bignum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
885x_bignum.o: ../../include/openssl/opensslconf.h
886x_bignum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
887x_bignum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
888x_bignum.o: ../../include/openssl/symhacks.h ../cryptlib.h x_bignum.c
889x_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
890x_crl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
891x_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
892x_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
893x_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
894x_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
895x_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
896x_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
897x_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
898x_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
899x_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
900x_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
901x_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
902x_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
903x_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
904x_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
905x_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
906x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
907x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
908x_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
909x_crl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_crl.c
910x_exten.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
911x_exten.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
912x_exten.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
913x_exten.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
914x_exten.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
915x_exten.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
916x_exten.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
917x_exten.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
918x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
919x_exten.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
920x_exten.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
921x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
922x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
923x_exten.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
924x_exten.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
925x_exten.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
926x_exten.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
927x_exten.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
928x_exten.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
929x_exten.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
930x_exten.o: x_exten.c
931x_info.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
932x_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
933x_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
934x_info.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
935x_info.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
936x_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
937x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
938x_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
939x_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
940x_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
941x_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
942x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
943x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
944x_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
945x_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
946x_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
947x_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
948x_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
949x_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
950x_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
951x_info.o: ../cryptlib.h x_info.c
952x_long.o: ../../e_os.h ../../include/openssl/asn1.h
953x_long.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
954x_long.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
955x_long.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
956x_long.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
957x_long.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
958x_long.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
959x_long.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
960x_long.o: ../cryptlib.h x_long.c
961x_name.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
962x_name.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
963x_name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
964x_name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
965x_name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
966x_name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
967x_name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
968x_name.o: ../../include/openssl/err.h ../../include/openssl/evp.h
969x_name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
970x_name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
971x_name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
972x_name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
973x_name.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
974x_name.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
975x_name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
976x_name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
977x_name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
978x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
979x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
980x_name.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
981x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_name.c
982x_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
983x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
984x_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
985x_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
986x_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
987x_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
988x_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
989x_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
990x_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
991x_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
992x_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
993x_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
994x_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
995x_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
996x_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
997x_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
998x_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
999x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1000x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
1001x_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
1002x_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_pkey.c
1003x_pubkey.o: ../../e_os.h ../../include/openssl/aes.h
1004x_pubkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
1005x_pubkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
1006x_pubkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
1007x_pubkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
1008x_pubkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
1009x_pubkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1010x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
1011x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
1012x_pubkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1013x_pubkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1014x_pubkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
1015x_pubkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1016x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1017x_pubkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1018x_pubkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1019x_pubkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1020x_pubkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
1021x_pubkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1022x_pubkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
1023x_pubkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1024x_pubkey.o: ../cryptlib.h x_pubkey.c
1025x_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
1026x_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
1027x_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
1028x_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
1029x_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1030x_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
1031x_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
1032x_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1033x_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
1034x_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1035x_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1036x_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1037x_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1038x_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
1039x_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1040x_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1041x_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1042x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1043x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
1044x_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
1045x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_req.c
1046x_sig.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
1047x_sig.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
1048x_sig.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
1049x_sig.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
1050x_sig.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1051x_sig.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
1052x_sig.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
1053x_sig.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1054x_sig.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
1055x_sig.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1056x_sig.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1057x_sig.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1058x_sig.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1059x_sig.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
1060x_sig.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1061x_sig.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1062x_sig.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1063x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1064x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
1065x_sig.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
1066x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_sig.c
1067x_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
1068x_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
1069x_spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
1070x_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
1071x_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1072x_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
1073x_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
1074x_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1075x_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
1076x_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1077x_spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1078x_spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1079x_spki.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1080x_spki.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
1081x_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1082x_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1083x_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1084x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1085x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
1086x_spki.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
1087x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_spki.c
1088x_val.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
1089x_val.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
1090x_val.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
1091x_val.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
1092x_val.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1093x_val.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
1094x_val.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
1095x_val.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1096x_val.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
1097x_val.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1098x_val.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1099x_val.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1100x_val.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1101x_val.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
1102x_val.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1103x_val.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1104x_val.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1105x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1106x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
1107x_val.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
1108x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_val.c
1109x_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
1110x_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
1111x_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
1112x_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
1113x_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
1114x_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
1115x_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1116x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
1117x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
1118x_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1119x_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1120x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
1121x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1122x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1123x_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1124x_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1125x_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1126x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
1127x_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1128x_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
1129x_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1130x_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h x_x509.c
1131x_x509a.o: ../../e_os.h ../../include/openssl/aes.h
1132x_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
1133x_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
1134x_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
1135x_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
1136x_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
1137x_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1138x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
1139x_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
1140x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1141x_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1142x_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
1143x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1144x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1145x_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1146x_x509a.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1147x_x509a.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1148x_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
1149x_x509a.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1150x_x509a.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
1151x_x509a.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1152x_x509a.o: ../cryptlib.h x_x509a.c
diff --git a/src/lib/libssl/src/crypto/asn1/a_bytes.c b/src/lib/libssl/src/crypto/asn1/a_bytes.c
index afd27b80e1..2407f7c87a 100644
--- a/src/lib/libssl/src/crypto/asn1/a_bytes.c
+++ b/src/lib/libssl/src/crypto/asn1/a_bytes.c
@@ -78,7 +78,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp,
78 78
79 if (tag >= 32) 79 if (tag >= 32)
80 { 80 {
81 i=ASN1_R_TAG_VALUE_TOO_HIGH;; 81 i=ASN1_R_TAG_VALUE_TOO_HIGH;
82 goto err; 82 goto err;
83 } 83 }
84 if (!(ASN1_tag2bit(tag) & type)) 84 if (!(ASN1_tag2bit(tag) & type))
diff --git a/src/lib/libssl/src/crypto/asn1/a_gentm.c b/src/lib/libssl/src/crypto/asn1/a_gentm.c
index 8581007868..48b923de1f 100644
--- a/src/lib/libssl/src/crypto/asn1/a_gentm.c
+++ b/src/lib/libssl/src/crypto/asn1/a_gentm.c
@@ -220,7 +220,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
220 return(NULL); 220 return(NULL);
221 221
222 p=(char *)s->data; 222 p=(char *)s->data;
223 if ((p == NULL) || ((size_t)s->length < len)) 223 if ((p == NULL) || (s->length < len))
224 { 224 {
225 p=OPENSSL_malloc(len); 225 p=OPENSSL_malloc(len);
226 if (p == NULL) return(NULL); 226 if (p == NULL) return(NULL);
@@ -229,8 +229,8 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
229 s->data=(unsigned char *)p; 229 s->data=(unsigned char *)p;
230 } 230 }
231 231
232 BIO_snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900, 232 snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
233 ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); 233 ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
234 s->length=strlen(p); 234 s->length=strlen(p);
235 s->type=V_ASN1_GENERALIZEDTIME; 235 s->type=V_ASN1_GENERALIZEDTIME;
236#ifdef CHARSET_EBCDIC_not 236#ifdef CHARSET_EBCDIC_not
diff --git a/src/lib/libssl/src/crypto/asn1/a_mbstr.c b/src/lib/libssl/src/crypto/asn1/a_mbstr.c
index 208b3ec395..c811b11776 100644
--- a/src/lib/libssl/src/crypto/asn1/a_mbstr.c
+++ b/src/lib/libssl/src/crypto/asn1/a_mbstr.c
@@ -145,14 +145,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
145 145
146 if((minsize > 0) && (nchar < minsize)) { 146 if((minsize > 0) && (nchar < minsize)) {
147 ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_SHORT); 147 ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_SHORT);
148 BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize); 148 snprintf(strbuf, sizeof strbuf, "%ld", minsize);
149 ERR_add_error_data(2, "minsize=", strbuf); 149 ERR_add_error_data(2, "minsize=", strbuf);
150 return -1; 150 return -1;
151 } 151 }
152 152
153 if((maxsize > 0) && (nchar > maxsize)) { 153 if((maxsize > 0) && (nchar > maxsize)) {
154 ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_LONG); 154 ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_LONG);
155 BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize); 155 snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
156 ERR_add_error_data(2, "maxsize=", strbuf); 156 ERR_add_error_data(2, "maxsize=", strbuf);
157 return -1; 157 return -1;
158 } 158 }
diff --git a/src/lib/libssl/src/crypto/asn1/a_strex.c b/src/lib/libssl/src/crypto/asn1/a_strex.c
index bde666a6ff..8abfdfe598 100644
--- a/src/lib/libssl/src/crypto/asn1/a_strex.c
+++ b/src/lib/libssl/src/crypto/asn1/a_strex.c
@@ -285,7 +285,7 @@ const static signed char tag2nbyte[] = {
285 -1, -1, 0, -1, /* 10-13 */ 285 -1, -1, 0, -1, /* 10-13 */
286 -1, -1, -1, -1, /* 15-17 */ 286 -1, -1, -1, -1, /* 15-17 */
287 -1, 1, 1, /* 18-20 */ 287 -1, 1, 1, /* 18-20 */
288 -1, 1, 1, 1, /* 21-24 */ 288 -1, 1, -1,-1, /* 21-24 */
289 -1, 1, -1, /* 25-27 */ 289 -1, 1, -1, /* 25-27 */
290 4, -1, 2 /* 28-30 */ 290 4, -1, 2 /* 28-30 */
291}; 291};
diff --git a/src/lib/libssl/src/crypto/asn1/a_time.c b/src/lib/libssl/src/crypto/asn1/a_time.c
index 159681fbcb..b8c031fc8f 100644
--- a/src/lib/libssl/src/crypto/asn1/a_time.c
+++ b/src/lib/libssl/src/crypto/asn1/a_time.c
@@ -155,10 +155,10 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
155 newlen = t->length + 2 + 1; 155 newlen = t->length + 2 + 1;
156 str = (char *)ret->data; 156 str = (char *)ret->data;
157 /* Work out the century and prepend */ 157 /* Work out the century and prepend */
158 if (t->data[0] >= '5') BUF_strlcpy(str, "19", newlen); 158 if (t->data[0] >= '5') strlcpy(str, "19", newlen);
159 else BUF_strlcpy(str, "20", newlen); 159 else strlcpy(str, "20", newlen);
160 160
161 BUF_strlcat(str, (char *)t->data, newlen); 161 strlcat(str, (char *)t->data, newlen);
162 162
163 return ret; 163 return ret;
164 } 164 }
diff --git a/src/lib/libssl/src/crypto/asn1/a_utctm.c b/src/lib/libssl/src/crypto/asn1/a_utctm.c
index 999852dae5..41f6d421bb 100644
--- a/src/lib/libssl/src/crypto/asn1/a_utctm.c
+++ b/src/lib/libssl/src/crypto/asn1/a_utctm.c
@@ -200,7 +200,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
200 return(NULL); 200 return(NULL);
201 201
202 p=(char *)s->data; 202 p=(char *)s->data;
203 if ((p == NULL) || ((size_t)s->length < len)) 203 if ((p == NULL) || (s->length < len))
204 { 204 {
205 p=OPENSSL_malloc(len); 205 p=OPENSSL_malloc(len);
206 if (p == NULL) return(NULL); 206 if (p == NULL) return(NULL);
@@ -209,8 +209,8 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
209 s->data=(unsigned char *)p; 209 s->data=(unsigned char *)p;
210 } 210 }
211 211
212 BIO_snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, 212 snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
213 ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); 213 ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
214 s->length=strlen(p); 214 s->length=strlen(p);
215 s->type=V_ASN1_UTCTIME; 215 s->type=V_ASN1_UTCTIME;
216#ifdef CHARSET_EBCDIC_not 216#ifdef CHARSET_EBCDIC_not
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_lib.c b/src/lib/libssl/src/crypto/asn1/asn1_lib.c
index a74f1368d3..aed2895400 100644
--- a/src/lib/libssl/src/crypto/asn1/asn1_lib.c
+++ b/src/lib/libssl/src/crypto/asn1/asn1_lib.c
@@ -414,8 +414,8 @@ void asn1_add_error(unsigned char *address, int offset)
414 { 414 {
415 char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1]; 415 char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1];
416 416
417 BIO_snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address); 417 snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address);
418 BIO_snprintf(buf2,sizeof buf2,"%d",offset); 418 snprintf(buf2,sizeof buf2,"%d",offset);
419 ERR_add_error_data(4,"address=",buf1," offset=",buf2); 419 ERR_add_error_data(4,"address=",buf1," offset=",buf2);
420 } 420 }
421 421
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_par.c b/src/lib/libssl/src/crypto/asn1/asn1_par.c
index 676d434f03..1799657141 100644
--- a/src/lib/libssl/src/crypto/asn1/asn1_par.c
+++ b/src/lib/libssl/src/crypto/asn1/asn1_par.c
@@ -83,11 +83,11 @@ static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
83 83
84 p=str; 84 p=str;
85 if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) 85 if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)
86 BIO_snprintf(str,sizeof str,"priv [ %d ] ",tag); 86 snprintf(str,sizeof str,"priv [ %d ] ",tag);
87 else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) 87 else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC)
88 BIO_snprintf(str,sizeof str,"cont [ %d ]",tag); 88 snprintf(str,sizeof str,"cont [ %d ]",tag);
89 else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) 89 else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION)
90 BIO_snprintf(str,sizeof str,"appl [ %d ]",tag); 90 snprintf(str,sizeof str,"appl [ %d ]",tag);
91 else p = ASN1_tag2str(tag); 91 else p = ASN1_tag2str(tag);
92 92
93 if (p2 != NULL) 93 if (p2 != NULL)
diff --git a/src/lib/libssl/src/crypto/asn1/asn_moid.c b/src/lib/libssl/src/crypto/asn1/asn_moid.c
index edb44c988f..be20db4bad 100644
--- a/src/lib/libssl/src/crypto/asn1/asn_moid.c
+++ b/src/lib/libssl/src/crypto/asn1/asn_moid.c
@@ -87,14 +87,9 @@ static int oid_module_init(CONF_IMODULE *md, const CONF *cnf)
87 } 87 }
88 } 88 }
89 return 1; 89 return 1;
90 } 90}
91
92static void oid_module_finish(CONF_IMODULE *md)
93 {
94 OBJ_cleanup();
95 }
96 91
97void ASN1_add_oid_module(void) 92void ASN1_add_oid_module(void)
98 { 93 {
99 CONF_module_add("oid_section", oid_module_init, oid_module_finish); 94 CONF_module_add("oid_section", oid_module_init, 0);
100 } 95 }
diff --git a/src/lib/libssl/src/crypto/asn1/f.c b/src/lib/libssl/src/crypto/asn1/f.c
new file mode 100644
index 0000000000..82bccdfd51
--- /dev/null
+++ b/src/lib/libssl/src/crypto/asn1/f.c
@@ -0,0 +1,80 @@
1/* crypto/asn1/f.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#include <stdio.h>
59#include <openssl/asn1.h>
60#include <openssl/err.h>
61
62main()
63 {
64 ASN1_TYPE *at;
65 char buf[512];
66 int n;
67 long l;
68
69 at=ASN1_TYPE_new();
70
71 n=ASN1_TYPE_set_int_octetstring(at,98736,"01234567",8);
72 printf("%d\n",n);
73 n=ASN1_TYPE_get_int_octetstring(at,&l,buf,8);
74 buf[8]='\0';
75 printf("%ld %d %d\n",l,n,buf[8]);
76 buf[8]='\0';
77 printf("%s\n",buf);
78 ERR_load_crypto_strings();
79 ERR_print_errors_fp(stderr);
80 }
diff --git a/src/lib/libssl/src/crypto/asn1/t_pkey.c b/src/lib/libssl/src/crypto/asn1/t_pkey.c
index d15006e654..e1c5e5ae13 100644
--- a/src/lib/libssl/src/crypto/asn1/t_pkey.c
+++ b/src/lib/libssl/src/crypto/asn1/t_pkey.c
@@ -139,9 +139,9 @@ int RSA_print(BIO *bp, const RSA *x, int off)
139 } 139 }
140 140
141 if (x->d == NULL) 141 if (x->d == NULL)
142 BIO_snprintf(str,sizeof str,"Modulus (%d bit):",BN_num_bits(x->n)); 142 snprintf(str,sizeof str,"Modulus (%d bit):",BN_num_bits(x->n));
143 else 143 else
144 BUF_strlcpy(str,"modulus:",sizeof str); 144 strlcpy(str,"modulus:",sizeof str);
145 if (!print(bp,str,x->n,m,off)) goto err; 145 if (!print(bp,str,x->n,m,off)) goto err;
146 s=(x->d == NULL)?"Exponent:":"publicExponent:"; 146 s=(x->d == NULL)?"Exponent:":"publicExponent:";
147 if (!print(bp,s,x->e,m,off)) goto err; 147 if (!print(bp,s,x->e,m,off)) goto err;
diff --git a/src/lib/libssl/src/crypto/asn1/t_x509.c b/src/lib/libssl/src/crypto/asn1/t_x509.c
index d1034c47f8..30f68561b7 100644
--- a/src/lib/libssl/src/crypto/asn1/t_x509.c
+++ b/src/lib/libssl/src/crypto/asn1/t_x509.c
@@ -321,7 +321,7 @@ int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig)
321int ASN1_STRING_print(BIO *bp, ASN1_STRING *v) 321int ASN1_STRING_print(BIO *bp, ASN1_STRING *v)
322 { 322 {
323 int i,n; 323 int i,n;
324 char buf[80],*p;; 324 char buf[80],*p;
325 325
326 if (v == NULL) return(0); 326 if (v == NULL) return(0);
327 n=0; 327 n=0;
diff --git a/src/lib/libssl/src/crypto/asn1/x_cinf.c b/src/lib/libssl/src/crypto/asn1/x_cinf.c
new file mode 100644
index 0000000000..339a110eef
--- /dev/null
+++ b/src/lib/libssl/src/crypto/asn1/x_cinf.c
@@ -0,0 +1,201 @@
1/* crypto/asn1/x_cinf.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/asn1_mac.h>
62#include <openssl/x509.h>
63
64int i2d_X509_CINF(X509_CINF *a, unsigned char **pp)
65 {
66 int v1=0,v2=0;
67 M_ASN1_I2D_vars(a);
68
69 M_ASN1_I2D_len_EXP_opt(a->version,i2d_ASN1_INTEGER,0,v1);
70 M_ASN1_I2D_len(a->serialNumber, i2d_ASN1_INTEGER);
71 M_ASN1_I2D_len(a->signature, i2d_X509_ALGOR);
72 M_ASN1_I2D_len(a->issuer, i2d_X509_NAME);
73 M_ASN1_I2D_len(a->validity, i2d_X509_VAL);
74 M_ASN1_I2D_len(a->subject, i2d_X509_NAME);
75 M_ASN1_I2D_len(a->key, i2d_X509_PUBKEY);
76 M_ASN1_I2D_len_IMP_opt(a->issuerUID, i2d_ASN1_BIT_STRING);
77 M_ASN1_I2D_len_IMP_opt(a->subjectUID, i2d_ASN1_BIT_STRING);
78 M_ASN1_I2D_len_EXP_SEQUENCE_opt_type(X509_EXTENSION,a->extensions,
79 i2d_X509_EXTENSION,3,
80 V_ASN1_SEQUENCE,v2);
81
82 M_ASN1_I2D_seq_total();
83
84 M_ASN1_I2D_put_EXP_opt(a->version,i2d_ASN1_INTEGER,0,v1);
85 M_ASN1_I2D_put(a->serialNumber, i2d_ASN1_INTEGER);
86 M_ASN1_I2D_put(a->signature, i2d_X509_ALGOR);
87 M_ASN1_I2D_put(a->issuer, i2d_X509_NAME);
88 M_ASN1_I2D_put(a->validity, i2d_X509_VAL);
89 M_ASN1_I2D_put(a->subject, i2d_X509_NAME);
90 M_ASN1_I2D_put(a->key, i2d_X509_PUBKEY);
91 M_ASN1_I2D_put_IMP_opt(a->issuerUID, i2d_ASN1_BIT_STRING,1);
92 M_ASN1_I2D_put_IMP_opt(a->subjectUID, i2d_ASN1_BIT_STRING,2);
93 M_ASN1_I2D_put_EXP_SEQUENCE_opt_type(X509_EXTENSION,a->extensions,
94 i2d_X509_EXTENSION,3,
95 V_ASN1_SEQUENCE,v2);
96
97 M_ASN1_I2D_finish();
98 }
99
100X509_CINF *d2i_X509_CINF(X509_CINF **a, unsigned char **pp, long length)
101 {
102 int ver=0;
103 M_ASN1_D2I_vars(a,X509_CINF *,X509_CINF_new);
104
105 M_ASN1_D2I_Init();
106 M_ASN1_D2I_start_sequence();
107 /* we have the optional version field */
108 if (M_ASN1_next == (V_ASN1_CONTEXT_SPECIFIC | V_ASN1_CONSTRUCTED | 0))
109 {
110 M_ASN1_D2I_get_EXP_opt(ret->version,d2i_ASN1_INTEGER,0);
111 if (ret->version->data != NULL)
112 ver=ret->version->data[0];
113 }
114 else
115 {
116 if (ret->version != NULL)
117 {
118 M_ASN1_INTEGER_free(ret->version);
119 ret->version=NULL;
120 }
121 }
122 M_ASN1_D2I_get(ret->serialNumber,d2i_ASN1_INTEGER);
123 M_ASN1_D2I_get(ret->signature,d2i_X509_ALGOR);
124 M_ASN1_D2I_get(ret->issuer,d2i_X509_NAME);
125 M_ASN1_D2I_get(ret->validity,d2i_X509_VAL);
126 M_ASN1_D2I_get(ret->subject,d2i_X509_NAME);
127 M_ASN1_D2I_get(ret->key,d2i_X509_PUBKEY);
128 if (ver >= 1) /* version 2 extensions */
129 {
130 if (ret->issuerUID != NULL)
131 {
132 M_ASN1_BIT_STRING_free(ret->issuerUID);
133 ret->issuerUID=NULL;
134 }
135 if (ret->subjectUID != NULL)
136 {
137 M_ASN1_BIT_STRING_free(ret->subjectUID);
138 ret->subjectUID=NULL;
139 }
140 M_ASN1_D2I_get_IMP_opt(ret->issuerUID,d2i_ASN1_BIT_STRING, 1,
141 V_ASN1_BIT_STRING);
142 M_ASN1_D2I_get_IMP_opt(ret->subjectUID,d2i_ASN1_BIT_STRING, 2,
143 V_ASN1_BIT_STRING);
144 }
145/* Note: some broken certificates include extensions but don't set
146 * the version number properly. By bypassing this check they can
147 * be parsed.
148 */
149
150#ifdef VERSION_EXT_CHECK
151 if (ver >= 2) /* version 3 extensions */
152#endif
153 {
154 if (ret->extensions != NULL)
155 while (sk_X509_EXTENSION_num(ret->extensions))
156 X509_EXTENSION_free(
157 sk_X509_EXTENSION_pop(ret->extensions));
158 M_ASN1_D2I_get_EXP_set_opt_type(X509_EXTENSION,ret->extensions,
159 d2i_X509_EXTENSION,
160 X509_EXTENSION_free,3,
161 V_ASN1_SEQUENCE);
162 }
163 M_ASN1_D2I_Finish(a,X509_CINF_free,ASN1_F_D2I_X509_CINF);
164 }
165
166X509_CINF *X509_CINF_new(void)
167 {
168 X509_CINF *ret=NULL;
169 ASN1_CTX c;
170
171 M_ASN1_New_Malloc(ret,X509_CINF);
172 ret->version=NULL;
173 M_ASN1_New(ret->serialNumber,M_ASN1_INTEGER_new);
174 M_ASN1_New(ret->signature,X509_ALGOR_new);
175 M_ASN1_New(ret->issuer,X509_NAME_new);
176 M_ASN1_New(ret->validity,X509_VAL_new);
177 M_ASN1_New(ret->subject,X509_NAME_new);
178 M_ASN1_New(ret->key,X509_PUBKEY_new);
179 ret->issuerUID=NULL;
180 ret->subjectUID=NULL;
181 ret->extensions=NULL;
182 return(ret);
183 M_ASN1_New_Error(ASN1_F_X509_CINF_NEW);
184 }
185
186void X509_CINF_free(X509_CINF *a)
187 {
188 if (a == NULL) return;
189 M_ASN1_INTEGER_free(a->version);
190 M_ASN1_INTEGER_free(a->serialNumber);
191 X509_ALGOR_free(a->signature);
192 X509_NAME_free(a->issuer);
193 X509_VAL_free(a->validity);
194 X509_NAME_free(a->subject);
195 X509_PUBKEY_free(a->key);
196 M_ASN1_BIT_STRING_free(a->issuerUID);
197 M_ASN1_BIT_STRING_free(a->subjectUID);
198 sk_X509_EXTENSION_pop_free(a->extensions,X509_EXTENSION_free);
199 OPENSSL_free(a);
200 }
201
diff --git a/src/lib/libssl/src/crypto/bf/Makefile.ssl b/src/lib/libssl/src/crypto/bf/Makefile.ssl
new file mode 100644
index 0000000000..7dfdf9d871
--- /dev/null
+++ b/src/lib/libssl/src/crypto/bf/Makefile.ssl
@@ -0,0 +1,114 @@
1#
2# SSLeay/crypto/blowfish/Makefile
3#
4
5DIR= bf
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20BF_ENC= bf_enc.o
21# or use
22#DES_ENC= bx86-elf.o
23
24CFLAGS= $(INCLUDES) $(CFLAG)
25
26GENERAL=Makefile
27TEST=bftest.c
28APPS=
29
30LIB=$(TOP)/libcrypto.a
31LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c
32LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
33
34SRC= $(LIBSRC)
35
36EXHEADER= blowfish.h
37HEADER= bf_pi.h bf_locl.h $(EXHEADER)
38
39ALL= $(GENERAL) $(SRC) $(HEADER)
40
41top:
42 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
43
44all: lib
45
46lib: $(LIBOBJ)
47 $(AR) $(LIB) $(LIBOBJ)
48 $(RANLIB) $(LIB) || echo Never mind.
49 @touch lib
50
51# elf
52asm/bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
53 (cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > bx86-elf.s)
54
55# a.out
56asm/bx86-out.o: asm/bx86unix.cpp
57 $(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o
58
59# bsdi
60asm/bx86bsdi.o: asm/bx86unix.cpp
61 $(CPP) -DBSDI asm/bx86unix.cpp | sed 's/ :/:/' | as -o asm/bx86bsdi.o
62
63asm/bx86unix.cpp: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
64 (cd asm; $(PERL) bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp)
65
66files:
67 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
68
69links:
70 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
71 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
72 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
73 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
74
75install: installs
76
77installs:
78 @for i in $(EXHEADER) ; \
79 do \
80 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
81 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
82 done;
83
84tags:
85 ctags $(SRC)
86
87tests:
88
89lint:
90 lint -DLINT $(INCLUDES) $(SRC)>fluff
91
92depend:
93 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
94
95dclean:
96 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
97 mv -f Makefile.new $(MAKEFILE)
98
99clean:
100 rm -f asm/bx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
101
102# DO NOT DELETE THIS LINE -- make depend depends on it.
103
104bf_cfb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
105bf_cfb64.o: ../../include/openssl/opensslconf.h bf_cfb64.c bf_locl.h
106bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
107bf_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
108bf_ecb.o: bf_ecb.c bf_locl.h
109bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
110bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
111bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
112bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
113bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
114bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h bf_skey.c
diff --git a/src/lib/libssl/src/crypto/bf/asm/bf-586.pl b/src/lib/libssl/src/crypto/bf/asm/bf-586.pl
index b556642c94..b5a4760d09 100644
--- a/src/lib/libssl/src/crypto/bf/asm/bf-586.pl
+++ b/src/lib/libssl/src/crypto/bf/asm/bf-586.pl
@@ -18,7 +18,7 @@ $tmp4="edx";
18 18
19&BF_encrypt("BF_encrypt",1); 19&BF_encrypt("BF_encrypt",1);
20&BF_encrypt("BF_decrypt",0); 20&BF_encrypt("BF_decrypt",0);
21&cbc("BF_cbc_encrypt","BF_encrypt","BF_decrypt",1,4,5,3,-1,-1); 21&cbc("BF_cbc_encrypt","BF_encrypt","BF_decrypt",1,4,5,3,-1,-1) unless $main'openbsd;
22&asm_finish(); 22&asm_finish();
23 23
24sub BF_encrypt 24sub BF_encrypt
diff --git a/src/lib/libssl/src/crypto/bio/Makefile.ssl b/src/lib/libssl/src/crypto/bio/Makefile.ssl
new file mode 100644
index 0000000000..d0b9e297b0
--- /dev/null
+++ b/src/lib/libssl/src/crypto/bio/Makefile.ssl
@@ -0,0 +1,216 @@
1#
2# SSLeay/crypto/bio/Makefile
3#
4
5DIR= bio
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= bio_lib.c bio_cb.c bio_err.c \
27 bss_mem.c bss_null.c bss_fd.c \
28 bss_file.c bss_sock.c bss_conn.c \
29 bf_null.c bf_buff.c b_print.c b_dump.c \
30 b_sock.c bss_acpt.c bf_nbio.c bss_log.c bss_bio.c
31# bf_lbuf.c
32LIBOBJ= bio_lib.o bio_cb.o bio_err.o \
33 bss_mem.o bss_null.o bss_fd.o \
34 bss_file.o bss_sock.o bss_conn.o \
35 bf_null.o bf_buff.o b_print.o b_dump.o \
36 b_sock.o bss_acpt.o bf_nbio.o bss_log.o bss_bio.o
37# bf_lbuf.o
38
39SRC= $(LIBSRC)
40
41EXHEADER= bio.h
42HEADER= bss_file.c $(EXHEADER)
43
44ALL= $(GENERAL) $(SRC) $(HEADER)
45
46top:
47 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
48
49all: lib
50
51lib: $(LIBOBJ)
52 $(AR) $(LIB) $(LIBOBJ)
53 $(RANLIB) $(LIB) || echo Never mind.
54 @touch lib
55
56files:
57 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
58
59links:
60 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
61 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
62 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
63 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
64
65install:
66 @for i in $(EXHEADER); \
67 do \
68 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
69 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
70 done;
71
72tags:
73 ctags $(SRC)
74
75tests:
76
77lint:
78 lint -DLINT $(INCLUDES) $(SRC)>fluff
79
80depend:
81 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
82
83dclean:
84 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
85 mv -f Makefile.new $(MAKEFILE)
86
87clean:
88 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
89
90# DO NOT DELETE THIS LINE -- make depend depends on it.
91
92b_dump.o: ../../e_os.h ../../include/openssl/bio.h
93b_dump.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
94b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
95b_dump.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
96b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
97b_dump.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
98b_dump.o: ../cryptlib.h b_dump.c
99b_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
100b_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
101b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
102b_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
103b_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
104b_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
105b_print.o: ../cryptlib.h b_print.c
106b_sock.o: ../../e_os.h ../../include/openssl/bio.h
107b_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
108b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
109b_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
110b_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
111b_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
112b_sock.o: ../cryptlib.h b_sock.c
113bf_buff.o: ../../e_os.h ../../include/openssl/bio.h
114bf_buff.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
115bf_buff.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
116bf_buff.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
117bf_buff.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
118bf_buff.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
119bf_buff.o: ../cryptlib.h bf_buff.c
120bf_nbio.o: ../../e_os.h ../../include/openssl/bio.h
121bf_nbio.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
122bf_nbio.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
123bf_nbio.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
124bf_nbio.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
125bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
126bf_nbio.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
127bf_nbio.o: ../cryptlib.h bf_nbio.c
128bf_null.o: ../../e_os.h ../../include/openssl/bio.h
129bf_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
130bf_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
131bf_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
132bf_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
133bf_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
134bf_null.o: ../cryptlib.h bf_null.c
135bio_cb.o: ../../e_os.h ../../include/openssl/bio.h
136bio_cb.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
137bio_cb.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
138bio_cb.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
139bio_cb.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
140bio_cb.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
141bio_cb.o: ../cryptlib.h bio_cb.c
142bio_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
143bio_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
144bio_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
145bio_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
146bio_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
147bio_err.o: bio_err.c
148bio_lib.o: ../../e_os.h ../../include/openssl/bio.h
149bio_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
150bio_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
151bio_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
152bio_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
153bio_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
154bio_lib.o: ../cryptlib.h bio_lib.c
155bss_acpt.o: ../../e_os.h ../../include/openssl/bio.h
156bss_acpt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
157bss_acpt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
158bss_acpt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
159bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
160bss_acpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
161bss_acpt.o: ../cryptlib.h bss_acpt.c
162bss_bio.o: ../../e_os.h ../../include/openssl/bio.h
163bss_bio.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
164bss_bio.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
165bss_bio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
166bss_bio.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
167bss_bio.o: ../../include/openssl/symhacks.h bss_bio.c
168bss_conn.o: ../../e_os.h ../../include/openssl/bio.h
169bss_conn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
170bss_conn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
171bss_conn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
172bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
173bss_conn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
174bss_conn.o: ../cryptlib.h bss_conn.c
175bss_fd.o: ../../e_os.h ../../include/openssl/bio.h
176bss_fd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
177bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
178bss_fd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
179bss_fd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
180bss_fd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
181bss_fd.o: ../cryptlib.h bss_fd.c
182bss_file.o: ../../e_os.h ../../include/openssl/bio.h
183bss_file.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
184bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
185bss_file.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
186bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
187bss_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
188bss_file.o: ../cryptlib.h bss_file.c
189bss_log.o: ../../e_os.h ../../include/openssl/bio.h
190bss_log.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
191bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
192bss_log.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
193bss_log.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
194bss_log.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
195bss_log.o: ../cryptlib.h bss_log.c
196bss_mem.o: ../../e_os.h ../../include/openssl/bio.h
197bss_mem.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
198bss_mem.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
199bss_mem.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
200bss_mem.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
201bss_mem.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
202bss_mem.o: ../cryptlib.h bss_mem.c
203bss_null.o: ../../e_os.h ../../include/openssl/bio.h
204bss_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
205bss_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
206bss_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
207bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
208bss_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
209bss_null.o: ../cryptlib.h bss_null.c
210bss_sock.o: ../../e_os.h ../../include/openssl/bio.h
211bss_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
212bss_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
213bss_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
214bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
215bss_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
216bss_sock.o: ../cryptlib.h bss_sock.c
diff --git a/src/lib/libssl/src/crypto/bio/b_dump.c b/src/lib/libssl/src/crypto/bio/b_dump.c
index f671e722fa..983604fb49 100644
--- a/src/lib/libssl/src/crypto/bio/b_dump.c
+++ b/src/lib/libssl/src/crypto/bio/b_dump.c
@@ -104,41 +104,41 @@ int BIO_dump_indent(BIO *bio, const char *s, int len, int indent)
104 for(i=0;i<rows;i++) 104 for(i=0;i<rows;i++)
105 { 105 {
106 buf[0]='\0'; /* start with empty string */ 106 buf[0]='\0'; /* start with empty string */
107 BUF_strlcpy(buf,str,sizeof buf); 107 strlcpy(buf,str,sizeof buf);
108 BIO_snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width); 108 snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width);
109 BUF_strlcat(buf,tmp,sizeof buf); 109 strlcat(buf,tmp,sizeof buf);
110 for(j=0;j<dump_width;j++) 110 for(j=0;j<dump_width;j++)
111 { 111 {
112 if (((i*dump_width)+j)>=len) 112 if (((i*dump_width)+j)>=len)
113 { 113 {
114 BUF_strlcat(buf," ",sizeof buf); 114 strlcat(buf," ",sizeof buf);
115 } 115 }
116 else 116 else
117 { 117 {
118 ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; 118 ch=((unsigned char)*(s+i*dump_width+j)) & 0xff;
119 BIO_snprintf(tmp,sizeof tmp,"%02x%c",ch, 119 snprintf(tmp,sizeof tmp,"%02x%c",ch,
120 j==7?'-':' '); 120 j==7?'-':' ');
121 BUF_strlcat(buf,tmp,sizeof buf); 121 strlcat(buf,tmp,sizeof buf);
122 } 122 }
123 } 123 }
124 BUF_strlcat(buf," ",sizeof buf); 124 strlcat(buf," ",sizeof buf);
125 for(j=0;j<dump_width;j++) 125 for(j=0;j<dump_width;j++)
126 { 126 {
127 if (((i*dump_width)+j)>=len) 127 if (((i*dump_width)+j)>=len)
128 break; 128 break;
129 ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; 129 ch=((unsigned char)*(s+i*dump_width+j)) & 0xff;
130#ifndef CHARSET_EBCDIC 130#ifndef CHARSET_EBCDIC
131 BIO_snprintf(tmp,sizeof tmp,"%c", 131 snprintf(tmp,sizeof tmp,"%c",
132 ((ch>=' ')&&(ch<='~'))?ch:'.'); 132 ((ch>=' ')&&(ch<='~'))?ch:'.');
133#else 133#else
134 BIO_snprintf(tmp,sizeof tmp,"%c", 134 snprintf(tmp,sizeof tmp,"%c",
135 ((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) 135 ((ch>=os_toascii[' '])&&(ch<=os_toascii['~']))
136 ? os_toebcdic[ch] 136 ? os_toebcdic[ch]
137 : '.'); 137 : '.');
138#endif 138#endif
139 BUF_strlcat(buf,tmp,sizeof buf); 139 strlcat(buf,tmp,sizeof buf);
140 } 140 }
141 BUF_strlcat(buf,"\n",sizeof buf); 141 strlcat(buf,"\n",sizeof buf);
142 /* if this is the last call then update the ddt_dump thing so that 142 /* if this is the last call then update the ddt_dump thing so that
143 * we will move the selection point in the debug window 143 * we will move the selection point in the debug window
144 */ 144 */
@@ -147,7 +147,7 @@ int BIO_dump_indent(BIO *bio, const char *s, int len, int indent)
147#ifdef TRUNCATE 147#ifdef TRUNCATE
148 if (trunc > 0) 148 if (trunc > 0)
149 { 149 {
150 BIO_snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str, 150 snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str,
151 len+trunc); 151 len+trunc);
152 ret+=BIO_write(bio,(char *)buf,strlen(buf)); 152 ret+=BIO_write(bio,(char *)buf,strlen(buf));
153 } 153 }
diff --git a/src/lib/libssl/src/crypto/bio/b_print.c b/src/lib/libssl/src/crypto/bio/b_print.c
index fbff331796..2cfc689dd6 100644
--- a/src/lib/libssl/src/crypto/bio/b_print.c
+++ b/src/lib/libssl/src/crypto/bio/b_print.c
@@ -576,12 +576,12 @@ abs_val(LDOUBLE value)
576} 576}
577 577
578static LDOUBLE 578static LDOUBLE
579pow10(int in_exp) 579pow10(int exp)
580{ 580{
581 LDOUBLE result = 1; 581 LDOUBLE result = 1;
582 while (in_exp) { 582 while (exp) {
583 result *= 10; 583 result *= 10;
584 in_exp--; 584 exp--;
585 } 585 }
586 return result; 586 return result;
587} 587}
@@ -652,8 +652,8 @@ fmtfp(
652 (caps ? "0123456789ABCDEF" 652 (caps ? "0123456789ABCDEF"
653 : "0123456789abcdef")[intpart % 10]; 653 : "0123456789abcdef")[intpart % 10];
654 intpart = (intpart / 10); 654 intpart = (intpart / 10);
655 } while (intpart && (iplace < sizeof iconvert)); 655 } while (intpart && (iplace < sizeof iplace));
656 if (iplace == sizeof iconvert) 656 if (iplace == sizeof iplace)
657 iplace--; 657 iplace--;
658 iconvert[iplace] = 0; 658 iconvert[iplace] = 0;
659 659
@@ -664,7 +664,7 @@ fmtfp(
664 : "0123456789abcdef")[fracpart % 10]; 664 : "0123456789abcdef")[fracpart % 10];
665 fracpart = (fracpart / 10); 665 fracpart = (fracpart / 10);
666 } while (fplace < max); 666 } while (fplace < max);
667 if (fplace == sizeof fconvert) 667 if (fplace == sizeof fplace)
668 fplace--; 668 fplace--;
669 fconvert[fplace] = 0; 669 fconvert[fplace] = 0;
670 670
diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c
index c851298d1e..5282f8a8f7 100644
--- a/src/lib/libssl/src/crypto/bio/b_sock.c
+++ b/src/lib/libssl/src/crypto/bio/b_sock.c
@@ -709,12 +709,12 @@ int BIO_accept(int sock, char **addr)
709 } 709 }
710 *addr=p; 710 *addr=p;
711 } 711 }
712 BIO_snprintf(*addr,24,"%d.%d.%d.%d:%d", 712 snprintf(*addr,24,"%d.%d.%d.%d:%d",
713 (unsigned char)(l>>24L)&0xff, 713 (unsigned char)(l>>24L)&0xff,
714 (unsigned char)(l>>16L)&0xff, 714 (unsigned char)(l>>16L)&0xff,
715 (unsigned char)(l>> 8L)&0xff, 715 (unsigned char)(l>> 8L)&0xff,
716 (unsigned char)(l )&0xff, 716 (unsigned char)(l )&0xff,
717 port); 717 port);
718end: 718end:
719 return(ret); 719 return(ret);
720 } 720 }
diff --git a/src/lib/libssl/src/crypto/bio/bio_cb.c b/src/lib/libssl/src/crypto/bio/bio_cb.c
index 6f4254a114..ee9159ebd8 100644
--- a/src/lib/libssl/src/crypto/bio/bio_cb.c
+++ b/src/lib/libssl/src/crypto/bio/bio_cb.c
@@ -75,56 +75,56 @@ long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
75 if (BIO_CB_RETURN & cmd) 75 if (BIO_CB_RETURN & cmd)
76 r=ret; 76 r=ret;
77 77
78 BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); 78 snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio);
79 p= &(buf[14]); 79 p= &(buf[14]);
80 p_maxlen = sizeof buf - 14; 80 p_maxlen = sizeof buf - 14;
81 switch (cmd) 81 switch (cmd)
82 { 82 {
83 case BIO_CB_FREE: 83 case BIO_CB_FREE:
84 BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); 84 snprintf(p,p_maxlen,"Free - %s\n",bio->method->name);
85 break; 85 break;
86 case BIO_CB_READ: 86 case BIO_CB_READ:
87 if (bio->method->type & BIO_TYPE_DESCRIPTOR) 87 if (bio->method->type & BIO_TYPE_DESCRIPTOR)
88 BIO_snprintf(p,p_maxlen,"read(%d,%d) - %s fd=%d\n", 88 snprintf(p,p_maxlen,"read(%d,%d) - %s fd=%d\n",
89 bio->num,argi,bio->method->name,bio->num); 89 bio->num,argi,bio->method->name,bio->num);
90 else 90 else
91 BIO_snprintf(p,p_maxlen,"read(%d,%d) - %s\n", 91 snprintf(p,p_maxlen,"read(%d,%d) - %s\n",
92 bio->num,argi,bio->method->name); 92 bio->num,argi,bio->method->name);
93 break; 93 break;
94 case BIO_CB_WRITE: 94 case BIO_CB_WRITE:
95 if (bio->method->type & BIO_TYPE_DESCRIPTOR) 95 if (bio->method->type & BIO_TYPE_DESCRIPTOR)
96 BIO_snprintf(p,p_maxlen,"write(%d,%d) - %s fd=%d\n", 96 snprintf(p,p_maxlen,"write(%d,%d) - %s fd=%d\n",
97 bio->num,argi,bio->method->name,bio->num); 97 bio->num,argi,bio->method->name,bio->num);
98 else 98 else
99 BIO_snprintf(p,p_maxlen,"write(%d,%d) - %s\n", 99 snprintf(p,p_maxlen,"write(%d,%d) - %s\n",
100 bio->num,argi,bio->method->name); 100 bio->num,argi,bio->method->name);
101 break; 101 break;
102 case BIO_CB_PUTS: 102 case BIO_CB_PUTS:
103 BIO_snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name); 103 snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name);
104 break; 104 break;
105 case BIO_CB_GETS: 105 case BIO_CB_GETS:
106 BIO_snprintf(p,p_maxlen,"gets(%d) - %s\n",argi,bio->method->name); 106 snprintf(p,p_maxlen,"gets(%d) - %s\n",argi,bio->method->name);
107 break; 107 break;
108 case BIO_CB_CTRL: 108 case BIO_CB_CTRL:
109 BIO_snprintf(p,p_maxlen,"ctrl(%d) - %s\n",argi,bio->method->name); 109 snprintf(p,p_maxlen,"ctrl(%d) - %s\n",argi,bio->method->name);
110 break; 110 break;
111 case BIO_CB_RETURN|BIO_CB_READ: 111 case BIO_CB_RETURN|BIO_CB_READ:
112 BIO_snprintf(p,p_maxlen,"read return %ld\n",ret); 112 snprintf(p,p_maxlen,"read return %ld\n",ret);
113 break; 113 break;
114 case BIO_CB_RETURN|BIO_CB_WRITE: 114 case BIO_CB_RETURN|BIO_CB_WRITE:
115 BIO_snprintf(p,p_maxlen,"write return %ld\n",ret); 115 snprintf(p,p_maxlen,"write return %ld\n",ret);
116 break; 116 break;
117 case BIO_CB_RETURN|BIO_CB_GETS: 117 case BIO_CB_RETURN|BIO_CB_GETS:
118 BIO_snprintf(p,p_maxlen,"gets return %ld\n",ret); 118 snprintf(p,p_maxlen,"gets return %ld\n",ret);
119 break; 119 break;
120 case BIO_CB_RETURN|BIO_CB_PUTS: 120 case BIO_CB_RETURN|BIO_CB_PUTS:
121 BIO_snprintf(p,p_maxlen,"puts return %ld\n",ret); 121 snprintf(p,p_maxlen,"puts return %ld\n",ret);
122 break; 122 break;
123 case BIO_CB_RETURN|BIO_CB_CTRL: 123 case BIO_CB_RETURN|BIO_CB_CTRL:
124 BIO_snprintf(p,p_maxlen,"ctrl return %ld\n",ret); 124 snprintf(p,p_maxlen,"ctrl return %ld\n",ret);
125 break; 125 break;
126 default: 126 default:
127 BIO_snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd); 127 snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd);
128 break; 128 break;
129 } 129 }
130 130
diff --git a/src/lib/libssl/src/crypto/bio/bss_conn.c b/src/lib/libssl/src/crypto/bio/bss_conn.c
index f5d0e759e2..8c694140ed 100644
--- a/src/lib/libssl/src/crypto/bio/bss_conn.c
+++ b/src/lib/libssl/src/crypto/bio/bss_conn.c
@@ -521,8 +521,8 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
521 char buf[16]; 521 char buf[16];
522 unsigned char *p = ptr; 522 unsigned char *p = ptr;
523 523
524 BIO_snprintf(buf,sizeof buf,"%d.%d.%d.%d", 524 snprintf(buf,sizeof buf,"%d.%d.%d.%d",
525 p[0],p[1],p[2],p[3]); 525 p[0],p[1],p[2],p[3]);
526 if (data->param_hostname != NULL) 526 if (data->param_hostname != NULL)
527 OPENSSL_free(data->param_hostname); 527 OPENSSL_free(data->param_hostname);
528 data->param_hostname=BUF_strdup(buf); 528 data->param_hostname=BUF_strdup(buf);
@@ -532,7 +532,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
532 { 532 {
533 char buf[DECIMAL_SIZE(int)+1]; 533 char buf[DECIMAL_SIZE(int)+1];
534 534
535 BIO_snprintf(buf,sizeof buf,"%d",*(int *)ptr); 535 snprintf(buf,sizeof buf,"%d",*(int *)ptr);
536 if (data->param_port != NULL) 536 if (data->param_port != NULL)
537 OPENSSL_free(data->param_port); 537 OPENSSL_free(data->param_port);
538 data->param_port=BUF_strdup(buf); 538 data->param_port=BUF_strdup(buf);
diff --git a/src/lib/libssl/src/crypto/bio/bss_file.c b/src/lib/libssl/src/crypto/bio/bss_file.c
index 9cdf159f82..0ca603ee0a 100644
--- a/src/lib/libssl/src/crypto/bio/bss_file.c
+++ b/src/lib/libssl/src/crypto/bio/bss_file.c
@@ -249,15 +249,15 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
249 if (num & BIO_FP_APPEND) 249 if (num & BIO_FP_APPEND)
250 { 250 {
251 if (num & BIO_FP_READ) 251 if (num & BIO_FP_READ)
252 BUF_strlcpy(p,"a+",sizeof p); 252 strlcpy(p,"a+",sizeof p);
253 else BUF_strlcpy(p,"a",sizeof p); 253 else strlcpy(p,"a",sizeof p);
254 } 254 }
255 else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE)) 255 else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
256 BUF_strlcpy(p,"r+",sizeof p); 256 strlcpy(p,"r+",sizeof p);
257 else if (num & BIO_FP_WRITE) 257 else if (num & BIO_FP_WRITE)
258 BUF_strlcpy(p,"w",sizeof p); 258 strlcpy(p,"w",sizeof p);
259 else if (num & BIO_FP_READ) 259 else if (num & BIO_FP_READ)
260 BUF_strlcpy(p,"r",sizeof p); 260 strlcpy(p,"r",sizeof p);
261 else 261 else
262 { 262 {
263 BIOerr(BIO_F_FILE_CTRL,BIO_R_BAD_FOPEN_MODE); 263 BIOerr(BIO_F_FILE_CTRL,BIO_R_BAD_FOPEN_MODE);
diff --git a/src/lib/libssl/src/crypto/bn/Makefile.ssl b/src/lib/libssl/src/crypto/bn/Makefile.ssl
new file mode 100644
index 0000000000..0c6e796d17
--- /dev/null
+++ b/src/lib/libssl/src/crypto/bn/Makefile.ssl
@@ -0,0 +1,323 @@
1#
2# SSLeay/crypto/bn/Makefile
3#
4
5DIR= bn
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES= -I.. -I$(TOP) -I../../include
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20BN_ASM= bn_asm.o
21# or use
22#BN_ASM= bn86-elf.o
23
24CFLAGS= $(INCLUDES) $(CFLAG)
25ASFLAGS= $(INCLUDES) $(ASFLAG)
26
27GENERAL=Makefile
28TEST=bntest.c exptest.c
29APPS=
30
31LIB=$(TOP)/libcrypto.a
32LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
33 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
34 bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
35 bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c
36
37LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
38 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
39 bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
40 bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o
41
42SRC= $(LIBSRC)
43
44EXHEADER= bn.h
45HEADER= bn_lcl.h bn_prime.h $(EXHEADER)
46
47ALL= $(GENERAL) $(SRC) $(HEADER)
48
49top:
50 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
51
52all: lib
53
54bn_prime.h: bn_prime.pl
55 $(PERL) bn_prime.pl >bn_prime.h
56
57divtest: divtest.c ../../libcrypto.a
58 cc -I../../include divtest.c -o divtest ../../libcrypto.a
59
60bnbug: bnbug.c ../../libcrypto.a top
61 cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
62
63lib: $(LIBOBJ)
64 $(AR) $(LIB) $(LIBOBJ)
65 $(RANLIB) $(LIB) || echo Never mind.
66 @touch lib
67
68# elf
69asm/bn86-elf.s: asm/bn-586.pl ../perlasm/x86asm.pl
70 (cd asm; $(PERL) bn-586.pl elf $(CFLAGS) > bn86-elf.s)
71
72asm/co86-elf.s: asm/co-586.pl ../perlasm/x86asm.pl
73 (cd asm; $(PERL) co-586.pl elf $(CFLAGS) > co86-elf.s)
74
75# a.out
76asm/bn86-out.o: asm/bn86unix.cpp
77 $(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o
78
79asm/co86-out.o: asm/co86unix.cpp
80 $(CPP) -DOUT asm/co86unix.cpp | as -o asm/co86-out.o
81
82# bsdi
83asm/bn86bsdi.o: asm/bn86unix.cpp
84 $(CPP) -DBSDI asm/bn86unix.cpp | sed 's/ :/:/' | as -o asm/bn86bsdi.o
85
86asm/co86bsdi.o: asm/co86unix.cpp
87 $(CPP) -DBSDI asm/co86unix.cpp | sed 's/ :/:/' | as -o asm/co86bsdi.o
88
89asm/bn86unix.cpp: asm/bn-586.pl ../perlasm/x86asm.pl
90 (cd asm; $(PERL) bn-586.pl cpp >bn86unix.cpp )
91
92asm/co86unix.cpp: asm/co-586.pl ../perlasm/x86asm.pl
93 (cd asm; $(PERL) co-586.pl cpp >co86unix.cpp )
94
95asm/sparcv8.o: asm/sparcv8.S
96
97asm/sparcv8plus.o: asm/sparcv8plus.S
98
99# Old GNU assembler doesn't understand V9 instructions, so we
100# hire /usr/ccs/bin/as to do the job. Note that option is called
101# *-gcc27, but even gcc 2>=8 users may experience similar problem
102# if they didn't bother to upgrade GNU assembler. Such users should
103# not choose this option, but be adviced to *remove* GNU assembler
104# or upgrade it.
105asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S
106 $(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \
107 /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o
108
109
110asm/ia64.o: asm/ia64.S
111
112# Some compiler drivers (most notably HP-UX and Intel C++) don't
113# understand .S extension:-( I wish I could pipe output from cc -E,
114# but it's too compiler driver/ABI dependent to cover with a single
115# rule... <appro@fy.chalmers.se>
116asm/ia64-cpp.o: asm/ia64.S
117 $(CC) $(ASFLAGS) -E asm/ia64.S > /tmp/ia64.$$$$.s && \
118 $(CC) $(ASFLAGS) -c -o asm/ia64-cpp.o /tmp/ia64.$$$$.s; \
119 rm -f /tmp/ia64.$$$$.s
120
121asm/x86_64-gcc.o: asm/x86_64-gcc.c
122
123files:
124 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
125
126links:
127 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
128 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
129 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
130 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
131
132install:
133 @for i in $(EXHEADER) ; \
134 do \
135 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
136 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
137 done;
138
139exptest:
140 rm -f exptest
141 gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a
142
143div:
144 rm -f a.out
145 gcc -I.. -g div.c ../../libcrypto.a
146
147tags:
148 ctags $(SRC)
149
150tests:
151
152lint:
153 lint -DLINT $(INCLUDES) $(SRC)>fluff
154
155depend:
156 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
157
158dclean:
159 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
160 mv -f Makefile.new $(MAKEFILE)
161
162clean:
163 rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
164
165# DO NOT DELETE THIS LINE -- make depend depends on it.
166
167bn_add.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
168bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
169bn_add.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
170bn_add.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
171bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
172bn_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
173bn_add.o: ../cryptlib.h bn_add.c bn_lcl.h
174bn_asm.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
175bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
176bn_asm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
177bn_asm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
178bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
179bn_asm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
180bn_asm.o: ../cryptlib.h bn_asm.c bn_lcl.h
181bn_blind.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
182bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
183bn_blind.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
184bn_blind.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
185bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
186bn_blind.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
187bn_blind.o: ../cryptlib.h bn_blind.c bn_lcl.h
188bn_ctx.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
189bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
190bn_ctx.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
191bn_ctx.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
192bn_ctx.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
193bn_ctx.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
194bn_ctx.o: ../cryptlib.h bn_ctx.c bn_lcl.h
195bn_div.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
196bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
197bn_div.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
198bn_div.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
199bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
200bn_div.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
201bn_div.o: ../cryptlib.h bn_div.c bn_lcl.h
202bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
203bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
204bn_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
205bn_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
206bn_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
207bn_err.o: ../../include/openssl/symhacks.h bn_err.c
208bn_exp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
209bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
210bn_exp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
211bn_exp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
212bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
213bn_exp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
214bn_exp.o: ../cryptlib.h bn_exp.c bn_lcl.h
215bn_exp2.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
216bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
217bn_exp2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
218bn_exp2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
219bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
220bn_exp2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
221bn_exp2.o: ../cryptlib.h bn_exp2.c bn_lcl.h
222bn_gcd.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
223bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
224bn_gcd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
225bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
226bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
227bn_gcd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
228bn_gcd.o: ../cryptlib.h bn_gcd.c bn_lcl.h
229bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
230bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h
231bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
232bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
233bn_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
234bn_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
235bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
236bn_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
237bn_lib.o: ../cryptlib.h bn_lcl.h bn_lib.c
238bn_mod.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
239bn_mod.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
240bn_mod.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
241bn_mod.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
242bn_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
243bn_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
244bn_mod.o: ../cryptlib.h bn_lcl.h bn_mod.c
245bn_mont.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
246bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
247bn_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
248bn_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
249bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
250bn_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
251bn_mont.o: ../cryptlib.h bn_lcl.h bn_mont.c
252bn_mpi.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
253bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
254bn_mpi.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
255bn_mpi.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
256bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
257bn_mpi.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
258bn_mpi.o: ../cryptlib.h bn_lcl.h bn_mpi.c
259bn_mul.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
260bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
261bn_mul.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
262bn_mul.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
263bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
264bn_mul.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
265bn_mul.o: ../cryptlib.h bn_lcl.h bn_mul.c
266bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
267bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
268bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
269bn_prime.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
270bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
271bn_prime.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
272bn_prime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
273bn_prime.o: ../cryptlib.h bn_lcl.h bn_prime.c bn_prime.h
274bn_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
275bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
276bn_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
277bn_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
278bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
279bn_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
280bn_print.o: ../cryptlib.h bn_lcl.h bn_print.c
281bn_rand.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
282bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
283bn_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
284bn_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
285bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
286bn_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
287bn_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
288bn_rand.o: ../cryptlib.h bn_lcl.h bn_rand.c
289bn_recp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
290bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
291bn_recp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
292bn_recp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
293bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
294bn_recp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
295bn_recp.o: ../cryptlib.h bn_lcl.h bn_recp.c
296bn_shift.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
297bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
298bn_shift.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
299bn_shift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
300bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
301bn_shift.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
302bn_shift.o: ../cryptlib.h bn_lcl.h bn_shift.c
303bn_sqr.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
304bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
305bn_sqr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
306bn_sqr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
307bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
308bn_sqr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
309bn_sqr.o: ../cryptlib.h bn_lcl.h bn_sqr.c
310bn_sqrt.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
311bn_sqrt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
312bn_sqrt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
313bn_sqrt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
314bn_sqrt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
315bn_sqrt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
316bn_sqrt.o: ../cryptlib.h bn_lcl.h bn_sqrt.c
317bn_word.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
318bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
319bn_word.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
320bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
321bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
322bn_word.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
323bn_word.o: ../cryptlib.h bn_lcl.h bn_word.c
diff --git a/src/lib/libssl/src/crypto/bn/asm/bn-586.pl b/src/lib/libssl/src/crypto/bn/asm/bn-586.pl
index c4de4a2bee..9a78f63be1 100644
--- a/src/lib/libssl/src/crypto/bn/asm/bn-586.pl
+++ b/src/lib/libssl/src/crypto/bn/asm/bn-586.pl
@@ -11,7 +11,7 @@ require "x86asm.pl";
11&bn_div_words("bn_div_words"); 11&bn_div_words("bn_div_words");
12&bn_add_words("bn_add_words"); 12&bn_add_words("bn_add_words");
13&bn_sub_words("bn_sub_words"); 13&bn_sub_words("bn_sub_words");
14#&bn_sub_part_words("bn_sub_part_words"); 14&bn_sub_part_words("bn_sub_part_words") unless $main'openbsd;
15 15
16&asm_finish(); 16&asm_finish();
17 17
diff --git a/src/lib/libssl/src/crypto/bn/bn_lcl.h b/src/lib/libssl/src/crypto/bn/bn_lcl.h
index 253e195e23..5614bc6164 100644
--- a/src/lib/libssl/src/crypto/bn/bn_lcl.h
+++ b/src/lib/libssl/src/crypto/bn/bn_lcl.h
@@ -433,18 +433,19 @@ void bn_sqr_comba4(BN_ULONG *r,const BN_ULONG *a);
433int bn_cmp_words(const BN_ULONG *a,const BN_ULONG *b,int n); 433int bn_cmp_words(const BN_ULONG *a,const BN_ULONG *b,int n);
434int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b, 434int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b,
435 int cl, int dl); 435 int cl, int dl);
436#ifdef BN_RECURSION 436#if 0
437void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2, 437/* bn_mul.c rollback <appro> */
438 BN_ULONG *t); 438void bn_mul_recursive(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,int n2,
439void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int tn, 439 int dna,int dnb,BN_ULONG *t);
440 int n, BN_ULONG *t); 440void bn_mul_part_recursive(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,
441 int n,int tna,int tnb,BN_ULONG *t);
442#endif
443void bn_sqr_recursive(BN_ULONG *r,const BN_ULONG *a, int n2, BN_ULONG *t);
444void bn_mul_low_normal(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b, int n);
441void bn_mul_low_recursive(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,int n2, 445void bn_mul_low_recursive(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,int n2,
442 BN_ULONG *t); 446 BN_ULONG *t);
443void bn_mul_high(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,BN_ULONG *l,int n2, 447void bn_mul_high(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,BN_ULONG *l,int n2,
444 BN_ULONG *t); 448 BN_ULONG *t);
445void bn_sqr_recursive(BN_ULONG *r,const BN_ULONG *a, int n2, BN_ULONG *t);
446#endif
447void bn_mul_low_normal(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b, int n);
448 449
449#ifdef __cplusplus 450#ifdef __cplusplus
450} 451}
diff --git a/src/lib/libssl/src/crypto/bn/bn_lib.c b/src/lib/libssl/src/crypto/bn/bn_lib.c
index e1660450bc..463463cfcb 100644
--- a/src/lib/libssl/src/crypto/bn/bn_lib.c
+++ b/src/lib/libssl/src/crypto/bn/bn_lib.c
@@ -145,11 +145,11 @@ char *BN_options(void)
145 { 145 {
146 init++; 146 init++;
147#ifdef BN_LLONG 147#ifdef BN_LLONG
148 BIO_snprintf(data,sizeof data,"bn(%d,%d)", 148 snprintf(data,sizeof data,"bn(%d,%d)",(int)sizeof(BN_ULLONG)*8,
149 (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); 149 (int)sizeof(BN_ULONG)*8);
150#else 150#else
151 BIO_snprintf(data,sizeof data,"bn(%d,%d)", 151 snprintf(data,sizeof data,"bn(%d,%d)",(int)sizeof(BN_ULONG)*8,
152 (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); 152 (int)sizeof(BN_ULONG)*8);
153#endif 153#endif
154 } 154 }
155 return(data); 155 return(data);
diff --git a/src/lib/libssl/src/crypto/bn/bn_print.c b/src/lib/libssl/src/crypto/bn/bn_print.c
index 0d942603b1..ad80dab325 100644
--- a/src/lib/libssl/src/crypto/bn/bn_print.c
+++ b/src/lib/libssl/src/crypto/bn/bn_print.c
@@ -79,7 +79,7 @@ char *BN_bn2hex(const BIGNUM *a)
79 } 79 }
80 p=buf; 80 p=buf;
81 if (a->neg) *(p++)='-'; 81 if (a->neg) *(p++)='-';
82 if (a->top == 0) *(p++)='0'; 82 if (BN_is_zero(a)) *(p++)='0';
83 for (i=a->top-1; i >=0; i--) 83 for (i=a->top-1; i >=0; i--)
84 { 84 {
85 for (j=BN_BITS2-8; j >= 0; j-=8) 85 for (j=BN_BITS2-8; j >= 0; j-=8)
@@ -123,7 +123,7 @@ char *BN_bn2dec(const BIGNUM *a)
123 p=buf; 123 p=buf;
124 lp=bn_data; 124 lp=bn_data;
125 if (t->neg) *(p++)='-'; 125 if (t->neg) *(p++)='-';
126 if (t->top == 0) 126 if (BN_is_zero(t))
127 { 127 {
128 *(p++)='0'; 128 *(p++)='0';
129 *(p++)='\0'; 129 *(p++)='\0';
@@ -140,12 +140,12 @@ char *BN_bn2dec(const BIGNUM *a)
140 /* We now have a series of blocks, BN_DEC_NUM chars 140 /* We now have a series of blocks, BN_DEC_NUM chars
141 * in length, where the last one needs truncation. 141 * in length, where the last one needs truncation.
142 * The blocks need to be reversed in order. */ 142 * The blocks need to be reversed in order. */
143 BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); 143 snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
144 while (*p) p++; 144 while (*p) p++;
145 while (lp != bn_data) 145 while (lp != bn_data)
146 { 146 {
147 lp--; 147 lp--;
148 BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); 148 snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
149 while (*p) p++; 149 while (*p) p++;
150 } 150 }
151 } 151 }
@@ -300,7 +300,7 @@ int BN_print(BIO *bp, const BIGNUM *a)
300 int ret=0; 300 int ret=0;
301 301
302 if ((a->neg) && (BIO_write(bp,"-",1) != 1)) goto end; 302 if ((a->neg) && (BIO_write(bp,"-",1) != 1)) goto end;
303 if ((a->top == 0) && (BIO_write(bp,"0",1) != 1)) goto end; 303 if ((BN_is_zero(a)) && (BIO_write(bp,"0",1) != 1)) goto end;
304 for (i=a->top-1; i >=0; i--) 304 for (i=a->top-1; i >=0; i--)
305 { 305 {
306 for (j=BN_BITS2-4; j >= 0; j-=4) 306 for (j=BN_BITS2-4; j >= 0; j-=4)
diff --git a/src/lib/libssl/src/crypto/bn/bn_word.c b/src/lib/libssl/src/crypto/bn/bn_word.c
index 988e0ca7b3..de610ce54c 100644
--- a/src/lib/libssl/src/crypto/bn/bn_word.c
+++ b/src/lib/libssl/src/crypto/bn/bn_word.c
@@ -110,6 +110,9 @@ int BN_add_word(BIGNUM *a, BN_ULONG w)
110 BN_ULONG l; 110 BN_ULONG l;
111 int i; 111 int i;
112 112
113 if ((w & BN_MASK2) == 0)
114 return(1);
115
113 if (a->neg) 116 if (a->neg)
114 { 117 {
115 a->neg=0; 118 a->neg=0;
@@ -143,6 +146,9 @@ int BN_sub_word(BIGNUM *a, BN_ULONG w)
143 { 146 {
144 int i; 147 int i;
145 148
149 if ((w & BN_MASK2) == 0)
150 return(1);
151
146 if (BN_is_zero(a) || a->neg) 152 if (BN_is_zero(a) || a->neg)
147 { 153 {
148 a->neg=0; 154 a->neg=0;
diff --git a/src/lib/libssl/src/crypto/bn/bntest.c b/src/lib/libssl/src/crypto/bn/bntest.c
index 3c8c540387..8ef733013d 100644
--- a/src/lib/libssl/src/crypto/bn/bntest.c
+++ b/src/lib/libssl/src/crypto/bn/bntest.c
@@ -780,7 +780,7 @@ int test_mod_exp(BIO *bp, BN_CTX *ctx)
780 BN_bntest_rand(b,2+i,0,0); /**/ 780 BN_bntest_rand(b,2+i,0,0); /**/
781 781
782 if (!BN_mod_exp(d,a,b,c,ctx)) 782 if (!BN_mod_exp(d,a,b,c,ctx))
783 return(00); 783 return(0);
784 784
785 if (bp != NULL) 785 if (bp != NULL)
786 { 786 {
@@ -831,7 +831,7 @@ int test_exp(BIO *bp, BN_CTX *ctx)
831 BN_bntest_rand(b,2+i,0,0); /**/ 831 BN_bntest_rand(b,2+i,0,0); /**/
832 832
833 if (!BN_exp(d,a,b,ctx)) 833 if (!BN_exp(d,a,b,ctx))
834 return(00); 834 return(0);
835 835
836 if (bp != NULL) 836 if (bp != NULL)
837 { 837 {
diff --git a/src/lib/libssl/src/crypto/buffer/Makefile.ssl b/src/lib/libssl/src/crypto/buffer/Makefile.ssl
new file mode 100644
index 0000000000..b131ca3078
--- /dev/null
+++ b/src/lib/libssl/src/crypto/buffer/Makefile.ssl
@@ -0,0 +1,94 @@
1#
2# SSLeay/crypto/buffer/Makefile
3#
4
5DIR= buffer
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= buffer.c buf_err.c
27LIBOBJ= buffer.o buf_err.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= buffer.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82buf_err.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
83buf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
84buf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
85buf_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
86buf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
87buf_err.o: ../../include/openssl/symhacks.h buf_err.c
88buffer.o: ../../e_os.h ../../include/openssl/bio.h
89buffer.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
90buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
91buffer.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
92buffer.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
93buffer.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
94buffer.o: ../cryptlib.h buffer.c
diff --git a/src/lib/libssl/src/crypto/cast/Makefile.ssl b/src/lib/libssl/src/crypto/cast/Makefile.ssl
new file mode 100644
index 0000000000..2dc1c855ad
--- /dev/null
+++ b/src/lib/libssl/src/crypto/cast/Makefile.ssl
@@ -0,0 +1,119 @@
1#
2# SSLeay/crypto/cast/Makefile
3#
4
5DIR= cast
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20CAST_ENC=c_enc.o
21# or use
22#CAST_ENC=asm/cx86-elf.o
23#CAST_ENC=asm/cx86-out.o
24#CAST_ENC=asm/cx86-sol.o
25#CAST_ENC=asm/cx86bdsi.o
26
27CFLAGS= $(INCLUDES) $(CFLAG)
28
29GENERAL=Makefile
30TEST=casttest.c
31APPS=
32
33LIB=$(TOP)/libcrypto.a
34LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c
35LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o
36
37SRC= $(LIBSRC)
38
39EXHEADER= cast.h
40HEADER= cast_s.h cast_lcl.h $(EXHEADER)
41
42ALL= $(GENERAL) $(SRC) $(HEADER)
43
44top:
45 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
46
47all: lib
48
49lib: $(LIBOBJ)
50 $(AR) $(LIB) $(LIBOBJ)
51 $(RANLIB) $(LIB) || echo Never mind.
52 @touch lib
53
54# elf
55asm/cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
56 (cd asm; $(PERL) cast-586.pl elf $(CLAGS) $(PROCESSOR) > cx86-elf.s)
57
58# a.out
59asm/cx86-out.o: asm/cx86unix.cpp
60 $(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o
61
62# bsdi
63asm/cx86bsdi.o: asm/cx86unix.cpp
64 $(CPP) -DBSDI asm/cx86unix.cpp | sed 's/ :/:/' | as -o asm/cx86bsdi.o
65
66asm/cx86unix.cpp: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
67 (cd asm; $(PERL) cast-586.pl cpp $(PROCESSOR) >cx86unix.cpp)
68
69files:
70 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
71
72links:
73 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
74 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
75 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
76 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
77
78install:
79 @for i in $(EXHEADER) ; \
80 do \
81 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
82 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
83 done;
84
85tags:
86 ctags $(SRC)
87
88tests:
89
90lint:
91 lint -DLINT $(INCLUDES) $(SRC)>fluff
92
93depend:
94 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
95
96dclean:
97 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
98 mv -f Makefile.new $(MAKEFILE)
99
100clean:
101 rm -f asm/cx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
102
103# DO NOT DELETE THIS LINE -- make depend depends on it.
104
105c_cfb64.o: ../../e_os.h ../../include/openssl/cast.h
106c_cfb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
107c_cfb64.o: c_cfb64.c cast_lcl.h
108c_ecb.o: ../../e_os.h ../../include/openssl/cast.h
109c_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
110c_ecb.o: ../../include/openssl/opensslv.h c_ecb.c cast_lcl.h
111c_enc.o: ../../e_os.h ../../include/openssl/cast.h
112c_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
113c_enc.o: c_enc.c cast_lcl.h
114c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h
115c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
116c_ofb64.o: c_ofb64.c cast_lcl.h
117c_skey.o: ../../e_os.h ../../include/openssl/cast.h
118c_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
119c_skey.o: c_skey.c cast_lcl.h cast_s.h
diff --git a/src/lib/libssl/src/crypto/cast/asm/cast-586.pl b/src/lib/libssl/src/crypto/cast/asm/cast-586.pl
index 6be0bfe572..0ed55d1905 100644
--- a/src/lib/libssl/src/crypto/cast/asm/cast-586.pl
+++ b/src/lib/libssl/src/crypto/cast/asm/cast-586.pl
@@ -28,7 +28,7 @@ $S4="CAST_S_table3";
28 28
29&CAST_encrypt("CAST_encrypt",1); 29&CAST_encrypt("CAST_encrypt",1);
30&CAST_encrypt("CAST_decrypt",0); 30&CAST_encrypt("CAST_decrypt",0);
31&cbc("CAST_cbc_encrypt","CAST_encrypt","CAST_decrypt",1,4,5,3,-1,-1); 31&cbc("CAST_cbc_encrypt","CAST_encrypt","CAST_decrypt",1,4,5,3,-1,-1) unless $main'openbsd;
32 32
33&asm_finish(); 33&asm_finish();
34 34
diff --git a/src/lib/libssl/src/crypto/cast/c_enc.c b/src/lib/libssl/src/crypto/cast/c_enc.c
index 0fe2cffecc..e80f65b698 100644
--- a/src/lib/libssl/src/crypto/cast/c_enc.c
+++ b/src/lib/libssl/src/crypto/cast/c_enc.c
@@ -59,6 +59,7 @@
59#include <openssl/cast.h> 59#include <openssl/cast.h>
60#include "cast_lcl.h" 60#include "cast_lcl.h"
61 61
62#ifndef OPENBSD_CAST_ASM
62void CAST_encrypt(CAST_LONG *data, CAST_KEY *key) 63void CAST_encrypt(CAST_LONG *data, CAST_KEY *key)
63 { 64 {
64 register CAST_LONG l,r,*k,t; 65 register CAST_LONG l,r,*k,t;
@@ -122,6 +123,7 @@ void CAST_decrypt(CAST_LONG *data, CAST_KEY *key)
122 data[1]=l&0xffffffffL; 123 data[1]=l&0xffffffffL;
123 data[0]=r&0xffffffffL; 124 data[0]=r&0xffffffffL;
124 } 125 }
126#endif
125 127
126void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 128void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
127 CAST_KEY *ks, unsigned char *iv, int enc) 129 CAST_KEY *ks, unsigned char *iv, int enc)
diff --git a/src/lib/libssl/src/crypto/comp/Makefile.ssl b/src/lib/libssl/src/crypto/comp/Makefile.ssl
new file mode 100644
index 0000000000..f70ba1b285
--- /dev/null
+++ b/src/lib/libssl/src/crypto/comp/Makefile.ssl
@@ -0,0 +1,114 @@
1#
2# SSLeay/crypto/comp/Makefile
3#
4
5DIR= comp
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= comp_lib.c comp_err.c \
27 c_rle.c c_zlib.c
28
29LIBOBJ= comp_lib.o comp_err.o \
30 c_rle.o c_zlib.o
31
32SRC= $(LIBSRC)
33
34EXHEADER= comp.h
35HEADER= $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49files:
50 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
51
52links:
53 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
54 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
55 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
56 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
57
58install:
59 @for i in $(EXHEADER) ; \
60 do \
61 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
62 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
63 done;
64
65tags:
66 ctags $(SRC)
67
68tests:
69
70lint:
71 lint -DLINT $(INCLUDES) $(SRC)>fluff
72
73depend:
74 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
75
76dclean:
77 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
78 mv -f Makefile.new $(MAKEFILE)
79
80clean:
81 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
82
83# DO NOT DELETE THIS LINE -- make depend depends on it.
84
85c_rle.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
86c_rle.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
87c_rle.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
88c_rle.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
89c_rle.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
90c_rle.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
91c_rle.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h c_rle.c
92c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
93c_zlib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
94c_zlib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
95c_zlib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
96c_zlib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
97c_zlib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
98c_zlib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
99c_zlib.o: c_zlib.c
100comp_err.o: ../../include/openssl/bio.h ../../include/openssl/comp.h
101comp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
102comp_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
103comp_err.o: ../../include/openssl/opensslconf.h
104comp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
105comp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
106comp_err.o: comp_err.c
107comp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
108comp_lib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
109comp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
110comp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
111comp_lib.o: ../../include/openssl/opensslconf.h
112comp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
113comp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
114comp_lib.o: ../../include/openssl/symhacks.h comp_lib.c
diff --git a/src/lib/libssl/src/crypto/conf/Makefile.ssl b/src/lib/libssl/src/crypto/conf/Makefile.ssl
new file mode 100644
index 0000000000..c5873bc6e7
--- /dev/null
+++ b/src/lib/libssl/src/crypto/conf/Makefile.ssl
@@ -0,0 +1,183 @@
1#
2# SSLeay/crypto/conf/Makefile
3#
4
5DIR= conf
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c \
27 conf_mall.c conf_sap.c
28
29LIBOBJ= conf_err.o conf_lib.o conf_api.o conf_def.o conf_mod.o \
30 conf_mall.o conf_sap.o
31
32SRC= $(LIBSRC)
33
34EXHEADER= conf.h conf_api.h
35HEADER= conf_def.h $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49files:
50 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
51
52links:
53 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
54 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
55 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
56 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
57
58install:
59 @for i in $(EXHEADER) ; \
60 do \
61 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
62 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
63 done;
64
65tags:
66 ctags $(SRC)
67
68tests:
69
70lint:
71 lint -DLINT $(INCLUDES) $(SRC)>fluff
72
73depend:
74 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
75
76dclean:
77 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
78 mv -f Makefile.new $(MAKEFILE)
79
80clean:
81 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
82
83# DO NOT DELETE THIS LINE -- make depend depends on it.
84
85conf_api.o: ../../e_os.h ../../include/openssl/bio.h
86conf_api.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h
87conf_api.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
88conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
89conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
90conf_api.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
91conf_api.o: conf_api.c
92conf_def.o: ../../e_os.h ../../include/openssl/bio.h
93conf_def.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
94conf_def.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h
95conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
96conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
97conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
98conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
99conf_def.o: ../cryptlib.h conf_def.c conf_def.h
100conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h
101conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
102conf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
103conf_err.o: ../../include/openssl/opensslconf.h
104conf_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
105conf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
106conf_err.o: conf_err.c
107conf_lib.o: ../../include/openssl/bio.h ../../include/openssl/conf.h
108conf_lib.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h
109conf_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
110conf_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
111conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
112conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
113conf_lib.o: conf_lib.c
114conf_mall.o: ../../e_os.h ../../include/openssl/aes.h
115conf_mall.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
116conf_mall.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
117conf_mall.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
118conf_mall.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
119conf_mall.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
120conf_mall.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
121conf_mall.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
122conf_mall.o: ../../include/openssl/engine.h ../../include/openssl/err.h
123conf_mall.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
124conf_mall.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
125conf_mall.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
126conf_mall.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
127conf_mall.o: ../../include/openssl/objects.h
128conf_mall.o: ../../include/openssl/opensslconf.h
129conf_mall.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
130conf_mall.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
131conf_mall.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
132conf_mall.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
133conf_mall.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
134conf_mall.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
135conf_mall.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
136conf_mall.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
137conf_mall.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mall.c
138conf_mod.o: ../../e_os.h ../../include/openssl/aes.h
139conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
140conf_mod.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
141conf_mod.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
142conf_mod.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
143conf_mod.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
144conf_mod.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
145conf_mod.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
146conf_mod.o: ../../include/openssl/err.h ../../include/openssl/evp.h
147conf_mod.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
148conf_mod.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
149conf_mod.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
150conf_mod.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
151conf_mod.o: ../../include/openssl/opensslconf.h
152conf_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
153conf_mod.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
154conf_mod.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
155conf_mod.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
156conf_mod.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
157conf_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
158conf_mod.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
159conf_mod.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
160conf_mod.o: ../cryptlib.h conf_mod.c
161conf_sap.o: ../../e_os.h ../../include/openssl/aes.h
162conf_sap.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
163conf_sap.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
164conf_sap.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
165conf_sap.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
166conf_sap.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
167conf_sap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
168conf_sap.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
169conf_sap.o: ../../include/openssl/engine.h ../../include/openssl/err.h
170conf_sap.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
171conf_sap.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
172conf_sap.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
173conf_sap.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
174conf_sap.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
175conf_sap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
176conf_sap.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
177conf_sap.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
178conf_sap.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
179conf_sap.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
180conf_sap.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
181conf_sap.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
182conf_sap.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
183conf_sap.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_sap.c
diff --git a/src/lib/libssl/src/crypto/conf/conf_def.c b/src/lib/libssl/src/crypto/conf/conf_def.c
index 2e9f52f1fd..b52ee01a3c 100644
--- a/src/lib/libssl/src/crypto/conf/conf_def.c
+++ b/src/lib/libssl/src/crypto/conf/conf_def.c
@@ -235,7 +235,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
235 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); 235 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
236 goto err; 236 goto err;
237 } 237 }
238 BUF_strlcpy(section,"default",10); 238 strlcpy(section,"default",10);
239 239
240 if (_CONF_new_data(conf) == 0) 240 if (_CONF_new_data(conf) == 0)
241 { 241 {
@@ -392,7 +392,7 @@ again:
392 ERR_R_MALLOC_FAILURE); 392 ERR_R_MALLOC_FAILURE);
393 goto err; 393 goto err;
394 } 394 }
395 BUF_strlcpy(v->name,pname,strlen(pname)+1); 395 strlcpy(v->name,pname,strlen(pname)+1);
396 if (!str_copy(conf,psection,&(v->value),start)) goto err; 396 if (!str_copy(conf,psection,&(v->value),start)) goto err;
397 397
398 if (strcmp(psection,section) != 0) 398 if (strcmp(psection,section) != 0)
@@ -447,7 +447,7 @@ err:
447 if (buff != NULL) BUF_MEM_free(buff); 447 if (buff != NULL) BUF_MEM_free(buff);
448 if (section != NULL) OPENSSL_free(section); 448 if (section != NULL) OPENSSL_free(section);
449 if (line != NULL) *line=eline; 449 if (line != NULL) *line=eline;
450 BIO_snprintf(btmp,sizeof btmp,"%ld",eline); 450 snprintf(btmp,sizeof btmp,"%ld",eline);
451 ERR_add_error_data(2,"line ",btmp); 451 ERR_add_error_data(2,"line ",btmp);
452 if ((h != conf->data) && (conf->data != NULL)) 452 if ((h != conf->data) && (conf->data != NULL))
453 { 453 {
diff --git a/src/lib/libssl/src/crypto/conf/conf_mod.c b/src/lib/libssl/src/crypto/conf/conf_mod.c
index d45adea851..5a747e8c84 100644
--- a/src/lib/libssl/src/crypto/conf/conf_mod.c
+++ b/src/lib/libssl/src/crypto/conf/conf_mod.c
@@ -232,7 +232,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
232 { 232 {
233 char rcode[DECIMAL_SIZE(ret)+1]; 233 char rcode[DECIMAL_SIZE(ret)+1];
234 CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR); 234 CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR);
235 BIO_snprintf(rcode, sizeof rcode, "%-8d", ret); 235 snprintf(rcode, sizeof rcode, "%-8d", ret);
236 ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); 236 ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
237 } 237 }
238 } 238 }
@@ -561,11 +561,11 @@ char *CONF_get1_default_config_file(void)
561 561
562 if (!file) 562 if (!file)
563 return NULL; 563 return NULL;
564 BUF_strlcpy(file,X509_get_default_cert_area(),len + 1); 564 strlcpy(file,X509_get_default_cert_area(),len + 1);
565#ifndef OPENSSL_SYS_VMS 565#ifndef OPENSSL_SYS_VMS
566 BUF_strlcat(file,"/",len + 1); 566 strlcat(file,"/",len + 1);
567#endif 567#endif
568 BUF_strlcat(file,OPENSSL_CONF,len + 1); 568 strlcat(file,OPENSSL_CONF,len + 1);
569 569
570 return file; 570 return file;
571 } 571 }
@@ -576,12 +576,12 @@ char *CONF_get1_default_config_file(void)
576 * be used to parse comma separated lists for example. 576 * be used to parse comma separated lists for example.
577 */ 577 */
578 578
579int CONF_parse_list(const char *list_, int sep, int nospc, 579int CONF_parse_list(const char *list, int sep, int nospc,
580 int (*list_cb)(const char *elem, int len, void *usr), void *arg) 580 int (*list_cb)(const char *elem, int len, void *usr), void *arg)
581 { 581 {
582 int ret; 582 int ret;
583 const char *lstart, *tmpend, *p; 583 const char *lstart, *tmpend, *p;
584 lstart = list_; 584 lstart = list;
585 585
586 for(;;) 586 for(;;)
587 { 587 {
diff --git a/src/lib/libssl/src/crypto/cversion.c b/src/lib/libssl/src/crypto/cversion.c
index beeeb14013..56471fa74c 100644
--- a/src/lib/libssl/src/crypto/cversion.c
+++ b/src/lib/libssl/src/crypto/cversion.c
@@ -74,7 +74,7 @@ const char *SSLeay_version(int t)
74#ifdef DATE 74#ifdef DATE
75 static char buf[sizeof(DATE)+11]; 75 static char buf[sizeof(DATE)+11];
76 76
77 BIO_snprintf(buf,sizeof buf,"built on: %s",DATE); 77 snprintf(buf,sizeof buf,"built on: %s",DATE);
78 return(buf); 78 return(buf);
79#else 79#else
80 return("built on: date not available"); 80 return("built on: date not available");
@@ -85,7 +85,7 @@ const char *SSLeay_version(int t)
85#ifdef CFLAGS 85#ifdef CFLAGS
86 static char buf[sizeof(CFLAGS)+11]; 86 static char buf[sizeof(CFLAGS)+11];
87 87
88 BIO_snprintf(buf,sizeof buf,"compiler: %s",CFLAGS); 88 snprintf(buf,sizeof buf,"compiler: %s",CFLAGS);
89 return(buf); 89 return(buf);
90#else 90#else
91 return("compiler: information not available"); 91 return("compiler: information not available");
@@ -96,7 +96,7 @@ const char *SSLeay_version(int t)
96#ifdef PLATFORM 96#ifdef PLATFORM
97 static char buf[sizeof(PLATFORM)+11]; 97 static char buf[sizeof(PLATFORM)+11];
98 98
99 BIO_snprintf(buf,sizeof buf,"platform: %s", PLATFORM); 99 snprintf(buf,sizeof buf,"platform: %s", PLATFORM);
100 return(buf); 100 return(buf);
101#else 101#else
102 return("platform: information not available"); 102 return("platform: information not available");
diff --git a/src/lib/libssl/src/crypto/des/Makefile.ssl b/src/lib/libssl/src/crypto/des/Makefile.ssl
new file mode 100644
index 0000000000..45eba0b3c9
--- /dev/null
+++ b/src/lib/libssl/src/crypto/des/Makefile.ssl
@@ -0,0 +1,314 @@
1#
2# SSLeay/crypto/des/Makefile
3#
4
5DIR= des
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=-I$(TOP) -I../../include
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19RANLIB= ranlib
20DES_ENC= des_enc.o fcrypt_b.o
21# or use
22#DES_ENC= dx86-elf.o yx86-elf.o
23
24CFLAGS= $(INCLUDES) $(CFLAG)
25
26GENERAL=Makefile
27TEST=destest.c
28APPS=
29
30LIB=$(TOP)/libcrypto.a
31LIBSRC= cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c \
32 ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c \
33 fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c \
34 qud_cksm.c rand_key.c rpc_enc.c set_key.c \
35 des_enc.c fcrypt_b.c \
36 xcbc_enc.c \
37 str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c des_old.c des_old2.c \
38 read2pwd.c
39
40LIBOBJ= set_key.o ecb_enc.o cbc_enc.o \
41 ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o ofb64ede.o \
42 enc_read.o enc_writ.o ofb64enc.o \
43 ofb_enc.o str2key.o pcbc_enc.o qud_cksm.o rand_key.o \
44 ${DES_ENC} \
45 fcrypt.o xcbc_enc.o rpc_enc.o cbc_cksm.o \
46 ede_cbcm_enc.o des_old.o des_old2.o read2pwd.o
47
48SRC= $(LIBSRC)
49
50EXHEADER= des.h des_old.h
51HEADER= des_locl.h rpc_des.h spr.h des_ver.h $(EXHEADER)
52
53ALL= $(GENERAL) $(SRC) $(HEADER)
54
55top:
56 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
57
58all: lib
59
60lib: $(LIBOBJ)
61 $(AR) $(LIB) $(LIBOBJ)
62 $(RANLIB) $(LIB) || echo Never mind.
63 @touch lib
64
65des: des.o cbc3_enc.o lib
66 $(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB)
67
68# elf
69asm/dx86-elf.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
70 (cd asm; $(PERL) des-586.pl elf $(CFLAGS) > dx86-elf.s)
71
72asm/yx86-elf.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
73 (cd asm; $(PERL) crypt586.pl elf $(CFLAGS) > yx86-elf.s)
74
75# a.out
76asm/dx86-out.o: asm/dx86unix.cpp
77 $(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o
78
79asm/yx86-out.o: asm/yx86unix.cpp
80 $(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o
81
82# bsdi
83asm/dx86bsdi.o: asm/dx86unix.cpp
84 $(CPP) -DBSDI asm/dx86unix.cpp | sed 's/ :/:/' | as -o asm/dx86bsdi.o
85
86asm/yx86bsdi.o: asm/yx86unix.cpp
87 $(CPP) -DBSDI asm/yx86unix.cpp | sed 's/ :/:/' | as -o asm/yx86bsdi.o
88
89asm/dx86unix.cpp: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
90 (cd asm; $(PERL) des-586.pl cpp >dx86unix.cpp)
91
92asm/yx86unix.cpp: asm/crypt586.pl ../perlasm/x86asm.pl
93 (cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp)
94
95files:
96 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
97
98links:
99 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
100 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
101 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
102 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
103
104install: installs
105
106installs:
107 @for i in $(EXHEADER) ; \
108 do \
109 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
110 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
111 done;
112
113tags:
114 ctags $(SRC)
115
116tests:
117
118lint:
119 lint -DLINT $(INCLUDES) $(SRC)>fluff
120
121depend:
122 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
123
124dclean:
125 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
126 mv -f Makefile.new $(MAKEFILE)
127
128clean:
129 rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
130
131# DO NOT DELETE THIS LINE -- make depend depends on it.
132
133cbc_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
134cbc_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
135cbc_cksm.o: ../../include/openssl/opensslconf.h
136cbc_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
137cbc_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
138cbc_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
139cbc_cksm.o: cbc_cksm.c des_locl.h
140cbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
141cbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
142cbc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
143cbc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
144cbc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
145cbc_enc.o: ../../include/openssl/ui_compat.h cbc_enc.c des_locl.h ncbc_enc.c
146cfb64ede.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
147cfb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
148cfb64ede.o: ../../include/openssl/opensslconf.h
149cfb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
150cfb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
151cfb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
152cfb64ede.o: cfb64ede.c des_locl.h
153cfb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
154cfb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
155cfb64enc.o: ../../include/openssl/opensslconf.h
156cfb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
157cfb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
158cfb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
159cfb64enc.o: cfb64enc.c des_locl.h
160cfb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
161cfb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
162cfb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
163cfb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
164cfb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
165cfb_enc.o: ../../include/openssl/ui_compat.h cfb_enc.c des_locl.h
166des_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
167des_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
168des_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
169des_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
170des_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
171des_enc.o: ../../include/openssl/ui_compat.h des_enc.c des_locl.h ncbc_enc.c
172des_old.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
173des_old.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
174des_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
175des_old.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
176des_old.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
177des_old.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
178des_old.o: ../../include/openssl/ui_compat.h des_old.c
179des_old2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
180des_old2.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
181des_old2.o: ../../include/openssl/opensslconf.h
182des_old2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
183des_old2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
184des_old2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
185des_old2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
186des_old2.o: des_old2.c
187ecb3_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
188ecb3_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
189ecb3_enc.o: ../../include/openssl/opensslconf.h
190ecb3_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
191ecb3_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
192ecb3_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
193ecb3_enc.o: des_locl.h ecb3_enc.c
194ecb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
195ecb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
196ecb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
197ecb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
198ecb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
199ecb_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h ecb_enc.c
200ecb_enc.o: spr.h
201ede_cbcm_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
202ede_cbcm_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
203ede_cbcm_enc.o: ../../include/openssl/opensslconf.h
204ede_cbcm_enc.o: ../../include/openssl/opensslv.h
205ede_cbcm_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
206ede_cbcm_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
207ede_cbcm_enc.o: ../../include/openssl/ui_compat.h des_locl.h ede_cbcm_enc.c
208enc_read.o: ../../e_os.h ../../include/openssl/bio.h
209enc_read.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
210enc_read.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
211enc_read.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
212enc_read.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
213enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
214enc_read.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
215enc_read.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
216enc_read.o: ../cryptlib.h des_locl.h enc_read.c
217enc_writ.o: ../../e_os.h ../../include/openssl/bio.h
218enc_writ.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
219enc_writ.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
220enc_writ.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
221enc_writ.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
222enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
223enc_writ.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
224enc_writ.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
225enc_writ.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
226enc_writ.o: ../cryptlib.h des_locl.h enc_writ.c
227fcrypt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
228fcrypt.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
229fcrypt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
230fcrypt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
231fcrypt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
232fcrypt.o: ../../include/openssl/ui_compat.h des_locl.h fcrypt.c
233fcrypt_b.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
234fcrypt_b.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
235fcrypt_b.o: ../../include/openssl/opensslconf.h
236fcrypt_b.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
237fcrypt_b.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
238fcrypt_b.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
239fcrypt_b.o: des_locl.h fcrypt_b.c
240ofb64ede.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
241ofb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
242ofb64ede.o: ../../include/openssl/opensslconf.h
243ofb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
244ofb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
245ofb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
246ofb64ede.o: des_locl.h ofb64ede.c
247ofb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
248ofb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
249ofb64enc.o: ../../include/openssl/opensslconf.h
250ofb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
251ofb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
252ofb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
253ofb64enc.o: des_locl.h ofb64enc.c
254ofb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
255ofb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
256ofb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
257ofb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
258ofb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
259ofb_enc.o: ../../include/openssl/ui_compat.h des_locl.h ofb_enc.c
260pcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
261pcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
262pcbc_enc.o: ../../include/openssl/opensslconf.h
263pcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
264pcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
265pcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
266pcbc_enc.o: des_locl.h pcbc_enc.c
267qud_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
268qud_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
269qud_cksm.o: ../../include/openssl/opensslconf.h
270qud_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
271qud_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
272qud_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
273qud_cksm.o: des_locl.h qud_cksm.c
274rand_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
275rand_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
276rand_key.o: ../../include/openssl/opensslconf.h
277rand_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
278rand_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
279rand_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
280rand_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
281rand_key.o: rand_key.c
282read2pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
283read2pwd.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
284read2pwd.o: ../../include/openssl/opensslconf.h
285read2pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
286read2pwd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
287read2pwd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
288read2pwd.o: read2pwd.c
289rpc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
290rpc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
291rpc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
292rpc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
293rpc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
294rpc_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h rpc_des.h
295rpc_enc.o: rpc_enc.c
296set_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
297set_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
298set_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
299set_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
300set_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
301set_key.o: ../../include/openssl/ui_compat.h des_locl.h set_key.c
302str2key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
303str2key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
304str2key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
305str2key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
306str2key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
307str2key.o: ../../include/openssl/ui_compat.h des_locl.h str2key.c
308xcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
309xcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
310xcbc_enc.o: ../../include/openssl/opensslconf.h
311xcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
312xcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
313xcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
314xcbc_enc.o: des_locl.h xcbc_enc.c
diff --git a/src/lib/libssl/src/crypto/des/asm/des-586.pl b/src/lib/libssl/src/crypto/des/asm/des-586.pl
index b75d3c6b3a..60d577cc8d 100644
--- a/src/lib/libssl/src/crypto/des/asm/des-586.pl
+++ b/src/lib/libssl/src/crypto/des/asm/des-586.pl
@@ -22,10 +22,14 @@ $R="esi";
22&external_label("DES_SPtrans"); 22&external_label("DES_SPtrans");
23&DES_encrypt("DES_encrypt1",1); 23&DES_encrypt("DES_encrypt1",1);
24&DES_encrypt("DES_encrypt2",0); 24&DES_encrypt("DES_encrypt2",0);
25&DES_encrypt3("DES_encrypt3",1); 25
26&DES_encrypt3("DES_decrypt3",0); 26if (!$main'openbsd)
27&cbc("DES_ncbc_encrypt","DES_encrypt1","DES_encrypt1",0,4,5,3,5,-1); 27 {
28&cbc("DES_ede3_cbc_encrypt","DES_encrypt3","DES_decrypt3",0,6,7,3,4,5); 28 &DES_encrypt3("DES_encrypt3",1);
29 &DES_encrypt3("DES_decrypt3",0);
30 &cbc("DES_ncbc_encrypt","DES_encrypt1","DES_encrypt1",0,4,5,3,5,-1);
31 &cbc("DES_ede3_cbc_encrypt","DES_encrypt3","DES_decrypt3",0,6,7,3,4,5);
32 }
29 33
30&asm_finish(); 34&asm_finish();
31 35
diff --git a/src/lib/libssl/src/crypto/des/cfb_enc.c b/src/lib/libssl/src/crypto/des/cfb_enc.c
index 03cabb223c..2600bdfc93 100644
--- a/src/lib/libssl/src/crypto/des/cfb_enc.c
+++ b/src/lib/libssl/src/crypto/des/cfb_enc.c
@@ -56,7 +56,6 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include "e_os.h"
60#include "des_locl.h" 59#include "des_locl.h"
61 60
62/* The input and output are loaded in multiples of 8 bits. 61/* The input and output are loaded in multiples of 8 bits.
@@ -65,15 +64,17 @@
65 * the second. The second 12 bits will come from the 3rd and half the 4th 64 * the second. The second 12 bits will come from the 3rd and half the 4th
66 * byte. 65 * byte.
67 */ 66 */
67/* WARNING WARNING: this uses in and out in 8-byte chunks regardless of
68 * length */
68/* Until Aug 1 2003 this function did not correctly implement CFB-r, so it 69/* Until Aug 1 2003 this function did not correctly implement CFB-r, so it
69 * will not be compatible with any encryption prior to that date. Ben. */ 70 * will not be compatible with any encryption prior to that date. Ben. */
70void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, 71void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
71 long length, DES_key_schedule *schedule, DES_cblock *ivec, 72 long length, DES_key_schedule *schedule, DES_cblock *ivec,
72 int enc) 73 int enc)
73 { 74 {
74 register DES_LONG d0,d1,v0,v1; 75 register DES_LONG d0,d1,v0,v1,n=(numbits+7)/8;
75 register unsigned long l=length,n=(numbits+7)/8; 76 register unsigned long l=length;
76 register int num=numbits,i; 77 register int num=numbits;
77 DES_LONG ti[2]; 78 DES_LONG ti[2];
78 unsigned char *iv; 79 unsigned char *iv;
79 unsigned char ovec[16]; 80 unsigned char ovec[16];
@@ -113,10 +114,10 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
113 memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0)); 114 memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
114 /* now the remaining bits */ 115 /* now the remaining bits */
115 if(num%8 != 0) 116 if(num%8 != 0)
116 for(i=0 ; i < 8 ; ++i) 117 for(n=0 ; n < 8 ; ++n)
117 { 118 {
118 ovec[i]<<=num%8; 119 ovec[n]<<=num%8;
119 ovec[i]|=ovec[i+1]>>(8-num%8); 120 ovec[n]|=ovec[n+1]>>(8-num%8);
120 } 121 }
121 iv=&ovec[0]; 122 iv=&ovec[0];
122 c2l(iv,v0); 123 c2l(iv,v0);
@@ -151,10 +152,10 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
151 memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0)); 152 memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
152 /* now the remaining bits */ 153 /* now the remaining bits */
153 if(num%8 != 0) 154 if(num%8 != 0)
154 for(i=0 ; i < 8 ; ++i) 155 for(n=0 ; n < 8 ; ++n)
155 { 156 {
156 ovec[i]<<=num%8; 157 ovec[n]<<=num%8;
157 ovec[i]|=ovec[i+1]>>(8-num%8); 158 ovec[n]|=ovec[n+1]>>(8-num%8);
158 } 159 }
159 iv=&ovec[0]; 160 iv=&ovec[0];
160 c2l(iv,v0); 161 c2l(iv,v0);
diff --git a/src/lib/libssl/src/crypto/des/des.h b/src/lib/libssl/src/crypto/des/des.h
index daaf239dbe..dfe5ff64e4 100644
--- a/src/lib/libssl/src/crypto/des/des.h
+++ b/src/lib/libssl/src/crypto/des/des.h
@@ -56,8 +56,8 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#ifndef HEADER_NEW_DES_H 59#ifndef HEADER_DES_H
60#define HEADER_NEW_DES_H 60#define HEADER_DES_H
61 61
62#ifdef OPENSSL_NO_DES 62#ifdef OPENSSL_NO_DES
63#error DES is disabled. 63#error DES is disabled.
@@ -71,6 +71,8 @@
71# define OPENSSL_EXTERN OPENSSL_EXPORT 71# define OPENSSL_EXTERN OPENSSL_EXPORT
72#endif 72#endif
73 73
74#define des_SPtrans DES_SPtrans
75
74#ifdef __cplusplus 76#ifdef __cplusplus
75extern "C" { 77extern "C" {
76#endif 78#endif
diff --git a/src/lib/libssl/src/crypto/des/des_enc.c b/src/lib/libssl/src/crypto/des/des_enc.c
index 1c37ab96d3..4f09804c44 100644
--- a/src/lib/libssl/src/crypto/des/des_enc.c
+++ b/src/lib/libssl/src/crypto/des/des_enc.c
@@ -58,6 +58,7 @@
58 58
59#include "des_locl.h" 59#include "des_locl.h"
60 60
61#ifndef OPENBSD_DES_ASM
61void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc) 62void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
62 { 63 {
63 register DES_LONG l,r,t,u; 64 register DES_LONG l,r,t,u;
@@ -246,6 +247,7 @@ void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc)
246 data[1]=ROTATE(r,3)&0xffffffffL; 247 data[1]=ROTATE(r,3)&0xffffffffL;
247 l=r=t=u=0; 248 l=r=t=u=0;
248 } 249 }
250#endif
249 251
250void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, 252void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1,
251 DES_key_schedule *ks2, DES_key_schedule *ks3) 253 DES_key_schedule *ks2, DES_key_schedule *ks3)
diff --git a/src/lib/libssl/src/crypto/des/des_old.h b/src/lib/libssl/src/crypto/des/des_old.h
index 1d840b474a..1d8bf65101 100644
--- a/src/lib/libssl/src/crypto/des/des_old.h
+++ b/src/lib/libssl/src/crypto/des/des_old.h
@@ -88,14 +88,14 @@
88 * 88 *
89 */ 89 */
90 90
91#ifndef HEADER_DES_H 91#ifndef HEADER_DES_OLD_H
92#define HEADER_DES_H 92#define HEADER_DES_OLD_H
93 93
94#ifdef OPENSSL_NO_DES 94#ifdef OPENSSL_NO_DES
95#error DES is disabled. 95#error DES is disabled.
96#endif 96#endif
97 97
98#ifndef HEADER_NEW_DES_H 98#ifndef HEADER_DES_H
99#error You must include des.h, not des_old.h directly. 99#error You must include des.h, not des_old.h directly.
100#endif 100#endif
101 101
diff --git a/src/lib/libssl/src/crypto/des/ecb_enc.c b/src/lib/libssl/src/crypto/des/ecb_enc.c
index 784aa5ba23..c828bdd45d 100644
--- a/src/lib/libssl/src/crypto/des/ecb_enc.c
+++ b/src/lib/libssl/src/crypto/des/ecb_enc.c
@@ -60,7 +60,6 @@
60#include "des_ver.h" 60#include "des_ver.h"
61#include "spr.h" 61#include "spr.h"
62#include <openssl/opensslv.h> 62#include <openssl/opensslv.h>
63#include <openssl/bio.h>
64 63
65OPENSSL_GLOBAL const char *libdes_version="libdes" OPENSSL_VERSION_PTEXT; 64OPENSSL_GLOBAL const char *libdes_version="libdes" OPENSSL_VERSION_PTEXT;
66OPENSSL_GLOBAL const char *DES_version="DES" OPENSSL_VERSION_PTEXT; 65OPENSSL_GLOBAL const char *DES_version="DES" OPENSSL_VERSION_PTEXT;
@@ -98,8 +97,8 @@ const char *DES_options(void)
98 size="int"; 97 size="int";
99 else 98 else
100 size="long"; 99 size="long";
101 BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, 100 snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
102 size); 101 size);
103 init=0; 102 init=0;
104 } 103 }
105 return(buf); 104 return(buf);
diff --git a/src/lib/libssl/src/crypto/dh/Makefile.ssl b/src/lib/libssl/src/crypto/dh/Makefile.ssl
new file mode 100644
index 0000000000..e05fc01a12
--- /dev/null
+++ b/src/lib/libssl/src/crypto/dh/Makefile.ssl
@@ -0,0 +1,133 @@
1#
2# SSLeay/crypto/dh/Makefile
3#
4
5DIR= dh
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST= dhtest.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= dh_asn1.c dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c
27LIBOBJ= dh_asn1.o dh_gen.o dh_key.o dh_lib.o dh_check.o dh_err.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= dh.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82dh_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
83dh_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
84dh_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
85dh_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
86dh_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
87dh_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
88dh_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
89dh_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
90dh_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
91dh_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_asn1.c
92dh_check.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
93dh_check.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
94dh_check.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
95dh_check.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
96dh_check.o: ../../include/openssl/opensslconf.h
97dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
98dh_check.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
99dh_check.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_check.c
100dh_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
101dh_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
102dh_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
103dh_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
104dh_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
105dh_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
106dh_err.o: ../../include/openssl/symhacks.h dh_err.c
107dh_gen.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
108dh_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
109dh_gen.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
110dh_gen.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
111dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
112dh_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
113dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
114dh_gen.o: ../cryptlib.h dh_gen.c
115dh_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
116dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
117dh_key.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
118dh_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
119dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
120dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
121dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
122dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_key.c
123dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
124dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
125dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
126dh_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
127dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
128dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
129dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
130dh_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
131dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
132dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
133dh_lib.o: ../cryptlib.h dh_lib.c
diff --git a/src/lib/libssl/src/crypto/dh/dh.h b/src/lib/libssl/src/crypto/dh/dh.h
index 05851f8429..d51dc130f4 100644
--- a/src/lib/libssl/src/crypto/dh/dh.h
+++ b/src/lib/libssl/src/crypto/dh/dh.h
@@ -101,7 +101,7 @@ struct dh_st
101 int version; 101 int version;
102 BIGNUM *p; 102 BIGNUM *p;
103 BIGNUM *g; 103 BIGNUM *g;
104 long length; /* optional */ 104 int length; /* optional */
105 BIGNUM *pub_key; /* g^x */ 105 BIGNUM *pub_key; /* g^x */
106 BIGNUM *priv_key; /* x */ 106 BIGNUM *priv_key; /* x */
107 107
diff --git a/src/lib/libssl/src/crypto/dsa/Makefile.ssl b/src/lib/libssl/src/crypto/dsa/Makefile.ssl
new file mode 100644
index 0000000000..e5f8a8cf51
--- /dev/null
+++ b/src/lib/libssl/src/crypto/dsa/Makefile.ssl
@@ -0,0 +1,171 @@
1#
2# SSLeay/crypto/dsa/Makefile
3#
4
5DIR= dsa
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=dsatest.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \
27 dsa_err.c dsa_ossl.c
28LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_asn1.o dsa_vrf.o dsa_sign.o \
29 dsa_err.o dsa_ossl.o
30
31SRC= $(LIBSRC)
32
33EXHEADER= dsa.h
34HEADER= $(EXHEADER)
35
36ALL= $(GENERAL) $(SRC) $(HEADER)
37
38top:
39 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
40
41all: lib
42
43lib: $(LIBOBJ)
44 $(AR) $(LIB) $(LIBOBJ)
45 $(RANLIB) $(LIB) || echo Never mind.
46 @touch lib
47
48files:
49 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
50
51links:
52 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
53 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
54 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
55 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
56
57install:
58 @for i in $(EXHEADER) ; \
59 do \
60 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
61 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
62 done;
63
64tags:
65 ctags $(SRC)
66
67tests:
68
69lint:
70 lint -DLINT $(INCLUDES) $(SRC)>fluff
71
72depend:
73 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
74
75dclean:
76 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
77 mv -f Makefile.new $(MAKEFILE)
78
79clean:
80 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
81
82# DO NOT DELETE THIS LINE -- make depend depends on it.
83
84dsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
85dsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
86dsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
87dsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
88dsa_asn1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
89dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
90dsa_asn1.o: ../../include/openssl/opensslconf.h
91dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
92dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
93dsa_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_asn1.c
94dsa_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
95dsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
96dsa_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
97dsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
98dsa_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
99dsa_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
100dsa_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
101dsa_err.o: dsa_err.c
102dsa_gen.o: ../../e_os.h ../../include/openssl/aes.h
103dsa_gen.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
104dsa_gen.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
105dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
106dsa_gen.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
107dsa_gen.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
108dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
109dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h
110dsa_gen.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
111dsa_gen.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
112dsa_gen.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
113dsa_gen.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
114dsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
115dsa_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
116dsa_gen.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
117dsa_gen.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
118dsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
119dsa_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
120dsa_gen.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
121dsa_gen.o: ../../include/openssl/ui_compat.h ../cryptlib.h dsa_gen.c
122dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
123dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
124dsa_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
125dsa_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
126dsa_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
127dsa_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
128dsa_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
129dsa_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
130dsa_key.o: ../cryptlib.h dsa_key.c
131dsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h
132dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
133dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
134dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
135dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
136dsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
137dsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
138dsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
139dsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
140dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
141dsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h dsa_lib.c
142dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
143dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
144dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
145dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
146dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
147dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
148dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
149dsa_ossl.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
150dsa_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
151dsa_ossl.o: ../cryptlib.h dsa_ossl.c
152dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h
153dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
154dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
155dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
156dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
157dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
158dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
159dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
160dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
161dsa_sign.o: ../cryptlib.h dsa_sign.c
162dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h
163dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
164dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
165dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
166dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
167dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
168dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
169dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
170dsa_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
171dsa_vrf.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_vrf.c
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..c0449d184e
--- /dev/null
+++ b/src/lib/libssl/src/crypto/dso/Makefile.ssl
@@ -0,0 +1,142 @@
1#
2# SSLeay/crypto/dso/Makefile
3#
4
5DIR= dso
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c \
27 dso_openssl.c dso_win32.c dso_vms.c
28LIBOBJ= dso_dl.o dso_dlfcn.o dso_err.o dso_lib.o dso_null.o \
29 dso_openssl.o dso_win32.o dso_vms.o
30
31SRC= $(LIBSRC)
32
33EXHEADER= dso.h
34HEADER= $(EXHEADER)
35
36ALL= $(GENERAL) $(SRC) $(HEADER)
37
38top:
39 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
40
41all: lib
42
43lib: $(LIBOBJ)
44 $(AR) $(LIB) $(LIBOBJ)
45 $(RANLIB) $(LIB) || echo Never mind.
46 @touch lib
47
48files:
49 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
50
51links:
52 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
53 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
54 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
55 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
56
57install:
58 @for i in $(EXHEADER) ; \
59 do \
60 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
61 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
62 done;
63
64tags:
65 ctags $(SRC)
66
67tests:
68
69lint:
70 lint -DLINT $(INCLUDES) $(SRC)>fluff
71
72depend:
73 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
74
75dclean:
76 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
77 mv -f Makefile.new $(MAKEFILE)
78
79clean:
80 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
81
82# DO NOT DELETE THIS LINE -- make depend depends on it.
83
84dso_dl.o: ../../e_os.h ../../include/openssl/bio.h
85dso_dl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
86dso_dl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
87dso_dl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
88dso_dl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
89dso_dl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
90dso_dl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_dl.c
91dso_dlfcn.o: ../../e_os.h ../../include/openssl/bio.h
92dso_dlfcn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
93dso_dlfcn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
94dso_dlfcn.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
95dso_dlfcn.o: ../../include/openssl/opensslconf.h
96dso_dlfcn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
97dso_dlfcn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
98dso_dlfcn.o: ../cryptlib.h dso_dlfcn.c
99dso_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
100dso_err.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
101dso_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
102dso_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
103dso_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
104dso_err.o: ../../include/openssl/symhacks.h dso_err.c
105dso_lib.o: ../../e_os.h ../../include/openssl/bio.h
106dso_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
107dso_lib.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
108dso_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
109dso_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
110dso_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
111dso_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_lib.c
112dso_null.o: ../../e_os.h ../../include/openssl/bio.h
113dso_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
114dso_null.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
115dso_null.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
116dso_null.o: ../../include/openssl/opensslconf.h
117dso_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
118dso_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
119dso_null.o: ../cryptlib.h dso_null.c
120dso_openssl.o: ../../e_os.h ../../include/openssl/bio.h
121dso_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
122dso_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
123dso_openssl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
124dso_openssl.o: ../../include/openssl/opensslconf.h
125dso_openssl.o: ../../include/openssl/opensslv.h
126dso_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
127dso_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_openssl.c
128dso_vms.o: ../../e_os.h ../../include/openssl/bio.h
129dso_vms.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
130dso_vms.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
131dso_vms.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
132dso_vms.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
133dso_vms.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
134dso_vms.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_vms.c
135dso_win32.o: ../../e_os.h ../../include/openssl/bio.h
136dso_win32.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
137dso_win32.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
138dso_win32.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
139dso_win32.o: ../../include/openssl/opensslconf.h
140dso_win32.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
141dso_win32.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
142dso_win32.o: ../cryptlib.h dso_win32.c
diff --git a/src/lib/libssl/src/crypto/dso/dso_lib.c b/src/lib/libssl/src/crypto/dso/dso_lib.c
index 48d9fdb25e..85ac5103cd 100644
--- a/src/lib/libssl/src/crypto/dso/dso_lib.c
+++ b/src/lib/libssl/src/crypto/dso/dso_lib.c
@@ -383,7 +383,7 @@ int DSO_set_filename(DSO *dso, const char *filename)
383 DSOerr(DSO_F_DSO_SET_FILENAME,ERR_R_MALLOC_FAILURE); 383 DSOerr(DSO_F_DSO_SET_FILENAME,ERR_R_MALLOC_FAILURE);
384 return(0); 384 return(0);
385 } 385 }
386 BUF_strlcpy(copied, filename, strlen(filename) + 1); 386 strlcpy(copied, filename, strlen(filename) + 1);
387 if(dso->filename) 387 if(dso->filename)
388 OPENSSL_free(dso->filename); 388 OPENSSL_free(dso->filename);
389 dso->filename = copied; 389 dso->filename = copied;
@@ -422,7 +422,7 @@ char *DSO_convert_filename(DSO *dso, const char *filename)
422 ERR_R_MALLOC_FAILURE); 422 ERR_R_MALLOC_FAILURE);
423 return(NULL); 423 return(NULL);
424 } 424 }
425 BUF_strlcpy(result, filename, strlen(filename) + 1); 425 strlcpy(result, filename, strlen(filename) + 1);
426 } 426 }
427 return(result); 427 return(result);
428 } 428 }
diff --git a/src/lib/libssl/src/crypto/ec/Makefile.ssl b/src/lib/libssl/src/crypto/ec/Makefile.ssl
new file mode 100644
index 0000000000..a2805c47a2
--- /dev/null
+++ b/src/lib/libssl/src/crypto/ec/Makefile.ssl
@@ -0,0 +1,128 @@
1#
2# crypto/ec/Makefile
3#
4
5DIR= ec
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=ectest.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.c ecp_nist.c ec_cvt.c ec_mult.c \
27 ec_err.c
28
29LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.o ecp_nist.o ec_cvt.o ec_mult.o \
30 ec_err.o
31
32SRC= $(LIBSRC)
33
34EXHEADER= ec.h
35HEADER= ec_lcl.h $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49files:
50 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
51
52links:
53 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
54 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
55 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
56 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
57
58install:
59 @for i in $(EXHEADER) ; \
60 do \
61 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
62 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
63 done;
64
65tags:
66 ctags $(SRC)
67
68tests:
69
70lint:
71 lint -DLINT $(INCLUDES) $(SRC)>fluff
72
73depend:
74 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
75
76dclean:
77 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
78 mv -f Makefile.new $(MAKEFILE)
79
80clean:
81 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
82
83# DO NOT DELETE THIS LINE -- make depend depends on it.
84
85ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
86ec_cvt.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
87ec_cvt.o: ../../include/openssl/symhacks.h ec_cvt.c ec_lcl.h
88ec_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
89ec_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
90ec_err.o: ../../include/openssl/ec.h ../../include/openssl/err.h
91ec_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
92ec_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
93ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
94ec_err.o: ec_err.c
95ec_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
96ec_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
97ec_lib.o: ../../include/openssl/ec.h ../../include/openssl/err.h
98ec_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
99ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
100ec_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
101ec_lib.o: ec_lcl.h ec_lib.c
102ec_mult.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
103ec_mult.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
104ec_mult.o: ../../include/openssl/ec.h ../../include/openssl/err.h
105ec_mult.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
106ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
107ec_mult.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
108ec_mult.o: ec_lcl.h ec_mult.c
109ecp_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
110ecp_mont.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
111ecp_mont.o: ../../include/openssl/ec.h ../../include/openssl/err.h
112ecp_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
113ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
114ecp_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
115ecp_mont.o: ec_lcl.h ecp_mont.c
116ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
117ecp_nist.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
118ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c
119ecp_recp.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
120ecp_recp.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
121ecp_recp.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_recp.c
122ecp_smpl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
123ecp_smpl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
124ecp_smpl.o: ../../include/openssl/ec.h ../../include/openssl/err.h
125ecp_smpl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
126ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
127ecp_smpl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
128ecp_smpl.o: ec_lcl.h ecp_smpl.c
diff --git a/src/lib/libssl/src/crypto/ec/ecp_smpl.c b/src/lib/libssl/src/crypto/ec/ecp_smpl.c
index e9a51fb87a..4666a052bf 100644
--- a/src/lib/libssl/src/crypto/ec/ecp_smpl.c
+++ b/src/lib/libssl/src/crypto/ec/ecp_smpl.c
@@ -896,7 +896,7 @@ int ec_GFp_simple_oct2point(const EC_GROUP *group, EC_POINT *point,
896 } 896 }
897 form = buf[0]; 897 form = buf[0];
898 y_bit = form & 1; 898 y_bit = form & 1;
899 form = form & ~1U; 899 form = form & ~1;
900 if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED) 900 if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED)
901 && (form != POINT_CONVERSION_UNCOMPRESSED) 901 && (form != POINT_CONVERSION_UNCOMPRESSED)
902 && (form != POINT_CONVERSION_HYBRID)) 902 && (form != POINT_CONVERSION_HYBRID))
diff --git a/src/lib/libssl/src/crypto/ec/ectest.c b/src/lib/libssl/src/crypto/ec/ectest.c
index 345d3e4289..fcf969f3cf 100644
--- a/src/lib/libssl/src/crypto/ec/ectest.c
+++ b/src/lib/libssl/src/crypto/ec/ectest.c
@@ -197,7 +197,7 @@ int main(int argc, char *argv[])
197 EC_GROUP *tmp; 197 EC_GROUP *tmp;
198 tmp = EC_GROUP_new(EC_GROUP_method_of(group)); 198 tmp = EC_GROUP_new(EC_GROUP_method_of(group));
199 if (!tmp) ABORT; 199 if (!tmp) ABORT;
200 if (!EC_GROUP_copy(tmp, group)); 200 if (!EC_GROUP_copy(tmp, group)) ABORT;
201 EC_GROUP_free(group); 201 EC_GROUP_free(group);
202 group = tmp; 202 group = tmp;
203 } 203 }
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..30a4446ff9
--- /dev/null
+++ b/src/lib/libssl/src/crypto/engine/Makefile.ssl
@@ -0,0 +1,538 @@
1#
2# OpenSSL/crypto/engine/Makefile
3#
4
5DIR= engine
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST= enginetest.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \
27 eng_table.c eng_pkey.c eng_fat.c eng_all.c \
28 tb_rsa.c tb_dsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c \
29 eng_openssl.c eng_dyn.c eng_cnf.c \
30 hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c \
31 hw_cryptodev.c hw_aep.c hw_sureware.c hw_4758_cca.c
32LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \
33 eng_table.o eng_pkey.o eng_fat.o eng_all.o \
34 tb_rsa.o tb_dsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o \
35 eng_openssl.o eng_dyn.o eng_cnf.o \
36 hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o \
37 hw_cryptodev.o hw_aep.o hw_sureware.o hw_4758_cca.o
38
39SRC= $(LIBSRC)
40
41EXHEADER= engine.h
42HEADER= $(EXHEADER)
43
44ALL= $(GENERAL) $(SRC) $(HEADER)
45
46top:
47 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
48
49all: lib
50
51lib: $(LIBOBJ)
52 $(AR) $(LIB) $(LIBOBJ)
53 $(RANLIB) $(LIB) || echo Never mind.
54 @touch lib
55
56files:
57 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
58
59links:
60 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
61 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
62 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
63 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
64
65install:
66 @for i in $(EXHEADER) ; \
67 do \
68 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
69 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
70 done;
71
72tags:
73 ctags $(SRC)
74
75errors:
76 $(PERL) $(TOP)/util/mkerr.pl -conf hw.ec \
77 -nostatic -staticloader -write hw_*.c
78
79tests:
80
81lint:
82 lint -DLINT $(INCLUDES) $(SRC)>fluff
83
84depend:
85 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
86
87dclean:
88 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
89 mv -f Makefile.new $(MAKEFILE)
90
91clean:
92 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
93
94# DO NOT DELETE THIS LINE -- make depend depends on it.
95
96eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
97eng_all.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
98eng_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
99eng_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
100eng_all.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
101eng_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
102eng_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
103eng_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
104eng_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
105eng_all.o: ../../include/openssl/ui.h eng_all.c eng_int.h
106eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h
107eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
108eng_cnf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
109eng_cnf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
110eng_cnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
111eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h
112eng_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
113eng_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
114eng_cnf.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
115eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
116eng_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
117eng_cnf.o: ../cryptlib.h eng_cnf.c
118eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h
119eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
120eng_ctrl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
121eng_ctrl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
122eng_ctrl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
123eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
124eng_ctrl.o: ../../include/openssl/opensslconf.h
125eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
126eng_ctrl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
127eng_ctrl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
128eng_ctrl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
129eng_ctrl.o: ../cryptlib.h eng_ctrl.c eng_int.h
130eng_dyn.o: ../../e_os.h ../../include/openssl/asn1.h
131eng_dyn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
132eng_dyn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
133eng_dyn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
134eng_dyn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
135eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h
136eng_dyn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
137eng_dyn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
138eng_dyn.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
139eng_dyn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
140eng_dyn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
141eng_dyn.o: ../cryptlib.h eng_dyn.c eng_int.h
142eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
143eng_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
144eng_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
145eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
146eng_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
147eng_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
148eng_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
149eng_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
150eng_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
151eng_err.o: ../../include/openssl/ui.h eng_err.c
152eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h
153eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
154eng_fat.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
155eng_fat.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
156eng_fat.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
157eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h
158eng_fat.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
159eng_fat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
160eng_fat.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
161eng_fat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
162eng_fat.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
163eng_fat.o: ../cryptlib.h eng_fat.c eng_int.h
164eng_init.o: ../../e_os.h ../../include/openssl/asn1.h
165eng_init.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
166eng_init.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
167eng_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
168eng_init.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
169eng_init.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
170eng_init.o: ../../include/openssl/opensslconf.h
171eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
172eng_init.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
173eng_init.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
174eng_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
175eng_init.o: ../cryptlib.h eng_init.c eng_int.h
176eng_lib.o: ../../e_os.h ../../include/openssl/asn1.h
177eng_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
178eng_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
179eng_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
180eng_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
181eng_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
182eng_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
183eng_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
184eng_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
185eng_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
186eng_lib.o: ../../include/openssl/ui.h ../cryptlib.h eng_int.h eng_lib.c
187eng_list.o: ../../e_os.h ../../include/openssl/asn1.h
188eng_list.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
189eng_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
190eng_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
191eng_list.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
192eng_list.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
193eng_list.o: ../../include/openssl/opensslconf.h
194eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
195eng_list.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
196eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
197eng_list.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
198eng_list.o: ../cryptlib.h eng_int.h eng_list.c
199eng_openssl.o: ../../e_os.h ../../include/openssl/aes.h
200eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
201eng_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
202eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
203eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
204eng_openssl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
205eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
206eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
207eng_openssl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
208eng_openssl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
209eng_openssl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
210eng_openssl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
211eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
212eng_openssl.o: ../../include/openssl/opensslconf.h
213eng_openssl.o: ../../include/openssl/opensslv.h
214eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
215eng_openssl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
216eng_openssl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
217eng_openssl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
218eng_openssl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
219eng_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
220eng_openssl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
221eng_openssl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
222eng_openssl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
223eng_openssl.o: ../cryptlib.h eng_openssl.c
224eng_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
225eng_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
226eng_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
227eng_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
228eng_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
229eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
230eng_pkey.o: ../../include/openssl/opensslconf.h
231eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
232eng_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
233eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
234eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
235eng_pkey.o: ../cryptlib.h eng_int.h eng_pkey.c
236eng_table.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
237eng_table.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
238eng_table.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
239eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
240eng_table.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
241eng_table.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
242eng_table.o: ../../include/openssl/engine.h ../../include/openssl/err.h
243eng_table.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
244eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
245eng_table.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
246eng_table.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
247eng_table.o: ../../include/openssl/objects.h
248eng_table.o: ../../include/openssl/opensslconf.h
249eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
250eng_table.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
251eng_table.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
252eng_table.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
253eng_table.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
254eng_table.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
255eng_table.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
256eng_table.o: eng_int.h eng_table.c
257hw_4758_cca.o: ../../e_os.h ../../include/openssl/aes.h
258hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
259hw_4758_cca.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
260hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
261hw_4758_cca.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
262hw_4758_cca.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
263hw_4758_cca.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
264hw_4758_cca.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
265hw_4758_cca.o: ../../include/openssl/err.h ../../include/openssl/evp.h
266hw_4758_cca.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
267hw_4758_cca.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
268hw_4758_cca.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
269hw_4758_cca.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
270hw_4758_cca.o: ../../include/openssl/opensslconf.h
271hw_4758_cca.o: ../../include/openssl/opensslv.h
272hw_4758_cca.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
273hw_4758_cca.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
274hw_4758_cca.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
275hw_4758_cca.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
276hw_4758_cca.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
277hw_4758_cca.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
278hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
279hw_4758_cca.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
280hw_4758_cca.o: ../cryptlib.h hw_4758_cca.c hw_4758_cca_err.c hw_4758_cca_err.h
281hw_4758_cca.o: vendor_defns/hw_4758_cca.h
282hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
283hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
284hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
285hw_aep.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
286hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
287hw_aep.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
288hw_aep.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
289hw_aep.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
290hw_aep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
291hw_aep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
292hw_aep.o: ../../include/openssl/ui.h hw_aep.c hw_aep_err.c hw_aep_err.h
293hw_aep.o: vendor_defns/aep.h
294hw_atalla.o: ../../e_os.h ../../include/openssl/asn1.h
295hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
296hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
297hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
298hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
299hw_atalla.o: ../../include/openssl/engine.h ../../include/openssl/err.h
300hw_atalla.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
301hw_atalla.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
302hw_atalla.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
303hw_atalla.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
304hw_atalla.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
305hw_atalla.o: ../cryptlib.h hw_atalla.c hw_atalla_err.c hw_atalla_err.h
306hw_atalla.o: vendor_defns/atalla.h
307hw_cryptodev.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
308hw_cryptodev.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
309hw_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
310hw_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
311hw_cryptodev.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
312hw_cryptodev.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
313hw_cryptodev.o: ../../include/openssl/engine.h ../../include/openssl/err.h
314hw_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
315hw_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
316hw_cryptodev.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
317hw_cryptodev.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
318hw_cryptodev.o: ../../include/openssl/objects.h
319hw_cryptodev.o: ../../include/openssl/opensslconf.h
320hw_cryptodev.o: ../../include/openssl/opensslv.h
321hw_cryptodev.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
322hw_cryptodev.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
323hw_cryptodev.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
324hw_cryptodev.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
325hw_cryptodev.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
326hw_cryptodev.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
327hw_cryptodev.o: ../../include/openssl/ui_compat.h hw_cryptodev.c
328hw_cswift.o: ../../e_os.h ../../include/openssl/asn1.h
329hw_cswift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
330hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
331hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
332hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
333hw_cswift.o: ../../include/openssl/engine.h ../../include/openssl/err.h
334hw_cswift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
335hw_cswift.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
336hw_cswift.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
337hw_cswift.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
338hw_cswift.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
339hw_cswift.o: ../cryptlib.h hw_cswift.c hw_cswift_err.c hw_cswift_err.h
340hw_cswift.o: vendor_defns/cswift.h
341hw_ncipher.o: ../../e_os.h ../../include/openssl/aes.h
342hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
343hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
344hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
345hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
346hw_ncipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
347hw_ncipher.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
348hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
349hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h
350hw_ncipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
351hw_ncipher.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
352hw_ncipher.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
353hw_ncipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
354hw_ncipher.o: ../../include/openssl/opensslconf.h
355hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
356hw_ncipher.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
357hw_ncipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
358hw_ncipher.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
359hw_ncipher.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
360hw_ncipher.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
361hw_ncipher.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
362hw_ncipher.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
363hw_ncipher.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
364hw_ncipher.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_ncipher.c
365hw_ncipher.o: hw_ncipher_err.c hw_ncipher_err.h vendor_defns/hwcryptohook.h
366hw_nuron.o: ../../e_os.h ../../include/openssl/asn1.h
367hw_nuron.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
368hw_nuron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
369hw_nuron.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
370hw_nuron.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
371hw_nuron.o: ../../include/openssl/engine.h ../../include/openssl/err.h
372hw_nuron.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
373hw_nuron.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
374hw_nuron.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
375hw_nuron.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
376hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
377hw_nuron.o: ../cryptlib.h hw_nuron.c hw_nuron_err.c hw_nuron_err.h
378hw_sureware.o: ../../e_os.h ../../include/openssl/aes.h
379hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
380hw_sureware.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
381hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
382hw_sureware.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
383hw_sureware.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
384hw_sureware.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
385hw_sureware.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
386hw_sureware.o: ../../include/openssl/err.h ../../include/openssl/evp.h
387hw_sureware.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
388hw_sureware.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
389hw_sureware.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
390hw_sureware.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
391hw_sureware.o: ../../include/openssl/opensslconf.h
392hw_sureware.o: ../../include/openssl/opensslv.h
393hw_sureware.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
394hw_sureware.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
395hw_sureware.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
396hw_sureware.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
397hw_sureware.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
398hw_sureware.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
399hw_sureware.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
400hw_sureware.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
401hw_sureware.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
402hw_sureware.o: ../cryptlib.h eng_int.h engine.h hw_sureware.c hw_sureware_err.c
403hw_sureware.o: hw_sureware_err.h vendor_defns/sureware.h
404hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h
405hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
406hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
407hw_ubsec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
408hw_ubsec.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
409hw_ubsec.o: ../../include/openssl/engine.h ../../include/openssl/err.h
410hw_ubsec.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
411hw_ubsec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
412hw_ubsec.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
413hw_ubsec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
414hw_ubsec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
415hw_ubsec.o: ../cryptlib.h hw_ubsec.c hw_ubsec_err.c hw_ubsec_err.h
416hw_ubsec.o: vendor_defns/hw_ubsec.h
417tb_cipher.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
418tb_cipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
419tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
420tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
421tb_cipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
422tb_cipher.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
423tb_cipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h
424tb_cipher.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
425tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
426tb_cipher.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
427tb_cipher.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
428tb_cipher.o: ../../include/openssl/objects.h
429tb_cipher.o: ../../include/openssl/opensslconf.h
430tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
431tb_cipher.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
432tb_cipher.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
433tb_cipher.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
434tb_cipher.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
435tb_cipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
436tb_cipher.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
437tb_cipher.o: eng_int.h tb_cipher.c
438tb_dh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
439tb_dh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
440tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
441tb_dh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
442tb_dh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
443tb_dh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
444tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h
445tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
446tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
447tb_dh.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
448tb_dh.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
449tb_dh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
450tb_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
451tb_dh.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
452tb_dh.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
453tb_dh.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
454tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
455tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
456tb_dh.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_int.h
457tb_dh.o: tb_dh.c
458tb_digest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
459tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
460tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
461tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
462tb_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
463tb_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
464tb_digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h
465tb_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
466tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
467tb_digest.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
468tb_digest.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
469tb_digest.o: ../../include/openssl/objects.h
470tb_digest.o: ../../include/openssl/opensslconf.h
471tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
472tb_digest.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
473tb_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
474tb_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
475tb_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
476tb_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
477tb_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
478tb_digest.o: eng_int.h tb_digest.c
479tb_dsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
480tb_dsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
481tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
482tb_dsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
483tb_dsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
484tb_dsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
485tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
486tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
487tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
488tb_dsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
489tb_dsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
490tb_dsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
491tb_dsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
492tb_dsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
493tb_dsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
494tb_dsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
495tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
496tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
497tb_dsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
498tb_dsa.o: eng_int.h tb_dsa.c
499tb_rand.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
500tb_rand.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
501tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
502tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
503tb_rand.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
504tb_rand.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
505tb_rand.o: ../../include/openssl/engine.h ../../include/openssl/err.h
506tb_rand.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
507tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
508tb_rand.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
509tb_rand.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
510tb_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
511tb_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
512tb_rand.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
513tb_rand.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
514tb_rand.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
515tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
516tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
517tb_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
518tb_rand.o: eng_int.h tb_rand.c
519tb_rsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
520tb_rsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
521tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
522tb_rsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
523tb_rsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
524tb_rsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
525tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
526tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
527tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
528tb_rsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
529tb_rsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
530tb_rsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
531tb_rsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
532tb_rsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
533tb_rsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
534tb_rsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
535tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
536tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
537tb_rsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
538tb_rsa.o: eng_int.h tb_rsa.c
diff --git a/src/lib/libssl/src/crypto/engine/eng_ctrl.c b/src/lib/libssl/src/crypto/engine/eng_ctrl.c
index 412c73fb0f..0d56e69d27 100644
--- a/src/lib/libssl/src/crypto/engine/eng_ctrl.c
+++ b/src/lib/libssl/src/crypto/engine/eng_ctrl.c
@@ -160,19 +160,19 @@ static int int_ctrl_helper(ENGINE *e, int cmd, long i, void *p, void (*f)())
160 case ENGINE_CTRL_GET_NAME_LEN_FROM_CMD: 160 case ENGINE_CTRL_GET_NAME_LEN_FROM_CMD:
161 return strlen(e->cmd_defns[idx].cmd_name); 161 return strlen(e->cmd_defns[idx].cmd_name);
162 case ENGINE_CTRL_GET_NAME_FROM_CMD: 162 case ENGINE_CTRL_GET_NAME_FROM_CMD:
163 return BIO_snprintf(s,strlen(e->cmd_defns[idx].cmd_name) + 1, 163 return snprintf(s,strlen(e->cmd_defns[idx].cmd_name) + 1,
164 "%s", e->cmd_defns[idx].cmd_name); 164 "%s", e->cmd_defns[idx].cmd_name);
165 case ENGINE_CTRL_GET_DESC_LEN_FROM_CMD: 165 case ENGINE_CTRL_GET_DESC_LEN_FROM_CMD:
166 if(e->cmd_defns[idx].cmd_desc) 166 if(e->cmd_defns[idx].cmd_desc)
167 return strlen(e->cmd_defns[idx].cmd_desc); 167 return strlen(e->cmd_defns[idx].cmd_desc);
168 return strlen(int_no_description); 168 return strlen(int_no_description);
169 case ENGINE_CTRL_GET_DESC_FROM_CMD: 169 case ENGINE_CTRL_GET_DESC_FROM_CMD:
170 if(e->cmd_defns[idx].cmd_desc) 170 if(e->cmd_defns[idx].cmd_desc)
171 return BIO_snprintf(s, 171 return snprintf(s,
172 strlen(e->cmd_defns[idx].cmd_desc) + 1, 172 strlen(e->cmd_defns[idx].cmd_desc) + 1,
173 "%s", e->cmd_defns[idx].cmd_desc); 173 "%s", e->cmd_defns[idx].cmd_desc);
174 return BIO_snprintf(s, strlen(int_no_description) + 1,"%s", 174 return snprintf(s, strlen(int_no_description) + 1,"%s",
175 int_no_description); 175 int_no_description);
176 case ENGINE_CTRL_GET_CMD_FLAGS: 176 case ENGINE_CTRL_GET_CMD_FLAGS:
177 return e->cmd_defns[idx].cmd_flags; 177 return e->cmd_defns[idx].cmd_flags;
178 } 178 }
diff --git a/src/lib/libssl/src/crypto/engine/eng_fat.c b/src/lib/libssl/src/crypto/engine/eng_fat.c
index 7ccf7022ee..0d7dae00b2 100644
--- a/src/lib/libssl/src/crypto/engine/eng_fat.c
+++ b/src/lib/libssl/src/crypto/engine/eng_fat.c
@@ -107,14 +107,14 @@ static int int_def_cb(const char *alg, int len, void *arg)
107 } 107 }
108 108
109 109
110int ENGINE_set_default_string(ENGINE *e, const char *def_list) 110int ENGINE_set_default_string(ENGINE *e, const char *list)
111 { 111 {
112 unsigned int flags = 0; 112 unsigned int flags = 0;
113 if (!CONF_parse_list(def_list, ',', 1, int_def_cb, &flags)) 113 if (!CONF_parse_list(list, ',', 1, int_def_cb, &flags))
114 { 114 {
115 ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_STRING, 115 ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_STRING,
116 ENGINE_R_INVALID_STRING); 116 ENGINE_R_INVALID_STRING);
117 ERR_add_error_data(2, "str=",def_list); 117 ERR_add_error_data(2, "str=",list);
118 return 0; 118 return 0;
119 } 119 }
120 return ENGINE_set_default(e, flags); 120 return ENGINE_set_default(e, flags);
diff --git a/src/lib/libssl/src/crypto/engine/engine.h b/src/lib/libssl/src/crypto/engine/engine.h
index 900f75ce8d..9c3ab182d3 100644
--- a/src/lib/libssl/src/crypto/engine/engine.h
+++ b/src/lib/libssl/src/crypto/engine/engine.h
@@ -513,7 +513,7 @@ ENGINE *ENGINE_get_digest_engine(int nid);
513 * structure will have had its reference count up'd so the caller 513 * structure will have had its reference count up'd so the caller
514 * should still free their own reference 'e'. */ 514 * should still free their own reference 'e'. */
515int ENGINE_set_default_RSA(ENGINE *e); 515int ENGINE_set_default_RSA(ENGINE *e);
516int ENGINE_set_default_string(ENGINE *e, const char *def_list); 516int ENGINE_set_default_string(ENGINE *e, const char *list);
517/* Same for the other "methods" */ 517/* Same for the other "methods" */
518int ENGINE_set_default_DSA(ENGINE *e); 518int ENGINE_set_default_DSA(ENGINE *e);
519int ENGINE_set_default_DH(ENGINE *e); 519int ENGINE_set_default_DH(ENGINE *e);
@@ -616,20 +616,17 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
616 const dynamic_fns *fns); 616 const dynamic_fns *fns);
617#define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ 617#define IMPLEMENT_DYNAMIC_BIND_FN(fn) \
618 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ 618 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \
619 if (ERR_get_implementation() != fns->err_fns) \ 619 if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \
620 { \ 620 fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \
621 if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ 621 return 0; \
622 fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \ 622 CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \
623 return 0; \ 623 CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \
624 CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \ 624 CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \
625 CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \ 625 CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \
626 CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \ 626 CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \
627 CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \ 627 if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \
628 CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \ 628 return 0; \
629 if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \ 629 if(!ERR_set_implementation(fns->err_fns)) return 0; \
630 return 0; \
631 if(!ERR_set_implementation(fns->err_fns)) return 0; \
632 } \
633 if(!fn(e,id)) return 0; \ 630 if(!fn(e,id)) return 0; \
634 return 1; } 631 return 1; }
635 632
diff --git a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
index 467c0daa1b..2fe84a5002 100644
--- a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (c) 2002-2004 Theo de Raadt
2 * Copyright (c) 2002 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2002 Bob Beck <beck@openbsd.org>
3 * Copyright (c) 2002 Theo de Raadt
4 * Copyright (c) 2002 Markus Friedl 4 * Copyright (c) 2002 Markus Friedl
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
@@ -49,11 +49,12 @@ ENGINE_load_cryptodev(void)
49 return; 49 return;
50} 50}
51 51
52#else 52#else
53 53
54#include <sys/types.h> 54#include <sys/types.h>
55#include <crypto/cryptodev.h> 55#include <crypto/cryptodev.h>
56#include <sys/ioctl.h> 56#include <sys/ioctl.h>
57
57#include <errno.h> 58#include <errno.h>
58#include <stdio.h> 59#include <stdio.h>
59#include <unistd.h> 60#include <unistd.h>
@@ -63,19 +64,34 @@ ENGINE_load_cryptodev(void)
63#include <errno.h> 64#include <errno.h>
64#include <string.h> 65#include <string.h>
65 66
67#ifdef __i386__
68#include <sys/sysctl.h>
69#include <machine/cpu.h>
70#include <machine/specialreg.h>
71
72#include <ssl/aes.h>
73
74static int check_viac3aes(void);
75#endif
76
66struct dev_crypto_state { 77struct dev_crypto_state {
67 struct session_op d_sess; 78 struct session_op d_sess;
68 int d_fd; 79 int d_fd;
69}; 80};
70 81
82struct dev_crypto_cipher {
83 int c_id;
84 int c_nid;
85 int c_ivmax;
86 int c_keylen;
87};
88
71static u_int32_t cryptodev_asymfeat = 0; 89static u_int32_t cryptodev_asymfeat = 0;
72 90
73static int get_asym_dev_crypto(void); 91static int get_asym_dev_crypto(void);
74static int open_dev_crypto(void); 92static int open_dev_crypto(void);
75static int get_dev_crypto(void); 93static int get_dev_crypto(void);
76static int cryptodev_max_iv(int cipher); 94static struct dev_crypto_cipher *cipher_nid_to_cryptodev(int nid);
77static int cryptodev_key_length_valid(int cipher, int len);
78static int cipher_nid_to_cryptodev(int nid);
79static int get_cryptodev_ciphers(const int **cnids); 95static int get_cryptodev_ciphers(const int **cnids);
80static int get_cryptodev_digests(const int **cnids); 96static int get_cryptodev_digests(const int **cnids);
81static int cryptodev_usable_ciphers(const int **nids); 97static int cryptodev_usable_ciphers(const int **nids);
@@ -122,15 +138,12 @@ static const ENGINE_CMD_DEFN cryptodev_defns[] = {
122 { 0, NULL, NULL, 0 } 138 { 0, NULL, NULL, 0 }
123}; 139};
124 140
125static struct { 141static struct dev_crypto_cipher ciphers[] = {
126 int id;
127 int nid;
128 int ivmax;
129 int keylen;
130} ciphers[] = {
131 { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, }, 142 { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, },
132 { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, }, 143 { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, },
133 { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, }, 144 { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, },
145 { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, },
146 { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, },
134 { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, }, 147 { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, },
135 { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, }, 148 { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, },
136 { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, }, 149 { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, },
@@ -200,48 +213,16 @@ get_asym_dev_crypto(void)
200 return fd; 213 return fd;
201} 214}
202 215
203/*
204 * XXXX this needs to be set for each alg - and determined from
205 * a running card.
206 */
207static int
208cryptodev_max_iv(int cipher)
209{
210 int i;
211
212 for (i = 0; ciphers[i].id; i++)
213 if (ciphers[i].id == cipher)
214 return (ciphers[i].ivmax);
215 return (0);
216}
217
218/*
219 * XXXX this needs to be set for each alg - and determined from
220 * a running card. For now, fake it out - but most of these
221 * for real devices should return 1 for the supported key
222 * sizes the device can handle.
223 */
224static int
225cryptodev_key_length_valid(int cipher, int len)
226{
227 int i;
228
229 for (i = 0; ciphers[i].id; i++)
230 if (ciphers[i].id == cipher)
231 return (ciphers[i].keylen == len);
232 return (0);
233}
234
235/* convert libcrypto nids to cryptodev */ 216/* convert libcrypto nids to cryptodev */
236static int 217static struct dev_crypto_cipher *
237cipher_nid_to_cryptodev(int nid) 218cipher_nid_to_cryptodev(int nid)
238{ 219{
239 int i; 220 int i;
240 221
241 for (i = 0; ciphers[i].id; i++) 222 for (i = 0; ciphers[i].c_id; i++)
242 if (ciphers[i].nid == nid) 223 if (ciphers[i].c_nid == nid)
243 return (ciphers[i].id); 224 return (&ciphers[i]);
244 return (0); 225 return (NULL);
245} 226}
246 227
247/* 228/*
@@ -264,18 +245,45 @@ get_cryptodev_ciphers(const int **cnids)
264 memset(&sess, 0, sizeof(sess)); 245 memset(&sess, 0, sizeof(sess));
265 sess.key = (caddr_t)"123456781234567812345678"; 246 sess.key = (caddr_t)"123456781234567812345678";
266 247
267 for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { 248 for (i = 0; ciphers[i].c_id && count < CRYPTO_ALGORITHM_MAX; i++) {
268 if (ciphers[i].nid == NID_undef) 249 if (ciphers[i].c_nid == NID_undef)
269 continue; 250 continue;
270 sess.cipher = ciphers[i].id; 251 sess.cipher = ciphers[i].c_id;
271 sess.keylen = ciphers[i].keylen; 252 sess.keylen = ciphers[i].c_keylen;
272 sess.mac = 0; 253 sess.mac = 0;
273 if (ioctl(fd, CIOCGSESSION, &sess) != -1 && 254 if (ioctl(fd, CIOCGSESSION, &sess) != -1 &&
274 ioctl(fd, CIOCFSESSION, &sess.ses) != -1) 255 ioctl(fd, CIOCFSESSION, &sess.ses) != -1)
275 nids[count++] = ciphers[i].nid; 256 nids[count++] = ciphers[i].c_nid;
276 } 257 }
277 close(fd); 258 close(fd);
278 259
260#if defined(__i386__)
261 /*
262 * On i386, always check for the VIA C3 AES instructions;
263 * even if /dev/crypto is disabled.
264 */
265 if (check_viac3aes() >= 1) {
266 int have_NID_aes_128_cbc = 0;
267 int have_NID_aes_192_cbc = 0;
268 int have_NID_aes_256_cbc = 0;
269
270 for (i = 0; i < count; i++) {
271 if (nids[i] == NID_aes_128_cbc)
272 have_NID_aes_128_cbc = 1;
273 if (nids[i] == NID_aes_192_cbc)
274 have_NID_aes_192_cbc = 1;
275 if (nids[i] == NID_aes_256_cbc)
276 have_NID_aes_256_cbc = 1;
277 }
278 if (!have_NID_aes_128_cbc)
279 nids[count++] = NID_aes_128_cbc;
280 if (!have_NID_aes_192_cbc)
281 nids[count++] = NID_aes_192_cbc;
282 if (!have_NID_aes_256_cbc)
283 nids[count++] = NID_aes_256_cbc;
284 }
285#endif
286
279 if (count > 0) 287 if (count > 0)
280 *cnids = nids; 288 *cnids = nids;
281 else 289 else
@@ -425,15 +433,15 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
425{ 433{
426 struct dev_crypto_state *state = ctx->cipher_data; 434 struct dev_crypto_state *state = ctx->cipher_data;
427 struct session_op *sess = &state->d_sess; 435 struct session_op *sess = &state->d_sess;
428 int cipher; 436 struct dev_crypto_cipher *cipher;
429 437
430 if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef) 438 if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NULL)
431 return (0); 439 return (0);
432 440
433 if (ctx->cipher->iv_len > cryptodev_max_iv(cipher)) 441 if (ctx->cipher->iv_len > cipher->c_ivmax)
434 return (0); 442 return (0);
435 443
436 if (!cryptodev_key_length_valid(cipher, ctx->key_len)) 444 if (ctx->key_len != cipher->c_keylen)
437 return (0); 445 return (0);
438 446
439 memset(sess, 0, sizeof(struct session_op)); 447 memset(sess, 0, sizeof(struct session_op));
@@ -443,7 +451,7 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
443 451
444 sess->key = (unsigned char *)key; 452 sess->key = (unsigned char *)key;
445 sess->keylen = ctx->key_len; 453 sess->keylen = ctx->key_len;
446 sess->cipher = cipher; 454 sess->cipher = cipher->c_id;
447 455
448 if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { 456 if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) {
449 close(state->d_fd); 457 close(state->d_fd);
@@ -548,7 +556,7 @@ const EVP_CIPHER cryptodev_cast_cbc = {
548 NULL 556 NULL
549}; 557};
550 558
551const EVP_CIPHER cryptodev_aes_cbc = { 559EVP_CIPHER cryptodev_aes_128_cbc = {
552 NID_aes_128_cbc, 560 NID_aes_128_cbc,
553 16, 16, 16, 561 16, 16, 16,
554 EVP_CIPH_CBC_MODE, 562 EVP_CIPH_CBC_MODE,
@@ -561,6 +569,199 @@ const EVP_CIPHER cryptodev_aes_cbc = {
561 NULL 569 NULL
562}; 570};
563 571
572EVP_CIPHER cryptodev_aes_192_cbc = {
573 NID_aes_192_cbc,
574 16, 24, 16,
575 EVP_CIPH_CBC_MODE,
576 cryptodev_init_key,
577 cryptodev_cipher,
578 cryptodev_cleanup,
579 sizeof(struct dev_crypto_state),
580 EVP_CIPHER_set_asn1_iv,
581 EVP_CIPHER_get_asn1_iv,
582 NULL
583};
584
585EVP_CIPHER cryptodev_aes_256_cbc = {
586 NID_aes_256_cbc,
587 16, 32, 16,
588 EVP_CIPH_CBC_MODE,
589 cryptodev_init_key,
590 cryptodev_cipher,
591 cryptodev_cleanup,
592 sizeof(struct dev_crypto_state),
593 EVP_CIPHER_set_asn1_iv,
594 EVP_CIPHER_get_asn1_iv,
595 NULL
596};
597
598#if defined(__i386__)
599
600static inline void
601viac3_xcrypt_cbc(int *cw, const void *src, void *dst, void *key, int rep,
602 void *iv)
603{
604#ifdef notdef
605 printf("cw %x[%x %x %x %x] src %x dst %x key %x rep %x iv %x\n",
606 cw, cw[0], cw[1], cw[2], cw[3],
607 src, dst, key, rep, iv);
608#endif
609 /*
610 * Clear bit 30 of EFLAGS.
611 */
612 __asm __volatile("pushfl; popfl");
613
614 /*
615 * Cannot simply place key into "b" register, since the compiler
616 * -pic mode uses that register; so instead we must dance a little.
617 */
618 __asm __volatile("pushl %%ebx; movl %0, %%ebx; rep xcrypt-cbc; popl %%ebx" :
619 : "mr" (key), "a" (iv), "c" (rep), "d" (cw), "S" (src), "D" (dst)
620 : "memory", "cc");
621}
622
623#define ISUNALIGNED(x) ((long)(x)) & 15
624#define DOALIGN(v) ((void *)(((long)(v) + 15) & ~15))
625
626static int
627xcrypt_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
628 const unsigned char *in, unsigned int inl)
629{
630 unsigned char *save_iv_store[EVP_MAX_IV_LENGTH + 15];
631 unsigned char *save_iv = DOALIGN(save_iv_store);
632 unsigned char *ivs_store[EVP_MAX_IV_LENGTH + 15];
633 unsigned char *ivs = DOALIGN(ivs_store);
634 void *iiv, *iv = NULL, *ivp = NULL;
635 const void *usein = in;
636 void *useout = out, *spare;
637 int cws[4 + 3], *cw = DOALIGN(cws);
638
639 if (!inl)
640 return (1);
641 if ((inl % ctx->cipher->block_size) != 0)
642 return (0);
643
644 if (ISUNALIGNED(in) || ISUNALIGNED(out)) {
645 spare = malloc(inl);
646 if (spare == NULL)
647 return (0);
648
649 if (ISUNALIGNED(in)) {
650 bcopy(in, spare, inl);
651 usein = spare;
652 }
653 if (ISUNALIGNED(out))
654 useout = spare;
655 }
656
657 cw[0] = C3_CRYPT_CWLO_ALG_AES | C3_CRYPT_CWLO_KEYGEN_SW |
658 C3_CRYPT_CWLO_NORMAL;
659 cw[0] |= ctx->encrypt ? C3_CRYPT_CWLO_ENCRYPT : C3_CRYPT_CWLO_DECRYPT;
660 cw[1] = cw[2] = cw[3] = 0;
661
662 switch (ctx->key_len * 8) {
663 case 128:
664 cw[0] |= C3_CRYPT_CWLO_KEY128;
665 break;
666 case 192:
667 cw[0] |= C3_CRYPT_CWLO_KEY192;
668 break;
669 case 256:
670 cw[0] |= C3_CRYPT_CWLO_KEY256;
671 break;
672 }
673
674 if (ctx->cipher->iv_len) {
675 iv = (caddr_t) ctx->iv;
676 if (!ctx->encrypt) {
677 iiv = (void *) in + inl - ctx->cipher->iv_len;
678 memcpy(save_iv, iiv, ctx->cipher->iv_len);
679 }
680 }
681
682 ivp = iv;
683 if (ISUNALIGNED(iv)) {
684 bcopy(iv, ivs, ctx->cipher->iv_len);
685 ivp = ivs;
686 }
687
688 viac3_xcrypt_cbc(cw, usein, useout, ctx->cipher_data, inl / 16, ivp);
689
690 if (ISUNALIGNED(out)) {
691 bcopy(spare, out, inl);
692 free(spare);
693 }
694
695 if (ivp == ivs)
696 bcopy(ivp, iv, ctx->cipher->iv_len);
697
698 if (ctx->cipher->iv_len) {
699 if (ctx->encrypt)
700 iiv = (void *) out + inl - ctx->cipher->iv_len;
701 else
702 iiv = save_iv;
703 memcpy(ctx->iv, iiv, ctx->cipher->iv_len);
704 }
705 return (1);
706}
707
708static int
709xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
710 const unsigned char *iv, int enc)
711{
712 AES_KEY *k = ctx->cipher_data;
713 int i;
714
715 bzero(k, sizeof *k);
716 if (enc)
717 AES_set_encrypt_key(key, ctx->key_len * 8, k);
718 else
719 AES_set_decrypt_key(key, ctx->key_len * 8, k);
720
721 /* Damn OpenSSL byte swaps the expanded key!! */
722 for (i = 0; i < 4 * (AES_MAXNR + 1); i++)
723 k->rd_key[i] = htonl(k->rd_key[i]);
724
725 return (1);
726}
727
728static int
729xcrypt_cleanup(EVP_CIPHER_CTX *ctx)
730{
731 bzero(ctx->cipher_data, ctx->cipher->ctx_size);
732 return (1);
733}
734
735static int
736check_viac3aes(void)
737{
738 int mib[2] = { CTL_MACHDEP, CPU_XCRYPT }, value;
739 size_t size = sizeof(value);
740
741 if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &value, &size,
742 NULL, 0) < 0)
743 return (0);
744 if (value == 0)
745 return (0);
746
747 cryptodev_aes_128_cbc.init = xcrypt_init_key;
748 cryptodev_aes_128_cbc.do_cipher = xcrypt_cipher;
749 cryptodev_aes_128_cbc.cleanup = xcrypt_cleanup;
750 cryptodev_aes_128_cbc.ctx_size = sizeof(AES_KEY);
751
752 cryptodev_aes_192_cbc.init = xcrypt_init_key;
753 cryptodev_aes_192_cbc.do_cipher = xcrypt_cipher;
754 cryptodev_aes_192_cbc.cleanup = xcrypt_cleanup;
755 cryptodev_aes_192_cbc.ctx_size = sizeof(AES_KEY);
756
757 cryptodev_aes_256_cbc.init = xcrypt_init_key;
758 cryptodev_aes_256_cbc.do_cipher = xcrypt_cipher;
759 cryptodev_aes_256_cbc.cleanup = xcrypt_cleanup;
760 cryptodev_aes_256_cbc.ctx_size = sizeof(AES_KEY);
761 return (value);
762}
763#endif /* __i386__ */
764
564/* 765/*
565 * Registered by the ENGINE when used to find out how to deal with 766 * Registered by the ENGINE when used to find out how to deal with
566 * a particular NID in the ENGINE. this says what we'll do at the 767 * a particular NID in the ENGINE. this says what we'll do at the
@@ -587,7 +788,13 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
587 *cipher = &cryptodev_cast_cbc; 788 *cipher = &cryptodev_cast_cbc;
588 break; 789 break;
589 case NID_aes_128_cbc: 790 case NID_aes_128_cbc:
590 *cipher = &cryptodev_aes_cbc; 791 *cipher = &cryptodev_aes_128_cbc;
792 break;
793 case NID_aes_192_cbc:
794 *cipher = &cryptodev_aes_192_cbc;
795 break;
796 case NID_aes_256_cbc:
797 *cipher = &cryptodev_aes_256_cbc;
591 break; 798 break;
592 default: 799 default:
593 *cipher = NULL; 800 *cipher = NULL;
@@ -1050,17 +1257,14 @@ ENGINE_load_cryptodev(void)
1050 1257
1051 if (engine == NULL) 1258 if (engine == NULL)
1052 return; 1259 return;
1053 if ((fd = get_dev_crypto()) < 0) { 1260 if ((fd = get_dev_crypto()) < 0)
1054 ENGINE_free(engine);
1055 return; 1261 return;
1056 }
1057 1262
1058 /* 1263 /*
1059 * find out what asymmetric crypto algorithms we support 1264 * find out what asymmetric crypto algorithms we support
1060 */ 1265 */
1061 if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { 1266 if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) {
1062 close(fd); 1267 close(fd);
1063 ENGINE_free(engine);
1064 return; 1268 return;
1065 } 1269 }
1066 close(fd); 1270 close(fd);
diff --git a/src/lib/libssl/src/crypto/err/Makefile.ssl b/src/lib/libssl/src/crypto/err/Makefile.ssl
new file mode 100644
index 0000000000..b253061d07
--- /dev/null
+++ b/src/lib/libssl/src/crypto/err/Makefile.ssl
@@ -0,0 +1,119 @@
1#
2# SSLeay/crypto/err/Makefile
3#
4
5DIR= err
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=err.c err_all.c err_prn.c
27LIBOBJ=err.o err_all.o err_prn.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= err.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82err.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/buffer.h
83err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
84err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
85err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
86err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
87err.o: ../../include/openssl/symhacks.h ../cryptlib.h err.c
88err_all.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
89err_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
90err_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
91err_all.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
92err_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
93err_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
94err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
95err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
96err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h
97err_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
98err_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
99err_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
100err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
101err_all.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
102err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
103err_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem2.h
104err_all.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
105err_all.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
106err_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
107err_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
108err_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
109err_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
110err_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
111err_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
112err_all.o: ../../include/openssl/x509v3.h err_all.c
113err_prn.o: ../../e_os.h ../../include/openssl/bio.h
114err_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
115err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
116err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
117err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
118err_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
119err_prn.o: ../cryptlib.h err_prn.c
diff --git a/src/lib/libssl/src/crypto/err/err.c b/src/lib/libssl/src/crypto/err/err.c
index 792f329600..6ab119c1ef 100644
--- a/src/lib/libssl/src/crypto/err/err.c
+++ b/src/lib/libssl/src/crypto/err/err.c
@@ -1065,7 +1065,7 @@ void ERR_add_error_data(int num, ...)
1065 else 1065 else
1066 str=p; 1066 str=p;
1067 } 1067 }
1068 BUF_strlcat(str,a,s+1); 1068 strlcat(str,a,s+1);
1069 } 1069 }
1070 } 1070 }
1071 ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING); 1071 ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING);
diff --git a/src/lib/libssl/src/crypto/evp/Makefile.ssl b/src/lib/libssl/src/crypto/evp/Makefile.ssl
new file mode 100644
index 0000000000..f33aebd33a
--- /dev/null
+++ b/src/lib/libssl/src/crypto/evp/Makefile.ssl
@@ -0,0 +1,1059 @@
1#
2# SSLeay/crypto/evp/Makefile
3#
4
5DIR= evp
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=evp_test.c
23TESTDATA=evptests.txt
24APPS=
25
26LIB=$(TOP)/libcrypto.a
27LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \
28 e_des.c e_bf.c e_idea.c e_des3.c \
29 e_rc4.c e_aes.c names.c \
30 e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \
31 m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \
32 m_dss.c m_dss1.c m_mdc2.c m_ripemd.c \
33 p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
34 bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \
35 c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \
36 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c
37
38LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \
39 e_des.o e_bf.o e_idea.o e_des3.o \
40 e_rc4.o e_aes.o names.o \
41 e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \
42 m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \
43 m_dss.o m_dss1.o m_mdc2.o m_ripemd.o \
44 p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \
45 bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \
46 c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \
47 evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o
48
49SRC= $(LIBSRC)
50
51EXHEADER= evp.h
52HEADER= $(EXHEADER)
53
54ALL= $(GENERAL) $(SRC) $(HEADER)
55
56top:
57 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
58
59all: lib
60
61lib: $(LIBOBJ)
62 $(AR) $(LIB) $(LIBOBJ)
63 $(RANLIB) $(LIB) || echo Never mind.
64 @touch lib
65
66files:
67 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
68
69links:
70 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
71 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
72 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
73 cp $(TESTDATA) ../../test
74 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
75
76install:
77 @for i in $(EXHEADER) ; \
78 do \
79 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
80 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
81 done;
82
83tags:
84 ctags $(SRC)
85
86tests:
87
88lint:
89 lint -DLINT $(INCLUDES) $(SRC)>fluff
90
91depend:
92 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
93
94dclean:
95 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
96 mv -f Makefile.new $(MAKEFILE)
97
98clean:
99 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
100
101# DO NOT DELETE THIS LINE -- make depend depends on it.
102
103bio_b64.o: ../../e_os.h ../../include/openssl/aes.h
104bio_b64.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
105bio_b64.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
106bio_b64.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
107bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
108bio_b64.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
109bio_b64.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
110bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h
111bio_b64.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
112bio_b64.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
113bio_b64.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
114bio_b64.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
115bio_b64.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
116bio_b64.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
117bio_b64.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
118bio_b64.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
119bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
120bio_b64.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
121bio_b64.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
122bio_b64.o: ../cryptlib.h bio_b64.c
123bio_enc.o: ../../e_os.h ../../include/openssl/aes.h
124bio_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
125bio_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
126bio_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
127bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
128bio_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
129bio_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
130bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
131bio_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
132bio_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
133bio_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
134bio_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
135bio_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
136bio_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
137bio_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
138bio_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
139bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
140bio_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
141bio_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
142bio_enc.o: ../cryptlib.h bio_enc.c
143bio_md.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
144bio_md.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
145bio_md.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
146bio_md.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
147bio_md.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
148bio_md.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
149bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
150bio_md.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
151bio_md.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
152bio_md.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
153bio_md.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
154bio_md.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
155bio_md.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
156bio_md.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
157bio_md.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
158bio_md.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
159bio_md.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
160bio_md.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
161bio_md.o: ../../include/openssl/ui_compat.h ../cryptlib.h bio_md.c
162bio_ok.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
163bio_ok.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
164bio_ok.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
165bio_ok.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
166bio_ok.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
167bio_ok.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
168bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
169bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
170bio_ok.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
171bio_ok.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
172bio_ok.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
173bio_ok.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
174bio_ok.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
175bio_ok.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
176bio_ok.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
177bio_ok.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
178bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
179bio_ok.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
180bio_ok.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
181bio_ok.o: ../cryptlib.h bio_ok.c
182c_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
183c_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
184c_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
185c_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
186c_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
187c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
188c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
189c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
190c_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
191c_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
192c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
193c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
194c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
195c_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
196c_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
197c_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
198c_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
199c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
200c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
201c_all.o: ../../include/openssl/ui_compat.h ../cryptlib.h c_all.c
202c_allc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
203c_allc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
204c_allc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
205c_allc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
206c_allc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
207c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
208c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
209c_allc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
210c_allc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
211c_allc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
212c_allc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
213c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
214c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
215c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
216c_allc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
217c_allc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
218c_allc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
219c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
220c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
221c_allc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
222c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_allc.c
223c_alld.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
224c_alld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
225c_alld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
226c_alld.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
227c_alld.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
228c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
229c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
230c_alld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
231c_alld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
232c_alld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
233c_alld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
234c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
235c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
236c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
237c_alld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
238c_alld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
239c_alld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
240c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
241c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
242c_alld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
243c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_alld.c
244digest.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
245digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
246digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
247digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
248digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
249digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
250digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
251digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
252digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
253digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
254digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
255digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
256digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
257digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
258digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
259digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
260digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
261digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
262digest.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
263digest.o: ../../include/openssl/ui_compat.h ../cryptlib.h digest.c
264e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
265e_aes.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
266e_aes.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
267e_aes.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
268e_aes.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
269e_aes.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
270e_aes.o: ../../include/openssl/err.h ../../include/openssl/evp.h
271e_aes.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
272e_aes.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
273e_aes.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
274e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
275e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
276e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
277e_aes.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
278e_aes.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
279e_aes.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
280e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
281e_aes.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h e_aes.c
282e_aes.o: evp_locl.h
283e_bf.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
284e_bf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
285e_bf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
286e_bf.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
287e_bf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
288e_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
289e_bf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
290e_bf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
291e_bf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
292e_bf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
293e_bf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
294e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
295e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
296e_bf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
297e_bf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
298e_bf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
299e_bf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
300e_bf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
301e_bf.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_bf.c evp_locl.h
302e_cast.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
303e_cast.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
304e_cast.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
305e_cast.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
306e_cast.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
307e_cast.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
308e_cast.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
309e_cast.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
310e_cast.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
311e_cast.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
312e_cast.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
313e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
314e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
315e_cast.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
316e_cast.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
317e_cast.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
318e_cast.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
319e_cast.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
320e_cast.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_cast.c evp_locl.h
321e_des.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
322e_des.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
323e_des.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
324e_des.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
325e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
326e_des.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
327e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
328e_des.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
329e_des.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
330e_des.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
331e_des.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
332e_des.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
333e_des.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
334e_des.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
335e_des.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
336e_des.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
337e_des.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
338e_des.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
339e_des.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des.c evp_locl.h
340e_des3.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
341e_des3.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
342e_des3.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
343e_des3.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
344e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
345e_des3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
346e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
347e_des3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
348e_des3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
349e_des3.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
350e_des3.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
351e_des3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
352e_des3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
353e_des3.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
354e_des3.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
355e_des3.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
356e_des3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
357e_des3.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
358e_des3.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des3.c evp_locl.h
359e_idea.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
360e_idea.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
361e_idea.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
362e_idea.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
363e_idea.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
364e_idea.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
365e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
366e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
367e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
368e_idea.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
369e_idea.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
370e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
371e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
372e_idea.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
373e_idea.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
374e_idea.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
375e_idea.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
376e_idea.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
377e_idea.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_idea.c evp_locl.h
378e_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
379e_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
380e_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
381e_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
382e_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
383e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
384e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
385e_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
386e_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
387e_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
388e_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
389e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
390e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
391e_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
392e_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
393e_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
394e_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
395e_null.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
396e_null.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_null.c
397e_rc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
398e_rc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
399e_rc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
400e_rc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
401e_rc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
402e_rc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
403e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
404e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
405e_rc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
406e_rc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
407e_rc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
408e_rc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
409e_rc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
410e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
411e_rc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
412e_rc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
413e_rc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
414e_rc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
415e_rc2.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc2.c evp_locl.h
416e_rc4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
417e_rc4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
418e_rc4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
419e_rc4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
420e_rc4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
421e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
422e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
423e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
424e_rc4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
425e_rc4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
426e_rc4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
427e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
428e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
429e_rc4.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
430e_rc4.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
431e_rc4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
432e_rc4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
433e_rc4.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
434e_rc4.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc4.c
435e_rc5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
436e_rc5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
437e_rc5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
438e_rc5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
439e_rc5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
440e_rc5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
441e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
442e_rc5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
443e_rc5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
444e_rc5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
445e_rc5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
446e_rc5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
447e_rc5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
448e_rc5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
449e_rc5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
450e_rc5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
451e_rc5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
452e_rc5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
453e_rc5.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc5.c evp_locl.h
454e_xcbc_d.o: ../../e_os.h ../../include/openssl/aes.h
455e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
456e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
457e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
458e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
459e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
460e_xcbc_d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
461e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
462e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
463e_xcbc_d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
464e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
465e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
466e_xcbc_d.o: ../../include/openssl/opensslconf.h
467e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
468e_xcbc_d.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
469e_xcbc_d.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
470e_xcbc_d.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
471e_xcbc_d.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
472e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
473e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c
474encode.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
475encode.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
476encode.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
477encode.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
478encode.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
479encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
480encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
481encode.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
482encode.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
483encode.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
484encode.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
485encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
486encode.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
487encode.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
488encode.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
489encode.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
490encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
491encode.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
492encode.o: ../../include/openssl/ui_compat.h ../cryptlib.h encode.c
493evp_acnf.o: ../../e_os.h ../../include/openssl/aes.h
494evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
495evp_acnf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
496evp_acnf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
497evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
498evp_acnf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
499evp_acnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
500evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
501evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
502evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
503evp_acnf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
504evp_acnf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
505evp_acnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
506evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
507evp_acnf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
508evp_acnf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
509evp_acnf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
510evp_acnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
511evp_acnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
512evp_acnf.o: ../../include/openssl/ui_compat.h ../cryptlib.h evp_acnf.c
513evp_enc.o: ../../e_os.h ../../include/openssl/aes.h
514evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
515evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
516evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
517evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
518evp_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
519evp_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
520evp_enc.o: ../../include/openssl/engine.h ../../include/openssl/err.h
521evp_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
522evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
523evp_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
524evp_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
525evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
526evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
527evp_enc.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
528evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
529evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
530evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
531evp_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
532evp_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
533evp_enc.o: ../cryptlib.h evp_enc.c evp_locl.h
534evp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
535evp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
536evp_err.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
537evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
538evp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
539evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
540evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h
541evp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
542evp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
543evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
544evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
545evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
546evp_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
547evp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
548evp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
549evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
550evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
551evp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
552evp_err.o: evp_err.c
553evp_key.o: ../../e_os.h ../../include/openssl/aes.h
554evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
555evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
556evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
557evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
558evp_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
559evp_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
560evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h
561evp_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
562evp_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
563evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
564evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
565evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
566evp_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
567evp_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
568evp_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
569evp_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
570evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
571evp_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
572evp_key.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
573evp_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_key.c
574evp_lib.o: ../../e_os.h ../../include/openssl/aes.h
575evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
576evp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
577evp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
578evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
579evp_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
580evp_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
581evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
582evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
583evp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
584evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
585evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
586evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
587evp_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
588evp_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
589evp_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
590evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
591evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
592evp_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
593evp_lib.o: ../cryptlib.h evp_lib.c
594evp_pbe.o: ../../e_os.h ../../include/openssl/aes.h
595evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
596evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
597evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
598evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
599evp_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
600evp_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
601evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h
602evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
603evp_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
604evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
605evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
606evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
607evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
608evp_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
609evp_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
610evp_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
611evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
612evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
613evp_pbe.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
614evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pbe.c
615evp_pkey.o: ../../e_os.h ../../include/openssl/aes.h
616evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
617evp_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
618evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
619evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
620evp_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
621evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
622evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
623evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
624evp_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
625evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
626evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
627evp_pkey.o: ../../include/openssl/opensslconf.h
628evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
629evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
630evp_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
631evp_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
632evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
633evp_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
634evp_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
635evp_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
636evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pkey.c
637m_dss.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
638m_dss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
639m_dss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
640m_dss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
641m_dss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
642m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
643m_dss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
644m_dss.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
645m_dss.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
646m_dss.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
647m_dss.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
648m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
649m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
650m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
651m_dss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
652m_dss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
653m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
654m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
655m_dss.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
656m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
657m_dss.o: ../cryptlib.h m_dss.c
658m_dss1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
659m_dss1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
660m_dss1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
661m_dss1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
662m_dss1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
663m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
664m_dss1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
665m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
666m_dss1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
667m_dss1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
668m_dss1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
669m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
670m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
671m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
672m_dss1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
673m_dss1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
674m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
675m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
676m_dss1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
677m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
678m_dss1.o: ../cryptlib.h m_dss1.c
679m_md2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
680m_md2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
681m_md2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
682m_md2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
683m_md2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
684m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
685m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
686m_md2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
687m_md2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
688m_md2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
689m_md2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
690m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
691m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
692m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
693m_md2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
694m_md2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
695m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
696m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
697m_md2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
698m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
699m_md2.o: ../cryptlib.h m_md2.c
700m_md4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
701m_md4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
702m_md4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
703m_md4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
704m_md4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
705m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
706m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
707m_md4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
708m_md4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
709m_md4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
710m_md4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
711m_md4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
712m_md4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
713m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
714m_md4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
715m_md4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
716m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
717m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
718m_md4.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
719m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
720m_md4.o: ../cryptlib.h m_md4.c
721m_md5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
722m_md5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
723m_md5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
724m_md5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
725m_md5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
726m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
727m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
728m_md5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
729m_md5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
730m_md5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
731m_md5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
732m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
733m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
734m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
735m_md5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
736m_md5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
737m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
738m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
739m_md5.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
740m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
741m_md5.o: ../cryptlib.h m_md5.c
742m_mdc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
743m_mdc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
744m_mdc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
745m_mdc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
746m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
747m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
748m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
749m_mdc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
750m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
751m_mdc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
752m_mdc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
753m_mdc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
754m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
755m_mdc2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
756m_mdc2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
757m_mdc2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
758m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
759m_mdc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
760m_mdc2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
761m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
762m_mdc2.o: ../cryptlib.h m_mdc2.c
763m_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
764m_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
765m_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
766m_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
767m_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
768m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
769m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
770m_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
771m_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
772m_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
773m_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
774m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
775m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
776m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
777m_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
778m_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
779m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
780m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
781m_null.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
782m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
783m_null.o: ../cryptlib.h m_null.c
784m_ripemd.o: ../../e_os.h ../../include/openssl/aes.h
785m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
786m_ripemd.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
787m_ripemd.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
788m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
789m_ripemd.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
790m_ripemd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
791m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h
792m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
793m_ripemd.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
794m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
795m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
796m_ripemd.o: ../../include/openssl/opensslconf.h
797m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
798m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
799m_ripemd.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
800m_ripemd.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
801m_ripemd.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
802m_ripemd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
803m_ripemd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
804m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
805m_ripemd.o: ../cryptlib.h m_ripemd.c
806m_sha.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
807m_sha.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
808m_sha.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
809m_sha.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
810m_sha.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
811m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
812m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
813m_sha.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
814m_sha.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
815m_sha.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
816m_sha.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
817m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
818m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
819m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
820m_sha.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
821m_sha.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
822m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
823m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
824m_sha.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
825m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
826m_sha.o: ../cryptlib.h m_sha.c
827m_sha1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
828m_sha1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
829m_sha1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
830m_sha1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
831m_sha1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
832m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
833m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
834m_sha1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
835m_sha1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
836m_sha1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
837m_sha1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
838m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
839m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
840m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
841m_sha1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
842m_sha1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
843m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
844m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
845m_sha1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
846m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
847m_sha1.o: ../cryptlib.h m_sha1.c
848names.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
849names.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
850names.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
851names.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
852names.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
853names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
854names.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
855names.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
856names.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
857names.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
858names.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
859names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
860names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
861names.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
862names.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
863names.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
864names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
865names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
866names.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
867names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
868names.o: ../cryptlib.h names.c
869p5_crpt.o: ../../e_os.h ../../include/openssl/aes.h
870p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
871p5_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
872p5_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
873p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
874p5_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
875p5_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
876p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h
877p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
878p5_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
879p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
880p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
881p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
882p5_crpt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
883p5_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
884p5_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
885p5_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
886p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
887p5_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
888p5_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
889p5_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt.c
890p5_crpt2.o: ../../e_os.h ../../include/openssl/aes.h
891p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
892p5_crpt2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
893p5_crpt2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
894p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
895p5_crpt2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
896p5_crpt2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
897p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
898p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h
899p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
900p5_crpt2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
901p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
902p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
903p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
904p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
905p5_crpt2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
906p5_crpt2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
907p5_crpt2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
908p5_crpt2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
909p5_crpt2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
910p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
911p5_crpt2.o: ../cryptlib.h p5_crpt2.c
912p_dec.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
913p_dec.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
914p_dec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
915p_dec.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
916p_dec.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
917p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
918p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
919p_dec.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
920p_dec.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
921p_dec.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
922p_dec.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
923p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
924p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
925p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
926p_dec.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
927p_dec.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
928p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
929p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
930p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
931p_dec.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
932p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_dec.c
933p_enc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
934p_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
935p_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
936p_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
937p_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
938p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
939p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
940p_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
941p_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
942p_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
943p_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
944p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
945p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
946p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
947p_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
948p_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
949p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
950p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
951p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
952p_enc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
953p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_enc.c
954p_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
955p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
956p_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
957p_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
958p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
959p_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
960p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
961p_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
962p_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
963p_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
964p_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
965p_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
966p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
967p_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
968p_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
969p_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
970p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
971p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
972p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
973p_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
974p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_lib.c
975p_open.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
976p_open.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
977p_open.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
978p_open.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
979p_open.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
980p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
981p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
982p_open.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
983p_open.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
984p_open.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
985p_open.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
986p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
987p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
988p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
989p_open.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
990p_open.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
991p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
992p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
993p_open.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
994p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
995p_open.o: ../cryptlib.h p_open.c
996p_seal.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
997p_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
998p_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
999p_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
1000p_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
1001p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1002p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
1003p_seal.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
1004p_seal.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1005p_seal.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1006p_seal.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
1007p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1008p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1009p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
1010p_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1011p_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1012p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1013p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1014p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
1015p_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
1016p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_seal.c
1017p_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
1018p_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
1019p_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
1020p_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
1021p_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
1022p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1023p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
1024p_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
1025p_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1026p_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1027p_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
1028p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1029p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1030p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1031p_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1032p_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1033p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
1034p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1035p_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
1036p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1037p_sign.o: ../cryptlib.h p_sign.c
1038p_verify.o: ../../e_os.h ../../include/openssl/aes.h
1039p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
1040p_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
1041p_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
1042p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1043p_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
1044p_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
1045p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1046p_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
1047p_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1048p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1049p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1050p_verify.o: ../../include/openssl/opensslconf.h
1051p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1052p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1053p_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1054p_verify.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1055p_verify.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
1056p_verify.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1057p_verify.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
1058p_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1059p_verify.o: ../cryptlib.h p_verify.c
diff --git a/src/lib/libssl/src/crypto/evp/digest.c b/src/lib/libssl/src/crypto/evp/digest.c
index 0623ddf1f0..b22eed4421 100644
--- a/src/lib/libssl/src/crypto/evp/digest.c
+++ b/src/lib/libssl/src/crypto/evp/digest.c
@@ -248,7 +248,6 @@ int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in)
248 248
249int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) 249int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
250 { 250 {
251 unsigned char *tmp_buf;
252 if ((in == NULL) || (in->digest == NULL)) 251 if ((in == NULL) || (in->digest == NULL))
253 { 252 {
254 EVPerr(EVP_F_EVP_MD_CTX_COPY,EVP_R_INPUT_NOT_INITIALIZED); 253 EVPerr(EVP_F_EVP_MD_CTX_COPY,EVP_R_INPUT_NOT_INITIALIZED);
@@ -263,22 +262,15 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
263 } 262 }
264#endif 263#endif
265 264
266 if (out->digest == in->digest)
267 {
268 tmp_buf = out->md_data;
269 EVP_MD_CTX_set_flags(out,EVP_MD_CTX_FLAG_REUSE);
270 }
271 else tmp_buf = NULL;
272 EVP_MD_CTX_cleanup(out); 265 EVP_MD_CTX_cleanup(out);
273 memcpy(out,in,sizeof *out); 266 memcpy(out,in,sizeof *out);
274 267
275 if (out->digest->ctx_size) 268 if (out->digest->ctx_size)
276 { 269 {
277 if (tmp_buf) out->md_data = tmp_buf; 270 out->md_data=OPENSSL_malloc(out->digest->ctx_size);
278 else out->md_data=OPENSSL_malloc(out->digest->ctx_size);
279 memcpy(out->md_data,in->md_data,out->digest->ctx_size); 271 memcpy(out->md_data,in->md_data,out->digest->ctx_size);
280 } 272 }
281 273
282 if (out->digest->copy) 274 if (out->digest->copy)
283 return out->digest->copy(out,in); 275 return out->digest->copy(out,in);
284 276
@@ -316,8 +308,7 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
316 if (ctx->digest && ctx->digest->cleanup 308 if (ctx->digest && ctx->digest->cleanup
317 && !EVP_MD_CTX_test_flags(ctx,EVP_MD_CTX_FLAG_CLEANED)) 309 && !EVP_MD_CTX_test_flags(ctx,EVP_MD_CTX_FLAG_CLEANED))
318 ctx->digest->cleanup(ctx); 310 ctx->digest->cleanup(ctx);
319 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data 311 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data)
320 && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE))
321 { 312 {
322 OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size); 313 OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size);
323 OPENSSL_free(ctx->md_data); 314 OPENSSL_free(ctx->md_data);
diff --git a/src/lib/libssl/src/crypto/evp/e_acss.c b/src/lib/libssl/src/crypto/evp/e_acss.c
new file mode 100644
index 0000000000..a16b85c627
--- /dev/null
+++ b/src/lib/libssl/src/crypto/evp/e_acss.c
@@ -0,0 +1,85 @@
1/* $Id: e_acss.c,v 1.2 2004/02/13 10:05:44 hshoexer Exp $ */
2/*
3 * Copyright (c) 2004 The OpenBSD project
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef OPENSSL_NO_ACSS
19
20#include "cryptlib.h"
21#include <openssl/evp.h>
22#include <openssl/objects.h>
23#include "evp_locl.h"
24#include <openssl/acss.h>
25
26typedef struct {
27 ACSS_KEY ks;
28} EVP_ACSS_KEY;
29
30#define data(ctx) EVP_C_DATA(EVP_ACSS_KEY,ctx)
31
32static int acss_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
33 const unsigned char *iv, int enc);
34static int acss_ciph(EVP_CIPHER_CTX *ctx, unsigned char *out,
35 const unsigned char *in, unsigned int inl);
36static int acss_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
37static const EVP_CIPHER acss_cipher = {
38 NID_undef,
39 1,5,0,
40 0,
41 acss_init_key,
42 acss_ciph,
43 NULL,
44 sizeof(EVP_ACSS_KEY),
45 NULL,
46 NULL,
47 acss_ctrl,
48 NULL
49};
50
51const
52EVP_CIPHER *EVP_acss(void)
53{
54 return(&acss_cipher);
55}
56
57static int
58acss_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
59 const unsigned char *iv, int enc)
60{
61 acss_setkey(&data(ctx)->ks,key,enc,ACSS_MODE1);
62 return 1;
63}
64
65static int
66acss_ciph(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in,
67 unsigned int inl)
68{
69 acss(&data(ctx)->ks,inl,in,out);
70 return 1;
71}
72
73static int
74acss_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr)
75{
76 switch(type) {
77 case EVP_CTRL_SET_ACSS_MODE:
78 data(ctx)->ks.mode = arg;
79 return 1;
80
81 default:
82 return -1;
83 }
84}
85#endif
diff --git a/src/lib/libssl/src/crypto/evp/evp.h b/src/lib/libssl/src/crypto/evp/evp.h
index 4801d8eaa3..5d8a07d33c 100644
--- a/src/lib/libssl/src/crypto/evp/evp.h
+++ b/src/lib/libssl/src/crypto/evp/evp.h
@@ -74,48 +74,6 @@
74#ifndef OPENSSL_NO_BIO 74#ifndef OPENSSL_NO_BIO
75#include <openssl/bio.h> 75#include <openssl/bio.h>
76#endif 76#endif
77#ifndef OPENSSL_NO_MD2
78#include <openssl/md2.h>
79#endif
80#ifndef OPENSSL_NO_MD4
81#include <openssl/md4.h>
82#endif
83#ifndef OPENSSL_NO_MD5
84#include <openssl/md5.h>
85#endif
86#ifndef OPENSSL_NO_SHA
87#include <openssl/sha.h>
88#endif
89#ifndef OPENSSL_NO_RIPEMD
90#include <openssl/ripemd.h>
91#endif
92#ifndef OPENSSL_NO_DES
93#include <openssl/des.h>
94#endif
95#ifndef OPENSSL_NO_RC4
96#include <openssl/rc4.h>
97#endif
98#ifndef OPENSSL_NO_RC2
99#include <openssl/rc2.h>
100#endif
101#ifndef OPENSSL_NO_RC5
102#include <openssl/rc5.h>
103#endif
104#ifndef OPENSSL_NO_BF
105#include <openssl/blowfish.h>
106#endif
107#ifndef OPENSSL_NO_CAST
108#include <openssl/cast.h>
109#endif
110#ifndef OPENSSL_NO_IDEA
111#include <openssl/idea.h>
112#endif
113#ifndef OPENSSL_NO_MDC2
114#include <openssl/mdc2.h>
115#endif
116#ifndef OPENSSL_NO_AES
117#include <openssl/aes.h>
118#endif
119 77
120/* 78/*
121#define EVP_RC2_KEY_SIZE 16 79#define EVP_RC2_KEY_SIZE 16
@@ -133,18 +91,6 @@
133/* Default PKCS#5 iteration count */ 91/* Default PKCS#5 iteration count */
134#define PKCS5_DEFAULT_ITER 2048 92#define PKCS5_DEFAULT_ITER 2048
135 93
136#ifndef OPENSSL_NO_RSA
137#include <openssl/rsa.h>
138#endif
139
140#ifndef OPENSSL_NO_DSA
141#include <openssl/dsa.h>
142#endif
143
144#ifndef OPENSSL_NO_DH
145#include <openssl/dh.h>
146#endif
147
148#include <openssl/objects.h> 94#include <openssl/objects.h>
149 95
150#define EVP_PK_RSA 0x0001 96#define EVP_PK_RSA 0x0001
@@ -329,8 +275,6 @@ struct env_md_ctx_st
329 * once only */ 275 * once only */
330#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been 276#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been
331 * cleaned */ 277 * cleaned */
332#define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data
333 * in EVP_MD_CTX_cleanup */
334 278
335struct evp_cipher_st 279struct evp_cipher_st
336 { 280 {
@@ -382,6 +326,7 @@ struct evp_cipher_st
382#define EVP_CTRL_SET_RC2_KEY_BITS 0x3 326#define EVP_CTRL_SET_RC2_KEY_BITS 0x3
383#define EVP_CTRL_GET_RC5_ROUNDS 0x4 327#define EVP_CTRL_GET_RC5_ROUNDS 0x4
384#define EVP_CTRL_SET_RC5_ROUNDS 0x5 328#define EVP_CTRL_SET_RC5_ROUNDS 0x5
329#define EVP_CTRL_SET_ACSS_MODE 0x6
385 330
386typedef struct evp_cipher_info_st 331typedef struct evp_cipher_info_st
387 { 332 {
@@ -719,6 +664,9 @@ const EVP_CIPHER *EVP_aes_256_ofb(void);
719const EVP_CIPHER *EVP_aes_256_ctr(void); 664const EVP_CIPHER *EVP_aes_256_ctr(void);
720#endif 665#endif
721#endif 666#endif
667#ifndef OPENSSL_NO_ACSS
668const EVP_CIPHER *EVP_acss(void);
669#endif
722 670
723void OPENSSL_add_all_algorithms_noconf(void); 671void OPENSSL_add_all_algorithms_noconf(void);
724void OPENSSL_add_all_algorithms_conf(void); 672void OPENSSL_add_all_algorithms_conf(void);
diff --git a/src/lib/libssl/src/crypto/evp/evp_enc.c b/src/lib/libssl/src/crypto/evp/evp_enc.c
index 8ea5aa935d..be0758a879 100644
--- a/src/lib/libssl/src/crypto/evp/evp_enc.c
+++ b/src/lib/libssl/src/crypto/evp/evp_enc.c
@@ -148,19 +148,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
148#endif 148#endif
149 149
150 ctx->cipher=cipher; 150 ctx->cipher=cipher;
151 if (ctx->cipher->ctx_size) 151 ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
152 {
153 ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
154 if (!ctx->cipher_data)
155 {
156 EVPerr(EVP_F_EVP_CIPHERINIT, ERR_R_MALLOC_FAILURE);
157 return 0;
158 }
159 }
160 else
161 {
162 ctx->cipher_data = NULL;
163 }
164 ctx->key_len = cipher->key_len; 152 ctx->key_len = cipher->key_len;
165 ctx->flags = 0; 153 ctx->flags = 0;
166 if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT) 154 if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT)
diff --git a/src/lib/libssl/src/crypto/evp/evp_pbe.c b/src/lib/libssl/src/crypto/evp/evp_pbe.c
index 91e545a141..bc98e63363 100644
--- a/src/lib/libssl/src/crypto/evp/evp_pbe.c
+++ b/src/lib/libssl/src/crypto/evp/evp_pbe.c
@@ -87,7 +87,7 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
87 if (i == -1) { 87 if (i == -1) {
88 char obj_tmp[80]; 88 char obj_tmp[80];
89 EVPerr(EVP_F_EVP_PBE_CIPHERINIT,EVP_R_UNKNOWN_PBE_ALGORITHM); 89 EVPerr(EVP_F_EVP_PBE_CIPHERINIT,EVP_R_UNKNOWN_PBE_ALGORITHM);
90 if (!pbe_obj) BUF_strlcpy (obj_tmp, "NULL", sizeof obj_tmp); 90 if (!pbe_obj) strlcpy (obj_tmp, "NULL", sizeof obj_tmp);
91 else i2t_ASN1_OBJECT(obj_tmp, sizeof obj_tmp, pbe_obj); 91 else i2t_ASN1_OBJECT(obj_tmp, sizeof obj_tmp, pbe_obj);
92 ERR_add_error_data(2, "TYPE=", obj_tmp); 92 ERR_add_error_data(2, "TYPE=", obj_tmp);
93 return 0; 93 return 0;
diff --git a/src/lib/libssl/src/crypto/evp/evp_pkey.c b/src/lib/libssl/src/crypto/evp/evp_pkey.c
index eb481ec661..30b6fbb03d 100644
--- a/src/lib/libssl/src/crypto/evp/evp_pkey.c
+++ b/src/lib/libssl/src/crypto/evp/evp_pkey.c
@@ -210,7 +210,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
210#endif 210#endif
211 default: 211 default:
212 EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM); 212 EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM);
213 if (!a->algorithm) BUF_strlcpy (obj_tmp, "NULL", sizeof obj_tmp); 213 if (!a->algorithm) strlcpy (obj_tmp, "NULL", sizeof obj_tmp);
214 else i2t_ASN1_OBJECT(obj_tmp, 80, a->algorithm); 214 else i2t_ASN1_OBJECT(obj_tmp, 80, a->algorithm);
215 ERR_add_error_data(2, "TYPE=", obj_tmp); 215 ERR_add_error_data(2, "TYPE=", obj_tmp);
216 EVP_PKEY_free (pkey); 216 EVP_PKEY_free (pkey);
diff --git a/src/lib/libssl/src/crypto/hmac/Makefile.ssl b/src/lib/libssl/src/crypto/hmac/Makefile.ssl
new file mode 100644
index 0000000000..f1c07322c4
--- /dev/null
+++ b/src/lib/libssl/src/crypto/hmac/Makefile.ssl
@@ -0,0 +1,101 @@
1#
2# SSLeay/crypto/md/Makefile
3#
4
5DIR= hmac
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=hmactest.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=hmac.c
27LIBOBJ=hmac.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= hmac.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82hmac.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
83hmac.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
84hmac.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
85hmac.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
86hmac.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
87hmac.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
88hmac.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
89hmac.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h
90hmac.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
91hmac.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
92hmac.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
93hmac.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
94hmac.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
95hmac.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
96hmac.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
97hmac.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
98hmac.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
99hmac.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
100hmac.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
101hmac.o: ../cryptlib.h hmac.c
diff --git a/src/lib/libssl/src/crypto/idea/Makefile.ssl b/src/lib/libssl/src/crypto/idea/Makefile.ssl
new file mode 100644
index 0000000000..fa016ea399
--- /dev/null
+++ b/src/lib/libssl/src/crypto/idea/Makefile.ssl
@@ -0,0 +1,91 @@
1#
2# SSLeay/crypto/idea/Makefile
3#
4
5DIR= idea
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=ideatest.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c
27LIBOBJ=i_cbc.o i_cfb64.o i_ofb64.o i_ecb.o i_skey.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= idea.h
32HEADER= idea_lcl.h $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82i_cbc.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
83i_cbc.o: i_cbc.c idea_lcl.h
84i_cfb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
85i_cfb64.o: i_cfb64.c idea_lcl.h
86i_ecb.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
87i_ecb.o: ../../include/openssl/opensslv.h i_ecb.c idea_lcl.h
88i_ofb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
89i_ofb64.o: i_ofb64.c idea_lcl.h
90i_skey.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
91i_skey.o: i_skey.c idea_lcl.h
diff --git a/src/lib/libssl/src/crypto/krb5/Makefile.ssl b/src/lib/libssl/src/crypto/krb5/Makefile.ssl
new file mode 100644
index 0000000000..d9224c0f09
--- /dev/null
+++ b/src/lib/libssl/src/crypto/krb5/Makefile.ssl
@@ -0,0 +1,90 @@
1#
2# OpenSSL/krb5/Makefile.ssl
3#
4
5DIR= krb5
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile README
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= krb5_asn.c
27
28LIBOBJ= krb5_asn.o
29
30SRC= $(LIBSRC)
31
32EXHEADER= krb5_asn.h
33HEADER= $(EXHEADER)
34
35ALL= $(GENERAL) $(SRC) $(HEADER)
36
37top:
38 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
39
40all: lib
41
42lib: $(LIBOBJ)
43 $(AR) $(LIB) $(LIBOBJ)
44 $(RANLIB) $(LIB) || echo Never mind.
45 @touch lib
46
47files:
48 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
49
50links:
51 @sh $(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
56install:
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
63tags:
64 ctags $(SRC)
65
66tests:
67
68lint:
69 lint -DLINT $(INCLUDES) $(SRC)>fluff
70
71depend:
72 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
73
74dclean:
75 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
76 mv -f Makefile.new $(MAKEFILE)
77
78clean:
79 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
80
81# DO NOT DELETE THIS LINE -- make depend depends on it.
82
83krb5_asn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
84krb5_asn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
85krb5_asn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
86krb5_asn.o: ../../include/openssl/krb5_asn.h
87krb5_asn.o: ../../include/openssl/opensslconf.h
88krb5_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
89krb5_asn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
90krb5_asn.o: ../../include/openssl/symhacks.h krb5_asn.c
diff --git a/src/lib/libssl/src/crypto/lhash/Makefile.ssl b/src/lib/libssl/src/crypto/lhash/Makefile.ssl
new file mode 100644
index 0000000000..60e7ee3393
--- /dev/null
+++ b/src/lib/libssl/src/crypto/lhash/Makefile.ssl
@@ -0,0 +1,93 @@
1#
2# SSLeay/crypto/lhash/Makefile
3#
4
5DIR= lhash
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=lhash.c lh_stats.c
27LIBOBJ=lhash.o lh_stats.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= lhash.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82lh_stats.o: ../../e_os.h ../../include/openssl/bio.h
83lh_stats.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
84lh_stats.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
85lh_stats.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
86lh_stats.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
87lh_stats.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
88lh_stats.o: ../cryptlib.h lh_stats.c
89lhash.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
90lhash.o: ../../include/openssl/e_os2.h ../../include/openssl/lhash.h
91lhash.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
92lhash.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
93lhash.o: ../../include/openssl/symhacks.h lhash.c
diff --git a/src/lib/libssl/src/crypto/md2/Makefile.ssl b/src/lib/libssl/src/crypto/md2/Makefile.ssl
new file mode 100644
index 0000000000..3206924c90
--- /dev/null
+++ b/src/lib/libssl/src/crypto/md2/Makefile.ssl
@@ -0,0 +1,93 @@
1#
2# SSLeay/crypto/md/Makefile
3#
4
5DIR= md2
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=md2test.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=md2_dgst.c md2_one.c
27LIBOBJ=md2_dgst.o md2_one.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= md2.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82md2_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
83md2_dgst.o: ../../include/openssl/md2.h ../../include/openssl/opensslconf.h
84md2_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
85md2_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
86md2_dgst.o: md2_dgst.c
87md2_one.o: ../../e_os.h ../../include/openssl/bio.h
88md2_one.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
89md2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
90md2_one.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
91md2_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
92md2_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
93md2_one.o: ../../include/openssl/symhacks.h ../cryptlib.h md2_one.c
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..7d2e8d8d3b
--- /dev/null
+++ b/src/lib/libssl/src/crypto/md4/Makefile.ssl
@@ -0,0 +1,91 @@
1#
2# SSLeay/crypto/md4/Makefile
3#
4
5DIR= md4
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20CFLAGS= $(INCLUDES) $(CFLAG)
21
22GENERAL=Makefile
23TEST=md4test.c
24APPS=md4.c
25
26LIB=$(TOP)/libcrypto.a
27LIBSRC=md4_dgst.c md4_one.c
28LIBOBJ=md4_dgst.o md4_one.o
29
30SRC= $(LIBSRC)
31
32EXHEADER= md4.h
33HEADER= md4_locl.h $(EXHEADER)
34
35ALL= $(GENERAL) $(SRC) $(HEADER)
36
37top:
38 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
39
40all: lib
41
42lib: $(LIBOBJ)
43 $(AR) $(LIB) $(LIBOBJ)
44 $(RANLIB) $(LIB) || echo Never mind.
45 @touch lib
46
47files:
48 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
49
50links:
51 @sh $(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
56install:
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
63tags:
64 ctags $(SRC)
65
66tests:
67
68lint:
69 lint -DLINT $(INCLUDES) $(SRC)>fluff
70
71depend:
72 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
73
74dclean:
75 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
76 mv -f Makefile.new $(MAKEFILE)
77
78clean:
79 rm -f asm/mx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
80
81# DO NOT DELETE THIS LINE -- make depend depends on it.
82
83md4_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/md4.h
84md4_dgst.o: ../../include/openssl/opensslconf.h
85md4_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md4_dgst.c
86md4_dgst.o: md4_locl.h
87md4_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
88md4_one.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h
89md4_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
90md4_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
91md4_one.o: md4_one.c
diff --git a/src/lib/libssl/src/crypto/md5/Makefile.ssl b/src/lib/libssl/src/crypto/md5/Makefile.ssl
new file mode 100644
index 0000000000..2361775a2d
--- /dev/null
+++ b/src/lib/libssl/src/crypto/md5/Makefile.ssl
@@ -0,0 +1,127 @@
1#
2# SSLeay/crypto/md5/Makefile
3#
4
5DIR= md5
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=-I.. -I$(TOP) -I../../include
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20MD5_ASM_OBJ=
21
22CFLAGS= $(INCLUDES) $(CFLAG)
23ASFLAGS= $(INCLUDES) $(ASFLAG)
24
25GENERAL=Makefile
26TEST=md5test.c
27APPS=
28
29LIB=$(TOP)/libcrypto.a
30LIBSRC=md5_dgst.c md5_one.c
31LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ)
32
33SRC= $(LIBSRC)
34
35EXHEADER= md5.h
36HEADER= md5_locl.h $(EXHEADER)
37
38ALL= $(GENERAL) $(SRC) $(HEADER)
39
40top:
41 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
42
43all: lib
44
45lib: $(LIBOBJ)
46 $(AR) $(LIB) $(LIBOBJ)
47 $(RANLIB) $(LIB) || echo Never mind.
48 @touch lib
49
50# elf
51asm/mx86-elf.s: asm/md5-586.pl ../perlasm/x86asm.pl
52 (cd asm; $(PERL) md5-586.pl elf $(CFLAGS) > mx86-elf.s)
53
54# a.out
55asm/mx86-out.o: asm/mx86unix.cpp
56 $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o
57
58# bsdi
59asm/mx86bsdi.o: asm/mx86unix.cpp
60 $(CPP) -DBSDI asm/mx86unix.cpp | sed 's/ :/:/' | as -o asm/mx86bsdi.o
61
62asm/mx86unix.cpp: asm/md5-586.pl ../perlasm/x86asm.pl
63 (cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp)
64
65asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
66 $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
67 -o asm/md5-sparcv8plus.o asm/md5-sparcv9.S
68
69# Old GNU assembler doesn't understand V9 instructions, so we
70# hire /usr/ccs/bin/as to do the job. Note that option is called
71# *-gcc27, but even gcc 2>=8 users may experience similar problem
72# if they didn't bother to upgrade GNU assembler. Such users should
73# not choose this option, but be adviced to *remove* GNU assembler
74# or upgrade it.
75asm/md5-sparcv8plus-gcc27.o: asm/md5-sparcv9.S
76 $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -E asm/md5-sparcv9.S | \
77 /usr/ccs/bin/as -xarch=v8plus - -o asm/md5-sparcv8plus-gcc27.o
78
79asm/md5-sparcv9.o: asm/md5-sparcv9.S
80 $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
81 -o asm/md5-sparcv9.o asm/md5-sparcv9.S
82
83files:
84 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
85
86links:
87 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
88 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
89 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
90 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
91
92install:
93 @for i in $(EXHEADER) ; \
94 do \
95 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
96 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
97 done;
98
99tags:
100 ctags $(SRC)
101
102tests:
103
104lint:
105 lint -DLINT $(INCLUDES) $(SRC)>fluff
106
107depend:
108 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
109
110dclean:
111 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
112 mv -f Makefile.new $(MAKEFILE)
113
114clean:
115 rm -f asm/mx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
116
117# DO NOT DELETE THIS LINE -- make depend depends on it.
118
119md5_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/md5.h
120md5_dgst.o: ../../include/openssl/opensslconf.h
121md5_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md5_dgst.c
122md5_dgst.o: md5_locl.h
123md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
124md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
125md5_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
126md5_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
127md5_one.o: md5_one.c
diff --git a/src/lib/libssl/src/crypto/mdc2/Makefile.ssl b/src/lib/libssl/src/crypto/mdc2/Makefile.ssl
new file mode 100644
index 0000000000..33f366fb08
--- /dev/null
+++ b/src/lib/libssl/src/crypto/mdc2/Makefile.ssl
@@ -0,0 +1,98 @@
1#
2# SSLeay/crypto/mdc2/Makefile
3#
4
5DIR= mdc2
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST= mdc2test.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=mdc2dgst.c mdc2_one.c
27LIBOBJ=mdc2dgst.o mdc2_one.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= mdc2.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82mdc2_one.o: ../../e_os.h ../../include/openssl/bio.h
83mdc2_one.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
84mdc2_one.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
85mdc2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
86mdc2_one.o: ../../include/openssl/lhash.h ../../include/openssl/mdc2.h
87mdc2_one.o: ../../include/openssl/opensslconf.h
88mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
89mdc2_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
90mdc2_one.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
91mdc2_one.o: ../cryptlib.h mdc2_one.c
92mdc2dgst.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
93mdc2dgst.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
94mdc2dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h
95mdc2dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
96mdc2dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
97mdc2dgst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
98mdc2dgst.o: mdc2dgst.c
diff --git a/src/lib/libssl/src/crypto/mem.c b/src/lib/libssl/src/crypto/mem.c
index dd86733b77..bb862db499 100644
--- a/src/lib/libssl/src/crypto/mem.c
+++ b/src/lib/libssl/src/crypto/mem.c
@@ -252,7 +252,7 @@ void *CRYPTO_malloc_locked(int num, const char *file, int line)
252 void *ret = NULL; 252 void *ret = NULL;
253 extern unsigned char cleanse_ctr; 253 extern unsigned char cleanse_ctr;
254 254
255 if (num <= 0) return NULL; 255 if (num < 0) return NULL;
256 256
257 allow_customize = 0; 257 allow_customize = 0;
258 if (malloc_debug_func != NULL) 258 if (malloc_debug_func != NULL)
@@ -293,7 +293,7 @@ void *CRYPTO_malloc(int num, const char *file, int line)
293 void *ret = NULL; 293 void *ret = NULL;
294 extern unsigned char cleanse_ctr; 294 extern unsigned char cleanse_ctr;
295 295
296 if (num <= 0) return NULL; 296 if (num < 0) return NULL;
297 297
298 allow_customize = 0; 298 allow_customize = 0;
299 if (malloc_debug_func != NULL) 299 if (malloc_debug_func != NULL)
@@ -324,7 +324,7 @@ void *CRYPTO_realloc(void *str, int num, const char *file, int line)
324 if (str == NULL) 324 if (str == NULL)
325 return CRYPTO_malloc(num, file, line); 325 return CRYPTO_malloc(num, file, line);
326 326
327 if (num <= 0) return NULL; 327 if (num < 0) return NULL;
328 328
329 if (realloc_debug_func != NULL) 329 if (realloc_debug_func != NULL)
330 realloc_debug_func(str, NULL, num, file, line, 0); 330 realloc_debug_func(str, NULL, num, file, line, 0);
@@ -346,7 +346,7 @@ void *CRYPTO_realloc_clean(void *str, int old_len, int num, const char *file,
346 if (str == NULL) 346 if (str == NULL)
347 return CRYPTO_malloc(num, file, line); 347 return CRYPTO_malloc(num, file, line);
348 348
349 if (num <= 0) return NULL; 349 if (num < 0) return NULL;
350 350
351 if (realloc_debug_func != NULL) 351 if (realloc_debug_func != NULL)
352 realloc_debug_func(str, NULL, num, file, line, 0); 352 realloc_debug_func(str, NULL, num, file, line, 0);
diff --git a/src/lib/libssl/src/crypto/mem_dbg.c b/src/lib/libssl/src/crypto/mem_dbg.c
index e212de27e4..9221df00bd 100644
--- a/src/lib/libssl/src/crypto/mem_dbg.c
+++ b/src/lib/libssl/src/crypto/mem_dbg.c
@@ -606,22 +606,22 @@ static void print_leak(const MEM *m, MEM_LEAK *l)
606 { 606 {
607 lcl = localtime(&m->time); 607 lcl = localtime(&m->time);
608 608
609 BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ", 609 snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",
610 lcl->tm_hour,lcl->tm_min,lcl->tm_sec); 610 lcl->tm_hour,lcl->tm_min,lcl->tm_sec);
611 bufp += strlen(bufp); 611 bufp += strlen(bufp);
612 } 612 }
613 613
614 BIO_snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ", 614 snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ",
615 m->order,m->file,m->line); 615 m->order,m->file,m->line);
616 bufp += strlen(bufp); 616 bufp += strlen(bufp);
617 617
618 if (options & V_CRYPTO_MDEBUG_THREAD) 618 if (options & V_CRYPTO_MDEBUG_THREAD)
619 { 619 {
620 BIO_snprintf(bufp, BUF_REMAIN, "thread=%lu, ", m->thread); 620 snprintf(bufp, BUF_REMAIN, "thread=%lu, ", m->thread);
621 bufp += strlen(bufp); 621 bufp += strlen(bufp);
622 } 622 }
623 623
624 BIO_snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n", 624 snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n",
625 m->num,(unsigned long)m->addr); 625 m->num,(unsigned long)m->addr);
626 bufp += strlen(bufp); 626 bufp += strlen(bufp);
627 627
@@ -643,7 +643,7 @@ static void print_leak(const MEM *m, MEM_LEAK *l)
643 643
644 ami_cnt++; 644 ami_cnt++;
645 memset(buf,'>',ami_cnt); 645 memset(buf,'>',ami_cnt);
646 BIO_snprintf(buf + ami_cnt, sizeof buf - ami_cnt, 646 snprintf(buf + ami_cnt, sizeof buf - ami_cnt,
647 " thread=%lu, file=%s, line=%d, info=\"", 647 " thread=%lu, file=%s, line=%d, info=\"",
648 amip->thread, amip->file, amip->line); 648 amip->thread, amip->file, amip->line);
649 buf_len=strlen(buf); 649 buf_len=strlen(buf);
@@ -655,11 +655,11 @@ static void print_leak(const MEM *m, MEM_LEAK *l)
655 } 655 }
656 else 656 else
657 { 657 {
658 BUF_strlcpy(buf + buf_len, amip->info, 658 strlcpy(buf + buf_len, amip->info,
659 sizeof buf - buf_len); 659 sizeof buf - buf_len);
660 buf_len = strlen(buf); 660 buf_len = strlen(buf);
661 } 661 }
662 BIO_snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n"); 662 snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n");
663 663
664 BIO_puts(l->bio,buf); 664 BIO_puts(l->bio,buf);
665 665
diff --git a/src/lib/libssl/src/crypto/objects/Makefile.ssl b/src/lib/libssl/src/crypto/objects/Makefile.ssl
new file mode 100644
index 0000000000..3e7a194cf9
--- /dev/null
+++ b/src/lib/libssl/src/crypto/objects/Makefile.ssl
@@ -0,0 +1,123 @@
1#
2# SSLeay/crypto/objects/Makefile
3#
4
5DIR= objects
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18PERL= perl
19
20CFLAGS= $(INCLUDES) $(CFLAG)
21
22GENERAL=Makefile README
23TEST=
24APPS=
25
26LIB=$(TOP)/libcrypto.a
27LIBSRC= o_names.c obj_dat.c obj_lib.c obj_err.c
28LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o
29
30SRC= $(LIBSRC)
31
32EXHEADER= objects.h obj_mac.h
33HEADER= $(EXHEADER) obj_dat.h
34
35ALL= $(GENERAL) $(SRC) $(HEADER)
36
37top:
38 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
39
40all: obj_dat.h lib
41
42lib: $(LIBOBJ)
43 $(AR) $(LIB) $(LIBOBJ)
44 $(RANLIB) $(LIB) || echo Never mind.
45 @touch lib
46
47obj_dat.h: obj_dat.pl obj_mac.h
48 $(PERL) obj_dat.pl obj_mac.h obj_dat.h
49
50# objects.pl both reads and writes obj_mac.num
51obj_mac.h: objects.pl objects.txt obj_mac.num
52 $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
53
54files:
55 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
56
57links:
58 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
59 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
60 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
61 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
62
63install:
64 @for i in $(EXHEADER) ; \
65 do \
66 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
67 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
68 done;
69
70tags:
71 ctags $(SRC)
72
73tests:
74
75lint:
76 lint -DLINT $(INCLUDES) $(SRC)>fluff
77
78depend:
79 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
80
81dclean:
82 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
83 mv -f Makefile.new $(MAKEFILE)
84
85clean:
86 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
87
88# DO NOT DELETE THIS LINE -- make depend depends on it.
89
90o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
91o_names.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
92o_names.o: ../../include/openssl/e_os2.h ../../include/openssl/lhash.h
93o_names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
94o_names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
95o_names.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
96o_names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
97o_names.o: o_names.c
98obj_dat.o: ../../e_os.h ../../include/openssl/asn1.h
99obj_dat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
100obj_dat.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
101obj_dat.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
102obj_dat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
103obj_dat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
104obj_dat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
105obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
106obj_dat.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_dat.c obj_dat.h
107obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
108obj_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
109obj_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
110obj_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
111obj_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
112obj_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
113obj_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
114obj_err.o: ../../include/openssl/symhacks.h obj_err.c
115obj_lib.o: ../../e_os.h ../../include/openssl/asn1.h
116obj_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
117obj_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
118obj_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
119obj_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
120obj_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
121obj_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
122obj_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
123obj_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_lib.c
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.c b/src/lib/libssl/src/crypto/objects/obj_dat.c
index 4534dc0985..ae97108e93 100644
--- a/src/lib/libssl/src/crypto/objects/obj_dat.c
+++ b/src/lib/libssl/src/crypto/objects/obj_dat.c
@@ -462,7 +462,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
462 if (i > 2) i=2; 462 if (i > 2) i=2;
463 l-=(long)(i*40); 463 l-=(long)(i*40);
464 464
465 BIO_snprintf(tbuf,sizeof tbuf,"%d.%lu",i,l); 465 snprintf(tbuf,sizeof tbuf,"%d.%lu",i,l);
466 i=strlen(tbuf); 466 i=strlen(tbuf);
467 BUF_strlcpy(buf,tbuf,buf_len); 467 BUF_strlcpy(buf,tbuf,buf_len);
468 buf_len-=i; 468 buf_len-=i;
@@ -473,7 +473,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
473 for (; idx<len; idx++) { 473 for (; idx<len; idx++) {
474 l|=p[idx]&0x7f; 474 l|=p[idx]&0x7f;
475 if (!(p[idx] & 0x80)) { 475 if (!(p[idx] & 0x80)) {
476 BIO_snprintf(tbuf,sizeof tbuf,".%lu",l); 476 snprintf(tbuf,sizeof tbuf,".%lu",l);
477 i=strlen(tbuf); 477 i=strlen(tbuf);
478 if (buf_len > 0) 478 if (buf_len > 0)
479 BUF_strlcpy(buf,tbuf,buf_len); 479 BUF_strlcpy(buf,tbuf,buf_len);
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.h b/src/lib/libssl/src/crypto/objects/obj_dat.h
deleted file mode 100644
index 969b18a341..0000000000
--- a/src/lib/libssl/src/crypto/objects/obj_dat.h
+++ /dev/null
@@ -1,3644 +0,0 @@
1/* crypto/objects/obj_dat.h */
2
3/* THIS FILE IS GENERATED FROM objects.h by obj_dat.pl via the
4 * following command:
5 * perl obj_dat.pl obj_mac.h obj_dat.h
6 */
7
8/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
9 * All rights reserved.
10 *
11 * This package is an SSL implementation written
12 * by Eric Young (eay@cryptsoft.com).
13 * The implementation was written so as to conform with Netscapes SSL.
14 *
15 * This library is free for commercial and non-commercial use as long as
16 * the following conditions are aheared to. The following conditions
17 * apply to all code found in this distribution, be it the RC4, RSA,
18 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
19 * included with this distribution is covered by the same copyright terms
20 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21 *
22 * Copyright remains Eric Young's, and as such any Copyright notices in
23 * the code are not to be removed.
24 * If this package is used in a product, Eric Young should be given attribution
25 * as the author of the parts of the library used.
26 * This can be in the form of a textual message at program startup or
27 * in documentation (online or textual) provided with the package.
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 * 1. Redistributions of source code must retain the copyright
33 * notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright
35 * notice, this list of conditions and the following disclaimer in the
36 * documentation and/or other materials provided with the distribution.
37 * 3. All advertising materials mentioning features or use of this software
38 * must display the following acknowledgement:
39 * "This product includes cryptographic software written by
40 * Eric Young (eay@cryptsoft.com)"
41 * The word 'cryptographic' can be left out if the rouines from the library
42 * being used are not cryptographic related :-).
43 * 4. If you include any Windows specific code (or a derivative thereof) from
44 * the apps directory (application code) you must include an acknowledgement:
45 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
46 *
47 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
48 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
50 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
51 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
53 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
54 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
55 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
56 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57 * SUCH DAMAGE.
58 *
59 * The licence and distribution terms for any publically available version or
60 * derivative of this code cannot be changed. i.e. this code cannot simply be
61 * copied and put under another distribution licence
62 * [including the GNU Public Licence.]
63 */
64
65#define NUM_NID 650
66#define NUM_SN 643
67#define NUM_LN 643
68#define NUM_OBJ 617
69
70static unsigned char lvalues[4455]={
710x00, /* [ 0] OBJ_undef */
720x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */
730x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */
740x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 14] OBJ_md2 */
750x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x05, /* [ 22] OBJ_md5 */
760x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04, /* [ 30] OBJ_rc4 */
770x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,/* [ 38] OBJ_rsaEncryption */
780x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,/* [ 47] OBJ_md2WithRSAEncryption */
790x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,/* [ 56] OBJ_md5WithRSAEncryption */
800x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x01,/* [ 65] OBJ_pbeWithMD2AndDES_CBC */
810x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x03,/* [ 74] OBJ_pbeWithMD5AndDES_CBC */
820x55, /* [ 83] OBJ_X500 */
830x55,0x04, /* [ 84] OBJ_X509 */
840x55,0x04,0x03, /* [ 86] OBJ_commonName */
850x55,0x04,0x06, /* [ 89] OBJ_countryName */
860x55,0x04,0x07, /* [ 92] OBJ_localityName */
870x55,0x04,0x08, /* [ 95] OBJ_stateOrProvinceName */
880x55,0x04,0x0A, /* [ 98] OBJ_organizationName */
890x55,0x04,0x0B, /* [101] OBJ_organizationalUnitName */
900x55,0x08,0x01,0x01, /* [104] OBJ_rsa */
910x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07, /* [108] OBJ_pkcs7 */
920x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x01,/* [116] OBJ_pkcs7_data */
930x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x02,/* [125] OBJ_pkcs7_signed */
940x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x03,/* [134] OBJ_pkcs7_enveloped */
950x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x04,/* [143] OBJ_pkcs7_signedAndEnveloped */
960x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x05,/* [152] OBJ_pkcs7_digest */
970x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x06,/* [161] OBJ_pkcs7_encrypted */
980x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03, /* [170] OBJ_pkcs3 */
990x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03,0x01,/* [178] OBJ_dhKeyAgreement */
1000x2B,0x0E,0x03,0x02,0x06, /* [187] OBJ_des_ecb */
1010x2B,0x0E,0x03,0x02,0x09, /* [192] OBJ_des_cfb64 */
1020x2B,0x0E,0x03,0x02,0x07, /* [197] OBJ_des_cbc */
1030x2B,0x0E,0x03,0x02,0x11, /* [202] OBJ_des_ede_ecb */
1040x2B,0x06,0x01,0x04,0x01,0x81,0x3C,0x07,0x01,0x01,0x02,/* [207] OBJ_idea_cbc */
1050x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x02, /* [218] OBJ_rc2_cbc */
1060x2B,0x0E,0x03,0x02,0x12, /* [226] OBJ_sha */
1070x2B,0x0E,0x03,0x02,0x0F, /* [231] OBJ_shaWithRSAEncryption */
1080x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x07, /* [236] OBJ_des_ede3_cbc */
1090x2B,0x0E,0x03,0x02,0x08, /* [244] OBJ_des_ofb64 */
1100x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09, /* [249] OBJ_pkcs9 */
1110x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x01,/* [257] OBJ_pkcs9_emailAddress */
1120x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x02,/* [266] OBJ_pkcs9_unstructuredName */
1130x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x03,/* [275] OBJ_pkcs9_contentType */
1140x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x04,/* [284] OBJ_pkcs9_messageDigest */
1150x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x05,/* [293] OBJ_pkcs9_signingTime */
1160x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x06,/* [302] OBJ_pkcs9_countersignature */
1170x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x07,/* [311] OBJ_pkcs9_challengePassword */
1180x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x08,/* [320] OBJ_pkcs9_unstructuredAddress */
1190x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x09,/* [329] OBJ_pkcs9_extCertAttributes */
1200x60,0x86,0x48,0x01,0x86,0xF8,0x42, /* [338] OBJ_netscape */
1210x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01, /* [345] OBJ_netscape_cert_extension */
1220x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02, /* [353] OBJ_netscape_data_type */
1230x2B,0x0E,0x03,0x02,0x1A, /* [361] OBJ_sha1 */
1240x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,/* [366] OBJ_sha1WithRSAEncryption */
1250x2B,0x0E,0x03,0x02,0x0D, /* [375] OBJ_dsaWithSHA */
1260x2B,0x0E,0x03,0x02,0x0C, /* [380] OBJ_dsa_2 */
1270x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0B,/* [385] OBJ_pbeWithSHA1AndRC2_CBC */
1280x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0C,/* [394] OBJ_id_pbkdf2 */
1290x2B,0x0E,0x03,0x02,0x1B, /* [403] OBJ_dsaWithSHA1_2 */
1300x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x01,/* [408] OBJ_netscape_cert_type */
1310x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x02,/* [417] OBJ_netscape_base_url */
1320x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x03,/* [426] OBJ_netscape_revocation_url */
1330x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x04,/* [435] OBJ_netscape_ca_revocation_url */
1340x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x07,/* [444] OBJ_netscape_renewal_url */
1350x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x08,/* [453] OBJ_netscape_ca_policy_url */
1360x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0C,/* [462] OBJ_netscape_ssl_server_name */
1370x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0D,/* [471] OBJ_netscape_comment */
1380x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02,0x05,/* [480] OBJ_netscape_cert_sequence */
1390x55,0x1D, /* [489] OBJ_id_ce */
1400x55,0x1D,0x0E, /* [491] OBJ_subject_key_identifier */
1410x55,0x1D,0x0F, /* [494] OBJ_key_usage */
1420x55,0x1D,0x10, /* [497] OBJ_private_key_usage_period */
1430x55,0x1D,0x11, /* [500] OBJ_subject_alt_name */
1440x55,0x1D,0x12, /* [503] OBJ_issuer_alt_name */
1450x55,0x1D,0x13, /* [506] OBJ_basic_constraints */
1460x55,0x1D,0x14, /* [509] OBJ_crl_number */
1470x55,0x1D,0x20, /* [512] OBJ_certificate_policies */
1480x55,0x1D,0x23, /* [515] OBJ_authority_key_identifier */
1490x2B,0x06,0x01,0x04,0x01,0x97,0x55,0x01,0x02,/* [518] OBJ_bf_cbc */
1500x55,0x08,0x03,0x65, /* [527] OBJ_mdc2 */
1510x55,0x08,0x03,0x64, /* [531] OBJ_mdc2WithRSA */
1520x55,0x04,0x2A, /* [535] OBJ_givenName */
1530x55,0x04,0x04, /* [538] OBJ_surname */
1540x55,0x04,0x2B, /* [541] OBJ_initials */
1550x55,0x1D,0x1F, /* [544] OBJ_crl_distribution_points */
1560x2B,0x0E,0x03,0x02,0x03, /* [547] OBJ_md5WithRSA */
1570x55,0x04,0x05, /* [552] OBJ_serialNumber */
1580x55,0x04,0x0C, /* [555] OBJ_title */
1590x55,0x04,0x0D, /* [558] OBJ_description */
1600x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0A,/* [561] OBJ_cast5_cbc */
1610x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0C,/* [570] OBJ_pbeWithMD5AndCast5_CBC */
1620x2A,0x86,0x48,0xCE,0x38,0x04,0x03, /* [579] OBJ_dsaWithSHA1 */
1630x2B,0x0E,0x03,0x02,0x1D, /* [586] OBJ_sha1WithRSA */
1640x2A,0x86,0x48,0xCE,0x38,0x04,0x01, /* [591] OBJ_dsa */
1650x2B,0x24,0x03,0x02,0x01, /* [598] OBJ_ripemd160 */
1660x2B,0x24,0x03,0x03,0x01,0x02, /* [603] OBJ_ripemd160WithRSA */
1670x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x08, /* [609] OBJ_rc5_cbc */
1680x29,0x01,0x01,0x85,0x1A,0x01, /* [617] OBJ_rle_compression */
1690x29,0x01,0x01,0x85,0x1A,0x02, /* [623] OBJ_zlib_compression */
1700x55,0x1D,0x25, /* [629] OBJ_ext_key_usage */
1710x2B,0x06,0x01,0x05,0x05,0x07, /* [632] OBJ_id_pkix */
1720x2B,0x06,0x01,0x05,0x05,0x07,0x03, /* [638] OBJ_id_kp */
1730x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x01, /* [645] OBJ_server_auth */
1740x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x02, /* [653] OBJ_client_auth */
1750x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x03, /* [661] OBJ_code_sign */
1760x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x04, /* [669] OBJ_email_protect */
1770x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x08, /* [677] OBJ_time_stamp */
1780x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x15,/* [685] OBJ_ms_code_ind */
1790x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x16,/* [695] OBJ_ms_code_com */
1800x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x01,/* [705] OBJ_ms_ctl_sign */
1810x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x03,/* [715] OBJ_ms_sgc */
1820x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x04,/* [725] OBJ_ms_efs */
1830x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x04,0x01,/* [735] OBJ_ns_sgc */
1840x55,0x1D,0x1B, /* [744] OBJ_delta_crl */
1850x55,0x1D,0x15, /* [747] OBJ_crl_reason */
1860x55,0x1D,0x18, /* [750] OBJ_invalidity_date */
1870x2B,0x65,0x01,0x04,0x01, /* [753] OBJ_sxnet */
1880x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x01,/* [758] OBJ_pbe_WithSHA1And128BitRC4 */
1890x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x02,/* [768] OBJ_pbe_WithSHA1And40BitRC4 */
1900x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x03,/* [778] OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC */
1910x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x04,/* [788] OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC */
1920x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x05,/* [798] OBJ_pbe_WithSHA1And128BitRC2_CBC */
1930x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x06,/* [808] OBJ_pbe_WithSHA1And40BitRC2_CBC */
1940x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x01,/* [818] OBJ_keyBag */
1950x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x02,/* [829] OBJ_pkcs8ShroudedKeyBag */
1960x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x03,/* [840] OBJ_certBag */
1970x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x04,/* [851] OBJ_crlBag */
1980x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x05,/* [862] OBJ_secretBag */
1990x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x06,/* [873] OBJ_safeContentsBag */
2000x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x14,/* [884] OBJ_friendlyName */
2010x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x15,/* [893] OBJ_localKeyID */
2020x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x01,/* [902] OBJ_x509Certificate */
2030x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x02,/* [912] OBJ_sdsiCertificate */
2040x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x17,0x01,/* [922] OBJ_x509Crl */
2050x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0D,/* [932] OBJ_pbes2 */
2060x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0E,/* [941] OBJ_pbmac1 */
2070x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x07, /* [950] OBJ_hmacWithSHA1 */
2080x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x01, /* [958] OBJ_id_qt_cps */
2090x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x02, /* [966] OBJ_id_qt_unotice */
2100x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0F,/* [974] OBJ_SMIMECapabilities */
2110x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x04,/* [983] OBJ_pbeWithMD2AndRC2_CBC */
2120x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x06,/* [992] OBJ_pbeWithMD5AndRC2_CBC */
2130x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0A,/* [1001] OBJ_pbeWithSHA1AndDES_CBC */
2140x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x0E,/* [1010] OBJ_ms_ext_req */
2150x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0E,/* [1020] OBJ_ext_req */
2160x55,0x04,0x29, /* [1029] OBJ_name */
2170x55,0x04,0x2E, /* [1032] OBJ_dnQualifier */
2180x2B,0x06,0x01,0x05,0x05,0x07,0x01, /* [1035] OBJ_id_pe */
2190x2B,0x06,0x01,0x05,0x05,0x07,0x30, /* [1042] OBJ_id_ad */
2200x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x01, /* [1049] OBJ_info_access */
2210x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01, /* [1057] OBJ_ad_OCSP */
2220x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x02, /* [1065] OBJ_ad_ca_issuers */
2230x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x09, /* [1073] OBJ_OCSP_sign */
2240x28, /* [1081] OBJ_iso */
2250x2A, /* [1082] OBJ_member_body */
2260x2A,0x86,0x48, /* [1083] OBJ_ISO_US */
2270x2A,0x86,0x48,0xCE,0x38, /* [1086] OBJ_X9_57 */
2280x2A,0x86,0x48,0xCE,0x38,0x04, /* [1091] OBJ_X9cm */
2290x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01, /* [1097] OBJ_pkcs1 */
2300x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05, /* [1105] OBJ_pkcs5 */
2310x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,/* [1113] OBJ_SMIME */
2320x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,/* [1122] OBJ_id_smime_mod */
2330x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,/* [1132] OBJ_id_smime_ct */
2340x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,/* [1142] OBJ_id_smime_aa */
2350x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,/* [1152] OBJ_id_smime_alg */
2360x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,/* [1162] OBJ_id_smime_cd */
2370x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,/* [1172] OBJ_id_smime_spq */
2380x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,/* [1182] OBJ_id_smime_cti */
2390x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x01,/* [1192] OBJ_id_smime_mod_cms */
2400x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x02,/* [1203] OBJ_id_smime_mod_ess */
2410x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x03,/* [1214] OBJ_id_smime_mod_oid */
2420x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x04,/* [1225] OBJ_id_smime_mod_msg_v3 */
2430x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x05,/* [1236] OBJ_id_smime_mod_ets_eSignature_88 */
2440x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x06,/* [1247] OBJ_id_smime_mod_ets_eSignature_97 */
2450x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x07,/* [1258] OBJ_id_smime_mod_ets_eSigPolicy_88 */
2460x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x08,/* [1269] OBJ_id_smime_mod_ets_eSigPolicy_97 */
2470x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x01,/* [1280] OBJ_id_smime_ct_receipt */
2480x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x02,/* [1291] OBJ_id_smime_ct_authData */
2490x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x03,/* [1302] OBJ_id_smime_ct_publishCert */
2500x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x04,/* [1313] OBJ_id_smime_ct_TSTInfo */
2510x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x05,/* [1324] OBJ_id_smime_ct_TDTInfo */
2520x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x06,/* [1335] OBJ_id_smime_ct_contentInfo */
2530x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x07,/* [1346] OBJ_id_smime_ct_DVCSRequestData */
2540x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x08,/* [1357] OBJ_id_smime_ct_DVCSResponseData */
2550x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x01,/* [1368] OBJ_id_smime_aa_receiptRequest */
2560x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x02,/* [1379] OBJ_id_smime_aa_securityLabel */
2570x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x03,/* [1390] OBJ_id_smime_aa_mlExpandHistory */
2580x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x04,/* [1401] OBJ_id_smime_aa_contentHint */
2590x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x05,/* [1412] OBJ_id_smime_aa_msgSigDigest */
2600x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x06,/* [1423] OBJ_id_smime_aa_encapContentType */
2610x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x07,/* [1434] OBJ_id_smime_aa_contentIdentifier */
2620x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x08,/* [1445] OBJ_id_smime_aa_macValue */
2630x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x09,/* [1456] OBJ_id_smime_aa_equivalentLabels */
2640x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0A,/* [1467] OBJ_id_smime_aa_contentReference */
2650x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0B,/* [1478] OBJ_id_smime_aa_encrypKeyPref */
2660x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0C,/* [1489] OBJ_id_smime_aa_signingCertificate */
2670x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0D,/* [1500] OBJ_id_smime_aa_smimeEncryptCerts */
2680x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0E,/* [1511] OBJ_id_smime_aa_timeStampToken */
2690x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0F,/* [1522] OBJ_id_smime_aa_ets_sigPolicyId */
2700x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x10,/* [1533] OBJ_id_smime_aa_ets_commitmentType */
2710x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x11,/* [1544] OBJ_id_smime_aa_ets_signerLocation */
2720x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x12,/* [1555] OBJ_id_smime_aa_ets_signerAttr */
2730x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x13,/* [1566] OBJ_id_smime_aa_ets_otherSigCert */
2740x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x14,/* [1577] OBJ_id_smime_aa_ets_contentTimestamp */
2750x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x15,/* [1588] OBJ_id_smime_aa_ets_CertificateRefs */
2760x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x16,/* [1599] OBJ_id_smime_aa_ets_RevocationRefs */
2770x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x17,/* [1610] OBJ_id_smime_aa_ets_certValues */
2780x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x18,/* [1621] OBJ_id_smime_aa_ets_revocationValues */
2790x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x19,/* [1632] OBJ_id_smime_aa_ets_escTimeStamp */
2800x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1A,/* [1643] OBJ_id_smime_aa_ets_certCRLTimestamp */
2810x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1B,/* [1654] OBJ_id_smime_aa_ets_archiveTimeStamp */
2820x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1C,/* [1665] OBJ_id_smime_aa_signatureType */
2830x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1D,/* [1676] OBJ_id_smime_aa_dvcs_dvc */
2840x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x01,/* [1687] OBJ_id_smime_alg_ESDHwith3DES */
2850x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x02,/* [1698] OBJ_id_smime_alg_ESDHwithRC2 */
2860x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x03,/* [1709] OBJ_id_smime_alg_3DESwrap */
2870x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x04,/* [1720] OBJ_id_smime_alg_RC2wrap */
2880x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x05,/* [1731] OBJ_id_smime_alg_ESDH */
2890x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x06,/* [1742] OBJ_id_smime_alg_CMS3DESwrap */
2900x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x07,/* [1753] OBJ_id_smime_alg_CMSRC2wrap */
2910x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,0x01,/* [1764] OBJ_id_smime_cd_ldap */
2920x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x01,/* [1775] OBJ_id_smime_spq_ets_sqt_uri */
2930x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x02,/* [1786] OBJ_id_smime_spq_ets_sqt_unotice */
2940x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x01,/* [1797] OBJ_id_smime_cti_ets_proofOfOrigin */
2950x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x02,/* [1808] OBJ_id_smime_cti_ets_proofOfReceipt */
2960x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x03,/* [1819] OBJ_id_smime_cti_ets_proofOfDelivery */
2970x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x04,/* [1830] OBJ_id_smime_cti_ets_proofOfSender */
2980x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x05,/* [1841] OBJ_id_smime_cti_ets_proofOfApproval */
2990x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x06,/* [1852] OBJ_id_smime_cti_ets_proofOfCreation */
3000x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x04, /* [1863] OBJ_md4 */
3010x2B,0x06,0x01,0x05,0x05,0x07,0x00, /* [1871] OBJ_id_pkix_mod */
3020x2B,0x06,0x01,0x05,0x05,0x07,0x02, /* [1878] OBJ_id_qt */
3030x2B,0x06,0x01,0x05,0x05,0x07,0x04, /* [1885] OBJ_id_it */
3040x2B,0x06,0x01,0x05,0x05,0x07,0x05, /* [1892] OBJ_id_pkip */
3050x2B,0x06,0x01,0x05,0x05,0x07,0x06, /* [1899] OBJ_id_alg */
3060x2B,0x06,0x01,0x05,0x05,0x07,0x07, /* [1906] OBJ_id_cmc */
3070x2B,0x06,0x01,0x05,0x05,0x07,0x08, /* [1913] OBJ_id_on */
3080x2B,0x06,0x01,0x05,0x05,0x07,0x09, /* [1920] OBJ_id_pda */
3090x2B,0x06,0x01,0x05,0x05,0x07,0x0A, /* [1927] OBJ_id_aca */
3100x2B,0x06,0x01,0x05,0x05,0x07,0x0B, /* [1934] OBJ_id_qcs */
3110x2B,0x06,0x01,0x05,0x05,0x07,0x0C, /* [1941] OBJ_id_cct */
3120x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x01, /* [1948] OBJ_id_pkix1_explicit_88 */
3130x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x02, /* [1956] OBJ_id_pkix1_implicit_88 */
3140x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x03, /* [1964] OBJ_id_pkix1_explicit_93 */
3150x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x04, /* [1972] OBJ_id_pkix1_implicit_93 */
3160x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x05, /* [1980] OBJ_id_mod_crmf */
3170x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x06, /* [1988] OBJ_id_mod_cmc */
3180x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x07, /* [1996] OBJ_id_mod_kea_profile_88 */
3190x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x08, /* [2004] OBJ_id_mod_kea_profile_93 */
3200x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x09, /* [2012] OBJ_id_mod_cmp */
3210x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0A, /* [2020] OBJ_id_mod_qualified_cert_88 */
3220x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0B, /* [2028] OBJ_id_mod_qualified_cert_93 */
3230x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0C, /* [2036] OBJ_id_mod_attribute_cert */
3240x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0D, /* [2044] OBJ_id_mod_timestamp_protocol */
3250x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0E, /* [2052] OBJ_id_mod_ocsp */
3260x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0F, /* [2060] OBJ_id_mod_dvcs */
3270x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x10, /* [2068] OBJ_id_mod_cmp2000 */
3280x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x02, /* [2076] OBJ_biometricInfo */
3290x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x03, /* [2084] OBJ_qcStatements */
3300x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x04, /* [2092] OBJ_ac_auditEntity */
3310x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x05, /* [2100] OBJ_ac_targeting */
3320x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x06, /* [2108] OBJ_aaControls */
3330x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x07, /* [2116] OBJ_sbqp_ipAddrBlock */
3340x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x08, /* [2124] OBJ_sbqp_autonomousSysNum */
3350x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x09, /* [2132] OBJ_sbqp_routerIdentifier */
3360x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x03, /* [2140] OBJ_textNotice */
3370x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x05, /* [2148] OBJ_ipsecEndSystem */
3380x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x06, /* [2156] OBJ_ipsecTunnel */
3390x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x07, /* [2164] OBJ_ipsecUser */
3400x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x0A, /* [2172] OBJ_dvcs */
3410x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x01, /* [2180] OBJ_id_it_caProtEncCert */
3420x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x02, /* [2188] OBJ_id_it_signKeyPairTypes */
3430x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x03, /* [2196] OBJ_id_it_encKeyPairTypes */
3440x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x04, /* [2204] OBJ_id_it_preferredSymmAlg */
3450x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x05, /* [2212] OBJ_id_it_caKeyUpdateInfo */
3460x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x06, /* [2220] OBJ_id_it_currentCRL */
3470x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x07, /* [2228] OBJ_id_it_unsupportedOIDs */
3480x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x08, /* [2236] OBJ_id_it_subscriptionRequest */
3490x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x09, /* [2244] OBJ_id_it_subscriptionResponse */
3500x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0A, /* [2252] OBJ_id_it_keyPairParamReq */
3510x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0B, /* [2260] OBJ_id_it_keyPairParamRep */
3520x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0C, /* [2268] OBJ_id_it_revPassphrase */
3530x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0D, /* [2276] OBJ_id_it_implicitConfirm */
3540x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0E, /* [2284] OBJ_id_it_confirmWaitTime */
3550x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0F, /* [2292] OBJ_id_it_origPKIMessage */
3560x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01, /* [2300] OBJ_id_regCtrl */
3570x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02, /* [2308] OBJ_id_regInfo */
3580x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x01,/* [2316] OBJ_id_regCtrl_regToken */
3590x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x02,/* [2325] OBJ_id_regCtrl_authenticator */
3600x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x03,/* [2334] OBJ_id_regCtrl_pkiPublicationInfo */
3610x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x04,/* [2343] OBJ_id_regCtrl_pkiArchiveOptions */
3620x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x05,/* [2352] OBJ_id_regCtrl_oldCertID */
3630x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x06,/* [2361] OBJ_id_regCtrl_protocolEncrKey */
3640x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x01,/* [2370] OBJ_id_regInfo_utf8Pairs */
3650x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x02,/* [2379] OBJ_id_regInfo_certReq */
3660x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x01, /* [2388] OBJ_id_alg_des40 */
3670x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x02, /* [2396] OBJ_id_alg_noSignature */
3680x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x03, /* [2404] OBJ_id_alg_dh_sig_hmac_sha1 */
3690x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x04, /* [2412] OBJ_id_alg_dh_pop */
3700x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x01, /* [2420] OBJ_id_cmc_statusInfo */
3710x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x02, /* [2428] OBJ_id_cmc_identification */
3720x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x03, /* [2436] OBJ_id_cmc_identityProof */
3730x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x04, /* [2444] OBJ_id_cmc_dataReturn */
3740x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x05, /* [2452] OBJ_id_cmc_transactionId */
3750x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x06, /* [2460] OBJ_id_cmc_senderNonce */
3760x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x07, /* [2468] OBJ_id_cmc_recipientNonce */
3770x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x08, /* [2476] OBJ_id_cmc_addExtensions */
3780x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x09, /* [2484] OBJ_id_cmc_encryptedPOP */
3790x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0A, /* [2492] OBJ_id_cmc_decryptedPOP */
3800x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0B, /* [2500] OBJ_id_cmc_lraPOPWitness */
3810x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0F, /* [2508] OBJ_id_cmc_getCert */
3820x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x10, /* [2516] OBJ_id_cmc_getCRL */
3830x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x11, /* [2524] OBJ_id_cmc_revokeRequest */
3840x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x12, /* [2532] OBJ_id_cmc_regInfo */
3850x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x13, /* [2540] OBJ_id_cmc_responseInfo */
3860x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x15, /* [2548] OBJ_id_cmc_queryPending */
3870x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x16, /* [2556] OBJ_id_cmc_popLinkRandom */
3880x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x17, /* [2564] OBJ_id_cmc_popLinkWitness */
3890x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x18, /* [2572] OBJ_id_cmc_confirmCertAcceptance */
3900x2B,0x06,0x01,0x05,0x05,0x07,0x08,0x01, /* [2580] OBJ_id_on_personalData */
3910x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x01, /* [2588] OBJ_id_pda_dateOfBirth */
3920x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x02, /* [2596] OBJ_id_pda_placeOfBirth */
3930x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x03, /* [2604] OBJ_id_pda_gender */
3940x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x04, /* [2612] OBJ_id_pda_countryOfCitizenship */
3950x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x05, /* [2620] OBJ_id_pda_countryOfResidence */
3960x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x01, /* [2628] OBJ_id_aca_authenticationInfo */
3970x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x02, /* [2636] OBJ_id_aca_accessIdentity */
3980x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x03, /* [2644] OBJ_id_aca_chargingIdentity */
3990x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x04, /* [2652] OBJ_id_aca_group */
4000x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x05, /* [2660] OBJ_id_aca_role */
4010x2B,0x06,0x01,0x05,0x05,0x07,0x0B,0x01, /* [2668] OBJ_id_qcs_pkixQCSyntax_v1 */
4020x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x01, /* [2676] OBJ_id_cct_crs */
4030x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x02, /* [2684] OBJ_id_cct_PKIData */
4040x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x03, /* [2692] OBJ_id_cct_PKIResponse */
4050x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x03, /* [2700] OBJ_ad_timeStamping */
4060x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x04, /* [2708] OBJ_ad_dvcs */
4070x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x01,/* [2716] OBJ_id_pkix_OCSP_basic */
4080x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x02,/* [2725] OBJ_id_pkix_OCSP_Nonce */
4090x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x03,/* [2734] OBJ_id_pkix_OCSP_CrlID */
4100x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x04,/* [2743] OBJ_id_pkix_OCSP_acceptableResponses */
4110x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x05,/* [2752] OBJ_id_pkix_OCSP_noCheck */
4120x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x06,/* [2761] OBJ_id_pkix_OCSP_archiveCutoff */
4130x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x07,/* [2770] OBJ_id_pkix_OCSP_serviceLocator */
4140x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x08,/* [2779] OBJ_id_pkix_OCSP_extendedStatus */
4150x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x09,/* [2788] OBJ_id_pkix_OCSP_valid */
4160x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0A,/* [2797] OBJ_id_pkix_OCSP_path */
4170x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0B,/* [2806] OBJ_id_pkix_OCSP_trustRoot */
4180x2B,0x0E,0x03,0x02, /* [2815] OBJ_algorithm */
4190x2B,0x0E,0x03,0x02,0x0B, /* [2819] OBJ_rsaSignature */
4200x55,0x08, /* [2824] OBJ_X500algorithms */
4210x2B, /* [2826] OBJ_org */
4220x2B,0x06, /* [2827] OBJ_dod */
4230x2B,0x06,0x01, /* [2829] OBJ_iana */
4240x2B,0x06,0x01,0x01, /* [2832] OBJ_Directory */
4250x2B,0x06,0x01,0x02, /* [2836] OBJ_Management */
4260x2B,0x06,0x01,0x03, /* [2840] OBJ_Experimental */
4270x2B,0x06,0x01,0x04, /* [2844] OBJ_Private */
4280x2B,0x06,0x01,0x05, /* [2848] OBJ_Security */
4290x2B,0x06,0x01,0x06, /* [2852] OBJ_SNMPv2 */
4300x2B,0x06,0x01,0x07, /* [2856] OBJ_Mail */
4310x2B,0x06,0x01,0x04,0x01, /* [2860] OBJ_Enterprises */
4320x2B,0x06,0x01,0x04,0x01,0x8B,0x3A,0x82,0x58,/* [2865] OBJ_dcObject */
4330x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,/* [2874] OBJ_domainComponent */
4340x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0D,/* [2884] OBJ_Domain */
4350x50, /* [2894] OBJ_joint_iso_ccitt */
4360x55,0x01,0x05, /* [2895] OBJ_selected_attribute_types */
4370x55,0x01,0x05,0x37, /* [2898] OBJ_clearance */
4380x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x03,/* [2902] OBJ_md4WithRSAEncryption */
4390x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0A, /* [2911] OBJ_ac_proxying */
4400x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0B, /* [2919] OBJ_sinfo_access */
4410x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x06, /* [2927] OBJ_id_aca_encAttrs */
4420x55,0x04,0x48, /* [2935] OBJ_role */
4430x55,0x1D,0x24, /* [2938] OBJ_policy_constraints */
4440x55,0x1D,0x37, /* [2941] OBJ_target_information */
4450x55,0x1D,0x38, /* [2944] OBJ_no_rev_avail */
4460x00, /* [2947] OBJ_ccitt */
4470x2A,0x86,0x48,0xCE,0x3D, /* [2948] OBJ_ansi_X9_62 */
4480x2A,0x86,0x48,0xCE,0x3D,0x01,0x01, /* [2953] OBJ_X9_62_prime_field */
4490x2A,0x86,0x48,0xCE,0x3D,0x01,0x02, /* [2960] OBJ_X9_62_characteristic_two_field */
4500x2A,0x86,0x48,0xCE,0x3D,0x02,0x01, /* [2967] OBJ_X9_62_id_ecPublicKey */
4510x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x01, /* [2974] OBJ_X9_62_prime192v1 */
4520x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x02, /* [2982] OBJ_X9_62_prime192v2 */
4530x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x03, /* [2990] OBJ_X9_62_prime192v3 */
4540x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x04, /* [2998] OBJ_X9_62_prime239v1 */
4550x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x05, /* [3006] OBJ_X9_62_prime239v2 */
4560x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x06, /* [3014] OBJ_X9_62_prime239v3 */
4570x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x07, /* [3022] OBJ_X9_62_prime256v1 */
4580x2A,0x86,0x48,0xCE,0x3D,0x04,0x01, /* [3030] OBJ_ecdsa_with_SHA1 */
4590x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x11,0x01,/* [3037] OBJ_ms_csp_name */
4600x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x01,/* [3046] OBJ_aes_128_ecb */
4610x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x02,/* [3055] OBJ_aes_128_cbc */
4620x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x03,/* [3064] OBJ_aes_128_ofb128 */
4630x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x04,/* [3073] OBJ_aes_128_cfb128 */
4640x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x15,/* [3082] OBJ_aes_192_ecb */
4650x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x16,/* [3091] OBJ_aes_192_cbc */
4660x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x17,/* [3100] OBJ_aes_192_ofb128 */
4670x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x18,/* [3109] OBJ_aes_192_cfb128 */
4680x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x29,/* [3118] OBJ_aes_256_ecb */
4690x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2A,/* [3127] OBJ_aes_256_cbc */
4700x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2B,/* [3136] OBJ_aes_256_ofb128 */
4710x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2C,/* [3145] OBJ_aes_256_cfb128 */
4720x55,0x1D,0x17, /* [3154] OBJ_hold_instruction_code */
4730x2A,0x86,0x48,0xCE,0x38,0x02,0x01, /* [3157] OBJ_hold_instruction_none */
4740x2A,0x86,0x48,0xCE,0x38,0x02,0x02, /* [3164] OBJ_hold_instruction_call_issuer */
4750x2A,0x86,0x48,0xCE,0x38,0x02,0x03, /* [3171] OBJ_hold_instruction_reject */
4760x09, /* [3178] OBJ_data */
4770x09,0x92,0x26, /* [3179] OBJ_pss */
4780x09,0x92,0x26,0x89,0x93,0xF2,0x2C, /* [3182] OBJ_ucl */
4790x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64, /* [3189] OBJ_pilot */
4800x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,/* [3197] OBJ_pilotAttributeType */
4810x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x03,/* [3206] OBJ_pilotAttributeSyntax */
4820x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,/* [3215] OBJ_pilotObjectClass */
4830x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x0A,/* [3224] OBJ_pilotGroups */
4840x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x03,0x04,/* [3233] OBJ_iA5StringSyntax */
4850x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x03,0x05,/* [3243] OBJ_caseIgnoreIA5StringSyntax */
4860x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x03,/* [3253] OBJ_pilotObject */
4870x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x04,/* [3263] OBJ_pilotPerson */
4880x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x05,/* [3273] OBJ_account */
4890x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x06,/* [3283] OBJ_document */
4900x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x07,/* [3293] OBJ_room */
4910x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x09,/* [3303] OBJ_documentSeries */
4920x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0E,/* [3313] OBJ_rFC822localPart */
4930x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0F,/* [3323] OBJ_dNSDomain */
4940x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x11,/* [3333] OBJ_domainRelatedObject */
4950x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x12,/* [3343] OBJ_friendlyCountry */
4960x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x13,/* [3353] OBJ_simpleSecurityObject */
4970x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x14,/* [3363] OBJ_pilotOrganization */
4980x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x15,/* [3373] OBJ_pilotDSA */
4990x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x16,/* [3383] OBJ_qualityLabelledData */
5000x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x01,/* [3393] OBJ_userId */
5010x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x02,/* [3403] OBJ_textEncodedORAddress */
5020x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x03,/* [3413] OBJ_rfc822Mailbox */
5030x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x04,/* [3423] OBJ_info */
5040x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x05,/* [3433] OBJ_favouriteDrink */
5050x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x06,/* [3443] OBJ_roomNumber */
5060x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x07,/* [3453] OBJ_photo */
5070x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x08,/* [3463] OBJ_userClass */
5080x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x09,/* [3473] OBJ_host */
5090x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0A,/* [3483] OBJ_manager */
5100x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0B,/* [3493] OBJ_documentIdentifier */
5110x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0C,/* [3503] OBJ_documentTitle */
5120x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0D,/* [3513] OBJ_documentVersion */
5130x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0E,/* [3523] OBJ_documentAuthor */
5140x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0F,/* [3533] OBJ_documentLocation */
5150x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x14,/* [3543] OBJ_homeTelephoneNumber */
5160x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x15,/* [3553] OBJ_secretary */
5170x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x16,/* [3563] OBJ_otherMailbox */
5180x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x17,/* [3573] OBJ_lastModifiedTime */
5190x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x18,/* [3583] OBJ_lastModifiedBy */
5200x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1A,/* [3593] OBJ_aRecord */
5210x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1B,/* [3603] OBJ_pilotAttributeType27 */
5220x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1C,/* [3613] OBJ_mXRecord */
5230x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1D,/* [3623] OBJ_nSRecord */
5240x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1E,/* [3633] OBJ_sOARecord */
5250x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1F,/* [3643] OBJ_cNAMERecord */
5260x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x25,/* [3653] OBJ_associatedDomain */
5270x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x26,/* [3663] OBJ_associatedName */
5280x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x27,/* [3673] OBJ_homePostalAddress */
5290x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x28,/* [3683] OBJ_personalTitle */
5300x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x29,/* [3693] OBJ_mobileTelephoneNumber */
5310x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2A,/* [3703] OBJ_pagerTelephoneNumber */
5320x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2B,/* [3713] OBJ_friendlyCountryName */
5330x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2D,/* [3723] OBJ_organizationalStatus */
5340x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2E,/* [3733] OBJ_janetMailbox */
5350x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2F,/* [3743] OBJ_mailPreferenceOption */
5360x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x30,/* [3753] OBJ_buildingName */
5370x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x31,/* [3763] OBJ_dSAQuality */
5380x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x32,/* [3773] OBJ_singleLevelQuality */
5390x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x33,/* [3783] OBJ_subtreeMinimumQuality */
5400x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x34,/* [3793] OBJ_subtreeMaximumQuality */
5410x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x35,/* [3803] OBJ_personalSignature */
5420x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x36,/* [3813] OBJ_dITRedirect */
5430x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x37,/* [3823] OBJ_audio */
5440x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x38,/* [3833] OBJ_documentPublisher */
5450x55,0x04,0x2D, /* [3843] OBJ_x500UniqueIdentifier */
5460x2B,0x06,0x01,0x07,0x01, /* [3846] OBJ_mime_mhs */
5470x2B,0x06,0x01,0x07,0x01,0x01, /* [3851] OBJ_mime_mhs_headings */
5480x2B,0x06,0x01,0x07,0x01,0x02, /* [3857] OBJ_mime_mhs_bodies */
5490x2B,0x06,0x01,0x07,0x01,0x01,0x01, /* [3863] OBJ_id_hex_partial_message */
5500x2B,0x06,0x01,0x07,0x01,0x01,0x02, /* [3870] OBJ_id_hex_multipart_message */
5510x55,0x04,0x2C, /* [3877] OBJ_generationQualifier */
5520x55,0x04,0x41, /* [3880] OBJ_pseudonym */
5530x67,0x2A, /* [3883] OBJ_id_set */
5540x67,0x2A,0x00, /* [3885] OBJ_set_ctype */
5550x67,0x2A,0x01, /* [3888] OBJ_set_msgExt */
5560x67,0x2A,0x03, /* [3891] OBJ_set_attr */
5570x67,0x2A,0x05, /* [3894] OBJ_set_policy */
5580x67,0x2A,0x07, /* [3897] OBJ_set_certExt */
5590x67,0x2A,0x08, /* [3900] OBJ_set_brand */
5600x67,0x2A,0x00,0x00, /* [3903] OBJ_setct_PANData */
5610x67,0x2A,0x00,0x01, /* [3907] OBJ_setct_PANToken */
5620x67,0x2A,0x00,0x02, /* [3911] OBJ_setct_PANOnly */
5630x67,0x2A,0x00,0x03, /* [3915] OBJ_setct_OIData */
5640x67,0x2A,0x00,0x04, /* [3919] OBJ_setct_PI */
5650x67,0x2A,0x00,0x05, /* [3923] OBJ_setct_PIData */
5660x67,0x2A,0x00,0x06, /* [3927] OBJ_setct_PIDataUnsigned */
5670x67,0x2A,0x00,0x07, /* [3931] OBJ_setct_HODInput */
5680x67,0x2A,0x00,0x08, /* [3935] OBJ_setct_AuthResBaggage */
5690x67,0x2A,0x00,0x09, /* [3939] OBJ_setct_AuthRevReqBaggage */
5700x67,0x2A,0x00,0x0A, /* [3943] OBJ_setct_AuthRevResBaggage */
5710x67,0x2A,0x00,0x0B, /* [3947] OBJ_setct_CapTokenSeq */
5720x67,0x2A,0x00,0x0C, /* [3951] OBJ_setct_PInitResData */
5730x67,0x2A,0x00,0x0D, /* [3955] OBJ_setct_PI_TBS */
5740x67,0x2A,0x00,0x0E, /* [3959] OBJ_setct_PResData */
5750x67,0x2A,0x00,0x10, /* [3963] OBJ_setct_AuthReqTBS */
5760x67,0x2A,0x00,0x11, /* [3967] OBJ_setct_AuthResTBS */
5770x67,0x2A,0x00,0x12, /* [3971] OBJ_setct_AuthResTBSX */
5780x67,0x2A,0x00,0x13, /* [3975] OBJ_setct_AuthTokenTBS */
5790x67,0x2A,0x00,0x14, /* [3979] OBJ_setct_CapTokenData */
5800x67,0x2A,0x00,0x15, /* [3983] OBJ_setct_CapTokenTBS */
5810x67,0x2A,0x00,0x16, /* [3987] OBJ_setct_AcqCardCodeMsg */
5820x67,0x2A,0x00,0x17, /* [3991] OBJ_setct_AuthRevReqTBS */
5830x67,0x2A,0x00,0x18, /* [3995] OBJ_setct_AuthRevResData */
5840x67,0x2A,0x00,0x19, /* [3999] OBJ_setct_AuthRevResTBS */
5850x67,0x2A,0x00,0x1A, /* [4003] OBJ_setct_CapReqTBS */
5860x67,0x2A,0x00,0x1B, /* [4007] OBJ_setct_CapReqTBSX */
5870x67,0x2A,0x00,0x1C, /* [4011] OBJ_setct_CapResData */
5880x67,0x2A,0x00,0x1D, /* [4015] OBJ_setct_CapRevReqTBS */
5890x67,0x2A,0x00,0x1E, /* [4019] OBJ_setct_CapRevReqTBSX */
5900x67,0x2A,0x00,0x1F, /* [4023] OBJ_setct_CapRevResData */
5910x67,0x2A,0x00,0x20, /* [4027] OBJ_setct_CredReqTBS */
5920x67,0x2A,0x00,0x21, /* [4031] OBJ_setct_CredReqTBSX */
5930x67,0x2A,0x00,0x22, /* [4035] OBJ_setct_CredResData */
5940x67,0x2A,0x00,0x23, /* [4039] OBJ_setct_CredRevReqTBS */
5950x67,0x2A,0x00,0x24, /* [4043] OBJ_setct_CredRevReqTBSX */
5960x67,0x2A,0x00,0x25, /* [4047] OBJ_setct_CredRevResData */
5970x67,0x2A,0x00,0x26, /* [4051] OBJ_setct_PCertReqData */
5980x67,0x2A,0x00,0x27, /* [4055] OBJ_setct_PCertResTBS */
5990x67,0x2A,0x00,0x28, /* [4059] OBJ_setct_BatchAdminReqData */
6000x67,0x2A,0x00,0x29, /* [4063] OBJ_setct_BatchAdminResData */
6010x67,0x2A,0x00,0x2A, /* [4067] OBJ_setct_CardCInitResTBS */
6020x67,0x2A,0x00,0x2B, /* [4071] OBJ_setct_MeAqCInitResTBS */
6030x67,0x2A,0x00,0x2C, /* [4075] OBJ_setct_RegFormResTBS */
6040x67,0x2A,0x00,0x2D, /* [4079] OBJ_setct_CertReqData */
6050x67,0x2A,0x00,0x2E, /* [4083] OBJ_setct_CertReqTBS */
6060x67,0x2A,0x00,0x2F, /* [4087] OBJ_setct_CertResData */
6070x67,0x2A,0x00,0x30, /* [4091] OBJ_setct_CertInqReqTBS */
6080x67,0x2A,0x00,0x31, /* [4095] OBJ_setct_ErrorTBS */
6090x67,0x2A,0x00,0x32, /* [4099] OBJ_setct_PIDualSignedTBE */
6100x67,0x2A,0x00,0x33, /* [4103] OBJ_setct_PIUnsignedTBE */
6110x67,0x2A,0x00,0x34, /* [4107] OBJ_setct_AuthReqTBE */
6120x67,0x2A,0x00,0x35, /* [4111] OBJ_setct_AuthResTBE */
6130x67,0x2A,0x00,0x36, /* [4115] OBJ_setct_AuthResTBEX */
6140x67,0x2A,0x00,0x37, /* [4119] OBJ_setct_AuthTokenTBE */
6150x67,0x2A,0x00,0x38, /* [4123] OBJ_setct_CapTokenTBE */
6160x67,0x2A,0x00,0x39, /* [4127] OBJ_setct_CapTokenTBEX */
6170x67,0x2A,0x00,0x3A, /* [4131] OBJ_setct_AcqCardCodeMsgTBE */
6180x67,0x2A,0x00,0x3B, /* [4135] OBJ_setct_AuthRevReqTBE */
6190x67,0x2A,0x00,0x3C, /* [4139] OBJ_setct_AuthRevResTBE */
6200x67,0x2A,0x00,0x3D, /* [4143] OBJ_setct_AuthRevResTBEB */
6210x67,0x2A,0x00,0x3E, /* [4147] OBJ_setct_CapReqTBE */
6220x67,0x2A,0x00,0x3F, /* [4151] OBJ_setct_CapReqTBEX */
6230x67,0x2A,0x00,0x40, /* [4155] OBJ_setct_CapResTBE */
6240x67,0x2A,0x00,0x41, /* [4159] OBJ_setct_CapRevReqTBE */
6250x67,0x2A,0x00,0x42, /* [4163] OBJ_setct_CapRevReqTBEX */
6260x67,0x2A,0x00,0x43, /* [4167] OBJ_setct_CapRevResTBE */
6270x67,0x2A,0x00,0x44, /* [4171] OBJ_setct_CredReqTBE */
6280x67,0x2A,0x00,0x45, /* [4175] OBJ_setct_CredReqTBEX */
6290x67,0x2A,0x00,0x46, /* [4179] OBJ_setct_CredResTBE */
6300x67,0x2A,0x00,0x47, /* [4183] OBJ_setct_CredRevReqTBE */
6310x67,0x2A,0x00,0x48, /* [4187] OBJ_setct_CredRevReqTBEX */
6320x67,0x2A,0x00,0x49, /* [4191] OBJ_setct_CredRevResTBE */
6330x67,0x2A,0x00,0x4A, /* [4195] OBJ_setct_BatchAdminReqTBE */
6340x67,0x2A,0x00,0x4B, /* [4199] OBJ_setct_BatchAdminResTBE */
6350x67,0x2A,0x00,0x4C, /* [4203] OBJ_setct_RegFormReqTBE */
6360x67,0x2A,0x00,0x4D, /* [4207] OBJ_setct_CertReqTBE */
6370x67,0x2A,0x00,0x4E, /* [4211] OBJ_setct_CertReqTBEX */
6380x67,0x2A,0x00,0x4F, /* [4215] OBJ_setct_CertResTBE */
6390x67,0x2A,0x00,0x50, /* [4219] OBJ_setct_CRLNotificationTBS */
6400x67,0x2A,0x00,0x51, /* [4223] OBJ_setct_CRLNotificationResTBS */
6410x67,0x2A,0x00,0x52, /* [4227] OBJ_setct_BCIDistributionTBS */
6420x67,0x2A,0x01,0x01, /* [4231] OBJ_setext_genCrypt */
6430x67,0x2A,0x01,0x03, /* [4235] OBJ_setext_miAuth */
6440x67,0x2A,0x01,0x04, /* [4239] OBJ_setext_pinSecure */
6450x67,0x2A,0x01,0x05, /* [4243] OBJ_setext_pinAny */
6460x67,0x2A,0x01,0x07, /* [4247] OBJ_setext_track2 */
6470x67,0x2A,0x01,0x08, /* [4251] OBJ_setext_cv */
6480x67,0x2A,0x05,0x00, /* [4255] OBJ_set_policy_root */
6490x67,0x2A,0x07,0x00, /* [4259] OBJ_setCext_hashedRoot */
6500x67,0x2A,0x07,0x01, /* [4263] OBJ_setCext_certType */
6510x67,0x2A,0x07,0x02, /* [4267] OBJ_setCext_merchData */
6520x67,0x2A,0x07,0x03, /* [4271] OBJ_setCext_cCertRequired */
6530x67,0x2A,0x07,0x04, /* [4275] OBJ_setCext_tunneling */
6540x67,0x2A,0x07,0x05, /* [4279] OBJ_setCext_setExt */
6550x67,0x2A,0x07,0x06, /* [4283] OBJ_setCext_setQualf */
6560x67,0x2A,0x07,0x07, /* [4287] OBJ_setCext_PGWYcapabilities */
6570x67,0x2A,0x07,0x08, /* [4291] OBJ_setCext_TokenIdentifier */
6580x67,0x2A,0x07,0x09, /* [4295] OBJ_setCext_Track2Data */
6590x67,0x2A,0x07,0x0A, /* [4299] OBJ_setCext_TokenType */
6600x67,0x2A,0x07,0x0B, /* [4303] OBJ_setCext_IssuerCapabilities */
6610x67,0x2A,0x03,0x00, /* [4307] OBJ_setAttr_Cert */
6620x67,0x2A,0x03,0x01, /* [4311] OBJ_setAttr_PGWYcap */
6630x67,0x2A,0x03,0x02, /* [4315] OBJ_setAttr_TokenType */
6640x67,0x2A,0x03,0x03, /* [4319] OBJ_setAttr_IssCap */
6650x67,0x2A,0x03,0x00,0x00, /* [4323] OBJ_set_rootKeyThumb */
6660x67,0x2A,0x03,0x00,0x01, /* [4328] OBJ_set_addPolicy */
6670x67,0x2A,0x03,0x02,0x01, /* [4333] OBJ_setAttr_Token_EMV */
6680x67,0x2A,0x03,0x02,0x02, /* [4338] OBJ_setAttr_Token_B0Prime */
6690x67,0x2A,0x03,0x03,0x03, /* [4343] OBJ_setAttr_IssCap_CVM */
6700x67,0x2A,0x03,0x03,0x04, /* [4348] OBJ_setAttr_IssCap_T2 */
6710x67,0x2A,0x03,0x03,0x05, /* [4353] OBJ_setAttr_IssCap_Sig */
6720x67,0x2A,0x03,0x03,0x03,0x01, /* [4358] OBJ_setAttr_GenCryptgrm */
6730x67,0x2A,0x03,0x03,0x04,0x01, /* [4364] OBJ_setAttr_T2Enc */
6740x67,0x2A,0x03,0x03,0x04,0x02, /* [4370] OBJ_setAttr_T2cleartxt */
6750x67,0x2A,0x03,0x03,0x05,0x01, /* [4376] OBJ_setAttr_TokICCsig */
6760x67,0x2A,0x03,0x03,0x05,0x02, /* [4382] OBJ_setAttr_SecDevSig */
6770x67,0x2A,0x08,0x01, /* [4388] OBJ_set_brand_IATA_ATA */
6780x67,0x2A,0x08,0x1E, /* [4392] OBJ_set_brand_Diners */
6790x67,0x2A,0x08,0x22, /* [4396] OBJ_set_brand_AmericanExpress */
6800x67,0x2A,0x08,0x23, /* [4400] OBJ_set_brand_JCB */
6810x67,0x2A,0x08,0x04, /* [4404] OBJ_set_brand_Visa */
6820x67,0x2A,0x08,0x05, /* [4408] OBJ_set_brand_MasterCard */
6830x67,0x2A,0x08,0xAE,0x7B, /* [4412] OBJ_set_brand_Novus */
6840x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x0A, /* [4417] OBJ_des_cdmf */
6850x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x06,/* [4425] OBJ_rsaOAEPEncryptionSET */
6860x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x02,/* [4434] OBJ_ms_smartcard_login */
6870x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x03,/* [4444] OBJ_ms_upn */
688};
689
690static ASN1_OBJECT nid_objs[NUM_NID]={
691{"UNDEF","undefined",NID_undef,1,&(lvalues[0]),0},
692{"rsadsi","RSA Data Security, Inc.",NID_rsadsi,6,&(lvalues[1]),0},
693{"pkcs","RSA Data Security, Inc. PKCS",NID_pkcs,7,&(lvalues[7]),0},
694{"MD2","md2",NID_md2,8,&(lvalues[14]),0},
695{"MD5","md5",NID_md5,8,&(lvalues[22]),0},
696{"RC4","rc4",NID_rc4,8,&(lvalues[30]),0},
697{"rsaEncryption","rsaEncryption",NID_rsaEncryption,9,&(lvalues[38]),0},
698{"RSA-MD2","md2WithRSAEncryption",NID_md2WithRSAEncryption,9,
699 &(lvalues[47]),0},
700{"RSA-MD5","md5WithRSAEncryption",NID_md5WithRSAEncryption,9,
701 &(lvalues[56]),0},
702{"PBE-MD2-DES","pbeWithMD2AndDES-CBC",NID_pbeWithMD2AndDES_CBC,9,
703 &(lvalues[65]),0},
704{"PBE-MD5-DES","pbeWithMD5AndDES-CBC",NID_pbeWithMD5AndDES_CBC,9,
705 &(lvalues[74]),0},
706{"X500","directory services (X.500)",NID_X500,1,&(lvalues[83]),0},
707{"X509","X509",NID_X509,2,&(lvalues[84]),0},
708{"CN","commonName",NID_commonName,3,&(lvalues[86]),0},
709{"C","countryName",NID_countryName,3,&(lvalues[89]),0},
710{"L","localityName",NID_localityName,3,&(lvalues[92]),0},
711{"ST","stateOrProvinceName",NID_stateOrProvinceName,3,&(lvalues[95]),0},
712{"O","organizationName",NID_organizationName,3,&(lvalues[98]),0},
713{"OU","organizationalUnitName",NID_organizationalUnitName,3,
714 &(lvalues[101]),0},
715{"RSA","rsa",NID_rsa,4,&(lvalues[104]),0},
716{"pkcs7","pkcs7",NID_pkcs7,8,&(lvalues[108]),0},
717{"pkcs7-data","pkcs7-data",NID_pkcs7_data,9,&(lvalues[116]),0},
718{"pkcs7-signedData","pkcs7-signedData",NID_pkcs7_signed,9,
719 &(lvalues[125]),0},
720{"pkcs7-envelopedData","pkcs7-envelopedData",NID_pkcs7_enveloped,9,
721 &(lvalues[134]),0},
722{"pkcs7-signedAndEnvelopedData","pkcs7-signedAndEnvelopedData",
723 NID_pkcs7_signedAndEnveloped,9,&(lvalues[143]),0},
724{"pkcs7-digestData","pkcs7-digestData",NID_pkcs7_digest,9,
725 &(lvalues[152]),0},
726{"pkcs7-encryptedData","pkcs7-encryptedData",NID_pkcs7_encrypted,9,
727 &(lvalues[161]),0},
728{"pkcs3","pkcs3",NID_pkcs3,8,&(lvalues[170]),0},
729{"dhKeyAgreement","dhKeyAgreement",NID_dhKeyAgreement,9,
730 &(lvalues[178]),0},
731{"DES-ECB","des-ecb",NID_des_ecb,5,&(lvalues[187]),0},
732{"DES-CFB","des-cfb",NID_des_cfb64,5,&(lvalues[192]),0},
733{"DES-CBC","des-cbc",NID_des_cbc,5,&(lvalues[197]),0},
734{"DES-EDE","des-ede",NID_des_ede_ecb,5,&(lvalues[202]),0},
735{"DES-EDE3","des-ede3",NID_des_ede3_ecb,0,NULL},
736{"IDEA-CBC","idea-cbc",NID_idea_cbc,11,&(lvalues[207]),0},
737{"IDEA-CFB","idea-cfb",NID_idea_cfb64,0,NULL},
738{"IDEA-ECB","idea-ecb",NID_idea_ecb,0,NULL},
739{"RC2-CBC","rc2-cbc",NID_rc2_cbc,8,&(lvalues[218]),0},
740{"RC2-ECB","rc2-ecb",NID_rc2_ecb,0,NULL},
741{"RC2-CFB","rc2-cfb",NID_rc2_cfb64,0,NULL},
742{"RC2-OFB","rc2-ofb",NID_rc2_ofb64,0,NULL},
743{"SHA","sha",NID_sha,5,&(lvalues[226]),0},
744{"RSA-SHA","shaWithRSAEncryption",NID_shaWithRSAEncryption,5,
745 &(lvalues[231]),0},
746{"DES-EDE-CBC","des-ede-cbc",NID_des_ede_cbc,0,NULL},
747{"DES-EDE3-CBC","des-ede3-cbc",NID_des_ede3_cbc,8,&(lvalues[236]),0},
748{"DES-OFB","des-ofb",NID_des_ofb64,5,&(lvalues[244]),0},
749{"IDEA-OFB","idea-ofb",NID_idea_ofb64,0,NULL},
750{"pkcs9","pkcs9",NID_pkcs9,8,&(lvalues[249]),0},
751{"emailAddress","emailAddress",NID_pkcs9_emailAddress,9,
752 &(lvalues[257]),0},
753{"unstructuredName","unstructuredName",NID_pkcs9_unstructuredName,9,
754 &(lvalues[266]),0},
755{"contentType","contentType",NID_pkcs9_contentType,9,&(lvalues[275]),0},
756{"messageDigest","messageDigest",NID_pkcs9_messageDigest,9,
757 &(lvalues[284]),0},
758{"signingTime","signingTime",NID_pkcs9_signingTime,9,&(lvalues[293]),0},
759{"countersignature","countersignature",NID_pkcs9_countersignature,9,
760 &(lvalues[302]),0},
761{"challengePassword","challengePassword",NID_pkcs9_challengePassword,
762 9,&(lvalues[311]),0},
763{"unstructuredAddress","unstructuredAddress",
764 NID_pkcs9_unstructuredAddress,9,&(lvalues[320]),0},
765{"extendedCertificateAttributes","extendedCertificateAttributes",
766 NID_pkcs9_extCertAttributes,9,&(lvalues[329]),0},
767{"Netscape","Netscape Communications Corp.",NID_netscape,7,
768 &(lvalues[338]),0},
769{"nsCertExt","Netscape Certificate Extension",
770 NID_netscape_cert_extension,8,&(lvalues[345]),0},
771{"nsDataType","Netscape Data Type",NID_netscape_data_type,8,
772 &(lvalues[353]),0},
773{"DES-EDE-CFB","des-ede-cfb",NID_des_ede_cfb64,0,NULL},
774{"DES-EDE3-CFB","des-ede3-cfb",NID_des_ede3_cfb64,0,NULL},
775{"DES-EDE-OFB","des-ede-ofb",NID_des_ede_ofb64,0,NULL},
776{"DES-EDE3-OFB","des-ede3-ofb",NID_des_ede3_ofb64,0,NULL},
777{"SHA1","sha1",NID_sha1,5,&(lvalues[361]),0},
778{"RSA-SHA1","sha1WithRSAEncryption",NID_sha1WithRSAEncryption,9,
779 &(lvalues[366]),0},
780{"DSA-SHA","dsaWithSHA",NID_dsaWithSHA,5,&(lvalues[375]),0},
781{"DSA-old","dsaEncryption-old",NID_dsa_2,5,&(lvalues[380]),0},
782{"PBE-SHA1-RC2-64","pbeWithSHA1AndRC2-CBC",NID_pbeWithSHA1AndRC2_CBC,
783 9,&(lvalues[385]),0},
784{"PBKDF2","PBKDF2",NID_id_pbkdf2,9,&(lvalues[394]),0},
785{"DSA-SHA1-old","dsaWithSHA1-old",NID_dsaWithSHA1_2,5,&(lvalues[403]),0},
786{"nsCertType","Netscape Cert Type",NID_netscape_cert_type,9,
787 &(lvalues[408]),0},
788{"nsBaseUrl","Netscape Base Url",NID_netscape_base_url,9,
789 &(lvalues[417]),0},
790{"nsRevocationUrl","Netscape Revocation Url",
791 NID_netscape_revocation_url,9,&(lvalues[426]),0},
792{"nsCaRevocationUrl","Netscape CA Revocation Url",
793 NID_netscape_ca_revocation_url,9,&(lvalues[435]),0},
794{"nsRenewalUrl","Netscape Renewal Url",NID_netscape_renewal_url,9,
795 &(lvalues[444]),0},
796{"nsCaPolicyUrl","Netscape CA Policy Url",NID_netscape_ca_policy_url,
797 9,&(lvalues[453]),0},
798{"nsSslServerName","Netscape SSL Server Name",
799 NID_netscape_ssl_server_name,9,&(lvalues[462]),0},
800{"nsComment","Netscape Comment",NID_netscape_comment,9,&(lvalues[471]),0},
801{"nsCertSequence","Netscape Certificate Sequence",
802 NID_netscape_cert_sequence,9,&(lvalues[480]),0},
803{"DESX-CBC","desx-cbc",NID_desx_cbc,0,NULL},
804{"id-ce","id-ce",NID_id_ce,2,&(lvalues[489]),0},
805{"subjectKeyIdentifier","X509v3 Subject Key Identifier",
806 NID_subject_key_identifier,3,&(lvalues[491]),0},
807{"keyUsage","X509v3 Key Usage",NID_key_usage,3,&(lvalues[494]),0},
808{"privateKeyUsagePeriod","X509v3 Private Key Usage Period",
809 NID_private_key_usage_period,3,&(lvalues[497]),0},
810{"subjectAltName","X509v3 Subject Alternative Name",
811 NID_subject_alt_name,3,&(lvalues[500]),0},
812{"issuerAltName","X509v3 Issuer Alternative Name",NID_issuer_alt_name,
813 3,&(lvalues[503]),0},
814{"basicConstraints","X509v3 Basic Constraints",NID_basic_constraints,
815 3,&(lvalues[506]),0},
816{"crlNumber","X509v3 CRL Number",NID_crl_number,3,&(lvalues[509]),0},
817{"certificatePolicies","X509v3 Certificate Policies",
818 NID_certificate_policies,3,&(lvalues[512]),0},
819{"authorityKeyIdentifier","X509v3 Authority Key Identifier",
820 NID_authority_key_identifier,3,&(lvalues[515]),0},
821{"BF-CBC","bf-cbc",NID_bf_cbc,9,&(lvalues[518]),0},
822{"BF-ECB","bf-ecb",NID_bf_ecb,0,NULL},
823{"BF-CFB","bf-cfb",NID_bf_cfb64,0,NULL},
824{"BF-OFB","bf-ofb",NID_bf_ofb64,0,NULL},
825{"MDC2","mdc2",NID_mdc2,4,&(lvalues[527]),0},
826{"RSA-MDC2","mdc2WithRSA",NID_mdc2WithRSA,4,&(lvalues[531]),0},
827{"RC4-40","rc4-40",NID_rc4_40,0,NULL},
828{"RC2-40-CBC","rc2-40-cbc",NID_rc2_40_cbc,0,NULL},
829{"GN","givenName",NID_givenName,3,&(lvalues[535]),0},
830{"SN","surname",NID_surname,3,&(lvalues[538]),0},
831{"initials","initials",NID_initials,3,&(lvalues[541]),0},
832{NULL,NULL,NID_undef,0,NULL},
833{"crlDistributionPoints","X509v3 CRL Distribution Points",
834 NID_crl_distribution_points,3,&(lvalues[544]),0},
835{"RSA-NP-MD5","md5WithRSA",NID_md5WithRSA,5,&(lvalues[547]),0},
836{"serialNumber","serialNumber",NID_serialNumber,3,&(lvalues[552]),0},
837{"title","title",NID_title,3,&(lvalues[555]),0},
838{"description","description",NID_description,3,&(lvalues[558]),0},
839{"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[561]),0},
840{"CAST5-ECB","cast5-ecb",NID_cast5_ecb,0,NULL},
841{"CAST5-CFB","cast5-cfb",NID_cast5_cfb64,0,NULL},
842{"CAST5-OFB","cast5-ofb",NID_cast5_ofb64,0,NULL},
843{"pbeWithMD5AndCast5CBC","pbeWithMD5AndCast5CBC",
844 NID_pbeWithMD5AndCast5_CBC,9,&(lvalues[570]),0},
845{"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[579]),0},
846{"MD5-SHA1","md5-sha1",NID_md5_sha1,0,NULL},
847{"RSA-SHA1-2","sha1WithRSA",NID_sha1WithRSA,5,&(lvalues[586]),0},
848{"DSA","dsaEncryption",NID_dsa,7,&(lvalues[591]),0},
849{"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[598]),0},
850{NULL,NULL,NID_undef,0,NULL},
851{"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6,
852 &(lvalues[603]),0},
853{"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[609]),0},
854{"RC5-ECB","rc5-ecb",NID_rc5_ecb,0,NULL},
855{"RC5-CFB","rc5-cfb",NID_rc5_cfb64,0,NULL},
856{"RC5-OFB","rc5-ofb",NID_rc5_ofb64,0,NULL},
857{"RLE","run length compression",NID_rle_compression,6,&(lvalues[617]),0},
858{"ZLIB","zlib compression",NID_zlib_compression,6,&(lvalues[623]),0},
859{"extendedKeyUsage","X509v3 Extended Key Usage",NID_ext_key_usage,3,
860 &(lvalues[629]),0},
861{"PKIX","PKIX",NID_id_pkix,6,&(lvalues[632]),0},
862{"id-kp","id-kp",NID_id_kp,7,&(lvalues[638]),0},
863{"serverAuth","TLS Web Server Authentication",NID_server_auth,8,
864 &(lvalues[645]),0},
865{"clientAuth","TLS Web Client Authentication",NID_client_auth,8,
866 &(lvalues[653]),0},
867{"codeSigning","Code Signing",NID_code_sign,8,&(lvalues[661]),0},
868{"emailProtection","E-mail Protection",NID_email_protect,8,
869 &(lvalues[669]),0},
870{"timeStamping","Time Stamping",NID_time_stamp,8,&(lvalues[677]),0},
871{"msCodeInd","Microsoft Individual Code Signing",NID_ms_code_ind,10,
872 &(lvalues[685]),0},
873{"msCodeCom","Microsoft Commercial Code Signing",NID_ms_code_com,10,
874 &(lvalues[695]),0},
875{"msCTLSign","Microsoft Trust List Signing",NID_ms_ctl_sign,10,
876 &(lvalues[705]),0},
877{"msSGC","Microsoft Server Gated Crypto",NID_ms_sgc,10,&(lvalues[715]),0},
878{"msEFS","Microsoft Encrypted File System",NID_ms_efs,10,
879 &(lvalues[725]),0},
880{"nsSGC","Netscape Server Gated Crypto",NID_ns_sgc,9,&(lvalues[735]),0},
881{"deltaCRL","X509v3 Delta CRL Indicator",NID_delta_crl,3,
882 &(lvalues[744]),0},
883{"CRLReason","X509v3 CRL Reason Code",NID_crl_reason,3,&(lvalues[747]),0},
884{"invalidityDate","Invalidity Date",NID_invalidity_date,3,
885 &(lvalues[750]),0},
886{"SXNetID","Strong Extranet ID",NID_sxnet,5,&(lvalues[753]),0},
887{"PBE-SHA1-RC4-128","pbeWithSHA1And128BitRC4",
888 NID_pbe_WithSHA1And128BitRC4,10,&(lvalues[758]),0},
889{"PBE-SHA1-RC4-40","pbeWithSHA1And40BitRC4",
890 NID_pbe_WithSHA1And40BitRC4,10,&(lvalues[768]),0},
891{"PBE-SHA1-3DES","pbeWithSHA1And3-KeyTripleDES-CBC",
892 NID_pbe_WithSHA1And3_Key_TripleDES_CBC,10,&(lvalues[778]),0},
893{"PBE-SHA1-2DES","pbeWithSHA1And2-KeyTripleDES-CBC",
894 NID_pbe_WithSHA1And2_Key_TripleDES_CBC,10,&(lvalues[788]),0},
895{"PBE-SHA1-RC2-128","pbeWithSHA1And128BitRC2-CBC",
896 NID_pbe_WithSHA1And128BitRC2_CBC,10,&(lvalues[798]),0},
897{"PBE-SHA1-RC2-40","pbeWithSHA1And40BitRC2-CBC",
898 NID_pbe_WithSHA1And40BitRC2_CBC,10,&(lvalues[808]),0},
899{"keyBag","keyBag",NID_keyBag,11,&(lvalues[818]),0},
900{"pkcs8ShroudedKeyBag","pkcs8ShroudedKeyBag",NID_pkcs8ShroudedKeyBag,
901 11,&(lvalues[829]),0},
902{"certBag","certBag",NID_certBag,11,&(lvalues[840]),0},
903{"crlBag","crlBag",NID_crlBag,11,&(lvalues[851]),0},
904{"secretBag","secretBag",NID_secretBag,11,&(lvalues[862]),0},
905{"safeContentsBag","safeContentsBag",NID_safeContentsBag,11,
906 &(lvalues[873]),0},
907{"friendlyName","friendlyName",NID_friendlyName,9,&(lvalues[884]),0},
908{"localKeyID","localKeyID",NID_localKeyID,9,&(lvalues[893]),0},
909{"x509Certificate","x509Certificate",NID_x509Certificate,10,
910 &(lvalues[902]),0},
911{"sdsiCertificate","sdsiCertificate",NID_sdsiCertificate,10,
912 &(lvalues[912]),0},
913{"x509Crl","x509Crl",NID_x509Crl,10,&(lvalues[922]),0},
914{"PBES2","PBES2",NID_pbes2,9,&(lvalues[932]),0},
915{"PBMAC1","PBMAC1",NID_pbmac1,9,&(lvalues[941]),0},
916{"hmacWithSHA1","hmacWithSHA1",NID_hmacWithSHA1,8,&(lvalues[950]),0},
917{"id-qt-cps","Policy Qualifier CPS",NID_id_qt_cps,8,&(lvalues[958]),0},
918{"id-qt-unotice","Policy Qualifier User Notice",NID_id_qt_unotice,8,
919 &(lvalues[966]),0},
920{"RC2-64-CBC","rc2-64-cbc",NID_rc2_64_cbc,0,NULL},
921{"SMIME-CAPS","S/MIME Capabilities",NID_SMIMECapabilities,9,
922 &(lvalues[974]),0},
923{"PBE-MD2-RC2-64","pbeWithMD2AndRC2-CBC",NID_pbeWithMD2AndRC2_CBC,9,
924 &(lvalues[983]),0},
925{"PBE-MD5-RC2-64","pbeWithMD5AndRC2-CBC",NID_pbeWithMD5AndRC2_CBC,9,
926 &(lvalues[992]),0},
927{"PBE-SHA1-DES","pbeWithSHA1AndDES-CBC",NID_pbeWithSHA1AndDES_CBC,9,
928 &(lvalues[1001]),0},
929{"msExtReq","Microsoft Extension Request",NID_ms_ext_req,10,
930 &(lvalues[1010]),0},
931{"extReq","Extension Request",NID_ext_req,9,&(lvalues[1020]),0},
932{"name","name",NID_name,3,&(lvalues[1029]),0},
933{"dnQualifier","dnQualifier",NID_dnQualifier,3,&(lvalues[1032]),0},
934{"id-pe","id-pe",NID_id_pe,7,&(lvalues[1035]),0},
935{"id-ad","id-ad",NID_id_ad,7,&(lvalues[1042]),0},
936{"authorityInfoAccess","Authority Information Access",NID_info_access,
937 8,&(lvalues[1049]),0},
938{"OCSP","OCSP",NID_ad_OCSP,8,&(lvalues[1057]),0},
939{"caIssuers","CA Issuers",NID_ad_ca_issuers,8,&(lvalues[1065]),0},
940{"OCSPSigning","OCSP Signing",NID_OCSP_sign,8,&(lvalues[1073]),0},
941{"ISO","iso",NID_iso,1,&(lvalues[1081]),0},
942{"member-body","ISO Member Body",NID_member_body,1,&(lvalues[1082]),0},
943{"ISO-US","ISO US Member Body",NID_ISO_US,3,&(lvalues[1083]),0},
944{"X9-57","X9.57",NID_X9_57,5,&(lvalues[1086]),0},
945{"X9cm","X9.57 CM ?",NID_X9cm,6,&(lvalues[1091]),0},
946{"pkcs1","pkcs1",NID_pkcs1,8,&(lvalues[1097]),0},
947{"pkcs5","pkcs5",NID_pkcs5,8,&(lvalues[1105]),0},
948{"SMIME","S/MIME",NID_SMIME,9,&(lvalues[1113]),0},
949{"id-smime-mod","id-smime-mod",NID_id_smime_mod,10,&(lvalues[1122]),0},
950{"id-smime-ct","id-smime-ct",NID_id_smime_ct,10,&(lvalues[1132]),0},
951{"id-smime-aa","id-smime-aa",NID_id_smime_aa,10,&(lvalues[1142]),0},
952{"id-smime-alg","id-smime-alg",NID_id_smime_alg,10,&(lvalues[1152]),0},
953{"id-smime-cd","id-smime-cd",NID_id_smime_cd,10,&(lvalues[1162]),0},
954{"id-smime-spq","id-smime-spq",NID_id_smime_spq,10,&(lvalues[1172]),0},
955{"id-smime-cti","id-smime-cti",NID_id_smime_cti,10,&(lvalues[1182]),0},
956{"id-smime-mod-cms","id-smime-mod-cms",NID_id_smime_mod_cms,11,
957 &(lvalues[1192]),0},
958{"id-smime-mod-ess","id-smime-mod-ess",NID_id_smime_mod_ess,11,
959 &(lvalues[1203]),0},
960{"id-smime-mod-oid","id-smime-mod-oid",NID_id_smime_mod_oid,11,
961 &(lvalues[1214]),0},
962{"id-smime-mod-msg-v3","id-smime-mod-msg-v3",NID_id_smime_mod_msg_v3,
963 11,&(lvalues[1225]),0},
964{"id-smime-mod-ets-eSignature-88","id-smime-mod-ets-eSignature-88",
965 NID_id_smime_mod_ets_eSignature_88,11,&(lvalues[1236]),0},
966{"id-smime-mod-ets-eSignature-97","id-smime-mod-ets-eSignature-97",
967 NID_id_smime_mod_ets_eSignature_97,11,&(lvalues[1247]),0},
968{"id-smime-mod-ets-eSigPolicy-88","id-smime-mod-ets-eSigPolicy-88",
969 NID_id_smime_mod_ets_eSigPolicy_88,11,&(lvalues[1258]),0},
970{"id-smime-mod-ets-eSigPolicy-97","id-smime-mod-ets-eSigPolicy-97",
971 NID_id_smime_mod_ets_eSigPolicy_97,11,&(lvalues[1269]),0},
972{"id-smime-ct-receipt","id-smime-ct-receipt",NID_id_smime_ct_receipt,
973 11,&(lvalues[1280]),0},
974{"id-smime-ct-authData","id-smime-ct-authData",
975 NID_id_smime_ct_authData,11,&(lvalues[1291]),0},
976{"id-smime-ct-publishCert","id-smime-ct-publishCert",
977 NID_id_smime_ct_publishCert,11,&(lvalues[1302]),0},
978{"id-smime-ct-TSTInfo","id-smime-ct-TSTInfo",NID_id_smime_ct_TSTInfo,
979 11,&(lvalues[1313]),0},
980{"id-smime-ct-TDTInfo","id-smime-ct-TDTInfo",NID_id_smime_ct_TDTInfo,
981 11,&(lvalues[1324]),0},
982{"id-smime-ct-contentInfo","id-smime-ct-contentInfo",
983 NID_id_smime_ct_contentInfo,11,&(lvalues[1335]),0},
984{"id-smime-ct-DVCSRequestData","id-smime-ct-DVCSRequestData",
985 NID_id_smime_ct_DVCSRequestData,11,&(lvalues[1346]),0},
986{"id-smime-ct-DVCSResponseData","id-smime-ct-DVCSResponseData",
987 NID_id_smime_ct_DVCSResponseData,11,&(lvalues[1357]),0},
988{"id-smime-aa-receiptRequest","id-smime-aa-receiptRequest",
989 NID_id_smime_aa_receiptRequest,11,&(lvalues[1368]),0},
990{"id-smime-aa-securityLabel","id-smime-aa-securityLabel",
991 NID_id_smime_aa_securityLabel,11,&(lvalues[1379]),0},
992{"id-smime-aa-mlExpandHistory","id-smime-aa-mlExpandHistory",
993 NID_id_smime_aa_mlExpandHistory,11,&(lvalues[1390]),0},
994{"id-smime-aa-contentHint","id-smime-aa-contentHint",
995 NID_id_smime_aa_contentHint,11,&(lvalues[1401]),0},
996{"id-smime-aa-msgSigDigest","id-smime-aa-msgSigDigest",
997 NID_id_smime_aa_msgSigDigest,11,&(lvalues[1412]),0},
998{"id-smime-aa-encapContentType","id-smime-aa-encapContentType",
999 NID_id_smime_aa_encapContentType,11,&(lvalues[1423]),0},
1000{"id-smime-aa-contentIdentifier","id-smime-aa-contentIdentifier",
1001 NID_id_smime_aa_contentIdentifier,11,&(lvalues[1434]),0},
1002{"id-smime-aa-macValue","id-smime-aa-macValue",
1003 NID_id_smime_aa_macValue,11,&(lvalues[1445]),0},
1004{"id-smime-aa-equivalentLabels","id-smime-aa-equivalentLabels",
1005 NID_id_smime_aa_equivalentLabels,11,&(lvalues[1456]),0},
1006{"id-smime-aa-contentReference","id-smime-aa-contentReference",
1007 NID_id_smime_aa_contentReference,11,&(lvalues[1467]),0},
1008{"id-smime-aa-encrypKeyPref","id-smime-aa-encrypKeyPref",
1009 NID_id_smime_aa_encrypKeyPref,11,&(lvalues[1478]),0},
1010{"id-smime-aa-signingCertificate","id-smime-aa-signingCertificate",
1011 NID_id_smime_aa_signingCertificate,11,&(lvalues[1489]),0},
1012{"id-smime-aa-smimeEncryptCerts","id-smime-aa-smimeEncryptCerts",
1013 NID_id_smime_aa_smimeEncryptCerts,11,&(lvalues[1500]),0},
1014{"id-smime-aa-timeStampToken","id-smime-aa-timeStampToken",
1015 NID_id_smime_aa_timeStampToken,11,&(lvalues[1511]),0},
1016{"id-smime-aa-ets-sigPolicyId","id-smime-aa-ets-sigPolicyId",
1017 NID_id_smime_aa_ets_sigPolicyId,11,&(lvalues[1522]),0},
1018{"id-smime-aa-ets-commitmentType","id-smime-aa-ets-commitmentType",
1019 NID_id_smime_aa_ets_commitmentType,11,&(lvalues[1533]),0},
1020{"id-smime-aa-ets-signerLocation","id-smime-aa-ets-signerLocation",
1021 NID_id_smime_aa_ets_signerLocation,11,&(lvalues[1544]),0},
1022{"id-smime-aa-ets-signerAttr","id-smime-aa-ets-signerAttr",
1023 NID_id_smime_aa_ets_signerAttr,11,&(lvalues[1555]),0},
1024{"id-smime-aa-ets-otherSigCert","id-smime-aa-ets-otherSigCert",
1025 NID_id_smime_aa_ets_otherSigCert,11,&(lvalues[1566]),0},
1026{"id-smime-aa-ets-contentTimestamp",
1027 "id-smime-aa-ets-contentTimestamp",
1028 NID_id_smime_aa_ets_contentTimestamp,11,&(lvalues[1577]),0},
1029{"id-smime-aa-ets-CertificateRefs","id-smime-aa-ets-CertificateRefs",
1030 NID_id_smime_aa_ets_CertificateRefs,11,&(lvalues[1588]),0},
1031{"id-smime-aa-ets-RevocationRefs","id-smime-aa-ets-RevocationRefs",
1032 NID_id_smime_aa_ets_RevocationRefs,11,&(lvalues[1599]),0},
1033{"id-smime-aa-ets-certValues","id-smime-aa-ets-certValues",
1034 NID_id_smime_aa_ets_certValues,11,&(lvalues[1610]),0},
1035{"id-smime-aa-ets-revocationValues",
1036 "id-smime-aa-ets-revocationValues",
1037 NID_id_smime_aa_ets_revocationValues,11,&(lvalues[1621]),0},
1038{"id-smime-aa-ets-escTimeStamp","id-smime-aa-ets-escTimeStamp",
1039 NID_id_smime_aa_ets_escTimeStamp,11,&(lvalues[1632]),0},
1040{"id-smime-aa-ets-certCRLTimestamp",
1041 "id-smime-aa-ets-certCRLTimestamp",
1042 NID_id_smime_aa_ets_certCRLTimestamp,11,&(lvalues[1643]),0},
1043{"id-smime-aa-ets-archiveTimeStamp",
1044 "id-smime-aa-ets-archiveTimeStamp",
1045 NID_id_smime_aa_ets_archiveTimeStamp,11,&(lvalues[1654]),0},
1046{"id-smime-aa-signatureType","id-smime-aa-signatureType",
1047 NID_id_smime_aa_signatureType,11,&(lvalues[1665]),0},
1048{"id-smime-aa-dvcs-dvc","id-smime-aa-dvcs-dvc",
1049 NID_id_smime_aa_dvcs_dvc,11,&(lvalues[1676]),0},
1050{"id-smime-alg-ESDHwith3DES","id-smime-alg-ESDHwith3DES",
1051 NID_id_smime_alg_ESDHwith3DES,11,&(lvalues[1687]),0},
1052{"id-smime-alg-ESDHwithRC2","id-smime-alg-ESDHwithRC2",
1053 NID_id_smime_alg_ESDHwithRC2,11,&(lvalues[1698]),0},
1054{"id-smime-alg-3DESwrap","id-smime-alg-3DESwrap",
1055 NID_id_smime_alg_3DESwrap,11,&(lvalues[1709]),0},
1056{"id-smime-alg-RC2wrap","id-smime-alg-RC2wrap",
1057 NID_id_smime_alg_RC2wrap,11,&(lvalues[1720]),0},
1058{"id-smime-alg-ESDH","id-smime-alg-ESDH",NID_id_smime_alg_ESDH,11,
1059 &(lvalues[1731]),0},
1060{"id-smime-alg-CMS3DESwrap","id-smime-alg-CMS3DESwrap",
1061 NID_id_smime_alg_CMS3DESwrap,11,&(lvalues[1742]),0},
1062{"id-smime-alg-CMSRC2wrap","id-smime-alg-CMSRC2wrap",
1063 NID_id_smime_alg_CMSRC2wrap,11,&(lvalues[1753]),0},
1064{"id-smime-cd-ldap","id-smime-cd-ldap",NID_id_smime_cd_ldap,11,
1065 &(lvalues[1764]),0},
1066{"id-smime-spq-ets-sqt-uri","id-smime-spq-ets-sqt-uri",
1067 NID_id_smime_spq_ets_sqt_uri,11,&(lvalues[1775]),0},
1068{"id-smime-spq-ets-sqt-unotice","id-smime-spq-ets-sqt-unotice",
1069 NID_id_smime_spq_ets_sqt_unotice,11,&(lvalues[1786]),0},
1070{"id-smime-cti-ets-proofOfOrigin","id-smime-cti-ets-proofOfOrigin",
1071 NID_id_smime_cti_ets_proofOfOrigin,11,&(lvalues[1797]),0},
1072{"id-smime-cti-ets-proofOfReceipt","id-smime-cti-ets-proofOfReceipt",
1073 NID_id_smime_cti_ets_proofOfReceipt,11,&(lvalues[1808]),0},
1074{"id-smime-cti-ets-proofOfDelivery",
1075 "id-smime-cti-ets-proofOfDelivery",
1076 NID_id_smime_cti_ets_proofOfDelivery,11,&(lvalues[1819]),0},
1077{"id-smime-cti-ets-proofOfSender","id-smime-cti-ets-proofOfSender",
1078 NID_id_smime_cti_ets_proofOfSender,11,&(lvalues[1830]),0},
1079{"id-smime-cti-ets-proofOfApproval",
1080 "id-smime-cti-ets-proofOfApproval",
1081 NID_id_smime_cti_ets_proofOfApproval,11,&(lvalues[1841]),0},
1082{"id-smime-cti-ets-proofOfCreation",
1083 "id-smime-cti-ets-proofOfCreation",
1084 NID_id_smime_cti_ets_proofOfCreation,11,&(lvalues[1852]),0},
1085{"MD4","md4",NID_md4,8,&(lvalues[1863]),0},
1086{"id-pkix-mod","id-pkix-mod",NID_id_pkix_mod,7,&(lvalues[1871]),0},
1087{"id-qt","id-qt",NID_id_qt,7,&(lvalues[1878]),0},
1088{"id-it","id-it",NID_id_it,7,&(lvalues[1885]),0},
1089{"id-pkip","id-pkip",NID_id_pkip,7,&(lvalues[1892]),0},
1090{"id-alg","id-alg",NID_id_alg,7,&(lvalues[1899]),0},
1091{"id-cmc","id-cmc",NID_id_cmc,7,&(lvalues[1906]),0},
1092{"id-on","id-on",NID_id_on,7,&(lvalues[1913]),0},
1093{"id-pda","id-pda",NID_id_pda,7,&(lvalues[1920]),0},
1094{"id-aca","id-aca",NID_id_aca,7,&(lvalues[1927]),0},
1095{"id-qcs","id-qcs",NID_id_qcs,7,&(lvalues[1934]),0},
1096{"id-cct","id-cct",NID_id_cct,7,&(lvalues[1941]),0},
1097{"id-pkix1-explicit-88","id-pkix1-explicit-88",
1098 NID_id_pkix1_explicit_88,8,&(lvalues[1948]),0},
1099{"id-pkix1-implicit-88","id-pkix1-implicit-88",
1100 NID_id_pkix1_implicit_88,8,&(lvalues[1956]),0},
1101{"id-pkix1-explicit-93","id-pkix1-explicit-93",
1102 NID_id_pkix1_explicit_93,8,&(lvalues[1964]),0},
1103{"id-pkix1-implicit-93","id-pkix1-implicit-93",
1104 NID_id_pkix1_implicit_93,8,&(lvalues[1972]),0},
1105{"id-mod-crmf","id-mod-crmf",NID_id_mod_crmf,8,&(lvalues[1980]),0},
1106{"id-mod-cmc","id-mod-cmc",NID_id_mod_cmc,8,&(lvalues[1988]),0},
1107{"id-mod-kea-profile-88","id-mod-kea-profile-88",
1108 NID_id_mod_kea_profile_88,8,&(lvalues[1996]),0},
1109{"id-mod-kea-profile-93","id-mod-kea-profile-93",
1110 NID_id_mod_kea_profile_93,8,&(lvalues[2004]),0},
1111{"id-mod-cmp","id-mod-cmp",NID_id_mod_cmp,8,&(lvalues[2012]),0},
1112{"id-mod-qualified-cert-88","id-mod-qualified-cert-88",
1113 NID_id_mod_qualified_cert_88,8,&(lvalues[2020]),0},
1114{"id-mod-qualified-cert-93","id-mod-qualified-cert-93",
1115 NID_id_mod_qualified_cert_93,8,&(lvalues[2028]),0},
1116{"id-mod-attribute-cert","id-mod-attribute-cert",
1117 NID_id_mod_attribute_cert,8,&(lvalues[2036]),0},
1118{"id-mod-timestamp-protocol","id-mod-timestamp-protocol",
1119 NID_id_mod_timestamp_protocol,8,&(lvalues[2044]),0},
1120{"id-mod-ocsp","id-mod-ocsp",NID_id_mod_ocsp,8,&(lvalues[2052]),0},
1121{"id-mod-dvcs","id-mod-dvcs",NID_id_mod_dvcs,8,&(lvalues[2060]),0},
1122{"id-mod-cmp2000","id-mod-cmp2000",NID_id_mod_cmp2000,8,
1123 &(lvalues[2068]),0},
1124{"biometricInfo","Biometric Info",NID_biometricInfo,8,&(lvalues[2076]),0},
1125{"qcStatements","qcStatements",NID_qcStatements,8,&(lvalues[2084]),0},
1126{"ac-auditEntity","ac-auditEntity",NID_ac_auditEntity,8,
1127 &(lvalues[2092]),0},
1128{"ac-targeting","ac-targeting",NID_ac_targeting,8,&(lvalues[2100]),0},
1129{"aaControls","aaControls",NID_aaControls,8,&(lvalues[2108]),0},
1130{"sbqp-ipAddrBlock","sbqp-ipAddrBlock",NID_sbqp_ipAddrBlock,8,
1131 &(lvalues[2116]),0},
1132{"sbqp-autonomousSysNum","sbqp-autonomousSysNum",
1133 NID_sbqp_autonomousSysNum,8,&(lvalues[2124]),0},
1134{"sbqp-routerIdentifier","sbqp-routerIdentifier",
1135 NID_sbqp_routerIdentifier,8,&(lvalues[2132]),0},
1136{"textNotice","textNotice",NID_textNotice,8,&(lvalues[2140]),0},
1137{"ipsecEndSystem","IPSec End System",NID_ipsecEndSystem,8,
1138 &(lvalues[2148]),0},
1139{"ipsecTunnel","IPSec Tunnel",NID_ipsecTunnel,8,&(lvalues[2156]),0},
1140{"ipsecUser","IPSec User",NID_ipsecUser,8,&(lvalues[2164]),0},
1141{"DVCS","dvcs",NID_dvcs,8,&(lvalues[2172]),0},
1142{"id-it-caProtEncCert","id-it-caProtEncCert",NID_id_it_caProtEncCert,
1143 8,&(lvalues[2180]),0},
1144{"id-it-signKeyPairTypes","id-it-signKeyPairTypes",
1145 NID_id_it_signKeyPairTypes,8,&(lvalues[2188]),0},
1146{"id-it-encKeyPairTypes","id-it-encKeyPairTypes",
1147 NID_id_it_encKeyPairTypes,8,&(lvalues[2196]),0},
1148{"id-it-preferredSymmAlg","id-it-preferredSymmAlg",
1149 NID_id_it_preferredSymmAlg,8,&(lvalues[2204]),0},
1150{"id-it-caKeyUpdateInfo","id-it-caKeyUpdateInfo",
1151 NID_id_it_caKeyUpdateInfo,8,&(lvalues[2212]),0},
1152{"id-it-currentCRL","id-it-currentCRL",NID_id_it_currentCRL,8,
1153 &(lvalues[2220]),0},
1154{"id-it-unsupportedOIDs","id-it-unsupportedOIDs",
1155 NID_id_it_unsupportedOIDs,8,&(lvalues[2228]),0},
1156{"id-it-subscriptionRequest","id-it-subscriptionRequest",
1157 NID_id_it_subscriptionRequest,8,&(lvalues[2236]),0},
1158{"id-it-subscriptionResponse","id-it-subscriptionResponse",
1159 NID_id_it_subscriptionResponse,8,&(lvalues[2244]),0},
1160{"id-it-keyPairParamReq","id-it-keyPairParamReq",
1161 NID_id_it_keyPairParamReq,8,&(lvalues[2252]),0},
1162{"id-it-keyPairParamRep","id-it-keyPairParamRep",
1163 NID_id_it_keyPairParamRep,8,&(lvalues[2260]),0},
1164{"id-it-revPassphrase","id-it-revPassphrase",NID_id_it_revPassphrase,
1165 8,&(lvalues[2268]),0},
1166{"id-it-implicitConfirm","id-it-implicitConfirm",
1167 NID_id_it_implicitConfirm,8,&(lvalues[2276]),0},
1168{"id-it-confirmWaitTime","id-it-confirmWaitTime",
1169 NID_id_it_confirmWaitTime,8,&(lvalues[2284]),0},
1170{"id-it-origPKIMessage","id-it-origPKIMessage",
1171 NID_id_it_origPKIMessage,8,&(lvalues[2292]),0},
1172{"id-regCtrl","id-regCtrl",NID_id_regCtrl,8,&(lvalues[2300]),0},
1173{"id-regInfo","id-regInfo",NID_id_regInfo,8,&(lvalues[2308]),0},
1174{"id-regCtrl-regToken","id-regCtrl-regToken",NID_id_regCtrl_regToken,
1175 9,&(lvalues[2316]),0},
1176{"id-regCtrl-authenticator","id-regCtrl-authenticator",
1177 NID_id_regCtrl_authenticator,9,&(lvalues[2325]),0},
1178{"id-regCtrl-pkiPublicationInfo","id-regCtrl-pkiPublicationInfo",
1179 NID_id_regCtrl_pkiPublicationInfo,9,&(lvalues[2334]),0},
1180{"id-regCtrl-pkiArchiveOptions","id-regCtrl-pkiArchiveOptions",
1181 NID_id_regCtrl_pkiArchiveOptions,9,&(lvalues[2343]),0},
1182{"id-regCtrl-oldCertID","id-regCtrl-oldCertID",
1183 NID_id_regCtrl_oldCertID,9,&(lvalues[2352]),0},
1184{"id-regCtrl-protocolEncrKey","id-regCtrl-protocolEncrKey",
1185 NID_id_regCtrl_protocolEncrKey,9,&(lvalues[2361]),0},
1186{"id-regInfo-utf8Pairs","id-regInfo-utf8Pairs",
1187 NID_id_regInfo_utf8Pairs,9,&(lvalues[2370]),0},
1188{"id-regInfo-certReq","id-regInfo-certReq",NID_id_regInfo_certReq,9,
1189 &(lvalues[2379]),0},
1190{"id-alg-des40","id-alg-des40",NID_id_alg_des40,8,&(lvalues[2388]),0},
1191{"id-alg-noSignature","id-alg-noSignature",NID_id_alg_noSignature,8,
1192 &(lvalues[2396]),0},
1193{"id-alg-dh-sig-hmac-sha1","id-alg-dh-sig-hmac-sha1",
1194 NID_id_alg_dh_sig_hmac_sha1,8,&(lvalues[2404]),0},
1195{"id-alg-dh-pop","id-alg-dh-pop",NID_id_alg_dh_pop,8,&(lvalues[2412]),0},
1196{"id-cmc-statusInfo","id-cmc-statusInfo",NID_id_cmc_statusInfo,8,
1197 &(lvalues[2420]),0},
1198{"id-cmc-identification","id-cmc-identification",
1199 NID_id_cmc_identification,8,&(lvalues[2428]),0},
1200{"id-cmc-identityProof","id-cmc-identityProof",
1201 NID_id_cmc_identityProof,8,&(lvalues[2436]),0},
1202{"id-cmc-dataReturn","id-cmc-dataReturn",NID_id_cmc_dataReturn,8,
1203 &(lvalues[2444]),0},
1204{"id-cmc-transactionId","id-cmc-transactionId",
1205 NID_id_cmc_transactionId,8,&(lvalues[2452]),0},
1206{"id-cmc-senderNonce","id-cmc-senderNonce",NID_id_cmc_senderNonce,8,
1207 &(lvalues[2460]),0},
1208{"id-cmc-recipientNonce","id-cmc-recipientNonce",
1209 NID_id_cmc_recipientNonce,8,&(lvalues[2468]),0},
1210{"id-cmc-addExtensions","id-cmc-addExtensions",
1211 NID_id_cmc_addExtensions,8,&(lvalues[2476]),0},
1212{"id-cmc-encryptedPOP","id-cmc-encryptedPOP",NID_id_cmc_encryptedPOP,
1213 8,&(lvalues[2484]),0},
1214{"id-cmc-decryptedPOP","id-cmc-decryptedPOP",NID_id_cmc_decryptedPOP,
1215 8,&(lvalues[2492]),0},
1216{"id-cmc-lraPOPWitness","id-cmc-lraPOPWitness",
1217 NID_id_cmc_lraPOPWitness,8,&(lvalues[2500]),0},
1218{"id-cmc-getCert","id-cmc-getCert",NID_id_cmc_getCert,8,
1219 &(lvalues[2508]),0},
1220{"id-cmc-getCRL","id-cmc-getCRL",NID_id_cmc_getCRL,8,&(lvalues[2516]),0},
1221{"id-cmc-revokeRequest","id-cmc-revokeRequest",
1222 NID_id_cmc_revokeRequest,8,&(lvalues[2524]),0},
1223{"id-cmc-regInfo","id-cmc-regInfo",NID_id_cmc_regInfo,8,
1224 &(lvalues[2532]),0},
1225{"id-cmc-responseInfo","id-cmc-responseInfo",NID_id_cmc_responseInfo,
1226 8,&(lvalues[2540]),0},
1227{"id-cmc-queryPending","id-cmc-queryPending",NID_id_cmc_queryPending,
1228 8,&(lvalues[2548]),0},
1229{"id-cmc-popLinkRandom","id-cmc-popLinkRandom",
1230 NID_id_cmc_popLinkRandom,8,&(lvalues[2556]),0},
1231{"id-cmc-popLinkWitness","id-cmc-popLinkWitness",
1232 NID_id_cmc_popLinkWitness,8,&(lvalues[2564]),0},
1233{"id-cmc-confirmCertAcceptance","id-cmc-confirmCertAcceptance",
1234 NID_id_cmc_confirmCertAcceptance,8,&(lvalues[2572]),0},
1235{"id-on-personalData","id-on-personalData",NID_id_on_personalData,8,
1236 &(lvalues[2580]),0},
1237{"id-pda-dateOfBirth","id-pda-dateOfBirth",NID_id_pda_dateOfBirth,8,
1238 &(lvalues[2588]),0},
1239{"id-pda-placeOfBirth","id-pda-placeOfBirth",NID_id_pda_placeOfBirth,
1240 8,&(lvalues[2596]),0},
1241{NULL,NULL,NID_undef,0,NULL},
1242{"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2604]),0},
1243{"id-pda-countryOfCitizenship","id-pda-countryOfCitizenship",
1244 NID_id_pda_countryOfCitizenship,8,&(lvalues[2612]),0},
1245{"id-pda-countryOfResidence","id-pda-countryOfResidence",
1246 NID_id_pda_countryOfResidence,8,&(lvalues[2620]),0},
1247{"id-aca-authenticationInfo","id-aca-authenticationInfo",
1248 NID_id_aca_authenticationInfo,8,&(lvalues[2628]),0},
1249{"id-aca-accessIdentity","id-aca-accessIdentity",
1250 NID_id_aca_accessIdentity,8,&(lvalues[2636]),0},
1251{"id-aca-chargingIdentity","id-aca-chargingIdentity",
1252 NID_id_aca_chargingIdentity,8,&(lvalues[2644]),0},
1253{"id-aca-group","id-aca-group",NID_id_aca_group,8,&(lvalues[2652]),0},
1254{"id-aca-role","id-aca-role",NID_id_aca_role,8,&(lvalues[2660]),0},
1255{"id-qcs-pkixQCSyntax-v1","id-qcs-pkixQCSyntax-v1",
1256 NID_id_qcs_pkixQCSyntax_v1,8,&(lvalues[2668]),0},
1257{"id-cct-crs","id-cct-crs",NID_id_cct_crs,8,&(lvalues[2676]),0},
1258{"id-cct-PKIData","id-cct-PKIData",NID_id_cct_PKIData,8,
1259 &(lvalues[2684]),0},
1260{"id-cct-PKIResponse","id-cct-PKIResponse",NID_id_cct_PKIResponse,8,
1261 &(lvalues[2692]),0},
1262{"ad_timestamping","AD Time Stamping",NID_ad_timeStamping,8,
1263 &(lvalues[2700]),0},
1264{"AD_DVCS","ad dvcs",NID_ad_dvcs,8,&(lvalues[2708]),0},
1265{"basicOCSPResponse","Basic OCSP Response",NID_id_pkix_OCSP_basic,9,
1266 &(lvalues[2716]),0},
1267{"Nonce","OCSP Nonce",NID_id_pkix_OCSP_Nonce,9,&(lvalues[2725]),0},
1268{"CrlID","OCSP CRL ID",NID_id_pkix_OCSP_CrlID,9,&(lvalues[2734]),0},
1269{"acceptableResponses","Acceptable OCSP Responses",
1270 NID_id_pkix_OCSP_acceptableResponses,9,&(lvalues[2743]),0},
1271{"noCheck","OCSP No Check",NID_id_pkix_OCSP_noCheck,9,&(lvalues[2752]),0},
1272{"archiveCutoff","OCSP Archive Cutoff",NID_id_pkix_OCSP_archiveCutoff,
1273 9,&(lvalues[2761]),0},
1274{"serviceLocator","OCSP Service Locator",
1275 NID_id_pkix_OCSP_serviceLocator,9,&(lvalues[2770]),0},
1276{"extendedStatus","Extended OCSP Status",
1277 NID_id_pkix_OCSP_extendedStatus,9,&(lvalues[2779]),0},
1278{"valid","valid",NID_id_pkix_OCSP_valid,9,&(lvalues[2788]),0},
1279{"path","path",NID_id_pkix_OCSP_path,9,&(lvalues[2797]),0},
1280{"trustRoot","Trust Root",NID_id_pkix_OCSP_trustRoot,9,
1281 &(lvalues[2806]),0},
1282{"algorithm","algorithm",NID_algorithm,4,&(lvalues[2815]),0},
1283{"rsaSignature","rsaSignature",NID_rsaSignature,5,&(lvalues[2819]),0},
1284{"X500algorithms","directory services - algorithms",
1285 NID_X500algorithms,2,&(lvalues[2824]),0},
1286{"ORG","org",NID_org,1,&(lvalues[2826]),0},
1287{"DOD","dod",NID_dod,2,&(lvalues[2827]),0},
1288{"IANA","iana",NID_iana,3,&(lvalues[2829]),0},
1289{"directory","Directory",NID_Directory,4,&(lvalues[2832]),0},
1290{"mgmt","Management",NID_Management,4,&(lvalues[2836]),0},
1291{"experimental","Experimental",NID_Experimental,4,&(lvalues[2840]),0},
1292{"private","Private",NID_Private,4,&(lvalues[2844]),0},
1293{"security","Security",NID_Security,4,&(lvalues[2848]),0},
1294{"snmpv2","SNMPv2",NID_SNMPv2,4,&(lvalues[2852]),0},
1295{"Mail","Mail",NID_Mail,4,&(lvalues[2856]),0},
1296{"enterprises","Enterprises",NID_Enterprises,5,&(lvalues[2860]),0},
1297{"dcobject","dcObject",NID_dcObject,9,&(lvalues[2865]),0},
1298{"DC","domainComponent",NID_domainComponent,10,&(lvalues[2874]),0},
1299{"domain","Domain",NID_Domain,10,&(lvalues[2884]),0},
1300{"JOINT-ISO-CCITT","joint-iso-ccitt",NID_joint_iso_ccitt,1,
1301 &(lvalues[2894]),0},
1302{"selected-attribute-types","Selected Attribute Types",
1303 NID_selected_attribute_types,3,&(lvalues[2895]),0},
1304{"clearance","clearance",NID_clearance,4,&(lvalues[2898]),0},
1305{"RSA-MD4","md4WithRSAEncryption",NID_md4WithRSAEncryption,9,
1306 &(lvalues[2902]),0},
1307{"ac-proxying","ac-proxying",NID_ac_proxying,8,&(lvalues[2911]),0},
1308{"subjectInfoAccess","Subject Information Access",NID_sinfo_access,8,
1309 &(lvalues[2919]),0},
1310{"id-aca-encAttrs","id-aca-encAttrs",NID_id_aca_encAttrs,8,
1311 &(lvalues[2927]),0},
1312{"role","role",NID_role,3,&(lvalues[2935]),0},
1313{"policyConstraints","X509v3 Policy Constraints",
1314 NID_policy_constraints,3,&(lvalues[2938]),0},
1315{"targetInformation","X509v3 AC Targeting",NID_target_information,3,
1316 &(lvalues[2941]),0},
1317{"noRevAvail","X509v3 No Revocation Available",NID_no_rev_avail,3,
1318 &(lvalues[2944]),0},
1319{"CCITT","ccitt",NID_ccitt,1,&(lvalues[2947]),0},
1320{"ansi-X9-62","ANSI X9.62",NID_ansi_X9_62,5,&(lvalues[2948]),0},
1321{"prime-field","prime-field",NID_X9_62_prime_field,7,&(lvalues[2953]),0},
1322{"characteristic-two-field","characteristic-two-field",
1323 NID_X9_62_characteristic_two_field,7,&(lvalues[2960]),0},
1324{"id-ecPublicKey","id-ecPublicKey",NID_X9_62_id_ecPublicKey,7,
1325 &(lvalues[2967]),0},
1326{"prime192v1","prime192v1",NID_X9_62_prime192v1,8,&(lvalues[2974]),0},
1327{"prime192v2","prime192v2",NID_X9_62_prime192v2,8,&(lvalues[2982]),0},
1328{"prime192v3","prime192v3",NID_X9_62_prime192v3,8,&(lvalues[2990]),0},
1329{"prime239v1","prime239v1",NID_X9_62_prime239v1,8,&(lvalues[2998]),0},
1330{"prime239v2","prime239v2",NID_X9_62_prime239v2,8,&(lvalues[3006]),0},
1331{"prime239v3","prime239v3",NID_X9_62_prime239v3,8,&(lvalues[3014]),0},
1332{"prime256v1","prime256v1",NID_X9_62_prime256v1,8,&(lvalues[3022]),0},
1333{"ecdsa-with-SHA1","ecdsa-with-SHA1",NID_ecdsa_with_SHA1,7,
1334 &(lvalues[3030]),0},
1335{"CSPName","Microsoft CSP Name",NID_ms_csp_name,9,&(lvalues[3037]),0},
1336{"AES-128-ECB","aes-128-ecb",NID_aes_128_ecb,9,&(lvalues[3046]),0},
1337{"AES-128-CBC","aes-128-cbc",NID_aes_128_cbc,9,&(lvalues[3055]),0},
1338{"AES-128-OFB","aes-128-ofb",NID_aes_128_ofb128,9,&(lvalues[3064]),0},
1339{"AES-128-CFB","aes-128-cfb",NID_aes_128_cfb128,9,&(lvalues[3073]),0},
1340{"AES-192-ECB","aes-192-ecb",NID_aes_192_ecb,9,&(lvalues[3082]),0},
1341{"AES-192-CBC","aes-192-cbc",NID_aes_192_cbc,9,&(lvalues[3091]),0},
1342{"AES-192-OFB","aes-192-ofb",NID_aes_192_ofb128,9,&(lvalues[3100]),0},
1343{"AES-192-CFB","aes-192-cfb",NID_aes_192_cfb128,9,&(lvalues[3109]),0},
1344{"AES-256-ECB","aes-256-ecb",NID_aes_256_ecb,9,&(lvalues[3118]),0},
1345{"AES-256-CBC","aes-256-cbc",NID_aes_256_cbc,9,&(lvalues[3127]),0},
1346{"AES-256-OFB","aes-256-ofb",NID_aes_256_ofb128,9,&(lvalues[3136]),0},
1347{"AES-256-CFB","aes-256-cfb",NID_aes_256_cfb128,9,&(lvalues[3145]),0},
1348{"holdInstructionCode","Hold Instruction Code",
1349 NID_hold_instruction_code,3,&(lvalues[3154]),0},
1350{"holdInstructionNone","Hold Instruction None",
1351 NID_hold_instruction_none,7,&(lvalues[3157]),0},
1352{"holdInstructionCallIssuer","Hold Instruction Call Issuer",
1353 NID_hold_instruction_call_issuer,7,&(lvalues[3164]),0},
1354{"holdInstructionReject","Hold Instruction Reject",
1355 NID_hold_instruction_reject,7,&(lvalues[3171]),0},
1356{"data","data",NID_data,1,&(lvalues[3178]),0},
1357{"pss","pss",NID_pss,3,&(lvalues[3179]),0},
1358{"ucl","ucl",NID_ucl,7,&(lvalues[3182]),0},
1359{"pilot","pilot",NID_pilot,8,&(lvalues[3189]),0},
1360{"pilotAttributeType","pilotAttributeType",NID_pilotAttributeType,9,
1361 &(lvalues[3197]),0},
1362{"pilotAttributeSyntax","pilotAttributeSyntax",
1363 NID_pilotAttributeSyntax,9,&(lvalues[3206]),0},
1364{"pilotObjectClass","pilotObjectClass",NID_pilotObjectClass,9,
1365 &(lvalues[3215]),0},
1366{"pilotGroups","pilotGroups",NID_pilotGroups,9,&(lvalues[3224]),0},
1367{"iA5StringSyntax","iA5StringSyntax",NID_iA5StringSyntax,10,
1368 &(lvalues[3233]),0},
1369{"caseIgnoreIA5StringSyntax","caseIgnoreIA5StringSyntax",
1370 NID_caseIgnoreIA5StringSyntax,10,&(lvalues[3243]),0},
1371{"pilotObject","pilotObject",NID_pilotObject,10,&(lvalues[3253]),0},
1372{"pilotPerson","pilotPerson",NID_pilotPerson,10,&(lvalues[3263]),0},
1373{"account","account",NID_account,10,&(lvalues[3273]),0},
1374{"document","document",NID_document,10,&(lvalues[3283]),0},
1375{"room","room",NID_room,10,&(lvalues[3293]),0},
1376{"documentSeries","documentSeries",NID_documentSeries,10,
1377 &(lvalues[3303]),0},
1378{"rFC822localPart","rFC822localPart",NID_rFC822localPart,10,
1379 &(lvalues[3313]),0},
1380{"dNSDomain","dNSDomain",NID_dNSDomain,10,&(lvalues[3323]),0},
1381{"domainRelatedObject","domainRelatedObject",NID_domainRelatedObject,
1382 10,&(lvalues[3333]),0},
1383{"friendlyCountry","friendlyCountry",NID_friendlyCountry,10,
1384 &(lvalues[3343]),0},
1385{"simpleSecurityObject","simpleSecurityObject",
1386 NID_simpleSecurityObject,10,&(lvalues[3353]),0},
1387{"pilotOrganization","pilotOrganization",NID_pilotOrganization,10,
1388 &(lvalues[3363]),0},
1389{"pilotDSA","pilotDSA",NID_pilotDSA,10,&(lvalues[3373]),0},
1390{"qualityLabelledData","qualityLabelledData",NID_qualityLabelledData,
1391 10,&(lvalues[3383]),0},
1392{"UID","userId",NID_userId,10,&(lvalues[3393]),0},
1393{"textEncodedORAddress","textEncodedORAddress",
1394 NID_textEncodedORAddress,10,&(lvalues[3403]),0},
1395{"mail","rfc822Mailbox",NID_rfc822Mailbox,10,&(lvalues[3413]),0},
1396{"info","info",NID_info,10,&(lvalues[3423]),0},
1397{"favouriteDrink","favouriteDrink",NID_favouriteDrink,10,
1398 &(lvalues[3433]),0},
1399{"roomNumber","roomNumber",NID_roomNumber,10,&(lvalues[3443]),0},
1400{"photo","photo",NID_photo,10,&(lvalues[3453]),0},
1401{"userClass","userClass",NID_userClass,10,&(lvalues[3463]),0},
1402{"host","host",NID_host,10,&(lvalues[3473]),0},
1403{"manager","manager",NID_manager,10,&(lvalues[3483]),0},
1404{"documentIdentifier","documentIdentifier",NID_documentIdentifier,10,
1405 &(lvalues[3493]),0},
1406{"documentTitle","documentTitle",NID_documentTitle,10,&(lvalues[3503]),0},
1407{"documentVersion","documentVersion",NID_documentVersion,10,
1408 &(lvalues[3513]),0},
1409{"documentAuthor","documentAuthor",NID_documentAuthor,10,
1410 &(lvalues[3523]),0},
1411{"documentLocation","documentLocation",NID_documentLocation,10,
1412 &(lvalues[3533]),0},
1413{"homeTelephoneNumber","homeTelephoneNumber",NID_homeTelephoneNumber,
1414 10,&(lvalues[3543]),0},
1415{"secretary","secretary",NID_secretary,10,&(lvalues[3553]),0},
1416{"otherMailbox","otherMailbox",NID_otherMailbox,10,&(lvalues[3563]),0},
1417{"lastModifiedTime","lastModifiedTime",NID_lastModifiedTime,10,
1418 &(lvalues[3573]),0},
1419{"lastModifiedBy","lastModifiedBy",NID_lastModifiedBy,10,
1420 &(lvalues[3583]),0},
1421{"aRecord","aRecord",NID_aRecord,10,&(lvalues[3593]),0},
1422{"pilotAttributeType27","pilotAttributeType27",
1423 NID_pilotAttributeType27,10,&(lvalues[3603]),0},
1424{"mXRecord","mXRecord",NID_mXRecord,10,&(lvalues[3613]),0},
1425{"nSRecord","nSRecord",NID_nSRecord,10,&(lvalues[3623]),0},
1426{"sOARecord","sOARecord",NID_sOARecord,10,&(lvalues[3633]),0},
1427{"cNAMERecord","cNAMERecord",NID_cNAMERecord,10,&(lvalues[3643]),0},
1428{"associatedDomain","associatedDomain",NID_associatedDomain,10,
1429 &(lvalues[3653]),0},
1430{"associatedName","associatedName",NID_associatedName,10,
1431 &(lvalues[3663]),0},
1432{"homePostalAddress","homePostalAddress",NID_homePostalAddress,10,
1433 &(lvalues[3673]),0},
1434{"personalTitle","personalTitle",NID_personalTitle,10,&(lvalues[3683]),0},
1435{"mobileTelephoneNumber","mobileTelephoneNumber",
1436 NID_mobileTelephoneNumber,10,&(lvalues[3693]),0},
1437{"pagerTelephoneNumber","pagerTelephoneNumber",
1438 NID_pagerTelephoneNumber,10,&(lvalues[3703]),0},
1439{"friendlyCountryName","friendlyCountryName",NID_friendlyCountryName,
1440 10,&(lvalues[3713]),0},
1441{"organizationalStatus","organizationalStatus",
1442 NID_organizationalStatus,10,&(lvalues[3723]),0},
1443{"janetMailbox","janetMailbox",NID_janetMailbox,10,&(lvalues[3733]),0},
1444{"mailPreferenceOption","mailPreferenceOption",
1445 NID_mailPreferenceOption,10,&(lvalues[3743]),0},
1446{"buildingName","buildingName",NID_buildingName,10,&(lvalues[3753]),0},
1447{"dSAQuality","dSAQuality",NID_dSAQuality,10,&(lvalues[3763]),0},
1448{"singleLevelQuality","singleLevelQuality",NID_singleLevelQuality,10,
1449 &(lvalues[3773]),0},
1450{"subtreeMinimumQuality","subtreeMinimumQuality",
1451 NID_subtreeMinimumQuality,10,&(lvalues[3783]),0},
1452{"subtreeMaximumQuality","subtreeMaximumQuality",
1453 NID_subtreeMaximumQuality,10,&(lvalues[3793]),0},
1454{"personalSignature","personalSignature",NID_personalSignature,10,
1455 &(lvalues[3803]),0},
1456{"dITRedirect","dITRedirect",NID_dITRedirect,10,&(lvalues[3813]),0},
1457{"audio","audio",NID_audio,10,&(lvalues[3823]),0},
1458{"documentPublisher","documentPublisher",NID_documentPublisher,10,
1459 &(lvalues[3833]),0},
1460{"x500UniqueIdentifier","x500UniqueIdentifier",
1461 NID_x500UniqueIdentifier,3,&(lvalues[3843]),0},
1462{"mime-mhs","MIME MHS",NID_mime_mhs,5,&(lvalues[3846]),0},
1463{"mime-mhs-headings","mime-mhs-headings",NID_mime_mhs_headings,6,
1464 &(lvalues[3851]),0},
1465{"mime-mhs-bodies","mime-mhs-bodies",NID_mime_mhs_bodies,6,
1466 &(lvalues[3857]),0},
1467{"id-hex-partial-message","id-hex-partial-message",
1468 NID_id_hex_partial_message,7,&(lvalues[3863]),0},
1469{"id-hex-multipart-message","id-hex-multipart-message",
1470 NID_id_hex_multipart_message,7,&(lvalues[3870]),0},
1471{"generationQualifier","generationQualifier",NID_generationQualifier,
1472 3,&(lvalues[3877]),0},
1473{"pseudonym","pseudonym",NID_pseudonym,3,&(lvalues[3880]),0},
1474{NULL,NULL,NID_undef,0,NULL},
1475{"id-set","Secure Electronic Transactions",NID_id_set,2,
1476 &(lvalues[3883]),0},
1477{"set-ctype","content types",NID_set_ctype,3,&(lvalues[3885]),0},
1478{"set-msgExt","message extensions",NID_set_msgExt,3,&(lvalues[3888]),0},
1479{"set-attr","set-attr",NID_set_attr,3,&(lvalues[3891]),0},
1480{"set-policy","set-policy",NID_set_policy,3,&(lvalues[3894]),0},
1481{"set-certExt","certificate extensions",NID_set_certExt,3,
1482 &(lvalues[3897]),0},
1483{"set-brand","set-brand",NID_set_brand,3,&(lvalues[3900]),0},
1484{"setct-PANData","setct-PANData",NID_setct_PANData,4,&(lvalues[3903]),0},
1485{"setct-PANToken","setct-PANToken",NID_setct_PANToken,4,
1486 &(lvalues[3907]),0},
1487{"setct-PANOnly","setct-PANOnly",NID_setct_PANOnly,4,&(lvalues[3911]),0},
1488{"setct-OIData","setct-OIData",NID_setct_OIData,4,&(lvalues[3915]),0},
1489{"setct-PI","setct-PI",NID_setct_PI,4,&(lvalues[3919]),0},
1490{"setct-PIData","setct-PIData",NID_setct_PIData,4,&(lvalues[3923]),0},
1491{"setct-PIDataUnsigned","setct-PIDataUnsigned",
1492 NID_setct_PIDataUnsigned,4,&(lvalues[3927]),0},
1493{"setct-HODInput","setct-HODInput",NID_setct_HODInput,4,
1494 &(lvalues[3931]),0},
1495{"setct-AuthResBaggage","setct-AuthResBaggage",
1496 NID_setct_AuthResBaggage,4,&(lvalues[3935]),0},
1497{"setct-AuthRevReqBaggage","setct-AuthRevReqBaggage",
1498 NID_setct_AuthRevReqBaggage,4,&(lvalues[3939]),0},
1499{"setct-AuthRevResBaggage","setct-AuthRevResBaggage",
1500 NID_setct_AuthRevResBaggage,4,&(lvalues[3943]),0},
1501{"setct-CapTokenSeq","setct-CapTokenSeq",NID_setct_CapTokenSeq,4,
1502 &(lvalues[3947]),0},
1503{"setct-PInitResData","setct-PInitResData",NID_setct_PInitResData,4,
1504 &(lvalues[3951]),0},
1505{"setct-PI-TBS","setct-PI-TBS",NID_setct_PI_TBS,4,&(lvalues[3955]),0},
1506{"setct-PResData","setct-PResData",NID_setct_PResData,4,
1507 &(lvalues[3959]),0},
1508{"setct-AuthReqTBS","setct-AuthReqTBS",NID_setct_AuthReqTBS,4,
1509 &(lvalues[3963]),0},
1510{"setct-AuthResTBS","setct-AuthResTBS",NID_setct_AuthResTBS,4,
1511 &(lvalues[3967]),0},
1512{"setct-AuthResTBSX","setct-AuthResTBSX",NID_setct_AuthResTBSX,4,
1513 &(lvalues[3971]),0},
1514{"setct-AuthTokenTBS","setct-AuthTokenTBS",NID_setct_AuthTokenTBS,4,
1515 &(lvalues[3975]),0},
1516{"setct-CapTokenData","setct-CapTokenData",NID_setct_CapTokenData,4,
1517 &(lvalues[3979]),0},
1518{"setct-CapTokenTBS","setct-CapTokenTBS",NID_setct_CapTokenTBS,4,
1519 &(lvalues[3983]),0},
1520{"setct-AcqCardCodeMsg","setct-AcqCardCodeMsg",
1521 NID_setct_AcqCardCodeMsg,4,&(lvalues[3987]),0},
1522{"setct-AuthRevReqTBS","setct-AuthRevReqTBS",NID_setct_AuthRevReqTBS,
1523 4,&(lvalues[3991]),0},
1524{"setct-AuthRevResData","setct-AuthRevResData",
1525 NID_setct_AuthRevResData,4,&(lvalues[3995]),0},
1526{"setct-AuthRevResTBS","setct-AuthRevResTBS",NID_setct_AuthRevResTBS,
1527 4,&(lvalues[3999]),0},
1528{"setct-CapReqTBS","setct-CapReqTBS",NID_setct_CapReqTBS,4,
1529 &(lvalues[4003]),0},
1530{"setct-CapReqTBSX","setct-CapReqTBSX",NID_setct_CapReqTBSX,4,
1531 &(lvalues[4007]),0},
1532{"setct-CapResData","setct-CapResData",NID_setct_CapResData,4,
1533 &(lvalues[4011]),0},
1534{"setct-CapRevReqTBS","setct-CapRevReqTBS",NID_setct_CapRevReqTBS,4,
1535 &(lvalues[4015]),0},
1536{"setct-CapRevReqTBSX","setct-CapRevReqTBSX",NID_setct_CapRevReqTBSX,
1537 4,&(lvalues[4019]),0},
1538{"setct-CapRevResData","setct-CapRevResData",NID_setct_CapRevResData,
1539 4,&(lvalues[4023]),0},
1540{"setct-CredReqTBS","setct-CredReqTBS",NID_setct_CredReqTBS,4,
1541 &(lvalues[4027]),0},
1542{"setct-CredReqTBSX","setct-CredReqTBSX",NID_setct_CredReqTBSX,4,
1543 &(lvalues[4031]),0},
1544{"setct-CredResData","setct-CredResData",NID_setct_CredResData,4,
1545 &(lvalues[4035]),0},
1546{"setct-CredRevReqTBS","setct-CredRevReqTBS",NID_setct_CredRevReqTBS,
1547 4,&(lvalues[4039]),0},
1548{"setct-CredRevReqTBSX","setct-CredRevReqTBSX",
1549 NID_setct_CredRevReqTBSX,4,&(lvalues[4043]),0},
1550{"setct-CredRevResData","setct-CredRevResData",
1551 NID_setct_CredRevResData,4,&(lvalues[4047]),0},
1552{"setct-PCertReqData","setct-PCertReqData",NID_setct_PCertReqData,4,
1553 &(lvalues[4051]),0},
1554{"setct-PCertResTBS","setct-PCertResTBS",NID_setct_PCertResTBS,4,
1555 &(lvalues[4055]),0},
1556{"setct-BatchAdminReqData","setct-BatchAdminReqData",
1557 NID_setct_BatchAdminReqData,4,&(lvalues[4059]),0},
1558{"setct-BatchAdminResData","setct-BatchAdminResData",
1559 NID_setct_BatchAdminResData,4,&(lvalues[4063]),0},
1560{"setct-CardCInitResTBS","setct-CardCInitResTBS",
1561 NID_setct_CardCInitResTBS,4,&(lvalues[4067]),0},
1562{"setct-MeAqCInitResTBS","setct-MeAqCInitResTBS",
1563 NID_setct_MeAqCInitResTBS,4,&(lvalues[4071]),0},
1564{"setct-RegFormResTBS","setct-RegFormResTBS",NID_setct_RegFormResTBS,
1565 4,&(lvalues[4075]),0},
1566{"setct-CertReqData","setct-CertReqData",NID_setct_CertReqData,4,
1567 &(lvalues[4079]),0},
1568{"setct-CertReqTBS","setct-CertReqTBS",NID_setct_CertReqTBS,4,
1569 &(lvalues[4083]),0},
1570{"setct-CertResData","setct-CertResData",NID_setct_CertResData,4,
1571 &(lvalues[4087]),0},
1572{"setct-CertInqReqTBS","setct-CertInqReqTBS",NID_setct_CertInqReqTBS,
1573 4,&(lvalues[4091]),0},
1574{"setct-ErrorTBS","setct-ErrorTBS",NID_setct_ErrorTBS,4,
1575 &(lvalues[4095]),0},
1576{"setct-PIDualSignedTBE","setct-PIDualSignedTBE",
1577 NID_setct_PIDualSignedTBE,4,&(lvalues[4099]),0},
1578{"setct-PIUnsignedTBE","setct-PIUnsignedTBE",NID_setct_PIUnsignedTBE,
1579 4,&(lvalues[4103]),0},
1580{"setct-AuthReqTBE","setct-AuthReqTBE",NID_setct_AuthReqTBE,4,
1581 &(lvalues[4107]),0},
1582{"setct-AuthResTBE","setct-AuthResTBE",NID_setct_AuthResTBE,4,
1583 &(lvalues[4111]),0},
1584{"setct-AuthResTBEX","setct-AuthResTBEX",NID_setct_AuthResTBEX,4,
1585 &(lvalues[4115]),0},
1586{"setct-AuthTokenTBE","setct-AuthTokenTBE",NID_setct_AuthTokenTBE,4,
1587 &(lvalues[4119]),0},
1588{"setct-CapTokenTBE","setct-CapTokenTBE",NID_setct_CapTokenTBE,4,
1589 &(lvalues[4123]),0},
1590{"setct-CapTokenTBEX","setct-CapTokenTBEX",NID_setct_CapTokenTBEX,4,
1591 &(lvalues[4127]),0},
1592{"setct-AcqCardCodeMsgTBE","setct-AcqCardCodeMsgTBE",
1593 NID_setct_AcqCardCodeMsgTBE,4,&(lvalues[4131]),0},
1594{"setct-AuthRevReqTBE","setct-AuthRevReqTBE",NID_setct_AuthRevReqTBE,
1595 4,&(lvalues[4135]),0},
1596{"setct-AuthRevResTBE","setct-AuthRevResTBE",NID_setct_AuthRevResTBE,
1597 4,&(lvalues[4139]),0},
1598{"setct-AuthRevResTBEB","setct-AuthRevResTBEB",
1599 NID_setct_AuthRevResTBEB,4,&(lvalues[4143]),0},
1600{"setct-CapReqTBE","setct-CapReqTBE",NID_setct_CapReqTBE,4,
1601 &(lvalues[4147]),0},
1602{"setct-CapReqTBEX","setct-CapReqTBEX",NID_setct_CapReqTBEX,4,
1603 &(lvalues[4151]),0},
1604{"setct-CapResTBE","setct-CapResTBE",NID_setct_CapResTBE,4,
1605 &(lvalues[4155]),0},
1606{"setct-CapRevReqTBE","setct-CapRevReqTBE",NID_setct_CapRevReqTBE,4,
1607 &(lvalues[4159]),0},
1608{"setct-CapRevReqTBEX","setct-CapRevReqTBEX",NID_setct_CapRevReqTBEX,
1609 4,&(lvalues[4163]),0},
1610{"setct-CapRevResTBE","setct-CapRevResTBE",NID_setct_CapRevResTBE,4,
1611 &(lvalues[4167]),0},
1612{"setct-CredReqTBE","setct-CredReqTBE",NID_setct_CredReqTBE,4,
1613 &(lvalues[4171]),0},
1614{"setct-CredReqTBEX","setct-CredReqTBEX",NID_setct_CredReqTBEX,4,
1615 &(lvalues[4175]),0},
1616{"setct-CredResTBE","setct-CredResTBE",NID_setct_CredResTBE,4,
1617 &(lvalues[4179]),0},
1618{"setct-CredRevReqTBE","setct-CredRevReqTBE",NID_setct_CredRevReqTBE,
1619 4,&(lvalues[4183]),0},
1620{"setct-CredRevReqTBEX","setct-CredRevReqTBEX",
1621 NID_setct_CredRevReqTBEX,4,&(lvalues[4187]),0},
1622{"setct-CredRevResTBE","setct-CredRevResTBE",NID_setct_CredRevResTBE,
1623 4,&(lvalues[4191]),0},
1624{"setct-BatchAdminReqTBE","setct-BatchAdminReqTBE",
1625 NID_setct_BatchAdminReqTBE,4,&(lvalues[4195]),0},
1626{"setct-BatchAdminResTBE","setct-BatchAdminResTBE",
1627 NID_setct_BatchAdminResTBE,4,&(lvalues[4199]),0},
1628{"setct-RegFormReqTBE","setct-RegFormReqTBE",NID_setct_RegFormReqTBE,
1629 4,&(lvalues[4203]),0},
1630{"setct-CertReqTBE","setct-CertReqTBE",NID_setct_CertReqTBE,4,
1631 &(lvalues[4207]),0},
1632{"setct-CertReqTBEX","setct-CertReqTBEX",NID_setct_CertReqTBEX,4,
1633 &(lvalues[4211]),0},
1634{"setct-CertResTBE","setct-CertResTBE",NID_setct_CertResTBE,4,
1635 &(lvalues[4215]),0},
1636{"setct-CRLNotificationTBS","setct-CRLNotificationTBS",
1637 NID_setct_CRLNotificationTBS,4,&(lvalues[4219]),0},
1638{"setct-CRLNotificationResTBS","setct-CRLNotificationResTBS",
1639 NID_setct_CRLNotificationResTBS,4,&(lvalues[4223]),0},
1640{"setct-BCIDistributionTBS","setct-BCIDistributionTBS",
1641 NID_setct_BCIDistributionTBS,4,&(lvalues[4227]),0},
1642{"setext-genCrypt","generic cryptogram",NID_setext_genCrypt,4,
1643 &(lvalues[4231]),0},
1644{"setext-miAuth","merchant initiated auth",NID_setext_miAuth,4,
1645 &(lvalues[4235]),0},
1646{"setext-pinSecure","setext-pinSecure",NID_setext_pinSecure,4,
1647 &(lvalues[4239]),0},
1648{"setext-pinAny","setext-pinAny",NID_setext_pinAny,4,&(lvalues[4243]),0},
1649{"setext-track2","setext-track2",NID_setext_track2,4,&(lvalues[4247]),0},
1650{"setext-cv","additional verification",NID_setext_cv,4,
1651 &(lvalues[4251]),0},
1652{"set-policy-root","set-policy-root",NID_set_policy_root,4,
1653 &(lvalues[4255]),0},
1654{"setCext-hashedRoot","setCext-hashedRoot",NID_setCext_hashedRoot,4,
1655 &(lvalues[4259]),0},
1656{"setCext-certType","setCext-certType",NID_setCext_certType,4,
1657 &(lvalues[4263]),0},
1658{"setCext-merchData","setCext-merchData",NID_setCext_merchData,4,
1659 &(lvalues[4267]),0},
1660{"setCext-cCertRequired","setCext-cCertRequired",
1661 NID_setCext_cCertRequired,4,&(lvalues[4271]),0},
1662{"setCext-tunneling","setCext-tunneling",NID_setCext_tunneling,4,
1663 &(lvalues[4275]),0},
1664{"setCext-setExt","setCext-setExt",NID_setCext_setExt,4,
1665 &(lvalues[4279]),0},
1666{"setCext-setQualf","setCext-setQualf",NID_setCext_setQualf,4,
1667 &(lvalues[4283]),0},
1668{"setCext-PGWYcapabilities","setCext-PGWYcapabilities",
1669 NID_setCext_PGWYcapabilities,4,&(lvalues[4287]),0},
1670{"setCext-TokenIdentifier","setCext-TokenIdentifier",
1671 NID_setCext_TokenIdentifier,4,&(lvalues[4291]),0},
1672{"setCext-Track2Data","setCext-Track2Data",NID_setCext_Track2Data,4,
1673 &(lvalues[4295]),0},
1674{"setCext-TokenType","setCext-TokenType",NID_setCext_TokenType,4,
1675 &(lvalues[4299]),0},
1676{"setCext-IssuerCapabilities","setCext-IssuerCapabilities",
1677 NID_setCext_IssuerCapabilities,4,&(lvalues[4303]),0},
1678{"setAttr-Cert","setAttr-Cert",NID_setAttr_Cert,4,&(lvalues[4307]),0},
1679{"setAttr-PGWYcap","payment gateway capabilities",NID_setAttr_PGWYcap,
1680 4,&(lvalues[4311]),0},
1681{"setAttr-TokenType","setAttr-TokenType",NID_setAttr_TokenType,4,
1682 &(lvalues[4315]),0},
1683{"setAttr-IssCap","issuer capabilities",NID_setAttr_IssCap,4,
1684 &(lvalues[4319]),0},
1685{"set-rootKeyThumb","set-rootKeyThumb",NID_set_rootKeyThumb,5,
1686 &(lvalues[4323]),0},
1687{"set-addPolicy","set-addPolicy",NID_set_addPolicy,5,&(lvalues[4328]),0},
1688{"setAttr-Token-EMV","setAttr-Token-EMV",NID_setAttr_Token_EMV,5,
1689 &(lvalues[4333]),0},
1690{"setAttr-Token-B0Prime","setAttr-Token-B0Prime",
1691 NID_setAttr_Token_B0Prime,5,&(lvalues[4338]),0},
1692{"setAttr-IssCap-CVM","setAttr-IssCap-CVM",NID_setAttr_IssCap_CVM,5,
1693 &(lvalues[4343]),0},
1694{"setAttr-IssCap-T2","setAttr-IssCap-T2",NID_setAttr_IssCap_T2,5,
1695 &(lvalues[4348]),0},
1696{"setAttr-IssCap-Sig","setAttr-IssCap-Sig",NID_setAttr_IssCap_Sig,5,
1697 &(lvalues[4353]),0},
1698{"setAttr-GenCryptgrm","generate cryptogram",NID_setAttr_GenCryptgrm,
1699 6,&(lvalues[4358]),0},
1700{"setAttr-T2Enc","encrypted track 2",NID_setAttr_T2Enc,6,
1701 &(lvalues[4364]),0},
1702{"setAttr-T2cleartxt","cleartext track 2",NID_setAttr_T2cleartxt,6,
1703 &(lvalues[4370]),0},
1704{"setAttr-TokICCsig","ICC or token signature",NID_setAttr_TokICCsig,6,
1705 &(lvalues[4376]),0},
1706{"setAttr-SecDevSig","secure device signature",NID_setAttr_SecDevSig,
1707 6,&(lvalues[4382]),0},
1708{"set-brand-IATA-ATA","set-brand-IATA-ATA",NID_set_brand_IATA_ATA,4,
1709 &(lvalues[4388]),0},
1710{"set-brand-Diners","set-brand-Diners",NID_set_brand_Diners,4,
1711 &(lvalues[4392]),0},
1712{"set-brand-AmericanExpress","set-brand-AmericanExpress",
1713 NID_set_brand_AmericanExpress,4,&(lvalues[4396]),0},
1714{"set-brand-JCB","set-brand-JCB",NID_set_brand_JCB,4,&(lvalues[4400]),0},
1715{"set-brand-Visa","set-brand-Visa",NID_set_brand_Visa,4,
1716 &(lvalues[4404]),0},
1717{"set-brand-MasterCard","set-brand-MasterCard",
1718 NID_set_brand_MasterCard,4,&(lvalues[4408]),0},
1719{"set-brand-Novus","set-brand-Novus",NID_set_brand_Novus,5,
1720 &(lvalues[4412]),0},
1721{"DES-CDMF","des-cdmf",NID_des_cdmf,8,&(lvalues[4417]),0},
1722{"rsaOAEPEncryptionSET","rsaOAEPEncryptionSET",
1723 NID_rsaOAEPEncryptionSET,9,&(lvalues[4425]),0},
1724{NULL,NULL,NID_undef,0,NULL},
1725{NULL,NULL,NID_undef,0,NULL},
1726{NULL,NULL,NID_undef,0,NULL},
1727{"msSmartcardLogin","Microsoft Smartcardlogin",NID_ms_smartcard_login,
1728 10,&(lvalues[4434]),0},
1729{"msUPN","Microsoft Universal Principal Name",NID_ms_upn,10,
1730 &(lvalues[4444]),0},
1731};
1732
1733static ASN1_OBJECT *sn_objs[NUM_SN]={
1734&(nid_objs[364]),/* "AD_DVCS" */
1735&(nid_objs[419]),/* "AES-128-CBC" */
1736&(nid_objs[421]),/* "AES-128-CFB" */
1737&(nid_objs[418]),/* "AES-128-ECB" */
1738&(nid_objs[420]),/* "AES-128-OFB" */
1739&(nid_objs[423]),/* "AES-192-CBC" */
1740&(nid_objs[425]),/* "AES-192-CFB" */
1741&(nid_objs[422]),/* "AES-192-ECB" */
1742&(nid_objs[424]),/* "AES-192-OFB" */
1743&(nid_objs[427]),/* "AES-256-CBC" */
1744&(nid_objs[429]),/* "AES-256-CFB" */
1745&(nid_objs[426]),/* "AES-256-ECB" */
1746&(nid_objs[428]),/* "AES-256-OFB" */
1747&(nid_objs[91]),/* "BF-CBC" */
1748&(nid_objs[93]),/* "BF-CFB" */
1749&(nid_objs[92]),/* "BF-ECB" */
1750&(nid_objs[94]),/* "BF-OFB" */
1751&(nid_objs[14]),/* "C" */
1752&(nid_objs[108]),/* "CAST5-CBC" */
1753&(nid_objs[110]),/* "CAST5-CFB" */
1754&(nid_objs[109]),/* "CAST5-ECB" */
1755&(nid_objs[111]),/* "CAST5-OFB" */
1756&(nid_objs[404]),/* "CCITT" */
1757&(nid_objs[13]),/* "CN" */
1758&(nid_objs[141]),/* "CRLReason" */
1759&(nid_objs[417]),/* "CSPName" */
1760&(nid_objs[367]),/* "CrlID" */
1761&(nid_objs[391]),/* "DC" */
1762&(nid_objs[31]),/* "DES-CBC" */
1763&(nid_objs[643]),/* "DES-CDMF" */
1764&(nid_objs[30]),/* "DES-CFB" */
1765&(nid_objs[29]),/* "DES-ECB" */
1766&(nid_objs[32]),/* "DES-EDE" */
1767&(nid_objs[43]),/* "DES-EDE-CBC" */
1768&(nid_objs[60]),/* "DES-EDE-CFB" */
1769&(nid_objs[62]),/* "DES-EDE-OFB" */
1770&(nid_objs[33]),/* "DES-EDE3" */
1771&(nid_objs[44]),/* "DES-EDE3-CBC" */
1772&(nid_objs[61]),/* "DES-EDE3-CFB" */
1773&(nid_objs[63]),/* "DES-EDE3-OFB" */
1774&(nid_objs[45]),/* "DES-OFB" */
1775&(nid_objs[80]),/* "DESX-CBC" */
1776&(nid_objs[380]),/* "DOD" */
1777&(nid_objs[116]),/* "DSA" */
1778&(nid_objs[66]),/* "DSA-SHA" */
1779&(nid_objs[113]),/* "DSA-SHA1" */
1780&(nid_objs[70]),/* "DSA-SHA1-old" */
1781&(nid_objs[67]),/* "DSA-old" */
1782&(nid_objs[297]),/* "DVCS" */
1783&(nid_objs[99]),/* "GN" */
1784&(nid_objs[381]),/* "IANA" */
1785&(nid_objs[34]),/* "IDEA-CBC" */
1786&(nid_objs[35]),/* "IDEA-CFB" */
1787&(nid_objs[36]),/* "IDEA-ECB" */
1788&(nid_objs[46]),/* "IDEA-OFB" */
1789&(nid_objs[181]),/* "ISO" */
1790&(nid_objs[183]),/* "ISO-US" */
1791&(nid_objs[393]),/* "JOINT-ISO-CCITT" */
1792&(nid_objs[15]),/* "L" */
1793&(nid_objs[ 3]),/* "MD2" */
1794&(nid_objs[257]),/* "MD4" */
1795&(nid_objs[ 4]),/* "MD5" */
1796&(nid_objs[114]),/* "MD5-SHA1" */
1797&(nid_objs[95]),/* "MDC2" */
1798&(nid_objs[388]),/* "Mail" */
1799&(nid_objs[57]),/* "Netscape" */
1800&(nid_objs[366]),/* "Nonce" */
1801&(nid_objs[17]),/* "O" */
1802&(nid_objs[178]),/* "OCSP" */
1803&(nid_objs[180]),/* "OCSPSigning" */
1804&(nid_objs[379]),/* "ORG" */
1805&(nid_objs[18]),/* "OU" */
1806&(nid_objs[ 9]),/* "PBE-MD2-DES" */
1807&(nid_objs[168]),/* "PBE-MD2-RC2-64" */
1808&(nid_objs[10]),/* "PBE-MD5-DES" */
1809&(nid_objs[169]),/* "PBE-MD5-RC2-64" */
1810&(nid_objs[147]),/* "PBE-SHA1-2DES" */
1811&(nid_objs[146]),/* "PBE-SHA1-3DES" */
1812&(nid_objs[170]),/* "PBE-SHA1-DES" */
1813&(nid_objs[148]),/* "PBE-SHA1-RC2-128" */
1814&(nid_objs[149]),/* "PBE-SHA1-RC2-40" */
1815&(nid_objs[68]),/* "PBE-SHA1-RC2-64" */
1816&(nid_objs[144]),/* "PBE-SHA1-RC4-128" */
1817&(nid_objs[145]),/* "PBE-SHA1-RC4-40" */
1818&(nid_objs[161]),/* "PBES2" */
1819&(nid_objs[69]),/* "PBKDF2" */
1820&(nid_objs[162]),/* "PBMAC1" */
1821&(nid_objs[127]),/* "PKIX" */
1822&(nid_objs[98]),/* "RC2-40-CBC" */
1823&(nid_objs[166]),/* "RC2-64-CBC" */
1824&(nid_objs[37]),/* "RC2-CBC" */
1825&(nid_objs[39]),/* "RC2-CFB" */
1826&(nid_objs[38]),/* "RC2-ECB" */
1827&(nid_objs[40]),/* "RC2-OFB" */
1828&(nid_objs[ 5]),/* "RC4" */
1829&(nid_objs[97]),/* "RC4-40" */
1830&(nid_objs[120]),/* "RC5-CBC" */
1831&(nid_objs[122]),/* "RC5-CFB" */
1832&(nid_objs[121]),/* "RC5-ECB" */
1833&(nid_objs[123]),/* "RC5-OFB" */
1834&(nid_objs[117]),/* "RIPEMD160" */
1835&(nid_objs[124]),/* "RLE" */
1836&(nid_objs[19]),/* "RSA" */
1837&(nid_objs[ 7]),/* "RSA-MD2" */
1838&(nid_objs[396]),/* "RSA-MD4" */
1839&(nid_objs[ 8]),/* "RSA-MD5" */
1840&(nid_objs[96]),/* "RSA-MDC2" */
1841&(nid_objs[104]),/* "RSA-NP-MD5" */
1842&(nid_objs[119]),/* "RSA-RIPEMD160" */
1843&(nid_objs[42]),/* "RSA-SHA" */
1844&(nid_objs[65]),/* "RSA-SHA1" */
1845&(nid_objs[115]),/* "RSA-SHA1-2" */
1846&(nid_objs[41]),/* "SHA" */
1847&(nid_objs[64]),/* "SHA1" */
1848&(nid_objs[188]),/* "SMIME" */
1849&(nid_objs[167]),/* "SMIME-CAPS" */
1850&(nid_objs[100]),/* "SN" */
1851&(nid_objs[16]),/* "ST" */
1852&(nid_objs[143]),/* "SXNetID" */
1853&(nid_objs[458]),/* "UID" */
1854&(nid_objs[ 0]),/* "UNDEF" */
1855&(nid_objs[11]),/* "X500" */
1856&(nid_objs[378]),/* "X500algorithms" */
1857&(nid_objs[12]),/* "X509" */
1858&(nid_objs[184]),/* "X9-57" */
1859&(nid_objs[185]),/* "X9cm" */
1860&(nid_objs[125]),/* "ZLIB" */
1861&(nid_objs[478]),/* "aRecord" */
1862&(nid_objs[289]),/* "aaControls" */
1863&(nid_objs[287]),/* "ac-auditEntity" */
1864&(nid_objs[397]),/* "ac-proxying" */
1865&(nid_objs[288]),/* "ac-targeting" */
1866&(nid_objs[368]),/* "acceptableResponses" */
1867&(nid_objs[446]),/* "account" */
1868&(nid_objs[363]),/* "ad_timestamping" */
1869&(nid_objs[376]),/* "algorithm" */
1870&(nid_objs[405]),/* "ansi-X9-62" */
1871&(nid_objs[370]),/* "archiveCutoff" */
1872&(nid_objs[484]),/* "associatedDomain" */
1873&(nid_objs[485]),/* "associatedName" */
1874&(nid_objs[501]),/* "audio" */
1875&(nid_objs[177]),/* "authorityInfoAccess" */
1876&(nid_objs[90]),/* "authorityKeyIdentifier" */
1877&(nid_objs[87]),/* "basicConstraints" */
1878&(nid_objs[365]),/* "basicOCSPResponse" */
1879&(nid_objs[285]),/* "biometricInfo" */
1880&(nid_objs[494]),/* "buildingName" */
1881&(nid_objs[483]),/* "cNAMERecord" */
1882&(nid_objs[179]),/* "caIssuers" */
1883&(nid_objs[443]),/* "caseIgnoreIA5StringSyntax" */
1884&(nid_objs[152]),/* "certBag" */
1885&(nid_objs[89]),/* "certificatePolicies" */
1886&(nid_objs[54]),/* "challengePassword" */
1887&(nid_objs[407]),/* "characteristic-two-field" */
1888&(nid_objs[395]),/* "clearance" */
1889&(nid_objs[130]),/* "clientAuth" */
1890&(nid_objs[131]),/* "codeSigning" */
1891&(nid_objs[50]),/* "contentType" */
1892&(nid_objs[53]),/* "countersignature" */
1893&(nid_objs[153]),/* "crlBag" */
1894&(nid_objs[103]),/* "crlDistributionPoints" */
1895&(nid_objs[88]),/* "crlNumber" */
1896&(nid_objs[500]),/* "dITRedirect" */
1897&(nid_objs[451]),/* "dNSDomain" */
1898&(nid_objs[495]),/* "dSAQuality" */
1899&(nid_objs[434]),/* "data" */
1900&(nid_objs[390]),/* "dcobject" */
1901&(nid_objs[140]),/* "deltaCRL" */
1902&(nid_objs[107]),/* "description" */
1903&(nid_objs[28]),/* "dhKeyAgreement" */
1904&(nid_objs[382]),/* "directory" */
1905&(nid_objs[174]),/* "dnQualifier" */
1906&(nid_objs[447]),/* "document" */
1907&(nid_objs[471]),/* "documentAuthor" */
1908&(nid_objs[468]),/* "documentIdentifier" */
1909&(nid_objs[472]),/* "documentLocation" */
1910&(nid_objs[502]),/* "documentPublisher" */
1911&(nid_objs[449]),/* "documentSeries" */
1912&(nid_objs[469]),/* "documentTitle" */
1913&(nid_objs[470]),/* "documentVersion" */
1914&(nid_objs[392]),/* "domain" */
1915&(nid_objs[452]),/* "domainRelatedObject" */
1916&(nid_objs[416]),/* "ecdsa-with-SHA1" */
1917&(nid_objs[48]),/* "emailAddress" */
1918&(nid_objs[132]),/* "emailProtection" */
1919&(nid_objs[389]),/* "enterprises" */
1920&(nid_objs[384]),/* "experimental" */
1921&(nid_objs[172]),/* "extReq" */
1922&(nid_objs[56]),/* "extendedCertificateAttributes" */
1923&(nid_objs[126]),/* "extendedKeyUsage" */
1924&(nid_objs[372]),/* "extendedStatus" */
1925&(nid_objs[462]),/* "favouriteDrink" */
1926&(nid_objs[453]),/* "friendlyCountry" */
1927&(nid_objs[490]),/* "friendlyCountryName" */
1928&(nid_objs[156]),/* "friendlyName" */
1929&(nid_objs[509]),/* "generationQualifier" */
1930&(nid_objs[163]),/* "hmacWithSHA1" */
1931&(nid_objs[432]),/* "holdInstructionCallIssuer" */
1932&(nid_objs[430]),/* "holdInstructionCode" */
1933&(nid_objs[431]),/* "holdInstructionNone" */
1934&(nid_objs[433]),/* "holdInstructionReject" */
1935&(nid_objs[486]),/* "homePostalAddress" */
1936&(nid_objs[473]),/* "homeTelephoneNumber" */
1937&(nid_objs[466]),/* "host" */
1938&(nid_objs[442]),/* "iA5StringSyntax" */
1939&(nid_objs[266]),/* "id-aca" */
1940&(nid_objs[355]),/* "id-aca-accessIdentity" */
1941&(nid_objs[354]),/* "id-aca-authenticationInfo" */
1942&(nid_objs[356]),/* "id-aca-chargingIdentity" */
1943&(nid_objs[399]),/* "id-aca-encAttrs" */
1944&(nid_objs[357]),/* "id-aca-group" */
1945&(nid_objs[358]),/* "id-aca-role" */
1946&(nid_objs[176]),/* "id-ad" */
1947&(nid_objs[262]),/* "id-alg" */
1948&(nid_objs[323]),/* "id-alg-des40" */
1949&(nid_objs[326]),/* "id-alg-dh-pop" */
1950&(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */
1951&(nid_objs[324]),/* "id-alg-noSignature" */
1952&(nid_objs[268]),/* "id-cct" */
1953&(nid_objs[361]),/* "id-cct-PKIData" */
1954&(nid_objs[362]),/* "id-cct-PKIResponse" */
1955&(nid_objs[360]),/* "id-cct-crs" */
1956&(nid_objs[81]),/* "id-ce" */
1957&(nid_objs[263]),/* "id-cmc" */
1958&(nid_objs[334]),/* "id-cmc-addExtensions" */
1959&(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */
1960&(nid_objs[330]),/* "id-cmc-dataReturn" */
1961&(nid_objs[336]),/* "id-cmc-decryptedPOP" */
1962&(nid_objs[335]),/* "id-cmc-encryptedPOP" */
1963&(nid_objs[339]),/* "id-cmc-getCRL" */
1964&(nid_objs[338]),/* "id-cmc-getCert" */
1965&(nid_objs[328]),/* "id-cmc-identification" */
1966&(nid_objs[329]),/* "id-cmc-identityProof" */
1967&(nid_objs[337]),/* "id-cmc-lraPOPWitness" */
1968&(nid_objs[344]),/* "id-cmc-popLinkRandom" */
1969&(nid_objs[345]),/* "id-cmc-popLinkWitness" */
1970&(nid_objs[343]),/* "id-cmc-queryPending" */
1971&(nid_objs[333]),/* "id-cmc-recipientNonce" */
1972&(nid_objs[341]),/* "id-cmc-regInfo" */
1973&(nid_objs[342]),/* "id-cmc-responseInfo" */
1974&(nid_objs[340]),/* "id-cmc-revokeRequest" */
1975&(nid_objs[332]),/* "id-cmc-senderNonce" */
1976&(nid_objs[327]),/* "id-cmc-statusInfo" */
1977&(nid_objs[331]),/* "id-cmc-transactionId" */
1978&(nid_objs[408]),/* "id-ecPublicKey" */
1979&(nid_objs[508]),/* "id-hex-multipart-message" */
1980&(nid_objs[507]),/* "id-hex-partial-message" */
1981&(nid_objs[260]),/* "id-it" */
1982&(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */
1983&(nid_objs[298]),/* "id-it-caProtEncCert" */
1984&(nid_objs[311]),/* "id-it-confirmWaitTime" */
1985&(nid_objs[303]),/* "id-it-currentCRL" */
1986&(nid_objs[300]),/* "id-it-encKeyPairTypes" */
1987&(nid_objs[310]),/* "id-it-implicitConfirm" */
1988&(nid_objs[308]),/* "id-it-keyPairParamRep" */
1989&(nid_objs[307]),/* "id-it-keyPairParamReq" */
1990&(nid_objs[312]),/* "id-it-origPKIMessage" */
1991&(nid_objs[301]),/* "id-it-preferredSymmAlg" */
1992&(nid_objs[309]),/* "id-it-revPassphrase" */
1993&(nid_objs[299]),/* "id-it-signKeyPairTypes" */
1994&(nid_objs[305]),/* "id-it-subscriptionRequest" */
1995&(nid_objs[306]),/* "id-it-subscriptionResponse" */
1996&(nid_objs[304]),/* "id-it-unsupportedOIDs" */
1997&(nid_objs[128]),/* "id-kp" */
1998&(nid_objs[280]),/* "id-mod-attribute-cert" */
1999&(nid_objs[274]),/* "id-mod-cmc" */
2000&(nid_objs[277]),/* "id-mod-cmp" */
2001&(nid_objs[284]),/* "id-mod-cmp2000" */
2002&(nid_objs[273]),/* "id-mod-crmf" */
2003&(nid_objs[283]),/* "id-mod-dvcs" */
2004&(nid_objs[275]),/* "id-mod-kea-profile-88" */
2005&(nid_objs[276]),/* "id-mod-kea-profile-93" */
2006&(nid_objs[282]),/* "id-mod-ocsp" */
2007&(nid_objs[278]),/* "id-mod-qualified-cert-88" */
2008&(nid_objs[279]),/* "id-mod-qualified-cert-93" */
2009&(nid_objs[281]),/* "id-mod-timestamp-protocol" */
2010&(nid_objs[264]),/* "id-on" */
2011&(nid_objs[347]),/* "id-on-personalData" */
2012&(nid_objs[265]),/* "id-pda" */
2013&(nid_objs[352]),/* "id-pda-countryOfCitizenship" */
2014&(nid_objs[353]),/* "id-pda-countryOfResidence" */
2015&(nid_objs[348]),/* "id-pda-dateOfBirth" */
2016&(nid_objs[351]),/* "id-pda-gender" */
2017&(nid_objs[349]),/* "id-pda-placeOfBirth" */
2018&(nid_objs[175]),/* "id-pe" */
2019&(nid_objs[261]),/* "id-pkip" */
2020&(nid_objs[258]),/* "id-pkix-mod" */
2021&(nid_objs[269]),/* "id-pkix1-explicit-88" */
2022&(nid_objs[271]),/* "id-pkix1-explicit-93" */
2023&(nid_objs[270]),/* "id-pkix1-implicit-88" */
2024&(nid_objs[272]),/* "id-pkix1-implicit-93" */
2025&(nid_objs[267]),/* "id-qcs" */
2026&(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */
2027&(nid_objs[259]),/* "id-qt" */
2028&(nid_objs[164]),/* "id-qt-cps" */
2029&(nid_objs[165]),/* "id-qt-unotice" */
2030&(nid_objs[313]),/* "id-regCtrl" */
2031&(nid_objs[316]),/* "id-regCtrl-authenticator" */
2032&(nid_objs[319]),/* "id-regCtrl-oldCertID" */
2033&(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */
2034&(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */
2035&(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */
2036&(nid_objs[315]),/* "id-regCtrl-regToken" */
2037&(nid_objs[314]),/* "id-regInfo" */
2038&(nid_objs[322]),/* "id-regInfo-certReq" */
2039&(nid_objs[321]),/* "id-regInfo-utf8Pairs" */
2040&(nid_objs[512]),/* "id-set" */
2041&(nid_objs[191]),/* "id-smime-aa" */
2042&(nid_objs[215]),/* "id-smime-aa-contentHint" */
2043&(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */
2044&(nid_objs[221]),/* "id-smime-aa-contentReference" */
2045&(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */
2046&(nid_objs[217]),/* "id-smime-aa-encapContentType" */
2047&(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */
2048&(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */
2049&(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */
2050&(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */
2051&(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */
2052&(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */
2053&(nid_objs[234]),/* "id-smime-aa-ets-certValues" */
2054&(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */
2055&(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */
2056&(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */
2057&(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */
2058&(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */
2059&(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */
2060&(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */
2061&(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */
2062&(nid_objs[219]),/* "id-smime-aa-macValue" */
2063&(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */
2064&(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */
2065&(nid_objs[212]),/* "id-smime-aa-receiptRequest" */
2066&(nid_objs[213]),/* "id-smime-aa-securityLabel" */
2067&(nid_objs[239]),/* "id-smime-aa-signatureType" */
2068&(nid_objs[223]),/* "id-smime-aa-signingCertificate" */
2069&(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */
2070&(nid_objs[225]),/* "id-smime-aa-timeStampToken" */
2071&(nid_objs[192]),/* "id-smime-alg" */
2072&(nid_objs[243]),/* "id-smime-alg-3DESwrap" */
2073&(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */
2074&(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */
2075&(nid_objs[245]),/* "id-smime-alg-ESDH" */
2076&(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */
2077&(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */
2078&(nid_objs[244]),/* "id-smime-alg-RC2wrap" */
2079&(nid_objs[193]),/* "id-smime-cd" */
2080&(nid_objs[248]),/* "id-smime-cd-ldap" */
2081&(nid_objs[190]),/* "id-smime-ct" */
2082&(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */
2083&(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */
2084&(nid_objs[208]),/* "id-smime-ct-TDTInfo" */
2085&(nid_objs[207]),/* "id-smime-ct-TSTInfo" */
2086&(nid_objs[205]),/* "id-smime-ct-authData" */
2087&(nid_objs[209]),/* "id-smime-ct-contentInfo" */
2088&(nid_objs[206]),/* "id-smime-ct-publishCert" */
2089&(nid_objs[204]),/* "id-smime-ct-receipt" */
2090&(nid_objs[195]),/* "id-smime-cti" */
2091&(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */
2092&(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */
2093&(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */
2094&(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */
2095&(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */
2096&(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */
2097&(nid_objs[189]),/* "id-smime-mod" */
2098&(nid_objs[196]),/* "id-smime-mod-cms" */
2099&(nid_objs[197]),/* "id-smime-mod-ess" */
2100&(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */
2101&(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */
2102&(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */
2103&(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */
2104&(nid_objs[199]),/* "id-smime-mod-msg-v3" */
2105&(nid_objs[198]),/* "id-smime-mod-oid" */
2106&(nid_objs[194]),/* "id-smime-spq" */
2107&(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */
2108&(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */
2109&(nid_objs[461]),/* "info" */
2110&(nid_objs[101]),/* "initials" */
2111&(nid_objs[142]),/* "invalidityDate" */
2112&(nid_objs[294]),/* "ipsecEndSystem" */
2113&(nid_objs[295]),/* "ipsecTunnel" */
2114&(nid_objs[296]),/* "ipsecUser" */
2115&(nid_objs[86]),/* "issuerAltName" */
2116&(nid_objs[492]),/* "janetMailbox" */
2117&(nid_objs[150]),/* "keyBag" */
2118&(nid_objs[83]),/* "keyUsage" */
2119&(nid_objs[477]),/* "lastModifiedBy" */
2120&(nid_objs[476]),/* "lastModifiedTime" */
2121&(nid_objs[157]),/* "localKeyID" */
2122&(nid_objs[480]),/* "mXRecord" */
2123&(nid_objs[460]),/* "mail" */
2124&(nid_objs[493]),/* "mailPreferenceOption" */
2125&(nid_objs[467]),/* "manager" */
2126&(nid_objs[182]),/* "member-body" */
2127&(nid_objs[51]),/* "messageDigest" */
2128&(nid_objs[383]),/* "mgmt" */
2129&(nid_objs[504]),/* "mime-mhs" */
2130&(nid_objs[506]),/* "mime-mhs-bodies" */
2131&(nid_objs[505]),/* "mime-mhs-headings" */
2132&(nid_objs[488]),/* "mobileTelephoneNumber" */
2133&(nid_objs[136]),/* "msCTLSign" */
2134&(nid_objs[135]),/* "msCodeCom" */
2135&(nid_objs[134]),/* "msCodeInd" */
2136&(nid_objs[138]),/* "msEFS" */
2137&(nid_objs[171]),/* "msExtReq" */
2138&(nid_objs[137]),/* "msSGC" */
2139&(nid_objs[648]),/* "msSmartcardLogin" */
2140&(nid_objs[649]),/* "msUPN" */
2141&(nid_objs[481]),/* "nSRecord" */
2142&(nid_objs[173]),/* "name" */
2143&(nid_objs[369]),/* "noCheck" */
2144&(nid_objs[403]),/* "noRevAvail" */
2145&(nid_objs[72]),/* "nsBaseUrl" */
2146&(nid_objs[76]),/* "nsCaPolicyUrl" */
2147&(nid_objs[74]),/* "nsCaRevocationUrl" */
2148&(nid_objs[58]),/* "nsCertExt" */
2149&(nid_objs[79]),/* "nsCertSequence" */
2150&(nid_objs[71]),/* "nsCertType" */
2151&(nid_objs[78]),/* "nsComment" */
2152&(nid_objs[59]),/* "nsDataType" */
2153&(nid_objs[75]),/* "nsRenewalUrl" */
2154&(nid_objs[73]),/* "nsRevocationUrl" */
2155&(nid_objs[139]),/* "nsSGC" */
2156&(nid_objs[77]),/* "nsSslServerName" */
2157&(nid_objs[491]),/* "organizationalStatus" */
2158&(nid_objs[475]),/* "otherMailbox" */
2159&(nid_objs[489]),/* "pagerTelephoneNumber" */
2160&(nid_objs[374]),/* "path" */
2161&(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */
2162&(nid_objs[499]),/* "personalSignature" */
2163&(nid_objs[487]),/* "personalTitle" */
2164&(nid_objs[464]),/* "photo" */
2165&(nid_objs[437]),/* "pilot" */
2166&(nid_objs[439]),/* "pilotAttributeSyntax" */
2167&(nid_objs[438]),/* "pilotAttributeType" */
2168&(nid_objs[479]),/* "pilotAttributeType27" */
2169&(nid_objs[456]),/* "pilotDSA" */
2170&(nid_objs[441]),/* "pilotGroups" */
2171&(nid_objs[444]),/* "pilotObject" */
2172&(nid_objs[440]),/* "pilotObjectClass" */
2173&(nid_objs[455]),/* "pilotOrganization" */
2174&(nid_objs[445]),/* "pilotPerson" */
2175&(nid_objs[ 2]),/* "pkcs" */
2176&(nid_objs[186]),/* "pkcs1" */
2177&(nid_objs[27]),/* "pkcs3" */
2178&(nid_objs[187]),/* "pkcs5" */
2179&(nid_objs[20]),/* "pkcs7" */
2180&(nid_objs[21]),/* "pkcs7-data" */
2181&(nid_objs[25]),/* "pkcs7-digestData" */
2182&(nid_objs[26]),/* "pkcs7-encryptedData" */
2183&(nid_objs[23]),/* "pkcs7-envelopedData" */
2184&(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */
2185&(nid_objs[22]),/* "pkcs7-signedData" */
2186&(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */
2187&(nid_objs[47]),/* "pkcs9" */
2188&(nid_objs[401]),/* "policyConstraints" */
2189&(nid_objs[406]),/* "prime-field" */
2190&(nid_objs[409]),/* "prime192v1" */
2191&(nid_objs[410]),/* "prime192v2" */
2192&(nid_objs[411]),/* "prime192v3" */
2193&(nid_objs[412]),/* "prime239v1" */
2194&(nid_objs[413]),/* "prime239v2" */
2195&(nid_objs[414]),/* "prime239v3" */
2196&(nid_objs[415]),/* "prime256v1" */
2197&(nid_objs[385]),/* "private" */
2198&(nid_objs[84]),/* "privateKeyUsagePeriod" */
2199&(nid_objs[510]),/* "pseudonym" */
2200&(nid_objs[435]),/* "pss" */
2201&(nid_objs[286]),/* "qcStatements" */
2202&(nid_objs[457]),/* "qualityLabelledData" */
2203&(nid_objs[450]),/* "rFC822localPart" */
2204&(nid_objs[400]),/* "role" */
2205&(nid_objs[448]),/* "room" */
2206&(nid_objs[463]),/* "roomNumber" */
2207&(nid_objs[ 6]),/* "rsaEncryption" */
2208&(nid_objs[644]),/* "rsaOAEPEncryptionSET" */
2209&(nid_objs[377]),/* "rsaSignature" */
2210&(nid_objs[ 1]),/* "rsadsi" */
2211&(nid_objs[482]),/* "sOARecord" */
2212&(nid_objs[155]),/* "safeContentsBag" */
2213&(nid_objs[291]),/* "sbqp-autonomousSysNum" */
2214&(nid_objs[290]),/* "sbqp-ipAddrBlock" */
2215&(nid_objs[292]),/* "sbqp-routerIdentifier" */
2216&(nid_objs[159]),/* "sdsiCertificate" */
2217&(nid_objs[154]),/* "secretBag" */
2218&(nid_objs[474]),/* "secretary" */
2219&(nid_objs[386]),/* "security" */
2220&(nid_objs[394]),/* "selected-attribute-types" */
2221&(nid_objs[105]),/* "serialNumber" */
2222&(nid_objs[129]),/* "serverAuth" */
2223&(nid_objs[371]),/* "serviceLocator" */
2224&(nid_objs[625]),/* "set-addPolicy" */
2225&(nid_objs[515]),/* "set-attr" */
2226&(nid_objs[518]),/* "set-brand" */
2227&(nid_objs[638]),/* "set-brand-AmericanExpress" */
2228&(nid_objs[637]),/* "set-brand-Diners" */
2229&(nid_objs[636]),/* "set-brand-IATA-ATA" */
2230&(nid_objs[639]),/* "set-brand-JCB" */
2231&(nid_objs[641]),/* "set-brand-MasterCard" */
2232&(nid_objs[642]),/* "set-brand-Novus" */
2233&(nid_objs[640]),/* "set-brand-Visa" */
2234&(nid_objs[517]),/* "set-certExt" */
2235&(nid_objs[513]),/* "set-ctype" */
2236&(nid_objs[514]),/* "set-msgExt" */
2237&(nid_objs[516]),/* "set-policy" */
2238&(nid_objs[607]),/* "set-policy-root" */
2239&(nid_objs[624]),/* "set-rootKeyThumb" */
2240&(nid_objs[620]),/* "setAttr-Cert" */
2241&(nid_objs[631]),/* "setAttr-GenCryptgrm" */
2242&(nid_objs[623]),/* "setAttr-IssCap" */
2243&(nid_objs[628]),/* "setAttr-IssCap-CVM" */
2244&(nid_objs[630]),/* "setAttr-IssCap-Sig" */
2245&(nid_objs[629]),/* "setAttr-IssCap-T2" */
2246&(nid_objs[621]),/* "setAttr-PGWYcap" */
2247&(nid_objs[635]),/* "setAttr-SecDevSig" */
2248&(nid_objs[632]),/* "setAttr-T2Enc" */
2249&(nid_objs[633]),/* "setAttr-T2cleartxt" */
2250&(nid_objs[634]),/* "setAttr-TokICCsig" */
2251&(nid_objs[627]),/* "setAttr-Token-B0Prime" */
2252&(nid_objs[626]),/* "setAttr-Token-EMV" */
2253&(nid_objs[622]),/* "setAttr-TokenType" */
2254&(nid_objs[619]),/* "setCext-IssuerCapabilities" */
2255&(nid_objs[615]),/* "setCext-PGWYcapabilities" */
2256&(nid_objs[616]),/* "setCext-TokenIdentifier" */
2257&(nid_objs[618]),/* "setCext-TokenType" */
2258&(nid_objs[617]),/* "setCext-Track2Data" */
2259&(nid_objs[611]),/* "setCext-cCertRequired" */
2260&(nid_objs[609]),/* "setCext-certType" */
2261&(nid_objs[608]),/* "setCext-hashedRoot" */
2262&(nid_objs[610]),/* "setCext-merchData" */
2263&(nid_objs[613]),/* "setCext-setExt" */
2264&(nid_objs[614]),/* "setCext-setQualf" */
2265&(nid_objs[612]),/* "setCext-tunneling" */
2266&(nid_objs[540]),/* "setct-AcqCardCodeMsg" */
2267&(nid_objs[576]),/* "setct-AcqCardCodeMsgTBE" */
2268&(nid_objs[570]),/* "setct-AuthReqTBE" */
2269&(nid_objs[534]),/* "setct-AuthReqTBS" */
2270&(nid_objs[527]),/* "setct-AuthResBaggage" */
2271&(nid_objs[571]),/* "setct-AuthResTBE" */
2272&(nid_objs[572]),/* "setct-AuthResTBEX" */
2273&(nid_objs[535]),/* "setct-AuthResTBS" */
2274&(nid_objs[536]),/* "setct-AuthResTBSX" */
2275&(nid_objs[528]),/* "setct-AuthRevReqBaggage" */
2276&(nid_objs[577]),/* "setct-AuthRevReqTBE" */
2277&(nid_objs[541]),/* "setct-AuthRevReqTBS" */
2278&(nid_objs[529]),/* "setct-AuthRevResBaggage" */
2279&(nid_objs[542]),/* "setct-AuthRevResData" */
2280&(nid_objs[578]),/* "setct-AuthRevResTBE" */
2281&(nid_objs[579]),/* "setct-AuthRevResTBEB" */
2282&(nid_objs[543]),/* "setct-AuthRevResTBS" */
2283&(nid_objs[573]),/* "setct-AuthTokenTBE" */
2284&(nid_objs[537]),/* "setct-AuthTokenTBS" */
2285&(nid_objs[600]),/* "setct-BCIDistributionTBS" */
2286&(nid_objs[558]),/* "setct-BatchAdminReqData" */
2287&(nid_objs[592]),/* "setct-BatchAdminReqTBE" */
2288&(nid_objs[559]),/* "setct-BatchAdminResData" */
2289&(nid_objs[593]),/* "setct-BatchAdminResTBE" */
2290&(nid_objs[599]),/* "setct-CRLNotificationResTBS" */
2291&(nid_objs[598]),/* "setct-CRLNotificationTBS" */
2292&(nid_objs[580]),/* "setct-CapReqTBE" */
2293&(nid_objs[581]),/* "setct-CapReqTBEX" */
2294&(nid_objs[544]),/* "setct-CapReqTBS" */
2295&(nid_objs[545]),/* "setct-CapReqTBSX" */
2296&(nid_objs[546]),/* "setct-CapResData" */
2297&(nid_objs[582]),/* "setct-CapResTBE" */
2298&(nid_objs[583]),/* "setct-CapRevReqTBE" */
2299&(nid_objs[584]),/* "setct-CapRevReqTBEX" */
2300&(nid_objs[547]),/* "setct-CapRevReqTBS" */
2301&(nid_objs[548]),/* "setct-CapRevReqTBSX" */
2302&(nid_objs[549]),/* "setct-CapRevResData" */
2303&(nid_objs[585]),/* "setct-CapRevResTBE" */
2304&(nid_objs[538]),/* "setct-CapTokenData" */
2305&(nid_objs[530]),/* "setct-CapTokenSeq" */
2306&(nid_objs[574]),/* "setct-CapTokenTBE" */
2307&(nid_objs[575]),/* "setct-CapTokenTBEX" */
2308&(nid_objs[539]),/* "setct-CapTokenTBS" */
2309&(nid_objs[560]),/* "setct-CardCInitResTBS" */
2310&(nid_objs[566]),/* "setct-CertInqReqTBS" */
2311&(nid_objs[563]),/* "setct-CertReqData" */
2312&(nid_objs[595]),/* "setct-CertReqTBE" */
2313&(nid_objs[596]),/* "setct-CertReqTBEX" */
2314&(nid_objs[564]),/* "setct-CertReqTBS" */
2315&(nid_objs[565]),/* "setct-CertResData" */
2316&(nid_objs[597]),/* "setct-CertResTBE" */
2317&(nid_objs[586]),/* "setct-CredReqTBE" */
2318&(nid_objs[587]),/* "setct-CredReqTBEX" */
2319&(nid_objs[550]),/* "setct-CredReqTBS" */
2320&(nid_objs[551]),/* "setct-CredReqTBSX" */
2321&(nid_objs[552]),/* "setct-CredResData" */
2322&(nid_objs[588]),/* "setct-CredResTBE" */
2323&(nid_objs[589]),/* "setct-CredRevReqTBE" */
2324&(nid_objs[590]),/* "setct-CredRevReqTBEX" */
2325&(nid_objs[553]),/* "setct-CredRevReqTBS" */
2326&(nid_objs[554]),/* "setct-CredRevReqTBSX" */
2327&(nid_objs[555]),/* "setct-CredRevResData" */
2328&(nid_objs[591]),/* "setct-CredRevResTBE" */
2329&(nid_objs[567]),/* "setct-ErrorTBS" */
2330&(nid_objs[526]),/* "setct-HODInput" */
2331&(nid_objs[561]),/* "setct-MeAqCInitResTBS" */
2332&(nid_objs[522]),/* "setct-OIData" */
2333&(nid_objs[519]),/* "setct-PANData" */
2334&(nid_objs[521]),/* "setct-PANOnly" */
2335&(nid_objs[520]),/* "setct-PANToken" */
2336&(nid_objs[556]),/* "setct-PCertReqData" */
2337&(nid_objs[557]),/* "setct-PCertResTBS" */
2338&(nid_objs[523]),/* "setct-PI" */
2339&(nid_objs[532]),/* "setct-PI-TBS" */
2340&(nid_objs[524]),/* "setct-PIData" */
2341&(nid_objs[525]),/* "setct-PIDataUnsigned" */
2342&(nid_objs[568]),/* "setct-PIDualSignedTBE" */
2343&(nid_objs[569]),/* "setct-PIUnsignedTBE" */
2344&(nid_objs[531]),/* "setct-PInitResData" */
2345&(nid_objs[533]),/* "setct-PResData" */
2346&(nid_objs[594]),/* "setct-RegFormReqTBE" */
2347&(nid_objs[562]),/* "setct-RegFormResTBS" */
2348&(nid_objs[606]),/* "setext-cv" */
2349&(nid_objs[601]),/* "setext-genCrypt" */
2350&(nid_objs[602]),/* "setext-miAuth" */
2351&(nid_objs[604]),/* "setext-pinAny" */
2352&(nid_objs[603]),/* "setext-pinSecure" */
2353&(nid_objs[605]),/* "setext-track2" */
2354&(nid_objs[52]),/* "signingTime" */
2355&(nid_objs[454]),/* "simpleSecurityObject" */
2356&(nid_objs[496]),/* "singleLevelQuality" */
2357&(nid_objs[387]),/* "snmpv2" */
2358&(nid_objs[85]),/* "subjectAltName" */
2359&(nid_objs[398]),/* "subjectInfoAccess" */
2360&(nid_objs[82]),/* "subjectKeyIdentifier" */
2361&(nid_objs[498]),/* "subtreeMaximumQuality" */
2362&(nid_objs[497]),/* "subtreeMinimumQuality" */
2363&(nid_objs[402]),/* "targetInformation" */
2364&(nid_objs[459]),/* "textEncodedORAddress" */
2365&(nid_objs[293]),/* "textNotice" */
2366&(nid_objs[133]),/* "timeStamping" */
2367&(nid_objs[106]),/* "title" */
2368&(nid_objs[375]),/* "trustRoot" */
2369&(nid_objs[436]),/* "ucl" */
2370&(nid_objs[55]),/* "unstructuredAddress" */
2371&(nid_objs[49]),/* "unstructuredName" */
2372&(nid_objs[465]),/* "userClass" */
2373&(nid_objs[373]),/* "valid" */
2374&(nid_objs[503]),/* "x500UniqueIdentifier" */
2375&(nid_objs[158]),/* "x509Certificate" */
2376&(nid_objs[160]),/* "x509Crl" */
2377};
2378
2379static ASN1_OBJECT *ln_objs[NUM_LN]={
2380&(nid_objs[363]),/* "AD Time Stamping" */
2381&(nid_objs[405]),/* "ANSI X9.62" */
2382&(nid_objs[368]),/* "Acceptable OCSP Responses" */
2383&(nid_objs[177]),/* "Authority Information Access" */
2384&(nid_objs[365]),/* "Basic OCSP Response" */
2385&(nid_objs[285]),/* "Biometric Info" */
2386&(nid_objs[179]),/* "CA Issuers" */
2387&(nid_objs[131]),/* "Code Signing" */
2388&(nid_objs[382]),/* "Directory" */
2389&(nid_objs[392]),/* "Domain" */
2390&(nid_objs[132]),/* "E-mail Protection" */
2391&(nid_objs[389]),/* "Enterprises" */
2392&(nid_objs[384]),/* "Experimental" */
2393&(nid_objs[372]),/* "Extended OCSP Status" */
2394&(nid_objs[172]),/* "Extension Request" */
2395&(nid_objs[432]),/* "Hold Instruction Call Issuer" */
2396&(nid_objs[430]),/* "Hold Instruction Code" */
2397&(nid_objs[431]),/* "Hold Instruction None" */
2398&(nid_objs[433]),/* "Hold Instruction Reject" */
2399&(nid_objs[634]),/* "ICC or token signature" */
2400&(nid_objs[294]),/* "IPSec End System" */
2401&(nid_objs[295]),/* "IPSec Tunnel" */
2402&(nid_objs[296]),/* "IPSec User" */
2403&(nid_objs[182]),/* "ISO Member Body" */
2404&(nid_objs[183]),/* "ISO US Member Body" */
2405&(nid_objs[142]),/* "Invalidity Date" */
2406&(nid_objs[504]),/* "MIME MHS" */
2407&(nid_objs[388]),/* "Mail" */
2408&(nid_objs[383]),/* "Management" */
2409&(nid_objs[417]),/* "Microsoft CSP Name" */
2410&(nid_objs[135]),/* "Microsoft Commercial Code Signing" */
2411&(nid_objs[138]),/* "Microsoft Encrypted File System" */
2412&(nid_objs[171]),/* "Microsoft Extension Request" */
2413&(nid_objs[134]),/* "Microsoft Individual Code Signing" */
2414&(nid_objs[137]),/* "Microsoft Server Gated Crypto" */
2415&(nid_objs[648]),/* "Microsoft Smartcardlogin" */
2416&(nid_objs[136]),/* "Microsoft Trust List Signing" */
2417&(nid_objs[649]),/* "Microsoft Universal Principal Name" */
2418&(nid_objs[72]),/* "Netscape Base Url" */
2419&(nid_objs[76]),/* "Netscape CA Policy Url" */
2420&(nid_objs[74]),/* "Netscape CA Revocation Url" */
2421&(nid_objs[71]),/* "Netscape Cert Type" */
2422&(nid_objs[58]),/* "Netscape Certificate Extension" */
2423&(nid_objs[79]),/* "Netscape Certificate Sequence" */
2424&(nid_objs[78]),/* "Netscape Comment" */
2425&(nid_objs[57]),/* "Netscape Communications Corp." */
2426&(nid_objs[59]),/* "Netscape Data Type" */
2427&(nid_objs[75]),/* "Netscape Renewal Url" */
2428&(nid_objs[73]),/* "Netscape Revocation Url" */
2429&(nid_objs[77]),/* "Netscape SSL Server Name" */
2430&(nid_objs[139]),/* "Netscape Server Gated Crypto" */
2431&(nid_objs[178]),/* "OCSP" */
2432&(nid_objs[370]),/* "OCSP Archive Cutoff" */
2433&(nid_objs[367]),/* "OCSP CRL ID" */
2434&(nid_objs[369]),/* "OCSP No Check" */
2435&(nid_objs[366]),/* "OCSP Nonce" */
2436&(nid_objs[371]),/* "OCSP Service Locator" */
2437&(nid_objs[180]),/* "OCSP Signing" */
2438&(nid_objs[161]),/* "PBES2" */
2439&(nid_objs[69]),/* "PBKDF2" */
2440&(nid_objs[162]),/* "PBMAC1" */
2441&(nid_objs[127]),/* "PKIX" */
2442&(nid_objs[164]),/* "Policy Qualifier CPS" */
2443&(nid_objs[165]),/* "Policy Qualifier User Notice" */
2444&(nid_objs[385]),/* "Private" */
2445&(nid_objs[ 1]),/* "RSA Data Security, Inc." */
2446&(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */
2447&(nid_objs[188]),/* "S/MIME" */
2448&(nid_objs[167]),/* "S/MIME Capabilities" */
2449&(nid_objs[387]),/* "SNMPv2" */
2450&(nid_objs[512]),/* "Secure Electronic Transactions" */
2451&(nid_objs[386]),/* "Security" */
2452&(nid_objs[394]),/* "Selected Attribute Types" */
2453&(nid_objs[143]),/* "Strong Extranet ID" */
2454&(nid_objs[398]),/* "Subject Information Access" */
2455&(nid_objs[130]),/* "TLS Web Client Authentication" */
2456&(nid_objs[129]),/* "TLS Web Server Authentication" */
2457&(nid_objs[133]),/* "Time Stamping" */
2458&(nid_objs[375]),/* "Trust Root" */
2459&(nid_objs[12]),/* "X509" */
2460&(nid_objs[402]),/* "X509v3 AC Targeting" */
2461&(nid_objs[90]),/* "X509v3 Authority Key Identifier" */
2462&(nid_objs[87]),/* "X509v3 Basic Constraints" */
2463&(nid_objs[103]),/* "X509v3 CRL Distribution Points" */
2464&(nid_objs[88]),/* "X509v3 CRL Number" */
2465&(nid_objs[141]),/* "X509v3 CRL Reason Code" */
2466&(nid_objs[89]),/* "X509v3 Certificate Policies" */
2467&(nid_objs[140]),/* "X509v3 Delta CRL Indicator" */
2468&(nid_objs[126]),/* "X509v3 Extended Key Usage" */
2469&(nid_objs[86]),/* "X509v3 Issuer Alternative Name" */
2470&(nid_objs[83]),/* "X509v3 Key Usage" */
2471&(nid_objs[403]),/* "X509v3 No Revocation Available" */
2472&(nid_objs[401]),/* "X509v3 Policy Constraints" */
2473&(nid_objs[84]),/* "X509v3 Private Key Usage Period" */
2474&(nid_objs[85]),/* "X509v3 Subject Alternative Name" */
2475&(nid_objs[82]),/* "X509v3 Subject Key Identifier" */
2476&(nid_objs[184]),/* "X9.57" */
2477&(nid_objs[185]),/* "X9.57 CM ?" */
2478&(nid_objs[478]),/* "aRecord" */
2479&(nid_objs[289]),/* "aaControls" */
2480&(nid_objs[287]),/* "ac-auditEntity" */
2481&(nid_objs[397]),/* "ac-proxying" */
2482&(nid_objs[288]),/* "ac-targeting" */
2483&(nid_objs[446]),/* "account" */
2484&(nid_objs[364]),/* "ad dvcs" */
2485&(nid_objs[606]),/* "additional verification" */
2486&(nid_objs[419]),/* "aes-128-cbc" */
2487&(nid_objs[421]),/* "aes-128-cfb" */
2488&(nid_objs[418]),/* "aes-128-ecb" */
2489&(nid_objs[420]),/* "aes-128-ofb" */
2490&(nid_objs[423]),/* "aes-192-cbc" */
2491&(nid_objs[425]),/* "aes-192-cfb" */
2492&(nid_objs[422]),/* "aes-192-ecb" */
2493&(nid_objs[424]),/* "aes-192-ofb" */
2494&(nid_objs[427]),/* "aes-256-cbc" */
2495&(nid_objs[429]),/* "aes-256-cfb" */
2496&(nid_objs[426]),/* "aes-256-ecb" */
2497&(nid_objs[428]),/* "aes-256-ofb" */
2498&(nid_objs[376]),/* "algorithm" */
2499&(nid_objs[484]),/* "associatedDomain" */
2500&(nid_objs[485]),/* "associatedName" */
2501&(nid_objs[501]),/* "audio" */
2502&(nid_objs[91]),/* "bf-cbc" */
2503&(nid_objs[93]),/* "bf-cfb" */
2504&(nid_objs[92]),/* "bf-ecb" */
2505&(nid_objs[94]),/* "bf-ofb" */
2506&(nid_objs[494]),/* "buildingName" */
2507&(nid_objs[483]),/* "cNAMERecord" */
2508&(nid_objs[443]),/* "caseIgnoreIA5StringSyntax" */
2509&(nid_objs[108]),/* "cast5-cbc" */
2510&(nid_objs[110]),/* "cast5-cfb" */
2511&(nid_objs[109]),/* "cast5-ecb" */
2512&(nid_objs[111]),/* "cast5-ofb" */
2513&(nid_objs[404]),/* "ccitt" */
2514&(nid_objs[152]),/* "certBag" */
2515&(nid_objs[517]),/* "certificate extensions" */
2516&(nid_objs[54]),/* "challengePassword" */
2517&(nid_objs[407]),/* "characteristic-two-field" */
2518&(nid_objs[395]),/* "clearance" */
2519&(nid_objs[633]),/* "cleartext track 2" */
2520&(nid_objs[13]),/* "commonName" */
2521&(nid_objs[513]),/* "content types" */
2522&(nid_objs[50]),/* "contentType" */
2523&(nid_objs[53]),/* "countersignature" */
2524&(nid_objs[14]),/* "countryName" */
2525&(nid_objs[153]),/* "crlBag" */
2526&(nid_objs[500]),/* "dITRedirect" */
2527&(nid_objs[451]),/* "dNSDomain" */
2528&(nid_objs[495]),/* "dSAQuality" */
2529&(nid_objs[434]),/* "data" */
2530&(nid_objs[390]),/* "dcObject" */
2531&(nid_objs[31]),/* "des-cbc" */
2532&(nid_objs[643]),/* "des-cdmf" */
2533&(nid_objs[30]),/* "des-cfb" */
2534&(nid_objs[29]),/* "des-ecb" */
2535&(nid_objs[32]),/* "des-ede" */
2536&(nid_objs[43]),/* "des-ede-cbc" */
2537&(nid_objs[60]),/* "des-ede-cfb" */
2538&(nid_objs[62]),/* "des-ede-ofb" */
2539&(nid_objs[33]),/* "des-ede3" */
2540&(nid_objs[44]),/* "des-ede3-cbc" */
2541&(nid_objs[61]),/* "des-ede3-cfb" */
2542&(nid_objs[63]),/* "des-ede3-ofb" */
2543&(nid_objs[45]),/* "des-ofb" */
2544&(nid_objs[107]),/* "description" */
2545&(nid_objs[80]),/* "desx-cbc" */
2546&(nid_objs[28]),/* "dhKeyAgreement" */
2547&(nid_objs[11]),/* "directory services (X.500)" */
2548&(nid_objs[378]),/* "directory services - algorithms" */
2549&(nid_objs[174]),/* "dnQualifier" */
2550&(nid_objs[447]),/* "document" */
2551&(nid_objs[471]),/* "documentAuthor" */
2552&(nid_objs[468]),/* "documentIdentifier" */
2553&(nid_objs[472]),/* "documentLocation" */
2554&(nid_objs[502]),/* "documentPublisher" */
2555&(nid_objs[449]),/* "documentSeries" */
2556&(nid_objs[469]),/* "documentTitle" */
2557&(nid_objs[470]),/* "documentVersion" */
2558&(nid_objs[380]),/* "dod" */
2559&(nid_objs[391]),/* "domainComponent" */
2560&(nid_objs[452]),/* "domainRelatedObject" */
2561&(nid_objs[116]),/* "dsaEncryption" */
2562&(nid_objs[67]),/* "dsaEncryption-old" */
2563&(nid_objs[66]),/* "dsaWithSHA" */
2564&(nid_objs[113]),/* "dsaWithSHA1" */
2565&(nid_objs[70]),/* "dsaWithSHA1-old" */
2566&(nid_objs[297]),/* "dvcs" */
2567&(nid_objs[416]),/* "ecdsa-with-SHA1" */
2568&(nid_objs[48]),/* "emailAddress" */
2569&(nid_objs[632]),/* "encrypted track 2" */
2570&(nid_objs[56]),/* "extendedCertificateAttributes" */
2571&(nid_objs[462]),/* "favouriteDrink" */
2572&(nid_objs[453]),/* "friendlyCountry" */
2573&(nid_objs[490]),/* "friendlyCountryName" */
2574&(nid_objs[156]),/* "friendlyName" */
2575&(nid_objs[631]),/* "generate cryptogram" */
2576&(nid_objs[509]),/* "generationQualifier" */
2577&(nid_objs[601]),/* "generic cryptogram" */
2578&(nid_objs[99]),/* "givenName" */
2579&(nid_objs[163]),/* "hmacWithSHA1" */
2580&(nid_objs[486]),/* "homePostalAddress" */
2581&(nid_objs[473]),/* "homeTelephoneNumber" */
2582&(nid_objs[466]),/* "host" */
2583&(nid_objs[442]),/* "iA5StringSyntax" */
2584&(nid_objs[381]),/* "iana" */
2585&(nid_objs[266]),/* "id-aca" */
2586&(nid_objs[355]),/* "id-aca-accessIdentity" */
2587&(nid_objs[354]),/* "id-aca-authenticationInfo" */
2588&(nid_objs[356]),/* "id-aca-chargingIdentity" */
2589&(nid_objs[399]),/* "id-aca-encAttrs" */
2590&(nid_objs[357]),/* "id-aca-group" */
2591&(nid_objs[358]),/* "id-aca-role" */
2592&(nid_objs[176]),/* "id-ad" */
2593&(nid_objs[262]),/* "id-alg" */
2594&(nid_objs[323]),/* "id-alg-des40" */
2595&(nid_objs[326]),/* "id-alg-dh-pop" */
2596&(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */
2597&(nid_objs[324]),/* "id-alg-noSignature" */
2598&(nid_objs[268]),/* "id-cct" */
2599&(nid_objs[361]),/* "id-cct-PKIData" */
2600&(nid_objs[362]),/* "id-cct-PKIResponse" */
2601&(nid_objs[360]),/* "id-cct-crs" */
2602&(nid_objs[81]),/* "id-ce" */
2603&(nid_objs[263]),/* "id-cmc" */
2604&(nid_objs[334]),/* "id-cmc-addExtensions" */
2605&(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */
2606&(nid_objs[330]),/* "id-cmc-dataReturn" */
2607&(nid_objs[336]),/* "id-cmc-decryptedPOP" */
2608&(nid_objs[335]),/* "id-cmc-encryptedPOP" */
2609&(nid_objs[339]),/* "id-cmc-getCRL" */
2610&(nid_objs[338]),/* "id-cmc-getCert" */
2611&(nid_objs[328]),/* "id-cmc-identification" */
2612&(nid_objs[329]),/* "id-cmc-identityProof" */
2613&(nid_objs[337]),/* "id-cmc-lraPOPWitness" */
2614&(nid_objs[344]),/* "id-cmc-popLinkRandom" */
2615&(nid_objs[345]),/* "id-cmc-popLinkWitness" */
2616&(nid_objs[343]),/* "id-cmc-queryPending" */
2617&(nid_objs[333]),/* "id-cmc-recipientNonce" */
2618&(nid_objs[341]),/* "id-cmc-regInfo" */
2619&(nid_objs[342]),/* "id-cmc-responseInfo" */
2620&(nid_objs[340]),/* "id-cmc-revokeRequest" */
2621&(nid_objs[332]),/* "id-cmc-senderNonce" */
2622&(nid_objs[327]),/* "id-cmc-statusInfo" */
2623&(nid_objs[331]),/* "id-cmc-transactionId" */
2624&(nid_objs[408]),/* "id-ecPublicKey" */
2625&(nid_objs[508]),/* "id-hex-multipart-message" */
2626&(nid_objs[507]),/* "id-hex-partial-message" */
2627&(nid_objs[260]),/* "id-it" */
2628&(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */
2629&(nid_objs[298]),/* "id-it-caProtEncCert" */
2630&(nid_objs[311]),/* "id-it-confirmWaitTime" */
2631&(nid_objs[303]),/* "id-it-currentCRL" */
2632&(nid_objs[300]),/* "id-it-encKeyPairTypes" */
2633&(nid_objs[310]),/* "id-it-implicitConfirm" */
2634&(nid_objs[308]),/* "id-it-keyPairParamRep" */
2635&(nid_objs[307]),/* "id-it-keyPairParamReq" */
2636&(nid_objs[312]),/* "id-it-origPKIMessage" */
2637&(nid_objs[301]),/* "id-it-preferredSymmAlg" */
2638&(nid_objs[309]),/* "id-it-revPassphrase" */
2639&(nid_objs[299]),/* "id-it-signKeyPairTypes" */
2640&(nid_objs[305]),/* "id-it-subscriptionRequest" */
2641&(nid_objs[306]),/* "id-it-subscriptionResponse" */
2642&(nid_objs[304]),/* "id-it-unsupportedOIDs" */
2643&(nid_objs[128]),/* "id-kp" */
2644&(nid_objs[280]),/* "id-mod-attribute-cert" */
2645&(nid_objs[274]),/* "id-mod-cmc" */
2646&(nid_objs[277]),/* "id-mod-cmp" */
2647&(nid_objs[284]),/* "id-mod-cmp2000" */
2648&(nid_objs[273]),/* "id-mod-crmf" */
2649&(nid_objs[283]),/* "id-mod-dvcs" */
2650&(nid_objs[275]),/* "id-mod-kea-profile-88" */
2651&(nid_objs[276]),/* "id-mod-kea-profile-93" */
2652&(nid_objs[282]),/* "id-mod-ocsp" */
2653&(nid_objs[278]),/* "id-mod-qualified-cert-88" */
2654&(nid_objs[279]),/* "id-mod-qualified-cert-93" */
2655&(nid_objs[281]),/* "id-mod-timestamp-protocol" */
2656&(nid_objs[264]),/* "id-on" */
2657&(nid_objs[347]),/* "id-on-personalData" */
2658&(nid_objs[265]),/* "id-pda" */
2659&(nid_objs[352]),/* "id-pda-countryOfCitizenship" */
2660&(nid_objs[353]),/* "id-pda-countryOfResidence" */
2661&(nid_objs[348]),/* "id-pda-dateOfBirth" */
2662&(nid_objs[351]),/* "id-pda-gender" */
2663&(nid_objs[349]),/* "id-pda-placeOfBirth" */
2664&(nid_objs[175]),/* "id-pe" */
2665&(nid_objs[261]),/* "id-pkip" */
2666&(nid_objs[258]),/* "id-pkix-mod" */
2667&(nid_objs[269]),/* "id-pkix1-explicit-88" */
2668&(nid_objs[271]),/* "id-pkix1-explicit-93" */
2669&(nid_objs[270]),/* "id-pkix1-implicit-88" */
2670&(nid_objs[272]),/* "id-pkix1-implicit-93" */
2671&(nid_objs[267]),/* "id-qcs" */
2672&(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */
2673&(nid_objs[259]),/* "id-qt" */
2674&(nid_objs[313]),/* "id-regCtrl" */
2675&(nid_objs[316]),/* "id-regCtrl-authenticator" */
2676&(nid_objs[319]),/* "id-regCtrl-oldCertID" */
2677&(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */
2678&(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */
2679&(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */
2680&(nid_objs[315]),/* "id-regCtrl-regToken" */
2681&(nid_objs[314]),/* "id-regInfo" */
2682&(nid_objs[322]),/* "id-regInfo-certReq" */
2683&(nid_objs[321]),/* "id-regInfo-utf8Pairs" */
2684&(nid_objs[191]),/* "id-smime-aa" */
2685&(nid_objs[215]),/* "id-smime-aa-contentHint" */
2686&(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */
2687&(nid_objs[221]),/* "id-smime-aa-contentReference" */
2688&(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */
2689&(nid_objs[217]),/* "id-smime-aa-encapContentType" */
2690&(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */
2691&(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */
2692&(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */
2693&(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */
2694&(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */
2695&(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */
2696&(nid_objs[234]),/* "id-smime-aa-ets-certValues" */
2697&(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */
2698&(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */
2699&(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */
2700&(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */
2701&(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */
2702&(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */
2703&(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */
2704&(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */
2705&(nid_objs[219]),/* "id-smime-aa-macValue" */
2706&(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */
2707&(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */
2708&(nid_objs[212]),/* "id-smime-aa-receiptRequest" */
2709&(nid_objs[213]),/* "id-smime-aa-securityLabel" */
2710&(nid_objs[239]),/* "id-smime-aa-signatureType" */
2711&(nid_objs[223]),/* "id-smime-aa-signingCertificate" */
2712&(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */
2713&(nid_objs[225]),/* "id-smime-aa-timeStampToken" */
2714&(nid_objs[192]),/* "id-smime-alg" */
2715&(nid_objs[243]),/* "id-smime-alg-3DESwrap" */
2716&(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */
2717&(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */
2718&(nid_objs[245]),/* "id-smime-alg-ESDH" */
2719&(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */
2720&(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */
2721&(nid_objs[244]),/* "id-smime-alg-RC2wrap" */
2722&(nid_objs[193]),/* "id-smime-cd" */
2723&(nid_objs[248]),/* "id-smime-cd-ldap" */
2724&(nid_objs[190]),/* "id-smime-ct" */
2725&(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */
2726&(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */
2727&(nid_objs[208]),/* "id-smime-ct-TDTInfo" */
2728&(nid_objs[207]),/* "id-smime-ct-TSTInfo" */
2729&(nid_objs[205]),/* "id-smime-ct-authData" */
2730&(nid_objs[209]),/* "id-smime-ct-contentInfo" */
2731&(nid_objs[206]),/* "id-smime-ct-publishCert" */
2732&(nid_objs[204]),/* "id-smime-ct-receipt" */
2733&(nid_objs[195]),/* "id-smime-cti" */
2734&(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */
2735&(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */
2736&(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */
2737&(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */
2738&(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */
2739&(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */
2740&(nid_objs[189]),/* "id-smime-mod" */
2741&(nid_objs[196]),/* "id-smime-mod-cms" */
2742&(nid_objs[197]),/* "id-smime-mod-ess" */
2743&(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */
2744&(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */
2745&(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */
2746&(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */
2747&(nid_objs[199]),/* "id-smime-mod-msg-v3" */
2748&(nid_objs[198]),/* "id-smime-mod-oid" */
2749&(nid_objs[194]),/* "id-smime-spq" */
2750&(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */
2751&(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */
2752&(nid_objs[34]),/* "idea-cbc" */
2753&(nid_objs[35]),/* "idea-cfb" */
2754&(nid_objs[36]),/* "idea-ecb" */
2755&(nid_objs[46]),/* "idea-ofb" */
2756&(nid_objs[461]),/* "info" */
2757&(nid_objs[101]),/* "initials" */
2758&(nid_objs[181]),/* "iso" */
2759&(nid_objs[623]),/* "issuer capabilities" */
2760&(nid_objs[492]),/* "janetMailbox" */
2761&(nid_objs[393]),/* "joint-iso-ccitt" */
2762&(nid_objs[150]),/* "keyBag" */
2763&(nid_objs[477]),/* "lastModifiedBy" */
2764&(nid_objs[476]),/* "lastModifiedTime" */
2765&(nid_objs[157]),/* "localKeyID" */
2766&(nid_objs[15]),/* "localityName" */
2767&(nid_objs[480]),/* "mXRecord" */
2768&(nid_objs[493]),/* "mailPreferenceOption" */
2769&(nid_objs[467]),/* "manager" */
2770&(nid_objs[ 3]),/* "md2" */
2771&(nid_objs[ 7]),/* "md2WithRSAEncryption" */
2772&(nid_objs[257]),/* "md4" */
2773&(nid_objs[396]),/* "md4WithRSAEncryption" */
2774&(nid_objs[ 4]),/* "md5" */
2775&(nid_objs[114]),/* "md5-sha1" */
2776&(nid_objs[104]),/* "md5WithRSA" */
2777&(nid_objs[ 8]),/* "md5WithRSAEncryption" */
2778&(nid_objs[95]),/* "mdc2" */
2779&(nid_objs[96]),/* "mdc2WithRSA" */
2780&(nid_objs[602]),/* "merchant initiated auth" */
2781&(nid_objs[514]),/* "message extensions" */
2782&(nid_objs[51]),/* "messageDigest" */
2783&(nid_objs[506]),/* "mime-mhs-bodies" */
2784&(nid_objs[505]),/* "mime-mhs-headings" */
2785&(nid_objs[488]),/* "mobileTelephoneNumber" */
2786&(nid_objs[481]),/* "nSRecord" */
2787&(nid_objs[173]),/* "name" */
2788&(nid_objs[379]),/* "org" */
2789&(nid_objs[17]),/* "organizationName" */
2790&(nid_objs[491]),/* "organizationalStatus" */
2791&(nid_objs[18]),/* "organizationalUnitName" */
2792&(nid_objs[475]),/* "otherMailbox" */
2793&(nid_objs[489]),/* "pagerTelephoneNumber" */
2794&(nid_objs[374]),/* "path" */
2795&(nid_objs[621]),/* "payment gateway capabilities" */
2796&(nid_objs[ 9]),/* "pbeWithMD2AndDES-CBC" */
2797&(nid_objs[168]),/* "pbeWithMD2AndRC2-CBC" */
2798&(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */
2799&(nid_objs[10]),/* "pbeWithMD5AndDES-CBC" */
2800&(nid_objs[169]),/* "pbeWithMD5AndRC2-CBC" */
2801&(nid_objs[148]),/* "pbeWithSHA1And128BitRC2-CBC" */
2802&(nid_objs[144]),/* "pbeWithSHA1And128BitRC4" */
2803&(nid_objs[147]),/* "pbeWithSHA1And2-KeyTripleDES-CBC" */
2804&(nid_objs[146]),/* "pbeWithSHA1And3-KeyTripleDES-CBC" */
2805&(nid_objs[149]),/* "pbeWithSHA1And40BitRC2-CBC" */
2806&(nid_objs[145]),/* "pbeWithSHA1And40BitRC4" */
2807&(nid_objs[170]),/* "pbeWithSHA1AndDES-CBC" */
2808&(nid_objs[68]),/* "pbeWithSHA1AndRC2-CBC" */
2809&(nid_objs[499]),/* "personalSignature" */
2810&(nid_objs[487]),/* "personalTitle" */
2811&(nid_objs[464]),/* "photo" */
2812&(nid_objs[437]),/* "pilot" */
2813&(nid_objs[439]),/* "pilotAttributeSyntax" */
2814&(nid_objs[438]),/* "pilotAttributeType" */
2815&(nid_objs[479]),/* "pilotAttributeType27" */
2816&(nid_objs[456]),/* "pilotDSA" */
2817&(nid_objs[441]),/* "pilotGroups" */
2818&(nid_objs[444]),/* "pilotObject" */
2819&(nid_objs[440]),/* "pilotObjectClass" */
2820&(nid_objs[455]),/* "pilotOrganization" */
2821&(nid_objs[445]),/* "pilotPerson" */
2822&(nid_objs[186]),/* "pkcs1" */
2823&(nid_objs[27]),/* "pkcs3" */
2824&(nid_objs[187]),/* "pkcs5" */
2825&(nid_objs[20]),/* "pkcs7" */
2826&(nid_objs[21]),/* "pkcs7-data" */
2827&(nid_objs[25]),/* "pkcs7-digestData" */
2828&(nid_objs[26]),/* "pkcs7-encryptedData" */
2829&(nid_objs[23]),/* "pkcs7-envelopedData" */
2830&(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */
2831&(nid_objs[22]),/* "pkcs7-signedData" */
2832&(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */
2833&(nid_objs[47]),/* "pkcs9" */
2834&(nid_objs[406]),/* "prime-field" */
2835&(nid_objs[409]),/* "prime192v1" */
2836&(nid_objs[410]),/* "prime192v2" */
2837&(nid_objs[411]),/* "prime192v3" */
2838&(nid_objs[412]),/* "prime239v1" */
2839&(nid_objs[413]),/* "prime239v2" */
2840&(nid_objs[414]),/* "prime239v3" */
2841&(nid_objs[415]),/* "prime256v1" */
2842&(nid_objs[510]),/* "pseudonym" */
2843&(nid_objs[435]),/* "pss" */
2844&(nid_objs[286]),/* "qcStatements" */
2845&(nid_objs[457]),/* "qualityLabelledData" */
2846&(nid_objs[450]),/* "rFC822localPart" */
2847&(nid_objs[98]),/* "rc2-40-cbc" */
2848&(nid_objs[166]),/* "rc2-64-cbc" */
2849&(nid_objs[37]),/* "rc2-cbc" */
2850&(nid_objs[39]),/* "rc2-cfb" */
2851&(nid_objs[38]),/* "rc2-ecb" */
2852&(nid_objs[40]),/* "rc2-ofb" */
2853&(nid_objs[ 5]),/* "rc4" */
2854&(nid_objs[97]),/* "rc4-40" */
2855&(nid_objs[120]),/* "rc5-cbc" */
2856&(nid_objs[122]),/* "rc5-cfb" */
2857&(nid_objs[121]),/* "rc5-ecb" */
2858&(nid_objs[123]),/* "rc5-ofb" */
2859&(nid_objs[460]),/* "rfc822Mailbox" */
2860&(nid_objs[117]),/* "ripemd160" */
2861&(nid_objs[119]),/* "ripemd160WithRSA" */
2862&(nid_objs[400]),/* "role" */
2863&(nid_objs[448]),/* "room" */
2864&(nid_objs[463]),/* "roomNumber" */
2865&(nid_objs[19]),/* "rsa" */
2866&(nid_objs[ 6]),/* "rsaEncryption" */
2867&(nid_objs[644]),/* "rsaOAEPEncryptionSET" */
2868&(nid_objs[377]),/* "rsaSignature" */
2869&(nid_objs[124]),/* "run length compression" */
2870&(nid_objs[482]),/* "sOARecord" */
2871&(nid_objs[155]),/* "safeContentsBag" */
2872&(nid_objs[291]),/* "sbqp-autonomousSysNum" */
2873&(nid_objs[290]),/* "sbqp-ipAddrBlock" */
2874&(nid_objs[292]),/* "sbqp-routerIdentifier" */
2875&(nid_objs[159]),/* "sdsiCertificate" */
2876&(nid_objs[154]),/* "secretBag" */
2877&(nid_objs[474]),/* "secretary" */
2878&(nid_objs[635]),/* "secure device signature" */
2879&(nid_objs[105]),/* "serialNumber" */
2880&(nid_objs[625]),/* "set-addPolicy" */
2881&(nid_objs[515]),/* "set-attr" */
2882&(nid_objs[518]),/* "set-brand" */
2883&(nid_objs[638]),/* "set-brand-AmericanExpress" */
2884&(nid_objs[637]),/* "set-brand-Diners" */
2885&(nid_objs[636]),/* "set-brand-IATA-ATA" */
2886&(nid_objs[639]),/* "set-brand-JCB" */
2887&(nid_objs[641]),/* "set-brand-MasterCard" */
2888&(nid_objs[642]),/* "set-brand-Novus" */
2889&(nid_objs[640]),/* "set-brand-Visa" */
2890&(nid_objs[516]),/* "set-policy" */
2891&(nid_objs[607]),/* "set-policy-root" */
2892&(nid_objs[624]),/* "set-rootKeyThumb" */
2893&(nid_objs[620]),/* "setAttr-Cert" */
2894&(nid_objs[628]),/* "setAttr-IssCap-CVM" */
2895&(nid_objs[630]),/* "setAttr-IssCap-Sig" */
2896&(nid_objs[629]),/* "setAttr-IssCap-T2" */
2897&(nid_objs[627]),/* "setAttr-Token-B0Prime" */
2898&(nid_objs[626]),/* "setAttr-Token-EMV" */
2899&(nid_objs[622]),/* "setAttr-TokenType" */
2900&(nid_objs[619]),/* "setCext-IssuerCapabilities" */
2901&(nid_objs[615]),/* "setCext-PGWYcapabilities" */
2902&(nid_objs[616]),/* "setCext-TokenIdentifier" */
2903&(nid_objs[618]),/* "setCext-TokenType" */
2904&(nid_objs[617]),/* "setCext-Track2Data" */
2905&(nid_objs[611]),/* "setCext-cCertRequired" */
2906&(nid_objs[609]),/* "setCext-certType" */
2907&(nid_objs[608]),/* "setCext-hashedRoot" */
2908&(nid_objs[610]),/* "setCext-merchData" */
2909&(nid_objs[613]),/* "setCext-setExt" */
2910&(nid_objs[614]),/* "setCext-setQualf" */
2911&(nid_objs[612]),/* "setCext-tunneling" */
2912&(nid_objs[540]),/* "setct-AcqCardCodeMsg" */
2913&(nid_objs[576]),/* "setct-AcqCardCodeMsgTBE" */
2914&(nid_objs[570]),/* "setct-AuthReqTBE" */
2915&(nid_objs[534]),/* "setct-AuthReqTBS" */
2916&(nid_objs[527]),/* "setct-AuthResBaggage" */
2917&(nid_objs[571]),/* "setct-AuthResTBE" */
2918&(nid_objs[572]),/* "setct-AuthResTBEX" */
2919&(nid_objs[535]),/* "setct-AuthResTBS" */
2920&(nid_objs[536]),/* "setct-AuthResTBSX" */
2921&(nid_objs[528]),/* "setct-AuthRevReqBaggage" */
2922&(nid_objs[577]),/* "setct-AuthRevReqTBE" */
2923&(nid_objs[541]),/* "setct-AuthRevReqTBS" */
2924&(nid_objs[529]),/* "setct-AuthRevResBaggage" */
2925&(nid_objs[542]),/* "setct-AuthRevResData" */
2926&(nid_objs[578]),/* "setct-AuthRevResTBE" */
2927&(nid_objs[579]),/* "setct-AuthRevResTBEB" */
2928&(nid_objs[543]),/* "setct-AuthRevResTBS" */
2929&(nid_objs[573]),/* "setct-AuthTokenTBE" */
2930&(nid_objs[537]),/* "setct-AuthTokenTBS" */
2931&(nid_objs[600]),/* "setct-BCIDistributionTBS" */
2932&(nid_objs[558]),/* "setct-BatchAdminReqData" */
2933&(nid_objs[592]),/* "setct-BatchAdminReqTBE" */
2934&(nid_objs[559]),/* "setct-BatchAdminResData" */
2935&(nid_objs[593]),/* "setct-BatchAdminResTBE" */
2936&(nid_objs[599]),/* "setct-CRLNotificationResTBS" */
2937&(nid_objs[598]),/* "setct-CRLNotificationTBS" */
2938&(nid_objs[580]),/* "setct-CapReqTBE" */
2939&(nid_objs[581]),/* "setct-CapReqTBEX" */
2940&(nid_objs[544]),/* "setct-CapReqTBS" */
2941&(nid_objs[545]),/* "setct-CapReqTBSX" */
2942&(nid_objs[546]),/* "setct-CapResData" */
2943&(nid_objs[582]),/* "setct-CapResTBE" */
2944&(nid_objs[583]),/* "setct-CapRevReqTBE" */
2945&(nid_objs[584]),/* "setct-CapRevReqTBEX" */
2946&(nid_objs[547]),/* "setct-CapRevReqTBS" */
2947&(nid_objs[548]),/* "setct-CapRevReqTBSX" */
2948&(nid_objs[549]),/* "setct-CapRevResData" */
2949&(nid_objs[585]),/* "setct-CapRevResTBE" */
2950&(nid_objs[538]),/* "setct-CapTokenData" */
2951&(nid_objs[530]),/* "setct-CapTokenSeq" */
2952&(nid_objs[574]),/* "setct-CapTokenTBE" */
2953&(nid_objs[575]),/* "setct-CapTokenTBEX" */
2954&(nid_objs[539]),/* "setct-CapTokenTBS" */
2955&(nid_objs[560]),/* "setct-CardCInitResTBS" */
2956&(nid_objs[566]),/* "setct-CertInqReqTBS" */
2957&(nid_objs[563]),/* "setct-CertReqData" */
2958&(nid_objs[595]),/* "setct-CertReqTBE" */
2959&(nid_objs[596]),/* "setct-CertReqTBEX" */
2960&(nid_objs[564]),/* "setct-CertReqTBS" */
2961&(nid_objs[565]),/* "setct-CertResData" */
2962&(nid_objs[597]),/* "setct-CertResTBE" */
2963&(nid_objs[586]),/* "setct-CredReqTBE" */
2964&(nid_objs[587]),/* "setct-CredReqTBEX" */
2965&(nid_objs[550]),/* "setct-CredReqTBS" */
2966&(nid_objs[551]),/* "setct-CredReqTBSX" */
2967&(nid_objs[552]),/* "setct-CredResData" */
2968&(nid_objs[588]),/* "setct-CredResTBE" */
2969&(nid_objs[589]),/* "setct-CredRevReqTBE" */
2970&(nid_objs[590]),/* "setct-CredRevReqTBEX" */
2971&(nid_objs[553]),/* "setct-CredRevReqTBS" */
2972&(nid_objs[554]),/* "setct-CredRevReqTBSX" */
2973&(nid_objs[555]),/* "setct-CredRevResData" */
2974&(nid_objs[591]),/* "setct-CredRevResTBE" */
2975&(nid_objs[567]),/* "setct-ErrorTBS" */
2976&(nid_objs[526]),/* "setct-HODInput" */
2977&(nid_objs[561]),/* "setct-MeAqCInitResTBS" */
2978&(nid_objs[522]),/* "setct-OIData" */
2979&(nid_objs[519]),/* "setct-PANData" */
2980&(nid_objs[521]),/* "setct-PANOnly" */
2981&(nid_objs[520]),/* "setct-PANToken" */
2982&(nid_objs[556]),/* "setct-PCertReqData" */
2983&(nid_objs[557]),/* "setct-PCertResTBS" */
2984&(nid_objs[523]),/* "setct-PI" */
2985&(nid_objs[532]),/* "setct-PI-TBS" */
2986&(nid_objs[524]),/* "setct-PIData" */
2987&(nid_objs[525]),/* "setct-PIDataUnsigned" */
2988&(nid_objs[568]),/* "setct-PIDualSignedTBE" */
2989&(nid_objs[569]),/* "setct-PIUnsignedTBE" */
2990&(nid_objs[531]),/* "setct-PInitResData" */
2991&(nid_objs[533]),/* "setct-PResData" */
2992&(nid_objs[594]),/* "setct-RegFormReqTBE" */
2993&(nid_objs[562]),/* "setct-RegFormResTBS" */
2994&(nid_objs[604]),/* "setext-pinAny" */
2995&(nid_objs[603]),/* "setext-pinSecure" */
2996&(nid_objs[605]),/* "setext-track2" */
2997&(nid_objs[41]),/* "sha" */
2998&(nid_objs[64]),/* "sha1" */
2999&(nid_objs[115]),/* "sha1WithRSA" */
3000&(nid_objs[65]),/* "sha1WithRSAEncryption" */
3001&(nid_objs[42]),/* "shaWithRSAEncryption" */
3002&(nid_objs[52]),/* "signingTime" */
3003&(nid_objs[454]),/* "simpleSecurityObject" */
3004&(nid_objs[496]),/* "singleLevelQuality" */
3005&(nid_objs[16]),/* "stateOrProvinceName" */
3006&(nid_objs[498]),/* "subtreeMaximumQuality" */
3007&(nid_objs[497]),/* "subtreeMinimumQuality" */
3008&(nid_objs[100]),/* "surname" */
3009&(nid_objs[459]),/* "textEncodedORAddress" */
3010&(nid_objs[293]),/* "textNotice" */
3011&(nid_objs[106]),/* "title" */
3012&(nid_objs[436]),/* "ucl" */
3013&(nid_objs[ 0]),/* "undefined" */
3014&(nid_objs[55]),/* "unstructuredAddress" */
3015&(nid_objs[49]),/* "unstructuredName" */
3016&(nid_objs[465]),/* "userClass" */
3017&(nid_objs[458]),/* "userId" */
3018&(nid_objs[373]),/* "valid" */
3019&(nid_objs[503]),/* "x500UniqueIdentifier" */
3020&(nid_objs[158]),/* "x509Certificate" */
3021&(nid_objs[160]),/* "x509Crl" */
3022&(nid_objs[125]),/* "zlib compression" */
3023};
3024
3025static ASN1_OBJECT *obj_objs[NUM_OBJ]={
3026&(nid_objs[ 0]),/* OBJ_undef 0 */
3027&(nid_objs[404]),/* OBJ_ccitt 0 */
3028&(nid_objs[434]),/* OBJ_data 0 9 */
3029&(nid_objs[181]),/* OBJ_iso 1 */
3030&(nid_objs[182]),/* OBJ_member_body 1 2 */
3031&(nid_objs[379]),/* OBJ_org 1 3 */
3032&(nid_objs[393]),/* OBJ_joint_iso_ccitt 2 */
3033&(nid_objs[11]),/* OBJ_X500 2 5 */
3034&(nid_objs[380]),/* OBJ_dod 1 3 6 */
3035&(nid_objs[12]),/* OBJ_X509 2 5 4 */
3036&(nid_objs[378]),/* OBJ_X500algorithms 2 5 8 */
3037&(nid_objs[81]),/* OBJ_id_ce 2 5 29 */
3038&(nid_objs[512]),/* OBJ_id_set 2 23 42 */
3039&(nid_objs[435]),/* OBJ_pss 0 9 2342 */
3040&(nid_objs[183]),/* OBJ_ISO_US 1 2 840 */
3041&(nid_objs[381]),/* OBJ_iana 1 3 6 1 */
3042&(nid_objs[394]),/* OBJ_selected_attribute_types 2 5 1 5 */
3043&(nid_objs[13]),/* OBJ_commonName 2 5 4 3 */
3044&(nid_objs[100]),/* OBJ_surname 2 5 4 4 */
3045&(nid_objs[105]),/* OBJ_serialNumber 2 5 4 5 */
3046&(nid_objs[14]),/* OBJ_countryName 2 5 4 6 */
3047&(nid_objs[15]),/* OBJ_localityName 2 5 4 7 */
3048&(nid_objs[16]),/* OBJ_stateOrProvinceName 2 5 4 8 */
3049&(nid_objs[17]),/* OBJ_organizationName 2 5 4 10 */
3050&(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */
3051&(nid_objs[106]),/* OBJ_title 2 5 4 12 */
3052&(nid_objs[107]),/* OBJ_description 2 5 4 13 */
3053&(nid_objs[173]),/* OBJ_name 2 5 4 41 */
3054&(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */
3055&(nid_objs[101]),/* OBJ_initials 2 5 4 43 */
3056&(nid_objs[509]),/* OBJ_generationQualifier 2 5 4 44 */
3057&(nid_objs[503]),/* OBJ_x500UniqueIdentifier 2 5 4 45 */
3058&(nid_objs[174]),/* OBJ_dnQualifier 2 5 4 46 */
3059&(nid_objs[510]),/* OBJ_pseudonym 2 5 4 65 */
3060&(nid_objs[400]),/* OBJ_role 2 5 4 72 */
3061&(nid_objs[82]),/* OBJ_subject_key_identifier 2 5 29 14 */
3062&(nid_objs[83]),/* OBJ_key_usage 2 5 29 15 */
3063&(nid_objs[84]),/* OBJ_private_key_usage_period 2 5 29 16 */
3064&(nid_objs[85]),/* OBJ_subject_alt_name 2 5 29 17 */
3065&(nid_objs[86]),/* OBJ_issuer_alt_name 2 5 29 18 */
3066&(nid_objs[87]),/* OBJ_basic_constraints 2 5 29 19 */
3067&(nid_objs[88]),/* OBJ_crl_number 2 5 29 20 */
3068&(nid_objs[141]),/* OBJ_crl_reason 2 5 29 21 */
3069&(nid_objs[430]),/* OBJ_hold_instruction_code 2 5 29 23 */
3070&(nid_objs[142]),/* OBJ_invalidity_date 2 5 29 24 */
3071&(nid_objs[140]),/* OBJ_delta_crl 2 5 29 27 */
3072&(nid_objs[103]),/* OBJ_crl_distribution_points 2 5 29 31 */
3073&(nid_objs[89]),/* OBJ_certificate_policies 2 5 29 32 */
3074&(nid_objs[90]),/* OBJ_authority_key_identifier 2 5 29 35 */
3075&(nid_objs[401]),/* OBJ_policy_constraints 2 5 29 36 */
3076&(nid_objs[126]),/* OBJ_ext_key_usage 2 5 29 37 */
3077&(nid_objs[402]),/* OBJ_target_information 2 5 29 55 */
3078&(nid_objs[403]),/* OBJ_no_rev_avail 2 5 29 56 */
3079&(nid_objs[513]),/* OBJ_set_ctype 2 23 42 0 */
3080&(nid_objs[514]),/* OBJ_set_msgExt 2 23 42 1 */
3081&(nid_objs[515]),/* OBJ_set_attr 2 23 42 3 */
3082&(nid_objs[516]),/* OBJ_set_policy 2 23 42 5 */
3083&(nid_objs[517]),/* OBJ_set_certExt 2 23 42 7 */
3084&(nid_objs[518]),/* OBJ_set_brand 2 23 42 8 */
3085&(nid_objs[382]),/* OBJ_Directory 1 3 6 1 1 */
3086&(nid_objs[383]),/* OBJ_Management 1 3 6 1 2 */
3087&(nid_objs[384]),/* OBJ_Experimental 1 3 6 1 3 */
3088&(nid_objs[385]),/* OBJ_Private 1 3 6 1 4 */
3089&(nid_objs[386]),/* OBJ_Security 1 3 6 1 5 */
3090&(nid_objs[387]),/* OBJ_SNMPv2 1 3 6 1 6 */
3091&(nid_objs[388]),/* OBJ_Mail 1 3 6 1 7 */
3092&(nid_objs[376]),/* OBJ_algorithm 1 3 14 3 2 */
3093&(nid_objs[395]),/* OBJ_clearance 2 5 1 5 55 */
3094&(nid_objs[19]),/* OBJ_rsa 2 5 8 1 1 */
3095&(nid_objs[96]),/* OBJ_mdc2WithRSA 2 5 8 3 100 */
3096&(nid_objs[95]),/* OBJ_mdc2 2 5 8 3 101 */
3097&(nid_objs[519]),/* OBJ_setct_PANData 2 23 42 0 0 */
3098&(nid_objs[520]),/* OBJ_setct_PANToken 2 23 42 0 1 */
3099&(nid_objs[521]),/* OBJ_setct_PANOnly 2 23 42 0 2 */
3100&(nid_objs[522]),/* OBJ_setct_OIData 2 23 42 0 3 */
3101&(nid_objs[523]),/* OBJ_setct_PI 2 23 42 0 4 */
3102&(nid_objs[524]),/* OBJ_setct_PIData 2 23 42 0 5 */
3103&(nid_objs[525]),/* OBJ_setct_PIDataUnsigned 2 23 42 0 6 */
3104&(nid_objs[526]),/* OBJ_setct_HODInput 2 23 42 0 7 */
3105&(nid_objs[527]),/* OBJ_setct_AuthResBaggage 2 23 42 0 8 */
3106&(nid_objs[528]),/* OBJ_setct_AuthRevReqBaggage 2 23 42 0 9 */
3107&(nid_objs[529]),/* OBJ_setct_AuthRevResBaggage 2 23 42 0 10 */
3108&(nid_objs[530]),/* OBJ_setct_CapTokenSeq 2 23 42 0 11 */
3109&(nid_objs[531]),/* OBJ_setct_PInitResData 2 23 42 0 12 */
3110&(nid_objs[532]),/* OBJ_setct_PI_TBS 2 23 42 0 13 */
3111&(nid_objs[533]),/* OBJ_setct_PResData 2 23 42 0 14 */
3112&(nid_objs[534]),/* OBJ_setct_AuthReqTBS 2 23 42 0 16 */
3113&(nid_objs[535]),/* OBJ_setct_AuthResTBS 2 23 42 0 17 */
3114&(nid_objs[536]),/* OBJ_setct_AuthResTBSX 2 23 42 0 18 */
3115&(nid_objs[537]),/* OBJ_setct_AuthTokenTBS 2 23 42 0 19 */
3116&(nid_objs[538]),/* OBJ_setct_CapTokenData 2 23 42 0 20 */
3117&(nid_objs[539]),/* OBJ_setct_CapTokenTBS 2 23 42 0 21 */
3118&(nid_objs[540]),/* OBJ_setct_AcqCardCodeMsg 2 23 42 0 22 */
3119&(nid_objs[541]),/* OBJ_setct_AuthRevReqTBS 2 23 42 0 23 */
3120&(nid_objs[542]),/* OBJ_setct_AuthRevResData 2 23 42 0 24 */
3121&(nid_objs[543]),/* OBJ_setct_AuthRevResTBS 2 23 42 0 25 */
3122&(nid_objs[544]),/* OBJ_setct_CapReqTBS 2 23 42 0 26 */
3123&(nid_objs[545]),/* OBJ_setct_CapReqTBSX 2 23 42 0 27 */
3124&(nid_objs[546]),/* OBJ_setct_CapResData 2 23 42 0 28 */
3125&(nid_objs[547]),/* OBJ_setct_CapRevReqTBS 2 23 42 0 29 */
3126&(nid_objs[548]),/* OBJ_setct_CapRevReqTBSX 2 23 42 0 30 */
3127&(nid_objs[549]),/* OBJ_setct_CapRevResData 2 23 42 0 31 */
3128&(nid_objs[550]),/* OBJ_setct_CredReqTBS 2 23 42 0 32 */
3129&(nid_objs[551]),/* OBJ_setct_CredReqTBSX 2 23 42 0 33 */
3130&(nid_objs[552]),/* OBJ_setct_CredResData 2 23 42 0 34 */
3131&(nid_objs[553]),/* OBJ_setct_CredRevReqTBS 2 23 42 0 35 */
3132&(nid_objs[554]),/* OBJ_setct_CredRevReqTBSX 2 23 42 0 36 */
3133&(nid_objs[555]),/* OBJ_setct_CredRevResData 2 23 42 0 37 */
3134&(nid_objs[556]),/* OBJ_setct_PCertReqData 2 23 42 0 38 */
3135&(nid_objs[557]),/* OBJ_setct_PCertResTBS 2 23 42 0 39 */
3136&(nid_objs[558]),/* OBJ_setct_BatchAdminReqData 2 23 42 0 40 */
3137&(nid_objs[559]),/* OBJ_setct_BatchAdminResData 2 23 42 0 41 */
3138&(nid_objs[560]),/* OBJ_setct_CardCInitResTBS 2 23 42 0 42 */
3139&(nid_objs[561]),/* OBJ_setct_MeAqCInitResTBS 2 23 42 0 43 */
3140&(nid_objs[562]),/* OBJ_setct_RegFormResTBS 2 23 42 0 44 */
3141&(nid_objs[563]),/* OBJ_setct_CertReqData 2 23 42 0 45 */
3142&(nid_objs[564]),/* OBJ_setct_CertReqTBS 2 23 42 0 46 */
3143&(nid_objs[565]),/* OBJ_setct_CertResData 2 23 42 0 47 */
3144&(nid_objs[566]),/* OBJ_setct_CertInqReqTBS 2 23 42 0 48 */
3145&(nid_objs[567]),/* OBJ_setct_ErrorTBS 2 23 42 0 49 */
3146&(nid_objs[568]),/* OBJ_setct_PIDualSignedTBE 2 23 42 0 50 */
3147&(nid_objs[569]),/* OBJ_setct_PIUnsignedTBE 2 23 42 0 51 */
3148&(nid_objs[570]),/* OBJ_setct_AuthReqTBE 2 23 42 0 52 */
3149&(nid_objs[571]),/* OBJ_setct_AuthResTBE 2 23 42 0 53 */
3150&(nid_objs[572]),/* OBJ_setct_AuthResTBEX 2 23 42 0 54 */
3151&(nid_objs[573]),/* OBJ_setct_AuthTokenTBE 2 23 42 0 55 */
3152&(nid_objs[574]),/* OBJ_setct_CapTokenTBE 2 23 42 0 56 */
3153&(nid_objs[575]),/* OBJ_setct_CapTokenTBEX 2 23 42 0 57 */
3154&(nid_objs[576]),/* OBJ_setct_AcqCardCodeMsgTBE 2 23 42 0 58 */
3155&(nid_objs[577]),/* OBJ_setct_AuthRevReqTBE 2 23 42 0 59 */
3156&(nid_objs[578]),/* OBJ_setct_AuthRevResTBE 2 23 42 0 60 */
3157&(nid_objs[579]),/* OBJ_setct_AuthRevResTBEB 2 23 42 0 61 */
3158&(nid_objs[580]),/* OBJ_setct_CapReqTBE 2 23 42 0 62 */
3159&(nid_objs[581]),/* OBJ_setct_CapReqTBEX 2 23 42 0 63 */
3160&(nid_objs[582]),/* OBJ_setct_CapResTBE 2 23 42 0 64 */
3161&(nid_objs[583]),/* OBJ_setct_CapRevReqTBE 2 23 42 0 65 */
3162&(nid_objs[584]),/* OBJ_setct_CapRevReqTBEX 2 23 42 0 66 */
3163&(nid_objs[585]),/* OBJ_setct_CapRevResTBE 2 23 42 0 67 */
3164&(nid_objs[586]),/* OBJ_setct_CredReqTBE 2 23 42 0 68 */
3165&(nid_objs[587]),/* OBJ_setct_CredReqTBEX 2 23 42 0 69 */
3166&(nid_objs[588]),/* OBJ_setct_CredResTBE 2 23 42 0 70 */
3167&(nid_objs[589]),/* OBJ_setct_CredRevReqTBE 2 23 42 0 71 */
3168&(nid_objs[590]),/* OBJ_setct_CredRevReqTBEX 2 23 42 0 72 */
3169&(nid_objs[591]),/* OBJ_setct_CredRevResTBE 2 23 42 0 73 */
3170&(nid_objs[592]),/* OBJ_setct_BatchAdminReqTBE 2 23 42 0 74 */
3171&(nid_objs[593]),/* OBJ_setct_BatchAdminResTBE 2 23 42 0 75 */
3172&(nid_objs[594]),/* OBJ_setct_RegFormReqTBE 2 23 42 0 76 */
3173&(nid_objs[595]),/* OBJ_setct_CertReqTBE 2 23 42 0 77 */
3174&(nid_objs[596]),/* OBJ_setct_CertReqTBEX 2 23 42 0 78 */
3175&(nid_objs[597]),/* OBJ_setct_CertResTBE 2 23 42 0 79 */
3176&(nid_objs[598]),/* OBJ_setct_CRLNotificationTBS 2 23 42 0 80 */
3177&(nid_objs[599]),/* OBJ_setct_CRLNotificationResTBS 2 23 42 0 81 */
3178&(nid_objs[600]),/* OBJ_setct_BCIDistributionTBS 2 23 42 0 82 */
3179&(nid_objs[601]),/* OBJ_setext_genCrypt 2 23 42 1 1 */
3180&(nid_objs[602]),/* OBJ_setext_miAuth 2 23 42 1 3 */
3181&(nid_objs[603]),/* OBJ_setext_pinSecure 2 23 42 1 4 */
3182&(nid_objs[604]),/* OBJ_setext_pinAny 2 23 42 1 5 */
3183&(nid_objs[605]),/* OBJ_setext_track2 2 23 42 1 7 */
3184&(nid_objs[606]),/* OBJ_setext_cv 2 23 42 1 8 */
3185&(nid_objs[620]),/* OBJ_setAttr_Cert 2 23 42 3 0 */
3186&(nid_objs[621]),/* OBJ_setAttr_PGWYcap 2 23 42 3 1 */
3187&(nid_objs[622]),/* OBJ_setAttr_TokenType 2 23 42 3 2 */
3188&(nid_objs[623]),/* OBJ_setAttr_IssCap 2 23 42 3 3 */
3189&(nid_objs[607]),/* OBJ_set_policy_root 2 23 42 5 0 */
3190&(nid_objs[608]),/* OBJ_setCext_hashedRoot 2 23 42 7 0 */
3191&(nid_objs[609]),/* OBJ_setCext_certType 2 23 42 7 1 */
3192&(nid_objs[610]),/* OBJ_setCext_merchData 2 23 42 7 2 */
3193&(nid_objs[611]),/* OBJ_setCext_cCertRequired 2 23 42 7 3 */
3194&(nid_objs[612]),/* OBJ_setCext_tunneling 2 23 42 7 4 */
3195&(nid_objs[613]),/* OBJ_setCext_setExt 2 23 42 7 5 */
3196&(nid_objs[614]),/* OBJ_setCext_setQualf 2 23 42 7 6 */
3197&(nid_objs[615]),/* OBJ_setCext_PGWYcapabilities 2 23 42 7 7 */
3198&(nid_objs[616]),/* OBJ_setCext_TokenIdentifier 2 23 42 7 8 */
3199&(nid_objs[617]),/* OBJ_setCext_Track2Data 2 23 42 7 9 */
3200&(nid_objs[618]),/* OBJ_setCext_TokenType 2 23 42 7 10 */
3201&(nid_objs[619]),/* OBJ_setCext_IssuerCapabilities 2 23 42 7 11 */
3202&(nid_objs[636]),/* OBJ_set_brand_IATA_ATA 2 23 42 8 1 */
3203&(nid_objs[640]),/* OBJ_set_brand_Visa 2 23 42 8 4 */
3204&(nid_objs[641]),/* OBJ_set_brand_MasterCard 2 23 42 8 5 */
3205&(nid_objs[637]),/* OBJ_set_brand_Diners 2 23 42 8 30 */
3206&(nid_objs[638]),/* OBJ_set_brand_AmericanExpress 2 23 42 8 34 */
3207&(nid_objs[639]),/* OBJ_set_brand_JCB 2 23 42 8 35 */
3208&(nid_objs[184]),/* OBJ_X9_57 1 2 840 10040 */
3209&(nid_objs[405]),/* OBJ_ansi_X9_62 1 2 840 10045 */
3210&(nid_objs[389]),/* OBJ_Enterprises 1 3 6 1 4 1 */
3211&(nid_objs[504]),/* OBJ_mime_mhs 1 3 6 1 7 1 */
3212&(nid_objs[104]),/* OBJ_md5WithRSA 1 3 14 3 2 3 */
3213&(nid_objs[29]),/* OBJ_des_ecb 1 3 14 3 2 6 */
3214&(nid_objs[31]),/* OBJ_des_cbc 1 3 14 3 2 7 */
3215&(nid_objs[45]),/* OBJ_des_ofb64 1 3 14 3 2 8 */
3216&(nid_objs[30]),/* OBJ_des_cfb64 1 3 14 3 2 9 */
3217&(nid_objs[377]),/* OBJ_rsaSignature 1 3 14 3 2 11 */
3218&(nid_objs[67]),/* OBJ_dsa_2 1 3 14 3 2 12 */
3219&(nid_objs[66]),/* OBJ_dsaWithSHA 1 3 14 3 2 13 */
3220&(nid_objs[42]),/* OBJ_shaWithRSAEncryption 1 3 14 3 2 15 */
3221&(nid_objs[32]),/* OBJ_des_ede_ecb 1 3 14 3 2 17 */
3222&(nid_objs[41]),/* OBJ_sha 1 3 14 3 2 18 */
3223&(nid_objs[64]),/* OBJ_sha1 1 3 14 3 2 26 */
3224&(nid_objs[70]),/* OBJ_dsaWithSHA1_2 1 3 14 3 2 27 */
3225&(nid_objs[115]),/* OBJ_sha1WithRSA 1 3 14 3 2 29 */
3226&(nid_objs[117]),/* OBJ_ripemd160 1 3 36 3 2 1 */
3227&(nid_objs[143]),/* OBJ_sxnet 1 3 101 1 4 1 */
3228&(nid_objs[624]),/* OBJ_set_rootKeyThumb 2 23 42 3 0 0 */
3229&(nid_objs[625]),/* OBJ_set_addPolicy 2 23 42 3 0 1 */
3230&(nid_objs[626]),/* OBJ_setAttr_Token_EMV 2 23 42 3 2 1 */
3231&(nid_objs[627]),/* OBJ_setAttr_Token_B0Prime 2 23 42 3 2 2 */
3232&(nid_objs[628]),/* OBJ_setAttr_IssCap_CVM 2 23 42 3 3 3 */
3233&(nid_objs[629]),/* OBJ_setAttr_IssCap_T2 2 23 42 3 3 4 */
3234&(nid_objs[630]),/* OBJ_setAttr_IssCap_Sig 2 23 42 3 3 5 */
3235&(nid_objs[642]),/* OBJ_set_brand_Novus 2 23 42 8 6011 */
3236&(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666 1 */
3237&(nid_objs[125]),/* OBJ_zlib_compression 1 1 1 1 666 2 */
3238&(nid_objs[ 1]),/* OBJ_rsadsi 1 2 840 113549 */
3239&(nid_objs[185]),/* OBJ_X9cm 1 2 840 10040 4 */
3240&(nid_objs[127]),/* OBJ_id_pkix 1 3 6 1 5 5 7 */
3241&(nid_objs[505]),/* OBJ_mime_mhs_headings 1 3 6 1 7 1 1 */
3242&(nid_objs[506]),/* OBJ_mime_mhs_bodies 1 3 6 1 7 1 2 */
3243&(nid_objs[119]),/* OBJ_ripemd160WithRSA 1 3 36 3 3 1 2 */
3244&(nid_objs[631]),/* OBJ_setAttr_GenCryptgrm 2 23 42 3 3 3 1 */
3245&(nid_objs[632]),/* OBJ_setAttr_T2Enc 2 23 42 3 3 4 1 */
3246&(nid_objs[633]),/* OBJ_setAttr_T2cleartxt 2 23 42 3 3 4 2 */
3247&(nid_objs[634]),/* OBJ_setAttr_TokICCsig 2 23 42 3 3 5 1 */
3248&(nid_objs[635]),/* OBJ_setAttr_SecDevSig 2 23 42 3 3 5 2 */
3249&(nid_objs[436]),/* OBJ_ucl 0 9 2342 19200300 */
3250&(nid_objs[ 2]),/* OBJ_pkcs 1 2 840 113549 1 */
3251&(nid_objs[431]),/* OBJ_hold_instruction_none 1 2 840 10040 2 1 */
3252&(nid_objs[432]),/* OBJ_hold_instruction_call_issuer 1 2 840 10040 2 2 */
3253&(nid_objs[433]),/* OBJ_hold_instruction_reject 1 2 840 10040 2 3 */
3254&(nid_objs[116]),/* OBJ_dsa 1 2 840 10040 4 1 */
3255&(nid_objs[113]),/* OBJ_dsaWithSHA1 1 2 840 10040 4 3 */
3256&(nid_objs[406]),/* OBJ_X9_62_prime_field 1 2 840 10045 1 1 */
3257&(nid_objs[407]),/* OBJ_X9_62_characteristic_two_field 1 2 840 10045 1 2 */
3258&(nid_objs[408]),/* OBJ_X9_62_id_ecPublicKey 1 2 840 10045 2 1 */
3259&(nid_objs[416]),/* OBJ_ecdsa_with_SHA1 1 2 840 10045 4 1 */
3260&(nid_objs[258]),/* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */
3261&(nid_objs[175]),/* OBJ_id_pe 1 3 6 1 5 5 7 1 */
3262&(nid_objs[259]),/* OBJ_id_qt 1 3 6 1 5 5 7 2 */
3263&(nid_objs[128]),/* OBJ_id_kp 1 3 6 1 5 5 7 3 */
3264&(nid_objs[260]),/* OBJ_id_it 1 3 6 1 5 5 7 4 */
3265&(nid_objs[261]),/* OBJ_id_pkip 1 3 6 1 5 5 7 5 */
3266&(nid_objs[262]),/* OBJ_id_alg 1 3 6 1 5 5 7 6 */
3267&(nid_objs[263]),/* OBJ_id_cmc 1 3 6 1 5 5 7 7 */
3268&(nid_objs[264]),/* OBJ_id_on 1 3 6 1 5 5 7 8 */
3269&(nid_objs[265]),/* OBJ_id_pda 1 3 6 1 5 5 7 9 */
3270&(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */
3271&(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */
3272&(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */
3273&(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */
3274&(nid_objs[507]),/* OBJ_id_hex_partial_message 1 3 6 1 7 1 1 1 */
3275&(nid_objs[508]),/* OBJ_id_hex_multipart_message 1 3 6 1 7 1 1 2 */
3276&(nid_objs[57]),/* OBJ_netscape 2 16 840 1 113730 */
3277&(nid_objs[437]),/* OBJ_pilot 0 9 2342 19200300 100 */
3278&(nid_objs[186]),/* OBJ_pkcs1 1 2 840 113549 1 1 */
3279&(nid_objs[27]),/* OBJ_pkcs3 1 2 840 113549 1 3 */
3280&(nid_objs[187]),/* OBJ_pkcs5 1 2 840 113549 1 5 */
3281&(nid_objs[20]),/* OBJ_pkcs7 1 2 840 113549 1 7 */
3282&(nid_objs[47]),/* OBJ_pkcs9 1 2 840 113549 1 9 */
3283&(nid_objs[ 3]),/* OBJ_md2 1 2 840 113549 2 2 */
3284&(nid_objs[257]),/* OBJ_md4 1 2 840 113549 2 4 */
3285&(nid_objs[ 4]),/* OBJ_md5 1 2 840 113549 2 5 */
3286&(nid_objs[163]),/* OBJ_hmacWithSHA1 1 2 840 113549 2 7 */
3287&(nid_objs[37]),/* OBJ_rc2_cbc 1 2 840 113549 3 2 */
3288&(nid_objs[ 5]),/* OBJ_rc4 1 2 840 113549 3 4 */
3289&(nid_objs[44]),/* OBJ_des_ede3_cbc 1 2 840 113549 3 7 */
3290&(nid_objs[120]),/* OBJ_rc5_cbc 1 2 840 113549 3 8 */
3291&(nid_objs[643]),/* OBJ_des_cdmf 1 2 840 113549 3 10 */
3292&(nid_objs[409]),/* OBJ_X9_62_prime192v1 1 2 840 10045 3 1 1 */
3293&(nid_objs[410]),/* OBJ_X9_62_prime192v2 1 2 840 10045 3 1 2 */
3294&(nid_objs[411]),/* OBJ_X9_62_prime192v3 1 2 840 10045 3 1 3 */
3295&(nid_objs[412]),/* OBJ_X9_62_prime239v1 1 2 840 10045 3 1 4 */
3296&(nid_objs[413]),/* OBJ_X9_62_prime239v2 1 2 840 10045 3 1 5 */
3297&(nid_objs[414]),/* OBJ_X9_62_prime239v3 1 2 840 10045 3 1 6 */
3298&(nid_objs[415]),/* OBJ_X9_62_prime256v1 1 2 840 10045 3 1 7 */
3299&(nid_objs[269]),/* OBJ_id_pkix1_explicit_88 1 3 6 1 5 5 7 0 1 */
3300&(nid_objs[270]),/* OBJ_id_pkix1_implicit_88 1 3 6 1 5 5 7 0 2 */
3301&(nid_objs[271]),/* OBJ_id_pkix1_explicit_93 1 3 6 1 5 5 7 0 3 */
3302&(nid_objs[272]),/* OBJ_id_pkix1_implicit_93 1 3 6 1 5 5 7 0 4 */
3303&(nid_objs[273]),/* OBJ_id_mod_crmf 1 3 6 1 5 5 7 0 5 */
3304&(nid_objs[274]),/* OBJ_id_mod_cmc 1 3 6 1 5 5 7 0 6 */
3305&(nid_objs[275]),/* OBJ_id_mod_kea_profile_88 1 3 6 1 5 5 7 0 7 */
3306&(nid_objs[276]),/* OBJ_id_mod_kea_profile_93 1 3 6 1 5 5 7 0 8 */
3307&(nid_objs[277]),/* OBJ_id_mod_cmp 1 3 6 1 5 5 7 0 9 */
3308&(nid_objs[278]),/* OBJ_id_mod_qualified_cert_88 1 3 6 1 5 5 7 0 10 */
3309&(nid_objs[279]),/* OBJ_id_mod_qualified_cert_93 1 3 6 1 5 5 7 0 11 */
3310&(nid_objs[280]),/* OBJ_id_mod_attribute_cert 1 3 6 1 5 5 7 0 12 */
3311&(nid_objs[281]),/* OBJ_id_mod_timestamp_protocol 1 3 6 1 5 5 7 0 13 */
3312&(nid_objs[282]),/* OBJ_id_mod_ocsp 1 3 6 1 5 5 7 0 14 */
3313&(nid_objs[283]),/* OBJ_id_mod_dvcs 1 3 6 1 5 5 7 0 15 */
3314&(nid_objs[284]),/* OBJ_id_mod_cmp2000 1 3 6 1 5 5 7 0 16 */
3315&(nid_objs[177]),/* OBJ_info_access 1 3 6 1 5 5 7 1 1 */
3316&(nid_objs[285]),/* OBJ_biometricInfo 1 3 6 1 5 5 7 1 2 */
3317&(nid_objs[286]),/* OBJ_qcStatements 1 3 6 1 5 5 7 1 3 */
3318&(nid_objs[287]),/* OBJ_ac_auditEntity 1 3 6 1 5 5 7 1 4 */
3319&(nid_objs[288]),/* OBJ_ac_targeting 1 3 6 1 5 5 7 1 5 */
3320&(nid_objs[289]),/* OBJ_aaControls 1 3 6 1 5 5 7 1 6 */
3321&(nid_objs[290]),/* OBJ_sbqp_ipAddrBlock 1 3 6 1 5 5 7 1 7 */
3322&(nid_objs[291]),/* OBJ_sbqp_autonomousSysNum 1 3 6 1 5 5 7 1 8 */
3323&(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */
3324&(nid_objs[397]),/* OBJ_ac_proxying 1 3 6 1 5 5 7 1 10 */
3325&(nid_objs[398]),/* OBJ_sinfo_access 1 3 6 1 5 5 7 1 11 */
3326&(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */
3327&(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */
3328&(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */
3329&(nid_objs[129]),/* OBJ_server_auth 1 3 6 1 5 5 7 3 1 */
3330&(nid_objs[130]),/* OBJ_client_auth 1 3 6 1 5 5 7 3 2 */
3331&(nid_objs[131]),/* OBJ_code_sign 1 3 6 1 5 5 7 3 3 */
3332&(nid_objs[132]),/* OBJ_email_protect 1 3 6 1 5 5 7 3 4 */
3333&(nid_objs[294]),/* OBJ_ipsecEndSystem 1 3 6 1 5 5 7 3 5 */
3334&(nid_objs[295]),/* OBJ_ipsecTunnel 1 3 6 1 5 5 7 3 6 */
3335&(nid_objs[296]),/* OBJ_ipsecUser 1 3 6 1 5 5 7 3 7 */
3336&(nid_objs[133]),/* OBJ_time_stamp 1 3 6 1 5 5 7 3 8 */
3337&(nid_objs[180]),/* OBJ_OCSP_sign 1 3 6 1 5 5 7 3 9 */
3338&(nid_objs[297]),/* OBJ_dvcs 1 3 6 1 5 5 7 3 10 */
3339&(nid_objs[298]),/* OBJ_id_it_caProtEncCert 1 3 6 1 5 5 7 4 1 */
3340&(nid_objs[299]),/* OBJ_id_it_signKeyPairTypes 1 3 6 1 5 5 7 4 2 */
3341&(nid_objs[300]),/* OBJ_id_it_encKeyPairTypes 1 3 6 1 5 5 7 4 3 */
3342&(nid_objs[301]),/* OBJ_id_it_preferredSymmAlg 1 3 6 1 5 5 7 4 4 */
3343&(nid_objs[302]),/* OBJ_id_it_caKeyUpdateInfo 1 3 6 1 5 5 7 4 5 */
3344&(nid_objs[303]),/* OBJ_id_it_currentCRL 1 3 6 1 5 5 7 4 6 */
3345&(nid_objs[304]),/* OBJ_id_it_unsupportedOIDs 1 3 6 1 5 5 7 4 7 */
3346&(nid_objs[305]),/* OBJ_id_it_subscriptionRequest 1 3 6 1 5 5 7 4 8 */
3347&(nid_objs[306]),/* OBJ_id_it_subscriptionResponse 1 3 6 1 5 5 7 4 9 */
3348&(nid_objs[307]),/* OBJ_id_it_keyPairParamReq 1 3 6 1 5 5 7 4 10 */
3349&(nid_objs[308]),/* OBJ_id_it_keyPairParamRep 1 3 6 1 5 5 7 4 11 */
3350&(nid_objs[309]),/* OBJ_id_it_revPassphrase 1 3 6 1 5 5 7 4 12 */
3351&(nid_objs[310]),/* OBJ_id_it_implicitConfirm 1 3 6 1 5 5 7 4 13 */
3352&(nid_objs[311]),/* OBJ_id_it_confirmWaitTime 1 3 6 1 5 5 7 4 14 */
3353&(nid_objs[312]),/* OBJ_id_it_origPKIMessage 1 3 6 1 5 5 7 4 15 */
3354&(nid_objs[313]),/* OBJ_id_regCtrl 1 3 6 1 5 5 7 5 1 */
3355&(nid_objs[314]),/* OBJ_id_regInfo 1 3 6 1 5 5 7 5 2 */
3356&(nid_objs[323]),/* OBJ_id_alg_des40 1 3 6 1 5 5 7 6 1 */
3357&(nid_objs[324]),/* OBJ_id_alg_noSignature 1 3 6 1 5 5 7 6 2 */
3358&(nid_objs[325]),/* OBJ_id_alg_dh_sig_hmac_sha1 1 3 6 1 5 5 7 6 3 */
3359&(nid_objs[326]),/* OBJ_id_alg_dh_pop 1 3 6 1 5 5 7 6 4 */
3360&(nid_objs[327]),/* OBJ_id_cmc_statusInfo 1 3 6 1 5 5 7 7 1 */
3361&(nid_objs[328]),/* OBJ_id_cmc_identification 1 3 6 1 5 5 7 7 2 */
3362&(nid_objs[329]),/* OBJ_id_cmc_identityProof 1 3 6 1 5 5 7 7 3 */
3363&(nid_objs[330]),/* OBJ_id_cmc_dataReturn 1 3 6 1 5 5 7 7 4 */
3364&(nid_objs[331]),/* OBJ_id_cmc_transactionId 1 3 6 1 5 5 7 7 5 */
3365&(nid_objs[332]),/* OBJ_id_cmc_senderNonce 1 3 6 1 5 5 7 7 6 */
3366&(nid_objs[333]),/* OBJ_id_cmc_recipientNonce 1 3 6 1 5 5 7 7 7 */
3367&(nid_objs[334]),/* OBJ_id_cmc_addExtensions 1 3 6 1 5 5 7 7 8 */
3368&(nid_objs[335]),/* OBJ_id_cmc_encryptedPOP 1 3 6 1 5 5 7 7 9 */
3369&(nid_objs[336]),/* OBJ_id_cmc_decryptedPOP 1 3 6 1 5 5 7 7 10 */
3370&(nid_objs[337]),/* OBJ_id_cmc_lraPOPWitness 1 3 6 1 5 5 7 7 11 */
3371&(nid_objs[338]),/* OBJ_id_cmc_getCert 1 3 6 1 5 5 7 7 15 */
3372&(nid_objs[339]),/* OBJ_id_cmc_getCRL 1 3 6 1 5 5 7 7 16 */
3373&(nid_objs[340]),/* OBJ_id_cmc_revokeRequest 1 3 6 1 5 5 7 7 17 */
3374&(nid_objs[341]),/* OBJ_id_cmc_regInfo 1 3 6 1 5 5 7 7 18 */
3375&(nid_objs[342]),/* OBJ_id_cmc_responseInfo 1 3 6 1 5 5 7 7 19 */
3376&(nid_objs[343]),/* OBJ_id_cmc_queryPending 1 3 6 1 5 5 7 7 21 */
3377&(nid_objs[344]),/* OBJ_id_cmc_popLinkRandom 1 3 6 1 5 5 7 7 22 */
3378&(nid_objs[345]),/* OBJ_id_cmc_popLinkWitness 1 3 6 1 5 5 7 7 23 */
3379&(nid_objs[346]),/* OBJ_id_cmc_confirmCertAcceptance 1 3 6 1 5 5 7 7 24 */
3380&(nid_objs[347]),/* OBJ_id_on_personalData 1 3 6 1 5 5 7 8 1 */
3381&(nid_objs[348]),/* OBJ_id_pda_dateOfBirth 1 3 6 1 5 5 7 9 1 */
3382&(nid_objs[349]),/* OBJ_id_pda_placeOfBirth 1 3 6 1 5 5 7 9 2 */
3383&(nid_objs[351]),/* OBJ_id_pda_gender 1 3 6 1 5 5 7 9 3 */
3384&(nid_objs[352]),/* OBJ_id_pda_countryOfCitizenship 1 3 6 1 5 5 7 9 4 */
3385&(nid_objs[353]),/* OBJ_id_pda_countryOfResidence 1 3 6 1 5 5 7 9 5 */
3386&(nid_objs[354]),/* OBJ_id_aca_authenticationInfo 1 3 6 1 5 5 7 10 1 */
3387&(nid_objs[355]),/* OBJ_id_aca_accessIdentity 1 3 6 1 5 5 7 10 2 */
3388&(nid_objs[356]),/* OBJ_id_aca_chargingIdentity 1 3 6 1 5 5 7 10 3 */
3389&(nid_objs[357]),/* OBJ_id_aca_group 1 3 6 1 5 5 7 10 4 */
3390&(nid_objs[358]),/* OBJ_id_aca_role 1 3 6 1 5 5 7 10 5 */
3391&(nid_objs[399]),/* OBJ_id_aca_encAttrs 1 3 6 1 5 5 7 10 6 */
3392&(nid_objs[359]),/* OBJ_id_qcs_pkixQCSyntax_v1 1 3 6 1 5 5 7 11 1 */
3393&(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */
3394&(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */
3395&(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */
3396&(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */
3397&(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */
3398&(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */
3399&(nid_objs[364]),/* OBJ_ad_dvcs 1 3 6 1 5 5 7 48 4 */
3400&(nid_objs[58]),/* OBJ_netscape_cert_extension 2 16 840 1 113730 1 */
3401&(nid_objs[59]),/* OBJ_netscape_data_type 2 16 840 1 113730 2 */
3402&(nid_objs[438]),/* OBJ_pilotAttributeType 0 9 2342 19200300 100 1 */
3403&(nid_objs[439]),/* OBJ_pilotAttributeSyntax 0 9 2342 19200300 100 3 */
3404&(nid_objs[440]),/* OBJ_pilotObjectClass 0 9 2342 19200300 100 4 */
3405&(nid_objs[441]),/* OBJ_pilotGroups 0 9 2342 19200300 100 10 */
3406&(nid_objs[108]),/* OBJ_cast5_cbc 1 2 840 113533 7 66 10 */
3407&(nid_objs[112]),/* OBJ_pbeWithMD5AndCast5_CBC 1 2 840 113533 7 66 12 */
3408&(nid_objs[ 6]),/* OBJ_rsaEncryption 1 2 840 113549 1 1 1 */
3409&(nid_objs[ 7]),/* OBJ_md2WithRSAEncryption 1 2 840 113549 1 1 2 */
3410&(nid_objs[396]),/* OBJ_md4WithRSAEncryption 1 2 840 113549 1 1 3 */
3411&(nid_objs[ 8]),/* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */
3412&(nid_objs[65]),/* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */
3413&(nid_objs[644]),/* OBJ_rsaOAEPEncryptionSET 1 2 840 113549 1 1 6 */
3414&(nid_objs[28]),/* OBJ_dhKeyAgreement 1 2 840 113549 1 3 1 */
3415&(nid_objs[ 9]),/* OBJ_pbeWithMD2AndDES_CBC 1 2 840 113549 1 5 1 */
3416&(nid_objs[10]),/* OBJ_pbeWithMD5AndDES_CBC 1 2 840 113549 1 5 3 */
3417&(nid_objs[168]),/* OBJ_pbeWithMD2AndRC2_CBC 1 2 840 113549 1 5 4 */
3418&(nid_objs[169]),/* OBJ_pbeWithMD5AndRC2_CBC 1 2 840 113549 1 5 6 */
3419&(nid_objs[170]),/* OBJ_pbeWithSHA1AndDES_CBC 1 2 840 113549 1 5 10 */
3420&(nid_objs[68]),/* OBJ_pbeWithSHA1AndRC2_CBC 1 2 840 113549 1 5 11 */
3421&(nid_objs[69]),/* OBJ_id_pbkdf2 1 2 840 113549 1 5 12 */
3422&(nid_objs[161]),/* OBJ_pbes2 1 2 840 113549 1 5 13 */
3423&(nid_objs[162]),/* OBJ_pbmac1 1 2 840 113549 1 5 14 */
3424&(nid_objs[21]),/* OBJ_pkcs7_data 1 2 840 113549 1 7 1 */
3425&(nid_objs[22]),/* OBJ_pkcs7_signed 1 2 840 113549 1 7 2 */
3426&(nid_objs[23]),/* OBJ_pkcs7_enveloped 1 2 840 113549 1 7 3 */
3427&(nid_objs[24]),/* OBJ_pkcs7_signedAndEnveloped 1 2 840 113549 1 7 4 */
3428&(nid_objs[25]),/* OBJ_pkcs7_digest 1 2 840 113549 1 7 5 */
3429&(nid_objs[26]),/* OBJ_pkcs7_encrypted 1 2 840 113549 1 7 6 */
3430&(nid_objs[48]),/* OBJ_pkcs9_emailAddress 1 2 840 113549 1 9 1 */
3431&(nid_objs[49]),/* OBJ_pkcs9_unstructuredName 1 2 840 113549 1 9 2 */
3432&(nid_objs[50]),/* OBJ_pkcs9_contentType 1 2 840 113549 1 9 3 */
3433&(nid_objs[51]),/* OBJ_pkcs9_messageDigest 1 2 840 113549 1 9 4 */
3434&(nid_objs[52]),/* OBJ_pkcs9_signingTime 1 2 840 113549 1 9 5 */
3435&(nid_objs[53]),/* OBJ_pkcs9_countersignature 1 2 840 113549 1 9 6 */
3436&(nid_objs[54]),/* OBJ_pkcs9_challengePassword 1 2 840 113549 1 9 7 */
3437&(nid_objs[55]),/* OBJ_pkcs9_unstructuredAddress 1 2 840 113549 1 9 8 */
3438&(nid_objs[56]),/* OBJ_pkcs9_extCertAttributes 1 2 840 113549 1 9 9 */
3439&(nid_objs[172]),/* OBJ_ext_req 1 2 840 113549 1 9 14 */
3440&(nid_objs[167]),/* OBJ_SMIMECapabilities 1 2 840 113549 1 9 15 */
3441&(nid_objs[188]),/* OBJ_SMIME 1 2 840 113549 1 9 16 */
3442&(nid_objs[156]),/* OBJ_friendlyName 1 2 840 113549 1 9 20 */
3443&(nid_objs[157]),/* OBJ_localKeyID 1 2 840 113549 1 9 21 */
3444&(nid_objs[417]),/* OBJ_ms_csp_name 1 3 6 1 4 1 311 17 1 */
3445&(nid_objs[390]),/* OBJ_dcObject 1 3 6 1 4 1 1466 344 */
3446&(nid_objs[91]),/* OBJ_bf_cbc 1 3 6 1 4 1 3029 1 2 */
3447&(nid_objs[315]),/* OBJ_id_regCtrl_regToken 1 3 6 1 5 5 7 5 1 1 */
3448&(nid_objs[316]),/* OBJ_id_regCtrl_authenticator 1 3 6 1 5 5 7 5 1 2 */
3449&(nid_objs[317]),/* OBJ_id_regCtrl_pkiPublicationInfo 1 3 6 1 5 5 7 5 1 3 */
3450&(nid_objs[318]),/* OBJ_id_regCtrl_pkiArchiveOptions 1 3 6 1 5 5 7 5 1 4 */
3451&(nid_objs[319]),/* OBJ_id_regCtrl_oldCertID 1 3 6 1 5 5 7 5 1 5 */
3452&(nid_objs[320]),/* OBJ_id_regCtrl_protocolEncrKey 1 3 6 1 5 5 7 5 1 6 */
3453&(nid_objs[321]),/* OBJ_id_regInfo_utf8Pairs 1 3 6 1 5 5 7 5 2 1 */
3454&(nid_objs[322]),/* OBJ_id_regInfo_certReq 1 3 6 1 5 5 7 5 2 2 */
3455&(nid_objs[365]),/* OBJ_id_pkix_OCSP_basic 1 3 6 1 5 5 7 48 1 1 */
3456&(nid_objs[366]),/* OBJ_id_pkix_OCSP_Nonce 1 3 6 1 5 5 7 48 1 2 */
3457&(nid_objs[367]),/* OBJ_id_pkix_OCSP_CrlID 1 3 6 1 5 5 7 48 1 3 */
3458&(nid_objs[368]),/* OBJ_id_pkix_OCSP_acceptableResponses 1 3 6 1 5 5 7 48 1 4 */
3459&(nid_objs[369]),/* OBJ_id_pkix_OCSP_noCheck 1 3 6 1 5 5 7 48 1 5 */
3460&(nid_objs[370]),/* OBJ_id_pkix_OCSP_archiveCutoff 1 3 6 1 5 5 7 48 1 6 */
3461&(nid_objs[371]),/* OBJ_id_pkix_OCSP_serviceLocator 1 3 6 1 5 5 7 48 1 7 */
3462&(nid_objs[372]),/* OBJ_id_pkix_OCSP_extendedStatus 1 3 6 1 5 5 7 48 1 8 */
3463&(nid_objs[373]),/* OBJ_id_pkix_OCSP_valid 1 3 6 1 5 5 7 48 1 9 */
3464&(nid_objs[374]),/* OBJ_id_pkix_OCSP_path 1 3 6 1 5 5 7 48 1 10 */
3465&(nid_objs[375]),/* OBJ_id_pkix_OCSP_trustRoot 1 3 6 1 5 5 7 48 1 11 */
3466&(nid_objs[418]),/* OBJ_aes_128_ecb 2 16 840 1 101 3 4 1 1 */
3467&(nid_objs[419]),/* OBJ_aes_128_cbc 2 16 840 1 101 3 4 1 2 */
3468&(nid_objs[420]),/* OBJ_aes_128_ofb128 2 16 840 1 101 3 4 1 3 */
3469&(nid_objs[421]),/* OBJ_aes_128_cfb128 2 16 840 1 101 3 4 1 4 */
3470&(nid_objs[422]),/* OBJ_aes_192_ecb 2 16 840 1 101 3 4 1 21 */
3471&(nid_objs[423]),/* OBJ_aes_192_cbc 2 16 840 1 101 3 4 1 22 */
3472&(nid_objs[424]),/* OBJ_aes_192_ofb128 2 16 840 1 101 3 4 1 23 */
3473&(nid_objs[425]),/* OBJ_aes_192_cfb128 2 16 840 1 101 3 4 1 24 */
3474&(nid_objs[426]),/* OBJ_aes_256_ecb 2 16 840 1 101 3 4 1 41 */
3475&(nid_objs[427]),/* OBJ_aes_256_cbc 2 16 840 1 101 3 4 1 42 */
3476&(nid_objs[428]),/* OBJ_aes_256_ofb128 2 16 840 1 101 3 4 1 43 */
3477&(nid_objs[429]),/* OBJ_aes_256_cfb128 2 16 840 1 101 3 4 1 44 */
3478&(nid_objs[71]),/* OBJ_netscape_cert_type 2 16 840 1 113730 1 1 */
3479&(nid_objs[72]),/* OBJ_netscape_base_url 2 16 840 1 113730 1 2 */
3480&(nid_objs[73]),/* OBJ_netscape_revocation_url 2 16 840 1 113730 1 3 */
3481&(nid_objs[74]),/* OBJ_netscape_ca_revocation_url 2 16 840 1 113730 1 4 */
3482&(nid_objs[75]),/* OBJ_netscape_renewal_url 2 16 840 1 113730 1 7 */
3483&(nid_objs[76]),/* OBJ_netscape_ca_policy_url 2 16 840 1 113730 1 8 */
3484&(nid_objs[77]),/* OBJ_netscape_ssl_server_name 2 16 840 1 113730 1 12 */
3485&(nid_objs[78]),/* OBJ_netscape_comment 2 16 840 1 113730 1 13 */
3486&(nid_objs[79]),/* OBJ_netscape_cert_sequence 2 16 840 1 113730 2 5 */
3487&(nid_objs[139]),/* OBJ_ns_sgc 2 16 840 1 113730 4 1 */
3488&(nid_objs[458]),/* OBJ_userId 0 9 2342 19200300 100 1 1 */
3489&(nid_objs[459]),/* OBJ_textEncodedORAddress 0 9 2342 19200300 100 1 2 */
3490&(nid_objs[460]),/* OBJ_rfc822Mailbox 0 9 2342 19200300 100 1 3 */
3491&(nid_objs[461]),/* OBJ_info 0 9 2342 19200300 100 1 4 */
3492&(nid_objs[462]),/* OBJ_favouriteDrink 0 9 2342 19200300 100 1 5 */
3493&(nid_objs[463]),/* OBJ_roomNumber 0 9 2342 19200300 100 1 6 */
3494&(nid_objs[464]),/* OBJ_photo 0 9 2342 19200300 100 1 7 */
3495&(nid_objs[465]),/* OBJ_userClass 0 9 2342 19200300 100 1 8 */
3496&(nid_objs[466]),/* OBJ_host 0 9 2342 19200300 100 1 9 */
3497&(nid_objs[467]),/* OBJ_manager 0 9 2342 19200300 100 1 10 */
3498&(nid_objs[468]),/* OBJ_documentIdentifier 0 9 2342 19200300 100 1 11 */
3499&(nid_objs[469]),/* OBJ_documentTitle 0 9 2342 19200300 100 1 12 */
3500&(nid_objs[470]),/* OBJ_documentVersion 0 9 2342 19200300 100 1 13 */
3501&(nid_objs[471]),/* OBJ_documentAuthor 0 9 2342 19200300 100 1 14 */
3502&(nid_objs[472]),/* OBJ_documentLocation 0 9 2342 19200300 100 1 15 */
3503&(nid_objs[473]),/* OBJ_homeTelephoneNumber 0 9 2342 19200300 100 1 20 */
3504&(nid_objs[474]),/* OBJ_secretary 0 9 2342 19200300 100 1 21 */
3505&(nid_objs[475]),/* OBJ_otherMailbox 0 9 2342 19200300 100 1 22 */
3506&(nid_objs[476]),/* OBJ_lastModifiedTime 0 9 2342 19200300 100 1 23 */
3507&(nid_objs[477]),/* OBJ_lastModifiedBy 0 9 2342 19200300 100 1 24 */
3508&(nid_objs[391]),/* OBJ_domainComponent 0 9 2342 19200300 100 1 25 */
3509&(nid_objs[478]),/* OBJ_aRecord 0 9 2342 19200300 100 1 26 */
3510&(nid_objs[479]),/* OBJ_pilotAttributeType27 0 9 2342 19200300 100 1 27 */
3511&(nid_objs[480]),/* OBJ_mXRecord 0 9 2342 19200300 100 1 28 */
3512&(nid_objs[481]),/* OBJ_nSRecord 0 9 2342 19200300 100 1 29 */
3513&(nid_objs[482]),/* OBJ_sOARecord 0 9 2342 19200300 100 1 30 */
3514&(nid_objs[483]),/* OBJ_cNAMERecord 0 9 2342 19200300 100 1 31 */
3515&(nid_objs[484]),/* OBJ_associatedDomain 0 9 2342 19200300 100 1 37 */
3516&(nid_objs[485]),/* OBJ_associatedName 0 9 2342 19200300 100 1 38 */
3517&(nid_objs[486]),/* OBJ_homePostalAddress 0 9 2342 19200300 100 1 39 */
3518&(nid_objs[487]),/* OBJ_personalTitle 0 9 2342 19200300 100 1 40 */
3519&(nid_objs[488]),/* OBJ_mobileTelephoneNumber 0 9 2342 19200300 100 1 41 */
3520&(nid_objs[489]),/* OBJ_pagerTelephoneNumber 0 9 2342 19200300 100 1 42 */
3521&(nid_objs[490]),/* OBJ_friendlyCountryName 0 9 2342 19200300 100 1 43 */
3522&(nid_objs[491]),/* OBJ_organizationalStatus 0 9 2342 19200300 100 1 45 */
3523&(nid_objs[492]),/* OBJ_janetMailbox 0 9 2342 19200300 100 1 46 */
3524&(nid_objs[493]),/* OBJ_mailPreferenceOption 0 9 2342 19200300 100 1 47 */
3525&(nid_objs[494]),/* OBJ_buildingName 0 9 2342 19200300 100 1 48 */
3526&(nid_objs[495]),/* OBJ_dSAQuality 0 9 2342 19200300 100 1 49 */
3527&(nid_objs[496]),/* OBJ_singleLevelQuality 0 9 2342 19200300 100 1 50 */
3528&(nid_objs[497]),/* OBJ_subtreeMinimumQuality 0 9 2342 19200300 100 1 51 */
3529&(nid_objs[498]),/* OBJ_subtreeMaximumQuality 0 9 2342 19200300 100 1 52 */
3530&(nid_objs[499]),/* OBJ_personalSignature 0 9 2342 19200300 100 1 53 */
3531&(nid_objs[500]),/* OBJ_dITRedirect 0 9 2342 19200300 100 1 54 */
3532&(nid_objs[501]),/* OBJ_audio 0 9 2342 19200300 100 1 55 */
3533&(nid_objs[502]),/* OBJ_documentPublisher 0 9 2342 19200300 100 1 56 */
3534&(nid_objs[442]),/* OBJ_iA5StringSyntax 0 9 2342 19200300 100 3 4 */
3535&(nid_objs[443]),/* OBJ_caseIgnoreIA5StringSyntax 0 9 2342 19200300 100 3 5 */
3536&(nid_objs[444]),/* OBJ_pilotObject 0 9 2342 19200300 100 4 3 */
3537&(nid_objs[445]),/* OBJ_pilotPerson 0 9 2342 19200300 100 4 4 */
3538&(nid_objs[446]),/* OBJ_account 0 9 2342 19200300 100 4 5 */
3539&(nid_objs[447]),/* OBJ_document 0 9 2342 19200300 100 4 6 */
3540&(nid_objs[448]),/* OBJ_room 0 9 2342 19200300 100 4 7 */
3541&(nid_objs[449]),/* OBJ_documentSeries 0 9 2342 19200300 100 4 9 */
3542&(nid_objs[392]),/* OBJ_Domain 0 9 2342 19200300 100 4 13 */
3543&(nid_objs[450]),/* OBJ_rFC822localPart 0 9 2342 19200300 100 4 14 */
3544&(nid_objs[451]),/* OBJ_dNSDomain 0 9 2342 19200300 100 4 15 */
3545&(nid_objs[452]),/* OBJ_domainRelatedObject 0 9 2342 19200300 100 4 17 */
3546&(nid_objs[453]),/* OBJ_friendlyCountry 0 9 2342 19200300 100 4 18 */
3547&(nid_objs[454]),/* OBJ_simpleSecurityObject 0 9 2342 19200300 100 4 19 */
3548&(nid_objs[455]),/* OBJ_pilotOrganization 0 9 2342 19200300 100 4 20 */
3549&(nid_objs[456]),/* OBJ_pilotDSA 0 9 2342 19200300 100 4 21 */
3550&(nid_objs[457]),/* OBJ_qualityLabelledData 0 9 2342 19200300 100 4 22 */
3551&(nid_objs[189]),/* OBJ_id_smime_mod 1 2 840 113549 1 9 16 0 */
3552&(nid_objs[190]),/* OBJ_id_smime_ct 1 2 840 113549 1 9 16 1 */
3553&(nid_objs[191]),/* OBJ_id_smime_aa 1 2 840 113549 1 9 16 2 */
3554&(nid_objs[192]),/* OBJ_id_smime_alg 1 2 840 113549 1 9 16 3 */
3555&(nid_objs[193]),/* OBJ_id_smime_cd 1 2 840 113549 1 9 16 4 */
3556&(nid_objs[194]),/* OBJ_id_smime_spq 1 2 840 113549 1 9 16 5 */
3557&(nid_objs[195]),/* OBJ_id_smime_cti 1 2 840 113549 1 9 16 6 */
3558&(nid_objs[158]),/* OBJ_x509Certificate 1 2 840 113549 1 9 22 1 */
3559&(nid_objs[159]),/* OBJ_sdsiCertificate 1 2 840 113549 1 9 22 2 */
3560&(nid_objs[160]),/* OBJ_x509Crl 1 2 840 113549 1 9 23 1 */
3561&(nid_objs[144]),/* OBJ_pbe_WithSHA1And128BitRC4 1 2 840 113549 1 12 1 1 */
3562&(nid_objs[145]),/* OBJ_pbe_WithSHA1And40BitRC4 1 2 840 113549 1 12 1 2 */
3563&(nid_objs[146]),/* OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC 1 2 840 113549 1 12 1 3 */
3564&(nid_objs[147]),/* OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC 1 2 840 113549 1 12 1 4 */
3565&(nid_objs[148]),/* OBJ_pbe_WithSHA1And128BitRC2_CBC 1 2 840 113549 1 12 1 5 */
3566&(nid_objs[149]),/* OBJ_pbe_WithSHA1And40BitRC2_CBC 1 2 840 113549 1 12 1 6 */
3567&(nid_objs[171]),/* OBJ_ms_ext_req 1 3 6 1 4 1 311 2 1 14 */
3568&(nid_objs[134]),/* OBJ_ms_code_ind 1 3 6 1 4 1 311 2 1 21 */
3569&(nid_objs[135]),/* OBJ_ms_code_com 1 3 6 1 4 1 311 2 1 22 */
3570&(nid_objs[136]),/* OBJ_ms_ctl_sign 1 3 6 1 4 1 311 10 3 1 */
3571&(nid_objs[137]),/* OBJ_ms_sgc 1 3 6 1 4 1 311 10 3 3 */
3572&(nid_objs[138]),/* OBJ_ms_efs 1 3 6 1 4 1 311 10 3 4 */
3573&(nid_objs[648]),/* OBJ_ms_smartcard_login 1 3 6 1 4 1 311 20 2 2 */
3574&(nid_objs[649]),/* OBJ_ms_upn 1 3 6 1 4 1 311 20 2 3 */
3575&(nid_objs[196]),/* OBJ_id_smime_mod_cms 1 2 840 113549 1 9 16 0 1 */
3576&(nid_objs[197]),/* OBJ_id_smime_mod_ess 1 2 840 113549 1 9 16 0 2 */
3577&(nid_objs[198]),/* OBJ_id_smime_mod_oid 1 2 840 113549 1 9 16 0 3 */
3578&(nid_objs[199]),/* OBJ_id_smime_mod_msg_v3 1 2 840 113549 1 9 16 0 4 */
3579&(nid_objs[200]),/* OBJ_id_smime_mod_ets_eSignature_88 1 2 840 113549 1 9 16 0 5 */
3580&(nid_objs[201]),/* OBJ_id_smime_mod_ets_eSignature_97 1 2 840 113549 1 9 16 0 6 */
3581&(nid_objs[202]),/* OBJ_id_smime_mod_ets_eSigPolicy_88 1 2 840 113549 1 9 16 0 7 */
3582&(nid_objs[203]),/* OBJ_id_smime_mod_ets_eSigPolicy_97 1 2 840 113549 1 9 16 0 8 */
3583&(nid_objs[204]),/* OBJ_id_smime_ct_receipt 1 2 840 113549 1 9 16 1 1 */
3584&(nid_objs[205]),/* OBJ_id_smime_ct_authData 1 2 840 113549 1 9 16 1 2 */
3585&(nid_objs[206]),/* OBJ_id_smime_ct_publishCert 1 2 840 113549 1 9 16 1 3 */
3586&(nid_objs[207]),/* OBJ_id_smime_ct_TSTInfo 1 2 840 113549 1 9 16 1 4 */
3587&(nid_objs[208]),/* OBJ_id_smime_ct_TDTInfo 1 2 840 113549 1 9 16 1 5 */
3588&(nid_objs[209]),/* OBJ_id_smime_ct_contentInfo 1 2 840 113549 1 9 16 1 6 */
3589&(nid_objs[210]),/* OBJ_id_smime_ct_DVCSRequestData 1 2 840 113549 1 9 16 1 7 */
3590&(nid_objs[211]),/* OBJ_id_smime_ct_DVCSResponseData 1 2 840 113549 1 9 16 1 8 */
3591&(nid_objs[212]),/* OBJ_id_smime_aa_receiptRequest 1 2 840 113549 1 9 16 2 1 */
3592&(nid_objs[213]),/* OBJ_id_smime_aa_securityLabel 1 2 840 113549 1 9 16 2 2 */
3593&(nid_objs[214]),/* OBJ_id_smime_aa_mlExpandHistory 1 2 840 113549 1 9 16 2 3 */
3594&(nid_objs[215]),/* OBJ_id_smime_aa_contentHint 1 2 840 113549 1 9 16 2 4 */
3595&(nid_objs[216]),/* OBJ_id_smime_aa_msgSigDigest 1 2 840 113549 1 9 16 2 5 */
3596&(nid_objs[217]),/* OBJ_id_smime_aa_encapContentType 1 2 840 113549 1 9 16 2 6 */
3597&(nid_objs[218]),/* OBJ_id_smime_aa_contentIdentifier 1 2 840 113549 1 9 16 2 7 */
3598&(nid_objs[219]),/* OBJ_id_smime_aa_macValue 1 2 840 113549 1 9 16 2 8 */
3599&(nid_objs[220]),/* OBJ_id_smime_aa_equivalentLabels 1 2 840 113549 1 9 16 2 9 */
3600&(nid_objs[221]),/* OBJ_id_smime_aa_contentReference 1 2 840 113549 1 9 16 2 10 */
3601&(nid_objs[222]),/* OBJ_id_smime_aa_encrypKeyPref 1 2 840 113549 1 9 16 2 11 */
3602&(nid_objs[223]),/* OBJ_id_smime_aa_signingCertificate 1 2 840 113549 1 9 16 2 12 */
3603&(nid_objs[224]),/* OBJ_id_smime_aa_smimeEncryptCerts 1 2 840 113549 1 9 16 2 13 */
3604&(nid_objs[225]),/* OBJ_id_smime_aa_timeStampToken 1 2 840 113549 1 9 16 2 14 */
3605&(nid_objs[226]),/* OBJ_id_smime_aa_ets_sigPolicyId 1 2 840 113549 1 9 16 2 15 */
3606&(nid_objs[227]),/* OBJ_id_smime_aa_ets_commitmentType 1 2 840 113549 1 9 16 2 16 */
3607&(nid_objs[228]),/* OBJ_id_smime_aa_ets_signerLocation 1 2 840 113549 1 9 16 2 17 */
3608&(nid_objs[229]),/* OBJ_id_smime_aa_ets_signerAttr 1 2 840 113549 1 9 16 2 18 */
3609&(nid_objs[230]),/* OBJ_id_smime_aa_ets_otherSigCert 1 2 840 113549 1 9 16 2 19 */
3610&(nid_objs[231]),/* OBJ_id_smime_aa_ets_contentTimestamp 1 2 840 113549 1 9 16 2 20 */
3611&(nid_objs[232]),/* OBJ_id_smime_aa_ets_CertificateRefs 1 2 840 113549 1 9 16 2 21 */
3612&(nid_objs[233]),/* OBJ_id_smime_aa_ets_RevocationRefs 1 2 840 113549 1 9 16 2 22 */
3613&(nid_objs[234]),/* OBJ_id_smime_aa_ets_certValues 1 2 840 113549 1 9 16 2 23 */
3614&(nid_objs[235]),/* OBJ_id_smime_aa_ets_revocationValues 1 2 840 113549 1 9 16 2 24 */
3615&(nid_objs[236]),/* OBJ_id_smime_aa_ets_escTimeStamp 1 2 840 113549 1 9 16 2 25 */
3616&(nid_objs[237]),/* OBJ_id_smime_aa_ets_certCRLTimestamp 1 2 840 113549 1 9 16 2 26 */
3617&(nid_objs[238]),/* OBJ_id_smime_aa_ets_archiveTimeStamp 1 2 840 113549 1 9 16 2 27 */
3618&(nid_objs[239]),/* OBJ_id_smime_aa_signatureType 1 2 840 113549 1 9 16 2 28 */
3619&(nid_objs[240]),/* OBJ_id_smime_aa_dvcs_dvc 1 2 840 113549 1 9 16 2 29 */
3620&(nid_objs[241]),/* OBJ_id_smime_alg_ESDHwith3DES 1 2 840 113549 1 9 16 3 1 */
3621&(nid_objs[242]),/* OBJ_id_smime_alg_ESDHwithRC2 1 2 840 113549 1 9 16 3 2 */
3622&(nid_objs[243]),/* OBJ_id_smime_alg_3DESwrap 1 2 840 113549 1 9 16 3 3 */
3623&(nid_objs[244]),/* OBJ_id_smime_alg_RC2wrap 1 2 840 113549 1 9 16 3 4 */
3624&(nid_objs[245]),/* OBJ_id_smime_alg_ESDH 1 2 840 113549 1 9 16 3 5 */
3625&(nid_objs[246]),/* OBJ_id_smime_alg_CMS3DESwrap 1 2 840 113549 1 9 16 3 6 */
3626&(nid_objs[247]),/* OBJ_id_smime_alg_CMSRC2wrap 1 2 840 113549 1 9 16 3 7 */
3627&(nid_objs[248]),/* OBJ_id_smime_cd_ldap 1 2 840 113549 1 9 16 4 1 */
3628&(nid_objs[249]),/* OBJ_id_smime_spq_ets_sqt_uri 1 2 840 113549 1 9 16 5 1 */
3629&(nid_objs[250]),/* OBJ_id_smime_spq_ets_sqt_unotice 1 2 840 113549 1 9 16 5 2 */
3630&(nid_objs[251]),/* OBJ_id_smime_cti_ets_proofOfOrigin 1 2 840 113549 1 9 16 6 1 */
3631&(nid_objs[252]),/* OBJ_id_smime_cti_ets_proofOfReceipt 1 2 840 113549 1 9 16 6 2 */
3632&(nid_objs[253]),/* OBJ_id_smime_cti_ets_proofOfDelivery 1 2 840 113549 1 9 16 6 3 */
3633&(nid_objs[254]),/* OBJ_id_smime_cti_ets_proofOfSender 1 2 840 113549 1 9 16 6 4 */
3634&(nid_objs[255]),/* OBJ_id_smime_cti_ets_proofOfApproval 1 2 840 113549 1 9 16 6 5 */
3635&(nid_objs[256]),/* OBJ_id_smime_cti_ets_proofOfCreation 1 2 840 113549 1 9 16 6 6 */
3636&(nid_objs[150]),/* OBJ_keyBag 1 2 840 113549 1 12 10 1 1 */
3637&(nid_objs[151]),/* OBJ_pkcs8ShroudedKeyBag 1 2 840 113549 1 12 10 1 2 */
3638&(nid_objs[152]),/* OBJ_certBag 1 2 840 113549 1 12 10 1 3 */
3639&(nid_objs[153]),/* OBJ_crlBag 1 2 840 113549 1 12 10 1 4 */
3640&(nid_objs[154]),/* OBJ_secretBag 1 2 840 113549 1 12 10 1 5 */
3641&(nid_objs[155]),/* OBJ_safeContentsBag 1 2 840 113549 1 12 10 1 6 */
3642&(nid_objs[34]),/* OBJ_idea_cbc 1 3 6 1 4 1 188 7 1 1 2 */
3643};
3644
diff --git a/src/lib/libssl/src/crypto/objects/obj_mac.h b/src/lib/libssl/src/crypto/objects/obj_mac.h
deleted file mode 100644
index 7645012298..0000000000
--- a/src/lib/libssl/src/crypto/objects/obj_mac.h
+++ /dev/null
@@ -1,2868 +0,0 @@
1/* crypto/objects/obj_mac.h */
2
3/* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the
4 * following command:
5 * perl objects.pl objects.txt obj_mac.num obj_mac.h
6 */
7
8/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
9 * All rights reserved.
10 *
11 * This package is an SSL implementation written
12 * by Eric Young (eay@cryptsoft.com).
13 * The implementation was written so as to conform with Netscapes SSL.
14 *
15 * This library is free for commercial and non-commercial use as long as
16 * the following conditions are aheared to. The following conditions
17 * apply to all code found in this distribution, be it the RC4, RSA,
18 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
19 * included with this distribution is covered by the same copyright terms
20 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21 *
22 * Copyright remains Eric Young's, and as such any Copyright notices in
23 * the code are not to be removed.
24 * If this package is used in a product, Eric Young should be given attribution
25 * as the author of the parts of the library used.
26 * This can be in the form of a textual message at program startup or
27 * in documentation (online or textual) provided with the package.
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 * 1. Redistributions of source code must retain the copyright
33 * notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright
35 * notice, this list of conditions and the following disclaimer in the
36 * documentation and/or other materials provided with the distribution.
37 * 3. All advertising materials mentioning features or use of this software
38 * must display the following acknowledgement:
39 * "This product includes cryptographic software written by
40 * Eric Young (eay@cryptsoft.com)"
41 * The word 'cryptographic' can be left out if the rouines from the library
42 * being used are not cryptographic related :-).
43 * 4. If you include any Windows specific code (or a derivative thereof) from
44 * the apps directory (application code) you must include an acknowledgement:
45 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
46 *
47 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
48 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
50 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
51 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
53 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
54 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
55 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
56 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57 * SUCH DAMAGE.
58 *
59 * The licence and distribution terms for any publically available version or
60 * derivative of this code cannot be changed. i.e. this code cannot simply be
61 * copied and put under another distribution licence
62 * [including the GNU Public Licence.]
63 */
64
65#define SN_undef "UNDEF"
66#define LN_undef "undefined"
67#define NID_undef 0
68#define OBJ_undef 0L
69
70#define SN_ccitt "CCITT"
71#define LN_ccitt "ccitt"
72#define NID_ccitt 404
73#define OBJ_ccitt 0L
74
75#define SN_iso "ISO"
76#define LN_iso "iso"
77#define NID_iso 181
78#define OBJ_iso 1L
79
80#define SN_joint_iso_ccitt "JOINT-ISO-CCITT"
81#define LN_joint_iso_ccitt "joint-iso-ccitt"
82#define NID_joint_iso_ccitt 393
83#define OBJ_joint_iso_ccitt 2L
84
85#define SN_member_body "member-body"
86#define LN_member_body "ISO Member Body"
87#define NID_member_body 182
88#define OBJ_member_body OBJ_iso,2L
89
90#define SN_selected_attribute_types "selected-attribute-types"
91#define LN_selected_attribute_types "Selected Attribute Types"
92#define NID_selected_attribute_types 394
93#define OBJ_selected_attribute_types OBJ_joint_iso_ccitt,5L,1L,5L
94
95#define SN_clearance "clearance"
96#define NID_clearance 395
97#define OBJ_clearance OBJ_selected_attribute_types,55L
98
99#define SN_ISO_US "ISO-US"
100#define LN_ISO_US "ISO US Member Body"
101#define NID_ISO_US 183
102#define OBJ_ISO_US OBJ_member_body,840L
103
104#define SN_X9_57 "X9-57"
105#define LN_X9_57 "X9.57"
106#define NID_X9_57 184
107#define OBJ_X9_57 OBJ_ISO_US,10040L
108
109#define SN_X9cm "X9cm"
110#define LN_X9cm "X9.57 CM ?"
111#define NID_X9cm 185
112#define OBJ_X9cm OBJ_X9_57,4L
113
114#define SN_dsa "DSA"
115#define LN_dsa "dsaEncryption"
116#define NID_dsa 116
117#define OBJ_dsa OBJ_X9cm,1L
118
119#define SN_dsaWithSHA1 "DSA-SHA1"
120#define LN_dsaWithSHA1 "dsaWithSHA1"
121#define NID_dsaWithSHA1 113
122#define OBJ_dsaWithSHA1 OBJ_X9cm,3L
123
124#define SN_ansi_X9_62 "ansi-X9-62"
125#define LN_ansi_X9_62 "ANSI X9.62"
126#define NID_ansi_X9_62 405
127#define OBJ_ansi_X9_62 OBJ_ISO_US,10045L
128
129#define OBJ_X9_62_id_fieldType OBJ_ansi_X9_62,1L
130
131#define SN_X9_62_prime_field "prime-field"
132#define NID_X9_62_prime_field 406
133#define OBJ_X9_62_prime_field OBJ_X9_62_id_fieldType,1L
134
135#define SN_X9_62_characteristic_two_field "characteristic-two-field"
136#define NID_X9_62_characteristic_two_field 407
137#define OBJ_X9_62_characteristic_two_field OBJ_X9_62_id_fieldType,2L
138
139#define OBJ_X9_62_id_publicKeyType OBJ_ansi_X9_62,2L
140
141#define SN_X9_62_id_ecPublicKey "id-ecPublicKey"
142#define NID_X9_62_id_ecPublicKey 408
143#define OBJ_X9_62_id_ecPublicKey OBJ_X9_62_id_publicKeyType,1L
144
145#define OBJ_X9_62_ellipticCurve OBJ_ansi_X9_62,3L
146
147#define OBJ_X9_62_c_TwoCurve OBJ_X9_62_ellipticCurve,0L
148
149#define OBJ_X9_62_primeCurve OBJ_X9_62_ellipticCurve,1L
150
151#define SN_X9_62_prime192v1 "prime192v1"
152#define NID_X9_62_prime192v1 409
153#define OBJ_X9_62_prime192v1 OBJ_X9_62_primeCurve,1L
154
155#define SN_X9_62_prime192v2 "prime192v2"
156#define NID_X9_62_prime192v2 410
157#define OBJ_X9_62_prime192v2 OBJ_X9_62_primeCurve,2L
158
159#define SN_X9_62_prime192v3 "prime192v3"
160#define NID_X9_62_prime192v3 411
161#define OBJ_X9_62_prime192v3 OBJ_X9_62_primeCurve,3L
162
163#define SN_X9_62_prime239v1 "prime239v1"
164#define NID_X9_62_prime239v1 412
165#define OBJ_X9_62_prime239v1 OBJ_X9_62_primeCurve,4L
166
167#define SN_X9_62_prime239v2 "prime239v2"
168#define NID_X9_62_prime239v2 413
169#define OBJ_X9_62_prime239v2 OBJ_X9_62_primeCurve,5L
170
171#define SN_X9_62_prime239v3 "prime239v3"
172#define NID_X9_62_prime239v3 414
173#define OBJ_X9_62_prime239v3 OBJ_X9_62_primeCurve,6L
174
175#define SN_X9_62_prime256v1 "prime256v1"
176#define NID_X9_62_prime256v1 415
177#define OBJ_X9_62_prime256v1 OBJ_X9_62_primeCurve,7L
178
179#define OBJ_X9_62_id_ecSigType OBJ_ansi_X9_62,4L
180
181#define SN_ecdsa_with_SHA1 "ecdsa-with-SHA1"
182#define NID_ecdsa_with_SHA1 416
183#define OBJ_ecdsa_with_SHA1 OBJ_X9_62_id_ecSigType,1L
184
185#define SN_cast5_cbc "CAST5-CBC"
186#define LN_cast5_cbc "cast5-cbc"
187#define NID_cast5_cbc 108
188#define OBJ_cast5_cbc OBJ_ISO_US,113533L,7L,66L,10L
189
190#define SN_cast5_ecb "CAST5-ECB"
191#define LN_cast5_ecb "cast5-ecb"
192#define NID_cast5_ecb 109
193
194#define SN_cast5_cfb64 "CAST5-CFB"
195#define LN_cast5_cfb64 "cast5-cfb"
196#define NID_cast5_cfb64 110
197
198#define SN_cast5_ofb64 "CAST5-OFB"
199#define LN_cast5_ofb64 "cast5-ofb"
200#define NID_cast5_ofb64 111
201
202#define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC"
203#define NID_pbeWithMD5AndCast5_CBC 112
204#define OBJ_pbeWithMD5AndCast5_CBC OBJ_ISO_US,113533L,7L,66L,12L
205
206#define SN_rsadsi "rsadsi"
207#define LN_rsadsi "RSA Data Security, Inc."
208#define NID_rsadsi 1
209#define OBJ_rsadsi OBJ_ISO_US,113549L
210
211#define SN_pkcs "pkcs"
212#define LN_pkcs "RSA Data Security, Inc. PKCS"
213#define NID_pkcs 2
214#define OBJ_pkcs OBJ_rsadsi,1L
215
216#define SN_pkcs1 "pkcs1"
217#define NID_pkcs1 186
218#define OBJ_pkcs1 OBJ_pkcs,1L
219
220#define LN_rsaEncryption "rsaEncryption"
221#define NID_rsaEncryption 6
222#define OBJ_rsaEncryption OBJ_pkcs1,1L
223
224#define SN_md2WithRSAEncryption "RSA-MD2"
225#define LN_md2WithRSAEncryption "md2WithRSAEncryption"
226#define NID_md2WithRSAEncryption 7
227#define OBJ_md2WithRSAEncryption OBJ_pkcs1,2L
228
229#define SN_md4WithRSAEncryption "RSA-MD4"
230#define LN_md4WithRSAEncryption "md4WithRSAEncryption"
231#define NID_md4WithRSAEncryption 396
232#define OBJ_md4WithRSAEncryption OBJ_pkcs1,3L
233
234#define SN_md5WithRSAEncryption "RSA-MD5"
235#define LN_md5WithRSAEncryption "md5WithRSAEncryption"
236#define NID_md5WithRSAEncryption 8
237#define OBJ_md5WithRSAEncryption OBJ_pkcs1,4L
238
239#define SN_sha1WithRSAEncryption "RSA-SHA1"
240#define LN_sha1WithRSAEncryption "sha1WithRSAEncryption"
241#define NID_sha1WithRSAEncryption 65
242#define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L
243
244#define SN_pkcs3 "pkcs3"
245#define NID_pkcs3 27
246#define OBJ_pkcs3 OBJ_pkcs,3L
247
248#define LN_dhKeyAgreement "dhKeyAgreement"
249#define NID_dhKeyAgreement 28
250#define OBJ_dhKeyAgreement OBJ_pkcs3,1L
251
252#define SN_pkcs5 "pkcs5"
253#define NID_pkcs5 187
254#define OBJ_pkcs5 OBJ_pkcs,5L
255
256#define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES"
257#define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC"
258#define NID_pbeWithMD2AndDES_CBC 9
259#define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs5,1L
260
261#define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES"
262#define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC"
263#define NID_pbeWithMD5AndDES_CBC 10
264#define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs5,3L
265
266#define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64"
267#define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC"
268#define NID_pbeWithMD2AndRC2_CBC 168
269#define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs5,4L
270
271#define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64"
272#define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC"
273#define NID_pbeWithMD5AndRC2_CBC 169
274#define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs5,6L
275
276#define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES"
277#define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC"
278#define NID_pbeWithSHA1AndDES_CBC 170
279#define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs5,10L
280
281#define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64"
282#define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC"
283#define NID_pbeWithSHA1AndRC2_CBC 68
284#define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs5,11L
285
286#define LN_id_pbkdf2 "PBKDF2"
287#define NID_id_pbkdf2 69
288#define OBJ_id_pbkdf2 OBJ_pkcs5,12L
289
290#define LN_pbes2 "PBES2"
291#define NID_pbes2 161
292#define OBJ_pbes2 OBJ_pkcs5,13L
293
294#define LN_pbmac1 "PBMAC1"
295#define NID_pbmac1 162
296#define OBJ_pbmac1 OBJ_pkcs5,14L
297
298#define SN_pkcs7 "pkcs7"
299#define NID_pkcs7 20
300#define OBJ_pkcs7 OBJ_pkcs,7L
301
302#define LN_pkcs7_data "pkcs7-data"
303#define NID_pkcs7_data 21
304#define OBJ_pkcs7_data OBJ_pkcs7,1L
305
306#define LN_pkcs7_signed "pkcs7-signedData"
307#define NID_pkcs7_signed 22
308#define OBJ_pkcs7_signed OBJ_pkcs7,2L
309
310#define LN_pkcs7_enveloped "pkcs7-envelopedData"
311#define NID_pkcs7_enveloped 23
312#define OBJ_pkcs7_enveloped OBJ_pkcs7,3L
313
314#define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData"
315#define NID_pkcs7_signedAndEnveloped 24
316#define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L
317
318#define LN_pkcs7_digest "pkcs7-digestData"
319#define NID_pkcs7_digest 25
320#define OBJ_pkcs7_digest OBJ_pkcs7,5L
321
322#define LN_pkcs7_encrypted "pkcs7-encryptedData"
323#define NID_pkcs7_encrypted 26
324#define OBJ_pkcs7_encrypted OBJ_pkcs7,6L
325
326#define SN_pkcs9 "pkcs9"
327#define NID_pkcs9 47
328#define OBJ_pkcs9 OBJ_pkcs,9L
329
330#define LN_pkcs9_emailAddress "emailAddress"
331#define NID_pkcs9_emailAddress 48
332#define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L
333
334#define LN_pkcs9_unstructuredName "unstructuredName"
335#define NID_pkcs9_unstructuredName 49
336#define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L
337
338#define LN_pkcs9_contentType "contentType"
339#define NID_pkcs9_contentType 50
340#define OBJ_pkcs9_contentType OBJ_pkcs9,3L
341
342#define LN_pkcs9_messageDigest "messageDigest"
343#define NID_pkcs9_messageDigest 51
344#define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L
345
346#define LN_pkcs9_signingTime "signingTime"
347#define NID_pkcs9_signingTime 52
348#define OBJ_pkcs9_signingTime OBJ_pkcs9,5L
349
350#define LN_pkcs9_countersignature "countersignature"
351#define NID_pkcs9_countersignature 53
352#define OBJ_pkcs9_countersignature OBJ_pkcs9,6L
353
354#define LN_pkcs9_challengePassword "challengePassword"
355#define NID_pkcs9_challengePassword 54
356#define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L
357
358#define LN_pkcs9_unstructuredAddress "unstructuredAddress"
359#define NID_pkcs9_unstructuredAddress 55
360#define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L
361
362#define LN_pkcs9_extCertAttributes "extendedCertificateAttributes"
363#define NID_pkcs9_extCertAttributes 56
364#define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L
365
366#define SN_ext_req "extReq"
367#define LN_ext_req "Extension Request"
368#define NID_ext_req 172
369#define OBJ_ext_req OBJ_pkcs9,14L
370
371#define SN_SMIMECapabilities "SMIME-CAPS"
372#define LN_SMIMECapabilities "S/MIME Capabilities"
373#define NID_SMIMECapabilities 167
374#define OBJ_SMIMECapabilities OBJ_pkcs9,15L
375
376#define SN_SMIME "SMIME"
377#define LN_SMIME "S/MIME"
378#define NID_SMIME 188
379#define OBJ_SMIME OBJ_pkcs9,16L
380
381#define SN_id_smime_mod "id-smime-mod"
382#define NID_id_smime_mod 189
383#define OBJ_id_smime_mod OBJ_SMIME,0L
384
385#define SN_id_smime_ct "id-smime-ct"
386#define NID_id_smime_ct 190
387#define OBJ_id_smime_ct OBJ_SMIME,1L
388
389#define SN_id_smime_aa "id-smime-aa"
390#define NID_id_smime_aa 191
391#define OBJ_id_smime_aa OBJ_SMIME,2L
392
393#define SN_id_smime_alg "id-smime-alg"
394#define NID_id_smime_alg 192
395#define OBJ_id_smime_alg OBJ_SMIME,3L
396
397#define SN_id_smime_cd "id-smime-cd"
398#define NID_id_smime_cd 193
399#define OBJ_id_smime_cd OBJ_SMIME,4L
400
401#define SN_id_smime_spq "id-smime-spq"
402#define NID_id_smime_spq 194
403#define OBJ_id_smime_spq OBJ_SMIME,5L
404
405#define SN_id_smime_cti "id-smime-cti"
406#define NID_id_smime_cti 195
407#define OBJ_id_smime_cti OBJ_SMIME,6L
408
409#define SN_id_smime_mod_cms "id-smime-mod-cms"
410#define NID_id_smime_mod_cms 196
411#define OBJ_id_smime_mod_cms OBJ_id_smime_mod,1L
412
413#define SN_id_smime_mod_ess "id-smime-mod-ess"
414#define NID_id_smime_mod_ess 197
415#define OBJ_id_smime_mod_ess OBJ_id_smime_mod,2L
416
417#define SN_id_smime_mod_oid "id-smime-mod-oid"
418#define NID_id_smime_mod_oid 198
419#define OBJ_id_smime_mod_oid OBJ_id_smime_mod,3L
420
421#define SN_id_smime_mod_msg_v3 "id-smime-mod-msg-v3"
422#define NID_id_smime_mod_msg_v3 199
423#define OBJ_id_smime_mod_msg_v3 OBJ_id_smime_mod,4L
424
425#define SN_id_smime_mod_ets_eSignature_88 "id-smime-mod-ets-eSignature-88"
426#define NID_id_smime_mod_ets_eSignature_88 200
427#define OBJ_id_smime_mod_ets_eSignature_88 OBJ_id_smime_mod,5L
428
429#define SN_id_smime_mod_ets_eSignature_97 "id-smime-mod-ets-eSignature-97"
430#define NID_id_smime_mod_ets_eSignature_97 201
431#define OBJ_id_smime_mod_ets_eSignature_97 OBJ_id_smime_mod,6L
432
433#define SN_id_smime_mod_ets_eSigPolicy_88 "id-smime-mod-ets-eSigPolicy-88"
434#define NID_id_smime_mod_ets_eSigPolicy_88 202
435#define OBJ_id_smime_mod_ets_eSigPolicy_88 OBJ_id_smime_mod,7L
436
437#define SN_id_smime_mod_ets_eSigPolicy_97 "id-smime-mod-ets-eSigPolicy-97"
438#define NID_id_smime_mod_ets_eSigPolicy_97 203
439#define OBJ_id_smime_mod_ets_eSigPolicy_97 OBJ_id_smime_mod,8L
440
441#define SN_id_smime_ct_receipt "id-smime-ct-receipt"
442#define NID_id_smime_ct_receipt 204
443#define OBJ_id_smime_ct_receipt OBJ_id_smime_ct,1L
444
445#define SN_id_smime_ct_authData "id-smime-ct-authData"
446#define NID_id_smime_ct_authData 205
447#define OBJ_id_smime_ct_authData OBJ_id_smime_ct,2L
448
449#define SN_id_smime_ct_publishCert "id-smime-ct-publishCert"
450#define NID_id_smime_ct_publishCert 206
451#define OBJ_id_smime_ct_publishCert OBJ_id_smime_ct,3L
452
453#define SN_id_smime_ct_TSTInfo "id-smime-ct-TSTInfo"
454#define NID_id_smime_ct_TSTInfo 207
455#define OBJ_id_smime_ct_TSTInfo OBJ_id_smime_ct,4L
456
457#define SN_id_smime_ct_TDTInfo "id-smime-ct-TDTInfo"
458#define NID_id_smime_ct_TDTInfo 208
459#define OBJ_id_smime_ct_TDTInfo OBJ_id_smime_ct,5L
460
461#define SN_id_smime_ct_contentInfo "id-smime-ct-contentInfo"
462#define NID_id_smime_ct_contentInfo 209
463#define OBJ_id_smime_ct_contentInfo OBJ_id_smime_ct,6L
464
465#define SN_id_smime_ct_DVCSRequestData "id-smime-ct-DVCSRequestData"
466#define NID_id_smime_ct_DVCSRequestData 210
467#define OBJ_id_smime_ct_DVCSRequestData OBJ_id_smime_ct,7L
468
469#define SN_id_smime_ct_DVCSResponseData "id-smime-ct-DVCSResponseData"
470#define NID_id_smime_ct_DVCSResponseData 211
471#define OBJ_id_smime_ct_DVCSResponseData OBJ_id_smime_ct,8L
472
473#define SN_id_smime_aa_receiptRequest "id-smime-aa-receiptRequest"
474#define NID_id_smime_aa_receiptRequest 212
475#define OBJ_id_smime_aa_receiptRequest OBJ_id_smime_aa,1L
476
477#define SN_id_smime_aa_securityLabel "id-smime-aa-securityLabel"
478#define NID_id_smime_aa_securityLabel 213
479#define OBJ_id_smime_aa_securityLabel OBJ_id_smime_aa,2L
480
481#define SN_id_smime_aa_mlExpandHistory "id-smime-aa-mlExpandHistory"
482#define NID_id_smime_aa_mlExpandHistory 214
483#define OBJ_id_smime_aa_mlExpandHistory OBJ_id_smime_aa,3L
484
485#define SN_id_smime_aa_contentHint "id-smime-aa-contentHint"
486#define NID_id_smime_aa_contentHint 215
487#define OBJ_id_smime_aa_contentHint OBJ_id_smime_aa,4L
488
489#define SN_id_smime_aa_msgSigDigest "id-smime-aa-msgSigDigest"
490#define NID_id_smime_aa_msgSigDigest 216
491#define OBJ_id_smime_aa_msgSigDigest OBJ_id_smime_aa,5L
492
493#define SN_id_smime_aa_encapContentType "id-smime-aa-encapContentType"
494#define NID_id_smime_aa_encapContentType 217
495#define OBJ_id_smime_aa_encapContentType OBJ_id_smime_aa,6L
496
497#define SN_id_smime_aa_contentIdentifier "id-smime-aa-contentIdentifier"
498#define NID_id_smime_aa_contentIdentifier 218
499#define OBJ_id_smime_aa_contentIdentifier OBJ_id_smime_aa,7L
500
501#define SN_id_smime_aa_macValue "id-smime-aa-macValue"
502#define NID_id_smime_aa_macValue 219
503#define OBJ_id_smime_aa_macValue OBJ_id_smime_aa,8L
504
505#define SN_id_smime_aa_equivalentLabels "id-smime-aa-equivalentLabels"
506#define NID_id_smime_aa_equivalentLabels 220
507#define OBJ_id_smime_aa_equivalentLabels OBJ_id_smime_aa,9L
508
509#define SN_id_smime_aa_contentReference "id-smime-aa-contentReference"
510#define NID_id_smime_aa_contentReference 221
511#define OBJ_id_smime_aa_contentReference OBJ_id_smime_aa,10L
512
513#define SN_id_smime_aa_encrypKeyPref "id-smime-aa-encrypKeyPref"
514#define NID_id_smime_aa_encrypKeyPref 222
515#define OBJ_id_smime_aa_encrypKeyPref OBJ_id_smime_aa,11L
516
517#define SN_id_smime_aa_signingCertificate "id-smime-aa-signingCertificate"
518#define NID_id_smime_aa_signingCertificate 223
519#define OBJ_id_smime_aa_signingCertificate OBJ_id_smime_aa,12L
520
521#define SN_id_smime_aa_smimeEncryptCerts "id-smime-aa-smimeEncryptCerts"
522#define NID_id_smime_aa_smimeEncryptCerts 224
523#define OBJ_id_smime_aa_smimeEncryptCerts OBJ_id_smime_aa,13L
524
525#define SN_id_smime_aa_timeStampToken "id-smime-aa-timeStampToken"
526#define NID_id_smime_aa_timeStampToken 225
527#define OBJ_id_smime_aa_timeStampToken OBJ_id_smime_aa,14L
528
529#define SN_id_smime_aa_ets_sigPolicyId "id-smime-aa-ets-sigPolicyId"
530#define NID_id_smime_aa_ets_sigPolicyId 226
531#define OBJ_id_smime_aa_ets_sigPolicyId OBJ_id_smime_aa,15L
532
533#define SN_id_smime_aa_ets_commitmentType "id-smime-aa-ets-commitmentType"
534#define NID_id_smime_aa_ets_commitmentType 227
535#define OBJ_id_smime_aa_ets_commitmentType OBJ_id_smime_aa,16L
536
537#define SN_id_smime_aa_ets_signerLocation "id-smime-aa-ets-signerLocation"
538#define NID_id_smime_aa_ets_signerLocation 228
539#define OBJ_id_smime_aa_ets_signerLocation OBJ_id_smime_aa,17L
540
541#define SN_id_smime_aa_ets_signerAttr "id-smime-aa-ets-signerAttr"
542#define NID_id_smime_aa_ets_signerAttr 229
543#define OBJ_id_smime_aa_ets_signerAttr OBJ_id_smime_aa,18L
544
545#define SN_id_smime_aa_ets_otherSigCert "id-smime-aa-ets-otherSigCert"
546#define NID_id_smime_aa_ets_otherSigCert 230
547#define OBJ_id_smime_aa_ets_otherSigCert OBJ_id_smime_aa,19L
548
549#define SN_id_smime_aa_ets_contentTimestamp "id-smime-aa-ets-contentTimestamp"
550#define NID_id_smime_aa_ets_contentTimestamp 231
551#define OBJ_id_smime_aa_ets_contentTimestamp OBJ_id_smime_aa,20L
552
553#define SN_id_smime_aa_ets_CertificateRefs "id-smime-aa-ets-CertificateRefs"
554#define NID_id_smime_aa_ets_CertificateRefs 232
555#define OBJ_id_smime_aa_ets_CertificateRefs OBJ_id_smime_aa,21L
556
557#define SN_id_smime_aa_ets_RevocationRefs "id-smime-aa-ets-RevocationRefs"
558#define NID_id_smime_aa_ets_RevocationRefs 233
559#define OBJ_id_smime_aa_ets_RevocationRefs OBJ_id_smime_aa,22L
560
561#define SN_id_smime_aa_ets_certValues "id-smime-aa-ets-certValues"
562#define NID_id_smime_aa_ets_certValues 234
563#define OBJ_id_smime_aa_ets_certValues OBJ_id_smime_aa,23L
564
565#define SN_id_smime_aa_ets_revocationValues "id-smime-aa-ets-revocationValues"
566#define NID_id_smime_aa_ets_revocationValues 235
567#define OBJ_id_smime_aa_ets_revocationValues OBJ_id_smime_aa,24L
568
569#define SN_id_smime_aa_ets_escTimeStamp "id-smime-aa-ets-escTimeStamp"
570#define NID_id_smime_aa_ets_escTimeStamp 236
571#define OBJ_id_smime_aa_ets_escTimeStamp OBJ_id_smime_aa,25L
572
573#define SN_id_smime_aa_ets_certCRLTimestamp "id-smime-aa-ets-certCRLTimestamp"
574#define NID_id_smime_aa_ets_certCRLTimestamp 237
575#define OBJ_id_smime_aa_ets_certCRLTimestamp OBJ_id_smime_aa,26L
576
577#define SN_id_smime_aa_ets_archiveTimeStamp "id-smime-aa-ets-archiveTimeStamp"
578#define NID_id_smime_aa_ets_archiveTimeStamp 238
579#define OBJ_id_smime_aa_ets_archiveTimeStamp OBJ_id_smime_aa,27L
580
581#define SN_id_smime_aa_signatureType "id-smime-aa-signatureType"
582#define NID_id_smime_aa_signatureType 239
583#define OBJ_id_smime_aa_signatureType OBJ_id_smime_aa,28L
584
585#define SN_id_smime_aa_dvcs_dvc "id-smime-aa-dvcs-dvc"
586#define NID_id_smime_aa_dvcs_dvc 240
587#define OBJ_id_smime_aa_dvcs_dvc OBJ_id_smime_aa,29L
588
589#define SN_id_smime_alg_ESDHwith3DES "id-smime-alg-ESDHwith3DES"
590#define NID_id_smime_alg_ESDHwith3DES 241
591#define OBJ_id_smime_alg_ESDHwith3DES OBJ_id_smime_alg,1L
592
593#define SN_id_smime_alg_ESDHwithRC2 "id-smime-alg-ESDHwithRC2"
594#define NID_id_smime_alg_ESDHwithRC2 242
595#define OBJ_id_smime_alg_ESDHwithRC2 OBJ_id_smime_alg,2L
596
597#define SN_id_smime_alg_3DESwrap "id-smime-alg-3DESwrap"
598#define NID_id_smime_alg_3DESwrap 243
599#define OBJ_id_smime_alg_3DESwrap OBJ_id_smime_alg,3L
600
601#define SN_id_smime_alg_RC2wrap "id-smime-alg-RC2wrap"
602#define NID_id_smime_alg_RC2wrap 244
603#define OBJ_id_smime_alg_RC2wrap OBJ_id_smime_alg,4L
604
605#define SN_id_smime_alg_ESDH "id-smime-alg-ESDH"
606#define NID_id_smime_alg_ESDH 245
607#define OBJ_id_smime_alg_ESDH OBJ_id_smime_alg,5L
608
609#define SN_id_smime_alg_CMS3DESwrap "id-smime-alg-CMS3DESwrap"
610#define NID_id_smime_alg_CMS3DESwrap 246
611#define OBJ_id_smime_alg_CMS3DESwrap OBJ_id_smime_alg,6L
612
613#define SN_id_smime_alg_CMSRC2wrap "id-smime-alg-CMSRC2wrap"
614#define NID_id_smime_alg_CMSRC2wrap 247
615#define OBJ_id_smime_alg_CMSRC2wrap OBJ_id_smime_alg,7L
616
617#define SN_id_smime_cd_ldap "id-smime-cd-ldap"
618#define NID_id_smime_cd_ldap 248
619#define OBJ_id_smime_cd_ldap OBJ_id_smime_cd,1L
620
621#define SN_id_smime_spq_ets_sqt_uri "id-smime-spq-ets-sqt-uri"
622#define NID_id_smime_spq_ets_sqt_uri 249
623#define OBJ_id_smime_spq_ets_sqt_uri OBJ_id_smime_spq,1L
624
625#define SN_id_smime_spq_ets_sqt_unotice "id-smime-spq-ets-sqt-unotice"
626#define NID_id_smime_spq_ets_sqt_unotice 250
627#define OBJ_id_smime_spq_ets_sqt_unotice OBJ_id_smime_spq,2L
628
629#define SN_id_smime_cti_ets_proofOfOrigin "id-smime-cti-ets-proofOfOrigin"
630#define NID_id_smime_cti_ets_proofOfOrigin 251
631#define OBJ_id_smime_cti_ets_proofOfOrigin OBJ_id_smime_cti,1L
632
633#define SN_id_smime_cti_ets_proofOfReceipt "id-smime-cti-ets-proofOfReceipt"
634#define NID_id_smime_cti_ets_proofOfReceipt 252
635#define OBJ_id_smime_cti_ets_proofOfReceipt OBJ_id_smime_cti,2L
636
637#define SN_id_smime_cti_ets_proofOfDelivery "id-smime-cti-ets-proofOfDelivery"
638#define NID_id_smime_cti_ets_proofOfDelivery 253
639#define OBJ_id_smime_cti_ets_proofOfDelivery OBJ_id_smime_cti,3L
640
641#define SN_id_smime_cti_ets_proofOfSender "id-smime-cti-ets-proofOfSender"
642#define NID_id_smime_cti_ets_proofOfSender 254
643#define OBJ_id_smime_cti_ets_proofOfSender OBJ_id_smime_cti,4L
644
645#define SN_id_smime_cti_ets_proofOfApproval "id-smime-cti-ets-proofOfApproval"
646#define NID_id_smime_cti_ets_proofOfApproval 255
647#define OBJ_id_smime_cti_ets_proofOfApproval OBJ_id_smime_cti,5L
648
649#define SN_id_smime_cti_ets_proofOfCreation "id-smime-cti-ets-proofOfCreation"
650#define NID_id_smime_cti_ets_proofOfCreation 256
651#define OBJ_id_smime_cti_ets_proofOfCreation OBJ_id_smime_cti,6L
652
653#define LN_friendlyName "friendlyName"
654#define NID_friendlyName 156
655#define OBJ_friendlyName OBJ_pkcs9,20L
656
657#define LN_localKeyID "localKeyID"
658#define NID_localKeyID 157
659#define OBJ_localKeyID OBJ_pkcs9,21L
660
661#define SN_ms_csp_name "CSPName"
662#define LN_ms_csp_name "Microsoft CSP Name"
663#define NID_ms_csp_name 417
664#define OBJ_ms_csp_name 1L,3L,6L,1L,4L,1L,311L,17L,1L
665
666#define OBJ_certTypes OBJ_pkcs9,22L
667
668#define LN_x509Certificate "x509Certificate"
669#define NID_x509Certificate 158
670#define OBJ_x509Certificate OBJ_certTypes,1L
671
672#define LN_sdsiCertificate "sdsiCertificate"
673#define NID_sdsiCertificate 159
674#define OBJ_sdsiCertificate OBJ_certTypes,2L
675
676#define OBJ_crlTypes OBJ_pkcs9,23L
677
678#define LN_x509Crl "x509Crl"
679#define NID_x509Crl 160
680#define OBJ_x509Crl OBJ_crlTypes,1L
681
682#define OBJ_pkcs12 OBJ_pkcs,12L
683
684#define OBJ_pkcs12_pbeids OBJ_pkcs12,1L
685
686#define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128"
687#define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4"
688#define NID_pbe_WithSHA1And128BitRC4 144
689#define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids,1L
690
691#define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40"
692#define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4"
693#define NID_pbe_WithSHA1And40BitRC4 145
694#define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids,2L
695
696#define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES"
697#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC"
698#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146
699#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids,3L
700
701#define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES"
702#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC"
703#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147
704#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids,4L
705
706#define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128"
707#define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC"
708#define NID_pbe_WithSHA1And128BitRC2_CBC 148
709#define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids,5L
710
711#define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40"
712#define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC"
713#define NID_pbe_WithSHA1And40BitRC2_CBC 149
714#define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids,6L
715
716#define OBJ_pkcs12_Version1 OBJ_pkcs12,10L
717
718#define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1,1L
719
720#define LN_keyBag "keyBag"
721#define NID_keyBag 150
722#define OBJ_keyBag OBJ_pkcs12_BagIds,1L
723
724#define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag"
725#define NID_pkcs8ShroudedKeyBag 151
726#define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds,2L
727
728#define LN_certBag "certBag"
729#define NID_certBag 152
730#define OBJ_certBag OBJ_pkcs12_BagIds,3L
731
732#define LN_crlBag "crlBag"
733#define NID_crlBag 153
734#define OBJ_crlBag OBJ_pkcs12_BagIds,4L
735
736#define LN_secretBag "secretBag"
737#define NID_secretBag 154
738#define OBJ_secretBag OBJ_pkcs12_BagIds,5L
739
740#define LN_safeContentsBag "safeContentsBag"
741#define NID_safeContentsBag 155
742#define OBJ_safeContentsBag OBJ_pkcs12_BagIds,6L
743
744#define SN_md2 "MD2"
745#define LN_md2 "md2"
746#define NID_md2 3
747#define OBJ_md2 OBJ_rsadsi,2L,2L
748
749#define SN_md4 "MD4"
750#define LN_md4 "md4"
751#define NID_md4 257
752#define OBJ_md4 OBJ_rsadsi,2L,4L
753
754#define SN_md5 "MD5"
755#define LN_md5 "md5"
756#define NID_md5 4
757#define OBJ_md5 OBJ_rsadsi,2L,5L
758
759#define SN_md5_sha1 "MD5-SHA1"
760#define LN_md5_sha1 "md5-sha1"
761#define NID_md5_sha1 114
762
763#define LN_hmacWithSHA1 "hmacWithSHA1"
764#define NID_hmacWithSHA1 163
765#define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L
766
767#define SN_rc2_cbc "RC2-CBC"
768#define LN_rc2_cbc "rc2-cbc"
769#define NID_rc2_cbc 37
770#define OBJ_rc2_cbc OBJ_rsadsi,3L,2L
771
772#define SN_rc2_ecb "RC2-ECB"
773#define LN_rc2_ecb "rc2-ecb"
774#define NID_rc2_ecb 38
775
776#define SN_rc2_cfb64 "RC2-CFB"
777#define LN_rc2_cfb64 "rc2-cfb"
778#define NID_rc2_cfb64 39
779
780#define SN_rc2_ofb64 "RC2-OFB"
781#define LN_rc2_ofb64 "rc2-ofb"
782#define NID_rc2_ofb64 40
783
784#define SN_rc2_40_cbc "RC2-40-CBC"
785#define LN_rc2_40_cbc "rc2-40-cbc"
786#define NID_rc2_40_cbc 98
787
788#define SN_rc2_64_cbc "RC2-64-CBC"
789#define LN_rc2_64_cbc "rc2-64-cbc"
790#define NID_rc2_64_cbc 166
791
792#define SN_rc4 "RC4"
793#define LN_rc4 "rc4"
794#define NID_rc4 5
795#define OBJ_rc4 OBJ_rsadsi,3L,4L
796
797#define SN_rc4_40 "RC4-40"
798#define LN_rc4_40 "rc4-40"
799#define NID_rc4_40 97
800
801#define SN_des_ede3_cbc "DES-EDE3-CBC"
802#define LN_des_ede3_cbc "des-ede3-cbc"
803#define NID_des_ede3_cbc 44
804#define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L
805
806#define SN_rc5_cbc "RC5-CBC"
807#define LN_rc5_cbc "rc5-cbc"
808#define NID_rc5_cbc 120
809#define OBJ_rc5_cbc OBJ_rsadsi,3L,8L
810
811#define SN_rc5_ecb "RC5-ECB"
812#define LN_rc5_ecb "rc5-ecb"
813#define NID_rc5_ecb 121
814
815#define SN_rc5_cfb64 "RC5-CFB"
816#define LN_rc5_cfb64 "rc5-cfb"
817#define NID_rc5_cfb64 122
818
819#define SN_rc5_ofb64 "RC5-OFB"
820#define LN_rc5_ofb64 "rc5-ofb"
821#define NID_rc5_ofb64 123
822
823#define SN_ms_ext_req "msExtReq"
824#define LN_ms_ext_req "Microsoft Extension Request"
825#define NID_ms_ext_req 171
826#define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L
827
828#define SN_ms_code_ind "msCodeInd"
829#define LN_ms_code_ind "Microsoft Individual Code Signing"
830#define NID_ms_code_ind 134
831#define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L
832
833#define SN_ms_code_com "msCodeCom"
834#define LN_ms_code_com "Microsoft Commercial Code Signing"
835#define NID_ms_code_com 135
836#define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L
837
838#define SN_ms_ctl_sign "msCTLSign"
839#define LN_ms_ctl_sign "Microsoft Trust List Signing"
840#define NID_ms_ctl_sign 136
841#define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L
842
843#define SN_ms_sgc "msSGC"
844#define LN_ms_sgc "Microsoft Server Gated Crypto"
845#define NID_ms_sgc 137
846#define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L
847
848#define SN_ms_efs "msEFS"
849#define LN_ms_efs "Microsoft Encrypted File System"
850#define NID_ms_efs 138
851#define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L
852
853#define SN_ms_smartcard_login "msSmartcardLogin"
854#define LN_ms_smartcard_login "Microsoft Smartcardlogin"
855#define NID_ms_smartcard_login 648
856#define OBJ_ms_smartcard_login 1L,3L,6L,1L,4L,1L,311L,20L,2L,2L
857
858#define SN_ms_upn "msUPN"
859#define LN_ms_upn "Microsoft Universal Principal Name"
860#define NID_ms_upn 649
861#define OBJ_ms_upn 1L,3L,6L,1L,4L,1L,311L,20L,2L,3L
862
863#define SN_idea_cbc "IDEA-CBC"
864#define LN_idea_cbc "idea-cbc"
865#define NID_idea_cbc 34
866#define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L
867
868#define SN_idea_ecb "IDEA-ECB"
869#define LN_idea_ecb "idea-ecb"
870#define NID_idea_ecb 36
871
872#define SN_idea_cfb64 "IDEA-CFB"
873#define LN_idea_cfb64 "idea-cfb"
874#define NID_idea_cfb64 35
875
876#define SN_idea_ofb64 "IDEA-OFB"
877#define LN_idea_ofb64 "idea-ofb"
878#define NID_idea_ofb64 46
879
880#define SN_bf_cbc "BF-CBC"
881#define LN_bf_cbc "bf-cbc"
882#define NID_bf_cbc 91
883#define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L
884
885#define SN_bf_ecb "BF-ECB"
886#define LN_bf_ecb "bf-ecb"
887#define NID_bf_ecb 92
888
889#define SN_bf_cfb64 "BF-CFB"
890#define LN_bf_cfb64 "bf-cfb"
891#define NID_bf_cfb64 93
892
893#define SN_bf_ofb64 "BF-OFB"
894#define LN_bf_ofb64 "bf-ofb"
895#define NID_bf_ofb64 94
896
897#define SN_id_pkix "PKIX"
898#define NID_id_pkix 127
899#define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L
900
901#define SN_id_pkix_mod "id-pkix-mod"
902#define NID_id_pkix_mod 258
903#define OBJ_id_pkix_mod OBJ_id_pkix,0L
904
905#define SN_id_pe "id-pe"
906#define NID_id_pe 175
907#define OBJ_id_pe OBJ_id_pkix,1L
908
909#define SN_id_qt "id-qt"
910#define NID_id_qt 259
911#define OBJ_id_qt OBJ_id_pkix,2L
912
913#define SN_id_kp "id-kp"
914#define NID_id_kp 128
915#define OBJ_id_kp OBJ_id_pkix,3L
916
917#define SN_id_it "id-it"
918#define NID_id_it 260
919#define OBJ_id_it OBJ_id_pkix,4L
920
921#define SN_id_pkip "id-pkip"
922#define NID_id_pkip 261
923#define OBJ_id_pkip OBJ_id_pkix,5L
924
925#define SN_id_alg "id-alg"
926#define NID_id_alg 262
927#define OBJ_id_alg OBJ_id_pkix,6L
928
929#define SN_id_cmc "id-cmc"
930#define NID_id_cmc 263
931#define OBJ_id_cmc OBJ_id_pkix,7L
932
933#define SN_id_on "id-on"
934#define NID_id_on 264
935#define OBJ_id_on OBJ_id_pkix,8L
936
937#define SN_id_pda "id-pda"
938#define NID_id_pda 265
939#define OBJ_id_pda OBJ_id_pkix,9L
940
941#define SN_id_aca "id-aca"
942#define NID_id_aca 266
943#define OBJ_id_aca OBJ_id_pkix,10L
944
945#define SN_id_qcs "id-qcs"
946#define NID_id_qcs 267
947#define OBJ_id_qcs OBJ_id_pkix,11L
948
949#define SN_id_cct "id-cct"
950#define NID_id_cct 268
951#define OBJ_id_cct OBJ_id_pkix,12L
952
953#define SN_id_ad "id-ad"
954#define NID_id_ad 176
955#define OBJ_id_ad OBJ_id_pkix,48L
956
957#define SN_id_pkix1_explicit_88 "id-pkix1-explicit-88"
958#define NID_id_pkix1_explicit_88 269
959#define OBJ_id_pkix1_explicit_88 OBJ_id_pkix_mod,1L
960
961#define SN_id_pkix1_implicit_88 "id-pkix1-implicit-88"
962#define NID_id_pkix1_implicit_88 270
963#define OBJ_id_pkix1_implicit_88 OBJ_id_pkix_mod,2L
964
965#define SN_id_pkix1_explicit_93 "id-pkix1-explicit-93"
966#define NID_id_pkix1_explicit_93 271
967#define OBJ_id_pkix1_explicit_93 OBJ_id_pkix_mod,3L
968
969#define SN_id_pkix1_implicit_93 "id-pkix1-implicit-93"
970#define NID_id_pkix1_implicit_93 272
971#define OBJ_id_pkix1_implicit_93 OBJ_id_pkix_mod,4L
972
973#define SN_id_mod_crmf "id-mod-crmf"
974#define NID_id_mod_crmf 273
975#define OBJ_id_mod_crmf OBJ_id_pkix_mod,5L
976
977#define SN_id_mod_cmc "id-mod-cmc"
978#define NID_id_mod_cmc 274
979#define OBJ_id_mod_cmc OBJ_id_pkix_mod,6L
980
981#define SN_id_mod_kea_profile_88 "id-mod-kea-profile-88"
982#define NID_id_mod_kea_profile_88 275
983#define OBJ_id_mod_kea_profile_88 OBJ_id_pkix_mod,7L
984
985#define SN_id_mod_kea_profile_93 "id-mod-kea-profile-93"
986#define NID_id_mod_kea_profile_93 276
987#define OBJ_id_mod_kea_profile_93 OBJ_id_pkix_mod,8L
988
989#define SN_id_mod_cmp "id-mod-cmp"
990#define NID_id_mod_cmp 277
991#define OBJ_id_mod_cmp OBJ_id_pkix_mod,9L
992
993#define SN_id_mod_qualified_cert_88 "id-mod-qualified-cert-88"
994#define NID_id_mod_qualified_cert_88 278
995#define OBJ_id_mod_qualified_cert_88 OBJ_id_pkix_mod,10L
996
997#define SN_id_mod_qualified_cert_93 "id-mod-qualified-cert-93"
998#define NID_id_mod_qualified_cert_93 279
999#define OBJ_id_mod_qualified_cert_93 OBJ_id_pkix_mod,11L
1000
1001#define SN_id_mod_attribute_cert "id-mod-attribute-cert"
1002#define NID_id_mod_attribute_cert 280
1003#define OBJ_id_mod_attribute_cert OBJ_id_pkix_mod,12L
1004
1005#define SN_id_mod_timestamp_protocol "id-mod-timestamp-protocol"
1006#define NID_id_mod_timestamp_protocol 281
1007#define OBJ_id_mod_timestamp_protocol OBJ_id_pkix_mod,13L
1008
1009#define SN_id_mod_ocsp "id-mod-ocsp"
1010#define NID_id_mod_ocsp 282
1011#define OBJ_id_mod_ocsp OBJ_id_pkix_mod,14L
1012
1013#define SN_id_mod_dvcs "id-mod-dvcs"
1014#define NID_id_mod_dvcs 283
1015#define OBJ_id_mod_dvcs OBJ_id_pkix_mod,15L
1016
1017#define SN_id_mod_cmp2000 "id-mod-cmp2000"
1018#define NID_id_mod_cmp2000 284
1019#define OBJ_id_mod_cmp2000 OBJ_id_pkix_mod,16L
1020
1021#define SN_info_access "authorityInfoAccess"
1022#define LN_info_access "Authority Information Access"
1023#define NID_info_access 177
1024#define OBJ_info_access OBJ_id_pe,1L
1025
1026#define SN_biometricInfo "biometricInfo"
1027#define LN_biometricInfo "Biometric Info"
1028#define NID_biometricInfo 285
1029#define OBJ_biometricInfo OBJ_id_pe,2L
1030
1031#define SN_qcStatements "qcStatements"
1032#define NID_qcStatements 286
1033#define OBJ_qcStatements OBJ_id_pe,3L
1034
1035#define SN_ac_auditEntity "ac-auditEntity"
1036#define NID_ac_auditEntity 287
1037#define OBJ_ac_auditEntity OBJ_id_pe,4L
1038
1039#define SN_ac_targeting "ac-targeting"
1040#define NID_ac_targeting 288
1041#define OBJ_ac_targeting OBJ_id_pe,5L
1042
1043#define SN_aaControls "aaControls"
1044#define NID_aaControls 289
1045#define OBJ_aaControls OBJ_id_pe,6L
1046
1047#define SN_sbqp_ipAddrBlock "sbqp-ipAddrBlock"
1048#define NID_sbqp_ipAddrBlock 290
1049#define OBJ_sbqp_ipAddrBlock OBJ_id_pe,7L
1050
1051#define SN_sbqp_autonomousSysNum "sbqp-autonomousSysNum"
1052#define NID_sbqp_autonomousSysNum 291
1053#define OBJ_sbqp_autonomousSysNum OBJ_id_pe,8L
1054
1055#define SN_sbqp_routerIdentifier "sbqp-routerIdentifier"
1056#define NID_sbqp_routerIdentifier 292
1057#define OBJ_sbqp_routerIdentifier OBJ_id_pe,9L
1058
1059#define SN_ac_proxying "ac-proxying"
1060#define NID_ac_proxying 397
1061#define OBJ_ac_proxying OBJ_id_pe,10L
1062
1063#define SN_sinfo_access "subjectInfoAccess"
1064#define LN_sinfo_access "Subject Information Access"
1065#define NID_sinfo_access 398
1066#define OBJ_sinfo_access OBJ_id_pe,11L
1067
1068#define SN_id_qt_cps "id-qt-cps"
1069#define LN_id_qt_cps "Policy Qualifier CPS"
1070#define NID_id_qt_cps 164
1071#define OBJ_id_qt_cps OBJ_id_qt,1L
1072
1073#define SN_id_qt_unotice "id-qt-unotice"
1074#define LN_id_qt_unotice "Policy Qualifier User Notice"
1075#define NID_id_qt_unotice 165
1076#define OBJ_id_qt_unotice OBJ_id_qt,2L
1077
1078#define SN_textNotice "textNotice"
1079#define NID_textNotice 293
1080#define OBJ_textNotice OBJ_id_qt,3L
1081
1082#define SN_server_auth "serverAuth"
1083#define LN_server_auth "TLS Web Server Authentication"
1084#define NID_server_auth 129
1085#define OBJ_server_auth OBJ_id_kp,1L
1086
1087#define SN_client_auth "clientAuth"
1088#define LN_client_auth "TLS Web Client Authentication"
1089#define NID_client_auth 130
1090#define OBJ_client_auth OBJ_id_kp,2L
1091
1092#define SN_code_sign "codeSigning"
1093#define LN_code_sign "Code Signing"
1094#define NID_code_sign 131
1095#define OBJ_code_sign OBJ_id_kp,3L
1096
1097#define SN_email_protect "emailProtection"
1098#define LN_email_protect "E-mail Protection"
1099#define NID_email_protect 132
1100#define OBJ_email_protect OBJ_id_kp,4L
1101
1102#define SN_ipsecEndSystem "ipsecEndSystem"
1103#define LN_ipsecEndSystem "IPSec End System"
1104#define NID_ipsecEndSystem 294
1105#define OBJ_ipsecEndSystem OBJ_id_kp,5L
1106
1107#define SN_ipsecTunnel "ipsecTunnel"
1108#define LN_ipsecTunnel "IPSec Tunnel"
1109#define NID_ipsecTunnel 295
1110#define OBJ_ipsecTunnel OBJ_id_kp,6L
1111
1112#define SN_ipsecUser "ipsecUser"
1113#define LN_ipsecUser "IPSec User"
1114#define NID_ipsecUser 296
1115#define OBJ_ipsecUser OBJ_id_kp,7L
1116
1117#define SN_time_stamp "timeStamping"
1118#define LN_time_stamp "Time Stamping"
1119#define NID_time_stamp 133
1120#define OBJ_time_stamp OBJ_id_kp,8L
1121
1122#define SN_OCSP_sign "OCSPSigning"
1123#define LN_OCSP_sign "OCSP Signing"
1124#define NID_OCSP_sign 180
1125#define OBJ_OCSP_sign OBJ_id_kp,9L
1126
1127#define SN_dvcs "DVCS"
1128#define LN_dvcs "dvcs"
1129#define NID_dvcs 297
1130#define OBJ_dvcs OBJ_id_kp,10L
1131
1132#define SN_id_it_caProtEncCert "id-it-caProtEncCert"
1133#define NID_id_it_caProtEncCert 298
1134#define OBJ_id_it_caProtEncCert OBJ_id_it,1L
1135
1136#define SN_id_it_signKeyPairTypes "id-it-signKeyPairTypes"
1137#define NID_id_it_signKeyPairTypes 299
1138#define OBJ_id_it_signKeyPairTypes OBJ_id_it,2L
1139
1140#define SN_id_it_encKeyPairTypes "id-it-encKeyPairTypes"
1141#define NID_id_it_encKeyPairTypes 300
1142#define OBJ_id_it_encKeyPairTypes OBJ_id_it,3L
1143
1144#define SN_id_it_preferredSymmAlg "id-it-preferredSymmAlg"
1145#define NID_id_it_preferredSymmAlg 301
1146#define OBJ_id_it_preferredSymmAlg OBJ_id_it,4L
1147
1148#define SN_id_it_caKeyUpdateInfo "id-it-caKeyUpdateInfo"
1149#define NID_id_it_caKeyUpdateInfo 302
1150#define OBJ_id_it_caKeyUpdateInfo OBJ_id_it,5L
1151
1152#define SN_id_it_currentCRL "id-it-currentCRL"
1153#define NID_id_it_currentCRL 303
1154#define OBJ_id_it_currentCRL OBJ_id_it,6L
1155
1156#define SN_id_it_unsupportedOIDs "id-it-unsupportedOIDs"
1157#define NID_id_it_unsupportedOIDs 304
1158#define OBJ_id_it_unsupportedOIDs OBJ_id_it,7L
1159
1160#define SN_id_it_subscriptionRequest "id-it-subscriptionRequest"
1161#define NID_id_it_subscriptionRequest 305
1162#define OBJ_id_it_subscriptionRequest OBJ_id_it,8L
1163
1164#define SN_id_it_subscriptionResponse "id-it-subscriptionResponse"
1165#define NID_id_it_subscriptionResponse 306
1166#define OBJ_id_it_subscriptionResponse OBJ_id_it,9L
1167
1168#define SN_id_it_keyPairParamReq "id-it-keyPairParamReq"
1169#define NID_id_it_keyPairParamReq 307
1170#define OBJ_id_it_keyPairParamReq OBJ_id_it,10L
1171
1172#define SN_id_it_keyPairParamRep "id-it-keyPairParamRep"
1173#define NID_id_it_keyPairParamRep 308
1174#define OBJ_id_it_keyPairParamRep OBJ_id_it,11L
1175
1176#define SN_id_it_revPassphrase "id-it-revPassphrase"
1177#define NID_id_it_revPassphrase 309
1178#define OBJ_id_it_revPassphrase OBJ_id_it,12L
1179
1180#define SN_id_it_implicitConfirm "id-it-implicitConfirm"
1181#define NID_id_it_implicitConfirm 310
1182#define OBJ_id_it_implicitConfirm OBJ_id_it,13L
1183
1184#define SN_id_it_confirmWaitTime "id-it-confirmWaitTime"
1185#define NID_id_it_confirmWaitTime 311
1186#define OBJ_id_it_confirmWaitTime OBJ_id_it,14L
1187
1188#define SN_id_it_origPKIMessage "id-it-origPKIMessage"
1189#define NID_id_it_origPKIMessage 312
1190#define OBJ_id_it_origPKIMessage OBJ_id_it,15L
1191
1192#define SN_id_regCtrl "id-regCtrl"
1193#define NID_id_regCtrl 313
1194#define OBJ_id_regCtrl OBJ_id_pkip,1L
1195
1196#define SN_id_regInfo "id-regInfo"
1197#define NID_id_regInfo 314
1198#define OBJ_id_regInfo OBJ_id_pkip,2L
1199
1200#define SN_id_regCtrl_regToken "id-regCtrl-regToken"
1201#define NID_id_regCtrl_regToken 315
1202#define OBJ_id_regCtrl_regToken OBJ_id_regCtrl,1L
1203
1204#define SN_id_regCtrl_authenticator "id-regCtrl-authenticator"
1205#define NID_id_regCtrl_authenticator 316
1206#define OBJ_id_regCtrl_authenticator OBJ_id_regCtrl,2L
1207
1208#define SN_id_regCtrl_pkiPublicationInfo "id-regCtrl-pkiPublicationInfo"
1209#define NID_id_regCtrl_pkiPublicationInfo 317
1210#define OBJ_id_regCtrl_pkiPublicationInfo OBJ_id_regCtrl,3L
1211
1212#define SN_id_regCtrl_pkiArchiveOptions "id-regCtrl-pkiArchiveOptions"
1213#define NID_id_regCtrl_pkiArchiveOptions 318
1214#define OBJ_id_regCtrl_pkiArchiveOptions OBJ_id_regCtrl,4L
1215
1216#define SN_id_regCtrl_oldCertID "id-regCtrl-oldCertID"
1217#define NID_id_regCtrl_oldCertID 319
1218#define OBJ_id_regCtrl_oldCertID OBJ_id_regCtrl,5L
1219
1220#define SN_id_regCtrl_protocolEncrKey "id-regCtrl-protocolEncrKey"
1221#define NID_id_regCtrl_protocolEncrKey 320
1222#define OBJ_id_regCtrl_protocolEncrKey OBJ_id_regCtrl,6L
1223
1224#define SN_id_regInfo_utf8Pairs "id-regInfo-utf8Pairs"
1225#define NID_id_regInfo_utf8Pairs 321
1226#define OBJ_id_regInfo_utf8Pairs OBJ_id_regInfo,1L
1227
1228#define SN_id_regInfo_certReq "id-regInfo-certReq"
1229#define NID_id_regInfo_certReq 322
1230#define OBJ_id_regInfo_certReq OBJ_id_regInfo,2L
1231
1232#define SN_id_alg_des40 "id-alg-des40"
1233#define NID_id_alg_des40 323
1234#define OBJ_id_alg_des40 OBJ_id_alg,1L
1235
1236#define SN_id_alg_noSignature "id-alg-noSignature"
1237#define NID_id_alg_noSignature 324
1238#define OBJ_id_alg_noSignature OBJ_id_alg,2L
1239
1240#define SN_id_alg_dh_sig_hmac_sha1 "id-alg-dh-sig-hmac-sha1"
1241#define NID_id_alg_dh_sig_hmac_sha1 325
1242#define OBJ_id_alg_dh_sig_hmac_sha1 OBJ_id_alg,3L
1243
1244#define SN_id_alg_dh_pop "id-alg-dh-pop"
1245#define NID_id_alg_dh_pop 326
1246#define OBJ_id_alg_dh_pop OBJ_id_alg,4L
1247
1248#define SN_id_cmc_statusInfo "id-cmc-statusInfo"
1249#define NID_id_cmc_statusInfo 327
1250#define OBJ_id_cmc_statusInfo OBJ_id_cmc,1L
1251
1252#define SN_id_cmc_identification "id-cmc-identification"
1253#define NID_id_cmc_identification 328
1254#define OBJ_id_cmc_identification OBJ_id_cmc,2L
1255
1256#define SN_id_cmc_identityProof "id-cmc-identityProof"
1257#define NID_id_cmc_identityProof 329
1258#define OBJ_id_cmc_identityProof OBJ_id_cmc,3L
1259
1260#define SN_id_cmc_dataReturn "id-cmc-dataReturn"
1261#define NID_id_cmc_dataReturn 330
1262#define OBJ_id_cmc_dataReturn OBJ_id_cmc,4L
1263
1264#define SN_id_cmc_transactionId "id-cmc-transactionId"
1265#define NID_id_cmc_transactionId 331
1266#define OBJ_id_cmc_transactionId OBJ_id_cmc,5L
1267
1268#define SN_id_cmc_senderNonce "id-cmc-senderNonce"
1269#define NID_id_cmc_senderNonce 332
1270#define OBJ_id_cmc_senderNonce OBJ_id_cmc,6L
1271
1272#define SN_id_cmc_recipientNonce "id-cmc-recipientNonce"
1273#define NID_id_cmc_recipientNonce 333
1274#define OBJ_id_cmc_recipientNonce OBJ_id_cmc,7L
1275
1276#define SN_id_cmc_addExtensions "id-cmc-addExtensions"
1277#define NID_id_cmc_addExtensions 334
1278#define OBJ_id_cmc_addExtensions OBJ_id_cmc,8L
1279
1280#define SN_id_cmc_encryptedPOP "id-cmc-encryptedPOP"
1281#define NID_id_cmc_encryptedPOP 335
1282#define OBJ_id_cmc_encryptedPOP OBJ_id_cmc,9L
1283
1284#define SN_id_cmc_decryptedPOP "id-cmc-decryptedPOP"
1285#define NID_id_cmc_decryptedPOP 336
1286#define OBJ_id_cmc_decryptedPOP OBJ_id_cmc,10L
1287
1288#define SN_id_cmc_lraPOPWitness "id-cmc-lraPOPWitness"
1289#define NID_id_cmc_lraPOPWitness 337
1290#define OBJ_id_cmc_lraPOPWitness OBJ_id_cmc,11L
1291
1292#define SN_id_cmc_getCert "id-cmc-getCert"
1293#define NID_id_cmc_getCert 338
1294#define OBJ_id_cmc_getCert OBJ_id_cmc,15L
1295
1296#define SN_id_cmc_getCRL "id-cmc-getCRL"
1297#define NID_id_cmc_getCRL 339
1298#define OBJ_id_cmc_getCRL OBJ_id_cmc,16L
1299
1300#define SN_id_cmc_revokeRequest "id-cmc-revokeRequest"
1301#define NID_id_cmc_revokeRequest 340
1302#define OBJ_id_cmc_revokeRequest OBJ_id_cmc,17L
1303
1304#define SN_id_cmc_regInfo "id-cmc-regInfo"
1305#define NID_id_cmc_regInfo 341
1306#define OBJ_id_cmc_regInfo OBJ_id_cmc,18L
1307
1308#define SN_id_cmc_responseInfo "id-cmc-responseInfo"
1309#define NID_id_cmc_responseInfo 342
1310#define OBJ_id_cmc_responseInfo OBJ_id_cmc,19L
1311
1312#define SN_id_cmc_queryPending "id-cmc-queryPending"
1313#define NID_id_cmc_queryPending 343
1314#define OBJ_id_cmc_queryPending OBJ_id_cmc,21L
1315
1316#define SN_id_cmc_popLinkRandom "id-cmc-popLinkRandom"
1317#define NID_id_cmc_popLinkRandom 344
1318#define OBJ_id_cmc_popLinkRandom OBJ_id_cmc,22L
1319
1320#define SN_id_cmc_popLinkWitness "id-cmc-popLinkWitness"
1321#define NID_id_cmc_popLinkWitness 345
1322#define OBJ_id_cmc_popLinkWitness OBJ_id_cmc,23L
1323
1324#define SN_id_cmc_confirmCertAcceptance "id-cmc-confirmCertAcceptance"
1325#define NID_id_cmc_confirmCertAcceptance 346
1326#define OBJ_id_cmc_confirmCertAcceptance OBJ_id_cmc,24L
1327
1328#define SN_id_on_personalData "id-on-personalData"
1329#define NID_id_on_personalData 347
1330#define OBJ_id_on_personalData OBJ_id_on,1L
1331
1332#define SN_id_pda_dateOfBirth "id-pda-dateOfBirth"
1333#define NID_id_pda_dateOfBirth 348
1334#define OBJ_id_pda_dateOfBirth OBJ_id_pda,1L
1335
1336#define SN_id_pda_placeOfBirth "id-pda-placeOfBirth"
1337#define NID_id_pda_placeOfBirth 349
1338#define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L
1339
1340#define SN_id_pda_gender "id-pda-gender"
1341#define NID_id_pda_gender 351
1342#define OBJ_id_pda_gender OBJ_id_pda,3L
1343
1344#define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship"
1345#define NID_id_pda_countryOfCitizenship 352
1346#define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,4L
1347
1348#define SN_id_pda_countryOfResidence "id-pda-countryOfResidence"
1349#define NID_id_pda_countryOfResidence 353
1350#define OBJ_id_pda_countryOfResidence OBJ_id_pda,5L
1351
1352#define SN_id_aca_authenticationInfo "id-aca-authenticationInfo"
1353#define NID_id_aca_authenticationInfo 354
1354#define OBJ_id_aca_authenticationInfo OBJ_id_aca,1L
1355
1356#define SN_id_aca_accessIdentity "id-aca-accessIdentity"
1357#define NID_id_aca_accessIdentity 355
1358#define OBJ_id_aca_accessIdentity OBJ_id_aca,2L
1359
1360#define SN_id_aca_chargingIdentity "id-aca-chargingIdentity"
1361#define NID_id_aca_chargingIdentity 356
1362#define OBJ_id_aca_chargingIdentity OBJ_id_aca,3L
1363
1364#define SN_id_aca_group "id-aca-group"
1365#define NID_id_aca_group 357
1366#define OBJ_id_aca_group OBJ_id_aca,4L
1367
1368#define SN_id_aca_role "id-aca-role"
1369#define NID_id_aca_role 358
1370#define OBJ_id_aca_role OBJ_id_aca,5L
1371
1372#define SN_id_aca_encAttrs "id-aca-encAttrs"
1373#define NID_id_aca_encAttrs 399
1374#define OBJ_id_aca_encAttrs OBJ_id_aca,6L
1375
1376#define SN_id_qcs_pkixQCSyntax_v1 "id-qcs-pkixQCSyntax-v1"
1377#define NID_id_qcs_pkixQCSyntax_v1 359
1378#define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L
1379
1380#define SN_id_cct_crs "id-cct-crs"
1381#define NID_id_cct_crs 360
1382#define OBJ_id_cct_crs OBJ_id_cct,1L
1383
1384#define SN_id_cct_PKIData "id-cct-PKIData"
1385#define NID_id_cct_PKIData 361
1386#define OBJ_id_cct_PKIData OBJ_id_cct,2L
1387
1388#define SN_id_cct_PKIResponse "id-cct-PKIResponse"
1389#define NID_id_cct_PKIResponse 362
1390#define OBJ_id_cct_PKIResponse OBJ_id_cct,3L
1391
1392#define SN_ad_OCSP "OCSP"
1393#define LN_ad_OCSP "OCSP"
1394#define NID_ad_OCSP 178
1395#define OBJ_ad_OCSP OBJ_id_ad,1L
1396
1397#define SN_ad_ca_issuers "caIssuers"
1398#define LN_ad_ca_issuers "CA Issuers"
1399#define NID_ad_ca_issuers 179
1400#define OBJ_ad_ca_issuers OBJ_id_ad,2L
1401
1402#define SN_ad_timeStamping "ad_timestamping"
1403#define LN_ad_timeStamping "AD Time Stamping"
1404#define NID_ad_timeStamping 363
1405#define OBJ_ad_timeStamping OBJ_id_ad,3L
1406
1407#define SN_ad_dvcs "AD_DVCS"
1408#define LN_ad_dvcs "ad dvcs"
1409#define NID_ad_dvcs 364
1410#define OBJ_ad_dvcs OBJ_id_ad,4L
1411
1412#define OBJ_id_pkix_OCSP OBJ_ad_OCSP
1413
1414#define SN_id_pkix_OCSP_basic "basicOCSPResponse"
1415#define LN_id_pkix_OCSP_basic "Basic OCSP Response"
1416#define NID_id_pkix_OCSP_basic 365
1417#define OBJ_id_pkix_OCSP_basic OBJ_id_pkix_OCSP,1L
1418
1419#define SN_id_pkix_OCSP_Nonce "Nonce"
1420#define LN_id_pkix_OCSP_Nonce "OCSP Nonce"
1421#define NID_id_pkix_OCSP_Nonce 366
1422#define OBJ_id_pkix_OCSP_Nonce OBJ_id_pkix_OCSP,2L
1423
1424#define SN_id_pkix_OCSP_CrlID "CrlID"
1425#define LN_id_pkix_OCSP_CrlID "OCSP CRL ID"
1426#define NID_id_pkix_OCSP_CrlID 367
1427#define OBJ_id_pkix_OCSP_CrlID OBJ_id_pkix_OCSP,3L
1428
1429#define SN_id_pkix_OCSP_acceptableResponses "acceptableResponses"
1430#define LN_id_pkix_OCSP_acceptableResponses "Acceptable OCSP Responses"
1431#define NID_id_pkix_OCSP_acceptableResponses 368
1432#define OBJ_id_pkix_OCSP_acceptableResponses OBJ_id_pkix_OCSP,4L
1433
1434#define SN_id_pkix_OCSP_noCheck "noCheck"
1435#define LN_id_pkix_OCSP_noCheck "OCSP No Check"
1436#define NID_id_pkix_OCSP_noCheck 369
1437#define OBJ_id_pkix_OCSP_noCheck OBJ_id_pkix_OCSP,5L
1438
1439#define SN_id_pkix_OCSP_archiveCutoff "archiveCutoff"
1440#define LN_id_pkix_OCSP_archiveCutoff "OCSP Archive Cutoff"
1441#define NID_id_pkix_OCSP_archiveCutoff 370
1442#define OBJ_id_pkix_OCSP_archiveCutoff OBJ_id_pkix_OCSP,6L
1443
1444#define SN_id_pkix_OCSP_serviceLocator "serviceLocator"
1445#define LN_id_pkix_OCSP_serviceLocator "OCSP Service Locator"
1446#define NID_id_pkix_OCSP_serviceLocator 371
1447#define OBJ_id_pkix_OCSP_serviceLocator OBJ_id_pkix_OCSP,7L
1448
1449#define SN_id_pkix_OCSP_extendedStatus "extendedStatus"
1450#define LN_id_pkix_OCSP_extendedStatus "Extended OCSP Status"
1451#define NID_id_pkix_OCSP_extendedStatus 372
1452#define OBJ_id_pkix_OCSP_extendedStatus OBJ_id_pkix_OCSP,8L
1453
1454#define SN_id_pkix_OCSP_valid "valid"
1455#define NID_id_pkix_OCSP_valid 373
1456#define OBJ_id_pkix_OCSP_valid OBJ_id_pkix_OCSP,9L
1457
1458#define SN_id_pkix_OCSP_path "path"
1459#define NID_id_pkix_OCSP_path 374
1460#define OBJ_id_pkix_OCSP_path OBJ_id_pkix_OCSP,10L
1461
1462#define SN_id_pkix_OCSP_trustRoot "trustRoot"
1463#define LN_id_pkix_OCSP_trustRoot "Trust Root"
1464#define NID_id_pkix_OCSP_trustRoot 375
1465#define OBJ_id_pkix_OCSP_trustRoot OBJ_id_pkix_OCSP,11L
1466
1467#define SN_algorithm "algorithm"
1468#define LN_algorithm "algorithm"
1469#define NID_algorithm 376
1470#define OBJ_algorithm 1L,3L,14L,3L,2L
1471
1472#define SN_md5WithRSA "RSA-NP-MD5"
1473#define LN_md5WithRSA "md5WithRSA"
1474#define NID_md5WithRSA 104
1475#define OBJ_md5WithRSA OBJ_algorithm,3L
1476
1477#define SN_des_ecb "DES-ECB"
1478#define LN_des_ecb "des-ecb"
1479#define NID_des_ecb 29
1480#define OBJ_des_ecb OBJ_algorithm,6L
1481
1482#define SN_des_cbc "DES-CBC"
1483#define LN_des_cbc "des-cbc"
1484#define NID_des_cbc 31
1485#define OBJ_des_cbc OBJ_algorithm,7L
1486
1487#define SN_des_ofb64 "DES-OFB"
1488#define LN_des_ofb64 "des-ofb"
1489#define NID_des_ofb64 45
1490#define OBJ_des_ofb64 OBJ_algorithm,8L
1491
1492#define SN_des_cfb64 "DES-CFB"
1493#define LN_des_cfb64 "des-cfb"
1494#define NID_des_cfb64 30
1495#define OBJ_des_cfb64 OBJ_algorithm,9L
1496
1497#define SN_rsaSignature "rsaSignature"
1498#define NID_rsaSignature 377
1499#define OBJ_rsaSignature OBJ_algorithm,11L
1500
1501#define SN_dsa_2 "DSA-old"
1502#define LN_dsa_2 "dsaEncryption-old"
1503#define NID_dsa_2 67
1504#define OBJ_dsa_2 OBJ_algorithm,12L
1505
1506#define SN_dsaWithSHA "DSA-SHA"
1507#define LN_dsaWithSHA "dsaWithSHA"
1508#define NID_dsaWithSHA 66
1509#define OBJ_dsaWithSHA OBJ_algorithm,13L
1510
1511#define SN_shaWithRSAEncryption "RSA-SHA"
1512#define LN_shaWithRSAEncryption "shaWithRSAEncryption"
1513#define NID_shaWithRSAEncryption 42
1514#define OBJ_shaWithRSAEncryption OBJ_algorithm,15L
1515
1516#define SN_des_ede_ecb "DES-EDE"
1517#define LN_des_ede_ecb "des-ede"
1518#define NID_des_ede_ecb 32
1519#define OBJ_des_ede_ecb OBJ_algorithm,17L
1520
1521#define SN_des_ede3_ecb "DES-EDE3"
1522#define LN_des_ede3_ecb "des-ede3"
1523#define NID_des_ede3_ecb 33
1524
1525#define SN_des_ede_cbc "DES-EDE-CBC"
1526#define LN_des_ede_cbc "des-ede-cbc"
1527#define NID_des_ede_cbc 43
1528
1529#define SN_des_ede_cfb64 "DES-EDE-CFB"
1530#define LN_des_ede_cfb64 "des-ede-cfb"
1531#define NID_des_ede_cfb64 60
1532
1533#define SN_des_ede3_cfb64 "DES-EDE3-CFB"
1534#define LN_des_ede3_cfb64 "des-ede3-cfb"
1535#define NID_des_ede3_cfb64 61
1536
1537#define SN_des_ede_ofb64 "DES-EDE-OFB"
1538#define LN_des_ede_ofb64 "des-ede-ofb"
1539#define NID_des_ede_ofb64 62
1540
1541#define SN_des_ede3_ofb64 "DES-EDE3-OFB"
1542#define LN_des_ede3_ofb64 "des-ede3-ofb"
1543#define NID_des_ede3_ofb64 63
1544
1545#define SN_desx_cbc "DESX-CBC"
1546#define LN_desx_cbc "desx-cbc"
1547#define NID_desx_cbc 80
1548
1549#define SN_sha "SHA"
1550#define LN_sha "sha"
1551#define NID_sha 41
1552#define OBJ_sha OBJ_algorithm,18L
1553
1554#define SN_sha1 "SHA1"
1555#define LN_sha1 "sha1"
1556#define NID_sha1 64
1557#define OBJ_sha1 OBJ_algorithm,26L
1558
1559#define SN_dsaWithSHA1_2 "DSA-SHA1-old"
1560#define LN_dsaWithSHA1_2 "dsaWithSHA1-old"
1561#define NID_dsaWithSHA1_2 70
1562#define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L
1563
1564#define SN_sha1WithRSA "RSA-SHA1-2"
1565#define LN_sha1WithRSA "sha1WithRSA"
1566#define NID_sha1WithRSA 115
1567#define OBJ_sha1WithRSA OBJ_algorithm,29L
1568
1569#define SN_ripemd160 "RIPEMD160"
1570#define LN_ripemd160 "ripemd160"
1571#define NID_ripemd160 117
1572#define OBJ_ripemd160 1L,3L,36L,3L,2L,1L
1573
1574#define SN_ripemd160WithRSA "RSA-RIPEMD160"
1575#define LN_ripemd160WithRSA "ripemd160WithRSA"
1576#define NID_ripemd160WithRSA 119
1577#define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L
1578
1579#define SN_sxnet "SXNetID"
1580#define LN_sxnet "Strong Extranet ID"
1581#define NID_sxnet 143
1582#define OBJ_sxnet 1L,3L,101L,1L,4L,1L
1583
1584#define SN_X500 "X500"
1585#define LN_X500 "directory services (X.500)"
1586#define NID_X500 11
1587#define OBJ_X500 2L,5L
1588
1589#define SN_X509 "X509"
1590#define NID_X509 12
1591#define OBJ_X509 OBJ_X500,4L
1592
1593#define SN_commonName "CN"
1594#define LN_commonName "commonName"
1595#define NID_commonName 13
1596#define OBJ_commonName OBJ_X509,3L
1597
1598#define SN_surname "SN"
1599#define LN_surname "surname"
1600#define NID_surname 100
1601#define OBJ_surname OBJ_X509,4L
1602
1603#define LN_serialNumber "serialNumber"
1604#define NID_serialNumber 105
1605#define OBJ_serialNumber OBJ_X509,5L
1606
1607#define SN_countryName "C"
1608#define LN_countryName "countryName"
1609#define NID_countryName 14
1610#define OBJ_countryName OBJ_X509,6L
1611
1612#define SN_localityName "L"
1613#define LN_localityName "localityName"
1614#define NID_localityName 15
1615#define OBJ_localityName OBJ_X509,7L
1616
1617#define SN_stateOrProvinceName "ST"
1618#define LN_stateOrProvinceName "stateOrProvinceName"
1619#define NID_stateOrProvinceName 16
1620#define OBJ_stateOrProvinceName OBJ_X509,8L
1621
1622#define SN_organizationName "O"
1623#define LN_organizationName "organizationName"
1624#define NID_organizationName 17
1625#define OBJ_organizationName OBJ_X509,10L
1626
1627#define SN_organizationalUnitName "OU"
1628#define LN_organizationalUnitName "organizationalUnitName"
1629#define NID_organizationalUnitName 18
1630#define OBJ_organizationalUnitName OBJ_X509,11L
1631
1632#define LN_title "title"
1633#define NID_title 106
1634#define OBJ_title OBJ_X509,12L
1635
1636#define LN_description "description"
1637#define NID_description 107
1638#define OBJ_description OBJ_X509,13L
1639
1640#define SN_name "name"
1641#define LN_name "name"
1642#define NID_name 173
1643#define OBJ_name OBJ_X509,41L
1644
1645#define SN_givenName "GN"
1646#define LN_givenName "givenName"
1647#define NID_givenName 99
1648#define OBJ_givenName OBJ_X509,42L
1649
1650#define LN_initials "initials"
1651#define NID_initials 101
1652#define OBJ_initials OBJ_X509,43L
1653
1654#define LN_generationQualifier "generationQualifier"
1655#define NID_generationQualifier 509
1656#define OBJ_generationQualifier OBJ_X509,44L
1657
1658#define LN_x500UniqueIdentifier "x500UniqueIdentifier"
1659#define NID_x500UniqueIdentifier 503
1660#define OBJ_x500UniqueIdentifier OBJ_X509,45L
1661
1662#define SN_dnQualifier "dnQualifier"
1663#define LN_dnQualifier "dnQualifier"
1664#define NID_dnQualifier 174
1665#define OBJ_dnQualifier OBJ_X509,46L
1666
1667#define LN_pseudonym "pseudonym"
1668#define NID_pseudonym 510
1669#define OBJ_pseudonym OBJ_X509,65L
1670
1671#define SN_role "role"
1672#define LN_role "role"
1673#define NID_role 400
1674#define OBJ_role OBJ_X509,72L
1675
1676#define SN_X500algorithms "X500algorithms"
1677#define LN_X500algorithms "directory services - algorithms"
1678#define NID_X500algorithms 378
1679#define OBJ_X500algorithms OBJ_X500,8L
1680
1681#define SN_rsa "RSA"
1682#define LN_rsa "rsa"
1683#define NID_rsa 19
1684#define OBJ_rsa OBJ_X500algorithms,1L,1L
1685
1686#define SN_mdc2WithRSA "RSA-MDC2"
1687#define LN_mdc2WithRSA "mdc2WithRSA"
1688#define NID_mdc2WithRSA 96
1689#define OBJ_mdc2WithRSA OBJ_X500algorithms,3L,100L
1690
1691#define SN_mdc2 "MDC2"
1692#define LN_mdc2 "mdc2"
1693#define NID_mdc2 95
1694#define OBJ_mdc2 OBJ_X500algorithms,3L,101L
1695
1696#define SN_id_ce "id-ce"
1697#define NID_id_ce 81
1698#define OBJ_id_ce OBJ_X500,29L
1699
1700#define SN_subject_key_identifier "subjectKeyIdentifier"
1701#define LN_subject_key_identifier "X509v3 Subject Key Identifier"
1702#define NID_subject_key_identifier 82
1703#define OBJ_subject_key_identifier OBJ_id_ce,14L
1704
1705#define SN_key_usage "keyUsage"
1706#define LN_key_usage "X509v3 Key Usage"
1707#define NID_key_usage 83
1708#define OBJ_key_usage OBJ_id_ce,15L
1709
1710#define SN_private_key_usage_period "privateKeyUsagePeriod"
1711#define LN_private_key_usage_period "X509v3 Private Key Usage Period"
1712#define NID_private_key_usage_period 84
1713#define OBJ_private_key_usage_period OBJ_id_ce,16L
1714
1715#define SN_subject_alt_name "subjectAltName"
1716#define LN_subject_alt_name "X509v3 Subject Alternative Name"
1717#define NID_subject_alt_name 85
1718#define OBJ_subject_alt_name OBJ_id_ce,17L
1719
1720#define SN_issuer_alt_name "issuerAltName"
1721#define LN_issuer_alt_name "X509v3 Issuer Alternative Name"
1722#define NID_issuer_alt_name 86
1723#define OBJ_issuer_alt_name OBJ_id_ce,18L
1724
1725#define SN_basic_constraints "basicConstraints"
1726#define LN_basic_constraints "X509v3 Basic Constraints"
1727#define NID_basic_constraints 87
1728#define OBJ_basic_constraints OBJ_id_ce,19L
1729
1730#define SN_crl_number "crlNumber"
1731#define LN_crl_number "X509v3 CRL Number"
1732#define NID_crl_number 88
1733#define OBJ_crl_number OBJ_id_ce,20L
1734
1735#define SN_crl_reason "CRLReason"
1736#define LN_crl_reason "X509v3 CRL Reason Code"
1737#define NID_crl_reason 141
1738#define OBJ_crl_reason OBJ_id_ce,21L
1739
1740#define SN_invalidity_date "invalidityDate"
1741#define LN_invalidity_date "Invalidity Date"
1742#define NID_invalidity_date 142
1743#define OBJ_invalidity_date OBJ_id_ce,24L
1744
1745#define SN_delta_crl "deltaCRL"
1746#define LN_delta_crl "X509v3 Delta CRL Indicator"
1747#define NID_delta_crl 140
1748#define OBJ_delta_crl OBJ_id_ce,27L
1749
1750#define SN_crl_distribution_points "crlDistributionPoints"
1751#define LN_crl_distribution_points "X509v3 CRL Distribution Points"
1752#define NID_crl_distribution_points 103
1753#define OBJ_crl_distribution_points OBJ_id_ce,31L
1754
1755#define SN_certificate_policies "certificatePolicies"
1756#define LN_certificate_policies "X509v3 Certificate Policies"
1757#define NID_certificate_policies 89
1758#define OBJ_certificate_policies OBJ_id_ce,32L
1759
1760#define SN_authority_key_identifier "authorityKeyIdentifier"
1761#define LN_authority_key_identifier "X509v3 Authority Key Identifier"
1762#define NID_authority_key_identifier 90
1763#define OBJ_authority_key_identifier OBJ_id_ce,35L
1764
1765#define SN_policy_constraints "policyConstraints"
1766#define LN_policy_constraints "X509v3 Policy Constraints"
1767#define NID_policy_constraints 401
1768#define OBJ_policy_constraints OBJ_id_ce,36L
1769
1770#define SN_ext_key_usage "extendedKeyUsage"
1771#define LN_ext_key_usage "X509v3 Extended Key Usage"
1772#define NID_ext_key_usage 126
1773#define OBJ_ext_key_usage OBJ_id_ce,37L
1774
1775#define SN_target_information "targetInformation"
1776#define LN_target_information "X509v3 AC Targeting"
1777#define NID_target_information 402
1778#define OBJ_target_information OBJ_id_ce,55L
1779
1780#define SN_no_rev_avail "noRevAvail"
1781#define LN_no_rev_avail "X509v3 No Revocation Available"
1782#define NID_no_rev_avail 403
1783#define OBJ_no_rev_avail OBJ_id_ce,56L
1784
1785#define SN_netscape "Netscape"
1786#define LN_netscape "Netscape Communications Corp."
1787#define NID_netscape 57
1788#define OBJ_netscape 2L,16L,840L,1L,113730L
1789
1790#define SN_netscape_cert_extension "nsCertExt"
1791#define LN_netscape_cert_extension "Netscape Certificate Extension"
1792#define NID_netscape_cert_extension 58
1793#define OBJ_netscape_cert_extension OBJ_netscape,1L
1794
1795#define SN_netscape_data_type "nsDataType"
1796#define LN_netscape_data_type "Netscape Data Type"
1797#define NID_netscape_data_type 59
1798#define OBJ_netscape_data_type OBJ_netscape,2L
1799
1800#define SN_netscape_cert_type "nsCertType"
1801#define LN_netscape_cert_type "Netscape Cert Type"
1802#define NID_netscape_cert_type 71
1803#define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L
1804
1805#define SN_netscape_base_url "nsBaseUrl"
1806#define LN_netscape_base_url "Netscape Base Url"
1807#define NID_netscape_base_url 72
1808#define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L
1809
1810#define SN_netscape_revocation_url "nsRevocationUrl"
1811#define LN_netscape_revocation_url "Netscape Revocation Url"
1812#define NID_netscape_revocation_url 73
1813#define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L
1814
1815#define SN_netscape_ca_revocation_url "nsCaRevocationUrl"
1816#define LN_netscape_ca_revocation_url "Netscape CA Revocation Url"
1817#define NID_netscape_ca_revocation_url 74
1818#define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L
1819
1820#define SN_netscape_renewal_url "nsRenewalUrl"
1821#define LN_netscape_renewal_url "Netscape Renewal Url"
1822#define NID_netscape_renewal_url 75
1823#define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L
1824
1825#define SN_netscape_ca_policy_url "nsCaPolicyUrl"
1826#define LN_netscape_ca_policy_url "Netscape CA Policy Url"
1827#define NID_netscape_ca_policy_url 76
1828#define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L
1829
1830#define SN_netscape_ssl_server_name "nsSslServerName"
1831#define LN_netscape_ssl_server_name "Netscape SSL Server Name"
1832#define NID_netscape_ssl_server_name 77
1833#define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L
1834
1835#define SN_netscape_comment "nsComment"
1836#define LN_netscape_comment "Netscape Comment"
1837#define NID_netscape_comment 78
1838#define OBJ_netscape_comment OBJ_netscape_cert_extension,13L
1839
1840#define SN_netscape_cert_sequence "nsCertSequence"
1841#define LN_netscape_cert_sequence "Netscape Certificate Sequence"
1842#define NID_netscape_cert_sequence 79
1843#define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L
1844
1845#define SN_ns_sgc "nsSGC"
1846#define LN_ns_sgc "Netscape Server Gated Crypto"
1847#define NID_ns_sgc 139
1848#define OBJ_ns_sgc OBJ_netscape,4L,1L
1849
1850#define SN_org "ORG"
1851#define LN_org "org"
1852#define NID_org 379
1853#define OBJ_org OBJ_iso,3L
1854
1855#define SN_dod "DOD"
1856#define LN_dod "dod"
1857#define NID_dod 380
1858#define OBJ_dod OBJ_org,6L
1859
1860#define SN_iana "IANA"
1861#define LN_iana "iana"
1862#define NID_iana 381
1863#define OBJ_iana OBJ_dod,1L
1864
1865#define OBJ_internet OBJ_iana
1866
1867#define SN_Directory "directory"
1868#define LN_Directory "Directory"
1869#define NID_Directory 382
1870#define OBJ_Directory OBJ_internet,1L
1871
1872#define SN_Management "mgmt"
1873#define LN_Management "Management"
1874#define NID_Management 383
1875#define OBJ_Management OBJ_internet,2L
1876
1877#define SN_Experimental "experimental"
1878#define LN_Experimental "Experimental"
1879#define NID_Experimental 384
1880#define OBJ_Experimental OBJ_internet,3L
1881
1882#define SN_Private "private"
1883#define LN_Private "Private"
1884#define NID_Private 385
1885#define OBJ_Private OBJ_internet,4L
1886
1887#define SN_Security "security"
1888#define LN_Security "Security"
1889#define NID_Security 386
1890#define OBJ_Security OBJ_internet,5L
1891
1892#define SN_SNMPv2 "snmpv2"
1893#define LN_SNMPv2 "SNMPv2"
1894#define NID_SNMPv2 387
1895#define OBJ_SNMPv2 OBJ_internet,6L
1896
1897#define LN_Mail "Mail"
1898#define NID_Mail 388
1899#define OBJ_Mail OBJ_internet,7L
1900
1901#define SN_Enterprises "enterprises"
1902#define LN_Enterprises "Enterprises"
1903#define NID_Enterprises 389
1904#define OBJ_Enterprises OBJ_Private,1L
1905
1906#define SN_dcObject "dcobject"
1907#define LN_dcObject "dcObject"
1908#define NID_dcObject 390
1909#define OBJ_dcObject OBJ_Enterprises,1466L,344L
1910
1911#define SN_mime_mhs "mime-mhs"
1912#define LN_mime_mhs "MIME MHS"
1913#define NID_mime_mhs 504
1914#define OBJ_mime_mhs OBJ_Mail,1L
1915
1916#define SN_mime_mhs_headings "mime-mhs-headings"
1917#define LN_mime_mhs_headings "mime-mhs-headings"
1918#define NID_mime_mhs_headings 505
1919#define OBJ_mime_mhs_headings OBJ_mime_mhs,1L
1920
1921#define SN_mime_mhs_bodies "mime-mhs-bodies"
1922#define LN_mime_mhs_bodies "mime-mhs-bodies"
1923#define NID_mime_mhs_bodies 506
1924#define OBJ_mime_mhs_bodies OBJ_mime_mhs,2L
1925
1926#define SN_id_hex_partial_message "id-hex-partial-message"
1927#define LN_id_hex_partial_message "id-hex-partial-message"
1928#define NID_id_hex_partial_message 507
1929#define OBJ_id_hex_partial_message OBJ_mime_mhs_headings,1L
1930
1931#define SN_id_hex_multipart_message "id-hex-multipart-message"
1932#define LN_id_hex_multipart_message "id-hex-multipart-message"
1933#define NID_id_hex_multipart_message 508
1934#define OBJ_id_hex_multipart_message OBJ_mime_mhs_headings,2L
1935
1936#define SN_rle_compression "RLE"
1937#define LN_rle_compression "run length compression"
1938#define NID_rle_compression 124
1939#define OBJ_rle_compression 1L,1L,1L,1L,666L,1L
1940
1941#define SN_zlib_compression "ZLIB"
1942#define LN_zlib_compression "zlib compression"
1943#define NID_zlib_compression 125
1944#define OBJ_zlib_compression 1L,1L,1L,1L,666L,2L
1945
1946#define OBJ_csor 2L,16L,840L,1L,101L,3L
1947
1948#define OBJ_nistAlgorithms OBJ_csor,4L
1949
1950#define OBJ_aes OBJ_nistAlgorithms,1L
1951
1952#define SN_aes_128_ecb "AES-128-ECB"
1953#define LN_aes_128_ecb "aes-128-ecb"
1954#define NID_aes_128_ecb 418
1955#define OBJ_aes_128_ecb OBJ_aes,1L
1956
1957#define SN_aes_128_cbc "AES-128-CBC"
1958#define LN_aes_128_cbc "aes-128-cbc"
1959#define NID_aes_128_cbc 419
1960#define OBJ_aes_128_cbc OBJ_aes,2L
1961
1962#define SN_aes_128_ofb128 "AES-128-OFB"
1963#define LN_aes_128_ofb128 "aes-128-ofb"
1964#define NID_aes_128_ofb128 420
1965#define OBJ_aes_128_ofb128 OBJ_aes,3L
1966
1967#define SN_aes_128_cfb128 "AES-128-CFB"
1968#define LN_aes_128_cfb128 "aes-128-cfb"
1969#define NID_aes_128_cfb128 421
1970#define OBJ_aes_128_cfb128 OBJ_aes,4L
1971
1972#define SN_aes_192_ecb "AES-192-ECB"
1973#define LN_aes_192_ecb "aes-192-ecb"
1974#define NID_aes_192_ecb 422
1975#define OBJ_aes_192_ecb OBJ_aes,21L
1976
1977#define SN_aes_192_cbc "AES-192-CBC"
1978#define LN_aes_192_cbc "aes-192-cbc"
1979#define NID_aes_192_cbc 423
1980#define OBJ_aes_192_cbc OBJ_aes,22L
1981
1982#define SN_aes_192_ofb128 "AES-192-OFB"
1983#define LN_aes_192_ofb128 "aes-192-ofb"
1984#define NID_aes_192_ofb128 424
1985#define OBJ_aes_192_ofb128 OBJ_aes,23L
1986
1987#define SN_aes_192_cfb128 "AES-192-CFB"
1988#define LN_aes_192_cfb128 "aes-192-cfb"
1989#define NID_aes_192_cfb128 425
1990#define OBJ_aes_192_cfb128 OBJ_aes,24L
1991
1992#define SN_aes_256_ecb "AES-256-ECB"
1993#define LN_aes_256_ecb "aes-256-ecb"
1994#define NID_aes_256_ecb 426
1995#define OBJ_aes_256_ecb OBJ_aes,41L
1996
1997#define SN_aes_256_cbc "AES-256-CBC"
1998#define LN_aes_256_cbc "aes-256-cbc"
1999#define NID_aes_256_cbc 427
2000#define OBJ_aes_256_cbc OBJ_aes,42L
2001
2002#define SN_aes_256_ofb128 "AES-256-OFB"
2003#define LN_aes_256_ofb128 "aes-256-ofb"
2004#define NID_aes_256_ofb128 428
2005#define OBJ_aes_256_ofb128 OBJ_aes,43L
2006
2007#define SN_aes_256_cfb128 "AES-256-CFB"
2008#define LN_aes_256_cfb128 "aes-256-cfb"
2009#define NID_aes_256_cfb128 429
2010#define OBJ_aes_256_cfb128 OBJ_aes,44L
2011
2012#define SN_hold_instruction_code "holdInstructionCode"
2013#define LN_hold_instruction_code "Hold Instruction Code"
2014#define NID_hold_instruction_code 430
2015#define OBJ_hold_instruction_code OBJ_id_ce,23L
2016
2017#define OBJ_holdInstruction OBJ_X9_57,2L
2018
2019#define SN_hold_instruction_none "holdInstructionNone"
2020#define LN_hold_instruction_none "Hold Instruction None"
2021#define NID_hold_instruction_none 431
2022#define OBJ_hold_instruction_none OBJ_holdInstruction,1L
2023
2024#define SN_hold_instruction_call_issuer "holdInstructionCallIssuer"
2025#define LN_hold_instruction_call_issuer "Hold Instruction Call Issuer"
2026#define NID_hold_instruction_call_issuer 432
2027#define OBJ_hold_instruction_call_issuer OBJ_holdInstruction,2L
2028
2029#define SN_hold_instruction_reject "holdInstructionReject"
2030#define LN_hold_instruction_reject "Hold Instruction Reject"
2031#define NID_hold_instruction_reject 433
2032#define OBJ_hold_instruction_reject OBJ_holdInstruction,3L
2033
2034#define SN_data "data"
2035#define NID_data 434
2036#define OBJ_data OBJ_ccitt,9L
2037
2038#define SN_pss "pss"
2039#define NID_pss 435
2040#define OBJ_pss OBJ_data,2342L
2041
2042#define SN_ucl "ucl"
2043#define NID_ucl 436
2044#define OBJ_ucl OBJ_pss,19200300L
2045
2046#define SN_pilot "pilot"
2047#define NID_pilot 437
2048#define OBJ_pilot OBJ_ucl,100L
2049
2050#define LN_pilotAttributeType "pilotAttributeType"
2051#define NID_pilotAttributeType 438
2052#define OBJ_pilotAttributeType OBJ_pilot,1L
2053
2054#define LN_pilotAttributeSyntax "pilotAttributeSyntax"
2055#define NID_pilotAttributeSyntax 439
2056#define OBJ_pilotAttributeSyntax OBJ_pilot,3L
2057
2058#define LN_pilotObjectClass "pilotObjectClass"
2059#define NID_pilotObjectClass 440
2060#define OBJ_pilotObjectClass OBJ_pilot,4L
2061
2062#define LN_pilotGroups "pilotGroups"
2063#define NID_pilotGroups 441
2064#define OBJ_pilotGroups OBJ_pilot,10L
2065
2066#define LN_iA5StringSyntax "iA5StringSyntax"
2067#define NID_iA5StringSyntax 442
2068#define OBJ_iA5StringSyntax OBJ_pilotAttributeSyntax,4L
2069
2070#define LN_caseIgnoreIA5StringSyntax "caseIgnoreIA5StringSyntax"
2071#define NID_caseIgnoreIA5StringSyntax 443
2072#define OBJ_caseIgnoreIA5StringSyntax OBJ_pilotAttributeSyntax,5L
2073
2074#define LN_pilotObject "pilotObject"
2075#define NID_pilotObject 444
2076#define OBJ_pilotObject OBJ_pilotObjectClass,3L
2077
2078#define LN_pilotPerson "pilotPerson"
2079#define NID_pilotPerson 445
2080#define OBJ_pilotPerson OBJ_pilotObjectClass,4L
2081
2082#define SN_account "account"
2083#define NID_account 446
2084#define OBJ_account OBJ_pilotObjectClass,5L
2085
2086#define SN_document "document"
2087#define NID_document 447
2088#define OBJ_document OBJ_pilotObjectClass,6L
2089
2090#define SN_room "room"
2091#define NID_room 448
2092#define OBJ_room OBJ_pilotObjectClass,7L
2093
2094#define LN_documentSeries "documentSeries"
2095#define NID_documentSeries 449
2096#define OBJ_documentSeries OBJ_pilotObjectClass,9L
2097
2098#define SN_Domain "domain"
2099#define LN_Domain "Domain"
2100#define NID_Domain 392
2101#define OBJ_Domain OBJ_pilotObjectClass,13L
2102
2103#define LN_rFC822localPart "rFC822localPart"
2104#define NID_rFC822localPart 450
2105#define OBJ_rFC822localPart OBJ_pilotObjectClass,14L
2106
2107#define LN_dNSDomain "dNSDomain"
2108#define NID_dNSDomain 451
2109#define OBJ_dNSDomain OBJ_pilotObjectClass,15L
2110
2111#define LN_domainRelatedObject "domainRelatedObject"
2112#define NID_domainRelatedObject 452
2113#define OBJ_domainRelatedObject OBJ_pilotObjectClass,17L
2114
2115#define LN_friendlyCountry "friendlyCountry"
2116#define NID_friendlyCountry 453
2117#define OBJ_friendlyCountry OBJ_pilotObjectClass,18L
2118
2119#define LN_simpleSecurityObject "simpleSecurityObject"
2120#define NID_simpleSecurityObject 454
2121#define OBJ_simpleSecurityObject OBJ_pilotObjectClass,19L
2122
2123#define LN_pilotOrganization "pilotOrganization"
2124#define NID_pilotOrganization 455
2125#define OBJ_pilotOrganization OBJ_pilotObjectClass,20L
2126
2127#define LN_pilotDSA "pilotDSA"
2128#define NID_pilotDSA 456
2129#define OBJ_pilotDSA OBJ_pilotObjectClass,21L
2130
2131#define LN_qualityLabelledData "qualityLabelledData"
2132#define NID_qualityLabelledData 457
2133#define OBJ_qualityLabelledData OBJ_pilotObjectClass,22L
2134
2135#define SN_userId "UID"
2136#define LN_userId "userId"
2137#define NID_userId 458
2138#define OBJ_userId OBJ_pilotAttributeType,1L
2139
2140#define LN_textEncodedORAddress "textEncodedORAddress"
2141#define NID_textEncodedORAddress 459
2142#define OBJ_textEncodedORAddress OBJ_pilotAttributeType,2L
2143
2144#define SN_rfc822Mailbox "mail"
2145#define LN_rfc822Mailbox "rfc822Mailbox"
2146#define NID_rfc822Mailbox 460
2147#define OBJ_rfc822Mailbox OBJ_pilotAttributeType,3L
2148
2149#define SN_info "info"
2150#define NID_info 461
2151#define OBJ_info OBJ_pilotAttributeType,4L
2152
2153#define LN_favouriteDrink "favouriteDrink"
2154#define NID_favouriteDrink 462
2155#define OBJ_favouriteDrink OBJ_pilotAttributeType,5L
2156
2157#define LN_roomNumber "roomNumber"
2158#define NID_roomNumber 463
2159#define OBJ_roomNumber OBJ_pilotAttributeType,6L
2160
2161#define SN_photo "photo"
2162#define NID_photo 464
2163#define OBJ_photo OBJ_pilotAttributeType,7L
2164
2165#define LN_userClass "userClass"
2166#define NID_userClass 465
2167#define OBJ_userClass OBJ_pilotAttributeType,8L
2168
2169#define SN_host "host"
2170#define NID_host 466
2171#define OBJ_host OBJ_pilotAttributeType,9L
2172
2173#define SN_manager "manager"
2174#define NID_manager 467
2175#define OBJ_manager OBJ_pilotAttributeType,10L
2176
2177#define LN_documentIdentifier "documentIdentifier"
2178#define NID_documentIdentifier 468
2179#define OBJ_documentIdentifier OBJ_pilotAttributeType,11L
2180
2181#define LN_documentTitle "documentTitle"
2182#define NID_documentTitle 469
2183#define OBJ_documentTitle OBJ_pilotAttributeType,12L
2184
2185#define LN_documentVersion "documentVersion"
2186#define NID_documentVersion 470
2187#define OBJ_documentVersion OBJ_pilotAttributeType,13L
2188
2189#define LN_documentAuthor "documentAuthor"
2190#define NID_documentAuthor 471
2191#define OBJ_documentAuthor OBJ_pilotAttributeType,14L
2192
2193#define LN_documentLocation "documentLocation"
2194#define NID_documentLocation 472
2195#define OBJ_documentLocation OBJ_pilotAttributeType,15L
2196
2197#define LN_homeTelephoneNumber "homeTelephoneNumber"
2198#define NID_homeTelephoneNumber 473
2199#define OBJ_homeTelephoneNumber OBJ_pilotAttributeType,20L
2200
2201#define SN_secretary "secretary"
2202#define NID_secretary 474
2203#define OBJ_secretary OBJ_pilotAttributeType,21L
2204
2205#define LN_otherMailbox "otherMailbox"
2206#define NID_otherMailbox 475
2207#define OBJ_otherMailbox OBJ_pilotAttributeType,22L
2208
2209#define LN_lastModifiedTime "lastModifiedTime"
2210#define NID_lastModifiedTime 476
2211#define OBJ_lastModifiedTime OBJ_pilotAttributeType,23L
2212
2213#define LN_lastModifiedBy "lastModifiedBy"
2214#define NID_lastModifiedBy 477
2215#define OBJ_lastModifiedBy OBJ_pilotAttributeType,24L
2216
2217#define SN_domainComponent "DC"
2218#define LN_domainComponent "domainComponent"
2219#define NID_domainComponent 391
2220#define OBJ_domainComponent OBJ_pilotAttributeType,25L
2221
2222#define LN_aRecord "aRecord"
2223#define NID_aRecord 478
2224#define OBJ_aRecord OBJ_pilotAttributeType,26L
2225
2226#define LN_pilotAttributeType27 "pilotAttributeType27"
2227#define NID_pilotAttributeType27 479
2228#define OBJ_pilotAttributeType27 OBJ_pilotAttributeType,27L
2229
2230#define LN_mXRecord "mXRecord"
2231#define NID_mXRecord 480
2232#define OBJ_mXRecord OBJ_pilotAttributeType,28L
2233
2234#define LN_nSRecord "nSRecord"
2235#define NID_nSRecord 481
2236#define OBJ_nSRecord OBJ_pilotAttributeType,29L
2237
2238#define LN_sOARecord "sOARecord"
2239#define NID_sOARecord 482
2240#define OBJ_sOARecord OBJ_pilotAttributeType,30L
2241
2242#define LN_cNAMERecord "cNAMERecord"
2243#define NID_cNAMERecord 483
2244#define OBJ_cNAMERecord OBJ_pilotAttributeType,31L
2245
2246#define LN_associatedDomain "associatedDomain"
2247#define NID_associatedDomain 484
2248#define OBJ_associatedDomain OBJ_pilotAttributeType,37L
2249
2250#define LN_associatedName "associatedName"
2251#define NID_associatedName 485
2252#define OBJ_associatedName OBJ_pilotAttributeType,38L
2253
2254#define LN_homePostalAddress "homePostalAddress"
2255#define NID_homePostalAddress 486
2256#define OBJ_homePostalAddress OBJ_pilotAttributeType,39L
2257
2258#define LN_personalTitle "personalTitle"
2259#define NID_personalTitle 487
2260#define OBJ_personalTitle OBJ_pilotAttributeType,40L
2261
2262#define LN_mobileTelephoneNumber "mobileTelephoneNumber"
2263#define NID_mobileTelephoneNumber 488
2264#define OBJ_mobileTelephoneNumber OBJ_pilotAttributeType,41L
2265
2266#define LN_pagerTelephoneNumber "pagerTelephoneNumber"
2267#define NID_pagerTelephoneNumber 489
2268#define OBJ_pagerTelephoneNumber OBJ_pilotAttributeType,42L
2269
2270#define LN_friendlyCountryName "friendlyCountryName"
2271#define NID_friendlyCountryName 490
2272#define OBJ_friendlyCountryName OBJ_pilotAttributeType,43L
2273
2274#define LN_organizationalStatus "organizationalStatus"
2275#define NID_organizationalStatus 491
2276#define OBJ_organizationalStatus OBJ_pilotAttributeType,45L
2277
2278#define LN_janetMailbox "janetMailbox"
2279#define NID_janetMailbox 492
2280#define OBJ_janetMailbox OBJ_pilotAttributeType,46L
2281
2282#define LN_mailPreferenceOption "mailPreferenceOption"
2283#define NID_mailPreferenceOption 493
2284#define OBJ_mailPreferenceOption OBJ_pilotAttributeType,47L
2285
2286#define LN_buildingName "buildingName"
2287#define NID_buildingName 494
2288#define OBJ_buildingName OBJ_pilotAttributeType,48L
2289
2290#define LN_dSAQuality "dSAQuality"
2291#define NID_dSAQuality 495
2292#define OBJ_dSAQuality OBJ_pilotAttributeType,49L
2293
2294#define LN_singleLevelQuality "singleLevelQuality"
2295#define NID_singleLevelQuality 496
2296#define OBJ_singleLevelQuality OBJ_pilotAttributeType,50L
2297
2298#define LN_subtreeMinimumQuality "subtreeMinimumQuality"
2299#define NID_subtreeMinimumQuality 497
2300#define OBJ_subtreeMinimumQuality OBJ_pilotAttributeType,51L
2301
2302#define LN_subtreeMaximumQuality "subtreeMaximumQuality"
2303#define NID_subtreeMaximumQuality 498
2304#define OBJ_subtreeMaximumQuality OBJ_pilotAttributeType,52L
2305
2306#define LN_personalSignature "personalSignature"
2307#define NID_personalSignature 499
2308#define OBJ_personalSignature OBJ_pilotAttributeType,53L
2309
2310#define LN_dITRedirect "dITRedirect"
2311#define NID_dITRedirect 500
2312#define OBJ_dITRedirect OBJ_pilotAttributeType,54L
2313
2314#define SN_audio "audio"
2315#define NID_audio 501
2316#define OBJ_audio OBJ_pilotAttributeType,55L
2317
2318#define LN_documentPublisher "documentPublisher"
2319#define NID_documentPublisher 502
2320#define OBJ_documentPublisher OBJ_pilotAttributeType,56L
2321
2322#define SN_id_set "id-set"
2323#define LN_id_set "Secure Electronic Transactions"
2324#define NID_id_set 512
2325#define OBJ_id_set 2L,23L,42L
2326
2327#define SN_set_ctype "set-ctype"
2328#define LN_set_ctype "content types"
2329#define NID_set_ctype 513
2330#define OBJ_set_ctype OBJ_id_set,0L
2331
2332#define SN_set_msgExt "set-msgExt"
2333#define LN_set_msgExt "message extensions"
2334#define NID_set_msgExt 514
2335#define OBJ_set_msgExt OBJ_id_set,1L
2336
2337#define SN_set_attr "set-attr"
2338#define NID_set_attr 515
2339#define OBJ_set_attr OBJ_id_set,3L
2340
2341#define SN_set_policy "set-policy"
2342#define NID_set_policy 516
2343#define OBJ_set_policy OBJ_id_set,5L
2344
2345#define SN_set_certExt "set-certExt"
2346#define LN_set_certExt "certificate extensions"
2347#define NID_set_certExt 517
2348#define OBJ_set_certExt OBJ_id_set,7L
2349
2350#define SN_set_brand "set-brand"
2351#define NID_set_brand 518
2352#define OBJ_set_brand OBJ_id_set,8L
2353
2354#define SN_setct_PANData "setct-PANData"
2355#define NID_setct_PANData 519
2356#define OBJ_setct_PANData OBJ_set_ctype,0L
2357
2358#define SN_setct_PANToken "setct-PANToken"
2359#define NID_setct_PANToken 520
2360#define OBJ_setct_PANToken OBJ_set_ctype,1L
2361
2362#define SN_setct_PANOnly "setct-PANOnly"
2363#define NID_setct_PANOnly 521
2364#define OBJ_setct_PANOnly OBJ_set_ctype,2L
2365
2366#define SN_setct_OIData "setct-OIData"
2367#define NID_setct_OIData 522
2368#define OBJ_setct_OIData OBJ_set_ctype,3L
2369
2370#define SN_setct_PI "setct-PI"
2371#define NID_setct_PI 523
2372#define OBJ_setct_PI OBJ_set_ctype,4L
2373
2374#define SN_setct_PIData "setct-PIData"
2375#define NID_setct_PIData 524
2376#define OBJ_setct_PIData OBJ_set_ctype,5L
2377
2378#define SN_setct_PIDataUnsigned "setct-PIDataUnsigned"
2379#define NID_setct_PIDataUnsigned 525
2380#define OBJ_setct_PIDataUnsigned OBJ_set_ctype,6L
2381
2382#define SN_setct_HODInput "setct-HODInput"
2383#define NID_setct_HODInput 526
2384#define OBJ_setct_HODInput OBJ_set_ctype,7L
2385
2386#define SN_setct_AuthResBaggage "setct-AuthResBaggage"
2387#define NID_setct_AuthResBaggage 527
2388#define OBJ_setct_AuthResBaggage OBJ_set_ctype,8L
2389
2390#define SN_setct_AuthRevReqBaggage "setct-AuthRevReqBaggage"
2391#define NID_setct_AuthRevReqBaggage 528
2392#define OBJ_setct_AuthRevReqBaggage OBJ_set_ctype,9L
2393
2394#define SN_setct_AuthRevResBaggage "setct-AuthRevResBaggage"
2395#define NID_setct_AuthRevResBaggage 529
2396#define OBJ_setct_AuthRevResBaggage OBJ_set_ctype,10L
2397
2398#define SN_setct_CapTokenSeq "setct-CapTokenSeq"
2399#define NID_setct_CapTokenSeq 530
2400#define OBJ_setct_CapTokenSeq OBJ_set_ctype,11L
2401
2402#define SN_setct_PInitResData "setct-PInitResData"
2403#define NID_setct_PInitResData 531
2404#define OBJ_setct_PInitResData OBJ_set_ctype,12L
2405
2406#define SN_setct_PI_TBS "setct-PI-TBS"
2407#define NID_setct_PI_TBS 532
2408#define OBJ_setct_PI_TBS OBJ_set_ctype,13L
2409
2410#define SN_setct_PResData "setct-PResData"
2411#define NID_setct_PResData 533
2412#define OBJ_setct_PResData OBJ_set_ctype,14L
2413
2414#define SN_setct_AuthReqTBS "setct-AuthReqTBS"
2415#define NID_setct_AuthReqTBS 534
2416#define OBJ_setct_AuthReqTBS OBJ_set_ctype,16L
2417
2418#define SN_setct_AuthResTBS "setct-AuthResTBS"
2419#define NID_setct_AuthResTBS 535
2420#define OBJ_setct_AuthResTBS OBJ_set_ctype,17L
2421
2422#define SN_setct_AuthResTBSX "setct-AuthResTBSX"
2423#define NID_setct_AuthResTBSX 536
2424#define OBJ_setct_AuthResTBSX OBJ_set_ctype,18L
2425
2426#define SN_setct_AuthTokenTBS "setct-AuthTokenTBS"
2427#define NID_setct_AuthTokenTBS 537
2428#define OBJ_setct_AuthTokenTBS OBJ_set_ctype,19L
2429
2430#define SN_setct_CapTokenData "setct-CapTokenData"
2431#define NID_setct_CapTokenData 538
2432#define OBJ_setct_CapTokenData OBJ_set_ctype,20L
2433
2434#define SN_setct_CapTokenTBS "setct-CapTokenTBS"
2435#define NID_setct_CapTokenTBS 539
2436#define OBJ_setct_CapTokenTBS OBJ_set_ctype,21L
2437
2438#define SN_setct_AcqCardCodeMsg "setct-AcqCardCodeMsg"
2439#define NID_setct_AcqCardCodeMsg 540
2440#define OBJ_setct_AcqCardCodeMsg OBJ_set_ctype,22L
2441
2442#define SN_setct_AuthRevReqTBS "setct-AuthRevReqTBS"
2443#define NID_setct_AuthRevReqTBS 541
2444#define OBJ_setct_AuthRevReqTBS OBJ_set_ctype,23L
2445
2446#define SN_setct_AuthRevResData "setct-AuthRevResData"
2447#define NID_setct_AuthRevResData 542
2448#define OBJ_setct_AuthRevResData OBJ_set_ctype,24L
2449
2450#define SN_setct_AuthRevResTBS "setct-AuthRevResTBS"
2451#define NID_setct_AuthRevResTBS 543
2452#define OBJ_setct_AuthRevResTBS OBJ_set_ctype,25L
2453
2454#define SN_setct_CapReqTBS "setct-CapReqTBS"
2455#define NID_setct_CapReqTBS 544
2456#define OBJ_setct_CapReqTBS OBJ_set_ctype,26L
2457
2458#define SN_setct_CapReqTBSX "setct-CapReqTBSX"
2459#define NID_setct_CapReqTBSX 545
2460#define OBJ_setct_CapReqTBSX OBJ_set_ctype,27L
2461
2462#define SN_setct_CapResData "setct-CapResData"
2463#define NID_setct_CapResData 546
2464#define OBJ_setct_CapResData OBJ_set_ctype,28L
2465
2466#define SN_setct_CapRevReqTBS "setct-CapRevReqTBS"
2467#define NID_setct_CapRevReqTBS 547
2468#define OBJ_setct_CapRevReqTBS OBJ_set_ctype,29L
2469
2470#define SN_setct_CapRevReqTBSX "setct-CapRevReqTBSX"
2471#define NID_setct_CapRevReqTBSX 548
2472#define OBJ_setct_CapRevReqTBSX OBJ_set_ctype,30L
2473
2474#define SN_setct_CapRevResData "setct-CapRevResData"
2475#define NID_setct_CapRevResData 549
2476#define OBJ_setct_CapRevResData OBJ_set_ctype,31L
2477
2478#define SN_setct_CredReqTBS "setct-CredReqTBS"
2479#define NID_setct_CredReqTBS 550
2480#define OBJ_setct_CredReqTBS OBJ_set_ctype,32L
2481
2482#define SN_setct_CredReqTBSX "setct-CredReqTBSX"
2483#define NID_setct_CredReqTBSX 551
2484#define OBJ_setct_CredReqTBSX OBJ_set_ctype,33L
2485
2486#define SN_setct_CredResData "setct-CredResData"
2487#define NID_setct_CredResData 552
2488#define OBJ_setct_CredResData OBJ_set_ctype,34L
2489
2490#define SN_setct_CredRevReqTBS "setct-CredRevReqTBS"
2491#define NID_setct_CredRevReqTBS 553
2492#define OBJ_setct_CredRevReqTBS OBJ_set_ctype,35L
2493
2494#define SN_setct_CredRevReqTBSX "setct-CredRevReqTBSX"
2495#define NID_setct_CredRevReqTBSX 554
2496#define OBJ_setct_CredRevReqTBSX OBJ_set_ctype,36L
2497
2498#define SN_setct_CredRevResData "setct-CredRevResData"
2499#define NID_setct_CredRevResData 555
2500#define OBJ_setct_CredRevResData OBJ_set_ctype,37L
2501
2502#define SN_setct_PCertReqData "setct-PCertReqData"
2503#define NID_setct_PCertReqData 556
2504#define OBJ_setct_PCertReqData OBJ_set_ctype,38L
2505
2506#define SN_setct_PCertResTBS "setct-PCertResTBS"
2507#define NID_setct_PCertResTBS 557
2508#define OBJ_setct_PCertResTBS OBJ_set_ctype,39L
2509
2510#define SN_setct_BatchAdminReqData "setct-BatchAdminReqData"
2511#define NID_setct_BatchAdminReqData 558
2512#define OBJ_setct_BatchAdminReqData OBJ_set_ctype,40L
2513
2514#define SN_setct_BatchAdminResData "setct-BatchAdminResData"
2515#define NID_setct_BatchAdminResData 559
2516#define OBJ_setct_BatchAdminResData OBJ_set_ctype,41L
2517
2518#define SN_setct_CardCInitResTBS "setct-CardCInitResTBS"
2519#define NID_setct_CardCInitResTBS 560
2520#define OBJ_setct_CardCInitResTBS OBJ_set_ctype,42L
2521
2522#define SN_setct_MeAqCInitResTBS "setct-MeAqCInitResTBS"
2523#define NID_setct_MeAqCInitResTBS 561
2524#define OBJ_setct_MeAqCInitResTBS OBJ_set_ctype,43L
2525
2526#define SN_setct_RegFormResTBS "setct-RegFormResTBS"
2527#define NID_setct_RegFormResTBS 562
2528#define OBJ_setct_RegFormResTBS OBJ_set_ctype,44L
2529
2530#define SN_setct_CertReqData "setct-CertReqData"
2531#define NID_setct_CertReqData 563
2532#define OBJ_setct_CertReqData OBJ_set_ctype,45L
2533
2534#define SN_setct_CertReqTBS "setct-CertReqTBS"
2535#define NID_setct_CertReqTBS 564
2536#define OBJ_setct_CertReqTBS OBJ_set_ctype,46L
2537
2538#define SN_setct_CertResData "setct-CertResData"
2539#define NID_setct_CertResData 565
2540#define OBJ_setct_CertResData OBJ_set_ctype,47L
2541
2542#define SN_setct_CertInqReqTBS "setct-CertInqReqTBS"
2543#define NID_setct_CertInqReqTBS 566
2544#define OBJ_setct_CertInqReqTBS OBJ_set_ctype,48L
2545
2546#define SN_setct_ErrorTBS "setct-ErrorTBS"
2547#define NID_setct_ErrorTBS 567
2548#define OBJ_setct_ErrorTBS OBJ_set_ctype,49L
2549
2550#define SN_setct_PIDualSignedTBE "setct-PIDualSignedTBE"
2551#define NID_setct_PIDualSignedTBE 568
2552#define OBJ_setct_PIDualSignedTBE OBJ_set_ctype,50L
2553
2554#define SN_setct_PIUnsignedTBE "setct-PIUnsignedTBE"
2555#define NID_setct_PIUnsignedTBE 569
2556#define OBJ_setct_PIUnsignedTBE OBJ_set_ctype,51L
2557
2558#define SN_setct_AuthReqTBE "setct-AuthReqTBE"
2559#define NID_setct_AuthReqTBE 570
2560#define OBJ_setct_AuthReqTBE OBJ_set_ctype,52L
2561
2562#define SN_setct_AuthResTBE "setct-AuthResTBE"
2563#define NID_setct_AuthResTBE 571
2564#define OBJ_setct_AuthResTBE OBJ_set_ctype,53L
2565
2566#define SN_setct_AuthResTBEX "setct-AuthResTBEX"
2567#define NID_setct_AuthResTBEX 572
2568#define OBJ_setct_AuthResTBEX OBJ_set_ctype,54L
2569
2570#define SN_setct_AuthTokenTBE "setct-AuthTokenTBE"
2571#define NID_setct_AuthTokenTBE 573
2572#define OBJ_setct_AuthTokenTBE OBJ_set_ctype,55L
2573
2574#define SN_setct_CapTokenTBE "setct-CapTokenTBE"
2575#define NID_setct_CapTokenTBE 574
2576#define OBJ_setct_CapTokenTBE OBJ_set_ctype,56L
2577
2578#define SN_setct_CapTokenTBEX "setct-CapTokenTBEX"
2579#define NID_setct_CapTokenTBEX 575
2580#define OBJ_setct_CapTokenTBEX OBJ_set_ctype,57L
2581
2582#define SN_setct_AcqCardCodeMsgTBE "setct-AcqCardCodeMsgTBE"
2583#define NID_setct_AcqCardCodeMsgTBE 576
2584#define OBJ_setct_AcqCardCodeMsgTBE OBJ_set_ctype,58L
2585
2586#define SN_setct_AuthRevReqTBE "setct-AuthRevReqTBE"
2587#define NID_setct_AuthRevReqTBE 577
2588#define OBJ_setct_AuthRevReqTBE OBJ_set_ctype,59L
2589
2590#define SN_setct_AuthRevResTBE "setct-AuthRevResTBE"
2591#define NID_setct_AuthRevResTBE 578
2592#define OBJ_setct_AuthRevResTBE OBJ_set_ctype,60L
2593
2594#define SN_setct_AuthRevResTBEB "setct-AuthRevResTBEB"
2595#define NID_setct_AuthRevResTBEB 579
2596#define OBJ_setct_AuthRevResTBEB OBJ_set_ctype,61L
2597
2598#define SN_setct_CapReqTBE "setct-CapReqTBE"
2599#define NID_setct_CapReqTBE 580
2600#define OBJ_setct_CapReqTBE OBJ_set_ctype,62L
2601
2602#define SN_setct_CapReqTBEX "setct-CapReqTBEX"
2603#define NID_setct_CapReqTBEX 581
2604#define OBJ_setct_CapReqTBEX OBJ_set_ctype,63L
2605
2606#define SN_setct_CapResTBE "setct-CapResTBE"
2607#define NID_setct_CapResTBE 582
2608#define OBJ_setct_CapResTBE OBJ_set_ctype,64L
2609
2610#define SN_setct_CapRevReqTBE "setct-CapRevReqTBE"
2611#define NID_setct_CapRevReqTBE 583
2612#define OBJ_setct_CapRevReqTBE OBJ_set_ctype,65L
2613
2614#define SN_setct_CapRevReqTBEX "setct-CapRevReqTBEX"
2615#define NID_setct_CapRevReqTBEX 584
2616#define OBJ_setct_CapRevReqTBEX OBJ_set_ctype,66L
2617
2618#define SN_setct_CapRevResTBE "setct-CapRevResTBE"
2619#define NID_setct_CapRevResTBE 585
2620#define OBJ_setct_CapRevResTBE OBJ_set_ctype,67L
2621
2622#define SN_setct_CredReqTBE "setct-CredReqTBE"
2623#define NID_setct_CredReqTBE 586
2624#define OBJ_setct_CredReqTBE OBJ_set_ctype,68L
2625
2626#define SN_setct_CredReqTBEX "setct-CredReqTBEX"
2627#define NID_setct_CredReqTBEX 587
2628#define OBJ_setct_CredReqTBEX OBJ_set_ctype,69L
2629
2630#define SN_setct_CredResTBE "setct-CredResTBE"
2631#define NID_setct_CredResTBE 588
2632#define OBJ_setct_CredResTBE OBJ_set_ctype,70L
2633
2634#define SN_setct_CredRevReqTBE "setct-CredRevReqTBE"
2635#define NID_setct_CredRevReqTBE 589
2636#define OBJ_setct_CredRevReqTBE OBJ_set_ctype,71L
2637
2638#define SN_setct_CredRevReqTBEX "setct-CredRevReqTBEX"
2639#define NID_setct_CredRevReqTBEX 590
2640#define OBJ_setct_CredRevReqTBEX OBJ_set_ctype,72L
2641
2642#define SN_setct_CredRevResTBE "setct-CredRevResTBE"
2643#define NID_setct_CredRevResTBE 591
2644#define OBJ_setct_CredRevResTBE OBJ_set_ctype,73L
2645
2646#define SN_setct_BatchAdminReqTBE "setct-BatchAdminReqTBE"
2647#define NID_setct_BatchAdminReqTBE 592
2648#define OBJ_setct_BatchAdminReqTBE OBJ_set_ctype,74L
2649
2650#define SN_setct_BatchAdminResTBE "setct-BatchAdminResTBE"
2651#define NID_setct_BatchAdminResTBE 593
2652#define OBJ_setct_BatchAdminResTBE OBJ_set_ctype,75L
2653
2654#define SN_setct_RegFormReqTBE "setct-RegFormReqTBE"
2655#define NID_setct_RegFormReqTBE 594
2656#define OBJ_setct_RegFormReqTBE OBJ_set_ctype,76L
2657
2658#define SN_setct_CertReqTBE "setct-CertReqTBE"
2659#define NID_setct_CertReqTBE 595
2660#define OBJ_setct_CertReqTBE OBJ_set_ctype,77L
2661
2662#define SN_setct_CertReqTBEX "setct-CertReqTBEX"
2663#define NID_setct_CertReqTBEX 596
2664#define OBJ_setct_CertReqTBEX OBJ_set_ctype,78L
2665
2666#define SN_setct_CertResTBE "setct-CertResTBE"
2667#define NID_setct_CertResTBE 597
2668#define OBJ_setct_CertResTBE OBJ_set_ctype,79L
2669
2670#define SN_setct_CRLNotificationTBS "setct-CRLNotificationTBS"
2671#define NID_setct_CRLNotificationTBS 598
2672#define OBJ_setct_CRLNotificationTBS OBJ_set_ctype,80L
2673
2674#define SN_setct_CRLNotificationResTBS "setct-CRLNotificationResTBS"
2675#define NID_setct_CRLNotificationResTBS 599
2676#define OBJ_setct_CRLNotificationResTBS OBJ_set_ctype,81L
2677
2678#define SN_setct_BCIDistributionTBS "setct-BCIDistributionTBS"
2679#define NID_setct_BCIDistributionTBS 600
2680#define OBJ_setct_BCIDistributionTBS OBJ_set_ctype,82L
2681
2682#define SN_setext_genCrypt "setext-genCrypt"
2683#define LN_setext_genCrypt "generic cryptogram"
2684#define NID_setext_genCrypt 601
2685#define OBJ_setext_genCrypt OBJ_set_msgExt,1L
2686
2687#define SN_setext_miAuth "setext-miAuth"
2688#define LN_setext_miAuth "merchant initiated auth"
2689#define NID_setext_miAuth 602
2690#define OBJ_setext_miAuth OBJ_set_msgExt,3L
2691
2692#define SN_setext_pinSecure "setext-pinSecure"
2693#define NID_setext_pinSecure 603
2694#define OBJ_setext_pinSecure OBJ_set_msgExt,4L
2695
2696#define SN_setext_pinAny "setext-pinAny"
2697#define NID_setext_pinAny 604
2698#define OBJ_setext_pinAny OBJ_set_msgExt,5L
2699
2700#define SN_setext_track2 "setext-track2"
2701#define NID_setext_track2 605
2702#define OBJ_setext_track2 OBJ_set_msgExt,7L
2703
2704#define SN_setext_cv "setext-cv"
2705#define LN_setext_cv "additional verification"
2706#define NID_setext_cv 606
2707#define OBJ_setext_cv OBJ_set_msgExt,8L
2708
2709#define SN_set_policy_root "set-policy-root"
2710#define NID_set_policy_root 607
2711#define OBJ_set_policy_root OBJ_set_policy,0L
2712
2713#define SN_setCext_hashedRoot "setCext-hashedRoot"
2714#define NID_setCext_hashedRoot 608
2715#define OBJ_setCext_hashedRoot OBJ_set_certExt,0L
2716
2717#define SN_setCext_certType "setCext-certType"
2718#define NID_setCext_certType 609
2719#define OBJ_setCext_certType OBJ_set_certExt,1L
2720
2721#define SN_setCext_merchData "setCext-merchData"
2722#define NID_setCext_merchData 610
2723#define OBJ_setCext_merchData OBJ_set_certExt,2L
2724
2725#define SN_setCext_cCertRequired "setCext-cCertRequired"
2726#define NID_setCext_cCertRequired 611
2727#define OBJ_setCext_cCertRequired OBJ_set_certExt,3L
2728
2729#define SN_setCext_tunneling "setCext-tunneling"
2730#define NID_setCext_tunneling 612
2731#define OBJ_setCext_tunneling OBJ_set_certExt,4L
2732
2733#define SN_setCext_setExt "setCext-setExt"
2734#define NID_setCext_setExt 613
2735#define OBJ_setCext_setExt OBJ_set_certExt,5L
2736
2737#define SN_setCext_setQualf "setCext-setQualf"
2738#define NID_setCext_setQualf 614
2739#define OBJ_setCext_setQualf OBJ_set_certExt,6L
2740
2741#define SN_setCext_PGWYcapabilities "setCext-PGWYcapabilities"
2742#define NID_setCext_PGWYcapabilities 615
2743#define OBJ_setCext_PGWYcapabilities OBJ_set_certExt,7L
2744
2745#define SN_setCext_TokenIdentifier "setCext-TokenIdentifier"
2746#define NID_setCext_TokenIdentifier 616
2747#define OBJ_setCext_TokenIdentifier OBJ_set_certExt,8L
2748
2749#define SN_setCext_Track2Data "setCext-Track2Data"
2750#define NID_setCext_Track2Data 617
2751#define OBJ_setCext_Track2Data OBJ_set_certExt,9L
2752
2753#define SN_setCext_TokenType "setCext-TokenType"
2754#define NID_setCext_TokenType 618
2755#define OBJ_setCext_TokenType OBJ_set_certExt,10L
2756
2757#define SN_setCext_IssuerCapabilities "setCext-IssuerCapabilities"
2758#define NID_setCext_IssuerCapabilities 619
2759#define OBJ_setCext_IssuerCapabilities OBJ_set_certExt,11L
2760
2761#define SN_setAttr_Cert "setAttr-Cert"
2762#define NID_setAttr_Cert 620
2763#define OBJ_setAttr_Cert OBJ_set_attr,0L
2764
2765#define SN_setAttr_PGWYcap "setAttr-PGWYcap"
2766#define LN_setAttr_PGWYcap "payment gateway capabilities"
2767#define NID_setAttr_PGWYcap 621
2768#define OBJ_setAttr_PGWYcap OBJ_set_attr,1L
2769
2770#define SN_setAttr_TokenType "setAttr-TokenType"
2771#define NID_setAttr_TokenType 622
2772#define OBJ_setAttr_TokenType OBJ_set_attr,2L
2773
2774#define SN_setAttr_IssCap "setAttr-IssCap"
2775#define LN_setAttr_IssCap "issuer capabilities"
2776#define NID_setAttr_IssCap 623
2777#define OBJ_setAttr_IssCap OBJ_set_attr,3L
2778
2779#define SN_set_rootKeyThumb "set-rootKeyThumb"
2780#define NID_set_rootKeyThumb 624
2781#define OBJ_set_rootKeyThumb OBJ_setAttr_Cert,0L
2782
2783#define SN_set_addPolicy "set-addPolicy"
2784#define NID_set_addPolicy 625
2785#define OBJ_set_addPolicy OBJ_setAttr_Cert,1L
2786
2787#define SN_setAttr_Token_EMV "setAttr-Token-EMV"
2788#define NID_setAttr_Token_EMV 626
2789#define OBJ_setAttr_Token_EMV OBJ_setAttr_TokenType,1L
2790
2791#define SN_setAttr_Token_B0Prime "setAttr-Token-B0Prime"
2792#define NID_setAttr_Token_B0Prime 627
2793#define OBJ_setAttr_Token_B0Prime OBJ_setAttr_TokenType,2L
2794
2795#define SN_setAttr_IssCap_CVM "setAttr-IssCap-CVM"
2796#define NID_setAttr_IssCap_CVM 628
2797#define OBJ_setAttr_IssCap_CVM OBJ_setAttr_IssCap,3L
2798
2799#define SN_setAttr_IssCap_T2 "setAttr-IssCap-T2"
2800#define NID_setAttr_IssCap_T2 629
2801#define OBJ_setAttr_IssCap_T2 OBJ_setAttr_IssCap,4L
2802
2803#define SN_setAttr_IssCap_Sig "setAttr-IssCap-Sig"
2804#define NID_setAttr_IssCap_Sig 630
2805#define OBJ_setAttr_IssCap_Sig OBJ_setAttr_IssCap,5L
2806
2807#define SN_setAttr_GenCryptgrm "setAttr-GenCryptgrm"
2808#define LN_setAttr_GenCryptgrm "generate cryptogram"
2809#define NID_setAttr_GenCryptgrm 631
2810#define OBJ_setAttr_GenCryptgrm OBJ_setAttr_IssCap_CVM,1L
2811
2812#define SN_setAttr_T2Enc "setAttr-T2Enc"
2813#define LN_setAttr_T2Enc "encrypted track 2"
2814#define NID_setAttr_T2Enc 632
2815#define OBJ_setAttr_T2Enc OBJ_setAttr_IssCap_T2,1L
2816
2817#define SN_setAttr_T2cleartxt "setAttr-T2cleartxt"
2818#define LN_setAttr_T2cleartxt "cleartext track 2"
2819#define NID_setAttr_T2cleartxt 633
2820#define OBJ_setAttr_T2cleartxt OBJ_setAttr_IssCap_T2,2L
2821
2822#define SN_setAttr_TokICCsig "setAttr-TokICCsig"
2823#define LN_setAttr_TokICCsig "ICC or token signature"
2824#define NID_setAttr_TokICCsig 634
2825#define OBJ_setAttr_TokICCsig OBJ_setAttr_IssCap_Sig,1L
2826
2827#define SN_setAttr_SecDevSig "setAttr-SecDevSig"
2828#define LN_setAttr_SecDevSig "secure device signature"
2829#define NID_setAttr_SecDevSig 635
2830#define OBJ_setAttr_SecDevSig OBJ_setAttr_IssCap_Sig,2L
2831
2832#define SN_set_brand_IATA_ATA "set-brand-IATA-ATA"
2833#define NID_set_brand_IATA_ATA 636
2834#define OBJ_set_brand_IATA_ATA OBJ_set_brand,1L
2835
2836#define SN_set_brand_Diners "set-brand-Diners"
2837#define NID_set_brand_Diners 637
2838#define OBJ_set_brand_Diners OBJ_set_brand,30L
2839
2840#define SN_set_brand_AmericanExpress "set-brand-AmericanExpress"
2841#define NID_set_brand_AmericanExpress 638
2842#define OBJ_set_brand_AmericanExpress OBJ_set_brand,34L
2843
2844#define SN_set_brand_JCB "set-brand-JCB"
2845#define NID_set_brand_JCB 639
2846#define OBJ_set_brand_JCB OBJ_set_brand,35L
2847
2848#define SN_set_brand_Visa "set-brand-Visa"
2849#define NID_set_brand_Visa 640
2850#define OBJ_set_brand_Visa OBJ_set_brand,4L
2851
2852#define SN_set_brand_MasterCard "set-brand-MasterCard"
2853#define NID_set_brand_MasterCard 641
2854#define OBJ_set_brand_MasterCard OBJ_set_brand,5L
2855
2856#define SN_set_brand_Novus "set-brand-Novus"
2857#define NID_set_brand_Novus 642
2858#define OBJ_set_brand_Novus OBJ_set_brand,6011L
2859
2860#define SN_des_cdmf "DES-CDMF"
2861#define LN_des_cdmf "des-cdmf"
2862#define NID_des_cdmf 643
2863#define OBJ_des_cdmf OBJ_rsadsi,3L,10L
2864
2865#define SN_rsaOAEPEncryptionSET "rsaOAEPEncryptionSET"
2866#define NID_rsaOAEPEncryptionSET 644
2867#define OBJ_rsaOAEPEncryptionSET OBJ_rsadsi,1L,1L,6L
2868
diff --git a/src/lib/libssl/src/crypto/objects/objects.pl b/src/lib/libssl/src/crypto/objects/objects.pl
index 76c06cc8f9..76bb8da677 100644
--- a/src/lib/libssl/src/crypto/objects/objects.pl
+++ b/src/lib/libssl/src/crypto/objects/objects.pl
@@ -107,12 +107,13 @@ while (<IN>)
107 } 107 }
108close IN; 108close IN;
109 109
110open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; 110#XXX don't modify input files
111foreach (sort { $a <=> $b } keys %nidn) 111#open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]";
112 { 112#foreach (sort { $a <=> $b } keys %nidn)
113 print NUMOUT $nidn{$_},"\t\t",$_,"\n"; 113# {
114 } 114# print NUMOUT $nidn{$_},"\t\t",$_,"\n";
115close NUMOUT; 115# }
116#close NUMOUT;
116 117
117open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; 118open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]";
118print OUT <<'EOF'; 119print OUT <<'EOF';
diff --git a/src/lib/libssl/src/crypto/ocsp/Makefile.ssl b/src/lib/libssl/src/crypto/ocsp/Makefile.ssl
new file mode 100644
index 0000000000..02477be538
--- /dev/null
+++ b/src/lib/libssl/src/crypto/ocsp/Makefile.ssl
@@ -0,0 +1,293 @@
1#
2# OpenSSL/ocsp/Makefile.ssl
3#
4
5DIR= ocsp
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile README
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= ocsp_asn.c ocsp_ext.c ocsp_ht.c ocsp_lib.c ocsp_cl.c \
27 ocsp_srv.c ocsp_prn.c ocsp_vfy.c ocsp_err.c
28
29LIBOBJ= ocsp_asn.o ocsp_ext.o ocsp_ht.o ocsp_lib.o ocsp_cl.o \
30 ocsp_srv.o ocsp_prn.o ocsp_vfy.o ocsp_err.o
31
32SRC= $(LIBSRC)
33
34EXHEADER= ocsp.h
35HEADER= $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49files:
50 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
51
52links:
53 @sh $(TOP)/util/point.sh Makefile.ssl Makefile ;
54 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
55 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
56 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
57
58install:
59 @for i in $(EXHEADER) ; \
60 do \
61 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
62 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
63 done;
64
65tags:
66 ctags $(SRC)
67
68tests:
69
70lint:
71 lint -DLINT $(INCLUDES) $(SRC)>fluff
72
73depend:
74 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
75
76dclean:
77 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
78 mv -f Makefile.new $(MAKEFILE)
79
80clean:
81 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
82
83# DO NOT DELETE THIS LINE -- make depend depends on it.
84
85ocsp_asn.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
86ocsp_asn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
87ocsp_asn.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
88ocsp_asn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
89ocsp_asn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
90ocsp_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
91ocsp_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
92ocsp_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/evp.h
93ocsp_asn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
94ocsp_asn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
95ocsp_asn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
96ocsp_asn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
97ocsp_asn.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
98ocsp_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
99ocsp_asn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
100ocsp_asn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
101ocsp_asn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
102ocsp_asn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
103ocsp_asn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
104ocsp_asn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
105ocsp_asn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
106ocsp_asn.o: ../../include/openssl/x509v3.h ocsp_asn.c
107ocsp_cl.o: ../../e_os.h ../../include/openssl/aes.h
108ocsp_cl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
109ocsp_cl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
110ocsp_cl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
111ocsp_cl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
112ocsp_cl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
113ocsp_cl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
114ocsp_cl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
115ocsp_cl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
116ocsp_cl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
117ocsp_cl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
118ocsp_cl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
119ocsp_cl.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
120ocsp_cl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
121ocsp_cl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
122ocsp_cl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
123ocsp_cl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
124ocsp_cl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
125ocsp_cl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
126ocsp_cl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
127ocsp_cl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
128ocsp_cl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
129ocsp_cl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
130ocsp_cl.o: ../../include/openssl/x509v3.h ../cryptlib.h ocsp_cl.c
131ocsp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
132ocsp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
133ocsp_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
134ocsp_err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
135ocsp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
136ocsp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
137ocsp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
138ocsp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h
139ocsp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
140ocsp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
141ocsp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
142ocsp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
143ocsp_err.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
144ocsp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
145ocsp_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
146ocsp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
147ocsp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
148ocsp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
149ocsp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
150ocsp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
151ocsp_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
152ocsp_err.o: ../../include/openssl/x509v3.h ocsp_err.c
153ocsp_ext.o: ../../e_os.h ../../include/openssl/aes.h
154ocsp_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
155ocsp_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
156ocsp_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
157ocsp_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
158ocsp_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
159ocsp_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
160ocsp_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
161ocsp_ext.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
162ocsp_ext.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
163ocsp_ext.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
164ocsp_ext.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
165ocsp_ext.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
166ocsp_ext.o: ../../include/openssl/opensslconf.h
167ocsp_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
168ocsp_ext.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
169ocsp_ext.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
170ocsp_ext.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
171ocsp_ext.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
172ocsp_ext.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
173ocsp_ext.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
174ocsp_ext.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
175ocsp_ext.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
176ocsp_ext.o: ../cryptlib.h ocsp_ext.c
177ocsp_ht.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
178ocsp_ht.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
179ocsp_ht.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
180ocsp_ht.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
181ocsp_ht.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
182ocsp_ht.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
183ocsp_ht.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
184ocsp_ht.o: ../../include/openssl/err.h ../../include/openssl/evp.h
185ocsp_ht.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
186ocsp_ht.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
187ocsp_ht.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
188ocsp_ht.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
189ocsp_ht.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
190ocsp_ht.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
191ocsp_ht.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
192ocsp_ht.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
193ocsp_ht.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
194ocsp_ht.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
195ocsp_ht.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
196ocsp_ht.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
197ocsp_ht.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
198ocsp_ht.o: ../../include/openssl/x509v3.h ocsp_ht.c
199ocsp_lib.o: ../../e_os.h ../../include/openssl/aes.h
200ocsp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
201ocsp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
202ocsp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
203ocsp_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
204ocsp_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
205ocsp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
206ocsp_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
207ocsp_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
208ocsp_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
209ocsp_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
210ocsp_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
211ocsp_lib.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
212ocsp_lib.o: ../../include/openssl/opensslconf.h
213ocsp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
214ocsp_lib.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
215ocsp_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
216ocsp_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
217ocsp_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
218ocsp_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
219ocsp_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
220ocsp_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
221ocsp_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
222ocsp_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
223ocsp_lib.o: ../cryptlib.h ocsp_lib.c
224ocsp_prn.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
225ocsp_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
226ocsp_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
227ocsp_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
228ocsp_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
229ocsp_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
230ocsp_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
231ocsp_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h
232ocsp_prn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
233ocsp_prn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
234ocsp_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
235ocsp_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
236ocsp_prn.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
237ocsp_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
238ocsp_prn.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
239ocsp_prn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
240ocsp_prn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
241ocsp_prn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
242ocsp_prn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
243ocsp_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
244ocsp_prn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
245ocsp_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
246ocsp_prn.o: ../../include/openssl/x509v3.h ocsp_prn.c
247ocsp_srv.o: ../../e_os.h ../../include/openssl/aes.h
248ocsp_srv.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
249ocsp_srv.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
250ocsp_srv.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
251ocsp_srv.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
252ocsp_srv.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
253ocsp_srv.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
254ocsp_srv.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
255ocsp_srv.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
256ocsp_srv.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
257ocsp_srv.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
258ocsp_srv.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
259ocsp_srv.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
260ocsp_srv.o: ../../include/openssl/opensslconf.h
261ocsp_srv.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
262ocsp_srv.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
263ocsp_srv.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
264ocsp_srv.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
265ocsp_srv.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
266ocsp_srv.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
267ocsp_srv.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
268ocsp_srv.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
269ocsp_srv.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
270ocsp_srv.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
271ocsp_srv.o: ../cryptlib.h ocsp_srv.c
272ocsp_vfy.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
273ocsp_vfy.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
274ocsp_vfy.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
275ocsp_vfy.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
276ocsp_vfy.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
277ocsp_vfy.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
278ocsp_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
279ocsp_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h
280ocsp_vfy.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
281ocsp_vfy.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
282ocsp_vfy.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
283ocsp_vfy.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
284ocsp_vfy.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
285ocsp_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
286ocsp_vfy.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
287ocsp_vfy.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
288ocsp_vfy.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
289ocsp_vfy.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
290ocsp_vfy.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
291ocsp_vfy.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
292ocsp_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
293ocsp_vfy.o: ../../include/openssl/x509v3.h ocsp_vfy.c
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_ext.c b/src/lib/libssl/src/crypto/ocsp/ocsp_ext.c
index 57399433fc..d6c8899f58 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_ext.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_ext.c
@@ -305,8 +305,6 @@ err:
305 305
306/* Add a nonce to an extension stack. A nonce can be specificed or if NULL 306/* Add a nonce to an extension stack. A nonce can be specificed or if NULL
307 * a random nonce will be generated. 307 * a random nonce will be generated.
308 * Note: OpenSSL 0.9.7d and later create an OCTET STRING containing the
309 * nonce, previous versions used the raw nonce.
310 */ 308 */
311 309
312static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, unsigned char *val, int len) 310static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, unsigned char *val, int len)
@@ -315,28 +313,20 @@ static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, unsigned char *val,
315 ASN1_OCTET_STRING os; 313 ASN1_OCTET_STRING os;
316 int ret = 0; 314 int ret = 0;
317 if (len <= 0) len = OCSP_DEFAULT_NONCE_LENGTH; 315 if (len <= 0) len = OCSP_DEFAULT_NONCE_LENGTH;
318 /* Create the OCTET STRING manually by writing out the header and 316 if (val) tmpval = val;
319 * appending the content octets. This avoids an extra memory allocation
320 * operation in some cases. Applications should *NOT* do this because
321 * it relies on library internals.
322 */
323 os.length = ASN1_object_size(0, len, V_ASN1_OCTET_STRING);
324 os.data = OPENSSL_malloc(os.length);
325 if (os.data == NULL)
326 goto err;
327 tmpval = os.data;
328 ASN1_put_object(&tmpval, 0, len, V_ASN1_OCTET_STRING, V_ASN1_UNIVERSAL);
329 if (val)
330 memcpy(tmpval, val, len);
331 else 317 else
318 {
319 if (!(tmpval = OPENSSL_malloc(len))) goto err;
332 RAND_pseudo_bytes(tmpval, len); 320 RAND_pseudo_bytes(tmpval, len);
321 }
322 os.data = tmpval;
323 os.length = len;
333 if(!X509V3_add1_i2d(exts, NID_id_pkix_OCSP_Nonce, 324 if(!X509V3_add1_i2d(exts, NID_id_pkix_OCSP_Nonce,
334 &os, 0, X509V3_ADD_REPLACE)) 325 &os, 0, X509V3_ADD_REPLACE))
335 goto err; 326 goto err;
336 ret = 1; 327 ret = 1;
337 err: 328 err:
338 if (os.data) 329 if(!val) OPENSSL_free(tmpval);
339 OPENSSL_free(os.data);
340 return ret; 330 return ret;
341 } 331 }
342 332
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c b/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c
index 9e87fc7895..3875af165c 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c
@@ -253,7 +253,6 @@ int OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pss
253 253
254 254
255 err: 255 err:
256 if (buf) OPENSSL_free(buf);
257 if (*ppath) OPENSSL_free(*ppath); 256 if (*ppath) OPENSSL_free(*ppath);
258 if (*pport) OPENSSL_free(*pport); 257 if (*pport) OPENSSL_free(*pport);
259 if (*phost) OPENSSL_free(*phost); 258 if (*phost) OPENSSL_free(*phost);
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c b/src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c
index 3d58dfb06c..1f5fda7ca3 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c
@@ -3,7 +3,7 @@
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
6 * Copyright (c) 2000-2004 The OpenSSL Project. All rights reserved. 6 * Copyright (c) 2000 The OpenSSL Project. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
@@ -272,7 +272,7 @@ static int ocsp_check_ids(STACK_OF(OCSP_SINGLERESP) *sresp, OCSP_CERTID **ret)
272 272
273 for (i = 1; i < idcount; i++) 273 for (i = 1; i < idcount; i++)
274 { 274 {
275 tmpid = sk_OCSP_SINGLERESP_value(sresp, i)->certId; 275 tmpid = sk_OCSP_SINGLERESP_value(sresp, 0)->certId;
276 /* Check to see if IDs match */ 276 /* Check to see if IDs match */
277 if (OCSP_id_issuer_cmp(cid, tmpid)) 277 if (OCSP_id_issuer_cmp(cid, tmpid))
278 { 278 {
@@ -330,7 +330,7 @@ static int ocsp_match_issuerid(X509 *cert, OCSP_CERTID *cid,
330 OCSP_CERTID *tmpid; 330 OCSP_CERTID *tmpid;
331 for (i = 0; i < sk_OCSP_SINGLERESP_num(sresp); i++) 331 for (i = 0; i < sk_OCSP_SINGLERESP_num(sresp); i++)
332 { 332 {
333 tmpid = sk_OCSP_SINGLERESP_value(sresp, i)->certId; 333 tmpid = sk_OCSP_SINGLERESP_value(sresp, 0)->certId;
334 ret = ocsp_match_issuerid(cert, tmpid, NULL); 334 ret = ocsp_match_issuerid(cert, tmpid, NULL);
335 if (ret <= 0) return ret; 335 if (ret <= 0) return ret;
336 } 336 }
diff --git a/src/lib/libssl/src/crypto/opensslv.h b/src/lib/libssl/src/crypto/opensslv.h
index 02f1710fb3..e226d9de79 100644
--- a/src/lib/libssl/src/crypto/opensslv.h
+++ b/src/lib/libssl/src/crypto/opensslv.h
@@ -25,8 +25,8 @@
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 0x0090704fL 28#define OPENSSL_VERSION_NUMBER 0x0090703fL
29#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7d 17 Mar 2004" 29#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7c 30 Sep 2003"
30#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT 30#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
31 31
32 32
diff --git a/src/lib/libssl/src/crypto/pem/Makefile.ssl b/src/lib/libssl/src/crypto/pem/Makefile.ssl
new file mode 100644
index 0000000000..d3043eb401
--- /dev/null
+++ b/src/lib/libssl/src/crypto/pem/Makefile.ssl
@@ -0,0 +1,336 @@
1#
2# SSLeay/crypto/pem/Makefile
3#
4
5DIR= pem
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c \
27 pem_x509.c pem_xaux.c pem_oth.c pem_pk8.c pem_pkey.c
28
29LIBOBJ= pem_sign.o pem_seal.o pem_info.o pem_lib.o pem_all.o pem_err.o \
30 pem_x509.o pem_xaux.o pem_oth.o pem_pk8.o pem_pkey.o
31
32SRC= $(LIBSRC)
33
34EXHEADER= pem.h pem2.h
35HEADER= $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49files:
50 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
51
52links: $(EXHEADER)
53 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
54 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
55 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
56 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
57
58install:
59 @for i in $(EXHEADER) ; \
60 do \
61 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
62 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
63 done;
64
65tags:
66 ctags $(SRC)
67
68tests:
69
70lint:
71 lint -DLINT $(INCLUDES) $(SRC)>fluff
72
73depend:
74 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
75
76dclean:
77 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
78 mv -f Makefile.new $(MAKEFILE)
79
80clean:
81 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
82
83# DO NOT DELETE THIS LINE -- make depend depends on it.
84
85pem_all.o: ../../e_os.h ../../include/openssl/aes.h
86pem_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
87pem_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
88pem_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
89pem_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
90pem_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
91pem_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
92pem_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
93pem_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
94pem_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
95pem_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
96pem_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
97pem_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
98pem_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
99pem_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
100pem_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
101pem_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
102pem_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
103pem_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
104pem_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
105pem_all.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
106pem_all.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_all.c
107pem_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
108pem_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
109pem_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
110pem_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
111pem_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
112pem_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
113pem_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
114pem_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
115pem_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
116pem_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
117pem_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
118pem_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
119pem_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
120pem_err.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
121pem_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
122pem_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
123pem_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
124pem_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
125pem_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
126pem_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
127pem_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
128pem_err.o: pem_err.c
129pem_info.o: ../../e_os.h ../../include/openssl/aes.h
130pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
131pem_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
132pem_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
133pem_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
134pem_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
135pem_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
136pem_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h
137pem_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
138pem_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
139pem_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
140pem_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
141pem_info.o: ../../include/openssl/opensslconf.h
142pem_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
143pem_info.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
144pem_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
145pem_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
146pem_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
147pem_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
148pem_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
149pem_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
150pem_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
151pem_info.o: ../cryptlib.h pem_info.c
152pem_lib.o: ../../e_os.h ../../include/openssl/aes.h
153pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
154pem_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
155pem_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
156pem_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
157pem_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
158pem_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
159pem_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
160pem_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
161pem_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
162pem_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
163pem_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
164pem_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
165pem_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
166pem_lib.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h
167pem_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
168pem_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
169pem_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
170pem_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
171pem_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
172pem_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
173pem_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
174pem_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_lib.c
175pem_oth.o: ../../e_os.h ../../include/openssl/aes.h
176pem_oth.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
177pem_oth.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
178pem_oth.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
179pem_oth.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
180pem_oth.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
181pem_oth.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
182pem_oth.o: ../../include/openssl/err.h ../../include/openssl/evp.h
183pem_oth.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
184pem_oth.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
185pem_oth.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
186pem_oth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
187pem_oth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
188pem_oth.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
189pem_oth.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
190pem_oth.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
191pem_oth.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
192pem_oth.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
193pem_oth.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
194pem_oth.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
195pem_oth.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
196pem_oth.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
197pem_oth.o: ../cryptlib.h pem_oth.c
198pem_pk8.o: ../../e_os.h ../../include/openssl/aes.h
199pem_pk8.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
200pem_pk8.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
201pem_pk8.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
202pem_pk8.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
203pem_pk8.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
204pem_pk8.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
205pem_pk8.o: ../../include/openssl/err.h ../../include/openssl/evp.h
206pem_pk8.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
207pem_pk8.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
208pem_pk8.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
209pem_pk8.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
210pem_pk8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
211pem_pk8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
212pem_pk8.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h
213pem_pk8.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
214pem_pk8.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
215pem_pk8.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
216pem_pk8.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
217pem_pk8.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
218pem_pk8.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
219pem_pk8.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
220pem_pk8.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_pk8.c
221pem_pkey.o: ../../e_os.h ../../include/openssl/aes.h
222pem_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
223pem_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
224pem_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
225pem_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
226pem_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
227pem_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
228pem_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
229pem_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
230pem_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
231pem_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
232pem_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
233pem_pkey.o: ../../include/openssl/opensslconf.h
234pem_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
235pem_pkey.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
236pem_pkey.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
237pem_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
238pem_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
239pem_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
240pem_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
241pem_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
242pem_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
243pem_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
244pem_pkey.o: ../cryptlib.h pem_pkey.c
245pem_seal.o: ../../e_os.h ../../include/openssl/aes.h
246pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
247pem_seal.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
248pem_seal.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
249pem_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
250pem_seal.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
251pem_seal.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
252pem_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h
253pem_seal.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
254pem_seal.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
255pem_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
256pem_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
257pem_seal.o: ../../include/openssl/opensslconf.h
258pem_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
259pem_seal.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
260pem_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
261pem_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
262pem_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
263pem_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
264pem_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
265pem_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
266pem_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
267pem_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_seal.c
268pem_sign.o: ../../e_os.h ../../include/openssl/aes.h
269pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
270pem_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
271pem_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
272pem_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
273pem_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
274pem_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
275pem_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
276pem_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
277pem_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
278pem_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
279pem_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
280pem_sign.o: ../../include/openssl/opensslconf.h
281pem_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
282pem_sign.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
283pem_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
284pem_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
285pem_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
286pem_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
287pem_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
288pem_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
289pem_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
290pem_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_sign.c
291pem_x509.o: ../../e_os.h ../../include/openssl/aes.h
292pem_x509.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
293pem_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
294pem_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
295pem_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
296pem_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
297pem_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
298pem_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h
299pem_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
300pem_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
301pem_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
302pem_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
303pem_x509.o: ../../include/openssl/opensslconf.h
304pem_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
305pem_x509.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
306pem_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
307pem_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
308pem_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
309pem_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
310pem_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
311pem_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
312pem_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
313pem_x509.o: ../cryptlib.h pem_x509.c
314pem_xaux.o: ../../e_os.h ../../include/openssl/aes.h
315pem_xaux.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
316pem_xaux.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
317pem_xaux.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
318pem_xaux.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
319pem_xaux.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
320pem_xaux.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
321pem_xaux.o: ../../include/openssl/err.h ../../include/openssl/evp.h
322pem_xaux.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
323pem_xaux.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
324pem_xaux.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
325pem_xaux.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
326pem_xaux.o: ../../include/openssl/opensslconf.h
327pem_xaux.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
328pem_xaux.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
329pem_xaux.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
330pem_xaux.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
331pem_xaux.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
332pem_xaux.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
333pem_xaux.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
334pem_xaux.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
335pem_xaux.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
336pem_xaux.o: ../cryptlib.h pem_xaux.c
diff --git a/src/lib/libssl/src/crypto/pem/pem_lib.c b/src/lib/libssl/src/crypto/pem/pem_lib.c
index 7785039b99..3bec2d7e9f 100644
--- a/src/lib/libssl/src/crypto/pem/pem_lib.c
+++ b/src/lib/libssl/src/crypto/pem/pem_lib.c
@@ -131,9 +131,9 @@ void PEM_proc_type(char *buf, int type)
131 else 131 else
132 str="BAD-TYPE"; 132 str="BAD-TYPE";
133 133
134 BUF_strlcat(buf,"Proc-Type: 4,",PEM_BUFSIZE); 134 strlcat(buf,"Proc-Type: 4,",PEM_BUFSIZE);
135 BUF_strlcat(buf,str,PEM_BUFSIZE); 135 strlcat(buf,str,PEM_BUFSIZE);
136 BUF_strlcat(buf,"\n",PEM_BUFSIZE); 136 strlcat(buf,"\n",PEM_BUFSIZE);
137 } 137 }
138 138
139void PEM_dek_info(char *buf, const char *type, int len, char *str) 139void PEM_dek_info(char *buf, const char *type, int len, char *str)
@@ -142,9 +142,9 @@ void PEM_dek_info(char *buf, const char *type, int len, char *str)
142 long i; 142 long i;
143 int j; 143 int j;
144 144
145 BUF_strlcat(buf,"DEK-Info: ",PEM_BUFSIZE); 145 strlcat(buf,"DEK-Info: ",PEM_BUFSIZE);
146 BUF_strlcat(buf,type,PEM_BUFSIZE); 146 strlcat(buf,type,PEM_BUFSIZE);
147 BUF_strlcat(buf,",",PEM_BUFSIZE); 147 strlcat(buf,",",PEM_BUFSIZE);
148 j=strlen(buf); 148 j=strlen(buf);
149 if (j + (len * 2) + 1 > PEM_BUFSIZE) 149 if (j + (len * 2) + 1 > PEM_BUFSIZE)
150 return; 150 return;
@@ -535,7 +535,7 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data,
535 long len) 535 long len)
536 { 536 {
537 int nlen,n,i,j,outl; 537 int nlen,n,i,j,outl;
538 unsigned char *buf = NULL; 538 unsigned char *buf;
539 EVP_ENCODE_CTX ctx; 539 EVP_ENCODE_CTX ctx;
540 int reason=ERR_R_BUF_LIB; 540 int reason=ERR_R_BUF_LIB;
541 541
@@ -555,7 +555,7 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data,
555 goto err; 555 goto err;
556 } 556 }
557 557
558 buf = OPENSSL_malloc(PEM_BUFSIZE*8); 558 buf=(unsigned char *)OPENSSL_malloc(PEM_BUFSIZE*8);
559 if (buf == NULL) 559 if (buf == NULL)
560 { 560 {
561 reason=ERR_R_MALLOC_FAILURE; 561 reason=ERR_R_MALLOC_FAILURE;
@@ -576,15 +576,12 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data,
576 EVP_EncodeFinal(&ctx,buf,&outl); 576 EVP_EncodeFinal(&ctx,buf,&outl);
577 if ((outl > 0) && (BIO_write(bp,(char *)buf,outl) != outl)) goto err; 577 if ((outl > 0) && (BIO_write(bp,(char *)buf,outl) != outl)) goto err;
578 OPENSSL_free(buf); 578 OPENSSL_free(buf);
579 buf = NULL;
580 if ( (BIO_write(bp,"-----END ",9) != 9) || 579 if ( (BIO_write(bp,"-----END ",9) != 9) ||
581 (BIO_write(bp,name,nlen) != nlen) || 580 (BIO_write(bp,name,nlen) != nlen) ||
582 (BIO_write(bp,"-----\n",6) != 6)) 581 (BIO_write(bp,"-----\n",6) != 6))
583 goto err; 582 goto err;
584 return(i+outl); 583 return(i+outl);
585err: 584err:
586 if (buf)
587 OPENSSL_free(buf);
588 PEMerr(PEM_F_PEM_WRITE_BIO,reason); 585 PEMerr(PEM_F_PEM_WRITE_BIO,reason);
589 return(0); 586 return(0);
590 } 587 }
diff --git a/src/lib/libssl/src/crypto/pem/pem_pkey.c b/src/lib/libssl/src/crypto/pem/pem_pkey.c
index f77c949e87..d96ecf6940 100644
--- a/src/lib/libssl/src/crypto/pem/pem_pkey.c
+++ b/src/lib/libssl/src/crypto/pem/pem_pkey.c
@@ -87,10 +87,6 @@ EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, vo
87 p8inf=d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, len); 87 p8inf=d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, len);
88 if(!p8inf) goto p8err; 88 if(!p8inf) goto p8err;
89 ret = EVP_PKCS82PKEY(p8inf); 89 ret = EVP_PKCS82PKEY(p8inf);
90 if(x) {
91 if(*x) EVP_PKEY_free((EVP_PKEY *)*x);
92 *x = ret;
93 }
94 PKCS8_PRIV_KEY_INFO_free(p8inf); 90 PKCS8_PRIV_KEY_INFO_free(p8inf);
95 } else if (strcmp(nm,PEM_STRING_PKCS8) == 0) { 91 } else if (strcmp(nm,PEM_STRING_PKCS8) == 0) {
96 PKCS8_PRIV_KEY_INFO *p8inf; 92 PKCS8_PRIV_KEY_INFO *p8inf;
diff --git a/src/lib/libssl/src/crypto/perlasm/x86asm.pl b/src/lib/libssl/src/crypto/perlasm/x86asm.pl
index 1cb96e914a..7c675e3ced 100644
--- a/src/lib/libssl/src/crypto/perlasm/x86asm.pl
+++ b/src/lib/libssl/src/crypto/perlasm/x86asm.pl
@@ -18,9 +18,13 @@ sub main'asm_init
18 ($type,$fn,$i386)=@_; 18 ($type,$fn,$i386)=@_;
19 $filename=$fn; 19 $filename=$fn;
20 20
21 $elf=$cpp=$sol=$aout=$win32=$gaswin=0; 21 $elf=$cpp=$sol=$aout=$win32=$gaswin=$openbsd=0;
22 if ( ($type eq "elf")) 22 if ( ($type eq "elf"))
23 { $elf=1; require "x86unix.pl"; } 23 { $elf=1; require "x86unix.pl"; }
24 elsif ( ($type eq "openbsd-elf"))
25 { $openbsd=$elf=1; require "x86unix.pl"; }
26 elsif ( ($type eq "openbsd-a.out"))
27 { $openbsd=1; require "x86unix.pl"; }
24 elsif ( ($type eq "a.out")) 28 elsif ( ($type eq "a.out"))
25 { $aout=1; require "x86unix.pl"; } 29 { $aout=1; require "x86unix.pl"; }
26 elsif ( ($type eq "gaswin")) 30 elsif ( ($type eq "gaswin"))
@@ -43,6 +47,8 @@ Pick one target type from
43 cpp - format so x86unix.cpp can be used 47 cpp - format so x86unix.cpp can be used
44 win32 - Windows 95/Windows NT 48 win32 - Windows 95/Windows NT
45 win32n - Windows 95/Windows NT NASM format 49 win32n - Windows 95/Windows NT NASM format
50 openbsd-elf - OpenBSD elf
51 openbsd-a.out - OpenBSD a.out
46EOF 52EOF
47 exit(1); 53 exit(1);
48 } 54 }
diff --git a/src/lib/libssl/src/crypto/perlasm/x86unix.pl b/src/lib/libssl/src/crypto/perlasm/x86unix.pl
index 10b669bf04..53ad5f4927 100644
--- a/src/lib/libssl/src/crypto/perlasm/x86unix.pl
+++ b/src/lib/libssl/src/crypto/perlasm/x86unix.pl
@@ -15,6 +15,12 @@ sub main'asm_get_output { return(@out); }
15sub main'get_labels { return(@labels); } 15sub main'get_labels { return(@labels); }
16sub main'external_label { push(@labels,@_); } 16sub main'external_label { push(@labels,@_); }
17 17
18if ($main'openbsd)
19 {
20 $com_start='/*';
21 $com_end='*/';
22 }
23
18if ($main'cpp) 24if ($main'cpp)
19 { 25 {
20 $align="ALIGN"; 26 $align="ALIGN";
@@ -276,6 +282,9 @@ sub main'file
276 { 282 {
277 local($file)=@_; 283 local($file)=@_;
278 284
285 if ($main'openbsd)
286 { push(@out,"#include <machine/asm.h>\n"); return; }
287
279 local($tmp)=<<"EOF"; 288 local($tmp)=<<"EOF";
280 .file "$file.s" 289 .file "$file.s"
281 .version "01.01" 290 .version "01.01"
@@ -291,6 +300,9 @@ sub main'function_begin
291 &main'external_label($func); 300 &main'external_label($func);
292 $func=$under.$func; 301 $func=$under.$func;
293 302
303 if ($main'openbsd)
304 { push (@out, "\nENTRY($func)\n"); goto skip; }
305
294 local($tmp)=<<"EOF"; 306 local($tmp)=<<"EOF";
295.text 307.text
296 .align $align 308 .align $align
@@ -303,6 +315,7 @@ EOF
303 { $tmp=push(@out,"\t.def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); } 315 { $tmp=push(@out,"\t.def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
304 else { $tmp=push(@out,"\t.type\t$func,\@function\n"); } 316 else { $tmp=push(@out,"\t.type\t$func,\@function\n"); }
305 push(@out,"$func:\n"); 317 push(@out,"$func:\n");
318skip:
306 $tmp=<<"EOF"; 319 $tmp=<<"EOF";
307 pushl %ebp 320 pushl %ebp
308 pushl %ebx 321 pushl %ebx
@@ -321,6 +334,9 @@ sub main'function_begin_B
321 &main'external_label($func); 334 &main'external_label($func);
322 $func=$under.$func; 335 $func=$under.$func;
323 336
337 if ($main'openbsd)
338 { push(@out, "\nENTRY($func)\n"); goto skip; }
339
324 local($tmp)=<<"EOF"; 340 local($tmp)=<<"EOF";
325.text 341.text
326 .align $align 342 .align $align
@@ -333,6 +349,7 @@ EOF
333 { $tmp=push(@out,"\t.def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); } 349 { $tmp=push(@out,"\t.def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
334 else { push(@out,"\t.type $func,\@function\n"); } 350 else { push(@out,"\t.type $func,\@function\n"); }
335 push(@out,"$func:\n"); 351 push(@out,"$func:\n");
352skip:
336 $stack=4; 353 $stack=4;
337 } 354 }
338 355
@@ -429,7 +446,8 @@ sub main'swtmp
429 446
430sub main'comment 447sub main'comment
431 { 448 {
432 if ($main'elf) # GNU and SVR4 as'es use different comment delimiters, 449 if (!$main'openbsd && $main'elf)
450 # GNU and SVR4 as'es use different comment delimiters,
433 { # so we just skip comments... 451 { # so we just skip comments...
434 push(@out,"\n"); 452 push(@out,"\n");
435 return; 453 return;
@@ -460,7 +478,10 @@ sub main'set_label
460 $label{$_[0]}=".${label}${_[0]}"; 478 $label{$_[0]}=".${label}${_[0]}";
461 $label++; 479 $label++;
462 } 480 }
463 push(@out,".align $align\n") if ($_[1] != 0); 481 if ($main'openbsd)
482 { push(@out,"_ALIGN_TEXT\n") if ($_[1] != 0); }
483 else
484 { push(@out,".align $align\n") if ($_[1] != 0); }
464 push(@out,"$label{$_[0]}:\n"); 485 push(@out,"$label{$_[0]}:\n");
465 } 486 }
466 487
@@ -569,6 +590,16 @@ sub main'picmeup
569___ 590___
570 push(@out,$tmp); 591 push(@out,$tmp);
571 } 592 }
593 elsif ($main'openbsd)
594 {
595 push(@out, "#ifdef PIC\n");
596 push(@out, "\tPIC_PROLOGUE\n");
597 &main'mov($dst,"PIC_GOT($sym)");
598 push(@out, "\tPIC_EPILOGUE\n");
599 push(@out, "#else\n");
600 &main'lea($dst,&main'DWP($sym));
601 push(@out, "#endif\n");
602 }
572 elsif ($main'pic && ($main'elf || $main'aout)) 603 elsif ($main'pic && ($main'elf || $main'aout))
573 { 604 {
574 push(@out,"\t.align\t8\n"); 605 push(@out,"\t.align\t8\n");
diff --git a/src/lib/libssl/src/crypto/pkcs12/Makefile.ssl b/src/lib/libssl/src/crypto/pkcs12/Makefile.ssl
new file mode 100644
index 0000000000..a6e47b4085
--- /dev/null
+++ b/src/lib/libssl/src/crypto/pkcs12/Makefile.ssl
@@ -0,0 +1,417 @@
1#
2# SSLeay/crypto/pkcs12/Makefile
3#
4
5DIR= pkcs12
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c p12_decr.c \
27 p12_init.c p12_key.c p12_kiss.c p12_mutl.c\
28 p12_utl.c p12_npas.c pk12err.c p12_p8d.c p12_p8e.c
29LIBOBJ= p12_add.o p12_asn.o p12_attr.o p12_crpt.o p12_crt.o p12_decr.o \
30 p12_init.o p12_key.o p12_kiss.o p12_mutl.o\
31 p12_utl.o p12_npas.o pk12err.o p12_p8d.o p12_p8e.o
32
33SRC= $(LIBSRC)
34
35EXHEADER= pkcs12.h
36HEADER= $(EXHEADER)
37
38ALL= $(GENERAL) $(SRC) $(HEADER)
39
40top:
41 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
42
43test:
44
45all: lib
46
47lib: $(LIBOBJ)
48 $(AR) $(LIB) $(LIBOBJ)
49 $(RANLIB) $(LIB) || echo Never mind.
50 @touch lib
51
52files:
53 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
54
55links:
56 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
57 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
58 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
59 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
60
61install:
62 @for i in $(EXHEADER) ; \
63 do \
64 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
65 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
66 done;
67
68tags:
69 ctags $(SRC)
70
71tests:
72
73lint:
74 lint -DLINT $(INCLUDES) $(SRC)>fluff
75
76depend:
77 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
78
79dclean:
80 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
81 mv -f Makefile.new $(MAKEFILE)
82
83clean:
84 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
85
86# DO NOT DELETE THIS LINE -- make depend depends on it.
87
88p12_add.o: ../../e_os.h ../../include/openssl/aes.h
89p12_add.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
90p12_add.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
91p12_add.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
92p12_add.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
93p12_add.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
94p12_add.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
95p12_add.o: ../../include/openssl/err.h ../../include/openssl/evp.h
96p12_add.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
97p12_add.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
98p12_add.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
99p12_add.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
100p12_add.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
101p12_add.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
102p12_add.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
103p12_add.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
104p12_add.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
105p12_add.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
106p12_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
107p12_add.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
108p12_add.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
109p12_add.o: ../cryptlib.h p12_add.c
110p12_asn.o: ../../e_os.h ../../include/openssl/aes.h
111p12_asn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
112p12_asn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
113p12_asn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
114p12_asn.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
115p12_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
116p12_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
117p12_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
118p12_asn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
119p12_asn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
120p12_asn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
121p12_asn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
122p12_asn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
123p12_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
124p12_asn.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
125p12_asn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
126p12_asn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
127p12_asn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
128p12_asn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
129p12_asn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
130p12_asn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
131p12_asn.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_asn.c
132p12_attr.o: ../../e_os.h ../../include/openssl/aes.h
133p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
134p12_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
135p12_attr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
136p12_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
137p12_attr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
138p12_attr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
139p12_attr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
140p12_attr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
141p12_attr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
142p12_attr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
143p12_attr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
144p12_attr.o: ../../include/openssl/opensslconf.h
145p12_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
146p12_attr.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
147p12_attr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
148p12_attr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
149p12_attr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
150p12_attr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
151p12_attr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
152p12_attr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
153p12_attr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_attr.c
154p12_crpt.o: ../../e_os.h ../../include/openssl/aes.h
155p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
156p12_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
157p12_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
158p12_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
159p12_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
160p12_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
161p12_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h
162p12_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
163p12_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
164p12_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
165p12_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
166p12_crpt.o: ../../include/openssl/opensslconf.h
167p12_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
168p12_crpt.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
169p12_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
170p12_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
171p12_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
172p12_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
173p12_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
174p12_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
175p12_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_crpt.c
176p12_crt.o: ../../e_os.h ../../include/openssl/aes.h
177p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
178p12_crt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
179p12_crt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
180p12_crt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
181p12_crt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
182p12_crt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
183p12_crt.o: ../../include/openssl/err.h ../../include/openssl/evp.h
184p12_crt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
185p12_crt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
186p12_crt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
187p12_crt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
188p12_crt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
189p12_crt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
190p12_crt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
191p12_crt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
192p12_crt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
193p12_crt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
194p12_crt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
195p12_crt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
196p12_crt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
197p12_crt.o: ../cryptlib.h p12_crt.c
198p12_decr.o: ../../e_os.h ../../include/openssl/aes.h
199p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
200p12_decr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
201p12_decr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
202p12_decr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
203p12_decr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
204p12_decr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
205p12_decr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
206p12_decr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
207p12_decr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
208p12_decr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
209p12_decr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
210p12_decr.o: ../../include/openssl/opensslconf.h
211p12_decr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
212p12_decr.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
213p12_decr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
214p12_decr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
215p12_decr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
216p12_decr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
217p12_decr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
218p12_decr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
219p12_decr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_decr.c
220p12_init.o: ../../e_os.h ../../include/openssl/aes.h
221p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
222p12_init.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
223p12_init.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
224p12_init.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
225p12_init.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
226p12_init.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
227p12_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h
228p12_init.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
229p12_init.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
230p12_init.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
231p12_init.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
232p12_init.o: ../../include/openssl/opensslconf.h
233p12_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
234p12_init.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
235p12_init.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
236p12_init.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
237p12_init.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
238p12_init.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
239p12_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
240p12_init.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
241p12_init.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_init.c
242p12_key.o: ../../e_os.h ../../include/openssl/aes.h
243p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
244p12_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
245p12_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
246p12_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
247p12_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
248p12_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
249p12_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h
250p12_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
251p12_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
252p12_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
253p12_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
254p12_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
255p12_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
256p12_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
257p12_key.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
258p12_key.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
259p12_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
260p12_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
261p12_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
262p12_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
263p12_key.o: ../cryptlib.h p12_key.c
264p12_kiss.o: ../../e_os.h ../../include/openssl/aes.h
265p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
266p12_kiss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
267p12_kiss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
268p12_kiss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
269p12_kiss.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
270p12_kiss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
271p12_kiss.o: ../../include/openssl/err.h ../../include/openssl/evp.h
272p12_kiss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
273p12_kiss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
274p12_kiss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
275p12_kiss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
276p12_kiss.o: ../../include/openssl/opensslconf.h
277p12_kiss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
278p12_kiss.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
279p12_kiss.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
280p12_kiss.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
281p12_kiss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
282p12_kiss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
283p12_kiss.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
284p12_kiss.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
285p12_kiss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_kiss.c
286p12_mutl.o: ../../e_os.h ../../include/openssl/aes.h
287p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
288p12_mutl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
289p12_mutl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
290p12_mutl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
291p12_mutl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
292p12_mutl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
293p12_mutl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
294p12_mutl.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h
295p12_mutl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
296p12_mutl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
297p12_mutl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
298p12_mutl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
299p12_mutl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
300p12_mutl.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
301p12_mutl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
302p12_mutl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
303p12_mutl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
304p12_mutl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
305p12_mutl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
306p12_mutl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
307p12_mutl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
308p12_mutl.o: ../cryptlib.h p12_mutl.c
309p12_npas.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
310p12_npas.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
311p12_npas.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
312p12_npas.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
313p12_npas.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
314p12_npas.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
315p12_npas.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
316p12_npas.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
317p12_npas.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
318p12_npas.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
319p12_npas.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
320p12_npas.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
321p12_npas.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
322p12_npas.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
323p12_npas.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
324p12_npas.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
325p12_npas.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
326p12_npas.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
327p12_npas.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
328p12_npas.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
329p12_npas.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
330p12_npas.o: ../../include/openssl/x509_vfy.h p12_npas.c
331p12_p8d.o: ../../e_os.h ../../include/openssl/aes.h
332p12_p8d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
333p12_p8d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
334p12_p8d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
335p12_p8d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
336p12_p8d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
337p12_p8d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
338p12_p8d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
339p12_p8d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
340p12_p8d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
341p12_p8d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
342p12_p8d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
343p12_p8d.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
344p12_p8d.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
345p12_p8d.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
346p12_p8d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
347p12_p8d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
348p12_p8d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
349p12_p8d.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
350p12_p8d.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
351p12_p8d.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
352p12_p8d.o: ../cryptlib.h p12_p8d.c
353p12_p8e.o: ../../e_os.h ../../include/openssl/aes.h
354p12_p8e.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
355p12_p8e.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
356p12_p8e.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
357p12_p8e.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
358p12_p8e.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
359p12_p8e.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
360p12_p8e.o: ../../include/openssl/err.h ../../include/openssl/evp.h
361p12_p8e.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
362p12_p8e.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
363p12_p8e.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
364p12_p8e.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
365p12_p8e.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
366p12_p8e.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
367p12_p8e.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
368p12_p8e.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
369p12_p8e.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
370p12_p8e.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
371p12_p8e.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
372p12_p8e.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
373p12_p8e.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
374p12_p8e.o: ../cryptlib.h p12_p8e.c
375p12_utl.o: ../../e_os.h ../../include/openssl/aes.h
376p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
377p12_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
378p12_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
379p12_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
380p12_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
381p12_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
382p12_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
383p12_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
384p12_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
385p12_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
386p12_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
387p12_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
388p12_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
389p12_utl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
390p12_utl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
391p12_utl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
392p12_utl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
393p12_utl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
394p12_utl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
395p12_utl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
396p12_utl.o: ../cryptlib.h p12_utl.c
397pk12err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
398pk12err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
399pk12err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
400pk12err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
401pk12err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
402pk12err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
403pk12err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
404pk12err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
405pk12err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
406pk12err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
407pk12err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
408pk12err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
409pk12err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
410pk12err.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
411pk12err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
412pk12err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
413pk12err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
414pk12err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
415pk12err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
416pk12err.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
417pk12err.o: ../../include/openssl/x509_vfy.h pk12err.c
diff --git a/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl b/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl
new file mode 100644
index 0000000000..c3bfc7d560
--- /dev/null
+++ b/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl
@@ -0,0 +1,243 @@
1#
2# SSLeay/crypto/pkcs7/Makefile
3#
4
5DIR= pkcs7
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19PEX_LIBS=
20EX_LIBS=
21
22CFLAGS= $(INCLUDES) $(CFLAG)
23
24GENERAL=Makefile README
25TEST=
26APPS=
27
28LIB=$(TOP)/libcrypto.a
29LIBSRC= pk7_asn1.c pk7_lib.c pkcs7err.c pk7_doit.c pk7_smime.c pk7_attr.c \
30 pk7_mime.c
31LIBOBJ= pk7_asn1.o pk7_lib.o pkcs7err.o pk7_doit.o pk7_smime.o pk7_attr.o \
32 pk7_mime.o
33
34SRC= $(LIBSRC)
35
36EXHEADER= pkcs7.h
37HEADER= $(EXHEADER)
38
39ALL= $(GENERAL) $(SRC) $(HEADER)
40
41top:
42 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
43
44test:
45
46all: lib
47
48testapps: enc dec sign verify
49
50enc: enc.o lib
51 $(CC) $(CFLAGS) -o enc enc.o $(PEX_LIBS) $(LIB) $(EX_LIBS)
52
53dec: dec.o lib
54 $(CC) $(CFLAGS) -o dec dec.o $(PEX_LIBS) $(LIB) $(EX_LIBS)
55
56sign: sign.o lib
57 $(CC) $(CFLAGS) -o sign sign.o $(PEX_LIBS) $(LIB) $(EX_LIBS)
58
59verify: verify.o example.o lib
60 $(CC) $(CFLAGS) -o verify verify.o $(PEX_LIBS) example.o $(LIB) $(EX_LIBS)
61
62lib: $(LIBOBJ)
63 $(AR) $(LIB) $(LIBOBJ)
64 $(RANLIB) $(LIB) || echo Never mind.
65 @touch lib
66
67files:
68 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
69
70links:
71 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
72 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
73 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
74 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
75
76install:
77 @for i in $(EXHEADER) ; \
78 do \
79 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
80 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
81 done;
82
83tags:
84 ctags $(SRC)
85
86tests:
87
88lint:
89 lint -DLINT $(INCLUDES) $(SRC)>fluff
90
91depend:
92 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
93
94dclean:
95 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
96 mv -f Makefile.new $(MAKEFILE)
97
98clean:
99 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff enc dec sign verify
100
101# DO NOT DELETE THIS LINE -- make depend depends on it.
102
103pk7_asn1.o: ../../e_os.h ../../include/openssl/aes.h
104pk7_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
105pk7_asn1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
106pk7_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
107pk7_asn1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
108pk7_asn1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
109pk7_asn1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
110pk7_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
111pk7_asn1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
112pk7_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
113pk7_asn1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
114pk7_asn1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
115pk7_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
116pk7_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
117pk7_asn1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
118pk7_asn1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
119pk7_asn1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
120pk7_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
121pk7_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
122pk7_asn1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
123pk7_asn1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
124pk7_asn1.o: ../cryptlib.h pk7_asn1.c
125pk7_attr.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
126pk7_attr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
127pk7_attr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
128pk7_attr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
129pk7_attr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
130pk7_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
131pk7_attr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
132pk7_attr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
133pk7_attr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
134pk7_attr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
135pk7_attr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
136pk7_attr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
137pk7_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
138pk7_attr.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
139pk7_attr.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
140pk7_attr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
141pk7_attr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
142pk7_attr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
143pk7_attr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
144pk7_attr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
145pk7_attr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
146pk7_attr.o: pk7_attr.c
147pk7_doit.o: ../../e_os.h ../../include/openssl/aes.h
148pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
149pk7_doit.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
150pk7_doit.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
151pk7_doit.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
152pk7_doit.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
153pk7_doit.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
154pk7_doit.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
155pk7_doit.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
156pk7_doit.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
157pk7_doit.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
158pk7_doit.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
159pk7_doit.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
160pk7_doit.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
161pk7_doit.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
162pk7_doit.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
163pk7_doit.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
164pk7_doit.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
165pk7_doit.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
166pk7_doit.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
167pk7_doit.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
168pk7_doit.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
169pk7_doit.o: ../cryptlib.h pk7_doit.c
170pk7_lib.o: ../../e_os.h ../../include/openssl/aes.h
171pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
172pk7_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
173pk7_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
174pk7_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
175pk7_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
176pk7_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
177pk7_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
178pk7_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
179pk7_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
180pk7_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
181pk7_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
182pk7_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
183pk7_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
184pk7_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
185pk7_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
186pk7_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
187pk7_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
188pk7_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
189pk7_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
190pk7_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pk7_lib.c
191pk7_mime.o: ../../e_os.h ../../include/openssl/aes.h
192pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
193pk7_mime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
194pk7_mime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
195pk7_mime.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
196pk7_mime.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
197pk7_mime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
198pk7_mime.o: ../../include/openssl/err.h ../../include/openssl/evp.h
199pk7_mime.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
200pk7_mime.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
201pk7_mime.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
202pk7_mime.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
203pk7_mime.o: ../../include/openssl/opensslconf.h
204pk7_mime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
205pk7_mime.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
206pk7_mime.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
207pk7_mime.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
208pk7_mime.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
209pk7_mime.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
210pk7_mime.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
211pk7_mime.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
212pk7_mime.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pk7_mime.c
213pk7_smime.o: ../../e_os.h ../../include/openssl/aes.h
214pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
215pk7_smime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
216pk7_smime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
217pk7_smime.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
218pk7_smime.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
219pk7_smime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
220pk7_smime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
221pk7_smime.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
222pk7_smime.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
223pk7_smime.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
224pk7_smime.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
225pk7_smime.o: ../../include/openssl/objects.h
226pk7_smime.o: ../../include/openssl/opensslconf.h
227pk7_smime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
228pk7_smime.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
229pk7_smime.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
230pk7_smime.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
231pk7_smime.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
232pk7_smime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
233pk7_smime.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
234pk7_smime.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
235pk7_smime.o: ../../include/openssl/x509v3.h ../cryptlib.h pk7_smime.c
236pkcs7err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
237pkcs7err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
238pkcs7err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
239pkcs7err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
240pkcs7err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
241pkcs7err.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
242pkcs7err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
243pkcs7err.o: pkcs7err.c
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
index 35c7dcd0b3..190ca0e9bf 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
@@ -91,19 +91,17 @@ static int PKCS7_type_is_other(PKCS7* p7)
91 91
92 } 92 }
93 93
94static ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7) 94static int PKCS7_type_is_octet_string(PKCS7* p7)
95 { 95 {
96 if ( PKCS7_type_is_data(p7)) 96 if ( 0==PKCS7_type_is_other(p7) )
97 return p7->d.data; 97 return 0;
98 if ( PKCS7_type_is_other(p7) && p7->d.other 98
99 && (p7->d.other->type == V_ASN1_OCTET_STRING)) 99 return (V_ASN1_OCTET_STRING==p7->d.other->type) ? 1 : 0;
100 return p7->d.other->value.octet_string;
101 return NULL;
102 } 100 }
103 101
104BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) 102BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
105 { 103 {
106 int i; 104 int i,j;
107 BIO *out=NULL,*btmp=NULL; 105 BIO *out=NULL,*btmp=NULL;
108 X509_ALGOR *xa; 106 X509_ALGOR *xa;
109 const EVP_MD *evp_md; 107 const EVP_MD *evp_md;
@@ -161,7 +159,8 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
161 goto err; 159 goto err;
162 } 160 }
163 161
164 evp_md=EVP_get_digestbyobj(xa->algorithm); 162 j=OBJ_obj2nid(xa->algorithm);
163 evp_md=EVP_get_digestbyname(OBJ_nid2sn(j));
165 if (evp_md == NULL) 164 if (evp_md == NULL)
166 { 165 {
167 PKCS7err(PKCS7_F_PKCS7_DATAINIT,PKCS7_R_UNKNOWN_DIGEST_TYPE); 166 PKCS7err(PKCS7_F_PKCS7_DATAINIT,PKCS7_R_UNKNOWN_DIGEST_TYPE);
@@ -251,22 +250,29 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
251 btmp=NULL; 250 btmp=NULL;
252 } 251 }
253 252
254 if (bio == NULL) 253 if (bio == NULL) {
255 {
256 if (PKCS7_is_detached(p7)) 254 if (PKCS7_is_detached(p7))
257 bio=BIO_new(BIO_s_null()); 255 bio=BIO_new(BIO_s_null());
258 else 256 else {
259 { 257 if (PKCS7_type_is_signed(p7) ) {
260 ASN1_OCTET_STRING *os; 258 if ( PKCS7_type_is_data(p7->d.sign->contents)) {
261 os = PKCS7_get_octet_string(p7->d.sign->contents); 259 ASN1_OCTET_STRING *os;
262 if (os && os->length > 0) 260 os=p7->d.sign->contents->d.data;
263 bio = BIO_new_mem_buf(os->data, os->length); 261 if (os->length > 0)
264 if(bio == NULL) 262 bio = BIO_new_mem_buf(os->data, os->length);
265 { 263 }
264 else if ( PKCS7_type_is_octet_string(p7->d.sign->contents) ) {
265 ASN1_OCTET_STRING *os;
266 os=p7->d.sign->contents->d.other->value.octet_string;
267 if (os->length > 0)
268 bio = BIO_new_mem_buf(os->data, os->length);
269 }
270 }
271 if(bio == NULL) {
266 bio=BIO_new(BIO_s_mem()); 272 bio=BIO_new(BIO_s_mem());
267 BIO_set_mem_eof_return(bio,0); 273 BIO_set_mem_eof_return(bio,0);
268 }
269 } 274 }
275 }
270 } 276 }
271 BIO_push(out,bio); 277 BIO_push(out,bio);
272 bio=NULL; 278 bio=NULL;
@@ -305,7 +311,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
305 switch (i) 311 switch (i)
306 { 312 {
307 case NID_pkcs7_signed: 313 case NID_pkcs7_signed:
308 data_body=PKCS7_get_octet_string(p7->d.sign->contents); 314 data_body=p7->d.sign->contents->d.data;
309 md_sk=p7->d.sign->md_algs; 315 md_sk=p7->d.sign->md_algs;
310 break; 316 break;
311 case NID_pkcs7_signedAndEnveloped: 317 case NID_pkcs7_signedAndEnveloped:
@@ -313,7 +319,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
313 md_sk=p7->d.signed_and_enveloped->md_algs; 319 md_sk=p7->d.signed_and_enveloped->md_algs;
314 data_body=p7->d.signed_and_enveloped->enc_data->enc_data; 320 data_body=p7->d.signed_and_enveloped->enc_data->enc_data;
315 enc_alg=p7->d.signed_and_enveloped->enc_data->algorithm; 321 enc_alg=p7->d.signed_and_enveloped->enc_data->algorithm;
316 evp_cipher=EVP_get_cipherbyobj(enc_alg->algorithm); 322 evp_cipher=EVP_get_cipherbyname(OBJ_nid2sn(OBJ_obj2nid(enc_alg->algorithm)));
317 if (evp_cipher == NULL) 323 if (evp_cipher == NULL)
318 { 324 {
319 PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE); 325 PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE);
@@ -325,7 +331,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
325 rsk=p7->d.enveloped->recipientinfo; 331 rsk=p7->d.enveloped->recipientinfo;
326 enc_alg=p7->d.enveloped->enc_data->algorithm; 332 enc_alg=p7->d.enveloped->enc_data->algorithm;
327 data_body=p7->d.enveloped->enc_data->enc_data; 333 data_body=p7->d.enveloped->enc_data->enc_data;
328 evp_cipher=EVP_get_cipherbyobj(enc_alg->algorithm); 334 evp_cipher=EVP_get_cipherbyname(OBJ_nid2sn(OBJ_obj2nid(enc_alg->algorithm)));
329 if (evp_cipher == NULL) 335 if (evp_cipher == NULL)
330 { 336 {
331 PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE); 337 PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE);
@@ -351,7 +357,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
351 } 357 }
352 358
353 j=OBJ_obj2nid(xa->algorithm); 359 j=OBJ_obj2nid(xa->algorithm);
354 evp_md=EVP_get_digestbynid(j); 360 evp_md=EVP_get_digestbyname(OBJ_nid2sn(j));
355 if (evp_md == NULL) 361 if (evp_md == NULL)
356 { 362 {
357 PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNKNOWN_DIGEST_TYPE); 363 PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNKNOWN_DIGEST_TYPE);
@@ -525,9 +531,9 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
525 break; 531 break;
526 case NID_pkcs7_signed: 532 case NID_pkcs7_signed:
527 si_sk=p7->d.sign->signer_info; 533 si_sk=p7->d.sign->signer_info;
528 os=PKCS7_get_octet_string(p7->d.sign->contents); 534 os=p7->d.sign->contents->d.data;
529 /* If detached data then the content is excluded */ 535 /* If detached data then the content is excluded */
530 if(PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) { 536 if(p7->detached) {
531 M_ASN1_OCTET_STRING_free(os); 537 M_ASN1_OCTET_STRING_free(os);
532 p7->d.sign->contents->d.data = NULL; 538 p7->d.sign->contents->d.data = NULL;
533 } 539 }
diff --git a/src/lib/libssl/src/crypto/rand/Makefile.ssl b/src/lib/libssl/src/crypto/rand/Makefile.ssl
new file mode 100644
index 0000000000..df80702373
--- /dev/null
+++ b/src/lib/libssl/src/crypto/rand/Makefile.ssl
@@ -0,0 +1,194 @@
1#
2# SSLeay/crypto/rand/Makefile
3#
4
5DIR= rand
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST= randtest.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \
27 rand_win.c rand_unix.c rand_os2.c
28LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o \
29 rand_win.o rand_unix.o rand_os2.o
30
31SRC= $(LIBSRC)
32
33EXHEADER= rand.h
34HEADER= $(EXHEADER)
35
36ALL= $(GENERAL) $(SRC) $(HEADER)
37
38top:
39 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
40
41all: lib
42
43lib: $(LIBOBJ)
44 $(AR) $(LIB) $(LIBOBJ)
45 $(RANLIB) $(LIB) || echo Never mind.
46 @touch lib
47
48files:
49 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
50
51links:
52 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
53 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
54 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
55 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
56
57install:
58 @for i in $(EXHEADER) ; \
59 do \
60 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
61 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
62 done;
63
64tags:
65 ctags $(SRC)
66
67tests:
68
69lint:
70 lint -DLINT $(INCLUDES) $(SRC)>fluff
71
72depend:
73 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
74
75dclean:
76 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
77 mv -f Makefile.new $(MAKEFILE)
78
79clean:
80 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
81
82# DO NOT DELETE THIS LINE -- make depend depends on it.
83
84md_rand.o: ../../e_os.h ../../include/openssl/aes.h
85md_rand.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
86md_rand.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
87md_rand.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
88md_rand.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
89md_rand.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
90md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
91md_rand.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
92md_rand.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
93md_rand.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
94md_rand.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
95md_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
96md_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
97md_rand.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
98md_rand.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
99md_rand.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
100md_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
101md_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
102md_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
103md_rand.o: md_rand.c rand_lcl.h
104rand_egd.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
105rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
106rand_egd.o: rand_egd.c
107rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
108rand_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
109rand_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
110rand_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
111rand_err.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
112rand_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
113rand_err.o: rand_err.c
114rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h
115rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
116rand_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
117rand_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
118rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
119rand_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
120rand_lib.o: ../../include/openssl/opensslconf.h
121rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
122rand_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
123rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
124rand_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
125rand_lib.o: ../cryptlib.h rand_lib.c
126rand_os2.o: ../../e_os.h ../../include/openssl/aes.h
127rand_os2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
128rand_os2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
129rand_os2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
130rand_os2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
131rand_os2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
132rand_os2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
133rand_os2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
134rand_os2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
135rand_os2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
136rand_os2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
137rand_os2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
138rand_os2.o: ../../include/openssl/opensslconf.h
139rand_os2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
140rand_os2.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
141rand_os2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
142rand_os2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
143rand_os2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
144rand_os2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
145rand_os2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
146rand_os2.o: ../cryptlib.h rand_lcl.h rand_os2.c
147rand_unix.o: ../../e_os.h ../../include/openssl/aes.h
148rand_unix.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
149rand_unix.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
150rand_unix.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
151rand_unix.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
152rand_unix.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
153rand_unix.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
154rand_unix.o: ../../include/openssl/err.h ../../include/openssl/evp.h
155rand_unix.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
156rand_unix.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
157rand_unix.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
158rand_unix.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
159rand_unix.o: ../../include/openssl/opensslconf.h
160rand_unix.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
161rand_unix.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
162rand_unix.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
163rand_unix.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
164rand_unix.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
165rand_unix.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
166rand_unix.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
167rand_unix.o: ../cryptlib.h rand_lcl.h rand_unix.c
168rand_win.o: ../../e_os.h ../../include/openssl/aes.h
169rand_win.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
170rand_win.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
171rand_win.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
172rand_win.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
173rand_win.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
174rand_win.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
175rand_win.o: ../../include/openssl/err.h ../../include/openssl/evp.h
176rand_win.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
177rand_win.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
178rand_win.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
179rand_win.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
180rand_win.o: ../../include/openssl/opensslconf.h
181rand_win.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
182rand_win.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
183rand_win.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
184rand_win.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
185rand_win.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
186rand_win.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
187rand_win.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
188rand_win.o: ../cryptlib.h rand_lcl.h rand_win.c
189randfile.o: ../../e_os.h ../../include/openssl/crypto.h
190randfile.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
191randfile.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
192randfile.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
193randfile.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
194randfile.o: randfile.c
diff --git a/src/lib/libssl/src/crypto/rand/rand_egd.c b/src/lib/libssl/src/crypto/rand/rand_egd.c
index 6f742900a0..895967476e 100644
--- a/src/lib/libssl/src/crypto/rand/rand_egd.c
+++ b/src/lib/libssl/src/crypto/rand/rand_egd.c
@@ -56,7 +56,6 @@
56 56
57#include <openssl/e_os2.h> 57#include <openssl/e_os2.h>
58#include <openssl/rand.h> 58#include <openssl/rand.h>
59#include <openssl/buffer.h>
60 59
61/* 60/*
62 * Query the EGD <URL: http://www.lothar.com/tech/crypto/>. 61 * Query the EGD <URL: http://www.lothar.com/tech/crypto/>.
@@ -146,7 +145,7 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
146 addr.sun_family = AF_UNIX; 145 addr.sun_family = AF_UNIX;
147 if (strlen(path) >= sizeof(addr.sun_path)) 146 if (strlen(path) >= sizeof(addr.sun_path))
148 return (-1); 147 return (-1);
149 BUF_strlcpy(addr.sun_path,path,sizeof addr.sun_path); 148 strlcpy(addr.sun_path,path,sizeof addr.sun_path);
150 len = offsetof(struct sockaddr_un, sun_path) + strlen(path); 149 len = offsetof(struct sockaddr_un, sun_path) + strlen(path);
151 fd = socket(AF_UNIX, SOCK_STREAM, 0); 150 fd = socket(AF_UNIX, SOCK_STREAM, 0);
152 if (fd == -1) return (-1); 151 if (fd == -1) return (-1);
diff --git a/src/lib/libssl/src/crypto/rand/rand_win.c b/src/lib/libssl/src/crypto/rand/rand_win.c
index 3584842224..263068d256 100644
--- a/src/lib/libssl/src/crypto/rand/rand_win.c
+++ b/src/lib/libssl/src/crypto/rand/rand_win.c
@@ -646,7 +646,7 @@ static void readtimer(void)
646 * Created 960901 by Gertjan van Oosten, gertjan@West.NL, West Consulting B.V. 646 * Created 960901 by Gertjan van Oosten, gertjan@West.NL, West Consulting B.V.
647 * 647 *
648 * Code adapted from 648 * Code adapted from
649 * <URL:http://support.microsoft.com/default.aspx?scid=kb;[LN];97193>; 649 * <URL:http://www.microsoft.com/kb/developr/win_dk/q97193.htm>;
650 * the original copyright message is: 650 * the original copyright message is:
651 * 651 *
652 * (C) Copyright Microsoft Corp. 1993. All rights reserved. 652 * (C) Copyright Microsoft Corp. 1993. All rights reserved.
diff --git a/src/lib/libssl/src/crypto/rand/randfile.c b/src/lib/libssl/src/crypto/rand/randfile.c
index f5d0843d13..cfbec2ac1f 100644
--- a/src/lib/libssl/src/crypto/rand/randfile.c
+++ b/src/lib/libssl/src/crypto/rand/randfile.c
@@ -56,9 +56,6 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59/* We need to define this to get macros like S_IFBLK and S_IFCHR */
60#define _XOPEN_SOURCE 1
61
62#include <errno.h> 59#include <errno.h>
63#include <stdio.h> 60#include <stdio.h>
64#include <stdlib.h> 61#include <stdlib.h>
@@ -67,7 +64,6 @@
67#include "e_os.h" 64#include "e_os.h"
68#include <openssl/crypto.h> 65#include <openssl/crypto.h>
69#include <openssl/rand.h> 66#include <openssl/rand.h>
70#include <openssl/buffer.h>
71 67
72#ifdef OPENSSL_SYS_VMS 68#ifdef OPENSSL_SYS_VMS
73#include <unixio.h> 69#include <unixio.h>
@@ -110,7 +106,6 @@ int RAND_load_file(const char *file, long bytes)
110 106
111 in=fopen(file,"rb"); 107 in=fopen(file,"rb");
112 if (in == NULL) goto err; 108 if (in == NULL) goto err;
113#if defined(S_IFBLK) && defined(S_IFCHR)
114 if (sb.st_mode & (S_IFBLK | S_IFCHR)) { 109 if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
115 /* this file is a device. we don't want read an infinite number 110 /* this file is a device. we don't want read an infinite number
116 * of bytes from a random device, nor do we want to use buffered 111 * of bytes from a random device, nor do we want to use buffered
@@ -119,7 +114,6 @@ int RAND_load_file(const char *file, long bytes)
119 bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */ 114 bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */
120 setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */ 115 setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */
121 } 116 }
122#endif
123 for (;;) 117 for (;;)
124 { 118 {
125 if (bytes > 0) 119 if (bytes > 0)
@@ -153,7 +147,6 @@ int RAND_write_file(const char *file)
153 147
154 i=stat(file,&sb); 148 i=stat(file,&sb);
155 if (i != -1) { 149 if (i != -1) {
156#if defined(S_IFBLK) && defined(S_IFCHR)
157 if (sb.st_mode & (S_IFBLK | S_IFCHR)) { 150 if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
158 /* this file is a device. we don't write back to it. 151 /* this file is a device. we don't write back to it.
159 * we "succeed" on the assumption this is some sort 152 * we "succeed" on the assumption this is some sort
@@ -162,7 +155,6 @@ int RAND_write_file(const char *file)
162 */ 155 */
163 return(1); 156 return(1);
164 } 157 }
165#endif
166 } 158 }
167 159
168#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) 160#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32)
@@ -227,20 +219,18 @@ const char *RAND_file_name(char *buf, size_t size)
227 { 219 {
228 char *s=NULL; 220 char *s=NULL;
229 int ok = 0; 221 int ok = 0;
230#ifdef __OpenBSD__
231 struct stat sb; 222 struct stat sb;
232#endif
233 223
234 if (OPENSSL_issetugid() == 0) 224 if (issetugid() == 0)
235 s=getenv("RANDFILE"); 225 s=getenv("RANDFILE");
236 if (s != NULL && *s && strlen(s) + 1 < size) 226 if (s != NULL && *s && strlen(s) + 1 < size)
237 { 227 {
238 if (BUF_strlcpy(buf,s,size) >= size) 228 if (strlcpy(buf,s,size) >= size)
239 return NULL; 229 return NULL;
240 } 230 }
241 else 231 else
242 { 232 {
243 if (OPENSSL_issetugid() == 0) 233 if (issetugid() == 0)
244 s=getenv("HOME"); 234 s=getenv("HOME");
245#ifdef DEFAULT_HOME 235#ifdef DEFAULT_HOME
246 if (s == NULL) 236 if (s == NULL)
@@ -250,11 +240,11 @@ const char *RAND_file_name(char *buf, size_t size)
250#endif 240#endif
251 if (s && *s && strlen(s)+strlen(RFILE)+2 < size) 241 if (s && *s && strlen(s)+strlen(RFILE)+2 < size)
252 { 242 {
253 BUF_strlcpy(buf,s,size); 243 strlcpy(buf,s,size);
254#ifndef OPENSSL_SYS_VMS 244#ifndef OPENSSL_SYS_VMS
255 BUF_strlcat(buf,"/",size); 245 strlcat(buf,"/",size);
256#endif 246#endif
257 BUF_strlcat(buf,RFILE,size); 247 strlcat(buf,RFILE,size);
258 ok = 1; 248 ok = 1;
259 } 249 }
260 else 250 else
@@ -270,11 +260,11 @@ const char *RAND_file_name(char *buf, size_t size)
270 */ 260 */
271 261
272 if (!ok) 262 if (!ok)
273 if (BUF_strlcpy(buf,"/dev/arandom",size) >= size) { 263 if (strlcpy(buf,"/dev/arandom",size) >= size) {
274 return(NULL); 264 return(NULL);
275 } 265 }
276 if (stat(buf,&sb) == -1) 266 if (stat(buf,&sb) == -1)
277 if (BUF_strlcpy(buf,"/dev/arandom",size) >= size) { 267 if (strlcpy(buf,"/dev/arandom",size) >= size) {
278 return(NULL); 268 return(NULL);
279 } 269 }
280 270
diff --git a/src/lib/libssl/src/crypto/rc2/Makefile.ssl b/src/lib/libssl/src/crypto/rc2/Makefile.ssl
new file mode 100644
index 0000000000..98d5960d5d
--- /dev/null
+++ b/src/lib/libssl/src/crypto/rc2/Makefile.ssl
@@ -0,0 +1,91 @@
1#
2# SSLeay/crypto/rc2/Makefile
3#
4
5DIR= rc2
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=rc2test.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c
27LIBOBJ=rc2_ecb.o rc2_skey.o rc2_cbc.o rc2cfb64.o rc2ofb64.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= rc2.h
32HEADER= rc2_locl.h $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82rc2_cbc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h
83rc2_cbc.o: rc2_cbc.c rc2_locl.h
84rc2_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
85rc2_ecb.o: ../../include/openssl/rc2.h rc2_ecb.c rc2_locl.h
86rc2_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h
87rc2_skey.o: rc2_locl.h rc2_skey.c
88rc2cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h
89rc2cfb64.o: rc2_locl.h rc2cfb64.c
90rc2ofb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h
91rc2ofb64.o: rc2_locl.h rc2ofb64.c
diff --git a/src/lib/libssl/src/crypto/rc4/Makefile.ssl b/src/lib/libssl/src/crypto/rc4/Makefile.ssl
new file mode 100644
index 0000000000..9f9e16068f
--- /dev/null
+++ b/src/lib/libssl/src/crypto/rc4/Makefile.ssl
@@ -0,0 +1,109 @@
1#
2# SSLeay/crypto/rc4/Makefile
3#
4
5DIR= rc4
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20RC4_ENC=rc4_enc.o
21# or use
22#RC4_ENC=asm/rx86-elf.o
23#RC4_ENC=asm/rx86-out.o
24#RC4_ENC=asm/rx86-sol.o
25#RC4_ENC=asm/rx86bdsi.o
26
27CFLAGS= $(INCLUDES) $(CFLAG)
28
29GENERAL=Makefile
30TEST=rc4test.c
31APPS=
32
33LIB=$(TOP)/libcrypto.a
34LIBSRC=rc4_skey.c rc4_enc.c
35LIBOBJ=rc4_skey.o $(RC4_ENC)
36
37SRC= $(LIBSRC)
38
39EXHEADER= rc4.h
40HEADER= $(EXHEADER) rc4_locl.h
41
42ALL= $(GENERAL) $(SRC) $(HEADER)
43
44top:
45 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
46
47all: lib
48
49lib: $(LIBOBJ)
50 $(AR) $(LIB) $(LIBOBJ)
51 $(RANLIB) $(LIB) || echo Never mind.
52 @touch lib
53
54# elf
55asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
56 (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > rx86-elf.s)
57
58# a.out
59asm/rx86-out.o: asm/rx86unix.cpp
60 $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o
61
62# bsdi
63asm/rx86bsdi.o: asm/rx86unix.cpp
64 $(CPP) -DBSDI asm/rx86unix.cpp | sed 's/ :/:/' | as -o asm/rx86bsdi.o
65
66asm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl
67 (cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp)
68
69files:
70 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
71
72links:
73 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
74 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
75 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
76 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
77
78install:
79 @for i in $(EXHEADER) ; \
80 do \
81 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
82 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
83 done;
84
85tags:
86 ctags $(SRC)
87
88tests:
89
90lint:
91 lint -DLINT $(INCLUDES) $(SRC)>fluff
92
93depend:
94 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
95
96dclean:
97 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
98 mv -f Makefile.new $(MAKEFILE)
99
100clean:
101 rm -f asm/rx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
102
103# DO NOT DELETE THIS LINE -- make depend depends on it.
104
105rc4_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc4.h
106rc4_enc.o: rc4_enc.c rc4_locl.h
107rc4_skey.o: ../../include/openssl/opensslconf.h
108rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h
109rc4_skey.o: rc4_locl.h rc4_skey.c
diff --git a/src/lib/libssl/src/crypto/rc5/Makefile.ssl b/src/lib/libssl/src/crypto/rc5/Makefile.ssl
new file mode 100644
index 0000000000..a86f202f7b
--- /dev/null
+++ b/src/lib/libssl/src/crypto/rc5/Makefile.ssl
@@ -0,0 +1,107 @@
1#
2# SSLeay/crypto/rc5/Makefile
3#
4
5DIR= rc5
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20RC5_ENC= rc5_enc.o
21# or use
22#DES_ENC= r586-elf.o
23
24CFLAGS= $(INCLUDES) $(CFLAG)
25
26GENERAL=Makefile
27TEST=rc5test.c
28APPS=
29
30LIB=$(TOP)/libcrypto.a
31LIBSRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c
32LIBOBJ=rc5_skey.o rc5_ecb.o $(RC5_ENC) rc5cfb64.o rc5ofb64.o
33
34SRC= $(LIBSRC)
35
36EXHEADER= rc5.h
37HEADER= rc5_locl.h $(EXHEADER)
38
39ALL= $(GENERAL) $(SRC) $(HEADER)
40
41top:
42 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
43
44all: lib
45
46lib: $(LIBOBJ)
47 $(AR) $(LIB) $(LIBOBJ)
48 $(RANLIB) $(LIB) || echo Never mind.
49 @touch lib
50
51# elf
52asm/r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
53 (cd asm; $(PERL) rc5-586.pl elf $(CFLAGS) > r586-elf.s)
54
55# a.out
56asm/r586-out.o: asm/r586unix.cpp
57 $(CPP) -DOUT asm/r586unix.cpp | as -o asm/r586-out.o
58
59# bsdi
60asm/r586bsdi.o: asm/r586unix.cpp
61 $(CPP) -DBSDI asm/r586unix.cpp | sed 's/ :/:/' | as -o asm/r586bsdi.o
62
63asm/r586unix.cpp: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
64 (cd asm; $(PERL) rc5-586.pl cpp >r586unix.cpp)
65
66files:
67 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
68
69links:
70 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
71 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
72 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
73 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
74
75install:
76 @for i in $(EXHEADER) ; \
77 do \
78 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
79 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
80 done;
81
82tags:
83 ctags $(SRC)
84
85tests:
86
87lint:
88 lint -DLINT $(INCLUDES) $(SRC)>fluff
89
90depend:
91 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
92
93dclean:
94 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
95 mv -f Makefile.new $(MAKEFILE)
96
97clean:
98 rm -f asm/r586unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
99
100# DO NOT DELETE THIS LINE -- make depend depends on it.
101
102rc5_ecb.o: ../../include/openssl/opensslv.h ../../include/openssl/rc5.h
103rc5_ecb.o: rc5_ecb.c rc5_locl.h
104rc5_enc.o: ../../include/openssl/rc5.h rc5_enc.c rc5_locl.h
105rc5_skey.o: ../../include/openssl/rc5.h rc5_locl.h rc5_skey.c
106rc5cfb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5cfb64.c
107rc5ofb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5ofb64.c
diff --git a/src/lib/libssl/src/crypto/ripemd/Makefile.ssl b/src/lib/libssl/src/crypto/ripemd/Makefile.ssl
new file mode 100644
index 0000000000..d85515353b
--- /dev/null
+++ b/src/lib/libssl/src/crypto/ripemd/Makefile.ssl
@@ -0,0 +1,107 @@
1#
2# SSLeay/crypto/ripemd/Makefile
3#
4
5DIR= ripemd
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20RIP_ASM_OBJ=
21
22CFLAGS= $(INCLUDES) $(CFLAG)
23
24GENERAL=Makefile
25TEST=rmdtest.c
26APPS=
27
28LIB=$(TOP)/libcrypto.a
29LIBSRC=rmd_dgst.c rmd_one.c
30LIBOBJ=rmd_dgst.o rmd_one.o $(RMD160_ASM_OBJ)
31
32SRC= $(LIBSRC)
33
34EXHEADER= ripemd.h
35HEADER= rmd_locl.h rmdconst.h $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49# elf
50asm/rm86-elf.s: asm/rmd-586.pl ../perlasm/x86asm.pl
51 (cd asm; $(PERL) rmd-586.pl elf $(CFLAGS) > rm86-elf.s)
52
53# a.out
54asm/rm86-out.o: asm/rm86unix.cpp
55 $(CPP) -DOUT asm/rm86unix.cpp | as -o asm/rm86-out.o
56
57# bsdi
58asm/rm86bsdi.o: asm/rm86unix.cpp
59 $(CPP) -DBSDI asm/rm86unix.cpp | sed 's/ :/:/' | as -o asm/rm86bsdi.o
60
61asm/rm86unix.cpp: asm/rmd-586.pl ../perlasm/x86asm.pl
62 (cd asm; $(PERL) rmd-586.pl cpp >rm86unix.cpp)
63
64files:
65 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
66
67links:
68 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
69 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
70 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
71 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
72
73install:
74 @for i in $(EXHEADER) ; \
75 do \
76 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
77 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
78 done;
79
80tags:
81 ctags $(SRC)
82
83tests:
84
85lint:
86 lint -DLINT $(INCLUDES) $(SRC)>fluff
87
88depend:
89 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
90
91dclean:
92 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
93 mv -f Makefile.new $(MAKEFILE)
94
95clean:
96 rm -f asm/rm86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
97
98# DO NOT DELETE THIS LINE -- make depend depends on it.
99
100rmd_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
101rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ripemd.h
102rmd_dgst.o: ../md32_common.h rmd_dgst.c rmd_locl.h rmdconst.h
103rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
104rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
105rmd_one.o: ../../include/openssl/ripemd.h ../../include/openssl/safestack.h
106rmd_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
107rmd_one.o: rmd_one.c
diff --git a/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c b/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c
index f351f00eea..28896512e7 100644
--- a/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c
+++ b/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c
@@ -90,7 +90,7 @@ int RIPEMD160_Init(RIPEMD160_CTX *c)
90void ripemd160_block_host_order (RIPEMD160_CTX *ctx, const void *p, int num) 90void ripemd160_block_host_order (RIPEMD160_CTX *ctx, const void *p, int num)
91 { 91 {
92 const RIPEMD160_LONG *XX=p; 92 const RIPEMD160_LONG *XX=p;
93 register unsigned MD32_REG_T A,B,C,D,E; 93 register volatile unsigned MD32_REG_T A,B,C,D,E;
94 register unsigned MD32_REG_T a,b,c,d,e; 94 register unsigned MD32_REG_T a,b,c,d,e;
95 95
96 for (;num--;XX+=HASH_LBLOCK) 96 for (;num--;XX+=HASH_LBLOCK)
@@ -290,7 +290,7 @@ void ripemd160_block_host_order (RIPEMD160_CTX *ctx, const void *p, int num)
290void ripemd160_block_data_order (RIPEMD160_CTX *ctx, const void *p, int num) 290void ripemd160_block_data_order (RIPEMD160_CTX *ctx, const void *p, int num)
291 { 291 {
292 const unsigned char *data=p; 292 const unsigned char *data=p;
293 register unsigned MD32_REG_T A,B,C,D,E; 293 register volatile unsigned MD32_REG_T A,B,C,D,E;
294 unsigned MD32_REG_T a,b,c,d,e,l; 294 unsigned MD32_REG_T a,b,c,d,e,l;
295#ifndef MD32_XARRAY 295#ifndef MD32_XARRAY
296 /* See comment in crypto/sha/sha_locl.h for details. */ 296 /* See comment in crypto/sha/sha_locl.h for details. */
diff --git a/src/lib/libssl/src/crypto/rsa/Makefile.ssl b/src/lib/libssl/src/crypto/rsa/Makefile.ssl
new file mode 100644
index 0000000000..8089344a04
--- /dev/null
+++ b/src/lib/libssl/src/crypto/rsa/Makefile.ssl
@@ -0,0 +1,241 @@
1#
2# SSLeay/crypto/rsa/Makefile
3#
4
5DIR= rsa
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=rsa_test.c
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \
27 rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \
28 rsa_asn1.c
29LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \
30 rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \
31 rsa_asn1.o
32
33SRC= $(LIBSRC)
34
35EXHEADER= rsa.h
36HEADER= $(EXHEADER)
37
38ALL= $(GENERAL) $(SRC) $(HEADER)
39
40top:
41 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
42
43all: lib
44
45lib: $(LIBOBJ)
46 $(AR) $(LIB) $(LIBOBJ)
47 $(RANLIB) $(LIB) || echo Never mind.
48 @touch lib
49
50files:
51 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
52
53links:
54 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
55 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
56 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
57 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
58
59install:
60 @for i in $(EXHEADER) ; \
61 do \
62 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
63 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
64 done;
65
66tags:
67 ctags $(SRC)
68
69tests:
70
71lint:
72 lint -DLINT $(INCLUDES) $(SRC)>fluff
73
74depend:
75 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
76
77dclean:
78 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
79 mv -f Makefile.new $(MAKEFILE)
80
81clean:
82 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
83
84# DO NOT DELETE THIS LINE -- make depend depends on it.
85
86rsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
87rsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
88rsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
89rsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
90rsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
91rsa_asn1.o: ../../include/openssl/opensslconf.h
92rsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
93rsa_asn1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
94rsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
95rsa_asn1.o: ../cryptlib.h rsa_asn1.c
96rsa_chk.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
97rsa_chk.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
98rsa_chk.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
99rsa_chk.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
100rsa_chk.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
101rsa_chk.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
102rsa_chk.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
103rsa_chk.o: rsa_chk.c
104rsa_eay.o: ../../e_os.h ../../include/openssl/asn1.h
105rsa_eay.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
106rsa_eay.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
107rsa_eay.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
108rsa_eay.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
109rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
110rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
111rsa_eay.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
112rsa_eay.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_eay.c
113rsa_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
114rsa_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
115rsa_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
116rsa_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
117rsa_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
118rsa_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
119rsa_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
120rsa_err.o: rsa_err.c
121rsa_gen.o: ../../e_os.h ../../include/openssl/asn1.h
122rsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
123rsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
124rsa_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
125rsa_gen.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
126rsa_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
127rsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
128rsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
129rsa_gen.o: ../cryptlib.h rsa_gen.c
130rsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h
131rsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
132rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
133rsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
134rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
135rsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
136rsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
137rsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
138rsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
139rsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
140rsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h rsa_lib.c
141rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h
142rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
143rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
144rsa_none.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
145rsa_none.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
146rsa_none.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
147rsa_none.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
148rsa_none.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
149rsa_none.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_none.c
150rsa_null.o: ../../e_os.h ../../include/openssl/asn1.h
151rsa_null.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
152rsa_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
153rsa_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
154rsa_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
155rsa_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
156rsa_null.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
157rsa_null.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
158rsa_null.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_null.c
159rsa_oaep.o: ../../e_os.h ../../include/openssl/aes.h
160rsa_oaep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
161rsa_oaep.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
162rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
163rsa_oaep.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
164rsa_oaep.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
165rsa_oaep.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
166rsa_oaep.o: ../../include/openssl/err.h ../../include/openssl/evp.h
167rsa_oaep.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
168rsa_oaep.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
169rsa_oaep.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
170rsa_oaep.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
171rsa_oaep.o: ../../include/openssl/opensslconf.h
172rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
173rsa_oaep.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
174rsa_oaep.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
175rsa_oaep.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
176rsa_oaep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
177rsa_oaep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
178rsa_oaep.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
179rsa_oaep.o: ../cryptlib.h rsa_oaep.c
180rsa_pk1.o: ../../e_os.h ../../include/openssl/asn1.h
181rsa_pk1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
182rsa_pk1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
183rsa_pk1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
184rsa_pk1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
185rsa_pk1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
186rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
187rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
188rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c
189rsa_saos.o: ../../e_os.h ../../include/openssl/aes.h
190rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
191rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
192rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
193rsa_saos.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
194rsa_saos.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
195rsa_saos.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
196rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h
197rsa_saos.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
198rsa_saos.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
199rsa_saos.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
200rsa_saos.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
201rsa_saos.o: ../../include/openssl/opensslconf.h
202rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
203rsa_saos.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
204rsa_saos.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
205rsa_saos.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
206rsa_saos.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
207rsa_saos.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
208rsa_saos.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
209rsa_saos.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
210rsa_saos.o: ../cryptlib.h rsa_saos.c
211rsa_sign.o: ../../e_os.h ../../include/openssl/aes.h
212rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
213rsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
214rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
215rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
216rsa_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
217rsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
218rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
219rsa_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
220rsa_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
221rsa_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
222rsa_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
223rsa_sign.o: ../../include/openssl/opensslconf.h
224rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
225rsa_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
226rsa_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
227rsa_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
228rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
229rsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
230rsa_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
231rsa_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
232rsa_sign.o: ../cryptlib.h rsa_sign.c
233rsa_ssl.o: ../../e_os.h ../../include/openssl/asn1.h
234rsa_ssl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
235rsa_ssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
236rsa_ssl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
237rsa_ssl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
238rsa_ssl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
239rsa_ssl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
240rsa_ssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
241rsa_ssl.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_ssl.c
diff --git a/src/lib/libssl/src/crypto/sha/Makefile.ssl b/src/lib/libssl/src/crypto/sha/Makefile.ssl
new file mode 100644
index 0000000000..d52fb62b4f
--- /dev/null
+++ b/src/lib/libssl/src/crypto/sha/Makefile.ssl
@@ -0,0 +1,115 @@
1#
2# SSLeay/crypto/sha/Makefile
3#
4
5DIR= sha
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20SHA1_ASM_OBJ=
21
22CFLAGS= $(INCLUDES) $(CFLAG)
23
24GENERAL=Makefile
25TEST=shatest.c sha1test.c
26APPS=
27
28LIB=$(TOP)/libcrypto.a
29LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
30LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA1_ASM_OBJ)
31
32SRC= $(LIBSRC)
33
34EXHEADER= sha.h
35HEADER= sha_locl.h $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49# elf
50asm/sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
51 (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > sx86-elf.s)
52
53# a.out
54asm/sx86-out.o: asm/sx86unix.cpp
55 $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o
56
57# bsdi
58asm/sx86bsdi.o: asm/sx86unix.cpp
59 $(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o
60
61asm/sx86unix.cpp: asm/sha1-586.pl ../perlasm/x86asm.pl
62 (cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
63
64files:
65 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
66
67links:
68 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
69 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
70 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
71 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
72
73install:
74 @for i in $(EXHEADER) ; \
75 do \
76 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
77 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
78 done;
79
80tags:
81 ctags $(SRC)
82
83tests:
84
85lint:
86 lint -DLINT $(INCLUDES) $(SRC)>fluff
87
88depend:
89 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
90
91dclean:
92 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
93 mv -f Makefile.new $(MAKEFILE)
94
95clean:
96 rm -f asm/sx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
97
98# DO NOT DELETE THIS LINE -- make depend depends on it.
99
100sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
101sha1_one.o: ../../include/openssl/opensslconf.h
102sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
103sha1_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
104sha1_one.o: ../../include/openssl/symhacks.h sha1_one.c
105sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
106sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
107sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
108sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
109sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
110sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
111sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
112sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
113sha_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
114sha_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
115sha_one.o: sha_one.c
diff --git a/src/lib/libssl/src/crypto/sha/asm/sha1-586.pl b/src/lib/libssl/src/crypto/sha/asm/sha1-586.pl
index e00f709553..fe51fd0794 100644
--- a/src/lib/libssl/src/crypto/sha/asm/sha1-586.pl
+++ b/src/lib/libssl/src/crypto/sha/asm/sha1-586.pl
@@ -1,30 +1,5 @@
1#!/usr/local/bin/perl 1#!/usr/local/bin/perl
2 2
3# It was noted that Intel IA-32 C compiler generates code which
4# performs ~30% *faster* on P4 CPU than original *hand-coded*
5# SHA1 assembler implementation. To address this problem (and
6# prove that humans are still better than machines:-), the
7# original code was overhauled, which resulted in following
8# performance changes:
9#
10# compared with original compared with Intel cc
11# assembler impl. generated code
12# Pentium -25% +37%
13# PIII/AMD +8% +16%
14# P4 +85%(!) +45%
15#
16# As you can see Pentium came out as looser:-( Yet I reckoned that
17# improvement on P4 outweights the loss and incorporate this
18# re-tuned code to 0.9.7 and later.
19# ----------------------------------------------------------------
20# Those who for any particular reason absolutely must score on
21# Pentium can replace this module with one from 0.9.6 distribution.
22# This "offer" shall be revoked the moment programming interface to
23# this module is changed, in which case this paragraph should be
24# removed.
25# ----------------------------------------------------------------
26# <appro@fy.chalmers.se>
27
28$normal=0; 3$normal=0;
29 4
30push(@INC,"perlasm","../../perlasm"); 5push(@INC,"perlasm","../../perlasm");
@@ -102,21 +77,54 @@ sub BODY_00_15
102 { 77 {
103 local($pos,$K,$X,$n,$a,$b,$c,$d,$e,$f)=@_; 78 local($pos,$K,$X,$n,$a,$b,$c,$d,$e,$f)=@_;
104 79
80return if $n & 1;
105 &comment("00_15 $n"); 81 &comment("00_15 $n");
106 82
83 &mov($f,$c);
84
85 &mov($tmp1,$a);
86 &xor($f,$d); # F2
87
88 &rotl($tmp1,5); # A2
89
90 &and($f,$b); # F3
91 &add($tmp1,$e);
92
93 &rotr($b,1); # B1 <- F
94 &mov($e,&swtmp($n)); # G1
95
96 &rotr($b,1); # B1 <- F
97 &xor($f,$d); # F4
98
99 &lea($tmp1,&DWP($K,$tmp1,$e,1));
100
101############################
102# &BODY_40_59( 0,$K[2],$X,42,$A,$B,$C,$D,$E,$T);
103# &BODY_40_59( 0,$K[2],$X,43,$T,$A,$B,$C,$D,$E);
104$n++;
105 local($n0,$n1,$n2,$n3,$np)=&Na($n);
106 ($b,$c,$d,$e,$f,$a)=($a,$b,$c,$d,$e,$f);
107
108 &mov($f,$c);
109
110 &add($a,$tmp1); # MOVED DOWN
111 &xor($f,$d); # F2
112
107 &mov($tmp1,$a); 113 &mov($tmp1,$a);
108 &mov($f,$c); # f to hold F_00_19(b,c,d) 114 &and($f,$b); # F3
109 &rotl($tmp1,5); # tmp1=ROTATE(a,5) 115
110 &xor($f,$d); 116 &rotl($tmp1,5); # A2
111 &and($f,$b); 117
112 &rotr($b,2); # b=ROTATE(b,30) 118 &add($tmp1,$e);
113 &add($tmp1,$e); # tmp1+=e; 119 &mov($e,&swtmp($n)); # G1
114 &mov($e,&swtmp($n)); # e becomes volatile and 120
115 # is loaded with xi 121 &rotr($b,1); # B1 <- F
116 &xor($f,$d); # f holds F_00_19(b,c,d) 122 &xor($f,$d); # F4
117 &lea($tmp1,&DWP($K,$tmp1,$e,1));# tmp1+=K_00_19+xi 123
118 124 &rotr($b,1); # B1 <- F
119 &add($f,$tmp1); # f+=tmp1 125 &lea($tmp1,&DWP($K,$tmp1,$e,1));
126
127 &add($f,$tmp1);
120 } 128 }
121 129
122sub BODY_16_19 130sub BODY_16_19
@@ -124,24 +132,66 @@ sub BODY_16_19
124 local($pos,$K,$X,$n,$a,$b,$c,$d,$e,$f)=@_; 132 local($pos,$K,$X,$n,$a,$b,$c,$d,$e,$f)=@_;
125 local($n0,$n1,$n2,$n3,$np)=&Na($n); 133 local($n0,$n1,$n2,$n3,$np)=&Na($n);
126 134
135return if $n & 1;
127 &comment("16_19 $n"); 136 &comment("16_19 $n");
128 137
129 &mov($f,&swtmp($n1)); # f to hold Xupdate(xi,xa,xb,xc,xd) 138 &nop() if ($pos < 0);
130 &mov($tmp1,$c); # tmp1 to hold F_00_19(b,c,d) 139&mov($tmp1,&swtmp($n0)); # X1
131 &xor($f,&swtmp($n0)); 140 &mov($f,&swtmp($n1)); # X2
132 &xor($tmp1,$d); 141&xor($f,$tmp1); # X3
133 &xor($f,&swtmp($n2)); 142 &mov($tmp1,&swtmp($n2)); # X4
134 &and($tmp1,$b); # tmp1 holds F_00_19(b,c,d) 143&xor($f,$tmp1); # X5
135 &xor($f,&swtmp($n3)); # f holds xa^xb^xc^xd 144 &mov($tmp1,&swtmp($n3)); # X6
136 &rotr($b,2); # b=ROTATE(b,30) 145&xor($f,$tmp1); # X7 - slot
137 &xor($tmp1,$d); # tmp1=F_00_19(b,c,d) 146 &mov($tmp1,$c); # F1
138 &rotl($f,1); # f=ROATE(f,1) 147&rotl($f,1); # X8 - slot
139 &mov(&swtmp($n0),$f); # xi=f 148 &xor($tmp1,$d); # F2
140 &lea($f,&DWP($K,$f,$e,1)); # f+=K_00_19+e 149&mov(&swtmp($n0),$f); # X9 - anytime
141 &mov($e,$a); # e becomes volatile 150 &and($tmp1,$b); # F3
142 &add($f,$tmp1); # f+=F_00_19(b,c,d) 151&lea($f,&DWP($K,$f,$e,1)); # tot=X+K+e
143 &rotl($e,5); # e=ROTATE(a,5) 152 &xor($tmp1,$d); # F4
144 &add($f,$e); # f+=ROTATE(a,5) 153&mov($e,$a); # A1
154 &add($f,$tmp1); # tot+=F();
155
156&rotl($e,5); # A2
157
158&rotr($b,1); # B1 <- F
159 &add($f,$e); # tot+=a
160
161############################
162# &BODY_40_59( 0,$K[2],$X,42,$A,$B,$C,$D,$E,$T);
163# &BODY_40_59( 0,$K[2],$X,43,$T,$A,$B,$C,$D,$E);
164$n++;
165 local($n0,$n1,$n2,$n3,$np)=&Na($n);
166 ($b,$c,$d,$e,$f,$a)=($a,$b,$c,$d,$e,$f);
167
168
169&mov($f,&swtmp($n0)); # X1
170 &mov($tmp1,&swtmp($n1)); # X2
171&xor($f,$tmp1); # X3
172 &mov($tmp1,&swtmp($n2)); # X4
173&xor($f,$tmp1); # X5
174 &mov($tmp1,&swtmp($n3)); # X6
175&rotr($c,1); #&rotr($b,1); # B1 <- F # MOVED DOWN
176 &xor($f,$tmp1); # X7 - slot
177&rotl($f,1); # X8 - slot
178 &mov($tmp1,$c); # F1
179&xor($tmp1,$d); # F2
180 &mov(&swtmp($n0),$f); # X9 - anytime
181&and($tmp1,$b); # F3
182 &lea($f,&DWP($K,$f,$e,1)); # tot=X+K+e
183
184&xor($tmp1,$d); # F4
185 &mov($e,$a); # A1
186
187&rotl($e,5); # A2
188
189&rotr($b,1); # B1 <- F
190 &add($f,$e); # tot+=a
191
192&rotr($b,1); # B1 <- F
193 &add($f,$tmp1); # tot+=F();
194
145 } 195 }
146 196
147sub BODY_20_39 197sub BODY_20_39
@@ -151,21 +201,42 @@ sub BODY_20_39
151 &comment("20_39 $n"); 201 &comment("20_39 $n");
152 local($n0,$n1,$n2,$n3,$np)=&Na($n); 202 local($n0,$n1,$n2,$n3,$np)=&Na($n);
153 203
154 &mov($f,&swtmp($n0)); # f to hold Xupdate(xi,xa,xb,xc,xd) 204&mov($f,&swtmp($n0)); # X1
155 &mov($tmp1,$b); # tmp1 to hold F_20_39(b,c,d) 205 &mov($tmp1,&swtmp($n1)); # X2
156 &xor($f,&swtmp($n1)); 206&xor($f,$tmp1); # X3
157 &rotr($b,2); # b=ROTATE(b,30) 207 &mov($tmp1,&swtmp($n2)); # X4
158 &xor($f,&swtmp($n2)); 208&xor($f,$tmp1); # X5
159 &xor($tmp1,$c); 209 &mov($tmp1,&swtmp($n3)); # X6
160 &xor($f,&swtmp($n3)); # f holds xa^xb^xc^xd 210&xor($f,$tmp1); # X7 - slot
161 &xor($tmp1,$d); # tmp1 holds F_20_39(b,c,d) 211 &mov($tmp1,$b); # F1
162 &rotl($f,1); # f=ROTATE(f,1) 212&rotl($f,1); # X8 - slot
163 &mov(&swtmp($n0),$f); # xi=f 213 &xor($tmp1,$c); # F2
164 &lea($f,&DWP($K,$f,$e,1)); # f+=K_20_39+e 214&mov(&swtmp($n0),$f); # X9 - anytime
165 &mov($e,$a); # e becomes volatile 215 &xor($tmp1,$d); # F3
166 &rotl($e,5); # e=ROTATE(a,5) 216
167 &add($f,$tmp1); # f+=F_20_39(b,c,d) 217&lea($f,&DWP($K,$f,$e,1)); # tot=X+K+e
168 &add($f,$e); # f+=ROTATE(a,5) 218 &mov($e,$a); # A1
219
220&rotl($e,5); # A2
221
222if ($n != 79) # last loop
223 {
224 &rotr($b,1); # B1 <- F
225 &add($e,$tmp1); # tmp1=F()+a
226
227 &rotr($b,1); # B2 <- F
228 &add($f,$e); # tot+=tmp1;
229 }
230else
231 {
232 &add($e,$tmp1); # tmp1=F()+a
233 &mov($tmp1,&wparam(0));
234
235 &rotr($b,1); # B1 <- F
236 &add($f,$e); # tot+=tmp1;
237
238 &rotr($b,1); # B2 <- F
239 }
169 } 240 }
170 241
171sub BODY_40_59 242sub BODY_40_59
@@ -173,27 +244,70 @@ sub BODY_40_59
173 local($pos,$K,$X,$n,$a,$b,$c,$d,$e,$f)=@_; 244 local($pos,$K,$X,$n,$a,$b,$c,$d,$e,$f)=@_;
174 245
175 &comment("40_59 $n"); 246 &comment("40_59 $n");
247 return if $n & 1;
176 local($n0,$n1,$n2,$n3,$np)=&Na($n); 248 local($n0,$n1,$n2,$n3,$np)=&Na($n);
177 249
178 &mov($f,&swtmp($n0)); # f to hold Xupdate(xi,xa,xb,xc,xd) 250&mov($f,&swtmp($n0)); # X1
179 &mov($tmp1,$b); # tmp1 to hold F_40_59(b,c,d) 251 &mov($tmp1,&swtmp($n1)); # X2
180 &xor($f,&swtmp($n1)); 252&xor($f,$tmp1); # X3
181 &or($tmp1,$c); 253 &mov($tmp1,&swtmp($n2)); # X4
182 &xor($f,&swtmp($n2)); 254&xor($f,$tmp1); # X5
183 &and($tmp1,$d); 255 &mov($tmp1,&swtmp($n3)); # X6
184 &xor($f,&swtmp($n3)); # f holds xa^xb^xc^xd 256&xor($f,$tmp1); # X7 - slot
185 &rotl($f,1); # f=ROTATE(f,1) 257 &mov($tmp1,$b); # F1
186 &mov(&swtmp($n0),$f); # xi=f 258&rotl($f,1); # X8 - slot
187 &lea($f,&DWP($K,$f,$e,1)); # f+=K_40_59+e 259 &or($tmp1,$c); # F2
188 &mov($e,$b); # e becomes volatile and is used 260&mov(&swtmp($n0),$f); # X9 - anytime
189 # to calculate F_40_59(b,c,d) 261 &and($tmp1,$d); # F3
190 &rotr($b,2); # b=ROTATE(b,30) 262
191 &and($e,$c); 263&lea($f,&DWP($K,$f,$e,1)); # tot=X+K+e
192 &or($tmp1,$e); # tmp1 holds F_40_59(b,c,d) 264 &mov($e,$b); # F4
193 &mov($e,$a); 265
194 &rotl($e,5); # e=ROTATE(a,5) 266&rotr($b,1); # B1 <- F
195 &add($tmp1,$e); # tmp1+=ROTATE(a,5) 267 &and($e,$c); # F5
196 &add($f,$tmp1); # f+=tmp1; 268
269&or($tmp1,$e); # F6
270 &mov($e,$a); # A1
271
272&rotl($e,5); # A2
273
274&add($tmp1,$e); # tmp1=F()+a
275
276############################
277# &BODY_40_59( 0,$K[2],$X,42,$A,$B,$C,$D,$E,$T);
278# &BODY_40_59( 0,$K[2],$X,43,$T,$A,$B,$C,$D,$E);
279$n++;
280 local($n0,$n1,$n2,$n3,$np)=&Na($n);
281 ($b,$c,$d,$e,$f,$a)=($a,$b,$c,$d,$e,$f);
282
283 &mov($f,&swtmp($n0)); # X1
284&add($a,$tmp1); # tot+=tmp1; # moved was add f,tmp1
285 &mov($tmp1,&swtmp($n1)); # X2
286&xor($f,$tmp1); # X3
287 &mov($tmp1,&swtmp($n2)); # X4
288&xor($f,$tmp1); # X5
289 &mov($tmp1,&swtmp($n3)); # X6
290&rotr($c,1); # B2 <- F # moved was rotr b,1
291 &xor($f,$tmp1); # X7 - slot
292&rotl($f,1); # X8 - slot
293 &mov($tmp1,$b); # F1
294&mov(&swtmp($n0),$f); # X9 - anytime
295 &or($tmp1,$c); # F2
296&lea($f,&DWP($K,$f,$e,1)); # tot=X+K+e
297 &mov($e,$b); # F4
298&and($tmp1,$d); # F3
299 &and($e,$c); # F5
300
301&or($tmp1,$e); # F6
302 &mov($e,$a); # A1
303
304&rotl($e,5); # A2
305
306&rotr($b,1); # B1 <- F
307 &add($tmp1,$e); # tmp1=F()+a
308
309&rotr($b,1); # B2 <- F
310 &add($f,$tmp1); # tot+=tmp1;
197 } 311 }
198 312
199sub BODY_60_79 313sub BODY_60_79
@@ -381,7 +495,8 @@ sub sha1_block_data
381 # C -> E 495 # C -> E
382 # D -> T 496 # D -> T
383 497
384 &mov($tmp1,&wparam(0)); 498 # The last 2 have been moved into the last loop
499 # &mov($tmp1,&wparam(0));
385 500
386 &mov($D, &DWP(12,$tmp1,"",0)); 501 &mov($D, &DWP(12,$tmp1,"",0));
387 &add($D,$B); 502 &add($D,$B);
diff --git a/src/lib/libssl/src/crypto/stack/Makefile.ssl b/src/lib/libssl/src/crypto/stack/Makefile.ssl
new file mode 100644
index 0000000000..7120fb804a
--- /dev/null
+++ b/src/lib/libssl/src/crypto/stack/Makefile.ssl
@@ -0,0 +1,88 @@
1#
2# SSLeay/crypto/stack/Makefile
3#
4
5DIR= stack
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=stack.c
27LIBOBJ=stack.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= stack.h safestack.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82stack.o: ../../e_os.h ../../include/openssl/bio.h
83stack.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
84stack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
85stack.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
86stack.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
87stack.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
88stack.o: ../cryptlib.h stack.c
diff --git a/src/lib/libssl/src/crypto/threads/mttest.c b/src/lib/libssl/src/crypto/threads/mttest.c
index 7588966cb2..8973921778 100644
--- a/src/lib/libssl/src/crypto/threads/mttest.c
+++ b/src/lib/libssl/src/crypto/threads/mttest.c
@@ -243,7 +243,7 @@ bad:
243 goto end; 243 goto end;
244 } 244 }
245 245
246 if (cipher == NULL && OPENSSL_issetugid() == 0) 246 if (cipher == NULL && issetugid() == 0)
247 cipher=getenv("SSL_CIPHER"); 247 cipher=getenv("SSL_CIPHER");
248 248
249 SSL_load_error_strings(); 249 SSL_load_error_strings();
diff --git a/src/lib/libssl/src/crypto/txt_db/Makefile.ssl b/src/lib/libssl/src/crypto/txt_db/Makefile.ssl
new file mode 100644
index 0000000000..6221dfae4d
--- /dev/null
+++ b/src/lib/libssl/src/crypto/txt_db/Makefile.ssl
@@ -0,0 +1,88 @@
1#
2# SSLeay/crypto/txt_db/Makefile
3#
4
5DIR= txt_db
6TOP= ../..
7CC= cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC=txt_db.c
27LIBOBJ=txt_db.o
28
29SRC= $(LIBSRC)
30
31EXHEADER= txt_db.h
32HEADER= $(EXHEADER)
33
34ALL= $(GENERAL) $(SRC) $(HEADER)
35
36top:
37 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39all: lib
40
41lib: $(LIBOBJ)
42 $(AR) $(LIB) $(LIBOBJ)
43 $(RANLIB) $(LIB) || echo Never mind.
44 @touch lib
45
46files:
47 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
48
49links:
50 @sh $(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
55install:
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
62tags:
63 ctags $(SRC)
64
65tests:
66
67lint:
68 lint -DLINT $(INCLUDES) $(SRC)>fluff
69
70depend:
71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
72
73dclean:
74 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
75 mv -f Makefile.new $(MAKEFILE)
76
77clean:
78 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
79
80# DO NOT DELETE THIS LINE -- make depend depends on it.
81
82txt_db.o: ../../e_os.h ../../include/openssl/bio.h
83txt_db.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
84txt_db.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
85txt_db.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
86txt_db.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
87txt_db.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
88txt_db.o: ../../include/openssl/txt_db.h ../cryptlib.h txt_db.c
diff --git a/src/lib/libssl/src/crypto/ui/Makefile.ssl b/src/lib/libssl/src/crypto/ui/Makefile.ssl
new file mode 100644
index 0000000000..ba46951d1c
--- /dev/null
+++ b/src/lib/libssl/src/crypto/ui/Makefile.ssl
@@ -0,0 +1,117 @@
1#
2# OpenSSL/crypto/ui/Makefile
3#
4
5DIR= ui
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile
22#TEST= uitest.c
23TEST=
24APPS=
25
26COMPATSRC= ui_compat.c
27COMPATOBJ= ui_compat.o
28
29LIB=$(TOP)/libcrypto.a
30LIBSRC= ui_err.c ui_lib.c ui_openssl.c ui_util.c $(COMPATSRC)
31LIBOBJ= ui_err.o ui_lib.o ui_openssl.o ui_util.o $(COMPATOBJ)
32
33SRC= $(LIBSRC)
34
35EXHEADER= ui.h ui_compat.h
36HEADER= $(EXHEADER) ui_locl.h
37
38ALL= $(GENERAL) $(SRC) $(HEADER)
39
40top:
41 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
42
43all: lib
44
45lib: $(LIBOBJ)
46 $(AR) $(LIB) $(LIBOBJ)
47 $(RANLIB) $(LIB) || echo Never mind.
48 @touch lib
49
50files:
51 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
52
53links:
54 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
55 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
56 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
57 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
58
59install:
60 @for i in $(EXHEADER) ; \
61 do \
62 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
63 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
64 done;
65
66tags:
67 ctags $(SRC)
68
69tests:
70
71lint:
72 lint -DLINT $(INCLUDES) $(SRC)>fluff
73
74depend:
75 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
76
77dclean:
78 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
79 mv -f Makefile.new $(MAKEFILE)
80
81clean:
82 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
83
84# DO NOT DELETE THIS LINE -- make depend depends on it.
85
86ui_compat.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
87ui_compat.o: ../../include/openssl/opensslconf.h
88ui_compat.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
89ui_compat.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
90ui_compat.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
91ui_compat.o: ui_compat.c
92ui_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
93ui_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
94ui_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
95ui_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
96ui_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
97ui_err.o: ../../include/openssl/ui.h ui_err.c
98ui_lib.o: ../../e_os.h ../../include/openssl/bio.h
99ui_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
100ui_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
101ui_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
102ui_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
103ui_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
104ui_lib.o: ../../include/openssl/ui.h ../cryptlib.h ui_lib.c ui_locl.h
105ui_openssl.o: ../../e_os.h ../../include/openssl/bio.h
106ui_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
107ui_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
108ui_openssl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
109ui_openssl.o: ../../include/openssl/opensslv.h
110ui_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
111ui_openssl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
112ui_openssl.o: ../cryptlib.h ui_locl.h ui_openssl.c
113ui_util.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
114ui_util.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
115ui_util.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
116ui_util.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
117ui_util.o: ui_util.c
diff --git a/src/lib/libssl/src/crypto/ui/ui_lib.c b/src/lib/libssl/src/crypto/ui/ui_lib.c
index dbc9711a2d..33c86d76ef 100644
--- a/src/lib/libssl/src/crypto/ui/ui_lib.c
+++ b/src/lib/libssl/src/crypto/ui/ui_lib.c
@@ -430,14 +430,14 @@ char *UI_construct_prompt(UI *ui, const char *object_desc,
430 len += sizeof(prompt3) - 1; 430 len += sizeof(prompt3) - 1;
431 431
432 prompt = (char *)OPENSSL_malloc(len + 1); 432 prompt = (char *)OPENSSL_malloc(len + 1);
433 BUF_strlcpy(prompt, prompt1, len + 1); 433 strlcpy(prompt, prompt1, len + 1);
434 BUF_strlcat(prompt, object_desc, len + 1); 434 strlcat(prompt, object_desc, len + 1);
435 if (object_name) 435 if (object_name)
436 { 436 {
437 BUF_strlcat(prompt, prompt2, len + 1); 437 strlcat(prompt, prompt2, len + 1);
438 BUF_strlcat(prompt, object_name, len + 1); 438 strlcat(prompt, object_name, len + 1);
439 } 439 }
440 BUF_strlcat(prompt, prompt3, len + 1); 440 strlcat(prompt, prompt3, len + 1);
441 } 441 }
442 return prompt; 442 return prompt;
443 } 443 }
@@ -865,8 +865,8 @@ int UI_set_result(UI *ui, UI_STRING *uis, const char *result)
865 return -1; 865 return -1;
866 } 866 }
867 867
868 BUF_strlcpy(uis->result_buf, result, 868 strlcpy(uis->result_buf, result,
869 uis->_.string_data.result_maxsize + 1); 869 uis->_.string_data.result_maxsize + 1);
870 break; 870 break;
871 case UIT_BOOLEAN: 871 case UIT_BOOLEAN:
872 { 872 {
diff --git a/src/lib/libssl/src/crypto/x509/Makefile.ssl b/src/lib/libssl/src/crypto/x509/Makefile.ssl
new file mode 100644
index 0000000000..3a3452536c
--- /dev/null
+++ b/src/lib/libssl/src/crypto/x509/Makefile.ssl
@@ -0,0 +1,594 @@
1#
2# SSLeay/crypto/x509/Makefile
3#
4
5DIR= x509
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile README
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c \
27 x509_obj.c x509_req.c x509spki.c x509_vfy.c \
28 x509_set.c x509cset.c x509rset.c x509_err.c \
29 x509name.c x509_v3.c x509_ext.c x509_att.c \
30 x509type.c x509_lu.c x_all.c x509_txt.c \
31 x509_trs.c by_file.c by_dir.c
32LIBOBJ= x509_def.o x509_d2.o x509_r2x.o x509_cmp.o \
33 x509_obj.o x509_req.o x509spki.o x509_vfy.o \
34 x509_set.o x509cset.o x509rset.o x509_err.o \
35 x509name.o x509_v3.o x509_ext.o x509_att.o \
36 x509type.o x509_lu.o x_all.o x509_txt.o \
37 x509_trs.o by_file.o by_dir.o
38
39SRC= $(LIBSRC)
40
41EXHEADER= x509.h x509_vfy.h
42HEADER= $(EXHEADER)
43
44ALL= $(GENERAL) $(SRC) $(HEADER)
45
46top:
47 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
48
49all: lib
50
51lib: $(LIBOBJ)
52 $(AR) $(LIB) $(LIBOBJ)
53 $(RANLIB) $(LIB) || echo Never mind.
54 @touch lib
55
56files:
57 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
58
59links:
60 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
61 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
62 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
63 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
64
65install:
66 @for i in $(EXHEADER) ; \
67 do \
68 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
69 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
70 done;
71
72tags:
73 ctags $(SRC)
74
75tests:
76
77lint:
78 lint -DLINT $(INCLUDES) $(SRC)>fluff
79
80depend:
81 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
82
83dclean:
84 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
85 mv -f Makefile.new $(MAKEFILE)
86
87clean:
88 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
89
90# DO NOT DELETE THIS LINE -- make depend depends on it.
91
92by_dir.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
93by_dir.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
94by_dir.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
95by_dir.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
96by_dir.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
97by_dir.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
98by_dir.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
99by_dir.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
100by_dir.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
101by_dir.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
102by_dir.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
103by_dir.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
104by_dir.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
105by_dir.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
106by_dir.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
107by_dir.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
108by_dir.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
109by_dir.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
110by_dir.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
111by_dir.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
112by_dir.o: ../cryptlib.h by_dir.c
113by_file.o: ../../e_os.h ../../include/openssl/aes.h
114by_file.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
115by_file.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
116by_file.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
117by_file.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
118by_file.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
119by_file.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
120by_file.o: ../../include/openssl/err.h ../../include/openssl/evp.h
121by_file.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
122by_file.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
123by_file.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
124by_file.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
125by_file.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
126by_file.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
127by_file.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
128by_file.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
129by_file.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
130by_file.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
131by_file.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
132by_file.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
133by_file.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
134by_file.o: ../../include/openssl/x509_vfy.h ../cryptlib.h by_file.c
135x509_att.o: ../../e_os.h ../../include/openssl/aes.h
136x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
137x509_att.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
138x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
139x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
140x509_att.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
141x509_att.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
142x509_att.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
143x509_att.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
144x509_att.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
145x509_att.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
146x509_att.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
147x509_att.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
148x509_att.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
149x509_att.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
150x509_att.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
151x509_att.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
152x509_att.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
153x509_att.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
154x509_att.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
155x509_att.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
156x509_att.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_att.c
157x509_cmp.o: ../../e_os.h ../../include/openssl/aes.h
158x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
159x509_cmp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
160x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
161x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
162x509_cmp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
163x509_cmp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
164x509_cmp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
165x509_cmp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
166x509_cmp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
167x509_cmp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
168x509_cmp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
169x509_cmp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
170x509_cmp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
171x509_cmp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
172x509_cmp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
173x509_cmp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
174x509_cmp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
175x509_cmp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
176x509_cmp.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
177x509_cmp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
178x509_cmp.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_cmp.c
179x509_d2.o: ../../e_os.h ../../include/openssl/aes.h
180x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
181x509_d2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
182x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
183x509_d2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
184x509_d2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
185x509_d2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
186x509_d2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
187x509_d2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
188x509_d2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
189x509_d2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
190x509_d2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
191x509_d2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
192x509_d2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
193x509_d2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
194x509_d2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
195x509_d2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
196x509_d2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
197x509_d2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
198x509_d2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
199x509_d2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_d2.c
200x509_def.o: ../../e_os.h ../../include/openssl/aes.h
201x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
202x509_def.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
203x509_def.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
204x509_def.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
205x509_def.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
206x509_def.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
207x509_def.o: ../../include/openssl/err.h ../../include/openssl/evp.h
208x509_def.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
209x509_def.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
210x509_def.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
211x509_def.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
212x509_def.o: ../../include/openssl/opensslconf.h
213x509_def.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
214x509_def.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
215x509_def.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
216x509_def.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
217x509_def.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
218x509_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
219x509_def.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
220x509_def.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
221x509_def.o: ../cryptlib.h x509_def.c
222x509_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
223x509_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
224x509_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
225x509_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
226x509_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
227x509_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
228x509_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
229x509_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
230x509_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
231x509_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
232x509_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
233x509_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
234x509_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
235x509_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
236x509_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
237x509_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
238x509_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
239x509_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
240x509_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
241x509_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
242x509_err.o: x509_err.c
243x509_ext.o: ../../e_os.h ../../include/openssl/aes.h
244x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
245x509_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
246x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
247x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
248x509_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
249x509_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
250x509_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
251x509_ext.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
252x509_ext.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
253x509_ext.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
254x509_ext.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
255x509_ext.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
256x509_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
257x509_ext.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
258x509_ext.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
259x509_ext.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
260x509_ext.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
261x509_ext.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
262x509_ext.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
263x509_ext.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
264x509_ext.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_ext.c
265x509_lu.o: ../../e_os.h ../../include/openssl/aes.h
266x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
267x509_lu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
268x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
269x509_lu.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
270x509_lu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
271x509_lu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
272x509_lu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
273x509_lu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
274x509_lu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
275x509_lu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
276x509_lu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
277x509_lu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
278x509_lu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
279x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
280x509_lu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
281x509_lu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
282x509_lu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
283x509_lu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
284x509_lu.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
285x509_lu.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
286x509_lu.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_lu.c
287x509_obj.o: ../../e_os.h ../../include/openssl/aes.h
288x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
289x509_obj.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
290x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
291x509_obj.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
292x509_obj.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
293x509_obj.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
294x509_obj.o: ../../include/openssl/err.h ../../include/openssl/evp.h
295x509_obj.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
296x509_obj.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
297x509_obj.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
298x509_obj.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
299x509_obj.o: ../../include/openssl/opensslconf.h
300x509_obj.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
301x509_obj.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
302x509_obj.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
303x509_obj.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
304x509_obj.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
305x509_obj.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
306x509_obj.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
307x509_obj.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
308x509_obj.o: ../cryptlib.h x509_obj.c
309x509_r2x.o: ../../e_os.h ../../include/openssl/aes.h
310x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
311x509_r2x.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
312x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
313x509_r2x.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
314x509_r2x.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
315x509_r2x.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
316x509_r2x.o: ../../include/openssl/err.h ../../include/openssl/evp.h
317x509_r2x.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
318x509_r2x.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
319x509_r2x.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
320x509_r2x.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
321x509_r2x.o: ../../include/openssl/opensslconf.h
322x509_r2x.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
323x509_r2x.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
324x509_r2x.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
325x509_r2x.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
326x509_r2x.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
327x509_r2x.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
328x509_r2x.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
329x509_r2x.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
330x509_r2x.o: ../cryptlib.h x509_r2x.c
331x509_req.o: ../../e_os.h ../../include/openssl/aes.h
332x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
333x509_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
334x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
335x509_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
336x509_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
337x509_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
338x509_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h
339x509_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
340x509_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
341x509_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
342x509_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
343x509_req.o: ../../include/openssl/opensslconf.h
344x509_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
345x509_req.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
346x509_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
347x509_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
348x509_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
349x509_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
350x509_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
351x509_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
352x509_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
353x509_req.o: ../cryptlib.h x509_req.c
354x509_set.o: ../../e_os.h ../../include/openssl/aes.h
355x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
356x509_set.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
357x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
358x509_set.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
359x509_set.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
360x509_set.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
361x509_set.o: ../../include/openssl/err.h ../../include/openssl/evp.h
362x509_set.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
363x509_set.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
364x509_set.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
365x509_set.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
366x509_set.o: ../../include/openssl/opensslconf.h
367x509_set.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
368x509_set.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
369x509_set.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
370x509_set.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
371x509_set.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
372x509_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
373x509_set.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
374x509_set.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
375x509_set.o: ../cryptlib.h x509_set.c
376x509_trs.o: ../../e_os.h ../../include/openssl/aes.h
377x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
378x509_trs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
379x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
380x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
381x509_trs.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
382x509_trs.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
383x509_trs.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
384x509_trs.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
385x509_trs.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
386x509_trs.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
387x509_trs.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
388x509_trs.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
389x509_trs.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
390x509_trs.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
391x509_trs.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
392x509_trs.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
393x509_trs.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
394x509_trs.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
395x509_trs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
396x509_trs.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
397x509_trs.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_trs.c
398x509_txt.o: ../../e_os.h ../../include/openssl/aes.h
399x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
400x509_txt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
401x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
402x509_txt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
403x509_txt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
404x509_txt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
405x509_txt.o: ../../include/openssl/err.h ../../include/openssl/evp.h
406x509_txt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
407x509_txt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
408x509_txt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
409x509_txt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
410x509_txt.o: ../../include/openssl/opensslconf.h
411x509_txt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
412x509_txt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
413x509_txt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
414x509_txt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
415x509_txt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
416x509_txt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
417x509_txt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
418x509_txt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
419x509_txt.o: ../cryptlib.h x509_txt.c
420x509_v3.o: ../../e_os.h ../../include/openssl/aes.h
421x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
422x509_v3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
423x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
424x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
425x509_v3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
426x509_v3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
427x509_v3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
428x509_v3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
429x509_v3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
430x509_v3.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
431x509_v3.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
432x509_v3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
433x509_v3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
434x509_v3.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
435x509_v3.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
436x509_v3.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
437x509_v3.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
438x509_v3.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
439x509_v3.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
440x509_v3.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
441x509_v3.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_v3.c
442x509_vfy.o: ../../e_os.h ../../include/openssl/aes.h
443x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
444x509_vfy.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
445x509_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
446x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
447x509_vfy.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
448x509_vfy.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
449x509_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
450x509_vfy.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
451x509_vfy.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
452x509_vfy.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
453x509_vfy.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
454x509_vfy.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
455x509_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
456x509_vfy.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
457x509_vfy.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
458x509_vfy.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
459x509_vfy.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
460x509_vfy.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
461x509_vfy.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
462x509_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
463x509_vfy.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_vfy.c
464x509cset.o: ../../e_os.h ../../include/openssl/aes.h
465x509cset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
466x509cset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
467x509cset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
468x509cset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
469x509cset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
470x509cset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
471x509cset.o: ../../include/openssl/err.h ../../include/openssl/evp.h
472x509cset.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
473x509cset.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
474x509cset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
475x509cset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
476x509cset.o: ../../include/openssl/opensslconf.h
477x509cset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
478x509cset.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
479x509cset.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
480x509cset.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
481x509cset.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
482x509cset.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
483x509cset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
484x509cset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
485x509cset.o: ../cryptlib.h x509cset.c
486x509name.o: ../../e_os.h ../../include/openssl/aes.h
487x509name.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
488x509name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
489x509name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
490x509name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
491x509name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
492x509name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
493x509name.o: ../../include/openssl/err.h ../../include/openssl/evp.h
494x509name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
495x509name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
496x509name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
497x509name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
498x509name.o: ../../include/openssl/opensslconf.h
499x509name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
500x509name.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
501x509name.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
502x509name.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
503x509name.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
504x509name.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
505x509name.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
506x509name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
507x509name.o: ../cryptlib.h x509name.c
508x509rset.o: ../../e_os.h ../../include/openssl/aes.h
509x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
510x509rset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
511x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
512x509rset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
513x509rset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
514x509rset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
515x509rset.o: ../../include/openssl/err.h ../../include/openssl/evp.h
516x509rset.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
517x509rset.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
518x509rset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
519x509rset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
520x509rset.o: ../../include/openssl/opensslconf.h
521x509rset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
522x509rset.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
523x509rset.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
524x509rset.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
525x509rset.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
526x509rset.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
527x509rset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
528x509rset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
529x509rset.o: ../cryptlib.h x509rset.c
530x509spki.o: ../../e_os.h ../../include/openssl/aes.h
531x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
532x509spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
533x509spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
534x509spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
535x509spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
536x509spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
537x509spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h
538x509spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
539x509spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
540x509spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
541x509spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
542x509spki.o: ../../include/openssl/opensslconf.h
543x509spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
544x509spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
545x509spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
546x509spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
547x509spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
548x509spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
549x509spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
550x509spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
551x509spki.o: ../cryptlib.h x509spki.c
552x509type.o: ../../e_os.h ../../include/openssl/aes.h
553x509type.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
554x509type.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
555x509type.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
556x509type.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
557x509type.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
558x509type.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
559x509type.o: ../../include/openssl/err.h ../../include/openssl/evp.h
560x509type.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
561x509type.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
562x509type.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
563x509type.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
564x509type.o: ../../include/openssl/opensslconf.h
565x509type.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
566x509type.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
567x509type.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
568x509type.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
569x509type.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
570x509type.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
571x509type.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
572x509type.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
573x509type.o: ../cryptlib.h x509type.c
574x_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
575x_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
576x_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
577x_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
578x_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
579x_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
580x_all.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
581x_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
582x_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
583x_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
584x_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
585x_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
586x_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
587x_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
588x_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
589x_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
590x_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
591x_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
592x_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
593x_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
594x_all.o: ../cryptlib.h x_all.c
diff --git a/src/lib/libssl/src/crypto/x509/by_dir.c b/src/lib/libssl/src/crypto/x509/by_dir.c
index 6207340472..a5c306f1fd 100644
--- a/src/lib/libssl/src/crypto/x509/by_dir.c
+++ b/src/lib/libssl/src/crypto/x509/by_dir.c
@@ -302,38 +302,8 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
302 k=0; 302 k=0;
303 for (;;) 303 for (;;)
304 { 304 {
305 char c = '/'; 305 snprintf(b->data,b->max,"%s/%08lx.%s%d",ctx->dirs[i],h,
306#ifdef OPENSSL_SYS_VMS 306 postfix,k);
307 c = ctx->dirs[i][strlen(ctx->dirs[i])-1];
308 if (c != ':' && c != '>' && c != ']')
309 {
310 /* If no separator is present, we assume the
311 directory specifier is a logical name, and
312 add a colon. We really should use better
313 VMS routines for merging things like this,
314 but this will do for now...
315 -- Richard Levitte */
316 c = ':';
317 }
318 else
319 {
320 c = '\0';
321 }
322#endif
323 if (c == '\0')
324 {
325 /* This is special. When c == '\0', no
326 directory separator should be added. */
327 BIO_snprintf(b->data,b->max,
328 "%s%08lx.%s%d",ctx->dirs[i],h,
329 postfix,k);
330 }
331 else
332 {
333 BIO_snprintf(b->data,b->max,
334 "%s%c%08lx.%s%d",ctx->dirs[i],c,h,
335 postfix,k);
336 }
337 k++; 307 k++;
338 if (stat(b->data,&st) < 0) 308 if (stat(b->data,&st) < 0)
339 break; 309 break;
diff --git a/src/lib/libssl/src/crypto/x509/x509.h b/src/lib/libssl/src/crypto/x509/x509.h
index 8d0c7e2e17..eaad5685a8 100644
--- a/src/lib/libssl/src/crypto/x509/x509.h
+++ b/src/lib/libssl/src/crypto/x509/x509.h
@@ -810,6 +810,10 @@ X509_REQ *X509_REQ_dup(X509_REQ *req);
810X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); 810X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
811X509_NAME *X509_NAME_dup(X509_NAME *xn); 811X509_NAME *X509_NAME_dup(X509_NAME *xn);
812X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); 812X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
813#ifndef OPENSSL_NO_RSA
814RSA *RSAPublicKey_dup(RSA *rsa);
815RSA *RSAPrivateKey_dup(RSA *rsa);
816#endif
813 817
814#endif /* !SSLEAY_MACROS */ 818#endif /* !SSLEAY_MACROS */
815 819
diff --git a/src/lib/libssl/src/crypto/x509/x509_txt.c b/src/lib/libssl/src/crypto/x509/x509_txt.c
index e31ebc6741..9d09ae17e8 100644
--- a/src/lib/libssl/src/crypto/x509/x509_txt.c
+++ b/src/lib/libssl/src/crypto/x509/x509_txt.c
@@ -147,14 +147,8 @@ const char *X509_verify_cert_error_string(long n)
147 case X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: 147 case X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION:
148 return("unhandled critical extension"); 148 return("unhandled critical extension");
149 149
150 case X509_V_ERR_KEYUSAGE_NO_CRL_SIGN:
151 return("key usage does not include CRL signing");
152
153 case X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION:
154 return("unhandled critical CRL extension");
155
156 default: 150 default:
157 BIO_snprintf(buf,sizeof buf,"error number %ld",n); 151 snprintf(buf,sizeof buf,"error number %ld",n);
158 return(buf); 152 return(buf);
159 } 153 }
160 } 154 }
diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.c b/src/lib/libssl/src/crypto/x509/x509_vfy.c
index 2e4d0b823a..2bb21b443e 100644
--- a/src/lib/libssl/src/crypto/x509/x509_vfy.c
+++ b/src/lib/libssl/src/crypto/x509/x509_vfy.c
@@ -383,7 +383,6 @@ static int check_chain_purpose(X509_STORE_CTX *ctx)
383 /* Check all untrusted certificates */ 383 /* Check all untrusted certificates */
384 for (i = 0; i < ctx->last_untrusted; i++) 384 for (i = 0; i < ctx->last_untrusted; i++)
385 { 385 {
386 int ret;
387 x = sk_X509_value(ctx->chain, i); 386 x = sk_X509_value(ctx->chain, i);
388 if (!(ctx->flags & X509_V_FLAG_IGNORE_CRITICAL) 387 if (!(ctx->flags & X509_V_FLAG_IGNORE_CRITICAL)
389 && (x->ex_flags & EXFLAG_CRITICAL)) 388 && (x->ex_flags & EXFLAG_CRITICAL))
@@ -394,10 +393,7 @@ static int check_chain_purpose(X509_STORE_CTX *ctx)
394 ok=cb(0,ctx); 393 ok=cb(0,ctx);
395 if (!ok) goto end; 394 if (!ok) goto end;
396 } 395 }
397 ret = X509_check_purpose(x, ctx->purpose, i); 396 if (!X509_check_purpose(x, ctx->purpose, i))
398 if ((ret == 0)
399 || ((ctx->flags & X509_V_FLAG_X509_STRICT)
400 && (ret != 1)))
401 { 397 {
402 if (i) 398 if (i)
403 ctx->error = X509_V_ERR_INVALID_CA; 399 ctx->error = X509_V_ERR_INVALID_CA;
@@ -541,14 +537,6 @@ static int check_crl(X509_STORE_CTX *ctx, X509_CRL *crl)
541 537
542 if(issuer) 538 if(issuer)
543 { 539 {
544 /* Check for cRLSign bit if keyUsage present */
545 if ((issuer->ex_flags & EXFLAG_KUSAGE) &&
546 !(issuer->ex_kusage & KU_CRL_SIGN))
547 {
548 ctx->error = X509_V_ERR_KEYUSAGE_NO_CRL_SIGN;
549 ok = ctx->verify_cb(0, ctx);
550 if(!ok) goto err;
551 }
552 540
553 /* Attempt to get issuer certificate public key */ 541 /* Attempt to get issuer certificate public key */
554 ikey = X509_get_pubkey(issuer); 542 ikey = X509_get_pubkey(issuer);
@@ -623,46 +611,17 @@ static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x)
623 { 611 {
624 int idx, ok; 612 int idx, ok;
625 X509_REVOKED rtmp; 613 X509_REVOKED rtmp;
626 STACK_OF(X509_EXTENSION) *exts;
627 X509_EXTENSION *ext;
628 /* Look for serial number of certificate in CRL */ 614 /* Look for serial number of certificate in CRL */
629 rtmp.serialNumber = X509_get_serialNumber(x); 615 rtmp.serialNumber = X509_get_serialNumber(x);
630 idx = sk_X509_REVOKED_find(crl->crl->revoked, &rtmp); 616 idx = sk_X509_REVOKED_find(crl->crl->revoked, &rtmp);
631 /* If found assume revoked: want something cleverer than 617 /* Not found: OK */
618 if(idx == -1) return 1;
619 /* Otherwise revoked: want something cleverer than
632 * this to handle entry extensions in V2 CRLs. 620 * this to handle entry extensions in V2 CRLs.
633 */ 621 */
634 if(idx >= 0) 622 ctx->error = X509_V_ERR_CERT_REVOKED;
635 { 623 ok = ctx->verify_cb(0, ctx);
636 ctx->error = X509_V_ERR_CERT_REVOKED; 624 return ok;
637 ok = ctx->verify_cb(0, ctx);
638 if (!ok) return 0;
639 }
640
641 if (ctx->flags & X509_V_FLAG_IGNORE_CRITICAL)
642 return 1;
643
644 /* See if we have any critical CRL extensions: since we
645 * currently don't handle any CRL extensions the CRL must be
646 * rejected.
647 * This code accesses the X509_CRL structure directly: applications
648 * shouldn't do this.
649 */
650
651 exts = crl->crl->extensions;
652
653 for (idx = 0; idx < sk_X509_EXTENSION_num(exts); idx++)
654 {
655 ext = sk_X509_EXTENSION_value(exts, idx);
656 if (ext->critical > 0)
657 {
658 ctx->error =
659 X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION;
660 ok = ctx->verify_cb(0, ctx);
661 if(!ok) return 0;
662 break;
663 }
664 }
665 return 1;
666 } 625 }
667 626
668static int internal_verify(X509_STORE_CTX *ctx) 627static int internal_verify(X509_STORE_CTX *ctx)
diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.h b/src/lib/libssl/src/crypto/x509/x509_vfy.h
index 198495884c..f0be21f452 100644
--- a/src/lib/libssl/src/crypto/x509/x509_vfy.h
+++ b/src/lib/libssl/src/crypto/x509/x509_vfy.h
@@ -304,26 +304,17 @@ struct x509_store_ctx_st /* X509_STORE_CTX */
304 304
305#define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33 305#define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33
306#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 306#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34
307#define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35
308#define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36
309 307
310/* The application is not happy */ 308/* The application is not happy */
311#define X509_V_ERR_APPLICATION_VERIFICATION 50 309#define X509_V_ERR_APPLICATION_VERIFICATION 50
312 310
313/* Certificate verify flags */ 311/* Certificate verify flags */
314 312
315/* Send issuer+subject checks to verify_cb */ 313#define X509_V_FLAG_CB_ISSUER_CHECK 0x1 /* Send issuer+subject checks to verify_cb */
316#define X509_V_FLAG_CB_ISSUER_CHECK 0x1 314#define X509_V_FLAG_USE_CHECK_TIME 0x2 /* Use check time instead of current time */
317/* Use check time instead of current time */ 315#define X509_V_FLAG_CRL_CHECK 0x4 /* Lookup CRLs */
318#define X509_V_FLAG_USE_CHECK_TIME 0x2 316#define X509_V_FLAG_CRL_CHECK_ALL 0x8 /* Lookup CRLs for whole chain */
319/* Lookup CRLs */ 317#define X509_V_FLAG_IGNORE_CRITICAL 0x10 /* Ignore unhandled critical extensions */
320#define X509_V_FLAG_CRL_CHECK 0x4
321/* Lookup CRLs for whole chain */
322#define X509_V_FLAG_CRL_CHECK_ALL 0x8
323/* Ignore unhandled critical extensions */
324#define X509_V_FLAG_IGNORE_CRITICAL 0x10
325/* Disable workarounds for broken certificates */
326#define X509_V_FLAG_X509_STRICT 0x20
327 318
328int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, 319int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type,
329 X509_NAME *name); 320 X509_NAME *name);
diff --git a/src/lib/libssl/src/crypto/x509/x509type.c b/src/lib/libssl/src/crypto/x509/x509type.c
index c25959a742..f78c2a6b43 100644
--- a/src/lib/libssl/src/crypto/x509/x509type.c
+++ b/src/lib/libssl/src/crypto/x509/x509type.c
@@ -106,7 +106,7 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey)
106 break; 106 break;
107 } 107 }
108 108
109 if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look 109 if (EVP_PKEY_size(pk) <= 512/8) /* /8 because it's 512 bits we look
110 for, not bytes */ 110 for, not bytes */
111 ret|=EVP_PKT_EXP; 111 ret|=EVP_PKT_EXP;
112 if(pkey==NULL) EVP_PKEY_free(pk); 112 if(pkey==NULL) EVP_PKEY_free(pk);
diff --git a/src/lib/libssl/src/crypto/x509v3/Makefile.ssl b/src/lib/libssl/src/crypto/x509v3/Makefile.ssl
new file mode 100644
index 0000000000..66df90c346
--- /dev/null
+++ b/src/lib/libssl/src/crypto/x509v3/Makefile.ssl
@@ -0,0 +1,603 @@
1#
2# SSLeay/crypto/x509v3/Makefile
3#
4
5DIR= x509v3
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18
19CFLAGS= $(INCLUDES) $(CFLAG)
20
21GENERAL=Makefile README
22TEST=
23APPS=
24
25LIB=$(TOP)/libcrypto.a
26LIBSRC= v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c v3_lib.c \
27v3_prn.c v3_utl.c v3err.c v3_genn.c v3_alt.c v3_skey.c v3_akey.c v3_pku.c \
28v3_int.c v3_enum.c v3_sxnet.c v3_cpols.c v3_crld.c v3_purp.c v3_info.c \
29v3_ocsp.c v3_akeya.c
30LIBOBJ= v3_bcons.o v3_bitst.o v3_conf.o v3_extku.o v3_ia5.o v3_lib.o \
31v3_prn.o v3_utl.o v3err.o v3_genn.o v3_alt.o v3_skey.o v3_akey.o v3_pku.o \
32v3_int.o v3_enum.o v3_sxnet.o v3_cpols.o v3_crld.o v3_purp.o v3_info.o \
33v3_ocsp.o v3_akeya.o
34
35SRC= $(LIBSRC)
36
37EXHEADER= x509v3.h
38HEADER= $(EXHEADER)
39
40ALL= $(GENERAL) $(SRC) $(HEADER)
41
42top:
43 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
44
45all: lib
46
47lib: $(LIBOBJ)
48 $(AR) $(LIB) $(LIBOBJ)
49 $(RANLIB) $(LIB) || echo Never mind.
50 @touch lib
51
52files:
53 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
54
55links:
56 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
57 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
58 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
59 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
60
61install:
62 @for i in $(EXHEADER) ; \
63 do \
64 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
65 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
66 done;
67
68tags:
69 ctags $(SRC)
70
71tests:
72
73lint:
74 lint -DLINT $(INCLUDES) $(SRC)>fluff
75
76depend:
77 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
78
79dclean:
80 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
81 mv -f Makefile.new $(MAKEFILE)
82
83clean:
84 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
85
86# DO NOT DELETE THIS LINE -- make depend depends on it.
87
88v3_akey.o: ../../e_os.h ../../include/openssl/aes.h
89v3_akey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
90v3_akey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
91v3_akey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
92v3_akey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
93v3_akey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
94v3_akey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
95v3_akey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
96v3_akey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
97v3_akey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
98v3_akey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
99v3_akey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
100v3_akey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
101v3_akey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
102v3_akey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
103v3_akey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
104v3_akey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
105v3_akey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
106v3_akey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
107v3_akey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
108v3_akey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
109v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
110v3_akey.o: ../cryptlib.h v3_akey.c
111v3_akeya.o: ../../e_os.h ../../include/openssl/aes.h
112v3_akeya.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
113v3_akeya.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
114v3_akeya.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
115v3_akeya.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
116v3_akeya.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
117v3_akeya.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
118v3_akeya.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
119v3_akeya.o: ../../include/openssl/err.h ../../include/openssl/evp.h
120v3_akeya.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
121v3_akeya.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
122v3_akeya.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
123v3_akeya.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
124v3_akeya.o: ../../include/openssl/opensslconf.h
125v3_akeya.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
126v3_akeya.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
127v3_akeya.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
128v3_akeya.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
129v3_akeya.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
130v3_akeya.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
131v3_akeya.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
132v3_akeya.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
133v3_akeya.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_akeya.c
134v3_alt.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
135v3_alt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
136v3_alt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
137v3_alt.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
138v3_alt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
139v3_alt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
140v3_alt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
141v3_alt.o: ../../include/openssl/err.h ../../include/openssl/evp.h
142v3_alt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
143v3_alt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
144v3_alt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
145v3_alt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
146v3_alt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
147v3_alt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
148v3_alt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
149v3_alt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
150v3_alt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
151v3_alt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
152v3_alt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
153v3_alt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
154v3_alt.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
155v3_alt.o: ../cryptlib.h v3_alt.c
156v3_bcons.o: ../../e_os.h ../../include/openssl/aes.h
157v3_bcons.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
158v3_bcons.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
159v3_bcons.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
160v3_bcons.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
161v3_bcons.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
162v3_bcons.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
163v3_bcons.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
164v3_bcons.o: ../../include/openssl/err.h ../../include/openssl/evp.h
165v3_bcons.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
166v3_bcons.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
167v3_bcons.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
168v3_bcons.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
169v3_bcons.o: ../../include/openssl/opensslconf.h
170v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
171v3_bcons.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
172v3_bcons.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
173v3_bcons.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
174v3_bcons.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
175v3_bcons.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
176v3_bcons.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
177v3_bcons.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
178v3_bcons.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bcons.c
179v3_bitst.o: ../../e_os.h ../../include/openssl/aes.h
180v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
181v3_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
182v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
183v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
184v3_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
185v3_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
186v3_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
187v3_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
188v3_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
189v3_bitst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
190v3_bitst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
191v3_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
192v3_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
193v3_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
194v3_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
195v3_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
196v3_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
197v3_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
198v3_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
199v3_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
200v3_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bitst.c
201v3_conf.o: ../../e_os.h ../../include/openssl/aes.h
202v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
203v3_conf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
204v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
205v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
206v3_conf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
207v3_conf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
208v3_conf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
209v3_conf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
210v3_conf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
211v3_conf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
212v3_conf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
213v3_conf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
214v3_conf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
215v3_conf.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
216v3_conf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
217v3_conf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
218v3_conf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
219v3_conf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
220v3_conf.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
221v3_conf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
222v3_conf.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_conf.c
223v3_cpols.o: ../../e_os.h ../../include/openssl/aes.h
224v3_cpols.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
225v3_cpols.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
226v3_cpols.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
227v3_cpols.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
228v3_cpols.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
229v3_cpols.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
230v3_cpols.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
231v3_cpols.o: ../../include/openssl/err.h ../../include/openssl/evp.h
232v3_cpols.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
233v3_cpols.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
234v3_cpols.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
235v3_cpols.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
236v3_cpols.o: ../../include/openssl/opensslconf.h
237v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
238v3_cpols.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
239v3_cpols.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
240v3_cpols.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
241v3_cpols.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
242v3_cpols.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
243v3_cpols.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
244v3_cpols.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
245v3_cpols.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_cpols.c
246v3_crld.o: ../../e_os.h ../../include/openssl/aes.h
247v3_crld.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
248v3_crld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
249v3_crld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
250v3_crld.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
251v3_crld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
252v3_crld.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
253v3_crld.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
254v3_crld.o: ../../include/openssl/err.h ../../include/openssl/evp.h
255v3_crld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
256v3_crld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
257v3_crld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
258v3_crld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
259v3_crld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
260v3_crld.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
261v3_crld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
262v3_crld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
263v3_crld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
264v3_crld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
265v3_crld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
266v3_crld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
267v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
268v3_crld.o: ../cryptlib.h v3_crld.c
269v3_enum.o: ../../e_os.h ../../include/openssl/aes.h
270v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
271v3_enum.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
272v3_enum.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
273v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
274v3_enum.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
275v3_enum.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
276v3_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
277v3_enum.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
278v3_enum.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
279v3_enum.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
280v3_enum.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
281v3_enum.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
282v3_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
283v3_enum.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
284v3_enum.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
285v3_enum.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
286v3_enum.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
287v3_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
288v3_enum.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
289v3_enum.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
290v3_enum.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_enum.c
291v3_extku.o: ../../e_os.h ../../include/openssl/aes.h
292v3_extku.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
293v3_extku.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
294v3_extku.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
295v3_extku.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
296v3_extku.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
297v3_extku.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
298v3_extku.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
299v3_extku.o: ../../include/openssl/err.h ../../include/openssl/evp.h
300v3_extku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
301v3_extku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
302v3_extku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
303v3_extku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
304v3_extku.o: ../../include/openssl/opensslconf.h
305v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
306v3_extku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
307v3_extku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
308v3_extku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
309v3_extku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
310v3_extku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
311v3_extku.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
312v3_extku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
313v3_extku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_extku.c
314v3_genn.o: ../../e_os.h ../../include/openssl/aes.h
315v3_genn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
316v3_genn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
317v3_genn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
318v3_genn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
319v3_genn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
320v3_genn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
321v3_genn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
322v3_genn.o: ../../include/openssl/err.h ../../include/openssl/evp.h
323v3_genn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
324v3_genn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
325v3_genn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
326v3_genn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
327v3_genn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
328v3_genn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
329v3_genn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
330v3_genn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
331v3_genn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
332v3_genn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
333v3_genn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
334v3_genn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
335v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
336v3_genn.o: ../cryptlib.h v3_genn.c
337v3_ia5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
338v3_ia5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
339v3_ia5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
340v3_ia5.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
341v3_ia5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
342v3_ia5.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
343v3_ia5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
344v3_ia5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
345v3_ia5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
346v3_ia5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
347v3_ia5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
348v3_ia5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
349v3_ia5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
350v3_ia5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
351v3_ia5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
352v3_ia5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
353v3_ia5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
354v3_ia5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
355v3_ia5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
356v3_ia5.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
357v3_ia5.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
358v3_ia5.o: ../cryptlib.h v3_ia5.c
359v3_info.o: ../../e_os.h ../../include/openssl/aes.h
360v3_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
361v3_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
362v3_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
363v3_info.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
364v3_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
365v3_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
366v3_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
367v3_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h
368v3_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
369v3_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
370v3_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
371v3_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
372v3_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
373v3_info.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
374v3_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
375v3_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
376v3_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
377v3_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
378v3_info.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
379v3_info.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
380v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
381v3_info.o: ../cryptlib.h v3_info.c
382v3_int.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
383v3_int.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
384v3_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
385v3_int.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
386v3_int.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
387v3_int.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
388v3_int.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
389v3_int.o: ../../include/openssl/err.h ../../include/openssl/evp.h
390v3_int.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
391v3_int.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
392v3_int.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
393v3_int.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
394v3_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
395v3_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
396v3_int.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
397v3_int.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
398v3_int.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
399v3_int.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
400v3_int.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
401v3_int.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
402v3_int.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
403v3_int.o: ../cryptlib.h v3_int.c
404v3_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
405v3_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
406v3_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
407v3_lib.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
408v3_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
409v3_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
410v3_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
411v3_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
412v3_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
413v3_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
414v3_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
415v3_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
416v3_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
417v3_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
418v3_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
419v3_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
420v3_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
421v3_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
422v3_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
423v3_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
424v3_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
425v3_lib.o: ../cryptlib.h ext_dat.h v3_lib.c
426v3_ocsp.o: ../../e_os.h ../../include/openssl/aes.h
427v3_ocsp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
428v3_ocsp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
429v3_ocsp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
430v3_ocsp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
431v3_ocsp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
432v3_ocsp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
433v3_ocsp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
434v3_ocsp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
435v3_ocsp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
436v3_ocsp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
437v3_ocsp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
438v3_ocsp.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
439v3_ocsp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
440v3_ocsp.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
441v3_ocsp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
442v3_ocsp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
443v3_ocsp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
444v3_ocsp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
445v3_ocsp.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
446v3_ocsp.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
447v3_ocsp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
448v3_ocsp.o: ../cryptlib.h v3_ocsp.c
449v3_pku.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
450v3_pku.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
451v3_pku.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
452v3_pku.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
453v3_pku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
454v3_pku.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
455v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
456v3_pku.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
457v3_pku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
458v3_pku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
459v3_pku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
460v3_pku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
461v3_pku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
462v3_pku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
463v3_pku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
464v3_pku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
465v3_pku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
466v3_pku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
467v3_pku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
468v3_pku.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
469v3_pku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
470v3_pku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_pku.c
471v3_prn.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
472v3_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
473v3_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
474v3_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
475v3_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
476v3_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
477v3_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
478v3_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h
479v3_prn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
480v3_prn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
481v3_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
482v3_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
483v3_prn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
484v3_prn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
485v3_prn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
486v3_prn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
487v3_prn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
488v3_prn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
489v3_prn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
490v3_prn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
491v3_prn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
492v3_prn.o: ../cryptlib.h v3_prn.c
493v3_purp.o: ../../e_os.h ../../include/openssl/aes.h
494v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
495v3_purp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
496v3_purp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
497v3_purp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
498v3_purp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
499v3_purp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
500v3_purp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
501v3_purp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
502v3_purp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
503v3_purp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
504v3_purp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
505v3_purp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
506v3_purp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
507v3_purp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
508v3_purp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
509v3_purp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
510v3_purp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
511v3_purp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
512v3_purp.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
513v3_purp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
514v3_purp.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_purp.c
515v3_skey.o: ../../e_os.h ../../include/openssl/aes.h
516v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
517v3_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
518v3_skey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
519v3_skey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
520v3_skey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
521v3_skey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
522v3_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
523v3_skey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
524v3_skey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
525v3_skey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
526v3_skey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
527v3_skey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
528v3_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
529v3_skey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
530v3_skey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
531v3_skey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
532v3_skey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
533v3_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
534v3_skey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
535v3_skey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
536v3_skey.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_skey.c
537v3_sxnet.o: ../../e_os.h ../../include/openssl/aes.h
538v3_sxnet.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
539v3_sxnet.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
540v3_sxnet.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
541v3_sxnet.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
542v3_sxnet.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
543v3_sxnet.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
544v3_sxnet.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
545v3_sxnet.o: ../../include/openssl/err.h ../../include/openssl/evp.h
546v3_sxnet.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
547v3_sxnet.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
548v3_sxnet.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
549v3_sxnet.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
550v3_sxnet.o: ../../include/openssl/opensslconf.h
551v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
552v3_sxnet.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
553v3_sxnet.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
554v3_sxnet.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
555v3_sxnet.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
556v3_sxnet.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
557v3_sxnet.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
558v3_sxnet.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
559v3_sxnet.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_sxnet.c
560v3_utl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
561v3_utl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
562v3_utl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
563v3_utl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
564v3_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
565v3_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
566v3_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
567v3_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
568v3_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
569v3_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
570v3_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
571v3_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
572v3_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
573v3_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
574v3_utl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
575v3_utl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
576v3_utl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
577v3_utl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
578v3_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
579v3_utl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
580v3_utl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
581v3_utl.o: ../cryptlib.h v3_utl.c
582v3err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
583v3err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
584v3err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
585v3err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
586v3err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
587v3err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
588v3err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
589v3err.o: ../../include/openssl/err.h ../../include/openssl/evp.h
590v3err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
591v3err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
592v3err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
593v3err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
594v3err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
595v3err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
596v3err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
597v3err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
598v3err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
599v3err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
600v3err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
601v3err.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
602v3err.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
603v3err.o: v3err.c
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_alt.c b/src/lib/libssl/src/crypto/x509v3/v3_alt.c
index 58b935a3b6..0fae31a3a6 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_alt.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_alt.c
@@ -137,8 +137,8 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
137 X509V3_add_value("IP Address","<invalid>", &ret); 137 X509V3_add_value("IP Address","<invalid>", &ret);
138 break; 138 break;
139 } 139 }
140 BIO_snprintf(oline, sizeof oline, 140 snprintf(oline, sizeof oline, "%d.%d.%d.%d", p[0], p[1], p[2],
141 "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); 141 p[3]);
142 X509V3_add_value("IP Address",oline, &ret); 142 X509V3_add_value("IP Address",oline, &ret);
143 break; 143 break;
144 144
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_crld.c b/src/lib/libssl/src/crypto/x509v3/v3_crld.c
index f90829c574..894a8b94d8 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_crld.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_crld.c
@@ -156,7 +156,7 @@ ASN1_SEQUENCE(DIST_POINT) = {
156IMPLEMENT_ASN1_FUNCTIONS(DIST_POINT) 156IMPLEMENT_ASN1_FUNCTIONS(DIST_POINT)
157 157
158ASN1_ITEM_TEMPLATE(CRL_DIST_POINTS) = 158ASN1_ITEM_TEMPLATE(CRL_DIST_POINTS) =
159 ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, CRLDistributionPoints, DIST_POINT) 159 ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, DIST_POINT, DIST_POINT)
160ASN1_ITEM_TEMPLATE_END(CRL_DIST_POINTS) 160ASN1_ITEM_TEMPLATE_END(CRL_DIST_POINTS)
161 161
162IMPLEMENT_ASN1_FUNCTIONS(CRL_DIST_POINTS) 162IMPLEMENT_ASN1_FUNCTIONS(CRL_DIST_POINTS)
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_info.c b/src/lib/libssl/src/crypto/x509v3/v3_info.c
index 53e3f48859..28cc00686a 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_info.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_info.c
@@ -121,9 +121,9 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method
121 ERR_R_MALLOC_FAILURE); 121 ERR_R_MALLOC_FAILURE);
122 return NULL; 122 return NULL;
123 } 123 }
124 BUF_strlcpy(ntmp, objtmp, nlen); 124 strlcpy(ntmp, objtmp, nlen);
125 BUF_strlcat(ntmp, " - ", nlen); 125 strlcat(ntmp, " - ", nlen);
126 BUF_strlcat(ntmp, vtmp->name, nlen); 126 strlcat(ntmp, vtmp->name, nlen);
127 OPENSSL_free(vtmp->name); 127 OPENSSL_free(vtmp->name);
128 vtmp->name = ntmp; 128 vtmp->name = ntmp;
129 129
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_purp.c b/src/lib/libssl/src/crypto/x509v3/v3_purp.c
index b3d1ae5d1c..4d145f71fd 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_purp.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_purp.c
@@ -3,7 +3,7 @@
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
6 * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. 6 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
@@ -415,7 +415,6 @@ static void x509v3_cache_extensions(X509 *x)
415 * 1 is a CA 415 * 1 is a CA
416 * 2 basicConstraints absent so "maybe" a CA 416 * 2 basicConstraints absent so "maybe" a CA
417 * 3 basicConstraints absent but self signed V1. 417 * 3 basicConstraints absent but self signed V1.
418 * 4 basicConstraints absent but keyUsage present and keyCertSign asserted.
419 */ 418 */
420 419
421#define V1_ROOT (EXFLAG_V1|EXFLAG_SS) 420#define V1_ROOT (EXFLAG_V1|EXFLAG_SS)
@@ -437,7 +436,7 @@ static int ca_check(const X509 *x)
437 } else { 436 } else {
438 if((x->ex_flags & V1_ROOT) == V1_ROOT) return 3; 437 if((x->ex_flags & V1_ROOT) == V1_ROOT) return 3;
439 /* If key usage present it must have certSign so tolerate it */ 438 /* If key usage present it must have certSign so tolerate it */
440 else if (x->ex_flags & EXFLAG_KUSAGE) return 4; 439 else if (x->ex_flags & EXFLAG_KUSAGE) return 3;
441 else return 2; 440 else return 2;
442 } 441 }
443} 442}
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_utl.c b/src/lib/libssl/src/crypto/x509v3/v3_utl.c
index 34ac2998de..466c91d0e8 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_utl.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_utl.c
@@ -78,7 +78,7 @@ int X509V3_add_value(const char *name, const char *value,
78 CONF_VALUE *vtmp = NULL; 78 CONF_VALUE *vtmp = NULL;
79 char *tname = NULL, *tvalue = NULL; 79 char *tname = NULL, *tvalue = NULL;
80 if(name && !(tname = BUF_strdup(name))) goto err; 80 if(name && !(tname = BUF_strdup(name))) goto err;
81 if(value && !(tvalue = BUF_strdup(value))) goto err;; 81 if(value && !(tvalue = BUF_strdup(value))) goto err;
82 if(!(vtmp = (CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE)))) goto err; 82 if(!(vtmp = (CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE)))) goto err;
83 if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err; 83 if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err;
84 vtmp->section = NULL; 84 vtmp->section = NULL;
diff --git a/src/lib/libssl/src/demos/easy_tls/Makefile b/src/lib/libssl/src/demos/easy_tls/Makefile
index 31a54eaf27..bec7e7265e 100644
--- a/src/lib/libssl/src/demos/easy_tls/Makefile
+++ b/src/lib/libssl/src/demos/easy_tls/Makefile
@@ -1,5 +1,5 @@
1# Makefile for easy-tls example application (rudimentary client and server) 1# Makefile for easy-tls example application (rudimentary client and server)
2# $Id: Makefile,v 1.1.1.1 2002/09/05 12:51:06 markus Exp $ 2# $Id: Makefile,v 1.3 2002/09/10 16:31:56 markus Exp $
3 3
4SOLARIS_CFLAGS=-Wall -pedantic -g -O2 4SOLARIS_CFLAGS=-Wall -pedantic -g -O2
5SOLARIS_LIBS=-lxnet 5SOLARIS_LIBS=-lxnet
diff --git a/src/lib/libssl/src/demos/easy_tls/cacerts.pem b/src/lib/libssl/src/demos/easy_tls/cacerts.pem
index 18ab66b57c..b6db7cf2bb 100644
--- a/src/lib/libssl/src/demos/easy_tls/cacerts.pem
+++ b/src/lib/libssl/src/demos/easy_tls/cacerts.pem
@@ -1,4 +1,4 @@
1$Id: cacerts.pem,v 1.1.1.1 2002/09/05 12:51:05 markus Exp $ 1$Id: cacerts.pem,v 1.3 2002/09/10 16:31:56 markus Exp $
2 2
3issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit) 3issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
4subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit) 4subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
diff --git a/src/lib/libssl/src/demos/easy_tls/cert.pem b/src/lib/libssl/src/demos/easy_tls/cert.pem
index c984d023b7..3fcf302e2b 100644
--- a/src/lib/libssl/src/demos/easy_tls/cert.pem
+++ b/src/lib/libssl/src/demos/easy_tls/cert.pem
@@ -1,4 +1,4 @@
1$Id: cert.pem,v 1.1.1.1 2002/09/05 12:51:05 markus Exp $ 1$Id: cert.pem,v 1.3 2002/09/10 16:31:56 markus Exp $
2 2
3Example certificate and key. 3Example certificate and key.
4 4
diff --git a/src/lib/libssl/src/demos/easy_tls/easy-tls.c b/src/lib/libssl/src/demos/easy_tls/easy-tls.c
index 66fac1f1e6..c958f4b609 100644
--- a/src/lib/libssl/src/demos/easy_tls/easy-tls.c
+++ b/src/lib/libssl/src/demos/easy_tls/easy-tls.c
@@ -1,7 +1,7 @@
1/* -*- Mode: C; c-file-style: "bsd" -*- */ 1/* -*- Mode: C; c-file-style: "bsd" -*- */
2/* 2/*
3 * easy-tls.c -- generic TLS proxy. 3 * easy-tls.c -- generic TLS proxy.
4 * $Id: easy-tls.c,v 1.1.1.1 2002/09/05 12:51:06 markus Exp $ 4 * $Id: easy-tls.c,v 1.3 2002/09/10 16:31:56 markus Exp $
5 */ 5 */
6/* 6/*
7 (c) Copyright 1999 Bodo Moeller. All rights reserved. 7 (c) Copyright 1999 Bodo Moeller. All rights reserved.
@@ -73,7 +73,7 @@
73 */ 73 */
74 74
75static char const rcsid[] = 75static char const rcsid[] =
76"$Id: easy-tls.c,v 1.1.1.1 2002/09/05 12:51:06 markus Exp $"; 76"$Id: easy-tls.c,v 1.3 2002/09/10 16:31:56 markus Exp $";
77 77
78#include <assert.h> 78#include <assert.h>
79#include <errno.h> 79#include <errno.h>
diff --git a/src/lib/libssl/src/demos/easy_tls/easy-tls.h b/src/lib/libssl/src/demos/easy_tls/easy-tls.h
index c1a6448116..7ea26203c1 100644
--- a/src/lib/libssl/src/demos/easy_tls/easy-tls.h
+++ b/src/lib/libssl/src/demos/easy_tls/easy-tls.h
@@ -1,7 +1,7 @@
1/* -*- Mode: C; c-file-style: "bsd" -*- */ 1/* -*- Mode: C; c-file-style: "bsd" -*- */
2/* 2/*
3 * easy-tls.h -- generic TLS proxy. 3 * easy-tls.h -- generic TLS proxy.
4 * $Id: easy-tls.h,v 1.1.1.1 2002/09/05 12:51:06 markus Exp $ 4 * $Id: easy-tls.h,v 1.3 2002/09/10 16:31:56 markus Exp $
5 */ 5 */
6/* 6/*
7 * (c) Copyright 1999 Bodo Moeller. All rights reserved. 7 * (c) Copyright 1999 Bodo Moeller. All rights reserved.
diff --git a/src/lib/libssl/src/demos/easy_tls/test.c b/src/lib/libssl/src/demos/easy_tls/test.c
index e7ccd26d30..9b478c3fd8 100644
--- a/src/lib/libssl/src/demos/easy_tls/test.c
+++ b/src/lib/libssl/src/demos/easy_tls/test.c
@@ -1,5 +1,5 @@
1/* test.c */ 1/* test.c */
2/* $Id: test.c,v 1.1.1.1 2002/09/05 12:51:06 markus Exp $ */ 2/* $Id: test.c,v 1.3 2002/09/10 16:31:56 markus Exp $ */
3 3
4#define L_PORT 9999 4#define L_PORT 9999
5#define C_PORT 443 5#define C_PORT 443
diff --git a/src/lib/libssl/src/demos/easy_tls/test.h b/src/lib/libssl/src/demos/easy_tls/test.h
index 1af31dc456..b5792a0a81 100644
--- a/src/lib/libssl/src/demos/easy_tls/test.h
+++ b/src/lib/libssl/src/demos/easy_tls/test.h
@@ -1,5 +1,5 @@
1/* test.h */ 1/* test.h */
2/* $Id: test.h,v 1.1.1.1 2002/09/05 12:51:06 markus Exp $ */ 2/* $Id: test.h,v 1.3 2002/09/10 16:31:56 markus Exp $ */
3 3
4 4
5void test_process_init(int fd, int client_p, void *apparg); 5void test_process_init(int fd, int client_p, void *apparg);
diff --git a/src/lib/libssl/src/doc/apps/config.pod b/src/lib/libssl/src/doc/apps/config.pod
index 8f823fa6d6..ce874a42ce 100644
--- a/src/lib/libssl/src/doc/apps/config.pod
+++ b/src/lib/libssl/src/doc/apps/config.pod
@@ -10,8 +10,7 @@ config - OpenSSL CONF library configuration files
10The OpenSSL CONF library can be used to read configuration files. 10The OpenSSL CONF library can be used to read configuration files.
11It is used for the OpenSSL master configuration file B<openssl.cnf> 11It is used for the OpenSSL master configuration file B<openssl.cnf>
12and in a few other places like B<SPKAC> files and certificate extension 12and in a few other places like B<SPKAC> files and certificate extension
13files for the B<x509> utility. OpenSSL applications can also use the 13files for the B<x509> utility.
14CONF library for their own purposes.
15 14
16A configuration file is divided into a number of sections. Each section 15A configuration file is divided into a number of sections. Each section
17starts with a line B<[ section_name ]> and ends when a new section is 16starts with a line B<[ section_name ]> and ends when a new section is
@@ -52,146 +51,13 @@ or the B<\> character. By making the last character of a line a B<\>
52a B<value> string can be spread across multiple lines. In addition 51a B<value> string can be spread across multiple lines. In addition
53the sequences B<\n>, B<\r>, B<\b> and B<\t> are recognized. 52the sequences B<\n>, B<\r>, B<\b> and B<\t> are recognized.
54 53
55=head1 OPENSSL LIBRARY CONFIGURATION
56
57In OpenSSL 0.9.7 and later applications can automatically configure certain
58aspects of OpenSSL using the master OpenSSL configuration file, or optionally
59an alternative configuration file. The B<openssl> utility includes this
60functionality: any sub command uses the master OpenSSL configuration file
61unless an option is used in the sub command to use an alternative configuration
62file.
63
64To enable library configuration the default section needs to contain an
65appropriate line which points to the main configuration section. The default
66name is B<openssl_conf> which is used by the B<openssl> utility. Other
67applications may use an alternative name such as B<myapplicaton_conf>.
68
69The configuration section should consist of a set of name value pairs which
70contain specific module configuration information. The B<name> represents
71the name of the I<configuration module> the meaning of the B<value> is
72module specific: it may, for example, represent a further configuration
73section containing configuration module specific information. E.g.
74
75 openssl_conf = openssl_init
76
77 [openssl_init]
78
79 oid_section = new_oids
80 engines = engine_section
81
82 [new_oids]
83
84 ... new oids here ...
85
86 [engine_section]
87
88 ... engine stuff here ...
89
90Currently there are two configuration modules. One for ASN1 objects another
91for ENGINE configuration.
92
93=head2 ASN1 OBJECT CONFIGURATION MODULE
94
95This module has the name B<oid_section>. The value of this variable points
96to a section containing name value pairs of OIDs: the name is the OID short
97and long name, the value is the numerical form of the OID. Although some of
98the B<openssl> utility sub commands already have their own ASN1 OBJECT section
99functionality not all do. By using the ASN1 OBJECT configuration module
100B<all> the B<openssl> utility sub commands can see the new objects as well
101as any compliant applications. For example:
102
103 [new_oids]
104
105 some_new_oid = 1.2.3.4
106 some_other_oid = 1.2.3.5
107
108=head2 ENGINE CONFIGURATION MODULE
109
110This ENGINE configuration module has the name B<engines>. The value of this
111variable points to a section containing further ENGINE configuration
112information.
113
114The section pointed to by B<engines> is a table of engine names (though see
115B<engine_id> below) and further sections containing configuration informations
116specific to each ENGINE.
117
118Each ENGINE specific section is used to set default algorithms, load
119dynamic, perform initialization and send ctrls. The actual operation performed
120depends on the I<command> name which is the name of the name value pair. The
121currently supported commands are listed below.
122
123For example:
124
125 [engine_section]
126
127 # Configure ENGINE named "foo"
128 foo = foo_section
129 # Configure ENGINE named "bar"
130 bar = bar_section
131
132 [foo_section]
133 ... foo ENGINE specific commands ...
134
135 [bar_section]
136 ... "bar" ENGINE specific commands ...
137
138The command B<engine_id> is used to give the ENGINE name. If used this
139command must be first. For example:
140
141 [engine_section]
142 # This would normally handle an ENGINE named "foo"
143 foo = foo_section
144
145 [foo_section]
146 # Override default name and use "myfoo" instead.
147 engine_id = myfoo
148
149The command B<dynamic_path> loads and adds an ENGINE from the given path. It
150is equivalent to sending the ctrls B<SO_PATH> with the path argument followed
151by B<LIST_ADD> with value 2 and B<LOAD> to the dynamic ENGINE. If this is
152not the required behaviour then alternative ctrls can be sent directly
153to the dynamic ENGINE using ctrl commands.
154
155The command B<init> determines whether to initialize the ENGINE. If the value
156is B<0> the ENGINE will not be initialized, if B<1> and attempt it made to
157initialized the ENGINE immediately. If the B<init> command is not present
158then an attempt will be made to initialize the ENGINE after all commands in
159its section have been processed.
160
161The command B<default_algorithms> sets the default algorithms an ENGINE will
162supply using the functions B<ENGINE_set_default_string()>
163
164If the name matches none of the above command names it is assumed to be a
165ctrl command which is sent to the ENGINE. The value of the command is the
166argument to the ctrl command. If the value is the string B<EMPTY> then no
167value is sent to the command.
168
169For example:
170
171
172 [engine_section]
173
174 # Configure ENGINE named "foo"
175 foo = foo_section
176
177 [foo_section]
178 # Load engine from DSO
179 dynamic_path = /some/path/fooengine.so
180 # A foo specific ctrl.
181 some_ctrl = some_value
182 # Another ctrl that doesn't take a value.
183 other_ctrl = EMPTY
184 # Supply all default algorithms
185 default_algorithms = ALL
186
187=head1 NOTES 54=head1 NOTES
188 55
189If a configuration file attempts to expand a variable that doesn't exist 56If a configuration file attempts to expand a variable that doesn't exist
190then an error is flagged and the file will not load. This can happen 57then an error is flagged and the file will not load. This can happen
191if an attempt is made to expand an environment variable that doesn't 58if an attempt is made to expand an environment variable that doesn't
192exist. For example in a previous version of OpenSSL the default OpenSSL 59exist. For example the default OpenSSL master configuration file used
193master configuration file used the value of B<HOME> which may not be 60the value of B<HOME> which may not be defined on non Unix systems.
194defined on non Unix systems and would cause an error.
195 61
196This can be worked around by including a B<default> section to provide 62This can be worked around by including a B<default> section to provide
197a default value: then if the environment lookup fails the default value 63a default value: then if the environment lookup fails the default value
diff --git a/src/lib/libssl/src/doc/apps/openssl.pod b/src/lib/libssl/src/doc/apps/openssl.pod
index dc0f49ddca..07dd80eabe 100644
--- a/src/lib/libssl/src/doc/apps/openssl.pod
+++ b/src/lib/libssl/src/doc/apps/openssl.pod
@@ -329,8 +329,7 @@ L<passwd(1)|passwd(1)>,
329L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>, 329L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>,
330L<rand(1)|rand(1)>, L<req(1)|req(1)>, L<rsa(1)|rsa(1)>, 330L<rand(1)|rand(1)>, L<req(1)|req(1)>, L<rsa(1)|rsa(1)>,
331L<rsautl(1)|rsautl(1)>, L<s_client(1)|s_client(1)>, 331L<rsautl(1)|rsautl(1)>, L<s_client(1)|s_client(1)>,
332L<s_server(1)|s_server(1)>, L<s_time(1)|s_time(1)>, 332L<s_server(1)|s_server(1)>, L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>,
333L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>,
334L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>, 333L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>,
335L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)> 334L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)>
336 335
diff --git a/src/lib/libssl/src/doc/apps/s_client.pod b/src/lib/libssl/src/doc/apps/s_client.pod
index 8d19079973..d061326c1f 100644
--- a/src/lib/libssl/src/doc/apps/s_client.pod
+++ b/src/lib/libssl/src/doc/apps/s_client.pod
@@ -8,7 +8,7 @@ s_client - SSL/TLS client program
8=head1 SYNOPSIS 8=head1 SYNOPSIS
9 9
10B<openssl> B<s_client> 10B<openssl> B<s_client>
11[B<-connect host:port>] 11[B<-connect> host:port>]
12[B<-verify depth>] 12[B<-verify depth>]
13[B<-cert filename>] 13[B<-cert filename>]
14[B<-key filename>] 14[B<-key filename>]
@@ -208,7 +208,7 @@ then an HTTP command can be given such as "GET /" to retrieve a web page.
208 208
209If the handshake fails then there are several possible causes, if it is 209If the handshake fails then there are several possible causes, if it is
210nothing obvious like no client certificate then the B<-bugs>, B<-ssl2>, 210nothing obvious like no client certificate then the B<-bugs>, B<-ssl2>,
211B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1> options can be tried 211B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1> can be tried
212in case it is a buggy server. In particular you should play with these 212in case it is a buggy server. In particular you should play with these
213options B<before> submitting a bug report to an OpenSSL mailing list. 213options B<before> submitting a bug report to an OpenSSL mailing list.
214 214
@@ -219,7 +219,7 @@ the clients certificate authority in its "acceptable CA list" when it
219requests a certificate. By using B<s_client> the CA list can be viewed 219requests a certificate. By using B<s_client> the CA list can be viewed
220and checked. However some servers only request client authentication 220and checked. However some servers only request client authentication
221after a specific URL is requested. To obtain the list in this case it 221after a specific URL is requested. To obtain the list in this case it
222is necessary to use the B<-prexit> option and send an HTTP request 222is necessary to use the B<-prexit> command and send an HTTP request
223for an appropriate page. 223for an appropriate page.
224 224
225If a certificate is specified on the command line using the B<-cert> 225If a certificate is specified on the command line using the B<-cert>
diff --git a/src/lib/libssl/src/doc/apps/smime.pod b/src/lib/libssl/src/doc/apps/smime.pod
index 84b673f791..2453dd2738 100644
--- a/src/lib/libssl/src/doc/apps/smime.pod
+++ b/src/lib/libssl/src/doc/apps/smime.pod
@@ -17,9 +17,6 @@ B<openssl> B<smime>
17[B<-rc2-40>] 17[B<-rc2-40>]
18[B<-rc2-64>] 18[B<-rc2-64>]
19[B<-rc2-128>] 19[B<-rc2-128>]
20[B<-aes128>]
21[B<-aes192>]
22[B<-aes256>]
23[B<-in file>] 20[B<-in file>]
24[B<-certfile file>] 21[B<-certfile file>]
25[B<-signer file>] 22[B<-signer file>]
@@ -129,11 +126,11 @@ B<-verify>. This directory must be a standard certificate directory: that
129is a hash of each subject name (using B<x509 -hash>) should be linked 126is a hash of each subject name (using B<x509 -hash>) should be linked
130to each certificate. 127to each certificate.
131 128
132=item B<-des -des3 -rc2-40 -rc2-64 -rc2-128 -aes128 -aes192 -aes256> 129=item B<-des -des3 -rc2-40 -rc2-64 -rc2-128>
133 130
134the encryption algorithm to use. DES (56 bits), triple DES (168 bits), 131the encryption algorithm to use. DES (56 bits), triple DES (168 bits)
13540, 64 or 128 bit RC2 or 128, 192 or 256 bit AES respectively. If not 132or 40, 64 or 128 bit RC2 respectively if not specified 40 bit RC2 is
136specified 40 bit RC2 is used. Only used with B<-encrypt>. 133used. Only used with B<-encrypt>.
137 134
138=item B<-nointern> 135=item B<-nointern>
139 136
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod b/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod
index f0b731731f..a56ee2b92f 100644
--- a/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod
+++ b/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod
@@ -287,8 +287,8 @@ a client and also echoes the request to standard output.
287 return 0; 287 return 0;
288 } 288 }
289 289
290 BIO_puts(sbio, "HTTP/1.0 200 OK\r\nContent-type: text/plain\r\n\r\n"); 290 BIO_puts(sbio, "HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n");
291 BIO_puts(sbio, "\r\nConnection Established\r\nRequest headers:\r\n"); 291 BIO_puts(sbio, "<pre>\r\nConnection Established\r\nRequest headers:\r\n");
292 BIO_puts(sbio, "--------------------------------------------------\r\n"); 292 BIO_puts(sbio, "--------------------------------------------------\r\n");
293 293
294 for(;;) { 294 for(;;) {
@@ -301,7 +301,7 @@ a client and also echoes the request to standard output.
301 } 301 }
302 302
303 BIO_puts(sbio, "--------------------------------------------------\r\n"); 303 BIO_puts(sbio, "--------------------------------------------------\r\n");
304 BIO_puts(sbio, "\r\n"); 304 BIO_puts(sbio, "</pre>\r\n");
305 305
306 /* Since there is a buffering BIO present we had better flush it */ 306 /* Since there is a buffering BIO present we had better flush it */
307 BIO_flush(sbio); 307 BIO_flush(sbio);
diff --git a/src/lib/libssl/src/doc/crypto/EVP_BytesToKey.pod b/src/lib/libssl/src/doc/crypto/EVP_BytesToKey.pod
index 016381f3e9..5ce4add082 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_BytesToKey.pod
+++ b/src/lib/libssl/src/doc/crypto/EVP_BytesToKey.pod
@@ -2,7 +2,7 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5EVP_BytesToKey - password based encryption routine 5 EVP_BytesToKey - password based encryption routine
6 6
7=head1 SYNOPSIS 7=head1 SYNOPSIS
8 8
diff --git a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod
index 1cb315e739..58afd8f0b8 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod
+++ b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod
@@ -4,7 +4,7 @@
4 4
5EVP_MD_CTX_init, EVP_MD_CTX_create, EVP_DigestInit_ex, EVP_DigestUpdate, 5EVP_MD_CTX_init, EVP_MD_CTX_create, EVP_DigestInit_ex, EVP_DigestUpdate,
6EVP_DigestFinal_ex, EVP_MD_CTX_cleanup, EVP_MD_CTX_destroy, EVP_MAX_MD_SIZE, 6EVP_DigestFinal_ex, EVP_MD_CTX_cleanup, EVP_MD_CTX_destroy, EVP_MAX_MD_SIZE,
7EVP_MD_CTX_copy_ex, EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, 7EVP_MD_CTX_copy_ex EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size,
8EVP_MD_block_size, EVP_MD_CTX_md, EVP_MD_CTX_size, EVP_MD_CTX_block_size, EVP_MD_CTX_type, 8EVP_MD_block_size, EVP_MD_CTX_md, EVP_MD_CTX_size, EVP_MD_CTX_block_size, EVP_MD_CTX_type,
9EVP_md_null, EVP_md2, EVP_md5, EVP_sha, EVP_sha1, EVP_dss, EVP_dss1, EVP_mdc2, 9EVP_md_null, EVP_md2, EVP_md5, EVP_sha, EVP_sha1, EVP_dss, EVP_dss1, EVP_mdc2,
10EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, EVP_get_digestbyobj - 10EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, EVP_get_digestbyobj -
@@ -236,9 +236,9 @@ even though they are identical digests.
236 236
237=head1 SEE ALSO 237=head1 SEE ALSO
238 238
239L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, 239L<evp(3)|evp(3)>, L<HMAC(3)|HMAC(3)>, L<MD2(3)|MD2(3)>,
240L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, 240L<MD5(3)|MD5(3)>, L<MDC2(3)|MDC2(3)>, L<RIPEMD160(3)|RIPEMD160(3)>,
241L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> 241L<SHA1(3)|SHA1(3)>
242 242
243=head1 HISTORY 243=head1 HISTORY
244 244
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod
index b203c3a1c5..e65e54ce52 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod
+++ b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod
@@ -81,10 +81,10 @@ EVP_SignUpdate() could not be made after calling EVP_SignFinal().
81=head1 SEE ALSO 81=head1 SEE ALSO
82 82
83L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, 83L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>,
84L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, 84L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<ERR_get_error(3)|ERR_get_error(3)>,
85L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, 85L<evp(3)|evp(3)>, L<HMAC(3)|HMAC(3)>, L<MD2(3)|MD2(3)>,
86L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, 86L<MD5(3)|MD5(3)>, L<MDC2(3)|MDC2(3)>, L<RIPEMD(3)|RIPEMD(3)>,
87L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> 87L<SHA1(3)|SHA1(3)>, L<digest(1)|digest(1)>
88 88
89=head1 HISTORY 89=head1 HISTORY
90 90
diff --git a/src/lib/libssl/src/doc/crypto/acss.pod b/src/lib/libssl/src/doc/crypto/acss.pod
new file mode 100644
index 0000000000..022a803be5
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/acss.pod
@@ -0,0 +1,66 @@
1=pod
2
3=head1 NAME
4
5acss, acss_setkey - ACSS encryption
6
7=head1 SYNOPSIS
8
9 #include <openssl/acss.h>
10
11 void acss_setkey(ACSS_KEY *key, const unsigned char *data, int enc,
12 int mode);
13
14 void acss(ACSS_KEY *key, unsigned long len, const unsigned char *in,
15 unsigned char *out);
16
17=head1 DESCRIPTION
18
19This library implements the Alleged Content Scrambling System. It is believed
20to be interoperable with CSS of the DVD Copy Control Association.
21
22ACSS is a stream cipher with a fixed key length of 40 bit (5 byte).
23
24ACSS consists of a key setup phase and the actual encryption or decryption
25phase.
26
27acss_setkey() sets up the B<ACSS_KEY> B<key> using the 40 bit key at B<data>.
28If the flag B<enc> is set to B<1> B<key> will be used for encryption,
29otherwise for decryption. The integer B<mode> denotes the mode to use.
30Acceptible values are B<0> to B<3>. For any other value mode B<0> is used.
31
32acss() encrypts or decrypts the B<len> bytes of B<in> using B<key> and places
33the result at B<out>.
34
35Applications should use the higher level functions
36L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> etc. instead of calling the acss
37functions directly.
38
39=head1 RETURN VALUES
40
41None of the functions presented here return any value.
42
43=head1 NOTE
44
45ACSS is considered as an insecure cipher. Therefore, use of ACSS is
46discouraged.
47
48=head1 SEE ALSO
49
50RC4(3), arc4random(3)
51
52=head1 History
53
54A proprietary algorithm called CSS can be licensed from the DVD Copy Control
55Association (DVD CCA). CSS is considered a trade secret and is not patented.
56In October 1999 source code for CSS was posted anonymously to the LiViD
57mailing list. Since then, several implementations and mathematical
58descriptions of CSS are available and CSS has been subject to cryptanalysis.
59The DVD CCA has repeatedly failed to sue individuals for publishing such
60information about CSS.
61
62ACSS is a stream cipher written from scratch and believed to be interoperable
63with CSS.
64
65=cut
66
diff --git a/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod b/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod
index 279b29c873..7c71bcbf3d 100644
--- a/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod
+++ b/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod
@@ -9,7 +9,6 @@ d2i_Netscape_RSA - RSA public and private key encoding functions.
9=head1 SYNOPSIS 9=head1 SYNOPSIS
10 10
11 #include <openssl/rsa.h> 11 #include <openssl/rsa.h>
12 #include <openssl/x509.h>
13 12
14 RSA * d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length); 13 RSA * d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length);
15 14
@@ -32,8 +31,8 @@ d2i_Netscape_RSA - RSA public and private key encoding functions.
32d2i_RSAPublicKey() and i2d_RSAPublicKey() decode and encode a PKCS#1 RSAPublicKey 31d2i_RSAPublicKey() and i2d_RSAPublicKey() decode and encode a PKCS#1 RSAPublicKey
33structure. 32structure.
34 33
35d2i_RSA_PUBKEY() and i2d_RSA_PUBKEY() decode and encode an RSA public key using 34d2i_RSA_PUKEY() and i2d_RSA_PUKEY() decode and encode an RSA public key using a
36a SubjectPublicKeyInfo (certificate public key) structure. 35SubjectPublicKeyInfo (certificate public key) structure.
37 36
38d2i_RSAPrivateKey(), i2d_RSAPrivateKey() decode and encode a PKCS#1 RSAPrivateKey 37d2i_RSAPrivateKey(), i2d_RSAPrivateKey() decode and encode a PKCS#1 RSAPrivateKey
39structure. 38structure.
diff --git a/src/lib/libssl/src/doc/crypto/des.pod b/src/lib/libssl/src/doc/crypto/des.pod
index 6f0cf1cc5e..528c73acac 100644
--- a/src/lib/libssl/src/doc/crypto/des.pod
+++ b/src/lib/libssl/src/doc/crypto/des.pod
@@ -283,7 +283,7 @@ DES_cbc_encrypt is used.
283=head1 NOTES 283=head1 NOTES
284 284
285Single-key DES is insecure due to its short key size. ECB mode is 285Single-key DES is insecure due to its short key size. ECB mode is
286not suitable for most applications; see L<des_modes(7)|des_modes(7)>. 286not suitable for most applications; see L<DES_modes(7)|DES_modes(7)>.
287 287
288The L<evp(3)|evp(3)> library provides higher-level encryption functions. 288The L<evp(3)|evp(3)> library provides higher-level encryption functions.
289 289
diff --git a/src/lib/libssl/src/doc/crypto/des_modes.pod b/src/lib/libssl/src/doc/crypto/des_modes.pod
index da75e8007d..0cc22150e7 100644
--- a/src/lib/libssl/src/doc/crypto/des_modes.pod
+++ b/src/lib/libssl/src/doc/crypto/des_modes.pod
@@ -2,7 +2,7 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5Modes of DES - the variants of DES and other crypto algorithms of OpenSSL 5des_modes - the variants of DES and other crypto algorithms of OpenSSL
6 6
7=head1 DESCRIPTION 7=head1 DESCRIPTION
8 8
@@ -246,8 +246,7 @@ it to:
246 246
247=head1 SEE ALSO 247=head1 SEE ALSO
248 248
249L<blowfish(3)|blowfish(3)>, L<des(3)|des(3)>, L<idea(3)|idea(3)>, 249L<blowfish(3)|blowfish(3)>
250L<rc2(3)|rc2(3)>
251 250
252=cut 251=cut
253 252
diff --git a/src/lib/libssl/src/doc/crypto/dsa.pod b/src/lib/libssl/src/doc/crypto/dsa.pod
index da07d2b930..ae2e5d81f9 100644
--- a/src/lib/libssl/src/doc/crypto/dsa.pod
+++ b/src/lib/libssl/src/doc/crypto/dsa.pod
@@ -101,8 +101,7 @@ Standard, DSS), ANSI X9.30
101=head1 SEE ALSO 101=head1 SEE ALSO
102 102
103L<bn(3)|bn(3)>, L<dh(3)|dh(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, 103L<bn(3)|bn(3)>, L<dh(3)|dh(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>,
104L<rsa(3)|rsa(3)>, L<sha(3)|sha(3)>, L<engine(3)|engine(3)>, 104L<rsa(3)|rsa(3)>, L<SHA1(3)|SHA1(3)>, L<DSA_new(3)|DSA_new(3)>,
105L<DSA_new(3)|DSA_new(3)>,
106L<DSA_size(3)|DSA_size(3)>, 105L<DSA_size(3)|DSA_size(3)>,
107L<DSA_generate_parameters(3)|DSA_generate_parameters(3)>, 106L<DSA_generate_parameters(3)|DSA_generate_parameters(3)>,
108L<DSA_dup_DH(3)|DSA_dup_DH(3)>, 107L<DSA_dup_DH(3)|DSA_dup_DH(3)>,
diff --git a/src/lib/libssl/src/doc/crypto/hmac.pod b/src/lib/libssl/src/doc/crypto/hmac.pod
index 3976baf226..b1f5f368ed 100644
--- a/src/lib/libssl/src/doc/crypto/hmac.pod
+++ b/src/lib/libssl/src/doc/crypto/hmac.pod
@@ -89,7 +89,7 @@ RFC 2104
89 89
90=head1 SEE ALSO 90=head1 SEE ALSO
91 91
92L<sha(3)|sha(3)>, L<evp(3)|evp(3)> 92L<SHA1(3)|SHA1(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>
93 93
94=head1 HISTORY 94=head1 HISTORY
95 95
diff --git a/src/lib/libssl/src/doc/crypto/mdc2.pod b/src/lib/libssl/src/doc/crypto/mdc2.pod
index 11dc303e04..538f474e30 100644
--- a/src/lib/libssl/src/doc/crypto/mdc2.pod
+++ b/src/lib/libssl/src/doc/crypto/mdc2.pod
@@ -54,7 +54,7 @@ ISO/IEC 10118-2, with DES
54 54
55=head1 SEE ALSO 55=head1 SEE ALSO
56 56
57L<sha(3)|sha(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)> 57L<SHA1(3)|SHA1(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>
58 58
59=head1 HISTORY 59=head1 HISTORY
60 60
diff --git a/src/lib/libssl/src/doc/crypto/pem.pod b/src/lib/libssl/src/doc/crypto/pem.pod
index 8613114452..a4f8cc3337 100644
--- a/src/lib/libssl/src/doc/crypto/pem.pod
+++ b/src/lib/libssl/src/doc/crypto/pem.pod
@@ -330,7 +330,7 @@ most of them are set to 0 or NULL.
330Read a certificate in PEM format from a BIO: 330Read a certificate in PEM format from a BIO:
331 331
332 X509 *x; 332 X509 *x;
333 x = PEM_read_bio_X509(bp, NULL, 0, NULL); 333 x = PEM_read_bio(bp, NULL, 0, NULL);
334 if (x == NULL) 334 if (x == NULL)
335 { 335 {
336 /* Error */ 336 /* Error */
@@ -459,12 +459,12 @@ returned by EVP_bytestokey().
459The PEM read routines in some versions of OpenSSL will not correctly reuse 459The PEM read routines in some versions of OpenSSL will not correctly reuse
460an existing structure. Therefore the following: 460an existing structure. Therefore the following:
461 461
462 PEM_read_bio_X509(bp, &x, 0, NULL); 462 PEM_read_bio(bp, &x, 0, NULL);
463 463
464where B<x> already contains a valid certificate, may not work, whereas: 464where B<x> already contains a valid certificate, may not work, whereas:
465 465
466 X509_free(x); 466 X509_free(x);
467 x = PEM_read_bio_X509(bp, NULL, 0, NULL); 467 x = PEM_read_bio(bp, NULL, 0, NULL);
468 468
469is guaranteed to work. 469is guaranteed to work.
470 470
diff --git a/src/lib/libssl/src/doc/crypto/ripemd.pod b/src/lib/libssl/src/doc/crypto/ripemd.pod
index 31054b6a8c..9a634ca866 100644
--- a/src/lib/libssl/src/doc/crypto/ripemd.pod
+++ b/src/lib/libssl/src/doc/crypto/ripemd.pod
@@ -56,7 +56,7 @@ ISO/IEC 10118-3 (draft) (??)
56 56
57=head1 SEE ALSO 57=head1 SEE ALSO
58 58
59L<sha(3)|sha(3)>, L<hmac(3)|hmac(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)> 59L<SHA1(3)|SHA1(3)>, L<HMAC(3)|HMAC(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>
60 60
61=head1 HISTORY 61=head1 HISTORY
62 62
diff --git a/src/lib/libssl/src/doc/crypto/sha.pod b/src/lib/libssl/src/doc/crypto/sha.pod
index 0ba315d6d7..158457270f 100644
--- a/src/lib/libssl/src/doc/crypto/sha.pod
+++ b/src/lib/libssl/src/doc/crypto/sha.pod
@@ -60,7 +60,7 @@ ANSI X9.30
60 60
61=head1 SEE ALSO 61=head1 SEE ALSO
62 62
63L<ripemd(3)|ripemd(3)>, L<hmac(3)|hmac(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)> 63L<RIPEMD160(3)|RIPEMD160(3)>, L<HMAC(3)|HMAC(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>
64 64
65=head1 HISTORY 65=head1 HISTORY
66 66
diff --git a/src/lib/libssl/src/doc/crypto/ui.pod b/src/lib/libssl/src/doc/crypto/ui.pod
index 6df68d604a..2b3535a746 100644
--- a/src/lib/libssl/src/doc/crypto/ui.pod
+++ b/src/lib/libssl/src/doc/crypto/ui.pod
@@ -5,7 +5,7 @@
5UI_new, UI_new_method, UI_free, UI_add_input_string, UI_dup_input_string, 5UI_new, UI_new_method, UI_free, UI_add_input_string, UI_dup_input_string,
6UI_add_verify_string, UI_dup_verify_string, UI_add_input_boolean, 6UI_add_verify_string, UI_dup_verify_string, UI_add_input_boolean,
7UI_dup_input_boolean, UI_add_info_string, UI_dup_info_string, 7UI_dup_input_boolean, UI_add_info_string, UI_dup_info_string,
8UI_add_error_string, UI_dup_error_string, UI_construct_prompt, 8UI_add_error_string, UI_dup_error_string, UI_construct_prompt
9UI_add_user_data, UI_get0_user_data, UI_get0_result, UI_process, 9UI_add_user_data, UI_get0_user_data, UI_get0_result, UI_process,
10UI_ctrl, UI_set_default_method, UI_get_default_method, UI_get_method, 10UI_ctrl, UI_set_default_method, UI_get_default_method, UI_get_method,
11UI_set_method, UI_OpenSSL, ERR_load_UI_strings - New User Interface 11UI_set_method, UI_OpenSSL, ERR_load_UI_strings - New User Interface
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
index 4b91c63ba0..914eb7c9e3 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod
@@ -28,7 +28,7 @@ SSL_CIPHER_get_version() returns the protocol version for B<cipher>, currently
28 28
29SSL_CIPHER_description() returns a textual description of the cipher used 29SSL_CIPHER_description() returns a textual description of the cipher used
30into the buffer B<buf> of length B<len> provided. B<len> must be at least 30into the buffer B<buf> of length B<len> provided. B<len> must be at least
31128 bytes, otherwise a pointer to the the string "Buffer too small" is 31128 bytes, otherwise a pointer to the string "Buffer too small" is
32returned. If B<buf> is NULL, a buffer of 128 bytes is allocated using 32returned. If B<buf> is NULL, a buffer of 128 bytes is allocated using
33OPENSSL_malloc(). If the allocation fails, a pointer to the string 33OPENSSL_malloc(). If the allocation fails, a pointer to the string
34"OPENSSL_malloc Error" is returned. 34"OPENSSL_malloc Error" is returned.
diff --git a/src/lib/libssl/src/doc/ssl/SSL_COMP_add_compression_method.pod b/src/lib/libssl/src/doc/ssl/SSL_COMP_add_compression_method.pod
index 42fa66b197..2a98739114 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_COMP_add_compression_method.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_COMP_add_compression_method.pod
@@ -53,11 +53,11 @@ SSL_COMP_add_compression_method() may return the following values:
53 53
54=over 4 54=over 4
55 55
56=item 0 56=item 1
57 57
58The operation succeeded. 58The operation succeeded.
59 59
60=item 1 60=item 0
61 61
62The operation failed. Check the error queue to find out the reason. 62The operation failed. Check the error queue to find out the reason.
63 63
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod
index ca8d81b82c..81566839d3 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod
@@ -28,7 +28,7 @@ specifies the B<verify_callback> function to be used. If no callback function
28shall be specified, the NULL pointer can be used for B<verify_callback>. In 28shall be specified, the NULL pointer can be used for B<verify_callback>. In
29this case last B<verify_callback> set specifically for this B<ssl> remains. If 29this case last B<verify_callback> set specifically for this B<ssl> remains. If
30no special B<callback> was set before, the default callback for the underlying 30no special B<callback> was set before, the default callback for the underlying
31B<ctx> is used, that was valid at the the time B<ssl> was created with 31B<ctx> is used, that was valid at the time B<ssl> was created with
32L<SSL_new(3)|SSL_new(3)>. 32L<SSL_new(3)|SSL_new(3)>.
33 33
34SSL_CTX_set_verify_depth() sets the maximum B<depth> for the certificate chain 34SSL_CTX_set_verify_depth() sets the maximum B<depth> for the certificate chain
diff --git a/src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod b/src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod
index 558de01df9..110ec73ab6 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod
@@ -14,7 +14,7 @@ SSL_SESSION_free - free an allocated SSL_SESSION structure
14 14
15SSL_SESSION_free() decrements the reference count of B<session> and removes 15SSL_SESSION_free() decrements the reference count of B<session> and removes
16the B<SSL_SESSION> structure pointed to by B<session> and frees up the allocated 16the B<SSL_SESSION> structure pointed to by B<session> and frees up the allocated
17memory, if the the reference count has reached 0. 17memory, if the reference count has reached 0.
18 18
19=head1 NOTES 19=head1 NOTES
20 20
diff --git a/src/lib/libssl/src/doc/ssl/SSL_free.pod b/src/lib/libssl/src/doc/ssl/SSL_free.pod
index 2d4f8b6168..13c1abd9ec 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_free.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_free.pod
@@ -14,7 +14,7 @@ SSL_free - free an allocated SSL structure
14 14
15SSL_free() decrements the reference count of B<ssl>, and removes the SSL 15SSL_free() decrements the reference count of B<ssl>, and removes the SSL
16structure pointed to by B<ssl> and frees up the allocated memory if the 16structure pointed to by B<ssl> and frees up the allocated memory if the
17the reference count has reached 0. 17reference count has reached 0.
18 18
19=head1 NOTES 19=head1 NOTES
20 20
diff --git a/src/lib/libssl/src/doc/ssl/ssl.pod b/src/lib/libssl/src/doc/ssl/ssl.pod
index 3dc5358ef6..4d7a6b7e2b 100644
--- a/src/lib/libssl/src/doc/ssl/ssl.pod
+++ b/src/lib/libssl/src/doc/ssl/ssl.pod
@@ -3,7 +3,7 @@
3 3
4=head1 NAME 4=head1 NAME
5 5
6SSL - OpenSSL SSL/TLS library 6ssl - OpenSSL SSL/TLS library
7 7
8=head1 SYNOPSIS 8=head1 SYNOPSIS
9 9
diff --git a/src/lib/libssl/src/doc/ssleay.txt b/src/lib/libssl/src/doc/ssleay.txt
index d44d2f04a0..d19da310eb 100644
--- a/src/lib/libssl/src/doc/ssleay.txt
+++ b/src/lib/libssl/src/doc/ssleay.txt
@@ -6245,7 +6245,7 @@ SSL_get_app_data
6245void SSL_CTX_set_default_verify 6245void SSL_CTX_set_default_verify
6246 6246
6247/* This callback, if set, totaly overrides the normal SSLeay verification 6247/* This callback, if set, totaly overrides the normal SSLeay verification
6248 * functions and should return 1 on success and 0 on failure */ 6248 * functions and should return 1 on successs and 0 on failure */
6249void SSL_CTX_set_cert_verify_callback 6249void SSL_CTX_set_cert_verify_callback
6250 6250
6251/* The following are the same as the equivilent SSL_xxx functions. 6251/* The following are the same as the equivilent SSL_xxx functions.
diff --git a/src/lib/libssl/src/openssl.spec b/src/lib/libssl/src/openssl.spec
index 6a272f6969..9ce236e0d2 100644
--- a/src/lib/libssl/src/openssl.spec
+++ b/src/lib/libssl/src/openssl.spec
@@ -1,7 +1,7 @@
1%define libmaj 0 1%define libmaj 0
2%define libmin 9 2%define libmin 9
3%define librel 7 3%define librel 7
4%define librev d 4%define librev c
5Release: 1 5Release: 1
6 6
7%define openssldir /var/ssl 7%define openssldir /var/ssl
diff --git a/src/lib/libssl/src/os2/OS2-EMX.cmd b/src/lib/libssl/src/os2/OS2-EMX.cmd
index 5924b50b6d..acab99ac39 100644
--- a/src/lib/libssl/src/os2/OS2-EMX.cmd
+++ b/src/lib/libssl/src/os2/OS2-EMX.cmd
@@ -64,39 +64,3 @@ echo RC5\32
64cd crypto\rc5\asm 64cd crypto\rc5\asm
65perl rc5-586.pl a.out > r5-os2.asm 65perl rc5-586.pl a.out > r5-os2.asm
66cd ..\..\.. 66cd ..\..\..
67
68cd os2
69
70if exist noname\backward_ssl.def goto nomkdir
71mkdir noname
72:nomkdir
73
74perl backwardify.pl crypto.def >backward_crypto.def
75perl backwardify.pl ssl.def >backward_ssl.def
76perl backwardify.pl -noname crypto.def >noname\backward_crypto.def
77perl backwardify.pl -noname ssl.def >noname\backward_ssl.def
78
79echo Creating backward compatibility forwarder dlls:
80echo crypto.dll
81gcc -Zomf -Zdll -Zcrtdll -o crypto.dll backward_crypto.def 2>&1 | grep -v L4085
82echo ssl.dll
83gcc -Zomf -Zdll -Zcrtdll -o ssl.dll backward_ssl.def 2>&1 | grep -v L4085
84
85echo Creating smaller backward compatibility forwarder dlls:
86echo These DLLs are not good for runtime resolution of symbols.
87echo noname\crypto.dll
88gcc -Zomf -Zdll -Zcrtdll -o noname/crypto.dll noname/backward_crypto.def 2>&1 | grep -v L4085
89echo noname\ssl.dll
90gcc -Zomf -Zdll -Zcrtdll -o noname/ssl.dll noname/backward_ssl.def 2>&1 | grep -v L4085
91
92echo Compressing forwarders (it is ok if lxlite is not found):
93lxlite *.dll noname/*.dll
94
95cd ..
96
97echo Now run:
98echo For static build:
99echo make -f OS2-EMX.mak
100echo For dynamic build:
101echo make -f OS2-EMX-DLL.mak
102echo then rename crypto.dll to cryptssl.dll, ssl.dll to open_ssl.dll
diff --git a/src/lib/libssl/src/ssl/Makefile.ssl b/src/lib/libssl/src/ssl/Makefile.ssl
new file mode 100644
index 0000000000..e48b5cedfb
--- /dev/null
+++ b/src/lib/libssl/src/ssl/Makefile.ssl
@@ -0,0 +1,1024 @@
1#
2# SSLeay/ssl/Makefile
3#
4
5DIR= ssl
6TOP= ..
7CC= cc
8INCLUDES= -I../crypto -I$(TOP) -I../include $(KRB5_INCLUDES)
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18# KRB5 stuff
19KRB5_INCLUDES=
20
21CFLAGS= $(INCLUDES) $(CFLAG)
22
23GENERAL=Makefile README ssl-lib.com install.com
24TEST=ssltest.c
25APPS=
26
27LIB=$(TOP)/libssl.a
28SHARED_LIB= libssl$(SHLIB_EXT)
29LIBSRC= \
30 s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c \
31 s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c \
32 s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c \
33 t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c \
34 ssl_lib.c ssl_err2.c ssl_cert.c ssl_sess.c \
35 ssl_ciph.c ssl_stat.c ssl_rsa.c \
36 ssl_asn1.c ssl_txt.c ssl_algs.c \
37 bio_ssl.c ssl_err.c kssl.c
38LIBOBJ= \
39 s2_meth.o s2_srvr.o s2_clnt.o s2_lib.o s2_enc.o s2_pkt.o \
40 s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o s3_pkt.o s3_both.o \
41 s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o s23_pkt.o \
42 t1_meth.o t1_srvr.o t1_clnt.o t1_lib.o t1_enc.o \
43 ssl_lib.o ssl_err2.o ssl_cert.o ssl_sess.o \
44 ssl_ciph.o ssl_stat.o ssl_rsa.o \
45 ssl_asn1.o ssl_txt.o ssl_algs.o \
46 bio_ssl.o ssl_err.o kssl.o
47
48SRC= $(LIBSRC)
49
50EXHEADER= ssl.h ssl2.h ssl3.h ssl23.h tls1.h kssl.h
51HEADER= $(EXHEADER) ssl_locl.h kssl_lcl.h
52
53ALL= $(GENERAL) $(SRC) $(HEADER)
54
55top:
56 (cd ..; $(MAKE) DIRS=$(DIR) all)
57
58all: lib shared
59
60lib: $(LIBOBJ)
61 $(AR) $(LIB) $(LIBOBJ)
62 $(RANLIB) $(LIB) || echo Never mind.
63 @touch lib
64
65shared:
66 if [ -n "$(SHARED_LIBS)" ]; then \
67 (cd ..; $(MAKE) $(SHARED_LIB)); \
68 fi
69
70files:
71 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
72
73links:
74 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
75 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
76 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
77 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
78
79install:
80 @for i in $(EXHEADER) ; \
81 do \
82 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
83 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
84 done;
85
86tags:
87 ctags $(SRC)
88
89tests:
90
91lint:
92 lint -DLINT $(INCLUDES) $(SRC)>fluff
93
94depend:
95 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
96
97dclean:
98 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
99 mv -f Makefile.new $(MAKEFILE)
100
101clean:
102 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
103
104# DO NOT DELETE THIS LINE -- make depend depends on it.
105
106bio_ssl.o: ../include/openssl/aes.h ../include/openssl/asn1.h
107bio_ssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
108bio_ssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
109bio_ssl.o: ../include/openssl/cast.h ../include/openssl/comp.h
110bio_ssl.o: ../include/openssl/crypto.h ../include/openssl/des.h
111bio_ssl.o: ../include/openssl/des_old.h ../include/openssl/dh.h
112bio_ssl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
113bio_ssl.o: ../include/openssl/err.h ../include/openssl/evp.h
114bio_ssl.o: ../include/openssl/idea.h ../include/openssl/kssl.h
115bio_ssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
116bio_ssl.o: ../include/openssl/md4.h ../include/openssl/md5.h
117bio_ssl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
118bio_ssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
119bio_ssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
120bio_ssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
121bio_ssl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
122bio_ssl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
123bio_ssl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
124bio_ssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
125bio_ssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
126bio_ssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
127bio_ssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
128bio_ssl.o: ../include/openssl/tls1.h ../include/openssl/ui.h
129bio_ssl.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
130bio_ssl.o: ../include/openssl/x509_vfy.h bio_ssl.c
131kssl.o: ../include/openssl/aes.h ../include/openssl/asn1.h
132kssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
133kssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
134kssl.o: ../include/openssl/cast.h ../include/openssl/comp.h
135kssl.o: ../include/openssl/crypto.h ../include/openssl/des.h
136kssl.o: ../include/openssl/des_old.h ../include/openssl/dh.h
137kssl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
138kssl.o: ../include/openssl/evp.h ../include/openssl/idea.h
139kssl.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h
140kssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
141kssl.o: ../include/openssl/md4.h ../include/openssl/md5.h
142kssl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
143kssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
144kssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
145kssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
146kssl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
147kssl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
148kssl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
149kssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
150kssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
151kssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
152kssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
153kssl.o: ../include/openssl/tls1.h ../include/openssl/ui.h
154kssl.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
155kssl.o: ../include/openssl/x509_vfy.h kssl.c
156s23_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
157s23_clnt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
158s23_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
159s23_clnt.o: ../include/openssl/cast.h ../include/openssl/comp.h
160s23_clnt.o: ../include/openssl/crypto.h ../include/openssl/des.h
161s23_clnt.o: ../include/openssl/des_old.h ../include/openssl/dh.h
162s23_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
163s23_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
164s23_clnt.o: ../include/openssl/idea.h ../include/openssl/kssl.h
165s23_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h
166s23_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h
167s23_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
168s23_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
169s23_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
170s23_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
171s23_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
172s23_clnt.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
173s23_clnt.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
174s23_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
175s23_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
176s23_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
177s23_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
178s23_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
179s23_clnt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
180s23_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_clnt.c
181s23_clnt.o: ssl_locl.h
182s23_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
183s23_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
184s23_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
185s23_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h
186s23_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h
187s23_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h
188s23_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
189s23_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
190s23_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h
191s23_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h
192s23_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h
193s23_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
194s23_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
195s23_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
196s23_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
197s23_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
198s23_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
199s23_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
200s23_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
201s23_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
202s23_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
203s23_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
204s23_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h
205s23_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
206s23_lib.o: ../include/openssl/x509_vfy.h s23_lib.c ssl_locl.h
207s23_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
208s23_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
209s23_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
210s23_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h
211s23_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h
212s23_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h
213s23_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
214s23_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
215s23_meth.o: ../include/openssl/idea.h ../include/openssl/kssl.h
216s23_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h
217s23_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h
218s23_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
219s23_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
220s23_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
221s23_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
222s23_meth.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
223s23_meth.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
224s23_meth.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
225s23_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
226s23_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
227s23_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
228s23_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
229s23_meth.o: ../include/openssl/tls1.h ../include/openssl/ui.h
230s23_meth.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
231s23_meth.o: ../include/openssl/x509_vfy.h s23_meth.c ssl_locl.h
232s23_pkt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
233s23_pkt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
234s23_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
235s23_pkt.o: ../include/openssl/cast.h ../include/openssl/comp.h
236s23_pkt.o: ../include/openssl/crypto.h ../include/openssl/des.h
237s23_pkt.o: ../include/openssl/des_old.h ../include/openssl/dh.h
238s23_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
239s23_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
240s23_pkt.o: ../include/openssl/idea.h ../include/openssl/kssl.h
241s23_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h
242s23_pkt.o: ../include/openssl/md4.h ../include/openssl/md5.h
243s23_pkt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
244s23_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
245s23_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
246s23_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
247s23_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
248s23_pkt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
249s23_pkt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
250s23_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
251s23_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
252s23_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
253s23_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
254s23_pkt.o: ../include/openssl/tls1.h ../include/openssl/ui.h
255s23_pkt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
256s23_pkt.o: ../include/openssl/x509_vfy.h s23_pkt.c ssl_locl.h
257s23_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
258s23_srvr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
259s23_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
260s23_srvr.o: ../include/openssl/cast.h ../include/openssl/comp.h
261s23_srvr.o: ../include/openssl/crypto.h ../include/openssl/des.h
262s23_srvr.o: ../include/openssl/des_old.h ../include/openssl/dh.h
263s23_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
264s23_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
265s23_srvr.o: ../include/openssl/idea.h ../include/openssl/kssl.h
266s23_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h
267s23_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h
268s23_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
269s23_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
270s23_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
271s23_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
272s23_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
273s23_srvr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
274s23_srvr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
275s23_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
276s23_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
277s23_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
278s23_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
279s23_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
280s23_srvr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
281s23_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_srvr.c
282s23_srvr.o: ssl_locl.h
283s2_clnt.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
284s2_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h
285s2_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
286s2_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h
287s2_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
288s2_clnt.o: ../include/openssl/des.h ../include/openssl/des_old.h
289s2_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h
290s2_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h
291s2_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h
292s2_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
293s2_clnt.o: ../include/openssl/md2.h ../include/openssl/md4.h
294s2_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
295s2_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
296s2_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
297s2_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
298s2_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
299s2_clnt.o: ../include/openssl/rand.h ../include/openssl/rc2.h
300s2_clnt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
301s2_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
302s2_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
303s2_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
304s2_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
305s2_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
306s2_clnt.o: ../include/openssl/tls1.h ../include/openssl/ui.h
307s2_clnt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
308s2_clnt.o: ../include/openssl/x509_vfy.h s2_clnt.c ssl_locl.h
309s2_enc.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
310s2_enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h
311s2_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
312s2_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h
313s2_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
314s2_enc.o: ../include/openssl/des.h ../include/openssl/des_old.h
315s2_enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h
316s2_enc.o: ../include/openssl/e_os2.h ../include/openssl/err.h
317s2_enc.o: ../include/openssl/evp.h ../include/openssl/idea.h
318s2_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
319s2_enc.o: ../include/openssl/md2.h ../include/openssl/md4.h
320s2_enc.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
321s2_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
322s2_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
323s2_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
324s2_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
325s2_enc.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
326s2_enc.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
327s2_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
328s2_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h
329s2_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
330s2_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
331s2_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
332s2_enc.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
333s2_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_enc.c
334s2_enc.o: ssl_locl.h
335s2_lib.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
336s2_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h
337s2_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
338s2_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h
339s2_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
340s2_lib.o: ../include/openssl/des.h ../include/openssl/des_old.h
341s2_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h
342s2_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h
343s2_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h
344s2_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
345s2_lib.o: ../include/openssl/md2.h ../include/openssl/md4.h
346s2_lib.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
347s2_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
348s2_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
349s2_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
350s2_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
351s2_lib.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
352s2_lib.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
353s2_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
354s2_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h
355s2_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
356s2_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
357s2_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
358s2_lib.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
359s2_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_lib.c
360s2_lib.o: ssl_locl.h
361s2_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
362s2_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
363s2_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
364s2_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h
365s2_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h
366s2_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h
367s2_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
368s2_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
369s2_meth.o: ../include/openssl/idea.h ../include/openssl/kssl.h
370s2_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h
371s2_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h
372s2_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
373s2_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
374s2_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
375s2_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
376s2_meth.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
377s2_meth.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
378s2_meth.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
379s2_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
380s2_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
381s2_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
382s2_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
383s2_meth.o: ../include/openssl/tls1.h ../include/openssl/ui.h
384s2_meth.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
385s2_meth.o: ../include/openssl/x509_vfy.h s2_meth.c ssl_locl.h
386s2_pkt.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
387s2_pkt.o: ../include/openssl/asn1.h ../include/openssl/bio.h
388s2_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
389s2_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h
390s2_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
391s2_pkt.o: ../include/openssl/des.h ../include/openssl/des_old.h
392s2_pkt.o: ../include/openssl/dh.h ../include/openssl/dsa.h
393s2_pkt.o: ../include/openssl/e_os2.h ../include/openssl/err.h
394s2_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h
395s2_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
396s2_pkt.o: ../include/openssl/md2.h ../include/openssl/md4.h
397s2_pkt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
398s2_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
399s2_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
400s2_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
401s2_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
402s2_pkt.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
403s2_pkt.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
404s2_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
405s2_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
406s2_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
407s2_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
408s2_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
409s2_pkt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
410s2_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_pkt.c
411s2_pkt.o: ssl_locl.h
412s2_srvr.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
413s2_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h
414s2_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
415s2_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h
416s2_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
417s2_srvr.o: ../include/openssl/des.h ../include/openssl/des_old.h
418s2_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
419s2_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h
420s2_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h
421s2_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
422s2_srvr.o: ../include/openssl/md2.h ../include/openssl/md4.h
423s2_srvr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
424s2_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
425s2_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
426s2_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
427s2_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
428s2_srvr.o: ../include/openssl/rand.h ../include/openssl/rc2.h
429s2_srvr.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
430s2_srvr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
431s2_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
432s2_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
433s2_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
434s2_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
435s2_srvr.o: ../include/openssl/tls1.h ../include/openssl/ui.h
436s2_srvr.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
437s2_srvr.o: ../include/openssl/x509_vfy.h s2_srvr.c ssl_locl.h
438s3_both.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
439s3_both.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
440s3_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h
441s3_both.o: ../include/openssl/cast.h ../include/openssl/comp.h
442s3_both.o: ../include/openssl/crypto.h ../include/openssl/des.h
443s3_both.o: ../include/openssl/des_old.h ../include/openssl/dh.h
444s3_both.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
445s3_both.o: ../include/openssl/err.h ../include/openssl/evp.h
446s3_both.o: ../include/openssl/idea.h ../include/openssl/kssl.h
447s3_both.o: ../include/openssl/lhash.h ../include/openssl/md2.h
448s3_both.o: ../include/openssl/md4.h ../include/openssl/md5.h
449s3_both.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
450s3_both.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
451s3_both.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
452s3_both.o: ../include/openssl/pem.h ../include/openssl/pem2.h
453s3_both.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
454s3_both.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
455s3_both.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
456s3_both.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
457s3_both.o: ../include/openssl/sha.h ../include/openssl/ssl.h
458s3_both.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
459s3_both.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
460s3_both.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
461s3_both.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
462s3_both.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_both.c
463s3_both.o: ssl_locl.h
464s3_clnt.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
465s3_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h
466s3_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
467s3_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h
468s3_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
469s3_clnt.o: ../include/openssl/des.h ../include/openssl/des_old.h
470s3_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h
471s3_clnt.o: ../include/openssl/e_os2.h ../include/openssl/err.h
472s3_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h
473s3_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
474s3_clnt.o: ../include/openssl/md2.h ../include/openssl/md4.h
475s3_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
476s3_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
477s3_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
478s3_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
479s3_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
480s3_clnt.o: ../include/openssl/rand.h ../include/openssl/rc2.h
481s3_clnt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
482s3_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
483s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
484s3_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
485s3_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
486s3_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
487s3_clnt.o: ../include/openssl/tls1.h ../include/openssl/ui.h
488s3_clnt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
489s3_clnt.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_clnt.c ssl_locl.h
490s3_enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
491s3_enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
492s3_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
493s3_enc.o: ../include/openssl/cast.h ../include/openssl/comp.h
494s3_enc.o: ../include/openssl/crypto.h ../include/openssl/des.h
495s3_enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h
496s3_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
497s3_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
498s3_enc.o: ../include/openssl/idea.h ../include/openssl/kssl.h
499s3_enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h
500s3_enc.o: ../include/openssl/md4.h ../include/openssl/md5.h
501s3_enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
502s3_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
503s3_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
504s3_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
505s3_enc.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
506s3_enc.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
507s3_enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
508s3_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
509s3_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
510s3_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
511s3_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
512s3_enc.o: ../include/openssl/tls1.h ../include/openssl/ui.h
513s3_enc.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
514s3_enc.o: ../include/openssl/x509_vfy.h s3_enc.c ssl_locl.h
515s3_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
516s3_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
517s3_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
518s3_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h
519s3_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h
520s3_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h
521s3_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
522s3_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
523s3_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h
524s3_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h
525s3_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h
526s3_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
527s3_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
528s3_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
529s3_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
530s3_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
531s3_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
532s3_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
533s3_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
534s3_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
535s3_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
536s3_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
537s3_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h
538s3_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
539s3_lib.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_lib.c ssl_locl.h
540s3_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
541s3_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
542s3_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
543s3_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h
544s3_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h
545s3_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h
546s3_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
547s3_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
548s3_meth.o: ../include/openssl/idea.h ../include/openssl/kssl.h
549s3_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h
550s3_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h
551s3_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
552s3_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
553s3_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
554s3_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
555s3_meth.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
556s3_meth.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
557s3_meth.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
558s3_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
559s3_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
560s3_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
561s3_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
562s3_meth.o: ../include/openssl/tls1.h ../include/openssl/ui.h
563s3_meth.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
564s3_meth.o: ../include/openssl/x509_vfy.h s3_meth.c ssl_locl.h
565s3_pkt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
566s3_pkt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
567s3_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
568s3_pkt.o: ../include/openssl/cast.h ../include/openssl/comp.h
569s3_pkt.o: ../include/openssl/crypto.h ../include/openssl/des.h
570s3_pkt.o: ../include/openssl/des_old.h ../include/openssl/dh.h
571s3_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
572s3_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
573s3_pkt.o: ../include/openssl/idea.h ../include/openssl/kssl.h
574s3_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h
575s3_pkt.o: ../include/openssl/md4.h ../include/openssl/md5.h
576s3_pkt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
577s3_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
578s3_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
579s3_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
580s3_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
581s3_pkt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
582s3_pkt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
583s3_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
584s3_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
585s3_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
586s3_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
587s3_pkt.o: ../include/openssl/tls1.h ../include/openssl/ui.h
588s3_pkt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
589s3_pkt.o: ../include/openssl/x509_vfy.h s3_pkt.c ssl_locl.h
590s3_srvr.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
591s3_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h
592s3_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
593s3_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h
594s3_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
595s3_srvr.o: ../include/openssl/des.h ../include/openssl/des_old.h
596s3_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
597s3_srvr.o: ../include/openssl/e_os2.h ../include/openssl/err.h
598s3_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h
599s3_srvr.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h
600s3_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h
601s3_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h
602s3_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
603s3_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
604s3_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
605s3_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
606s3_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
607s3_srvr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
608s3_srvr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
609s3_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
610s3_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
611s3_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
612s3_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
613s3_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
614s3_srvr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
615s3_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h
616s3_srvr.o: s3_srvr.c ssl_locl.h
617ssl_algs.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
618ssl_algs.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
619ssl_algs.o: ../include/openssl/bn.h ../include/openssl/buffer.h
620ssl_algs.o: ../include/openssl/cast.h ../include/openssl/comp.h
621ssl_algs.o: ../include/openssl/crypto.h ../include/openssl/des.h
622ssl_algs.o: ../include/openssl/des_old.h ../include/openssl/dh.h
623ssl_algs.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
624ssl_algs.o: ../include/openssl/err.h ../include/openssl/evp.h
625ssl_algs.o: ../include/openssl/idea.h ../include/openssl/kssl.h
626ssl_algs.o: ../include/openssl/lhash.h ../include/openssl/md2.h
627ssl_algs.o: ../include/openssl/md4.h ../include/openssl/md5.h
628ssl_algs.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
629ssl_algs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
630ssl_algs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
631ssl_algs.o: ../include/openssl/pem.h ../include/openssl/pem2.h
632ssl_algs.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
633ssl_algs.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
634ssl_algs.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
635ssl_algs.o: ../include/openssl/safestack.h ../include/openssl/sha.h
636ssl_algs.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
637ssl_algs.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
638ssl_algs.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
639ssl_algs.o: ../include/openssl/tls1.h ../include/openssl/ui.h
640ssl_algs.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
641ssl_algs.o: ../include/openssl/x509_vfy.h ssl_algs.c ssl_locl.h
642ssl_asn1.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
643ssl_asn1.o: ../include/openssl/asn1.h ../include/openssl/asn1_mac.h
644ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
645ssl_asn1.o: ../include/openssl/bn.h ../include/openssl/buffer.h
646ssl_asn1.o: ../include/openssl/cast.h ../include/openssl/comp.h
647ssl_asn1.o: ../include/openssl/crypto.h ../include/openssl/des.h
648ssl_asn1.o: ../include/openssl/des_old.h ../include/openssl/dh.h
649ssl_asn1.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
650ssl_asn1.o: ../include/openssl/err.h ../include/openssl/evp.h
651ssl_asn1.o: ../include/openssl/idea.h ../include/openssl/kssl.h
652ssl_asn1.o: ../include/openssl/lhash.h ../include/openssl/md2.h
653ssl_asn1.o: ../include/openssl/md4.h ../include/openssl/md5.h
654ssl_asn1.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
655ssl_asn1.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
656ssl_asn1.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
657ssl_asn1.o: ../include/openssl/pem.h ../include/openssl/pem2.h
658ssl_asn1.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
659ssl_asn1.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
660ssl_asn1.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
661ssl_asn1.o: ../include/openssl/safestack.h ../include/openssl/sha.h
662ssl_asn1.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
663ssl_asn1.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
664ssl_asn1.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
665ssl_asn1.o: ../include/openssl/tls1.h ../include/openssl/ui.h
666ssl_asn1.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
667ssl_asn1.o: ../include/openssl/x509_vfy.h ssl_asn1.c ssl_locl.h
668ssl_cert.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
669ssl_cert.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
670ssl_cert.o: ../include/openssl/bn.h ../include/openssl/buffer.h
671ssl_cert.o: ../include/openssl/cast.h ../include/openssl/comp.h
672ssl_cert.o: ../include/openssl/conf.h ../include/openssl/crypto.h
673ssl_cert.o: ../include/openssl/des.h ../include/openssl/des_old.h
674ssl_cert.o: ../include/openssl/dh.h ../include/openssl/dsa.h
675ssl_cert.o: ../include/openssl/e_os2.h ../include/openssl/err.h
676ssl_cert.o: ../include/openssl/evp.h ../include/openssl/idea.h
677ssl_cert.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
678ssl_cert.o: ../include/openssl/md2.h ../include/openssl/md4.h
679ssl_cert.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
680ssl_cert.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
681ssl_cert.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
682ssl_cert.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
683ssl_cert.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
684ssl_cert.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
685ssl_cert.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
686ssl_cert.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
687ssl_cert.o: ../include/openssl/sha.h ../include/openssl/ssl.h
688ssl_cert.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
689ssl_cert.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
690ssl_cert.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
691ssl_cert.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
692ssl_cert.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
693ssl_cert.o: ../include/openssl/x509v3.h ssl_cert.c ssl_locl.h
694ssl_ciph.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
695ssl_ciph.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
696ssl_ciph.o: ../include/openssl/bn.h ../include/openssl/buffer.h
697ssl_ciph.o: ../include/openssl/cast.h ../include/openssl/comp.h
698ssl_ciph.o: ../include/openssl/crypto.h ../include/openssl/des.h
699ssl_ciph.o: ../include/openssl/des_old.h ../include/openssl/dh.h
700ssl_ciph.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
701ssl_ciph.o: ../include/openssl/err.h ../include/openssl/evp.h
702ssl_ciph.o: ../include/openssl/idea.h ../include/openssl/kssl.h
703ssl_ciph.o: ../include/openssl/lhash.h ../include/openssl/md2.h
704ssl_ciph.o: ../include/openssl/md4.h ../include/openssl/md5.h
705ssl_ciph.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
706ssl_ciph.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
707ssl_ciph.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
708ssl_ciph.o: ../include/openssl/pem.h ../include/openssl/pem2.h
709ssl_ciph.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
710ssl_ciph.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
711ssl_ciph.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
712ssl_ciph.o: ../include/openssl/safestack.h ../include/openssl/sha.h
713ssl_ciph.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
714ssl_ciph.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
715ssl_ciph.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
716ssl_ciph.o: ../include/openssl/tls1.h ../include/openssl/ui.h
717ssl_ciph.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
718ssl_ciph.o: ../include/openssl/x509_vfy.h ssl_ciph.c ssl_locl.h
719ssl_err.o: ../include/openssl/aes.h ../include/openssl/asn1.h
720ssl_err.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
721ssl_err.o: ../include/openssl/bn.h ../include/openssl/buffer.h
722ssl_err.o: ../include/openssl/cast.h ../include/openssl/comp.h
723ssl_err.o: ../include/openssl/crypto.h ../include/openssl/des.h
724ssl_err.o: ../include/openssl/des_old.h ../include/openssl/dh.h
725ssl_err.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
726ssl_err.o: ../include/openssl/err.h ../include/openssl/evp.h
727ssl_err.o: ../include/openssl/idea.h ../include/openssl/kssl.h
728ssl_err.o: ../include/openssl/lhash.h ../include/openssl/md2.h
729ssl_err.o: ../include/openssl/md4.h ../include/openssl/md5.h
730ssl_err.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
731ssl_err.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
732ssl_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
733ssl_err.o: ../include/openssl/pem.h ../include/openssl/pem2.h
734ssl_err.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
735ssl_err.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
736ssl_err.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
737ssl_err.o: ../include/openssl/safestack.h ../include/openssl/sha.h
738ssl_err.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
739ssl_err.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
740ssl_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
741ssl_err.o: ../include/openssl/tls1.h ../include/openssl/ui.h
742ssl_err.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
743ssl_err.o: ../include/openssl/x509_vfy.h ssl_err.c
744ssl_err2.o: ../include/openssl/aes.h ../include/openssl/asn1.h
745ssl_err2.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
746ssl_err2.o: ../include/openssl/bn.h ../include/openssl/buffer.h
747ssl_err2.o: ../include/openssl/cast.h ../include/openssl/comp.h
748ssl_err2.o: ../include/openssl/crypto.h ../include/openssl/des.h
749ssl_err2.o: ../include/openssl/des_old.h ../include/openssl/dh.h
750ssl_err2.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
751ssl_err2.o: ../include/openssl/err.h ../include/openssl/evp.h
752ssl_err2.o: ../include/openssl/idea.h ../include/openssl/kssl.h
753ssl_err2.o: ../include/openssl/lhash.h ../include/openssl/md2.h
754ssl_err2.o: ../include/openssl/md4.h ../include/openssl/md5.h
755ssl_err2.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
756ssl_err2.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
757ssl_err2.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
758ssl_err2.o: ../include/openssl/pem.h ../include/openssl/pem2.h
759ssl_err2.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
760ssl_err2.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
761ssl_err2.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
762ssl_err2.o: ../include/openssl/safestack.h ../include/openssl/sha.h
763ssl_err2.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
764ssl_err2.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
765ssl_err2.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
766ssl_err2.o: ../include/openssl/tls1.h ../include/openssl/ui.h
767ssl_err2.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
768ssl_err2.o: ../include/openssl/x509_vfy.h ssl_err2.c
769ssl_lib.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
770ssl_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h
771ssl_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
772ssl_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h
773ssl_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h
774ssl_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h
775ssl_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h
776ssl_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
777ssl_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
778ssl_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h
779ssl_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h
780ssl_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h
781ssl_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
782ssl_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
783ssl_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
784ssl_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
785ssl_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
786ssl_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
787ssl_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
788ssl_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
789ssl_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
790ssl_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
791ssl_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
792ssl_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h
793ssl_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
794ssl_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h kssl_lcl.h
795ssl_lib.o: ssl_lib.c ssl_locl.h
796ssl_rsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
797ssl_rsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
798ssl_rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
799ssl_rsa.o: ../include/openssl/cast.h ../include/openssl/comp.h
800ssl_rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
801ssl_rsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
802ssl_rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
803ssl_rsa.o: ../include/openssl/err.h ../include/openssl/evp.h
804ssl_rsa.o: ../include/openssl/idea.h ../include/openssl/kssl.h
805ssl_rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
806ssl_rsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
807ssl_rsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
808ssl_rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
809ssl_rsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
810ssl_rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
811ssl_rsa.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
812ssl_rsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
813ssl_rsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
814ssl_rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
815ssl_rsa.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
816ssl_rsa.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
817ssl_rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
818ssl_rsa.o: ../include/openssl/tls1.h ../include/openssl/ui.h
819ssl_rsa.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
820ssl_rsa.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_rsa.c
821ssl_sess.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
822ssl_sess.o: ../include/openssl/asn1.h ../include/openssl/bio.h
823ssl_sess.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
824ssl_sess.o: ../include/openssl/buffer.h ../include/openssl/cast.h
825ssl_sess.o: ../include/openssl/comp.h ../include/openssl/crypto.h
826ssl_sess.o: ../include/openssl/des.h ../include/openssl/des_old.h
827ssl_sess.o: ../include/openssl/dh.h ../include/openssl/dsa.h
828ssl_sess.o: ../include/openssl/e_os2.h ../include/openssl/err.h
829ssl_sess.o: ../include/openssl/evp.h ../include/openssl/idea.h
830ssl_sess.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
831ssl_sess.o: ../include/openssl/md2.h ../include/openssl/md4.h
832ssl_sess.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
833ssl_sess.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
834ssl_sess.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
835ssl_sess.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
836ssl_sess.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
837ssl_sess.o: ../include/openssl/rand.h ../include/openssl/rc2.h
838ssl_sess.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
839ssl_sess.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
840ssl_sess.o: ../include/openssl/safestack.h ../include/openssl/sha.h
841ssl_sess.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
842ssl_sess.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
843ssl_sess.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
844ssl_sess.o: ../include/openssl/tls1.h ../include/openssl/ui.h
845ssl_sess.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
846ssl_sess.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_sess.c
847ssl_stat.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
848ssl_stat.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
849ssl_stat.o: ../include/openssl/bn.h ../include/openssl/buffer.h
850ssl_stat.o: ../include/openssl/cast.h ../include/openssl/comp.h
851ssl_stat.o: ../include/openssl/crypto.h ../include/openssl/des.h
852ssl_stat.o: ../include/openssl/des_old.h ../include/openssl/dh.h
853ssl_stat.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
854ssl_stat.o: ../include/openssl/err.h ../include/openssl/evp.h
855ssl_stat.o: ../include/openssl/idea.h ../include/openssl/kssl.h
856ssl_stat.o: ../include/openssl/lhash.h ../include/openssl/md2.h
857ssl_stat.o: ../include/openssl/md4.h ../include/openssl/md5.h
858ssl_stat.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
859ssl_stat.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
860ssl_stat.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
861ssl_stat.o: ../include/openssl/pem.h ../include/openssl/pem2.h
862ssl_stat.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
863ssl_stat.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
864ssl_stat.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
865ssl_stat.o: ../include/openssl/safestack.h ../include/openssl/sha.h
866ssl_stat.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
867ssl_stat.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
868ssl_stat.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
869ssl_stat.o: ../include/openssl/tls1.h ../include/openssl/ui.h
870ssl_stat.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
871ssl_stat.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_stat.c
872ssl_txt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
873ssl_txt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
874ssl_txt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
875ssl_txt.o: ../include/openssl/cast.h ../include/openssl/comp.h
876ssl_txt.o: ../include/openssl/crypto.h ../include/openssl/des.h
877ssl_txt.o: ../include/openssl/des_old.h ../include/openssl/dh.h
878ssl_txt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
879ssl_txt.o: ../include/openssl/err.h ../include/openssl/evp.h
880ssl_txt.o: ../include/openssl/idea.h ../include/openssl/kssl.h
881ssl_txt.o: ../include/openssl/lhash.h ../include/openssl/md2.h
882ssl_txt.o: ../include/openssl/md4.h ../include/openssl/md5.h
883ssl_txt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
884ssl_txt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
885ssl_txt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
886ssl_txt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
887ssl_txt.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
888ssl_txt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
889ssl_txt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
890ssl_txt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
891ssl_txt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
892ssl_txt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
893ssl_txt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
894ssl_txt.o: ../include/openssl/tls1.h ../include/openssl/ui.h
895ssl_txt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
896ssl_txt.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_txt.c
897t1_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
898t1_clnt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
899t1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
900t1_clnt.o: ../include/openssl/cast.h ../include/openssl/comp.h
901t1_clnt.o: ../include/openssl/crypto.h ../include/openssl/des.h
902t1_clnt.o: ../include/openssl/des_old.h ../include/openssl/dh.h
903t1_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
904t1_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
905t1_clnt.o: ../include/openssl/idea.h ../include/openssl/kssl.h
906t1_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h
907t1_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h
908t1_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
909t1_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
910t1_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
911t1_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
912t1_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
913t1_clnt.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
914t1_clnt.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
915t1_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
916t1_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
917t1_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
918t1_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
919t1_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
920t1_clnt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
921t1_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
922t1_clnt.o: t1_clnt.c
923t1_enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
924t1_enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
925t1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
926t1_enc.o: ../include/openssl/cast.h ../include/openssl/comp.h
927t1_enc.o: ../include/openssl/crypto.h ../include/openssl/des.h
928t1_enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h
929t1_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
930t1_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
931t1_enc.o: ../include/openssl/hmac.h ../include/openssl/idea.h
932t1_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
933t1_enc.o: ../include/openssl/md2.h ../include/openssl/md4.h
934t1_enc.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
935t1_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
936t1_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
937t1_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
938t1_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
939t1_enc.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
940t1_enc.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
941t1_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
942t1_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h
943t1_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
944t1_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
945t1_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
946t1_enc.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
947t1_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
948t1_enc.o: t1_enc.c
949t1_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
950t1_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
951t1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
952t1_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h
953t1_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h
954t1_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h
955t1_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
956t1_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
957t1_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h
958t1_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h
959t1_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h
960t1_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
961t1_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
962t1_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
963t1_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
964t1_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
965t1_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
966t1_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
967t1_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
968t1_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
969t1_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
970t1_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
971t1_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h
972t1_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
973t1_lib.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_lib.c
974t1_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
975t1_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
976t1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
977t1_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h
978t1_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h
979t1_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h
980t1_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
981t1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
982t1_meth.o: ../include/openssl/idea.h ../include/openssl/kssl.h
983t1_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h
984t1_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h
985t1_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
986t1_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
987t1_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
988t1_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
989t1_meth.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
990t1_meth.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
991t1_meth.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
992t1_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
993t1_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
994t1_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
995t1_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
996t1_meth.o: ../include/openssl/tls1.h ../include/openssl/ui.h
997t1_meth.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
998t1_meth.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_meth.c
999t1_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
1000t1_srvr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
1001t1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
1002t1_srvr.o: ../include/openssl/cast.h ../include/openssl/comp.h
1003t1_srvr.o: ../include/openssl/crypto.h ../include/openssl/des.h
1004t1_srvr.o: ../include/openssl/des_old.h ../include/openssl/dh.h
1005t1_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
1006t1_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
1007t1_srvr.o: ../include/openssl/idea.h ../include/openssl/kssl.h
1008t1_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h
1009t1_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h
1010t1_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
1011t1_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
1012t1_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
1013t1_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
1014t1_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
1015t1_srvr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
1016t1_srvr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
1017t1_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
1018t1_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
1019t1_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
1020t1_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
1021t1_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
1022t1_srvr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
1023t1_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
1024t1_srvr.o: t1_srvr.c
diff --git a/src/lib/libssl/src/ssl/kssl.c b/src/lib/libssl/src/ssl/kssl.c
index 51378897f6..7c45f8ff4e 100644
--- a/src/lib/libssl/src/ssl/kssl.c
+++ b/src/lib/libssl/src/ssl/kssl.c
@@ -953,7 +953,7 @@ print_krb5_authdata(char *label, krb5_authdata **adata)
953 printf("%s, authdata==0\n", label); 953 printf("%s, authdata==0\n", label);
954 return; 954 return;
955 } 955 }
956 printf("%s [%p]\n", label, (void *)adata); 956 printf("%s [%p]\n", label, adata);
957#if 0 957#if 0
958 { 958 {
959 int i; 959 int i;
@@ -1725,7 +1725,7 @@ kssl_ctx_show(KSSL_CTX *kssl_ctx)
1725 return; 1725 return;
1726 } 1726 }
1727 else 1727 else
1728 printf("%p\n", (void *)kssl_ctx); 1728 printf("%p\n", kssl_ctx);
1729 1729
1730 printf("\tservice:\t%s\n", 1730 printf("\tservice:\t%s\n",
1731 (kssl_ctx->service_name)? kssl_ctx->service_name: "NULL"); 1731 (kssl_ctx->service_name)? kssl_ctx->service_name: "NULL");
diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c
index 26ce0cb963..d51b60e343 100644
--- a/src/lib/libssl/src/ssl/s3_clnt.c
+++ b/src/lib/libssl/src/ssl/s3_clnt.c
@@ -168,7 +168,7 @@ int ssl3_connect(SSL *s)
168 long num1; 168 long num1;
169 void (*cb)(const SSL *ssl,int type,int val)=NULL; 169 void (*cb)(const SSL *ssl,int type,int val)=NULL;
170 int ret= -1; 170 int ret= -1;
171 int new_state,state,skip=0;; 171 int new_state,state,skip=0;
172 172
173 RAND_add(&Time,sizeof(Time),0); 173 RAND_add(&Time,sizeof(Time),0);
174 ERR_clear_error(); 174 ERR_clear_error();
@@ -1946,7 +1946,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
1946 if (algs & SSL_kRSA) 1946 if (algs & SSL_kRSA)
1947 { 1947 {
1948 if (rsa == NULL 1948 if (rsa == NULL
1949 || RSA_size(rsa)*8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)) 1949 || RSA_size(rsa) > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher))
1950 { 1950 {
1951 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_EXPORT_TMP_RSA_KEY); 1951 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_EXPORT_TMP_RSA_KEY);
1952 goto f_err; 1952 goto f_err;
@@ -1958,7 +1958,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
1958 if (algs & (SSL_kEDH|SSL_kDHr|SSL_kDHd)) 1958 if (algs & (SSL_kEDH|SSL_kDHr|SSL_kDHd))
1959 { 1959 {
1960 if (dh == NULL 1960 if (dh == NULL
1961 || DH_size(dh)*8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)) 1961 || DH_size(dh) > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher))
1962 { 1962 {
1963 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_EXPORT_TMP_DH_KEY); 1963 SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_EXPORT_TMP_DH_KEY);
1964 goto f_err; 1964 goto f_err;
diff --git a/src/lib/libssl/src/ssl/s3_enc.c b/src/lib/libssl/src/ssl/s3_enc.c
index 92efb9597d..559924d368 100644
--- a/src/lib/libssl/src/ssl/s3_enc.c
+++ b/src/lib/libssl/src/ssl/s3_enc.c
@@ -199,10 +199,10 @@ int ssl3_change_cipher_state(SSL *s, int which)
199 COMP_METHOD *comp; 199 COMP_METHOD *comp;
200 const EVP_MD *m; 200 const EVP_MD *m;
201 EVP_MD_CTX md; 201 EVP_MD_CTX md;
202 int is_exp,n,i,j,k,cl; 202 int exp,n,i,j,k,cl;
203 int reuse_dd = 0; 203 int reuse_dd = 0;
204 204
205 is_exp=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher); 205 exp=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher);
206 c=s->s3->tmp.new_sym_enc; 206 c=s->s3->tmp.new_sym_enc;
207 m=s->s3->tmp.new_hash; 207 m=s->s3->tmp.new_hash;
208 if (s->s3->tmp.new_compression == NULL) 208 if (s->s3->tmp.new_compression == NULL)
@@ -276,9 +276,9 @@ int ssl3_change_cipher_state(SSL *s, int which)
276 p=s->s3->tmp.key_block; 276 p=s->s3->tmp.key_block;
277 i=EVP_MD_size(m); 277 i=EVP_MD_size(m);
278 cl=EVP_CIPHER_key_length(c); 278 cl=EVP_CIPHER_key_length(c);
279 j=is_exp ? (cl < SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher) ? 279 j=exp ? (cl < SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher) ?
280 cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl; 280 cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl;
281 /* Was j=(is_exp)?5:EVP_CIPHER_key_length(c); */ 281 /* Was j=(exp)?5:EVP_CIPHER_key_length(c); */
282 k=EVP_CIPHER_iv_length(c); 282 k=EVP_CIPHER_iv_length(c);
283 if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) || 283 if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) ||
284 (which == SSL3_CHANGE_CIPHER_SERVER_READ)) 284 (which == SSL3_CHANGE_CIPHER_SERVER_READ))
@@ -307,7 +307,7 @@ int ssl3_change_cipher_state(SSL *s, int which)
307 307
308 EVP_MD_CTX_init(&md); 308 EVP_MD_CTX_init(&md);
309 memcpy(mac_secret,ms,i); 309 memcpy(mac_secret,ms,i);
310 if (is_exp) 310 if (exp)
311 { 311 {
312 /* In here I set both the read and write key/iv to the 312 /* In here I set both the read and write key/iv to the
313 * same value since only the correct one will be used :-). 313 * same value since only the correct one will be used :-).
diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h
index 913bd40eea..4ae8458259 100644
--- a/src/lib/libssl/src/ssl/ssl.h
+++ b/src/lib/libssl/src/ssl/ssl.h
@@ -1357,8 +1357,8 @@ const char *SSL_alert_type_string(int value);
1357const char *SSL_alert_desc_string_long(int value); 1357const char *SSL_alert_desc_string_long(int value);
1358const char *SSL_alert_desc_string(int value); 1358const char *SSL_alert_desc_string(int value);
1359 1359
1360void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list); 1360void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *list);
1361void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list); 1361void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *list);
1362STACK_OF(X509_NAME) *SSL_get_client_CA_list(SSL *s); 1362STACK_OF(X509_NAME) *SSL_get_client_CA_list(SSL *s);
1363STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *s); 1363STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *s);
1364int SSL_add_client_CA(SSL *ssl,X509 *x); 1364int SSL_add_client_CA(SSL *ssl,X509 *x);
diff --git a/src/lib/libssl/src/ssl/ssl_cert.c b/src/lib/libssl/src/ssl/ssl_cert.c
index 2cfb615878..da90078a37 100644
--- a/src/lib/libssl/src/ssl/ssl_cert.c
+++ b/src/lib/libssl/src/ssl/ssl_cert.c
@@ -505,12 +505,12 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk)
505 return(i); 505 return(i);
506 } 506 }
507 507
508static void set_client_CA_list(STACK_OF(X509_NAME) **ca_list,STACK_OF(X509_NAME) *name_list) 508static void set_client_CA_list(STACK_OF(X509_NAME) **ca_list,STACK_OF(X509_NAME) *list)
509 { 509 {
510 if (*ca_list != NULL) 510 if (*ca_list != NULL)
511 sk_X509_NAME_pop_free(*ca_list,X509_NAME_free); 511 sk_X509_NAME_pop_free(*ca_list,X509_NAME_free);
512 512
513 *ca_list=name_list; 513 *ca_list=list;
514 } 514 }
515 515
516STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk) 516STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk)
@@ -532,14 +532,14 @@ STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk)
532 return(ret); 532 return(ret);
533 } 533 }
534 534
535void SSL_set_client_CA_list(SSL *s,STACK_OF(X509_NAME) *name_list) 535void SSL_set_client_CA_list(SSL *s,STACK_OF(X509_NAME) *list)
536 { 536 {
537 set_client_CA_list(&(s->client_CA),name_list); 537 set_client_CA_list(&(s->client_CA),list);
538 } 538 }
539 539
540void SSL_CTX_set_client_CA_list(SSL_CTX *ctx,STACK_OF(X509_NAME) *name_list) 540void SSL_CTX_set_client_CA_list(SSL_CTX *ctx,STACK_OF(X509_NAME) *list)
541 { 541 {
542 set_client_CA_list(&(ctx->client_CA),name_list); 542 set_client_CA_list(&(ctx->client_CA),list);
543 } 543 }
544 544
545STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *ctx) 545STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *ctx)
diff --git a/src/lib/libssl/src/ssl/ssl_ciph.c b/src/lib/libssl/src/ssl/ssl_ciph.c
index 44c503eb04..532fb4e80d 100644
--- a/src/lib/libssl/src/ssl/ssl_ciph.c
+++ b/src/lib/libssl/src/ssl/ssl_ciph.c
@@ -73,7 +73,7 @@
73#define SSL_ENC_NUM_IDX 9 73#define SSL_ENC_NUM_IDX 9
74 74
75static const EVP_CIPHER *ssl_cipher_methods[SSL_ENC_NUM_IDX]={ 75static const EVP_CIPHER *ssl_cipher_methods[SSL_ENC_NUM_IDX]={
76 NULL,NULL,NULL,NULL,NULL,NULL, 76 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
77 }; 77 };
78 78
79static STACK_OF(SSL_COMP) *ssl_comp_methods=NULL; 79static STACK_OF(SSL_COMP) *ssl_comp_methods=NULL;
@@ -251,7 +251,7 @@ int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,
251 break; 251 break;
252 } 252 }
253 253
254 if ((i < 0) || (i > SSL_ENC_NUM_IDX)) 254 if ((i < 0) || (i >= SSL_ENC_NUM_IDX))
255 *enc=NULL; 255 *enc=NULL;
256 else 256 else
257 { 257 {
@@ -273,7 +273,7 @@ int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,
273 i= -1; 273 i= -1;
274 break; 274 break;
275 } 275 }
276 if ((i < 0) || (i > SSL_MD_NUM_IDX)) 276 if ((i < 0) || (i >= SSL_MD_NUM_IDX))
277 *md=NULL; 277 *md=NULL;
278 else 278 else
279 *md=ssl_digest_methods[i]; 279 *md=ssl_digest_methods[i];
@@ -340,10 +340,10 @@ static unsigned long ssl_cipher_get_disabled(void)
340 } 340 }
341 341
342static void ssl_cipher_collect_ciphers(const SSL_METHOD *ssl_method, 342static void ssl_cipher_collect_ciphers(const SSL_METHOD *ssl_method,
343 int num_of_ciphers, unsigned long mask, CIPHER_ORDER *co_list, 343 int num_of_ciphers, unsigned long mask, CIPHER_ORDER *list,
344 CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p) 344 CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p)
345 { 345 {
346 int i, co_list_num; 346 int i, list_num;
347 SSL_CIPHER *c; 347 SSL_CIPHER *c;
348 348
349 /* 349 /*
@@ -354,18 +354,18 @@ static void ssl_cipher_collect_ciphers(const SSL_METHOD *ssl_method,
354 */ 354 */
355 355
356 /* Get the initial list of ciphers */ 356 /* Get the initial list of ciphers */
357 co_list_num = 0; /* actual count of ciphers */ 357 list_num = 0; /* actual count of ciphers */
358 for (i = 0; i < num_of_ciphers; i++) 358 for (i = 0; i < num_of_ciphers; i++)
359 { 359 {
360 c = ssl_method->get_cipher(i); 360 c = ssl_method->get_cipher(i);
361 /* drop those that use any of that is not available */ 361 /* drop those that use any of that is not available */
362 if ((c != NULL) && c->valid && !(c->algorithms & mask)) 362 if ((c != NULL) && c->valid && !(c->algorithms & mask))
363 { 363 {
364 co_list[co_list_num].cipher = c; 364 list[list_num].cipher = c;
365 co_list[co_list_num].next = NULL; 365 list[list_num].next = NULL;
366 co_list[co_list_num].prev = NULL; 366 list[list_num].prev = NULL;
367 co_list[co_list_num].active = 0; 367 list[list_num].active = 0;
368 co_list_num++; 368 list_num++;
369#ifdef KSSL_DEBUG 369#ifdef KSSL_DEBUG
370 printf("\t%d: %s %lx %lx\n",i,c->name,c->id,c->algorithms); 370 printf("\t%d: %s %lx %lx\n",i,c->name,c->id,c->algorithms);
371#endif /* KSSL_DEBUG */ 371#endif /* KSSL_DEBUG */
@@ -378,18 +378,18 @@ static void ssl_cipher_collect_ciphers(const SSL_METHOD *ssl_method,
378 /* 378 /*
379 * Prepare linked list from list entries 379 * Prepare linked list from list entries
380 */ 380 */
381 for (i = 1; i < co_list_num - 1; i++) 381 for (i = 1; i < list_num - 1; i++)
382 { 382 {
383 co_list[i].prev = &(co_list[i-1]); 383 list[i].prev = &(list[i-1]);
384 co_list[i].next = &(co_list[i+1]); 384 list[i].next = &(list[i+1]);
385 } 385 }
386 if (co_list_num > 0) 386 if (list_num > 0)
387 { 387 {
388 (*head_p) = &(co_list[0]); 388 (*head_p) = &(list[0]);
389 (*head_p)->prev = NULL; 389 (*head_p)->prev = NULL;
390 (*head_p)->next = &(co_list[1]); 390 (*head_p)->next = &(list[1]);
391 (*tail_p) = &(co_list[co_list_num - 1]); 391 (*tail_p) = &(list[list_num - 1]);
392 (*tail_p)->prev = &(co_list[co_list_num - 2]); 392 (*tail_p)->prev = &(list[list_num - 2]);
393 (*tail_p)->next = NULL; 393 (*tail_p)->next = NULL;
394 } 394 }
395 } 395 }
@@ -435,7 +435,7 @@ static void ssl_cipher_collect_aliases(SSL_CIPHER **ca_list,
435 435
436static void ssl_cipher_apply_rule(unsigned long algorithms, unsigned long mask, 436static void ssl_cipher_apply_rule(unsigned long algorithms, unsigned long mask,
437 unsigned long algo_strength, unsigned long mask_strength, 437 unsigned long algo_strength, unsigned long mask_strength,
438 int rule, int strength_bits, CIPHER_ORDER *co_list, 438 int rule, int strength_bits, CIPHER_ORDER *list,
439 CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p) 439 CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p)
440 { 440 {
441 CIPHER_ORDER *head, *tail, *curr, *curr2, *tail2; 441 CIPHER_ORDER *head, *tail, *curr, *curr2, *tail2;
@@ -530,9 +530,8 @@ static void ssl_cipher_apply_rule(unsigned long algorithms, unsigned long mask,
530 *tail_p = tail; 530 *tail_p = tail;
531 } 531 }
532 532
533static int ssl_cipher_strength_sort(CIPHER_ORDER *co_list, 533static int ssl_cipher_strength_sort(CIPHER_ORDER *list, CIPHER_ORDER **head_p,
534 CIPHER_ORDER **head_p, 534 CIPHER_ORDER **tail_p)
535 CIPHER_ORDER **tail_p)
536 { 535 {
537 int max_strength_bits, i, *number_uses; 536 int max_strength_bits, i, *number_uses;
538 CIPHER_ORDER *curr; 537 CIPHER_ORDER *curr;
@@ -577,14 +576,14 @@ static int ssl_cipher_strength_sort(CIPHER_ORDER *co_list,
577 for (i = max_strength_bits; i >= 0; i--) 576 for (i = max_strength_bits; i >= 0; i--)
578 if (number_uses[i] > 0) 577 if (number_uses[i] > 0)
579 ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i, 578 ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i,
580 co_list, head_p, tail_p); 579 list, head_p, tail_p);
581 580
582 OPENSSL_free(number_uses); 581 OPENSSL_free(number_uses);
583 return(1); 582 return(1);
584 } 583 }
585 584
586static int ssl_cipher_process_rulestr(const char *rule_str, 585static int ssl_cipher_process_rulestr(const char *rule_str,
587 CIPHER_ORDER *co_list, CIPHER_ORDER **head_p, 586 CIPHER_ORDER *list, CIPHER_ORDER **head_p,
588 CIPHER_ORDER **tail_p, SSL_CIPHER **ca_list) 587 CIPHER_ORDER **tail_p, SSL_CIPHER **ca_list)
589 { 588 {
590 unsigned long algorithms, mask, algo_strength, mask_strength; 589 unsigned long algorithms, mask, algo_strength, mask_strength;
@@ -709,7 +708,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
709 ok = 0; 708 ok = 0;
710 if ((buflen == 8) && 709 if ((buflen == 8) &&
711 !strncmp(buf, "STRENGTH", 8)) 710 !strncmp(buf, "STRENGTH", 8))
712 ok = ssl_cipher_strength_sort(co_list, 711 ok = ssl_cipher_strength_sort(list,
713 head_p, tail_p); 712 head_p, tail_p);
714 else 713 else
715 SSLerr(SSL_F_SSL_CIPHER_PROCESS_RULESTR, 714 SSLerr(SSL_F_SSL_CIPHER_PROCESS_RULESTR,
@@ -729,7 +728,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
729 { 728 {
730 ssl_cipher_apply_rule(algorithms, mask, 729 ssl_cipher_apply_rule(algorithms, mask,
731 algo_strength, mask_strength, rule, -1, 730 algo_strength, mask_strength, rule, -1,
732 co_list, head_p, tail_p); 731 list, head_p, tail_p);
733 } 732 }
734 else 733 else
735 { 734 {
@@ -751,7 +750,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
751 unsigned long disabled_mask; 750 unsigned long disabled_mask;
752 STACK_OF(SSL_CIPHER) *cipherstack; 751 STACK_OF(SSL_CIPHER) *cipherstack;
753 const char *rule_p; 752 const char *rule_p;
754 CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr; 753 CIPHER_ORDER *list = NULL, *head = NULL, *tail = NULL, *curr;
755 SSL_CIPHER **ca_list = NULL; 754 SSL_CIPHER **ca_list = NULL;
756 755
757 /* 756 /*
@@ -781,15 +780,15 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
781#ifdef KSSL_DEBUG 780#ifdef KSSL_DEBUG
782 printf("ssl_create_cipher_list() for %d ciphers\n", num_of_ciphers); 781 printf("ssl_create_cipher_list() for %d ciphers\n", num_of_ciphers);
783#endif /* KSSL_DEBUG */ 782#endif /* KSSL_DEBUG */
784 co_list = (CIPHER_ORDER *)OPENSSL_malloc(sizeof(CIPHER_ORDER) * num_of_ciphers); 783 list = (CIPHER_ORDER *)OPENSSL_malloc(sizeof(CIPHER_ORDER) * num_of_ciphers);
785 if (co_list == NULL) 784 if (list == NULL)
786 { 785 {
787 SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); 786 SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
788 return(NULL); /* Failure */ 787 return(NULL); /* Failure */
789 } 788 }
790 789
791 ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers, disabled_mask, 790 ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers, disabled_mask,
792 co_list, &head, &tail); 791 list, &head, &tail);
793 792
794 /* 793 /*
795 * We also need cipher aliases for selecting based on the rule_str. 794 * We also need cipher aliases for selecting based on the rule_str.
@@ -805,7 +804,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
805 (SSL_CIPHER **)OPENSSL_malloc(sizeof(SSL_CIPHER *) * num_of_alias_max); 804 (SSL_CIPHER **)OPENSSL_malloc(sizeof(SSL_CIPHER *) * num_of_alias_max);
806 if (ca_list == NULL) 805 if (ca_list == NULL)
807 { 806 {
808 OPENSSL_free(co_list); 807 OPENSSL_free(list);
809 SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE); 808 SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
810 return(NULL); /* Failure */ 809 return(NULL); /* Failure */
811 } 810 }
@@ -821,21 +820,21 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
821 if (strncmp(rule_str,"DEFAULT",7) == 0) 820 if (strncmp(rule_str,"DEFAULT",7) == 0)
822 { 821 {
823 ok = ssl_cipher_process_rulestr(SSL_DEFAULT_CIPHER_LIST, 822 ok = ssl_cipher_process_rulestr(SSL_DEFAULT_CIPHER_LIST,
824 co_list, &head, &tail, ca_list); 823 list, &head, &tail, ca_list);
825 rule_p += 7; 824 rule_p += 7;
826 if (*rule_p == ':') 825 if (*rule_p == ':')
827 rule_p++; 826 rule_p++;
828 } 827 }
829 828
830 if (ok && (strlen(rule_p) > 0)) 829 if (ok && (strlen(rule_p) > 0))
831 ok = ssl_cipher_process_rulestr(rule_p, co_list, &head, &tail, 830 ok = ssl_cipher_process_rulestr(rule_p, list, &head, &tail,
832 ca_list); 831 ca_list);
833 832
834 OPENSSL_free(ca_list); /* Not needed anymore */ 833 OPENSSL_free(ca_list); /* Not needed anymore */
835 834
836 if (!ok) 835 if (!ok)
837 { /* Rule processing failure */ 836 { /* Rule processing failure */
838 OPENSSL_free(co_list); 837 OPENSSL_free(list);
839 return(NULL); 838 return(NULL);
840 } 839 }
841 /* 840 /*
@@ -844,7 +843,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
844 */ 843 */
845 if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) 844 if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL)
846 { 845 {
847 OPENSSL_free(co_list); 846 OPENSSL_free(list);
848 return(NULL); 847 return(NULL);
849 } 848 }
850 849
@@ -862,7 +861,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
862#endif 861#endif
863 } 862 }
864 } 863 }
865 OPENSSL_free(co_list); /* Not needed any longer */ 864 OPENSSL_free(list); /* Not needed any longer */
866 865
867 /* 866 /*
868 * The following passage is a little bit odd. If pointer variables 867 * The following passage is a little bit odd. If pointer variables
@@ -912,7 +911,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
912char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) 911char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
913 { 912 {
914 int is_export,pkl,kl; 913 int is_export,pkl,kl;
915 char *ver,*exp_str; 914 char *ver,*exp;
916 char *kx,*au,*enc,*mac; 915 char *kx,*au,*enc,*mac;
917 unsigned long alg,alg2,alg_s; 916 unsigned long alg,alg2,alg_s;
918#ifdef KSSL_DEBUG 917#ifdef KSSL_DEBUG
@@ -928,7 +927,7 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
928 is_export=SSL_C_IS_EXPORT(cipher); 927 is_export=SSL_C_IS_EXPORT(cipher);
929 pkl=SSL_C_EXPORT_PKEYLENGTH(cipher); 928 pkl=SSL_C_EXPORT_PKEYLENGTH(cipher);
930 kl=SSL_C_EXPORT_KEYLENGTH(cipher); 929 kl=SSL_C_EXPORT_KEYLENGTH(cipher);
931 exp_str=is_export?" export":""; 930 exp=is_export?" export":"";
932 931
933 if (alg & SSL_SSLV2) 932 if (alg & SSL_SSLV2)
934 ver="SSLv2"; 933 ver="SSLv2";
@@ -1047,9 +1046,9 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
1047 return("Buffer too small"); 1046 return("Buffer too small");
1048 1047
1049#ifdef KSSL_DEBUG 1048#ifdef KSSL_DEBUG
1050 BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp_str,alg); 1049 BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp,alg);
1051#else 1050#else
1052 BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp_str); 1051 BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp);
1053#endif /* KSSL_DEBUG */ 1052#endif /* KSSL_DEBUG */
1054 return(buf); 1053 return(buf);
1055 } 1054 }
@@ -1136,11 +1135,11 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
1136 { 1135 {
1137 MemCheck_on(); 1136 MemCheck_on();
1138 SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,ERR_R_MALLOC_FAILURE); 1137 SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,ERR_R_MALLOC_FAILURE);
1139 return(1); 1138 return(0);
1140 } 1139 }
1141 else 1140 else
1142 { 1141 {
1143 MemCheck_on(); 1142 MemCheck_on();
1144 return(0); 1143 return(1);
1145 } 1144 }
1146 } 1145 }
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c
index 28095148e7..84c25d2c30 100644
--- a/src/lib/libssl/src/ssl/ssltest.c
+++ b/src/lib/libssl/src/ssl/ssltest.c
@@ -119,6 +119,7 @@
119#include <stdlib.h> 119#include <stdlib.h>
120#include <string.h> 120#include <string.h>
121#include <time.h> 121#include <time.h>
122#include <inttypes.h>
122 123
123#define USE_SOCKETS 124#define USE_SOCKETS
124#include "e_os.h" 125#include "e_os.h"
@@ -564,14 +565,7 @@ bad:
564 if (cm != NULL) 565 if (cm != NULL)
565 { 566 {
566 if (cm->type != NID_undef) 567 if (cm->type != NID_undef)
567 { 568 SSL_COMP_add_compression_method(comp, cm);
568 if (SSL_COMP_add_compression_method(comp, cm) != 0)
569 {
570 fprintf(stderr,
571 "Failed to add compression method\n");
572 ERR_print_errors_fp(stderr);
573 }
574 }
575 else 569 else
576 { 570 {
577 fprintf(stderr, 571 fprintf(stderr,
@@ -1507,8 +1501,8 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg)
1507 1501
1508 fprintf(stderr, "In app_verify_callback, allowing cert. "); 1502 fprintf(stderr, "In app_verify_callback, allowing cert. ");
1509 fprintf(stderr, "Arg is: %s\n", (char *)arg); 1503 fprintf(stderr, "Arg is: %s\n", (char *)arg);
1510 fprintf(stderr, "Finished printing do we have a context? 0x%x a cert? 0x%x\n", 1504 fprintf(stderr, "Finished printing do we have a context? 0x%lx a cert? 0x%lx\n",
1511 (unsigned int)ctx, (unsigned int)ctx->cert); 1505 (uintptr_t)ctx, (uintptr_t)ctx->cert);
1512 if (ctx->cert) 1506 if (ctx->cert)
1513 s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256); 1507 s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256);
1514 if (s != NULL) 1508 if (s != NULL)
diff --git a/src/lib/libssl/src/test/Makefile.ssl b/src/lib/libssl/src/test/Makefile.ssl
new file mode 100644
index 0000000000..373f17a929
--- /dev/null
+++ b/src/lib/libssl/src/test/Makefile.ssl
@@ -0,0 +1,796 @@
1#
2# test/Makefile.ssl
3#
4
5DIR= test
6TOP= ..
7CC= cc
8INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES)
9CFLAG= -g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP= /usr/local/ssl
13MAKEFILE= Makefile.ssl
14MAKE= make -f $(MAKEFILE)
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17PERL= perl
18# KRB5 stuff
19KRB5_INCLUDES=
20LIBKRB5=
21
22PEX_LIBS=
23EX_LIBS= #-lnsl -lsocket
24
25CFLAGS= $(INCLUDES) $(CFLAG)
26
27GENERAL=Makefile.ssl maketests.com \
28 tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \
29 tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \
30 testca.com VMSca-response.1 VMSca-response.2
31
32DLIBCRYPTO= ../libcrypto.a
33DLIBSSL= ../libssl.a
34LIBCRYPTO= -L.. -lcrypto
35LIBSSL= -L.. -lssl
36
37BNTEST= bntest
38ECTEST= ectest
39EXPTEST= exptest
40IDEATEST= ideatest
41SHATEST= shatest
42SHA1TEST= sha1test
43MDC2TEST= mdc2test
44RMDTEST= rmdtest
45MD2TEST= md2test
46MD4TEST= md4test
47MD5TEST= md5test
48HMACTEST= hmactest
49RC2TEST= rc2test
50RC4TEST= rc4test
51RC5TEST= rc5test
52BFTEST= bftest
53CASTTEST= casttest
54DESTEST= destest
55RANDTEST= randtest
56DHTEST= dhtest
57DSATEST= dsatest
58METHTEST= methtest
59SSLTEST= ssltest
60RSATEST= rsa_test
61ENGINETEST= enginetest
62EVPTEST= evp_test
63
64TESTS= alltests
65
66EXE= $(BNTEST) $(ECTEST) $(IDEATEST) $(MD2TEST) $(MD4TEST) $(MD5TEST) $(HMACTEST) \
67 $(RC2TEST) $(RC4TEST) $(RC5TEST) \
68 $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \
69 $(RANDTEST) $(DHTEST) $(ENGINETEST) \
70 $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(RSATEST) \
71 $(EVPTEST)
72
73# $(METHTEST)
74
75OBJ= $(BNTEST).o $(ECTEST).o $(IDEATEST).o $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \
76 $(HMACTEST).o \
77 $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \
78 $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \
79 $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \
80 $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \
81 $(EVPTEST).o
82SRC= $(BNTEST).c $(ECTEST).c $(IDEATEST).c $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \
83 $(HMACTEST).c \
84 $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \
85 $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \
86 $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \
87 $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c \
88 $(EVPTEST).c
89
90EXHEADER=
91HEADER= $(EXHEADER)
92
93ALL= $(GENERAL) $(SRC) $(HEADER)
94
95top:
96 (cd ..; $(MAKE) DIRS=$(DIR) TESTS=$(TESTS) all)
97
98all: exe
99
100exe: $(EXE) dummytest
101
102files:
103 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
104
105links:
106 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
107
108generate: $(SRC)
109$(SRC):
110 @sh $(TOP)/util/point.sh dummytest.c $@
111
112errors:
113
114install:
115
116tags:
117 ctags $(SRC)
118
119tests: exe apps $(TESTS)
120
121apps:
122 @(cd ..; $(MAKE) DIRS=apps all)
123
124SET_SO_PATHS=OSSL_LIBPATH="`cd ..; pwd`"; \
125 LD_LIBRARY_PATH="$$OSSL_LIBPATH:$$LD_LIBRARY_PATH"; \
126 DYLD_LIBRARY_PATH="$$OSSL_LIBPATH:$$DYLD_LIBRARY_PATH"; \
127 SHLIB_PATH="$$OSSL_LIBPATH:$$SHLIB_PATH"; \
128 LIBPATH="$$OSSL_LIBPATH:$$LIBPATH"; \
129 if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="$${LIBPATH}:$$PATH"; fi; \
130 export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH
131
132alltests: \
133 test_des test_idea test_sha test_md4 test_md5 test_hmac \
134 test_md2 test_mdc2 \
135 test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
136 test_rand test_bn test_ec test_enc test_x509 test_rsa test_crl test_sid \
137 test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
138 test_ss test_ca test_engine test_evp test_ssl
139
140test_evp:
141 $(SET_SO_PATHS); ./$(EVPTEST) evptests.txt
142
143test_des:
144 $(SET_SO_PATHS); ./$(DESTEST)
145
146test_idea:
147 $(SET_SO_PATHS); ./$(IDEATEST)
148
149test_sha:
150 $(SET_SO_PATHS); ./$(SHATEST)
151 $(SET_SO_PATHS); ./$(SHA1TEST)
152
153test_mdc2:
154 $(SET_SO_PATHS); ./$(MDC2TEST)
155
156test_md5:
157 $(SET_SO_PATHS); ./$(MD5TEST)
158
159test_md4:
160 $(SET_SO_PATHS); ./$(MD4TEST)
161
162test_hmac:
163 $(SET_SO_PATHS); ./$(HMACTEST)
164
165test_md2:
166 $(SET_SO_PATHS); ./$(MD2TEST)
167
168test_rmd:
169 $(SET_SO_PATHS); ./$(RMDTEST)
170
171test_bf:
172 $(SET_SO_PATHS); ./$(BFTEST)
173
174test_cast:
175 $(SET_SO_PATHS); ./$(CASTTEST)
176
177test_rc2:
178 $(SET_SO_PATHS); ./$(RC2TEST)
179
180test_rc4:
181 $(SET_SO_PATHS); ./$(RC4TEST)
182
183test_rc5:
184 $(SET_SO_PATHS); ./$(RC5TEST)
185
186test_rand:
187 $(SET_SO_PATHS); ./$(RANDTEST)
188
189test_enc:
190 @$(SET_SO_PATHS); sh ./testenc
191
192test_x509:
193 echo test normal x509v1 certificate
194 $(SET_SO_PATHS); sh ./tx509 2>/dev/null
195 echo test first x509v3 certificate
196 $(SET_SO_PATHS); sh ./tx509 v3-cert1.pem 2>/dev/null
197 echo test second x509v3 certificate
198 $(SET_SO_PATHS); sh ./tx509 v3-cert2.pem 2>/dev/null
199
200test_rsa:
201 @$(SET_SO_PATHS); sh ./trsa 2>/dev/null
202 $(SET_SO_PATHS); ./$(RSATEST)
203
204test_crl:
205 @$(SET_SO_PATHS); sh ./tcrl 2>/dev/null
206
207test_sid:
208 @$(SET_SO_PATHS); sh ./tsid 2>/dev/null
209
210test_req:
211 @$(SET_SO_PATHS); sh ./treq 2>/dev/null
212 @$(SET_SO_PATHS); sh ./treq testreq2.pem 2>/dev/null
213
214test_pkcs7:
215 @$(SET_SO_PATHS); sh ./tpkcs7 2>/dev/null
216 @$(SET_SO_PATHS); sh ./tpkcs7d 2>/dev/null
217
218test_bn:
219 @echo starting big number library test, could take a while...
220 @$(SET_SO_PATHS); ./$(BNTEST) >tmp.bntest
221 @echo quit >>tmp.bntest
222 @echo "running bc"
223 @<tmp.bntest sh -c "`sh ./bctest ignore`" | $(PERL) -e '$$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"'
224 @echo 'test a^b%c implementations'
225 $(SET_SO_PATHS); ./$(EXPTEST)
226
227test_ec:
228 @echo 'test elliptic curves'
229 $(SET_SO_PATHS); ./$(ECTEST)
230
231test_verify:
232 @echo "The following command should have some OK's and some failures"
233 @echo "There are definitly a few expired certificates"
234 -$(SET_SO_PATHS); ../apps/openssl verify -CApath ../certs ../certs/*.pem
235
236test_dh:
237 @echo "Generate a set of DH parameters"
238 $(SET_SO_PATHS); ./$(DHTEST)
239
240test_dsa:
241 @echo "Generate a set of DSA parameters"
242 $(SET_SO_PATHS); ./$(DSATEST)
243 $(SET_SO_PATHS); ./$(DSATEST) -app2_1
244
245test_gen:
246 @echo "Generate and verify a certificate request"
247 @$(SET_SO_PATHS); sh ./testgen
248
249test_ss keyU.ss certU.ss certCA.ss: testss
250 @echo "Generate and certify a test certificate"
251 @$(SET_SO_PATHS); sh ./testss
252
253test_engine:
254 @echo "Manipulate the ENGINE structures"
255 $(SET_SO_PATHS); ./$(ENGINETEST)
256
257test_ssl: keyU.ss certU.ss certCA.ss
258 @echo "test SSL protocol"
259 @$(SET_SO_PATHS); sh ./testssl keyU.ss certU.ss certCA.ss
260
261test_ca:
262 @$(SET_SO_PATHS); if ../apps/openssl no-rsa; then \
263 echo "skipping CA.sh test -- requires RSA"; \
264 else \
265 echo "Generate and certify a test certificate via the 'ca' program"; \
266 sh ./testca; \
267 fi
268
269test_aes: #$(AESTEST)
270# @echo "test Rijndael"
271# $(SET_SO_PATHS); ./$(AESTEST)
272
273lint:
274 lint -DLINT $(INCLUDES) $(SRC)>fluff
275
276depend:
277 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC)
278
279dclean:
280 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
281 mv -f Makefile.new $(MAKEFILE)
282
283clean:
284 rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log
285
286$(DLIBSSL):
287 (cd ..; $(MAKE) DIRS=ssl all)
288
289$(DLIBCRYPTO):
290 (cd ..; $(MAKE) DIRS=crypto all)
291
292$(RSATEST): $(RSATEST).o $(DLIBCRYPTO)
293 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
294 $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
295 else \
296 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
297 $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
298 fi
299
300$(BNTEST): $(BNTEST).o $(DLIBCRYPTO)
301 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
302 $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
303 else \
304 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
305 $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
306 fi
307
308$(ECTEST): $(ECTEST).o $(DLIBCRYPTO)
309 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
310 $(CC) -o $(ECTEST) $(CFLAGS) $(ECTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
311 else \
312 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
313 $(CC) -o $(ECTEST) $(CFLAGS) $(ECTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
314 fi
315
316$(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO)
317 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
318 $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
319 else \
320 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
321 $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
322 fi
323
324$(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO)
325 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
326 $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
327 else \
328 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
329 $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
330 fi
331
332$(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO)
333 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
334 $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
335 else \
336 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
337 $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
338 fi
339
340$(SHATEST): $(SHATEST).o $(DLIBCRYPTO)
341 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
342 $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
343 else \
344 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
345 $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
346 fi
347
348$(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO)
349 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
350 $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
351 else \
352 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
353 $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
354 fi
355
356$(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO)
357 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
358 $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
359 else \
360 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
361 $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
362 fi
363
364$(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO)
365 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
366 $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
367 else \
368 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
369 $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
370 fi
371
372$(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO)
373 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
374 $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
375 else \
376 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
377 $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
378 fi
379
380$(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO)
381 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
382 $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
383 else \
384 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
385 $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
386 fi
387
388$(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO)
389 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
390 $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
391 else \
392 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
393 $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
394 fi
395
396$(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO)
397 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
398 $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
399 else \
400 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
401 $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
402 fi
403
404$(BFTEST): $(BFTEST).o $(DLIBCRYPTO)
405 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
406 $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
407 else \
408 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
409 $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
410 fi
411
412$(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO)
413 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
414 $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
415 else \
416 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
417 $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
418 fi
419
420$(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO)
421 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
422 $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
423 else \
424 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
425 $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
426 fi
427
428$(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO)
429 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
430 $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
431 else \
432 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
433 $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
434 fi
435
436$(DESTEST): $(DESTEST).o $(DLIBCRYPTO)
437 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
438 $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
439 else \
440 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
441 $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
442 fi
443
444$(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO)
445 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
446 $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
447 else \
448 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
449 $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
450 fi
451
452$(DHTEST): $(DHTEST).o $(DLIBCRYPTO)
453 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
454 $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
455 else \
456 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
457 $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
458 fi
459
460$(DSATEST): $(DSATEST).o $(DLIBCRYPTO)
461 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
462 $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
463 else \
464 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
465 $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
466 fi
467
468$(METHTEST): $(METHTEST).o $(DLIBCRYPTO)
469 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
470 $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
471 else \
472 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
473 $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
474 fi
475
476$(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
477 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
478 $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
479 else \
480 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
481 $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
482 fi
483
484$(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO)
485 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
486 $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
487 else \
488 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
489 $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
490 fi
491
492$(EVPTEST): $(EVPTEST).o $(DLIBCRYPTO)
493 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
494 $(CC) -o $(EVPTEST) $(CFLAGS) $(EVPTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
495 else \
496 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
497 $(CC) -o $(EVPTEST) $(CFLAGS) $(EVPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
498 fi
499
500#$(AESTEST).o: $(AESTEST).c
501# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
502
503#$(AESTEST): $(AESTEST).o $(DLIBCRYPTO)
504# if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
505# $(CC) -o $(AESTEST) $(CFLAGS) $(AESTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
506# else \
507# LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
508# $(CC) -o $(AESTEST) $(CFLAGS) $(AESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
509# fi
510
511dummytest: dummytest.o $(DLIBCRYPTO)
512 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
513 $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
514 else \
515 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
516 $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
517 fi
518
519# DO NOT DELETE THIS LINE -- make depend depends on it.
520
521bftest.o: ../e_os.h ../include/openssl/blowfish.h ../include/openssl/e_os2.h
522bftest.o: ../include/openssl/opensslconf.h bftest.c
523bntest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
524bntest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
525bntest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
526bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h
527bntest.o: ../include/openssl/des.h ../include/openssl/des_old.h
528bntest.o: ../include/openssl/dh.h ../include/openssl/dsa.h
529bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
530bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h
531bntest.o: ../include/openssl/lhash.h ../include/openssl/md2.h
532bntest.o: ../include/openssl/md4.h ../include/openssl/md5.h
533bntest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
534bntest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
535bntest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
536bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
537bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
538bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
539bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
540bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h
541bntest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
542bntest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
543bntest.o: ../include/openssl/x509_vfy.h bntest.c
544casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h
545casttest.o: ../include/openssl/opensslconf.h casttest.c
546destest.o: ../include/openssl/crypto.h ../include/openssl/des.h
547destest.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
548destest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
549destest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
550destest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
551destest.o: ../include/openssl/ui_compat.h destest.c
552dhtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
553dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
554dhtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
555dhtest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
556dhtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
557dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
558dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h dhtest.c
559dsatest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
560dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
561dsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
562dsatest.o: ../include/openssl/err.h ../include/openssl/lhash.h
563dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
564dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
565dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
566dsatest.o: ../include/openssl/symhacks.h dsatest.c
567ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
568ectest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
569ectest.o: ../include/openssl/dh.h ../include/openssl/dsa.h
570ectest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
571ectest.o: ../include/openssl/engine.h ../include/openssl/err.h
572ectest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
573ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
574ectest.o: ../include/openssl/rand.h ../include/openssl/rsa.h
575ectest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
576ectest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h ectest.c
577enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
578enginetest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
579enginetest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
580enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
581enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h
582enginetest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
583enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
584enginetest.o: ../include/openssl/rand.h ../include/openssl/rsa.h
585enginetest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
586enginetest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
587enginetest.o: enginetest.c
588evp_test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
589evp_test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
590evp_test.o: ../include/openssl/bn.h ../include/openssl/cast.h
591evp_test.o: ../include/openssl/conf.h ../include/openssl/crypto.h
592evp_test.o: ../include/openssl/des.h ../include/openssl/des_old.h
593evp_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h
594evp_test.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
595evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h
596evp_test.o: ../include/openssl/idea.h ../include/openssl/lhash.h
597evp_test.o: ../include/openssl/md2.h ../include/openssl/md4.h
598evp_test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
599evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
600evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
601evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
602evp_test.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
603evp_test.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
604evp_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
605evp_test.o: ../include/openssl/sha.h ../include/openssl/stack.h
606evp_test.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
607evp_test.o: ../include/openssl/ui_compat.h evp_test.c
608exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
609exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
610exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h
611exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
612exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
613exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
614exptest.o: ../include/openssl/symhacks.h exptest.c
615hmactest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
616hmactest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
617hmactest.o: ../include/openssl/bn.h ../include/openssl/cast.h
618hmactest.o: ../include/openssl/crypto.h ../include/openssl/des.h
619hmactest.o: ../include/openssl/des_old.h ../include/openssl/dh.h
620hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
621hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h
622hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h
623hmactest.o: ../include/openssl/md4.h ../include/openssl/md5.h
624hmactest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
625hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
626hmactest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
627hmactest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
628hmactest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
629hmactest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
630hmactest.o: ../include/openssl/sha.h ../include/openssl/stack.h
631hmactest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
632hmactest.o: ../include/openssl/ui_compat.h hmactest.c
633ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h
634ideatest.o: ../include/openssl/opensslconf.h ideatest.c
635md2test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
636md2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
637md2test.o: ../include/openssl/bn.h ../include/openssl/cast.h
638md2test.o: ../include/openssl/crypto.h ../include/openssl/des.h
639md2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
640md2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
641md2test.o: ../include/openssl/evp.h ../include/openssl/idea.h
642md2test.o: ../include/openssl/md2.h ../include/openssl/md4.h
643md2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
644md2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
645md2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
646md2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
647md2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
648md2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
649md2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
650md2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
651md2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md2test.c
652md4test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
653md4test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
654md4test.o: ../include/openssl/bn.h ../include/openssl/cast.h
655md4test.o: ../include/openssl/crypto.h ../include/openssl/des.h
656md4test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
657md4test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
658md4test.o: ../include/openssl/evp.h ../include/openssl/idea.h
659md4test.o: ../include/openssl/md2.h ../include/openssl/md4.h
660md4test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
661md4test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
662md4test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
663md4test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
664md4test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
665md4test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
666md4test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
667md4test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
668md4test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md4test.c
669md5test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
670md5test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
671md5test.o: ../include/openssl/bn.h ../include/openssl/cast.h
672md5test.o: ../include/openssl/crypto.h ../include/openssl/des.h
673md5test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
674md5test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
675md5test.o: ../include/openssl/evp.h ../include/openssl/idea.h
676md5test.o: ../include/openssl/md2.h ../include/openssl/md4.h
677md5test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
678md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
679md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
680md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
681md5test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
682md5test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
683md5test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
684md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
685md5test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md5test.c
686mdc2test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
687mdc2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
688mdc2test.o: ../include/openssl/bn.h ../include/openssl/cast.h
689mdc2test.o: ../include/openssl/crypto.h ../include/openssl/des.h
690mdc2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
691mdc2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
692mdc2test.o: ../include/openssl/evp.h ../include/openssl/idea.h
693mdc2test.o: ../include/openssl/md2.h ../include/openssl/md4.h
694mdc2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
695mdc2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
696mdc2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
697mdc2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
698mdc2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
699mdc2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
700mdc2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
701mdc2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
702mdc2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h mdc2test.c
703randtest.o: ../e_os.h ../include/openssl/e_os2.h
704randtest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h
705randtest.o: ../include/openssl/rand.h randtest.c
706rc2test.o: ../e_os.h ../include/openssl/e_os2.h
707rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h rc2test.c
708rc4test.o: ../e_os.h ../include/openssl/e_os2.h
709rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h rc4test.c
710rc5test.o: ../e_os.h ../include/openssl/e_os2.h
711rc5test.o: ../include/openssl/opensslconf.h ../include/openssl/rc5.h rc5test.c
712rmdtest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
713rmdtest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
714rmdtest.o: ../include/openssl/bn.h ../include/openssl/cast.h
715rmdtest.o: ../include/openssl/crypto.h ../include/openssl/des.h
716rmdtest.o: ../include/openssl/des_old.h ../include/openssl/dh.h
717rmdtest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
718rmdtest.o: ../include/openssl/evp.h ../include/openssl/idea.h
719rmdtest.o: ../include/openssl/md2.h ../include/openssl/md4.h
720rmdtest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
721rmdtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
722rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
723rmdtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
724rmdtest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
725rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
726rmdtest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
727rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
728rmdtest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h rmdtest.c
729rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
730rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
731rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h
732rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
733rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
734rsa_test.o: ../include/openssl/rand.h ../include/openssl/rsa.h
735rsa_test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
736rsa_test.o: ../include/openssl/symhacks.h rsa_test.c
737sha1test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
738sha1test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
739sha1test.o: ../include/openssl/bn.h ../include/openssl/cast.h
740sha1test.o: ../include/openssl/crypto.h ../include/openssl/des.h
741sha1test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
742sha1test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
743sha1test.o: ../include/openssl/evp.h ../include/openssl/idea.h
744sha1test.o: ../include/openssl/md2.h ../include/openssl/md4.h
745sha1test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
746sha1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
747sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
748sha1test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
749sha1test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
750sha1test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
751sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
752sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
753sha1test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h sha1test.c
754shatest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
755shatest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
756shatest.o: ../include/openssl/bn.h ../include/openssl/cast.h
757shatest.o: ../include/openssl/crypto.h ../include/openssl/des.h
758shatest.o: ../include/openssl/des_old.h ../include/openssl/dh.h
759shatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
760shatest.o: ../include/openssl/evp.h ../include/openssl/idea.h
761shatest.o: ../include/openssl/md2.h ../include/openssl/md4.h
762shatest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
763shatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
764shatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
765shatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
766shatest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
767shatest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
768shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
769shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
770shatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h shatest.c
771ssltest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
772ssltest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
773ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
774ssltest.o: ../include/openssl/cast.h ../include/openssl/comp.h
775ssltest.o: ../include/openssl/crypto.h ../include/openssl/des.h
776ssltest.o: ../include/openssl/des_old.h ../include/openssl/dh.h
777ssltest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
778ssltest.o: ../include/openssl/engine.h ../include/openssl/err.h
779ssltest.o: ../include/openssl/evp.h ../include/openssl/idea.h
780ssltest.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
781ssltest.o: ../include/openssl/md2.h ../include/openssl/md4.h
782ssltest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
783ssltest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
784ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
785ssltest.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
786ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
787ssltest.o: ../include/openssl/rand.h ../include/openssl/rc2.h
788ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
789ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
790ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
791ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
792ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
793ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
794ssltest.o: ../include/openssl/tls1.h ../include/openssl/ui.h
795ssltest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
796ssltest.o: ../include/openssl/x509_vfy.h ssltest.c
diff --git a/src/lib/libssl/src/test/enginetest.c b/src/lib/libssl/src/test/enginetest.c
new file mode 100644
index 0000000000..87fa8c57b7
--- /dev/null
+++ b/src/lib/libssl/src/test/enginetest.c
@@ -0,0 +1,274 @@
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-2001 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/e_os2.h>
60#include <stdio.h>
61#include <string.h>
62#include <openssl/buffer.h>
63#include <openssl/crypto.h>
64#include <openssl/engine.h>
65#include <openssl/err.h>
66
67static void display_engine_list()
68 {
69 ENGINE *h;
70 int loop;
71
72 h = ENGINE_get_first();
73 loop = 0;
74 printf("listing available engine types\n");
75 while(h)
76 {
77 printf("engine %i, id = \"%s\", name = \"%s\"\n",
78 loop++, ENGINE_get_id(h), ENGINE_get_name(h));
79 h = ENGINE_get_next(h);
80 }
81 printf("end of list\n");
82 /* ENGINE_get_first() increases the struct_ref counter, so we
83 must call ENGINE_free() to decrease it again */
84 ENGINE_free(h);
85 }
86
87int main(int argc, char *argv[])
88 {
89 ENGINE *block[512];
90 char buf[256];
91 const char *id, *name;
92 ENGINE *ptr;
93 int loop;
94 int to_return = 1;
95 ENGINE *new_h1 = NULL;
96 ENGINE *new_h2 = NULL;
97 ENGINE *new_h3 = NULL;
98 ENGINE *new_h4 = NULL;
99
100 /* enable memory leak checking unless explicitly disabled */
101 if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))))
102 {
103 CRYPTO_malloc_debug_init();
104 CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);
105 }
106 else
107 {
108 /* OPENSSL_DEBUG_MEMORY=off */
109 CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0);
110 }
111 CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
112 ERR_load_crypto_strings();
113
114 memset(block, 0, 512 * sizeof(ENGINE *));
115 if(((new_h1 = ENGINE_new()) == NULL) ||
116 !ENGINE_set_id(new_h1, "test_id0") ||
117 !ENGINE_set_name(new_h1, "First test item") ||
118 ((new_h2 = ENGINE_new()) == NULL) ||
119 !ENGINE_set_id(new_h2, "test_id1") ||
120 !ENGINE_set_name(new_h2, "Second test item") ||
121 ((new_h3 = ENGINE_new()) == NULL) ||
122 !ENGINE_set_id(new_h3, "test_id2") ||
123 !ENGINE_set_name(new_h3, "Third test item") ||
124 ((new_h4 = ENGINE_new()) == NULL) ||
125 !ENGINE_set_id(new_h4, "test_id3") ||
126 !ENGINE_set_name(new_h4, "Fourth test item"))
127 {
128 printf("Couldn't set up test ENGINE structures\n");
129 goto end;
130 }
131 printf("\nenginetest beginning\n\n");
132 display_engine_list();
133 if(!ENGINE_add(new_h1))
134 {
135 printf("Add failed!\n");
136 goto end;
137 }
138 display_engine_list();
139 ptr = ENGINE_get_first();
140 if(!ENGINE_remove(ptr))
141 {
142 printf("Remove failed!\n");
143 goto end;
144 }
145 if (ptr)
146 ENGINE_free(ptr);
147 display_engine_list();
148 if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2))
149 {
150 printf("Add failed!\n");
151 goto end;
152 }
153 display_engine_list();
154 if(!ENGINE_remove(new_h2))
155 {
156 printf("Remove failed!\n");
157 goto end;
158 }
159 display_engine_list();
160 if(!ENGINE_add(new_h4))
161 {
162 printf("Add failed!\n");
163 goto end;
164 }
165 display_engine_list();
166 if(ENGINE_add(new_h3))
167 {
168 printf("Add *should* have failed but didn't!\n");
169 goto end;
170 }
171 else
172 printf("Add that should fail did.\n");
173 ERR_clear_error();
174 if(ENGINE_remove(new_h2))
175 {
176 printf("Remove *should* have failed but didn't!\n");
177 goto end;
178 }
179 else
180 printf("Remove that should fail did.\n");
181 ERR_clear_error();
182 if(!ENGINE_remove(new_h3))
183 {
184 printf("Remove failed!\n");
185 goto end;
186 }
187 display_engine_list();
188 if(!ENGINE_remove(new_h4))
189 {
190 printf("Remove failed!\n");
191 goto end;
192 }
193 display_engine_list();
194 /* Depending on whether there's any hardware support compiled
195 * in, this remove may be destined to fail. */
196 ptr = ENGINE_get_first();
197 if(ptr)
198 if(!ENGINE_remove(ptr))
199 printf("Remove failed!i - probably no hardware "
200 "support present.\n");
201 if (ptr)
202 ENGINE_free(ptr);
203 display_engine_list();
204 if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1))
205 {
206 printf("Couldn't add and remove to an empty list!\n");
207 goto end;
208 }
209 else
210 printf("Successfully added and removed to an empty list!\n");
211 printf("About to beef up the engine-type list\n");
212 for(loop = 0; loop < 512; loop++)
213 {
214 sprintf(buf, "id%i", loop);
215 id = BUF_strdup(buf);
216 sprintf(buf, "Fake engine type %i", loop);
217 name = BUF_strdup(buf);
218 if(((block[loop] = ENGINE_new()) == NULL) ||
219 !ENGINE_set_id(block[loop], id) ||
220 !ENGINE_set_name(block[loop], name))
221 {
222 printf("Couldn't create block of ENGINE structures.\n"
223 "I'll probably also core-dump now, damn.\n");
224 goto end;
225 }
226 }
227 for(loop = 0; loop < 512; loop++)
228 {
229 if(!ENGINE_add(block[loop]))
230 {
231 printf("\nAdding stopped at %i, (%s,%s)\n",
232 loop, ENGINE_get_id(block[loop]),
233 ENGINE_get_name(block[loop]));
234 goto cleanup_loop;
235 }
236 else
237 printf("."); fflush(stdout);
238 }
239cleanup_loop:
240 printf("\nAbout to empty the engine-type list\n");
241 while((ptr = ENGINE_get_first()) != NULL)
242 {
243 if(!ENGINE_remove(ptr))
244 {
245 printf("\nRemove failed!\n");
246 goto end;
247 }
248 ENGINE_free(ptr);
249 printf("."); fflush(stdout);
250 }
251 for(loop = 0; loop < 512; loop++)
252 {
253 OPENSSL_free((void *)ENGINE_get_id(block[loop]));
254 OPENSSL_free((void *)ENGINE_get_name(block[loop]));
255 }
256 printf("\nTests completed happily\n");
257 to_return = 0;
258end:
259 if(to_return)
260 ERR_print_errors_fp(stderr);
261 if(new_h1) ENGINE_free(new_h1);
262 if(new_h2) ENGINE_free(new_h2);
263 if(new_h3) ENGINE_free(new_h3);
264 if(new_h4) ENGINE_free(new_h4);
265 for(loop = 0; loop < 512; loop++)
266 if(block[loop])
267 ENGINE_free(block[loop]);
268 ENGINE_cleanup();
269 CRYPTO_cleanup_all_ex_data();
270 ERR_free_strings();
271 ERR_remove_state(0);
272 CRYPTO_mem_leaks_fp(stderr);
273 return to_return;
274 }
diff --git a/src/lib/libssl/src/test/md4test.c b/src/lib/libssl/src/test/md4test.c
new file mode 100644
index 0000000000..e0fdc42282
--- /dev/null
+++ b/src/lib/libssl/src/test/md4test.c
@@ -0,0 +1,134 @@
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 OPENSSL_NO_MD4
64int main(int argc, char *argv[])
65{
66 printf("No MD4 support\n");
67 return(0);
68}
69#else
70#include <openssl/evp.h>
71#include <openssl/md4.h>
72
73static char *test[]={
74 "",
75 "a",
76 "abc",
77 "message digest",
78 "abcdefghijklmnopqrstuvwxyz",
79 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
80 "12345678901234567890123456789012345678901234567890123456789012345678901234567890",
81 NULL,
82 };
83
84static char *ret[]={
85"31d6cfe0d16ae931b73c59d7e0c089c0",
86"bde52cb31de33e46245e05fbdbd6fb24",
87"a448017aaf21d8525fc10ae87aa6729d",
88"d9130a8164549fe818874806e1c7014b",
89"d79e1c308aa5bbcdeea8ed63df412da9",
90"043f8582f241db351ce627e153e7f0e4",
91"e33b4ddc9c38f2199c3e7b164fcc0536",
92};
93
94static char *pt(unsigned char *md);
95int main(int argc, char *argv[])
96 {
97 int i,err=0;
98 unsigned char **P,**R;
99 char *p;
100 unsigned char md[MD4_DIGEST_LENGTH];
101
102 P=(unsigned char **)test;
103 R=(unsigned char **)ret;
104 i=1;
105 while (*P != NULL)
106 {
107 EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md4(), NULL);
108 p=pt(md);
109 if (strcmp(p,(char *)*R) != 0)
110 {
111 printf("error calculating MD4 on '%s'\n",*P);
112 printf("got %s instead of %s\n",p,*R);
113 err++;
114 }
115 else
116 printf("test %d ok\n",i);
117 i++;
118 R++;
119 P++;
120 }
121 exit(err);
122 return(0);
123 }
124
125static char *pt(unsigned char *md)
126 {
127 int i;
128 static char buf[80];
129
130 for (i=0; i<MD4_DIGEST_LENGTH; i++)
131 sprintf(&(buf[i*2]),"%02x",md[i]);
132 return(buf);
133 }
134#endif
diff --git a/src/lib/libssl/src/test/rsa_test.c b/src/lib/libssl/src/test/rsa_test.c
new file mode 100644
index 0000000000..b8b462d33b
--- /dev/null
+++ b/src/lib/libssl/src/test/rsa_test.c
@@ -0,0 +1,318 @@
1/* test vectors from p1ovect1.txt */
2
3#include <stdio.h>
4#include <string.h>
5
6#include "e_os.h"
7
8#include <openssl/crypto.h>
9#include <openssl/err.h>
10#include <openssl/rand.h>
11#ifdef OPENSSL_NO_RSA
12int main(int argc, char *argv[])
13{
14 printf("No RSA support\n");
15 return(0);
16}
17#else
18#include <openssl/rsa.h>
19#include <openssl/engine.h>
20
21#define SetKey \
22 key->n = BN_bin2bn(n, sizeof(n)-1, key->n); \
23 key->e = BN_bin2bn(e, sizeof(e)-1, key->e); \
24 key->d = BN_bin2bn(d, sizeof(d)-1, key->d); \
25 key->p = BN_bin2bn(p, sizeof(p)-1, key->p); \
26 key->q = BN_bin2bn(q, sizeof(q)-1, key->q); \
27 key->dmp1 = BN_bin2bn(dmp1, sizeof(dmp1)-1, key->dmp1); \
28 key->dmq1 = BN_bin2bn(dmq1, sizeof(dmq1)-1, key->dmq1); \
29 key->iqmp = BN_bin2bn(iqmp, sizeof(iqmp)-1, key->iqmp); \
30 memcpy(c, ctext_ex, sizeof(ctext_ex) - 1); \
31 return (sizeof(ctext_ex) - 1);
32
33static int key1(RSA *key, unsigned char *c)
34 {
35 static unsigned char n[] =
36"\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
37"\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
38"\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93"
39"\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1"
40"\xF5";
41
42 static unsigned char e[] = "\x11";
43
44 static unsigned char d[] =
45"\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44"
46"\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
47"\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
48"\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51";
49
50 static unsigned char p[] =
51"\x00\xD8\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
52"\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x12"
53"\x0D";
54
55 static unsigned char q[] =
56"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
57"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
58"\x89";
59
60 static unsigned char dmp1[] =
61"\x59\x0B\x95\x72\xA2\xC2\xA9\xC4\x06\x05\x9D\xC2\xAB\x2F\x1D\xAF"
62"\xEB\x7E\x8B\x4F\x10\xA7\x54\x9E\x8E\xED\xF5\xB4\xFC\xE0\x9E\x05";
63
64 static unsigned char dmq1[] =
65"\x00\x8E\x3C\x05\x21\xFE\x15\xE0\xEA\x06\xA3\x6F\xF0\xF1\x0C\x99"
66"\x52\xC3\x5B\x7A\x75\x14\xFD\x32\x38\xB8\x0A\xAD\x52\x98\x62\x8D"
67"\x51";
68
69 static unsigned char iqmp[] =
70"\x36\x3F\xF7\x18\x9D\xA8\xE9\x0B\x1D\x34\x1F\x71\xD0\x9B\x76\xA8"
71"\xA9\x43\xE1\x1D\x10\xB2\x4D\x24\x9F\x2D\xEA\xFE\xF8\x0C\x18\x26";
72
73 static unsigned char ctext_ex[] =
74"\x1b\x8f\x05\xf9\xca\x1a\x79\x52\x6e\x53\xf3\xcc\x51\x4f\xdb\x89"
75"\x2b\xfb\x91\x93\x23\x1e\x78\xb9\x92\xe6\x8d\x50\xa4\x80\xcb\x52"
76"\x33\x89\x5c\x74\x95\x8d\x5d\x02\xab\x8c\x0f\xd0\x40\xeb\x58\x44"
77"\xb0\x05\xc3\x9e\xd8\x27\x4a\x9d\xbf\xa8\x06\x71\x40\x94\x39\xd2";
78
79 SetKey;
80 }
81
82static int key2(RSA *key, unsigned char *c)
83 {
84 static unsigned char n[] =
85"\x00\xA3\x07\x9A\x90\xDF\x0D\xFD\x72\xAC\x09\x0C\xCC\x2A\x78\xB8"
86"\x74\x13\x13\x3E\x40\x75\x9C\x98\xFA\xF8\x20\x4F\x35\x8A\x0B\x26"
87"\x3C\x67\x70\xE7\x83\xA9\x3B\x69\x71\xB7\x37\x79\xD2\x71\x7B\xE8"
88"\x34\x77\xCF";
89
90 static unsigned char e[] = "\x3";
91
92 static unsigned char d[] =
93"\x6C\xAF\xBC\x60\x94\xB3\xFE\x4C\x72\xB0\xB3\x32\xC6\xFB\x25\xA2"
94"\xB7\x62\x29\x80\x4E\x68\x65\xFC\xA4\x5A\x74\xDF\x0F\x8F\xB8\x41"
95"\x3B\x52\xC0\xD0\xE5\x3D\x9B\x59\x0F\xF1\x9B\xE7\x9F\x49\xDD\x21"
96"\xE5\xEB";
97
98 static unsigned char p[] =
99"\x00\xCF\x20\x35\x02\x8B\x9D\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92"
100"\xEA\x0D\xA3\xB4\x32\x04\xB5\xCF\xCE\x91";
101
102 static unsigned char q[] =
103"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
104"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5F";
105
106 static unsigned char dmp1[] =
107"\x00\x8A\x15\x78\xAC\x5D\x13\xAF\x10\x2B\x22\xB9\x99\xCD\x74\x61"
108"\xF1\x5E\x6D\x22\xCC\x03\x23\xDF\xDF\x0B";
109
110 static unsigned char dmq1[] =
111"\x00\x86\x55\x21\x4A\xC5\x4D\x8D\x4E\xCD\x61\x77\xF1\xC7\x36\x90"
112"\xCE\x2A\x48\x2C\x8B\x05\x99\xCB\xE0\x3F";
113
114 static unsigned char iqmp[] =
115"\x00\x83\xEF\xEF\xB8\xA9\xA4\x0D\x1D\xB6\xED\x98\xAD\x84\xED\x13"
116"\x35\xDC\xC1\x08\xF3\x22\xD0\x57\xCF\x8D";
117
118 static unsigned char ctext_ex[] =
119"\x14\xbd\xdd\x28\xc9\x83\x35\x19\x23\x80\xe8\xe5\x49\xb1\x58\x2a"
120"\x8b\x40\xb4\x48\x6d\x03\xa6\xa5\x31\x1f\x1f\xd5\xf0\xa1\x80\xe4"
121"\x17\x53\x03\x29\xa9\x34\x90\x74\xb1\x52\x13\x54\x29\x08\x24\x52"
122"\x62\x51";
123
124 SetKey;
125 }
126
127static int key3(RSA *key, unsigned char *c)
128 {
129 static unsigned char n[] =
130"\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
131"\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
132"\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD"
133"\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80"
134"\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25"
135"\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39"
136"\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68"
137"\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD"
138"\xCB";
139
140 static unsigned char e[] = "\x11";
141
142 static unsigned char d[] =
143"\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD"
144"\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41"
145"\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69"
146"\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA"
147"\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94"
148"\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A"
149"\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94"
150"\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
151"\xC1";
152
153 static unsigned char p[] =
154"\x00\xEE\xCF\xAE\x81\xB1\xB9\xB3\xC9\x08\x81\x0B\x10\xA1\xB5\x60"
155"\x01\x99\xEB\x9F\x44\xAE\xF4\xFD\xA4\x93\xB8\x1A\x9E\x3D\x84\xF6"
156"\x32\x12\x4E\xF0\x23\x6E\x5D\x1E\x3B\x7E\x28\xFA\xE7\xAA\x04\x0A"
157"\x2D\x5B\x25\x21\x76\x45\x9D\x1F\x39\x75\x41\xBA\x2A\x58\xFB\x65"
158"\x99";
159
160 static unsigned char q[] =
161"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
162"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
163"\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
164"\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x15"
165"\x03";
166
167 static unsigned char dmp1[] =
168"\x54\x49\x4C\xA6\x3E\xBA\x03\x37\xE4\xE2\x40\x23\xFC\xD6\x9A\x5A"
169"\xEB\x07\xDD\xDC\x01\x83\xA4\xD0\xAC\x9B\x54\xB0\x51\xF2\xB1\x3E"
170"\xD9\x49\x09\x75\xEA\xB7\x74\x14\xFF\x59\xC1\xF7\x69\x2E\x9A\x2E"
171"\x20\x2B\x38\xFC\x91\x0A\x47\x41\x74\xAD\xC9\x3C\x1F\x67\xC9\x81";
172
173 static unsigned char dmq1[] =
174"\x47\x1E\x02\x90\xFF\x0A\xF0\x75\x03\x51\xB7\xF8\x78\x86\x4C\xA9"
175"\x61\xAD\xBD\x3A\x8A\x7E\x99\x1C\x5C\x05\x56\xA9\x4C\x31\x46\xA7"
176"\xF9\x80\x3F\x8F\x6F\x8A\xE3\x42\xE9\x31\xFD\x8A\xE4\x7A\x22\x0D"
177"\x1B\x99\xA4\x95\x84\x98\x07\xFE\x39\xF9\x24\x5A\x98\x36\xDA\x3D";
178
179 static unsigned char iqmp[] =
180"\x00\xB0\x6C\x4F\xDA\xBB\x63\x01\x19\x8D\x26\x5B\xDB\xAE\x94\x23"
181"\xB3\x80\xF2\x71\xF7\x34\x53\x88\x50\x93\x07\x7F\xCD\x39\xE2\x11"
182"\x9F\xC9\x86\x32\x15\x4F\x58\x83\xB1\x67\xA9\x67\xBF\x40\x2B\x4E"
183"\x9E\x2E\x0F\x96\x56\xE6\x98\xEA\x36\x66\xED\xFB\x25\x79\x80\x39"
184"\xF7";
185
186 static unsigned char ctext_ex[] =
187"\xb8\x24\x6b\x56\xa6\xed\x58\x81\xae\xb5\x85\xd9\xa2\x5b\x2a\xd7"
188"\x90\xc4\x17\xe0\x80\x68\x1b\xf1\xac\x2b\xc3\xde\xb6\x9d\x8b\xce"
189"\xf0\xc4\x36\x6f\xec\x40\x0a\xf0\x52\xa7\x2e\x9b\x0e\xff\xb5\xb3"
190"\xf2\xf1\x92\xdb\xea\xca\x03\xc1\x27\x40\x05\x71\x13\xbf\x1f\x06"
191"\x69\xac\x22\xe9\xf3\xa7\x85\x2e\x3c\x15\xd9\x13\xca\xb0\xb8\x86"
192"\x3a\x95\xc9\x92\x94\xce\x86\x74\x21\x49\x54\x61\x03\x46\xf4\xd4"
193"\x74\xb2\x6f\x7c\x48\xb4\x2e\xe6\x8e\x1f\x57\x2a\x1f\xc4\x02\x6a"
194"\xc4\x56\xb4\xf5\x9f\x7b\x62\x1e\xa1\xb9\xd8\x8f\x64\x20\x2f\xb1";
195
196 SetKey;
197 }
198
199static int pad_unknown(void)
200{
201 unsigned long l;
202 while ((l = ERR_get_error()) != 0)
203 if (ERR_GET_REASON(l) == RSA_R_UNKNOWN_PADDING_TYPE)
204 return(1);
205 return(0);
206}
207
208static const char rnd_seed[] = "string to make the random number generator think it has entropy";
209
210int main(int argc, char *argv[])
211 {
212 int err=0;
213 int v;
214 RSA *key;
215 unsigned char ptext[256];
216 unsigned char ctext[256];
217 static unsigned char ptext_ex[] = "\x54\x85\x9b\x34\x2c\x49\xea\x2a";
218 unsigned char ctext_ex[256];
219 int plen;
220 int clen = 0;
221 int num;
222
223 CRYPTO_malloc_debug_init();
224 CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
225 CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
226
227 RAND_seed(rnd_seed, sizeof rnd_seed); /* or OAEP may fail */
228
229 plen = sizeof(ptext_ex) - 1;
230
231 for (v = 0; v < 3; v++)
232 {
233 key = RSA_new();
234 switch (v) {
235 case 0:
236 clen = key1(key, ctext_ex);
237 break;
238 case 1:
239 clen = key2(key, ctext_ex);
240 break;
241 case 2:
242 clen = key3(key, ctext_ex);
243 break;
244 }
245
246 num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
247 RSA_PKCS1_PADDING);
248 if (num != clen)
249 {
250 printf("PKCS#1 v1.5 encryption failed!\n");
251 err=1;
252 goto oaep;
253 }
254
255 num = RSA_private_decrypt(num, ctext, ptext, key,
256 RSA_PKCS1_PADDING);
257 if (num != plen || memcmp(ptext, ptext_ex, num) != 0)
258 {
259 printf("PKCS#1 v1.5 decryption failed!\n");
260 err=1;
261 }
262 else
263 printf("PKCS #1 v1.5 encryption/decryption ok\n");
264
265 oaep:
266 ERR_clear_error();
267 num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
268 RSA_PKCS1_OAEP_PADDING);
269 if (num == -1 && pad_unknown())
270 {
271 printf("No OAEP support\n");
272 goto next;
273 }
274 if (num != clen)
275 {
276 printf("OAEP encryption failed!\n");
277 err=1;
278 goto next;
279 }
280
281 num = RSA_private_decrypt(num, ctext, ptext, key,
282 RSA_PKCS1_OAEP_PADDING);
283 if (num != plen || memcmp(ptext, ptext_ex, num) != 0)
284 {
285 printf("OAEP decryption (encrypted data) failed!\n");
286 err=1;
287 }
288 else if (memcmp(ctext, ctext_ex, num) == 0)
289 {
290 printf("OAEP test vector %d passed!\n", v);
291 goto next;
292 }
293
294 /* Different ciphertexts (rsa_oaep.c without -DPKCS_TESTVECT).
295 Try decrypting ctext_ex */
296
297 num = RSA_private_decrypt(clen, ctext_ex, ptext, key,
298 RSA_PKCS1_OAEP_PADDING);
299
300 if (num != plen || memcmp(ptext, ptext_ex, num) != 0)
301 {
302 printf("OAEP decryption (test vector data) failed!\n");
303 err=1;
304 }
305 else
306 printf("OAEP encryption/decryption ok\n");
307 next:
308 RSA_free(key);
309 }
310
311 CRYPTO_cleanup_all_ex_data();
312 ERR_remove_state(0);
313
314 CRYPTO_mem_leaks_fp(stderr);
315
316 return err;
317 }
318#endif
diff --git a/src/lib/libssl/src/tools/Makefile.ssl b/src/lib/libssl/src/tools/Makefile.ssl
new file mode 100644
index 0000000000..cb33d4a41e
--- /dev/null
+++ b/src/lib/libssl/src/tools/Makefile.ssl
@@ -0,0 +1,64 @@
1#
2# SSLeay/tools/Makefile
3#
4
5DIR= tools
6TOP= ..
7CC= cc
8INCLUDES= -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17
18CFLAGS= $(INCLUDES) $(CFLAG)
19
20GENERAL=Makefile.ssl
21TEST=
22APPS= c_rehash
23MISC_APPS= c_hash c_info c_issuer c_name
24
25all:
26
27install:
28 @for i in $(APPS) ; \
29 do \
30 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
31 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
32 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
33 done;
34 @for i in $(MISC_APPS) ; \
35 do \
36 (cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
37 chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
38 mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
39 done;
40
41files:
42 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
43
44links:
45 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
46
47lint:
48
49tags:
50
51errors:
52
53depend:
54
55dclean:
56 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
57 mv -f Makefile.new $(MAKEFILE)
58
59clean:
60 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
61
62errors:
63
64# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/src/lib/libssl/src/tools/c_rehash b/src/lib/libssl/src/tools/c_rehash
deleted file mode 100644
index 3e9ba1efe4..0000000000
--- a/src/lib/libssl/src/tools/c_rehash
+++ /dev/null
@@ -1,160 +0,0 @@
1#!/usr/local/bin/perl
2
3
4# Perl c_rehash script, scan all files in a directory
5# and add symbolic links to their hash values.
6
7my $openssl;
8
9my $dir = "/usr/local/ssl";
10
11if(defined $ENV{OPENSSL}) {
12 $openssl = $ENV{OPENSSL};
13} else {
14 $openssl = "openssl";
15 $ENV{OPENSSL} = $openssl;
16}
17
18$ENV{PATH} .= ":$dir/bin";
19
20if(! -x $openssl) {
21 my $found = 0;
22 foreach (split /:/, $ENV{PATH}) {
23 if(-x "$_/$openssl") {
24 $found = 1;
25 last;
26 }
27 }
28 if($found == 0) {
29 print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n";
30 exit 0;
31 }
32}
33
34if(@ARGV) {
35 @dirlist = @ARGV;
36} elsif($ENV{SSL_CERT_DIR}) {
37 @dirlist = split /:/, $ENV{SSL_CERT_DIR};
38} else {
39 $dirlist[0] = "$dir/certs";
40}
41
42
43foreach (@dirlist) {
44 if(-d $_ and -w $_) {
45 hash_dir($_);
46 }
47}
48
49sub hash_dir {
50 my %hashlist;
51 print "Doing $_[0]\n";
52 chdir $_[0];
53 opendir(DIR, ".");
54 my @flist = readdir(DIR);
55 # Delete any existing symbolic links
56 foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) {
57 if(-l $_) {
58 unlink $_;
59 }
60 }
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
74sub 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
101sub link_hash_cert {
102 my $fname = $_[0];
103 $fname =~ s/'/'\\''/g;
104 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
105 chomp $hash;
106 chomp $fprint;
107 $fprint =~ s/^.*=//;
108 $fprint =~ tr/://d;
109 my $suffix = 0;
110 # Search for an unused hash filename
111 while(exists $hashlist{"$hash.$suffix"}) {
112 # Hash matches: if fingerprint matches its a duplicate cert
113 if($hashlist{"$hash.$suffix"} eq $fprint) {
114 print STDERR "WARNING: Skipping duplicate certificate $fname\n";
115 return;
116 }
117 $suffix++;
118 }
119 $hash .= ".$suffix";
120 print "$fname => $hash\n";
121 $symlink_exists=eval {symlink("",""); 1};
122 if ($symlink_exists) {
123 symlink $fname, $hash;
124 } else {
125 system ("cp", $fname, $hash);
126 }
127 $hashlist{$hash} = $fprint;
128}
129
130# Same as above except for a CRL. CRL links are of the form <hash>.r<n>
131
132sub link_hash_crl {
133 my $fname = $_[0];
134 $fname =~ s/'/'\\''/g;
135 my ($hash, $fprint) = `"$openssl" crl -hash -fingerprint -noout -in '$fname'`;
136 chomp $hash;
137 chomp $fprint;
138 $fprint =~ s/^.*=//;
139 $fprint =~ tr/://d;
140 my $suffix = 0;
141 # Search for an unused hash filename
142 while(exists $hashlist{"$hash.r$suffix"}) {
143 # Hash matches: if fingerprint matches its a duplicate cert
144 if($hashlist{"$hash.r$suffix"} eq $fprint) {
145 print STDERR "WARNING: Skipping duplicate CRL $fname\n";
146 return;
147 }
148 $suffix++;
149 }
150 $hash .= ".r$suffix";
151 print "$fname => $hash\n";
152 $symlink_exists=eval {symlink("",""); 1};
153 if ($symlink_exists) {
154 symlink $fname, $hash;
155 } else {
156 system ("cp", $fname, $hash);
157 }
158 $hashlist{$hash} = $fprint;
159}
160
diff --git a/src/lib/libssl/src/util/mk1mf.pl b/src/lib/libssl/src/util/mk1mf.pl
index b4bc0457e5..c538f9dffb 100644
--- a/src/lib/libssl/src/util/mk1mf.pl
+++ b/src/lib/libssl/src/util/mk1mf.pl
@@ -277,8 +277,6 @@ $defs= <<"EOF";
277 277
278EOF 278EOF
279 279
280$defs .= $preamble if defined $preamble;
281
282if ($platform eq "VC-CE") 280if ($platform eq "VC-CE")
283 { 281 {
284 $defs.= <<"EOF"; 282 $defs.= <<"EOF";
diff --git a/src/lib/libssl/src/util/mkdef.pl b/src/lib/libssl/src/util/mkdef.pl
index 01a1bfda19..cdd2164c4e 100644
--- a/src/lib/libssl/src/util/mkdef.pl
+++ b/src/lib/libssl/src/util/mkdef.pl
@@ -1116,55 +1116,27 @@ sub print_test_file
1116 } 1116 }
1117} 1117}
1118 1118
1119sub get_version {
1120 local *MF;
1121 my $v = '?';
1122 open MF, 'Makefile.ssl' or return $v;
1123 while (<MF>) {
1124 $v = $1, last if /^VERSION=(.*?)\s*$/;
1125 }
1126 close MF;
1127 return $v;
1128}
1129
1130sub print_def_file 1119sub print_def_file
1131{ 1120{
1132 (*OUT,my $name,*nums,my @symbols)=@_; 1121 (*OUT,my $name,*nums,my @symbols)=@_;
1133 my $n = 1; my @e; my @r; my @v; my $prev=""; 1122 my $n = 1; my @e; my @r; my @v; my $prev="";
1134 my $liboptions=""; 1123 my $liboptions="";
1135 my $libname = $name;
1136 my $http_vendor = 'www.openssl.org/';
1137 my $version = get_version();
1138 my $what = "OpenSSL: implementation of Secure Socket Layer";
1139 my $description = "$what $version, $name - http://$http_vendor";
1140 1124
1141 if ($W32) 1125 if ($W32)
1142 { $libname.="32"; } 1126 { $name.="32"; }
1143 elsif ($W16) 1127 elsif ($W16)
1144 { $libname.="16"; } 1128 { $name.="16"; }
1145 elsif ($OS2) 1129 elsif ($OS2)
1146 { # DLL names should not clash on the whole system. 1130 { $liboptions = "INITINSTANCE\nDATA NONSHARED"; }
1147 # However, they should not have any particular relationship
1148 # to the name of the static library. Chose descriptive names
1149 # (must be at most 8 chars).
1150 my %translate = (ssl => 'open_ssl', crypto => 'cryptssl');
1151 $libname = $translate{$name} || $name;
1152 $liboptions = <<EOO;
1153INITINSTANCE
1154DATA MULTIPLE NONSHARED
1155EOO
1156 # Vendor field can't contain colon, drat; so we omit http://
1157 $description = "\@#$http_vendor:$version#\@$what; DLL for library $name. Build for EMX -Zmtd";
1158 }
1159 1131
1160 print OUT <<"EOF"; 1132 print OUT <<"EOF";
1161; 1133;
1162; Definition file for the DLL version of the $name library from OpenSSL 1134; Definition file for the DLL version of the $name library from OpenSSL
1163; 1135;
1164 1136
1165LIBRARY $libname $liboptions 1137LIBRARY $name $liboptions
1166 1138
1167DESCRIPTION '$description' 1139DESCRIPTION 'OpenSSL $name - http://www.openssl.org/'
1168 1140
1169EOF 1141EOF
1170 1142
diff --git a/src/lib/libssl/src/util/pl/OS2-EMX.pl b/src/lib/libssl/src/util/pl/OS2-EMX.pl
index ddb3524210..d695dda623 100644
--- a/src/lib/libssl/src/util/pl/OS2-EMX.pl
+++ b/src/lib/libssl/src/util/pl/OS2-EMX.pl
@@ -3,12 +3,10 @@
3# OS2-EMX.pl - for EMX GCC on OS/2 3# OS2-EMX.pl - for EMX GCC on OS/2
4# 4#
5 5
6$o='/'; 6$o='\\';
7$cp='cp'; 7$cp='copy';
8$rm='rm -f'; 8$rm='rm -f';
9 9
10$preamble = "SHELL=sh\n";
11
12# C compiler stuff 10# C compiler stuff
13 11
14$cc='gcc'; 12$cc='gcc';
@@ -50,24 +48,24 @@ $bf_enc_src="";
50 48
51if (!$no_asm) 49if (!$no_asm)
52 { 50 {
53 $bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj"; 51 $bn_asm_obj="crypto\\bn\\asm\\bn-os2$obj crypto\\bn\\asm\\co-os2$obj";
54 $bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm"; 52 $bn_asm_src="crypto\\bn\\asm\\bn-os2.asm crypto\\bn\\asm\\co-os2.asm";
55 $des_enc_obj="crypto/des/asm/d-os2$obj crypto/des/asm/y-os2$obj"; 53 $des_enc_obj="crypto\\des\\asm\\d-os2$obj crypto\\des\\asm\\y-os2$obj";
56 $des_enc_src="crypto/des/asm/d-os2.asm crypto/des/asm/y-os2.asm"; 54 $des_enc_src="crypto\\des\\asm\\d-os2.asm crypto\\des\\asm\\y-os2.asm";
57 $bf_enc_obj="crypto/bf/asm/b-os2$obj"; 55 $bf_enc_obj="crypto\\bf\\asm\\b-os2$obj";
58 $bf_enc_src="crypto/bf/asm/b-os2.asm"; 56 $bf_enc_src="crypto\\bf\\asm\\b-os2.asm";
59 $cast_enc_obj="crypto/cast/asm/c-os2$obj"; 57 $cast_enc_obj="crypto\\cast\\asm\\c-os2$obj";
60 $cast_enc_src="crypto/cast/asm/c-os2.asm"; 58 $cast_enc_src="crypto\\cast\\asm\\c-os2.asm";
61 $rc4_enc_obj="crypto/rc4/asm/r4-os2$obj"; 59 $rc4_enc_obj="crypto\\rc4\\asm\\r4-os2$obj";
62 $rc4_enc_src="crypto/rc4/asm/r4-os2.asm"; 60 $rc4_enc_src="crypto\\rc4\\asm\\r4-os2.asm";
63 $rc5_enc_obj="crypto/rc5/asm/r5-os2$obj"; 61 $rc5_enc_obj="crypto\\rc5\\asm\\r5-os2$obj";
64 $rc5_enc_src="crypto/rc5/asm/r5-os2.asm"; 62 $rc5_enc_src="crypto\\rc5\\asm\\r5-os2.asm";
65 $md5_asm_obj="crypto/md5/asm/m5-os2$obj"; 63 $md5_asm_obj="crypto\\md5\\asm\\m5-os2$obj";
66 $md5_asm_src="crypto/md5/asm/m5-os2.asm"; 64 $md5_asm_src="crypto\\md5\\asm\\m5-os2.asm";
67 $sha1_asm_obj="crypto/sha/asm/s1-os2$obj"; 65 $sha1_asm_obj="crypto\\sha\\asm\\s1-os2$obj";
68 $sha1_asm_src="crypto/sha/asm/s1-os2.asm"; 66 $sha1_asm_src="crypto\\sha\\asm\\s1-os2.asm";
69 $rmd160_asm_obj="crypto/ripemd/asm/rm-os2$obj"; 67 $rmd160_asm_obj="crypto\\ripemd\\asm\\rm-os2$obj";
70 $rmd160_asm_src="crypto/ripemd/asm/rm-os2.asm"; 68 $rmd160_asm_src="crypto\\ripemd\\asm\\rm-os2.asm";
71 } 69 }
72 70
73if ($shlib) 71if ($shlib)
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
new file mode 100644
index 0000000000..4ae8458259
--- /dev/null
+++ b/src/lib/libssl/ssl.h
@@ -0,0 +1,1854 @@
1/* ssl/ssl.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 * Copyright (c) 1998-2001 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 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
113 *
114 * Redistribution and use in source and binary forms, with or without
115 * modification, are permitted provided that the following conditions
116 * are met:
117 *
118 * 1. Redistributions of source code must retain the above copyright
119 * notice, this list of conditions and the following disclaimer.
120 *
121 * 2. Redistributions in binary form must reproduce the above copyright
122 * notice, this list of conditions and the following disclaimer in
123 * the documentation and/or other materials provided with the
124 * distribution.
125 *
126 * 3. All advertising materials mentioning features or use of this
127 * software must display the following acknowledgment:
128 * "This product includes software developed by the OpenSSL Project
129 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
130 *
131 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
132 * endorse or promote products derived from this software without
133 * prior written permission. For written permission, please contact
134 * openssl-core@openssl.org.
135 *
136 * 5. Products derived from this software may not be called "OpenSSL"
137 * nor may "OpenSSL" appear in their names without prior written
138 * permission of the OpenSSL Project.
139 *
140 * 6. Redistributions of any form whatsoever must retain the following
141 * acknowledgment:
142 * "This product includes software developed by the OpenSSL Project
143 * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
144 *
145 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
146 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
147 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
148 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
149 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
150 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
151 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
152 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
153 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
154 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
155 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
156 * OF THE POSSIBILITY OF SUCH DAMAGE.
157 * ====================================================================
158 *
159 * This product includes cryptographic software written by Eric Young
160 * (eay@cryptsoft.com). This product includes software written by Tim
161 * Hudson (tjh@cryptsoft.com).
162 *
163 */
164
165#ifndef HEADER_SSL_H
166#define HEADER_SSL_H
167
168#include <openssl/e_os2.h>
169
170#ifndef OPENSSL_NO_COMP
171#include <openssl/comp.h>
172#endif
173#ifndef OPENSSL_NO_BIO
174#include <openssl/bio.h>
175#endif
176#ifndef OPENSSL_NO_X509
177#include <openssl/x509.h>
178#endif
179#include <openssl/kssl.h>
180#include <openssl/safestack.h>
181#include <openssl/symhacks.h>
182
183#ifdef __cplusplus
184extern "C" {
185#endif
186
187/* SSLeay version number for ASN.1 encoding of the session information */
188/* Version 0 - initial version
189 * Version 1 - added the optional peer certificate
190 */
191#define SSL_SESSION_ASN1_VERSION 0x0001
192
193/* text strings for the ciphers */
194#define SSL_TXT_NULL_WITH_MD5 SSL2_TXT_NULL_WITH_MD5
195#define SSL_TXT_RC4_128_WITH_MD5 SSL2_TXT_RC4_128_WITH_MD5
196#define SSL_TXT_RC4_128_EXPORT40_WITH_MD5 SSL2_TXT_RC4_128_EXPORT40_WITH_MD5
197#define SSL_TXT_RC2_128_CBC_WITH_MD5 SSL2_TXT_RC2_128_CBC_WITH_MD5
198#define SSL_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5
199#define SSL_TXT_IDEA_128_CBC_WITH_MD5 SSL2_TXT_IDEA_128_CBC_WITH_MD5
200#define SSL_TXT_DES_64_CBC_WITH_MD5 SSL2_TXT_DES_64_CBC_WITH_MD5
201#define SSL_TXT_DES_64_CBC_WITH_SHA SSL2_TXT_DES_64_CBC_WITH_SHA
202#define SSL_TXT_DES_192_EDE3_CBC_WITH_MD5 SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5
203#define SSL_TXT_DES_192_EDE3_CBC_WITH_SHA SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA
204
205/* VRS Additional Kerberos5 entries
206 */
207#define SSL_TXT_KRB5_DES_64_CBC_SHA SSL3_TXT_KRB5_DES_64_CBC_SHA
208#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA
209#define SSL_TXT_KRB5_RC4_128_SHA SSL3_TXT_KRB5_RC4_128_SHA
210#define SSL_TXT_KRB5_IDEA_128_CBC_SHA SSL3_TXT_KRB5_IDEA_128_CBC_SHA
211#define SSL_TXT_KRB5_DES_64_CBC_MD5 SSL3_TXT_KRB5_DES_64_CBC_MD5
212#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5
213#define SSL_TXT_KRB5_RC4_128_MD5 SSL3_TXT_KRB5_RC4_128_MD5
214#define SSL_TXT_KRB5_IDEA_128_CBC_MD5 SSL3_TXT_KRB5_IDEA_128_CBC_MD5
215
216#define SSL_TXT_KRB5_DES_40_CBC_SHA SSL3_TXT_KRB5_DES_40_CBC_SHA
217#define SSL_TXT_KRB5_RC2_40_CBC_SHA SSL3_TXT_KRB5_RC2_40_CBC_SHA
218#define SSL_TXT_KRB5_RC4_40_SHA SSL3_TXT_KRB5_RC4_40_SHA
219#define SSL_TXT_KRB5_DES_40_CBC_MD5 SSL3_TXT_KRB5_DES_40_CBC_MD5
220#define SSL_TXT_KRB5_RC2_40_CBC_MD5 SSL3_TXT_KRB5_RC2_40_CBC_MD5
221#define SSL_TXT_KRB5_RC4_40_MD5 SSL3_TXT_KRB5_RC4_40_MD5
222
223#define SSL_TXT_KRB5_DES_40_CBC_SHA SSL3_TXT_KRB5_DES_40_CBC_SHA
224#define SSL_TXT_KRB5_DES_40_CBC_MD5 SSL3_TXT_KRB5_DES_40_CBC_MD5
225#define SSL_TXT_KRB5_DES_64_CBC_SHA SSL3_TXT_KRB5_DES_64_CBC_SHA
226#define SSL_TXT_KRB5_DES_64_CBC_MD5 SSL3_TXT_KRB5_DES_64_CBC_MD5
227#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA
228#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5
229#define SSL_MAX_KRB5_PRINCIPAL_LENGTH 256
230
231#define SSL_MAX_SSL_SESSION_ID_LENGTH 32
232#define SSL_MAX_SID_CTX_LENGTH 32
233
234#define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES (512/8)
235#define SSL_MAX_KEY_ARG_LENGTH 8
236#define SSL_MAX_MASTER_KEY_LENGTH 48
237
238/* These are used to specify which ciphers to use and not to use */
239#define SSL_TXT_LOW "LOW"
240#define SSL_TXT_MEDIUM "MEDIUM"
241#define SSL_TXT_HIGH "HIGH"
242#define SSL_TXT_kFZA "kFZA"
243#define SSL_TXT_aFZA "aFZA"
244#define SSL_TXT_eFZA "eFZA"
245#define SSL_TXT_FZA "FZA"
246
247#define SSL_TXT_aNULL "aNULL"
248#define SSL_TXT_eNULL "eNULL"
249#define SSL_TXT_NULL "NULL"
250
251#define SSL_TXT_kKRB5 "kKRB5"
252#define SSL_TXT_aKRB5 "aKRB5"
253#define SSL_TXT_KRB5 "KRB5"
254
255#define SSL_TXT_kRSA "kRSA"
256#define SSL_TXT_kDHr "kDHr"
257#define SSL_TXT_kDHd "kDHd"
258#define SSL_TXT_kEDH "kEDH"
259#define SSL_TXT_aRSA "aRSA"
260#define SSL_TXT_aDSS "aDSS"
261#define SSL_TXT_aDH "aDH"
262#define SSL_TXT_DSS "DSS"
263#define SSL_TXT_DH "DH"
264#define SSL_TXT_EDH "EDH"
265#define SSL_TXT_ADH "ADH"
266#define SSL_TXT_RSA "RSA"
267#define SSL_TXT_DES "DES"
268#define SSL_TXT_3DES "3DES"
269#define SSL_TXT_RC4 "RC4"
270#define SSL_TXT_RC2 "RC2"
271#define SSL_TXT_IDEA "IDEA"
272#define SSL_TXT_AES "AES"
273#define SSL_TXT_MD5 "MD5"
274#define SSL_TXT_SHA1 "SHA1"
275#define SSL_TXT_SHA "SHA"
276#define SSL_TXT_EXP "EXP"
277#define SSL_TXT_EXPORT "EXPORT"
278#define SSL_TXT_EXP40 "EXPORT40"
279#define SSL_TXT_EXP56 "EXPORT56"
280#define SSL_TXT_SSLV2 "SSLv2"
281#define SSL_TXT_SSLV3 "SSLv3"
282#define SSL_TXT_TLSV1 "TLSv1"
283#define SSL_TXT_ALL "ALL"
284
285/*
286 * COMPLEMENTOF* definitions. These identifiers are used to (de-select)
287 * ciphers normally not being used.
288 * Example: "RC4" will activate all ciphers using RC4 including ciphers
289 * without authentication, which would normally disabled by DEFAULT (due
290 * the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT"
291 * will make sure that it is also disabled in the specific selection.
292 * COMPLEMENTOF* identifiers are portable between version, as adjustments
293 * to the default cipher setup will also be included here.
294 *
295 * COMPLEMENTOFDEFAULT does not experience the same special treatment that
296 * DEFAULT gets, as only selection is being done and no sorting as needed
297 * for DEFAULT.
298 */
299#define SSL_TXT_CMPALL "COMPLEMENTOFALL"
300#define SSL_TXT_CMPDEF "COMPLEMENTOFDEFAULT"
301
302/* The following cipher list is used by default.
303 * It also is substituted when an application-defined cipher list string
304 * starts with 'DEFAULT'. */
305#define SSL_DEFAULT_CIPHER_LIST "ALL:!ADH:+RC4:@STRENGTH" /* low priority for RC4 */
306
307/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */
308#define SSL_SENT_SHUTDOWN 1
309#define SSL_RECEIVED_SHUTDOWN 2
310
311#ifdef __cplusplus
312}
313#endif
314
315#include <openssl/crypto.h>
316#include <openssl/lhash.h>
317#include <openssl/buffer.h>
318#include <openssl/pem.h>
319
320#ifdef __cplusplus
321extern "C" {
322#endif
323
324#if (defined(OPENSSL_NO_RSA) || defined(OPENSSL_NO_MD5)) && !defined(OPENSSL_NO_SSL2)
325#define OPENSSL_NO_SSL2
326#endif
327
328#define SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1
329#define SSL_FILETYPE_PEM X509_FILETYPE_PEM
330
331/* This is needed to stop compilers complaining about the
332 * 'struct ssl_st *' function parameters used to prototype callbacks
333 * in SSL_CTX. */
334typedef struct ssl_st *ssl_crock_st;
335
336/* used to hold info on the particular ciphers used */
337typedef struct ssl_cipher_st
338 {
339 int valid;
340 const char *name; /* text name */
341 unsigned long id; /* id, 4 bytes, first is version */
342 unsigned long algorithms; /* what ciphers are used */
343 unsigned long algo_strength; /* strength and export flags */
344 unsigned long algorithm2; /* Extra flags */
345 int strength_bits; /* Number of bits really used */
346 int alg_bits; /* Number of bits for algorithm */
347 unsigned long mask; /* used for matching */
348 unsigned long mask_strength; /* also used for matching */
349 } SSL_CIPHER;
350
351DECLARE_STACK_OF(SSL_CIPHER)
352
353typedef struct ssl_st SSL;
354typedef struct ssl_ctx_st SSL_CTX;
355
356/* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */
357typedef struct ssl_method_st
358 {
359 int version;
360 int (*ssl_new)(SSL *s);
361 void (*ssl_clear)(SSL *s);
362 void (*ssl_free)(SSL *s);
363 int (*ssl_accept)(SSL *s);
364 int (*ssl_connect)(SSL *s);
365 int (*ssl_read)(SSL *s,void *buf,int len);
366 int (*ssl_peek)(SSL *s,void *buf,int len);
367 int (*ssl_write)(SSL *s,const void *buf,int len);
368 int (*ssl_shutdown)(SSL *s);
369 int (*ssl_renegotiate)(SSL *s);
370 int (*ssl_renegotiate_check)(SSL *s);
371 long (*ssl_ctrl)(SSL *s,int cmd,long larg,void *parg);
372 long (*ssl_ctx_ctrl)(SSL_CTX *ctx,int cmd,long larg,void *parg);
373 SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
374 int (*put_cipher_by_char)(const SSL_CIPHER *cipher,unsigned char *ptr);
375 int (*ssl_pending)(SSL *s);
376 int (*num_ciphers)(void);
377 SSL_CIPHER *(*get_cipher)(unsigned ncipher);
378 struct ssl_method_st *(*get_ssl_method)(int version);
379 long (*get_timeout)(void);
380 struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */
381 int (*ssl_version)();
382 long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)());
383 long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)());
384 } SSL_METHOD;
385
386/* Lets make this into an ASN.1 type structure as follows
387 * SSL_SESSION_ID ::= SEQUENCE {
388 * version INTEGER, -- structure version number
389 * SSLversion INTEGER, -- SSL version number
390 * Cipher OCTET_STRING, -- the 3 byte cipher ID
391 * Session_ID OCTET_STRING, -- the Session ID
392 * Master_key OCTET_STRING, -- the master key
393 * KRB5_principal OCTET_STRING -- optional Kerberos principal
394 * Key_Arg [ 0 ] IMPLICIT OCTET_STRING, -- the optional Key argument
395 * Time [ 1 ] EXPLICIT INTEGER, -- optional Start Time
396 * Timeout [ 2 ] EXPLICIT INTEGER, -- optional Timeout ins seconds
397 * Peer [ 3 ] EXPLICIT X509, -- optional Peer Certificate
398 * Session_ID_context [ 4 ] EXPLICIT OCTET_STRING, -- the Session ID context
399 * Verify_result [ 5 ] EXPLICIT INTEGER -- X509_V_... code for `Peer'
400 * Compression [6] IMPLICIT ASN1_OBJECT -- compression OID XXXXX
401 * }
402 * Look in ssl/ssl_asn1.c for more details
403 * I'm using EXPLICIT tags so I can read the damn things using asn1parse :-).
404 */
405typedef struct ssl_session_st
406 {
407 int ssl_version; /* what ssl version session info is
408 * being kept in here? */
409
410 /* only really used in SSLv2 */
411 unsigned int key_arg_length;
412 unsigned char key_arg[SSL_MAX_KEY_ARG_LENGTH];
413 int master_key_length;
414 unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH];
415 /* session_id - valid? */
416 unsigned int session_id_length;
417 unsigned char session_id[SSL_MAX_SSL_SESSION_ID_LENGTH];
418 /* this is used to determine whether the session is being reused in
419 * the appropriate context. It is up to the application to set this,
420 * via SSL_new */
421 unsigned int sid_ctx_length;
422 unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
423
424#ifndef OPENSSL_NO_KRB5
425 unsigned int krb5_client_princ_len;
426 unsigned char krb5_client_princ[SSL_MAX_KRB5_PRINCIPAL_LENGTH];
427#endif /* OPENSSL_NO_KRB5 */
428
429 int not_resumable;
430
431 /* The cert is the certificate used to establish this connection */
432 struct sess_cert_st /* SESS_CERT */ *sess_cert;
433
434 /* This is the cert for the other end.
435 * On clients, it will be the same as sess_cert->peer_key->x509
436 * (the latter is not enough as sess_cert is not retained
437 * in the external representation of sessions, see ssl_asn1.c). */
438 X509 *peer;
439 /* when app_verify_callback accepts a session where the peer's certificate
440 * is not ok, we must remember the error for session reuse: */
441 long verify_result; /* only for servers */
442
443 int references;
444 long timeout;
445 long time;
446
447 int compress_meth; /* Need to lookup the method */
448
449 SSL_CIPHER *cipher;
450 unsigned long cipher_id; /* when ASN.1 loaded, this
451 * needs to be used to load
452 * the 'cipher' structure */
453
454 STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */
455
456 CRYPTO_EX_DATA ex_data; /* application specific data */
457
458 /* These are used to make removal of session-ids more
459 * efficient and to implement a maximum cache size. */
460 struct ssl_session_st *prev,*next;
461 } SSL_SESSION;
462
463
464#define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L
465#define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L
466#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L
467#define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x00000010L
468#define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L
469#define SSL_OP_MSIE_SSLV2_RSA_PADDING 0x00000040L
470#define SSL_OP_SSLEAY_080_CLIENT_DH_BUG 0x00000080L
471#define SSL_OP_TLS_D5_BUG 0x00000100L
472#define SSL_OP_TLS_BLOCK_PADDING_BUG 0x00000200L
473
474/* Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added
475 * in OpenSSL 0.9.6d. Usually (depending on the application protocol)
476 * the workaround is not needed. Unfortunately some broken SSL/TLS
477 * implementations cannot handle it at all, which is why we include
478 * it in SSL_OP_ALL. */
479#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 0x00000800L /* added in 0.9.6e */
480
481/* SSL_OP_ALL: various bug workarounds that should be rather harmless.
482 * This used to be 0x000FFFFFL before 0.9.7. */
483#define SSL_OP_ALL 0x00000FFFL
484
485/* As server, disallow session resumption on renegotiation */
486#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L
487/* If set, always create a new key when using tmp_dh parameters */
488#define SSL_OP_SINGLE_DH_USE 0x00100000L
489/* Set to always use the tmp_rsa key when doing RSA operations,
490 * even when this violates protocol specs */
491#define SSL_OP_EPHEMERAL_RSA 0x00200000L
492/* Set on servers to choose the cipher according to the server's
493 * preferences */
494#define SSL_OP_CIPHER_SERVER_PREFERENCE 0x00400000L
495/* If set, a server will allow a client to issue a SSLv3.0 version number
496 * as latest version supported in the premaster secret, even when TLSv1.0
497 * (version 3.1) was announced in the client hello. Normally this is
498 * forbidden to prevent version rollback attacks. */
499#define SSL_OP_TLS_ROLLBACK_BUG 0x00800000L
500
501#define SSL_OP_NO_SSLv2 0x01000000L
502#define SSL_OP_NO_SSLv3 0x02000000L
503#define SSL_OP_NO_TLSv1 0x04000000L
504
505/* The next flag deliberately changes the ciphertest, this is a check
506 * for the PKCS#1 attack */
507#define SSL_OP_PKCS1_CHECK_1 0x08000000L
508#define SSL_OP_PKCS1_CHECK_2 0x10000000L
509#define SSL_OP_NETSCAPE_CA_DN_BUG 0x20000000L
510#define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x40000000L
511
512
513/* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success
514 * when just a single record has been written): */
515#define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001L
516/* Make it possible to retry SSL_write() with changed buffer location
517 * (buffer contents must stay the same!); this is not the default to avoid
518 * the misconception that non-blocking SSL_write() behaves like
519 * non-blocking write(): */
520#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L
521/* Never bother the application with retries if the transport
522 * is blocking: */
523#define SSL_MODE_AUTO_RETRY 0x00000004L
524/* Don't attempt to automatically build certificate chain */
525#define SSL_MODE_NO_AUTO_CHAIN 0x00000008L
526
527
528/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value,
529 * they cannot be used to clear bits. */
530
531#define SSL_CTX_set_options(ctx,op) \
532 SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
533#define SSL_CTX_get_options(ctx) \
534 SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,0,NULL)
535#define SSL_set_options(ssl,op) \
536 SSL_ctrl((ssl),SSL_CTRL_OPTIONS,(op),NULL)
537#define SSL_get_options(ssl) \
538 SSL_ctrl((ssl),SSL_CTRL_OPTIONS,0,NULL)
539
540#define SSL_CTX_set_mode(ctx,op) \
541 SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
542#define SSL_CTX_get_mode(ctx) \
543 SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL)
544#define SSL_set_mode(ssl,op) \
545 SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL)
546#define SSL_get_mode(ssl) \
547 SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL)
548
549
550void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
551void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
552#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
553#define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
554
555
556
557#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)
558#define SSL_MAX_CERT_LIST_DEFAULT 1024*30 /* 30k max cert list :-) */
559#else
560#define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */
561#endif
562
563#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20)
564
565/* This callback type is used inside SSL_CTX, SSL, and in the functions that set
566 * them. It is used to override the generation of SSL/TLS session IDs in a
567 * server. Return value should be zero on an error, non-zero to proceed. Also,
568 * callbacks should themselves check if the id they generate is unique otherwise
569 * the SSL handshake will fail with an error - callbacks can do this using the
570 * 'ssl' value they're passed by;
571 * SSL_has_matching_session_id(ssl, id, *id_len)
572 * The length value passed in is set at the maximum size the session ID can be.
573 * In SSLv2 this is 16 bytes, whereas SSLv3/TLSv1 it is 32 bytes. The callback
574 * can alter this length to be less if desired, but under SSLv2 session IDs are
575 * supposed to be fixed at 16 bytes so the id will be padded after the callback
576 * returns in this case. It is also an error for the callback to set the size to
577 * zero. */
578typedef int (*GEN_SESSION_CB)(const SSL *ssl, unsigned char *id,
579 unsigned int *id_len);
580
581typedef struct ssl_comp_st
582 {
583 int id;
584 char *name;
585#ifndef OPENSSL_NO_COMP
586 COMP_METHOD *method;
587#else
588 char *method;
589#endif
590 } SSL_COMP;
591
592DECLARE_STACK_OF(SSL_COMP)
593
594struct ssl_ctx_st
595 {
596 SSL_METHOD *method;
597
598 STACK_OF(SSL_CIPHER) *cipher_list;
599 /* same as above but sorted for lookup */
600 STACK_OF(SSL_CIPHER) *cipher_list_by_id;
601
602 struct x509_store_st /* X509_STORE */ *cert_store;
603 struct lhash_st /* LHASH */ *sessions; /* a set of SSL_SESSIONs */
604 /* Most session-ids that will be cached, default is
605 * SSL_SESSION_CACHE_MAX_SIZE_DEFAULT. 0 is unlimited. */
606 unsigned long session_cache_size;
607 struct ssl_session_st *session_cache_head;
608 struct ssl_session_st *session_cache_tail;
609
610 /* This can have one of 2 values, ored together,
611 * SSL_SESS_CACHE_CLIENT,
612 * SSL_SESS_CACHE_SERVER,
613 * Default is SSL_SESSION_CACHE_SERVER, which means only
614 * SSL_accept which cache SSL_SESSIONS. */
615 int session_cache_mode;
616
617 /* If timeout is not 0, it is the default timeout value set
618 * when SSL_new() is called. This has been put in to make
619 * life easier to set things up */
620 long session_timeout;
621
622 /* If this callback is not null, it will be called each
623 * time a session id is added to the cache. If this function
624 * returns 1, it means that the callback will do a
625 * SSL_SESSION_free() when it has finished using it. Otherwise,
626 * on 0, it means the callback has finished with it.
627 * If remove_session_cb is not null, it will be called when
628 * a session-id is removed from the cache. After the call,
629 * OpenSSL will SSL_SESSION_free() it. */
630 int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess);
631 void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess);
632 SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl,
633 unsigned char *data,int len,int *copy);
634
635 struct
636 {
637 int sess_connect; /* SSL new conn - started */
638 int sess_connect_renegotiate;/* SSL reneg - requested */
639 int sess_connect_good; /* SSL new conne/reneg - finished */
640 int sess_accept; /* SSL new accept - started */
641 int sess_accept_renegotiate;/* SSL reneg - requested */
642 int sess_accept_good; /* SSL accept/reneg - finished */
643 int sess_miss; /* session lookup misses */
644 int sess_timeout; /* reuse attempt on timeouted session */
645 int sess_cache_full; /* session removed due to full cache */
646 int sess_hit; /* session reuse actually done */
647 int sess_cb_hit; /* session-id that was not
648 * in the cache was
649 * passed back via the callback. This
650 * indicates that the application is
651 * supplying session-id's from other
652 * processes - spooky :-) */
653 } stats;
654
655 int references;
656
657 /* if defined, these override the X509_verify_cert() calls */
658 int (*app_verify_callback)(X509_STORE_CTX *, void *);
659 void *app_verify_arg;
660 /* before OpenSSL 0.9.7, 'app_verify_arg' was ignored
661 * ('app_verify_callback' was called with just one argument) */
662
663 /* Default password callback. */
664 pem_password_cb *default_passwd_callback;
665
666 /* Default password callback user data. */
667 void *default_passwd_callback_userdata;
668
669 /* get client cert callback */
670 int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
671
672 CRYPTO_EX_DATA ex_data;
673
674 const EVP_MD *rsa_md5;/* For SSLv2 - name is 'ssl2-md5' */
675 const EVP_MD *md5; /* For SSLv3/TLSv1 'ssl3-md5' */
676 const EVP_MD *sha1; /* For SSLv3/TLSv1 'ssl3->sha1' */
677
678 STACK_OF(X509) *extra_certs;
679 STACK_OF(SSL_COMP) *comp_methods; /* stack of SSL_COMP, SSLv3/TLSv1 */
680
681
682 /* Default values used when no per-SSL value is defined follow */
683
684 void (*info_callback)(const SSL *ssl,int type,int val); /* used if SSL's info_callback is NULL */
685
686 /* what we put in client cert requests */
687 STACK_OF(X509_NAME) *client_CA;
688
689
690 /* Default values to use in SSL structures follow (these are copied by SSL_new) */
691
692 unsigned long options;
693 unsigned long mode;
694 long max_cert_list;
695
696 struct cert_st /* CERT */ *cert;
697 int read_ahead;
698
699 /* callback that allows applications to peek at protocol messages */
700 void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
701 void *msg_callback_arg;
702
703 int verify_mode;
704 int verify_depth;
705 unsigned int sid_ctx_length;
706 unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
707 int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx); /* called 'verify_callback' in the SSL */
708
709 /* Default generate session ID callback. */
710 GEN_SESSION_CB generate_session_id;
711
712 int purpose; /* Purpose setting */
713 int trust; /* Trust setting */
714
715 int quiet_shutdown;
716 };
717
718#define SSL_SESS_CACHE_OFF 0x0000
719#define SSL_SESS_CACHE_CLIENT 0x0001
720#define SSL_SESS_CACHE_SERVER 0x0002
721#define SSL_SESS_CACHE_BOTH (SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER)
722#define SSL_SESS_CACHE_NO_AUTO_CLEAR 0x0080
723/* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */
724#define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 0x0100
725#define SSL_SESS_CACHE_NO_INTERNAL_STORE 0x0200
726#define SSL_SESS_CACHE_NO_INTERNAL \
727 (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE)
728
729 struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx);
730#define SSL_CTX_sess_number(ctx) \
731 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL)
732#define SSL_CTX_sess_connect(ctx) \
733 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL)
734#define SSL_CTX_sess_connect_good(ctx) \
735 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL)
736#define SSL_CTX_sess_connect_renegotiate(ctx) \
737 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL)
738#define SSL_CTX_sess_accept(ctx) \
739 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL)
740#define SSL_CTX_sess_accept_renegotiate(ctx) \
741 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL)
742#define SSL_CTX_sess_accept_good(ctx) \
743 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL)
744#define SSL_CTX_sess_hits(ctx) \
745 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL)
746#define SSL_CTX_sess_cb_hits(ctx) \
747 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL)
748#define SSL_CTX_sess_misses(ctx) \
749 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL)
750#define SSL_CTX_sess_timeouts(ctx) \
751 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL)
752#define SSL_CTX_sess_cache_full(ctx) \
753 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL)
754
755#define SSL_CTX_sess_set_new_cb(ctx,cb) ((ctx)->new_session_cb=(cb))
756#define SSL_CTX_sess_get_new_cb(ctx) ((ctx)->new_session_cb)
757#define SSL_CTX_sess_set_remove_cb(ctx,cb) ((ctx)->remove_session_cb=(cb))
758#define SSL_CTX_sess_get_remove_cb(ctx) ((ctx)->remove_session_cb)
759#define SSL_CTX_sess_set_get_cb(ctx,cb) ((ctx)->get_session_cb=(cb))
760#define SSL_CTX_sess_get_get_cb(ctx) ((ctx)->get_session_cb)
761#define SSL_CTX_set_info_callback(ctx,cb) ((ctx)->info_callback=(cb))
762#define SSL_CTX_get_info_callback(ctx) ((ctx)->info_callback)
763#define SSL_CTX_set_client_cert_cb(ctx,cb) ((ctx)->client_cert_cb=(cb))
764#define SSL_CTX_get_client_cert_cb(ctx) ((ctx)->client_cert_cb)
765
766#define SSL_NOTHING 1
767#define SSL_WRITING 2
768#define SSL_READING 3
769#define SSL_X509_LOOKUP 4
770
771/* These will only be used when doing non-blocking IO */
772#define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING)
773#define SSL_want_read(s) (SSL_want(s) == SSL_READING)
774#define SSL_want_write(s) (SSL_want(s) == SSL_WRITING)
775#define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP)
776
777struct ssl_st
778 {
779 /* protocol version
780 * (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION)
781 */
782 int version;
783 int type; /* SSL_ST_CONNECT or SSL_ST_ACCEPT */
784
785 SSL_METHOD *method; /* SSLv3 */
786
787 /* There are 2 BIO's even though they are normally both the
788 * same. This is so data can be read and written to different
789 * handlers */
790
791#ifndef OPENSSL_NO_BIO
792 BIO *rbio; /* used by SSL_read */
793 BIO *wbio; /* used by SSL_write */
794 BIO *bbio; /* used during session-id reuse to concatenate
795 * messages */
796#else
797 char *rbio; /* used by SSL_read */
798 char *wbio; /* used by SSL_write */
799 char *bbio;
800#endif
801 /* This holds a variable that indicates what we were doing
802 * when a 0 or -1 is returned. This is needed for
803 * non-blocking IO so we know what request needs re-doing when
804 * in SSL_accept or SSL_connect */
805 int rwstate;
806
807 /* true when we are actually in SSL_accept() or SSL_connect() */
808 int in_handshake;
809 int (*handshake_func)();
810
811 /* Imagine that here's a boolean member "init" that is
812 * switched as soon as SSL_set_{accept/connect}_state
813 * is called for the first time, so that "state" and
814 * "handshake_func" are properly initialized. But as
815 * handshake_func is == 0 until then, we use this
816 * test instead of an "init" member.
817 */
818
819 int server; /* are we the server side? - mostly used by SSL_clear*/
820
821 int new_session;/* 1 if we are to use a new session.
822 * 2 if we are a server and are inside a handshake
823 * (i.e. not just sending a HelloRequest)
824 * NB: For servers, the 'new' session may actually be a previously
825 * cached session or even the previous session unless
826 * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set */
827 int quiet_shutdown;/* don't send shutdown packets */
828 int shutdown; /* we have shut things down, 0x01 sent, 0x02
829 * for received */
830 int state; /* where we are */
831 int rstate; /* where we are when reading */
832
833 BUF_MEM *init_buf; /* buffer used during init */
834 void *init_msg; /* pointer to handshake message body, set by ssl3_get_message() */
835 int init_num; /* amount read/written */
836 int init_off; /* amount read/written */
837
838 /* used internally to point at a raw packet */
839 unsigned char *packet;
840 unsigned int packet_length;
841
842 struct ssl2_state_st *s2; /* SSLv2 variables */
843 struct ssl3_state_st *s3; /* SSLv3 variables */
844
845 int read_ahead; /* Read as many input bytes as possible
846 * (for non-blocking reads) */
847
848 /* callback that allows applications to peek at protocol messages */
849 void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
850 void *msg_callback_arg;
851
852 int hit; /* reusing a previous session */
853
854 int purpose; /* Purpose setting */
855 int trust; /* Trust setting */
856
857 /* crypto */
858 STACK_OF(SSL_CIPHER) *cipher_list;
859 STACK_OF(SSL_CIPHER) *cipher_list_by_id;
860
861 /* These are the ones being used, the ones in SSL_SESSION are
862 * the ones to be 'copied' into these ones */
863
864 EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */
865 const EVP_MD *read_hash; /* used for mac generation */
866#ifndef OPENSSL_NO_COMP
867 COMP_CTX *expand; /* uncompress */
868#else
869 char *expand;
870#endif
871
872 EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */
873 const EVP_MD *write_hash; /* used for mac generation */
874#ifndef OPENSSL_NO_COMP
875 COMP_CTX *compress; /* compression */
876#else
877 char *compress;
878#endif
879
880 /* session info */
881
882 /* client cert? */
883 /* This is used to hold the server certificate used */
884 struct cert_st /* CERT */ *cert;
885
886 /* the session_id_context is used to ensure sessions are only reused
887 * in the appropriate context */
888 unsigned int sid_ctx_length;
889 unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
890
891 /* This can also be in the session once a session is established */
892 SSL_SESSION *session;
893
894 /* Default generate session ID callback. */
895 GEN_SESSION_CB generate_session_id;
896
897 /* Used in SSL2 and SSL3 */
898 int verify_mode; /* 0 don't care about verify failure.
899 * 1 fail if verify fails */
900 int verify_depth;
901 int (*verify_callback)(int ok,X509_STORE_CTX *ctx); /* fail if callback returns 0 */
902
903 void (*info_callback)(const SSL *ssl,int type,int val); /* optional informational callback */
904
905 int error; /* error bytes to be written */
906 int error_code; /* actual code */
907
908#ifndef OPENSSL_NO_KRB5
909 KSSL_CTX *kssl_ctx; /* Kerberos 5 context */
910#endif /* OPENSSL_NO_KRB5 */
911
912 SSL_CTX *ctx;
913 /* set this flag to 1 and a sleep(1) is put into all SSL_read()
914 * and SSL_write() calls, good for nbio debuging :-) */
915 int debug;
916
917 /* extra application data */
918 long verify_result;
919 CRYPTO_EX_DATA ex_data;
920
921 /* for server side, keep the list of CA_dn we can use */
922 STACK_OF(X509_NAME) *client_CA;
923
924 int references;
925 unsigned long options; /* protocol behaviour */
926 unsigned long mode; /* API behaviour */
927 long max_cert_list;
928 int first_packet;
929 int client_version; /* what was passed, used for
930 * SSLv3/TLS rollback check */
931 };
932
933#ifdef __cplusplus
934}
935#endif
936
937#include <openssl/ssl2.h>
938#include <openssl/ssl3.h>
939#include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */
940#include <openssl/ssl23.h>
941
942#ifdef __cplusplus
943extern "C" {
944#endif
945
946/* compatibility */
947#define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg))
948#define SSL_get_app_data(s) (SSL_get_ex_data(s,0))
949#define SSL_SESSION_set_app_data(s,a) (SSL_SESSION_set_ex_data(s,0,(char *)a))
950#define SSL_SESSION_get_app_data(s) (SSL_SESSION_get_ex_data(s,0))
951#define SSL_CTX_get_app_data(ctx) (SSL_CTX_get_ex_data(ctx,0))
952#define SSL_CTX_set_app_data(ctx,arg) (SSL_CTX_set_ex_data(ctx,0,(char *)arg))
953
954/* The following are the possible values for ssl->state are are
955 * used to indicate where we are up to in the SSL connection establishment.
956 * The macros that follow are about the only things you should need to use
957 * and even then, only when using non-blocking IO.
958 * It can also be useful to work out where you were when the connection
959 * failed */
960
961#define SSL_ST_CONNECT 0x1000
962#define SSL_ST_ACCEPT 0x2000
963#define SSL_ST_MASK 0x0FFF
964#define SSL_ST_INIT (SSL_ST_CONNECT|SSL_ST_ACCEPT)
965#define SSL_ST_BEFORE 0x4000
966#define SSL_ST_OK 0x03
967#define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT)
968
969#define SSL_CB_LOOP 0x01
970#define SSL_CB_EXIT 0x02
971#define SSL_CB_READ 0x04
972#define SSL_CB_WRITE 0x08
973#define SSL_CB_ALERT 0x4000 /* used in callback */
974#define SSL_CB_READ_ALERT (SSL_CB_ALERT|SSL_CB_READ)
975#define SSL_CB_WRITE_ALERT (SSL_CB_ALERT|SSL_CB_WRITE)
976#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT|SSL_CB_LOOP)
977#define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT|SSL_CB_EXIT)
978#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT|SSL_CB_LOOP)
979#define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT|SSL_CB_EXIT)
980#define SSL_CB_HANDSHAKE_START 0x10
981#define SSL_CB_HANDSHAKE_DONE 0x20
982
983/* Is the SSL_connection established? */
984#define SSL_get_state(a) SSL_state(a)
985#define SSL_is_init_finished(a) (SSL_state(a) == SSL_ST_OK)
986#define SSL_in_init(a) (SSL_state(a)&SSL_ST_INIT)
987#define SSL_in_before(a) (SSL_state(a)&SSL_ST_BEFORE)
988#define SSL_in_connect_init(a) (SSL_state(a)&SSL_ST_CONNECT)
989#define SSL_in_accept_init(a) (SSL_state(a)&SSL_ST_ACCEPT)
990
991/* The following 2 states are kept in ssl->rstate when reads fail,
992 * you should not need these */
993#define SSL_ST_READ_HEADER 0xF0
994#define SSL_ST_READ_BODY 0xF1
995#define SSL_ST_READ_DONE 0xF2
996
997/* Obtain latest Finished message
998 * -- that we sent (SSL_get_finished)
999 * -- that we expected from peer (SSL_get_peer_finished).
1000 * Returns length (0 == no Finished so far), copies up to 'count' bytes. */
1001size_t SSL_get_finished(SSL *s, void *buf, size_t count);
1002size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count);
1003
1004/* use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options
1005 * are 'ored' with SSL_VERIFY_PEER if they are desired */
1006#define SSL_VERIFY_NONE 0x00
1007#define SSL_VERIFY_PEER 0x01
1008#define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02
1009#define SSL_VERIFY_CLIENT_ONCE 0x04
1010
1011#define OpenSSL_add_ssl_algorithms() SSL_library_init()
1012#define SSLeay_add_ssl_algorithms() SSL_library_init()
1013
1014/* this is for backward compatibility */
1015#if 0 /* NEW_SSLEAY */
1016#define SSL_CTX_set_default_verify(a,b,c) SSL_CTX_set_verify(a,b,c)
1017#define SSL_set_pref_cipher(c,n) SSL_set_cipher_list(c,n)
1018#define SSL_add_session(a,b) SSL_CTX_add_session((a),(b))
1019#define SSL_remove_session(a,b) SSL_CTX_remove_session((a),(b))
1020#define SSL_flush_sessions(a,b) SSL_CTX_flush_sessions((a),(b))
1021#endif
1022/* More backward compatibility */
1023#define SSL_get_cipher(s) \
1024 SSL_CIPHER_get_name(SSL_get_current_cipher(s))
1025#define SSL_get_cipher_bits(s,np) \
1026 SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)
1027#define SSL_get_cipher_version(s) \
1028 SSL_CIPHER_get_version(SSL_get_current_cipher(s))
1029#define SSL_get_cipher_name(s) \
1030 SSL_CIPHER_get_name(SSL_get_current_cipher(s))
1031#define SSL_get_time(a) SSL_SESSION_get_time(a)
1032#define SSL_set_time(a,b) SSL_SESSION_set_time((a),(b))
1033#define SSL_get_timeout(a) SSL_SESSION_get_timeout(a)
1034#define SSL_set_timeout(a,b) SSL_SESSION_set_timeout((a),(b))
1035
1036#if 1 /*SSLEAY_MACROS*/
1037#define d2i_SSL_SESSION_bio(bp,s_id) (SSL_SESSION *)ASN1_d2i_bio( \
1038 (char *(*)())SSL_SESSION_new,(char *(*)())d2i_SSL_SESSION, \
1039 (bp),(unsigned char **)(s_id))
1040#define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio(i2d_SSL_SESSION, \
1041 bp,(unsigned char *)s_id)
1042#define PEM_read_SSL_SESSION(fp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read( \
1043 (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,(char **)x,cb,u)
1044#define PEM_read_bio_SSL_SESSION(bp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read_bio( \
1045 (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,(char **)x,cb,u)
1046#define PEM_write_SSL_SESSION(fp,x) \
1047 PEM_ASN1_write((int (*)())i2d_SSL_SESSION, \
1048 PEM_STRING_SSL_SESSION,fp, (char *)x, NULL,NULL,0,NULL,NULL)
1049#define PEM_write_bio_SSL_SESSION(bp,x) \
1050 PEM_ASN1_write_bio((int (*)())i2d_SSL_SESSION, \
1051 PEM_STRING_SSL_SESSION,bp, (char *)x, NULL,NULL,0,NULL,NULL)
1052#endif
1053
1054#define SSL_AD_REASON_OFFSET 1000
1055/* These alert types are for SSLv3 and TLSv1 */
1056#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
1057#define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE /* fatal */
1058#define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC /* fatal */
1059#define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED
1060#define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW
1061#define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE/* fatal */
1062#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE/* fatal */
1063#define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE /* Not for TLS */
1064#define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE
1065#define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE
1066#define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED
1067#define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED
1068#define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN
1069#define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER /* fatal */
1070#define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA /* fatal */
1071#define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED /* fatal */
1072#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR /* fatal */
1073#define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR
1074#define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION/* fatal */
1075#define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION /* fatal */
1076#define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY/* fatal */
1077#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR /* fatal */
1078#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
1079#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
1080
1081#define SSL_ERROR_NONE 0
1082#define SSL_ERROR_SSL 1
1083#define SSL_ERROR_WANT_READ 2
1084#define SSL_ERROR_WANT_WRITE 3
1085#define SSL_ERROR_WANT_X509_LOOKUP 4
1086#define SSL_ERROR_SYSCALL 5 /* look at error stack/return value/errno */
1087#define SSL_ERROR_ZERO_RETURN 6
1088#define SSL_ERROR_WANT_CONNECT 7
1089#define SSL_ERROR_WANT_ACCEPT 8
1090
1091#define SSL_CTRL_NEED_TMP_RSA 1
1092#define SSL_CTRL_SET_TMP_RSA 2
1093#define SSL_CTRL_SET_TMP_DH 3
1094#define SSL_CTRL_SET_TMP_RSA_CB 4
1095#define SSL_CTRL_SET_TMP_DH_CB 5
1096
1097#define SSL_CTRL_GET_SESSION_REUSED 6
1098#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 7
1099#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 8
1100#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 9
1101#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 10
1102#define SSL_CTRL_GET_FLAGS 11
1103#define SSL_CTRL_EXTRA_CHAIN_CERT 12
1104
1105#define SSL_CTRL_SET_MSG_CALLBACK 13
1106#define SSL_CTRL_SET_MSG_CALLBACK_ARG 14
1107
1108/* Stats */
1109#define SSL_CTRL_SESS_NUMBER 20
1110#define SSL_CTRL_SESS_CONNECT 21
1111#define SSL_CTRL_SESS_CONNECT_GOOD 22
1112#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23
1113#define SSL_CTRL_SESS_ACCEPT 24
1114#define SSL_CTRL_SESS_ACCEPT_GOOD 25
1115#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26
1116#define SSL_CTRL_SESS_HIT 27
1117#define SSL_CTRL_SESS_CB_HIT 28
1118#define SSL_CTRL_SESS_MISSES 29
1119#define SSL_CTRL_SESS_TIMEOUTS 30
1120#define SSL_CTRL_SESS_CACHE_FULL 31
1121#define SSL_CTRL_OPTIONS 32
1122#define SSL_CTRL_MODE 33
1123
1124#define SSL_CTRL_GET_READ_AHEAD 40
1125#define SSL_CTRL_SET_READ_AHEAD 41
1126#define SSL_CTRL_SET_SESS_CACHE_SIZE 42
1127#define SSL_CTRL_GET_SESS_CACHE_SIZE 43
1128#define SSL_CTRL_SET_SESS_CACHE_MODE 44
1129#define SSL_CTRL_GET_SESS_CACHE_MODE 45
1130
1131#define SSL_CTRL_GET_MAX_CERT_LIST 50
1132#define SSL_CTRL_SET_MAX_CERT_LIST 51
1133
1134#define SSL_session_reused(ssl) \
1135 SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL)
1136#define SSL_num_renegotiations(ssl) \
1137 SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL)
1138#define SSL_clear_num_renegotiations(ssl) \
1139 SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL)
1140#define SSL_total_renegotiations(ssl) \
1141 SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL)
1142
1143#define SSL_CTX_need_tmp_RSA(ctx) \
1144 SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL)
1145#define SSL_CTX_set_tmp_rsa(ctx,rsa) \
1146 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
1147#define SSL_CTX_set_tmp_dh(ctx,dh) \
1148 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
1149
1150#define SSL_need_tmp_RSA(ssl) \
1151 SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL)
1152#define SSL_set_tmp_rsa(ssl,rsa) \
1153 SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
1154#define SSL_set_tmp_dh(ssl,dh) \
1155 SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
1156
1157#define SSL_CTX_add_extra_chain_cert(ctx,x509) \
1158 SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
1159
1160#ifndef OPENSSL_NO_BIO
1161BIO_METHOD *BIO_f_ssl(void);
1162BIO *BIO_new_ssl(SSL_CTX *ctx,int client);
1163BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
1164BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
1165int BIO_ssl_copy_session_id(BIO *to,BIO *from);
1166void BIO_ssl_shutdown(BIO *ssl_bio);
1167
1168#endif
1169
1170int SSL_CTX_set_cipher_list(SSL_CTX *,const char *str);
1171SSL_CTX *SSL_CTX_new(SSL_METHOD *meth);
1172void SSL_CTX_free(SSL_CTX *);
1173long SSL_CTX_set_timeout(SSL_CTX *ctx,long t);
1174long SSL_CTX_get_timeout(SSL_CTX *ctx);
1175X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *);
1176void SSL_CTX_set_cert_store(SSL_CTX *,X509_STORE *);
1177int SSL_want(SSL *s);
1178int SSL_clear(SSL *s);
1179
1180void SSL_CTX_flush_sessions(SSL_CTX *ctx,long tm);
1181
1182SSL_CIPHER *SSL_get_current_cipher(SSL *s);
1183int SSL_CIPHER_get_bits(SSL_CIPHER *c,int *alg_bits);
1184char * SSL_CIPHER_get_version(SSL_CIPHER *c);
1185const char * SSL_CIPHER_get_name(SSL_CIPHER *c);
1186
1187int SSL_get_fd(SSL *s);
1188int SSL_get_rfd(SSL *s);
1189int SSL_get_wfd(SSL *s);
1190const char * SSL_get_cipher_list(SSL *s,int n);
1191char * SSL_get_shared_ciphers(SSL *s, char *buf, int len);
1192int SSL_get_read_ahead(SSL * s);
1193int SSL_pending(SSL *s);
1194#ifndef OPENSSL_NO_SOCK
1195int SSL_set_fd(SSL *s, int fd);
1196int SSL_set_rfd(SSL *s, int fd);
1197int SSL_set_wfd(SSL *s, int fd);
1198#endif
1199#ifndef OPENSSL_NO_BIO
1200void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio);
1201BIO * SSL_get_rbio(SSL *s);
1202BIO * SSL_get_wbio(SSL *s);
1203#endif
1204int SSL_set_cipher_list(SSL *s, const char *str);
1205void SSL_set_read_ahead(SSL *s, int yes);
1206int SSL_get_verify_mode(SSL *s);
1207int SSL_get_verify_depth(SSL *s);
1208int (*SSL_get_verify_callback(SSL *s))(int,X509_STORE_CTX *);
1209void SSL_set_verify(SSL *s, int mode,
1210 int (*callback)(int ok,X509_STORE_CTX *ctx));
1211void SSL_set_verify_depth(SSL *s, int depth);
1212#ifndef OPENSSL_NO_RSA
1213int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);
1214#endif
1215int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len);
1216int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);
1217int SSL_use_PrivateKey_ASN1(int pk,SSL *ssl, unsigned char *d, long len);
1218int SSL_use_certificate(SSL *ssl, X509 *x);
1219int SSL_use_certificate_ASN1(SSL *ssl, unsigned char *d, int len);
1220
1221#ifndef OPENSSL_NO_STDIO
1222int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
1223int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);
1224int SSL_use_certificate_file(SSL *ssl, const char *file, int type);
1225int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);
1226int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);
1227int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);
1228int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM type */
1229STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
1230int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
1231 const char *file);
1232#ifndef OPENSSL_SYS_VMS
1233#ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */
1234int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
1235 const char *dir);
1236#endif
1237#endif
1238
1239#endif
1240
1241void SSL_load_error_strings(void );
1242const char *SSL_state_string(const SSL *s);
1243const char *SSL_rstate_string(const SSL *s);
1244const char *SSL_state_string_long(const SSL *s);
1245const char *SSL_rstate_string_long(const SSL *s);
1246long SSL_SESSION_get_time(SSL_SESSION *s);
1247long SSL_SESSION_set_time(SSL_SESSION *s, long t);
1248long SSL_SESSION_get_timeout(SSL_SESSION *s);
1249long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
1250void SSL_copy_session_id(SSL *to,SSL *from);
1251
1252SSL_SESSION *SSL_SESSION_new(void);
1253unsigned long SSL_SESSION_hash(SSL_SESSION *a);
1254int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b);
1255#ifndef OPENSSL_NO_FP_API
1256int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses);
1257#endif
1258#ifndef OPENSSL_NO_BIO
1259int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses);
1260#endif
1261void SSL_SESSION_free(SSL_SESSION *ses);
1262int i2d_SSL_SESSION(SSL_SESSION *in,unsigned char **pp);
1263int SSL_set_session(SSL *to, SSL_SESSION *session);
1264int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c);
1265int SSL_CTX_remove_session(SSL_CTX *,SSL_SESSION *c);
1266int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB);
1267int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB);
1268int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
1269 unsigned int id_len);
1270SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,unsigned char **pp,long length);
1271
1272#ifdef HEADER_X509_H
1273X509 * SSL_get_peer_certificate(SSL *s);
1274#endif
1275
1276STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s);
1277
1278int SSL_CTX_get_verify_mode(SSL_CTX *ctx);
1279int SSL_CTX_get_verify_depth(SSL_CTX *ctx);
1280int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(int,X509_STORE_CTX *);
1281void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,
1282 int (*callback)(int, X509_STORE_CTX *));
1283void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth);
1284void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *,void *), void *arg);
1285#ifndef OPENSSL_NO_RSA
1286int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
1287#endif
1288int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len);
1289int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
1290int SSL_CTX_use_PrivateKey_ASN1(int pk,SSL_CTX *ctx,
1291 unsigned char *d, long len);
1292int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
1293int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d);
1294
1295void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
1296void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
1297
1298int SSL_CTX_check_private_key(SSL_CTX *ctx);
1299int SSL_check_private_key(SSL *ctx);
1300
1301int SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx,
1302 unsigned int sid_ctx_len);
1303
1304SSL * SSL_new(SSL_CTX *ctx);
1305int SSL_set_session_id_context(SSL *ssl,const unsigned char *sid_ctx,
1306 unsigned int sid_ctx_len);
1307
1308int SSL_CTX_set_purpose(SSL_CTX *s, int purpose);
1309int SSL_set_purpose(SSL *s, int purpose);
1310int SSL_CTX_set_trust(SSL_CTX *s, int trust);
1311int SSL_set_trust(SSL *s, int trust);
1312
1313void SSL_free(SSL *ssl);
1314int SSL_accept(SSL *ssl);
1315int SSL_connect(SSL *ssl);
1316int SSL_read(SSL *ssl,void *buf,int num);
1317int SSL_peek(SSL *ssl,void *buf,int num);
1318int SSL_write(SSL *ssl,const void *buf,int num);
1319long SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
1320long SSL_callback_ctrl(SSL *, int, void (*)());
1321long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg);
1322long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)());
1323
1324int SSL_get_error(SSL *s,int ret_code);
1325const char *SSL_get_version(SSL *s);
1326
1327/* This sets the 'default' SSL version that SSL_new() will create */
1328int SSL_CTX_set_ssl_version(SSL_CTX *ctx,SSL_METHOD *meth);
1329
1330SSL_METHOD *SSLv2_method(void); /* SSLv2 */
1331SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */
1332SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */
1333
1334SSL_METHOD *SSLv3_method(void); /* SSLv3 */
1335SSL_METHOD *SSLv3_server_method(void); /* SSLv3 */
1336SSL_METHOD *SSLv3_client_method(void); /* SSLv3 */
1337
1338SSL_METHOD *SSLv23_method(void); /* SSLv3 but can rollback to v2 */
1339SSL_METHOD *SSLv23_server_method(void); /* SSLv3 but can rollback to v2 */
1340SSL_METHOD *SSLv23_client_method(void); /* SSLv3 but can rollback to v2 */
1341
1342SSL_METHOD *TLSv1_method(void); /* TLSv1.0 */
1343SSL_METHOD *TLSv1_server_method(void); /* TLSv1.0 */
1344SSL_METHOD *TLSv1_client_method(void); /* TLSv1.0 */
1345
1346STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *s);
1347
1348int SSL_do_handshake(SSL *s);
1349int SSL_renegotiate(SSL *s);
1350int SSL_renegotiate_pending(SSL *s);
1351int SSL_shutdown(SSL *s);
1352
1353SSL_METHOD *SSL_get_ssl_method(SSL *s);
1354int SSL_set_ssl_method(SSL *s,SSL_METHOD *method);
1355const char *SSL_alert_type_string_long(int value);
1356const char *SSL_alert_type_string(int value);
1357const char *SSL_alert_desc_string_long(int value);
1358const char *SSL_alert_desc_string(int value);
1359
1360void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *list);
1361void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *list);
1362STACK_OF(X509_NAME) *SSL_get_client_CA_list(SSL *s);
1363STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *s);
1364int SSL_add_client_CA(SSL *ssl,X509 *x);
1365int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x);
1366
1367void SSL_set_connect_state(SSL *s);
1368void SSL_set_accept_state(SSL *s);
1369
1370long SSL_get_default_timeout(SSL *s);
1371
1372int SSL_library_init(void );
1373
1374char *SSL_CIPHER_description(SSL_CIPHER *,char *buf,int size);
1375STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk);
1376
1377SSL *SSL_dup(SSL *ssl);
1378
1379X509 *SSL_get_certificate(SSL *ssl);
1380/* EVP_PKEY */ struct evp_pkey_st *SSL_get_privatekey(SSL *ssl);
1381
1382void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode);
1383int SSL_CTX_get_quiet_shutdown(SSL_CTX *ctx);
1384void SSL_set_quiet_shutdown(SSL *ssl,int mode);
1385int SSL_get_quiet_shutdown(SSL *ssl);
1386void SSL_set_shutdown(SSL *ssl,int mode);
1387int SSL_get_shutdown(SSL *ssl);
1388int SSL_version(SSL *ssl);
1389int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
1390int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
1391 const char *CApath);
1392#define SSL_get0_session SSL_get_session /* just peek at pointer */
1393SSL_SESSION *SSL_get_session(SSL *ssl);
1394SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */
1395SSL_CTX *SSL_get_SSL_CTX(SSL *ssl);
1396void SSL_set_info_callback(SSL *ssl,
1397 void (*cb)(const SSL *ssl,int type,int val));
1398void (*SSL_get_info_callback(SSL *ssl))(const SSL *ssl,int type,int val);
1399int SSL_state(SSL *ssl);
1400
1401void SSL_set_verify_result(SSL *ssl,long v);
1402long SSL_get_verify_result(SSL *ssl);
1403
1404int SSL_set_ex_data(SSL *ssl,int idx,void *data);
1405void *SSL_get_ex_data(SSL *ssl,int idx);
1406int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
1407 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
1408
1409int SSL_SESSION_set_ex_data(SSL_SESSION *ss,int idx,void *data);
1410void *SSL_SESSION_get_ex_data(SSL_SESSION *ss,int idx);
1411int SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
1412 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
1413
1414int SSL_CTX_set_ex_data(SSL_CTX *ssl,int idx,void *data);
1415void *SSL_CTX_get_ex_data(SSL_CTX *ssl,int idx);
1416int SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
1417 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
1418
1419int SSL_get_ex_data_X509_STORE_CTX_idx(void );
1420
1421#define SSL_CTX_sess_set_cache_size(ctx,t) \
1422 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL)
1423#define SSL_CTX_sess_get_cache_size(ctx) \
1424 SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL)
1425#define SSL_CTX_set_session_cache_mode(ctx,m) \
1426 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL)
1427#define SSL_CTX_get_session_cache_mode(ctx) \
1428 SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL)
1429
1430#define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx)
1431#define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m)
1432#define SSL_CTX_get_read_ahead(ctx) \
1433 SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL)
1434#define SSL_CTX_set_read_ahead(ctx,m) \
1435 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL)
1436#define SSL_CTX_get_max_cert_list(ctx) \
1437 SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
1438#define SSL_CTX_set_max_cert_list(ctx,m) \
1439 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
1440#define SSL_get_max_cert_list(ssl) \
1441 SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
1442#define SSL_set_max_cert_list(ssl,m) \
1443 SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
1444
1445 /* NB: the keylength is only applicable when is_export is true */
1446#ifndef OPENSSL_NO_RSA
1447void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
1448 RSA *(*cb)(SSL *ssl,int is_export,
1449 int keylength));
1450
1451void SSL_set_tmp_rsa_callback(SSL *ssl,
1452 RSA *(*cb)(SSL *ssl,int is_export,
1453 int keylength));
1454#endif
1455#ifndef OPENSSL_NO_DH
1456void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
1457 DH *(*dh)(SSL *ssl,int is_export,
1458 int keylength));
1459void SSL_set_tmp_dh_callback(SSL *ssl,
1460 DH *(*dh)(SSL *ssl,int is_export,
1461 int keylength));
1462#endif
1463
1464#ifndef OPENSSL_NO_COMP
1465int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm);
1466#else
1467int SSL_COMP_add_compression_method(int id,char *cm);
1468#endif
1469
1470/* BEGIN ERROR CODES */
1471/* The following lines are auto generated by the script mkerr.pl. Any changes
1472 * made after this point may be overwritten when the script is next run.
1473 */
1474void ERR_load_SSL_strings(void);
1475
1476/* Error codes for the SSL functions. */
1477
1478/* Function codes. */
1479#define SSL_F_CLIENT_CERTIFICATE 100
1480#define SSL_F_CLIENT_FINISHED 238
1481#define SSL_F_CLIENT_HELLO 101
1482#define SSL_F_CLIENT_MASTER_KEY 102
1483#define SSL_F_D2I_SSL_SESSION 103
1484#define SSL_F_DO_SSL3_WRITE 104
1485#define SSL_F_GET_CLIENT_FINISHED 105
1486#define SSL_F_GET_CLIENT_HELLO 106
1487#define SSL_F_GET_CLIENT_MASTER_KEY 107
1488#define SSL_F_GET_SERVER_FINISHED 108
1489#define SSL_F_GET_SERVER_HELLO 109
1490#define SSL_F_GET_SERVER_VERIFY 110
1491#define SSL_F_I2D_SSL_SESSION 111
1492#define SSL_F_READ_N 112
1493#define SSL_F_REQUEST_CERTIFICATE 113
1494#define SSL_F_SERVER_FINISH 239
1495#define SSL_F_SERVER_HELLO 114
1496#define SSL_F_SERVER_VERIFY 240
1497#define SSL_F_SSL23_ACCEPT 115
1498#define SSL_F_SSL23_CLIENT_HELLO 116
1499#define SSL_F_SSL23_CONNECT 117
1500#define SSL_F_SSL23_GET_CLIENT_HELLO 118
1501#define SSL_F_SSL23_GET_SERVER_HELLO 119
1502#define SSL_F_SSL23_PEEK 237
1503#define SSL_F_SSL23_READ 120
1504#define SSL_F_SSL23_WRITE 121
1505#define SSL_F_SSL2_ACCEPT 122
1506#define SSL_F_SSL2_CONNECT 123
1507#define SSL_F_SSL2_ENC_INIT 124
1508#define SSL_F_SSL2_GENERATE_KEY_MATERIAL 241
1509#define SSL_F_SSL2_PEEK 234
1510#define SSL_F_SSL2_READ 125
1511#define SSL_F_SSL2_READ_INTERNAL 236
1512#define SSL_F_SSL2_SET_CERTIFICATE 126
1513#define SSL_F_SSL2_WRITE 127
1514#define SSL_F_SSL3_ACCEPT 128
1515#define SSL_F_SSL3_CALLBACK_CTRL 233
1516#define SSL_F_SSL3_CHANGE_CIPHER_STATE 129
1517#define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130
1518#define SSL_F_SSL3_CLIENT_HELLO 131
1519#define SSL_F_SSL3_CONNECT 132
1520#define SSL_F_SSL3_CTRL 213
1521#define SSL_F_SSL3_CTX_CTRL 133
1522#define SSL_F_SSL3_ENC 134
1523#define SSL_F_SSL3_GENERATE_KEY_BLOCK 238
1524#define SSL_F_SSL3_GET_CERTIFICATE_REQUEST 135
1525#define SSL_F_SSL3_GET_CERT_VERIFY 136
1526#define SSL_F_SSL3_GET_CLIENT_CERTIFICATE 137
1527#define SSL_F_SSL3_GET_CLIENT_HELLO 138
1528#define SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE 139
1529#define SSL_F_SSL3_GET_FINISHED 140
1530#define SSL_F_SSL3_GET_KEY_EXCHANGE 141
1531#define SSL_F_SSL3_GET_MESSAGE 142
1532#define SSL_F_SSL3_GET_RECORD 143
1533#define SSL_F_SSL3_GET_SERVER_CERTIFICATE 144
1534#define SSL_F_SSL3_GET_SERVER_DONE 145
1535#define SSL_F_SSL3_GET_SERVER_HELLO 146
1536#define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147
1537#define SSL_F_SSL3_PEEK 235
1538#define SSL_F_SSL3_READ_BYTES 148
1539#define SSL_F_SSL3_READ_N 149
1540#define SSL_F_SSL3_SEND_CERTIFICATE_REQUEST 150
1541#define SSL_F_SSL3_SEND_CLIENT_CERTIFICATE 151
1542#define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE 152
1543#define SSL_F_SSL3_SEND_CLIENT_VERIFY 153
1544#define SSL_F_SSL3_SEND_SERVER_CERTIFICATE 154
1545#define SSL_F_SSL3_SEND_SERVER_HELLO 242
1546#define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE 155
1547#define SSL_F_SSL3_SETUP_BUFFERS 156
1548#define SSL_F_SSL3_SETUP_KEY_BLOCK 157
1549#define SSL_F_SSL3_WRITE_BYTES 158
1550#define SSL_F_SSL3_WRITE_PENDING 159
1551#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215
1552#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216
1553#define SSL_F_SSL_BAD_METHOD 160
1554#define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161
1555#define SSL_F_SSL_CERT_DUP 221
1556#define SSL_F_SSL_CERT_INST 222
1557#define SSL_F_SSL_CERT_INSTANTIATE 214
1558#define SSL_F_SSL_CERT_NEW 162
1559#define SSL_F_SSL_CHECK_PRIVATE_KEY 163
1560#define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230
1561#define SSL_F_SSL_CIPHER_STRENGTH_SORT 231
1562#define SSL_F_SSL_CLEAR 164
1563#define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165
1564#define SSL_F_SSL_CREATE_CIPHER_LIST 166
1565#define SSL_F_SSL_CTRL 232
1566#define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168
1567#define SSL_F_SSL_CTX_NEW 169
1568#define SSL_F_SSL_CTX_SET_PURPOSE 226
1569#define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219
1570#define SSL_F_SSL_CTX_SET_SSL_VERSION 170
1571#define SSL_F_SSL_CTX_SET_TRUST 229
1572#define SSL_F_SSL_CTX_USE_CERTIFICATE 171
1573#define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 172
1574#define SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE 220
1575#define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 173
1576#define SSL_F_SSL_CTX_USE_PRIVATEKEY 174
1577#define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1 175
1578#define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE 176
1579#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY 177
1580#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 178
1581#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 179
1582#define SSL_F_SSL_DO_HANDSHAKE 180
1583#define SSL_F_SSL_GET_NEW_SESSION 181
1584#define SSL_F_SSL_GET_PREV_SESSION 217
1585#define SSL_F_SSL_GET_SERVER_SEND_CERT 182
1586#define SSL_F_SSL_GET_SIGN_PKEY 183
1587#define SSL_F_SSL_INIT_WBIO_BUFFER 184
1588#define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185
1589#define SSL_F_SSL_NEW 186
1590#define SSL_F_SSL_READ 223
1591#define SSL_F_SSL_RSA_PRIVATE_DECRYPT 187
1592#define SSL_F_SSL_RSA_PUBLIC_ENCRYPT 188
1593#define SSL_F_SSL_SESSION_NEW 189
1594#define SSL_F_SSL_SESSION_PRINT_FP 190
1595#define SSL_F_SSL_SESS_CERT_NEW 225
1596#define SSL_F_SSL_SET_CERT 191
1597#define SSL_F_SSL_SET_FD 192
1598#define SSL_F_SSL_SET_PKEY 193
1599#define SSL_F_SSL_SET_PURPOSE 227
1600#define SSL_F_SSL_SET_RFD 194
1601#define SSL_F_SSL_SET_SESSION 195
1602#define SSL_F_SSL_SET_SESSION_ID_CONTEXT 218
1603#define SSL_F_SSL_SET_TRUST 228
1604#define SSL_F_SSL_SET_WFD 196
1605#define SSL_F_SSL_SHUTDOWN 224
1606#define SSL_F_SSL_UNDEFINED_FUNCTION 197
1607#define SSL_F_SSL_USE_CERTIFICATE 198
1608#define SSL_F_SSL_USE_CERTIFICATE_ASN1 199
1609#define SSL_F_SSL_USE_CERTIFICATE_FILE 200
1610#define SSL_F_SSL_USE_PRIVATEKEY 201
1611#define SSL_F_SSL_USE_PRIVATEKEY_ASN1 202
1612#define SSL_F_SSL_USE_PRIVATEKEY_FILE 203
1613#define SSL_F_SSL_USE_RSAPRIVATEKEY 204
1614#define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1 205
1615#define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 206
1616#define SSL_F_SSL_VERIFY_CERT_CHAIN 207
1617#define SSL_F_SSL_WRITE 208
1618#define SSL_F_TLS1_CHANGE_CIPHER_STATE 209
1619#define SSL_F_TLS1_ENC 210
1620#define SSL_F_TLS1_SETUP_KEY_BLOCK 211
1621#define SSL_F_WRITE_PENDING 212
1622
1623/* Reason codes. */
1624#define SSL_R_APP_DATA_IN_HANDSHAKE 100
1625#define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272
1626#define SSL_R_BAD_ALERT_RECORD 101
1627#define SSL_R_BAD_AUTHENTICATION_TYPE 102
1628#define SSL_R_BAD_CHANGE_CIPHER_SPEC 103
1629#define SSL_R_BAD_CHECKSUM 104
1630#define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106
1631#define SSL_R_BAD_DECOMPRESSION 107
1632#define SSL_R_BAD_DH_G_LENGTH 108
1633#define SSL_R_BAD_DH_PUB_KEY_LENGTH 109
1634#define SSL_R_BAD_DH_P_LENGTH 110
1635#define SSL_R_BAD_DIGEST_LENGTH 111
1636#define SSL_R_BAD_DSA_SIGNATURE 112
1637#define SSL_R_BAD_HELLO_REQUEST 105
1638#define SSL_R_BAD_LENGTH 271
1639#define SSL_R_BAD_MAC_DECODE 113
1640#define SSL_R_BAD_MESSAGE_TYPE 114
1641#define SSL_R_BAD_PACKET_LENGTH 115
1642#define SSL_R_BAD_PROTOCOL_VERSION_NUMBER 116
1643#define SSL_R_BAD_RESPONSE_ARGUMENT 117
1644#define SSL_R_BAD_RSA_DECRYPT 118
1645#define SSL_R_BAD_RSA_ENCRYPT 119
1646#define SSL_R_BAD_RSA_E_LENGTH 120
1647#define SSL_R_BAD_RSA_MODULUS_LENGTH 121
1648#define SSL_R_BAD_RSA_SIGNATURE 122
1649#define SSL_R_BAD_SIGNATURE 123
1650#define SSL_R_BAD_SSL_FILETYPE 124
1651#define SSL_R_BAD_SSL_SESSION_ID_LENGTH 125
1652#define SSL_R_BAD_STATE 126
1653#define SSL_R_BAD_WRITE_RETRY 127
1654#define SSL_R_BIO_NOT_SET 128
1655#define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG 129
1656#define SSL_R_BN_LIB 130
1657#define SSL_R_CA_DN_LENGTH_MISMATCH 131
1658#define SSL_R_CA_DN_TOO_LONG 132
1659#define SSL_R_CCS_RECEIVED_EARLY 133
1660#define SSL_R_CERTIFICATE_VERIFY_FAILED 134
1661#define SSL_R_CERT_LENGTH_MISMATCH 135
1662#define SSL_R_CHALLENGE_IS_DIFFERENT 136
1663#define SSL_R_CIPHER_CODE_WRONG_LENGTH 137
1664#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138
1665#define SSL_R_CIPHER_TABLE_SRC_ERROR 139
1666#define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140
1667#define SSL_R_COMPRESSION_FAILURE 141
1668#define SSL_R_COMPRESSION_LIBRARY_ERROR 142
1669#define SSL_R_CONNECTION_ID_IS_DIFFERENT 143
1670#define SSL_R_CONNECTION_TYPE_NOT_SET 144
1671#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145
1672#define SSL_R_DATA_LENGTH_TOO_LONG 146
1673#define SSL_R_DECRYPTION_FAILED 147
1674#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 1109
1675#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148
1676#define SSL_R_DIGEST_CHECK_FAILED 149
1677#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150
1678#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 1092
1679#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151
1680#define SSL_R_EXCESSIVE_MESSAGE_SIZE 152
1681#define SSL_R_EXTRA_DATA_IN_MESSAGE 153
1682#define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154
1683#define SSL_R_HTTPS_PROXY_REQUEST 155
1684#define SSL_R_HTTP_REQUEST 156
1685#define SSL_R_ILLEGAL_PADDING 1110
1686#define SSL_R_INVALID_CHALLENGE_LENGTH 158
1687#define SSL_R_INVALID_COMMAND 280
1688#define SSL_R_INVALID_PURPOSE 278
1689#define SSL_R_INVALID_TRUST 279
1690#define SSL_R_KEY_ARG_TOO_LONG 1112
1691#define SSL_R_KRB5 1104
1692#define SSL_R_KRB5_C_CC_PRINC 1094
1693#define SSL_R_KRB5_C_GET_CRED 1095
1694#define SSL_R_KRB5_C_INIT 1096
1695#define SSL_R_KRB5_C_MK_REQ 1097
1696#define SSL_R_KRB5_S_BAD_TICKET 1098
1697#define SSL_R_KRB5_S_INIT 1099
1698#define SSL_R_KRB5_S_RD_REQ 1108
1699#define SSL_R_KRB5_S_TKT_EXPIRED 1105
1700#define SSL_R_KRB5_S_TKT_NYV 1106
1701#define SSL_R_KRB5_S_TKT_SKEW 1107
1702#define SSL_R_LENGTH_MISMATCH 159
1703#define SSL_R_LENGTH_TOO_SHORT 160
1704#define SSL_R_LIBRARY_BUG 274
1705#define SSL_R_LIBRARY_HAS_NO_CIPHERS 161
1706#define SSL_R_MASTER_KEY_TOO_LONG 1112
1707#define SSL_R_MESSAGE_TOO_LONG 1111
1708#define SSL_R_MISSING_DH_DSA_CERT 162
1709#define SSL_R_MISSING_DH_KEY 163
1710#define SSL_R_MISSING_DH_RSA_CERT 164
1711#define SSL_R_MISSING_DSA_SIGNING_CERT 165
1712#define SSL_R_MISSING_EXPORT_TMP_DH_KEY 166
1713#define SSL_R_MISSING_EXPORT_TMP_RSA_KEY 167
1714#define SSL_R_MISSING_RSA_CERTIFICATE 168
1715#define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169
1716#define SSL_R_MISSING_RSA_SIGNING_CERT 170
1717#define SSL_R_MISSING_TMP_DH_KEY 171
1718#define SSL_R_MISSING_TMP_RSA_KEY 172
1719#define SSL_R_MISSING_TMP_RSA_PKEY 173
1720#define SSL_R_MISSING_VERIFY_MESSAGE 174
1721#define SSL_R_NON_SSLV2_INITIAL_PACKET 175
1722#define SSL_R_NO_CERTIFICATES_RETURNED 176
1723#define SSL_R_NO_CERTIFICATE_ASSIGNED 177
1724#define SSL_R_NO_CERTIFICATE_RETURNED 178
1725#define SSL_R_NO_CERTIFICATE_SET 179
1726#define SSL_R_NO_CERTIFICATE_SPECIFIED 180
1727#define SSL_R_NO_CIPHERS_AVAILABLE 181
1728#define SSL_R_NO_CIPHERS_PASSED 182
1729#define SSL_R_NO_CIPHERS_SPECIFIED 183
1730#define SSL_R_NO_CIPHER_LIST 184
1731#define SSL_R_NO_CIPHER_MATCH 185
1732#define SSL_R_NO_CLIENT_CERT_RECEIVED 186
1733#define SSL_R_NO_COMPRESSION_SPECIFIED 187
1734#define SSL_R_NO_METHOD_SPECIFIED 188
1735#define SSL_R_NO_PRIVATEKEY 189
1736#define SSL_R_NO_PRIVATE_KEY_ASSIGNED 190
1737#define SSL_R_NO_PROTOCOLS_AVAILABLE 191
1738#define SSL_R_NO_PUBLICKEY 192
1739#define SSL_R_NO_SHARED_CIPHER 193
1740#define SSL_R_NO_VERIFY_CALLBACK 194
1741#define SSL_R_NULL_SSL_CTX 195
1742#define SSL_R_NULL_SSL_METHOD_PASSED 196
1743#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197
1744#define SSL_R_PACKET_LENGTH_TOO_LONG 198
1745#define SSL_R_PATH_TOO_LONG 270
1746#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199
1747#define SSL_R_PEER_ERROR 200
1748#define SSL_R_PEER_ERROR_CERTIFICATE 201
1749#define SSL_R_PEER_ERROR_NO_CERTIFICATE 202
1750#define SSL_R_PEER_ERROR_NO_CIPHER 203
1751#define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 204
1752#define SSL_R_PRE_MAC_LENGTH_TOO_LONG 205
1753#define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS 206
1754#define SSL_R_PROTOCOL_IS_SHUTDOWN 207
1755#define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR 208
1756#define SSL_R_PUBLIC_KEY_IS_NOT_RSA 209
1757#define SSL_R_PUBLIC_KEY_NOT_RSA 210
1758#define SSL_R_READ_BIO_NOT_SET 211
1759#define SSL_R_READ_WRONG_PACKET_TYPE 212
1760#define SSL_R_RECORD_LENGTH_MISMATCH 213
1761#define SSL_R_RECORD_TOO_LARGE 214
1762#define SSL_R_RECORD_TOO_SMALL 1093
1763#define SSL_R_REQUIRED_CIPHER_MISSING 215
1764#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216
1765#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217
1766#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO 218
1767#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277
1768#define SSL_R_SHORT_READ 219
1769#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220
1770#define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221
1771#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG 1114
1772#define SSL_R_SSL3_SESSION_ID_TOO_LONG 1113
1773#define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222
1774#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042
1775#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020
1776#define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045
1777#define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044
1778#define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046
1779#define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030
1780#define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040
1781#define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047
1782#define SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041
1783#define SSL_R_SSLV3_ALERT_PEER_ERROR_CERTIFICATE 223
1784#define SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CERTIFICATE 224
1785#define SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CIPHER 225
1786#define SSL_R_SSLV3_ALERT_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 226
1787#define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010
1788#define SSL_R_SSLV3_ALERT_UNKNOWN_REMOTE_ERROR_TYPE 227
1789#define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043
1790#define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION 228
1791#define SSL_R_SSL_HANDSHAKE_FAILURE 229
1792#define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS 230
1793#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED 1102
1794#define SSL_R_SSL_SESSION_ID_CONFLICT 1103
1795#define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG 273
1796#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH 1101
1797#define SSL_R_SSL_SESSION_ID_IS_DIFFERENT 231
1798#define SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049
1799#define SSL_R_TLSV1_ALERT_DECODE_ERROR 1050
1800#define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021
1801#define SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051
1802#define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060
1803#define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071
1804#define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080
1805#define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100
1806#define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070
1807#define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022
1808#define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048
1809#define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090
1810#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER 232
1811#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233
1812#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 234
1813#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 235
1814#define SSL_R_UNABLE_TO_DECODE_DH_CERTS 236
1815#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 237
1816#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 238
1817#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239
1818#define SSL_R_UNABLE_TO_FIND_SSL_METHOD 240
1819#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 241
1820#define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES 242
1821#define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243
1822#define SSL_R_UNEXPECTED_MESSAGE 244
1823#define SSL_R_UNEXPECTED_RECORD 245
1824#define SSL_R_UNINITIALIZED 276
1825#define SSL_R_UNKNOWN_ALERT_TYPE 246
1826#define SSL_R_UNKNOWN_CERTIFICATE_TYPE 247
1827#define SSL_R_UNKNOWN_CIPHER_RETURNED 248
1828#define SSL_R_UNKNOWN_CIPHER_TYPE 249
1829#define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE 250
1830#define SSL_R_UNKNOWN_PKEY_TYPE 251
1831#define SSL_R_UNKNOWN_PROTOCOL 252
1832#define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE 253
1833#define SSL_R_UNKNOWN_SSL_VERSION 254
1834#define SSL_R_UNKNOWN_STATE 255
1835#define SSL_R_UNSUPPORTED_CIPHER 256
1836#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257
1837#define SSL_R_UNSUPPORTED_OPTION 1091
1838#define SSL_R_UNSUPPORTED_PROTOCOL 258
1839#define SSL_R_UNSUPPORTED_SSL_VERSION 259
1840#define SSL_R_WRITE_BIO_NOT_SET 260
1841#define SSL_R_WRONG_CIPHER_RETURNED 261
1842#define SSL_R_WRONG_MESSAGE_TYPE 262
1843#define SSL_R_WRONG_NUMBER_OF_KEY_BITS 263
1844#define SSL_R_WRONG_SIGNATURE_LENGTH 264
1845#define SSL_R_WRONG_SIGNATURE_SIZE 265
1846#define SSL_R_WRONG_SSL_VERSION 266
1847#define SSL_R_WRONG_VERSION_NUMBER 267
1848#define SSL_R_X509_LIB 268
1849#define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269
1850
1851#ifdef __cplusplus
1852}
1853#endif
1854#endif
diff --git a/src/lib/libssl/ssl/Makefile b/src/lib/libssl/ssl/Makefile
new file mode 100644
index 0000000000..ae911d6fcc
--- /dev/null
+++ b/src/lib/libssl/ssl/Makefile
@@ -0,0 +1,55 @@
1# $OpenBSD: Makefile,v 1.17 2003/06/02 08:45:58 markus Exp $
2
3LIB= ssl
4
5SSLEAYDIST= src
6
7LSSL_SRC= ${.CURDIR}/../${SSLEAYDIST}/ssl
8
9.if ${MACHINE_ARCH} == "i386"
10CFLAGS+= -DL_ENDIAN -DBN_ASM
11.else
12.if ${MACHINE_ARCH} == "mips"
13CFLAGS+= -DL_ENDIAN
14.else
15.if ${MACHINE_ARCH} == "vax"
16CFLAGS+= -DL_ENDIAN
17.else
18.if ${MACHINE_ARCH} == "alpha"
19# no ENDIAN stuff defined for alpha
20.else
21CFLAGS+= -DB_ENDIAN
22.endif
23.endif
24.endif
25.endif
26
27CFLAGS+= -DOPENSSL_NO_IDEA -DTERMIOS -DANSI_SOURCE -DNO_ERR
28CFLAGS+= -DOPENSSL_NO_MDC2
29CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5 -DSO_DLFCN -DHAVE_DLFCN_H
30CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST}
31
32SRCS= bio_ssl.c s2_clnt.c s3_both.c s3_srvr.c ssl_err2.c ssl_txt.c \
33 t1_srvr.c s23_clnt.c s2_enc.c s3_clnt.c ssl_algs.c ssl_lib.c \
34 ssltest.c s23_lib.c s2_lib.c s3_enc.c ssl_asn1.c ssl_rsa.c \
35 t1_clnt.c s23_meth.c s2_meth.c s3_lib.c ssl_cert.c ssl_sess.c \
36 t1_enc.c s23_pkt.c s2_pkt.c s3_meth.c ssl_ciph.c ssl_stat.c \
37 t1_lib.c s23_srvr.c s2_srvr.c s3_pkt.c ssl_err.c \
38 t1_meth.c
39
40HDRS= ssl.h ssl2.h ssl3.h ssl23.h tls1.h kssl.h
41
42.PATH: ${LSSL_SRC}
43
44includes:
45 @test -d ${DESTDIR}/usr/include/openssl || \
46 mkdir ${DESTDIR}/usr/include/openssl
47 @cd ${LSSL_SRC}; for i in $(HDRS); do \
48 j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
49 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i\
50 ${DESTDIR}/usr/include/openssl"; \
51 echo $$j; \
52 eval "$$j"; \
53 done;
54
55.include <bsd.lib.mk>
diff --git a/src/lib/libssl/ssl/shlib_version b/src/lib/libssl/ssl/shlib_version
new file mode 100644
index 0000000000..d0f0988b41
--- /dev/null
+++ b/src/lib/libssl/ssl/shlib_version
@@ -0,0 +1,2 @@
1major=8
2minor=0
diff --git a/src/lib/libssl/ssl2.h b/src/lib/libssl/ssl2.h
new file mode 100644
index 0000000000..99a52ea0dd
--- /dev/null
+++ b/src/lib/libssl/ssl2.h
@@ -0,0 +1,268 @@
1/* ssl/ssl2.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_SSL2_H
60#define HEADER_SSL2_H
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66/* Protocol Version Codes */
67#define SSL2_VERSION 0x0002
68#define SSL2_VERSION_MAJOR 0x00
69#define SSL2_VERSION_MINOR 0x02
70/* #define SSL2_CLIENT_VERSION 0x0002 */
71/* #define SSL2_SERVER_VERSION 0x0002 */
72
73/* Protocol Message Codes */
74#define SSL2_MT_ERROR 0
75#define SSL2_MT_CLIENT_HELLO 1
76#define SSL2_MT_CLIENT_MASTER_KEY 2
77#define SSL2_MT_CLIENT_FINISHED 3
78#define SSL2_MT_SERVER_HELLO 4
79#define SSL2_MT_SERVER_VERIFY 5
80#define SSL2_MT_SERVER_FINISHED 6
81#define SSL2_MT_REQUEST_CERTIFICATE 7
82#define SSL2_MT_CLIENT_CERTIFICATE 8
83
84/* Error Message Codes */
85#define SSL2_PE_UNDEFINED_ERROR 0x0000
86#define SSL2_PE_NO_CIPHER 0x0001
87#define SSL2_PE_NO_CERTIFICATE 0x0002
88#define SSL2_PE_BAD_CERTIFICATE 0x0004
89#define SSL2_PE_UNSUPPORTED_CERTIFICATE_TYPE 0x0006
90
91/* Cipher Kind Values */
92#define SSL2_CK_NULL_WITH_MD5 0x02000000 /* v3 */
93#define SSL2_CK_RC4_128_WITH_MD5 0x02010080
94#define SSL2_CK_RC4_128_EXPORT40_WITH_MD5 0x02020080
95#define SSL2_CK_RC2_128_CBC_WITH_MD5 0x02030080
96#define SSL2_CK_RC2_128_CBC_EXPORT40_WITH_MD5 0x02040080
97#define SSL2_CK_IDEA_128_CBC_WITH_MD5 0x02050080
98#define SSL2_CK_DES_64_CBC_WITH_MD5 0x02060040
99#define SSL2_CK_DES_64_CBC_WITH_SHA 0x02060140 /* v3 */
100#define SSL2_CK_DES_192_EDE3_CBC_WITH_MD5 0x020700c0
101#define SSL2_CK_DES_192_EDE3_CBC_WITH_SHA 0x020701c0 /* v3 */
102#define SSL2_CK_RC4_64_WITH_MD5 0x02080080 /* MS hack */
103
104#define SSL2_CK_DES_64_CFB64_WITH_MD5_1 0x02ff0800 /* SSLeay */
105#define SSL2_CK_NULL 0x02ff0810 /* SSLeay */
106
107#define SSL2_TXT_DES_64_CFB64_WITH_MD5_1 "DES-CFB-M1"
108#define SSL2_TXT_NULL_WITH_MD5 "NULL-MD5"
109#define SSL2_TXT_RC4_128_WITH_MD5 "RC4-MD5"
110#define SSL2_TXT_RC4_128_EXPORT40_WITH_MD5 "EXP-RC4-MD5"
111#define SSL2_TXT_RC2_128_CBC_WITH_MD5 "RC2-CBC-MD5"
112#define SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 "EXP-RC2-CBC-MD5"
113#define SSL2_TXT_IDEA_128_CBC_WITH_MD5 "IDEA-CBC-MD5"
114#define SSL2_TXT_DES_64_CBC_WITH_MD5 "DES-CBC-MD5"
115#define SSL2_TXT_DES_64_CBC_WITH_SHA "DES-CBC-SHA"
116#define SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5 "DES-CBC3-MD5"
117#define SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA "DES-CBC3-SHA"
118#define SSL2_TXT_RC4_64_WITH_MD5 "RC4-64-MD5"
119
120#define SSL2_TXT_NULL "NULL"
121
122/* Flags for the SSL_CIPHER.algorithm2 field */
123#define SSL2_CF_5_BYTE_ENC 0x01
124#define SSL2_CF_8_BYTE_ENC 0x02
125
126/* Certificate Type Codes */
127#define SSL2_CT_X509_CERTIFICATE 0x01
128
129/* Authentication Type Code */
130#define SSL2_AT_MD5_WITH_RSA_ENCRYPTION 0x01
131
132#define SSL2_MAX_SSL_SESSION_ID_LENGTH 32
133
134/* Upper/Lower Bounds */
135#define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256
136#ifdef OPENSSL_SYS_MPE
137#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 29998u
138#else
139#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 32767u /* 2^15-1 */
140#endif
141#define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /* 2^14-1 */
142
143#define SSL2_CHALLENGE_LENGTH 16
144/*#define SSL2_CHALLENGE_LENGTH 32 */
145#define SSL2_MIN_CHALLENGE_LENGTH 16
146#define SSL2_MAX_CHALLENGE_LENGTH 32
147#define SSL2_CONNECTION_ID_LENGTH 16
148#define SSL2_MAX_CONNECTION_ID_LENGTH 16
149#define SSL2_SSL_SESSION_ID_LENGTH 16
150#define SSL2_MAX_CERT_CHALLENGE_LENGTH 32
151#define SSL2_MIN_CERT_CHALLENGE_LENGTH 16
152#define SSL2_MAX_KEY_MATERIAL_LENGTH 24
153
154#ifndef HEADER_SSL_LOCL_H
155#define CERT char
156#endif
157
158typedef struct ssl2_state_st
159 {
160 int three_byte_header;
161 int clear_text; /* clear text */
162 int escape; /* not used in SSLv2 */
163 int ssl2_rollback; /* used if SSLv23 rolled back to SSLv2 */
164
165 /* non-blocking io info, used to make sure the same
166 * args were passwd */
167 unsigned int wnum; /* number of bytes sent so far */
168 int wpend_tot;
169 const unsigned char *wpend_buf;
170
171 int wpend_off; /* offset to data to write */
172 int wpend_len; /* number of bytes passwd to write */
173 int wpend_ret; /* number of bytes to return to caller */
174
175 /* buffer raw data */
176 int rbuf_left;
177 int rbuf_offs;
178 unsigned char *rbuf;
179 unsigned char *wbuf;
180
181 unsigned char *write_ptr;/* used to point to the start due to
182 * 2/3 byte header. */
183
184 unsigned int padding;
185 unsigned int rlength; /* passed to ssl2_enc */
186 int ract_data_length; /* Set when things are encrypted. */
187 unsigned int wlength; /* passed to ssl2_enc */
188 int wact_data_length; /* Set when things are decrypted. */
189 unsigned char *ract_data;
190 unsigned char *wact_data;
191 unsigned char *mac_data;
192
193 unsigned char *read_key;
194 unsigned char *write_key;
195
196 /* Stuff specifically to do with this SSL session */
197 unsigned int challenge_length;
198 unsigned char challenge[SSL2_MAX_CHALLENGE_LENGTH];
199 unsigned int conn_id_length;
200 unsigned char conn_id[SSL2_MAX_CONNECTION_ID_LENGTH];
201 unsigned int key_material_length;
202 unsigned char key_material[SSL2_MAX_KEY_MATERIAL_LENGTH*2];
203
204 unsigned long read_sequence;
205 unsigned long write_sequence;
206
207 struct {
208 unsigned int conn_id_length;
209 unsigned int cert_type;
210 unsigned int cert_length;
211 unsigned int csl;
212 unsigned int clear;
213 unsigned int enc;
214 unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH];
215 unsigned int cipher_spec_length;
216 unsigned int session_id_length;
217 unsigned int clen;
218 unsigned int rlen;
219 } tmp;
220 } SSL2_STATE;
221
222/* SSLv2 */
223/* client */
224#define SSL2_ST_SEND_CLIENT_HELLO_A (0x10|SSL_ST_CONNECT)
225#define SSL2_ST_SEND_CLIENT_HELLO_B (0x11|SSL_ST_CONNECT)
226#define SSL2_ST_GET_SERVER_HELLO_A (0x20|SSL_ST_CONNECT)
227#define SSL2_ST_GET_SERVER_HELLO_B (0x21|SSL_ST_CONNECT)
228#define SSL2_ST_SEND_CLIENT_MASTER_KEY_A (0x30|SSL_ST_CONNECT)
229#define SSL2_ST_SEND_CLIENT_MASTER_KEY_B (0x31|SSL_ST_CONNECT)
230#define SSL2_ST_SEND_CLIENT_FINISHED_A (0x40|SSL_ST_CONNECT)
231#define SSL2_ST_SEND_CLIENT_FINISHED_B (0x41|SSL_ST_CONNECT)
232#define SSL2_ST_SEND_CLIENT_CERTIFICATE_A (0x50|SSL_ST_CONNECT)
233#define SSL2_ST_SEND_CLIENT_CERTIFICATE_B (0x51|SSL_ST_CONNECT)
234#define SSL2_ST_SEND_CLIENT_CERTIFICATE_C (0x52|SSL_ST_CONNECT)
235#define SSL2_ST_SEND_CLIENT_CERTIFICATE_D (0x53|SSL_ST_CONNECT)
236#define SSL2_ST_GET_SERVER_VERIFY_A (0x60|SSL_ST_CONNECT)
237#define SSL2_ST_GET_SERVER_VERIFY_B (0x61|SSL_ST_CONNECT)
238#define SSL2_ST_GET_SERVER_FINISHED_A (0x70|SSL_ST_CONNECT)
239#define SSL2_ST_GET_SERVER_FINISHED_B (0x71|SSL_ST_CONNECT)
240#define SSL2_ST_CLIENT_START_ENCRYPTION (0x80|SSL_ST_CONNECT)
241#define SSL2_ST_X509_GET_CLIENT_CERTIFICATE (0x90|SSL_ST_CONNECT)
242/* server */
243#define SSL2_ST_GET_CLIENT_HELLO_A (0x10|SSL_ST_ACCEPT)
244#define SSL2_ST_GET_CLIENT_HELLO_B (0x11|SSL_ST_ACCEPT)
245#define SSL2_ST_GET_CLIENT_HELLO_C (0x12|SSL_ST_ACCEPT)
246#define SSL2_ST_SEND_SERVER_HELLO_A (0x20|SSL_ST_ACCEPT)
247#define SSL2_ST_SEND_SERVER_HELLO_B (0x21|SSL_ST_ACCEPT)
248#define SSL2_ST_GET_CLIENT_MASTER_KEY_A (0x30|SSL_ST_ACCEPT)
249#define SSL2_ST_GET_CLIENT_MASTER_KEY_B (0x31|SSL_ST_ACCEPT)
250#define SSL2_ST_SEND_SERVER_VERIFY_A (0x40|SSL_ST_ACCEPT)
251#define SSL2_ST_SEND_SERVER_VERIFY_B (0x41|SSL_ST_ACCEPT)
252#define SSL2_ST_SEND_SERVER_VERIFY_C (0x42|SSL_ST_ACCEPT)
253#define SSL2_ST_GET_CLIENT_FINISHED_A (0x50|SSL_ST_ACCEPT)
254#define SSL2_ST_GET_CLIENT_FINISHED_B (0x51|SSL_ST_ACCEPT)
255#define SSL2_ST_SEND_SERVER_FINISHED_A (0x60|SSL_ST_ACCEPT)
256#define SSL2_ST_SEND_SERVER_FINISHED_B (0x61|SSL_ST_ACCEPT)
257#define SSL2_ST_SEND_REQUEST_CERTIFICATE_A (0x70|SSL_ST_ACCEPT)
258#define SSL2_ST_SEND_REQUEST_CERTIFICATE_B (0x71|SSL_ST_ACCEPT)
259#define SSL2_ST_SEND_REQUEST_CERTIFICATE_C (0x72|SSL_ST_ACCEPT)
260#define SSL2_ST_SEND_REQUEST_CERTIFICATE_D (0x73|SSL_ST_ACCEPT)
261#define SSL2_ST_SERVER_START_ENCRYPTION (0x80|SSL_ST_ACCEPT)
262#define SSL2_ST_X509_GET_SERVER_CERTIFICATE (0x90|SSL_ST_ACCEPT)
263
264#ifdef __cplusplus
265}
266#endif
267#endif
268
diff --git a/src/lib/libssl/ssl23.h b/src/lib/libssl/ssl23.h
new file mode 100644
index 0000000000..d3228983c7
--- /dev/null
+++ b/src/lib/libssl/ssl23.h
@@ -0,0 +1,83 @@
1/* ssl/ssl23.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_SSL23_H
60#define HEADER_SSL23_H
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66/*client */
67/* write to server */
68#define SSL23_ST_CW_CLNT_HELLO_A (0x210|SSL_ST_CONNECT)
69#define SSL23_ST_CW_CLNT_HELLO_B (0x211|SSL_ST_CONNECT)
70/* read from server */
71#define SSL23_ST_CR_SRVR_HELLO_A (0x220|SSL_ST_CONNECT)
72#define SSL23_ST_CR_SRVR_HELLO_B (0x221|SSL_ST_CONNECT)
73
74/* server */
75/* read from client */
76#define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT)
77#define SSL23_ST_SR_CLNT_HELLO_B (0x211|SSL_ST_ACCEPT)
78
79#ifdef __cplusplus
80}
81#endif
82#endif
83
diff --git a/src/lib/libssl/ssl3.h b/src/lib/libssl/ssl3.h
new file mode 100644
index 0000000000..1153aeda74
--- /dev/null
+++ b/src/lib/libssl/ssl3.h
@@ -0,0 +1,526 @@
1/* ssl/ssl3.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 * Copyright (c) 1998-2002 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_SSL3_H
113#define HEADER_SSL3_H
114
115#ifndef OPENSSL_NO_COMP
116#include <openssl/comp.h>
117#endif
118#include <openssl/buffer.h>
119#include <openssl/evp.h>
120#include <openssl/ssl.h>
121
122#ifdef __cplusplus
123extern "C" {
124#endif
125
126#define SSL3_CK_RSA_NULL_MD5 0x03000001
127#define SSL3_CK_RSA_NULL_SHA 0x03000002
128#define SSL3_CK_RSA_RC4_40_MD5 0x03000003
129#define SSL3_CK_RSA_RC4_128_MD5 0x03000004
130#define SSL3_CK_RSA_RC4_128_SHA 0x03000005
131#define SSL3_CK_RSA_RC2_40_MD5 0x03000006
132#define SSL3_CK_RSA_IDEA_128_SHA 0x03000007
133#define SSL3_CK_RSA_DES_40_CBC_SHA 0x03000008
134#define SSL3_CK_RSA_DES_64_CBC_SHA 0x03000009
135#define SSL3_CK_RSA_DES_192_CBC3_SHA 0x0300000A
136
137#define SSL3_CK_DH_DSS_DES_40_CBC_SHA 0x0300000B
138#define SSL3_CK_DH_DSS_DES_64_CBC_SHA 0x0300000C
139#define SSL3_CK_DH_DSS_DES_192_CBC3_SHA 0x0300000D
140#define SSL3_CK_DH_RSA_DES_40_CBC_SHA 0x0300000E
141#define SSL3_CK_DH_RSA_DES_64_CBC_SHA 0x0300000F
142#define SSL3_CK_DH_RSA_DES_192_CBC3_SHA 0x03000010
143
144#define SSL3_CK_EDH_DSS_DES_40_CBC_SHA 0x03000011
145#define SSL3_CK_EDH_DSS_DES_64_CBC_SHA 0x03000012
146#define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA 0x03000013
147#define SSL3_CK_EDH_RSA_DES_40_CBC_SHA 0x03000014
148#define SSL3_CK_EDH_RSA_DES_64_CBC_SHA 0x03000015
149#define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA 0x03000016
150
151#define SSL3_CK_ADH_RC4_40_MD5 0x03000017
152#define SSL3_CK_ADH_RC4_128_MD5 0x03000018
153#define SSL3_CK_ADH_DES_40_CBC_SHA 0x03000019
154#define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A
155#define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B
156
157#define SSL3_CK_FZA_DMS_NULL_SHA 0x0300001C
158#define SSL3_CK_FZA_DMS_FZA_SHA 0x0300001D
159#if 0 /* Because it clashes with KRB5, is never used any more, and is safe
160 to remove according to David Hopwood <david.hopwood@zetnet.co.uk>
161 of the ietf-tls list */
162#define SSL3_CK_FZA_DMS_RC4_SHA 0x0300001E
163#endif
164
165/* VRS Additional Kerberos5 entries
166 */
167#define SSL3_CK_KRB5_DES_64_CBC_SHA 0x0300001E
168#define SSL3_CK_KRB5_DES_192_CBC3_SHA 0x0300001F
169#define SSL3_CK_KRB5_RC4_128_SHA 0x03000020
170#define SSL3_CK_KRB5_IDEA_128_CBC_SHA 0x03000021
171#define SSL3_CK_KRB5_DES_64_CBC_MD5 0x03000022
172#define SSL3_CK_KRB5_DES_192_CBC3_MD5 0x03000023
173#define SSL3_CK_KRB5_RC4_128_MD5 0x03000024
174#define SSL3_CK_KRB5_IDEA_128_CBC_MD5 0x03000025
175
176#define SSL3_CK_KRB5_DES_40_CBC_SHA 0x03000026
177#define SSL3_CK_KRB5_RC2_40_CBC_SHA 0x03000027
178#define SSL3_CK_KRB5_RC4_40_SHA 0x03000028
179#define SSL3_CK_KRB5_DES_40_CBC_MD5 0x03000029
180#define SSL3_CK_KRB5_RC2_40_CBC_MD5 0x0300002A
181#define SSL3_CK_KRB5_RC4_40_MD5 0x0300002B
182
183#define SSL3_TXT_RSA_NULL_MD5 "NULL-MD5"
184#define SSL3_TXT_RSA_NULL_SHA "NULL-SHA"
185#define SSL3_TXT_RSA_RC4_40_MD5 "EXP-RC4-MD5"
186#define SSL3_TXT_RSA_RC4_128_MD5 "RC4-MD5"
187#define SSL3_TXT_RSA_RC4_128_SHA "RC4-SHA"
188#define SSL3_TXT_RSA_RC2_40_MD5 "EXP-RC2-CBC-MD5"
189#define SSL3_TXT_RSA_IDEA_128_SHA "IDEA-CBC-SHA"
190#define SSL3_TXT_RSA_DES_40_CBC_SHA "EXP-DES-CBC-SHA"
191#define SSL3_TXT_RSA_DES_64_CBC_SHA "DES-CBC-SHA"
192#define SSL3_TXT_RSA_DES_192_CBC3_SHA "DES-CBC3-SHA"
193
194#define SSL3_TXT_DH_DSS_DES_40_CBC_SHA "EXP-DH-DSS-DES-CBC-SHA"
195#define SSL3_TXT_DH_DSS_DES_64_CBC_SHA "DH-DSS-DES-CBC-SHA"
196#define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA "DH-DSS-DES-CBC3-SHA"
197#define SSL3_TXT_DH_RSA_DES_40_CBC_SHA "EXP-DH-RSA-DES-CBC-SHA"
198#define SSL3_TXT_DH_RSA_DES_64_CBC_SHA "DH-RSA-DES-CBC-SHA"
199#define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA "DH-RSA-DES-CBC3-SHA"
200
201#define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA "EXP-EDH-DSS-DES-CBC-SHA"
202#define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA "EDH-DSS-DES-CBC-SHA"
203#define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA "EDH-DSS-DES-CBC3-SHA"
204#define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA "EXP-EDH-RSA-DES-CBC-SHA"
205#define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA "EDH-RSA-DES-CBC-SHA"
206#define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA "EDH-RSA-DES-CBC3-SHA"
207
208#define SSL3_TXT_ADH_RC4_40_MD5 "EXP-ADH-RC4-MD5"
209#define SSL3_TXT_ADH_RC4_128_MD5 "ADH-RC4-MD5"
210#define SSL3_TXT_ADH_DES_40_CBC_SHA "EXP-ADH-DES-CBC-SHA"
211#define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA"
212#define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA"
213
214#define SSL3_TXT_FZA_DMS_NULL_SHA "FZA-NULL-SHA"
215#define SSL3_TXT_FZA_DMS_FZA_SHA "FZA-FZA-CBC-SHA"
216#define SSL3_TXT_FZA_DMS_RC4_SHA "FZA-RC4-SHA"
217
218#define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA"
219#define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA"
220#define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA"
221#define SSL3_TXT_KRB5_IDEA_128_CBC_SHA "KRB5-IDEA-CBC-SHA"
222#define SSL3_TXT_KRB5_DES_64_CBC_MD5 "KRB5-DES-CBC-MD5"
223#define SSL3_TXT_KRB5_DES_192_CBC3_MD5 "KRB5-DES-CBC3-MD5"
224#define SSL3_TXT_KRB5_RC4_128_MD5 "KRB5-RC4-MD5"
225#define SSL3_TXT_KRB5_IDEA_128_CBC_MD5 "KRB5-IDEA-CBC-MD5"
226
227#define SSL3_TXT_KRB5_DES_40_CBC_SHA "EXP-KRB5-DES-CBC-SHA"
228#define SSL3_TXT_KRB5_RC2_40_CBC_SHA "EXP-KRB5-RC2-CBC-SHA"
229#define SSL3_TXT_KRB5_RC4_40_SHA "EXP-KRB5-RC4-SHA"
230#define SSL3_TXT_KRB5_DES_40_CBC_MD5 "EXP-KRB5-DES-CBC-MD5"
231#define SSL3_TXT_KRB5_RC2_40_CBC_MD5 "EXP-KRB5-RC2-CBC-MD5"
232#define SSL3_TXT_KRB5_RC4_40_MD5 "EXP-KRB5-RC4-MD5"
233
234#define SSL3_SSL_SESSION_ID_LENGTH 32
235#define SSL3_MAX_SSL_SESSION_ID_LENGTH 32
236
237#define SSL3_MASTER_SECRET_SIZE 48
238#define SSL3_RANDOM_SIZE 32
239#define SSL3_SESSION_ID_SIZE 32
240#define SSL3_RT_HEADER_LENGTH 5
241
242/* Due to MS stuffing up, this can change.... */
243#if defined(OPENSSL_SYS_WIN16) || \
244 (defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32))
245#define SSL3_RT_MAX_EXTRA (14000)
246#else
247#define SSL3_RT_MAX_EXTRA (16384)
248#endif
249
250#define SSL3_RT_MAX_PLAIN_LENGTH 16384
251#define SSL3_RT_MAX_COMPRESSED_LENGTH (1024+SSL3_RT_MAX_PLAIN_LENGTH)
252#define SSL3_RT_MAX_ENCRYPTED_LENGTH (1024+SSL3_RT_MAX_COMPRESSED_LENGTH)
253#define SSL3_RT_MAX_PACKET_SIZE (SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH)
254#define SSL3_RT_MAX_DATA_SIZE (1024*1024)
255
256#define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54"
257#define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52"
258
259#define SSL3_VERSION 0x0300
260#define SSL3_VERSION_MAJOR 0x03
261#define SSL3_VERSION_MINOR 0x00
262
263#define SSL3_RT_CHANGE_CIPHER_SPEC 20
264#define SSL3_RT_ALERT 21
265#define SSL3_RT_HANDSHAKE 22
266#define SSL3_RT_APPLICATION_DATA 23
267
268#define SSL3_AL_WARNING 1
269#define SSL3_AL_FATAL 2
270
271#define SSL3_AD_CLOSE_NOTIFY 0
272#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
273#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
274#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
275#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
276#define SSL3_AD_NO_CERTIFICATE 41
277#define SSL3_AD_BAD_CERTIFICATE 42
278#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
279#define SSL3_AD_CERTIFICATE_REVOKED 44
280#define SSL3_AD_CERTIFICATE_EXPIRED 45
281#define SSL3_AD_CERTIFICATE_UNKNOWN 46
282#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
283
284typedef struct ssl3_record_st
285 {
286/*r */ int type; /* type of record */
287/*rw*/ unsigned int length; /* How many bytes available */
288/*r */ unsigned int off; /* read/write offset into 'buf' */
289/*rw*/ unsigned char *data; /* pointer to the record data */
290/*rw*/ unsigned char *input; /* where the decode bytes are */
291/*r */ unsigned char *comp; /* only used with decompression - malloc()ed */
292 } SSL3_RECORD;
293
294typedef struct ssl3_buffer_st
295 {
296 unsigned char *buf; /* at least SSL3_RT_MAX_PACKET_SIZE bytes,
297 * see ssl3_setup_buffers() */
298 size_t len; /* buffer size */
299 int offset; /* where to 'copy from' */
300 int left; /* how many bytes left */
301 } SSL3_BUFFER;
302
303#define SSL3_CT_RSA_SIGN 1
304#define SSL3_CT_DSS_SIGN 2
305#define SSL3_CT_RSA_FIXED_DH 3
306#define SSL3_CT_DSS_FIXED_DH 4
307#define SSL3_CT_RSA_EPHEMERAL_DH 5
308#define SSL3_CT_DSS_EPHEMERAL_DH 6
309#define SSL3_CT_FORTEZZA_DMS 20
310#define SSL3_CT_NUMBER 7
311
312#define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001
313#define SSL3_FLAGS_DELAY_CLIENT_FINISHED 0x0002
314#define SSL3_FLAGS_POP_BUFFER 0x0004
315#define TLS1_FLAGS_TLS_PADDING_BUG 0x0008
316
317typedef struct ssl3_state_st
318 {
319 long flags;
320 int delay_buf_pop_ret;
321
322 unsigned char read_sequence[8];
323 unsigned char read_mac_secret[EVP_MAX_MD_SIZE];
324 unsigned char write_sequence[8];
325 unsigned char write_mac_secret[EVP_MAX_MD_SIZE];
326
327 unsigned char server_random[SSL3_RANDOM_SIZE];
328 unsigned char client_random[SSL3_RANDOM_SIZE];
329
330 /* flags for countermeasure against known-IV weakness */
331 int need_empty_fragments;
332 int empty_fragment_done;
333
334 SSL3_BUFFER rbuf; /* read IO goes into here */
335 SSL3_BUFFER wbuf; /* write IO goes into here */
336
337 SSL3_RECORD rrec; /* each decoded record goes in here */
338 SSL3_RECORD wrec; /* goes out from here */
339
340 /* storage for Alert/Handshake protocol data received but not
341 * yet processed by ssl3_read_bytes: */
342 unsigned char alert_fragment[2];
343 unsigned int alert_fragment_len;
344 unsigned char handshake_fragment[4];
345 unsigned int handshake_fragment_len;
346
347 /* partial write - check the numbers match */
348 unsigned int wnum; /* number of bytes sent so far */
349 int wpend_tot; /* number bytes written */
350 int wpend_type;
351 int wpend_ret; /* number of bytes submitted */
352 const unsigned char *wpend_buf;
353
354 /* used during startup, digest all incoming/outgoing packets */
355 EVP_MD_CTX finish_dgst1;
356 EVP_MD_CTX finish_dgst2;
357
358 /* this is set whenerver we see a change_cipher_spec message
359 * come in when we are not looking for one */
360 int change_cipher_spec;
361
362 int warn_alert;
363 int fatal_alert;
364 /* we allow one fatal and one warning alert to be outstanding,
365 * send close alert via the warning alert */
366 int alert_dispatch;
367 unsigned char send_alert[2];
368
369 /* This flag is set when we should renegotiate ASAP, basically when
370 * there is no more data in the read or write buffers */
371 int renegotiate;
372 int total_renegotiations;
373 int num_renegotiations;
374
375 int in_read_app_data;
376
377 struct {
378 /* actually only needs to be 16+20 */
379 unsigned char cert_verify_md[EVP_MAX_MD_SIZE*2];
380
381 /* actually only need to be 16+20 for SSLv3 and 12 for TLS */
382 unsigned char finish_md[EVP_MAX_MD_SIZE*2];
383 int finish_md_len;
384 unsigned char peer_finish_md[EVP_MAX_MD_SIZE*2];
385 int peer_finish_md_len;
386
387 unsigned long message_size;
388 int message_type;
389
390 /* used to hold the new cipher we are going to use */
391 SSL_CIPHER *new_cipher;
392#ifndef OPENSSL_NO_DH
393 DH *dh;
394#endif
395 /* used when SSL_ST_FLUSH_DATA is entered */
396 int next_state;
397
398 int reuse_message;
399
400 /* used for certificate requests */
401 int cert_req;
402 int ctype_num;
403 char ctype[SSL3_CT_NUMBER];
404 STACK_OF(X509_NAME) *ca_names;
405
406 int use_rsa_tmp;
407
408 int key_block_length;
409 unsigned char *key_block;
410
411 const EVP_CIPHER *new_sym_enc;
412 const EVP_MD *new_hash;
413#ifndef OPENSSL_NO_COMP
414 const SSL_COMP *new_compression;
415#else
416 char *new_compression;
417#endif
418 int cert_request;
419 } tmp;
420
421 } SSL3_STATE;
422
423/* SSLv3 */
424/*client */
425/* extra state */
426#define SSL3_ST_CW_FLUSH (0x100|SSL_ST_CONNECT)
427/* write to server */
428#define SSL3_ST_CW_CLNT_HELLO_A (0x110|SSL_ST_CONNECT)
429#define SSL3_ST_CW_CLNT_HELLO_B (0x111|SSL_ST_CONNECT)
430/* read from server */
431#define SSL3_ST_CR_SRVR_HELLO_A (0x120|SSL_ST_CONNECT)
432#define SSL3_ST_CR_SRVR_HELLO_B (0x121|SSL_ST_CONNECT)
433#define SSL3_ST_CR_CERT_A (0x130|SSL_ST_CONNECT)
434#define SSL3_ST_CR_CERT_B (0x131|SSL_ST_CONNECT)
435#define SSL3_ST_CR_KEY_EXCH_A (0x140|SSL_ST_CONNECT)
436#define SSL3_ST_CR_KEY_EXCH_B (0x141|SSL_ST_CONNECT)
437#define SSL3_ST_CR_CERT_REQ_A (0x150|SSL_ST_CONNECT)
438#define SSL3_ST_CR_CERT_REQ_B (0x151|SSL_ST_CONNECT)
439#define SSL3_ST_CR_SRVR_DONE_A (0x160|SSL_ST_CONNECT)
440#define SSL3_ST_CR_SRVR_DONE_B (0x161|SSL_ST_CONNECT)
441/* write to server */
442#define SSL3_ST_CW_CERT_A (0x170|SSL_ST_CONNECT)
443#define SSL3_ST_CW_CERT_B (0x171|SSL_ST_CONNECT)
444#define SSL3_ST_CW_CERT_C (0x172|SSL_ST_CONNECT)
445#define SSL3_ST_CW_CERT_D (0x173|SSL_ST_CONNECT)
446#define SSL3_ST_CW_KEY_EXCH_A (0x180|SSL_ST_CONNECT)
447#define SSL3_ST_CW_KEY_EXCH_B (0x181|SSL_ST_CONNECT)
448#define SSL3_ST_CW_CERT_VRFY_A (0x190|SSL_ST_CONNECT)
449#define SSL3_ST_CW_CERT_VRFY_B (0x191|SSL_ST_CONNECT)
450#define SSL3_ST_CW_CHANGE_A (0x1A0|SSL_ST_CONNECT)
451#define SSL3_ST_CW_CHANGE_B (0x1A1|SSL_ST_CONNECT)
452#define SSL3_ST_CW_FINISHED_A (0x1B0|SSL_ST_CONNECT)
453#define SSL3_ST_CW_FINISHED_B (0x1B1|SSL_ST_CONNECT)
454/* read from server */
455#define SSL3_ST_CR_CHANGE_A (0x1C0|SSL_ST_CONNECT)
456#define SSL3_ST_CR_CHANGE_B (0x1C1|SSL_ST_CONNECT)
457#define SSL3_ST_CR_FINISHED_A (0x1D0|SSL_ST_CONNECT)
458#define SSL3_ST_CR_FINISHED_B (0x1D1|SSL_ST_CONNECT)
459
460/* server */
461/* extra state */
462#define SSL3_ST_SW_FLUSH (0x100|SSL_ST_ACCEPT)
463/* read from client */
464/* Do not change the number values, they do matter */
465#define SSL3_ST_SR_CLNT_HELLO_A (0x110|SSL_ST_ACCEPT)
466#define SSL3_ST_SR_CLNT_HELLO_B (0x111|SSL_ST_ACCEPT)
467#define SSL3_ST_SR_CLNT_HELLO_C (0x112|SSL_ST_ACCEPT)
468/* write to client */
469#define SSL3_ST_SW_HELLO_REQ_A (0x120|SSL_ST_ACCEPT)
470#define SSL3_ST_SW_HELLO_REQ_B (0x121|SSL_ST_ACCEPT)
471#define SSL3_ST_SW_HELLO_REQ_C (0x122|SSL_ST_ACCEPT)
472#define SSL3_ST_SW_SRVR_HELLO_A (0x130|SSL_ST_ACCEPT)
473#define SSL3_ST_SW_SRVR_HELLO_B (0x131|SSL_ST_ACCEPT)
474#define SSL3_ST_SW_CERT_A (0x140|SSL_ST_ACCEPT)
475#define SSL3_ST_SW_CERT_B (0x141|SSL_ST_ACCEPT)
476#define SSL3_ST_SW_KEY_EXCH_A (0x150|SSL_ST_ACCEPT)
477#define SSL3_ST_SW_KEY_EXCH_B (0x151|SSL_ST_ACCEPT)
478#define SSL3_ST_SW_CERT_REQ_A (0x160|SSL_ST_ACCEPT)
479#define SSL3_ST_SW_CERT_REQ_B (0x161|SSL_ST_ACCEPT)
480#define SSL3_ST_SW_SRVR_DONE_A (0x170|SSL_ST_ACCEPT)
481#define SSL3_ST_SW_SRVR_DONE_B (0x171|SSL_ST_ACCEPT)
482/* read from client */
483#define SSL3_ST_SR_CERT_A (0x180|SSL_ST_ACCEPT)
484#define SSL3_ST_SR_CERT_B (0x181|SSL_ST_ACCEPT)
485#define SSL3_ST_SR_KEY_EXCH_A (0x190|SSL_ST_ACCEPT)
486#define SSL3_ST_SR_KEY_EXCH_B (0x191|SSL_ST_ACCEPT)
487#define SSL3_ST_SR_CERT_VRFY_A (0x1A0|SSL_ST_ACCEPT)
488#define SSL3_ST_SR_CERT_VRFY_B (0x1A1|SSL_ST_ACCEPT)
489#define SSL3_ST_SR_CHANGE_A (0x1B0|SSL_ST_ACCEPT)
490#define SSL3_ST_SR_CHANGE_B (0x1B1|SSL_ST_ACCEPT)
491#define SSL3_ST_SR_FINISHED_A (0x1C0|SSL_ST_ACCEPT)
492#define SSL3_ST_SR_FINISHED_B (0x1C1|SSL_ST_ACCEPT)
493/* write to client */
494#define SSL3_ST_SW_CHANGE_A (0x1D0|SSL_ST_ACCEPT)
495#define SSL3_ST_SW_CHANGE_B (0x1D1|SSL_ST_ACCEPT)
496#define SSL3_ST_SW_FINISHED_A (0x1E0|SSL_ST_ACCEPT)
497#define SSL3_ST_SW_FINISHED_B (0x1E1|SSL_ST_ACCEPT)
498
499#define SSL3_MT_HELLO_REQUEST 0
500#define SSL3_MT_CLIENT_HELLO 1
501#define SSL3_MT_SERVER_HELLO 2
502#define SSL3_MT_CERTIFICATE 11
503#define SSL3_MT_SERVER_KEY_EXCHANGE 12
504#define SSL3_MT_CERTIFICATE_REQUEST 13
505#define SSL3_MT_SERVER_DONE 14
506#define SSL3_MT_CERTIFICATE_VERIFY 15
507#define SSL3_MT_CLIENT_KEY_EXCHANGE 16
508#define SSL3_MT_FINISHED 20
509
510#define SSL3_MT_CCS 1
511
512/* These are used when changing over to a new cipher */
513#define SSL3_CC_READ 0x01
514#define SSL3_CC_WRITE 0x02
515#define SSL3_CC_CLIENT 0x10
516#define SSL3_CC_SERVER 0x20
517#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT|SSL3_CC_WRITE)
518#define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER|SSL3_CC_READ)
519#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT|SSL3_CC_READ)
520#define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER|SSL3_CC_WRITE)
521
522#ifdef __cplusplus
523}
524#endif
525#endif
526
diff --git a/src/lib/libssl/ssl_algs.c b/src/lib/libssl/ssl_algs.c
new file mode 100644
index 0000000000..3d1299ee7b
--- /dev/null
+++ b/src/lib/libssl/ssl_algs.c
@@ -0,0 +1,111 @@
1/* ssl/ssl_algs.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 <openssl/objects.h>
61#include <openssl/lhash.h>
62#include "ssl_locl.h"
63
64int SSL_library_init(void)
65 {
66
67#ifndef OPENSSL_NO_DES
68 EVP_add_cipher(EVP_des_cbc());
69 EVP_add_cipher(EVP_des_ede3_cbc());
70#endif
71#ifndef OPENSSL_NO_IDEA
72 EVP_add_cipher(EVP_idea_cbc());
73#endif
74#ifndef OPENSSL_NO_RC4
75 EVP_add_cipher(EVP_rc4());
76#endif
77#ifndef OPENSSL_NO_RC2
78 EVP_add_cipher(EVP_rc2_cbc());
79#endif
80#ifndef OPENSSL_NO_AES
81 EVP_add_cipher(EVP_aes_128_cbc());
82 EVP_add_cipher(EVP_aes_192_cbc());
83 EVP_add_cipher(EVP_aes_256_cbc());
84#endif
85#ifndef OPENSSL_NO_MD2
86 EVP_add_digest(EVP_md2());
87#endif
88#ifndef OPENSSL_NO_MD5
89 EVP_add_digest(EVP_md5());
90 EVP_add_digest_alias(SN_md5,"ssl2-md5");
91 EVP_add_digest_alias(SN_md5,"ssl3-md5");
92#endif
93#ifndef OPENSSL_NO_SHA
94 EVP_add_digest(EVP_sha1()); /* RSA with sha1 */
95 EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
96 EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA);
97#endif
98#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_DSA)
99 EVP_add_digest(EVP_dss1()); /* DSA with sha1 */
100 EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2);
101 EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1");
102 EVP_add_digest_alias(SN_dsaWithSHA1,"dss1");
103#endif
104 /* If you want support for phased out ciphers, add the following */
105#if 0
106 EVP_add_digest(EVP_sha());
107 EVP_add_digest(EVP_dss());
108#endif
109 return(1);
110 }
111
diff --git a/src/lib/libssl/ssl_asn1.c b/src/lib/libssl/ssl_asn1.c
new file mode 100644
index 0000000000..d8ff8fc4a3
--- /dev/null
+++ b/src/lib/libssl/ssl_asn1.c
@@ -0,0 +1,398 @@
1/* ssl/ssl_asn1.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 "ssl_locl.h"
62#include <openssl/asn1_mac.h>
63#include <openssl/objects.h>
64#include <openssl/x509.h>
65
66typedef struct ssl_session_asn1_st
67 {
68 ASN1_INTEGER version;
69 ASN1_INTEGER ssl_version;
70 ASN1_OCTET_STRING cipher;
71 ASN1_OCTET_STRING master_key;
72 ASN1_OCTET_STRING session_id;
73 ASN1_OCTET_STRING session_id_context;
74 ASN1_OCTET_STRING key_arg;
75#ifndef OPENSSL_NO_KRB5
76 ASN1_OCTET_STRING krb5_princ;
77#endif /* OPENSSL_NO_KRB5 */
78 ASN1_INTEGER time;
79 ASN1_INTEGER timeout;
80 ASN1_INTEGER verify_result;
81 } SSL_SESSION_ASN1;
82
83int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp)
84 {
85#define LSIZE2 (sizeof(long)*2)
86 int v1=0,v2=0,v3=0,v4=0,v5=0;
87 unsigned char buf[4],ibuf1[LSIZE2],ibuf2[LSIZE2];
88 unsigned char ibuf3[LSIZE2],ibuf4[LSIZE2],ibuf5[LSIZE2];
89 long l;
90 SSL_SESSION_ASN1 a;
91 M_ASN1_I2D_vars(in);
92
93 if ((in == NULL) || ((in->cipher == NULL) && (in->cipher_id == 0)))
94 return(0);
95
96 /* Note that I cheat in the following 2 assignments. I know
97 * that if the ASN1_INTEGER passed to ASN1_INTEGER_set
98 * is > sizeof(long)+1, the buffer will not be re-OPENSSL_malloc()ed.
99 * This is a bit evil but makes things simple, no dynamic allocation
100 * to clean up :-) */
101 a.version.length=LSIZE2;
102 a.version.type=V_ASN1_INTEGER;
103 a.version.data=ibuf1;
104 ASN1_INTEGER_set(&(a.version),SSL_SESSION_ASN1_VERSION);
105
106 a.ssl_version.length=LSIZE2;
107 a.ssl_version.type=V_ASN1_INTEGER;
108 a.ssl_version.data=ibuf2;
109 ASN1_INTEGER_set(&(a.ssl_version),in->ssl_version);
110
111 a.cipher.type=V_ASN1_OCTET_STRING;
112 a.cipher.data=buf;
113
114 if (in->cipher == NULL)
115 l=in->cipher_id;
116 else
117 l=in->cipher->id;
118 if (in->ssl_version == SSL2_VERSION)
119 {
120 a.cipher.length=3;
121 buf[0]=((unsigned char)(l>>16L))&0xff;
122 buf[1]=((unsigned char)(l>> 8L))&0xff;
123 buf[2]=((unsigned char)(l ))&0xff;
124 }
125 else
126 {
127 a.cipher.length=2;
128 buf[0]=((unsigned char)(l>>8L))&0xff;
129 buf[1]=((unsigned char)(l ))&0xff;
130 }
131
132 a.master_key.length=in->master_key_length;
133 a.master_key.type=V_ASN1_OCTET_STRING;
134 a.master_key.data=in->master_key;
135
136 a.session_id.length=in->session_id_length;
137 a.session_id.type=V_ASN1_OCTET_STRING;
138 a.session_id.data=in->session_id;
139
140 a.session_id_context.length=in->sid_ctx_length;
141 a.session_id_context.type=V_ASN1_OCTET_STRING;
142 a.session_id_context.data=in->sid_ctx;
143
144 a.key_arg.length=in->key_arg_length;
145 a.key_arg.type=V_ASN1_OCTET_STRING;
146 a.key_arg.data=in->key_arg;
147
148#ifndef OPENSSL_NO_KRB5
149 if (in->krb5_client_princ_len)
150 {
151 a.krb5_princ.length=in->krb5_client_princ_len;
152 a.krb5_princ.type=V_ASN1_OCTET_STRING;
153 a.krb5_princ.data=in->krb5_client_princ;
154 }
155#endif /* OPENSSL_NO_KRB5 */
156
157 if (in->time != 0L)
158 {
159 a.time.length=LSIZE2;
160 a.time.type=V_ASN1_INTEGER;
161 a.time.data=ibuf3;
162 ASN1_INTEGER_set(&(a.time),in->time);
163 }
164
165 if (in->timeout != 0L)
166 {
167 a.timeout.length=LSIZE2;
168 a.timeout.type=V_ASN1_INTEGER;
169 a.timeout.data=ibuf4;
170 ASN1_INTEGER_set(&(a.timeout),in->timeout);
171 }
172
173 if (in->verify_result != X509_V_OK)
174 {
175 a.verify_result.length=LSIZE2;
176 a.verify_result.type=V_ASN1_INTEGER;
177 a.verify_result.data=ibuf5;
178 ASN1_INTEGER_set(&a.verify_result,in->verify_result);
179 }
180
181
182 M_ASN1_I2D_len(&(a.version), i2d_ASN1_INTEGER);
183 M_ASN1_I2D_len(&(a.ssl_version), i2d_ASN1_INTEGER);
184 M_ASN1_I2D_len(&(a.cipher), i2d_ASN1_OCTET_STRING);
185 M_ASN1_I2D_len(&(a.session_id), i2d_ASN1_OCTET_STRING);
186 M_ASN1_I2D_len(&(a.master_key), i2d_ASN1_OCTET_STRING);
187#ifndef OPENSSL_NO_KRB5
188 if (in->krb5_client_princ_len)
189 M_ASN1_I2D_len(&(a.krb5_princ), i2d_ASN1_OCTET_STRING);
190#endif /* OPENSSL_NO_KRB5 */
191 if (in->key_arg_length > 0)
192 M_ASN1_I2D_len_IMP_opt(&(a.key_arg),i2d_ASN1_OCTET_STRING);
193 if (in->time != 0L)
194 M_ASN1_I2D_len_EXP_opt(&(a.time),i2d_ASN1_INTEGER,1,v1);
195 if (in->timeout != 0L)
196 M_ASN1_I2D_len_EXP_opt(&(a.timeout),i2d_ASN1_INTEGER,2,v2);
197 if (in->peer != NULL)
198 M_ASN1_I2D_len_EXP_opt(in->peer,i2d_X509,3,v3);
199 M_ASN1_I2D_len_EXP_opt(&a.session_id_context,i2d_ASN1_OCTET_STRING,4,v4);
200 if (in->verify_result != X509_V_OK)
201 M_ASN1_I2D_len_EXP_opt(&(a.verify_result),i2d_ASN1_INTEGER,5,v5);
202
203 M_ASN1_I2D_seq_total();
204
205 M_ASN1_I2D_put(&(a.version), i2d_ASN1_INTEGER);
206 M_ASN1_I2D_put(&(a.ssl_version), i2d_ASN1_INTEGER);
207 M_ASN1_I2D_put(&(a.cipher), i2d_ASN1_OCTET_STRING);
208 M_ASN1_I2D_put(&(a.session_id), i2d_ASN1_OCTET_STRING);
209 M_ASN1_I2D_put(&(a.master_key), i2d_ASN1_OCTET_STRING);
210#ifndef OPENSSL_NO_KRB5
211 if (in->krb5_client_princ_len)
212 M_ASN1_I2D_put(&(a.krb5_princ), i2d_ASN1_OCTET_STRING);
213#endif /* OPENSSL_NO_KRB5 */
214 if (in->key_arg_length > 0)
215 M_ASN1_I2D_put_IMP_opt(&(a.key_arg),i2d_ASN1_OCTET_STRING,0);
216 if (in->time != 0L)
217 M_ASN1_I2D_put_EXP_opt(&(a.time),i2d_ASN1_INTEGER,1,v1);
218 if (in->timeout != 0L)
219 M_ASN1_I2D_put_EXP_opt(&(a.timeout),i2d_ASN1_INTEGER,2,v2);
220 if (in->peer != NULL)
221 M_ASN1_I2D_put_EXP_opt(in->peer,i2d_X509,3,v3);
222 M_ASN1_I2D_put_EXP_opt(&a.session_id_context,i2d_ASN1_OCTET_STRING,4,
223 v4);
224 if (in->verify_result != X509_V_OK)
225 M_ASN1_I2D_put_EXP_opt(&a.verify_result,i2d_ASN1_INTEGER,5,v5);
226 M_ASN1_I2D_finish();
227 }
228
229SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp,
230 long length)
231 {
232 int version,ssl_version=0,i;
233 long id;
234 ASN1_INTEGER ai,*aip;
235 ASN1_OCTET_STRING os,*osp;
236 M_ASN1_D2I_vars(a,SSL_SESSION *,SSL_SESSION_new);
237
238 aip= &ai;
239 osp= &os;
240
241 M_ASN1_D2I_Init();
242 M_ASN1_D2I_start_sequence();
243
244 ai.data=NULL; ai.length=0;
245 M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER);
246 version=(int)ASN1_INTEGER_get(aip);
247 if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; }
248
249 /* we don't care about the version right now :-) */
250 M_ASN1_D2I_get(aip,d2i_ASN1_INTEGER);
251 ssl_version=(int)ASN1_INTEGER_get(aip);
252 ret->ssl_version=ssl_version;
253 if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; }
254
255 os.data=NULL; os.length=0;
256 M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING);
257 if (ssl_version == SSL2_VERSION)
258 {
259 if (os.length != 3)
260 {
261 c.error=SSL_R_CIPHER_CODE_WRONG_LENGTH;
262 goto err;
263 }
264 id=0x02000000L|
265 ((unsigned long)os.data[0]<<16L)|
266 ((unsigned long)os.data[1]<< 8L)|
267 (unsigned long)os.data[2];
268 }
269 else if ((ssl_version>>8) == 3)
270 {
271 if (os.length != 2)
272 {
273 c.error=SSL_R_CIPHER_CODE_WRONG_LENGTH;
274 goto err;
275 }
276 id=0x03000000L|
277 ((unsigned long)os.data[0]<<8L)|
278 (unsigned long)os.data[1];
279 }
280 else
281 {
282 SSLerr(SSL_F_D2I_SSL_SESSION,SSL_R_UNKNOWN_SSL_VERSION);
283 return(NULL);
284 }
285
286 ret->cipher=NULL;
287 ret->cipher_id=id;
288
289 M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING);
290 if ((ssl_version>>8) == SSL3_VERSION)
291 i=SSL3_MAX_SSL_SESSION_ID_LENGTH;
292 else /* if (ssl_version == SSL2_VERSION) */
293 i=SSL2_MAX_SSL_SESSION_ID_LENGTH;
294
295 if (os.length > i)
296 os.length = i;
297 if (os.length > sizeof ret->session_id) /* can't happen */
298 os.length = sizeof ret->session_id;
299
300 ret->session_id_length=os.length;
301 OPENSSL_assert(os.length <= sizeof ret->session_id);
302 memcpy(ret->session_id,os.data,os.length);
303
304 M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING);
305 if (ret->master_key_length > SSL_MAX_MASTER_KEY_LENGTH)
306 ret->master_key_length=SSL_MAX_MASTER_KEY_LENGTH;
307 else
308 ret->master_key_length=os.length;
309 memcpy(ret->master_key,os.data,ret->master_key_length);
310
311 os.length=0;
312
313#ifndef OPENSSL_NO_KRB5
314 os.length=0;
315 M_ASN1_D2I_get_opt(osp,d2i_ASN1_OCTET_STRING,V_ASN1_OCTET_STRING);
316 if (os.data)
317 {
318 if (os.length > SSL_MAX_KRB5_PRINCIPAL_LENGTH)
319 ret->krb5_client_princ_len=0;
320 else
321 ret->krb5_client_princ_len=os.length;
322 memcpy(ret->krb5_client_princ,os.data,ret->krb5_client_princ_len);
323 OPENSSL_free(os.data);
324 os.data = NULL;
325 os.length = 0;
326 }
327 else
328 ret->krb5_client_princ_len=0;
329#endif /* OPENSSL_NO_KRB5 */
330
331 M_ASN1_D2I_get_IMP_opt(osp,d2i_ASN1_OCTET_STRING,0,V_ASN1_OCTET_STRING);
332 if (os.length > SSL_MAX_KEY_ARG_LENGTH)
333 ret->key_arg_length=SSL_MAX_KEY_ARG_LENGTH;
334 else
335 ret->key_arg_length=os.length;
336 memcpy(ret->key_arg,os.data,ret->key_arg_length);
337 if (os.data != NULL) OPENSSL_free(os.data);
338
339 ai.length=0;
340 M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,1);
341 if (ai.data != NULL)
342 {
343 ret->time=ASN1_INTEGER_get(aip);
344 OPENSSL_free(ai.data); ai.data=NULL; ai.length=0;
345 }
346 else
347 ret->time=time(NULL);
348
349 ai.length=0;
350 M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,2);
351 if (ai.data != NULL)
352 {
353 ret->timeout=ASN1_INTEGER_get(aip);
354 OPENSSL_free(ai.data); ai.data=NULL; ai.length=0;
355 }
356 else
357 ret->timeout=3;
358
359 if (ret->peer != NULL)
360 {
361 X509_free(ret->peer);
362 ret->peer=NULL;
363 }
364 M_ASN1_D2I_get_EXP_opt(ret->peer,d2i_X509,3);
365
366 os.length=0;
367 os.data=NULL;
368 M_ASN1_D2I_get_EXP_opt(osp,d2i_ASN1_OCTET_STRING,4);
369
370 if(os.data != NULL)
371 {
372 if (os.length > SSL_MAX_SID_CTX_LENGTH)
373 {
374 ret->sid_ctx_length=os.length;
375 SSLerr(SSL_F_D2I_SSL_SESSION,SSL_R_BAD_LENGTH);
376 }
377 else
378 {
379 ret->sid_ctx_length=os.length;
380 memcpy(ret->sid_ctx,os.data,os.length);
381 }
382 OPENSSL_free(os.data); os.data=NULL; os.length=0;
383 }
384 else
385 ret->sid_ctx_length=0;
386
387 ai.length=0;
388 M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,5);
389 if (ai.data != NULL)
390 {
391 ret->verify_result=ASN1_INTEGER_get(aip);
392 OPENSSL_free(ai.data); ai.data=NULL; ai.length=0;
393 }
394 else
395 ret->verify_result=X509_V_OK;
396
397 M_ASN1_D2I_Finish(a,SSL_SESSION_free,SSL_F_D2I_SSL_SESSION);
398 }
diff --git a/src/lib/libssl/ssl_cert.c b/src/lib/libssl/ssl_cert.c
new file mode 100644
index 0000000000..da90078a37
--- /dev/null
+++ b/src/lib/libssl/ssl_cert.c
@@ -0,0 +1,860 @@
1/*! \file ssl/ssl_cert.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) 1999 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
107#include <stdio.h>
108
109#include "e_os.h"
110#ifndef NO_SYS_TYPES_H
111# include <sys/types.h>
112#endif
113
114#if !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_VMS) && !defined(NeXT) && !defined(MAC_OS_pre_X)
115#include <dirent.h>
116#endif
117
118#if defined(WIN32)
119#include <windows.h>
120#endif
121
122#ifdef NeXT
123#include <sys/dir.h>
124#define dirent direct
125#endif
126
127#include <openssl/objects.h>
128#include <openssl/bio.h>
129#include <openssl/pem.h>
130#include <openssl/x509v3.h>
131#include "ssl_locl.h"
132
133int SSL_get_ex_data_X509_STORE_CTX_idx(void)
134 {
135 static volatile int ssl_x509_store_ctx_idx= -1;
136
137 if (ssl_x509_store_ctx_idx < 0)
138 {
139 /* any write lock will do; usually this branch
140 * will only be taken once anyway */
141 CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
142
143 if (ssl_x509_store_ctx_idx < 0)
144 {
145 ssl_x509_store_ctx_idx=X509_STORE_CTX_get_ex_new_index(
146 0,"SSL for verify callback",NULL,NULL,NULL);
147 }
148
149 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);
150 }
151 return ssl_x509_store_ctx_idx;
152 }
153
154CERT *ssl_cert_new(void)
155 {
156 CERT *ret;
157
158 ret=(CERT *)OPENSSL_malloc(sizeof(CERT));
159 if (ret == NULL)
160 {
161 SSLerr(SSL_F_SSL_CERT_NEW,ERR_R_MALLOC_FAILURE);
162 return(NULL);
163 }
164 memset(ret,0,sizeof(CERT));
165
166 ret->key= &(ret->pkeys[SSL_PKEY_RSA_ENC]);
167 ret->references=1;
168
169 return(ret);
170 }
171
172CERT *ssl_cert_dup(CERT *cert)
173 {
174 CERT *ret;
175 int i;
176
177 ret = (CERT *)OPENSSL_malloc(sizeof(CERT));
178 if (ret == NULL)
179 {
180 SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_MALLOC_FAILURE);
181 return(NULL);
182 }
183
184 memset(ret, 0, sizeof(CERT));
185
186 ret->key = &ret->pkeys[cert->key - &cert->pkeys[0]];
187 /* or ret->key = ret->pkeys + (cert->key - cert->pkeys),
188 * if you find that more readable */
189
190 ret->valid = cert->valid;
191 ret->mask = cert->mask;
192 ret->export_mask = cert->export_mask;
193
194#ifndef OPENSSL_NO_RSA
195 if (cert->rsa_tmp != NULL)
196 {
197 RSA_up_ref(cert->rsa_tmp);
198 ret->rsa_tmp = cert->rsa_tmp;
199 }
200 ret->rsa_tmp_cb = cert->rsa_tmp_cb;
201#endif
202
203#ifndef OPENSSL_NO_DH
204 if (cert->dh_tmp != NULL)
205 {
206 /* DH parameters don't have a reference count */
207 ret->dh_tmp = DHparams_dup(cert->dh_tmp);
208 if (ret->dh_tmp == NULL)
209 {
210 SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_DH_LIB);
211 goto err;
212 }
213 if (cert->dh_tmp->priv_key)
214 {
215 BIGNUM *b = BN_dup(cert->dh_tmp->priv_key);
216 if (!b)
217 {
218 SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_BN_LIB);
219 goto err;
220 }
221 ret->dh_tmp->priv_key = b;
222 }
223 if (cert->dh_tmp->pub_key)
224 {
225 BIGNUM *b = BN_dup(cert->dh_tmp->pub_key);
226 if (!b)
227 {
228 SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_BN_LIB);
229 goto err;
230 }
231 ret->dh_tmp->pub_key = b;
232 }
233 }
234 ret->dh_tmp_cb = cert->dh_tmp_cb;
235#endif
236
237 for (i = 0; i < SSL_PKEY_NUM; i++)
238 {
239 if (cert->pkeys[i].x509 != NULL)
240 {
241 ret->pkeys[i].x509 = cert->pkeys[i].x509;
242 CRYPTO_add(&ret->pkeys[i].x509->references, 1,
243 CRYPTO_LOCK_X509);
244 }
245
246 if (cert->pkeys[i].privatekey != NULL)
247 {
248 ret->pkeys[i].privatekey = cert->pkeys[i].privatekey;
249 CRYPTO_add(&ret->pkeys[i].privatekey->references, 1,
250 CRYPTO_LOCK_EVP_PKEY);
251
252 switch(i)
253 {
254 /* If there was anything special to do for
255 * certain types of keys, we'd do it here.
256 * (Nothing at the moment, I think.) */
257
258 case SSL_PKEY_RSA_ENC:
259 case SSL_PKEY_RSA_SIGN:
260 /* We have an RSA key. */
261 break;
262
263 case SSL_PKEY_DSA_SIGN:
264 /* We have a DSA key. */
265 break;
266
267 case SSL_PKEY_DH_RSA:
268 case SSL_PKEY_DH_DSA:
269 /* We have a DH key. */
270 break;
271
272 default:
273 /* Can't happen. */
274 SSLerr(SSL_F_SSL_CERT_DUP, SSL_R_LIBRARY_BUG);
275 }
276 }
277 }
278
279 /* ret->extra_certs *should* exist, but currently the own certificate
280 * chain is held inside SSL_CTX */
281
282 ret->references=1;
283
284 return(ret);
285
286#ifndef OPENSSL_NO_DH /* avoid 'unreferenced label' warning if OPENSSL_NO_DH is defined */
287err:
288#endif
289#ifndef OPENSSL_NO_RSA
290 if (ret->rsa_tmp != NULL)
291 RSA_free(ret->rsa_tmp);
292#endif
293#ifndef OPENSSL_NO_DH
294 if (ret->dh_tmp != NULL)
295 DH_free(ret->dh_tmp);
296#endif
297
298 for (i = 0; i < SSL_PKEY_NUM; i++)
299 {
300 if (ret->pkeys[i].x509 != NULL)
301 X509_free(ret->pkeys[i].x509);
302 if (ret->pkeys[i].privatekey != NULL)
303 EVP_PKEY_free(ret->pkeys[i].privatekey);
304 }
305
306 return NULL;
307 }
308
309
310void ssl_cert_free(CERT *c)
311 {
312 int i;
313
314 if(c == NULL)
315 return;
316
317 i=CRYPTO_add(&c->references,-1,CRYPTO_LOCK_SSL_CERT);
318#ifdef REF_PRINT
319 REF_PRINT("CERT",c);
320#endif
321 if (i > 0) return;
322#ifdef REF_CHECK
323 if (i < 0)
324 {
325 fprintf(stderr,"ssl_cert_free, bad reference count\n");
326 abort(); /* ok */
327 }
328#endif
329
330#ifndef OPENSSL_NO_RSA
331 if (c->rsa_tmp) RSA_free(c->rsa_tmp);
332#endif
333#ifndef OPENSSL_NO_DH
334 if (c->dh_tmp) DH_free(c->dh_tmp);
335#endif
336
337 for (i=0; i<SSL_PKEY_NUM; i++)
338 {
339 if (c->pkeys[i].x509 != NULL)
340 X509_free(c->pkeys[i].x509);
341 if (c->pkeys[i].privatekey != NULL)
342 EVP_PKEY_free(c->pkeys[i].privatekey);
343#if 0
344 if (c->pkeys[i].publickey != NULL)
345 EVP_PKEY_free(c->pkeys[i].publickey);
346#endif
347 }
348 OPENSSL_free(c);
349 }
350
351int ssl_cert_inst(CERT **o)
352 {
353 /* Create a CERT if there isn't already one
354 * (which cannot really happen, as it is initially created in
355 * SSL_CTX_new; but the earlier code usually allows for that one
356 * being non-existant, so we follow that behaviour, as it might
357 * turn out that there actually is a reason for it -- but I'm
358 * not sure that *all* of the existing code could cope with
359 * s->cert being NULL, otherwise we could do without the
360 * initialization in SSL_CTX_new).
361 */
362
363 if (o == NULL)
364 {
365 SSLerr(SSL_F_SSL_CERT_INST, ERR_R_PASSED_NULL_PARAMETER);
366 return(0);
367 }
368 if (*o == NULL)
369 {
370 if ((*o = ssl_cert_new()) == NULL)
371 {
372 SSLerr(SSL_F_SSL_CERT_INST, ERR_R_MALLOC_FAILURE);
373 return(0);
374 }
375 }
376 return(1);
377 }
378
379
380SESS_CERT *ssl_sess_cert_new(void)
381 {
382 SESS_CERT *ret;
383
384 ret = OPENSSL_malloc(sizeof *ret);
385 if (ret == NULL)
386 {
387 SSLerr(SSL_F_SSL_SESS_CERT_NEW, ERR_R_MALLOC_FAILURE);
388 return NULL;
389 }
390
391 memset(ret, 0 ,sizeof *ret);
392 ret->peer_key = &(ret->peer_pkeys[SSL_PKEY_RSA_ENC]);
393 ret->references = 1;
394
395 return ret;
396 }
397
398void ssl_sess_cert_free(SESS_CERT *sc)
399 {
400 int i;
401
402 if (sc == NULL)
403 return;
404
405 i = CRYPTO_add(&sc->references, -1, CRYPTO_LOCK_SSL_SESS_CERT);
406#ifdef REF_PRINT
407 REF_PRINT("SESS_CERT", sc);
408#endif
409 if (i > 0)
410 return;
411#ifdef REF_CHECK
412 if (i < 0)
413 {
414 fprintf(stderr,"ssl_sess_cert_free, bad reference count\n");
415 abort(); /* ok */
416 }
417#endif
418
419 /* i == 0 */
420 if (sc->cert_chain != NULL)
421 sk_X509_pop_free(sc->cert_chain, X509_free);
422 for (i = 0; i < SSL_PKEY_NUM; i++)
423 {
424 if (sc->peer_pkeys[i].x509 != NULL)
425 X509_free(sc->peer_pkeys[i].x509);
426#if 0 /* We don't have the peer's private key. These lines are just
427 * here as a reminder that we're still using a not-quite-appropriate
428 * data structure. */
429 if (sc->peer_pkeys[i].privatekey != NULL)
430 EVP_PKEY_free(sc->peer_pkeys[i].privatekey);
431#endif
432 }
433
434#ifndef OPENSSL_NO_RSA
435 if (sc->peer_rsa_tmp != NULL)
436 RSA_free(sc->peer_rsa_tmp);
437#endif
438#ifndef OPENSSL_NO_DH
439 if (sc->peer_dh_tmp != NULL)
440 DH_free(sc->peer_dh_tmp);
441#endif
442
443 OPENSSL_free(sc);
444 }
445
446int ssl_set_peer_cert_type(SESS_CERT *sc,int type)
447 {
448 sc->peer_cert_type = type;
449 return(1);
450 }
451
452int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk)
453 {
454 X509 *x;
455 int i;
456 X509_STORE_CTX ctx;
457
458 if ((sk == NULL) || (sk_X509_num(sk) == 0))
459 return(0);
460
461 x=sk_X509_value(sk,0);
462 if(!X509_STORE_CTX_init(&ctx,s->ctx->cert_store,x,sk))
463 {
464 SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN,ERR_R_X509_LIB);
465 return(0);
466 }
467 if (SSL_get_verify_depth(s) >= 0)
468 X509_STORE_CTX_set_depth(&ctx, SSL_get_verify_depth(s));
469 X509_STORE_CTX_set_ex_data(&ctx,SSL_get_ex_data_X509_STORE_CTX_idx(),s);
470
471 /* We need to set the verify purpose. The purpose can be determined by
472 * the context: if its a server it will verify SSL client certificates
473 * or vice versa.
474 */
475 if (s->server)
476 i = X509_PURPOSE_SSL_CLIENT;
477 else
478 i = X509_PURPOSE_SSL_SERVER;
479
480 X509_STORE_CTX_purpose_inherit(&ctx, i, s->purpose, s->trust);
481
482 if (s->verify_callback)
483 X509_STORE_CTX_set_verify_cb(&ctx, s->verify_callback);
484
485 if (s->ctx->app_verify_callback != NULL)
486#if 1 /* new with OpenSSL 0.9.7 */
487 i=s->ctx->app_verify_callback(&ctx, s->ctx->app_verify_arg);
488#else
489 i=s->ctx->app_verify_callback(&ctx); /* should pass app_verify_arg */
490#endif
491 else
492 {
493#ifndef OPENSSL_NO_X509_VERIFY
494 i=X509_verify_cert(&ctx);
495#else
496 i=0;
497 ctx.error=X509_V_ERR_APPLICATION_VERIFICATION;
498 SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN,SSL_R_NO_VERIFY_CALLBACK);
499#endif
500 }
501
502 s->verify_result=ctx.error;
503 X509_STORE_CTX_cleanup(&ctx);
504
505 return(i);
506 }
507
508static void set_client_CA_list(STACK_OF(X509_NAME) **ca_list,STACK_OF(X509_NAME) *list)
509 {
510 if (*ca_list != NULL)
511 sk_X509_NAME_pop_free(*ca_list,X509_NAME_free);
512
513 *ca_list=list;
514 }
515
516STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk)
517 {
518 int i;
519 STACK_OF(X509_NAME) *ret;
520 X509_NAME *name;
521
522 ret=sk_X509_NAME_new_null();
523 for (i=0; i<sk_X509_NAME_num(sk); i++)
524 {
525 name=X509_NAME_dup(sk_X509_NAME_value(sk,i));
526 if ((name == NULL) || !sk_X509_NAME_push(ret,name))
527 {
528 sk_X509_NAME_pop_free(ret,X509_NAME_free);
529 return(NULL);
530 }
531 }
532 return(ret);
533 }
534
535void SSL_set_client_CA_list(SSL *s,STACK_OF(X509_NAME) *list)
536 {
537 set_client_CA_list(&(s->client_CA),list);
538 }
539
540void SSL_CTX_set_client_CA_list(SSL_CTX *ctx,STACK_OF(X509_NAME) *list)
541 {
542 set_client_CA_list(&(ctx->client_CA),list);
543 }
544
545STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *ctx)
546 {
547 return(ctx->client_CA);
548 }
549
550STACK_OF(X509_NAME) *SSL_get_client_CA_list(SSL *s)
551 {
552 if (s->type == SSL_ST_CONNECT)
553 { /* we are in the client */
554 if (((s->version>>8) == SSL3_VERSION_MAJOR) &&
555 (s->s3 != NULL))
556 return(s->s3->tmp.ca_names);
557 else
558 return(NULL);
559 }
560 else
561 {
562 if (s->client_CA != NULL)
563 return(s->client_CA);
564 else
565 return(s->ctx->client_CA);
566 }
567 }
568
569static int add_client_CA(STACK_OF(X509_NAME) **sk,X509 *x)
570 {
571 X509_NAME *name;
572
573 if (x == NULL) return(0);
574 if ((*sk == NULL) && ((*sk=sk_X509_NAME_new_null()) == NULL))
575 return(0);
576
577 if ((name=X509_NAME_dup(X509_get_subject_name(x))) == NULL)
578 return(0);
579
580 if (!sk_X509_NAME_push(*sk,name))
581 {
582 X509_NAME_free(name);
583 return(0);
584 }
585 return(1);
586 }
587
588int SSL_add_client_CA(SSL *ssl,X509 *x)
589 {
590 return(add_client_CA(&(ssl->client_CA),x));
591 }
592
593int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x)
594 {
595 return(add_client_CA(&(ctx->client_CA),x));
596 }
597
598static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b)
599 {
600 return(X509_NAME_cmp(*a,*b));
601 }
602
603#ifndef OPENSSL_NO_STDIO
604/*!
605 * Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed;
606 * it doesn't really have anything to do with clients (except that a common use
607 * for a stack of CAs is to send it to the client). Actually, it doesn't have
608 * much to do with CAs, either, since it will load any old cert.
609 * \param file the file containing one or more certs.
610 * \return a ::STACK containing the certs.
611 */
612STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file)
613 {
614 BIO *in;
615 X509 *x=NULL;
616 X509_NAME *xn=NULL;
617 STACK_OF(X509_NAME) *ret,*sk;
618
619 ret=sk_X509_NAME_new_null();
620 sk=sk_X509_NAME_new(xname_cmp);
621
622 in=BIO_new(BIO_s_file_internal());
623
624 if ((ret == NULL) || (sk == NULL) || (in == NULL))
625 {
626 SSLerr(SSL_F_SSL_LOAD_CLIENT_CA_FILE,ERR_R_MALLOC_FAILURE);
627 goto err;
628 }
629
630 if (!BIO_read_filename(in,file))
631 goto err;
632
633 for (;;)
634 {
635 if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL)
636 break;
637 if ((xn=X509_get_subject_name(x)) == NULL) goto err;
638 /* check for duplicates */
639 xn=X509_NAME_dup(xn);
640 if (xn == NULL) goto err;
641 if (sk_X509_NAME_find(sk,xn) >= 0)
642 X509_NAME_free(xn);
643 else
644 {
645 sk_X509_NAME_push(sk,xn);
646 sk_X509_NAME_push(ret,xn);
647 }
648 }
649
650 if (0)
651 {
652err:
653 if (ret != NULL) sk_X509_NAME_pop_free(ret,X509_NAME_free);
654 ret=NULL;
655 }
656 if (sk != NULL) sk_X509_NAME_free(sk);
657 if (in != NULL) BIO_free(in);
658 if (x != NULL) X509_free(x);
659 return(ret);
660 }
661#endif
662
663/*!
664 * Add a file of certs to a stack.
665 * \param stack the stack to add to.
666 * \param file the file to add from. All certs in this file that are not
667 * already in the stack will be added.
668 * \return 1 for success, 0 for failure. Note that in the case of failure some
669 * certs may have been added to \c stack.
670 */
671
672int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
673 const char *file)
674 {
675 BIO *in;
676 X509 *x=NULL;
677 X509_NAME *xn=NULL;
678 int ret=1;
679 int (*oldcmp)(const X509_NAME * const *a, const X509_NAME * const *b);
680
681 oldcmp=sk_X509_NAME_set_cmp_func(stack,xname_cmp);
682
683 in=BIO_new(BIO_s_file_internal());
684
685 if (in == NULL)
686 {
687 SSLerr(SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE);
688 goto err;
689 }
690
691 if (!BIO_read_filename(in,file))
692 goto err;
693
694 for (;;)
695 {
696 if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL)
697 break;
698 if ((xn=X509_get_subject_name(x)) == NULL) goto err;
699 xn=X509_NAME_dup(xn);
700 if (xn == NULL) goto err;
701 if (sk_X509_NAME_find(stack,xn) >= 0)
702 X509_NAME_free(xn);
703 else
704 sk_X509_NAME_push(stack,xn);
705 }
706
707 if (0)
708 {
709err:
710 ret=0;
711 }
712 if(in != NULL)
713 BIO_free(in);
714 if(x != NULL)
715 X509_free(x);
716
717 sk_X509_NAME_set_cmp_func(stack,oldcmp);
718
719 return ret;
720 }
721
722/*!
723 * Add a directory of certs to a stack.
724 * \param stack the stack to append to.
725 * \param dir the directory to append from. All files in this directory will be
726 * examined as potential certs. Any that are acceptable to
727 * SSL_add_dir_cert_subjects_to_stack() that are not already in the stack will be
728 * included.
729 * \return 1 for success, 0 for failure. Note that in the case of failure some
730 * certs may have been added to \c stack.
731 */
732
733#ifndef OPENSSL_SYS_WIN32
734#ifndef OPENSSL_SYS_VMS /* XXXX This may be fixed in the future */
735#ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! */
736
737int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
738 const char *dir)
739 {
740 DIR *d;
741 struct dirent *dstruct;
742 int ret = 0;
743
744 CRYPTO_w_lock(CRYPTO_LOCK_READDIR);
745 d = opendir(dir);
746
747 /* Note that a side effect is that the CAs will be sorted by name */
748 if(!d)
749 {
750 SYSerr(SYS_F_OPENDIR, get_last_sys_error());
751 ERR_add_error_data(3, "opendir('", dir, "')");
752 SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK, ERR_R_SYS_LIB);
753 goto err;
754 }
755
756 while((dstruct=readdir(d)))
757 {
758 char buf[1024];
759 int r;
760
761 if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf)
762 {
763 SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG);
764 goto err;
765 }
766
767 r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,dstruct->d_name);
768 if (r <= 0 || r >= sizeof buf)
769 goto err;
770 if(!SSL_add_file_cert_subjects_to_stack(stack,buf))
771 goto err;
772 }
773 ret = 1;
774
775err:
776 if (d) closedir(d);
777 CRYPTO_w_unlock(CRYPTO_LOCK_READDIR);
778 return ret;
779 }
780
781#endif
782#endif
783
784#else /* OPENSSL_SYS_WIN32 */
785
786int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
787 const char *dir)
788 {
789 WIN32_FIND_DATA FindFileData;
790 HANDLE hFind;
791 int ret = 0;
792#ifdef OPENSSL_SYS_WINCE
793 WCHAR* wdir = NULL;
794#endif
795
796 CRYPTO_w_lock(CRYPTO_LOCK_READDIR);
797
798#ifdef OPENSSL_SYS_WINCE
799 /* convert strings to UNICODE */
800 {
801 BOOL result = FALSE;
802 int i;
803 wdir = malloc((strlen(dir)+1)*2);
804 if (wdir == NULL)
805 goto err_noclose;
806 for (i=0; i<(int)strlen(dir)+1; i++)
807 wdir[i] = (short)dir[i];
808 }
809#endif
810
811#ifdef OPENSSL_SYS_WINCE
812 hFind = FindFirstFile(wdir, &FindFileData);
813#else
814 hFind = FindFirstFile(dir, &FindFileData);
815#endif
816 /* Note that a side effect is that the CAs will be sorted by name */
817 if(hFind == INVALID_HANDLE_VALUE)
818 {
819 SYSerr(SYS_F_OPENDIR, get_last_sys_error());
820 ERR_add_error_data(3, "opendir('", dir, "')");
821 SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK, ERR_R_SYS_LIB);
822 goto err_noclose;
823 }
824
825 do
826 {
827 char buf[1024];
828 int r;
829
830#ifdef OPENSSL_SYS_WINCE
831 if(strlen(dir)+_tcslen(FindFileData.cFileName)+2 > sizeof buf)
832#else
833 if(strlen(dir)+strlen(FindFileData.cFileName)+2 > sizeof buf)
834#endif
835 {
836 SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG);
837 goto err;
838 }
839
840 r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,FindFileData.cFileName);
841 if (r <= 0 || r >= sizeof buf)
842 goto err;
843 if(!SSL_add_file_cert_subjects_to_stack(stack,buf))
844 goto err;
845 }
846 while (FindNextFile(hFind, &FindFileData) != FALSE);
847 ret = 1;
848
849err:
850 FindClose(hFind);
851err_noclose:
852#ifdef OPENSSL_SYS_WINCE
853 if (wdir != NULL)
854 free(wdir);
855#endif
856 CRYPTO_w_unlock(CRYPTO_LOCK_READDIR);
857 return ret;
858 }
859
860#endif
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
new file mode 100644
index 0000000000..532fb4e80d
--- /dev/null
+++ b/src/lib/libssl/ssl_ciph.c
@@ -0,0 +1,1145 @@
1/* ssl/ssl_ciph.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 <openssl/objects.h>
61#include <openssl/comp.h>
62#include "ssl_locl.h"
63
64#define SSL_ENC_DES_IDX 0
65#define SSL_ENC_3DES_IDX 1
66#define SSL_ENC_RC4_IDX 2
67#define SSL_ENC_RC2_IDX 3
68#define SSL_ENC_IDEA_IDX 4
69#define SSL_ENC_eFZA_IDX 5
70#define SSL_ENC_NULL_IDX 6
71#define SSL_ENC_AES128_IDX 7
72#define SSL_ENC_AES256_IDX 8
73#define SSL_ENC_NUM_IDX 9
74
75static const EVP_CIPHER *ssl_cipher_methods[SSL_ENC_NUM_IDX]={
76 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
77 };
78
79static STACK_OF(SSL_COMP) *ssl_comp_methods=NULL;
80
81#define SSL_MD_MD5_IDX 0
82#define SSL_MD_SHA1_IDX 1
83#define SSL_MD_NUM_IDX 2
84static const EVP_MD *ssl_digest_methods[SSL_MD_NUM_IDX]={
85 NULL,NULL,
86 };
87
88#define CIPHER_ADD 1
89#define CIPHER_KILL 2
90#define CIPHER_DEL 3
91#define CIPHER_ORD 4
92#define CIPHER_SPECIAL 5
93
94typedef struct cipher_order_st
95 {
96 SSL_CIPHER *cipher;
97 int active;
98 int dead;
99 struct cipher_order_st *next,*prev;
100 } CIPHER_ORDER;
101
102static const SSL_CIPHER cipher_aliases[]={
103 /* Don't include eNULL unless specifically enabled. */
104 {0,SSL_TXT_ALL, 0,SSL_ALL & ~SSL_eNULL, SSL_ALL ,0,0,0,SSL_ALL,SSL_ALL}, /* must be first */
105 {0,SSL_TXT_CMPALL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0}, /* COMPLEMENT OF ALL */
106 {0,SSL_TXT_CMPDEF,0,SSL_ADH, 0,0,0,0,SSL_AUTH_MASK,0},
107 {0,SSL_TXT_kKRB5,0,SSL_kKRB5,0,0,0,0,SSL_MKEY_MASK,0}, /* VRS Kerberos5 */
108 {0,SSL_TXT_kRSA,0,SSL_kRSA, 0,0,0,0,SSL_MKEY_MASK,0},
109 {0,SSL_TXT_kDHr,0,SSL_kDHr, 0,0,0,0,SSL_MKEY_MASK,0},
110 {0,SSL_TXT_kDHd,0,SSL_kDHd, 0,0,0,0,SSL_MKEY_MASK,0},
111 {0,SSL_TXT_kEDH,0,SSL_kEDH, 0,0,0,0,SSL_MKEY_MASK,0},
112 {0,SSL_TXT_kFZA,0,SSL_kFZA, 0,0,0,0,SSL_MKEY_MASK,0},
113 {0,SSL_TXT_DH, 0,SSL_DH, 0,0,0,0,SSL_MKEY_MASK,0},
114 {0,SSL_TXT_EDH, 0,SSL_EDH, 0,0,0,0,SSL_MKEY_MASK|SSL_AUTH_MASK,0},
115
116 {0,SSL_TXT_aKRB5,0,SSL_aKRB5,0,0,0,0,SSL_AUTH_MASK,0}, /* VRS Kerberos5 */
117 {0,SSL_TXT_aRSA,0,SSL_aRSA, 0,0,0,0,SSL_AUTH_MASK,0},
118 {0,SSL_TXT_aDSS,0,SSL_aDSS, 0,0,0,0,SSL_AUTH_MASK,0},
119 {0,SSL_TXT_aFZA,0,SSL_aFZA, 0,0,0,0,SSL_AUTH_MASK,0},
120 {0,SSL_TXT_aNULL,0,SSL_aNULL,0,0,0,0,SSL_AUTH_MASK,0},
121 {0,SSL_TXT_aDH, 0,SSL_aDH, 0,0,0,0,SSL_AUTH_MASK,0},
122 {0,SSL_TXT_DSS, 0,SSL_DSS, 0,0,0,0,SSL_AUTH_MASK,0},
123
124 {0,SSL_TXT_DES, 0,SSL_DES, 0,0,0,0,SSL_ENC_MASK,0},
125 {0,SSL_TXT_3DES,0,SSL_3DES, 0,0,0,0,SSL_ENC_MASK,0},
126 {0,SSL_TXT_RC4, 0,SSL_RC4, 0,0,0,0,SSL_ENC_MASK,0},
127 {0,SSL_TXT_RC2, 0,SSL_RC2, 0,0,0,0,SSL_ENC_MASK,0},
128#ifndef OPENSSL_NO_IDEA
129 {0,SSL_TXT_IDEA,0,SSL_IDEA, 0,0,0,0,SSL_ENC_MASK,0},
130#endif
131 {0,SSL_TXT_eNULL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0},
132 {0,SSL_TXT_eFZA,0,SSL_eFZA, 0,0,0,0,SSL_ENC_MASK,0},
133 {0,SSL_TXT_AES, 0,SSL_AES, 0,0,0,0,SSL_ENC_MASK,0},
134
135 {0,SSL_TXT_MD5, 0,SSL_MD5, 0,0,0,0,SSL_MAC_MASK,0},
136 {0,SSL_TXT_SHA1,0,SSL_SHA1, 0,0,0,0,SSL_MAC_MASK,0},
137 {0,SSL_TXT_SHA, 0,SSL_SHA, 0,0,0,0,SSL_MAC_MASK,0},
138
139 {0,SSL_TXT_NULL,0,SSL_NULL, 0,0,0,0,SSL_ENC_MASK,0},
140 {0,SSL_TXT_KRB5,0,SSL_KRB5, 0,0,0,0,SSL_AUTH_MASK|SSL_MKEY_MASK,0},
141 {0,SSL_TXT_RSA, 0,SSL_RSA, 0,0,0,0,SSL_AUTH_MASK|SSL_MKEY_MASK,0},
142 {0,SSL_TXT_ADH, 0,SSL_ADH, 0,0,0,0,SSL_AUTH_MASK|SSL_MKEY_MASK,0},
143 {0,SSL_TXT_FZA, 0,SSL_FZA, 0,0,0,0,SSL_AUTH_MASK|SSL_MKEY_MASK|SSL_ENC_MASK,0},
144
145 {0,SSL_TXT_SSLV2, 0,SSL_SSLV2, 0,0,0,0,SSL_SSL_MASK,0},
146 {0,SSL_TXT_SSLV3, 0,SSL_SSLV3, 0,0,0,0,SSL_SSL_MASK,0},
147 {0,SSL_TXT_TLSV1, 0,SSL_TLSV1, 0,0,0,0,SSL_SSL_MASK,0},
148
149 {0,SSL_TXT_EXP ,0, 0,SSL_EXPORT, 0,0,0,0,SSL_EXP_MASK},
150 {0,SSL_TXT_EXPORT,0, 0,SSL_EXPORT, 0,0,0,0,SSL_EXP_MASK},
151 {0,SSL_TXT_EXP40, 0, 0, SSL_EXP40, 0,0,0,0,SSL_STRONG_MASK},
152 {0,SSL_TXT_EXP56, 0, 0, SSL_EXP56, 0,0,0,0,SSL_STRONG_MASK},
153 {0,SSL_TXT_LOW, 0, 0, SSL_LOW, 0,0,0,0,SSL_STRONG_MASK},
154 {0,SSL_TXT_MEDIUM,0, 0,SSL_MEDIUM, 0,0,0,0,SSL_STRONG_MASK},
155 {0,SSL_TXT_HIGH, 0, 0, SSL_HIGH, 0,0,0,0,SSL_STRONG_MASK},
156 };
157
158static int init_ciphers=1;
159
160static void load_ciphers(void)
161 {
162 init_ciphers=0;
163 ssl_cipher_methods[SSL_ENC_DES_IDX]=
164 EVP_get_cipherbyname(SN_des_cbc);
165 ssl_cipher_methods[SSL_ENC_3DES_IDX]=
166 EVP_get_cipherbyname(SN_des_ede3_cbc);
167 ssl_cipher_methods[SSL_ENC_RC4_IDX]=
168 EVP_get_cipherbyname(SN_rc4);
169 ssl_cipher_methods[SSL_ENC_RC2_IDX]=
170 EVP_get_cipherbyname(SN_rc2_cbc);
171#ifndef OPENSSL_NO_IDEA
172 ssl_cipher_methods[SSL_ENC_IDEA_IDX]=
173 EVP_get_cipherbyname(SN_idea_cbc);
174#else
175 ssl_cipher_methods[SSL_ENC_IDEA_IDX]= NULL;
176#endif
177 ssl_cipher_methods[SSL_ENC_AES128_IDX]=
178 EVP_get_cipherbyname(SN_aes_128_cbc);
179 ssl_cipher_methods[SSL_ENC_AES256_IDX]=
180 EVP_get_cipherbyname(SN_aes_256_cbc);
181
182 ssl_digest_methods[SSL_MD_MD5_IDX]=
183 EVP_get_digestbyname(SN_md5);
184 ssl_digest_methods[SSL_MD_SHA1_IDX]=
185 EVP_get_digestbyname(SN_sha1);
186 }
187
188int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,
189 const EVP_MD **md, SSL_COMP **comp)
190 {
191 int i;
192 SSL_CIPHER *c;
193
194 c=s->cipher;
195 if (c == NULL) return(0);
196 if (comp != NULL)
197 {
198 SSL_COMP ctmp;
199
200 if (s->compress_meth == 0)
201 *comp=NULL;
202 else if (ssl_comp_methods == NULL)
203 {
204 /* bad */
205 *comp=NULL;
206 }
207 else
208 {
209
210 ctmp.id=s->compress_meth;
211 i=sk_SSL_COMP_find(ssl_comp_methods,&ctmp);
212 if (i >= 0)
213 *comp=sk_SSL_COMP_value(ssl_comp_methods,i);
214 else
215 *comp=NULL;
216 }
217 }
218
219 if ((enc == NULL) || (md == NULL)) return(0);
220
221 switch (c->algorithms & SSL_ENC_MASK)
222 {
223 case SSL_DES:
224 i=SSL_ENC_DES_IDX;
225 break;
226 case SSL_3DES:
227 i=SSL_ENC_3DES_IDX;
228 break;
229 case SSL_RC4:
230 i=SSL_ENC_RC4_IDX;
231 break;
232 case SSL_RC2:
233 i=SSL_ENC_RC2_IDX;
234 break;
235 case SSL_IDEA:
236 i=SSL_ENC_IDEA_IDX;
237 break;
238 case SSL_eNULL:
239 i=SSL_ENC_NULL_IDX;
240 break;
241 case SSL_AES:
242 switch(c->alg_bits)
243 {
244 case 128: i=SSL_ENC_AES128_IDX; break;
245 case 256: i=SSL_ENC_AES256_IDX; break;
246 default: i=-1; break;
247 }
248 break;
249 default:
250 i= -1;
251 break;
252 }
253
254 if ((i < 0) || (i >= SSL_ENC_NUM_IDX))
255 *enc=NULL;
256 else
257 {
258 if (i == SSL_ENC_NULL_IDX)
259 *enc=EVP_enc_null();
260 else
261 *enc=ssl_cipher_methods[i];
262 }
263
264 switch (c->algorithms & SSL_MAC_MASK)
265 {
266 case SSL_MD5:
267 i=SSL_MD_MD5_IDX;
268 break;
269 case SSL_SHA1:
270 i=SSL_MD_SHA1_IDX;
271 break;
272 default:
273 i= -1;
274 break;
275 }
276 if ((i < 0) || (i >= SSL_MD_NUM_IDX))
277 *md=NULL;
278 else
279 *md=ssl_digest_methods[i];
280
281 if ((*enc != NULL) && (*md != NULL))
282 return(1);
283 else
284 return(0);
285 }
286
287#define ITEM_SEP(a) \
288 (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
289
290static void ll_append_tail(CIPHER_ORDER **head, CIPHER_ORDER *curr,
291 CIPHER_ORDER **tail)
292 {
293 if (curr == *tail) return;
294 if (curr == *head)
295 *head=curr->next;
296 if (curr->prev != NULL)
297 curr->prev->next=curr->next;
298 if (curr->next != NULL) /* should always be true */
299 curr->next->prev=curr->prev;
300 (*tail)->next=curr;
301 curr->prev= *tail;
302 curr->next=NULL;
303 *tail=curr;
304 }
305
306static unsigned long ssl_cipher_get_disabled(void)
307 {
308 unsigned long mask;
309
310 mask = SSL_kFZA;
311#ifdef OPENSSL_NO_RSA
312 mask |= SSL_aRSA|SSL_kRSA;
313#endif
314#ifdef OPENSSL_NO_DSA
315 mask |= SSL_aDSS;
316#endif
317#ifdef OPENSSL_NO_DH
318 mask |= SSL_kDHr|SSL_kDHd|SSL_kEDH|SSL_aDH;
319#endif
320#ifdef OPENSSL_NO_KRB5
321 mask |= SSL_kKRB5|SSL_aKRB5;
322#endif
323
324#ifdef SSL_FORBID_ENULL
325 mask |= SSL_eNULL;
326#endif
327
328 mask |= (ssl_cipher_methods[SSL_ENC_DES_IDX ] == NULL) ? SSL_DES :0;
329 mask |= (ssl_cipher_methods[SSL_ENC_3DES_IDX] == NULL) ? SSL_3DES:0;
330 mask |= (ssl_cipher_methods[SSL_ENC_RC4_IDX ] == NULL) ? SSL_RC4 :0;
331 mask |= (ssl_cipher_methods[SSL_ENC_RC2_IDX ] == NULL) ? SSL_RC2 :0;
332 mask |= (ssl_cipher_methods[SSL_ENC_IDEA_IDX] == NULL) ? SSL_IDEA:0;
333 mask |= (ssl_cipher_methods[SSL_ENC_eFZA_IDX] == NULL) ? SSL_eFZA:0;
334 mask |= (ssl_cipher_methods[SSL_ENC_AES128_IDX] == NULL) ? SSL_AES:0;
335
336 mask |= (ssl_digest_methods[SSL_MD_MD5_IDX ] == NULL) ? SSL_MD5 :0;
337 mask |= (ssl_digest_methods[SSL_MD_SHA1_IDX] == NULL) ? SSL_SHA1:0;
338
339 return(mask);
340 }
341
342static void ssl_cipher_collect_ciphers(const SSL_METHOD *ssl_method,
343 int num_of_ciphers, unsigned long mask, CIPHER_ORDER *list,
344 CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p)
345 {
346 int i, list_num;
347 SSL_CIPHER *c;
348
349 /*
350 * We have num_of_ciphers descriptions compiled in, depending on the
351 * method selected (SSLv2 and/or SSLv3, TLSv1 etc).
352 * These will later be sorted in a linked list with at most num
353 * entries.
354 */
355
356 /* Get the initial list of ciphers */
357 list_num = 0; /* actual count of ciphers */
358 for (i = 0; i < num_of_ciphers; i++)
359 {
360 c = ssl_method->get_cipher(i);
361 /* drop those that use any of that is not available */
362 if ((c != NULL) && c->valid && !(c->algorithms & mask))
363 {
364 list[list_num].cipher = c;
365 list[list_num].next = NULL;
366 list[list_num].prev = NULL;
367 list[list_num].active = 0;
368 list_num++;
369#ifdef KSSL_DEBUG
370 printf("\t%d: %s %lx %lx\n",i,c->name,c->id,c->algorithms);
371#endif /* KSSL_DEBUG */
372 /*
373 if (!sk_push(ca_list,(char *)c)) goto err;
374 */
375 }
376 }
377
378 /*
379 * Prepare linked list from list entries
380 */
381 for (i = 1; i < list_num - 1; i++)
382 {
383 list[i].prev = &(list[i-1]);
384 list[i].next = &(list[i+1]);
385 }
386 if (list_num > 0)
387 {
388 (*head_p) = &(list[0]);
389 (*head_p)->prev = NULL;
390 (*head_p)->next = &(list[1]);
391 (*tail_p) = &(list[list_num - 1]);
392 (*tail_p)->prev = &(list[list_num - 2]);
393 (*tail_p)->next = NULL;
394 }
395 }
396
397static void ssl_cipher_collect_aliases(SSL_CIPHER **ca_list,
398 int num_of_group_aliases, unsigned long mask,
399 CIPHER_ORDER *head)
400 {
401 CIPHER_ORDER *ciph_curr;
402 SSL_CIPHER **ca_curr;
403 int i;
404
405 /*
406 * First, add the real ciphers as already collected
407 */
408 ciph_curr = head;
409 ca_curr = ca_list;
410 while (ciph_curr != NULL)
411 {
412 *ca_curr = ciph_curr->cipher;
413 ca_curr++;
414 ciph_curr = ciph_curr->next;
415 }
416
417 /*
418 * Now we add the available ones from the cipher_aliases[] table.
419 * They represent either an algorithm, that must be fully
420 * supported (not match any bit in mask) or represent a cipher
421 * strength value (will be added in any case because algorithms=0).
422 */
423 for (i = 0; i < num_of_group_aliases; i++)
424 {
425 if ((i == 0) || /* always fetch "ALL" */
426 !(cipher_aliases[i].algorithms & mask))
427 {
428 *ca_curr = (SSL_CIPHER *)(cipher_aliases + i);
429 ca_curr++;
430 }
431 }
432
433 *ca_curr = NULL; /* end of list */
434 }
435
436static void ssl_cipher_apply_rule(unsigned long algorithms, unsigned long mask,
437 unsigned long algo_strength, unsigned long mask_strength,
438 int rule, int strength_bits, CIPHER_ORDER *list,
439 CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p)
440 {
441 CIPHER_ORDER *head, *tail, *curr, *curr2, *tail2;
442 SSL_CIPHER *cp;
443 unsigned long ma, ma_s;
444
445#ifdef CIPHER_DEBUG
446 printf("Applying rule %d with %08lx %08lx %08lx %08lx (%d)\n",
447 rule, algorithms, mask, algo_strength, mask_strength,
448 strength_bits);
449#endif
450
451 curr = head = *head_p;
452 curr2 = head;
453 tail2 = tail = *tail_p;
454 for (;;)
455 {
456 if ((curr == NULL) || (curr == tail2)) break;
457 curr = curr2;
458 curr2 = curr->next;
459
460 cp = curr->cipher;
461
462 /*
463 * Selection criteria is either the number of strength_bits
464 * or the algorithm used.
465 */
466 if (strength_bits == -1)
467 {
468 ma = mask & cp->algorithms;
469 ma_s = mask_strength & cp->algo_strength;
470
471#ifdef CIPHER_DEBUG
472 printf("\nName: %s:\nAlgo = %08lx Algo_strength = %08lx\nMask = %08lx Mask_strength %08lx\n", cp->name, cp->algorithms, cp->algo_strength, mask, mask_strength);
473 printf("ma = %08lx ma_s %08lx, ma&algo=%08lx, ma_s&algos=%08lx\n", ma, ma_s, ma&algorithms, ma_s&algo_strength);
474#endif
475 /*
476 * Select: if none of the mask bit was met from the
477 * cipher or not all of the bits were met, the
478 * selection does not apply.
479 */
480 if (((ma == 0) && (ma_s == 0)) ||
481 ((ma & algorithms) != ma) ||
482 ((ma_s & algo_strength) != ma_s))
483 continue; /* does not apply */
484 }
485 else if (strength_bits != cp->strength_bits)
486 continue; /* does not apply */
487
488#ifdef CIPHER_DEBUG
489 printf("Action = %d\n", rule);
490#endif
491
492 /* add the cipher if it has not been added yet. */
493 if (rule == CIPHER_ADD)
494 {
495 if (!curr->active)
496 {
497 ll_append_tail(&head, curr, &tail);
498 curr->active = 1;
499 }
500 }
501 /* Move the added cipher to this location */
502 else if (rule == CIPHER_ORD)
503 {
504 if (curr->active)
505 {
506 ll_append_tail(&head, curr, &tail);
507 }
508 }
509 else if (rule == CIPHER_DEL)
510 curr->active = 0;
511 else if (rule == CIPHER_KILL)
512 {
513 if (head == curr)
514 head = curr->next;
515 else
516 curr->prev->next = curr->next;
517 if (tail == curr)
518 tail = curr->prev;
519 curr->active = 0;
520 if (curr->next != NULL)
521 curr->next->prev = curr->prev;
522 if (curr->prev != NULL)
523 curr->prev->next = curr->next;
524 curr->next = NULL;
525 curr->prev = NULL;
526 }
527 }
528
529 *head_p = head;
530 *tail_p = tail;
531 }
532
533static int ssl_cipher_strength_sort(CIPHER_ORDER *list, CIPHER_ORDER **head_p,
534 CIPHER_ORDER **tail_p)
535 {
536 int max_strength_bits, i, *number_uses;
537 CIPHER_ORDER *curr;
538
539 /*
540 * This routine sorts the ciphers with descending strength. The sorting
541 * must keep the pre-sorted sequence, so we apply the normal sorting
542 * routine as '+' movement to the end of the list.
543 */
544 max_strength_bits = 0;
545 curr = *head_p;
546 while (curr != NULL)
547 {
548 if (curr->active &&
549 (curr->cipher->strength_bits > max_strength_bits))
550 max_strength_bits = curr->cipher->strength_bits;
551 curr = curr->next;
552 }
553
554 number_uses = OPENSSL_malloc((max_strength_bits + 1) * sizeof(int));
555 if (!number_uses)
556 {
557 SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT,ERR_R_MALLOC_FAILURE);
558 return(0);
559 }
560 memset(number_uses, 0, (max_strength_bits + 1) * sizeof(int));
561
562 /*
563 * Now find the strength_bits values actually used
564 */
565 curr = *head_p;
566 while (curr != NULL)
567 {
568 if (curr->active)
569 number_uses[curr->cipher->strength_bits]++;
570 curr = curr->next;
571 }
572 /*
573 * Go through the list of used strength_bits values in descending
574 * order.
575 */
576 for (i = max_strength_bits; i >= 0; i--)
577 if (number_uses[i] > 0)
578 ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i,
579 list, head_p, tail_p);
580
581 OPENSSL_free(number_uses);
582 return(1);
583 }
584
585static int ssl_cipher_process_rulestr(const char *rule_str,
586 CIPHER_ORDER *list, CIPHER_ORDER **head_p,
587 CIPHER_ORDER **tail_p, SSL_CIPHER **ca_list)
588 {
589 unsigned long algorithms, mask, algo_strength, mask_strength;
590 const char *l, *start, *buf;
591 int j, multi, found, rule, retval, ok, buflen;
592 char ch;
593
594 retval = 1;
595 l = rule_str;
596 for (;;)
597 {
598 ch = *l;
599
600 if (ch == '\0')
601 break; /* done */
602 if (ch == '-')
603 { rule = CIPHER_DEL; l++; }
604 else if (ch == '+')
605 { rule = CIPHER_ORD; l++; }
606 else if (ch == '!')
607 { rule = CIPHER_KILL; l++; }
608 else if (ch == '@')
609 { rule = CIPHER_SPECIAL; l++; }
610 else
611 { rule = CIPHER_ADD; }
612
613 if (ITEM_SEP(ch))
614 {
615 l++;
616 continue;
617 }
618
619 algorithms = mask = algo_strength = mask_strength = 0;
620
621 start=l;
622 for (;;)
623 {
624 ch = *l;
625 buf = l;
626 buflen = 0;
627#ifndef CHARSET_EBCDIC
628 while ( ((ch >= 'A') && (ch <= 'Z')) ||
629 ((ch >= '0') && (ch <= '9')) ||
630 ((ch >= 'a') && (ch <= 'z')) ||
631 (ch == '-'))
632#else
633 while ( isalnum(ch) || (ch == '-'))
634#endif
635 {
636 ch = *(++l);
637 buflen++;
638 }
639
640 if (buflen == 0)
641 {
642 /*
643 * We hit something we cannot deal with,
644 * it is no command or separator nor
645 * alphanumeric, so we call this an error.
646 */
647 SSLerr(SSL_F_SSL_CIPHER_PROCESS_RULESTR,
648 SSL_R_INVALID_COMMAND);
649 retval = found = 0;
650 l++;
651 break;
652 }
653
654 if (rule == CIPHER_SPECIAL)
655 {
656 found = 0; /* unused -- avoid compiler warning */
657 break; /* special treatment */
658 }
659
660 /* check for multi-part specification */
661 if (ch == '+')
662 {
663 multi=1;
664 l++;
665 }
666 else
667 multi=0;
668
669 /*
670 * Now search for the cipher alias in the ca_list. Be careful
671 * with the strncmp, because the "buflen" limitation
672 * will make the rule "ADH:SOME" and the cipher
673 * "ADH-MY-CIPHER" look like a match for buflen=3.
674 * So additionally check whether the cipher name found
675 * has the correct length. We can save a strlen() call:
676 * just checking for the '\0' at the right place is
677 * sufficient, we have to strncmp() anyway. (We cannot
678 * use strcmp(), because buf is not '\0' terminated.)
679 */
680 j = found = 0;
681 while (ca_list[j])
682 {
683 if (!strncmp(buf, ca_list[j]->name, buflen) &&
684 (ca_list[j]->name[buflen] == '\0'))
685 {
686 found = 1;
687 break;
688 }
689 else
690 j++;
691 }
692 if (!found)
693 break; /* ignore this entry */
694
695 algorithms |= ca_list[j]->algorithms;
696 mask |= ca_list[j]->mask;
697 algo_strength |= ca_list[j]->algo_strength;
698 mask_strength |= ca_list[j]->mask_strength;
699
700 if (!multi) break;
701 }
702
703 /*
704 * Ok, we have the rule, now apply it
705 */
706 if (rule == CIPHER_SPECIAL)
707 { /* special command */
708 ok = 0;
709 if ((buflen == 8) &&
710 !strncmp(buf, "STRENGTH", 8))
711 ok = ssl_cipher_strength_sort(list,
712 head_p, tail_p);
713 else
714 SSLerr(SSL_F_SSL_CIPHER_PROCESS_RULESTR,
715 SSL_R_INVALID_COMMAND);
716 if (ok == 0)
717 retval = 0;
718 /*
719 * We do not support any "multi" options
720 * together with "@", so throw away the
721 * rest of the command, if any left, until
722 * end or ':' is found.
723 */
724 while ((*l != '\0') && ITEM_SEP(*l))
725 l++;
726 }
727 else if (found)
728 {
729 ssl_cipher_apply_rule(algorithms, mask,
730 algo_strength, mask_strength, rule, -1,
731 list, head_p, tail_p);
732 }
733 else
734 {
735 while ((*l != '\0') && ITEM_SEP(*l))
736 l++;
737 }
738 if (*l == '\0') break; /* done */
739 }
740
741 return(retval);
742 }
743
744STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
745 STACK_OF(SSL_CIPHER) **cipher_list,
746 STACK_OF(SSL_CIPHER) **cipher_list_by_id,
747 const char *rule_str)
748 {
749 int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases;
750 unsigned long disabled_mask;
751 STACK_OF(SSL_CIPHER) *cipherstack;
752 const char *rule_p;
753 CIPHER_ORDER *list = NULL, *head = NULL, *tail = NULL, *curr;
754 SSL_CIPHER **ca_list = NULL;
755
756 /*
757 * Return with error if nothing to do.
758 */
759 if (rule_str == NULL) return(NULL);
760
761 if (init_ciphers)
762 {
763 CRYPTO_w_lock(CRYPTO_LOCK_SSL);
764 if (init_ciphers) load_ciphers();
765 CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
766 }
767
768 /*
769 * To reduce the work to do we only want to process the compiled
770 * in algorithms, so we first get the mask of disabled ciphers.
771 */
772 disabled_mask = ssl_cipher_get_disabled();
773
774 /*
775 * Now we have to collect the available ciphers from the compiled
776 * in ciphers. We cannot get more than the number compiled in, so
777 * it is used for allocation.
778 */
779 num_of_ciphers = ssl_method->num_ciphers();
780#ifdef KSSL_DEBUG
781 printf("ssl_create_cipher_list() for %d ciphers\n", num_of_ciphers);
782#endif /* KSSL_DEBUG */
783 list = (CIPHER_ORDER *)OPENSSL_malloc(sizeof(CIPHER_ORDER) * num_of_ciphers);
784 if (list == NULL)
785 {
786 SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
787 return(NULL); /* Failure */
788 }
789
790 ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers, disabled_mask,
791 list, &head, &tail);
792
793 /*
794 * We also need cipher aliases for selecting based on the rule_str.
795 * There might be two types of entries in the rule_str: 1) names
796 * of ciphers themselves 2) aliases for groups of ciphers.
797 * For 1) we need the available ciphers and for 2) the cipher
798 * groups of cipher_aliases added together in one list (otherwise
799 * we would be happy with just the cipher_aliases table).
800 */
801 num_of_group_aliases = sizeof(cipher_aliases) / sizeof(SSL_CIPHER);
802 num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
803 ca_list =
804 (SSL_CIPHER **)OPENSSL_malloc(sizeof(SSL_CIPHER *) * num_of_alias_max);
805 if (ca_list == NULL)
806 {
807 OPENSSL_free(list);
808 SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
809 return(NULL); /* Failure */
810 }
811 ssl_cipher_collect_aliases(ca_list, num_of_group_aliases, disabled_mask,
812 head);
813
814 /*
815 * If the rule_string begins with DEFAULT, apply the default rule
816 * before using the (possibly available) additional rules.
817 */
818 ok = 1;
819 rule_p = rule_str;
820 if (strncmp(rule_str,"DEFAULT",7) == 0)
821 {
822 ok = ssl_cipher_process_rulestr(SSL_DEFAULT_CIPHER_LIST,
823 list, &head, &tail, ca_list);
824 rule_p += 7;
825 if (*rule_p == ':')
826 rule_p++;
827 }
828
829 if (ok && (strlen(rule_p) > 0))
830 ok = ssl_cipher_process_rulestr(rule_p, list, &head, &tail,
831 ca_list);
832
833 OPENSSL_free(ca_list); /* Not needed anymore */
834
835 if (!ok)
836 { /* Rule processing failure */
837 OPENSSL_free(list);
838 return(NULL);
839 }
840 /*
841 * Allocate new "cipherstack" for the result, return with error
842 * if we cannot get one.
843 */
844 if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL)
845 {
846 OPENSSL_free(list);
847 return(NULL);
848 }
849
850 /*
851 * The cipher selection for the list is done. The ciphers are added
852 * to the resulting precedence to the STACK_OF(SSL_CIPHER).
853 */
854 for (curr = head; curr != NULL; curr = curr->next)
855 {
856 if (curr->active)
857 {
858 sk_SSL_CIPHER_push(cipherstack, curr->cipher);
859#ifdef CIPHER_DEBUG
860 printf("<%s>\n",curr->cipher->name);
861#endif
862 }
863 }
864 OPENSSL_free(list); /* Not needed any longer */
865
866 /*
867 * The following passage is a little bit odd. If pointer variables
868 * were supplied to hold STACK_OF(SSL_CIPHER) return information,
869 * the old memory pointed to is free()ed. Then, however, the
870 * cipher_list entry will be assigned just a copy of the returned
871 * cipher stack. For cipher_list_by_id a copy of the cipher stack
872 * will be created. See next comment...
873 */
874 if (cipher_list != NULL)
875 {
876 if (*cipher_list != NULL)
877 sk_SSL_CIPHER_free(*cipher_list);
878 *cipher_list = cipherstack;
879 }
880
881 if (cipher_list_by_id != NULL)
882 {
883 if (*cipher_list_by_id != NULL)
884 sk_SSL_CIPHER_free(*cipher_list_by_id);
885 *cipher_list_by_id = sk_SSL_CIPHER_dup(cipherstack);
886 }
887
888 /*
889 * Now it is getting really strange. If something failed during
890 * the previous pointer assignment or if one of the pointers was
891 * not requested, the error condition is met. That might be
892 * discussable. The strange thing is however that in this case
893 * the memory "ret" pointed to is "free()ed" and hence the pointer
894 * cipher_list becomes wild. The memory reserved for
895 * cipher_list_by_id however is not "free()ed" and stays intact.
896 */
897 if ( (cipher_list_by_id == NULL) ||
898 (*cipher_list_by_id == NULL) ||
899 (cipher_list == NULL) ||
900 (*cipher_list == NULL))
901 {
902 sk_SSL_CIPHER_free(cipherstack);
903 return(NULL);
904 }
905
906 sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id,ssl_cipher_ptr_id_cmp);
907
908 return(cipherstack);
909 }
910
911char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
912 {
913 int is_export,pkl,kl;
914 char *ver,*exp;
915 char *kx,*au,*enc,*mac;
916 unsigned long alg,alg2,alg_s;
917#ifdef KSSL_DEBUG
918 static char *format="%-23s %s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s%s AL=%lx\n";
919#else
920 static char *format="%-23s %s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s%s\n";
921#endif /* KSSL_DEBUG */
922
923 alg=cipher->algorithms;
924 alg_s=cipher->algo_strength;
925 alg2=cipher->algorithm2;
926
927 is_export=SSL_C_IS_EXPORT(cipher);
928 pkl=SSL_C_EXPORT_PKEYLENGTH(cipher);
929 kl=SSL_C_EXPORT_KEYLENGTH(cipher);
930 exp=is_export?" export":"";
931
932 if (alg & SSL_SSLV2)
933 ver="SSLv2";
934 else if (alg & SSL_SSLV3)
935 ver="SSLv3";
936 else
937 ver="unknown";
938
939 switch (alg&SSL_MKEY_MASK)
940 {
941 case SSL_kRSA:
942 kx=is_export?(pkl == 512 ? "RSA(512)" : "RSA(1024)"):"RSA";
943 break;
944 case SSL_kDHr:
945 kx="DH/RSA";
946 break;
947 case SSL_kDHd:
948 kx="DH/DSS";
949 break;
950 case SSL_kKRB5: /* VRS */
951 case SSL_KRB5: /* VRS */
952 kx="KRB5";
953 break;
954 case SSL_kFZA:
955 kx="Fortezza";
956 break;
957 case SSL_kEDH:
958 kx=is_export?(pkl == 512 ? "DH(512)" : "DH(1024)"):"DH";
959 break;
960 default:
961 kx="unknown";
962 }
963
964 switch (alg&SSL_AUTH_MASK)
965 {
966 case SSL_aRSA:
967 au="RSA";
968 break;
969 case SSL_aDSS:
970 au="DSS";
971 break;
972 case SSL_aDH:
973 au="DH";
974 break;
975 case SSL_aKRB5: /* VRS */
976 case SSL_KRB5: /* VRS */
977 au="KRB5";
978 break;
979 case SSL_aFZA:
980 case SSL_aNULL:
981 au="None";
982 break;
983 default:
984 au="unknown";
985 break;
986 }
987
988 switch (alg&SSL_ENC_MASK)
989 {
990 case SSL_DES:
991 enc=(is_export && kl == 5)?"DES(40)":"DES(56)";
992 break;
993 case SSL_3DES:
994 enc="3DES(168)";
995 break;
996 case SSL_RC4:
997 enc=is_export?(kl == 5 ? "RC4(40)" : "RC4(56)")
998 :((alg2&SSL2_CF_8_BYTE_ENC)?"RC4(64)":"RC4(128)");
999 break;
1000 case SSL_RC2:
1001 enc=is_export?(kl == 5 ? "RC2(40)" : "RC2(56)"):"RC2(128)";
1002 break;
1003 case SSL_IDEA:
1004 enc="IDEA(128)";
1005 break;
1006 case SSL_eFZA:
1007 enc="Fortezza";
1008 break;
1009 case SSL_eNULL:
1010 enc="None";
1011 break;
1012 case SSL_AES:
1013 switch(cipher->strength_bits)
1014 {
1015 case 128: enc="AES(128)"; break;
1016 case 192: enc="AES(192)"; break;
1017 case 256: enc="AES(256)"; break;
1018 default: enc="AES(?""?""?)"; break;
1019 }
1020 break;
1021 default:
1022 enc="unknown";
1023 break;
1024 }
1025
1026 switch (alg&SSL_MAC_MASK)
1027 {
1028 case SSL_MD5:
1029 mac="MD5";
1030 break;
1031 case SSL_SHA1:
1032 mac="SHA1";
1033 break;
1034 default:
1035 mac="unknown";
1036 break;
1037 }
1038
1039 if (buf == NULL)
1040 {
1041 len=128;
1042 buf=OPENSSL_malloc(len);
1043 if (buf == NULL) return("OPENSSL_malloc Error");
1044 }
1045 else if (len < 128)
1046 return("Buffer too small");
1047
1048#ifdef KSSL_DEBUG
1049 BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp,alg);
1050#else
1051 BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp);
1052#endif /* KSSL_DEBUG */
1053 return(buf);
1054 }
1055
1056char *SSL_CIPHER_get_version(SSL_CIPHER *c)
1057 {
1058 int i;
1059
1060 if (c == NULL) return("(NONE)");
1061 i=(int)(c->id>>24L);
1062 if (i == 3)
1063 return("TLSv1/SSLv3");
1064 else if (i == 2)
1065 return("SSLv2");
1066 else
1067 return("unknown");
1068 }
1069
1070/* return the actual cipher being used */
1071const char *SSL_CIPHER_get_name(SSL_CIPHER *c)
1072 {
1073 if (c != NULL)
1074 return(c->name);
1075 return("(NONE)");
1076 }
1077
1078/* number of bits for symmetric cipher */
1079int SSL_CIPHER_get_bits(SSL_CIPHER *c, int *alg_bits)
1080 {
1081 int ret=0;
1082
1083 if (c != NULL)
1084 {
1085 if (alg_bits != NULL) *alg_bits = c->alg_bits;
1086 ret = c->strength_bits;
1087 }
1088 return(ret);
1089 }
1090
1091SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
1092 {
1093 SSL_COMP *ctmp;
1094 int i,nn;
1095
1096 if ((n == 0) || (sk == NULL)) return(NULL);
1097 nn=sk_SSL_COMP_num(sk);
1098 for (i=0; i<nn; i++)
1099 {
1100 ctmp=sk_SSL_COMP_value(sk,i);
1101 if (ctmp->id == n)
1102 return(ctmp);
1103 }
1104 return(NULL);
1105 }
1106
1107static int sk_comp_cmp(const SSL_COMP * const *a,
1108 const SSL_COMP * const *b)
1109 {
1110 return((*a)->id-(*b)->id);
1111 }
1112
1113STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void)
1114 {
1115 return(ssl_comp_methods);
1116 }
1117
1118int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
1119 {
1120 SSL_COMP *comp;
1121 STACK_OF(SSL_COMP) *sk;
1122
1123 if (cm == NULL || cm->type == NID_undef)
1124 return 1;
1125
1126 MemCheck_off();
1127 comp=(SSL_COMP *)OPENSSL_malloc(sizeof(SSL_COMP));
1128 comp->id=id;
1129 comp->method=cm;
1130 if (ssl_comp_methods == NULL)
1131 sk=ssl_comp_methods=sk_SSL_COMP_new(sk_comp_cmp);
1132 else
1133 sk=ssl_comp_methods;
1134 if ((sk == NULL) || !sk_SSL_COMP_push(sk,comp))
1135 {
1136 MemCheck_on();
1137 SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,ERR_R_MALLOC_FAILURE);
1138 return(0);
1139 }
1140 else
1141 {
1142 MemCheck_on();
1143 return(1);
1144 }
1145 }
diff --git a/src/lib/libssl/ssl_err.c b/src/lib/libssl/ssl_err.c
new file mode 100644
index 0000000000..d2cb181503
--- /dev/null
+++ b/src/lib/libssl/ssl_err.c
@@ -0,0 +1,461 @@
1/* ssl/ssl_err.c */
2/* ====================================================================
3 * Copyright (c) 1999-2002 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/ssl.h>
64
65/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR
67static ERR_STRING_DATA SSL_str_functs[]=
68 {
69{ERR_PACK(0,SSL_F_CLIENT_CERTIFICATE,0), "CLIENT_CERTIFICATE"},
70{ERR_PACK(0,SSL_F_CLIENT_FINISHED,0), "CLIENT_FINISHED"},
71{ERR_PACK(0,SSL_F_CLIENT_HELLO,0), "CLIENT_HELLO"},
72{ERR_PACK(0,SSL_F_CLIENT_MASTER_KEY,0), "CLIENT_MASTER_KEY"},
73{ERR_PACK(0,SSL_F_D2I_SSL_SESSION,0), "d2i_SSL_SESSION"},
74{ERR_PACK(0,SSL_F_DO_SSL3_WRITE,0), "DO_SSL3_WRITE"},
75{ERR_PACK(0,SSL_F_GET_CLIENT_FINISHED,0), "GET_CLIENT_FINISHED"},
76{ERR_PACK(0,SSL_F_GET_CLIENT_HELLO,0), "GET_CLIENT_HELLO"},
77{ERR_PACK(0,SSL_F_GET_CLIENT_MASTER_KEY,0), "GET_CLIENT_MASTER_KEY"},
78{ERR_PACK(0,SSL_F_GET_SERVER_FINISHED,0), "GET_SERVER_FINISHED"},
79{ERR_PACK(0,SSL_F_GET_SERVER_HELLO,0), "GET_SERVER_HELLO"},
80{ERR_PACK(0,SSL_F_GET_SERVER_VERIFY,0), "GET_SERVER_VERIFY"},
81{ERR_PACK(0,SSL_F_I2D_SSL_SESSION,0), "i2d_SSL_SESSION"},
82{ERR_PACK(0,SSL_F_READ_N,0), "READ_N"},
83{ERR_PACK(0,SSL_F_REQUEST_CERTIFICATE,0), "REQUEST_CERTIFICATE"},
84{ERR_PACK(0,SSL_F_SERVER_FINISH,0), "SERVER_FINISH"},
85{ERR_PACK(0,SSL_F_SERVER_HELLO,0), "SERVER_HELLO"},
86{ERR_PACK(0,SSL_F_SERVER_VERIFY,0), "SERVER_VERIFY"},
87{ERR_PACK(0,SSL_F_SSL23_ACCEPT,0), "SSL23_ACCEPT"},
88{ERR_PACK(0,SSL_F_SSL23_CLIENT_HELLO,0), "SSL23_CLIENT_HELLO"},
89{ERR_PACK(0,SSL_F_SSL23_CONNECT,0), "SSL23_CONNECT"},
90{ERR_PACK(0,SSL_F_SSL23_GET_CLIENT_HELLO,0), "SSL23_GET_CLIENT_HELLO"},
91{ERR_PACK(0,SSL_F_SSL23_GET_SERVER_HELLO,0), "SSL23_GET_SERVER_HELLO"},
92{ERR_PACK(0,SSL_F_SSL23_PEEK,0), "SSL23_PEEK"},
93{ERR_PACK(0,SSL_F_SSL23_READ,0), "SSL23_READ"},
94{ERR_PACK(0,SSL_F_SSL23_WRITE,0), "SSL23_WRITE"},
95{ERR_PACK(0,SSL_F_SSL2_ACCEPT,0), "SSL2_ACCEPT"},
96{ERR_PACK(0,SSL_F_SSL2_CONNECT,0), "SSL2_CONNECT"},
97{ERR_PACK(0,SSL_F_SSL2_ENC_INIT,0), "SSL2_ENC_INIT"},
98{ERR_PACK(0,SSL_F_SSL2_GENERATE_KEY_MATERIAL,0), "SSL2_GENERATE_KEY_MATERIAL"},
99{ERR_PACK(0,SSL_F_SSL2_PEEK,0), "SSL2_PEEK"},
100{ERR_PACK(0,SSL_F_SSL2_READ,0), "SSL2_READ"},
101{ERR_PACK(0,SSL_F_SSL2_READ_INTERNAL,0), "SSL2_READ_INTERNAL"},
102{ERR_PACK(0,SSL_F_SSL2_SET_CERTIFICATE,0), "SSL2_SET_CERTIFICATE"},
103{ERR_PACK(0,SSL_F_SSL2_WRITE,0), "SSL2_WRITE"},
104{ERR_PACK(0,SSL_F_SSL3_ACCEPT,0), "SSL3_ACCEPT"},
105{ERR_PACK(0,SSL_F_SSL3_CALLBACK_CTRL,0), "SSL3_CALLBACK_CTRL"},
106{ERR_PACK(0,SSL_F_SSL3_CHANGE_CIPHER_STATE,0), "SSL3_CHANGE_CIPHER_STATE"},
107{ERR_PACK(0,SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,0), "SSL3_CHECK_CERT_AND_ALGORITHM"},
108{ERR_PACK(0,SSL_F_SSL3_CLIENT_HELLO,0), "SSL3_CLIENT_HELLO"},
109{ERR_PACK(0,SSL_F_SSL3_CONNECT,0), "SSL3_CONNECT"},
110{ERR_PACK(0,SSL_F_SSL3_CTRL,0), "SSL3_CTRL"},
111{ERR_PACK(0,SSL_F_SSL3_CTX_CTRL,0), "SSL3_CTX_CTRL"},
112{ERR_PACK(0,SSL_F_SSL3_ENC,0), "SSL3_ENC"},
113{ERR_PACK(0,SSL_F_SSL3_GENERATE_KEY_BLOCK,0), "SSL3_GENERATE_KEY_BLOCK"},
114{ERR_PACK(0,SSL_F_SSL3_GET_CERTIFICATE_REQUEST,0), "SSL3_GET_CERTIFICATE_REQUEST"},
115{ERR_PACK(0,SSL_F_SSL3_GET_CERT_VERIFY,0), "SSL3_GET_CERT_VERIFY"},
116{ERR_PACK(0,SSL_F_SSL3_GET_CLIENT_CERTIFICATE,0), "SSL3_GET_CLIENT_CERTIFICATE"},
117{ERR_PACK(0,SSL_F_SSL3_GET_CLIENT_HELLO,0), "SSL3_GET_CLIENT_HELLO"},
118{ERR_PACK(0,SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,0), "SSL3_GET_CLIENT_KEY_EXCHANGE"},
119{ERR_PACK(0,SSL_F_SSL3_GET_FINISHED,0), "SSL3_GET_FINISHED"},
120{ERR_PACK(0,SSL_F_SSL3_GET_KEY_EXCHANGE,0), "SSL3_GET_KEY_EXCHANGE"},
121{ERR_PACK(0,SSL_F_SSL3_GET_MESSAGE,0), "SSL3_GET_MESSAGE"},
122{ERR_PACK(0,SSL_F_SSL3_GET_RECORD,0), "SSL3_GET_RECORD"},
123{ERR_PACK(0,SSL_F_SSL3_GET_SERVER_CERTIFICATE,0), "SSL3_GET_SERVER_CERTIFICATE"},
124{ERR_PACK(0,SSL_F_SSL3_GET_SERVER_DONE,0), "SSL3_GET_SERVER_DONE"},
125{ERR_PACK(0,SSL_F_SSL3_GET_SERVER_HELLO,0), "SSL3_GET_SERVER_HELLO"},
126{ERR_PACK(0,SSL_F_SSL3_OUTPUT_CERT_CHAIN,0), "SSL3_OUTPUT_CERT_CHAIN"},
127{ERR_PACK(0,SSL_F_SSL3_PEEK,0), "SSL3_PEEK"},
128{ERR_PACK(0,SSL_F_SSL3_READ_BYTES,0), "SSL3_READ_BYTES"},
129{ERR_PACK(0,SSL_F_SSL3_READ_N,0), "SSL3_READ_N"},
130{ERR_PACK(0,SSL_F_SSL3_SEND_CERTIFICATE_REQUEST,0), "SSL3_SEND_CERTIFICATE_REQUEST"},
131{ERR_PACK(0,SSL_F_SSL3_SEND_CLIENT_CERTIFICATE,0), "SSL3_SEND_CLIENT_CERTIFICATE"},
132{ERR_PACK(0,SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,0), "SSL3_SEND_CLIENT_KEY_EXCHANGE"},
133{ERR_PACK(0,SSL_F_SSL3_SEND_CLIENT_VERIFY,0), "SSL3_SEND_CLIENT_VERIFY"},
134{ERR_PACK(0,SSL_F_SSL3_SEND_SERVER_CERTIFICATE,0), "SSL3_SEND_SERVER_CERTIFICATE"},
135{ERR_PACK(0,SSL_F_SSL3_SEND_SERVER_HELLO,0), "SSL3_SEND_SERVER_HELLO"},
136{ERR_PACK(0,SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,0), "SSL3_SEND_SERVER_KEY_EXCHANGE"},
137{ERR_PACK(0,SSL_F_SSL3_SETUP_BUFFERS,0), "SSL3_SETUP_BUFFERS"},
138{ERR_PACK(0,SSL_F_SSL3_SETUP_KEY_BLOCK,0), "SSL3_SETUP_KEY_BLOCK"},
139{ERR_PACK(0,SSL_F_SSL3_WRITE_BYTES,0), "SSL3_WRITE_BYTES"},
140{ERR_PACK(0,SSL_F_SSL3_WRITE_PENDING,0), "SSL3_WRITE_PENDING"},
141{ERR_PACK(0,SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,0), "SSL_add_dir_cert_subjects_to_stack"},
142{ERR_PACK(0,SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK,0), "SSL_add_file_cert_subjects_to_stack"},
143{ERR_PACK(0,SSL_F_SSL_BAD_METHOD,0), "SSL_BAD_METHOD"},
144{ERR_PACK(0,SSL_F_SSL_BYTES_TO_CIPHER_LIST,0), "SSL_BYTES_TO_CIPHER_LIST"},
145{ERR_PACK(0,SSL_F_SSL_CERT_DUP,0), "SSL_CERT_DUP"},
146{ERR_PACK(0,SSL_F_SSL_CERT_INST,0), "SSL_CERT_INST"},
147{ERR_PACK(0,SSL_F_SSL_CERT_INSTANTIATE,0), "SSL_CERT_INSTANTIATE"},
148{ERR_PACK(0,SSL_F_SSL_CERT_NEW,0), "SSL_CERT_NEW"},
149{ERR_PACK(0,SSL_F_SSL_CHECK_PRIVATE_KEY,0), "SSL_check_private_key"},
150{ERR_PACK(0,SSL_F_SSL_CIPHER_PROCESS_RULESTR,0), "SSL_CIPHER_PROCESS_RULESTR"},
151{ERR_PACK(0,SSL_F_SSL_CIPHER_STRENGTH_SORT,0), "SSL_CIPHER_STRENGTH_SORT"},
152{ERR_PACK(0,SSL_F_SSL_CLEAR,0), "SSL_clear"},
153{ERR_PACK(0,SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,0), "SSL_COMP_add_compression_method"},
154{ERR_PACK(0,SSL_F_SSL_CREATE_CIPHER_LIST,0), "SSL_CREATE_CIPHER_LIST"},
155{ERR_PACK(0,SSL_F_SSL_CTRL,0), "SSL_ctrl"},
156{ERR_PACK(0,SSL_F_SSL_CTX_CHECK_PRIVATE_KEY,0), "SSL_CTX_check_private_key"},
157{ERR_PACK(0,SSL_F_SSL_CTX_NEW,0), "SSL_CTX_new"},
158{ERR_PACK(0,SSL_F_SSL_CTX_SET_PURPOSE,0), "SSL_CTX_set_purpose"},
159{ERR_PACK(0,SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT,0), "SSL_CTX_set_session_id_context"},
160{ERR_PACK(0,SSL_F_SSL_CTX_SET_SSL_VERSION,0), "SSL_CTX_set_ssl_version"},
161{ERR_PACK(0,SSL_F_SSL_CTX_SET_TRUST,0), "SSL_CTX_set_trust"},
162{ERR_PACK(0,SSL_F_SSL_CTX_USE_CERTIFICATE,0), "SSL_CTX_use_certificate"},
163{ERR_PACK(0,SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1,0), "SSL_CTX_use_certificate_ASN1"},
164{ERR_PACK(0,SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE,0), "SSL_CTX_use_certificate_chain_file"},
165{ERR_PACK(0,SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,0), "SSL_CTX_use_certificate_file"},
166{ERR_PACK(0,SSL_F_SSL_CTX_USE_PRIVATEKEY,0), "SSL_CTX_use_PrivateKey"},
167{ERR_PACK(0,SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1,0), "SSL_CTX_use_PrivateKey_ASN1"},
168{ERR_PACK(0,SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,0), "SSL_CTX_use_PrivateKey_file"},
169{ERR_PACK(0,SSL_F_SSL_CTX_USE_RSAPRIVATEKEY,0), "SSL_CTX_use_RSAPrivateKey"},
170{ERR_PACK(0,SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1,0), "SSL_CTX_use_RSAPrivateKey_ASN1"},
171{ERR_PACK(0,SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,0), "SSL_CTX_use_RSAPrivateKey_file"},
172{ERR_PACK(0,SSL_F_SSL_DO_HANDSHAKE,0), "SSL_do_handshake"},
173{ERR_PACK(0,SSL_F_SSL_GET_NEW_SESSION,0), "SSL_GET_NEW_SESSION"},
174{ERR_PACK(0,SSL_F_SSL_GET_PREV_SESSION,0), "SSL_GET_PREV_SESSION"},
175{ERR_PACK(0,SSL_F_SSL_GET_SERVER_SEND_CERT,0), "SSL_GET_SERVER_SEND_CERT"},
176{ERR_PACK(0,SSL_F_SSL_GET_SIGN_PKEY,0), "SSL_GET_SIGN_PKEY"},
177{ERR_PACK(0,SSL_F_SSL_INIT_WBIO_BUFFER,0), "SSL_INIT_WBIO_BUFFER"},
178{ERR_PACK(0,SSL_F_SSL_LOAD_CLIENT_CA_FILE,0), "SSL_load_client_CA_file"},
179{ERR_PACK(0,SSL_F_SSL_NEW,0), "SSL_new"},
180{ERR_PACK(0,SSL_F_SSL_READ,0), "SSL_read"},
181{ERR_PACK(0,SSL_F_SSL_RSA_PRIVATE_DECRYPT,0), "SSL_RSA_PRIVATE_DECRYPT"},
182{ERR_PACK(0,SSL_F_SSL_RSA_PUBLIC_ENCRYPT,0), "SSL_RSA_PUBLIC_ENCRYPT"},
183{ERR_PACK(0,SSL_F_SSL_SESSION_NEW,0), "SSL_SESSION_new"},
184{ERR_PACK(0,SSL_F_SSL_SESSION_PRINT_FP,0), "SSL_SESSION_print_fp"},
185{ERR_PACK(0,SSL_F_SSL_SESS_CERT_NEW,0), "SSL_SESS_CERT_NEW"},
186{ERR_PACK(0,SSL_F_SSL_SET_CERT,0), "SSL_SET_CERT"},
187{ERR_PACK(0,SSL_F_SSL_SET_FD,0), "SSL_set_fd"},
188{ERR_PACK(0,SSL_F_SSL_SET_PKEY,0), "SSL_SET_PKEY"},
189{ERR_PACK(0,SSL_F_SSL_SET_PURPOSE,0), "SSL_set_purpose"},
190{ERR_PACK(0,SSL_F_SSL_SET_RFD,0), "SSL_set_rfd"},
191{ERR_PACK(0,SSL_F_SSL_SET_SESSION,0), "SSL_set_session"},
192{ERR_PACK(0,SSL_F_SSL_SET_SESSION_ID_CONTEXT,0), "SSL_set_session_id_context"},
193{ERR_PACK(0,SSL_F_SSL_SET_TRUST,0), "SSL_set_trust"},
194{ERR_PACK(0,SSL_F_SSL_SET_WFD,0), "SSL_set_wfd"},
195{ERR_PACK(0,SSL_F_SSL_SHUTDOWN,0), "SSL_shutdown"},
196{ERR_PACK(0,SSL_F_SSL_UNDEFINED_FUNCTION,0), "SSL_UNDEFINED_FUNCTION"},
197{ERR_PACK(0,SSL_F_SSL_USE_CERTIFICATE,0), "SSL_use_certificate"},
198{ERR_PACK(0,SSL_F_SSL_USE_CERTIFICATE_ASN1,0), "SSL_use_certificate_ASN1"},
199{ERR_PACK(0,SSL_F_SSL_USE_CERTIFICATE_FILE,0), "SSL_use_certificate_file"},
200{ERR_PACK(0,SSL_F_SSL_USE_PRIVATEKEY,0), "SSL_use_PrivateKey"},
201{ERR_PACK(0,SSL_F_SSL_USE_PRIVATEKEY_ASN1,0), "SSL_use_PrivateKey_ASN1"},
202{ERR_PACK(0,SSL_F_SSL_USE_PRIVATEKEY_FILE,0), "SSL_use_PrivateKey_file"},
203{ERR_PACK(0,SSL_F_SSL_USE_RSAPRIVATEKEY,0), "SSL_use_RSAPrivateKey"},
204{ERR_PACK(0,SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1,0), "SSL_use_RSAPrivateKey_ASN1"},
205{ERR_PACK(0,SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,0), "SSL_use_RSAPrivateKey_file"},
206{ERR_PACK(0,SSL_F_SSL_VERIFY_CERT_CHAIN,0), "SSL_VERIFY_CERT_CHAIN"},
207{ERR_PACK(0,SSL_F_SSL_WRITE,0), "SSL_write"},
208{ERR_PACK(0,SSL_F_TLS1_CHANGE_CIPHER_STATE,0), "TLS1_CHANGE_CIPHER_STATE"},
209{ERR_PACK(0,SSL_F_TLS1_ENC,0), "TLS1_ENC"},
210{ERR_PACK(0,SSL_F_TLS1_SETUP_KEY_BLOCK,0), "TLS1_SETUP_KEY_BLOCK"},
211{ERR_PACK(0,SSL_F_WRITE_PENDING,0), "WRITE_PENDING"},
212{0,NULL}
213 };
214
215static ERR_STRING_DATA SSL_str_reasons[]=
216 {
217{SSL_R_APP_DATA_IN_HANDSHAKE ,"app data in handshake"},
218{SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT,"attempt to reuse session in different context"},
219{SSL_R_BAD_ALERT_RECORD ,"bad alert record"},
220{SSL_R_BAD_AUTHENTICATION_TYPE ,"bad authentication type"},
221{SSL_R_BAD_CHANGE_CIPHER_SPEC ,"bad change cipher spec"},
222{SSL_R_BAD_CHECKSUM ,"bad checksum"},
223{SSL_R_BAD_DATA_RETURNED_BY_CALLBACK ,"bad data returned by callback"},
224{SSL_R_BAD_DECOMPRESSION ,"bad decompression"},
225{SSL_R_BAD_DH_G_LENGTH ,"bad dh g length"},
226{SSL_R_BAD_DH_PUB_KEY_LENGTH ,"bad dh pub key length"},
227{SSL_R_BAD_DH_P_LENGTH ,"bad dh p length"},
228{SSL_R_BAD_DIGEST_LENGTH ,"bad digest length"},
229{SSL_R_BAD_DSA_SIGNATURE ,"bad dsa signature"},
230{SSL_R_BAD_HELLO_REQUEST ,"bad hello request"},
231{SSL_R_BAD_LENGTH ,"bad length"},
232{SSL_R_BAD_MAC_DECODE ,"bad mac decode"},
233{SSL_R_BAD_MESSAGE_TYPE ,"bad message type"},
234{SSL_R_BAD_PACKET_LENGTH ,"bad packet length"},
235{SSL_R_BAD_PROTOCOL_VERSION_NUMBER ,"bad protocol version number"},
236{SSL_R_BAD_RESPONSE_ARGUMENT ,"bad response argument"},
237{SSL_R_BAD_RSA_DECRYPT ,"bad rsa decrypt"},
238{SSL_R_BAD_RSA_ENCRYPT ,"bad rsa encrypt"},
239{SSL_R_BAD_RSA_E_LENGTH ,"bad rsa e length"},
240{SSL_R_BAD_RSA_MODULUS_LENGTH ,"bad rsa modulus length"},
241{SSL_R_BAD_RSA_SIGNATURE ,"bad rsa signature"},
242{SSL_R_BAD_SIGNATURE ,"bad signature"},
243{SSL_R_BAD_SSL_FILETYPE ,"bad ssl filetype"},
244{SSL_R_BAD_SSL_SESSION_ID_LENGTH ,"bad ssl session id length"},
245{SSL_R_BAD_STATE ,"bad state"},
246{SSL_R_BAD_WRITE_RETRY ,"bad write retry"},
247{SSL_R_BIO_NOT_SET ,"bio not set"},
248{SSL_R_BLOCK_CIPHER_PAD_IS_WRONG ,"block cipher pad is wrong"},
249{SSL_R_BN_LIB ,"bn lib"},
250{SSL_R_CA_DN_LENGTH_MISMATCH ,"ca dn length mismatch"},
251{SSL_R_CA_DN_TOO_LONG ,"ca dn too long"},
252{SSL_R_CCS_RECEIVED_EARLY ,"ccs received early"},
253{SSL_R_CERTIFICATE_VERIFY_FAILED ,"certificate verify failed"},
254{SSL_R_CERT_LENGTH_MISMATCH ,"cert length mismatch"},
255{SSL_R_CHALLENGE_IS_DIFFERENT ,"challenge is different"},
256{SSL_R_CIPHER_CODE_WRONG_LENGTH ,"cipher code wrong length"},
257{SSL_R_CIPHER_OR_HASH_UNAVAILABLE ,"cipher or hash unavailable"},
258{SSL_R_CIPHER_TABLE_SRC_ERROR ,"cipher table src error"},
259{SSL_R_COMPRESSED_LENGTH_TOO_LONG ,"compressed length too long"},
260{SSL_R_COMPRESSION_FAILURE ,"compression failure"},
261{SSL_R_COMPRESSION_LIBRARY_ERROR ,"compression library error"},
262{SSL_R_CONNECTION_ID_IS_DIFFERENT ,"connection id is different"},
263{SSL_R_CONNECTION_TYPE_NOT_SET ,"connection type not set"},
264{SSL_R_DATA_BETWEEN_CCS_AND_FINISHED ,"data between ccs and finished"},
265{SSL_R_DATA_LENGTH_TOO_LONG ,"data length too long"},
266{SSL_R_DECRYPTION_FAILED ,"decryption failed"},
267{SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC,"decryption failed or bad record mac"},
268{SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG ,"dh public value length is wrong"},
269{SSL_R_DIGEST_CHECK_FAILED ,"digest check failed"},
270{SSL_R_ENCRYPTED_LENGTH_TOO_LONG ,"encrypted length too long"},
271{SSL_R_ERROR_GENERATING_TMP_RSA_KEY ,"error generating tmp rsa key"},
272{SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST ,"error in received cipher list"},
273{SSL_R_EXCESSIVE_MESSAGE_SIZE ,"excessive message size"},
274{SSL_R_EXTRA_DATA_IN_MESSAGE ,"extra data in message"},
275{SSL_R_GOT_A_FIN_BEFORE_A_CCS ,"got a fin before a ccs"},
276{SSL_R_HTTPS_PROXY_REQUEST ,"https proxy request"},
277{SSL_R_HTTP_REQUEST ,"http request"},
278{SSL_R_ILLEGAL_PADDING ,"illegal padding"},
279{SSL_R_INVALID_CHALLENGE_LENGTH ,"invalid challenge length"},
280{SSL_R_INVALID_COMMAND ,"invalid command"},
281{SSL_R_INVALID_PURPOSE ,"invalid purpose"},
282{SSL_R_INVALID_TRUST ,"invalid trust"},
283{SSL_R_KEY_ARG_TOO_LONG ,"key arg too long"},
284{SSL_R_KRB5 ,"krb5"},
285{SSL_R_KRB5_C_CC_PRINC ,"krb5 client cc principal (no tkt?)"},
286{SSL_R_KRB5_C_GET_CRED ,"krb5 client get cred"},
287{SSL_R_KRB5_C_INIT ,"krb5 client init"},
288{SSL_R_KRB5_C_MK_REQ ,"krb5 client mk_req (expired tkt?)"},
289{SSL_R_KRB5_S_BAD_TICKET ,"krb5 server bad ticket"},
290{SSL_R_KRB5_S_INIT ,"krb5 server init"},
291{SSL_R_KRB5_S_RD_REQ ,"krb5 server rd_req (keytab perms?)"},
292{SSL_R_KRB5_S_TKT_EXPIRED ,"krb5 server tkt expired"},
293{SSL_R_KRB5_S_TKT_NYV ,"krb5 server tkt not yet valid"},
294{SSL_R_KRB5_S_TKT_SKEW ,"krb5 server tkt skew"},
295{SSL_R_LENGTH_MISMATCH ,"length mismatch"},
296{SSL_R_LENGTH_TOO_SHORT ,"length too short"},
297{SSL_R_LIBRARY_BUG ,"library bug"},
298{SSL_R_LIBRARY_HAS_NO_CIPHERS ,"library has no ciphers"},
299{SSL_R_MASTER_KEY_TOO_LONG ,"master key too long"},
300{SSL_R_MESSAGE_TOO_LONG ,"message too long"},
301{SSL_R_MISSING_DH_DSA_CERT ,"missing dh dsa cert"},
302{SSL_R_MISSING_DH_KEY ,"missing dh key"},
303{SSL_R_MISSING_DH_RSA_CERT ,"missing dh rsa cert"},
304{SSL_R_MISSING_DSA_SIGNING_CERT ,"missing dsa signing cert"},
305{SSL_R_MISSING_EXPORT_TMP_DH_KEY ,"missing export tmp dh key"},
306{SSL_R_MISSING_EXPORT_TMP_RSA_KEY ,"missing export tmp rsa key"},
307{SSL_R_MISSING_RSA_CERTIFICATE ,"missing rsa certificate"},
308{SSL_R_MISSING_RSA_ENCRYPTING_CERT ,"missing rsa encrypting cert"},
309{SSL_R_MISSING_RSA_SIGNING_CERT ,"missing rsa signing cert"},
310{SSL_R_MISSING_TMP_DH_KEY ,"missing tmp dh key"},
311{SSL_R_MISSING_TMP_RSA_KEY ,"missing tmp rsa key"},
312{SSL_R_MISSING_TMP_RSA_PKEY ,"missing tmp rsa pkey"},
313{SSL_R_MISSING_VERIFY_MESSAGE ,"missing verify message"},
314{SSL_R_NON_SSLV2_INITIAL_PACKET ,"non sslv2 initial packet"},
315{SSL_R_NO_CERTIFICATES_RETURNED ,"no certificates returned"},
316{SSL_R_NO_CERTIFICATE_ASSIGNED ,"no certificate assigned"},
317{SSL_R_NO_CERTIFICATE_RETURNED ,"no certificate returned"},
318{SSL_R_NO_CERTIFICATE_SET ,"no certificate set"},
319{SSL_R_NO_CERTIFICATE_SPECIFIED ,"no certificate specified"},
320{SSL_R_NO_CIPHERS_AVAILABLE ,"no ciphers available"},
321{SSL_R_NO_CIPHERS_PASSED ,"no ciphers passed"},
322{SSL_R_NO_CIPHERS_SPECIFIED ,"no ciphers specified"},
323{SSL_R_NO_CIPHER_LIST ,"no cipher list"},
324{SSL_R_NO_CIPHER_MATCH ,"no cipher match"},
325{SSL_R_NO_CLIENT_CERT_RECEIVED ,"no client cert received"},
326{SSL_R_NO_COMPRESSION_SPECIFIED ,"no compression specified"},
327{SSL_R_NO_METHOD_SPECIFIED ,"no method specified"},
328{SSL_R_NO_PRIVATEKEY ,"no privatekey"},
329{SSL_R_NO_PRIVATE_KEY_ASSIGNED ,"no private key assigned"},
330{SSL_R_NO_PROTOCOLS_AVAILABLE ,"no protocols available"},
331{SSL_R_NO_PUBLICKEY ,"no publickey"},
332{SSL_R_NO_SHARED_CIPHER ,"no shared cipher"},
333{SSL_R_NO_VERIFY_CALLBACK ,"no verify callback"},
334{SSL_R_NULL_SSL_CTX ,"null ssl ctx"},
335{SSL_R_NULL_SSL_METHOD_PASSED ,"null ssl method passed"},
336{SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED ,"old session cipher not returned"},
337{SSL_R_PACKET_LENGTH_TOO_LONG ,"packet length too long"},
338{SSL_R_PATH_TOO_LONG ,"path too long"},
339{SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE ,"peer did not return a certificate"},
340{SSL_R_PEER_ERROR ,"peer error"},
341{SSL_R_PEER_ERROR_CERTIFICATE ,"peer error certificate"},
342{SSL_R_PEER_ERROR_NO_CERTIFICATE ,"peer error no certificate"},
343{SSL_R_PEER_ERROR_NO_CIPHER ,"peer error no cipher"},
344{SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE,"peer error unsupported certificate type"},
345{SSL_R_PRE_MAC_LENGTH_TOO_LONG ,"pre mac length too long"},
346{SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS ,"problems mapping cipher functions"},
347{SSL_R_PROTOCOL_IS_SHUTDOWN ,"protocol is shutdown"},
348{SSL_R_PUBLIC_KEY_ENCRYPT_ERROR ,"public key encrypt error"},
349{SSL_R_PUBLIC_KEY_IS_NOT_RSA ,"public key is not rsa"},
350{SSL_R_PUBLIC_KEY_NOT_RSA ,"public key not rsa"},
351{SSL_R_READ_BIO_NOT_SET ,"read bio not set"},
352{SSL_R_READ_WRONG_PACKET_TYPE ,"read wrong packet type"},
353{SSL_R_RECORD_LENGTH_MISMATCH ,"record length mismatch"},
354{SSL_R_RECORD_TOO_LARGE ,"record too large"},
355{SSL_R_RECORD_TOO_SMALL ,"record too small"},
356{SSL_R_REQUIRED_CIPHER_MISSING ,"required cipher missing"},
357{SSL_R_REUSE_CERT_LENGTH_NOT_ZERO ,"reuse cert length not zero"},
358{SSL_R_REUSE_CERT_TYPE_NOT_ZERO ,"reuse cert type not zero"},
359{SSL_R_REUSE_CIPHER_LIST_NOT_ZERO ,"reuse cipher list not zero"},
360{SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED ,"session id context uninitialized"},
361{SSL_R_SHORT_READ ,"short read"},
362{SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE,"signature for non signing certificate"},
363{SSL_R_SSL23_DOING_SESSION_ID_REUSE ,"ssl23 doing session id reuse"},
364{SSL_R_SSL2_CONNECTION_ID_TOO_LONG ,"ssl2 connection id too long"},
365{SSL_R_SSL3_SESSION_ID_TOO_LONG ,"ssl3 session id too long"},
366{SSL_R_SSL3_SESSION_ID_TOO_SHORT ,"ssl3 session id too short"},
367{SSL_R_SSLV3_ALERT_BAD_CERTIFICATE ,"sslv3 alert bad certificate"},
368{SSL_R_SSLV3_ALERT_BAD_RECORD_MAC ,"sslv3 alert bad record mac"},
369{SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED ,"sslv3 alert certificate expired"},
370{SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED ,"sslv3 alert certificate revoked"},
371{SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN ,"sslv3 alert certificate unknown"},
372{SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE ,"sslv3 alert decompression failure"},
373{SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE ,"sslv3 alert handshake failure"},
374{SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER ,"sslv3 alert illegal parameter"},
375{SSL_R_SSLV3_ALERT_NO_CERTIFICATE ,"sslv3 alert no certificate"},
376{SSL_R_SSLV3_ALERT_PEER_ERROR_CERTIFICATE,"sslv3 alert peer error certificate"},
377{SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CERTIFICATE,"sslv3 alert peer error no certificate"},
378{SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CIPHER ,"sslv3 alert peer error no cipher"},
379{SSL_R_SSLV3_ALERT_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE,"sslv3 alert peer error unsupported certificate type"},
380{SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE ,"sslv3 alert unexpected message"},
381{SSL_R_SSLV3_ALERT_UNKNOWN_REMOTE_ERROR_TYPE,"sslv3 alert unknown remote error type"},
382{SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE,"sslv3 alert unsupported certificate"},
383{SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION,"ssl ctx has no default ssl version"},
384{SSL_R_SSL_HANDSHAKE_FAILURE ,"ssl handshake failure"},
385{SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS ,"ssl library has no ciphers"},
386{SSL_R_SSL_SESSION_ID_CALLBACK_FAILED ,"ssl session id callback failed"},
387{SSL_R_SSL_SESSION_ID_CONFLICT ,"ssl session id conflict"},
388{SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG ,"ssl session id context too long"},
389{SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH ,"ssl session id has bad length"},
390{SSL_R_SSL_SESSION_ID_IS_DIFFERENT ,"ssl session id is different"},
391{SSL_R_TLSV1_ALERT_ACCESS_DENIED ,"tlsv1 alert access denied"},
392{SSL_R_TLSV1_ALERT_DECODE_ERROR ,"tlsv1 alert decode error"},
393{SSL_R_TLSV1_ALERT_DECRYPTION_FAILED ,"tlsv1 alert decryption failed"},
394{SSL_R_TLSV1_ALERT_DECRYPT_ERROR ,"tlsv1 alert decrypt error"},
395{SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION ,"tlsv1 alert export restriction"},
396{SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY ,"tlsv1 alert insufficient security"},
397{SSL_R_TLSV1_ALERT_INTERNAL_ERROR ,"tlsv1 alert internal error"},
398{SSL_R_TLSV1_ALERT_NO_RENEGOTIATION ,"tlsv1 alert no renegotiation"},
399{SSL_R_TLSV1_ALERT_PROTOCOL_VERSION ,"tlsv1 alert protocol version"},
400{SSL_R_TLSV1_ALERT_RECORD_OVERFLOW ,"tlsv1 alert record overflow"},
401{SSL_R_TLSV1_ALERT_UNKNOWN_CA ,"tlsv1 alert unknown ca"},
402{SSL_R_TLSV1_ALERT_USER_CANCELLED ,"tlsv1 alert user cancelled"},
403{SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER,"tls client cert req with anon cipher"},
404{SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST,"tls peer did not respond with certificate list"},
405{SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG,"tls rsa encrypted value length is wrong"},
406{SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER ,"tried to use unsupported cipher"},
407{SSL_R_UNABLE_TO_DECODE_DH_CERTS ,"unable to decode dh certs"},
408{SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY ,"unable to extract public key"},
409{SSL_R_UNABLE_TO_FIND_DH_PARAMETERS ,"unable to find dh parameters"},
410{SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS,"unable to find public key parameters"},
411{SSL_R_UNABLE_TO_FIND_SSL_METHOD ,"unable to find ssl method"},
412{SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES ,"unable to load ssl2 md5 routines"},
413{SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES ,"unable to load ssl3 md5 routines"},
414{SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES ,"unable to load ssl3 sha1 routines"},
415{SSL_R_UNEXPECTED_MESSAGE ,"unexpected message"},
416{SSL_R_UNEXPECTED_RECORD ,"unexpected record"},
417{SSL_R_UNINITIALIZED ,"uninitialized"},
418{SSL_R_UNKNOWN_ALERT_TYPE ,"unknown alert type"},
419{SSL_R_UNKNOWN_CERTIFICATE_TYPE ,"unknown certificate type"},
420{SSL_R_UNKNOWN_CIPHER_RETURNED ,"unknown cipher returned"},
421{SSL_R_UNKNOWN_CIPHER_TYPE ,"unknown cipher type"},
422{SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE ,"unknown key exchange type"},
423{SSL_R_UNKNOWN_PKEY_TYPE ,"unknown pkey type"},
424{SSL_R_UNKNOWN_PROTOCOL ,"unknown protocol"},
425{SSL_R_UNKNOWN_REMOTE_ERROR_TYPE ,"unknown remote error type"},
426{SSL_R_UNKNOWN_SSL_VERSION ,"unknown ssl version"},
427{SSL_R_UNKNOWN_STATE ,"unknown state"},
428{SSL_R_UNSUPPORTED_CIPHER ,"unsupported cipher"},
429{SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM ,"unsupported compression algorithm"},
430{SSL_R_UNSUPPORTED_OPTION ,"unsupported option"},
431{SSL_R_UNSUPPORTED_PROTOCOL ,"unsupported protocol"},
432{SSL_R_UNSUPPORTED_SSL_VERSION ,"unsupported ssl version"},
433{SSL_R_WRITE_BIO_NOT_SET ,"write bio not set"},
434{SSL_R_WRONG_CIPHER_RETURNED ,"wrong cipher returned"},
435{SSL_R_WRONG_MESSAGE_TYPE ,"wrong message type"},
436{SSL_R_WRONG_NUMBER_OF_KEY_BITS ,"wrong number of key bits"},
437{SSL_R_WRONG_SIGNATURE_LENGTH ,"wrong signature length"},
438{SSL_R_WRONG_SIGNATURE_SIZE ,"wrong signature size"},
439{SSL_R_WRONG_SSL_VERSION ,"wrong ssl version"},
440{SSL_R_WRONG_VERSION_NUMBER ,"wrong version number"},
441{SSL_R_X509_LIB ,"x509 lib"},
442{SSL_R_X509_VERIFICATION_SETUP_PROBLEMS ,"x509 verification setup problems"},
443{0,NULL}
444 };
445
446#endif
447
448void ERR_load_SSL_strings(void)
449 {
450 static int init=1;
451
452 if (init)
453 {
454 init=0;
455#ifndef OPENSSL_NO_ERR
456 ERR_load_strings(ERR_LIB_SSL,SSL_str_functs);
457 ERR_load_strings(ERR_LIB_SSL,SSL_str_reasons);
458#endif
459
460 }
461 }
diff --git a/src/lib/libssl/ssl_err2.c b/src/lib/libssl/ssl_err2.c
new file mode 100644
index 0000000000..ea95a5f983
--- /dev/null
+++ b/src/lib/libssl/ssl_err2.c
@@ -0,0 +1,70 @@
1/* ssl/ssl_err2.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 <openssl/err.h>
61#include <openssl/ssl.h>
62
63void SSL_load_error_strings(void)
64 {
65#ifndef OPENSSL_NO_ERR
66 ERR_load_crypto_strings();
67 ERR_load_SSL_strings();
68#endif
69 }
70
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
new file mode 100644
index 0000000000..ee9a82d586
--- /dev/null
+++ b/src/lib/libssl/ssl_lib.c
@@ -0,0 +1,2319 @@
1/*! \file ssl/ssl_lib.c
2 * \brief Version independent SSL functions.
3 */
4/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
5 * All rights reserved.
6 *
7 * This package is an SSL implementation written
8 * by Eric Young (eay@cryptsoft.com).
9 * The implementation was written so as to conform with Netscapes SSL.
10 *
11 * This library is free for commercial and non-commercial use as long as
12 * the following conditions are aheared to. The following conditions
13 * apply to all code found in this distribution, be it the RC4, RSA,
14 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
15 * included with this distribution is covered by the same copyright terms
16 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17 *
18 * Copyright remains Eric Young's, and as such any Copyright notices in
19 * the code are not to be removed.
20 * If this package is used in a product, Eric Young should be given attribution
21 * as the author of the parts of the library used.
22 * This can be in the form of a textual message at program startup or
23 * in documentation (online or textual) provided with the package.
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions
27 * are met:
28 * 1. Redistributions of source code must retain the copyright
29 * notice, this list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright
31 * notice, this list of conditions and the following disclaimer in the
32 * documentation and/or other materials provided with the distribution.
33 * 3. All advertising materials mentioning features or use of this software
34 * must display the following acknowledgement:
35 * "This product includes cryptographic software written by
36 * Eric Young (eay@cryptsoft.com)"
37 * The word 'cryptographic' can be left out if the rouines from the library
38 * being used are not cryptographic related :-).
39 * 4. If you include any Windows specific code (or a derivative thereof) from
40 * the apps directory (application code) you must include an acknowledgement:
41 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
42 *
43 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
44 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 *
55 * The licence and distribution terms for any publically available version or
56 * derivative of this code cannot be changed. i.e. this code cannot simply be
57 * copied and put under another distribution licence
58 * [including the GNU Public Licence.]
59 */
60/* ====================================================================
61 * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
62 *
63 * Redistribution and use in source and binary forms, with or without
64 * modification, are permitted provided that the following conditions
65 * are met:
66 *
67 * 1. Redistributions of source code must retain the above copyright
68 * notice, this list of conditions and the following disclaimer.
69 *
70 * 2. Redistributions in binary form must reproduce the above copyright
71 * notice, this list of conditions and the following disclaimer in
72 * the documentation and/or other materials provided with the
73 * distribution.
74 *
75 * 3. All advertising materials mentioning features or use of this
76 * software must display the following acknowledgment:
77 * "This product includes software developed by the OpenSSL Project
78 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
79 *
80 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
81 * endorse or promote products derived from this software without
82 * prior written permission. For written permission, please contact
83 * openssl-core@openssl.org.
84 *
85 * 5. Products derived from this software may not be called "OpenSSL"
86 * nor may "OpenSSL" appear in their names without prior written
87 * permission of the OpenSSL Project.
88 *
89 * 6. Redistributions of any form whatsoever must retain the following
90 * acknowledgment:
91 * "This product includes software developed by the OpenSSL Project
92 * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
93 *
94 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
95 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
96 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
97 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
98 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
99 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
100 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
101 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
102 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
103 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
104 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
105 * OF THE POSSIBILITY OF SUCH DAMAGE.
106 * ====================================================================
107 *
108 * This product includes cryptographic software written by Eric Young
109 * (eay@cryptsoft.com). This product includes software written by Tim
110 * Hudson (tjh@cryptsoft.com).
111 *
112 */
113
114
115#ifdef REF_CHECK
116# include <assert.h>
117#endif
118#include <stdio.h>
119#include "ssl_locl.h"
120#include "kssl_lcl.h"
121#include <openssl/objects.h>
122#include <openssl/lhash.h>
123#include <openssl/x509v3.h>
124
125const char *SSL_version_str=OPENSSL_VERSION_TEXT;
126
127OPENSSL_GLOBAL SSL3_ENC_METHOD ssl3_undef_enc_method={
128 /* evil casts, but these functions are only called if there's a library bug */
129 (int (*)(SSL *,int))ssl_undefined_function,
130 (int (*)(SSL *, unsigned char *, int))ssl_undefined_function,
131 ssl_undefined_function,
132 (int (*)(SSL *, unsigned char *, unsigned char *, int))ssl_undefined_function,
133 (int (*)(SSL*, int))ssl_undefined_function,
134 (int (*)(SSL *, EVP_MD_CTX *, EVP_MD_CTX *, const char*, int, unsigned char *))ssl_undefined_function
135 };
136
137int SSL_clear(SSL *s)
138 {
139
140 if (s->method == NULL)
141 {
142 SSLerr(SSL_F_SSL_CLEAR,SSL_R_NO_METHOD_SPECIFIED);
143 return(0);
144 }
145
146 if (ssl_clear_bad_session(s))
147 {
148 SSL_SESSION_free(s->session);
149 s->session=NULL;
150 }
151
152 s->error=0;
153 s->hit=0;
154 s->shutdown=0;
155
156#if 0 /* Disabled since version 1.10 of this file (early return not
157 * needed because SSL_clear is not called when doing renegotiation) */
158 /* This is set if we are doing dynamic renegotiation so keep
159 * the old cipher. It is sort of a SSL_clear_lite :-) */
160 if (s->new_session) return(1);
161#else
162 if (s->new_session)
163 {
164 SSLerr(SSL_F_SSL_CLEAR,ERR_R_INTERNAL_ERROR);
165 return 0;
166 }
167#endif
168
169 s->type=0;
170
171 s->state=SSL_ST_BEFORE|((s->server)?SSL_ST_ACCEPT:SSL_ST_CONNECT);
172
173 s->version=s->method->version;
174 s->client_version=s->version;
175 s->rwstate=SSL_NOTHING;
176 s->rstate=SSL_ST_READ_HEADER;
177#if 0
178 s->read_ahead=s->ctx->read_ahead;
179#endif
180
181 if (s->init_buf != NULL)
182 {
183 BUF_MEM_free(s->init_buf);
184 s->init_buf=NULL;
185 }
186
187 ssl_clear_cipher_ctx(s);
188
189 s->first_packet=0;
190
191#if 1
192 /* Check to see if we were changed into a different method, if
193 * so, revert back if we are not doing session-id reuse. */
194 if (!s->in_handshake && (s->session == NULL) && (s->method != s->ctx->method))
195 {
196 s->method->ssl_free(s);
197 s->method=s->ctx->method;
198 if (!s->method->ssl_new(s))
199 return(0);
200 }
201 else
202#endif
203 s->method->ssl_clear(s);
204 return(1);
205 }
206
207/** Used to change an SSL_CTXs default SSL method type */
208int SSL_CTX_set_ssl_version(SSL_CTX *ctx,SSL_METHOD *meth)
209 {
210 STACK_OF(SSL_CIPHER) *sk;
211
212 ctx->method=meth;
213
214 sk=ssl_create_cipher_list(ctx->method,&(ctx->cipher_list),
215 &(ctx->cipher_list_by_id),SSL_DEFAULT_CIPHER_LIST);
216 if ((sk == NULL) || (sk_SSL_CIPHER_num(sk) <= 0))
217 {
218 SSLerr(SSL_F_SSL_CTX_SET_SSL_VERSION,SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS);
219 return(0);
220 }
221 return(1);
222 }
223
224SSL *SSL_new(SSL_CTX *ctx)
225 {
226 SSL *s;
227
228 if (ctx == NULL)
229 {
230 SSLerr(SSL_F_SSL_NEW,SSL_R_NULL_SSL_CTX);
231 return(NULL);
232 }
233 if (ctx->method == NULL)
234 {
235 SSLerr(SSL_F_SSL_NEW,SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION);
236 return(NULL);
237 }
238
239 s=(SSL *)OPENSSL_malloc(sizeof(SSL));
240 if (s == NULL) goto err;
241 memset(s,0,sizeof(SSL));
242
243#ifndef OPENSSL_NO_KRB5
244 s->kssl_ctx = kssl_ctx_new();
245#endif /* OPENSSL_NO_KRB5 */
246
247 s->options=ctx->options;
248 s->mode=ctx->mode;
249 s->max_cert_list=ctx->max_cert_list;
250
251 if (ctx->cert != NULL)
252 {
253 /* Earlier library versions used to copy the pointer to
254 * the CERT, not its contents; only when setting new
255 * parameters for the per-SSL copy, ssl_cert_new would be
256 * called (and the direct reference to the per-SSL_CTX
257 * settings would be lost, but those still were indirectly
258 * accessed for various purposes, and for that reason they
259 * used to be known as s->ctx->default_cert).
260 * Now we don't look at the SSL_CTX's CERT after having
261 * duplicated it once. */
262
263 s->cert = ssl_cert_dup(ctx->cert);
264 if (s->cert == NULL)
265 goto err;
266 }
267 else
268 s->cert=NULL; /* Cannot really happen (see SSL_CTX_new) */
269
270 s->read_ahead=ctx->read_ahead;
271 s->msg_callback=ctx->msg_callback;
272 s->msg_callback_arg=ctx->msg_callback_arg;
273 s->verify_mode=ctx->verify_mode;
274 s->verify_depth=ctx->verify_depth;
275 s->sid_ctx_length=ctx->sid_ctx_length;
276 OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx);
277 memcpy(&s->sid_ctx,&ctx->sid_ctx,sizeof(s->sid_ctx));
278 s->verify_callback=ctx->default_verify_callback;
279 s->generate_session_id=ctx->generate_session_id;
280 s->purpose = ctx->purpose;
281 s->trust = ctx->trust;
282 s->quiet_shutdown=ctx->quiet_shutdown;
283
284 CRYPTO_add(&ctx->references,1,CRYPTO_LOCK_SSL_CTX);
285 s->ctx=ctx;
286
287 s->verify_result=X509_V_OK;
288
289 s->method=ctx->method;
290
291 if (!s->method->ssl_new(s))
292 goto err;
293
294 s->references=1;
295 s->server=(ctx->method->ssl_accept == ssl_undefined_function)?0:1;
296
297 SSL_clear(s);
298
299 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);
300
301 return(s);
302err:
303 if (s != NULL)
304 {
305 if (s->cert != NULL)
306 ssl_cert_free(s->cert);
307 if (s->ctx != NULL)
308 SSL_CTX_free(s->ctx); /* decrement reference count */
309 OPENSSL_free(s);
310 }
311 SSLerr(SSL_F_SSL_NEW,ERR_R_MALLOC_FAILURE);
312 return(NULL);
313 }
314
315int SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx,
316 unsigned int sid_ctx_len)
317 {
318 if(sid_ctx_len > sizeof ctx->sid_ctx)
319 {
320 SSLerr(SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT,SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG);
321 return 0;
322 }
323 ctx->sid_ctx_length=sid_ctx_len;
324 memcpy(ctx->sid_ctx,sid_ctx,sid_ctx_len);
325
326 return 1;
327 }
328
329int SSL_set_session_id_context(SSL *ssl,const unsigned char *sid_ctx,
330 unsigned int sid_ctx_len)
331 {
332 if(sid_ctx_len > SSL_MAX_SID_CTX_LENGTH)
333 {
334 SSLerr(SSL_F_SSL_SET_SESSION_ID_CONTEXT,SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG);
335 return 0;
336 }
337 ssl->sid_ctx_length=sid_ctx_len;
338 memcpy(ssl->sid_ctx,sid_ctx,sid_ctx_len);
339
340 return 1;
341 }
342
343int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb)
344 {
345 CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
346 ctx->generate_session_id = cb;
347 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);
348 return 1;
349 }
350
351int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb)
352 {
353 CRYPTO_w_lock(CRYPTO_LOCK_SSL);
354 ssl->generate_session_id = cb;
355 CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
356 return 1;
357 }
358
359int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
360 unsigned int id_len)
361 {
362 /* A quick examination of SSL_SESSION_hash and SSL_SESSION_cmp shows how
363 * we can "construct" a session to give us the desired check - ie. to
364 * find if there's a session in the hash table that would conflict with
365 * any new session built out of this id/id_len and the ssl_version in
366 * use by this SSL. */
367 SSL_SESSION r, *p;
368
369 if(id_len > sizeof r.session_id)
370 return 0;
371
372 r.ssl_version = ssl->version;
373 r.session_id_length = id_len;
374 memcpy(r.session_id, id, id_len);
375 /* NB: SSLv2 always uses a fixed 16-byte session ID, so even if a
376 * callback is calling us to check the uniqueness of a shorter ID, it
377 * must be compared as a padded-out ID because that is what it will be
378 * converted to when the callback has finished choosing it. */
379 if((r.ssl_version == SSL2_VERSION) &&
380 (id_len < SSL2_SSL_SESSION_ID_LENGTH))
381 {
382 memset(r.session_id + id_len, 0,
383 SSL2_SSL_SESSION_ID_LENGTH - id_len);
384 r.session_id_length = SSL2_SSL_SESSION_ID_LENGTH;
385 }
386
387 CRYPTO_r_lock(CRYPTO_LOCK_SSL_CTX);
388 p = (SSL_SESSION *)lh_retrieve(ssl->ctx->sessions, &r);
389 CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX);
390 return (p != NULL);
391 }
392
393int SSL_CTX_set_purpose(SSL_CTX *s, int purpose)
394 {
395 return X509_PURPOSE_set(&s->purpose, purpose);
396 }
397
398int SSL_set_purpose(SSL *s, int purpose)
399 {
400 return X509_PURPOSE_set(&s->purpose, purpose);
401 }
402
403int SSL_CTX_set_trust(SSL_CTX *s, int trust)
404 {
405 return X509_TRUST_set(&s->trust, trust);
406 }
407
408int SSL_set_trust(SSL *s, int trust)
409 {
410 return X509_TRUST_set(&s->trust, trust);
411 }
412
413void SSL_free(SSL *s)
414 {
415 int i;
416
417 if(s == NULL)
418 return;
419
420 i=CRYPTO_add(&s->references,-1,CRYPTO_LOCK_SSL);
421#ifdef REF_PRINT
422 REF_PRINT("SSL",s);
423#endif
424 if (i > 0) return;
425#ifdef REF_CHECK
426 if (i < 0)
427 {
428 fprintf(stderr,"SSL_free, bad reference count\n");
429 abort(); /* ok */
430 }
431#endif
432
433 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);
434
435 if (s->bbio != NULL)
436 {
437 /* If the buffering BIO is in place, pop it off */
438 if (s->bbio == s->wbio)
439 {
440 s->wbio=BIO_pop(s->wbio);
441 }
442 BIO_free(s->bbio);
443 s->bbio=NULL;
444 }
445 if (s->rbio != NULL)
446 BIO_free_all(s->rbio);
447 if ((s->wbio != NULL) && (s->wbio != s->rbio))
448 BIO_free_all(s->wbio);
449
450 if (s->init_buf != NULL) BUF_MEM_free(s->init_buf);
451
452 /* add extra stuff */
453 if (s->cipher_list != NULL) sk_SSL_CIPHER_free(s->cipher_list);
454 if (s->cipher_list_by_id != NULL) sk_SSL_CIPHER_free(s->cipher_list_by_id);
455
456 /* Make the next call work :-) */
457 if (s->session != NULL)
458 {
459 ssl_clear_bad_session(s);
460 SSL_SESSION_free(s->session);
461 }
462
463 ssl_clear_cipher_ctx(s);
464
465 if (s->cert != NULL) ssl_cert_free(s->cert);
466 /* Free up if allocated */
467
468 if (s->ctx) SSL_CTX_free(s->ctx);
469
470 if (s->client_CA != NULL)
471 sk_X509_NAME_pop_free(s->client_CA,X509_NAME_free);
472
473 if (s->method != NULL) s->method->ssl_free(s);
474
475#ifndef OPENSSL_NO_KRB5
476 if (s->kssl_ctx != NULL)
477 kssl_ctx_free(s->kssl_ctx);
478#endif /* OPENSSL_NO_KRB5 */
479
480 OPENSSL_free(s);
481 }
482
483void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio)
484 {
485 /* If the output buffering BIO is still in place, remove it
486 */
487 if (s->bbio != NULL)
488 {
489 if (s->wbio == s->bbio)
490 {
491 s->wbio=s->wbio->next_bio;
492 s->bbio->next_bio=NULL;
493 }
494 }
495 if ((s->rbio != NULL) && (s->rbio != rbio))
496 BIO_free_all(s->rbio);
497 if ((s->wbio != NULL) && (s->wbio != wbio) && (s->rbio != s->wbio))
498 BIO_free_all(s->wbio);
499 s->rbio=rbio;
500 s->wbio=wbio;
501 }
502
503BIO *SSL_get_rbio(SSL *s)
504 { return(s->rbio); }
505
506BIO *SSL_get_wbio(SSL *s)
507 { return(s->wbio); }
508
509int SSL_get_fd(SSL *s)
510 {
511 return(SSL_get_rfd(s));
512 }
513
514int SSL_get_rfd(SSL *s)
515 {
516 int ret= -1;
517 BIO *b,*r;
518
519 b=SSL_get_rbio(s);
520 r=BIO_find_type(b,BIO_TYPE_DESCRIPTOR);
521 if (r != NULL)
522 BIO_get_fd(r,&ret);
523 return(ret);
524 }
525
526int SSL_get_wfd(SSL *s)
527 {
528 int ret= -1;
529 BIO *b,*r;
530
531 b=SSL_get_wbio(s);
532 r=BIO_find_type(b,BIO_TYPE_DESCRIPTOR);
533 if (r != NULL)
534 BIO_get_fd(r,&ret);
535 return(ret);
536 }
537
538#ifndef OPENSSL_NO_SOCK
539int SSL_set_fd(SSL *s,int fd)
540 {
541 int ret=0;
542 BIO *bio=NULL;
543
544 bio=BIO_new(BIO_s_socket());
545
546 if (bio == NULL)
547 {
548 SSLerr(SSL_F_SSL_SET_FD,ERR_R_BUF_LIB);
549 goto err;
550 }
551 BIO_set_fd(bio,fd,BIO_NOCLOSE);
552 SSL_set_bio(s,bio,bio);
553 ret=1;
554err:
555 return(ret);
556 }
557
558int SSL_set_wfd(SSL *s,int fd)
559 {
560 int ret=0;
561 BIO *bio=NULL;
562
563 if ((s->rbio == NULL) || (BIO_method_type(s->rbio) != BIO_TYPE_SOCKET)
564 || ((int)BIO_get_fd(s->rbio,NULL) != fd))
565 {
566 bio=BIO_new(BIO_s_socket());
567
568 if (bio == NULL)
569 { SSLerr(SSL_F_SSL_SET_WFD,ERR_R_BUF_LIB); goto err; }
570 BIO_set_fd(bio,fd,BIO_NOCLOSE);
571 SSL_set_bio(s,SSL_get_rbio(s),bio);
572 }
573 else
574 SSL_set_bio(s,SSL_get_rbio(s),SSL_get_rbio(s));
575 ret=1;
576err:
577 return(ret);
578 }
579
580int SSL_set_rfd(SSL *s,int fd)
581 {
582 int ret=0;
583 BIO *bio=NULL;
584
585 if ((s->wbio == NULL) || (BIO_method_type(s->wbio) != BIO_TYPE_SOCKET)
586 || ((int)BIO_get_fd(s->wbio,NULL) != fd))
587 {
588 bio=BIO_new(BIO_s_socket());
589
590 if (bio == NULL)
591 {
592 SSLerr(SSL_F_SSL_SET_RFD,ERR_R_BUF_LIB);
593 goto err;
594 }
595 BIO_set_fd(bio,fd,BIO_NOCLOSE);
596 SSL_set_bio(s,bio,SSL_get_wbio(s));
597 }
598 else
599 SSL_set_bio(s,SSL_get_wbio(s),SSL_get_wbio(s));
600 ret=1;
601err:
602 return(ret);
603 }
604#endif
605
606
607/* return length of latest Finished message we sent, copy to 'buf' */
608size_t SSL_get_finished(SSL *s, void *buf, size_t count)
609 {
610 size_t ret = 0;
611
612 if (s->s3 != NULL)
613 {
614 ret = s->s3->tmp.finish_md_len;
615 if (count > ret)
616 count = ret;
617 memcpy(buf, s->s3->tmp.finish_md, count);
618 }
619 return ret;
620 }
621
622/* return length of latest Finished message we expected, copy to 'buf' */
623size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count)
624 {
625 size_t ret = 0;
626
627 if (s->s3 != NULL)
628 {
629 ret = s->s3->tmp.peer_finish_md_len;
630 if (count > ret)
631 count = ret;
632 memcpy(buf, s->s3->tmp.peer_finish_md, count);
633 }
634 return ret;
635 }
636
637
638int SSL_get_verify_mode(SSL *s)
639 {
640 return(s->verify_mode);
641 }
642
643int SSL_get_verify_depth(SSL *s)
644 {
645 return(s->verify_depth);
646 }
647
648int (*SSL_get_verify_callback(SSL *s))(int,X509_STORE_CTX *)
649 {
650 return(s->verify_callback);
651 }
652
653int SSL_CTX_get_verify_mode(SSL_CTX *ctx)
654 {
655 return(ctx->verify_mode);
656 }
657
658int SSL_CTX_get_verify_depth(SSL_CTX *ctx)
659 {
660 return(ctx->verify_depth);
661 }
662
663int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(int,X509_STORE_CTX *)
664 {
665 return(ctx->default_verify_callback);
666 }
667
668void SSL_set_verify(SSL *s,int mode,
669 int (*callback)(int ok,X509_STORE_CTX *ctx))
670 {
671 s->verify_mode=mode;
672 if (callback != NULL)
673 s->verify_callback=callback;
674 }
675
676void SSL_set_verify_depth(SSL *s,int depth)
677 {
678 s->verify_depth=depth;
679 }
680
681void SSL_set_read_ahead(SSL *s,int yes)
682 {
683 s->read_ahead=yes;
684 }
685
686int SSL_get_read_ahead(SSL *s)
687 {
688 return(s->read_ahead);
689 }
690
691int SSL_pending(SSL *s)
692 {
693 /* SSL_pending cannot work properly if read-ahead is enabled
694 * (SSL_[CTX_]ctrl(..., SSL_CTRL_SET_READ_AHEAD, 1, NULL)),
695 * and it is impossible to fix since SSL_pending cannot report
696 * errors that may be observed while scanning the new data.
697 * (Note that SSL_pending() is often used as a boolean value,
698 * so we'd better not return -1.)
699 */
700 return(s->method->ssl_pending(s));
701 }
702
703X509 *SSL_get_peer_certificate(SSL *s)
704 {
705 X509 *r;
706
707 if ((s == NULL) || (s->session == NULL))
708 r=NULL;
709 else
710 r=s->session->peer;
711
712 if (r == NULL) return(r);
713
714 CRYPTO_add(&r->references,1,CRYPTO_LOCK_X509);
715
716 return(r);
717 }
718
719STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s)
720 {
721 STACK_OF(X509) *r;
722
723 if ((s == NULL) || (s->session == NULL) || (s->session->sess_cert == NULL))
724 r=NULL;
725 else
726 r=s->session->sess_cert->cert_chain;
727
728 /* If we are a client, cert_chain includes the peer's own
729 * certificate; if we are a server, it does not. */
730
731 return(r);
732 }
733
734/* Now in theory, since the calling process own 't' it should be safe to
735 * modify. We need to be able to read f without being hassled */
736void SSL_copy_session_id(SSL *t,SSL *f)
737 {
738 CERT *tmp;
739
740 /* Do we need to to SSL locking? */
741 SSL_set_session(t,SSL_get_session(f));
742
743 /* what if we are setup as SSLv2 but want to talk SSLv3 or
744 * vice-versa */
745 if (t->method != f->method)
746 {
747 t->method->ssl_free(t); /* cleanup current */
748 t->method=f->method; /* change method */
749 t->method->ssl_new(t); /* setup new */
750 }
751
752 tmp=t->cert;
753 if (f->cert != NULL)
754 {
755 CRYPTO_add(&f->cert->references,1,CRYPTO_LOCK_SSL_CERT);
756 t->cert=f->cert;
757 }
758 else
759 t->cert=NULL;
760 if (tmp != NULL) ssl_cert_free(tmp);
761 SSL_set_session_id_context(t,f->sid_ctx,f->sid_ctx_length);
762 }
763
764/* Fix this so it checks all the valid key/cert options */
765int SSL_CTX_check_private_key(SSL_CTX *ctx)
766 {
767 if ( (ctx == NULL) ||
768 (ctx->cert == NULL) ||
769 (ctx->cert->key->x509 == NULL))
770 {
771 SSLerr(SSL_F_SSL_CTX_CHECK_PRIVATE_KEY,SSL_R_NO_CERTIFICATE_ASSIGNED);
772 return(0);
773 }
774 if (ctx->cert->key->privatekey == NULL)
775 {
776 SSLerr(SSL_F_SSL_CTX_CHECK_PRIVATE_KEY,SSL_R_NO_PRIVATE_KEY_ASSIGNED);
777 return(0);
778 }
779 return(X509_check_private_key(ctx->cert->key->x509, ctx->cert->key->privatekey));
780 }
781
782/* Fix this function so that it takes an optional type parameter */
783int SSL_check_private_key(SSL *ssl)
784 {
785 if (ssl == NULL)
786 {
787 SSLerr(SSL_F_SSL_CHECK_PRIVATE_KEY,ERR_R_PASSED_NULL_PARAMETER);
788 return(0);
789 }
790 if (ssl->cert == NULL)
791 {
792 SSLerr(SSL_F_SSL_CHECK_PRIVATE_KEY,SSL_R_NO_CERTIFICATE_ASSIGNED);
793 return 0;
794 }
795 if (ssl->cert->key->x509 == NULL)
796 {
797 SSLerr(SSL_F_SSL_CHECK_PRIVATE_KEY,SSL_R_NO_CERTIFICATE_ASSIGNED);
798 return(0);
799 }
800 if (ssl->cert->key->privatekey == NULL)
801 {
802 SSLerr(SSL_F_SSL_CHECK_PRIVATE_KEY,SSL_R_NO_PRIVATE_KEY_ASSIGNED);
803 return(0);
804 }
805 return(X509_check_private_key(ssl->cert->key->x509,
806 ssl->cert->key->privatekey));
807 }
808
809int SSL_accept(SSL *s)
810 {
811 if (s->handshake_func == 0)
812 /* Not properly initialized yet */
813 SSL_set_accept_state(s);
814
815 return(s->method->ssl_accept(s));
816 }
817
818int SSL_connect(SSL *s)
819 {
820 if (s->handshake_func == 0)
821 /* Not properly initialized yet */
822 SSL_set_connect_state(s);
823
824 return(s->method->ssl_connect(s));
825 }
826
827long SSL_get_default_timeout(SSL *s)
828 {
829 return(s->method->get_timeout());
830 }
831
832int SSL_read(SSL *s,void *buf,int num)
833 {
834 if (s->handshake_func == 0)
835 {
836 SSLerr(SSL_F_SSL_READ, SSL_R_UNINITIALIZED);
837 return -1;
838 }
839
840 if (s->shutdown & SSL_RECEIVED_SHUTDOWN)
841 {
842 s->rwstate=SSL_NOTHING;
843 return(0);
844 }
845 return(s->method->ssl_read(s,buf,num));
846 }
847
848int SSL_peek(SSL *s,void *buf,int num)
849 {
850 if (s->handshake_func == 0)
851 {
852 SSLerr(SSL_F_SSL_READ, SSL_R_UNINITIALIZED);
853 return -1;
854 }
855
856 if (s->shutdown & SSL_RECEIVED_SHUTDOWN)
857 {
858 return(0);
859 }
860 return(s->method->ssl_peek(s,buf,num));
861 }
862
863int SSL_write(SSL *s,const void *buf,int num)
864 {
865 if (s->handshake_func == 0)
866 {
867 SSLerr(SSL_F_SSL_WRITE, SSL_R_UNINITIALIZED);
868 return -1;
869 }
870
871 if (s->shutdown & SSL_SENT_SHUTDOWN)
872 {
873 s->rwstate=SSL_NOTHING;
874 SSLerr(SSL_F_SSL_WRITE,SSL_R_PROTOCOL_IS_SHUTDOWN);
875 return(-1);
876 }
877 return(s->method->ssl_write(s,buf,num));
878 }
879
880int SSL_shutdown(SSL *s)
881 {
882 /* Note that this function behaves differently from what one might
883 * expect. Return values are 0 for no success (yet),
884 * 1 for success; but calling it once is usually not enough,
885 * even if blocking I/O is used (see ssl3_shutdown).
886 */
887
888 if (s->handshake_func == 0)
889 {
890 SSLerr(SSL_F_SSL_SHUTDOWN, SSL_R_UNINITIALIZED);
891 return -1;
892 }
893
894 if ((s != NULL) && !SSL_in_init(s))
895 return(s->method->ssl_shutdown(s));
896 else
897 return(1);
898 }
899
900int SSL_renegotiate(SSL *s)
901 {
902 if (s->new_session == 0)
903 {
904 s->new_session=1;
905 }
906 return(s->method->ssl_renegotiate(s));
907 }
908
909int SSL_renegotiate_pending(SSL *s)
910 {
911 /* becomes true when negotiation is requested;
912 * false again once a handshake has finished */
913 return (s->new_session != 0);
914 }
915
916long SSL_ctrl(SSL *s,int cmd,long larg,void *parg)
917 {
918 long l;
919
920 switch (cmd)
921 {
922 case SSL_CTRL_GET_READ_AHEAD:
923 return(s->read_ahead);
924 case SSL_CTRL_SET_READ_AHEAD:
925 l=s->read_ahead;
926 s->read_ahead=larg;
927 return(l);
928
929 case SSL_CTRL_SET_MSG_CALLBACK_ARG:
930 s->msg_callback_arg = parg;
931 return 1;
932
933 case SSL_CTRL_OPTIONS:
934 return(s->options|=larg);
935 case SSL_CTRL_MODE:
936 return(s->mode|=larg);
937 case SSL_CTRL_GET_MAX_CERT_LIST:
938 return(s->max_cert_list);
939 case SSL_CTRL_SET_MAX_CERT_LIST:
940 l=s->max_cert_list;
941 s->max_cert_list=larg;
942 return(l);
943 default:
944 return(s->method->ssl_ctrl(s,cmd,larg,parg));
945 }
946 }
947
948long SSL_callback_ctrl(SSL *s, int cmd, void (*fp)())
949 {
950 switch(cmd)
951 {
952 case SSL_CTRL_SET_MSG_CALLBACK:
953 s->msg_callback = (void (*)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg))(fp);
954 return 1;
955
956 default:
957 return(s->method->ssl_callback_ctrl(s,cmd,fp));
958 }
959 }
960
961struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx)
962 {
963 return ctx->sessions;
964 }
965
966long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd,long larg,void *parg)
967 {
968 long l;
969
970 switch (cmd)
971 {
972 case SSL_CTRL_GET_READ_AHEAD:
973 return(ctx->read_ahead);
974 case SSL_CTRL_SET_READ_AHEAD:
975 l=ctx->read_ahead;
976 ctx->read_ahead=larg;
977 return(l);
978
979 case SSL_CTRL_SET_MSG_CALLBACK_ARG:
980 ctx->msg_callback_arg = parg;
981 return 1;
982
983 case SSL_CTRL_GET_MAX_CERT_LIST:
984 return(ctx->max_cert_list);
985 case SSL_CTRL_SET_MAX_CERT_LIST:
986 l=ctx->max_cert_list;
987 ctx->max_cert_list=larg;
988 return(l);
989
990 case SSL_CTRL_SET_SESS_CACHE_SIZE:
991 l=ctx->session_cache_size;
992 ctx->session_cache_size=larg;
993 return(l);
994 case SSL_CTRL_GET_SESS_CACHE_SIZE:
995 return(ctx->session_cache_size);
996 case SSL_CTRL_SET_SESS_CACHE_MODE:
997 l=ctx->session_cache_mode;
998 ctx->session_cache_mode=larg;
999 return(l);
1000 case SSL_CTRL_GET_SESS_CACHE_MODE:
1001 return(ctx->session_cache_mode);
1002
1003 case SSL_CTRL_SESS_NUMBER:
1004 return(ctx->sessions->num_items);
1005 case SSL_CTRL_SESS_CONNECT:
1006 return(ctx->stats.sess_connect);
1007 case SSL_CTRL_SESS_CONNECT_GOOD:
1008 return(ctx->stats.sess_connect_good);
1009 case SSL_CTRL_SESS_CONNECT_RENEGOTIATE:
1010 return(ctx->stats.sess_connect_renegotiate);
1011 case SSL_CTRL_SESS_ACCEPT:
1012 return(ctx->stats.sess_accept);
1013 case SSL_CTRL_SESS_ACCEPT_GOOD:
1014 return(ctx->stats.sess_accept_good);
1015 case SSL_CTRL_SESS_ACCEPT_RENEGOTIATE:
1016 return(ctx->stats.sess_accept_renegotiate);
1017 case SSL_CTRL_SESS_HIT:
1018 return(ctx->stats.sess_hit);
1019 case SSL_CTRL_SESS_CB_HIT:
1020 return(ctx->stats.sess_cb_hit);
1021 case SSL_CTRL_SESS_MISSES:
1022 return(ctx->stats.sess_miss);
1023 case SSL_CTRL_SESS_TIMEOUTS:
1024 return(ctx->stats.sess_timeout);
1025 case SSL_CTRL_SESS_CACHE_FULL:
1026 return(ctx->stats.sess_cache_full);
1027 case SSL_CTRL_OPTIONS:
1028 return(ctx->options|=larg);
1029 case SSL_CTRL_MODE:
1030 return(ctx->mode|=larg);
1031 default:
1032 return(ctx->method->ssl_ctx_ctrl(ctx,cmd,larg,parg));
1033 }
1034 }
1035
1036long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)())
1037 {
1038 switch(cmd)
1039 {
1040 case SSL_CTRL_SET_MSG_CALLBACK:
1041 ctx->msg_callback = (void (*)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg))(fp);
1042 return 1;
1043
1044 default:
1045 return(ctx->method->ssl_ctx_callback_ctrl(ctx,cmd,fp));
1046 }
1047 }
1048
1049int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b)
1050 {
1051 long l;
1052
1053 l=a->id-b->id;
1054 if (l == 0L)
1055 return(0);
1056 else
1057 return((l > 0)?1:-1);
1058 }
1059
1060int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap,
1061 const SSL_CIPHER * const *bp)
1062 {
1063 long l;
1064
1065 l=(*ap)->id-(*bp)->id;
1066 if (l == 0L)
1067 return(0);
1068 else
1069 return((l > 0)?1:-1);
1070 }
1071
1072/** return a STACK of the ciphers available for the SSL and in order of
1073 * preference */
1074STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *s)
1075 {
1076 if (s != NULL)
1077 {
1078 if (s->cipher_list != NULL)
1079 {
1080 return(s->cipher_list);
1081 }
1082 else if ((s->ctx != NULL) &&
1083 (s->ctx->cipher_list != NULL))
1084 {
1085 return(s->ctx->cipher_list);
1086 }
1087 }
1088 return(NULL);
1089 }
1090
1091/** return a STACK of the ciphers available for the SSL and in order of
1092 * algorithm id */
1093STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s)
1094 {
1095 if (s != NULL)
1096 {
1097 if (s->cipher_list_by_id != NULL)
1098 {
1099 return(s->cipher_list_by_id);
1100 }
1101 else if ((s->ctx != NULL) &&
1102 (s->ctx->cipher_list_by_id != NULL))
1103 {
1104 return(s->ctx->cipher_list_by_id);
1105 }
1106 }
1107 return(NULL);
1108 }
1109
1110/** The old interface to get the same thing as SSL_get_ciphers() */
1111const char *SSL_get_cipher_list(SSL *s,int n)
1112 {
1113 SSL_CIPHER *c;
1114 STACK_OF(SSL_CIPHER) *sk;
1115
1116 if (s == NULL) return(NULL);
1117 sk=SSL_get_ciphers(s);
1118 if ((sk == NULL) || (sk_SSL_CIPHER_num(sk) <= n))
1119 return(NULL);
1120 c=sk_SSL_CIPHER_value(sk,n);
1121 if (c == NULL) return(NULL);
1122 return(c->name);
1123 }
1124
1125/** specify the ciphers to be used by default by the SSL_CTX */
1126int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str)
1127 {
1128 STACK_OF(SSL_CIPHER) *sk;
1129
1130 sk=ssl_create_cipher_list(ctx->method,&ctx->cipher_list,
1131 &ctx->cipher_list_by_id,str);
1132/* XXXX */
1133 return((sk == NULL)?0:1);
1134 }
1135
1136/** specify the ciphers to be used by the SSL */
1137int SSL_set_cipher_list(SSL *s,const char *str)
1138 {
1139 STACK_OF(SSL_CIPHER) *sk;
1140
1141 sk=ssl_create_cipher_list(s->ctx->method,&s->cipher_list,
1142 &s->cipher_list_by_id,str);
1143/* XXXX */
1144 return((sk == NULL)?0:1);
1145 }
1146
1147/* works well for SSLv2, not so good for SSLv3 */
1148char *SSL_get_shared_ciphers(SSL *s,char *buf,int len)
1149 {
1150 char *p;
1151 const char *cp;
1152 STACK_OF(SSL_CIPHER) *sk;
1153 SSL_CIPHER *c;
1154 int i;
1155
1156 if ((s->session == NULL) || (s->session->ciphers == NULL) ||
1157 (len < 2))
1158 return(NULL);
1159
1160 p=buf;
1161 sk=s->session->ciphers;
1162 for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
1163 {
1164 /* Decrement for either the ':' or a '\0' */
1165 len--;
1166 c=sk_SSL_CIPHER_value(sk,i);
1167 for (cp=c->name; *cp; )
1168 {
1169 if (len-- == 0)
1170 {
1171 *p='\0';
1172 return(buf);
1173 }
1174 else
1175 *(p++)= *(cp++);
1176 }
1177 *(p++)=':';
1178 }
1179 p[-1]='\0';
1180 return(buf);
1181 }
1182
1183int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p)
1184 {
1185 int i,j=0;
1186 SSL_CIPHER *c;
1187 unsigned char *q;
1188#ifndef OPENSSL_NO_KRB5
1189 int nokrb5 = !kssl_tgt_is_available(s->kssl_ctx);
1190#endif /* OPENSSL_NO_KRB5 */
1191
1192 if (sk == NULL) return(0);
1193 q=p;
1194
1195 for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
1196 {
1197 c=sk_SSL_CIPHER_value(sk,i);
1198#ifndef OPENSSL_NO_KRB5
1199 if ((c->algorithms & SSL_KRB5) && nokrb5)
1200 continue;
1201#endif /* OPENSSL_NO_KRB5 */
1202 j=ssl_put_cipher_by_char(s,c,p);
1203 p+=j;
1204 }
1205 return(p-q);
1206 }
1207
1208STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
1209 STACK_OF(SSL_CIPHER) **skp)
1210 {
1211 SSL_CIPHER *c;
1212 STACK_OF(SSL_CIPHER) *sk;
1213 int i,n;
1214
1215 n=ssl_put_cipher_by_char(s,NULL,NULL);
1216 if ((num%n) != 0)
1217 {
1218 SSLerr(SSL_F_SSL_BYTES_TO_CIPHER_LIST,SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST);
1219 return(NULL);
1220 }
1221 if ((skp == NULL) || (*skp == NULL))
1222 sk=sk_SSL_CIPHER_new_null(); /* change perhaps later */
1223 else
1224 {
1225 sk= *skp;
1226 sk_SSL_CIPHER_zero(sk);
1227 }
1228
1229 for (i=0; i<num; i+=n)
1230 {
1231 c=ssl_get_cipher_by_char(s,p);
1232 p+=n;
1233 if (c != NULL)
1234 {
1235 if (!sk_SSL_CIPHER_push(sk,c))
1236 {
1237 SSLerr(SSL_F_SSL_BYTES_TO_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
1238 goto err;
1239 }
1240 }
1241 }
1242
1243 if (skp != NULL)
1244 *skp=sk;
1245 return(sk);
1246err:
1247 if ((skp == NULL) || (*skp == NULL))
1248 sk_SSL_CIPHER_free(sk);
1249 return(NULL);
1250 }
1251
1252unsigned long SSL_SESSION_hash(SSL_SESSION *a)
1253 {
1254 unsigned long l;
1255
1256 l=(unsigned long)
1257 ((unsigned int) a->session_id[0] )|
1258 ((unsigned int) a->session_id[1]<< 8L)|
1259 ((unsigned long)a->session_id[2]<<16L)|
1260 ((unsigned long)a->session_id[3]<<24L);
1261 return(l);
1262 }
1263
1264/* NB: If this function (or indeed the hash function which uses a sort of
1265 * coarser function than this one) is changed, ensure
1266 * SSL_CTX_has_matching_session_id() is checked accordingly. It relies on being
1267 * able to construct an SSL_SESSION that will collide with any existing session
1268 * with a matching session ID. */
1269int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b)
1270 {
1271 if (a->ssl_version != b->ssl_version)
1272 return(1);
1273 if (a->session_id_length != b->session_id_length)
1274 return(1);
1275 return(memcmp(a->session_id,b->session_id,a->session_id_length));
1276 }
1277
1278/* These wrapper functions should remain rather than redeclaring
1279 * SSL_SESSION_hash and SSL_SESSION_cmp for void* types and casting each
1280 * variable. The reason is that the functions aren't static, they're exposed via
1281 * ssl.h. */
1282static IMPLEMENT_LHASH_HASH_FN(SSL_SESSION_hash, SSL_SESSION *)
1283static IMPLEMENT_LHASH_COMP_FN(SSL_SESSION_cmp, SSL_SESSION *)
1284
1285SSL_CTX *SSL_CTX_new(SSL_METHOD *meth)
1286 {
1287 SSL_CTX *ret=NULL;
1288
1289 if (meth == NULL)
1290 {
1291 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_NULL_SSL_METHOD_PASSED);
1292 return(NULL);
1293 }
1294
1295 if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0)
1296 {
1297 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);
1298 goto err;
1299 }
1300 ret=(SSL_CTX *)OPENSSL_malloc(sizeof(SSL_CTX));
1301 if (ret == NULL)
1302 goto err;
1303
1304 memset(ret,0,sizeof(SSL_CTX));
1305
1306 ret->method=meth;
1307
1308 ret->cert_store=NULL;
1309 ret->session_cache_mode=SSL_SESS_CACHE_SERVER;
1310 ret->session_cache_size=SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;
1311 ret->session_cache_head=NULL;
1312 ret->session_cache_tail=NULL;
1313
1314 /* We take the system default */
1315 ret->session_timeout=meth->get_timeout();
1316
1317 ret->new_session_cb=0;
1318 ret->remove_session_cb=0;
1319 ret->get_session_cb=0;
1320 ret->generate_session_id=0;
1321
1322 memset((char *)&ret->stats,0,sizeof(ret->stats));
1323
1324 ret->references=1;
1325 ret->quiet_shutdown=0;
1326
1327/* ret->cipher=NULL;*/
1328/* ret->s2->challenge=NULL;
1329 ret->master_key=NULL;
1330 ret->key_arg=NULL;
1331 ret->s2->conn_id=NULL; */
1332
1333 ret->info_callback=NULL;
1334
1335 ret->app_verify_callback=0;
1336 ret->app_verify_arg=NULL;
1337
1338 ret->max_cert_list=SSL_MAX_CERT_LIST_DEFAULT;
1339 ret->read_ahead=0;
1340 ret->msg_callback=0;
1341 ret->msg_callback_arg=NULL;
1342 ret->verify_mode=SSL_VERIFY_NONE;
1343 ret->verify_depth=-1; /* Don't impose a limit (but x509_lu.c does) */
1344 ret->sid_ctx_length=0;
1345 ret->default_verify_callback=NULL;
1346 if ((ret->cert=ssl_cert_new()) == NULL)
1347 goto err;
1348
1349 ret->default_passwd_callback=0;
1350 ret->default_passwd_callback_userdata=NULL;
1351 ret->client_cert_cb=0;
1352
1353 ret->sessions=lh_new(LHASH_HASH_FN(SSL_SESSION_hash),
1354 LHASH_COMP_FN(SSL_SESSION_cmp));
1355 if (ret->sessions == NULL) goto err;
1356 ret->cert_store=X509_STORE_new();
1357 if (ret->cert_store == NULL) goto err;
1358
1359 ssl_create_cipher_list(ret->method,
1360 &ret->cipher_list,&ret->cipher_list_by_id,
1361 SSL_DEFAULT_CIPHER_LIST);
1362 if (ret->cipher_list == NULL
1363 || sk_SSL_CIPHER_num(ret->cipher_list) <= 0)
1364 {
1365 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_LIBRARY_HAS_NO_CIPHERS);
1366 goto err2;
1367 }
1368
1369 if ((ret->rsa_md5=EVP_get_digestbyname("ssl2-md5")) == NULL)
1370 {
1371 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES);
1372 goto err2;
1373 }
1374 if ((ret->md5=EVP_get_digestbyname("ssl3-md5")) == NULL)
1375 {
1376 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES);
1377 goto err2;
1378 }
1379 if ((ret->sha1=EVP_get_digestbyname("ssl3-sha1")) == NULL)
1380 {
1381 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES);
1382 goto err2;
1383 }
1384
1385 if ((ret->client_CA=sk_X509_NAME_new_null()) == NULL)
1386 goto err;
1387
1388 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data);
1389
1390 ret->extra_certs=NULL;
1391 ret->comp_methods=SSL_COMP_get_compression_methods();
1392
1393 return(ret);
1394err:
1395 SSLerr(SSL_F_SSL_CTX_NEW,ERR_R_MALLOC_FAILURE);
1396err2:
1397 if (ret != NULL) SSL_CTX_free(ret);
1398 return(NULL);
1399 }
1400
1401#if 0
1402static void SSL_COMP_free(SSL_COMP *comp)
1403 { OPENSSL_free(comp); }
1404#endif
1405
1406void SSL_CTX_free(SSL_CTX *a)
1407 {
1408 int i;
1409
1410 if (a == NULL) return;
1411
1412 i=CRYPTO_add(&a->references,-1,CRYPTO_LOCK_SSL_CTX);
1413#ifdef REF_PRINT
1414 REF_PRINT("SSL_CTX",a);
1415#endif
1416 if (i > 0) return;
1417#ifdef REF_CHECK
1418 if (i < 0)
1419 {
1420 fprintf(stderr,"SSL_CTX_free, bad reference count\n");
1421 abort(); /* ok */
1422 }
1423#endif
1424
1425 /*
1426 * Free internal session cache. However: the remove_cb() may reference
1427 * the ex_data of SSL_CTX, thus the ex_data store can only be removed
1428 * after the sessions were flushed.
1429 * As the ex_data handling routines might also touch the session cache,
1430 * the most secure solution seems to be: empty (flush) the cache, then
1431 * free ex_data, then finally free the cache.
1432 * (See ticket [openssl.org #212].)
1433 */
1434 if (a->sessions != NULL)
1435 SSL_CTX_flush_sessions(a,0);
1436
1437 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);
1438
1439 if (a->sessions != NULL)
1440 lh_free(a->sessions);
1441
1442 if (a->cert_store != NULL)
1443 X509_STORE_free(a->cert_store);
1444 if (a->cipher_list != NULL)
1445 sk_SSL_CIPHER_free(a->cipher_list);
1446 if (a->cipher_list_by_id != NULL)
1447 sk_SSL_CIPHER_free(a->cipher_list_by_id);
1448 if (a->cert != NULL)
1449 ssl_cert_free(a->cert);
1450 if (a->client_CA != NULL)
1451 sk_X509_NAME_pop_free(a->client_CA,X509_NAME_free);
1452 if (a->extra_certs != NULL)
1453 sk_X509_pop_free(a->extra_certs,X509_free);
1454#if 0 /* This should never be done, since it removes a global database */
1455 if (a->comp_methods != NULL)
1456 sk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free);
1457#else
1458 a->comp_methods = NULL;
1459#endif
1460 OPENSSL_free(a);
1461 }
1462
1463void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb)
1464 {
1465 ctx->default_passwd_callback=cb;
1466 }
1467
1468void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx,void *u)
1469 {
1470 ctx->default_passwd_callback_userdata=u;
1471 }
1472
1473void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *,void *), void *arg)
1474 {
1475 ctx->app_verify_callback=cb;
1476 ctx->app_verify_arg=arg;
1477 }
1478
1479void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,int (*cb)(int, X509_STORE_CTX *))
1480 {
1481 ctx->verify_mode=mode;
1482 ctx->default_verify_callback=cb;
1483 }
1484
1485void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth)
1486 {
1487 ctx->verify_depth=depth;
1488 }
1489
1490void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher)
1491 {
1492 CERT_PKEY *cpk;
1493 int rsa_enc,rsa_tmp,rsa_sign,dh_tmp,dh_rsa,dh_dsa,dsa_sign;
1494 int rsa_enc_export,dh_rsa_export,dh_dsa_export;
1495 int rsa_tmp_export,dh_tmp_export,kl;
1496 unsigned long mask,emask;
1497
1498 if (c == NULL) return;
1499
1500 kl=SSL_C_EXPORT_PKEYLENGTH(cipher);
1501
1502#ifndef OPENSSL_NO_RSA
1503 rsa_tmp=(c->rsa_tmp != NULL || c->rsa_tmp_cb != NULL);
1504 rsa_tmp_export=(c->rsa_tmp_cb != NULL ||
1505 (rsa_tmp && RSA_size(c->rsa_tmp)*8 <= kl));
1506#else
1507 rsa_tmp=rsa_tmp_export=0;
1508#endif
1509#ifndef OPENSSL_NO_DH
1510 dh_tmp=(c->dh_tmp != NULL || c->dh_tmp_cb != NULL);
1511 dh_tmp_export=(c->dh_tmp_cb != NULL ||
1512 (dh_tmp && DH_size(c->dh_tmp)*8 <= kl));
1513#else
1514 dh_tmp=dh_tmp_export=0;
1515#endif
1516
1517 cpk= &(c->pkeys[SSL_PKEY_RSA_ENC]);
1518 rsa_enc= (cpk->x509 != NULL && cpk->privatekey != NULL);
1519 rsa_enc_export=(rsa_enc && EVP_PKEY_size(cpk->privatekey)*8 <= kl);
1520 cpk= &(c->pkeys[SSL_PKEY_RSA_SIGN]);
1521 rsa_sign=(cpk->x509 != NULL && cpk->privatekey != NULL);
1522 cpk= &(c->pkeys[SSL_PKEY_DSA_SIGN]);
1523 dsa_sign=(cpk->x509 != NULL && cpk->privatekey != NULL);
1524 cpk= &(c->pkeys[SSL_PKEY_DH_RSA]);
1525 dh_rsa= (cpk->x509 != NULL && cpk->privatekey != NULL);
1526 dh_rsa_export=(dh_rsa && EVP_PKEY_size(cpk->privatekey)*8 <= kl);
1527 cpk= &(c->pkeys[SSL_PKEY_DH_DSA]);
1528/* FIX THIS EAY EAY EAY */
1529 dh_dsa= (cpk->x509 != NULL && cpk->privatekey != NULL);
1530 dh_dsa_export=(dh_dsa && EVP_PKEY_size(cpk->privatekey)*8 <= kl);
1531
1532 mask=0;
1533 emask=0;
1534
1535#ifdef CIPHER_DEBUG
1536 printf("rt=%d rte=%d dht=%d re=%d ree=%d rs=%d ds=%d dhr=%d dhd=%d\n",
1537 rsa_tmp,rsa_tmp_export,dh_tmp,
1538 rsa_enc,rsa_enc_export,rsa_sign,dsa_sign,dh_rsa,dh_dsa);
1539#endif
1540
1541 if (rsa_enc || (rsa_tmp && rsa_sign))
1542 mask|=SSL_kRSA;
1543 if (rsa_enc_export || (rsa_tmp_export && (rsa_sign || rsa_enc)))
1544 emask|=SSL_kRSA;
1545
1546#if 0
1547 /* The match needs to be both kEDH and aRSA or aDSA, so don't worry */
1548 if ( (dh_tmp || dh_rsa || dh_dsa) &&
1549 (rsa_enc || rsa_sign || dsa_sign))
1550 mask|=SSL_kEDH;
1551 if ((dh_tmp_export || dh_rsa_export || dh_dsa_export) &&
1552 (rsa_enc || rsa_sign || dsa_sign))
1553 emask|=SSL_kEDH;
1554#endif
1555
1556 if (dh_tmp_export)
1557 emask|=SSL_kEDH;
1558
1559 if (dh_tmp)
1560 mask|=SSL_kEDH;
1561
1562 if (dh_rsa) mask|=SSL_kDHr;
1563 if (dh_rsa_export) emask|=SSL_kDHr;
1564
1565 if (dh_dsa) mask|=SSL_kDHd;
1566 if (dh_dsa_export) emask|=SSL_kDHd;
1567
1568 if (rsa_enc || rsa_sign)
1569 {
1570 mask|=SSL_aRSA;
1571 emask|=SSL_aRSA;
1572 }
1573
1574 if (dsa_sign)
1575 {
1576 mask|=SSL_aDSS;
1577 emask|=SSL_aDSS;
1578 }
1579
1580 mask|=SSL_aNULL;
1581 emask|=SSL_aNULL;
1582
1583#ifndef OPENSSL_NO_KRB5
1584 mask|=SSL_kKRB5|SSL_aKRB5;
1585 emask|=SSL_kKRB5|SSL_aKRB5;
1586#endif
1587
1588 c->mask=mask;
1589 c->export_mask=emask;
1590 c->valid=1;
1591 }
1592
1593/* THIS NEEDS CLEANING UP */
1594X509 *ssl_get_server_send_cert(SSL *s)
1595 {
1596 unsigned long alg,mask,kalg;
1597 CERT *c;
1598 int i,is_export;
1599
1600 c=s->cert;
1601 ssl_set_cert_masks(c, s->s3->tmp.new_cipher);
1602 alg=s->s3->tmp.new_cipher->algorithms;
1603 is_export=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher);
1604 mask=is_export?c->export_mask:c->mask;
1605 kalg=alg&(SSL_MKEY_MASK|SSL_AUTH_MASK);
1606
1607 if (kalg & SSL_kDHr)
1608 i=SSL_PKEY_DH_RSA;
1609 else if (kalg & SSL_kDHd)
1610 i=SSL_PKEY_DH_DSA;
1611 else if (kalg & SSL_aDSS)
1612 i=SSL_PKEY_DSA_SIGN;
1613 else if (kalg & SSL_aRSA)
1614 {
1615 if (c->pkeys[SSL_PKEY_RSA_ENC].x509 == NULL)
1616 i=SSL_PKEY_RSA_SIGN;
1617 else
1618 i=SSL_PKEY_RSA_ENC;
1619 }
1620 else if (kalg & SSL_aKRB5)
1621 {
1622 /* VRS something else here? */
1623 return(NULL);
1624 }
1625 else /* if (kalg & SSL_aNULL) */
1626 {
1627 SSLerr(SSL_F_SSL_GET_SERVER_SEND_CERT,ERR_R_INTERNAL_ERROR);
1628 return(NULL);
1629 }
1630 if (c->pkeys[i].x509 == NULL) return(NULL);
1631 return(c->pkeys[i].x509);
1632 }
1633
1634EVP_PKEY *ssl_get_sign_pkey(SSL *s,SSL_CIPHER *cipher)
1635 {
1636 unsigned long alg;
1637 CERT *c;
1638
1639 alg=cipher->algorithms;
1640 c=s->cert;
1641
1642 if ((alg & SSL_aDSS) &&
1643 (c->pkeys[SSL_PKEY_DSA_SIGN].privatekey != NULL))
1644 return(c->pkeys[SSL_PKEY_DSA_SIGN].privatekey);
1645 else if (alg & SSL_aRSA)
1646 {
1647 if (c->pkeys[SSL_PKEY_RSA_SIGN].privatekey != NULL)
1648 return(c->pkeys[SSL_PKEY_RSA_SIGN].privatekey);
1649 else if (c->pkeys[SSL_PKEY_RSA_ENC].privatekey != NULL)
1650 return(c->pkeys[SSL_PKEY_RSA_ENC].privatekey);
1651 else
1652 return(NULL);
1653 }
1654 else /* if (alg & SSL_aNULL) */
1655 {
1656 SSLerr(SSL_F_SSL_GET_SIGN_PKEY,ERR_R_INTERNAL_ERROR);
1657 return(NULL);
1658 }
1659 }
1660
1661void ssl_update_cache(SSL *s,int mode)
1662 {
1663 int i;
1664
1665 /* If the session_id_length is 0, we are not supposed to cache it,
1666 * and it would be rather hard to do anyway :-) */
1667 if (s->session->session_id_length == 0) return;
1668
1669 i=s->ctx->session_cache_mode;
1670 if ((i & mode) && (!s->hit)
1671 && ((i & SSL_SESS_CACHE_NO_INTERNAL_STORE)
1672 || SSL_CTX_add_session(s->ctx,s->session))
1673 && (s->ctx->new_session_cb != NULL))
1674 {
1675 CRYPTO_add(&s->session->references,1,CRYPTO_LOCK_SSL_SESSION);
1676 if (!s->ctx->new_session_cb(s,s->session))
1677 SSL_SESSION_free(s->session);
1678 }
1679
1680 /* auto flush every 255 connections */
1681 if ((!(i & SSL_SESS_CACHE_NO_AUTO_CLEAR)) &&
1682 ((i & mode) == mode))
1683 {
1684 if ( (((mode & SSL_SESS_CACHE_CLIENT)
1685 ?s->ctx->stats.sess_connect_good
1686 :s->ctx->stats.sess_accept_good) & 0xff) == 0xff)
1687 {
1688 SSL_CTX_flush_sessions(s->ctx,time(NULL));
1689 }
1690 }
1691 }
1692
1693SSL_METHOD *SSL_get_ssl_method(SSL *s)
1694 {
1695 return(s->method);
1696 }
1697
1698int SSL_set_ssl_method(SSL *s,SSL_METHOD *meth)
1699 {
1700 int conn= -1;
1701 int ret=1;
1702
1703 if (s->method != meth)
1704 {
1705 if (s->handshake_func != NULL)
1706 conn=(s->handshake_func == s->method->ssl_connect);
1707
1708 if (s->method->version == meth->version)
1709 s->method=meth;
1710 else
1711 {
1712 s->method->ssl_free(s);
1713 s->method=meth;
1714 ret=s->method->ssl_new(s);
1715 }
1716
1717 if (conn == 1)
1718 s->handshake_func=meth->ssl_connect;
1719 else if (conn == 0)
1720 s->handshake_func=meth->ssl_accept;
1721 }
1722 return(ret);
1723 }
1724
1725int SSL_get_error(SSL *s,int i)
1726 {
1727 int reason;
1728 unsigned long l;
1729 BIO *bio;
1730
1731 if (i > 0) return(SSL_ERROR_NONE);
1732
1733 /* Make things return SSL_ERROR_SYSCALL when doing SSL_do_handshake
1734 * etc, where we do encode the error */
1735 if ((l=ERR_peek_error()) != 0)
1736 {
1737 if (ERR_GET_LIB(l) == ERR_LIB_SYS)
1738 return(SSL_ERROR_SYSCALL);
1739 else
1740 return(SSL_ERROR_SSL);
1741 }
1742
1743 if ((i < 0) && SSL_want_read(s))
1744 {
1745 bio=SSL_get_rbio(s);
1746 if (BIO_should_read(bio))
1747 return(SSL_ERROR_WANT_READ);
1748 else if (BIO_should_write(bio))
1749 /* This one doesn't make too much sense ... We never try
1750 * to write to the rbio, and an application program where
1751 * rbio and wbio are separate couldn't even know what it
1752 * should wait for.
1753 * However if we ever set s->rwstate incorrectly
1754 * (so that we have SSL_want_read(s) instead of
1755 * SSL_want_write(s)) and rbio and wbio *are* the same,
1756 * this test works around that bug; so it might be safer
1757 * to keep it. */
1758 return(SSL_ERROR_WANT_WRITE);
1759 else if (BIO_should_io_special(bio))
1760 {
1761 reason=BIO_get_retry_reason(bio);
1762 if (reason == BIO_RR_CONNECT)
1763 return(SSL_ERROR_WANT_CONNECT);
1764 else if (reason == BIO_RR_ACCEPT)
1765 return(SSL_ERROR_WANT_ACCEPT);
1766 else
1767 return(SSL_ERROR_SYSCALL); /* unknown */
1768 }
1769 }
1770
1771 if ((i < 0) && SSL_want_write(s))
1772 {
1773 bio=SSL_get_wbio(s);
1774 if (BIO_should_write(bio))
1775 return(SSL_ERROR_WANT_WRITE);
1776 else if (BIO_should_read(bio))
1777 /* See above (SSL_want_read(s) with BIO_should_write(bio)) */
1778 return(SSL_ERROR_WANT_READ);
1779 else if (BIO_should_io_special(bio))
1780 {
1781 reason=BIO_get_retry_reason(bio);
1782 if (reason == BIO_RR_CONNECT)
1783 return(SSL_ERROR_WANT_CONNECT);
1784 else if (reason == BIO_RR_ACCEPT)
1785 return(SSL_ERROR_WANT_ACCEPT);
1786 else
1787 return(SSL_ERROR_SYSCALL);
1788 }
1789 }
1790 if ((i < 0) && SSL_want_x509_lookup(s))
1791 {
1792 return(SSL_ERROR_WANT_X509_LOOKUP);
1793 }
1794
1795 if (i == 0)
1796 {
1797 if (s->version == SSL2_VERSION)
1798 {
1799 /* assume it is the socket being closed */
1800 return(SSL_ERROR_ZERO_RETURN);
1801 }
1802 else
1803 {
1804 if ((s->shutdown & SSL_RECEIVED_SHUTDOWN) &&
1805 (s->s3->warn_alert == SSL_AD_CLOSE_NOTIFY))
1806 return(SSL_ERROR_ZERO_RETURN);
1807 }
1808 }
1809 return(SSL_ERROR_SYSCALL);
1810 }
1811
1812int SSL_do_handshake(SSL *s)
1813 {
1814 int ret=1;
1815
1816 if (s->handshake_func == NULL)
1817 {
1818 SSLerr(SSL_F_SSL_DO_HANDSHAKE,SSL_R_CONNECTION_TYPE_NOT_SET);
1819 return(-1);
1820 }
1821
1822 s->method->ssl_renegotiate_check(s);
1823
1824 if (SSL_in_init(s) || SSL_in_before(s))
1825 {
1826 ret=s->handshake_func(s);
1827 }
1828 return(ret);
1829 }
1830
1831/* For the next 2 functions, SSL_clear() sets shutdown and so
1832 * one of these calls will reset it */
1833void SSL_set_accept_state(SSL *s)
1834 {
1835 s->server=1;
1836 s->shutdown=0;
1837 s->state=SSL_ST_ACCEPT|SSL_ST_BEFORE;
1838 s->handshake_func=s->method->ssl_accept;
1839 /* clear the current cipher */
1840 ssl_clear_cipher_ctx(s);
1841 }
1842
1843void SSL_set_connect_state(SSL *s)
1844 {
1845 s->server=0;
1846 s->shutdown=0;
1847 s->state=SSL_ST_CONNECT|SSL_ST_BEFORE;
1848 s->handshake_func=s->method->ssl_connect;
1849 /* clear the current cipher */
1850 ssl_clear_cipher_ctx(s);
1851 }
1852
1853int ssl_undefined_function(SSL *s)
1854 {
1855 SSLerr(SSL_F_SSL_UNDEFINED_FUNCTION,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
1856 return(0);
1857 }
1858
1859SSL_METHOD *ssl_bad_method(int ver)
1860 {
1861 SSLerr(SSL_F_SSL_BAD_METHOD,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
1862 return(NULL);
1863 }
1864
1865const char *SSL_get_version(SSL *s)
1866 {
1867 if (s->version == TLS1_VERSION)
1868 return("TLSv1");
1869 else if (s->version == SSL3_VERSION)
1870 return("SSLv3");
1871 else if (s->version == SSL2_VERSION)
1872 return("SSLv2");
1873 else
1874 return("unknown");
1875 }
1876
1877SSL *SSL_dup(SSL *s)
1878 {
1879 STACK_OF(X509_NAME) *sk;
1880 X509_NAME *xn;
1881 SSL *ret;
1882 int i;
1883
1884 if ((ret=SSL_new(SSL_get_SSL_CTX(s))) == NULL)
1885 return(NULL);
1886
1887 ret->version = s->version;
1888 ret->type = s->type;
1889 ret->method = s->method;
1890
1891 if (s->session != NULL)
1892 {
1893 /* This copies session-id, SSL_METHOD, sid_ctx, and 'cert' */
1894 SSL_copy_session_id(ret,s);
1895 }
1896 else
1897 {
1898 /* No session has been established yet, so we have to expect
1899 * that s->cert or ret->cert will be changed later --
1900 * they should not both point to the same object,
1901 * and thus we can't use SSL_copy_session_id. */
1902
1903 ret->method->ssl_free(ret);
1904 ret->method = s->method;
1905 ret->method->ssl_new(ret);
1906
1907 if (s->cert != NULL)
1908 {
1909 if (ret->cert != NULL)
1910 {
1911 ssl_cert_free(ret->cert);
1912 }
1913 ret->cert = ssl_cert_dup(s->cert);
1914 if (ret->cert == NULL)
1915 goto err;
1916 }
1917
1918 SSL_set_session_id_context(ret,
1919 s->sid_ctx, s->sid_ctx_length);
1920 }
1921
1922 ret->options=s->options;
1923 ret->mode=s->mode;
1924 SSL_set_max_cert_list(ret,SSL_get_max_cert_list(s));
1925 SSL_set_read_ahead(ret,SSL_get_read_ahead(s));
1926 ret->msg_callback = s->msg_callback;
1927 ret->msg_callback_arg = s->msg_callback_arg;
1928 SSL_set_verify(ret,SSL_get_verify_mode(s),
1929 SSL_get_verify_callback(s));
1930 SSL_set_verify_depth(ret,SSL_get_verify_depth(s));
1931 ret->generate_session_id = s->generate_session_id;
1932
1933 SSL_set_info_callback(ret,SSL_get_info_callback(s));
1934
1935 ret->debug=s->debug;
1936
1937 /* copy app data, a little dangerous perhaps */
1938 if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_SSL, &ret->ex_data, &s->ex_data))
1939 goto err;
1940
1941 /* setup rbio, and wbio */
1942 if (s->rbio != NULL)
1943 {
1944 if (!BIO_dup_state(s->rbio,(char *)&ret->rbio))
1945 goto err;
1946 }
1947 if (s->wbio != NULL)
1948 {
1949 if (s->wbio != s->rbio)
1950 {
1951 if (!BIO_dup_state(s->wbio,(char *)&ret->wbio))
1952 goto err;
1953 }
1954 else
1955 ret->wbio=ret->rbio;
1956 }
1957 ret->rwstate = s->rwstate;
1958 ret->in_handshake = s->in_handshake;
1959 ret->handshake_func = s->handshake_func;
1960 ret->server = s->server;
1961 ret->new_session = s->new_session;
1962 ret->quiet_shutdown = s->quiet_shutdown;
1963 ret->shutdown=s->shutdown;
1964 ret->state=s->state; /* SSL_dup does not really work at any state, though */
1965 ret->rstate=s->rstate;
1966 ret->init_num = 0; /* would have to copy ret->init_buf, ret->init_msg, ret->init_num, ret->init_off */
1967 ret->hit=s->hit;
1968 ret->purpose=s->purpose;
1969 ret->trust=s->trust;
1970
1971 /* dup the cipher_list and cipher_list_by_id stacks */
1972 if (s->cipher_list != NULL)
1973 {
1974 if ((ret->cipher_list=sk_SSL_CIPHER_dup(s->cipher_list)) == NULL)
1975 goto err;
1976 }
1977 if (s->cipher_list_by_id != NULL)
1978 if ((ret->cipher_list_by_id=sk_SSL_CIPHER_dup(s->cipher_list_by_id))
1979 == NULL)
1980 goto err;
1981
1982 /* Dup the client_CA list */
1983 if (s->client_CA != NULL)
1984 {
1985 if ((sk=sk_X509_NAME_dup(s->client_CA)) == NULL) goto err;
1986 ret->client_CA=sk;
1987 for (i=0; i<sk_X509_NAME_num(sk); i++)
1988 {
1989 xn=sk_X509_NAME_value(sk,i);
1990 if (sk_X509_NAME_set(sk,i,X509_NAME_dup(xn)) == NULL)
1991 {
1992 X509_NAME_free(xn);
1993 goto err;
1994 }
1995 }
1996 }
1997
1998 if (0)
1999 {
2000err:
2001 if (ret != NULL) SSL_free(ret);
2002 ret=NULL;
2003 }
2004 return(ret);
2005 }
2006
2007void ssl_clear_cipher_ctx(SSL *s)
2008 {
2009 if (s->enc_read_ctx != NULL)
2010 {
2011 EVP_CIPHER_CTX_cleanup(s->enc_read_ctx);
2012 OPENSSL_free(s->enc_read_ctx);
2013 s->enc_read_ctx=NULL;
2014 }
2015 if (s->enc_write_ctx != NULL)
2016 {
2017 EVP_CIPHER_CTX_cleanup(s->enc_write_ctx);
2018 OPENSSL_free(s->enc_write_ctx);
2019 s->enc_write_ctx=NULL;
2020 }
2021 if (s->expand != NULL)
2022 {
2023 COMP_CTX_free(s->expand);
2024 s->expand=NULL;
2025 }
2026 if (s->compress != NULL)
2027 {
2028 COMP_CTX_free(s->compress);
2029 s->compress=NULL;
2030 }
2031 }
2032
2033/* Fix this function so that it takes an optional type parameter */
2034X509 *SSL_get_certificate(SSL *s)
2035 {
2036 if (s->cert != NULL)
2037 return(s->cert->key->x509);
2038 else
2039 return(NULL);
2040 }
2041
2042/* Fix this function so that it takes an optional type parameter */
2043EVP_PKEY *SSL_get_privatekey(SSL *s)
2044 {
2045 if (s->cert != NULL)
2046 return(s->cert->key->privatekey);
2047 else
2048 return(NULL);
2049 }
2050
2051SSL_CIPHER *SSL_get_current_cipher(SSL *s)
2052 {
2053 if ((s->session != NULL) && (s->session->cipher != NULL))
2054 return(s->session->cipher);
2055 return(NULL);
2056 }
2057
2058int ssl_init_wbio_buffer(SSL *s,int push)
2059 {
2060 BIO *bbio;
2061
2062 if (s->bbio == NULL)
2063 {
2064 bbio=BIO_new(BIO_f_buffer());
2065 if (bbio == NULL) return(0);
2066 s->bbio=bbio;
2067 }
2068 else
2069 {
2070 bbio=s->bbio;
2071 if (s->bbio == s->wbio)
2072 s->wbio=BIO_pop(s->wbio);
2073 }
2074 (void)BIO_reset(bbio);
2075/* if (!BIO_set_write_buffer_size(bbio,16*1024)) */
2076 if (!BIO_set_read_buffer_size(bbio,1))
2077 {
2078 SSLerr(SSL_F_SSL_INIT_WBIO_BUFFER,ERR_R_BUF_LIB);
2079 return(0);
2080 }
2081 if (push)
2082 {
2083 if (s->wbio != bbio)
2084 s->wbio=BIO_push(bbio,s->wbio);
2085 }
2086 else
2087 {
2088 if (s->wbio == bbio)
2089 s->wbio=BIO_pop(bbio);
2090 }
2091 return(1);
2092 }
2093
2094void ssl_free_wbio_buffer(SSL *s)
2095 {
2096 if (s->bbio == NULL) return;
2097
2098 if (s->bbio == s->wbio)
2099 {
2100 /* remove buffering */
2101 s->wbio=BIO_pop(s->wbio);
2102#ifdef REF_CHECK /* not the usual REF_CHECK, but this avoids adding one more preprocessor symbol */
2103 assert(s->wbio != NULL);
2104#endif
2105 }
2106 BIO_free(s->bbio);
2107 s->bbio=NULL;
2108 }
2109
2110void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode)
2111 {
2112 ctx->quiet_shutdown=mode;
2113 }
2114
2115int SSL_CTX_get_quiet_shutdown(SSL_CTX *ctx)
2116 {
2117 return(ctx->quiet_shutdown);
2118 }
2119
2120void SSL_set_quiet_shutdown(SSL *s,int mode)
2121 {
2122 s->quiet_shutdown=mode;
2123 }
2124
2125int SSL_get_quiet_shutdown(SSL *s)
2126 {
2127 return(s->quiet_shutdown);
2128 }
2129
2130void SSL_set_shutdown(SSL *s,int mode)
2131 {
2132 s->shutdown=mode;
2133 }
2134
2135int SSL_get_shutdown(SSL *s)
2136 {
2137 return(s->shutdown);
2138 }
2139
2140int SSL_version(SSL *s)
2141 {
2142 return(s->version);
2143 }
2144
2145SSL_CTX *SSL_get_SSL_CTX(SSL *ssl)
2146 {
2147 return(ssl->ctx);
2148 }
2149
2150#ifndef OPENSSL_NO_STDIO
2151int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
2152 {
2153 return(X509_STORE_set_default_paths(ctx->cert_store));
2154 }
2155
2156int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
2157 const char *CApath)
2158 {
2159 return(X509_STORE_load_locations(ctx->cert_store,CAfile,CApath));
2160 }
2161#endif
2162
2163void SSL_set_info_callback(SSL *ssl,
2164 void (*cb)(const SSL *ssl,int type,int val))
2165 {
2166 ssl->info_callback=cb;
2167 }
2168
2169void (*SSL_get_info_callback(SSL *ssl))(const SSL *ssl,int type,int val)
2170 {
2171 return ssl->info_callback;
2172 }
2173
2174int SSL_state(SSL *ssl)
2175 {
2176 return(ssl->state);
2177 }
2178
2179void SSL_set_verify_result(SSL *ssl,long arg)
2180 {
2181 ssl->verify_result=arg;
2182 }
2183
2184long SSL_get_verify_result(SSL *ssl)
2185 {
2186 return(ssl->verify_result);
2187 }
2188
2189int SSL_get_ex_new_index(long argl,void *argp,CRYPTO_EX_new *new_func,
2190 CRYPTO_EX_dup *dup_func,CRYPTO_EX_free *free_func)
2191 {
2192 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, argl, argp,
2193 new_func, dup_func, free_func);
2194 }
2195
2196int SSL_set_ex_data(SSL *s,int idx,void *arg)
2197 {
2198 return(CRYPTO_set_ex_data(&s->ex_data,idx,arg));
2199 }
2200
2201void *SSL_get_ex_data(SSL *s,int idx)
2202 {
2203 return(CRYPTO_get_ex_data(&s->ex_data,idx));
2204 }
2205
2206int SSL_CTX_get_ex_new_index(long argl,void *argp,CRYPTO_EX_new *new_func,
2207 CRYPTO_EX_dup *dup_func,CRYPTO_EX_free *free_func)
2208 {
2209 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_CTX, argl, argp,
2210 new_func, dup_func, free_func);
2211 }
2212
2213int SSL_CTX_set_ex_data(SSL_CTX *s,int idx,void *arg)
2214 {
2215 return(CRYPTO_set_ex_data(&s->ex_data,idx,arg));
2216 }
2217
2218void *SSL_CTX_get_ex_data(SSL_CTX *s,int idx)
2219 {
2220 return(CRYPTO_get_ex_data(&s->ex_data,idx));
2221 }
2222
2223int ssl_ok(SSL *s)
2224 {
2225 return(1);
2226 }
2227
2228X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *ctx)
2229 {
2230 return(ctx->cert_store);
2231 }
2232
2233void SSL_CTX_set_cert_store(SSL_CTX *ctx,X509_STORE *store)
2234 {
2235 if (ctx->cert_store != NULL)
2236 X509_STORE_free(ctx->cert_store);
2237 ctx->cert_store=store;
2238 }
2239
2240int SSL_want(SSL *s)
2241 {
2242 return(s->rwstate);
2243 }
2244
2245/*!
2246 * \brief Set the callback for generating temporary RSA keys.
2247 * \param ctx the SSL context.
2248 * \param cb the callback
2249 */
2250
2251#ifndef OPENSSL_NO_RSA
2252void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,RSA *(*cb)(SSL *ssl,
2253 int is_export,
2254 int keylength))
2255 {
2256 SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TMP_RSA_CB,(void (*)())cb);
2257 }
2258
2259void SSL_set_tmp_rsa_callback(SSL *ssl,RSA *(*cb)(SSL *ssl,
2260 int is_export,
2261 int keylength))
2262 {
2263 SSL_callback_ctrl(ssl,SSL_CTRL_SET_TMP_RSA_CB,(void (*)())cb);
2264 }
2265#endif
2266
2267#ifdef DOXYGEN
2268/*!
2269 * \brief The RSA temporary key callback function.
2270 * \param ssl the SSL session.
2271 * \param is_export \c TRUE if the temp RSA key is for an export ciphersuite.
2272 * \param keylength if \c is_export is \c TRUE, then \c keylength is the size
2273 * of the required key in bits.
2274 * \return the temporary RSA key.
2275 * \sa SSL_CTX_set_tmp_rsa_callback, SSL_set_tmp_rsa_callback
2276 */
2277
2278RSA *cb(SSL *ssl,int is_export,int keylength)
2279 {}
2280#endif
2281
2282/*!
2283 * \brief Set the callback for generating temporary DH keys.
2284 * \param ctx the SSL context.
2285 * \param dh the callback
2286 */
2287
2288#ifndef OPENSSL_NO_DH
2289void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,DH *(*dh)(SSL *ssl,int is_export,
2290 int keylength))
2291 {
2292 SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TMP_DH_CB,(void (*)())dh);
2293 }
2294
2295void SSL_set_tmp_dh_callback(SSL *ssl,DH *(*dh)(SSL *ssl,int is_export,
2296 int keylength))
2297 {
2298 SSL_callback_ctrl(ssl,SSL_CTRL_SET_TMP_DH_CB,(void (*)())dh);
2299 }
2300#endif
2301
2302
2303void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg))
2304 {
2305 SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_MSG_CALLBACK, (void (*)())cb);
2306 }
2307void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg))
2308 {
2309 SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)())cb);
2310 }
2311
2312
2313
2314#if defined(_WINDLL) && defined(OPENSSL_SYS_WIN16)
2315#include "../crypto/bio/bss_file.c"
2316#endif
2317
2318IMPLEMENT_STACK_OF(SSL_CIPHER)
2319IMPLEMENT_STACK_OF(SSL_COMP)
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
new file mode 100644
index 0000000000..dd6c7a7323
--- /dev/null
+++ b/src/lib/libssl/ssl_locl.h
@@ -0,0 +1,620 @@
1/* ssl/ssl_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 * Copyright (c) 1998-2001 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_SSL_LOCL_H
113#define HEADER_SSL_LOCL_H
114#include <stdlib.h>
115#include <time.h>
116#include <string.h>
117#include <errno.h>
118
119#include "e_os.h"
120
121#include <openssl/buffer.h>
122#include <openssl/comp.h>
123#include <openssl/bio.h>
124#include <openssl/crypto.h>
125#include <openssl/evp.h>
126#include <openssl/stack.h>
127#include <openssl/x509.h>
128#include <openssl/err.h>
129#include <openssl/ssl.h>
130#include <openssl/symhacks.h>
131
132#ifdef OPENSSL_BUILD_SHLIBSSL
133# undef OPENSSL_EXTERN
134# define OPENSSL_EXTERN OPENSSL_EXPORT
135#endif
136
137#define PKCS1_CHECK
138
139#define c2l(c,l) (l = ((unsigned long)(*((c)++))) , \
140 l|=(((unsigned long)(*((c)++)))<< 8), \
141 l|=(((unsigned long)(*((c)++)))<<16), \
142 l|=(((unsigned long)(*((c)++)))<<24))
143
144/* NOTE - c is not incremented as per c2l */
145#define c2ln(c,l1,l2,n) { \
146 c+=n; \
147 l1=l2=0; \
148 switch (n) { \
149 case 8: l2 =((unsigned long)(*(--(c))))<<24; \
150 case 7: l2|=((unsigned long)(*(--(c))))<<16; \
151 case 6: l2|=((unsigned long)(*(--(c))))<< 8; \
152 case 5: l2|=((unsigned long)(*(--(c)))); \
153 case 4: l1 =((unsigned long)(*(--(c))))<<24; \
154 case 3: l1|=((unsigned long)(*(--(c))))<<16; \
155 case 2: l1|=((unsigned long)(*(--(c))))<< 8; \
156 case 1: l1|=((unsigned long)(*(--(c)))); \
157 } \
158 }
159
160#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
161 *((c)++)=(unsigned char)(((l)>> 8)&0xff), \
162 *((c)++)=(unsigned char)(((l)>>16)&0xff), \
163 *((c)++)=(unsigned char)(((l)>>24)&0xff))
164
165#define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24, \
166 l|=((unsigned long)(*((c)++)))<<16, \
167 l|=((unsigned long)(*((c)++)))<< 8, \
168 l|=((unsigned long)(*((c)++))))
169
170#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \
171 *((c)++)=(unsigned char)(((l)>>16)&0xff), \
172 *((c)++)=(unsigned char)(((l)>> 8)&0xff), \
173 *((c)++)=(unsigned char)(((l) )&0xff))
174
175/* NOTE - c is not incremented as per l2c */
176#define l2cn(l1,l2,c,n) { \
177 c+=n; \
178 switch (n) { \
179 case 8: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
180 case 7: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
181 case 6: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
182 case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \
183 case 4: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
184 case 3: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
185 case 2: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
186 case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \
187 } \
188 }
189
190#define n2s(c,s) ((s=(((unsigned int)(c[0]))<< 8)| \
191 (((unsigned int)(c[1])) )),c+=2)
192#define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff), \
193 c[1]=(unsigned char)(((s) )&0xff)),c+=2)
194
195#define n2l3(c,l) ((l =(((unsigned long)(c[0]))<<16)| \
196 (((unsigned long)(c[1]))<< 8)| \
197 (((unsigned long)(c[2])) )),c+=3)
198
199#define l2n3(l,c) ((c[0]=(unsigned char)(((l)>>16)&0xff), \
200 c[1]=(unsigned char)(((l)>> 8)&0xff), \
201 c[2]=(unsigned char)(((l) )&0xff)),c+=3)
202
203/* LOCAL STUFF */
204
205#define SSL_DECRYPT 0
206#define SSL_ENCRYPT 1
207
208#define TWO_BYTE_BIT 0x80
209#define SEC_ESC_BIT 0x40
210#define TWO_BYTE_MASK 0x7fff
211#define THREE_BYTE_MASK 0x3fff
212
213#define INC32(a) ((a)=((a)+1)&0xffffffffL)
214#define DEC32(a) ((a)=((a)-1)&0xffffffffL)
215#define MAX_MAC_SIZE 20 /* up from 16 for SSLv3 */
216
217/*
218 * Define the Bitmasks for SSL_CIPHER.algorithms.
219 * This bits are used packed as dense as possible. If new methods/ciphers
220 * etc will be added, the bits a likely to change, so this information
221 * is for internal library use only, even though SSL_CIPHER.algorithms
222 * can be publicly accessed.
223 * Use the according functions for cipher management instead.
224 *
225 * The bit mask handling in the selection and sorting scheme in
226 * ssl_create_cipher_list() has only limited capabilities, reflecting
227 * that the different entities within are mutually exclusive:
228 * ONLY ONE BIT PER MASK CAN BE SET AT A TIME.
229 */
230#define SSL_MKEY_MASK 0x0000003FL
231#define SSL_kRSA 0x00000001L /* RSA key exchange */
232#define SSL_kDHr 0x00000002L /* DH cert RSA CA cert */
233#define SSL_kDHd 0x00000004L /* DH cert DSA CA cert */
234#define SSL_kFZA 0x00000008L
235#define SSL_kEDH 0x00000010L /* tmp DH key no DH cert */
236#define SSL_kKRB5 0x00000020L /* Kerberos5 key exchange */
237#define SSL_EDH (SSL_kEDH|(SSL_AUTH_MASK^SSL_aNULL))
238
239#define SSL_AUTH_MASK 0x00000FC0L
240#define SSL_aRSA 0x00000040L /* Authenticate with RSA */
241#define SSL_aDSS 0x00000080L /* Authenticate with DSS */
242#define SSL_DSS SSL_aDSS
243#define SSL_aFZA 0x00000100L
244#define SSL_aNULL 0x00000200L /* no Authenticate, ADH */
245#define SSL_aDH 0x00000400L /* no Authenticate, ADH */
246#define SSL_aKRB5 0x00000800L /* Authenticate with KRB5 */
247
248#define SSL_NULL (SSL_eNULL)
249#define SSL_ADH (SSL_kEDH|SSL_aNULL)
250#define SSL_RSA (SSL_kRSA|SSL_aRSA)
251#define SSL_DH (SSL_kDHr|SSL_kDHd|SSL_kEDH)
252#define SSL_FZA (SSL_aFZA|SSL_kFZA|SSL_eFZA)
253#define SSL_KRB5 (SSL_kKRB5|SSL_aKRB5)
254
255#define SSL_ENC_MASK 0x0087F000L
256#define SSL_DES 0x00001000L
257#define SSL_3DES 0x00002000L
258#define SSL_RC4 0x00004000L
259#define SSL_RC2 0x00008000L
260#define SSL_IDEA 0x00010000L
261#define SSL_eFZA 0x00020000L
262#define SSL_eNULL 0x00040000L
263#define SSL_AES 0x00800000L
264
265#define SSL_MAC_MASK 0x00180000L
266#define SSL_MD5 0x00080000L
267#define SSL_SHA1 0x00100000L
268#define SSL_SHA (SSL_SHA1)
269
270#define SSL_SSL_MASK 0x00600000L
271#define SSL_SSLV2 0x00200000L
272#define SSL_SSLV3 0x00400000L
273#define SSL_TLSV1 SSL_SSLV3 /* for now */
274
275/* we have used 007fffff - 9 bits left to go */
276
277/*
278 * Export and cipher strength information. For each cipher we have to decide
279 * whether it is exportable or not. This information is likely to change
280 * over time, since the export control rules are no static technical issue.
281 *
282 * Independent of the export flag the cipher strength is sorted into classes.
283 * SSL_EXP40 was denoting the 40bit US export limit of past times, which now
284 * is at 56bit (SSL_EXP56). If the exportable cipher class is going to change
285 * again (eg. to 64bit) the use of "SSL_EXP*" becomes blurred even more,
286 * since SSL_EXP64 could be similar to SSL_LOW.
287 * For this reason SSL_MICRO and SSL_MINI macros are included to widen the
288 * namespace of SSL_LOW-SSL_HIGH to lower values. As development of speed
289 * and ciphers goes, another extension to SSL_SUPER and/or SSL_ULTRA would
290 * be possible.
291 */
292#define SSL_EXP_MASK 0x00000003L
293#define SSL_NOT_EXP 0x00000001L
294#define SSL_EXPORT 0x00000002L
295
296#define SSL_STRONG_MASK 0x000000fcL
297#define SSL_STRONG_NONE 0x00000004L
298#define SSL_EXP40 0x00000008L
299#define SSL_MICRO (SSL_EXP40)
300#define SSL_EXP56 0x00000010L
301#define SSL_MINI (SSL_EXP56)
302#define SSL_LOW 0x00000020L
303#define SSL_MEDIUM 0x00000040L
304#define SSL_HIGH 0x00000080L
305
306/* we have used 000000ff - 24 bits left to go */
307
308/*
309 * Macros to check the export status and cipher strength for export ciphers.
310 * Even though the macros for EXPORT and EXPORT40/56 have similar names,
311 * their meaning is different:
312 * *_EXPORT macros check the 'exportable' status.
313 * *_EXPORT40/56 macros are used to check whether a certain cipher strength
314 * is given.
315 * Since the SSL_IS_EXPORT* and SSL_EXPORT* macros depend on the correct
316 * algorithm structure element to be passed (algorithms, algo_strength) and no
317 * typechecking can be done as they are all of type unsigned long, their
318 * direct usage is discouraged.
319 * Use the SSL_C_* macros instead.
320 */
321#define SSL_IS_EXPORT(a) ((a)&SSL_EXPORT)
322#define SSL_IS_EXPORT56(a) ((a)&SSL_EXP56)
323#define SSL_IS_EXPORT40(a) ((a)&SSL_EXP40)
324#define SSL_C_IS_EXPORT(c) SSL_IS_EXPORT((c)->algo_strength)
325#define SSL_C_IS_EXPORT56(c) SSL_IS_EXPORT56((c)->algo_strength)
326#define SSL_C_IS_EXPORT40(c) SSL_IS_EXPORT40((c)->algo_strength)
327
328#define SSL_EXPORT_KEYLENGTH(a,s) (SSL_IS_EXPORT40(s) ? 5 : \
329 ((a)&SSL_ENC_MASK) == SSL_DES ? 8 : 7)
330#define SSL_EXPORT_PKEYLENGTH(a) (SSL_IS_EXPORT40(a) ? 512 : 1024)
331#define SSL_C_EXPORT_KEYLENGTH(c) SSL_EXPORT_KEYLENGTH((c)->algorithms, \
332 (c)->algo_strength)
333#define SSL_C_EXPORT_PKEYLENGTH(c) SSL_EXPORT_PKEYLENGTH((c)->algo_strength)
334
335
336#define SSL_ALL 0xffffffffL
337#define SSL_ALL_CIPHERS (SSL_MKEY_MASK|SSL_AUTH_MASK|SSL_ENC_MASK|\
338 SSL_MAC_MASK)
339#define SSL_ALL_STRENGTHS (SSL_EXP_MASK|SSL_STRONG_MASK)
340
341/* Mostly for SSLv3 */
342#define SSL_PKEY_RSA_ENC 0
343#define SSL_PKEY_RSA_SIGN 1
344#define SSL_PKEY_DSA_SIGN 2
345#define SSL_PKEY_DH_RSA 3
346#define SSL_PKEY_DH_DSA 4
347#define SSL_PKEY_NUM 5
348
349/* SSL_kRSA <- RSA_ENC | (RSA_TMP & RSA_SIGN) |
350 * <- (EXPORT & (RSA_ENC | RSA_TMP) & RSA_SIGN)
351 * SSL_kDH <- DH_ENC & (RSA_ENC | RSA_SIGN | DSA_SIGN)
352 * SSL_kEDH <- RSA_ENC | RSA_SIGN | DSA_SIGN
353 * SSL_aRSA <- RSA_ENC | RSA_SIGN
354 * SSL_aDSS <- DSA_SIGN
355 */
356
357/*
358#define CERT_INVALID 0
359#define CERT_PUBLIC_KEY 1
360#define CERT_PRIVATE_KEY 2
361*/
362
363typedef struct cert_pkey_st
364 {
365 X509 *x509;
366 EVP_PKEY *privatekey;
367 } CERT_PKEY;
368
369typedef struct cert_st
370 {
371 /* Current active set */
372 CERT_PKEY *key; /* ALWAYS points to an element of the pkeys array
373 * Probably it would make more sense to store
374 * an index, not a pointer. */
375
376 /* The following masks are for the key and auth
377 * algorithms that are supported by the certs below */
378 int valid;
379 unsigned long mask;
380 unsigned long export_mask;
381#ifndef OPENSSL_NO_RSA
382 RSA *rsa_tmp;
383 RSA *(*rsa_tmp_cb)(SSL *ssl,int is_export,int keysize);
384#endif
385#ifndef OPENSSL_NO_DH
386 DH *dh_tmp;
387 DH *(*dh_tmp_cb)(SSL *ssl,int is_export,int keysize);
388#endif
389
390 CERT_PKEY pkeys[SSL_PKEY_NUM];
391
392 int references; /* >1 only if SSL_copy_session_id is used */
393 } CERT;
394
395
396typedef struct sess_cert_st
397 {
398 STACK_OF(X509) *cert_chain; /* as received from peer (not for SSL2) */
399
400 /* The 'peer_...' members are used only by clients. */
401 int peer_cert_type;
402
403 CERT_PKEY *peer_key; /* points to an element of peer_pkeys (never NULL!) */
404 CERT_PKEY peer_pkeys[SSL_PKEY_NUM];
405 /* Obviously we don't have the private keys of these,
406 * so maybe we shouldn't even use the CERT_PKEY type here. */
407
408#ifndef OPENSSL_NO_RSA
409 RSA *peer_rsa_tmp; /* not used for SSL 2 */
410#endif
411#ifndef OPENSSL_NO_DH
412 DH *peer_dh_tmp; /* not used for SSL 2 */
413#endif
414
415 int references; /* actually always 1 at the moment */
416 } SESS_CERT;
417
418
419/*#define MAC_DEBUG */
420
421/*#define ERR_DEBUG */
422/*#define ABORT_DEBUG */
423/*#define PKT_DEBUG 1 */
424/*#define DES_DEBUG */
425/*#define DES_OFB_DEBUG */
426/*#define SSL_DEBUG */
427/*#define RSA_DEBUG */
428/*#define IDEA_DEBUG */
429
430#define FP_ICC (int (*)(const void *,const void *))
431#define ssl_put_cipher_by_char(ssl,ciph,ptr) \
432 ((ssl)->method->put_cipher_by_char((ciph),(ptr)))
433#define ssl_get_cipher_by_char(ssl,ptr) \
434 ((ssl)->method->get_cipher_by_char(ptr))
435
436/* This is for the SSLv3/TLSv1.0 differences in crypto/hash stuff
437 * It is a bit of a mess of functions, but hell, think of it as
438 * an opaque structure :-) */
439typedef struct ssl3_enc_method
440 {
441 int (*enc)(SSL *, int);
442 int (*mac)(SSL *, unsigned char *, int);
443 int (*setup_key_block)(SSL *);
444 int (*generate_master_secret)(SSL *, unsigned char *, unsigned char *, int);
445 int (*change_cipher_state)(SSL *, int);
446 int (*final_finish_mac)(SSL *, EVP_MD_CTX *, EVP_MD_CTX *, const char *, int, unsigned char *);
447 int finish_mac_length;
448 int (*cert_verify_mac)(SSL *, EVP_MD_CTX *, unsigned char *);
449 const char *client_finished_label;
450 int client_finished_label_len;
451 const char *server_finished_label;
452 int server_finished_label_len;
453 int (*alert_value)(int);
454 } SSL3_ENC_METHOD;
455
456/* Used for holding the relevant compression methods loaded into SSL_CTX */
457typedef struct ssl3_comp_st
458 {
459 int comp_id; /* The identifier byte for this compression type */
460 char *name; /* Text name used for the compression type */
461 COMP_METHOD *method; /* The method :-) */
462 } SSL3_COMP;
463
464OPENSSL_EXTERN SSL3_ENC_METHOD ssl3_undef_enc_method;
465OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[];
466OPENSSL_EXTERN SSL_CIPHER ssl3_ciphers[];
467
468#ifdef OPENSSL_SYS_VMS
469#undef SSL_COMP_get_compression_methods
470#define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods
471#endif
472
473
474SSL_METHOD *ssl_bad_method(int ver);
475SSL_METHOD *sslv2_base_method(void);
476SSL_METHOD *sslv23_base_method(void);
477SSL_METHOD *sslv3_base_method(void);
478
479void ssl_clear_cipher_ctx(SSL *s);
480int ssl_clear_bad_session(SSL *s);
481CERT *ssl_cert_new(void);
482CERT *ssl_cert_dup(CERT *cert);
483int ssl_cert_inst(CERT **o);
484void ssl_cert_free(CERT *c);
485SESS_CERT *ssl_sess_cert_new(void);
486void ssl_sess_cert_free(SESS_CERT *sc);
487int ssl_set_peer_cert_type(SESS_CERT *c, int type);
488int ssl_get_new_session(SSL *s, int session);
489int ssl_get_prev_session(SSL *s, unsigned char *session,int len);
490int ssl_cipher_id_cmp(const SSL_CIPHER *a,const SSL_CIPHER *b);
491int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap,
492 const SSL_CIPHER * const *bp);
493STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
494 STACK_OF(SSL_CIPHER) **skp);
495int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p);
496STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *meth,
497 STACK_OF(SSL_CIPHER) **pref,
498 STACK_OF(SSL_CIPHER) **sorted,
499 const char *rule_str);
500void ssl_update_cache(SSL *s, int mode);
501int ssl_cipher_get_evp(SSL_SESSION *s,const EVP_CIPHER **enc,const EVP_MD **md,
502 SSL_COMP **comp);
503int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk);
504int ssl_undefined_function(SSL *s);
505X509 *ssl_get_server_send_cert(SSL *);
506EVP_PKEY *ssl_get_sign_pkey(SSL *,SSL_CIPHER *);
507int ssl_cert_type(X509 *x,EVP_PKEY *pkey);
508void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher);
509STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s);
510int ssl_verify_alarm_type(long type);
511
512int ssl2_enc_init(SSL *s, int client);
513int ssl2_generate_key_material(SSL *s);
514void ssl2_enc(SSL *s,int send_data);
515void ssl2_mac(SSL *s,unsigned char *mac,int send_data);
516SSL_CIPHER *ssl2_get_cipher_by_char(const unsigned char *p);
517int ssl2_put_cipher_by_char(const SSL_CIPHER *c,unsigned char *p);
518int ssl2_part_read(SSL *s, unsigned long f, int i);
519int ssl2_do_write(SSL *s);
520int ssl2_set_certificate(SSL *s, int type, int len, unsigned char *data);
521void ssl2_return_error(SSL *s,int reason);
522void ssl2_write_error(SSL *s);
523int ssl2_num_ciphers(void);
524SSL_CIPHER *ssl2_get_cipher(unsigned int u);
525int ssl2_new(SSL *s);
526void ssl2_free(SSL *s);
527int ssl2_accept(SSL *s);
528int ssl2_connect(SSL *s);
529int ssl2_read(SSL *s, void *buf, int len);
530int ssl2_peek(SSL *s, void *buf, int len);
531int ssl2_write(SSL *s, const void *buf, int len);
532int ssl2_shutdown(SSL *s);
533void ssl2_clear(SSL *s);
534long ssl2_ctrl(SSL *s,int cmd, long larg, void *parg);
535long ssl2_ctx_ctrl(SSL_CTX *s,int cmd, long larg, void *parg);
536long ssl2_callback_ctrl(SSL *s,int cmd, void (*fp)());
537long ssl2_ctx_callback_ctrl(SSL_CTX *s,int cmd, void (*fp)());
538int ssl2_pending(SSL *s);
539
540SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
541int ssl3_put_cipher_by_char(const SSL_CIPHER *c,unsigned char *p);
542void ssl3_init_finished_mac(SSL *s);
543int ssl3_send_server_certificate(SSL *s);
544int ssl3_get_finished(SSL *s,int state_a,int state_b);
545int ssl3_setup_key_block(SSL *s);
546int ssl3_send_change_cipher_spec(SSL *s,int state_a,int state_b);
547int ssl3_change_cipher_state(SSL *s,int which);
548void ssl3_cleanup_key_block(SSL *s);
549int ssl3_do_write(SSL *s,int type);
550void ssl3_send_alert(SSL *s,int level, int desc);
551int ssl3_generate_master_secret(SSL *s, unsigned char *out,
552 unsigned char *p, int len);
553int ssl3_get_req_cert_type(SSL *s,unsigned char *p);
554long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok);
555int ssl3_send_finished(SSL *s, int a, int b, const char *sender,int slen);
556int ssl3_num_ciphers(void);
557SSL_CIPHER *ssl3_get_cipher(unsigned int u);
558int ssl3_renegotiate(SSL *ssl);
559int ssl3_renegotiate_check(SSL *ssl);
560int ssl3_dispatch_alert(SSL *s);
561int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek);
562int ssl3_write_bytes(SSL *s, int type, const void *buf, int len);
563int ssl3_final_finish_mac(SSL *s, EVP_MD_CTX *ctx1, EVP_MD_CTX *ctx2,
564 const char *sender, int slen,unsigned char *p);
565int ssl3_cert_verify_mac(SSL *s, EVP_MD_CTX *in, unsigned char *p);
566void ssl3_finish_mac(SSL *s, const unsigned char *buf, int len);
567int ssl3_enc(SSL *s, int send_data);
568int ssl3_mac(SSL *ssl, unsigned char *md, int send_data);
569unsigned long ssl3_output_cert_chain(SSL *s, X509 *x);
570SSL_CIPHER *ssl3_choose_cipher(SSL *ssl,STACK_OF(SSL_CIPHER) *clnt,
571 STACK_OF(SSL_CIPHER) *srvr);
572int ssl3_setup_buffers(SSL *s);
573int ssl3_new(SSL *s);
574void ssl3_free(SSL *s);
575int ssl3_accept(SSL *s);
576int ssl3_connect(SSL *s);
577int ssl3_read(SSL *s, void *buf, int len);
578int ssl3_peek(SSL *s, void *buf, int len);
579int ssl3_write(SSL *s, const void *buf, int len);
580int ssl3_shutdown(SSL *s);
581void ssl3_clear(SSL *s);
582long ssl3_ctrl(SSL *s,int cmd, long larg, void *parg);
583long ssl3_ctx_ctrl(SSL_CTX *s,int cmd, long larg, void *parg);
584long ssl3_callback_ctrl(SSL *s,int cmd, void (*fp)());
585long ssl3_ctx_callback_ctrl(SSL_CTX *s,int cmd, void (*fp)());
586int ssl3_pending(SSL *s);
587
588int ssl23_accept(SSL *s);
589int ssl23_connect(SSL *s);
590int ssl23_read_bytes(SSL *s, int n);
591int ssl23_write_bytes(SSL *s);
592
593int tls1_new(SSL *s);
594void tls1_free(SSL *s);
595void tls1_clear(SSL *s);
596long tls1_ctrl(SSL *s,int cmd, long larg, void *parg);
597long tls1_callback_ctrl(SSL *s,int cmd, void (*fp)());
598SSL_METHOD *tlsv1_base_method(void );
599
600int ssl_init_wbio_buffer(SSL *s, int push);
601void ssl_free_wbio_buffer(SSL *s);
602
603int tls1_change_cipher_state(SSL *s, int which);
604int tls1_setup_key_block(SSL *s);
605int tls1_enc(SSL *s, int snd);
606int tls1_final_finish_mac(SSL *s, EVP_MD_CTX *in1_ctx, EVP_MD_CTX *in2_ctx,
607 const char *str, int slen, unsigned char *p);
608int tls1_cert_verify_mac(SSL *s, EVP_MD_CTX *in, unsigned char *p);
609int tls1_mac(SSL *ssl, unsigned char *md, int snd);
610int tls1_generate_master_secret(SSL *s, unsigned char *out,
611 unsigned char *p, int len);
612int tls1_alert_code(int code);
613int ssl3_alert_code(int code);
614int ssl_ok(SSL *s);
615
616SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n);
617STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
618
619
620#endif
diff --git a/src/lib/libssl/ssl_rsa.c b/src/lib/libssl/ssl_rsa.c
new file mode 100644
index 0000000000..330390519b
--- /dev/null
+++ b/src/lib/libssl/ssl_rsa.c
@@ -0,0 +1,817 @@
1/* ssl/ssl_rsa.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 "ssl_locl.h"
61#include <openssl/bio.h>
62#include <openssl/objects.h>
63#include <openssl/evp.h>
64#include <openssl/x509.h>
65#include <openssl/pem.h>
66
67static int ssl_set_cert(CERT *c, X509 *x509);
68static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey);
69int SSL_use_certificate(SSL *ssl, X509 *x)
70 {
71 if (x == NULL)
72 {
73 SSLerr(SSL_F_SSL_USE_CERTIFICATE,ERR_R_PASSED_NULL_PARAMETER);
74 return(0);
75 }
76 if (!ssl_cert_inst(&ssl->cert))
77 {
78 SSLerr(SSL_F_SSL_USE_CERTIFICATE,ERR_R_MALLOC_FAILURE);
79 return(0);
80 }
81 return(ssl_set_cert(ssl->cert,x));
82 }
83
84#ifndef OPENSSL_NO_STDIO
85int SSL_use_certificate_file(SSL *ssl, const char *file, int type)
86 {
87 int j;
88 BIO *in;
89 int ret=0;
90 X509 *x=NULL;
91
92 in=BIO_new(BIO_s_file_internal());
93 if (in == NULL)
94 {
95 SSLerr(SSL_F_SSL_USE_CERTIFICATE_FILE,ERR_R_BUF_LIB);
96 goto end;
97 }
98
99 if (BIO_read_filename(in,file) <= 0)
100 {
101 SSLerr(SSL_F_SSL_USE_CERTIFICATE_FILE,ERR_R_SYS_LIB);
102 goto end;
103 }
104 if (type == SSL_FILETYPE_ASN1)
105 {
106 j=ERR_R_ASN1_LIB;
107 x=d2i_X509_bio(in,NULL);
108 }
109 else if (type == SSL_FILETYPE_PEM)
110 {
111 j=ERR_R_PEM_LIB;
112 x=PEM_read_bio_X509(in,NULL,ssl->ctx->default_passwd_callback,ssl->ctx->default_passwd_callback_userdata);
113 }
114 else
115 {
116 SSLerr(SSL_F_SSL_USE_CERTIFICATE_FILE,SSL_R_BAD_SSL_FILETYPE);
117 goto end;
118 }
119
120 if (x == NULL)
121 {
122 SSLerr(SSL_F_SSL_USE_CERTIFICATE_FILE,j);
123 goto end;
124 }
125
126 ret=SSL_use_certificate(ssl,x);
127end:
128 if (x != NULL) X509_free(x);
129 if (in != NULL) BIO_free(in);
130 return(ret);
131 }
132#endif
133
134int SSL_use_certificate_ASN1(SSL *ssl, unsigned char *d, int len)
135 {
136 X509 *x;
137 int ret;
138
139 x=d2i_X509(NULL,&d,(long)len);
140 if (x == NULL)
141 {
142 SSLerr(SSL_F_SSL_USE_CERTIFICATE_ASN1,ERR_R_ASN1_LIB);
143 return(0);
144 }
145
146 ret=SSL_use_certificate(ssl,x);
147 X509_free(x);
148 return(ret);
149 }
150
151#ifndef OPENSSL_NO_RSA
152int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa)
153 {
154 EVP_PKEY *pkey;
155 int ret;
156
157 if (rsa == NULL)
158 {
159 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY,ERR_R_PASSED_NULL_PARAMETER);
160 return(0);
161 }
162 if (!ssl_cert_inst(&ssl->cert))
163 {
164 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE);
165 return(0);
166 }
167 if ((pkey=EVP_PKEY_new()) == NULL)
168 {
169 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY,ERR_R_EVP_LIB);
170 return(0);
171 }
172
173 RSA_up_ref(rsa);
174 EVP_PKEY_assign_RSA(pkey,rsa);
175
176 ret=ssl_set_pkey(ssl->cert,pkey);
177 EVP_PKEY_free(pkey);
178 return(ret);
179 }
180#endif
181
182static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
183 {
184 int i,ok=0,bad=0;
185
186 i=ssl_cert_type(NULL,pkey);
187 if (i < 0)
188 {
189 SSLerr(SSL_F_SSL_SET_PKEY,SSL_R_UNKNOWN_CERTIFICATE_TYPE);
190 return(0);
191 }
192
193 if (c->pkeys[i].x509 != NULL)
194 {
195 EVP_PKEY *pktmp;
196 pktmp = X509_get_pubkey(c->pkeys[i].x509);
197 EVP_PKEY_copy_parameters(pktmp,pkey);
198 EVP_PKEY_free(pktmp);
199 ERR_clear_error();
200
201#ifndef OPENSSL_NO_RSA
202 /* Don't check the public/private key, this is mostly
203 * for smart cards. */
204 if ((pkey->type == EVP_PKEY_RSA) &&
205 (RSA_flags(pkey->pkey.rsa) &
206 RSA_METHOD_FLAG_NO_CHECK))
207 ok=1;
208 else
209#endif
210 if (!X509_check_private_key(c->pkeys[i].x509,pkey))
211 {
212 if ((i == SSL_PKEY_DH_RSA) || (i == SSL_PKEY_DH_DSA))
213 {
214 i=(i == SSL_PKEY_DH_RSA)?
215 SSL_PKEY_DH_DSA:SSL_PKEY_DH_RSA;
216
217 if (c->pkeys[i].x509 == NULL)
218 ok=1;
219 else
220 {
221 if (!X509_check_private_key(
222 c->pkeys[i].x509,pkey))
223 bad=1;
224 else
225 ok=1;
226 }
227 }
228 else
229 bad=1;
230 }
231 else
232 ok=1;
233 }
234 else
235 ok=1;
236
237 if (bad)
238 {
239 X509_free(c->pkeys[i].x509);
240 c->pkeys[i].x509=NULL;
241 return(0);
242 }
243
244 ERR_clear_error(); /* make sure no error from X509_check_private_key()
245 * is left if we have chosen to ignore it */
246 if (c->pkeys[i].privatekey != NULL)
247 EVP_PKEY_free(c->pkeys[i].privatekey);
248 CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY);
249 c->pkeys[i].privatekey=pkey;
250 c->key= &(c->pkeys[i]);
251
252 c->valid=0;
253 return(1);
254 }
255
256#ifndef OPENSSL_NO_RSA
257#ifndef OPENSSL_NO_STDIO
258int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type)
259 {
260 int j,ret=0;
261 BIO *in;
262 RSA *rsa=NULL;
263
264 in=BIO_new(BIO_s_file_internal());
265 if (in == NULL)
266 {
267 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,ERR_R_BUF_LIB);
268 goto end;
269 }
270
271 if (BIO_read_filename(in,file) <= 0)
272 {
273 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,ERR_R_SYS_LIB);
274 goto end;
275 }
276 if (type == SSL_FILETYPE_ASN1)
277 {
278 j=ERR_R_ASN1_LIB;
279 rsa=d2i_RSAPrivateKey_bio(in,NULL);
280 }
281 else if (type == SSL_FILETYPE_PEM)
282 {
283 j=ERR_R_PEM_LIB;
284 rsa=PEM_read_bio_RSAPrivateKey(in,NULL,
285 ssl->ctx->default_passwd_callback,ssl->ctx->default_passwd_callback_userdata);
286 }
287 else
288 {
289 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,SSL_R_BAD_SSL_FILETYPE);
290 goto end;
291 }
292 if (rsa == NULL)
293 {
294 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,j);
295 goto end;
296 }
297 ret=SSL_use_RSAPrivateKey(ssl,rsa);
298 RSA_free(rsa);
299end:
300 if (in != NULL) BIO_free(in);
301 return(ret);
302 }
303#endif
304
305int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len)
306 {
307 int ret;
308 const unsigned char *p;
309 RSA *rsa;
310
311 p=d;
312 if ((rsa=d2i_RSAPrivateKey(NULL,&p,(long)len)) == NULL)
313 {
314 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1,ERR_R_ASN1_LIB);
315 return(0);
316 }
317
318 ret=SSL_use_RSAPrivateKey(ssl,rsa);
319 RSA_free(rsa);
320 return(ret);
321 }
322#endif /* !OPENSSL_NO_RSA */
323
324int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey)
325 {
326 int ret;
327
328 if (pkey == NULL)
329 {
330 SSLerr(SSL_F_SSL_USE_PRIVATEKEY,ERR_R_PASSED_NULL_PARAMETER);
331 return(0);
332 }
333 if (!ssl_cert_inst(&ssl->cert))
334 {
335 SSLerr(SSL_F_SSL_USE_PRIVATEKEY,ERR_R_MALLOC_FAILURE);
336 return(0);
337 }
338 ret=ssl_set_pkey(ssl->cert,pkey);
339 return(ret);
340 }
341
342#ifndef OPENSSL_NO_STDIO
343int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type)
344 {
345 int j,ret=0;
346 BIO *in;
347 EVP_PKEY *pkey=NULL;
348
349 in=BIO_new(BIO_s_file_internal());
350 if (in == NULL)
351 {
352 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,ERR_R_BUF_LIB);
353 goto end;
354 }
355
356 if (BIO_read_filename(in,file) <= 0)
357 {
358 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,ERR_R_SYS_LIB);
359 goto end;
360 }
361 if (type == SSL_FILETYPE_PEM)
362 {
363 j=ERR_R_PEM_LIB;
364 pkey=PEM_read_bio_PrivateKey(in,NULL,
365 ssl->ctx->default_passwd_callback,ssl->ctx->default_passwd_callback_userdata);
366 }
367 else
368 {
369 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,SSL_R_BAD_SSL_FILETYPE);
370 goto end;
371 }
372 if (pkey == NULL)
373 {
374 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,j);
375 goto end;
376 }
377 ret=SSL_use_PrivateKey(ssl,pkey);
378 EVP_PKEY_free(pkey);
379end:
380 if (in != NULL) BIO_free(in);
381 return(ret);
382 }
383#endif
384
385int SSL_use_PrivateKey_ASN1(int type, SSL *ssl, unsigned char *d, long len)
386 {
387 int ret;
388 unsigned char *p;
389 EVP_PKEY *pkey;
390
391 p=d;
392 if ((pkey=d2i_PrivateKey(type,NULL,&p,(long)len)) == NULL)
393 {
394 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_ASN1,ERR_R_ASN1_LIB);
395 return(0);
396 }
397
398 ret=SSL_use_PrivateKey(ssl,pkey);
399 EVP_PKEY_free(pkey);
400 return(ret);
401 }
402
403int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x)
404 {
405 if (x == NULL)
406 {
407 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE,ERR_R_PASSED_NULL_PARAMETER);
408 return(0);
409 }
410 if (!ssl_cert_inst(&ctx->cert))
411 {
412 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE,ERR_R_MALLOC_FAILURE);
413 return(0);
414 }
415 return(ssl_set_cert(ctx->cert, x));
416 }
417
418static int ssl_set_cert(CERT *c, X509 *x)
419 {
420 EVP_PKEY *pkey;
421 int i,ok=0,bad=0;
422
423 pkey=X509_get_pubkey(x);
424 if (pkey == NULL)
425 {
426 SSLerr(SSL_F_SSL_SET_CERT,SSL_R_X509_LIB);
427 return(0);
428 }
429
430 i=ssl_cert_type(x,pkey);
431 if (i < 0)
432 {
433 SSLerr(SSL_F_SSL_SET_CERT,SSL_R_UNKNOWN_CERTIFICATE_TYPE);
434 EVP_PKEY_free(pkey);
435 return(0);
436 }
437
438 if (c->pkeys[i].privatekey != NULL)
439 {
440 EVP_PKEY_copy_parameters(pkey,c->pkeys[i].privatekey);
441 ERR_clear_error();
442
443#ifndef OPENSSL_NO_RSA
444 /* Don't check the public/private key, this is mostly
445 * for smart cards. */
446 if ((c->pkeys[i].privatekey->type == EVP_PKEY_RSA) &&
447 (RSA_flags(c->pkeys[i].privatekey->pkey.rsa) &
448 RSA_METHOD_FLAG_NO_CHECK))
449 ok=1;
450 else
451#endif
452 {
453 if (!X509_check_private_key(x,c->pkeys[i].privatekey))
454 {
455 if ((i == SSL_PKEY_DH_RSA) || (i == SSL_PKEY_DH_DSA))
456 {
457 i=(i == SSL_PKEY_DH_RSA)?
458 SSL_PKEY_DH_DSA:SSL_PKEY_DH_RSA;
459
460 if (c->pkeys[i].privatekey == NULL)
461 ok=1;
462 else
463 {
464 if (!X509_check_private_key(x,
465 c->pkeys[i].privatekey))
466 bad=1;
467 else
468 ok=1;
469 }
470 }
471 else
472 bad=1;
473 }
474 else
475 ok=1;
476 } /* OPENSSL_NO_RSA */
477 }
478 else
479 ok=1;
480
481 EVP_PKEY_free(pkey);
482 if (bad)
483 {
484 EVP_PKEY_free(c->pkeys[i].privatekey);
485 c->pkeys[i].privatekey=NULL;
486 }
487
488 if (c->pkeys[i].x509 != NULL)
489 X509_free(c->pkeys[i].x509);
490 CRYPTO_add(&x->references,1,CRYPTO_LOCK_X509);
491 c->pkeys[i].x509=x;
492 c->key= &(c->pkeys[i]);
493
494 c->valid=0;
495 return(1);
496 }
497
498#ifndef OPENSSL_NO_STDIO
499int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
500 {
501 int j;
502 BIO *in;
503 int ret=0;
504 X509 *x=NULL;
505
506 in=BIO_new(BIO_s_file_internal());
507 if (in == NULL)
508 {
509 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,ERR_R_BUF_LIB);
510 goto end;
511 }
512
513 if (BIO_read_filename(in,file) <= 0)
514 {
515 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,ERR_R_SYS_LIB);
516 goto end;
517 }
518 if (type == SSL_FILETYPE_ASN1)
519 {
520 j=ERR_R_ASN1_LIB;
521 x=d2i_X509_bio(in,NULL);
522 }
523 else if (type == SSL_FILETYPE_PEM)
524 {
525 j=ERR_R_PEM_LIB;
526 x=PEM_read_bio_X509(in,NULL,ctx->default_passwd_callback,ctx->default_passwd_callback_userdata);
527 }
528 else
529 {
530 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,SSL_R_BAD_SSL_FILETYPE);
531 goto end;
532 }
533
534 if (x == NULL)
535 {
536 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,j);
537 goto end;
538 }
539
540 ret=SSL_CTX_use_certificate(ctx,x);
541end:
542 if (x != NULL) X509_free(x);
543 if (in != NULL) BIO_free(in);
544 return(ret);
545 }
546#endif
547
548int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d)
549 {
550 X509 *x;
551 int ret;
552
553 x=d2i_X509(NULL,&d,(long)len);
554 if (x == NULL)
555 {
556 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1,ERR_R_ASN1_LIB);
557 return(0);
558 }
559
560 ret=SSL_CTX_use_certificate(ctx,x);
561 X509_free(x);
562 return(ret);
563 }
564
565#ifndef OPENSSL_NO_RSA
566int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa)
567 {
568 int ret;
569 EVP_PKEY *pkey;
570
571 if (rsa == NULL)
572 {
573 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY,ERR_R_PASSED_NULL_PARAMETER);
574 return(0);
575 }
576 if (!ssl_cert_inst(&ctx->cert))
577 {
578 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE);
579 return(0);
580 }
581 if ((pkey=EVP_PKEY_new()) == NULL)
582 {
583 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY,ERR_R_EVP_LIB);
584 return(0);
585 }
586
587 RSA_up_ref(rsa);
588 EVP_PKEY_assign_RSA(pkey,rsa);
589
590 ret=ssl_set_pkey(ctx->cert, pkey);
591 EVP_PKEY_free(pkey);
592 return(ret);
593 }
594
595#ifndef OPENSSL_NO_STDIO
596int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type)
597 {
598 int j,ret=0;
599 BIO *in;
600 RSA *rsa=NULL;
601
602 in=BIO_new(BIO_s_file_internal());
603 if (in == NULL)
604 {
605 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,ERR_R_BUF_LIB);
606 goto end;
607 }
608
609 if (BIO_read_filename(in,file) <= 0)
610 {
611 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,ERR_R_SYS_LIB);
612 goto end;
613 }
614 if (type == SSL_FILETYPE_ASN1)
615 {
616 j=ERR_R_ASN1_LIB;
617 rsa=d2i_RSAPrivateKey_bio(in,NULL);
618 }
619 else if (type == SSL_FILETYPE_PEM)
620 {
621 j=ERR_R_PEM_LIB;
622 rsa=PEM_read_bio_RSAPrivateKey(in,NULL,
623 ctx->default_passwd_callback,ctx->default_passwd_callback_userdata);
624 }
625 else
626 {
627 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,SSL_R_BAD_SSL_FILETYPE);
628 goto end;
629 }
630 if (rsa == NULL)
631 {
632 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,j);
633 goto end;
634 }
635 ret=SSL_CTX_use_RSAPrivateKey(ctx,rsa);
636 RSA_free(rsa);
637end:
638 if (in != NULL) BIO_free(in);
639 return(ret);
640 }
641#endif
642
643int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len)
644 {
645 int ret;
646 const unsigned char *p;
647 RSA *rsa;
648
649 p=d;
650 if ((rsa=d2i_RSAPrivateKey(NULL,&p,(long)len)) == NULL)
651 {
652 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1,ERR_R_ASN1_LIB);
653 return(0);
654 }
655
656 ret=SSL_CTX_use_RSAPrivateKey(ctx,rsa);
657 RSA_free(rsa);
658 return(ret);
659 }
660#endif /* !OPENSSL_NO_RSA */
661
662int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey)
663 {
664 if (pkey == NULL)
665 {
666 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY,ERR_R_PASSED_NULL_PARAMETER);
667 return(0);
668 }
669 if (!ssl_cert_inst(&ctx->cert))
670 {
671 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY,ERR_R_MALLOC_FAILURE);
672 return(0);
673 }
674 return(ssl_set_pkey(ctx->cert,pkey));
675 }
676
677#ifndef OPENSSL_NO_STDIO
678int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
679 {
680 int j,ret=0;
681 BIO *in;
682 EVP_PKEY *pkey=NULL;
683
684 in=BIO_new(BIO_s_file_internal());
685 if (in == NULL)
686 {
687 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,ERR_R_BUF_LIB);
688 goto end;
689 }
690
691 if (BIO_read_filename(in,file) <= 0)
692 {
693 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,ERR_R_SYS_LIB);
694 goto end;
695 }
696 if (type == SSL_FILETYPE_PEM)
697 {
698 j=ERR_R_PEM_LIB;
699 pkey=PEM_read_bio_PrivateKey(in,NULL,
700 ctx->default_passwd_callback,ctx->default_passwd_callback_userdata);
701 }
702 else
703 {
704 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,SSL_R_BAD_SSL_FILETYPE);
705 goto end;
706 }
707 if (pkey == NULL)
708 {
709 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,j);
710 goto end;
711 }
712 ret=SSL_CTX_use_PrivateKey(ctx,pkey);
713 EVP_PKEY_free(pkey);
714end:
715 if (in != NULL) BIO_free(in);
716 return(ret);
717 }
718#endif
719
720int SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, unsigned char *d,
721 long len)
722 {
723 int ret;
724 unsigned char *p;
725 EVP_PKEY *pkey;
726
727 p=d;
728 if ((pkey=d2i_PrivateKey(type,NULL,&p,(long)len)) == NULL)
729 {
730 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1,ERR_R_ASN1_LIB);
731 return(0);
732 }
733
734 ret=SSL_CTX_use_PrivateKey(ctx,pkey);
735 EVP_PKEY_free(pkey);
736 return(ret);
737 }
738
739
740#ifndef OPENSSL_NO_STDIO
741/* Read a file that contains our certificate in "PEM" format,
742 * possibly followed by a sequence of CA certificates that should be
743 * sent to the peer in the Certificate message.
744 */
745int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
746 {
747 BIO *in;
748 int ret=0;
749 X509 *x=NULL;
750
751 in=BIO_new(BIO_s_file_internal());
752 if (in == NULL)
753 {
754 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE,ERR_R_BUF_LIB);
755 goto end;
756 }
757
758 if (BIO_read_filename(in,file) <= 0)
759 {
760 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE,ERR_R_SYS_LIB);
761 goto end;
762 }
763
764 x=PEM_read_bio_X509(in,NULL,ctx->default_passwd_callback,ctx->default_passwd_callback_userdata);
765 if (x == NULL)
766 {
767 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE,ERR_R_PEM_LIB);
768 goto end;
769 }
770
771 ret=SSL_CTX_use_certificate(ctx,x);
772 if (ERR_peek_error() != 0)
773 ret = 0; /* Key/certificate mismatch doesn't imply ret==0 ... */
774 if (ret)
775 {
776 /* If we could set up our certificate, now proceed to
777 * the CA certificates.
778 */
779 X509 *ca;
780 int r;
781 unsigned long err;
782
783 if (ctx->extra_certs != NULL)
784 {
785 sk_X509_pop_free(ctx->extra_certs, X509_free);
786 ctx->extra_certs = NULL;
787 }
788
789 while ((ca = PEM_read_bio_X509(in,NULL,ctx->default_passwd_callback,ctx->default_passwd_callback_userdata))
790 != NULL)
791 {
792 r = SSL_CTX_add_extra_chain_cert(ctx, ca);
793 if (!r)
794 {
795 X509_free(ca);
796 ret = 0;
797 goto end;
798 }
799 /* Note that we must not free r if it was successfully
800 * added to the chain (while we must free the main
801 * certificate, since its reference count is increased
802 * by SSL_CTX_use_certificate). */
803 }
804 /* When the while loop ends, it's usually just EOF. */
805 err = ERR_peek_last_error();
806 if (ERR_GET_LIB(err) == ERR_LIB_PEM && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
807 (void)ERR_get_error();
808 else
809 ret = 0; /* some real error */
810 }
811
812end:
813 if (x != NULL) X509_free(x);
814 if (in != NULL) BIO_free(in);
815 return(ret);
816 }
817#endif
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
new file mode 100644
index 0000000000..7016c87d3b
--- /dev/null
+++ b/src/lib/libssl/ssl_sess.c
@@ -0,0 +1,754 @@
1/* ssl/ssl_sess.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 <openssl/lhash.h>
61#include <openssl/rand.h>
62#include "ssl_locl.h"
63
64static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
65static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s);
66static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck);
67
68SSL_SESSION *SSL_get_session(SSL *ssl)
69/* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */
70 {
71 return(ssl->session);
72 }
73
74SSL_SESSION *SSL_get1_session(SSL *ssl)
75/* variant of SSL_get_session: caller really gets something */
76 {
77 SSL_SESSION *sess;
78 /* Need to lock this all up rather than just use CRYPTO_add so that
79 * somebody doesn't free ssl->session between when we check it's
80 * non-null and when we up the reference count. */
81 CRYPTO_w_lock(CRYPTO_LOCK_SSL_SESSION);
82 sess = ssl->session;
83 if(sess)
84 sess->references++;
85 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_SESSION);
86 return(sess);
87 }
88
89int SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
90 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
91 {
92 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_SESSION, argl, argp,
93 new_func, dup_func, free_func);
94 }
95
96int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg)
97 {
98 return(CRYPTO_set_ex_data(&s->ex_data,idx,arg));
99 }
100
101void *SSL_SESSION_get_ex_data(SSL_SESSION *s, int idx)
102 {
103 return(CRYPTO_get_ex_data(&s->ex_data,idx));
104 }
105
106SSL_SESSION *SSL_SESSION_new(void)
107 {
108 SSL_SESSION *ss;
109
110 ss=(SSL_SESSION *)OPENSSL_malloc(sizeof(SSL_SESSION));
111 if (ss == NULL)
112 {
113 SSLerr(SSL_F_SSL_SESSION_NEW,ERR_R_MALLOC_FAILURE);
114 return(0);
115 }
116 memset(ss,0,sizeof(SSL_SESSION));
117
118 ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */
119 ss->references=1;
120 ss->timeout=60*5+4; /* 5 minute timeout by default */
121 ss->time=time(NULL);
122 ss->prev=NULL;
123 ss->next=NULL;
124 ss->compress_meth=0;
125 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data);
126 return(ss);
127 }
128
129/* Even with SSLv2, we have 16 bytes (128 bits) of session ID space. SSLv3/TLSv1
130 * has 32 bytes (256 bits). As such, filling the ID with random gunk repeatedly
131 * until we have no conflict is going to complete in one iteration pretty much
132 * "most" of the time (btw: understatement). So, if it takes us 10 iterations
133 * and we still can't avoid a conflict - well that's a reasonable point to call
134 * it quits. Either the RAND code is broken or someone is trying to open roughly
135 * very close to 2^128 (or 2^256) SSL sessions to our server. How you might
136 * store that many sessions is perhaps a more interesting question ... */
137
138#define MAX_SESS_ID_ATTEMPTS 10
139static int def_generate_session_id(const SSL *ssl, unsigned char *id,
140 unsigned int *id_len)
141{
142 unsigned int retry = 0;
143 do
144 RAND_pseudo_bytes(id, *id_len);
145 while(SSL_has_matching_session_id(ssl, id, *id_len) &&
146 (++retry < MAX_SESS_ID_ATTEMPTS));
147 if(retry < MAX_SESS_ID_ATTEMPTS)
148 return 1;
149 /* else - woops a session_id match */
150 /* XXX We should also check the external cache --
151 * but the probability of a collision is negligible, and
152 * we could not prevent the concurrent creation of sessions
153 * with identical IDs since we currently don't have means
154 * to atomically check whether a session ID already exists
155 * and make a reservation for it if it does not
156 * (this problem applies to the internal cache as well).
157 */
158 return 0;
159}
160
161int ssl_get_new_session(SSL *s, int session)
162 {
163 /* This gets used by clients and servers. */
164
165 unsigned int tmp;
166 SSL_SESSION *ss=NULL;
167 GEN_SESSION_CB cb = def_generate_session_id;
168
169 if ((ss=SSL_SESSION_new()) == NULL) return(0);
170
171 /* If the context has a default timeout, use it */
172 if (s->ctx->session_timeout == 0)
173 ss->timeout=SSL_get_default_timeout(s);
174 else
175 ss->timeout=s->ctx->session_timeout;
176
177 if (s->session != NULL)
178 {
179 SSL_SESSION_free(s->session);
180 s->session=NULL;
181 }
182
183 if (session)
184 {
185 if (s->version == SSL2_VERSION)
186 {
187 ss->ssl_version=SSL2_VERSION;
188 ss->session_id_length=SSL2_SSL_SESSION_ID_LENGTH;
189 }
190 else if (s->version == SSL3_VERSION)
191 {
192 ss->ssl_version=SSL3_VERSION;
193 ss->session_id_length=SSL3_SSL_SESSION_ID_LENGTH;
194 }
195 else if (s->version == TLS1_VERSION)
196 {
197 ss->ssl_version=TLS1_VERSION;
198 ss->session_id_length=SSL3_SSL_SESSION_ID_LENGTH;
199 }
200 else
201 {
202 SSLerr(SSL_F_SSL_GET_NEW_SESSION,SSL_R_UNSUPPORTED_SSL_VERSION);
203 SSL_SESSION_free(ss);
204 return(0);
205 }
206 /* Choose which callback will set the session ID */
207 CRYPTO_r_lock(CRYPTO_LOCK_SSL_CTX);
208 if(s->generate_session_id)
209 cb = s->generate_session_id;
210 else if(s->ctx->generate_session_id)
211 cb = s->ctx->generate_session_id;
212 CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX);
213 /* Choose a session ID */
214 tmp = ss->session_id_length;
215 if(!cb(s, ss->session_id, &tmp))
216 {
217 /* The callback failed */
218 SSLerr(SSL_F_SSL_GET_NEW_SESSION,
219 SSL_R_SSL_SESSION_ID_CALLBACK_FAILED);
220 SSL_SESSION_free(ss);
221 return(0);
222 }
223 /* Don't allow the callback to set the session length to zero.
224 * nor set it higher than it was. */
225 if(!tmp || (tmp > ss->session_id_length))
226 {
227 /* The callback set an illegal length */
228 SSLerr(SSL_F_SSL_GET_NEW_SESSION,
229 SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH);
230 SSL_SESSION_free(ss);
231 return(0);
232 }
233 /* If the session length was shrunk and we're SSLv2, pad it */
234 if((tmp < ss->session_id_length) && (s->version == SSL2_VERSION))
235 memset(ss->session_id + tmp, 0, ss->session_id_length - tmp);
236 else
237 ss->session_id_length = tmp;
238 /* Finally, check for a conflict */
239 if(SSL_has_matching_session_id(s, ss->session_id,
240 ss->session_id_length))
241 {
242 SSLerr(SSL_F_SSL_GET_NEW_SESSION,
243 SSL_R_SSL_SESSION_ID_CONFLICT);
244 SSL_SESSION_free(ss);
245 return(0);
246 }
247 }
248 else
249 {
250 ss->session_id_length=0;
251 }
252
253 if (s->sid_ctx_length > sizeof ss->sid_ctx)
254 {
255 SSLerr(SSL_F_SSL_GET_NEW_SESSION, ERR_R_INTERNAL_ERROR);
256 SSL_SESSION_free(ss);
257 return 0;
258 }
259 memcpy(ss->sid_ctx,s->sid_ctx,s->sid_ctx_length);
260 ss->sid_ctx_length=s->sid_ctx_length;
261 s->session=ss;
262 ss->ssl_version=s->version;
263 ss->verify_result = X509_V_OK;
264
265 return(1);
266 }
267
268int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len)
269 {
270 /* This is used only by servers. */
271
272 SSL_SESSION *ret=NULL,data;
273 int fatal = 0;
274
275 data.ssl_version=s->version;
276 data.session_id_length=len;
277 if (len > SSL_MAX_SSL_SESSION_ID_LENGTH)
278 goto err;
279 memcpy(data.session_id,session_id,len);
280
281 if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP))
282 {
283 CRYPTO_r_lock(CRYPTO_LOCK_SSL_CTX);
284 ret=(SSL_SESSION *)lh_retrieve(s->ctx->sessions,&data);
285 if (ret != NULL)
286 /* don't allow other threads to steal it: */
287 CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION);
288 CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX);
289 }
290
291 if (ret == NULL)
292 {
293 int copy=1;
294
295 s->ctx->stats.sess_miss++;
296 ret=NULL;
297 if (s->ctx->get_session_cb != NULL
298 && (ret=s->ctx->get_session_cb(s,session_id,len,&copy))
299 != NULL)
300 {
301 s->ctx->stats.sess_cb_hit++;
302
303 /* Increment reference count now if the session callback
304 * asks us to do so (note that if the session structures
305 * returned by the callback are shared between threads,
306 * it must handle the reference count itself [i.e. copy == 0],
307 * or things won't be thread-safe). */
308 if (copy)
309 CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION);
310
311 /* Add the externally cached session to the internal
312 * cache as well if and only if we are supposed to. */
313 if(!(s->ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_STORE))
314 /* The following should not return 1, otherwise,
315 * things are very strange */
316 SSL_CTX_add_session(s->ctx,ret);
317 }
318 if (ret == NULL)
319 goto err;
320 }
321
322 /* Now ret is non-NULL, and we own one of its reference counts. */
323
324 if((s->verify_mode&SSL_VERIFY_PEER)
325 && (!s->sid_ctx_length || ret->sid_ctx_length != s->sid_ctx_length
326 || memcmp(ret->sid_ctx,s->sid_ctx,ret->sid_ctx_length)))
327 {
328 /* We've found the session named by the client, but we don't
329 * want to use it in this context. */
330
331 if (s->sid_ctx_length == 0)
332 {
333 /* application should have used SSL[_CTX]_set_session_id_context
334 * -- we could tolerate this and just pretend we never heard
335 * of this session, but then applications could effectively
336 * disable the session cache by accident without anyone noticing */
337
338 SSLerr(SSL_F_SSL_GET_PREV_SESSION,SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED);
339 fatal = 1;
340 goto err;
341 }
342 else
343 {
344#if 0 /* The client cannot always know when a session is not appropriate,
345 * so we shouldn't generate an error message. */
346
347 SSLerr(SSL_F_SSL_GET_PREV_SESSION,SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
348#endif
349 goto err; /* treat like cache miss */
350 }
351 }
352
353 if (ret->cipher == NULL)
354 {
355 unsigned char buf[5],*p;
356 unsigned long l;
357
358 p=buf;
359 l=ret->cipher_id;
360 l2n(l,p);
361 if ((ret->ssl_version>>8) == SSL3_VERSION_MAJOR)
362 ret->cipher=ssl_get_cipher_by_char(s,&(buf[2]));
363 else
364 ret->cipher=ssl_get_cipher_by_char(s,&(buf[1]));
365 if (ret->cipher == NULL)
366 goto err;
367 }
368
369
370#if 0 /* This is way too late. */
371
372 /* If a thread got the session, then 'swaped', and another got
373 * it and then due to a time-out decided to 'OPENSSL_free' it we could
374 * be in trouble. So I'll increment it now, then double decrement
375 * later - am I speaking rubbish?. */
376 CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION);
377#endif
378
379 if ((long)(ret->time+ret->timeout) < (long)time(NULL)) /* timeout */
380 {
381 s->ctx->stats.sess_timeout++;
382 /* remove it from the cache */
383 SSL_CTX_remove_session(s->ctx,ret);
384 goto err;
385 }
386
387 s->ctx->stats.sess_hit++;
388
389 /* ret->time=time(NULL); */ /* rezero timeout? */
390 /* again, just leave the session
391 * if it is the same session, we have just incremented and
392 * then decremented the reference count :-) */
393 if (s->session != NULL)
394 SSL_SESSION_free(s->session);
395 s->session=ret;
396 s->verify_result = s->session->verify_result;
397 return(1);
398
399 err:
400 if (ret != NULL)
401 SSL_SESSION_free(ret);
402 if (fatal)
403 return -1;
404 else
405 return 0;
406 }
407
408int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
409 {
410 int ret=0;
411 SSL_SESSION *s;
412
413 /* add just 1 reference count for the SSL_CTX's session cache
414 * even though it has two ways of access: each session is in a
415 * doubly linked list and an lhash */
416 CRYPTO_add(&c->references,1,CRYPTO_LOCK_SSL_SESSION);
417 /* if session c is in already in cache, we take back the increment later */
418
419 CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
420 s=(SSL_SESSION *)lh_insert(ctx->sessions,c);
421
422 /* s != NULL iff we already had a session with the given PID.
423 * In this case, s == c should hold (then we did not really modify
424 * ctx->sessions), or we're in trouble. */
425 if (s != NULL && s != c)
426 {
427 /* We *are* in trouble ... */
428 SSL_SESSION_list_remove(ctx,s);
429 SSL_SESSION_free(s);
430 /* ... so pretend the other session did not exist in cache
431 * (we cannot handle two SSL_SESSION structures with identical
432 * session ID in the same cache, which could happen e.g. when
433 * two threads concurrently obtain the same session from an external
434 * cache) */
435 s = NULL;
436 }
437
438 /* Put at the head of the queue unless it is already in the cache */
439 if (s == NULL)
440 SSL_SESSION_list_add(ctx,c);
441
442 if (s != NULL)
443 {
444 /* existing cache entry -- decrement previously incremented reference
445 * count because it already takes into account the cache */
446
447 SSL_SESSION_free(s); /* s == c */
448 ret=0;
449 }
450 else
451 {
452 /* new cache entry -- remove old ones if cache has become too large */
453
454 ret=1;
455
456 if (SSL_CTX_sess_get_cache_size(ctx) > 0)
457 {
458 while (SSL_CTX_sess_number(ctx) >
459 SSL_CTX_sess_get_cache_size(ctx))
460 {
461 if (!remove_session_lock(ctx,
462 ctx->session_cache_tail, 0))
463 break;
464 else
465 ctx->stats.sess_cache_full++;
466 }
467 }
468 }
469 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);
470 return(ret);
471 }
472
473int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
474{
475 return remove_session_lock(ctx, c, 1);
476}
477
478static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
479 {
480 SSL_SESSION *r;
481 int ret=0;
482
483 if ((c != NULL) && (c->session_id_length != 0))
484 {
485 if(lck) CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
486 if ((r = (SSL_SESSION *)lh_retrieve(ctx->sessions,c)) == c)
487 {
488 ret=1;
489 r=(SSL_SESSION *)lh_delete(ctx->sessions,c);
490 SSL_SESSION_list_remove(ctx,c);
491 }
492
493 if(lck) CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);
494
495 if (ret)
496 {
497 r->not_resumable=1;
498 if (ctx->remove_session_cb != NULL)
499 ctx->remove_session_cb(ctx,r);
500 SSL_SESSION_free(r);
501 }
502 }
503 else
504 ret=0;
505 return(ret);
506 }
507
508void SSL_SESSION_free(SSL_SESSION *ss)
509 {
510 int i;
511
512 if(ss == NULL)
513 return;
514
515 i=CRYPTO_add(&ss->references,-1,CRYPTO_LOCK_SSL_SESSION);
516#ifdef REF_PRINT
517 REF_PRINT("SSL_SESSION",ss);
518#endif
519 if (i > 0) return;
520#ifdef REF_CHECK
521 if (i < 0)
522 {
523 fprintf(stderr,"SSL_SESSION_free, bad reference count\n");
524 abort(); /* ok */
525 }
526#endif
527
528 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data);
529
530 OPENSSL_cleanse(ss->key_arg,sizeof ss->key_arg);
531 OPENSSL_cleanse(ss->master_key,sizeof ss->master_key);
532 OPENSSL_cleanse(ss->session_id,sizeof ss->session_id);
533 if (ss->sess_cert != NULL) ssl_sess_cert_free(ss->sess_cert);
534 if (ss->peer != NULL) X509_free(ss->peer);
535 if (ss->ciphers != NULL) sk_SSL_CIPHER_free(ss->ciphers);
536 OPENSSL_cleanse(ss,sizeof(*ss));
537 OPENSSL_free(ss);
538 }
539
540int SSL_set_session(SSL *s, SSL_SESSION *session)
541 {
542 int ret=0;
543 SSL_METHOD *meth;
544
545 if (session != NULL)
546 {
547 meth=s->ctx->method->get_ssl_method(session->ssl_version);
548 if (meth == NULL)
549 meth=s->method->get_ssl_method(session->ssl_version);
550 if (meth == NULL)
551 {
552 SSLerr(SSL_F_SSL_SET_SESSION,SSL_R_UNABLE_TO_FIND_SSL_METHOD);
553 return(0);
554 }
555
556 if (meth != s->method)
557 {
558 if (!SSL_set_ssl_method(s,meth))
559 return(0);
560 if (s->ctx->session_timeout == 0)
561 session->timeout=SSL_get_default_timeout(s);
562 else
563 session->timeout=s->ctx->session_timeout;
564 }
565
566#ifndef OPENSSL_NO_KRB5
567 if (s->kssl_ctx && !s->kssl_ctx->client_princ &&
568 session->krb5_client_princ_len > 0)
569 {
570 s->kssl_ctx->client_princ = (char *)malloc(session->krb5_client_princ_len + 1);
571 memcpy(s->kssl_ctx->client_princ,session->krb5_client_princ,
572 session->krb5_client_princ_len);
573 s->kssl_ctx->client_princ[session->krb5_client_princ_len] = '\0';
574 }
575#endif /* OPENSSL_NO_KRB5 */
576
577 /* CRYPTO_w_lock(CRYPTO_LOCK_SSL);*/
578 CRYPTO_add(&session->references,1,CRYPTO_LOCK_SSL_SESSION);
579 if (s->session != NULL)
580 SSL_SESSION_free(s->session);
581 s->session=session;
582 s->verify_result = s->session->verify_result;
583 /* CRYPTO_w_unlock(CRYPTO_LOCK_SSL);*/
584 ret=1;
585 }
586 else
587 {
588 if (s->session != NULL)
589 {
590 SSL_SESSION_free(s->session);
591 s->session=NULL;
592 }
593
594 meth=s->ctx->method;
595 if (meth != s->method)
596 {
597 if (!SSL_set_ssl_method(s,meth))
598 return(0);
599 }
600 ret=1;
601 }
602 return(ret);
603 }
604
605long SSL_SESSION_set_timeout(SSL_SESSION *s, long t)
606 {
607 if (s == NULL) return(0);
608 s->timeout=t;
609 return(1);
610 }
611
612long SSL_SESSION_get_timeout(SSL_SESSION *s)
613 {
614 if (s == NULL) return(0);
615 return(s->timeout);
616 }
617
618long SSL_SESSION_get_time(SSL_SESSION *s)
619 {
620 if (s == NULL) return(0);
621 return(s->time);
622 }
623
624long SSL_SESSION_set_time(SSL_SESSION *s, long t)
625 {
626 if (s == NULL) return(0);
627 s->time=t;
628 return(t);
629 }
630
631long SSL_CTX_set_timeout(SSL_CTX *s, long t)
632 {
633 long l;
634 if (s == NULL) return(0);
635 l=s->session_timeout;
636 s->session_timeout=t;
637 return(l);
638 }
639
640long SSL_CTX_get_timeout(SSL_CTX *s)
641 {
642 if (s == NULL) return(0);
643 return(s->session_timeout);
644 }
645
646typedef struct timeout_param_st
647 {
648 SSL_CTX *ctx;
649 long time;
650 LHASH *cache;
651 } TIMEOUT_PARAM;
652
653static void timeout(SSL_SESSION *s, TIMEOUT_PARAM *p)
654 {
655 if ((p->time == 0) || (p->time > (s->time+s->timeout))) /* timeout */
656 {
657 /* The reason we don't call SSL_CTX_remove_session() is to
658 * save on locking overhead */
659 lh_delete(p->cache,s);
660 SSL_SESSION_list_remove(p->ctx,s);
661 s->not_resumable=1;
662 if (p->ctx->remove_session_cb != NULL)
663 p->ctx->remove_session_cb(p->ctx,s);
664 SSL_SESSION_free(s);
665 }
666 }
667
668static IMPLEMENT_LHASH_DOALL_ARG_FN(timeout, SSL_SESSION *, TIMEOUT_PARAM *)
669
670void SSL_CTX_flush_sessions(SSL_CTX *s, long t)
671 {
672 unsigned long i;
673 TIMEOUT_PARAM tp;
674
675 tp.ctx=s;
676 tp.cache=s->sessions;
677 if (tp.cache == NULL) return;
678 tp.time=t;
679 CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
680 i=tp.cache->down_load;
681 tp.cache->down_load=0;
682 lh_doall_arg(tp.cache, LHASH_DOALL_ARG_FN(timeout), &tp);
683 tp.cache->down_load=i;
684 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);
685 }
686
687int ssl_clear_bad_session(SSL *s)
688 {
689 if ( (s->session != NULL) &&
690 !(s->shutdown & SSL_SENT_SHUTDOWN) &&
691 !(SSL_in_init(s) || SSL_in_before(s)))
692 {
693 SSL_CTX_remove_session(s->ctx,s->session);
694 return(1);
695 }
696 else
697 return(0);
698 }
699
700/* locked by SSL_CTX in the calling function */
701static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s)
702 {
703 if ((s->next == NULL) || (s->prev == NULL)) return;
704
705 if (s->next == (SSL_SESSION *)&(ctx->session_cache_tail))
706 { /* last element in list */
707 if (s->prev == (SSL_SESSION *)&(ctx->session_cache_head))
708 { /* only one element in list */
709 ctx->session_cache_head=NULL;
710 ctx->session_cache_tail=NULL;
711 }
712 else
713 {
714 ctx->session_cache_tail=s->prev;
715 s->prev->next=(SSL_SESSION *)&(ctx->session_cache_tail);
716 }
717 }
718 else
719 {
720 if (s->prev == (SSL_SESSION *)&(ctx->session_cache_head))
721 { /* first element in list */
722 ctx->session_cache_head=s->next;
723 s->next->prev=(SSL_SESSION *)&(ctx->session_cache_head);
724 }
725 else
726 { /* middle of list */
727 s->next->prev=s->prev;
728 s->prev->next=s->next;
729 }
730 }
731 s->prev=s->next=NULL;
732 }
733
734static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s)
735 {
736 if ((s->next != NULL) && (s->prev != NULL))
737 SSL_SESSION_list_remove(ctx,s);
738
739 if (ctx->session_cache_head == NULL)
740 {
741 ctx->session_cache_head=s;
742 ctx->session_cache_tail=s;
743 s->prev=(SSL_SESSION *)&(ctx->session_cache_head);
744 s->next=(SSL_SESSION *)&(ctx->session_cache_tail);
745 }
746 else
747 {
748 s->next=ctx->session_cache_head;
749 s->next->prev=s;
750 s->prev=(SSL_SESSION *)&(ctx->session_cache_head);
751 ctx->session_cache_head=s;
752 }
753 }
754
diff --git a/src/lib/libssl/ssl_stat.c b/src/lib/libssl/ssl_stat.c
new file mode 100644
index 0000000000..b16d253081
--- /dev/null
+++ b/src/lib/libssl/ssl_stat.c
@@ -0,0 +1,502 @@
1/* ssl/ssl_stat.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 "ssl_locl.h"
61
62const char *SSL_state_string_long(const SSL *s)
63 {
64 const char *str;
65
66 switch (s->state)
67 {
68case SSL_ST_BEFORE: str="before SSL initialization"; break;
69case SSL_ST_ACCEPT: str="before accept initialization"; break;
70case SSL_ST_CONNECT: str="before connect initialization"; break;
71case SSL_ST_OK: str="SSL negotiation finished successfully"; break;
72case SSL_ST_RENEGOTIATE: str="SSL renegotiate ciphers"; break;
73case SSL_ST_BEFORE|SSL_ST_CONNECT: str="before/connect initialization"; break;
74case SSL_ST_OK|SSL_ST_CONNECT: str="ok/connect SSL initialization"; break;
75case SSL_ST_BEFORE|SSL_ST_ACCEPT: str="before/accept initialization"; break;
76case SSL_ST_OK|SSL_ST_ACCEPT: str="ok/accept SSL initialization"; break;
77#ifndef OPENSSL_NO_SSL2
78case SSL2_ST_CLIENT_START_ENCRYPTION: str="SSLv2 client start encryption"; break;
79case SSL2_ST_SERVER_START_ENCRYPTION: str="SSLv2 server start encryption"; break;
80case SSL2_ST_SEND_CLIENT_HELLO_A: str="SSLv2 write client hello A"; break;
81case SSL2_ST_SEND_CLIENT_HELLO_B: str="SSLv2 write client hello B"; break;
82case SSL2_ST_GET_SERVER_HELLO_A: str="SSLv2 read server hello A"; break;
83case SSL2_ST_GET_SERVER_HELLO_B: str="SSLv2 read server hello B"; break;
84case SSL2_ST_SEND_CLIENT_MASTER_KEY_A: str="SSLv2 write client master key A"; break;
85case SSL2_ST_SEND_CLIENT_MASTER_KEY_B: str="SSLv2 write client master key B"; break;
86case SSL2_ST_SEND_CLIENT_FINISHED_A: str="SSLv2 write client finished A"; break;
87case SSL2_ST_SEND_CLIENT_FINISHED_B: str="SSLv2 write client finished B"; break;
88case SSL2_ST_SEND_CLIENT_CERTIFICATE_A: str="SSLv2 write client certificate A"; break;
89case SSL2_ST_SEND_CLIENT_CERTIFICATE_B: str="SSLv2 write client certificate B"; break;
90case SSL2_ST_SEND_CLIENT_CERTIFICATE_C: str="SSLv2 write client certificate C"; break;
91case SSL2_ST_SEND_CLIENT_CERTIFICATE_D: str="SSLv2 write client certificate D"; break;
92case SSL2_ST_GET_SERVER_VERIFY_A: str="SSLv2 read server verify A"; break;
93case SSL2_ST_GET_SERVER_VERIFY_B: str="SSLv2 read server verify B"; break;
94case SSL2_ST_GET_SERVER_FINISHED_A: str="SSLv2 read server finished A"; break;
95case SSL2_ST_GET_SERVER_FINISHED_B: str="SSLv2 read server finished B"; break;
96case SSL2_ST_GET_CLIENT_HELLO_A: str="SSLv2 read client hello A"; break;
97case SSL2_ST_GET_CLIENT_HELLO_B: str="SSLv2 read client hello B"; break;
98case SSL2_ST_GET_CLIENT_HELLO_C: str="SSLv2 read client hello C"; break;
99case SSL2_ST_SEND_SERVER_HELLO_A: str="SSLv2 write server hello A"; break;
100case SSL2_ST_SEND_SERVER_HELLO_B: str="SSLv2 write server hello B"; break;
101case SSL2_ST_GET_CLIENT_MASTER_KEY_A: str="SSLv2 read client master key A"; break;
102case SSL2_ST_GET_CLIENT_MASTER_KEY_B: str="SSLv2 read client master key B"; break;
103case SSL2_ST_SEND_SERVER_VERIFY_A: str="SSLv2 write server verify A"; break;
104case SSL2_ST_SEND_SERVER_VERIFY_B: str="SSLv2 write server verify B"; break;
105case SSL2_ST_SEND_SERVER_VERIFY_C: str="SSLv2 write server verify C"; break;
106case SSL2_ST_GET_CLIENT_FINISHED_A: str="SSLv2 read client finished A"; break;
107case SSL2_ST_GET_CLIENT_FINISHED_B: str="SSLv2 read client finished B"; break;
108case SSL2_ST_SEND_SERVER_FINISHED_A: str="SSLv2 write server finished A"; break;
109case SSL2_ST_SEND_SERVER_FINISHED_B: str="SSLv2 write server finished B"; break;
110case SSL2_ST_SEND_REQUEST_CERTIFICATE_A: str="SSLv2 write request certificate A"; break;
111case SSL2_ST_SEND_REQUEST_CERTIFICATE_B: str="SSLv2 write request certificate B"; break;
112case SSL2_ST_SEND_REQUEST_CERTIFICATE_C: str="SSLv2 write request certificate C"; break;
113case SSL2_ST_SEND_REQUEST_CERTIFICATE_D: str="SSLv2 write request certificate D"; break;
114case SSL2_ST_X509_GET_SERVER_CERTIFICATE: str="SSLv2 X509 read server certificate"; break;
115case SSL2_ST_X509_GET_CLIENT_CERTIFICATE: str="SSLv2 X509 read client certificate"; break;
116#endif
117
118#ifndef OPENSSL_NO_SSL3
119/* SSLv3 additions */
120case SSL3_ST_CW_CLNT_HELLO_A: str="SSLv3 write client hello A"; break;
121case SSL3_ST_CW_CLNT_HELLO_B: str="SSLv3 write client hello B"; break;
122case SSL3_ST_CR_SRVR_HELLO_A: str="SSLv3 read server hello A"; break;
123case SSL3_ST_CR_SRVR_HELLO_B: str="SSLv3 read server hello B"; break;
124case SSL3_ST_CR_CERT_A: str="SSLv3 read server certificate A"; break;
125case SSL3_ST_CR_CERT_B: str="SSLv3 read server certificate B"; break;
126case SSL3_ST_CR_KEY_EXCH_A: str="SSLv3 read server key exchange A"; break;
127case SSL3_ST_CR_KEY_EXCH_B: str="SSLv3 read server key exchange B"; break;
128case SSL3_ST_CR_CERT_REQ_A: str="SSLv3 read server certificate request A"; break;
129case SSL3_ST_CR_CERT_REQ_B: str="SSLv3 read server certificate request B"; break;
130case SSL3_ST_CR_SRVR_DONE_A: str="SSLv3 read server done A"; break;
131case SSL3_ST_CR_SRVR_DONE_B: str="SSLv3 read server done B"; break;
132case SSL3_ST_CW_CERT_A: str="SSLv3 write client certificate A"; break;
133case SSL3_ST_CW_CERT_B: str="SSLv3 write client certificate B"; break;
134case SSL3_ST_CW_CERT_C: str="SSLv3 write client certificate C"; break;
135case SSL3_ST_CW_CERT_D: str="SSLv3 write client certificate D"; break;
136case SSL3_ST_CW_KEY_EXCH_A: str="SSLv3 write client key exchange A"; break;
137case SSL3_ST_CW_KEY_EXCH_B: str="SSLv3 write client key exchange B"; break;
138case SSL3_ST_CW_CERT_VRFY_A: str="SSLv3 write certificate verify A"; break;
139case SSL3_ST_CW_CERT_VRFY_B: str="SSLv3 write certificate verify B"; break;
140
141case SSL3_ST_CW_CHANGE_A:
142case SSL3_ST_SW_CHANGE_A: str="SSLv3 write change cipher spec A"; break;
143case SSL3_ST_CW_CHANGE_B:
144case SSL3_ST_SW_CHANGE_B: str="SSLv3 write change cipher spec B"; break;
145case SSL3_ST_CW_FINISHED_A:
146case SSL3_ST_SW_FINISHED_A: str="SSLv3 write finished A"; break;
147case SSL3_ST_CW_FINISHED_B:
148case SSL3_ST_SW_FINISHED_B: str="SSLv3 write finished B"; break;
149case SSL3_ST_CR_CHANGE_A:
150case SSL3_ST_SR_CHANGE_A: str="SSLv3 read change cipher spec A"; break;
151case SSL3_ST_CR_CHANGE_B:
152case SSL3_ST_SR_CHANGE_B: str="SSLv3 read change cipher spec B"; break;
153case SSL3_ST_CR_FINISHED_A:
154case SSL3_ST_SR_FINISHED_A: str="SSLv3 read finished A"; break;
155case SSL3_ST_CR_FINISHED_B:
156case SSL3_ST_SR_FINISHED_B: str="SSLv3 read finished B"; break;
157
158case SSL3_ST_CW_FLUSH:
159case SSL3_ST_SW_FLUSH: str="SSLv3 flush data"; break;
160
161case SSL3_ST_SR_CLNT_HELLO_A: str="SSLv3 read client hello A"; break;
162case SSL3_ST_SR_CLNT_HELLO_B: str="SSLv3 read client hello B"; break;
163case SSL3_ST_SR_CLNT_HELLO_C: str="SSLv3 read client hello C"; break;
164case SSL3_ST_SW_HELLO_REQ_A: str="SSLv3 write hello request A"; break;
165case SSL3_ST_SW_HELLO_REQ_B: str="SSLv3 write hello request B"; break;
166case SSL3_ST_SW_HELLO_REQ_C: str="SSLv3 write hello request C"; break;
167case SSL3_ST_SW_SRVR_HELLO_A: str="SSLv3 write server hello A"; break;
168case SSL3_ST_SW_SRVR_HELLO_B: str="SSLv3 write server hello B"; break;
169case SSL3_ST_SW_CERT_A: str="SSLv3 write certificate A"; break;
170case SSL3_ST_SW_CERT_B: str="SSLv3 write certificate B"; break;
171case SSL3_ST_SW_KEY_EXCH_A: str="SSLv3 write key exchange A"; break;
172case SSL3_ST_SW_KEY_EXCH_B: str="SSLv3 write key exchange B"; break;
173case SSL3_ST_SW_CERT_REQ_A: str="SSLv3 write certificate request A"; break;
174case SSL3_ST_SW_CERT_REQ_B: str="SSLv3 write certificate request B"; break;
175case SSL3_ST_SW_SRVR_DONE_A: str="SSLv3 write server done A"; break;
176case SSL3_ST_SW_SRVR_DONE_B: str="SSLv3 write server done B"; break;
177case SSL3_ST_SR_CERT_A: str="SSLv3 read client certificate A"; break;
178case SSL3_ST_SR_CERT_B: str="SSLv3 read client certificate B"; break;
179case SSL3_ST_SR_KEY_EXCH_A: str="SSLv3 read client key exchange A"; break;
180case SSL3_ST_SR_KEY_EXCH_B: str="SSLv3 read client key exchange B"; break;
181case SSL3_ST_SR_CERT_VRFY_A: str="SSLv3 read certificate verify A"; break;
182case SSL3_ST_SR_CERT_VRFY_B: str="SSLv3 read certificate verify B"; break;
183#endif
184
185#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
186/* SSLv2/v3 compatibility states */
187/* client */
188case SSL23_ST_CW_CLNT_HELLO_A: str="SSLv2/v3 write client hello A"; break;
189case SSL23_ST_CW_CLNT_HELLO_B: str="SSLv2/v3 write client hello B"; break;
190case SSL23_ST_CR_SRVR_HELLO_A: str="SSLv2/v3 read server hello A"; break;
191case SSL23_ST_CR_SRVR_HELLO_B: str="SSLv2/v3 read server hello B"; break;
192/* server */
193case SSL23_ST_SR_CLNT_HELLO_A: str="SSLv2/v3 read client hello A"; break;
194case SSL23_ST_SR_CLNT_HELLO_B: str="SSLv2/v3 read client hello B"; break;
195#endif
196
197default: str="unknown state"; break;
198 }
199 return(str);
200 }
201
202const char *SSL_rstate_string_long(const SSL *s)
203 {
204 const char *str;
205
206 switch (s->rstate)
207 {
208 case SSL_ST_READ_HEADER: str="read header"; break;
209 case SSL_ST_READ_BODY: str="read body"; break;
210 case SSL_ST_READ_DONE: str="read done"; break;
211 default: str="unknown"; break;
212 }
213 return(str);
214 }
215
216const char *SSL_state_string(const SSL *s)
217 {
218 const char *str;
219
220 switch (s->state)
221 {
222case SSL_ST_BEFORE: str="PINIT "; break;
223case SSL_ST_ACCEPT: str="AINIT "; break;
224case SSL_ST_CONNECT: str="CINIT "; break;
225case SSL_ST_OK: str="SSLOK "; break;
226#ifndef OPENSSL_NO_SSL2
227case SSL2_ST_CLIENT_START_ENCRYPTION: str="2CSENC"; break;
228case SSL2_ST_SERVER_START_ENCRYPTION: str="2SSENC"; break;
229case SSL2_ST_SEND_CLIENT_HELLO_A: str="2SCH_A"; break;
230case SSL2_ST_SEND_CLIENT_HELLO_B: str="2SCH_B"; break;
231case SSL2_ST_GET_SERVER_HELLO_A: str="2GSH_A"; break;
232case SSL2_ST_GET_SERVER_HELLO_B: str="2GSH_B"; break;
233case SSL2_ST_SEND_CLIENT_MASTER_KEY_A: str="2SCMKA"; break;
234case SSL2_ST_SEND_CLIENT_MASTER_KEY_B: str="2SCMKB"; break;
235case SSL2_ST_SEND_CLIENT_FINISHED_A: str="2SCF_A"; break;
236case SSL2_ST_SEND_CLIENT_FINISHED_B: str="2SCF_B"; break;
237case SSL2_ST_SEND_CLIENT_CERTIFICATE_A: str="2SCC_A"; break;
238case SSL2_ST_SEND_CLIENT_CERTIFICATE_B: str="2SCC_B"; break;
239case SSL2_ST_SEND_CLIENT_CERTIFICATE_C: str="2SCC_C"; break;
240case SSL2_ST_SEND_CLIENT_CERTIFICATE_D: str="2SCC_D"; break;
241case SSL2_ST_GET_SERVER_VERIFY_A: str="2GSV_A"; break;
242case SSL2_ST_GET_SERVER_VERIFY_B: str="2GSV_B"; break;
243case SSL2_ST_GET_SERVER_FINISHED_A: str="2GSF_A"; break;
244case SSL2_ST_GET_SERVER_FINISHED_B: str="2GSF_B"; break;
245case SSL2_ST_GET_CLIENT_HELLO_A: str="2GCH_A"; break;
246case SSL2_ST_GET_CLIENT_HELLO_B: str="2GCH_B"; break;
247case SSL2_ST_GET_CLIENT_HELLO_C: str="2GCH_C"; break;
248case SSL2_ST_SEND_SERVER_HELLO_A: str="2SSH_A"; break;
249case SSL2_ST_SEND_SERVER_HELLO_B: str="2SSH_B"; break;
250case SSL2_ST_GET_CLIENT_MASTER_KEY_A: str="2GCMKA"; break;
251case SSL2_ST_GET_CLIENT_MASTER_KEY_B: str="2GCMKA"; break;
252case SSL2_ST_SEND_SERVER_VERIFY_A: str="2SSV_A"; break;
253case SSL2_ST_SEND_SERVER_VERIFY_B: str="2SSV_B"; break;
254case SSL2_ST_SEND_SERVER_VERIFY_C: str="2SSV_C"; break;
255case SSL2_ST_GET_CLIENT_FINISHED_A: str="2GCF_A"; break;
256case SSL2_ST_GET_CLIENT_FINISHED_B: str="2GCF_B"; break;
257case SSL2_ST_SEND_SERVER_FINISHED_A: str="2SSF_A"; break;
258case SSL2_ST_SEND_SERVER_FINISHED_B: str="2SSF_B"; break;
259case SSL2_ST_SEND_REQUEST_CERTIFICATE_A: str="2SRC_A"; break;
260case SSL2_ST_SEND_REQUEST_CERTIFICATE_B: str="2SRC_B"; break;
261case SSL2_ST_SEND_REQUEST_CERTIFICATE_C: str="2SRC_C"; break;
262case SSL2_ST_SEND_REQUEST_CERTIFICATE_D: str="2SRC_D"; break;
263case SSL2_ST_X509_GET_SERVER_CERTIFICATE: str="2X9GSC"; break;
264case SSL2_ST_X509_GET_CLIENT_CERTIFICATE: str="2X9GCC"; break;
265#endif
266
267#ifndef OPENSSL_NO_SSL3
268/* SSLv3 additions */
269case SSL3_ST_SW_FLUSH:
270case SSL3_ST_CW_FLUSH: str="3FLUSH"; break;
271case SSL3_ST_CW_CLNT_HELLO_A: str="3WCH_A"; break;
272case SSL3_ST_CW_CLNT_HELLO_B: str="3WCH_B"; break;
273case SSL3_ST_CR_SRVR_HELLO_A: str="3RSH_A"; break;
274case SSL3_ST_CR_SRVR_HELLO_B: str="3RSH_B"; break;
275case SSL3_ST_CR_CERT_A: str="3RSC_A"; break;
276case SSL3_ST_CR_CERT_B: str="3RSC_B"; break;
277case SSL3_ST_CR_KEY_EXCH_A: str="3RSKEA"; break;
278case SSL3_ST_CR_KEY_EXCH_B: str="3RSKEB"; break;
279case SSL3_ST_CR_CERT_REQ_A: str="3RCR_A"; break;
280case SSL3_ST_CR_CERT_REQ_B: str="3RCR_B"; break;
281case SSL3_ST_CR_SRVR_DONE_A: str="3RSD_A"; break;
282case SSL3_ST_CR_SRVR_DONE_B: str="3RSD_B"; break;
283case SSL3_ST_CW_CERT_A: str="3WCC_A"; break;
284case SSL3_ST_CW_CERT_B: str="3WCC_B"; break;
285case SSL3_ST_CW_CERT_C: str="3WCC_C"; break;
286case SSL3_ST_CW_CERT_D: str="3WCC_D"; break;
287case SSL3_ST_CW_KEY_EXCH_A: str="3WCKEA"; break;
288case SSL3_ST_CW_KEY_EXCH_B: str="3WCKEB"; break;
289case SSL3_ST_CW_CERT_VRFY_A: str="3WCV_A"; break;
290case SSL3_ST_CW_CERT_VRFY_B: str="3WCV_B"; break;
291
292case SSL3_ST_SW_CHANGE_A:
293case SSL3_ST_CW_CHANGE_A: str="3WCCSA"; break;
294case SSL3_ST_SW_CHANGE_B:
295case SSL3_ST_CW_CHANGE_B: str="3WCCSB"; break;
296case SSL3_ST_SW_FINISHED_A:
297case SSL3_ST_CW_FINISHED_A: str="3WFINA"; break;
298case SSL3_ST_SW_FINISHED_B:
299case SSL3_ST_CW_FINISHED_B: str="3WFINB"; break;
300case SSL3_ST_SR_CHANGE_A:
301case SSL3_ST_CR_CHANGE_A: str="3RCCSA"; break;
302case SSL3_ST_SR_CHANGE_B:
303case SSL3_ST_CR_CHANGE_B: str="3RCCSB"; break;
304case SSL3_ST_SR_FINISHED_A:
305case SSL3_ST_CR_FINISHED_A: str="3RFINA"; break;
306case SSL3_ST_SR_FINISHED_B:
307case SSL3_ST_CR_FINISHED_B: str="3RFINB"; break;
308
309case SSL3_ST_SW_HELLO_REQ_A: str="3WHR_A"; break;
310case SSL3_ST_SW_HELLO_REQ_B: str="3WHR_B"; break;
311case SSL3_ST_SW_HELLO_REQ_C: str="3WHR_C"; break;
312case SSL3_ST_SR_CLNT_HELLO_A: str="3RCH_A"; break;
313case SSL3_ST_SR_CLNT_HELLO_B: str="3RCH_B"; break;
314case SSL3_ST_SR_CLNT_HELLO_C: str="3RCH_C"; break;
315case SSL3_ST_SW_SRVR_HELLO_A: str="3WSH_A"; break;
316case SSL3_ST_SW_SRVR_HELLO_B: str="3WSH_B"; break;
317case SSL3_ST_SW_CERT_A: str="3WSC_A"; break;
318case SSL3_ST_SW_CERT_B: str="3WSC_B"; break;
319case SSL3_ST_SW_KEY_EXCH_A: str="3WSKEA"; break;
320case SSL3_ST_SW_KEY_EXCH_B: str="3WSKEB"; break;
321case SSL3_ST_SW_CERT_REQ_A: str="3WCR_A"; break;
322case SSL3_ST_SW_CERT_REQ_B: str="3WCR_B"; break;
323case SSL3_ST_SW_SRVR_DONE_A: str="3WSD_A"; break;
324case SSL3_ST_SW_SRVR_DONE_B: str="3WSD_B"; break;
325case SSL3_ST_SR_CERT_A: str="3RCC_A"; break;
326case SSL3_ST_SR_CERT_B: str="3RCC_B"; break;
327case SSL3_ST_SR_KEY_EXCH_A: str="3RCKEA"; break;
328case SSL3_ST_SR_KEY_EXCH_B: str="3RCKEB"; break;
329case SSL3_ST_SR_CERT_VRFY_A: str="3RCV_A"; break;
330case SSL3_ST_SR_CERT_VRFY_B: str="3RCV_B"; break;
331#endif
332
333#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
334/* SSLv2/v3 compatibility states */
335/* client */
336case SSL23_ST_CW_CLNT_HELLO_A: str="23WCHA"; break;
337case SSL23_ST_CW_CLNT_HELLO_B: str="23WCHB"; break;
338case SSL23_ST_CR_SRVR_HELLO_A: str="23RSHA"; break;
339case SSL23_ST_CR_SRVR_HELLO_B: str="23RSHA"; break;
340/* server */
341case SSL23_ST_SR_CLNT_HELLO_A: str="23RCHA"; break;
342case SSL23_ST_SR_CLNT_HELLO_B: str="23RCHB"; break;
343#endif
344
345default: str="UNKWN "; break;
346 }
347 return(str);
348 }
349
350const char *SSL_alert_type_string_long(int value)
351 {
352 value>>=8;
353 if (value == SSL3_AL_WARNING)
354 return("warning");
355 else if (value == SSL3_AL_FATAL)
356 return("fatal");
357 else
358 return("unknown");
359 }
360
361const char *SSL_alert_type_string(int value)
362 {
363 value>>=8;
364 if (value == SSL3_AL_WARNING)
365 return("W");
366 else if (value == SSL3_AL_FATAL)
367 return("F");
368 else
369 return("U");
370 }
371
372const char *SSL_alert_desc_string(int value)
373 {
374 const char *str;
375
376 switch (value & 0xff)
377 {
378 case SSL3_AD_CLOSE_NOTIFY: str="CN"; break;
379 case SSL3_AD_UNEXPECTED_MESSAGE: str="UM"; break;
380 case SSL3_AD_BAD_RECORD_MAC: str="BM"; break;
381 case SSL3_AD_DECOMPRESSION_FAILURE: str="DF"; break;
382 case SSL3_AD_HANDSHAKE_FAILURE: str="HF"; break;
383 case SSL3_AD_NO_CERTIFICATE: str="NC"; break;
384 case SSL3_AD_BAD_CERTIFICATE: str="BC"; break;
385 case SSL3_AD_UNSUPPORTED_CERTIFICATE: str="UC"; break;
386 case SSL3_AD_CERTIFICATE_REVOKED: str="CR"; break;
387 case SSL3_AD_CERTIFICATE_EXPIRED: str="CE"; break;
388 case SSL3_AD_CERTIFICATE_UNKNOWN: str="CU"; break;
389 case SSL3_AD_ILLEGAL_PARAMETER: str="IP"; break;
390 case TLS1_AD_DECRYPTION_FAILED: str="DC"; break;
391 case TLS1_AD_RECORD_OVERFLOW: str="RO"; break;
392 case TLS1_AD_UNKNOWN_CA: str="CA"; break;
393 case TLS1_AD_ACCESS_DENIED: str="AD"; break;
394 case TLS1_AD_DECODE_ERROR: str="DE"; break;
395 case TLS1_AD_DECRYPT_ERROR: str="CY"; break;
396 case TLS1_AD_EXPORT_RESTRICTION: str="ER"; break;
397 case TLS1_AD_PROTOCOL_VERSION: str="PV"; break;
398 case TLS1_AD_INSUFFICIENT_SECURITY: str="IS"; break;
399 case TLS1_AD_INTERNAL_ERROR: str="IE"; break;
400 case TLS1_AD_USER_CANCELLED: str="US"; break;
401 case TLS1_AD_NO_RENEGOTIATION: str="NR"; break;
402 default: str="UK"; break;
403 }
404 return(str);
405 }
406
407const char *SSL_alert_desc_string_long(int value)
408 {
409 const char *str;
410
411 switch (value & 0xff)
412 {
413 case SSL3_AD_CLOSE_NOTIFY:
414 str="close notify";
415 break;
416 case SSL3_AD_UNEXPECTED_MESSAGE:
417 str="unexpected_message";
418 break;
419 case SSL3_AD_BAD_RECORD_MAC:
420 str="bad record mac";
421 break;
422 case SSL3_AD_DECOMPRESSION_FAILURE:
423 str="decompression failure";
424 break;
425 case SSL3_AD_HANDSHAKE_FAILURE:
426 str="handshake failure";
427 break;
428 case SSL3_AD_NO_CERTIFICATE:
429 str="no certificate";
430 break;
431 case SSL3_AD_BAD_CERTIFICATE:
432 str="bad certificate";
433 break;
434 case SSL3_AD_UNSUPPORTED_CERTIFICATE:
435 str="unsupported certificate";
436 break;
437 case SSL3_AD_CERTIFICATE_REVOKED:
438 str="certificate revoked";
439 break;
440 case SSL3_AD_CERTIFICATE_EXPIRED:
441 str="certificate expired";
442 break;
443 case SSL3_AD_CERTIFICATE_UNKNOWN:
444 str="certificate unknown";
445 break;
446 case SSL3_AD_ILLEGAL_PARAMETER:
447 str="illegal parameter";
448 break;
449 case TLS1_AD_DECRYPTION_FAILED:
450 str="decryption failed";
451 break;
452 case TLS1_AD_RECORD_OVERFLOW:
453 str="record overflow";
454 break;
455 case TLS1_AD_UNKNOWN_CA:
456 str="unknown CA";
457 break;
458 case TLS1_AD_ACCESS_DENIED:
459 str="access denied";
460 break;
461 case TLS1_AD_DECODE_ERROR:
462 str="decode error";
463 break;
464 case TLS1_AD_DECRYPT_ERROR:
465 str="decrypt error";
466 break;
467 case TLS1_AD_EXPORT_RESTRICTION:
468 str="export restriction";
469 break;
470 case TLS1_AD_PROTOCOL_VERSION:
471 str="protocol version";
472 break;
473 case TLS1_AD_INSUFFICIENT_SECURITY:
474 str="insufficient security";
475 break;
476 case TLS1_AD_INTERNAL_ERROR:
477 str="internal error";
478 break;
479 case TLS1_AD_USER_CANCELLED:
480 str="user canceled";
481 break;
482 case TLS1_AD_NO_RENEGOTIATION:
483 str="no renegotiation";
484 break;
485 default: str="unknown"; break;
486 }
487 return(str);
488 }
489
490const char *SSL_rstate_string(const SSL *s)
491 {
492 const char *str;
493
494 switch (s->rstate)
495 {
496 case SSL_ST_READ_HEADER:str="RH"; break;
497 case SSL_ST_READ_BODY: str="RB"; break;
498 case SSL_ST_READ_DONE: str="RD"; break;
499 default: str="unknown"; break;
500 }
501 return(str);
502 }
diff --git a/src/lib/libssl/ssl_txt.c b/src/lib/libssl/ssl_txt.c
new file mode 100644
index 0000000000..40b76b1b26
--- /dev/null
+++ b/src/lib/libssl/ssl_txt.c
@@ -0,0 +1,186 @@
1/* ssl/ssl_txt.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 <openssl/buffer.h>
61#include "ssl_locl.h"
62
63#ifndef OPENSSL_NO_FP_API
64int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *x)
65 {
66 BIO *b;
67 int ret;
68
69 if ((b=BIO_new(BIO_s_file_internal())) == NULL)
70 {
71 SSLerr(SSL_F_SSL_SESSION_PRINT_FP,ERR_R_BUF_LIB);
72 return(0);
73 }
74 BIO_set_fp(b,fp,BIO_NOCLOSE);
75 ret=SSL_SESSION_print(b,x);
76 BIO_free(b);
77 return(ret);
78 }
79#endif
80
81int SSL_SESSION_print(BIO *bp, SSL_SESSION *x)
82 {
83 unsigned int i;
84 char *s;
85
86 if (x == NULL) goto err;
87 if (BIO_puts(bp,"SSL-Session:\n") <= 0) goto err;
88 if (x->ssl_version == SSL2_VERSION)
89 s="SSLv2";
90 else if (x->ssl_version == SSL3_VERSION)
91 s="SSLv3";
92 else if (x->ssl_version == TLS1_VERSION)
93 s="TLSv1";
94 else
95 s="unknown";
96 if (BIO_printf(bp," Protocol : %s\n",s) <= 0) goto err;
97
98 if (x->cipher == NULL)
99 {
100 if (((x->cipher_id) & 0xff000000) == 0x02000000)
101 {
102 if (BIO_printf(bp," Cipher : %06lX\n",x->cipher_id&0xffffff) <= 0)
103 goto err;
104 }
105 else
106 {
107 if (BIO_printf(bp," Cipher : %04lX\n",x->cipher_id&0xffff) <= 0)
108 goto err;
109 }
110 }
111 else
112 {
113 if (BIO_printf(bp," Cipher : %s\n",((x->cipher == NULL)?"unknown":x->cipher->name)) <= 0)
114 goto err;
115 }
116 if (BIO_puts(bp," Session-ID: ") <= 0) goto err;
117 for (i=0; i<x->session_id_length; i++)
118 {
119 if (BIO_printf(bp,"%02X",x->session_id[i]) <= 0) goto err;
120 }
121 if (BIO_puts(bp,"\n Session-ID-ctx: ") <= 0) goto err;
122 for (i=0; i<x->sid_ctx_length; i++)
123 {
124 if (BIO_printf(bp,"%02X",x->sid_ctx[i]) <= 0)
125 goto err;
126 }
127 if (BIO_puts(bp,"\n Master-Key: ") <= 0) goto err;
128 for (i=0; i<(unsigned int)x->master_key_length; i++)
129 {
130 if (BIO_printf(bp,"%02X",x->master_key[i]) <= 0) goto err;
131 }
132 if (BIO_puts(bp,"\n Key-Arg : ") <= 0) goto err;
133 if (x->key_arg_length == 0)
134 {
135 if (BIO_puts(bp,"None") <= 0) goto err;
136 }
137 else
138 for (i=0; i<x->key_arg_length; i++)
139 {
140 if (BIO_printf(bp,"%02X",x->key_arg[i]) <= 0) goto err;
141 }
142#ifndef OPENSSL_NO_KRB5
143 if (BIO_puts(bp,"\n Krb5 Principal: ") <= 0) goto err;
144 if (x->krb5_client_princ_len == 0)
145 {
146 if (BIO_puts(bp,"None") <= 0) goto err;
147 }
148 else
149 for (i=0; i<x->krb5_client_princ_len; i++)
150 {
151 if (BIO_printf(bp,"%02X",x->krb5_client_princ[i]) <= 0) goto err;
152 }
153#endif /* OPENSSL_NO_KRB5 */
154 if (x->compress_meth != 0)
155 {
156 SSL_COMP *comp;
157
158 ssl_cipher_get_evp(x,NULL,NULL,&comp);
159 if (comp == NULL)
160 {
161 if (BIO_printf(bp,"\n Compression: %d",x->compress_meth) <= 0) goto err;
162 }
163 else
164 {
165 if (BIO_printf(bp,"\n Compression: %d (%s)", comp->id,comp->method->name) <= 0) goto err;
166 }
167 }
168 if (x->time != 0L)
169 {
170 if (BIO_printf(bp, "\n Start Time: %ld",x->time) <= 0) goto err;
171 }
172 if (x->timeout != 0L)
173 {
174 if (BIO_printf(bp, "\n Timeout : %ld (sec)",x->timeout) <= 0) goto err;
175 }
176 if (BIO_puts(bp,"\n") <= 0) goto err;
177
178 if (BIO_puts(bp, " Verify return code: ") <= 0) goto err;
179 if (BIO_printf(bp, "%ld (%s)\n", x->verify_result,
180 X509_verify_cert_error_string(x->verify_result)) <= 0) goto err;
181
182 return(1);
183err:
184 return(0);
185 }
186
diff --git a/src/lib/libssl/ssleay.cnf b/src/lib/libssl/ssleay.cnf
new file mode 100644
index 0000000000..c6480ee465
--- /dev/null
+++ b/src/lib/libssl/ssleay.cnf
@@ -0,0 +1,65 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5
6RANDFILE = /dev/arandom
7
8####################################################################
9[ req ]
10default_bits = 1024
11default_keyfile = privkey.pem
12distinguished_name = req_distinguished_name
13attributes = req_attributes
14
15[ req_distinguished_name ]
16countryName = Country Name (2 letter code)
17#countryName_default = AU
18countryName_min = 2
19countryName_max = 2
20
21stateOrProvinceName = State or Province Name (full name)
22#stateOrProvinceName_default = Some-State
23
24localityName = Locality Name (eg, city)
25
260.organizationName = Organization Name (eg, company)
27#0.organizationName_default = Internet Widgits Pty Ltd
28
29# we can do this but it is not needed normally :-)
30#1.organizationName = Second Organization Name (eg, company)
31#1.organizationName_default = CryptSoft Pty Ltd
32
33organizationalUnitName = Organizational Unit Name (eg, section)
34#organizationalUnitName_default =
35
36commonName = Common Name (eg, fully qualified host name)
37commonName_max = 64
38
39emailAddress = Email Address
40emailAddress_max = 64
41
42[ req_attributes ]
43challengePassword = A challenge password
44challengePassword_min = 4
45challengePassword_max = 20
46
47unstructuredName = An optional company name
48
49[ x509v3_extensions ]
50
51nsCaRevocationUrl = http://www.cryptsoft.com/ca-crl.pem
52nsComment = "This is a comment"
53
54# under ASN.1, the 0 bit would be encoded as 80
55nsCertType = 0x40
56
57#nsBaseUrl
58#nsRevocationUrl
59#nsRenewalUrl
60#nsCaPolicyUrl
61#nsSslServerName
62#nsCertSequence
63#nsCertExt
64#nsDataType
65
diff --git a/src/lib/libssl/t1_clnt.c b/src/lib/libssl/t1_clnt.c
new file mode 100644
index 0000000000..57205fb429
--- /dev/null
+++ b/src/lib/libssl/t1_clnt.c
@@ -0,0 +1,97 @@
1/* ssl/t1_clnt.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 "ssl_locl.h"
61#include <openssl/buffer.h>
62#include <openssl/rand.h>
63#include <openssl/objects.h>
64#include <openssl/evp.h>
65
66static SSL_METHOD *tls1_get_client_method(int ver);
67static SSL_METHOD *tls1_get_client_method(int ver)
68 {
69 if (ver == TLS1_VERSION)
70 return(TLSv1_client_method());
71 else
72 return(NULL);
73 }
74
75SSL_METHOD *TLSv1_client_method(void)
76 {
77 static int init=1;
78 static SSL_METHOD TLSv1_client_data;
79
80 if (init)
81 {
82 CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
83
84 if (init)
85 {
86 memcpy((char *)&TLSv1_client_data,(char *)tlsv1_base_method(),
87 sizeof(SSL_METHOD));
88 TLSv1_client_data.ssl_connect=ssl3_connect;
89 TLSv1_client_data.get_ssl_method=tls1_get_client_method;
90 init=0;
91 }
92
93 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
94 }
95 return(&TLSv1_client_data);
96 }
97
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c
new file mode 100644
index 0000000000..271e247eea
--- /dev/null
+++ b/src/lib/libssl/t1_enc.c
@@ -0,0 +1,814 @@
1/* ssl/t1_enc.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-2002 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 <stdio.h>
113#include "ssl_locl.h"
114#include <openssl/comp.h>
115#include <openssl/evp.h>
116#include <openssl/hmac.h>
117#include <openssl/md5.h>
118
119static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
120 int sec_len, unsigned char *seed, int seed_len,
121 unsigned char *out, int olen)
122 {
123 int chunk,n;
124 unsigned int j;
125 HMAC_CTX ctx;
126 HMAC_CTX ctx_tmp;
127 unsigned char A1[EVP_MAX_MD_SIZE];
128 unsigned int A1_len;
129
130 chunk=EVP_MD_size(md);
131
132 HMAC_CTX_init(&ctx);
133 HMAC_CTX_init(&ctx_tmp);
134 HMAC_Init_ex(&ctx,sec,sec_len,md, NULL);
135 HMAC_Init_ex(&ctx_tmp,sec,sec_len,md, NULL);
136 HMAC_Update(&ctx,seed,seed_len);
137 HMAC_Final(&ctx,A1,&A1_len);
138
139 n=0;
140 for (;;)
141 {
142 HMAC_Init_ex(&ctx,NULL,0,NULL,NULL); /* re-init */
143 HMAC_Init_ex(&ctx_tmp,NULL,0,NULL,NULL); /* re-init */
144 HMAC_Update(&ctx,A1,A1_len);
145 HMAC_Update(&ctx_tmp,A1,A1_len);
146 HMAC_Update(&ctx,seed,seed_len);
147
148 if (olen > chunk)
149 {
150 HMAC_Final(&ctx,out,&j);
151 out+=j;
152 olen-=j;
153 HMAC_Final(&ctx_tmp,A1,&A1_len); /* calc the next A1 value */
154 }
155 else /* last one */
156 {
157 HMAC_Final(&ctx,A1,&A1_len);
158 memcpy(out,A1,olen);
159 break;
160 }
161 }
162 HMAC_CTX_cleanup(&ctx);
163 HMAC_CTX_cleanup(&ctx_tmp);
164 OPENSSL_cleanse(A1,sizeof(A1));
165 }
166
167static void tls1_PRF(const EVP_MD *md5, const EVP_MD *sha1,
168 unsigned char *label, int label_len,
169 const unsigned char *sec, int slen, unsigned char *out1,
170 unsigned char *out2, int olen)
171 {
172 int len,i;
173 const unsigned char *S1,*S2;
174
175 len=slen/2;
176 S1=sec;
177 S2= &(sec[len]);
178 len+=(slen&1); /* add for odd, make longer */
179
180
181 tls1_P_hash(md5 ,S1,len,label,label_len,out1,olen);
182 tls1_P_hash(sha1,S2,len,label,label_len,out2,olen);
183
184 for (i=0; i<olen; i++)
185 out1[i]^=out2[i];
186 }
187
188static void tls1_generate_key_block(SSL *s, unsigned char *km,
189 unsigned char *tmp, int num)
190 {
191 unsigned char *p;
192 unsigned char buf[SSL3_RANDOM_SIZE*2+
193 TLS_MD_MAX_CONST_SIZE];
194 p=buf;
195
196 memcpy(p,TLS_MD_KEY_EXPANSION_CONST,
197 TLS_MD_KEY_EXPANSION_CONST_SIZE);
198 p+=TLS_MD_KEY_EXPANSION_CONST_SIZE;
199 memcpy(p,s->s3->server_random,SSL3_RANDOM_SIZE);
200 p+=SSL3_RANDOM_SIZE;
201 memcpy(p,s->s3->client_random,SSL3_RANDOM_SIZE);
202 p+=SSL3_RANDOM_SIZE;
203
204 tls1_PRF(s->ctx->md5,s->ctx->sha1,buf,(int)(p-buf),
205 s->session->master_key,s->session->master_key_length,
206 km,tmp,num);
207#ifdef KSSL_DEBUG
208 printf("tls1_generate_key_block() ==> %d byte master_key =\n\t",
209 s->session->master_key_length);
210 {
211 int i;
212 for (i=0; i < s->session->master_key_length; i++)
213 {
214 printf("%02X", s->session->master_key[i]);
215 }
216 printf("\n"); }
217#endif /* KSSL_DEBUG */
218 }
219
220int tls1_change_cipher_state(SSL *s, int which)
221 {
222 static const unsigned char empty[]="";
223 unsigned char *p,*key_block,*mac_secret;
224 unsigned char *exp_label,buf[TLS_MD_MAX_CONST_SIZE+
225 SSL3_RANDOM_SIZE*2];
226 unsigned char tmp1[EVP_MAX_KEY_LENGTH];
227 unsigned char tmp2[EVP_MAX_KEY_LENGTH];
228 unsigned char iv1[EVP_MAX_IV_LENGTH*2];
229 unsigned char iv2[EVP_MAX_IV_LENGTH*2];
230 unsigned char *ms,*key,*iv,*er1,*er2;
231 int client_write;
232 EVP_CIPHER_CTX *dd;
233 const EVP_CIPHER *c;
234 const SSL_COMP *comp;
235 const EVP_MD *m;
236 int is_export,n,i,j,k,exp_label_len,cl;
237 int reuse_dd = 0;
238
239 is_export=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher);
240 c=s->s3->tmp.new_sym_enc;
241 m=s->s3->tmp.new_hash;
242 comp=s->s3->tmp.new_compression;
243 key_block=s->s3->tmp.key_block;
244
245#ifdef KSSL_DEBUG
246 printf("tls1_change_cipher_state(which= %d) w/\n", which);
247 printf("\talg= %ld, comp= %p\n", s->s3->tmp.new_cipher->algorithms,
248 comp);
249 printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", c);
250 printf("\tevp_cipher: nid, blksz= %d, %d, keylen=%d, ivlen=%d\n",
251 c->nid,c->block_size,c->key_len,c->iv_len);
252 printf("\tkey_block: len= %d, data= ", s->s3->tmp.key_block_length);
253 {
254 int i;
255 for (i=0; i<s->s3->tmp.key_block_length; i++)
256 printf("%02x", key_block[i]); printf("\n");
257 }
258#endif /* KSSL_DEBUG */
259
260 if (which & SSL3_CC_READ)
261 {
262 if (s->enc_read_ctx != NULL)
263 reuse_dd = 1;
264 else if ((s->enc_read_ctx=OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)
265 goto err;
266 dd= s->enc_read_ctx;
267 s->read_hash=m;
268 if (s->expand != NULL)
269 {
270 COMP_CTX_free(s->expand);
271 s->expand=NULL;
272 }
273 if (comp != NULL)
274 {
275 s->expand=COMP_CTX_new(comp->method);
276 if (s->expand == NULL)
277 {
278 SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE,SSL_R_COMPRESSION_LIBRARY_ERROR);
279 goto err2;
280 }
281 if (s->s3->rrec.comp == NULL)
282 s->s3->rrec.comp=(unsigned char *)
283 OPENSSL_malloc(SSL3_RT_MAX_ENCRYPTED_LENGTH);
284 if (s->s3->rrec.comp == NULL)
285 goto err;
286 }
287 memset(&(s->s3->read_sequence[0]),0,8);
288 mac_secret= &(s->s3->read_mac_secret[0]);
289 }
290 else
291 {
292 if (s->enc_write_ctx != NULL)
293 reuse_dd = 1;
294 else if ((s->enc_write_ctx=OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)
295 goto err;
296 if ((s->enc_write_ctx == NULL) &&
297 ((s->enc_write_ctx=(EVP_CIPHER_CTX *)
298 OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL))
299 goto err;
300 dd= s->enc_write_ctx;
301 s->write_hash=m;
302 if (s->compress != NULL)
303 {
304 COMP_CTX_free(s->compress);
305 s->compress=NULL;
306 }
307 if (comp != NULL)
308 {
309 s->compress=COMP_CTX_new(comp->method);
310 if (s->compress == NULL)
311 {
312 SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE,SSL_R_COMPRESSION_LIBRARY_ERROR);
313 goto err2;
314 }
315 }
316 memset(&(s->s3->write_sequence[0]),0,8);
317 mac_secret= &(s->s3->write_mac_secret[0]);
318 }
319
320 if (reuse_dd)
321 EVP_CIPHER_CTX_cleanup(dd);
322 EVP_CIPHER_CTX_init(dd);
323
324 p=s->s3->tmp.key_block;
325 i=EVP_MD_size(m);
326 cl=EVP_CIPHER_key_length(c);
327 j=is_export ? (cl < SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher) ?
328 cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl;
329 /* Was j=(exp)?5:EVP_CIPHER_key_length(c); */
330 k=EVP_CIPHER_iv_length(c);
331 er1= &(s->s3->client_random[0]);
332 er2= &(s->s3->server_random[0]);
333 if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) ||
334 (which == SSL3_CHANGE_CIPHER_SERVER_READ))
335 {
336 ms= &(p[ 0]); n=i+i;
337 key= &(p[ n]); n+=j+j;
338 iv= &(p[ n]); n+=k+k;
339 exp_label=(unsigned char *)TLS_MD_CLIENT_WRITE_KEY_CONST;
340 exp_label_len=TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE;
341 client_write=1;
342 }
343 else
344 {
345 n=i;
346 ms= &(p[ n]); n+=i+j;
347 key= &(p[ n]); n+=j+k;
348 iv= &(p[ n]); n+=k;
349 exp_label=(unsigned char *)TLS_MD_SERVER_WRITE_KEY_CONST;
350 exp_label_len=TLS_MD_SERVER_WRITE_KEY_CONST_SIZE;
351 client_write=0;
352 }
353
354 if (n > s->s3->tmp.key_block_length)
355 {
356 SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE,ERR_R_INTERNAL_ERROR);
357 goto err2;
358 }
359
360 memcpy(mac_secret,ms,i);
361#ifdef TLS_DEBUG
362printf("which = %04X\nmac key=",which);
363{ int z; for (z=0; z<i; z++) printf("%02X%c",ms[z],((z+1)%16)?' ':'\n'); }
364#endif
365 if (is_export)
366 {
367 /* In here I set both the read and write key/iv to the
368 * same value since only the correct one will be used :-).
369 */
370 p=buf;
371 memcpy(p,exp_label,exp_label_len);
372 p+=exp_label_len;
373 memcpy(p,s->s3->client_random,SSL3_RANDOM_SIZE);
374 p+=SSL3_RANDOM_SIZE;
375 memcpy(p,s->s3->server_random,SSL3_RANDOM_SIZE);
376 p+=SSL3_RANDOM_SIZE;
377 tls1_PRF(s->ctx->md5,s->ctx->sha1,buf,(int)(p-buf),key,j,
378 tmp1,tmp2,EVP_CIPHER_key_length(c));
379 key=tmp1;
380
381 if (k > 0)
382 {
383 p=buf;
384 memcpy(p,TLS_MD_IV_BLOCK_CONST,
385 TLS_MD_IV_BLOCK_CONST_SIZE);
386 p+=TLS_MD_IV_BLOCK_CONST_SIZE;
387 memcpy(p,s->s3->client_random,SSL3_RANDOM_SIZE);
388 p+=SSL3_RANDOM_SIZE;
389 memcpy(p,s->s3->server_random,SSL3_RANDOM_SIZE);
390 p+=SSL3_RANDOM_SIZE;
391 tls1_PRF(s->ctx->md5,s->ctx->sha1,buf,p-buf,empty,0,
392 iv1,iv2,k*2);
393 if (client_write)
394 iv=iv1;
395 else
396 iv= &(iv1[k]);
397 }
398 }
399
400 s->session->key_arg_length=0;
401#ifdef KSSL_DEBUG
402 {
403 int i;
404 printf("EVP_CipherInit_ex(dd,c,key=,iv=,which)\n");
405 printf("\tkey= "); for (i=0; i<c->key_len; i++) printf("%02x", key[i]);
406 printf("\n");
407 printf("\t iv= "); for (i=0; i<c->iv_len; i++) printf("%02x", iv[i]);
408 printf("\n");
409 }
410#endif /* KSSL_DEBUG */
411
412 EVP_CipherInit_ex(dd,c,NULL,key,iv,(which & SSL3_CC_WRITE));
413#ifdef TLS_DEBUG
414printf("which = %04X\nkey=",which);
415{ int z; for (z=0; z<EVP_CIPHER_key_length(c); z++) printf("%02X%c",key[z],((z+1)%16)?' ':'\n'); }
416printf("\niv=");
417{ int z; for (z=0; z<k; z++) printf("%02X%c",iv[z],((z+1)%16)?' ':'\n'); }
418printf("\n");
419#endif
420
421 OPENSSL_cleanse(tmp1,sizeof(tmp1));
422 OPENSSL_cleanse(tmp2,sizeof(tmp1));
423 OPENSSL_cleanse(iv1,sizeof(iv1));
424 OPENSSL_cleanse(iv2,sizeof(iv2));
425 return(1);
426err:
427 SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE,ERR_R_MALLOC_FAILURE);
428err2:
429 return(0);
430 }
431
432int tls1_setup_key_block(SSL *s)
433 {
434 unsigned char *p1,*p2;
435 const EVP_CIPHER *c;
436 const EVP_MD *hash;
437 int num;
438 SSL_COMP *comp;
439
440#ifdef KSSL_DEBUG
441 printf ("tls1_setup_key_block()\n");
442#endif /* KSSL_DEBUG */
443
444 if (s->s3->tmp.key_block_length != 0)
445 return(1);
446
447 if (!ssl_cipher_get_evp(s->session,&c,&hash,&comp))
448 {
449 SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,SSL_R_CIPHER_OR_HASH_UNAVAILABLE);
450 return(0);
451 }
452
453 s->s3->tmp.new_sym_enc=c;
454 s->s3->tmp.new_hash=hash;
455
456 num=EVP_CIPHER_key_length(c)+EVP_MD_size(hash)+EVP_CIPHER_iv_length(c);
457 num*=2;
458
459 ssl3_cleanup_key_block(s);
460
461 if ((p1=(unsigned char *)OPENSSL_malloc(num)) == NULL)
462 goto err;
463 if ((p2=(unsigned char *)OPENSSL_malloc(num)) == NULL)
464 goto err;
465
466 s->s3->tmp.key_block_length=num;
467 s->s3->tmp.key_block=p1;
468
469
470#ifdef TLS_DEBUG
471printf("client random\n");
472{ int z; for (z=0; z<SSL3_RANDOM_SIZE; z++) printf("%02X%c",s->s3->client_random[z],((z+1)%16)?' ':'\n'); }
473printf("server random\n");
474{ int z; for (z=0; z<SSL3_RANDOM_SIZE; z++) printf("%02X%c",s->s3->server_random[z],((z+1)%16)?' ':'\n'); }
475printf("pre-master\n");
476{ int z; for (z=0; z<s->session->master_key_length; z++) printf("%02X%c",s->session->master_key[z],((z+1)%16)?' ':'\n'); }
477#endif
478 tls1_generate_key_block(s,p1,p2,num);
479 OPENSSL_cleanse(p2,num);
480 OPENSSL_free(p2);
481#ifdef TLS_DEBUG
482printf("\nkey block\n");
483{ int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); }
484#endif
485
486 if (!(s->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS))
487 {
488 /* enable vulnerability countermeasure for CBC ciphers with
489 * known-IV problem (http://www.openssl.org/~bodo/tls-cbc.txt)
490 */
491 s->s3->need_empty_fragments = 1;
492
493 if (s->session->cipher != NULL)
494 {
495 if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_eNULL)
496 s->s3->need_empty_fragments = 0;
497
498#ifndef OPENSSL_NO_RC4
499 if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)
500 s->s3->need_empty_fragments = 0;
501#endif
502 }
503 }
504
505 return(1);
506err:
507 SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,ERR_R_MALLOC_FAILURE);
508 return(0);
509 }
510
511int tls1_enc(SSL *s, int send)
512 {
513 SSL3_RECORD *rec;
514 EVP_CIPHER_CTX *ds;
515 unsigned long l;
516 int bs,i,ii,j,k,n=0;
517 const EVP_CIPHER *enc;
518
519 if (send)
520 {
521 if (s->write_hash != NULL)
522 n=EVP_MD_size(s->write_hash);
523 ds=s->enc_write_ctx;
524 rec= &(s->s3->wrec);
525 if (s->enc_write_ctx == NULL)
526 enc=NULL;
527 else
528 enc=EVP_CIPHER_CTX_cipher(s->enc_write_ctx);
529 }
530 else
531 {
532 if (s->read_hash != NULL)
533 n=EVP_MD_size(s->read_hash);
534 ds=s->enc_read_ctx;
535 rec= &(s->s3->rrec);
536 if (s->enc_read_ctx == NULL)
537 enc=NULL;
538 else
539 enc=EVP_CIPHER_CTX_cipher(s->enc_read_ctx);
540 }
541
542#ifdef KSSL_DEBUG
543 printf("tls1_enc(%d)\n", send);
544#endif /* KSSL_DEBUG */
545
546 if ((s->session == NULL) || (ds == NULL) ||
547 (enc == NULL))
548 {
549 memmove(rec->data,rec->input,rec->length);
550 rec->input=rec->data;
551 }
552 else
553 {
554 l=rec->length;
555 bs=EVP_CIPHER_block_size(ds->cipher);
556
557 if ((bs != 1) && send)
558 {
559 i=bs-((int)l%bs);
560
561 /* Add weird padding of upto 256 bytes */
562
563 /* we need to add 'i' padding bytes of value j */
564 j=i-1;
565 if (s->options & SSL_OP_TLS_BLOCK_PADDING_BUG)
566 {
567 if (s->s3->flags & TLS1_FLAGS_TLS_PADDING_BUG)
568 j++;
569 }
570 for (k=(int)l; k<(int)(l+i); k++)
571 rec->input[k]=j;
572 l+=i;
573 rec->length+=i;
574 }
575
576#ifdef KSSL_DEBUG
577 {
578 unsigned long ui;
579 printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n",
580 ds,rec->data,rec->input,l);
581 printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%d %d], %d iv_len\n",
582 ds->buf_len, ds->cipher->key_len,
583 DES_KEY_SZ, DES_SCHEDULE_SZ,
584 ds->cipher->iv_len);
585 printf("\t\tIV: ");
586 for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]);
587 printf("\n");
588 printf("\trec->input=");
589 for (ui=0; ui<l; ui++) printf(" %02x", rec->input[ui]);
590 printf("\n");
591 }
592#endif /* KSSL_DEBUG */
593
594 if (!send)
595 {
596 if (l == 0 || l%bs != 0)
597 {
598 SSLerr(SSL_F_TLS1_ENC,SSL_R_BLOCK_CIPHER_PAD_IS_WRONG);
599 ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECRYPTION_FAILED);
600 return 0;
601 }
602 }
603
604 EVP_Cipher(ds,rec->data,rec->input,l);
605
606#ifdef KSSL_DEBUG
607 {
608 unsigned long i;
609 printf("\trec->data=");
610 for (i=0; i<l; i++)
611 printf(" %02x", rec->data[i]); printf("\n");
612 }
613#endif /* KSSL_DEBUG */
614
615 if ((bs != 1) && !send)
616 {
617 ii=i=rec->data[l-1]; /* padding_length */
618 i++;
619 if (s->options&SSL_OP_TLS_BLOCK_PADDING_BUG)
620 {
621 /* First packet is even in size, so check */
622 if ((memcmp(s->s3->read_sequence,
623 "\0\0\0\0\0\0\0\0",8) == 0) && !(ii & 1))
624 s->s3->flags|=TLS1_FLAGS_TLS_PADDING_BUG;
625 if (s->s3->flags & TLS1_FLAGS_TLS_PADDING_BUG)
626 i--;
627 }
628 /* TLS 1.0 does not bound the number of padding bytes by the block size.
629 * All of them must have value 'padding_length'. */
630 if (i > (int)rec->length)
631 {
632 /* Incorrect padding. SSLerr() and ssl3_alert are done
633 * by caller: we don't want to reveal whether this is
634 * a decryption error or a MAC verification failure
635 * (see http://www.openssl.org/~bodo/tls-cbc.txt) */
636 return -1;
637 }
638 for (j=(int)(l-i); j<(int)l; j++)
639 {
640 if (rec->data[j] != ii)
641 {
642 /* Incorrect padding */
643 return -1;
644 }
645 }
646 rec->length-=i;
647 }
648 }
649 return(1);
650 }
651
652int tls1_cert_verify_mac(SSL *s, EVP_MD_CTX *in_ctx, unsigned char *out)
653 {
654 unsigned int ret;
655 EVP_MD_CTX ctx;
656
657 EVP_MD_CTX_init(&ctx);
658 EVP_MD_CTX_copy_ex(&ctx,in_ctx);
659 EVP_DigestFinal_ex(&ctx,out,&ret);
660 EVP_MD_CTX_cleanup(&ctx);
661 return((int)ret);
662 }
663
664int tls1_final_finish_mac(SSL *s, EVP_MD_CTX *in1_ctx, EVP_MD_CTX *in2_ctx,
665 const char *str, int slen, unsigned char *out)
666 {
667 unsigned int i;
668 EVP_MD_CTX ctx;
669 unsigned char buf[TLS_MD_MAX_CONST_SIZE+MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH];
670 unsigned char *q,buf2[12];
671
672 q=buf;
673 memcpy(q,str,slen);
674 q+=slen;
675
676 EVP_MD_CTX_init(&ctx);
677 EVP_MD_CTX_copy_ex(&ctx,in1_ctx);
678 EVP_DigestFinal_ex(&ctx,q,&i);
679 q+=i;
680 EVP_MD_CTX_copy_ex(&ctx,in2_ctx);
681 EVP_DigestFinal_ex(&ctx,q,&i);
682 q+=i;
683
684 tls1_PRF(s->ctx->md5,s->ctx->sha1,buf,(int)(q-buf),
685 s->session->master_key,s->session->master_key_length,
686 out,buf2,sizeof buf2);
687 EVP_MD_CTX_cleanup(&ctx);
688
689 return sizeof buf2;
690 }
691
692int tls1_mac(SSL *ssl, unsigned char *md, int send)
693 {
694 SSL3_RECORD *rec;
695 unsigned char *mac_sec,*seq;
696 const EVP_MD *hash;
697 unsigned int md_size;
698 int i;
699 HMAC_CTX hmac;
700 unsigned char buf[5];
701
702 if (send)
703 {
704 rec= &(ssl->s3->wrec);
705 mac_sec= &(ssl->s3->write_mac_secret[0]);
706 seq= &(ssl->s3->write_sequence[0]);
707 hash=ssl->write_hash;
708 }
709 else
710 {
711 rec= &(ssl->s3->rrec);
712 mac_sec= &(ssl->s3->read_mac_secret[0]);
713 seq= &(ssl->s3->read_sequence[0]);
714 hash=ssl->read_hash;
715 }
716
717 md_size=EVP_MD_size(hash);
718
719 buf[0]=rec->type;
720 buf[1]=TLS1_VERSION_MAJOR;
721 buf[2]=TLS1_VERSION_MINOR;
722 buf[3]=rec->length>>8;
723 buf[4]=rec->length&0xff;
724
725 /* I should fix this up TLS TLS TLS TLS TLS XXXXXXXX */
726 HMAC_CTX_init(&hmac);
727 HMAC_Init_ex(&hmac,mac_sec,EVP_MD_size(hash),hash,NULL);
728 HMAC_Update(&hmac,seq,8);
729 HMAC_Update(&hmac,buf,5);
730 HMAC_Update(&hmac,rec->input,rec->length);
731 HMAC_Final(&hmac,md,&md_size);
732 HMAC_CTX_cleanup(&hmac);
733
734#ifdef TLS_DEBUG
735printf("sec=");
736{unsigned int z; for (z=0; z<md_size; z++) printf("%02X ",mac_sec[z]); printf("\n"); }
737printf("seq=");
738{int z; for (z=0; z<8; z++) printf("%02X ",seq[z]); printf("\n"); }
739printf("buf=");
740{int z; for (z=0; z<5; z++) printf("%02X ",buf[z]); printf("\n"); }
741printf("rec=");
742{unsigned int z; for (z=0; z<rec->length; z++) printf("%02X ",buf[z]); printf("\n"); }
743#endif
744
745 for (i=7; i>=0; i--)
746 {
747 ++seq[i];
748 if (seq[i] != 0) break;
749 }
750
751#ifdef TLS_DEBUG
752{unsigned int z; for (z=0; z<md_size; z++) printf("%02X ",md[z]); printf("\n"); }
753#endif
754 return(md_size);
755 }
756
757int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
758 int len)
759 {
760 unsigned char buf[SSL3_RANDOM_SIZE*2+TLS_MD_MASTER_SECRET_CONST_SIZE];
761 unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH];
762
763#ifdef KSSL_DEBUG
764 printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", s,out, p,len);
765#endif /* KSSL_DEBUG */
766
767 /* Setup the stuff to munge */
768 memcpy(buf,TLS_MD_MASTER_SECRET_CONST,
769 TLS_MD_MASTER_SECRET_CONST_SIZE);
770 memcpy(&(buf[TLS_MD_MASTER_SECRET_CONST_SIZE]),
771 s->s3->client_random,SSL3_RANDOM_SIZE);
772 memcpy(&(buf[SSL3_RANDOM_SIZE+TLS_MD_MASTER_SECRET_CONST_SIZE]),
773 s->s3->server_random,SSL3_RANDOM_SIZE);
774 tls1_PRF(s->ctx->md5,s->ctx->sha1,
775 buf,TLS_MD_MASTER_SECRET_CONST_SIZE+SSL3_RANDOM_SIZE*2,p,len,
776 s->session->master_key,buff,sizeof buff);
777#ifdef KSSL_DEBUG
778 printf ("tls1_generate_master_secret() complete\n");
779#endif /* KSSL_DEBUG */
780 return(SSL3_MASTER_SECRET_SIZE);
781 }
782
783int tls1_alert_code(int code)
784 {
785 switch (code)
786 {
787 case SSL_AD_CLOSE_NOTIFY: return(SSL3_AD_CLOSE_NOTIFY);
788 case SSL_AD_UNEXPECTED_MESSAGE: return(SSL3_AD_UNEXPECTED_MESSAGE);
789 case SSL_AD_BAD_RECORD_MAC: return(SSL3_AD_BAD_RECORD_MAC);
790 case SSL_AD_DECRYPTION_FAILED: return(TLS1_AD_DECRYPTION_FAILED);
791 case SSL_AD_RECORD_OVERFLOW: return(TLS1_AD_RECORD_OVERFLOW);
792 case SSL_AD_DECOMPRESSION_FAILURE:return(SSL3_AD_DECOMPRESSION_FAILURE);
793 case SSL_AD_HANDSHAKE_FAILURE: return(SSL3_AD_HANDSHAKE_FAILURE);
794 case SSL_AD_NO_CERTIFICATE: return(-1);
795 case SSL_AD_BAD_CERTIFICATE: return(SSL3_AD_BAD_CERTIFICATE);
796 case SSL_AD_UNSUPPORTED_CERTIFICATE:return(SSL3_AD_UNSUPPORTED_CERTIFICATE);
797 case SSL_AD_CERTIFICATE_REVOKED:return(SSL3_AD_CERTIFICATE_REVOKED);
798 case SSL_AD_CERTIFICATE_EXPIRED:return(SSL3_AD_CERTIFICATE_EXPIRED);
799 case SSL_AD_CERTIFICATE_UNKNOWN:return(SSL3_AD_CERTIFICATE_UNKNOWN);
800 case SSL_AD_ILLEGAL_PARAMETER: return(SSL3_AD_ILLEGAL_PARAMETER);
801 case SSL_AD_UNKNOWN_CA: return(TLS1_AD_UNKNOWN_CA);
802 case SSL_AD_ACCESS_DENIED: return(TLS1_AD_ACCESS_DENIED);
803 case SSL_AD_DECODE_ERROR: return(TLS1_AD_DECODE_ERROR);
804 case SSL_AD_DECRYPT_ERROR: return(TLS1_AD_DECRYPT_ERROR);
805 case SSL_AD_EXPORT_RESTRICTION: return(TLS1_AD_EXPORT_RESTRICTION);
806 case SSL_AD_PROTOCOL_VERSION: return(TLS1_AD_PROTOCOL_VERSION);
807 case SSL_AD_INSUFFICIENT_SECURITY:return(TLS1_AD_INSUFFICIENT_SECURITY);
808 case SSL_AD_INTERNAL_ERROR: return(TLS1_AD_INTERNAL_ERROR);
809 case SSL_AD_USER_CANCELLED: return(TLS1_AD_USER_CANCELLED);
810 case SSL_AD_NO_RENEGOTIATION: return(TLS1_AD_NO_RENEGOTIATION);
811 default: return(-1);
812 }
813 }
814
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
new file mode 100644
index 0000000000..ca6c03d5af
--- /dev/null
+++ b/src/lib/libssl/t1_lib.c
@@ -0,0 +1,149 @@
1/* ssl/t1_lib.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 <openssl/objects.h>
61#include "ssl_locl.h"
62
63const char *tls1_version_str="TLSv1" OPENSSL_VERSION_PTEXT;
64
65static long tls1_default_timeout(void);
66
67static SSL3_ENC_METHOD TLSv1_enc_data={
68 tls1_enc,
69 tls1_mac,
70 tls1_setup_key_block,
71 tls1_generate_master_secret,
72 tls1_change_cipher_state,
73 tls1_final_finish_mac,
74 TLS1_FINISH_MAC_LENGTH,
75 tls1_cert_verify_mac,
76 TLS_MD_CLIENT_FINISH_CONST,TLS_MD_CLIENT_FINISH_CONST_SIZE,
77 TLS_MD_SERVER_FINISH_CONST,TLS_MD_SERVER_FINISH_CONST_SIZE,
78 tls1_alert_code,
79 };
80
81static SSL_METHOD TLSv1_data= {
82 TLS1_VERSION,
83 tls1_new,
84 tls1_clear,
85 tls1_free,
86 ssl_undefined_function,
87 ssl_undefined_function,
88 ssl3_read,
89 ssl3_peek,
90 ssl3_write,
91 ssl3_shutdown,
92 ssl3_renegotiate,
93 ssl3_renegotiate_check,
94 ssl3_ctrl,
95 ssl3_ctx_ctrl,
96 ssl3_get_cipher_by_char,
97 ssl3_put_cipher_by_char,
98 ssl3_pending,
99 ssl3_num_ciphers,
100 ssl3_get_cipher,
101 ssl_bad_method,
102 tls1_default_timeout,
103 &TLSv1_enc_data,
104 ssl_undefined_function,
105 ssl3_callback_ctrl,
106 ssl3_ctx_callback_ctrl,
107 };
108
109static long tls1_default_timeout(void)
110 {
111 /* 2 hours, the 24 hours mentioned in the TLSv1 spec
112 * is way too long for http, the cache would over fill */
113 return(60*60*2);
114 }
115
116SSL_METHOD *tlsv1_base_method(void)
117 {
118 return(&TLSv1_data);
119 }
120
121int tls1_new(SSL *s)
122 {
123 if (!ssl3_new(s)) return(0);
124 s->method->ssl_clear(s);
125 return(1);
126 }
127
128void tls1_free(SSL *s)
129 {
130 ssl3_free(s);
131 }
132
133void tls1_clear(SSL *s)
134 {
135 ssl3_clear(s);
136 s->version=TLS1_VERSION;
137 }
138
139#if 0
140long tls1_ctrl(SSL *s, int cmd, long larg, char *parg)
141 {
142 return(0);
143 }
144
145long tls1_callback_ctrl(SSL *s, int cmd, void *(*fp)())
146 {
147 return(0);
148 }
149#endif
diff --git a/src/lib/libssl/t1_meth.c b/src/lib/libssl/t1_meth.c
new file mode 100644
index 0000000000..fcc243f782
--- /dev/null
+++ b/src/lib/libssl/t1_meth.c
@@ -0,0 +1,96 @@
1/* ssl/t1_meth.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 <openssl/objects.h>
61#include "ssl_locl.h"
62
63static SSL_METHOD *tls1_get_method(int ver);
64static SSL_METHOD *tls1_get_method(int ver)
65 {
66 if (ver == TLS1_VERSION)
67 return(TLSv1_method());
68 else
69 return(NULL);
70 }
71
72SSL_METHOD *TLSv1_method(void)
73 {
74 static int init=1;
75 static SSL_METHOD TLSv1_data;
76
77 if (init)
78 {
79 CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
80
81 if (init)
82 {
83 memcpy((char *)&TLSv1_data,(char *)tlsv1_base_method(),
84 sizeof(SSL_METHOD));
85 TLSv1_data.ssl_connect=ssl3_connect;
86 TLSv1_data.ssl_accept=ssl3_accept;
87 TLSv1_data.get_ssl_method=tls1_get_method;
88 init=0;
89 }
90
91 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
92 }
93
94 return(&TLSv1_data);
95 }
96
diff --git a/src/lib/libssl/t1_srvr.c b/src/lib/libssl/t1_srvr.c
new file mode 100644
index 0000000000..1c1149e49f
--- /dev/null
+++ b/src/lib/libssl/t1_srvr.c
@@ -0,0 +1,98 @@
1/* ssl/t1_srvr.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 "ssl_locl.h"
61#include <openssl/buffer.h>
62#include <openssl/rand.h>
63#include <openssl/objects.h>
64#include <openssl/evp.h>
65#include <openssl/x509.h>
66
67static SSL_METHOD *tls1_get_server_method(int ver);
68static SSL_METHOD *tls1_get_server_method(int ver)
69 {
70 if (ver == TLS1_VERSION)
71 return(TLSv1_server_method());
72 else
73 return(NULL);
74 }
75
76SSL_METHOD *TLSv1_server_method(void)
77 {
78 static int init=1;
79 static SSL_METHOD TLSv1_server_data;
80
81 if (init)
82 {
83 CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
84
85 if (init)
86 {
87 memcpy((char *)&TLSv1_server_data,(char *)tlsv1_base_method(),
88 sizeof(SSL_METHOD));
89 TLSv1_server_data.ssl_accept=ssl3_accept;
90 TLSv1_server_data.get_ssl_method=tls1_get_server_method;
91 init=0;
92 }
93
94 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
95 }
96 return(&TLSv1_server_data);
97 }
98
diff --git a/src/lib/libssl/test/CAss.cnf b/src/lib/libssl/test/CAss.cnf
new file mode 100644
index 0000000000..b941b7ae15
--- /dev/null
+++ b/src/lib/libssl/test/CAss.cnf
@@ -0,0 +1,25 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5
6RANDFILE = ./.rnd
7
8####################################################################
9[ req ]
10default_bits = 512
11default_keyfile = keySS.pem
12distinguished_name = req_distinguished_name
13encrypt_rsa_key = no
14default_md = sha1
15
16[ req_distinguished_name ]
17countryName = Country Name (2 letter code)
18countryName_default = AU
19countryName_value = AU
20
21organizationName = Organization Name (eg, company)
22organizationName_value = Dodgy Brothers
23
24commonName = Common Name (eg, YOUR name)
25commonName_value = Dodgy CA
diff --git a/src/lib/libssl/test/CAssdh.cnf b/src/lib/libssl/test/CAssdh.cnf
new file mode 100644
index 0000000000..4e0a908679
--- /dev/null
+++ b/src/lib/libssl/test/CAssdh.cnf
@@ -0,0 +1,24 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5# hacked by iang to do DH certs - CA
6
7RANDFILE = ./.rnd
8
9####################################################################
10[ req ]
11distinguished_name = req_distinguished_name
12encrypt_rsa_key = no
13
14[ req_distinguished_name ]
15countryName = Country Name (2 letter code)
16countryName_default = CU
17countryName_value = CU
18
19organizationName = Organization Name (eg, company)
20organizationName_value = La Junta de la Revolucion
21
22commonName = Common Name (eg, YOUR name)
23commonName_value = Junta
24
diff --git a/src/lib/libssl/test/CAssdsa.cnf b/src/lib/libssl/test/CAssdsa.cnf
new file mode 100644
index 0000000000..a6b4d1810c
--- /dev/null
+++ b/src/lib/libssl/test/CAssdsa.cnf
@@ -0,0 +1,23 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5# hacked by iang to do DSA certs - CA
6
7RANDFILE = ./.rnd
8
9####################################################################
10[ req ]
11distinguished_name = req_distinguished_name
12encrypt_rsa_key = no
13
14[ req_distinguished_name ]
15countryName = Country Name (2 letter code)
16countryName_default = ES
17countryName_value = ES
18
19organizationName = Organization Name (eg, company)
20organizationName_value = Hermanos Locos
21
22commonName = Common Name (eg, YOUR name)
23commonName_value = Hermanos Locos CA
diff --git a/src/lib/libssl/test/CAssrsa.cnf b/src/lib/libssl/test/CAssrsa.cnf
new file mode 100644
index 0000000000..eb24a6dfc0
--- /dev/null
+++ b/src/lib/libssl/test/CAssrsa.cnf
@@ -0,0 +1,24 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5# create RSA certs - CA
6
7RANDFILE = ./.rnd
8
9####################################################################
10[ req ]
11distinguished_name = req_distinguished_name
12encrypt_key = no
13
14[ req_distinguished_name ]
15countryName = Country Name (2 letter code)
16countryName_default = ES
17countryName_value = ES
18
19organizationName = Organization Name (eg, company)
20organizationName_value = Hermanos Locos
21
22commonName = Common Name (eg, YOUR name)
23commonName_value = Hermanos Locos CA
24
diff --git a/src/lib/libssl/test/Makefile.ssl b/src/lib/libssl/test/Makefile.ssl
new file mode 100644
index 0000000000..373f17a929
--- /dev/null
+++ b/src/lib/libssl/test/Makefile.ssl
@@ -0,0 +1,796 @@
1#
2# test/Makefile.ssl
3#
4
5DIR= test
6TOP= ..
7CC= cc
8INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES)
9CFLAG= -g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP= /usr/local/ssl
13MAKEFILE= Makefile.ssl
14MAKE= make -f $(MAKEFILE)
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17PERL= perl
18# KRB5 stuff
19KRB5_INCLUDES=
20LIBKRB5=
21
22PEX_LIBS=
23EX_LIBS= #-lnsl -lsocket
24
25CFLAGS= $(INCLUDES) $(CFLAG)
26
27GENERAL=Makefile.ssl maketests.com \
28 tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \
29 tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \
30 testca.com VMSca-response.1 VMSca-response.2
31
32DLIBCRYPTO= ../libcrypto.a
33DLIBSSL= ../libssl.a
34LIBCRYPTO= -L.. -lcrypto
35LIBSSL= -L.. -lssl
36
37BNTEST= bntest
38ECTEST= ectest
39EXPTEST= exptest
40IDEATEST= ideatest
41SHATEST= shatest
42SHA1TEST= sha1test
43MDC2TEST= mdc2test
44RMDTEST= rmdtest
45MD2TEST= md2test
46MD4TEST= md4test
47MD5TEST= md5test
48HMACTEST= hmactest
49RC2TEST= rc2test
50RC4TEST= rc4test
51RC5TEST= rc5test
52BFTEST= bftest
53CASTTEST= casttest
54DESTEST= destest
55RANDTEST= randtest
56DHTEST= dhtest
57DSATEST= dsatest
58METHTEST= methtest
59SSLTEST= ssltest
60RSATEST= rsa_test
61ENGINETEST= enginetest
62EVPTEST= evp_test
63
64TESTS= alltests
65
66EXE= $(BNTEST) $(ECTEST) $(IDEATEST) $(MD2TEST) $(MD4TEST) $(MD5TEST) $(HMACTEST) \
67 $(RC2TEST) $(RC4TEST) $(RC5TEST) \
68 $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \
69 $(RANDTEST) $(DHTEST) $(ENGINETEST) \
70 $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(RSATEST) \
71 $(EVPTEST)
72
73# $(METHTEST)
74
75OBJ= $(BNTEST).o $(ECTEST).o $(IDEATEST).o $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \
76 $(HMACTEST).o \
77 $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \
78 $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \
79 $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \
80 $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \
81 $(EVPTEST).o
82SRC= $(BNTEST).c $(ECTEST).c $(IDEATEST).c $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \
83 $(HMACTEST).c \
84 $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \
85 $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \
86 $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \
87 $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c \
88 $(EVPTEST).c
89
90EXHEADER=
91HEADER= $(EXHEADER)
92
93ALL= $(GENERAL) $(SRC) $(HEADER)
94
95top:
96 (cd ..; $(MAKE) DIRS=$(DIR) TESTS=$(TESTS) all)
97
98all: exe
99
100exe: $(EXE) dummytest
101
102files:
103 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
104
105links:
106 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
107
108generate: $(SRC)
109$(SRC):
110 @sh $(TOP)/util/point.sh dummytest.c $@
111
112errors:
113
114install:
115
116tags:
117 ctags $(SRC)
118
119tests: exe apps $(TESTS)
120
121apps:
122 @(cd ..; $(MAKE) DIRS=apps all)
123
124SET_SO_PATHS=OSSL_LIBPATH="`cd ..; pwd`"; \
125 LD_LIBRARY_PATH="$$OSSL_LIBPATH:$$LD_LIBRARY_PATH"; \
126 DYLD_LIBRARY_PATH="$$OSSL_LIBPATH:$$DYLD_LIBRARY_PATH"; \
127 SHLIB_PATH="$$OSSL_LIBPATH:$$SHLIB_PATH"; \
128 LIBPATH="$$OSSL_LIBPATH:$$LIBPATH"; \
129 if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="$${LIBPATH}:$$PATH"; fi; \
130 export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH
131
132alltests: \
133 test_des test_idea test_sha test_md4 test_md5 test_hmac \
134 test_md2 test_mdc2 \
135 test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
136 test_rand test_bn test_ec test_enc test_x509 test_rsa test_crl test_sid \
137 test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
138 test_ss test_ca test_engine test_evp test_ssl
139
140test_evp:
141 $(SET_SO_PATHS); ./$(EVPTEST) evptests.txt
142
143test_des:
144 $(SET_SO_PATHS); ./$(DESTEST)
145
146test_idea:
147 $(SET_SO_PATHS); ./$(IDEATEST)
148
149test_sha:
150 $(SET_SO_PATHS); ./$(SHATEST)
151 $(SET_SO_PATHS); ./$(SHA1TEST)
152
153test_mdc2:
154 $(SET_SO_PATHS); ./$(MDC2TEST)
155
156test_md5:
157 $(SET_SO_PATHS); ./$(MD5TEST)
158
159test_md4:
160 $(SET_SO_PATHS); ./$(MD4TEST)
161
162test_hmac:
163 $(SET_SO_PATHS); ./$(HMACTEST)
164
165test_md2:
166 $(SET_SO_PATHS); ./$(MD2TEST)
167
168test_rmd:
169 $(SET_SO_PATHS); ./$(RMDTEST)
170
171test_bf:
172 $(SET_SO_PATHS); ./$(BFTEST)
173
174test_cast:
175 $(SET_SO_PATHS); ./$(CASTTEST)
176
177test_rc2:
178 $(SET_SO_PATHS); ./$(RC2TEST)
179
180test_rc4:
181 $(SET_SO_PATHS); ./$(RC4TEST)
182
183test_rc5:
184 $(SET_SO_PATHS); ./$(RC5TEST)
185
186test_rand:
187 $(SET_SO_PATHS); ./$(RANDTEST)
188
189test_enc:
190 @$(SET_SO_PATHS); sh ./testenc
191
192test_x509:
193 echo test normal x509v1 certificate
194 $(SET_SO_PATHS); sh ./tx509 2>/dev/null
195 echo test first x509v3 certificate
196 $(SET_SO_PATHS); sh ./tx509 v3-cert1.pem 2>/dev/null
197 echo test second x509v3 certificate
198 $(SET_SO_PATHS); sh ./tx509 v3-cert2.pem 2>/dev/null
199
200test_rsa:
201 @$(SET_SO_PATHS); sh ./trsa 2>/dev/null
202 $(SET_SO_PATHS); ./$(RSATEST)
203
204test_crl:
205 @$(SET_SO_PATHS); sh ./tcrl 2>/dev/null
206
207test_sid:
208 @$(SET_SO_PATHS); sh ./tsid 2>/dev/null
209
210test_req:
211 @$(SET_SO_PATHS); sh ./treq 2>/dev/null
212 @$(SET_SO_PATHS); sh ./treq testreq2.pem 2>/dev/null
213
214test_pkcs7:
215 @$(SET_SO_PATHS); sh ./tpkcs7 2>/dev/null
216 @$(SET_SO_PATHS); sh ./tpkcs7d 2>/dev/null
217
218test_bn:
219 @echo starting big number library test, could take a while...
220 @$(SET_SO_PATHS); ./$(BNTEST) >tmp.bntest
221 @echo quit >>tmp.bntest
222 @echo "running bc"
223 @<tmp.bntest sh -c "`sh ./bctest ignore`" | $(PERL) -e '$$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"'
224 @echo 'test a^b%c implementations'
225 $(SET_SO_PATHS); ./$(EXPTEST)
226
227test_ec:
228 @echo 'test elliptic curves'
229 $(SET_SO_PATHS); ./$(ECTEST)
230
231test_verify:
232 @echo "The following command should have some OK's and some failures"
233 @echo "There are definitly a few expired certificates"
234 -$(SET_SO_PATHS); ../apps/openssl verify -CApath ../certs ../certs/*.pem
235
236test_dh:
237 @echo "Generate a set of DH parameters"
238 $(SET_SO_PATHS); ./$(DHTEST)
239
240test_dsa:
241 @echo "Generate a set of DSA parameters"
242 $(SET_SO_PATHS); ./$(DSATEST)
243 $(SET_SO_PATHS); ./$(DSATEST) -app2_1
244
245test_gen:
246 @echo "Generate and verify a certificate request"
247 @$(SET_SO_PATHS); sh ./testgen
248
249test_ss keyU.ss certU.ss certCA.ss: testss
250 @echo "Generate and certify a test certificate"
251 @$(SET_SO_PATHS); sh ./testss
252
253test_engine:
254 @echo "Manipulate the ENGINE structures"
255 $(SET_SO_PATHS); ./$(ENGINETEST)
256
257test_ssl: keyU.ss certU.ss certCA.ss
258 @echo "test SSL protocol"
259 @$(SET_SO_PATHS); sh ./testssl keyU.ss certU.ss certCA.ss
260
261test_ca:
262 @$(SET_SO_PATHS); if ../apps/openssl no-rsa; then \
263 echo "skipping CA.sh test -- requires RSA"; \
264 else \
265 echo "Generate and certify a test certificate via the 'ca' program"; \
266 sh ./testca; \
267 fi
268
269test_aes: #$(AESTEST)
270# @echo "test Rijndael"
271# $(SET_SO_PATHS); ./$(AESTEST)
272
273lint:
274 lint -DLINT $(INCLUDES) $(SRC)>fluff
275
276depend:
277 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC)
278
279dclean:
280 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
281 mv -f Makefile.new $(MAKEFILE)
282
283clean:
284 rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log
285
286$(DLIBSSL):
287 (cd ..; $(MAKE) DIRS=ssl all)
288
289$(DLIBCRYPTO):
290 (cd ..; $(MAKE) DIRS=crypto all)
291
292$(RSATEST): $(RSATEST).o $(DLIBCRYPTO)
293 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
294 $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
295 else \
296 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
297 $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
298 fi
299
300$(BNTEST): $(BNTEST).o $(DLIBCRYPTO)
301 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
302 $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
303 else \
304 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
305 $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
306 fi
307
308$(ECTEST): $(ECTEST).o $(DLIBCRYPTO)
309 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
310 $(CC) -o $(ECTEST) $(CFLAGS) $(ECTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
311 else \
312 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
313 $(CC) -o $(ECTEST) $(CFLAGS) $(ECTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
314 fi
315
316$(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO)
317 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
318 $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
319 else \
320 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
321 $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
322 fi
323
324$(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO)
325 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
326 $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
327 else \
328 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
329 $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
330 fi
331
332$(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO)
333 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
334 $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
335 else \
336 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
337 $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
338 fi
339
340$(SHATEST): $(SHATEST).o $(DLIBCRYPTO)
341 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
342 $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
343 else \
344 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
345 $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
346 fi
347
348$(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO)
349 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
350 $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
351 else \
352 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
353 $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
354 fi
355
356$(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO)
357 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
358 $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
359 else \
360 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
361 $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
362 fi
363
364$(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO)
365 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
366 $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
367 else \
368 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
369 $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
370 fi
371
372$(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO)
373 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
374 $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
375 else \
376 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
377 $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
378 fi
379
380$(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO)
381 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
382 $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
383 else \
384 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
385 $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
386 fi
387
388$(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO)
389 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
390 $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
391 else \
392 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
393 $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
394 fi
395
396$(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO)
397 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
398 $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
399 else \
400 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
401 $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
402 fi
403
404$(BFTEST): $(BFTEST).o $(DLIBCRYPTO)
405 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
406 $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
407 else \
408 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
409 $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
410 fi
411
412$(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO)
413 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
414 $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
415 else \
416 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
417 $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
418 fi
419
420$(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO)
421 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
422 $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
423 else \
424 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
425 $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
426 fi
427
428$(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO)
429 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
430 $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
431 else \
432 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
433 $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
434 fi
435
436$(DESTEST): $(DESTEST).o $(DLIBCRYPTO)
437 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
438 $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
439 else \
440 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
441 $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
442 fi
443
444$(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO)
445 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
446 $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
447 else \
448 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
449 $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
450 fi
451
452$(DHTEST): $(DHTEST).o $(DLIBCRYPTO)
453 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
454 $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
455 else \
456 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
457 $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
458 fi
459
460$(DSATEST): $(DSATEST).o $(DLIBCRYPTO)
461 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
462 $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
463 else \
464 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
465 $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
466 fi
467
468$(METHTEST): $(METHTEST).o $(DLIBCRYPTO)
469 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
470 $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
471 else \
472 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
473 $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
474 fi
475
476$(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
477 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
478 $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
479 else \
480 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
481 $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
482 fi
483
484$(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO)
485 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
486 $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
487 else \
488 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
489 $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
490 fi
491
492$(EVPTEST): $(EVPTEST).o $(DLIBCRYPTO)
493 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
494 $(CC) -o $(EVPTEST) $(CFLAGS) $(EVPTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
495 else \
496 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
497 $(CC) -o $(EVPTEST) $(CFLAGS) $(EVPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
498 fi
499
500#$(AESTEST).o: $(AESTEST).c
501# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
502
503#$(AESTEST): $(AESTEST).o $(DLIBCRYPTO)
504# if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
505# $(CC) -o $(AESTEST) $(CFLAGS) $(AESTEST).o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
506# else \
507# LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
508# $(CC) -o $(AESTEST) $(CFLAGS) $(AESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
509# fi
510
511dummytest: dummytest.o $(DLIBCRYPTO)
512 if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
513 $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(DLIBCRYPTO) $(EX_LIBS) ; \
514 else \
515 LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
516 $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) ; \
517 fi
518
519# DO NOT DELETE THIS LINE -- make depend depends on it.
520
521bftest.o: ../e_os.h ../include/openssl/blowfish.h ../include/openssl/e_os2.h
522bftest.o: ../include/openssl/opensslconf.h bftest.c
523bntest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
524bntest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
525bntest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
526bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h
527bntest.o: ../include/openssl/des.h ../include/openssl/des_old.h
528bntest.o: ../include/openssl/dh.h ../include/openssl/dsa.h
529bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
530bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h
531bntest.o: ../include/openssl/lhash.h ../include/openssl/md2.h
532bntest.o: ../include/openssl/md4.h ../include/openssl/md5.h
533bntest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
534bntest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
535bntest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
536bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
537bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
538bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
539bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
540bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h
541bntest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
542bntest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
543bntest.o: ../include/openssl/x509_vfy.h bntest.c
544casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h
545casttest.o: ../include/openssl/opensslconf.h casttest.c
546destest.o: ../include/openssl/crypto.h ../include/openssl/des.h
547destest.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
548destest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
549destest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
550destest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
551destest.o: ../include/openssl/ui_compat.h destest.c
552dhtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
553dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
554dhtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
555dhtest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
556dhtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
557dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
558dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h dhtest.c
559dsatest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
560dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
561dsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
562dsatest.o: ../include/openssl/err.h ../include/openssl/lhash.h
563dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
564dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
565dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
566dsatest.o: ../include/openssl/symhacks.h dsatest.c
567ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
568ectest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
569ectest.o: ../include/openssl/dh.h ../include/openssl/dsa.h
570ectest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
571ectest.o: ../include/openssl/engine.h ../include/openssl/err.h
572ectest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
573ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
574ectest.o: ../include/openssl/rand.h ../include/openssl/rsa.h
575ectest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
576ectest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h ectest.c
577enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
578enginetest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
579enginetest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
580enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
581enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h
582enginetest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
583enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
584enginetest.o: ../include/openssl/rand.h ../include/openssl/rsa.h
585enginetest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
586enginetest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
587enginetest.o: enginetest.c
588evp_test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
589evp_test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
590evp_test.o: ../include/openssl/bn.h ../include/openssl/cast.h
591evp_test.o: ../include/openssl/conf.h ../include/openssl/crypto.h
592evp_test.o: ../include/openssl/des.h ../include/openssl/des_old.h
593evp_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h
594evp_test.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
595evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h
596evp_test.o: ../include/openssl/idea.h ../include/openssl/lhash.h
597evp_test.o: ../include/openssl/md2.h ../include/openssl/md4.h
598evp_test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
599evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
600evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
601evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
602evp_test.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
603evp_test.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
604evp_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
605evp_test.o: ../include/openssl/sha.h ../include/openssl/stack.h
606evp_test.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
607evp_test.o: ../include/openssl/ui_compat.h evp_test.c
608exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
609exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
610exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h
611exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
612exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
613exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
614exptest.o: ../include/openssl/symhacks.h exptest.c
615hmactest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
616hmactest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
617hmactest.o: ../include/openssl/bn.h ../include/openssl/cast.h
618hmactest.o: ../include/openssl/crypto.h ../include/openssl/des.h
619hmactest.o: ../include/openssl/des_old.h ../include/openssl/dh.h
620hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
621hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h
622hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h
623hmactest.o: ../include/openssl/md4.h ../include/openssl/md5.h
624hmactest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
625hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
626hmactest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
627hmactest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
628hmactest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
629hmactest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
630hmactest.o: ../include/openssl/sha.h ../include/openssl/stack.h
631hmactest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
632hmactest.o: ../include/openssl/ui_compat.h hmactest.c
633ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h
634ideatest.o: ../include/openssl/opensslconf.h ideatest.c
635md2test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
636md2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
637md2test.o: ../include/openssl/bn.h ../include/openssl/cast.h
638md2test.o: ../include/openssl/crypto.h ../include/openssl/des.h
639md2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
640md2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
641md2test.o: ../include/openssl/evp.h ../include/openssl/idea.h
642md2test.o: ../include/openssl/md2.h ../include/openssl/md4.h
643md2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
644md2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
645md2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
646md2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
647md2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
648md2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
649md2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
650md2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
651md2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md2test.c
652md4test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
653md4test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
654md4test.o: ../include/openssl/bn.h ../include/openssl/cast.h
655md4test.o: ../include/openssl/crypto.h ../include/openssl/des.h
656md4test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
657md4test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
658md4test.o: ../include/openssl/evp.h ../include/openssl/idea.h
659md4test.o: ../include/openssl/md2.h ../include/openssl/md4.h
660md4test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
661md4test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
662md4test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
663md4test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
664md4test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
665md4test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
666md4test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
667md4test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
668md4test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md4test.c
669md5test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
670md5test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
671md5test.o: ../include/openssl/bn.h ../include/openssl/cast.h
672md5test.o: ../include/openssl/crypto.h ../include/openssl/des.h
673md5test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
674md5test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
675md5test.o: ../include/openssl/evp.h ../include/openssl/idea.h
676md5test.o: ../include/openssl/md2.h ../include/openssl/md4.h
677md5test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
678md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
679md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
680md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
681md5test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
682md5test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
683md5test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
684md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
685md5test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md5test.c
686mdc2test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
687mdc2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
688mdc2test.o: ../include/openssl/bn.h ../include/openssl/cast.h
689mdc2test.o: ../include/openssl/crypto.h ../include/openssl/des.h
690mdc2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
691mdc2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
692mdc2test.o: ../include/openssl/evp.h ../include/openssl/idea.h
693mdc2test.o: ../include/openssl/md2.h ../include/openssl/md4.h
694mdc2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
695mdc2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
696mdc2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
697mdc2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
698mdc2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
699mdc2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
700mdc2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
701mdc2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
702mdc2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h mdc2test.c
703randtest.o: ../e_os.h ../include/openssl/e_os2.h
704randtest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h
705randtest.o: ../include/openssl/rand.h randtest.c
706rc2test.o: ../e_os.h ../include/openssl/e_os2.h
707rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h rc2test.c
708rc4test.o: ../e_os.h ../include/openssl/e_os2.h
709rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h rc4test.c
710rc5test.o: ../e_os.h ../include/openssl/e_os2.h
711rc5test.o: ../include/openssl/opensslconf.h ../include/openssl/rc5.h rc5test.c
712rmdtest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
713rmdtest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
714rmdtest.o: ../include/openssl/bn.h ../include/openssl/cast.h
715rmdtest.o: ../include/openssl/crypto.h ../include/openssl/des.h
716rmdtest.o: ../include/openssl/des_old.h ../include/openssl/dh.h
717rmdtest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
718rmdtest.o: ../include/openssl/evp.h ../include/openssl/idea.h
719rmdtest.o: ../include/openssl/md2.h ../include/openssl/md4.h
720rmdtest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
721rmdtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
722rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
723rmdtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
724rmdtest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
725rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
726rmdtest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
727rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
728rmdtest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h rmdtest.c
729rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
730rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
731rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h
732rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
733rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
734rsa_test.o: ../include/openssl/rand.h ../include/openssl/rsa.h
735rsa_test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
736rsa_test.o: ../include/openssl/symhacks.h rsa_test.c
737sha1test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
738sha1test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
739sha1test.o: ../include/openssl/bn.h ../include/openssl/cast.h
740sha1test.o: ../include/openssl/crypto.h ../include/openssl/des.h
741sha1test.o: ../include/openssl/des_old.h ../include/openssl/dh.h
742sha1test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
743sha1test.o: ../include/openssl/evp.h ../include/openssl/idea.h
744sha1test.o: ../include/openssl/md2.h ../include/openssl/md4.h
745sha1test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
746sha1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
747sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
748sha1test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
749sha1test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
750sha1test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
751sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
752sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
753sha1test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h sha1test.c
754shatest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
755shatest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
756shatest.o: ../include/openssl/bn.h ../include/openssl/cast.h
757shatest.o: ../include/openssl/crypto.h ../include/openssl/des.h
758shatest.o: ../include/openssl/des_old.h ../include/openssl/dh.h
759shatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
760shatest.o: ../include/openssl/evp.h ../include/openssl/idea.h
761shatest.o: ../include/openssl/md2.h ../include/openssl/md4.h
762shatest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
763shatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
764shatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
765shatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h
766shatest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
767shatest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
768shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
769shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
770shatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h shatest.c
771ssltest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
772ssltest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
773ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
774ssltest.o: ../include/openssl/cast.h ../include/openssl/comp.h
775ssltest.o: ../include/openssl/crypto.h ../include/openssl/des.h
776ssltest.o: ../include/openssl/des_old.h ../include/openssl/dh.h
777ssltest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
778ssltest.o: ../include/openssl/engine.h ../include/openssl/err.h
779ssltest.o: ../include/openssl/evp.h ../include/openssl/idea.h
780ssltest.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
781ssltest.o: ../include/openssl/md2.h ../include/openssl/md4.h
782ssltest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
783ssltest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
784ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
785ssltest.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
786ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
787ssltest.o: ../include/openssl/rand.h ../include/openssl/rc2.h
788ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
789ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
790ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
791ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
792ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
793ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
794ssltest.o: ../include/openssl/tls1.h ../include/openssl/ui.h
795ssltest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
796ssltest.o: ../include/openssl/x509_vfy.h ssltest.c
diff --git a/src/lib/libssl/test/Sssdsa.cnf b/src/lib/libssl/test/Sssdsa.cnf
new file mode 100644
index 0000000000..8e170a28ef
--- /dev/null
+++ b/src/lib/libssl/test/Sssdsa.cnf
@@ -0,0 +1,27 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5# hacked by iang to do DSA certs - Server
6
7RANDFILE = ./.rnd
8
9####################################################################
10[ req ]
11distinguished_name = req_distinguished_name
12encrypt_rsa_key = no
13
14[ req_distinguished_name ]
15countryName = Country Name (2 letter code)
16countryName_default = ES
17countryName_value = ES
18
19organizationName = Organization Name (eg, company)
20organizationName_value = Tortilleras S.A.
21
220.commonName = Common Name (eg, YOUR name)
230.commonName_value = Torti
24
251.commonName = Common Name (eg, YOUR name)
261.commonName_value = Gordita
27
diff --git a/src/lib/libssl/test/Sssrsa.cnf b/src/lib/libssl/test/Sssrsa.cnf
new file mode 100644
index 0000000000..8c79a03fca
--- /dev/null
+++ b/src/lib/libssl/test/Sssrsa.cnf
@@ -0,0 +1,26 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5# create RSA certs - Server
6
7RANDFILE = ./.rnd
8
9####################################################################
10[ req ]
11distinguished_name = req_distinguished_name
12encrypt_key = no
13
14[ req_distinguished_name ]
15countryName = Country Name (2 letter code)
16countryName_default = ES
17countryName_value = ES
18
19organizationName = Organization Name (eg, company)
20organizationName_value = Tortilleras S.A.
21
220.commonName = Common Name (eg, YOUR name)
230.commonName_value = Torti
24
251.commonName = Common Name (eg, YOUR name)
261.commonName_value = Gordita
diff --git a/src/lib/libssl/test/Uss.cnf b/src/lib/libssl/test/Uss.cnf
new file mode 100644
index 0000000000..c89692d519
--- /dev/null
+++ b/src/lib/libssl/test/Uss.cnf
@@ -0,0 +1,28 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5
6RANDFILE = ./.rnd
7
8####################################################################
9[ req ]
10default_bits = 512
11default_keyfile = keySS.pem
12distinguished_name = req_distinguished_name
13encrypt_rsa_key = no
14default_md = md2
15
16[ req_distinguished_name ]
17countryName = Country Name (2 letter code)
18countryName_default = AU
19countryName_value = AU
20
21organizationName = Organization Name (eg, company)
22organizationName_value = Dodgy Brothers
23
240.commonName = Common Name (eg, YOUR name)
250.commonName_value = Brother 1
26
271.commonName = Common Name (eg, YOUR name)
281.commonName_value = Brother 2
diff --git a/src/lib/libssl/test/VMSca-response.1 b/src/lib/libssl/test/VMSca-response.1
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/src/lib/libssl/test/VMSca-response.1
@@ -0,0 +1 @@
diff --git a/src/lib/libssl/test/VMSca-response.2 b/src/lib/libssl/test/VMSca-response.2
new file mode 100644
index 0000000000..9b48ee4cf9
--- /dev/null
+++ b/src/lib/libssl/test/VMSca-response.2
@@ -0,0 +1,2 @@
1y
2y
diff --git a/src/lib/libssl/test/bctest b/src/lib/libssl/test/bctest
new file mode 100644
index 0000000000..bdb3218f7a
--- /dev/null
+++ b/src/lib/libssl/test/bctest
@@ -0,0 +1,111 @@
1#!/bin/sh
2
3# This script is used by test/Makefile.ssl to check whether a sane 'bc'
4# is installed.
5# ('make test_bn' should not try to run 'bc' if it does not exist or if
6# it is a broken 'bc' version that is known to cause trouble.)
7#
8# If 'bc' works, we also test if it knows the 'print' command.
9#
10# In any case, output an appropriate command line for running (or not
11# running) bc.
12
13
14IFS=:
15try_without_dir=true
16# First we try "bc", then "$dir/bc" for each item in $PATH.
17for dir in dummy:$PATH; do
18 if [ "$try_without_dir" = true ]; then
19 # first iteration
20 bc=bc
21 try_without_dir=false
22 else
23 # second and later iterations
24 bc="$dir/bc"
25 if [ ! -f "$bc" ]; then # '-x' is not available on Ultrix
26 bc=''
27 fi
28 fi
29
30 if [ ! "$bc" = '' ]; then
31 failure=none
32
33
34 # Test for SunOS 5.[78] bc bug
35 "$bc" >tmp.bctest <<\EOF
36obase=16
37ibase=16
38a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\
39CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\
4010F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\
41C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\
423BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\
434FC3CADF855448B24A9D7640BCF473E
44b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\
459209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\
468B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\
473ED0E2017D60A68775B75481449
48(a/b)*b + (a%b) - a
49EOF
50 if [ 0 != "`cat tmp.bctest`" ]; then
51 failure=SunOStest
52 fi
53
54
55 if [ "$failure" = none ]; then
56 # Test for SCO bc bug.
57 "$bc" >tmp.bctest <<\EOF
58obase=16
59ibase=16
60-FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\
619DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\
6211B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\
631239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\
64AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\
65F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\
66B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\
6702EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\
6885EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\
69A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\
70E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\
718C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\
7204E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\
7389C8D71
74AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\
75928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\
768A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\
7737F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\
78E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\
79F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\
809E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\
81D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\
825296964
83EOF
84 if [ "0
850" != "`cat tmp.bctest`" ]; then
86 failure=SCOtest
87 fi
88 fi
89
90
91 if [ "$failure" = none ]; then
92 # bc works; now check if it knows the 'print' command.
93 if [ "OK" = "`echo 'print \"OK\"' | $bc 2>/dev/null`" ]
94 then
95 echo "$bc"
96 else
97 echo "sed 's/print.*//' | $bc"
98 fi
99 exit 0
100 fi
101
102 echo "$bc does not work properly ('$failure' failed). Looking for another bc ..." >&2
103 fi
104done
105
106echo "No working bc found. Consider installing GNU bc." >&2
107if [ "$1" = ignore ]; then
108 echo "cat >/dev/null"
109 exit 0
110fi
111exit 1
diff --git a/src/lib/libssl/test/enginetest.c b/src/lib/libssl/test/enginetest.c
new file mode 100644
index 0000000000..87fa8c57b7
--- /dev/null
+++ b/src/lib/libssl/test/enginetest.c
@@ -0,0 +1,274 @@
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-2001 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/e_os2.h>
60#include <stdio.h>
61#include <string.h>
62#include <openssl/buffer.h>
63#include <openssl/crypto.h>
64#include <openssl/engine.h>
65#include <openssl/err.h>
66
67static void display_engine_list()
68 {
69 ENGINE *h;
70 int loop;
71
72 h = ENGINE_get_first();
73 loop = 0;
74 printf("listing available engine types\n");
75 while(h)
76 {
77 printf("engine %i, id = \"%s\", name = \"%s\"\n",
78 loop++, ENGINE_get_id(h), ENGINE_get_name(h));
79 h = ENGINE_get_next(h);
80 }
81 printf("end of list\n");
82 /* ENGINE_get_first() increases the struct_ref counter, so we
83 must call ENGINE_free() to decrease it again */
84 ENGINE_free(h);
85 }
86
87int main(int argc, char *argv[])
88 {
89 ENGINE *block[512];
90 char buf[256];
91 const char *id, *name;
92 ENGINE *ptr;
93 int loop;
94 int to_return = 1;
95 ENGINE *new_h1 = NULL;
96 ENGINE *new_h2 = NULL;
97 ENGINE *new_h3 = NULL;
98 ENGINE *new_h4 = NULL;
99
100 /* enable memory leak checking unless explicitly disabled */
101 if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))))
102 {
103 CRYPTO_malloc_debug_init();
104 CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);
105 }
106 else
107 {
108 /* OPENSSL_DEBUG_MEMORY=off */
109 CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0);
110 }
111 CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
112 ERR_load_crypto_strings();
113
114 memset(block, 0, 512 * sizeof(ENGINE *));
115 if(((new_h1 = ENGINE_new()) == NULL) ||
116 !ENGINE_set_id(new_h1, "test_id0") ||
117 !ENGINE_set_name(new_h1, "First test item") ||
118 ((new_h2 = ENGINE_new()) == NULL) ||
119 !ENGINE_set_id(new_h2, "test_id1") ||
120 !ENGINE_set_name(new_h2, "Second test item") ||
121 ((new_h3 = ENGINE_new()) == NULL) ||
122 !ENGINE_set_id(new_h3, "test_id2") ||
123 !ENGINE_set_name(new_h3, "Third test item") ||
124 ((new_h4 = ENGINE_new()) == NULL) ||
125 !ENGINE_set_id(new_h4, "test_id3") ||
126 !ENGINE_set_name(new_h4, "Fourth test item"))
127 {
128 printf("Couldn't set up test ENGINE structures\n");
129 goto end;
130 }
131 printf("\nenginetest beginning\n\n");
132 display_engine_list();
133 if(!ENGINE_add(new_h1))
134 {
135 printf("Add failed!\n");
136 goto end;
137 }
138 display_engine_list();
139 ptr = ENGINE_get_first();
140 if(!ENGINE_remove(ptr))
141 {
142 printf("Remove failed!\n");
143 goto end;
144 }
145 if (ptr)
146 ENGINE_free(ptr);
147 display_engine_list();
148 if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2))
149 {
150 printf("Add failed!\n");
151 goto end;
152 }
153 display_engine_list();
154 if(!ENGINE_remove(new_h2))
155 {
156 printf("Remove failed!\n");
157 goto end;
158 }
159 display_engine_list();
160 if(!ENGINE_add(new_h4))
161 {
162 printf("Add failed!\n");
163 goto end;
164 }
165 display_engine_list();
166 if(ENGINE_add(new_h3))
167 {
168 printf("Add *should* have failed but didn't!\n");
169 goto end;
170 }
171 else
172 printf("Add that should fail did.\n");
173 ERR_clear_error();
174 if(ENGINE_remove(new_h2))
175 {
176 printf("Remove *should* have failed but didn't!\n");
177 goto end;
178 }
179 else
180 printf("Remove that should fail did.\n");
181 ERR_clear_error();
182 if(!ENGINE_remove(new_h3))
183 {
184 printf("Remove failed!\n");
185 goto end;
186 }
187 display_engine_list();
188 if(!ENGINE_remove(new_h4))
189 {
190 printf("Remove failed!\n");
191 goto end;
192 }
193 display_engine_list();
194 /* Depending on whether there's any hardware support compiled
195 * in, this remove may be destined to fail. */
196 ptr = ENGINE_get_first();
197 if(ptr)
198 if(!ENGINE_remove(ptr))
199 printf("Remove failed!i - probably no hardware "
200 "support present.\n");
201 if (ptr)
202 ENGINE_free(ptr);
203 display_engine_list();
204 if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1))
205 {
206 printf("Couldn't add and remove to an empty list!\n");
207 goto end;
208 }
209 else
210 printf("Successfully added and removed to an empty list!\n");
211 printf("About to beef up the engine-type list\n");
212 for(loop = 0; loop < 512; loop++)
213 {
214 sprintf(buf, "id%i", loop);
215 id = BUF_strdup(buf);
216 sprintf(buf, "Fake engine type %i", loop);
217 name = BUF_strdup(buf);
218 if(((block[loop] = ENGINE_new()) == NULL) ||
219 !ENGINE_set_id(block[loop], id) ||
220 !ENGINE_set_name(block[loop], name))
221 {
222 printf("Couldn't create block of ENGINE structures.\n"
223 "I'll probably also core-dump now, damn.\n");
224 goto end;
225 }
226 }
227 for(loop = 0; loop < 512; loop++)
228 {
229 if(!ENGINE_add(block[loop]))
230 {
231 printf("\nAdding stopped at %i, (%s,%s)\n",
232 loop, ENGINE_get_id(block[loop]),
233 ENGINE_get_name(block[loop]));
234 goto cleanup_loop;
235 }
236 else
237 printf("."); fflush(stdout);
238 }
239cleanup_loop:
240 printf("\nAbout to empty the engine-type list\n");
241 while((ptr = ENGINE_get_first()) != NULL)
242 {
243 if(!ENGINE_remove(ptr))
244 {
245 printf("\nRemove failed!\n");
246 goto end;
247 }
248 ENGINE_free(ptr);
249 printf("."); fflush(stdout);
250 }
251 for(loop = 0; loop < 512; loop++)
252 {
253 OPENSSL_free((void *)ENGINE_get_id(block[loop]));
254 OPENSSL_free((void *)ENGINE_get_name(block[loop]));
255 }
256 printf("\nTests completed happily\n");
257 to_return = 0;
258end:
259 if(to_return)
260 ERR_print_errors_fp(stderr);
261 if(new_h1) ENGINE_free(new_h1);
262 if(new_h2) ENGINE_free(new_h2);
263 if(new_h3) ENGINE_free(new_h3);
264 if(new_h4) ENGINE_free(new_h4);
265 for(loop = 0; loop < 512; loop++)
266 if(block[loop])
267 ENGINE_free(block[loop]);
268 ENGINE_cleanup();
269 CRYPTO_cleanup_all_ex_data();
270 ERR_free_strings();
271 ERR_remove_state(0);
272 CRYPTO_mem_leaks_fp(stderr);
273 return to_return;
274 }
diff --git a/src/lib/libssl/test/md4test.c b/src/lib/libssl/test/md4test.c
new file mode 100644
index 0000000000..e0fdc42282
--- /dev/null
+++ b/src/lib/libssl/test/md4test.c
@@ -0,0 +1,134 @@
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 OPENSSL_NO_MD4
64int main(int argc, char *argv[])
65{
66 printf("No MD4 support\n");
67 return(0);
68}
69#else
70#include <openssl/evp.h>
71#include <openssl/md4.h>
72
73static char *test[]={
74 "",
75 "a",
76 "abc",
77 "message digest",
78 "abcdefghijklmnopqrstuvwxyz",
79 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
80 "12345678901234567890123456789012345678901234567890123456789012345678901234567890",
81 NULL,
82 };
83
84static char *ret[]={
85"31d6cfe0d16ae931b73c59d7e0c089c0",
86"bde52cb31de33e46245e05fbdbd6fb24",
87"a448017aaf21d8525fc10ae87aa6729d",
88"d9130a8164549fe818874806e1c7014b",
89"d79e1c308aa5bbcdeea8ed63df412da9",
90"043f8582f241db351ce627e153e7f0e4",
91"e33b4ddc9c38f2199c3e7b164fcc0536",
92};
93
94static char *pt(unsigned char *md);
95int main(int argc, char *argv[])
96 {
97 int i,err=0;
98 unsigned char **P,**R;
99 char *p;
100 unsigned char md[MD4_DIGEST_LENGTH];
101
102 P=(unsigned char **)test;
103 R=(unsigned char **)ret;
104 i=1;
105 while (*P != NULL)
106 {
107 EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md4(), NULL);
108 p=pt(md);
109 if (strcmp(p,(char *)*R) != 0)
110 {
111 printf("error calculating MD4 on '%s'\n",*P);
112 printf("got %s instead of %s\n",p,*R);
113 err++;
114 }
115 else
116 printf("test %d ok\n",i);
117 i++;
118 R++;
119 P++;
120 }
121 exit(err);
122 return(0);
123 }
124
125static char *pt(unsigned char *md)
126 {
127 int i;
128 static char buf[80];
129
130 for (i=0; i<MD4_DIGEST_LENGTH; i++)
131 sprintf(&(buf[i*2]),"%02x",md[i]);
132 return(buf);
133 }
134#endif
diff --git a/src/lib/libssl/test/methtest.c b/src/lib/libssl/test/methtest.c
new file mode 100644
index 0000000000..005c2f4822
--- /dev/null
+++ b/src/lib/libssl/test/methtest.c
@@ -0,0 +1,105 @@
1/* test/methtest.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/rsa.h>
62#include <openssl/x509.h>
63#include "meth.h"
64#include <openssl/err.h>
65
66int main(argc,argv)
67int argc;
68char *argv[];
69 {
70 METHOD_CTX *top,*tmp1,*tmp2;
71
72 top=METH_new(x509_lookup()); /* get a top level context */
73 if (top == NULL) goto err;
74
75 tmp1=METH_new(x509_by_file());
76 if (top == NULL) goto err;
77 METH_arg(tmp1,METH_TYPE_FILE,"cafile1");
78 METH_arg(tmp1,METH_TYPE_FILE,"cafile2");
79 METH_push(top,METH_X509_CA_BY_SUBJECT,tmp1);
80
81 tmp2=METH_new(x509_by_dir());
82 METH_arg(tmp2,METH_TYPE_DIR,"/home/eay/.CAcerts");
83 METH_arg(tmp2,METH_TYPE_DIR,"/home/eay/SSLeay/certs");
84 METH_arg(tmp2,METH_TYPE_DIR,"/usr/local/ssl/certs");
85 METH_push(top,METH_X509_CA_BY_SUBJECT,tmp2);
86
87/* tmp=METH_new(x509_by_issuer_dir);
88 METH_arg(tmp,METH_TYPE_DIR,"/home/eay/.mycerts");
89 METH_push(top,METH_X509_BY_ISSUER,tmp);
90
91 tmp=METH_new(x509_by_issuer_primary);
92 METH_arg(tmp,METH_TYPE_FILE,"/home/eay/.mycerts/primary.pem");
93 METH_push(top,METH_X509_BY_ISSUER,tmp);
94*/
95
96 METH_init(top);
97 METH_control(tmp1,METH_CONTROL_DUMP,stdout);
98 METH_control(tmp2,METH_CONTROL_DUMP,stdout);
99 EXIT(0);
100err:
101 ERR_load_crypto_strings();
102 ERR_print_errors_fp(stderr);
103 EXIT(1);
104 return(0);
105 }
diff --git a/src/lib/libssl/test/pkcs7-1.pem b/src/lib/libssl/test/pkcs7-1.pem
new file mode 100644
index 0000000000..c47b27af88
--- /dev/null
+++ b/src/lib/libssl/test/pkcs7-1.pem
@@ -0,0 +1,15 @@
1-----BEGIN PKCS7-----
2MIICUAYJKoZIhvcNAQcCoIICQTCCAj0CAQExDjAMBggqhkiG9w0CAgUAMCgGCSqG
3SIb3DQEHAaAbBBlFdmVyeW9uZSBnZXRzIEZyaWRheSBvZmYuoIIBXjCCAVowggEE
4AgQUAAApMA0GCSqGSIb3DQEBAgUAMCwxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRF
5eGFtcGxlIE9yZ2FuaXphdGlvbjAeFw05MjA5MDkyMjE4MDZaFw05NDA5MDkyMjE4
6MDVaMEIxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRFeGFtcGxlIE9yZ2FuaXphdGlv
7bjEUMBIGA1UEAxMLVGVzdCBVc2VyIDEwWzANBgkqhkiG9w0BAQEFAANKADBHAkAK
8ZnkdxpiBaN56t3QZu3+wwAHGJxAnAHUUKULhmo2MUdBTs+N4Kh3l3Fr06+mUaBcB
9FKHf5nzcmpr1XWVWILurAgMBAAEwDQYJKoZIhvcNAQECBQADQQBFGqHhqncgSl/N
109XYGnQL3MsJvNnsNV4puZPOakR9Hld8JlDQFEaDR30ogsmp3TMrvdfxpLlTCoZN8
11BxEmnZsWMYGbMIGYAgEBMDQwLDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFEV4YW1w
12bGUgT3JnYW5pemF0aW9uAgQUAAApMAwGCCqGSIb3DQICBQAwDQYJKoZIhvcNAQEB
13BQAEQAX6aoEvx9+L9PJUJQngPoRuEbnGIL4gCe+0QO+8xmkhaZSsBPNBtX0FIC1C
14j7Kie1x339mxW/w9VZNTUDQQweHh
15-----END PKCS7-----
diff --git a/src/lib/libssl/test/pkcs7.pem b/src/lib/libssl/test/pkcs7.pem
new file mode 100644
index 0000000000..d55c60b94e
--- /dev/null
+++ b/src/lib/libssl/test/pkcs7.pem
@@ -0,0 +1,54 @@
1 MIAGCSqGSIb3DQEHAqCAMIACAQExADCABgkqhkiG9w0BBwEAAKCAMIIE+DCCBGGg
2 AwIBAgIQaGSF/JpbS1C223+yrc+N1DANBgkqhkiG9w0BAQQFADBiMREwDwYDVQQH
3 EwhJbnRlcm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNVBAsTK1Zl
4 cmlTaWduIENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXIwHhcNOTYw
5 ODEyMDAwMDAwWhcNOTYwODE3MjM1OTU5WjCCASAxETAPBgNVBAcTCEludGVybmV0
6 MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24gQ2xh
7 c3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjE3MDUGA1UECxMuRGlnaXRh
8 bCBJRCBDbGFzcyAxIC0gU01JTUUgVmVyaVNpZ24sIEluYy4gVEVTVDFGMEQGA1UE
9 CxM9d3d3LnZlcmlzaWduLmNvbS9yZXBvc2l0b3J5L0NQUyBJbmNvcnAuIGJ5IFJl
10 Zi4sTElBQi5MVEQoYyk5NjEZMBcGA1UEAxMQQWxleGFuZHJlIERlYWNvbjEgMB4G
11 CSqGSIb3DQEJARYRYWxleEB2ZXJpc2lnbi5jb20wWzANBgkqhkiG9w0BAQEFAANK
12 ADBHAkAOy7xxCAIkOfuIA2LyRpxgKlDORl8htdXYhF5iBGUx1GYaK6KF+bK/CCI0
13 l4j2OfWGFBUrwGoWqxTNcWgTfMzRAgMBAAGjggIyMIICLjAJBgNVHRMEAjAAMIIC
14 HwYDVR0DBIICFjCCAhIwggIOMIICCgYLYIZIAYb4RQEHAQEwggH5FoIBp1RoaXMg
15 Y2VydGlmaWNhdGUgaW5jb3Jwb3JhdGVzIGJ5IHJlZmVyZW5jZSwgYW5kIGl0cyB1
16 c2UgaXMgc3RyaWN0bHkgc3ViamVjdCB0bywgdGhlIFZlcmlTaWduIENlcnRpZmlj
17 YXRpb24gUHJhY3RpY2UgU3RhdGVtZW50IChDUFMpLCBhdmFpbGFibGUgYXQ6IGh0
18 dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9DUFM7IGJ5IEUtbWFpbCBhdCBDUFMtcmVx
19 dWVzdHNAdmVyaXNpZ24uY29tOyBvciBieSBtYWlsIGF0IFZlcmlTaWduLCBJbmMu
20 LCAyNTkzIENvYXN0IEF2ZS4sIE1vdW50YWluIFZpZXcsIENBIDk0MDQzIFVTQSBU
21 ZWwuICsxICg0MTUpIDk2MS04ODMwIENvcHlyaWdodCAoYykgMTk5NiBWZXJpU2ln
22 biwgSW5jLiAgQWxsIFJpZ2h0cyBSZXNlcnZlZC4gQ0VSVEFJTiBXQVJSQU5USUVT
23 IERJU0NMQUlNRUQgYW5kIExJQUJJTElUWSBMSU1JVEVELqAOBgxghkgBhvhFAQcB
24 AQGhDgYMYIZIAYb4RQEHAQECMCwwKhYoaHR0cHM6Ly93d3cudmVyaXNpZ24uY29t
25 L3JlcG9zaXRvcnkvQ1BTIDANBgkqhkiG9w0BAQQFAAOBgQAimWMGQwwwxk+b3KAL
26 HlSWXtU7LWHe29CEG8XeVNTvrqs6SBqT7OoENOkGxpfdpVgZ3Qw2SKjxDvbvpfSF
27 slsqcxWSgB/hWuaVuZCkvTw/dYGGOxkTJGxvDCfl1PZjX4dKbatslsi9Z9HpGWT7
28 ttItRwKqcBKgmCJvKi1pGWED0zCCAnkwggHioAMCAQICEDURpVKQb+fQKaRAGdQR
29 /D4wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlT
30 aWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcnRp
31 ZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDYyNzAwMDAwMFoXDTk3MDYyNzIzNTk1
32 OVowYjERMA8GA1UEBxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMu
33 MTQwMgYDVQQLEytWZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJz
34 Y3JpYmVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2FKbPTdAFDdjKI9Bv
35 qrQpkmOOLPhvltcunXZLEbE2jVfJw/0cxrr+Hgi6M8qV6r7jW80GqLd5HUQq7XPy
36 sVKDaBBwZJHXPmv5912dFEObbpdFmIFH0S3L3bty10w/cariQPJUObwW7s987Lrb
37 P2wqsxaxhhKdrpM01bjV0Pc+qQIDAQABozMwMTAPBgNVHRMECDAGAQH/AgEBMAsG
38 A1UdDwQEAwIBBjARBglghkgBhvhCAQEEBAMCAgQwDQYJKoZIhvcNAQECBQADgYEA
39 KeXHoBmnbxRCgk0jM9e9mDppdxpsipIna/J8DOHEUuD4nONAr4+xOg73SBl026n7
40 Bk55A2wvAMGo7+kKTZ+rHaFDDcmq4O+rzFri2RIOeGAncj1IcGptAQhvXoIhFMG4
41 Jlzg1KlHZHqy7D3jex78zcSU7kKOu8f5tAX1jC3+sToAAKGAMIIBJzCBkTANBgkq
42 hkiG9w0BAQIFADBiMREwDwYDVQQHEwhJbnRlcm5ldDEXMBUGA1UEChMOVmVyaVNp
43 Z24sIEluYy4xNDAyBgNVBAsTK1ZlcmlTaWduIENsYXNzIDEgQ0EgLSBJbmRpdmlk
44 dWFsIFN1YnNjcmliZXIXDTk2MDcwMTE3MzA0MFoXDTk3MDcwMTAwMDAwMFowDQYJ
45 KoZIhvcNAQECBQADgYEAGLuQ6PX8A7AiqBEtWzYtl6lZNSDI0bR5YUo+D2Jzkw30
46 dxQnJSbKXEc6XYuzAW5HvrzATXu5c19WWPT4cRDwmjH71i9QcDysWwf/wE0qGTiW
47 I3tQT0I5VGh7jIJD07nlBw3R4Xl8dH9kr85JsWinqDH5YKpIo9o8knY5n7+qjOow
48 ggEkMIGOMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5W
49 ZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJpbWFyeSBD
50 ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eRcNOTYwNzE2MjMxMTI5WhcNOTYwODE1MDAw
51 MDAwWjANBgkqhkiG9w0BAQIFAAOBgQAXsLE4vnsY6sY67QrmWec7iaU2ehzxanEK
52 /9wKHZNuhlNzk+qGZZw2evxfUe2OaRbYpl8zuZvhK9BHD3ad14OSe9/zx5hOPgP/
53 DQXt6R4R8Q/1JheBrolrgbavjvI2wKS8/Psp2prBrkF4T48+AKRmS8Zzh1guxgvP
54 b+xSu/jH0gAAMYAAAAAAAAAAAA==
diff --git a/src/lib/libssl/test/r160test.c b/src/lib/libssl/test/r160test.c
new file mode 100644
index 0000000000..a172e393ca
--- /dev/null
+++ b/src/lib/libssl/test/r160test.c
@@ -0,0 +1,57 @@
1/* test/r160test.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 */
diff --git a/src/lib/libssl/test/rsa_test.c b/src/lib/libssl/test/rsa_test.c
new file mode 100644
index 0000000000..b8b462d33b
--- /dev/null
+++ b/src/lib/libssl/test/rsa_test.c
@@ -0,0 +1,318 @@
1/* test vectors from p1ovect1.txt */
2
3#include <stdio.h>
4#include <string.h>
5
6#include "e_os.h"
7
8#include <openssl/crypto.h>
9#include <openssl/err.h>
10#include <openssl/rand.h>
11#ifdef OPENSSL_NO_RSA
12int main(int argc, char *argv[])
13{
14 printf("No RSA support\n");
15 return(0);
16}
17#else
18#include <openssl/rsa.h>
19#include <openssl/engine.h>
20
21#define SetKey \
22 key->n = BN_bin2bn(n, sizeof(n)-1, key->n); \
23 key->e = BN_bin2bn(e, sizeof(e)-1, key->e); \
24 key->d = BN_bin2bn(d, sizeof(d)-1, key->d); \
25 key->p = BN_bin2bn(p, sizeof(p)-1, key->p); \
26 key->q = BN_bin2bn(q, sizeof(q)-1, key->q); \
27 key->dmp1 = BN_bin2bn(dmp1, sizeof(dmp1)-1, key->dmp1); \
28 key->dmq1 = BN_bin2bn(dmq1, sizeof(dmq1)-1, key->dmq1); \
29 key->iqmp = BN_bin2bn(iqmp, sizeof(iqmp)-1, key->iqmp); \
30 memcpy(c, ctext_ex, sizeof(ctext_ex) - 1); \
31 return (sizeof(ctext_ex) - 1);
32
33static int key1(RSA *key, unsigned char *c)
34 {
35 static unsigned char n[] =
36"\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
37"\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
38"\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93"
39"\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1"
40"\xF5";
41
42 static unsigned char e[] = "\x11";
43
44 static unsigned char d[] =
45"\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44"
46"\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
47"\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
48"\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51";
49
50 static unsigned char p[] =
51"\x00\xD8\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
52"\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x12"
53"\x0D";
54
55 static unsigned char q[] =
56"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
57"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
58"\x89";
59
60 static unsigned char dmp1[] =
61"\x59\x0B\x95\x72\xA2\xC2\xA9\xC4\x06\x05\x9D\xC2\xAB\x2F\x1D\xAF"
62"\xEB\x7E\x8B\x4F\x10\xA7\x54\x9E\x8E\xED\xF5\xB4\xFC\xE0\x9E\x05";
63
64 static unsigned char dmq1[] =
65"\x00\x8E\x3C\x05\x21\xFE\x15\xE0\xEA\x06\xA3\x6F\xF0\xF1\x0C\x99"
66"\x52\xC3\x5B\x7A\x75\x14\xFD\x32\x38\xB8\x0A\xAD\x52\x98\x62\x8D"
67"\x51";
68
69 static unsigned char iqmp[] =
70"\x36\x3F\xF7\x18\x9D\xA8\xE9\x0B\x1D\x34\x1F\x71\xD0\x9B\x76\xA8"
71"\xA9\x43\xE1\x1D\x10\xB2\x4D\x24\x9F\x2D\xEA\xFE\xF8\x0C\x18\x26";
72
73 static unsigned char ctext_ex[] =
74"\x1b\x8f\x05\xf9\xca\x1a\x79\x52\x6e\x53\xf3\xcc\x51\x4f\xdb\x89"
75"\x2b\xfb\x91\x93\x23\x1e\x78\xb9\x92\xe6\x8d\x50\xa4\x80\xcb\x52"
76"\x33\x89\x5c\x74\x95\x8d\x5d\x02\xab\x8c\x0f\xd0\x40\xeb\x58\x44"
77"\xb0\x05\xc3\x9e\xd8\x27\x4a\x9d\xbf\xa8\x06\x71\x40\x94\x39\xd2";
78
79 SetKey;
80 }
81
82static int key2(RSA *key, unsigned char *c)
83 {
84 static unsigned char n[] =
85"\x00\xA3\x07\x9A\x90\xDF\x0D\xFD\x72\xAC\x09\x0C\xCC\x2A\x78\xB8"
86"\x74\x13\x13\x3E\x40\x75\x9C\x98\xFA\xF8\x20\x4F\x35\x8A\x0B\x26"
87"\x3C\x67\x70\xE7\x83\xA9\x3B\x69\x71\xB7\x37\x79\xD2\x71\x7B\xE8"
88"\x34\x77\xCF";
89
90 static unsigned char e[] = "\x3";
91
92 static unsigned char d[] =
93"\x6C\xAF\xBC\x60\x94\xB3\xFE\x4C\x72\xB0\xB3\x32\xC6\xFB\x25\xA2"
94"\xB7\x62\x29\x80\x4E\x68\x65\xFC\xA4\x5A\x74\xDF\x0F\x8F\xB8\x41"
95"\x3B\x52\xC0\xD0\xE5\x3D\x9B\x59\x0F\xF1\x9B\xE7\x9F\x49\xDD\x21"
96"\xE5\xEB";
97
98 static unsigned char p[] =
99"\x00\xCF\x20\x35\x02\x8B\x9D\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92"
100"\xEA\x0D\xA3\xB4\x32\x04\xB5\xCF\xCE\x91";
101
102 static unsigned char q[] =
103"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
104"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5F";
105
106 static unsigned char dmp1[] =
107"\x00\x8A\x15\x78\xAC\x5D\x13\xAF\x10\x2B\x22\xB9\x99\xCD\x74\x61"
108"\xF1\x5E\x6D\x22\xCC\x03\x23\xDF\xDF\x0B";
109
110 static unsigned char dmq1[] =
111"\x00\x86\x55\x21\x4A\xC5\x4D\x8D\x4E\xCD\x61\x77\xF1\xC7\x36\x90"
112"\xCE\x2A\x48\x2C\x8B\x05\x99\xCB\xE0\x3F";
113
114 static unsigned char iqmp[] =
115"\x00\x83\xEF\xEF\xB8\xA9\xA4\x0D\x1D\xB6\xED\x98\xAD\x84\xED\x13"
116"\x35\xDC\xC1\x08\xF3\x22\xD0\x57\xCF\x8D";
117
118 static unsigned char ctext_ex[] =
119"\x14\xbd\xdd\x28\xc9\x83\x35\x19\x23\x80\xe8\xe5\x49\xb1\x58\x2a"
120"\x8b\x40\xb4\x48\x6d\x03\xa6\xa5\x31\x1f\x1f\xd5\xf0\xa1\x80\xe4"
121"\x17\x53\x03\x29\xa9\x34\x90\x74\xb1\x52\x13\x54\x29\x08\x24\x52"
122"\x62\x51";
123
124 SetKey;
125 }
126
127static int key3(RSA *key, unsigned char *c)
128 {
129 static unsigned char n[] =
130"\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
131"\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
132"\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD"
133"\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80"
134"\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25"
135"\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39"
136"\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68"
137"\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD"
138"\xCB";
139
140 static unsigned char e[] = "\x11";
141
142 static unsigned char d[] =
143"\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD"
144"\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41"
145"\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69"
146"\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA"
147"\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94"
148"\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A"
149"\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94"
150"\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
151"\xC1";
152
153 static unsigned char p[] =
154"\x00\xEE\xCF\xAE\x81\xB1\xB9\xB3\xC9\x08\x81\x0B\x10\xA1\xB5\x60"
155"\x01\x99\xEB\x9F\x44\xAE\xF4\xFD\xA4\x93\xB8\x1A\x9E\x3D\x84\xF6"
156"\x32\x12\x4E\xF0\x23\x6E\x5D\x1E\x3B\x7E\x28\xFA\xE7\xAA\x04\x0A"
157"\x2D\x5B\x25\x21\x76\x45\x9D\x1F\x39\x75\x41\xBA\x2A\x58\xFB\x65"
158"\x99";
159
160 static unsigned char q[] =
161"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
162"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
163"\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
164"\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x15"
165"\x03";
166
167 static unsigned char dmp1[] =
168"\x54\x49\x4C\xA6\x3E\xBA\x03\x37\xE4\xE2\x40\x23\xFC\xD6\x9A\x5A"
169"\xEB\x07\xDD\xDC\x01\x83\xA4\xD0\xAC\x9B\x54\xB0\x51\xF2\xB1\x3E"
170"\xD9\x49\x09\x75\xEA\xB7\x74\x14\xFF\x59\xC1\xF7\x69\x2E\x9A\x2E"
171"\x20\x2B\x38\xFC\x91\x0A\x47\x41\x74\xAD\xC9\x3C\x1F\x67\xC9\x81";
172
173 static unsigned char dmq1[] =
174"\x47\x1E\x02\x90\xFF\x0A\xF0\x75\x03\x51\xB7\xF8\x78\x86\x4C\xA9"
175"\x61\xAD\xBD\x3A\x8A\x7E\x99\x1C\x5C\x05\x56\xA9\x4C\x31\x46\xA7"
176"\xF9\x80\x3F\x8F\x6F\x8A\xE3\x42\xE9\x31\xFD\x8A\xE4\x7A\x22\x0D"
177"\x1B\x99\xA4\x95\x84\x98\x07\xFE\x39\xF9\x24\x5A\x98\x36\xDA\x3D";
178
179 static unsigned char iqmp[] =
180"\x00\xB0\x6C\x4F\xDA\xBB\x63\x01\x19\x8D\x26\x5B\xDB\xAE\x94\x23"
181"\xB3\x80\xF2\x71\xF7\x34\x53\x88\x50\x93\x07\x7F\xCD\x39\xE2\x11"
182"\x9F\xC9\x86\x32\x15\x4F\x58\x83\xB1\x67\xA9\x67\xBF\x40\x2B\x4E"
183"\x9E\x2E\x0F\x96\x56\xE6\x98\xEA\x36\x66\xED\xFB\x25\x79\x80\x39"
184"\xF7";
185
186 static unsigned char ctext_ex[] =
187"\xb8\x24\x6b\x56\xa6\xed\x58\x81\xae\xb5\x85\xd9\xa2\x5b\x2a\xd7"
188"\x90\xc4\x17\xe0\x80\x68\x1b\xf1\xac\x2b\xc3\xde\xb6\x9d\x8b\xce"
189"\xf0\xc4\x36\x6f\xec\x40\x0a\xf0\x52\xa7\x2e\x9b\x0e\xff\xb5\xb3"
190"\xf2\xf1\x92\xdb\xea\xca\x03\xc1\x27\x40\x05\x71\x13\xbf\x1f\x06"
191"\x69\xac\x22\xe9\xf3\xa7\x85\x2e\x3c\x15\xd9\x13\xca\xb0\xb8\x86"
192"\x3a\x95\xc9\x92\x94\xce\x86\x74\x21\x49\x54\x61\x03\x46\xf4\xd4"
193"\x74\xb2\x6f\x7c\x48\xb4\x2e\xe6\x8e\x1f\x57\x2a\x1f\xc4\x02\x6a"
194"\xc4\x56\xb4\xf5\x9f\x7b\x62\x1e\xa1\xb9\xd8\x8f\x64\x20\x2f\xb1";
195
196 SetKey;
197 }
198
199static int pad_unknown(void)
200{
201 unsigned long l;
202 while ((l = ERR_get_error()) != 0)
203 if (ERR_GET_REASON(l) == RSA_R_UNKNOWN_PADDING_TYPE)
204 return(1);
205 return(0);
206}
207
208static const char rnd_seed[] = "string to make the random number generator think it has entropy";
209
210int main(int argc, char *argv[])
211 {
212 int err=0;
213 int v;
214 RSA *key;
215 unsigned char ptext[256];
216 unsigned char ctext[256];
217 static unsigned char ptext_ex[] = "\x54\x85\x9b\x34\x2c\x49\xea\x2a";
218 unsigned char ctext_ex[256];
219 int plen;
220 int clen = 0;
221 int num;
222
223 CRYPTO_malloc_debug_init();
224 CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
225 CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
226
227 RAND_seed(rnd_seed, sizeof rnd_seed); /* or OAEP may fail */
228
229 plen = sizeof(ptext_ex) - 1;
230
231 for (v = 0; v < 3; v++)
232 {
233 key = RSA_new();
234 switch (v) {
235 case 0:
236 clen = key1(key, ctext_ex);
237 break;
238 case 1:
239 clen = key2(key, ctext_ex);
240 break;
241 case 2:
242 clen = key3(key, ctext_ex);
243 break;
244 }
245
246 num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
247 RSA_PKCS1_PADDING);
248 if (num != clen)
249 {
250 printf("PKCS#1 v1.5 encryption failed!\n");
251 err=1;
252 goto oaep;
253 }
254
255 num = RSA_private_decrypt(num, ctext, ptext, key,
256 RSA_PKCS1_PADDING);
257 if (num != plen || memcmp(ptext, ptext_ex, num) != 0)
258 {
259 printf("PKCS#1 v1.5 decryption failed!\n");
260 err=1;
261 }
262 else
263 printf("PKCS #1 v1.5 encryption/decryption ok\n");
264
265 oaep:
266 ERR_clear_error();
267 num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
268 RSA_PKCS1_OAEP_PADDING);
269 if (num == -1 && pad_unknown())
270 {
271 printf("No OAEP support\n");
272 goto next;
273 }
274 if (num != clen)
275 {
276 printf("OAEP encryption failed!\n");
277 err=1;
278 goto next;
279 }
280
281 num = RSA_private_decrypt(num, ctext, ptext, key,
282 RSA_PKCS1_OAEP_PADDING);
283 if (num != plen || memcmp(ptext, ptext_ex, num) != 0)
284 {
285 printf("OAEP decryption (encrypted data) failed!\n");
286 err=1;
287 }
288 else if (memcmp(ctext, ctext_ex, num) == 0)
289 {
290 printf("OAEP test vector %d passed!\n", v);
291 goto next;
292 }
293
294 /* Different ciphertexts (rsa_oaep.c without -DPKCS_TESTVECT).
295 Try decrypting ctext_ex */
296
297 num = RSA_private_decrypt(clen, ctext_ex, ptext, key,
298 RSA_PKCS1_OAEP_PADDING);
299
300 if (num != plen || memcmp(ptext, ptext_ex, num) != 0)
301 {
302 printf("OAEP decryption (test vector data) failed!\n");
303 err=1;
304 }
305 else
306 printf("OAEP encryption/decryption ok\n");
307 next:
308 RSA_free(key);
309 }
310
311 CRYPTO_cleanup_all_ex_data();
312 ERR_remove_state(0);
313
314 CRYPTO_mem_leaks_fp(stderr);
315
316 return err;
317 }
318#endif
diff --git a/src/lib/libssl/test/tcrl b/src/lib/libssl/test/tcrl
new file mode 100644
index 0000000000..f71ef7a863
--- /dev/null
+++ b/src/lib/libssl/test/tcrl
@@ -0,0 +1,85 @@
1#!/bin/sh
2
3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
8export PATH
9
10cmd='../apps/openssl crl'
11
12if [ "$1"x != "x" ]; then
13 t=$1
14else
15 t=testcrl.pem
16fi
17
18echo testing crl conversions
19cp $t fff.p
20
21echo "p -> d"
22$cmd -in fff.p -inform p -outform d >f.d
23if [ $? != 0 ]; then exit 1; fi
24#echo "p -> t"
25#$cmd -in fff.p -inform p -outform t >f.t
26#if [ $? != 0 ]; then exit 1; fi
27echo "p -> p"
28$cmd -in fff.p -inform p -outform p >f.p
29if [ $? != 0 ]; then exit 1; fi
30
31echo "d -> d"
32$cmd -in f.d -inform d -outform d >ff.d1
33if [ $? != 0 ]; then exit 1; fi
34#echo "t -> d"
35#$cmd -in f.t -inform t -outform d >ff.d2
36#if [ $? != 0 ]; then exit 1; fi
37echo "p -> d"
38$cmd -in f.p -inform p -outform d >ff.d3
39if [ $? != 0 ]; then exit 1; fi
40
41#echo "d -> t"
42#$cmd -in f.d -inform d -outform t >ff.t1
43#if [ $? != 0 ]; then exit 1; fi
44#echo "t -> t"
45#$cmd -in f.t -inform t -outform t >ff.t2
46#if [ $? != 0 ]; then exit 1; fi
47#echo "p -> t"
48#$cmd -in f.p -inform p -outform t >ff.t3
49#if [ $? != 0 ]; then exit 1; fi
50
51echo "d -> p"
52$cmd -in f.d -inform d -outform p >ff.p1
53if [ $? != 0 ]; then exit 1; fi
54#echo "t -> p"
55#$cmd -in f.t -inform t -outform p >ff.p2
56#if [ $? != 0 ]; then exit 1; fi
57echo "p -> p"
58$cmd -in f.p -inform p -outform p >ff.p3
59if [ $? != 0 ]; then exit 1; fi
60
61cmp fff.p f.p
62if [ $? != 0 ]; then exit 1; fi
63cmp fff.p ff.p1
64if [ $? != 0 ]; then exit 1; fi
65#cmp fff.p ff.p2
66#if [ $? != 0 ]; then exit 1; fi
67cmp fff.p ff.p3
68if [ $? != 0 ]; then exit 1; fi
69
70#cmp f.t ff.t1
71#if [ $? != 0 ]; then exit 1; fi
72#cmp f.t ff.t2
73#if [ $? != 0 ]; then exit 1; fi
74#cmp f.t ff.t3
75#if [ $? != 0 ]; then exit 1; fi
76
77cmp f.p ff.p1
78if [ $? != 0 ]; then exit 1; fi
79#cmp f.p ff.p2
80#if [ $? != 0 ]; then exit 1; fi
81cmp f.p ff.p3
82if [ $? != 0 ]; then exit 1; fi
83
84/bin/rm -f f.* ff.* fff.*
85exit 0
diff --git a/src/lib/libssl/test/test.cnf b/src/lib/libssl/test/test.cnf
new file mode 100644
index 0000000000..faad3914a8
--- /dev/null
+++ b/src/lib/libssl/test/test.cnf
@@ -0,0 +1,88 @@
1#
2# SSLeay example configuration file.
3# This is mostly being used for generation of certificate requests.
4#
5
6RANDFILE = ./.rnd
7
8####################################################################
9[ ca ]
10default_ca = CA_default # The default ca section
11
12####################################################################
13[ CA_default ]
14
15dir = ./demoCA # Where everything is kept
16certs = $dir/certs # Where the issued certs are kept
17crl_dir = $dir/crl # Where the issued crl are kept
18database = $dir/index.txt # database index file.
19new_certs_dir = $dir/new_certs # default place for new certs.
20
21certificate = $dir/CAcert.pem # The CA certificate
22serial = $dir/serial # The current serial number
23crl = $dir/crl.pem # The current CRL
24private_key = $dir/private/CAkey.pem# The private key
25RANDFILE = $dir/private/.rand # private random number file
26
27default_days = 365 # how long to certify for
28default_crl_days= 30 # how long before next CRL
29default_md = md5 # which md to use.
30
31# A few difference way of specifying how similar the request should look
32# For type CA, the listed attributes must be the same, and the optional
33# and supplied fields are just that :-)
34policy = policy_match
35
36# For the CA policy
37[ policy_match ]
38countryName = match
39stateOrProvinceName = match
40organizationName = match
41organizationalUnitName = optional
42commonName = supplied
43emailAddress = optional
44
45# For the 'anything' policy
46# At this point in time, you must list all acceptable 'object'
47# types.
48[ policy_anything ]
49countryName = optional
50stateOrProvinceName = optional
51localityName = optional
52organizationName = optional
53organizationalUnitName = optional
54commonName = supplied
55emailAddress = optional
56
57####################################################################
58[ req ]
59default_bits = 512
60default_keyfile = testkey.pem
61distinguished_name = req_distinguished_name
62encrypt_rsa_key = no
63
64[ req_distinguished_name ]
65countryName = Country Name (2 letter code)
66countryName_default = AU
67countryName_value = AU
68
69stateOrProvinceName = State or Province Name (full name)
70stateOrProvinceName_default = Queensland
71stateOrProvinceName_value =
72
73localityName = Locality Name (eg, city)
74localityName_value = Brisbane
75
76organizationName = Organization Name (eg, company)
77organizationName_default =
78organizationName_value = CryptSoft Pty Ltd
79
80organizationalUnitName = Organizational Unit Name (eg, section)
81organizationalUnitName_default =
82organizationalUnitName_value = .
83
84commonName = Common Name (eg, YOUR name)
85commonName_value = Eric Young
86
87emailAddress = Email Address
88emailAddress_value = eay@mincom.oz.au
diff --git a/src/lib/libssl/test/testca b/src/lib/libssl/test/testca
new file mode 100644
index 0000000000..8215ebb5d1
--- /dev/null
+++ b/src/lib/libssl/test/testca
@@ -0,0 +1,48 @@
1#!/bin/sh
2
3SH="/bin/sh"
4if test "$OSTYPE" = msdosdjgpp; then
5 PATH=./apps\;../apps\;$PATH
6else
7 PATH=../apps:$PATH
8fi
9export SH PATH
10
11SSLEAY_CONFIG="-config CAss.cnf"
12export SSLEAY_CONFIG
13
14/bin/rm -fr demoCA
15$SH ../apps/CA.sh -newca <<EOF
16EOF
17
18if [ $? != 0 ]; then
19 exit 1;
20fi
21
22SSLEAY_CONFIG="-config Uss.cnf"
23export SSLEAY_CONFIG
24$SH ../apps/CA.sh -newreq
25if [ $? != 0 ]; then
26 exit 1;
27fi
28
29
30SSLEAY_CONFIG="-config ../apps/openssl.cnf"
31export SSLEAY_CONFIG
32$SH ../apps/CA.sh -sign <<EOF
33y
34y
35EOF
36if [ $? != 0 ]; then
37 exit 1;
38fi
39
40
41$SH ../apps/CA.sh -verify newcert.pem
42if [ $? != 0 ]; then
43 exit 1;
44fi
45
46/bin/rm -fr demoCA newcert.pem newreq.pem
47#usage: CA -newcert|-newreq|-newca|-sign|-verify
48
diff --git a/src/lib/libssl/test/testcrl.pem b/src/lib/libssl/test/testcrl.pem
new file mode 100644
index 0000000000..0989788354
--- /dev/null
+++ b/src/lib/libssl/test/testcrl.pem
@@ -0,0 +1,16 @@
1-----BEGIN X509 CRL-----
2MIICjTCCAfowDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMxIDAeBgNVBAoT
3F1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2VydmVy
4IENlcnRpZmljYXRpb24gQXV0aG9yaXR5Fw05NTA1MDIwMjEyMjZaFw05NTA2MDEw
5MDAxNDlaMIIBaDAWAgUCQQAABBcNOTUwMjAxMTcyNDI2WjAWAgUCQQAACRcNOTUw
6MjEwMDIxNjM5WjAWAgUCQQAADxcNOTUwMjI0MDAxMjQ5WjAWAgUCQQAADBcNOTUw
7MjI1MDA0NjQ0WjAWAgUCQQAAGxcNOTUwMzEzMTg0MDQ5WjAWAgUCQQAAFhcNOTUw
8MzE1MTkxNjU0WjAWAgUCQQAAGhcNOTUwMzE1MTk0MDQxWjAWAgUCQQAAHxcNOTUw
9MzI0MTk0NDMzWjAWAgUCcgAABRcNOTUwMzI5MjAwNzExWjAWAgUCcgAAERcNOTUw
10MzMwMDIzNDI2WjAWAgUCQQAAIBcNOTUwNDA3MDExMzIxWjAWAgUCcgAAHhcNOTUw
11NDA4MDAwMjU5WjAWAgUCcgAAQRcNOTUwNDI4MTcxNzI0WjAWAgUCcgAAOBcNOTUw
12NDI4MTcyNzIxWjAWAgUCcgAATBcNOTUwNTAyMDIxMjI2WjANBgkqhkiG9w0BAQIF
13AAN+AHqOEJXSDejYy0UwxxrH/9+N2z5xu/if0J6qQmK92W0hW158wpJg+ovV3+wQ
14wvIEPRL2rocL0tKfAsVq1IawSJzSNgxG0lrcla3MrJBnZ4GaZDu4FutZh72MR3Gt
15JaAL3iTJHJD55kK2D/VoyY1djlsPuNh6AEgdVwFAyp0v
16-----END X509 CRL-----
diff --git a/src/lib/libssl/test/testenc b/src/lib/libssl/test/testenc
new file mode 100644
index 0000000000..0656c7f525
--- /dev/null
+++ b/src/lib/libssl/test/testenc
@@ -0,0 +1,54 @@
1#!/bin/sh
2
3testsrc=Makefile.ssl
4test=./p
5cmd=../apps/openssl
6
7cat $testsrc >$test;
8
9echo cat
10$cmd enc < $test > $test.cipher
11$cmd enc < $test.cipher >$test.clear
12cmp $test $test.clear
13if [ $? != 0 ]
14then
15 exit 1
16else
17 /bin/rm $test.cipher $test.clear
18fi
19echo base64
20$cmd enc -a -e < $test > $test.cipher
21$cmd enc -a -d < $test.cipher >$test.clear
22cmp $test $test.clear
23if [ $? != 0 ]
24then
25 exit 1
26else
27 /bin/rm $test.cipher $test.clear
28fi
29
30for i in `$cmd list-cipher-commands`
31do
32 echo $i
33 $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher
34 $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear
35 cmp $test $test.$i.clear
36 if [ $? != 0 ]
37 then
38 exit 1
39 else
40 /bin/rm $test.$i.cipher $test.$i.clear
41 fi
42
43 echo $i base64
44 $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher
45 $cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear
46 cmp $test $test.$i.clear
47 if [ $? != 0 ]
48 then
49 exit 1
50 else
51 /bin/rm $test.$i.cipher $test.$i.clear
52 fi
53done
54rm -f $test
diff --git a/src/lib/libssl/test/testgen b/src/lib/libssl/test/testgen
new file mode 100644
index 0000000000..3798543e04
--- /dev/null
+++ b/src/lib/libssl/test/testgen
@@ -0,0 +1,44 @@
1#!/bin/sh
2
3T=testcert
4KEY=512
5CA=../certs/testca.pem
6
7/bin/rm -f $T.1 $T.2 $T.key
8
9if test "$OSTYPE" = msdosdjgpp; then
10 PATH=../apps\;$PATH;
11else
12 PATH=../apps:$PATH;
13fi
14export PATH
15
16echo "generating certificate request"
17
18echo "string to make the random number generator think it has entropy" >> ./.rnd
19
20if ../apps/openssl no-rsa; then
21 req_new='-newkey dsa:../apps/dsa512.pem'
22else
23 req_new='-new'
24 echo "There should be a 2 sequences of .'s and some +'s."
25 echo "There should not be more that at most 80 per line"
26fi
27
28echo "This could take some time."
29
30rm -f testkey.pem testreq.pem
31
32../apps/openssl req -config test.cnf $req_new -out testreq.pem
33if [ $? != 0 ]; then
34echo problems creating request
35exit 1
36fi
37
38../apps/openssl req -config test.cnf -verify -in testreq.pem -noout
39if [ $? != 0 ]; then
40echo signature on req is wrong
41exit 1
42fi
43
44exit 0
diff --git a/src/lib/libssl/test/testp7.pem b/src/lib/libssl/test/testp7.pem
new file mode 100644
index 0000000000..e5b7866c31
--- /dev/null
+++ b/src/lib/libssl/test/testp7.pem
@@ -0,0 +1,46 @@
1-----BEGIN PKCS7-----
2MIIIGAYJKoZIhvcNAQcCoIIICTCCCAUCAQExADALBgkqhkiG9w0BBwGgggY8MIIE
3cjCCBBygAwIBAgIQeS+OJfWJUZAx6cX0eAiMjzANBgkqhkiG9w0BAQQFADBiMREw
4DwYDVQQHEwhJbnRlcm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNV
5BAsTK1ZlcmlTaWduIENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXIw
6HhcNOTYwNzE5MDAwMDAwWhcNOTcwMzMwMjM1OTU5WjCB1TERMA8GA1UEBxMISW50
7ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJpU2ln
8biBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMSgwJgYDVQQLEx9E
9aWdpdGFsIElEIENsYXNzIDEgLSBTTUlNRSBUZXN0MUcwRQYDVQQLEz53d3cudmVy
10aXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEuMCBJbmMuIGJ5IFJlZi4sTElBQi5M
11VEQoYyk5NjBbMA0GCSqGSIb3DQEBAQUAA0oAMEcCQA7LvHEIAiQ5+4gDYvJGnGAq
12UM5GXyG11diEXmIEZTHUZhorooX5sr8IIjSXiPY59YYUFSvAaharFM1xaBN8zNEC
13AwEAAaOCAjkwggI1MAkGA1UdEwQCMAAwggImBgNVHQMEggIdMIICGTCCAhUwggIR
14BgtghkgBhvhFAQcBATCCAgAWggGrVGhpcyBjZXJ0aWZpY2F0ZSBpbmNvcnBvcmF0
15ZXMgYnkgcmVmZXJlbmNlLCBhbmQgaXRzIHVzZSBpcyBzdHJpY3RseSBzdWJqZWN0
16IHRvLCB0aGUgVmVyaVNpZ24gQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0ZW1l
17bnQgKENQUyksIGF2YWlsYWJsZSBhdDogaHR0cHM6Ly93d3cudmVyaXNpZ24uY29t
18L0NQUy0xLjA7IGJ5IEUtbWFpbCBhdCBDUFMtcmVxdWVzdHNAdmVyaXNpZ24uY29t
19OyBvciBieSBtYWlsIGF0IFZlcmlTaWduLCBJbmMuLCAyNTkzIENvYXN0IEF2ZS4s
20IE1vdW50YWluIFZpZXcsIENBIDk0MDQzIFVTQSBUZWwuICsxICg0MTUpIDk2MS04
21ODMwIENvcHlyaWdodCAoYykgMTk5NiBWZXJpU2lnbiwgSW5jLiAgQWxsIFJpZ2h0
22cyBSZXNlcnZlZC4gQ0VSVEFJTiBXQVJSQU5USUVTIERJU0NMQUlNRUQgYW5kIExJ
23QUJJTElUWSBMSU1JVEVELqAOBgxghkgBhvhFAQcBAQGhDgYMYIZIAYb4RQEHAQEC
24MC8wLRYraHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEu
25AzANBgkqhkiG9w0BAQQFAANBAMCYDuSb/eIlYSxY31nZZTaCZkCSfHjlacMofExr
26cF+A2yHoEuT+eCQkqM0pMNHXddUeoQ9RjV+VuMBNmm63DUYwggHCMIIBbKADAgEC
27AhB8CYTq1bkRFJBYOd67cp9JMA0GCSqGSIb3DQEBAgUAMD4xCzAJBgNVBAYTAlVT
28MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEWMBQGA1UECxMNVEVTVCBSb290IFBD
29QTAeFw05NjA3MTcwMDAwMDBaFw05NzA3MTcyMzU5NTlaMGIxETAPBgNVBAcTCElu
30dGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNp
31Z24gQ2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjBcMA0GCSqGSIb3
32DQEBAQUAA0sAMEgCQQDsVzrNgnDhbAJZrWeLd9g1vMZJA2W67D33TTbga6yMt+ES
33TWEywhS6RNP+fzLGg7utinjH4tL60cXa0G27GDsLAgMBAAGjIjAgMAsGA1UdDwQE
34AwIBBjARBglghkgBhvhCAQEEBAMCAgQwDQYJKoZIhvcNAQECBQADQQAUp6bRwkaD
352d1MBs/mjUcgTI2fXVmW8tTm/Ud6OzUwpC3vYgybiOOA4f6mOC5dbyUHrLOsrihU
3647ZQ0Jo1DUfboYIBrTCBwTBtMA0GCSqGSIb3DQEBAgUAMD4xCzAJBgNVBAYTAlVT
37MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEWMBQGA1UECxMNVEVTVCBSb290IFBD
38QRcNOTYwNzE3MTc0NDA5WhcNOTgwNzE3MDAwMDAwWjANBgkqhkiG9w0BAQIFAANB
39AHitA0/xAukCjHzeh1AMT/l2oC68N+yFb+aJPHBBMxc6gG2MaKjBNwb5hcXUllMl
40ExONA3ju10f7owIq3s3wx10wgeYwgZEwDQYJKoZIhvcNAQECBQAwYjERMA8GA1UE
41BxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytW
42ZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyFw05NjA3
43MTcxNzU5MjlaFw05NzA3MTgwMDAwMDBaMA0GCSqGSIb3DQEBAgUAA0EAubVWYTsW
44sQmste9f+UgMw8BkjDlM25fwQLrCfmmnLxjewey10kSROypUaJLb+r4oRALc0fG9
45XfZsaiiIgotQHjEA
46-----END PKCS7-----
diff --git a/src/lib/libssl/test/testreq2.pem b/src/lib/libssl/test/testreq2.pem
new file mode 100644
index 0000000000..c3cdcffcbc
--- /dev/null
+++ b/src/lib/libssl/test/testreq2.pem
@@ -0,0 +1,7 @@
1-----BEGIN CERTIFICATE REQUEST-----
2MIHaMIGFAgEAMA4xDDAKBgNVBAMTA2NuNDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC
3QQCQsnkyUGDY2R3mYoeTprFJKgWuJ3f1jUjlIuW5+wfAUoeMt35c4vcFZ2mIBpEG
4DtzkNQN1kr2O9ldm9zYnYhyhAgMBAAGgEjAQBgorBgEEAYI3AgEOMQIwADANBgkq
5hkiG9w0BAQQFAANBAAb2szZgVIxg3vK6kYLjGSBISyuzcXJ6IvuPW6M+yzi1Qgoi
6gQhazHTJp91T8ItZEzUJGZSZl2e5iXlnffWB+/U=
7-----END CERTIFICATE REQUEST-----
diff --git a/src/lib/libssl/test/testrsa.pem b/src/lib/libssl/test/testrsa.pem
new file mode 100644
index 0000000000..aad21067a8
--- /dev/null
+++ b/src/lib/libssl/test/testrsa.pem
@@ -0,0 +1,9 @@
1-----BEGIN RSA PRIVATE KEY-----
2MIIBPAIBAAJBAKrbeqkuRk8VcRmWFmtP+LviMB3+6dizWW3DwaffznyHGAFwUJ/I
3Tv0XtbsCyl3QoyKGhrOAy3RvPK5M38iuXT0CAwEAAQJAZ3cnzaHXM/bxGaR5CR1R
4rD1qFBAVfoQFiOH9uPJgMaoAuoQEisPHVcZDKcOv4wEg6/TInAIXBnEigtqvRzuy
5oQIhAPcgZzUq3yVooAaoov8UbXPxqHlwo6GBMqnv20xzkf6ZAiEAsP4BnIaQTM8S
6mvcpHZwQJdmdHHkGKAs37Dfxi67HbkUCIQCeZGliHXFa071Fp06ZeWlR2ADonTZz
7rJBhdTe0v5pCeQIhAIZfkiGgGBX4cIuuckzEm43g9WMUjxP/0GlK39vIyihxAiEA
8mymehFRT0MvqW5xAKAx7Pgkt8HVKwVhc2LwGKHE0DZM=
9-----END RSA PRIVATE KEY-----
diff --git a/src/lib/libssl/test/testsid.pem b/src/lib/libssl/test/testsid.pem
new file mode 100644
index 0000000000..7ffd008f66
--- /dev/null
+++ b/src/lib/libssl/test/testsid.pem
@@ -0,0 +1,12 @@
1-----BEGIN SSL SESSION PARAMETERS-----
2MIIB1gIBAQIBAgQDAQCABBCi11xa5qkOP8xrr02K/NQCBBBkIYQZM0Bt95W0EHNV
3bA58oQYCBDIBr7WiBAICASyjggGGMIIBgjCCASwCAQMwDQYJKoZIhvcNAQEEBQAw
4ODELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3Jz
5YSB0ZXN0IENBMB4XDTk1MTAwOTIzMzEzNFoXDTk4MDcwNTIzMzEzNFowYDELMAkG
6A1UEBhMCQVUxDDAKBgNVBAgTA1FMRDEZMBcGA1UEChMQTWluY29tIFB0eS4gTHRk
7LjELMAkGA1UECxMCQ1MxGzAZBgNVBAMTElNTTGVheSBkZW1vIGNsaWVudDBcMA0G
8CSqGSIb3DQEBAQUAA0sAMEgCQQC4pcXEL1lgVA+B5Q3TcuW/O3LZHoA73IYm8oFD
9TezgCDhL2RTMn+seKWF36UtJKRIOBU9jZHCVVd0Me5ls6BEjAgMBAAEwDQYJKoZI
10hvcNAQEEBQADQQBoIpOcwUY1qlVF7j3ROSGvUsbvByOBFmYWkIBgsCqR+9qo1A7L
11CrWF5i8LWt/vLwAHaxWNx2YuBJMFyuK81fTvpA0EC3Rlc3Rjb250ZXh0
12-----END SSL SESSION PARAMETERS-----
diff --git a/src/lib/libssl/test/testss b/src/lib/libssl/test/testss
new file mode 100644
index 0000000000..8d3557f356
--- /dev/null
+++ b/src/lib/libssl/test/testss
@@ -0,0 +1,99 @@
1#!/bin/sh
2
3digest='-md5'
4reqcmd="../apps/openssl req"
5x509cmd="../apps/openssl x509 $digest"
6verifycmd="../apps/openssl verify"
7dummycnf="../apps/openssl.cnf"
8
9CAkey="keyCA.ss"
10CAcert="certCA.ss"
11CAreq="reqCA.ss"
12CAconf="CAss.cnf"
13CAreq2="req2CA.ss" # temp
14
15Uconf="Uss.cnf"
16Ukey="keyU.ss"
17Ureq="reqU.ss"
18Ucert="certU.ss"
19
20echo
21echo "make a certificate request using 'req'"
22
23echo "string to make the random number generator think it has entropy" >> ./.rnd
24
25if ../apps/openssl no-rsa; then
26 req_new='-newkey dsa:../apps/dsa512.pem'
27else
28 req_new='-new'
29fi
30
31$reqcmd -config $CAconf -out $CAreq -keyout $CAkey $req_new #>err.ss
32if [ $? != 0 ]; then
33 echo "error using 'req' to generate a certificate request"
34 exit 1
35fi
36echo
37echo "convert the certificate request into a self signed certificate using 'x509'"
38$x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >err.ss
39if [ $? != 0 ]; then
40 echo "error using 'x509' to self sign a certificate request"
41 exit 1
42fi
43
44echo
45echo "convert a certificate into a certificate request using 'x509'"
46$x509cmd -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 >err.ss
47if [ $? != 0 ]; then
48 echo "error using 'x509' convert a certificate to a certificate request"
49 exit 1
50fi
51
52$reqcmd -config $dummycnf -verify -in $CAreq -noout
53if [ $? != 0 ]; then
54 echo first generated request is invalid
55 exit 1
56fi
57
58$reqcmd -config $dummycnf -verify -in $CAreq2 -noout
59if [ $? != 0 ]; then
60 echo second generated request is invalid
61 exit 1
62fi
63
64$verifycmd -CAfile $CAcert $CAcert
65if [ $? != 0 ]; then
66 echo first generated cert is invalid
67 exit 1
68fi
69
70echo
71echo "make another certificate request using 'req'"
72$reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss
73if [ $? != 0 ]; then
74 echo "error using 'req' to generate a certificate request"
75 exit 1
76fi
77
78echo
79echo "sign certificate request with the just created CA via 'x509'"
80$x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey >err.ss
81if [ $? != 0 ]; then
82 echo "error using 'x509' to sign a certificate request"
83 exit 1
84fi
85
86$verifycmd -CAfile $CAcert $Ucert
87echo
88echo "Certificate details"
89$x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert
90
91echo
92echo The generated CA certificate is $CAcert
93echo The generated CA private key is $CAkey
94
95echo The generated user certificate is $Ucert
96echo The generated user private key is $Ukey
97
98/bin/rm err.ss
99exit 0
diff --git a/src/lib/libssl/test/testssl b/src/lib/libssl/test/testssl
new file mode 100644
index 0000000000..ca8e718022
--- /dev/null
+++ b/src/lib/libssl/test/testssl
@@ -0,0 +1,145 @@
1#!/bin/sh
2
3if [ "$1" = "" ]; then
4 key=../apps/server.pem
5else
6 key="$1"
7fi
8if [ "$2" = "" ]; then
9 cert=../apps/server.pem
10else
11 cert="$2"
12fi
13ssltest="./ssltest -key $key -cert $cert -c_key $key -c_cert $cert"
14
15if ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then
16 dsa_cert=YES
17else
18 dsa_cert=NO
19fi
20
21if [ "$3" = "" ]; then
22 CA="-CApath ../certs"
23else
24 CA="-CAfile $3"
25fi
26
27if [ "$4" = "" ]; then
28 extra=""
29else
30 extra="$4"
31fi
32
33#############################################################################
34
35echo test sslv2
36$ssltest -ssl2 $extra || exit 1
37
38echo test sslv2 with server authentication
39$ssltest -ssl2 -server_auth $CA $extra || exit 1
40
41if [ $dsa_cert = NO ]; then
42 echo test sslv2 with client authentication
43 $ssltest -ssl2 -client_auth $CA $extra || exit 1
44
45 echo test sslv2 with both client and server authentication
46 $ssltest -ssl2 -server_auth -client_auth $CA $extra || exit 1
47fi
48
49echo test sslv3
50$ssltest -ssl3 $extra || exit 1
51
52echo test sslv3 with server authentication
53$ssltest -ssl3 -server_auth $CA $extra || exit 1
54
55echo test sslv3 with client authentication
56$ssltest -ssl3 -client_auth $CA $extra || exit 1
57
58echo test sslv3 with both client and server authentication
59$ssltest -ssl3 -server_auth -client_auth $CA $extra || exit 1
60
61echo test sslv2/sslv3
62$ssltest $extra || exit 1
63
64echo test sslv2/sslv3 with server authentication
65$ssltest -server_auth $CA $extra || exit 1
66
67echo test sslv2/sslv3 with client authentication
68$ssltest -client_auth $CA $extra || exit 1
69
70echo test sslv2/sslv3 with both client and server authentication
71$ssltest -server_auth -client_auth $CA $extra || exit 1
72
73echo test sslv2 via BIO pair
74$ssltest -bio_pair -ssl2 $extra || exit 1
75
76echo test sslv2 with server authentication via BIO pair
77$ssltest -bio_pair -ssl2 -server_auth $CA $extra || exit 1
78
79if [ $dsa_cert = NO ]; then
80 echo test sslv2 with client authentication via BIO pair
81 $ssltest -bio_pair -ssl2 -client_auth $CA $extra || exit 1
82
83 echo test sslv2 with both client and server authentication via BIO pair
84 $ssltest -bio_pair -ssl2 -server_auth -client_auth $CA $extra || exit 1
85fi
86
87echo test sslv3 via BIO pair
88$ssltest -bio_pair -ssl3 $extra || exit 1
89
90echo test sslv3 with server authentication via BIO pair
91$ssltest -bio_pair -ssl3 -server_auth $CA $extra || exit 1
92
93echo test sslv3 with client authentication via BIO pair
94$ssltest -bio_pair -ssl3 -client_auth $CA $extra || exit 1
95
96echo test sslv3 with both client and server authentication via BIO pair
97$ssltest -bio_pair -ssl3 -server_auth -client_auth $CA $extra || exit 1
98
99echo test sslv2/sslv3 via BIO pair
100$ssltest $extra || exit 1
101
102if [ $dsa_cert = NO ]; then
103 echo test sslv2/sslv3 w/o DHE via BIO pair
104 $ssltest -bio_pair -no_dhe $extra || exit 1
105fi
106
107echo test sslv2/sslv3 with 1024bit DHE via BIO pair
108$ssltest -bio_pair -dhe1024dsa -v $extra || exit 1
109
110echo test sslv2/sslv3 with server authentication
111$ssltest -bio_pair -server_auth $CA $extra || exit 1
112
113echo test sslv2/sslv3 with client authentication via BIO pair
114$ssltest -bio_pair -client_auth $CA $extra || exit 1
115
116echo test sslv2/sslv3 with both client and server authentication via BIO pair
117$ssltest -bio_pair -server_auth -client_auth $CA $extra || exit 1
118
119echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify
120$ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1
121
122#############################################################################
123
124if ../apps/openssl no-dh; then
125 echo skipping anonymous DH tests
126else
127 echo test tls1 with 1024bit anonymous DH, multiple handshakes
128 $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1
129fi
130
131if ../apps/openssl no-rsa; then
132 echo skipping RSA tests
133else
134 echo test tls1 with 1024bit RSA, no DHE, multiple handshakes
135 ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1
136
137 if ../apps/openssl no-dh; then
138 echo skipping RSA+DHE tests
139 else
140 echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes
141 ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1
142 fi
143fi
144
145exit 0
diff --git a/src/lib/libssl/test/testx509.pem b/src/lib/libssl/test/testx509.pem
new file mode 100644
index 0000000000..8a85d14964
--- /dev/null
+++ b/src/lib/libssl/test/testx509.pem
@@ -0,0 +1,10 @@
1-----BEGIN CERTIFICATE-----
2MIIBWzCCAQYCARgwDQYJKoZIhvcNAQEEBQAwODELMAkGA1UEBhMCQVUxDDAKBgNV
3BAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3JzYSB0ZXN0IENBMB4XDTk1MDYxOTIz
4MzMxMloXDTk1MDcxNzIzMzMxMlowOjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FM
5RDEdMBsGA1UEAxMUU1NMZWF5L3JzYSB0ZXN0IGNlcnQwXDANBgkqhkiG9w0BAQEF
6AANLADBIAkEAqtt6qS5GTxVxGZYWa0/4u+IwHf7p2LNZbcPBp9/OfIcYAXBQn8hO
7/Re1uwLKXdCjIoaGs4DLdG88rkzfyK5dPQIDAQABMAwGCCqGSIb3DQIFBQADQQAE
8Wc7EcF8po2/ZO6kNCwK/ICH6DobgLekA5lSLr5EvuioZniZp5lFzAw4+YzPQ7XKJ
9zl9HYIMxATFyqSiD9jsx
10-----END CERTIFICATE-----
diff --git a/src/lib/libssl/test/times b/src/lib/libssl/test/times
new file mode 100644
index 0000000000..49aeebf216
--- /dev/null
+++ b/src/lib/libssl/test/times
@@ -0,0 +1,113 @@
1
2More number for the questions about SSL overheads....
3
4The following numbers were generated on a pentium pro 200, running linux.
5They give an indication of the SSL protocol and encryption overheads.
6
7The program that generated them is an unreleased version of ssl/ssltest.c
8which is the SSLeay ssl protocol testing program. It is a single process that
9talks both sides of the SSL protocol via a non-blocking memory buffer
10interface.
11
12How do I read this? The protocol and cipher are reasonable obvious.
13The next number is the number of connections being made. The next is the
14number of bytes exchanged bewteen the client and server side of the protocol.
15This is the number of bytes that the client sends to the server, and then
16the server sends back. Because this is all happening in one process,
17the data is being encrypted, decrypted, encrypted and then decrypted again.
18It is a round trip of that many bytes. Because the one process performs
19both the client and server sides of the protocol and it sends this many bytes
20each direction, multiply this number by 4 to generate the number
21of bytes encrypted/decrypted/MACed. The first time value is how many seconds
22elapsed doing a full SSL handshake, the second is the cost of one
23full handshake and the rest being session-id reuse.
24
25SSLv2 RC4-MD5 1000 x 1 12.83s 0.70s
26SSLv3 NULL-MD5 1000 x 1 14.35s 1.47s
27SSLv3 RC4-MD5 1000 x 1 14.46s 1.56s
28SSLv3 RC4-MD5 1000 x 1 51.93s 1.62s 1024bit RSA
29SSLv3 RC4-SHA 1000 x 1 14.61s 1.83s
30SSLv3 DES-CBC-SHA 1000 x 1 14.70s 1.89s
31SSLv3 DES-CBC3-SHA 1000 x 1 15.16s 2.16s
32
33SSLv2 RC4-MD5 1000 x 1024 13.72s 1.27s
34SSLv3 NULL-MD5 1000 x 1024 14.79s 1.92s
35SSLv3 RC4-MD5 1000 x 1024 52.58s 2.29s 1024bit RSA
36SSLv3 RC4-SHA 1000 x 1024 15.39s 2.67s
37SSLv3 DES-CBC-SHA 1000 x 1024 16.45s 3.55s
38SSLv3 DES-CBC3-SHA 1000 x 1024 18.21s 5.38s
39
40SSLv2 RC4-MD5 1000 x 10240 18.97s 6.52s
41SSLv3 NULL-MD5 1000 x 10240 17.79s 5.11s
42SSLv3 RC4-MD5 1000 x 10240 20.25s 7.90s
43SSLv3 RC4-MD5 1000 x 10240 58.26s 8.08s 1024bit RSA
44SSLv3 RC4-SHA 1000 x 10240 22.96s 11.44s
45SSLv3 DES-CBC-SHA 1000 x 10240 30.65s 18.41s
46SSLv3 DES-CBC3-SHA 1000 x 10240 47.04s 34.53s
47
48SSLv2 RC4-MD5 1000 x 102400 70.22s 57.74s
49SSLv3 NULL-MD5 1000 x 102400 43.73s 31.03s
50SSLv3 RC4-MD5 1000 x 102400 71.32s 58.83s
51SSLv3 RC4-MD5 1000 x 102400 109.66s 59.20s 1024bit RSA
52SSLv3 RC4-SHA 1000 x 102400 95.88s 82.21s
53SSLv3 DES-CBC-SHA 1000 x 102400 173.22s 160.55s
54SSLv3 DES-CBC3-SHA 1000 x 102400 336.61s 323.82s
55
56What does this all mean? Well for a server, with no session-id reuse, with
57a transfer size of 10240 bytes, using RC4-MD5 and a 512bit server key,
58a pentium pro 200 running linux can handle the SSLv3 protocol overheads of
59about 49 connections a second. Reality will be quite different :-).
60
61Remeber the first number is 1000 full ssl handshakes, the second is
621 full and 999 with session-id reuse. The RSA overheads for each exchange
63would be one public and one private operation, but the protocol/MAC/cipher
64cost would be quite similar in both the client and server.
65
66eric (adding numbers to speculation)
67
68--- Appendix ---
69- The time measured is user time but these number a very rough.
70- Remember this is the cost of both client and server sides of the protocol.
71- The TCP/kernal overhead of connection establishment is normally the
72 killer in SSL. Often delays in the TCP protocol will make session-id
73 reuse look slower that new sessions, but this would not be the case on
74 a loaded server.
75- The TCP round trip latencies, while slowing indervidual connections,
76 would have minimal impact on throughput.
77- Instead of sending one 102400 byte buffer, one 8k buffer is sent until
78- the required number of bytes are processed.
79- The SSLv3 connections were actually SSLv2 compatable SSLv3 headers.
80- A 512bit server key was being used except where noted.
81- No server key verification was being performed on the client side of the
82 protocol. This would slow things down very little.
83- The library being used is SSLeay 0.8.x.
84- The normal mesauring system was commands of the form
85 time ./ssltest -num 1000 -bytes 102400 -cipher DES-CBC-SHA -reuse
86 This modified version of ssltest should be in the next public release of
87 SSLeay.
88
89The general cipher performace number for this platform are
90
91SSLeay 0.8.2a 04-Sep-1997
92built on Fri Sep 5 17:37:05 EST 1997
93options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) idea(int) blowfish(ptr2)
94C flags:gcc -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized
95The 'numbers' are in 1000s of bytes per second processed.
96type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
97md2 131.02k 368.41k 500.57k 549.21k 566.09k
98mdc2 535.60k 589.10k 595.88k 595.97k 594.54k
99md5 1801.53k 9674.77k 17484.03k 21849.43k 23592.96k
100sha 1261.63k 5533.25k 9285.63k 11187.88k 11913.90k
101sha1 1103.13k 4782.53k 7933.78k 9472.34k 10070.70k
102rc4 10722.53k 14443.93k 15215.79k 15299.24k 15219.59k
103des cbc 3286.57k 3827.73k 3913.39k 3931.82k 3926.70k
104des ede3 1443.50k 1549.08k 1561.17k 1566.38k 1564.67k
105idea cbc 2203.64k 2508.16k 2538.33k 2543.62k 2547.71k
106rc2 cbc 1430.94k 1511.59k 1524.82k 1527.13k 1523.33k
107blowfish cbc 4716.07k 5965.82k 6190.17k 6243.67k 6234.11k
108 sign verify
109rsa 512 bits 0.0100s 0.0011s
110rsa 1024 bits 0.0451s 0.0012s
111rsa 2048 bits 0.2605s 0.0086s
112rsa 4096 bits 1.6883s 0.0302s
113
diff --git a/src/lib/libssl/test/tpkcs7 b/src/lib/libssl/test/tpkcs7
new file mode 100644
index 0000000000..cf3bd9fadb
--- /dev/null
+++ b/src/lib/libssl/test/tpkcs7
@@ -0,0 +1,55 @@
1#!/bin/sh
2
3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
8export PATH
9
10cmd='../apps/openssl pkcs7'
11
12if [ "$1"x != "x" ]; then
13 t=$1
14else
15 t=testp7.pem
16fi
17
18echo testing pkcs7 conversions
19cp $t fff.p
20
21echo "p -> d"
22$cmd -in fff.p -inform p -outform d >f.d
23if [ $? != 0 ]; then exit 1; fi
24echo "p -> p"
25$cmd -in fff.p -inform p -outform p >f.p
26if [ $? != 0 ]; then exit 1; fi
27
28echo "d -> d"
29$cmd -in f.d -inform d -outform d >ff.d1
30if [ $? != 0 ]; then exit 1; fi
31echo "p -> d"
32$cmd -in f.p -inform p -outform d >ff.d3
33if [ $? != 0 ]; then exit 1; fi
34
35echo "d -> p"
36$cmd -in f.d -inform d -outform p >ff.p1
37if [ $? != 0 ]; then exit 1; fi
38echo "p -> p"
39$cmd -in f.p -inform p -outform p >ff.p3
40if [ $? != 0 ]; then exit 1; fi
41
42cmp fff.p f.p
43if [ $? != 0 ]; then exit 1; fi
44cmp fff.p ff.p1
45if [ $? != 0 ]; then exit 1; fi
46cmp fff.p ff.p3
47if [ $? != 0 ]; then exit 1; fi
48
49cmp f.p ff.p1
50if [ $? != 0 ]; then exit 1; fi
51cmp f.p ff.p3
52if [ $? != 0 ]; then exit 1; fi
53
54/bin/rm -f f.* ff.* fff.*
55exit 0
diff --git a/src/lib/libssl/test/tpkcs7d b/src/lib/libssl/test/tpkcs7d
new file mode 100644
index 0000000000..18f9311b06
--- /dev/null
+++ b/src/lib/libssl/test/tpkcs7d
@@ -0,0 +1,48 @@
1#!/bin/sh
2
3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
8export PATH
9
10cmd='../apps/openssl pkcs7'
11
12if [ "$1"x != "x" ]; then
13 t=$1
14else
15 t=pkcs7-1.pem
16fi
17
18echo "testing pkcs7 conversions (2)"
19cp $t fff.p
20
21echo "p -> d"
22$cmd -in fff.p -inform p -outform d >f.d
23if [ $? != 0 ]; then exit 1; fi
24echo "p -> p"
25$cmd -in fff.p -inform p -outform p >f.p
26if [ $? != 0 ]; then exit 1; fi
27
28echo "d -> d"
29$cmd -in f.d -inform d -outform d >ff.d1
30if [ $? != 0 ]; then exit 1; fi
31echo "p -> d"
32$cmd -in f.p -inform p -outform d >ff.d3
33if [ $? != 0 ]; then exit 1; fi
34
35echo "d -> p"
36$cmd -in f.d -inform d -outform p >ff.p1
37if [ $? != 0 ]; then exit 1; fi
38echo "p -> p"
39$cmd -in f.p -inform p -outform p >ff.p3
40if [ $? != 0 ]; then exit 1; fi
41
42cmp f.p ff.p1
43if [ $? != 0 ]; then exit 1; fi
44cmp f.p ff.p3
45if [ $? != 0 ]; then exit 1; fi
46
47/bin/rm -f f.* ff.* fff.*
48exit 0
diff --git a/src/lib/libssl/test/treq b/src/lib/libssl/test/treq
new file mode 100644
index 0000000000..47a8273cde
--- /dev/null
+++ b/src/lib/libssl/test/treq
@@ -0,0 +1,90 @@
1#!/bin/sh
2
3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
8export PATH
9
10cmd='../apps/openssl req -config ../apps/openssl.cnf'
11
12if [ "$1"x != "x" ]; then
13 t=$1
14else
15 t=testreq.pem
16fi
17
18if $cmd -in $t -inform p -noout -text | fgrep 'Unknown Public Key'; then
19 echo "skipping req conversion test for $t"
20 exit 0
21fi
22
23echo testing req conversions
24cp $t fff.p
25
26echo "p -> d"
27$cmd -in fff.p -inform p -outform d >f.d
28if [ $? != 0 ]; then exit 1; fi
29#echo "p -> t"
30#$cmd -in fff.p -inform p -outform t >f.t
31#if [ $? != 0 ]; then exit 1; fi
32echo "p -> p"
33$cmd -in fff.p -inform p -outform p >f.p
34if [ $? != 0 ]; then exit 1; fi
35
36echo "d -> d"
37$cmd -verify -in f.d -inform d -outform d >ff.d1
38if [ $? != 0 ]; then exit 1; fi
39#echo "t -> d"
40#$cmd -in f.t -inform t -outform d >ff.d2
41#if [ $? != 0 ]; then exit 1; fi
42echo "p -> d"
43$cmd -verify -in f.p -inform p -outform d >ff.d3
44if [ $? != 0 ]; then exit 1; fi
45
46#echo "d -> t"
47#$cmd -in f.d -inform d -outform t >ff.t1
48#if [ $? != 0 ]; then exit 1; fi
49#echo "t -> t"
50#$cmd -in f.t -inform t -outform t >ff.t2
51#if [ $? != 0 ]; then exit 1; fi
52#echo "p -> t"
53#$cmd -in f.p -inform p -outform t >ff.t3
54#if [ $? != 0 ]; then exit 1; fi
55
56echo "d -> p"
57$cmd -in f.d -inform d -outform p >ff.p1
58if [ $? != 0 ]; then exit 1; fi
59#echo "t -> p"
60#$cmd -in f.t -inform t -outform p >ff.p2
61#if [ $? != 0 ]; then exit 1; fi
62echo "p -> p"
63$cmd -in f.p -inform p -outform p >ff.p3
64if [ $? != 0 ]; then exit 1; fi
65
66cmp fff.p f.p
67if [ $? != 0 ]; then exit 1; fi
68cmp fff.p ff.p1
69if [ $? != 0 ]; then exit 1; fi
70#cmp fff.p ff.p2
71#if [ $? != 0 ]; then exit 1; fi
72cmp fff.p ff.p3
73if [ $? != 0 ]; then exit 1; fi
74
75#cmp f.t ff.t1
76#if [ $? != 0 ]; then exit 1; fi
77#cmp f.t ff.t2
78#if [ $? != 0 ]; then exit 1; fi
79#cmp f.t ff.t3
80#if [ $? != 0 ]; then exit 1; fi
81
82cmp f.p ff.p1
83if [ $? != 0 ]; then exit 1; fi
84#cmp f.p ff.p2
85#if [ $? != 0 ]; then exit 1; fi
86cmp f.p ff.p3
87if [ $? != 0 ]; then exit 1; fi
88
89/bin/rm -f f.* ff.* fff.*
90exit 0
diff --git a/src/lib/libssl/test/trsa b/src/lib/libssl/test/trsa
new file mode 100644
index 0000000000..413e2ec0a0
--- /dev/null
+++ b/src/lib/libssl/test/trsa
@@ -0,0 +1,90 @@
1#!/bin/sh
2
3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
8export PATH
9
10if ../apps/openssl no-rsa; then
11 echo skipping rsa conversion test
12 exit 0
13fi
14
15cmd='../apps/openssl rsa'
16
17if [ "$1"x != "x" ]; then
18 t=$1
19else
20 t=testrsa.pem
21fi
22
23echo testing rsa conversions
24cp $t fff.p
25
26echo "p -> d"
27$cmd -in fff.p -inform p -outform d >f.d
28if [ $? != 0 ]; then exit 1; fi
29#echo "p -> t"
30#$cmd -in fff.p -inform p -outform t >f.t
31#if [ $? != 0 ]; then exit 1; fi
32echo "p -> p"
33$cmd -in fff.p -inform p -outform p >f.p
34if [ $? != 0 ]; then exit 1; fi
35
36echo "d -> d"
37$cmd -in f.d -inform d -outform d >ff.d1
38if [ $? != 0 ]; then exit 1; fi
39#echo "t -> d"
40#$cmd -in f.t -inform t -outform d >ff.d2
41#if [ $? != 0 ]; then exit 1; fi
42echo "p -> d"
43$cmd -in f.p -inform p -outform d >ff.d3
44if [ $? != 0 ]; then exit 1; fi
45
46#echo "d -> t"
47#$cmd -in f.d -inform d -outform t >ff.t1
48#if [ $? != 0 ]; then exit 1; fi
49#echo "t -> t"
50#$cmd -in f.t -inform t -outform t >ff.t2
51#if [ $? != 0 ]; then exit 1; fi
52#echo "p -> t"
53#$cmd -in f.p -inform p -outform t >ff.t3
54#if [ $? != 0 ]; then exit 1; fi
55
56echo "d -> p"
57$cmd -in f.d -inform d -outform p >ff.p1
58if [ $? != 0 ]; then exit 1; fi
59#echo "t -> p"
60#$cmd -in f.t -inform t -outform p >ff.p2
61#if [ $? != 0 ]; then exit 1; fi
62echo "p -> p"
63$cmd -in f.p -inform p -outform p >ff.p3
64if [ $? != 0 ]; then exit 1; fi
65
66cmp fff.p f.p
67if [ $? != 0 ]; then exit 1; fi
68cmp fff.p ff.p1
69if [ $? != 0 ]; then exit 1; fi
70#cmp fff.p ff.p2
71#if [ $? != 0 ]; then exit 1; fi
72cmp fff.p ff.p3
73if [ $? != 0 ]; then exit 1; fi
74
75#cmp f.t ff.t1
76#if [ $? != 0 ]; then exit 1; fi
77#cmp f.t ff.t2
78#if [ $? != 0 ]; then exit 1; fi
79#cmp f.t ff.t3
80#if [ $? != 0 ]; then exit 1; fi
81
82cmp f.p ff.p1
83if [ $? != 0 ]; then exit 1; fi
84#cmp f.p ff.p2
85#if [ $? != 0 ]; then exit 1; fi
86cmp f.p ff.p3
87if [ $? != 0 ]; then exit 1; fi
88
89/bin/rm -f f.* ff.* fff.*
90exit 0
diff --git a/src/lib/libssl/test/tsid b/src/lib/libssl/test/tsid
new file mode 100644
index 0000000000..40a1dfa97c
--- /dev/null
+++ b/src/lib/libssl/test/tsid
@@ -0,0 +1,85 @@
1#!/bin/sh
2
3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
8export PATH
9
10cmd='../apps/openssl sess_id'
11
12if [ "$1"x != "x" ]; then
13 t=$1
14else
15 t=testsid.pem
16fi
17
18echo testing session-id conversions
19cp $t fff.p
20
21echo "p -> d"
22$cmd -in fff.p -inform p -outform d >f.d
23if [ $? != 0 ]; then exit 1; fi
24#echo "p -> t"
25#$cmd -in fff.p -inform p -outform t >f.t
26#if [ $? != 0 ]; then exit 1; fi
27echo "p -> p"
28$cmd -in fff.p -inform p -outform p >f.p
29if [ $? != 0 ]; then exit 1; fi
30
31echo "d -> d"
32$cmd -in f.d -inform d -outform d >ff.d1
33if [ $? != 0 ]; then exit 1; fi
34#echo "t -> d"
35#$cmd -in f.t -inform t -outform d >ff.d2
36#if [ $? != 0 ]; then exit 1; fi
37echo "p -> d"
38$cmd -in f.p -inform p -outform d >ff.d3
39if [ $? != 0 ]; then exit 1; fi
40
41#echo "d -> t"
42#$cmd -in f.d -inform d -outform t >ff.t1
43#if [ $? != 0 ]; then exit 1; fi
44#echo "t -> t"
45#$cmd -in f.t -inform t -outform t >ff.t2
46#if [ $? != 0 ]; then exit 1; fi
47#echo "p -> t"
48#$cmd -in f.p -inform p -outform t >ff.t3
49#if [ $? != 0 ]; then exit 1; fi
50
51echo "d -> p"
52$cmd -in f.d -inform d -outform p >ff.p1
53if [ $? != 0 ]; then exit 1; fi
54#echo "t -> p"
55#$cmd -in f.t -inform t -outform p >ff.p2
56#if [ $? != 0 ]; then exit 1; fi
57echo "p -> p"
58$cmd -in f.p -inform p -outform p >ff.p3
59if [ $? != 0 ]; then exit 1; fi
60
61cmp fff.p f.p
62if [ $? != 0 ]; then exit 1; fi
63cmp fff.p ff.p1
64if [ $? != 0 ]; then exit 1; fi
65#cmp fff.p ff.p2
66#if [ $? != 0 ]; then exit 1; fi
67cmp fff.p ff.p3
68if [ $? != 0 ]; then exit 1; fi
69
70#cmp f.t ff.t1
71#if [ $? != 0 ]; then exit 1; fi
72#cmp f.t ff.t2
73#if [ $? != 0 ]; then exit 1; fi
74#cmp f.t ff.t3
75#if [ $? != 0 ]; then exit 1; fi
76
77cmp f.p ff.p1
78if [ $? != 0 ]; then exit 1; fi
79#cmp f.p ff.p2
80#if [ $? != 0 ]; then exit 1; fi
81cmp f.p ff.p3
82if [ $? != 0 ]; then exit 1; fi
83
84/bin/rm -f f.* ff.* fff.*
85exit 0
diff --git a/src/lib/libssl/test/tx509 b/src/lib/libssl/test/tx509
new file mode 100644
index 0000000000..d380963abc
--- /dev/null
+++ b/src/lib/libssl/test/tx509
@@ -0,0 +1,85 @@
1#!/bin/sh
2
3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
8export PATH
9
10cmd='../apps/openssl x509'
11
12if [ "$1"x != "x" ]; then
13 t=$1
14else
15 t=testx509.pem
16fi
17
18echo testing X509 conversions
19cp $t fff.p
20
21echo "p -> d"
22$cmd -in fff.p -inform p -outform d >f.d
23if [ $? != 0 ]; then exit 1; fi
24echo "p -> n"
25$cmd -in fff.p -inform p -outform n >f.n
26if [ $? != 0 ]; then exit 1; fi
27echo "p -> p"
28$cmd -in fff.p -inform p -outform p >f.p
29if [ $? != 0 ]; then exit 1; fi
30
31echo "d -> d"
32$cmd -in f.d -inform d -outform d >ff.d1
33if [ $? != 0 ]; then exit 1; fi
34echo "n -> d"
35$cmd -in f.n -inform n -outform d >ff.d2
36if [ $? != 0 ]; then exit 1; fi
37echo "p -> d"
38$cmd -in f.p -inform p -outform d >ff.d3
39if [ $? != 0 ]; then exit 1; fi
40
41echo "d -> n"
42$cmd -in f.d -inform d -outform n >ff.n1
43if [ $? != 0 ]; then exit 1; fi
44echo "n -> n"
45$cmd -in f.n -inform n -outform n >ff.n2
46if [ $? != 0 ]; then exit 1; fi
47echo "p -> n"
48$cmd -in f.p -inform p -outform n >ff.n3
49if [ $? != 0 ]; then exit 1; fi
50
51echo "d -> p"
52$cmd -in f.d -inform d -outform p >ff.p1
53if [ $? != 0 ]; then exit 1; fi
54echo "n -> p"
55$cmd -in f.n -inform n -outform p >ff.p2
56if [ $? != 0 ]; then exit 1; fi
57echo "p -> p"
58$cmd -in f.p -inform p -outform p >ff.p3
59if [ $? != 0 ]; then exit 1; fi
60
61cmp fff.p f.p
62if [ $? != 0 ]; then exit 1; fi
63cmp fff.p ff.p1
64if [ $? != 0 ]; then exit 1; fi
65cmp fff.p ff.p2
66if [ $? != 0 ]; then exit 1; fi
67cmp fff.p ff.p3
68if [ $? != 0 ]; then exit 1; fi
69
70cmp f.n ff.n1
71if [ $? != 0 ]; then exit 1; fi
72cmp f.n ff.n2
73if [ $? != 0 ]; then exit 1; fi
74cmp f.n ff.n3
75if [ $? != 0 ]; then exit 1; fi
76
77cmp f.p ff.p1
78if [ $? != 0 ]; then exit 1; fi
79cmp f.p ff.p2
80if [ $? != 0 ]; then exit 1; fi
81cmp f.p ff.p3
82if [ $? != 0 ]; then exit 1; fi
83
84/bin/rm -f f.* ff.* fff.*
85exit 0
diff --git a/src/lib/libssl/test/v3-cert1.pem b/src/lib/libssl/test/v3-cert1.pem
new file mode 100644
index 0000000000..0da253d5c3
--- /dev/null
+++ b/src/lib/libssl/test/v3-cert1.pem
@@ -0,0 +1,16 @@
1-----BEGIN CERTIFICATE-----
2MIICjTCCAfigAwIBAgIEMaYgRzALBgkqhkiG9w0BAQQwRTELMAkGA1UEBhMCVVMx
3NjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFuZCBTcGFjZSBBZG1pbmlz
4dHJhdGlvbjAmFxE5NjA1MjgxMzQ5MDUrMDgwMBcROTgwNTI4MTM0OTA1KzA4MDAw
5ZzELMAkGA1UEBhMCVVMxNjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFu
6ZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEgMAkGA1UEBRMCMTYwEwYDVQQDEwxTdGV2
7ZSBTY2hvY2gwWDALBgkqhkiG9w0BAQEDSQAwRgJBALrAwyYdgxmzNP/ts0Uyf6Bp
8miJYktU/w4NG67ULaN4B5CnEz7k57s9o3YY3LecETgQ5iQHmkwlYDTL2fTgVfw0C
9AQOjgaswgagwZAYDVR0ZAQH/BFowWDBWMFQxCzAJBgNVBAYTAlVTMTYwNAYDVQQK
10Ey1OYXRpb25hbCBBZXJvbmF1dGljcyBhbmQgU3BhY2UgQWRtaW5pc3RyYXRpb24x
11DTALBgNVBAMTBENSTDEwFwYDVR0BAQH/BA0wC4AJODMyOTcwODEwMBgGA1UdAgQR
12MA8ECTgzMjk3MDgyM4ACBSAwDQYDVR0KBAYwBAMCBkAwCwYJKoZIhvcNAQEEA4GB
13AH2y1VCEw/A4zaXzSYZJTTUi3uawbbFiS2yxHvgf28+8Js0OHXk1H1w2d6qOHH21
14X82tZXd/0JtG0g1T9usFFBDvYK8O0ebgz/P5ELJnBL2+atObEuJy1ZZ0pBDWINR3
15WkDNLCGiTkCKp0F5EWIrVDwh54NNevkCQRZita+z4IBO
16-----END CERTIFICATE-----
diff --git a/src/lib/libssl/test/v3-cert2.pem b/src/lib/libssl/test/v3-cert2.pem
new file mode 100644
index 0000000000..de0723ff8d
--- /dev/null
+++ b/src/lib/libssl/test/v3-cert2.pem
@@ -0,0 +1,16 @@
1-----BEGIN CERTIFICATE-----
2MIICiTCCAfKgAwIBAgIEMeZfHzANBgkqhkiG9w0BAQQFADB9MQswCQYDVQQGEwJD
3YTEPMA0GA1UEBxMGTmVwZWFuMR4wHAYDVQQLExVObyBMaWFiaWxpdHkgQWNjZXB0
4ZWQxHzAdBgNVBAoTFkZvciBEZW1vIFB1cnBvc2VzIE9ubHkxHDAaBgNVBAMTE0Vu
5dHJ1c3QgRGVtbyBXZWIgQ0EwHhcNOTYwNzEyMTQyMDE1WhcNOTYxMDEyMTQyMDE1
6WjB0MSQwIgYJKoZIhvcNAQkBExVjb29rZUBpc3NsLmF0bC5ocC5jb20xCzAJBgNV
7BAYTAlVTMScwJQYDVQQLEx5IZXdsZXR0IFBhY2thcmQgQ29tcGFueSAoSVNTTCkx
8FjAUBgNVBAMTDVBhdWwgQS4gQ29va2UwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA
96ceSq9a9AU6g+zBwaL/yVmW1/9EE8s5you1mgjHnj0wAILuoB3L6rm6jmFRy7QZT
10G43IhVZdDua4e+5/n1ZslwIDAQABo2MwYTARBglghkgBhvhCAQEEBAMCB4AwTAYJ
11YIZIAYb4QgENBD8WPVRoaXMgY2VydGlmaWNhdGUgaXMgb25seSBpbnRlbmRlZCBm
12b3IgZGVtb25zdHJhdGlvbiBwdXJwb3Nlcy4wDQYJKoZIhvcNAQEEBQADgYEAi8qc
13F3zfFqy1sV8NhjwLVwOKuSfhR/Z8mbIEUeSTlnH3QbYt3HWZQ+vXI8mvtZoBc2Fz
14lexKeIkAZXCesqGbs6z6nCt16P6tmdfbZF3I3AWzLquPcOXjPf4HgstkyvVBn0Ap
15jAFN418KF/Cx4qyHB4cjdvLrRjjQLnb2+ibo7QU=
16-----END CERTIFICATE-----
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h
new file mode 100644
index 0000000000..38838ea9a5
--- /dev/null
+++ b/src/lib/libssl/tls1.h
@@ -0,0 +1,195 @@
1/* ssl/tls1.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_TLS1_H
60#define HEADER_TLS1_H
61
62#include <openssl/buffer.h>
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68#define TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES 1
69
70#define TLS1_VERSION 0x0301
71#define TLS1_VERSION_MAJOR 0x03
72#define TLS1_VERSION_MINOR 0x01
73
74#define TLS1_AD_DECRYPTION_FAILED 21
75#define TLS1_AD_RECORD_OVERFLOW 22
76#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
77#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
78#define TLS1_AD_DECODE_ERROR 50 /* fatal */
79#define TLS1_AD_DECRYPT_ERROR 51
80#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
81#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
82#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
83#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
84#define TLS1_AD_USER_CANCELLED 90
85#define TLS1_AD_NO_RENEGOTIATION 100
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. */
91#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060
92#define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061
93#define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062
94#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063
95#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064
96#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065
97#define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066
98
99/* AES ciphersuites from RFC3268 */
100
101#define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F
102#define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030
103#define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031
104#define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032
105#define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033
106#define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034
107
108#define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035
109#define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036
110#define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037
111#define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038
112#define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039
113#define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A
114
115/* XXX
116 * Inconsistency alert:
117 * The OpenSSL names of ciphers with ephemeral DH here include the string
118 * "DHE", while elsewhere it has always been "EDH".
119 * (The alias for the list of all such ciphers also is "EDH".)
120 * The specifications speak of "EDH"; maybe we should allow both forms
121 * for everything. */
122#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5"
123#define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5"
124#define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA"
125#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DHE-DSS-DES-CBC-SHA"
126#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA "EXP1024-RC4-SHA"
127#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA "EXP1024-DHE-DSS-RC4-SHA"
128#define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA"
129
130/* AES ciphersuites from RFC3268 */
131#define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA"
132#define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA"
133#define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA"
134#define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA"
135#define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA"
136#define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA"
137
138#define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA"
139#define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA"
140#define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA"
141#define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA"
142#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA"
143#define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA"
144
145
146#define TLS_CT_RSA_SIGN 1
147#define TLS_CT_DSS_SIGN 2
148#define TLS_CT_RSA_FIXED_DH 3
149#define TLS_CT_DSS_FIXED_DH 4
150#define TLS_CT_NUMBER 4
151
152#define TLS1_FINISH_MAC_LENGTH 12
153
154#define TLS_MD_MAX_CONST_SIZE 20
155#define TLS_MD_CLIENT_FINISH_CONST "client finished"
156#define TLS_MD_CLIENT_FINISH_CONST_SIZE 15
157#define TLS_MD_SERVER_FINISH_CONST "server finished"
158#define TLS_MD_SERVER_FINISH_CONST_SIZE 15
159#define TLS_MD_SERVER_WRITE_KEY_CONST "server write key"
160#define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16
161#define TLS_MD_KEY_EXPANSION_CONST "key expansion"
162#define TLS_MD_KEY_EXPANSION_CONST_SIZE 13
163#define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key"
164#define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16
165#define TLS_MD_SERVER_WRITE_KEY_CONST "server write key"
166#define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16
167#define TLS_MD_IV_BLOCK_CONST "IV block"
168#define TLS_MD_IV_BLOCK_CONST_SIZE 8
169#define TLS_MD_MASTER_SECRET_CONST "master secret"
170#define TLS_MD_MASTER_SECRET_CONST_SIZE 13
171
172#ifdef CHARSET_EBCDIC
173#undef TLS_MD_CLIENT_FINISH_CONST
174#define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64" /*client finished*/
175#undef TLS_MD_SERVER_FINISH_CONST
176#define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64" /*server finished*/
177#undef TLS_MD_SERVER_WRITE_KEY_CONST
178#define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*server write key*/
179#undef TLS_MD_KEY_EXPANSION_CONST
180#define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e" /*key expansion*/
181#undef TLS_MD_CLIENT_WRITE_KEY_CONST
182#define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*client write key*/
183#undef TLS_MD_SERVER_WRITE_KEY_CONST
184#define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*server write key*/
185#undef TLS_MD_IV_BLOCK_CONST
186#define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b" /*IV block*/
187#undef TLS_MD_MASTER_SECRET_CONST
188#define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" /*master secret*/
189#endif
190
191#ifdef __cplusplus
192}
193#endif
194#endif
195
diff --git a/src/lib/libssl/x509v3.cnf b/src/lib/libssl/x509v3.cnf
new file mode 100644
index 0000000000..e430088671
--- /dev/null
+++ b/src/lib/libssl/x509v3.cnf
@@ -0,0 +1,26 @@
1# default settings
2CERTPATHLEN = 1
3CERTUSAGE = digitalSignature,keyCertSign
4CERTIP = 0.0.0.0
5CERTFQDN = nohost.nodomain
6
7# This section should be referenced when building an x509v3 CA
8# Certificate.
9# The default path length and the key usage can be overriden
10# modified by setting the CERTPATHLEN and CERTUSAGE environment
11# variables.
12[x509v3_CA]
13basicConstraints=critical,CA:true,pathlen:$ENV::CERTPATHLEN
14keyUsage=$ENV::CERTUSAGE
15
16# This section should be referenced to add an IP Address
17# as an alternate subject name, needed by isakmpd
18# The address must be provided in the CERTIP environment variable
19[x509v3_IPAddr]
20subjectAltName=IP:$ENV::CERTIP
21
22# This section should be referenced to add a FQDN hostname
23# as an alternate subject name, needed by isakmpd
24# The address must be provided in the CERTFQDN environment variable
25[x509v3_FQDN]
26subjectAltName=DNS:$ENV::CERTFQDN