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/Makefile265
-rw-r--r--src/lib/libssl/crypto/arch/alpha/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/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/Makefile881
-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.c1302
-rw-r--r--src/lib/libssl/s3_srvr.c2061
-rw-r--r--src/lib/libssl/shlib_version2
-rw-r--r--src/lib/libssl/src/CHANGES105
-rw-r--r--src/lib/libssl/src/Configure2
-rw-r--r--src/lib/libssl/src/FAQ2
-rw-r--r--src/lib/libssl/src/INSTALL.W322
-rw-r--r--src/lib/libssl/src/MacOS/GetHTTPS.src/CPStringUtils.cpp2
-rw-r--r--src/lib/libssl/src/MacOS/GetHTTPS.src/ErrorHandling.cpp2
-rw-r--r--src/lib/libssl/src/Makefile.org22
-rw-r--r--src/lib/libssl/src/NEWS12
-rw-r--r--src/lib/libssl/src/PROBLEMS131
-rw-r--r--src/lib/libssl/src/README2
-rw-r--r--src/lib/libssl/src/STATUS107
-rw-r--r--src/lib/libssl/src/TABLE4226
-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.c10
-rw-r--r--src/lib/libssl/src/apps/ca.c53
-rw-r--r--src/lib/libssl/src/apps/der_chop.in305
-rw-r--r--src/lib/libssl/src/apps/dgst.c5
-rw-r--r--src/lib/libssl/src/apps/enc.c2
-rw-r--r--src/lib/libssl/src/apps/engine.c4
-rw-r--r--src/lib/libssl/src/apps/md4.c127
-rw-r--r--src/lib/libssl/src/apps/ocsp.c5
-rw-r--r--src/lib/libssl/src/apps/pkcs12.c4
-rw-r--r--src/lib/libssl/src/apps/pkcs8.c11
-rw-r--r--src/lib/libssl/src/apps/req.c40
-rw-r--r--src/lib/libssl/src/apps/s_apps.h8
-rw-r--r--src/lib/libssl/src/apps/s_client.c40
-rw-r--r--src/lib/libssl/src/apps/s_server.c20
-rw-r--r--src/lib/libssl/src/apps/s_socket.c2
-rw-r--r--src/lib/libssl/src/apps/s_time.c6
-rw-r--r--src/lib/libssl/src/apps/smime.c4
-rw-r--r--src/lib/libssl/src/apps/x509.c16
-rw-r--r--src/lib/libssl/src/bugs/SSLv32
-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/vsigntca.pem18
-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/aes/Makefile.ssl103
-rw-r--r--src/lib/libssl/src/crypto/aes/aes.h2
-rw-r--r--src/lib/libssl/src/crypto/aes/aes_cbc.c12
-rw-r--r--src/lib/libssl/src/crypto/aes/aes_ctr.c54
-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.c9
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_mbstr.c6
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_strex.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_strnid.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_time.c9
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_utctm.c9
-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/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/asn1/x_long.c10
-rw-r--r--src/lib/libssl/src/crypto/bf/Makefile.ssl114
-rw-r--r--src/lib/libssl/src/crypto/bio/Makefile.ssl216
-rw-r--r--src/lib/libssl/src/crypto/bio/b_dump.c32
-rw-r--r--src/lib/libssl/src/crypto/bio/b_print.c2
-rw-r--r--src/lib/libssl/src/crypto/bio/b_sock.c12
-rw-r--r--src/lib/libssl/src/crypto/bio/bf_buff.c1
-rw-r--r--src/lib/libssl/src/crypto/bio/bio_cb.c36
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_bio.c55
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_conn.c6
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_file.c31
-rw-r--r--src/lib/libssl/src/crypto/bn/Makefile.ssl322
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_mul.c4
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_print.c11
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_word.c6
-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/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.c8
-rw-r--r--src/lib/libssl/src/crypto/cversion.c8
-rw-r--r--src/lib/libssl/src/crypto/des/FILES96
-rw-r--r--src/lib/libssl/src/crypto/des/Makefile.ssl314
-rw-r--r--src/lib/libssl/src/crypto/des/cfb_enc.c84
-rw-r--r--src/lib/libssl/src/crypto/des/des.h6
-rw-r--r--src/lib/libssl/src/crypto/des/des_old.h6
-rw-r--r--src/lib/libssl/src/crypto/des/destest.c2
-rw-r--r--src/lib/libssl/src/crypto/des/ecb_enc.c3
-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_dlfcn.c6
-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/ec_mult.c13
-rw-r--r--src/lib/libssl/src/crypto/engine/Makefile.ssl538
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_ctrl.c10
-rw-r--r--src/lib/libssl/src/crypto/engine/engine.h8
-rw-r--r--src/lib/libssl/src/crypto/engine/hw_cryptodev.c122
-rw-r--r--src/lib/libssl/src/crypto/engine/hw_openbsd_dev_crypto.c594
-rw-r--r--src/lib/libssl/src/crypto/engine/hw_ubsec.c1
-rw-r--r--src/lib/libssl/src/crypto/err/Makefile.ssl119
-rw-r--r--src/lib/libssl/src/crypto/err/err.c44
-rw-r--r--src/lib/libssl/src/crypto/err/err.h1
-rw-r--r--src/lib/libssl/src/crypto/evp/Makefile.ssl1058
-rw-r--r--src/lib/libssl/src/crypto/evp/bio_b64.c38
-rw-r--r--src/lib/libssl/src/crypto/evp/bio_ok.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/c_all.c3
-rw-r--r--src/lib/libssl/src/crypto/evp/evp.h54
-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/md2/md2test.c2
-rw-r--r--src/lib/libssl/src/crypto/md4/Makefile.ssl91
-rw-r--r--src/lib/libssl/src/crypto/md5/Makefile.ssl126
-rw-r--r--src/lib/libssl/src/crypto/md5/asm/md5-586.pl2
-rw-r--r--src/lib/libssl/src/crypto/md5/asm/md5-sparcv9.S4
-rw-r--r--src/lib/libssl/src/crypto/mdc2/Makefile.ssl98
-rw-r--r--src/lib/libssl/src/crypto/mem.c10
-rw-r--r--src/lib/libssl/src/crypto/mem_dbg.c17
-rw-r--r--src/lib/libssl/src/crypto/o_time.c2
-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_dat.pl4
-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/opensslv.h4
-rw-r--r--src/lib/libssl/src/crypto/pem/Makefile.ssl336
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_lib.c14
-rw-r--r--src/lib/libssl/src/crypto/perlasm/x86ms.pl3
-rw-r--r--src/lib/libssl/src/crypto/perlasm/x86nasm.pl3
-rw-r--r--src/lib/libssl/src/crypto/perlasm/x86unix.pl3
-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.c5
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pk7_mime.c105
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pk7_smime.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pkcs7.h2
-rw-r--r--src/lib/libssl/src/crypto/rand/Makefile.ssl194
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_egd.c2
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_unix.c19
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_win.c14
-rw-r--r--src/lib/libssl/src/crypto/rand/randfile.c65
-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/rsa/Makefile.ssl241
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa.h11
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_eay.c2
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_lib.c8
-rw-r--r--src/lib/libssl/src/crypto/sha/Makefile.ssl115
-rw-r--r--src/lib/libssl/src/crypto/stack/Makefile.ssl88
-rw-r--r--src/lib/libssl/src/crypto/threads/mttest.c3
-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.c13
-rw-r--r--src/lib/libssl/src/crypto/x509/Makefile.ssl594
-rw-r--r--src/lib/libssl/src/crypto/x509/by_dir.c4
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_trs.c1
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_txt.c2
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_vfy.c4
-rw-r--r--src/lib/libssl/src/crypto/x509/x509type.c5
-rw-r--r--src/lib/libssl/src/crypto/x509v3/Makefile.ssl603
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_alt.c3
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_conf.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_cpols.c24
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_info.c11
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_lib.c1
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_prn.c2
-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/ca.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/s_client.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BIO_f_base64.pod5
-rw-r--r--src/lib/libssl/src/doc/crypto/BIO_new_bio_pair.pod103
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod6
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_SignInit.pod8
-rw-r--r--src/lib/libssl/src/doc/crypto/OpenSSL_add_all_algorithms.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_print.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/ripemd.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/sha.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_CTX_set_verify.pod8
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod4
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_SESSION_free.pod2
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_accept.pod3
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_connect.pod3
-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/e_os.h15
-rw-r--r--src/lib/libssl/src/openssl.spec20
-rw-r--r--src/lib/libssl/src/ssl/Makefile.ssl1024
-rw-r--r--src/lib/libssl/src/ssl/kssl.c35
-rw-r--r--src/lib/libssl/src/ssl/kssl.h2
-rw-r--r--src/lib/libssl/src/ssl/s2_clnt.c1
-rw-r--r--src/lib/libssl/src/ssl/s2_enc.c1
-rw-r--r--src/lib/libssl/src/ssl/s2_lib.c3
-rw-r--r--src/lib/libssl/src/ssl/s2_pkt.c1
-rw-r--r--src/lib/libssl/src/ssl/s2_srvr.c1
-rw-r--r--src/lib/libssl/src/ssl/s3_clnt.c3
-rw-r--r--src/lib/libssl/src/ssl/s3_lib.c2
-rw-r--r--src/lib/libssl/src/ssl/s3_srvr.c3
-rw-r--r--src/lib/libssl/src/ssl/ssl_asn1.c1
-rw-r--r--src/lib/libssl/src/ssl/ssl_ciph.c12
-rw-r--r--src/lib/libssl/src/ssl/ssl_lib.c6
-rw-r--r--src/lib/libssl/src/ssl/ssl_rsa.c4
-rw-r--r--src/lib/libssl/src/ssl/ssl_sess.c5
-rw-r--r--src/lib/libssl/src/ssl/ssltest.c5
-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/libeay.num2
-rw-r--r--src/lib/libssl/src/util/pl/Mingw32.pl2
-rw-r--r--src/lib/libssl/src/util/pl/Mingw32f.pl73
-rw-r--r--src/lib/libssl/src/util/point.sh6
-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.c2314
-rw-r--r--src/lib/libssl/ssl_locl.h620
-rw-r--r--src/lib/libssl/ssl_rsa.c815
-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
344 files changed, 51144 insertions, 8180 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..dead23398f
--- /dev/null
+++ b/src/lib/libssl/crypto/Makefile
@@ -0,0 +1,265 @@
1# $OpenBSD: Makefile,v 1.31 2003/06/02 08:45:58 markus Exp $
2
3LIB= crypto
4
5SSLEAYDIST= src
6SSL_SRC= ${.CURDIR}/../${SSLEAYDIST}
7LCRYPTO_SRC= ${SSL_SRC}/crypto
8
9.if ${MACHINE_ARCH} == "i386"
10CFLAGS+= -DL_ENDIAN
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 -DOPENSSL_NO_ASM
28CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5 -DSO_DLFCN -DHAVE_DLFCN_H
29CFLAGS+= -DOPENSSL_NO_MDC2
30CFLAGS+= -DNO_WINDOWS_BRAINDEATH
31CFLAGS+= -DOPENSSL_NO_HW_CSWIFT -DOPENSSL_NO_HW_NCIPHER -DOPENSSL_NO_HW_ATALLA
32CFLAGS+= -DOPENSSL_NO_HW_NURON -DOPENSSL_NO_HW_UBSEC -DOPENSSL_NO_HW_AEP
33CFLAGS+= -DOPENSSL_NO_HW_SUREWARE -DOPENSSL_NO_HW_4758_CCA
34CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST}
35CFLAGS+= -I${LCRYPTO_SRC}
36SRCS+= o_time.c
37SRCS+= cryptlib.c ex_data.c cpt_err.c mem.c mem_dbg.c mem_clr.c
38SRCS+= tmdiff.c cversion.c uid.c
39SRCS+= md2_dgst.c md2_one.c
40SRCS+= md5_dgst.c md5_one.c
41SRCS+= sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
42#SRCS+= mdc2dgst.c mdc2_one.c
43SRCS+= hmac.c
44SRCS+= rmd_dgst.c rmd_one.c
45SRCS+= aes_cbc.c aes_cfb.c aes_ctr.c aes_ecb.c aes_ofb.c aes_misc.c aes_core.c
46SRCS+= cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c \
47 ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c \
48 ofb64enc.c ofb_enc.c pcbc_enc.c \
49 qud_cksm.c rand_key.c rpc_enc.c set_key.c \
50 des_enc.c des_old2.c fcrypt_b.c \
51 fcrypt.c xcbc_enc.c ede_cbcm_enc.c \
52 str2key.c cfb64ede.c ofb64ede.c \
53 des_old.c read2pwd.c
54SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c
55SRCS+= rc2ofb64.c
56SRCS+= rc4_skey.c rc4_enc.c
57#SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5cfb64.c
58#SRCS+= rc5ofb64.c rc5_enc.c
59#SRCS+= i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c
60#SRCS+= i_skey.c
61SRCS+= bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c bf_enc.c
62SRCS+= c_skey.c c_ecb.c c_cfb64.c c_ofb64.c c_enc.c
63SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c
64SRCS+= bn_mul.c bn_print.c bn_rand.c bn_shift.c
65SRCS+= bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c
66SRCS+= bn_sqr.c bn_recp.c bn_mont.c bn_mpi.c bn_asm.c bn_mod.c
67SRCS+= bn_exp2.c bn_ctx.c
68SRCS+= bn_sqrt.c bn_kron.c
69SRCS+= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c
70SRCS+= rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c
71SRCS+= rsa_none.c rsa_chk.c rsa_oaep.c rsa_null.c rsa_asn1.c
72SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c
73SRCS+= dsa_sign.c dsa_err.c dsa_asn1.c dsa_ossl.c
74SRCS+= dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c dh_asn1.c
75SRCS+= buffer.c buf_err.c
76SRCS+= bio_lib.c bio_cb.c bio_err.c bss_mem.c
77SRCS+= bss_null.c bss_fd.c bss_file.c bss_sock.c
78SRCS+= bss_conn.c bf_null.c bf_buff.c
79SRCS+= b_print.c b_dump.c b_sock.c bss_acpt.c
80SRCS+= bf_nbio.c bss_bio.c bss_log.c
81SRCS+= stack.c
82SRCS+= lhash.c lh_stats.c
83SRCS+= md_rand.c randfile.c rand_lib.c rand_egd.c rand_err.c rand_unix.c
84SRCS+= err.c err_all.c err_prn.c
85SRCS+= obj_dat.c obj_lib.c obj_err.c o_names.c
86SRCS+= bio_b64.c e_bf.c m_sha.c p_open.c
87SRCS+= bio_enc.c e_cast.c e_xcbc_d.c m_dss.c m_sha1.c p_seal.c
88SRCS+= bio_md.c e_des.c encode.c m_dss1.c names.c p_sign.c
89SRCS+= bio_ok.c e_des3.c evp_enc.c m_md2.c p_verify.c
90SRCS+= c_all.c evp_err.c evp_acnf.c m_md4.c p5_crpt.c
91SRCS+= c_allc.c evp_key.c m_md5.c p5_crpt2.c
92SRCS+= c_alld.c e_null.c evp_lib.c p_dec.c
93SRCS+= digest.c e_rc2.c evp_pbe.c m_null.c p_enc.c
94SRCS+= e_aes.c e_rc4.c evp_pkey.c m_ripemd.c p_lib.c
95SRCS+= md4_dgst.c md4_one.c
96SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_pkey.c
97SRCS+= pem_all.c pem_err.c pem_x509.c pem_pk8.c pem_oth.c pem_xaux.c
98SRCS+= ui_err.c ui_lib.c ui_openssl.c ui_compat.c ui_util.c
99SRCS+= a_bitstr.c a_mbstr.c a_utctm.c f_enum.c t_bitst.c x_name.c
100SRCS+= a_bool.c a_meth.c a_utf8.c f_int.c t_crl.c tasn_typ.c x_pkey.c
101SRCS+= a_bytes.c a_object.c a_verify.c f_string.c t_pkey.c tasn_utl.c x_pubkey.c
102SRCS+= a_d2i_fp.c a_octet.c asn1_err.c i2d_pr.c t_req.c x_algor.c x_req.c
103SRCS+= a_digest.c a_print.c asn1_lib.c i2d_pu.c t_spki.c x_attrib.c x_sig.c
104SRCS+= a_dup.c a_set.c asn1_par.c n_pkey.c t_x509.c x_bignum.c x_spki.c
105SRCS+= a_enum.c a_sign.c asn_pack.c nsseq.c t_x509a.c x_val.c
106SRCS+= a_gentm.c a_strex.c d2i_pr.c p5_pbe.c tasn_dec.c x_crl.c x_x509.c
107SRCS+= a_hdr.c a_strnid.c d2i_pu.c p5_pbev2.c tasn_enc.c x_exten.c x_x509a.c
108SRCS+= a_i2d_fp.c a_time.c evp_asn1.c tasn_fre.c x_info.c
109SRCS+=a_int.c a_type.c p8_pkey.c tasn_new.c x_long.c asn_moid.c
110SRCS+= x509_d2.c x509_lu.c x509_set.c x509_vfy.c x509spki.c by_dir.c
111SRCS+= x509_def.c x509_obj.c x509_trs.c x509cset.c x509type.c by_file.c
112SRCS+= x509_att.c x509_err.c x509_r2x.c x509_txt.c x509name.c x_all.c
113SRCS+= x509_cmp.c x509_ext.c x509_req.c x509_v3.c x509rset.c
114SRCS+= v3_akey.c v3_alt.c v3_bcons.c v3_bitst.c v3_conf.c v3_cpols.c
115SRCS+= v3_crld.c v3_enum.c v3_extku.c v3_genn.c v3_ia5.c v3_int.c
116SRCS+= v3_lib.c v3_pku.c v3_prn.c v3_skey.c v3_sxnet.c v3_utl.c
117SRCS+= v3err.c v3_info.c v3_purp.c v3_ocsp.c v3_akeya.c
118SRCS+= conf_err.c conf_lib.c conf_def.c conf_api.c conf_mod.c conf_mall.c
119SRCS+= conf_sap.c
120SRCS+= txt_db.c
121SRCS+= pk7_lib.c pkcs7err.c
122SRCS+= pk7_asn1.c pk7_doit.c pk7_mime.c
123SRCS+= pk7_attr.c pk7_smime.c
124SRCS+= c_rle.c c_zlib.c comp_lib.c comp_err.c
125SRCS+= p12_add.c p12_crpt.c p12_init.c p12_mutl.c p12_p8e.c
126SRCS+= p12_asn.c p12_crt.c p12_key.c p12_npas.c p12_utl.c
127SRCS+= p12_attr.c p12_decr.c p12_kiss.c p12_p8d.c pk12err.c
128SRCS+= eng_all.c eng_openssl.c eng_ctrl.c eng_pkey.c
129SRCS+= eng_dyn.c eng_table.c tb_cipher.c eng_err.c tb_rsa.c
130SRCS+= hw_cryptodev.c eng_cnf.c
131SRCS+= tb_dh.c eng_fat.c tb_digest.c eng_init.c
132SRCS+= tb_dsa.c eng_lib.c tb_rand.c eng_list.c
133SRCs+= tb_rsa.c
134SRCS+= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c
135SRCS+= dso_openssl.c dso_win32.c dso_vms.c
136SRCS+= ocsp_asn.c ocsp_err.c ocsp_ht.c ocsp_prn.c ocsp_vfy.c
137SRCS+= ocsp_cl.c ocsp_ext.c ocsp_lib.c ocsp_srv.c
138SRCS+= ec_cvt.c ec_lib.c ecp_mont.c ecp_recp.c
139SRCS+= ec_err.c ec_mult.c ecp_nist.c ecp_smpl.c
140
141.PATH: ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 ${LCRYPTO_SRC}/sha \
142 ${LCRYPTO_SRC}/mdc2 ${LCRYPTO_SRC}/hmac ${LCRYPTO_SRC}/ripemd \
143 ${LCRYPTO_SRC}/des ${LCRYPTO_SRC}/rc2 ${LCRYPTO_SRC}/rc4 \
144 ${LCRYPTO_SRC}/rc5 ${LCRYPTO_SRC}/idea ${LCRYPTO_SRC}/bf \
145 ${LCRYPTO_SRC}/cast ${LCRYPTO_SRC}/bn ${LCRYPTO_SRC}/rsa \
146 ${LCRYPTO_SRC}/dsa ${LCRYPTO_SRC}/dh ${LCRYPTO_SRC}/buffer \
147 ${LCRYPTO_SRC}/bio ${LCRYPTO_SRC}/stack ${LCRYPTO_SRC}/lhash \
148 ${LCRYPTO_SRC}/rand ${LCRYPTO_SRC}/err ${LCRYPTO_SRC}/objects \
149 ${LCRYPTO_SRC}/evp ${LCRYPTO_SRC}/pem ${LCRYPTO_SRC}/asn1 \
150 ${LCRYPTO_SRC}/asn1 ${LCRYPTO_SRC}/x509 ${LCRYPTO_SRC}/conf \
151 ${LCRYPTO_SRC}/pkcs7 ${LCRYPTO_SRC}/x509v3 ${LCRYPTO_SRC}/pkcs12 \
152 ${LCRYPTO_SRC}/comp ${LCRYPTO_SRC}/txt_db ${LCRYPTO_SRC}/md4 \
153 ${LCRYPTO_SRC}/engine ${LCRYPTO_SRC}/dso ${LCRYPTO_SRC}/ui \
154 ${LCRYPTO_SRC}/ocsp ${LCRYPTO_SRC}/ec ${LCRYPTO_SRC}/aes ${LCRYPTO_SRC}
155
156HDRS=\
157 crypto/aes/aes.h \
158 crypto/asn1/asn1.h \
159 crypto/asn1/asn1_mac.h \
160 crypto/asn1/asn1t.h \
161 crypto/bf/blowfish.h \
162 crypto/bio/bio.h \
163 crypto/bn/bn.h \
164 crypto/buffer/buffer.h \
165 crypto/cast/cast.h \
166 crypto/comp/comp.h \
167 crypto/conf/conf.h \
168 crypto/conf/conf_api.h \
169 crypto/crypto.h \
170 crypto/des/des.h \
171 crypto/des/des_old.h \
172 crypto/dh/dh.h \
173 crypto/dsa/dsa.h \
174 crypto/dso/dso.h \
175 crypto/ebcdic.h \
176 crypto/ec/ec.h \
177 crypto/engine/engine.h \
178 crypto/err/err.h \
179 crypto/evp/evp.h \
180 crypto/hmac/hmac.h \
181 crypto/idea/idea.h \
182 crypto/lhash/lhash.h \
183 crypto/md2/md2.h \
184 crypto/md4/md4.h \
185 crypto/md5/md5.h \
186 crypto/mdc2/mdc2.h \
187 crypto/objects/objects.h \
188 crypto/ocsp/ocsp.h \
189 crypto/opensslv.h \
190 crypto/ossl_typ.h \
191 crypto/pem/pem.h \
192 crypto/pem/pem2.h \
193 crypto/pkcs12/pkcs12.h \
194 crypto/pkcs7/pkcs7.h \
195 crypto/rand/rand.h \
196 crypto/rc2/rc2.h \
197 crypto/rc4/rc4.h \
198 crypto/rc5/rc5.h \
199 crypto/ripemd/ripemd.h \
200 crypto/rsa/rsa.h \
201 crypto/sha/sha.h \
202 crypto/stack/safestack.h \
203 crypto/stack/stack.h \
204 crypto/symhacks.h \
205 crypto/tmdiff.h \
206 crypto/txt_db/txt_db.h \
207 crypto/ui/ui.h \
208 crypto/ui/ui_compat.h \
209 crypto/x509/x509.h \
210 crypto/x509/x509_vfy.h \
211 crypto/x509v3/x509v3.h \
212 e_os2.h
213
214HDRS_GEN=\
215 ${.CURDIR}/arch/${MACHINE_ARCH}/opensslconf.h \
216 ${.OBJDIR}/obj_mac.h
217
218includes: obj_mac.h
219 @test -d ${DESTDIR}/usr/include/openssl || \
220 mkdir ${DESTDIR}/usr/include/openssl
221 @cd ${SSL_SRC}; \
222 for i in $(HDRS); 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 for i in $(HDRS_GEN); do \
230 j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
231 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i\
232 ${DESTDIR}/usr/include/openssl"; \
233 echo $$j; \
234 eval "$$j"; \
235 done;
236
237# generated
238CFLAGS+= -I${.OBJDIR}
239
240GENERATED=obj_mac.h obj_dat.h
241CLEANFILES=${GENERATED} obj_mac.num.tmp
242SSL_OBJECTS=${SSL_SRC}/crypto/objects
243
244obj_mac.h: ${SSL_OBJECTS}/objects.h ${SSL_OBJECTS}/obj_mac.num ${SSL_OBJECTS}/objects.txt
245 cat ${SSL_OBJECTS}/obj_mac.num > obj_mac.num.tmp
246 /usr/bin/perl ${SSL_OBJECTS}/objects.pl ${SSL_OBJECTS}/objects.txt obj_mac.num.tmp obj_mac.h
247
248obj_dat.h: obj_mac.h
249 /usr/bin/perl ${SSL_OBJECTS}/obj_dat.pl obj_mac.h obj_dat.h
250
251.if (${MACHINE_ARCH} == "vax")
252# egcs bombs optimising this file on vax
253a_strnid.o:
254 ${CC} ${CFLAGS} -O0 ${CPPFLAGS} -c ${.IMPSRC}
255a_strnid.po:
256 ${CC} ${CFLAGS} -O0 ${CPPFLAGS} -c ${.IMPSRC} -o $@
257des_enc.o:
258 ${CC} ${CFLAGS} -O1 ${CPPFLAGS} -c ${.IMPSRC}
259des_enc.po:
260 ${CC} ${CFLAGS} -O1 ${CPPFLAGS} -c ${.IMPSRC} -o $@
261.endif
262
263all beforedepend: ${GENERATED}
264
265.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/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/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..c10074d52a
--- /dev/null
+++ b/src/lib/libssl/crypto/shlib_version
@@ -0,0 +1,2 @@
1major=10
2minor=0
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..b591fc36ba
--- /dev/null
+++ b/src/lib/libssl/man/Makefile
@@ -0,0 +1,881 @@
1# $OpenBSD: Makefile,v 1.5 2003/07/02 02:15:51 deraadt Exp $
2
3.include <bsd.own.mk> # for NOMAN
4
5.ifndef NOMAN
6MANALL= \
7 BN_CTX_new.cat3 \
8 BN_CTX_start.cat3 \
9 BN_add.cat3 \
10 BN_add_word.cat3 \
11 BN_bn2bin.cat3 \
12 BN_cmp.cat3 \
13 BN_copy.cat3 \
14 BN_generate_prime.cat3 \
15 BN_mod_inverse.cat3 \
16 BN_mod_mul_montgomery.cat3 \
17 BN_mod_mul_reciprocal.cat3 \
18 BN_new.cat3 \
19 BN_num_bytes.cat3 \
20 BN_rand.cat3 \
21 BN_set_bit.cat3 \
22 BN_swap.cat3 \
23 BN_zero.cat3 \
24 BUF_MEM_new.cat3 \
25 BUF_MEM_new.cat3 \
26 CRYPTO_set_ex_data.cat3 \
27 CRYPTO_set_locking_callback.cat3 \
28 DH_generate_key.cat3 \
29 DH_generate_parameters.cat3 \
30 DH_get_ex_new_index.cat3 \
31 DH_new.cat3 \
32 DH_set_method.cat3 \
33 DH_size.cat3 \
34 DSA_SIG_new.cat3 \
35 DSA_do_sign.cat3 \
36 DSA_dup_DH.cat3 \
37 DSA_generate_key.cat3 \
38 DSA_generate_parameters.cat3 \
39 DSA_get_ex_new_index.cat3 \
40 DSA_new.cat3 \
41 DSA_set_method.cat3 \
42 DSA_sign.cat3 \
43 DSA_size.cat3 \
44 ERR_GET_LIB.cat3 \
45 ERR_clear_error.cat3 \
46 ERR_error_string.cat3 \
47 ERR_get_error.cat3 \
48 ERR_load_crypto_strings.cat3 \
49 ERR_load_strings.cat3 \
50 ERR_print_errors.cat3 \
51 ERR_put_error.cat3 \
52 ERR_remove_state.cat3 \
53 EVP_BytesToKey.cat3 \
54 EVP_DigestInit.cat3 \
55 EVP_EncryptInit.cat3 \
56 EVP_OpenInit.cat3 \
57 EVP_SealInit.cat3 \
58 EVP_SignInit.cat3 \
59 EVP_VerifyInit.cat3 \
60 HMAC.cat3 \
61 MD5.cat3 \
62 OPENSSL_VERSION_NUMBER.cat3 \
63 OpenSSL_add_all_algorithms.cat3 \
64 RAND_add.cat3 \
65 RAND_bytes.cat3 \
66 RAND_cleanup.cat3 \
67 RAND_egd.cat3 \
68 RAND_load_file.cat3 \
69 RAND_set_rand_method.cat3 \
70 RC4.cat3 \
71 RIPEMD160.cat3 \
72 RSA_blinding_on.cat3 \
73 RSA_check_key.cat3 \
74 RSA_generate_key.cat3 \
75 RSA_get_ex_new_index.cat3 \
76 RSA_new.cat3 \
77 RSA_padding_add_PKCS1_type_1.cat3 \
78 RSA_print.cat3 \
79 RSA_private_encrypt.cat3 \
80 RSA_public_encrypt.cat3 \
81 RSA_set_method.cat3 \
82 RSA_sign.cat3 \
83 RSA_sign_ASN1_OCTET_STRING.cat3 \
84 RSA_size.cat3 \
85 SHA1.cat3 \
86 SSL_CIPHER_get_name.cat3 \
87 SSL_COMP_add_compression_method.cat3 \
88 SSL_CTX_add_extra_chain_cert.cat3 \
89 SSL_CTX_add_session.cat3 \
90 SSL_CTX_ctrl.cat3 \
91 SSL_CTX_flush_sessions.cat3 \
92 SSL_CTX_free.cat3 \
93 SSL_CTX_get_ex_new_index.cat3 \
94 SSL_CTX_get_verify_mode.cat3 \
95 SSL_CTX_load_verify_locations.cat3 \
96 SSL_CTX_new.cat3 \
97 SSL_CTX_sess_number.cat3 \
98 SSL_CTX_sess_set_cache_size.cat3 \
99 SSL_CTX_sess_set_get_cb.cat3 \
100 SSL_CTX_sessions.cat3 \
101 SSL_CTX_set_cert_store.cat3 \
102 SSL_CTX_set_cert_verify_callback.cat3 \
103 SSL_CTX_set_cipher_list.cat3 \
104 SSL_CTX_set_client_CA_list.cat3 \
105 SSL_CTX_set_client_cert_cb.cat3 \
106 SSL_CTX_set_default_passwd_cb.cat3 \
107 SSL_CTX_set_generate_session_id.cat3 \
108 SSL_CTX_set_info_callback.cat3 \
109 SSL_CTX_set_max_cert_list.cat3 \
110 SSL_CTX_set_mode.cat3 \
111 SSL_CTX_set_msg_callback.cat3 \
112 SSL_CTX_set_options.cat3 \
113 SSL_CTX_set_quiet_shutdown.cat3 \
114 SSL_CTX_set_session_cache_mode.cat3 \
115 SSL_CTX_set_session_id_context.cat3 \
116 SSL_CTX_set_ssl_version.cat3 \
117 SSL_CTX_set_timeout.cat3 \
118 SSL_CTX_set_tmp_dh_callback.cat3 \
119 SSL_CTX_set_tmp_rsa_callback.cat3 \
120 SSL_CTX_set_verify.cat3 \
121 SSL_CTX_use_certificate.cat3 \
122 SSL_SESSION_free.cat3 \
123 SSL_SESSION_get_ex_new_index.cat3 \
124 SSL_SESSION_get_time.cat3 \
125 SSL_accept.cat3 \
126 SSL_alert_type_string.cat3 \
127 SSL_clear.cat3 \
128 SSL_connect.cat3 \
129 SSL_do_handshake.cat3 \
130 SSL_free.cat3 \
131 SSL_get_SSL_CTX.cat3 \
132 SSL_get_ciphers.cat3 \
133 SSL_get_client_CA_list.cat3 \
134 SSL_get_current_cipher.cat3 \
135 SSL_get_default_timeout.cat3 \
136 SSL_get_error.cat3 \
137 SSL_get_ex_data_X509_STORE_CTX_idx.cat3 \
138 SSL_get_ex_new_index.cat3 \
139 SSL_get_fd.cat3 \
140 SSL_get_peer_cert_chain.cat3 \
141 SSL_get_peer_certificate.cat3 \
142 SSL_get_rbio.cat3 \
143 SSL_get_session.cat3 \
144 SSL_get_verify_result.cat3 \
145 SSL_get_version.cat3 \
146 SSL_library_init.cat3 \
147 SSL_load_client_CA_file.cat3 \
148 SSL_new.cat3 \
149 SSL_pending.cat3 \
150 SSL_read.cat3 \
151 SSL_rstate_string.cat3 \
152 SSL_session_reused.cat3 \
153 SSL_set_bio.cat3 \
154 SSL_set_connect_state.cat3 \
155 SSL_set_fd.cat3 \
156 SSL_set_session.cat3 \
157 SSL_set_shutdown.cat3 \
158 SSL_set_verify_result.cat3 \
159 SSL_shutdown.cat3 \
160 SSL_state_string.cat3 \
161 SSL_want.cat3 \
162 SSL_write.cat3 \
163 blowfish.cat3 \
164 bn.cat3 \
165 bn_internal.cat3 \
166 crypto.cat3 \
167 d2i_DHparams.cat3 \
168 d2i_RSAPublicKey.cat3 \
169 d2i_SSL_SESSION.cat3 \
170 des_modes.cat7 \
171 des_random_key.cat3 \
172 dh.cat3 \
173 dsa.cat3 \
174 lh_stats.cat3 \
175 lhash.cat3 \
176 rsa.cat3 \
177 ssl.cat3
178
179.if MANPS
180PSALL= ${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}
181.endif
182
183# these are is a real problem, since they re-document functions described in
184# other pages.
185#
186# err.pod -> ERR_get_error.pod
187# ERR_peek_error ERR_get_error_line
188# ERR_peek_error_line ERR_get_error_line_data ERR_peek_error_line_data
189# ERR_GET_LIB ERR_GET_FUNC ERR_GET_REASON ERR_clear_error ERR_error_string
190# ERR_lib_error_string ERR_func_error_string ERR_reason_error_string
191# ERR_print_errors ERR_print_errors_fp ERR_load_crypto_strings ERR_free_strings
192# ERR_remove_state ERR_put_error ERR_add_error_data ERR_load_strings ERR_PACK
193# ERR_get_next_error_library
194#
195# rand.pod -> RAND_bytes.pod
196# RAND_pseudo_bytes RAND_seed RAND_add RAND_status RAND_event
197# RAND_screen RAND_load_file RAND_write_file RAND_file_name RAND_egd
198# RAND_set_rand_method RAND_get_rand_method RAND_SSLeay RAND_cleanup
199
200# buffer.pod -> BUF_MEM_new.pod
201# BUF_MEM_free BUF_MEM_grow BUF_strdup
202BUF_MEM_new.cat3: buffer.pod
203 ( cp ${.ALLSRC} BUF_MEM_new.pm && pod2man --section=3 --official \
204 --center='OpenSSL' --release="OpenBSD `uname -r`" \
205 BUF_MEM_new.pm ) | nroff -Tascii -man > ${.TARGET}
206.if MANPS
207BUF_MEM_new.ps3: buffer.pod
208 ( cp ${.ALLSRC} BUF_MEM_new.pm && pod2man --section=3 --official \
209 --center='OpenSSL' --release="OpenBSD `uname -r`" \
210 BUF_MEM_new.pm ) | nroff -Tps -man > ${.TARGET}
211.endif
212
213# rc4.pod -> RC4.pod
214# RC4_set_key
215RC4.cat3: rc4.pod
216 ( cp ${.ALLSRC} RC4.pm && pod2man --section=3 --official \
217 --center='OpenSSL' --release="OpenBSD `uname -r`" \
218 RC4.pm ) | nroff -Tascii -man > ${.TARGET}
219.if MANPS
220RC4.ps3: rc4.pod
221 ( cp ${.ALLSRC} RC4.pm && pod2man --section=3 --official \
222 --center='OpenSSL' --release="OpenBSD `uname -r`" \
223 RC4.pm ) | nroff -Tps -man > ${.TARGET}
224.endif
225
226# threads.pod -> CRYPTO_set_locking_callback.pod
227# CRYPTO_set_id_callback CRYPTO_num_locks
228CRYPTO_set_locking_callback.cat3: threads.pod
229 ( cp ${.ALLSRC} CRYPTO_set_locking_callback.pm && \
230 pod2man --section=3 --official \
231 --center='OpenSSL' --release="OpenBSD `uname -r`" \
232 CRYPTO_set_locking_callback.pm ) | nroff -Tascii -man > ${.TARGET}
233.if MANPS
234CRYPTO_set_locking_callback.ps3: threads.pod
235 ( cp ${.ALLSRC} CRYPTO_set_locking_callback.pm && \
236 pod2man --section=3 --official \
237 --center='OpenSSL' --release="OpenBSD `uname -r`" \
238 CRYPTO_set_locking_callback.pm ) | nroff -Tps -man > ${.TARGET}
239.endif
240
241# ripemd.pod -> RIPEMD160.pod
242# RIPEMD160_Init RIPEMD160_Update RIPEMD160_Final
243RIPEMD160.cat3: ripemd.pod
244 ( cp ${.ALLSRC} RIPEMD160.pm && pod2man --section=3 --official \
245 --center='OpenSSL' --release="OpenBSD `uname -r`" \
246 RIPEMD160.pm ) | nroff -Tascii -man > ${.TARGET}
247.if MANPS
248RIPEMD160.ps3: ripemd.pod
249 ( cp ${.ALLSRC} RIPEMD160.pm && pod2man --section=3 --official \
250 --center='OpenSSL' --release="OpenBSD `uname -r`" \
251 RIPEMD160.pm ) | nroff -Tps -man > ${.TARGET}
252.endif
253
254# sha.pod -> SHA1.pod
255SHA1.cat3: sha.pod
256 ( cp ${.ALLSRC} SHA1.pm && pod2man --section=3 --official \
257 --center='OpenSSL' --release="OpenBSD `uname -r`" \
258 SHA1.pm ) | nroff -Tascii -man > ${.TARGET}
259.if MANPS
260SHA1.ps3: sha.pod
261 ( cp ${.ALLSRC} SHA1.pm && pod2man --section=3 --official \
262 --center='OpenSSL' --release="OpenBSD `uname -r`" \
263 SHA1.pm ) | nroff -Tps -man > ${.TARGET}
264.endif
265
266# md5.pod -> MD5.pod
267MD5.cat3: md5.pod
268 ( cp ${.ALLSRC} MD5.pm && pod2man --section=3 --official \
269 --center='OpenSSL' --release="OpenBSD `uname -r`" \
270 MD5.pm ) | nroff -Tascii -man > ${.TARGET}
271.if MANPS
272MD5.ps3: md5.pod
273 ( cp ${.ALLSRC} MD5.pm && pod2man --section=3 --official \
274 --center='OpenSSL' --release="OpenBSD `uname -r`" \
275 MD5.pm ) | nroff -Tps -man > ${.TARGET}
276.endif
277
278# hmac.pod -> HMAC.pod
279HMAC.cat3: hmac.pod
280 ( cp ${.ALLSRC} HMAC.pm && pod2man --section=3 --official \
281 --center='OpenSSL' --release="OpenBSD `uname -r`" \
282 HMAC.pm ) | nroff -Tascii -man > ${.TARGET}
283.if MANPS
284HMAC.ps3: hmac.pod
285 ( cp ${.ALLSRC} HMAC.pm && pod2man --section=3 --official \
286 --center='OpenSSL' --release="OpenBSD `uname -r`" \
287 HMAC.pm ) | nroff -Tps -man > ${.TARGET}
288.endif
289
290# des.pod -> des_random_key, des_set_key, des_key_sched, des_set_key_checked,
291# des_set_key_unchecked, des_set_odd_parity, des_is_weak_key, des_ecb_encrypt,
292# des_ecb2_encrypt, des_ecb3_encrypt, des_ncbc_encrypt, des_cfb_encrypt,
293# des_ofb_encrypt, des_pcbc_encrypt, des_cfb64_encrypt, des_ofb64_encrypt,
294# des_xcbc_encrypt, des_ede2_cbc_encrypt, des_ede2_cfb64_encrypt,
295# des_ede2_ofb64_encrypt, des_ede3_cbc_encrypt, des_ede3_cbcm_encrypt,
296# des_ede3_cfb64_encrypt, des_ede3_ofb64_encrypt, des_read_password,
297# des_read_2passwords, des_read_pw_string, des_cbc_cksum, des_quad_cksum,
298# des_string_to_key, des_string_to_2keys, des_fcrypt, des_crypt,
299# des_enc_read, des_enc_write
300des_random_key.cat3: des.pod
301 ( cp ${.ALLSRC} des_random_key.pm && pod2man --section=3 --official \
302 --center='OpenSSL' --release="OpenBSD `uname -r`" \
303 des_random_key.pm ) | nroff -Tascii -man > ${.TARGET}
304.if MANPS
305des_random_key.ps3: des.pod
306 ( cp ${.ALLSRC} des_random_key.pm && pod2man --section=3 --official \
307 --center='OpenSSL' --release="OpenBSD `uname -r`" \
308 des_random_key.pm ) | nroff -Tps -man > ${.TARGET}
309.endif
310
311MLINKS+=\
312 BN_CTX_new.3 BN_CTX_free.3 \
313 BN_CTX_new.3 BN_CTX_init.3 \
314 BN_CTX_start.3 BN_CTX_end.3 \
315 BN_CTX_start.3 BN_CTX_get.3 \
316 BN_add.3 BN_div.3 \
317 BN_add.3 BN_exp.3 \
318 BN_add.3 BN_gcd.3 \
319 BN_add.3 BN_mod.3 \
320 BN_add.3 BN_mod_exp.3 \
321 BN_add.3 BN_mod_mul.3 \
322 BN_add.3 BN_mul.3 \
323 BN_add.3 BN_sqr.3 \
324 BN_add.3 BN_sub.3 \
325 BN_add_word.3 BN_div_word.3 \
326 BN_add_word.3 BN_mod_word.3 \
327 BN_add_word.3 BN_mul_word.3 \
328 BN_add_word.3 BN_sub_word.3 \
329 BN_bn2bin.3 BN_bin2bn.3 \
330 BN_bn2bin.3 BN_bn2dec.3 \
331 BN_bn2bin.3 BN_bn2hex.3 \
332 BN_bn2bin.3 BN_bn2mpi.3 \
333 BN_bn2bin.3 BN_dec2bn.3 \
334 BN_bn2bin.3 BN_hex2bn.3 \
335 BN_bn2bin.3 BN_mpi2bn.3 \
336 BN_bn2bin.3 BN_print.3 \
337 BN_bn2bin.3 BN_print_fp.3 \
338 BN_cmp.3 BN_is_odd.3 \
339 BN_cmp.3 BN_is_one.3 \
340 BN_cmp.3 BN_is_word.3 \
341 BN_cmp.3 BN_is_zero.3 \
342 BN_cmp.3 BN_ucmp.3 \
343 BN_copy.3 BN_dup.3 \
344 BN_generate_prime.3 BN_is_prime.3 \
345 BN_generate_prime.3 BN_is_prime_fasttest.3 \
346 BN_mod_mul_montgomery.3 BN_MONT_CTX_copy.3 \
347 BN_mod_mul_montgomery.3 BN_MONT_CTX_free.3 \
348 BN_mod_mul_montgomery.3 BN_MONT_CTX_init.3 \
349 BN_mod_mul_montgomery.3 BN_MONT_CTX_new.3 \
350 BN_mod_mul_montgomery.3 BN_MONT_CTX_set.3 \
351 BN_mod_mul_montgomery.3 BN_from_montgomery.3 \
352 BN_mod_mul_montgomery.3 BN_to_montgomery.3 \
353 BN_mod_mul_reciprocal.3 BN_RECP_CTX_free.3 \
354 BN_mod_mul_reciprocal.3 BN_RECP_CTX_init.3 \
355 BN_mod_mul_reciprocal.3 BN_RECP_CTX_new.3 \
356 BN_mod_mul_reciprocal.3 BN_RECP_CTX_set.3 \
357 BN_mod_mul_reciprocal.3 BN_div_recp.3 \
358 BN_new.3 BN_clear.3 \
359 BN_new.3 BN_clear_free.3 \
360 BN_new.3 BN_free.3 \
361 BN_new.3 BN_init.3 \
362 BN_num_bytes.3 BN_num_bits.3 \
363 BN_num_bytes.3 BN_num_bits_word.3 \
364 BN_rand.3 BN_pseudo_rand.3 \
365 BN_rand.3 BN_rand_range.3 \
366 BN_set_bit.3 BN_clear_bit.3 \
367 BN_set_bit.3 BN_is_bit_set.3 \
368 BN_set_bit.3 BN_lshift.3 \
369 BN_set_bit.3 BN_lshift1.3 \
370 BN_set_bit.3 BN_mask_bits.3 \
371 BN_set_bit.3 BN_rshift.3 \
372 BN_set_bit.3 BN_rshift1.3 \
373 BN_zero.3 BN_get_word.3 \
374 BN_zero.3 BN_one.3 \
375 BN_zero.3 BN_set_word.3 \
376 BN_zero.3 BN_value_one.3 \
377 BUF_MEM_new.3 BUF_MEM_free.3 \
378 BUF_MEM_new.3 BUF_MEM_grow.3 \
379 BUF_MEM_new.3 BUF_strdup.3 \
380 CRYPTO_set_ex_data.3 CRYPTO_get_ex_data.3 \
381 CRYPTO_set_locking_callback.3 CRYPTO_add.3 \
382 CRYPTO_set_locking_callback.3 CRYPTO_add_lock.3 \
383 CRYPTO_set_locking_callback.3 CRYPTO_destroy_dynlockid.3 \
384 CRYPTO_set_locking_callback.3 CRYPTO_get_new_dynlockid.3 \
385 CRYPTO_set_locking_callback.3 CRYPTO_lock.3 \
386 CRYPTO_set_locking_callback.3 CRYPTO_num_locks.3 \
387 CRYPTO_set_locking_callback.3 CRYPTO_r_lock.3 \
388 CRYPTO_set_locking_callback.3 CRYPTO_r_unlock.3 \
389 CRYPTO_set_locking_callback.3 CRYPTO_set_dynlock_create_callback.3 \
390 CRYPTO_set_locking_callback.3 CRYPTO_set_dynlock_destroy_callback.3 \
391 CRYPTO_set_locking_callback.3 CRYPTO_set_dynlock_lock_callback.3 \
392 CRYPTO_set_locking_callback.3 CRYPTO_set_id_callback.3 \
393 CRYPTO_set_locking_callback.3 CRYPTO_w_lock.3 \
394 CRYPTO_set_locking_callback.3 CRYPTO_w_unlock.3 \
395 DH_generate_key.3 DH_compute_key.3 \
396 DH_generate_parameters.3 DH_check.3 \
397 DH_get_ex_new_index.3 DH_get_ex_data.3 \
398 DH_get_ex_new_index.3 DH_set_ex_data.3 \
399 DH_new.3 DH_free.3 \
400 DH_set_method.3 DH_OpenSSL.3 \
401 DH_set_method.3 DH_get_default_method.3 \
402 DH_set_method.3 DH_get_default_openssl_method.3 \
403 DH_set_method.3 DH_new_method.3 \
404 DH_set_method.3 DH_set_default_method.3 \
405 DH_set_method.3 DH_set_default_openssl_method.3 \
406 DSA_new.3 DSA_free.3 \
407 DSA_set_method.3 DSA_OpenSSL.3 \
408 DSA_set_method.3 DSA_get_default_method.3 \
409 DSA_set_method.3 DSA_get_default_openssl_method.3 \
410 DSA_set_method.3 DSA_new_method.3 \
411 DSA_set_method.3 DSA_set_default_method.3 \
412 DSA_set_method.3 DSA_set_default_openssl_method.3 \
413 DSA_sign.3 DSA_sign_setup.3 \
414 DSA_sign.3 DSA_verify.3 \
415 ERR_GET_LIB.3 ERR_GET_FUNC.3 \
416 ERR_GET_LIB.3 ERR_GET_REASON.3 \
417 ERR_error_string.3 ERR_error_string_n.3 \
418 ERR_error_string.3 ERR_func_error_string.3 \
419 ERR_error_string.3 ERR_lib_error_string.3 \
420 ERR_error_string.3 ERR_reason_error_string.3 \
421 ERR_get_error.3 ERR_get_error_line.3 \
422 ERR_get_error.3 ERR_get_error_line_data.3 \
423 ERR_get_error.3 ERR_peek_error.3 \
424 ERR_get_error.3 ERR_peek_error_line.3 \
425 ERR_get_error.3 ERR_peek_error_line_data.3 \
426 ERR_load_crypto_strings.3 ERR_free_strings.3 \
427 ERR_load_crypto_strings.3 SSL_load_error_strings.3 \
428 ERR_load_strings.3 ERR_PACK.3 \
429 ERR_load_strings.3 ERR_get_next_error_library.3 \
430 ERR_print_errors.3 ERR_print_errors_fp.3 \
431 ERR_put_error.3 ERR_add_error_data.3 \
432 EVP_DigestInit.3 EVP_DigestFinal.3 \
433 EVP_DigestInit.3 EVP_DigestUpdate.3 \
434 EVP_DigestInit.3 EVP_MD_CTX_block_size.3 \
435 EVP_DigestInit.3 EVP_MD_CTX_copy.3 \
436 EVP_DigestInit.3 EVP_MD_CTX_md.3 \
437 EVP_DigestInit.3 EVP_MD_CTX_size.3 \
438 EVP_DigestInit.3 EVP_MD_CTX_type.3 \
439 EVP_DigestInit.3 EVP_MD_block_size.3 \
440 EVP_DigestInit.3 EVP_MD_block_size.3 \
441 EVP_DigestInit.3 EVP_MD_pkey_type.3 \
442 EVP_DigestInit.3 EVP_MD_size.3 \
443 EVP_DigestInit.3 EVP_MD_size.3 \
444 EVP_DigestInit.3 EVP_MD_type.3 \
445 EVP_DigestInit.3 EVP_MD_type.3 \
446 EVP_DigestInit.3 EVP_dss.3 \
447 EVP_DigestInit.3 EVP_dss1.3 \
448 EVP_DigestInit.3 EVP_get_digestbyname.3 \
449 EVP_DigestInit.3 EVP_get_digestbyname.3 \
450 EVP_DigestInit.3 EVP_get_digestbynid.3 \
451 EVP_DigestInit.3 EVP_get_digestbynid.3 \
452 EVP_DigestInit.3 EVP_get_digestbyobj.3 \
453 EVP_DigestInit.3 EVP_md2.3 \
454 EVP_DigestInit.3 EVP_md5.3 \
455 EVP_DigestInit.3 EVP_md_null.3 \
456 EVP_DigestInit.3 EVP_mdc2.3 \
457 EVP_DigestInit.3 EVP_ripemd160.3 \
458 EVP_DigestInit.3 EVP_sha.3 \
459 EVP_DigestInit.3 EVP_sha1.3 \
460 EVP_DigestInit.3 OBJ_nid2sn.3 \
461 EVP_DigestInit.3 OBJ_obj2nid.3 \
462 EVP_EncryptInit.3 EVP_CIPHER_CTX_block_size.3 \
463 EVP_EncryptInit.3 EVP_CIPHER_CTX_cipher.3 \
464 EVP_EncryptInit.3 EVP_CIPHER_CTX_cipher.3 \
465 EVP_EncryptInit.3 EVP_CIPHER_CTX_cleanup.3 \
466 EVP_EncryptInit.3 EVP_CIPHER_CTX_ctrl.3 \
467 EVP_EncryptInit.3 EVP_CIPHER_CTX_iv_length.3 \
468 EVP_EncryptInit.3 EVP_CIPHER_CTX_key_length.3 \
469 EVP_EncryptInit.3 EVP_CIPHER_CTX_nid.3 \
470 EVP_EncryptInit.3 EVP_CIPHER_CTX_set_key_length.3 \
471 EVP_EncryptInit.3 EVP_CIPHER_CTX_type.3 \
472 EVP_EncryptInit.3 EVP_CIPHER_asn1_to_param.3 \
473 EVP_EncryptInit.3 EVP_CIPHER_block_size.3 \
474 EVP_EncryptInit.3 EVP_CIPHER_iv_length.3 \
475 EVP_EncryptInit.3 EVP_CIPHER_key_length.3 \
476 EVP_EncryptInit.3 EVP_CIPHER_nid.3 \
477 EVP_EncryptInit.3 EVP_CIPHER_param_to_asn1.3 \
478 EVP_EncryptInit.3 EVP_CIPHER_type.3 \
479 EVP_EncryptInit.3 EVP_CIPHER_type.3 \
480 EVP_EncryptInit.3 EVP_CipherFinal.3 \
481 EVP_EncryptInit.3 EVP_CipherInit.3 \
482 EVP_EncryptInit.3 EVP_CipherUpdate.3 \
483 EVP_EncryptInit.3 EVP_DecryptFinal.3 \
484 EVP_EncryptInit.3 EVP_DecryptInit.3 \
485 EVP_EncryptInit.3 EVP_DecryptUpdate.3 \
486 EVP_EncryptInit.3 EVP_EncryptFinal.3 \
487 EVP_EncryptInit.3 EVP_EncryptUpdate.3 \
488 EVP_EncryptInit.3 EVP_get_cipherbyname.3 \
489 EVP_EncryptInit.3 EVP_get_cipherbyname.3 \
490 EVP_EncryptInit.3 EVP_get_cipherbynid.3 \
491 EVP_EncryptInit.3 EVP_get_cipherbynid.3 \
492 EVP_EncryptInit.3 EVP_get_cipherbyobj.3 \
493 EVP_EncryptInit.3 OBJ_nid2sn.3 \
494 EVP_EncryptInit.3 OBJ_obj2nid.3 \
495 EVP_OpenInit.3 EVP_OpenFinal.3 \
496 EVP_OpenInit.3 EVP_OpenUpdate.3 \
497 EVP_SealInit.3 EVP_SealFinal.3 \
498 EVP_SealInit.3 EVP_SealUpdate.3 \
499 EVP_SignInit.3 EVP_PKEY_size.3 \
500 EVP_SignInit.3 EVP_SignFinal.3 \
501 EVP_SignInit.3 EVP_SignUpdate.3 \
502 EVP_VerifyInit.3 EVP_VerifyFinal.3 \
503 EVP_VerifyInit.3 EVP_VerifyUpdate.3 \
504 HMAC.3 HMAC_Final.3 \
505 HMAC.3 HMAC_Init.3 \
506 HMAC.3 HMAC_Update.3 \
507 HMAC.3 HMAC_cleanup.3 \
508 MD5.3 MD2.3 \
509 MD5.3 MD2_Final.3 \
510 MD5.3 MD2_Init.3 \
511 MD5.3 MD2_Update.3 \
512 MD5.3 MD4.3 \
513 MD5.3 MD4_Final.3 \
514 MD5.3 MD4_Init.3 \
515 MD5.3 MD4_Update.3 \
516 MD5.3 MD5_Final.3 \
517 MD5.3 MD5_Init.3 \
518 MD5.3 MD5_Update.3 \
519 OPENSSL_VERSION_NUMBER.3 SSLeay.3 \
520 OPENSSL_VERSION_NUMBER.3 SSLeay_version.3 \
521 OpenSSL_add_all_algorithms.3 EVP_cleanup.3 \
522 OpenSSL_add_all_algorithms.3 OpenSSL_add_all_ciphers.3 \
523 OpenSSL_add_all_algorithms.3 OpenSSL_add_all_digests.3 \
524 RAND_add.3 RAND_event.3 \
525 RAND_add.3 RAND_screen.3 \
526 RAND_add.3 RAND_seed.3 \
527 RAND_add.3 RAND_status.3 \
528 RAND_bytes.3 RAND_pseudo_bytes.3 \
529 RAND_bytes.3 RAND_pseudo_bytes.3 \
530 RAND_egd.3 RAND_egd_bytes.3 \
531 RAND_load_file.3 RAND_file_name.3 \
532 RAND_load_file.3 RAND_file_name.3 \
533 RAND_load_file.3 RAND_write_file.3 \
534 RAND_load_file.3 RAND_write_file.3 \
535 RAND_set_rand_method.3 RAND_SSLeay.3 \
536 RAND_set_rand_method.3 RAND_SSLeay.3 \
537 RAND_set_rand_method.3 RAND_get_rand_method.3 \
538 RAND_set_rand_method.3 RAND_get_rand_method.3 \
539 RC4.3 RC4_set_key.3 \
540 RIPEMD160.3 RIPEMD160_Final.3 \
541 RIPEMD160.3 RIPEMD160_Init.3 \
542 RIPEMD160.3 RIPEMD160_Update.3 \
543 RSA_blinding_on.3 RSA_blinding_off.3 \
544 RSA_get_ex_new_index.3 RSA_get_ex_data.3 \
545 RSA_get_ex_new_index.3 RSA_set_ex_data.3 \
546 RSA_new.3 RSA_free.3 \
547 RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_PKCS1_OAEP.3 \
548 RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_PKCS1_type_2.3 \
549 RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_SSLv23.3 \
550 RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_none.3 \
551 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_OAEP.3 \
552 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_type_1.3 \
553 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_type_2.3 \
554 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_SSLv23.3 \
555 RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_none.3 \
556 RSA_print.3 DHparams_print.3 \
557 RSA_print.3 DHparams_print.3 \
558 RSA_print.3 DHparams_print_fp.3 \
559 RSA_print.3 DHparams_print_fp.3 \
560 RSA_print.3 DSA_print.3 \
561 RSA_print.3 DSA_print_fp.3 \
562 RSA_print.3 DSA_print_fp.3 \
563 RSA_print.3 DSAparams_print.3 \
564 RSA_print.3 DSAparams_print.3 \
565 RSA_print.3 DSAparams_print_fp.3 \
566 RSA_print.3 DSAparams_print_fp.3 \
567 RSA_print.3 RSA_print_fp.3 \
568 RSA_print.3 RSA_print_fp.3 \
569 RSA_private_encrypt.3 RSA_public_decrypt.3 \
570 RSA_public_encrypt.3 RSA_private_decrypt.3 \
571 RSA_set_method.3 RSA_PKCS1_RSAref.3 \
572 RSA_set_method.3 RSA_PKCS1_SSLeay.3 \
573 RSA_set_method.3 RSA_flags.3 \
574 RSA_set_method.3 RSA_get_default_method.3 \
575 RSA_set_method.3 RSA_get_default_openssl_method.3 \
576 RSA_set_method.3 RSA_get_method.3 \
577 RSA_set_method.3 RSA_new_method.3 \
578 RSA_set_method.3 RSA_null_method.3 \
579 RSA_set_method.3 RSA_set_default_method.3 \
580 RSA_set_method.3 RSA_set_default_openssl_method.3 \
581 RSA_sign.3 RSA_verify.3 \
582 RSA_sign_ASN1_OCTET_STRING.3 RSA_verify_ASN1_OCTET_STRING.3 \
583 SHA1.3 SHA1_Final.3 \
584 SHA1.3 SHA1_Init.3 \
585 SHA1.3 SHA1_Update.3 \
586 SSL_CIPHER_get_name.3 SSL_CIPHER_description.3 \
587 SSL_CIPHER_get_name.3 SSL_CIPHER_get_bits.3 \
588 SSL_CIPHER_get_name.3 SSL_CIPHER_get_version.3 \
589 SSL_CTX_add_session.3 SSL_CTX_remove_session.3 \
590 SSL_CTX_add_session.3 SSL_add_session.3 \
591 SSL_CTX_add_session.3 SSL_remove_session.3 \
592 SSL_CTX_ctrl.3 SSL_CTX_callback_ctrl.3 \
593 SSL_CTX_ctrl.3 SSL_callback_ctrl.3 \
594 SSL_CTX_ctrl.3 SSL_ctrl.3 \
595 SSL_CTX_flush_sessions.3 SSL_flush_sessions.3 \
596 SSL_CTX_get_ex_new_index.3 SSL_CTX_get_ex_data.3 \
597 SSL_CTX_get_ex_new_index.3 SSL_CTX_set_ex_data.3 \
598 SSL_CTX_get_verify_mode.3 SSL_CTX_get_verify_callback.3 \
599 SSL_CTX_get_verify_mode.3 SSL_CTX_get_verify_depth.3 \
600 SSL_CTX_get_verify_mode.3 SSL_get_verify_callback.3 \
601 SSL_CTX_get_verify_mode.3 SSL_get_verify_depth.3 \
602 SSL_CTX_get_verify_mode.3 SSL_get_verify_mode.3 \
603 SSL_CTX_sess_number.3 SSL_CTX_sess_accept.3 \
604 SSL_CTX_sess_number.3 SSL_CTX_sess_accept_good.3 \
605 SSL_CTX_sess_number.3 SSL_CTX_sess_accept_renegotiate.3 \
606 SSL_CTX_sess_number.3 SSL_CTX_sess_cache_full.3 \
607 SSL_CTX_sess_number.3 SSL_CTX_sess_cb_hits.3 \
608 SSL_CTX_sess_number.3 SSL_CTX_sess_connect.3 \
609 SSL_CTX_sess_number.3 SSL_CTX_sess_connect_good.3 \
610 SSL_CTX_sess_number.3 SSL_CTX_sess_connect_renegotiate.3 \
611 SSL_CTX_sess_number.3 SSL_CTX_sess_hits.3 \
612 SSL_CTX_sess_number.3 SSL_CTX_sess_misses.3 \
613 SSL_CTX_sess_number.3 SSL_CTX_sess_timeouts.3 \
614 SSL_CTX_sess_set_cache_size.3 SSL_CTX_sess_get_cache_size.3 \
615 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_get_get_cb.3 \
616 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_get_new_cb.3 \
617 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_get_remove_cb.3 \
618 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_set_new_cb.3 \
619 SSL_CTX_sess_set_get_cb.3 SSL_CTX_sess_set_remove.3 \
620 SSL_CTX_set_cert_store.3 SSL_CTX_get_cert_store.3 \
621 SSL_CTX_set_cipher_list.3 SSL_set_cipher_list.3 \
622 SSL_CTX_set_client_CA_list.3 SSL_CTX_add_client_CA.3 \
623 SSL_CTX_set_client_CA_list.3 SSL_add_client_CA.3 \
624 SSL_CTX_set_client_CA_list.3 SSL_set_client_CA_list.3 \
625 SSL_CTX_set_default_passwd_cb.3 \
626 SSL_CTX_set_default_passwd_cb_userdata.3 \
627 SSL_CTX_set_max_cert_list.3 SSL_CTX_get_max_cert_list.3 \
628 SSL_CTX_set_max_cert_list.3 SSL_get_max_cert_list.3 \
629 SSL_CTX_set_max_cert_list.3 SSL_set_max_cert_list.3 \
630 SSL_CTX_set_mode.3 SSL_CTX_get_mode.3 \
631 SSL_CTX_set_mode.3 SSL_get_mode.3 \
632 SSL_CTX_set_mode.3 SSL_set_mode.3 \
633 SSL_CTX_set_msg_callback.3 SSL_CTX_set_msg_callback_arg.3 \
634 SSL_CTX_set_msg_callback.3 SSL_set_msg_callback.3 \
635 SSL_CTX_set_msg_callback.3 SSL_set_msg_callback_arg.3 \
636 SSL_CTX_set_options.3 SSL_CTX_get_options.3 \
637 SSL_CTX_set_options.3 SSL_get_options.3 \
638 SSL_CTX_set_options.3 SSL_set_options.3 \
639 SSL_CTX_set_quiet_shutdown.3 SSL_CTX_get_quiet_shutdown.3 \
640 SSL_CTX_set_quiet_shutdown.3 SSL_get_quiet_shutdown.3 \
641 SSL_CTX_set_quiet_shutdown.3 SSL_set_quiet_shutdown.3 \
642 SSL_CTX_set_session_cache_mode.3 SSL_CTX_get_session_cache_mode.3 \
643 SSL_CTX_set_session_id_context.3 SSL_set_session_id_context.3 \
644 SSL_CTX_set_ssl_version.3 SSL_get_ssl_method.3 \
645 SSL_CTX_set_ssl_version.3 SSL_set_ssl_method.3 \
646 SSL_CTX_set_timeout.3 SSL_CTX_get_timeout.3 \
647 SSL_CTX_set_tmp_dh_callback.3 SSL_CTX_set_tmp_dh.3 \
648 SSL_CTX_set_tmp_dh_callback.3 SSL_set_tmp_dh.3 \
649 SSL_CTX_set_tmp_dh_callback.3 SSL_set_tmp_dh_callback.3 \
650 SSL_CTX_set_tmp_rsa_callback.3 SSL_CTX_need_tmp_rsa.3 \
651 SSL_CTX_set_tmp_rsa_callback.3 SSL_CTX_set_tmp_rsa.3 \
652 SSL_CTX_set_tmp_rsa_callback.3 SSL_need_tmp_rsa.3 \
653 SSL_CTX_set_tmp_rsa_callback.3 SSL_set_tmp_rsa.3 \
654 SSL_CTX_set_tmp_rsa_callback.3 SSL_set_tmp_rsa_callback.3 \
655 SSL_CTX_set_verify.3 SSL_CTX_set_verify_depth.3 \
656 SSL_CTX_set_verify.3 SSL_set_verify.3 \
657 SSL_CTX_set_verify.3 SSL_set_verify_depth.3 \
658 SSL_CTX_use_certificate.3 SSL_CTX_check_private_key.3 \
659 SSL_CTX_use_certificate.3 SSL_CTX_use_PrivateKey.3 \
660 SSL_CTX_use_certificate.3 SSL_CTX_use_PrivateKey_ASN1.3 \
661 SSL_CTX_use_certificate.3 SSL_CTX_use_PrivateKey_file.3 \
662 SSL_CTX_use_certificate.3 SSL_CTX_use_RSAPrivateKey.3 \
663 SSL_CTX_use_certificate.3 SSL_CTX_use_RSAPrivateKey_ASN1.3 \
664 SSL_CTX_use_certificate.3 SSL_CTX_use_RSAPrivateKey_file.3 \
665 SSL_CTX_use_certificate.3 SSL_CTX_use_certificate_ASN1.3 \
666 SSL_CTX_use_certificate.3 SSL_CTX_use_certificate_chain_file.3 \
667 SSL_CTX_use_certificate.3 SSL_CTX_use_certificate_file.3 \
668 SSL_CTX_use_certificate.3 SSL_check_private_key.3 \
669 SSL_CTX_use_certificate.3 SSL_use_PrivateKey.3 \
670 SSL_CTX_use_certificate.3 SSL_use_PrivateKey_ASN1.3 \
671 SSL_CTX_use_certificate.3 SSL_use_PrivateKey_file.3 \
672 SSL_CTX_use_certificate.3 SSL_use_RSAPrivateKey.3 \
673 SSL_CTX_use_certificate.3 SSL_use_RSAPrivateKey_ASN1.3 \
674 SSL_CTX_use_certificate.3 SSL_use_RSAPrivateKey_file.3 \
675 SSL_CTX_use_certificate.3 SSL_use_certificate.3 \
676 SSL_CTX_use_certificate.3 SSL_use_certificate_ASN1.3 \
677 SSL_CTX_use_certificate.3 SSL_use_certificate_file.3 \
678 SSL_SESSION_get_ex_new_index.3 SSL_SESSION_get_ex_data.3 \
679 SSL_SESSION_get_ex_new_index.3 SSL_SESSION_set_ex_data.3 \
680 SSL_SESSION_get_time.3 SSL_SESSION_get_timeout.3 \
681 SSL_SESSION_get_time.3 SSL_SESSION_set_time.3 \
682 SSL_SESSION_get_time.3 SSL_SESSION_set_timeout.3 \
683 SSL_SESSION_get_time.3 SSL_get_time.3 \
684 SSL_SESSION_get_time.3 SSL_get_timeout.3 \
685 SSL_SESSION_get_time.3 SSL_set_time.3 \
686 SSL_SESSION_get_time.3 SSL_set_timeout.3 \
687 SSL_alert_type_string.3 SSL_alert_desc_string.3 \
688 SSL_alert_type_string.3 SSL_alert_desc_string_long.3 \
689 SSL_alert_type_string.3 SSL_alert_type_string_long.3 \
690 SSL_get_ciphers.3 SSL_get_cipher_list.3 \
691 SSL_get_client_CA_list.3 SSL_CTX_get_client_CA_list.3 \
692 SSL_get_current_cipher.3 SSL_get_cipher.3 \
693 SSL_get_current_cipher.3 SSL_get_cipher_bits.3 \
694 SSL_get_current_cipher.3 SSL_get_cipher_name.3 \
695 SSL_get_current_cipher.3 SSL_get_cipher_version.3 \
696 SSL_get_ex_new_index.3 SSL_get_ex_data.3 \
697 SSL_get_ex_new_index.3 SSL_set_ex_data.3 \
698 SSL_get_fd.3 SSL_get_rfd.3 \
699 SSL_get_fd.3 SSL_get_wfd.3 \
700 SSL_get_rbio.3 SSL_get_wbio.3 \
701 SSL_get_session.3 SSL_get0_session.3 \
702 SSL_get_session.3 SSL_get1_session.3 \
703 SSL_library_init.3 OpenSSL_add_ssl_algorithms.3 \
704 SSL_library_init.3 SSLeay_add_ssl_algorithms.3 \
705 SSL_rstate_string.3 SSL_rstate_string_long.3 \
706 SSL_set_connect_state.3 SSL_set_accept_state.3 \
707 SSL_set_fd.3 SSL_set_rfd.3 \
708 SSL_set_fd.3 SSL_set_wfd.3 \
709 SSL_set_shutdown.3 SSL_get_shutdown.3 \
710 SSL_state_string.3 SSL_state_string_long.3 \
711 SSL_want.3 SSL_want_nothing.3 \
712 SSL_want.3 SSL_want_read.3 \
713 SSL_want.3 SSL_want_write.3 \
714 SSL_want.3 SSL_want_x509_lookup.3 \
715 blowfish.3 BF_cbc.3 \
716 blowfish.3 BF_cbc_encrypt.3 \
717 blowfish.3 BF_cfb64_encrypt.3 \
718 blowfish.3 BF_decrypt.3 \
719 blowfish.3 BF_ecb.3 \
720 blowfish.3 BF_ecb_encrypt.3 \
721 blowfish.3 BF_encrypt.3 \
722 blowfish.3 BF_ofb64_encrypt.3 \
723 blowfish.3 BF_options.3 \
724 blowfish.3 BF_set_key.3 \
725 bn_internal.3 bn_add_words.3 \
726 bn_internal.3 bn_check_top.3 \
727 bn_internal.3 bn_cmp_words.3 \
728 bn_internal.3 bn_div_words.3 \
729 bn_internal.3 bn_dump.3 \
730 bn_internal.3 bn_expand.3 \
731 bn_internal.3 bn_expand2.3 \
732 bn_internal.3 bn_fix_top.3 \
733 bn_internal.3 bn_mul_add_words.3 \
734 bn_internal.3 bn_mul_comba4.3 \
735 bn_internal.3 bn_mul_comba8.3 \
736 bn_internal.3 bn_mul_high.3 \
737 bn_internal.3 bn_mul_low_normal.3 \
738 bn_internal.3 bn_mul_low_recursive.3 \
739 bn_internal.3 bn_mul_normal.3 \
740 bn_internal.3 bn_mul_part_recursive.3 \
741 bn_internal.3 bn_mul_recursive.3 \
742 bn_internal.3 bn_mul_words.3 \
743 bn_internal.3 bn_print.3 \
744 bn_internal.3 bn_set_high.3 \
745 bn_internal.3 bn_set_low.3 \
746 bn_internal.3 bn_set_max.3 \
747 bn_internal.3 bn_sqr_comba4.3 \
748 bn_internal.3 bn_sqr_comba8.3 \
749 bn_internal.3 bn_sqr_normal.3 \
750 bn_internal.3 bn_sqr_recursive.3 \
751 bn_internal.3 bn_sqr_words.3 \
752 bn_internal.3 bn_sub_words.3 \
753 bn_internal.3 bn_wexpand.3 \
754 bn_internal.3 mul.3 \
755 bn_internal.3 mul_add.3 \
756 bn_internal.3 sqr.3 \
757 d2i_DHparams.3 i2d_DHparams.3 \
758 d2i_RSAPublicKey.3 d2i_Netscape_RSA.3 \
759 d2i_RSAPublicKey.3 d2i_RSAPrivateKey.3 \
760 d2i_RSAPublicKey.3 i2d_Netscape_RSA.3 \
761 d2i_RSAPublicKey.3 i2d_RSAPrivateKey.3 \
762 d2i_RSAPublicKey.3 i2d_RSAPublicKey.3 \
763 d2i_SSL_SESSION.3 i2d_SSL_SESSION.3 \
764 des_crypt.3 des_string_to_2keys.3 \
765 des_random_key.3 des_cbc_cksum.3 \
766 des_random_key.3 des_cfb64_encrypt.3 \
767 des_random_key.3 des_cfb_encrypt.3 \
768 des_random_key.3 des_crypt.3 \
769 des_random_key.3 des_ecb2_encrypt.3 \
770 des_random_key.3 des_ecb3_encrypt.3 \
771 des_random_key.3 des_ecb_encrypt.3 \
772 des_random_key.3 des_ede2_cbc_encrypt.3 \
773 des_random_key.3 des_ede2_cfb64_encrypt.3 \
774 des_random_key.3 des_ede2_ofb64_encrypt.3 \
775 des_random_key.3 des_ede3_cbc_encrypt.3 \
776 des_random_key.3 des_ede3_cbcm_encrypt.3 \
777 des_random_key.3 des_ede3_cfb64_encrypt.3 \
778 des_random_key.3 des_ede3_ofb64_encrypt.3 \
779 des_random_key.3 des_enc_read.3 \
780 des_random_key.3 des_enc_write.3 \
781 des_random_key.3 des_fcrypt.3 \
782 des_random_key.3 des_is_weak_key.3 \
783 des_random_key.3 des_key_sched.3 \
784 des_random_key.3 des_ncbc_encrypt.3 \
785 des_random_key.3 des_ofb64_encrypt.3 \
786 des_random_key.3 des_ofb_encrypt.3 \
787 des_random_key.3 des_pcbc_encrypt.3 \
788 des_random_key.3 des_quad_cksum.3 \
789 des_random_key.3 des_read_2passwords.3 \
790 des_random_key.3 des_read_password.3 \
791 des_random_key.3 des_read_pw_string.3 \
792 des_random_key.3 des_set_key.3 \
793 des_random_key.3 des_set_key_checked.3 \
794 des_random_key.3 des_set_key_unchecked.3 \
795 des_random_key.3 des_set_odd_parity.3 \
796 des_random_key.3 des_string_to_2keys.3 \
797 des_random_key.3 des_string_to_key.3 \
798 des_random_key.3 des_xcbc_encrypt.3 \
799 dsa.3 DSA_OpenSSL.3 \
800 dsa.3 DSA_SIG_free.3 \
801 dsa.3 DSA_do_verify.3 \
802 dsa.3 DSA_free.3 \
803 dsa.3 DSA_get_default_method.3 \
804 dsa.3 DSA_get_ex_data.3 \
805 dsa.3 DSA_new_method.3 \
806 dsa.3 DSA_set_default_method.3 \
807 dsa.3 DSA_set_ex_data.3 \
808 dsa.3 DSA_sign_setup.3 \
809 dsa.3 DSA_verify.3 \
810 dsa.3 d2i_DSAPrivateKey.3 \
811 dsa.3 d2i_DSAPublicKey.3 \
812 dsa.3 d2i_DSA_SIG.3 \
813 dsa.3 d2i_DSAparams.3 \
814 dsa.3 i2d_DSAPrivateKey.3 \
815 dsa.3 i2d_DSAPublicKey.3 \
816 dsa.3 i2d_DSA_SIG.3 \
817 dsa.3 i2d_DSAparams.3 \
818 lh_stats.3 lh_node_stats.3 \
819 lh_stats.3 lh_node_stats_bio.3 \
820 lh_stats.3 lh_node_usage_stats.3 \
821 lh_stats.3 lh_node_usage_stats_bio.3 \
822 lh_stats.3 lh_stats_bio.3 \
823 lhash.3 lh_delete.3 \
824 lhash.3 lh_doall.3 \
825 lhash.3 lh_doall_arg.3 \
826 lhash.3 lh_error.3 \
827 lhash.3 lh_free.3 \
828 lhash.3 lh_insert.3 \
829 lhash.3 lh_new.3 \
830 lhash.3 lh_retrieve.3
831
832.include <bsd.man.mk>
833.else
834maninstall:
835
836.endif
837
838# XXX .PATH order is critical because of non-unique filenames
839.PATH: ${.CURDIR}/../src/doc/crypto ${.CURDIR}/../src/doc/ssl ${.CURDIR}/../src/doc/apps
840.SUFFIXES: .pod
841.pod.cat3:
842 ( cd `dirname ${.ALLSRC}` && pod2man --section=3 --official \
843 --center='OpenSSL' --release="OpenBSD `uname -r`" \
844 `basename ${.ALLSRC}` ) | nroff -Tascii -man > ${.TARGET}
845.pod.cat7:
846 ( cd `dirname ${.ALLSRC}` && pod2man --section=7 --official \
847 --center='OpenSSL' --release="OpenBSD `uname -r`" \
848 `basename ${.ALLSRC}` ) | nroff -Tascii -man > ${.TARGET}
849.pod.cat1:
850 ( cd `dirname ${.ALLSRC}` && pod2man --section=1 --official \
851 --center='OpenSSL' --release="OpenBSD `uname -r`" \
852 `basename ${.ALLSRC}` ) | nroff -Tascii -man > ${.TARGET}
853
854.pod.ps3:
855 ( cd `dirname ${.ALLSRC}` && pod2man --section=3 --official \
856 --center='OpenSSL' --release="OpenBSD `uname -r`" \
857 `basename ${.ALLSRC}` ) | nroff -Tps -man > ${.TARGET}
858.pod.ps7:
859 ( cd `dirname ${.ALLSRC}` && pod2man --section=7 --official \
860 --center='OpenSSL' --release="OpenBSD `uname -r`" \
861 `basename ${.ALLSRC}` ) | nroff -Tps -man > ${.TARGET}
862.pod.ps1:
863 ( cd `dirname ${.ALLSRC}` && pod2man --section=1 --official \
864 --center='OpenSSL' --release="OpenBSD `uname -r`" \
865 `basename ${.ALLSRC}` ) | nroff -Tps -man > ${.TARGET}
866
867.include <bsd.obj.mk>
868.include <bsd.subdir.mk>
869
870CLEANFILES+=\
871 BUF_MEM_new.pm \
872 CRYPTO_set_locking_callback.pm \
873 HMAC.pm \
874 RC4.pm \
875 RIPEMD160.pm \
876 SHA1.pm \
877 des_random_key.pm \
878 MD5.pm \
879
880clean cleandir:
881 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..3f88429e79
--- /dev/null
+++ b/src/lib/libssl/s3_pkt.c
@@ -0,0 +1,1302 @@
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 rr->length=0;
1089
1090 if (s->msg_callback)
1091 s->msg_callback(0, s->version, SSL3_RT_CHANGE_CIPHER_SPEC, rr->data, 1, s, s->msg_callback_arg);
1092
1093 s->s3->change_cipher_spec=1;
1094 if (!do_change_cipher_spec(s))
1095 goto err;
1096 else
1097 goto start;
1098 }
1099
1100 /* Unexpected handshake message (Client Hello, or protocol violation) */
1101 if ((s->s3->handshake_fragment_len >= 4) && !s->in_handshake)
1102 {
1103 if (((s->state&SSL_ST_MASK) == SSL_ST_OK) &&
1104 !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS))
1105 {
1106#if 0 /* worked only because C operator preferences are not as expected (and
1107 * because this is not really needed for clients except for detecting
1108 * protocol violations): */
1109 s->state=SSL_ST_BEFORE|(s->server)
1110 ?SSL_ST_ACCEPT
1111 :SSL_ST_CONNECT;
1112#else
1113 s->state = s->server ? SSL_ST_ACCEPT : SSL_ST_CONNECT;
1114#endif
1115 s->new_session=1;
1116 }
1117 i=s->handshake_func(s);
1118 if (i < 0) return(i);
1119 if (i == 0)
1120 {
1121 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_SSL_HANDSHAKE_FAILURE);
1122 return(-1);
1123 }
1124
1125 if (!(s->mode & SSL_MODE_AUTO_RETRY))
1126 {
1127 if (s->s3->rbuf.left == 0) /* no read-ahead left? */
1128 {
1129 BIO *bio;
1130 /* In the case where we try to read application data,
1131 * but we trigger an SSL handshake, we return -1 with
1132 * the retry option set. Otherwise renegotiation may
1133 * cause nasty problems in the blocking world */
1134 s->rwstate=SSL_READING;
1135 bio=SSL_get_rbio(s);
1136 BIO_clear_retry_flags(bio);
1137 BIO_set_retry_read(bio);
1138 return(-1);
1139 }
1140 }
1141 goto start;
1142 }
1143
1144 switch (rr->type)
1145 {
1146 default:
1147#ifndef OPENSSL_NO_TLS
1148 /* TLS just ignores unknown message types */
1149 if (s->version == TLS1_VERSION)
1150 {
1151 rr->length = 0;
1152 goto start;
1153 }
1154#endif
1155 al=SSL_AD_UNEXPECTED_MESSAGE;
1156 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_UNEXPECTED_RECORD);
1157 goto f_err;
1158 case SSL3_RT_CHANGE_CIPHER_SPEC:
1159 case SSL3_RT_ALERT:
1160 case SSL3_RT_HANDSHAKE:
1161 /* we already handled all of these, with the possible exception
1162 * of SSL3_RT_HANDSHAKE when s->in_handshake is set, but that
1163 * should not happen when type != rr->type */
1164 al=SSL_AD_UNEXPECTED_MESSAGE;
1165 SSLerr(SSL_F_SSL3_READ_BYTES,ERR_R_INTERNAL_ERROR);
1166 goto f_err;
1167 case SSL3_RT_APPLICATION_DATA:
1168 /* At this point, we were expecting handshake data,
1169 * but have application data. If the library was
1170 * running inside ssl3_read() (i.e. in_read_app_data
1171 * is set) and it makes sense to read application data
1172 * at this point (session renegotiation not yet started),
1173 * we will indulge it.
1174 */
1175 if (s->s3->in_read_app_data &&
1176 (s->s3->total_renegotiations != 0) &&
1177 ((
1178 (s->state & SSL_ST_CONNECT) &&
1179 (s->state >= SSL3_ST_CW_CLNT_HELLO_A) &&
1180 (s->state <= SSL3_ST_CR_SRVR_HELLO_A)
1181 ) || (
1182 (s->state & SSL_ST_ACCEPT) &&
1183 (s->state <= SSL3_ST_SW_HELLO_REQ_A) &&
1184 (s->state >= SSL3_ST_SR_CLNT_HELLO_A)
1185 )
1186 ))
1187 {
1188 s->s3->in_read_app_data=2;
1189 return(-1);
1190 }
1191 else
1192 {
1193 al=SSL_AD_UNEXPECTED_MESSAGE;
1194 SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_UNEXPECTED_RECORD);
1195 goto f_err;
1196 }
1197 }
1198 /* not reached */
1199
1200f_err:
1201 ssl3_send_alert(s,SSL3_AL_FATAL,al);
1202err:
1203 return(-1);
1204 }
1205
1206static int do_change_cipher_spec(SSL *s)
1207 {
1208 int i;
1209 const char *sender;
1210 int slen;
1211
1212 if (s->state & SSL_ST_ACCEPT)
1213 i=SSL3_CHANGE_CIPHER_SERVER_READ;
1214 else
1215 i=SSL3_CHANGE_CIPHER_CLIENT_READ;
1216
1217 if (s->s3->tmp.key_block == NULL)
1218 {
1219 s->session->cipher=s->s3->tmp.new_cipher;
1220 if (!s->method->ssl3_enc->setup_key_block(s)) return(0);
1221 }
1222
1223 if (!s->method->ssl3_enc->change_cipher_state(s,i))
1224 return(0);
1225
1226 /* we have to record the message digest at
1227 * this point so we can get it before we read
1228 * the finished message */
1229 if (s->state & SSL_ST_CONNECT)
1230 {
1231 sender=s->method->ssl3_enc->server_finished_label;
1232 slen=s->method->ssl3_enc->server_finished_label_len;
1233 }
1234 else
1235 {
1236 sender=s->method->ssl3_enc->client_finished_label;
1237 slen=s->method->ssl3_enc->client_finished_label_len;
1238 }
1239
1240 s->s3->tmp.peer_finish_md_len = s->method->ssl3_enc->final_finish_mac(s,
1241 &(s->s3->finish_dgst1),
1242 &(s->s3->finish_dgst2),
1243 sender,slen,s->s3->tmp.peer_finish_md);
1244
1245 return(1);
1246 }
1247
1248void ssl3_send_alert(SSL *s, int level, int desc)
1249 {
1250 /* Map tls/ssl alert value to correct one */
1251 desc=s->method->ssl3_enc->alert_value(desc);
1252 if (s->version == SSL3_VERSION && desc == SSL_AD_PROTOCOL_VERSION)
1253 desc = SSL_AD_HANDSHAKE_FAILURE; /* SSL 3.0 does not have protocol_version alerts */
1254 if (desc < 0) return;
1255 /* If a fatal one, remove from cache */
1256 if ((level == 2) && (s->session != NULL))
1257 SSL_CTX_remove_session(s->ctx,s->session);
1258
1259 s->s3->alert_dispatch=1;
1260 s->s3->send_alert[0]=level;
1261 s->s3->send_alert[1]=desc;
1262 if (s->s3->wbuf.left == 0) /* data still being written out? */
1263 ssl3_dispatch_alert(s);
1264 /* else data is still being written out, we will get written
1265 * some time in the future */
1266 }
1267
1268int ssl3_dispatch_alert(SSL *s)
1269 {
1270 int i,j;
1271 void (*cb)(const SSL *ssl,int type,int val)=NULL;
1272
1273 s->s3->alert_dispatch=0;
1274 i = do_ssl3_write(s, SSL3_RT_ALERT, &s->s3->send_alert[0], 2, 0);
1275 if (i <= 0)
1276 {
1277 s->s3->alert_dispatch=1;
1278 }
1279 else
1280 {
1281 /* Alert sent to BIO. If it is important, flush it now.
1282 * If the message does not get sent due to non-blocking IO,
1283 * we will not worry too much. */
1284 if (s->s3->send_alert[0] == SSL3_AL_FATAL)
1285 (void)BIO_flush(s->wbio);
1286
1287 if (s->msg_callback)
1288 s->msg_callback(1, s->version, SSL3_RT_ALERT, s->s3->send_alert, 2, s, s->msg_callback_arg);
1289
1290 if (s->info_callback != NULL)
1291 cb=s->info_callback;
1292 else if (s->ctx->info_callback != NULL)
1293 cb=s->ctx->info_callback;
1294
1295 if (cb != NULL)
1296 {
1297 j=(s->s3->send_alert[0]<<8)|s->s3->send_alert[1];
1298 cb(s,SSL_CB_WRITE_ALERT,j);
1299 }
1300 }
1301 return(i);
1302 }
diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c
new file mode 100644
index 0000000000..57f1d3f52a
--- /dev/null
+++ b/src/lib/libssl/s3_srvr.c
@@ -0,0 +1,2061 @@
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 enc_ticket.data = (char *)p;
1592 p+=enc_ticket.length;
1593
1594 n2s(p,i);
1595 authenticator.length = i;
1596 authenticator.data = (char *)p;
1597 p+=authenticator.length;
1598
1599 n2s(p,i);
1600 enc_pms.length = i;
1601 enc_pms.data = (char *)p;
1602 p+=enc_pms.length;
1603
1604 /* Note that the length is checked again below,
1605 ** after decryption
1606 */
1607 if(enc_pms.length > sizeof pms)
1608 {
1609 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1610 SSL_R_DATA_LENGTH_TOO_LONG);
1611 goto err;
1612 }
1613
1614 if (n != enc_ticket.length + authenticator.length +
1615 enc_pms.length + 6)
1616 {
1617 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1618 SSL_R_DATA_LENGTH_TOO_LONG);
1619 goto err;
1620 }
1621
1622 if ((krb5rc = kssl_sget_tkt(kssl_ctx, &enc_ticket, &ttimes,
1623 &kssl_err)) != 0)
1624 {
1625#ifdef KSSL_DEBUG
1626 printf("kssl_sget_tkt rtn %d [%d]\n",
1627 krb5rc, kssl_err.reason);
1628 if (kssl_err.text)
1629 printf("kssl_err text= %s\n", kssl_err.text);
1630#endif /* KSSL_DEBUG */
1631 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,
1632 kssl_err.reason);
1633 goto err;
1634 }
1635
1636 /* Note: no authenticator is not considered an error,
1637 ** but will return authtime == 0.
1638 */
1639 if ((krb5rc = kssl_check_authent(kssl_ctx, &authenticator,
1640 &authtime, &kssl_err)) != 0)
1641 {
1642#ifdef KSSL_DEBUG
1643 printf("kssl_check_authent rtn %d [%d]\n",
1644 krb5rc, kssl_err.reason);
1645 if (kssl_err.text)
1646 printf("kssl_err text= %s\n", kssl_err.text);
1647#endif /* KSSL_DEBUG */
1648 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,
1649 kssl_err.reason);
1650 goto err;
1651 }
1652
1653 if ((krb5rc = kssl_validate_times(authtime, &ttimes)) != 0)
1654 {
1655 SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, krb5rc);
1656 goto err;
1657 }
1658
1659#ifdef KSSL_DEBUG
1660 kssl_ctx_show(kssl_ctx);
1661#endif /* KSSL_DEBUG */
1662
1663 enc = kssl_map_enc(kssl_ctx->enctype);
1664 if (enc == NULL)
1665 goto err;
1666
1667 memset(iv, 0, sizeof iv); /* per RFC 1510 */
1668
1669 if (!EVP_DecryptInit_ex(&ciph_ctx,enc,NULL,kssl_ctx->key,iv))
1670 {
1671 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1672 SSL_R_DECRYPTION_FAILED);
1673 goto err;
1674 }
1675 if (!EVP_DecryptUpdate(&ciph_ctx, pms,&outl,
1676 (unsigned char *)enc_pms.data, enc_pms.length))
1677 {
1678 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1679 SSL_R_DECRYPTION_FAILED);
1680 goto err;
1681 }
1682 if (outl > SSL_MAX_MASTER_KEY_LENGTH)
1683 {
1684 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1685 SSL_R_DATA_LENGTH_TOO_LONG);
1686 goto err;
1687 }
1688 if (!EVP_DecryptFinal_ex(&ciph_ctx,&(pms[outl]),&padl))
1689 {
1690 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1691 SSL_R_DECRYPTION_FAILED);
1692 goto err;
1693 }
1694 outl += padl;
1695 if (outl > SSL_MAX_MASTER_KEY_LENGTH)
1696 {
1697 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1698 SSL_R_DATA_LENGTH_TOO_LONG);
1699 goto err;
1700 }
1701 EVP_CIPHER_CTX_cleanup(&ciph_ctx);
1702
1703 s->session->master_key_length=
1704 s->method->ssl3_enc->generate_master_secret(s,
1705 s->session->master_key, pms, outl);
1706
1707 if (kssl_ctx->client_princ)
1708 {
1709 int len = strlen(kssl_ctx->client_princ);
1710 if ( len < SSL_MAX_KRB5_PRINCIPAL_LENGTH )
1711 {
1712 s->session->krb5_client_princ_len = len;
1713 memcpy(s->session->krb5_client_princ,kssl_ctx->client_princ,len);
1714 }
1715 }
1716
1717
1718 /* Was doing kssl_ctx_free() here,
1719 ** but it caused problems for apache.
1720 ** kssl_ctx = kssl_ctx_free(kssl_ctx);
1721 ** if (s->kssl_ctx) s->kssl_ctx = NULL;
1722 */
1723 }
1724 else
1725#endif /* OPENSSL_NO_KRB5 */
1726 {
1727 al=SSL_AD_HANDSHAKE_FAILURE;
1728 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1729 SSL_R_UNKNOWN_CIPHER_TYPE);
1730 goto f_err;
1731 }
1732
1733 return(1);
1734f_err:
1735 ssl3_send_alert(s,SSL3_AL_FATAL,al);
1736#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA)
1737err:
1738#endif
1739 return(-1);
1740 }
1741
1742static int ssl3_get_cert_verify(SSL *s)
1743 {
1744 EVP_PKEY *pkey=NULL;
1745 unsigned char *p;
1746 int al,ok,ret=0;
1747 long n;
1748 int type=0,i,j;
1749 X509 *peer;
1750
1751 n=ssl3_get_message(s,
1752 SSL3_ST_SR_CERT_VRFY_A,
1753 SSL3_ST_SR_CERT_VRFY_B,
1754 -1,
1755 514, /* 514? */
1756 &ok);
1757
1758 if (!ok) return((int)n);
1759
1760 if (s->session->peer != NULL)
1761 {
1762 peer=s->session->peer;
1763 pkey=X509_get_pubkey(peer);
1764 type=X509_certificate_type(peer,pkey);
1765 }
1766 else
1767 {
1768 peer=NULL;
1769 pkey=NULL;
1770 }
1771
1772 if (s->s3->tmp.message_type != SSL3_MT_CERTIFICATE_VERIFY)
1773 {
1774 s->s3->tmp.reuse_message=1;
1775 if ((peer != NULL) && (type | EVP_PKT_SIGN))
1776 {
1777 al=SSL_AD_UNEXPECTED_MESSAGE;
1778 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_MISSING_VERIFY_MESSAGE);
1779 goto f_err;
1780 }
1781 ret=1;
1782 goto end;
1783 }
1784
1785 if (peer == NULL)
1786 {
1787 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_NO_CLIENT_CERT_RECEIVED);
1788 al=SSL_AD_UNEXPECTED_MESSAGE;
1789 goto f_err;
1790 }
1791
1792 if (!(type & EVP_PKT_SIGN))
1793 {
1794 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE);
1795 al=SSL_AD_ILLEGAL_PARAMETER;
1796 goto f_err;
1797 }
1798
1799 if (s->s3->change_cipher_spec)
1800 {
1801 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_CCS_RECEIVED_EARLY);
1802 al=SSL_AD_UNEXPECTED_MESSAGE;
1803 goto f_err;
1804 }
1805
1806 /* we now have a signature that we need to verify */
1807 p=(unsigned char *)s->init_msg;
1808 n2s(p,i);
1809 n-=2;
1810 if (i > n)
1811 {
1812 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_LENGTH_MISMATCH);
1813 al=SSL_AD_DECODE_ERROR;
1814 goto f_err;
1815 }
1816
1817 j=EVP_PKEY_size(pkey);
1818 if ((i > j) || (n > j) || (n <= 0))
1819 {
1820 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_WRONG_SIGNATURE_SIZE);
1821 al=SSL_AD_DECODE_ERROR;
1822 goto f_err;
1823 }
1824
1825#ifndef OPENSSL_NO_RSA
1826 if (pkey->type == EVP_PKEY_RSA)
1827 {
1828 i=RSA_verify(NID_md5_sha1, s->s3->tmp.cert_verify_md,
1829 MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH, p, i,
1830 pkey->pkey.rsa);
1831 if (i < 0)
1832 {
1833 al=SSL_AD_DECRYPT_ERROR;
1834 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_BAD_RSA_DECRYPT);
1835 goto f_err;
1836 }
1837 if (i == 0)
1838 {
1839 al=SSL_AD_DECRYPT_ERROR;
1840 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_BAD_RSA_SIGNATURE);
1841 goto f_err;
1842 }
1843 }
1844 else
1845#endif
1846#ifndef OPENSSL_NO_DSA
1847 if (pkey->type == EVP_PKEY_DSA)
1848 {
1849 j=DSA_verify(pkey->save_type,
1850 &(s->s3->tmp.cert_verify_md[MD5_DIGEST_LENGTH]),
1851 SHA_DIGEST_LENGTH,p,i,pkey->pkey.dsa);
1852 if (j <= 0)
1853 {
1854 /* bad signature */
1855 al=SSL_AD_DECRYPT_ERROR;
1856 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_BAD_DSA_SIGNATURE);
1857 goto f_err;
1858 }
1859 }
1860 else
1861#endif
1862 {
1863 SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,ERR_R_INTERNAL_ERROR);
1864 al=SSL_AD_UNSUPPORTED_CERTIFICATE;
1865 goto f_err;
1866 }
1867
1868
1869 ret=1;
1870 if (0)
1871 {
1872f_err:
1873 ssl3_send_alert(s,SSL3_AL_FATAL,al);
1874 }
1875end:
1876 EVP_PKEY_free(pkey);
1877 return(ret);
1878 }
1879
1880static int ssl3_get_client_certificate(SSL *s)
1881 {
1882 int i,ok,al,ret= -1;
1883 X509 *x=NULL;
1884 unsigned long l,nc,llen,n;
1885 unsigned char *p,*d,*q;
1886 STACK_OF(X509) *sk=NULL;
1887
1888 n=ssl3_get_message(s,
1889 SSL3_ST_SR_CERT_A,
1890 SSL3_ST_SR_CERT_B,
1891 -1,
1892 s->max_cert_list,
1893 &ok);
1894
1895 if (!ok) return((int)n);
1896
1897 if (s->s3->tmp.message_type == SSL3_MT_CLIENT_KEY_EXCHANGE)
1898 {
1899 if ( (s->verify_mode & SSL_VERIFY_PEER) &&
1900 (s->verify_mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT))
1901 {
1902 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE);
1903 al=SSL_AD_HANDSHAKE_FAILURE;
1904 goto f_err;
1905 }
1906 /* If tls asked for a client cert, the client must return a 0 list */
1907 if ((s->version > SSL3_VERSION) && s->s3->tmp.cert_request)
1908 {
1909 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST);
1910 al=SSL_AD_UNEXPECTED_MESSAGE;
1911 goto f_err;
1912 }
1913 s->s3->tmp.reuse_message=1;
1914 return(1);
1915 }
1916
1917 if (s->s3->tmp.message_type != SSL3_MT_CERTIFICATE)
1918 {
1919 al=SSL_AD_UNEXPECTED_MESSAGE;
1920 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_WRONG_MESSAGE_TYPE);
1921 goto f_err;
1922 }
1923 d=p=(unsigned char *)s->init_msg;
1924
1925 if ((sk=sk_X509_new_null()) == NULL)
1926 {
1927 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,ERR_R_MALLOC_FAILURE);
1928 goto err;
1929 }
1930
1931 n2l3(p,llen);
1932 if (llen+3 != n)
1933 {
1934 al=SSL_AD_DECODE_ERROR;
1935 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_LENGTH_MISMATCH);
1936 goto f_err;
1937 }
1938 for (nc=0; nc<llen; )
1939 {
1940 n2l3(p,l);
1941 if ((l+nc+3) > llen)
1942 {
1943 al=SSL_AD_DECODE_ERROR;
1944 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_CERT_LENGTH_MISMATCH);
1945 goto f_err;
1946 }
1947
1948 q=p;
1949 x=d2i_X509(NULL,&p,l);
1950 if (x == NULL)
1951 {
1952 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,ERR_R_ASN1_LIB);
1953 goto err;
1954 }
1955 if (p != (q+l))
1956 {
1957 al=SSL_AD_DECODE_ERROR;
1958 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_CERT_LENGTH_MISMATCH);
1959 goto f_err;
1960 }
1961 if (!sk_X509_push(sk,x))
1962 {
1963 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,ERR_R_MALLOC_FAILURE);
1964 goto err;
1965 }
1966 x=NULL;
1967 nc+=l+3;
1968 }
1969
1970 if (sk_X509_num(sk) <= 0)
1971 {
1972 /* TLS does not mind 0 certs returned */
1973 if (s->version == SSL3_VERSION)
1974 {
1975 al=SSL_AD_HANDSHAKE_FAILURE;
1976 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATES_RETURNED);
1977 goto f_err;
1978 }
1979 /* Fail for TLS only if we required a certificate */
1980 else if ((s->verify_mode & SSL_VERIFY_PEER) &&
1981 (s->verify_mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT))
1982 {
1983 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE);
1984 al=SSL_AD_HANDSHAKE_FAILURE;
1985 goto f_err;
1986 }
1987 }
1988 else
1989 {
1990 i=ssl_verify_cert_chain(s,sk);
1991 if (!i)
1992 {
1993 al=ssl_verify_alarm_type(s->verify_result);
1994 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED);
1995 goto f_err;
1996 }
1997 }
1998
1999 if (s->session->peer != NULL) /* This should not be needed */
2000 X509_free(s->session->peer);
2001 s->session->peer=sk_X509_shift(sk);
2002 s->session->verify_result = s->verify_result;
2003
2004 /* With the current implementation, sess_cert will always be NULL
2005 * when we arrive here. */
2006 if (s->session->sess_cert == NULL)
2007 {
2008 s->session->sess_cert = ssl_sess_cert_new();
2009 if (s->session->sess_cert == NULL)
2010 {
2011 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE, ERR_R_MALLOC_FAILURE);
2012 goto err;
2013 }
2014 }
2015 if (s->session->sess_cert->cert_chain != NULL)
2016 sk_X509_pop_free(s->session->sess_cert->cert_chain, X509_free);
2017 s->session->sess_cert->cert_chain=sk;
2018 /* Inconsistency alert: cert_chain does *not* include the
2019 * peer's own certificate, while we do include it in s3_clnt.c */
2020
2021 sk=NULL;
2022
2023 ret=1;
2024 if (0)
2025 {
2026f_err:
2027 ssl3_send_alert(s,SSL3_AL_FATAL,al);
2028 }
2029err:
2030 if (x != NULL) X509_free(x);
2031 if (sk != NULL) sk_X509_pop_free(sk,X509_free);
2032 return(ret);
2033 }
2034
2035int ssl3_send_server_certificate(SSL *s)
2036 {
2037 unsigned long l;
2038 X509 *x;
2039
2040 if (s->state == SSL3_ST_SW_CERT_A)
2041 {
2042 x=ssl_get_server_send_cert(s);
2043 if (x == NULL &&
2044 /* VRS: allow null cert if auth == KRB5 */
2045 (s->s3->tmp.new_cipher->algorithms
2046 & (SSL_MKEY_MASK|SSL_AUTH_MASK))
2047 != (SSL_aKRB5|SSL_kKRB5))
2048 {
2049 SSLerr(SSL_F_SSL3_SEND_SERVER_CERTIFICATE,ERR_R_INTERNAL_ERROR);
2050 return(0);
2051 }
2052
2053 l=ssl3_output_cert_chain(s,x);
2054 s->state=SSL3_ST_SW_CERT_B;
2055 s->init_num=(int)l;
2056 s->init_off=0;
2057 }
2058
2059 /* SSL3_ST_SW_CERT_B */
2060 return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
2061 }
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 b8630792ad..1e85275800 100644
--- a/src/lib/libssl/src/CHANGES
+++ b/src/lib/libssl/src/CHANGES
@@ -2,57 +2,6 @@
2 OpenSSL CHANGES 2 OpenSSL CHANGES
3 _______________ 3 _______________
4 4
5 Changes between 0.9.7b and 0.9.7c [30 Sep 2003]
6
7 *) Fix various bugs revealed by running the NISCC test suite:
8
9 Stop out of bounds reads in the ASN1 code when presented with
10 invalid tags (CAN-2003-0543 and CAN-2003-0544).
11
12 Free up ASN1_TYPE correctly if ANY type is invalid (CAN-2003-0545).
13
14 If verify callback ignores invalid public key errors don't try to check
15 certificate signature with the NULL public key.
16
17 [Steve Henson]
18
19 *) New -ignore_err option in ocsp application to stop the server
20 exiting on the first error in a request.
21 [Steve Henson]
22
23 *) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate
24 if the server requested one: as stated in TLS 1.0 and SSL 3.0
25 specifications.
26 [Steve Henson]
27
28 *) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional
29 extra data after the compression methods not only for TLS 1.0
30 but also for SSL 3.0 (as required by the specification).
31 [Bodo Moeller; problem pointed out by Matthias Loepfe]
32
33 *) Change X509_certificate_type() to mark the key as exported/exportable
34 when it's 512 *bits* long, not 512 bytes.
35 [Richard Levitte]
36
37 *) Change AES_cbc_encrypt() so it outputs exact multiple of
38 blocks during encryption.
39 [Richard Levitte]
40
41 *) Various fixes to base64 BIO and non blocking I/O. On write
42 flushes were not handled properly if the BIO retried. On read
43 data was not being buffered properly and had various logic bugs.
44 This also affects blocking I/O when the data being decoded is a
45 certain size.
46 [Steve Henson]
47
48 *) Various S/MIME bugfixes and compatibility changes:
49 output correct application/pkcs7 MIME type if
50 PKCS7_NOOLDMIMETYPE is set. Tolerate some broken signatures.
51 Output CR+LF for EOL if PKCS7_CRLFEOL is set (this makes opening
52 of files as .eml work). Correctly handle very long lines in MIME
53 parser.
54 [Steve Henson]
55
56 Changes between 0.9.7a and 0.9.7b [10 Apr 2003] 5 Changes between 0.9.7a and 0.9.7b [10 Apr 2003]
57 6
58 *) Countermeasure against the Klima-Pokorny-Rosa extension of 7 *) Countermeasure against the Klima-Pokorny-Rosa extension of
@@ -171,9 +120,6 @@
171 120
172 Changes between 0.9.6h and 0.9.7 [31 Dec 2002] 121 Changes between 0.9.6h and 0.9.7 [31 Dec 2002]
173 122
174 [NB: OpenSSL 0.9.6i and later 0.9.6 patch levels were released after
175 OpenSSL 0.9.7.]
176
177 *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED 123 *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
178 code (06) was taken as the first octet of the session ID and the last 124 code (06) was taken as the first octet of the session ID and the last
179 octet was ignored consequently. As a result SSLv2 client side session 125 octet was ignored consequently. As a result SSLv2 client side session
@@ -1992,57 +1938,6 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k
1992 *) Clean old EAY MD5 hack from e_os.h. 1938 *) Clean old EAY MD5 hack from e_os.h.
1993 [Richard Levitte] 1939 [Richard Levitte]
1994 1940
1995 Changes between 0.9.6j and 0.9.6k [30 Sep 2003]
1996
1997 *) Fix various bugs revealed by running the NISCC test suite:
1998
1999 Stop out of bounds reads in the ASN1 code when presented with
2000 invalid tags (CAN-2003-0543 and CAN-2003-0544).
2001
2002 If verify callback ignores invalid public key errors don't try to check
2003 certificate signature with the NULL public key.
2004
2005 [Steve Henson]
2006
2007 *) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate
2008 if the server requested one: as stated in TLS 1.0 and SSL 3.0
2009 specifications.
2010 [Steve Henson]
2011
2012 *) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional
2013 extra data after the compression methods not only for TLS 1.0
2014 but also for SSL 3.0 (as required by the specification).
2015 [Bodo Moeller; problem pointed out by Matthias Loepfe]
2016
2017 *) Change X509_certificate_type() to mark the key as exported/exportable
2018 when it's 512 *bits* long, not 512 bytes.
2019 [Richard Levitte]
2020
2021 Changes between 0.9.6i and 0.9.6j [10 Apr 2003]
2022
2023 *) Countermeasure against the Klima-Pokorny-Rosa extension of
2024 Bleichbacher's attack on PKCS #1 v1.5 padding: treat
2025 a protocol version number mismatch like a decryption error
2026 in ssl3_get_client_key_exchange (ssl/s3_srvr.c).
2027 [Bodo Moeller]
2028
2029 *) Turn on RSA blinding by default in the default implementation
2030 to avoid a timing attack. Applications that don't want it can call
2031 RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING.
2032 They would be ill-advised to do so in most cases.
2033 [Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller]
2034
2035 *) Change RSA blinding code so that it works when the PRNG is not
2036 seeded (in this case, the secret RSA exponent is abused as
2037 an unpredictable seed -- if it is not unpredictable, there
2038 is no point in blinding anyway). Make RSA blinding thread-safe
2039 by remembering the creator's thread ID in rsa->blinding and
2040 having all other threads use local one-time blinding factors
2041 (this requires more computation than sharing rsa->blinding, but
2042 avoids excessive locking; and if an RSA object is not shared
2043 between threads, blinding will still be very fast).
2044 [Bodo Moeller]
2045
2046 Changes between 0.9.6h and 0.9.6i [19 Feb 2003] 1941 Changes between 0.9.6h and 0.9.6i [19 Feb 2003]
2047 1942
2048 *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked 1943 *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
diff --git a/src/lib/libssl/src/Configure b/src/lib/libssl/src/Configure
index 61331dbb51..7763dc4138 100644
--- a/src/lib/libssl/src/Configure
+++ b/src/lib/libssl/src/Configure
@@ -560,8 +560,6 @@ my %table=(
560"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::", 560"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
561"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::", 561"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
562"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::", 562"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
563"vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
564"vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::::::::::::::::ranlibmips:",
565 563
566##### Compaq Non-Stop Kernel (Tandem) 564##### Compaq Non-Stop Kernel (Tandem)
567"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::", 565"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::",
diff --git a/src/lib/libssl/src/FAQ b/src/lib/libssl/src/FAQ
index ca5683def7..7812ae88cb 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.7c was released on September 30, 2003. 71OpenSSL 0.9.7b was released on April 10, 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:
diff --git a/src/lib/libssl/src/INSTALL.W32 b/src/lib/libssl/src/INSTALL.W32
index 0f6c302f0d..78d289e16a 100644
--- a/src/lib/libssl/src/INSTALL.W32
+++ b/src/lib/libssl/src/INSTALL.W32
@@ -225,7 +225,7 @@
225 $ md c:\openssl\lib 225 $ md c:\openssl\lib
226 $ md c:\openssl\include 226 $ md c:\openssl\include
227 $ md c:\openssl\include\openssl 227 $ md c:\openssl\include\openssl
228 $ copy /b inc32\openssl\* c:\openssl\include\openssl 228 $ copy /b inc32\* c:\openssl\include\openssl
229 $ copy /b out32dll\ssleay32.lib c:\openssl\lib 229 $ copy /b out32dll\ssleay32.lib c:\openssl\lib
230 $ copy /b out32dll\libeay32.lib c:\openssl\lib 230 $ copy /b out32dll\libeay32.lib c:\openssl\lib
231 $ copy /b out32dll\ssleay32.dll c:\openssl\bin 231 $ copy /b out32dll\ssleay32.dll c:\openssl\bin
diff --git a/src/lib/libssl/src/MacOS/GetHTTPS.src/CPStringUtils.cpp b/src/lib/libssl/src/MacOS/GetHTTPS.src/CPStringUtils.cpp
index 5f64afe967..617aae2c70 100644
--- a/src/lib/libssl/src/MacOS/GetHTTPS.src/CPStringUtils.cpp
+++ b/src/lib/libssl/src/MacOS/GetHTTPS.src/CPStringUtils.cpp
@@ -2750,4 +2750,4 @@ void SkipWhiteSpace(char **ioSrcCharPtr,const Boolean inStopAtEOL)
2750 } 2750 }
2751 } 2751 }
2752 } 2752 }
2753} \ No newline at end of file 2753}
diff --git a/src/lib/libssl/src/MacOS/GetHTTPS.src/ErrorHandling.cpp b/src/lib/libssl/src/MacOS/GetHTTPS.src/ErrorHandling.cpp
index 07a32de59e..80b6a675f4 100644
--- a/src/lib/libssl/src/MacOS/GetHTTPS.src/ErrorHandling.cpp
+++ b/src/lib/libssl/src/MacOS/GetHTTPS.src/ErrorHandling.cpp
@@ -167,4 +167,4 @@ void ThrowErrorMessageException(void)
167 ThrowDescriptiveException(gErrorMessage); 167 ThrowDescriptiveException(gErrorMessage);
168} 168}
169 169
170#endif \ No newline at end of file 170#endif
diff --git a/src/lib/libssl/src/Makefile.org b/src/lib/libssl/src/Makefile.org
index e80b22a32a..4d0627bfdd 100644
--- a/src/lib/libssl/src/Makefile.org
+++ b/src/lib/libssl/src/Makefile.org
@@ -78,7 +78,7 @@ MAKEDEPPROG=makedepend
78# gcc, then the driver will automatically translate it to -xarch=v8plus 78# gcc, then the driver will automatically translate it to -xarch=v8plus
79# and pass it down to assembler. 79# and pass it down to assembler.
80AS=$(CC) -c 80AS=$(CC) -c
81ASFLAG=$(CFLAG) 81ASFLAGS=$(CFLAG)
82 82
83# Set BN_ASM to bn_asm.o if you want to use the C version 83# Set BN_ASM to bn_asm.o if you want to use the C version
84BN_ASM= bn_asm.o 84BN_ASM= bn_asm.o
@@ -194,7 +194,6 @@ MAKE= make -f Makefile.ssl
194MANDIR=$(OPENSSLDIR)/man 194MANDIR=$(OPENSSLDIR)/man
195MAN1=1 195MAN1=1
196MAN3=3 196MAN3=3
197MANSUFFIX=
198SHELL=/bin/sh 197SHELL=/bin/sh
199 198
200TOP= . 199TOP= .
@@ -226,7 +225,7 @@ sub_all:
226 do \ 225 do \
227 if [ -d "$$i" ]; then \ 226 if [ -d "$$i" ]; then \
228 (cd $$i && echo "making all in $$i..." && \ 227 (cd $$i && echo "making all in $$i..." && \
229 $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \ 228 $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAGS='${ASFLAGS}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
230 else \ 229 else \
231 $(MAKE) $$i; \ 230 $(MAKE) $$i; \
232 fi; \ 231 fi; \
@@ -411,7 +410,7 @@ do_svr3-shared:
411 find . -name "*.o" -print > allobjs ; \ 410 find . -name "*.o" -print > allobjs ; \
412 OBJS= ; export OBJS ; \ 411 OBJS= ; export OBJS ; \
413 for obj in `ar t lib$$i.a` ; do \ 412 for obj in `ar t lib$$i.a` ; do \
414 OBJS="$${OBJS} `grep /$$obj allobjs`" ; \ 413 OBJS="$${OBJS} `grep $$obj allobjs`" ; \
415 done ; \ 414 done ; \
416 set -x; ${CC} ${SHARED_LDFLAGS} \ 415 set -x; ${CC} ${SHARED_LDFLAGS} \
417 -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ 416 -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
@@ -436,7 +435,7 @@ do_svr5-shared:
436 find . -name "*.o" -print > allobjs ; \ 435 find . -name "*.o" -print > allobjs ; \
437 OBJS= ; export OBJS ; \ 436 OBJS= ; export OBJS ; \
438 for obj in `ar t lib$$i.a` ; do \ 437 for obj in `ar t lib$$i.a` ; do \
439 OBJS="$${OBJS} `grep /$$obj allobjs`" ; \ 438 OBJS="$${OBJS} `grep $$obj allobjs`" ; \
440 done ; \ 439 done ; \
441 set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \ 440 set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
442 ${CC} ${SHARED_LDFLAGS} \ 441 ${CC} ${SHARED_LDFLAGS} \
@@ -832,7 +831,6 @@ install: all install_docs
832 fi; \ 831 fi; \
833 fi 832 fi
834 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig 833 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
835 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
836 834
837install_docs: 835install_docs:
838 @$(PERL) $(TOP)/util/mkdir-p.pl \ 836 @$(PERL) $(TOP)/util/mkdir-p.pl \
@@ -849,33 +847,33 @@ install_docs:
849 for i in doc/apps/*.pod; do \ 847 for i in doc/apps/*.pod; do \
850 fn=`basename $$i .pod`; \ 848 fn=`basename $$i .pod`; \
851 if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \ 849 if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
852 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ 850 echo "installing man$$sec/$$fn.$$sec"; \
853 (cd `$(PERL) util/dirname.pl $$i`; \ 851 (cd `$(PERL) util/dirname.pl $$i`; \
854 sh -c "$$pod2man \ 852 sh -c "$$pod2man \
855 --section=$$sec --center=OpenSSL \ 853 --section=$$sec --center=OpenSSL \
856 --release=$(VERSION) `basename $$i`") \ 854 --release=$(VERSION) `basename $$i`") \
857 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ 855 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
858 $(PERL) util/extract-names.pl < $$i | \ 856 $(PERL) util/extract-names.pl < $$i | \
859 grep -v $$filecase "^$$fn\$$" | \ 857 grep -v $$filecase "^$$fn\$$" | \
860 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ 858 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
861 while read n; do \ 859 while read n; do \
862 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ 860 $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
863 done); \ 861 done); \
864 done; \ 862 done; \
865 for i in doc/crypto/*.pod doc/ssl/*.pod; do \ 863 for i in doc/crypto/*.pod doc/ssl/*.pod; do \
866 fn=`basename $$i .pod`; \ 864 fn=`basename $$i .pod`; \
867 if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \ 865 if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
868 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ 866 echo "installing man$$sec/$$fn.$$sec"; \
869 (cd `$(PERL) util/dirname.pl $$i`; \ 867 (cd `$(PERL) util/dirname.pl $$i`; \
870 sh -c "$$pod2man \ 868 sh -c "$$pod2man \
871 --section=$$sec --center=OpenSSL \ 869 --section=$$sec --center=OpenSSL \
872 --release=$(VERSION) `basename $$i`") \ 870 --release=$(VERSION) `basename $$i`") \
873 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ 871 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
874 $(PERL) util/extract-names.pl < $$i | \ 872 $(PERL) util/extract-names.pl < $$i | \
875 grep -v $$filecase "^$$fn\$$" | \ 873 grep -v $$filecase "^$$fn\$$" | \
876 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ 874 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
877 while read n; do \ 875 while read n; do \
878 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ 876 $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
879 done); \ 877 done); \
880 done 878 done
881 879
diff --git a/src/lib/libssl/src/NEWS b/src/lib/libssl/src/NEWS
index f0282ebb87..dce63f0549 100644
--- a/src/lib/libssl/src/NEWS
+++ b/src/lib/libssl/src/NEWS
@@ -5,13 +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.7b and OpenSSL 0.9.7c:
9
10 o Security: fix various ASN1 parsing bugs.
11 o New -ignore_err option to OCSP utility.
12 o Various interop and bug fixes in S/MIME code.
13 o SSL/TLS protocol fix for unrequested client certificates.
14
15 Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b: 8 Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b:
16 9
17 o Security: counter the Klima-Pokorny-Rosa extension of 10 o Security: counter the Klima-Pokorny-Rosa extension of
@@ -80,11 +73,6 @@
80 o SSL/TLS: add callback to retrieve SSL/TLS messages. 73 o SSL/TLS: add callback to retrieve SSL/TLS messages.
81 o SSL/TLS: support AES cipher suites (RFC3268). 74 o SSL/TLS: support AES cipher suites (RFC3268).
82 75
83 Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k:
84
85 o Security: fix various ASN1 parsing bugs.
86 o SSL/TLS protocol fix for unrequested client certificates.
87
88 Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j: 76 Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j:
89 77
90 o Security: counter the Klima-Pokorny-Rosa extension of 78 o Security: counter the Klima-Pokorny-Rosa extension of
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 65e3a12426..3af69bfdb5 100644
--- a/src/lib/libssl/src/README
+++ b/src/lib/libssl/src/README
@@ -1,5 +1,5 @@
1 1
2 OpenSSL 0.9.7c 30 Sep 2003 2 OpenSSL 0.9.7b 10 Apr 2003
3 3
4 Copyright (c) 1998-2003 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
diff --git a/src/lib/libssl/src/STATUS b/src/lib/libssl/src/STATUS
new file mode 100644
index 0000000000..fb61c932ee
--- /dev/null
+++ b/src/lib/libssl/src/STATUS
@@ -0,0 +1,107 @@
1
2 OpenSSL STATUS Last modified at
3 ______________ $Date: 2002/09/14 11:18:02 $
4
5 DEVELOPMENT STATE
6
7 o OpenSSL 0.9.8: Under development...
8 o OpenSSL 0.9.7-beta3: Released on July 30th, 2002
9 o OpenSSL 0.9.7-beta2: Released on June 16th, 2002
10 o OpenSSL 0.9.7-beta1: Released on June 1st, 2002
11 o OpenSSL 0.9.6g: Released on August 9th, 2002
12 o OpenSSL 0.9.6f: Released on August 8th, 2002
13 o OpenSSL 0.9.6e: Released on July 30th, 2002
14 o OpenSSL 0.9.6d: Released on May 9th, 2002
15 o OpenSSL 0.9.6c: Released on December 21st, 2001
16 o OpenSSL 0.9.6b: Released on July 9th, 2001
17 o OpenSSL 0.9.6a: Released on April 5th, 2001
18 o OpenSSL 0.9.6: Released on September 24th, 2000
19 o OpenSSL 0.9.5a: Released on April 1st, 2000
20 o OpenSSL 0.9.5: Released on February 28th, 2000
21 o OpenSSL 0.9.4: Released on August 09th, 1999
22 o OpenSSL 0.9.3a: Released on May 29th, 1999
23 o OpenSSL 0.9.3: Released on May 25th, 1999
24 o OpenSSL 0.9.2b: Released on March 22th, 1999
25 o OpenSSL 0.9.1c: Released on December 23th, 1998
26
27 [See also http://www.openssl.org/support/rt2.html]
28
29 RELEASE SHOWSTOPPERS
30
31 o BN_mod_mul verification fails for mips3-sgi-irix
32 unless configured with no-asm
33
34 AVAILABLE PATCHES
35
36 o
37
38 IN PROGRESS
39
40 o Steve is currently working on (in no particular order):
41 ASN1 code redesign, butchery, replacement.
42 OCSP
43 EVP cipher enhancement.
44 Enhanced certificate chain verification.
45 Private key, certificate and CRL API and implementation.
46 Developing and bugfixing PKCS#7 (S/MIME code).
47 Various X509 issues: character sets, certificate request extensions.
48 o Geoff and Richard are currently working on:
49 ENGINE (the new code that gives hardware support among others).
50 o Richard is currently working on:
51 UI (User Interface)
52 UTIL (a new set of library functions to support some higher level
53 functionality that is currently missing).
54 Shared library support for VMS.
55 Kerberos 5 authentication
56 Constification
57 OCSP
58
59 NEEDS PATCH
60
61 o apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
62
63 o "OpenSSL STATUS" is never up-to-date.
64
65 OPEN ISSUES
66
67 o The Makefile hierarchy and build mechanism is still not a round thing:
68
69 1. The config vs. Configure scripts
70 It's the same nasty situation as for Apache with APACI vs.
71 src/Configure. It confuses.
72 Suggestion: Merge Configure and config into a single configure
73 script with a Autoconf style interface ;-) and remove
74 Configure and config. Or even let us use GNU Autoconf
75 itself. Then we can avoid a lot of those platform checks
76 which are currently in Configure.
77
78 o Support for Shared Libraries has to be added at least
79 for the major Unix platforms. The details we can rip from the stuff
80 Ralf has done for the Apache src/Configure script. Ben wants the
81 solution to be really simple.
82
83 Status: Ralf will look how we can easily incorporate the
84 compiler PIC and linker DSO flags from Apache
85 into the OpenSSL Configure script.
86
87 Ulf: +1 for using GNU autoconf and libtool (but not automake,
88 which apparently is not flexible enough to generate
89 libcrypto)
90
91 WISHES
92
93 o Add variants of DH_generate_parameters() and BN_generate_prime() [etc?]
94 where the callback function can request that the function be aborted.
95 [Gregory Stark <ghstark@pobox.com>, <rayyang2000@yahoo.com>]
96
97 o SRP in TLS.
98 [wished by:
99 Dj <derek@yo.net>, Tom Wu <tom@arcot.com>,
100 Tom Holroyd <tomh@po.crl.go.jp>]
101
102 See http://search.ietf.org/internet-drafts/draft-ietf-tls-srp-00.txt
103 as well as http://www-cs-students.stanford.edu/~tjw/srp/.
104
105 Tom Holroyd tells us there is a SRP patch for OpenSSH at
106 http://members.tripod.com/professor_tom/archives/, that could
107 be useful.
diff --git a/src/lib/libssl/src/TABLE b/src/lib/libssl/src/TABLE
new file mode 100644
index 0000000000..3989ac7ebf
--- /dev/null
+++ b/src/lib/libssl/src/TABLE
@@ -0,0 +1,4226 @@
1Output of `Configure TABLE':
2
3*** BC-16
4$cc = bcc
5$cflags =
6$unistd =
7$thread_cflag = (unknown)
8$sys_id = WIN16
9$lflags =
10$bn_ops = BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT
11$bn_obj =
12$des_obj =
13$bf_obj =
14$md5_obj =
15$sha1_obj =
16$cast_obj =
17$rc4_obj =
18$rmd160_obj =
19$rc5_obj =
20$dso_scheme =
21$shared_target=
22$shared_cflag =
23$shared_ldflag =
24$shared_extension =
25$ranlib =
26$arflags =
27
28*** BC-32
29$cc = bcc32
30$cflags =
31$unistd =
32$thread_cflag =
33$sys_id = WIN32
34$lflags =
35$bn_ops = BN_LLONG DES_PTR RC4_INDEX
36$bn_obj =
37$des_obj =
38$bf_obj =
39$md5_obj =
40$sha1_obj =
41$cast_obj =
42$rc4_obj =
43$rmd160_obj =
44$rc5_obj =
45$dso_scheme = win32
46$shared_target=
47$shared_cflag =
48$shared_ldflag =
49$shared_extension =
50$ranlib =
51$arflags =
52
53*** BS2000-OSD
54$cc = c89
55$cflags = -O -XLLML -XLLMK -XL -DB_ENDIAN -DTERMIOS -DCHARSET_EBCDIC
56$unistd =
57$thread_cflag = (unknown)
58$sys_id =
59$lflags = -lsocket -lnsl
60$bn_ops = THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR
61$bn_obj =
62$des_obj =
63$bf_obj =
64$md5_obj =
65$sha1_obj =
66$cast_obj =
67$rc4_obj =
68$rmd160_obj =
69$rc5_obj =
70$dso_scheme =
71$shared_target=
72$shared_cflag =
73$shared_ldflag =
74$shared_extension =
75$ranlib =
76$arflags =
77
78*** Cygwin
79$cc = gcc
80$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
81$unistd =
82$thread_cflag =
83$sys_id = CYGWIN32
84$lflags =
85$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
86$bn_obj = asm/bn86-out.o asm/co86-out.o
87$des_obj = asm/dx86-out.o asm/yx86-out.o
88$bf_obj = asm/bx86-out.o
89$md5_obj = asm/mx86-out.o
90$sha1_obj = asm/sx86-out.o
91$cast_obj = asm/cx86-out.o
92$rc4_obj = asm/rx86-out.o
93$rmd160_obj = asm/rm86-out.o
94$rc5_obj = asm/r586-out.o
95$dso_scheme = win32
96$shared_target= cygwin-shared
97$shared_cflag =
98$shared_ldflag =
99$shared_extension = .dll
100$ranlib =
101$arflags =
102
103*** Cygwin-pre1.3
104$cc = gcc
105$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
106$unistd =
107$thread_cflag = (unknown)
108$sys_id = CYGWIN32
109$lflags =
110$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
111$bn_obj =
112$des_obj =
113$bf_obj =
114$md5_obj =
115$sha1_obj =
116$cast_obj =
117$rc4_obj =
118$rmd160_obj =
119$rc5_obj =
120$dso_scheme = win32
121$shared_target=
122$shared_cflag =
123$shared_ldflag =
124$shared_extension =
125$ranlib =
126$arflags =
127
128*** DJGPP
129$cc = gcc
130$cflags = -I/dev/env/DJDIR/watt32/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall
131$unistd =
132$thread_cflag =
133$sys_id = MSDOS
134$lflags = -L/dev/env/DJDIR/watt32/lib -lwatt
135$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
136$bn_obj =
137$des_obj =
138$bf_obj =
139$md5_obj =
140$sha1_obj =
141$cast_obj =
142$rc4_obj =
143$rmd160_obj =
144$rc5_obj =
145$dso_scheme =
146$shared_target=
147$shared_cflag =
148$shared_ldflag =
149$shared_extension =
150$ranlib =
151$arflags =
152
153*** FreeBSD
154$cc = gcc
155$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
156$unistd =
157$thread_cflag = (unknown)
158$sys_id =
159$lflags =
160$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
161$bn_obj = asm/bn86-out.o asm/co86-out.o
162$des_obj = asm/dx86-out.o asm/yx86-out.o
163$bf_obj = asm/bx86-out.o
164$md5_obj = asm/mx86-out.o
165$sha1_obj = asm/sx86-out.o
166$cast_obj = asm/cx86-out.o
167$rc4_obj = asm/rx86-out.o
168$rmd160_obj = asm/rm86-out.o
169$rc5_obj = asm/r586-out.o
170$dso_scheme =
171$shared_target=
172$shared_cflag =
173$shared_ldflag =
174$shared_extension =
175$ranlib =
176$arflags =
177
178*** FreeBSD-alpha
179$cc = gcc
180$cflags = -DTERMIOS -O -fomit-frame-pointer
181$unistd =
182$thread_cflag = (unknown)
183$sys_id =
184$lflags =
185$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2
186$bn_obj =
187$des_obj =
188$bf_obj =
189$md5_obj =
190$sha1_obj =
191$cast_obj =
192$rc4_obj =
193$rmd160_obj =
194$rc5_obj =
195$dso_scheme = dlfcn
196$shared_target= bsd-gcc-shared
197$shared_cflag = -fPIC
198$shared_ldflag =
199$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
200$ranlib =
201$arflags =
202
203*** FreeBSD-elf
204$cc = gcc
205$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
206$unistd =
207$thread_cflag = -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE
208$sys_id =
209$lflags =
210$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
211$bn_obj = asm/bn86-elf.o asm/co86-elf.o
212$des_obj = asm/dx86-elf.o asm/yx86-elf.o
213$bf_obj = asm/bx86-elf.o
214$md5_obj = asm/mx86-elf.o
215$sha1_obj = asm/sx86-elf.o
216$cast_obj = asm/cx86-elf.o
217$rc4_obj = asm/rx86-elf.o
218$rmd160_obj = asm/rm86-elf.o
219$rc5_obj = asm/r586-elf.o
220$dso_scheme = dlfcn
221$shared_target= bsd-gcc-shared
222$shared_cflag = -fPIC
223$shared_ldflag =
224$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
225$ranlib =
226$arflags =
227
228*** MPE/iX-gcc
229$cc = gcc
230$cflags = -D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB
231$unistd =
232$thread_cflag = (unknown)
233$sys_id = MPE
234$lflags = -L/SYSLOG/PUB -lsyslog -lsocket -lcurses
235$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
236$bn_obj =
237$des_obj =
238$bf_obj =
239$md5_obj =
240$sha1_obj =
241$cast_obj =
242$rc4_obj =
243$rmd160_obj =
244$rc5_obj =
245$dso_scheme =
246$shared_target=
247$shared_cflag =
248$shared_ldflag =
249$shared_extension =
250$ranlib =
251$arflags =
252
253*** Mingw32
254$cc = gcc
255$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
256$unistd =
257$thread_cflag =
258$sys_id =
259$lflags =
260$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
261$bn_obj =
262$des_obj =
263$bf_obj =
264$md5_obj =
265$sha1_obj =
266$cast_obj =
267$rc4_obj =
268$rmd160_obj =
269$rc5_obj =
270$dso_scheme = win32
271$shared_target=
272$shared_cflag =
273$shared_ldflag =
274$shared_extension =
275$ranlib =
276$arflags =
277
278*** NetBSD-m68
279$cc = gcc
280$cflags = -DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN
281$unistd =
282$thread_cflag = (unknown)
283$sys_id =
284$lflags =
285$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL
286$bn_obj =
287$des_obj =
288$bf_obj =
289$md5_obj =
290$sha1_obj =
291$cast_obj =
292$rc4_obj =
293$rmd160_obj =
294$rc5_obj =
295$dso_scheme = dlfcn
296$shared_target= bsd-gcc-shared
297$shared_cflag = -fPIC
298$shared_ldflag =
299$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
300$ranlib =
301$arflags =
302
303*** NetBSD-sparc
304$cc = gcc
305$cflags = -DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN
306$unistd =
307$thread_cflag = (unknown)
308$sys_id =
309$lflags =
310$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL
311$bn_obj =
312$des_obj =
313$bf_obj =
314$md5_obj =
315$sha1_obj =
316$cast_obj =
317$rc4_obj =
318$rmd160_obj =
319$rc5_obj =
320$dso_scheme = dlfcn
321$shared_target= bsd-gcc-shared
322$shared_cflag = -fPIC
323$shared_ldflag =
324$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
325$ranlib =
326$arflags =
327
328*** NetBSD-x86
329$cc = gcc
330$cflags = -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
331$unistd =
332$thread_cflag = (unknown)
333$sys_id =
334$lflags =
335$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
336$bn_obj =
337$des_obj =
338$bf_obj =
339$md5_obj =
340$sha1_obj =
341$cast_obj =
342$rc4_obj =
343$rmd160_obj =
344$rc5_obj =
345$dso_scheme = dlfcn
346$shared_target= bsd-gcc-shared
347$shared_cflag = -fPIC
348$shared_ldflag =
349$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
350$ranlib =
351$arflags =
352
353*** OS2-EMX
354$cc = gcc
355$cflags =
356$unistd =
357$thread_cflag =
358$sys_id =
359$lflags =
360$bn_ops =
361$bn_obj =
362$des_obj =
363$bf_obj =
364$md5_obj =
365$sha1_obj =
366$cast_obj =
367$rc4_obj =
368$rmd160_obj =
369$rc5_obj =
370$dso_scheme =
371$shared_target=
372$shared_cflag =
373$shared_ldflag =
374$shared_extension =
375$ranlib =
376$arflags =
377
378*** OS390-Unix
379$cc = c89.sh
380$cflags = -O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE
381$unistd =
382$thread_cflag = (unknown)
383$sys_id =
384$lflags =
385$bn_ops = THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR
386$bn_obj =
387$des_obj =
388$bf_obj =
389$md5_obj =
390$sha1_obj =
391$cast_obj =
392$rc4_obj =
393$rmd160_obj =
394$rc5_obj =
395$dso_scheme =
396$shared_target=
397$shared_cflag =
398$shared_ldflag =
399$shared_extension =
400$ranlib =
401$arflags =
402
403*** OpenBSD
404$cc = gcc
405$cflags = -DTERMIOS -O3 -fomit-frame-pointer
406$unistd =
407$thread_cflag = (unknown)
408$sys_id =
409$lflags =
410$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL
411$bn_obj =
412$des_obj =
413$bf_obj =
414$md5_obj =
415$sha1_obj =
416$cast_obj =
417$rc4_obj =
418$rmd160_obj =
419$rc5_obj =
420$dso_scheme = dlfcn
421$shared_target= bsd-gcc-shared
422$shared_cflag = -fPIC
423$shared_ldflag =
424$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
425$ranlib =
426$arflags =
427
428*** OpenBSD-alpha
429$cc = gcc
430$cflags = -DTERMIOS -O3 -fomit-frame-pointer
431$unistd =
432$thread_cflag = (unknown)
433$sys_id =
434$lflags =
435$bn_ops = SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2
436$bn_obj =
437$des_obj =
438$bf_obj =
439$md5_obj =
440$sha1_obj =
441$cast_obj =
442$rc4_obj =
443$rmd160_obj =
444$rc5_obj =
445$dso_scheme = dlfcn
446$shared_target= bsd-gcc-shared
447$shared_cflag = -fPIC
448$shared_ldflag =
449$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
450$ranlib =
451$arflags =
452
453*** OpenBSD-hppa
454$cc = gcc
455$cflags = -DTERMIOS -O3 -fomit-frame-pointer
456$unistd =
457$thread_cflag = (unknown)
458$sys_id =
459$lflags =
460$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL
461$bn_obj =
462$des_obj =
463$bf_obj =
464$md5_obj =
465$sha1_obj =
466$cast_obj =
467$rc4_obj =
468$rmd160_obj =
469$rc5_obj =
470$dso_scheme = dlfcn
471$shared_target= bsd-gcc-shared
472$shared_cflag = -fPIC
473$shared_ldflag =
474$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
475$ranlib =
476$arflags =
477
478*** OpenBSD-i386
479$cc = gcc
480$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer
481$unistd =
482$thread_cflag = (unknown)
483$sys_id =
484$lflags =
485$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
486$bn_obj = asm/bn86-out.o asm/co86-out.o
487$des_obj = asm/dx86-out.o asm/yx86-out.o
488$bf_obj = asm/bx86-out.o
489$md5_obj = asm/mx86-out.o
490$sha1_obj = asm/sx86-out.o
491$cast_obj = asm/cx86-out.o
492$rc4_obj = asm/rx86-out.o
493$rmd160_obj = asm/rm86-out.o
494$rc5_obj = asm/r586-out.o
495$dso_scheme = dlfcn
496$shared_target= bsd-gcc-shared
497$shared_cflag = -fPIC
498$shared_ldflag =
499$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
500$ranlib =
501$arflags =
502
503*** OpenBSD-m68k
504$cc = gcc
505$cflags = -DTERMIOS -O3 -fomit-frame-pointer
506$unistd =
507$thread_cflag = (unknown)
508$sys_id =
509$lflags =
510$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL
511$bn_obj =
512$des_obj =
513$bf_obj =
514$md5_obj =
515$sha1_obj =
516$cast_obj =
517$rc4_obj =
518$rmd160_obj =
519$rc5_obj =
520$dso_scheme = dlfcn
521$shared_target= bsd-gcc-shared
522$shared_cflag = -fPIC
523$shared_ldflag =
524$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
525$ranlib =
526$arflags =
527
528*** OpenBSD-m88k
529$cc = gcc
530$cflags = -DTERMIOS -O3 -fomit-frame-pointer
531$unistd =
532$thread_cflag = (unknown)
533$sys_id =
534$lflags =
535$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL
536$bn_obj =
537$des_obj =
538$bf_obj =
539$md5_obj =
540$sha1_obj =
541$cast_obj =
542$rc4_obj =
543$rmd160_obj =
544$rc5_obj =
545$dso_scheme = dlfcn
546$shared_target= bsd-gcc-shared
547$shared_cflag = -fPIC
548$shared_ldflag =
549$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
550$ranlib =
551$arflags =
552
553*** OpenBSD-mips
554$cc = gcc
555$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer
556$unistd =
557$thread_cflag = (unknown)
558$sys_id =
559$lflags =
560$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2
561$bn_obj =
562$des_obj =
563$bf_obj =
564$md5_obj =
565$sha1_obj =
566$cast_obj =
567$rc4_obj =
568$rmd160_obj =
569$rc5_obj =
570$dso_scheme = dlfcn
571$shared_target= bsd-gcc-shared
572$shared_cflag = -fPIC
573$shared_ldflag =
574$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
575$ranlib =
576$arflags =
577
578*** OpenBSD-powerpc
579$cc = gcc
580$cflags = -DTERMIOS -O3 -fomit-frame-pointer
581$unistd =
582$thread_cflag = (unknown)
583$sys_id =
584$lflags =
585$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL
586$bn_obj =
587$des_obj =
588$bf_obj =
589$md5_obj =
590$sha1_obj =
591$cast_obj =
592$rc4_obj =
593$rmd160_obj =
594$rc5_obj =
595$dso_scheme = dlfcn
596$shared_target= bsd-gcc-shared
597$shared_cflag = -fPIC
598$shared_ldflag =
599$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
600$ranlib =
601$arflags =
602
603*** OpenBSD-sparc
604$cc = gcc
605$cflags = -DTERMIOS -O3 -fomit-frame-pointer
606$unistd =
607$thread_cflag = (unknown)
608$sys_id =
609$lflags =
610$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL
611$bn_obj =
612$des_obj =
613$bf_obj =
614$md5_obj =
615$sha1_obj =
616$cast_obj =
617$rc4_obj =
618$rmd160_obj =
619$rc5_obj =
620$dso_scheme = dlfcn
621$shared_target= bsd-gcc-shared
622$shared_cflag = -fPIC
623$shared_ldflag =
624$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
625$ranlib =
626$arflags =
627
628*** OpenBSD-sparc64
629$cc = gcc
630$cflags = -DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer
631$unistd =
632$thread_cflag = (unknown)
633$sys_id =
634$lflags =
635$bn_ops = SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR
636$bn_obj =
637$des_obj =
638$bf_obj =
639$md5_obj =
640$sha1_obj =
641$cast_obj =
642$rc4_obj =
643$rmd160_obj =
644$rc5_obj =
645$dso_scheme = dlfcn
646$shared_target= bsd-gcc-shared
647$shared_cflag = -fPIC
648$shared_ldflag =
649$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
650$ranlib =
651$arflags =
652
653*** OpenBSD-vax
654$cc = gcc
655$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer
656$unistd =
657$thread_cflag = (unknown)
658$sys_id =
659$lflags =
660$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL
661$bn_obj =
662$des_obj =
663$bf_obj =
664$md5_obj =
665$sha1_obj =
666$cast_obj =
667$rc4_obj =
668$rmd160_obj =
669$rc5_obj =
670$dso_scheme = dlfcn
671$shared_target= bsd-gcc-shared
672$shared_cflag = -fPIC
673$shared_ldflag =
674$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
675$ranlib =
676$arflags =
677
678*** OpenUNIX-8
679$cc = cc
680$cflags = -O -DFILIO_H -Kalloca
681$unistd =
682$thread_cflag = -Kthread
683$sys_id =
684$lflags = -lsocket -lnsl
685$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
686$bn_obj =
687$des_obj =
688$bf_obj =
689$md5_obj =
690$sha1_obj =
691$cast_obj =
692$rc4_obj =
693$rmd160_obj =
694$rc5_obj =
695$dso_scheme = dlfcn
696$shared_target= svr5-shared
697$shared_cflag = -Kpic
698$shared_ldflag =
699$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
700$ranlib =
701$arflags =
702
703*** OpenUNIX-8-gcc
704$cc = gcc
705$cflags = -O -DFILIO_H -fomit-frame-pointer
706$unistd =
707$thread_cflag = -pthread
708$sys_id =
709$lflags = -lsocket -lnsl
710$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
711$bn_obj =
712$des_obj =
713$bf_obj =
714$md5_obj =
715$sha1_obj =
716$cast_obj =
717$rc4_obj =
718$rmd160_obj =
719$rc5_obj =
720$dso_scheme = dlfcn
721$shared_target= svr5-shared
722$shared_cflag = -fPIC
723$shared_ldflag =
724$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
725$ranlib =
726$arflags =
727
728*** OpenUNIX-8-pentium
729$cc = cc
730$cflags = -O -DFILIO_H -Kalloca -Kpentium
731$unistd =
732$thread_cflag = -Kthread
733$sys_id =
734$lflags = -lsocket -lnsl
735$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
736$bn_obj =
737$des_obj =
738$bf_obj =
739$md5_obj =
740$sha1_obj =
741$cast_obj =
742$rc4_obj =
743$rmd160_obj =
744$rc5_obj =
745$dso_scheme = dlfcn
746$shared_target= svr5-shared
747$shared_cflag = -Kpic
748$shared_ldflag =
749$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
750$ranlib =
751$arflags =
752
753*** OpenUNIX-8-pentium_pro
754$cc = cc
755$cflags = -O -DFILIO_H -Kalloca -Kpentium_pro
756$unistd =
757$thread_cflag = -Kthread
758$sys_id =
759$lflags = -lsocket -lnsl
760$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
761$bn_obj =
762$des_obj =
763$bf_obj =
764$md5_obj =
765$sha1_obj =
766$cast_obj =
767$rc4_obj =
768$rmd160_obj =
769$rc5_obj =
770$dso_scheme = dlfcn
771$shared_target= svr5-shared
772$shared_cflag = -Kpic
773$shared_ldflag =
774$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
775$ranlib =
776$arflags =
777
778*** ReliantUNIX
779$cc = cc
780$cflags = -KPIC -g -DTERMIOS -DB_ENDIAN
781$unistd =
782$thread_cflag = -Kthread
783$sys_id = SNI
784$lflags = -lsocket -lnsl -lc -L/usr/ucblib -lucb
785$bn_ops = BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR
786$bn_obj =
787$des_obj =
788$bf_obj =
789$md5_obj =
790$sha1_obj =
791$cast_obj =
792$rc4_obj =
793$rmd160_obj =
794$rc5_obj =
795$dso_scheme = dlfcn
796$shared_target= reliantunix-shared
797$shared_cflag =
798$shared_ldflag =
799$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
800$ranlib =
801$arflags =
802
803*** SINIX
804$cc = cc
805$cflags = -O
806$unistd =
807$thread_cflag = (unknown)
808$sys_id = SNI
809$lflags = -lsocket -lnsl -lc -L/usr/ucblib -lucb
810$bn_ops = RC4_INDEX RC4_CHAR
811$bn_obj =
812$des_obj =
813$bf_obj =
814$md5_obj =
815$sha1_obj =
816$cast_obj =
817$rc4_obj =
818$rmd160_obj =
819$rc5_obj =
820$dso_scheme =
821$shared_target=
822$shared_cflag =
823$shared_ldflag =
824$shared_extension =
825$ranlib =
826$arflags =
827
828*** SINIX-N
829$cc = /usr/ucb/cc
830$cflags = -O2 -misaligned
831$unistd =
832$thread_cflag = (unknown)
833$sys_id =
834$lflags = -lucb
835$bn_ops = RC4_INDEX RC4_CHAR
836$bn_obj =
837$des_obj =
838$bf_obj =
839$md5_obj =
840$sha1_obj =
841$cast_obj =
842$rc4_obj =
843$rmd160_obj =
844$rc5_obj =
845$dso_scheme =
846$shared_target=
847$shared_cflag =
848$shared_ldflag =
849$shared_extension =
850$ranlib =
851$arflags =
852
853*** UWIN
854$cc = cc
855$cflags = -DTERMIOS -DL_ENDIAN -O -Wall
856$unistd =
857$thread_cflag =
858$sys_id = UWIN
859$lflags =
860$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
861$bn_obj =
862$des_obj =
863$bf_obj =
864$md5_obj =
865$sha1_obj =
866$cast_obj =
867$rc4_obj =
868$rmd160_obj =
869$rc5_obj =
870$dso_scheme = win32
871$shared_target=
872$shared_cflag =
873$shared_ldflag =
874$shared_extension =
875$ranlib =
876$arflags =
877
878*** VC-MSDOS
879$cc = cl
880$cflags =
881$unistd =
882$thread_cflag = (unknown)
883$sys_id = MSDOS
884$lflags =
885$bn_ops = BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT
886$bn_obj =
887$des_obj =
888$bf_obj =
889$md5_obj =
890$sha1_obj =
891$cast_obj =
892$rc4_obj =
893$rmd160_obj =
894$rc5_obj =
895$dso_scheme =
896$shared_target=
897$shared_cflag =
898$shared_ldflag =
899$shared_extension =
900$ranlib =
901$arflags =
902
903*** VC-NT
904$cc = cl
905$cflags =
906$unistd =
907$thread_cflag =
908$sys_id = WINNT
909$lflags =
910$bn_ops = BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN RC4_INDEX MD2_INT
911$bn_obj =
912$des_obj =
913$bf_obj =
914$md5_obj =
915$sha1_obj =
916$cast_obj =
917$rc4_obj =
918$rmd160_obj =
919$rc5_obj =
920$dso_scheme = win32
921$shared_target=
922$shared_cflag =
923$shared_ldflag =
924$shared_extension =
925$ranlib =
926$arflags =
927
928*** VC-W31-16
929$cc = cl
930$cflags =
931$unistd =
932$thread_cflag = (unknown)
933$sys_id = WIN16
934$lflags =
935$bn_ops = BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT
936$bn_obj =
937$des_obj =
938$bf_obj =
939$md5_obj =
940$sha1_obj =
941$cast_obj =
942$rc4_obj =
943$rmd160_obj =
944$rc5_obj =
945$dso_scheme =
946$shared_target=
947$shared_cflag =
948$shared_ldflag =
949$shared_extension =
950$ranlib =
951$arflags =
952
953*** VC-W31-32
954$cc = cl
955$cflags =
956$unistd =
957$thread_cflag =
958$sys_id = WIN16
959$lflags =
960$bn_ops = BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT
961$bn_obj =
962$des_obj =
963$bf_obj =
964$md5_obj =
965$sha1_obj =
966$cast_obj =
967$rc4_obj =
968$rmd160_obj =
969$rc5_obj =
970$dso_scheme =
971$shared_target=
972$shared_cflag =
973$shared_ldflag =
974$shared_extension =
975$ranlib =
976$arflags =
977
978*** VC-WIN16
979$cc = cl
980$cflags =
981$unistd =
982$thread_cflag = (unknown)
983$sys_id = WIN16
984$lflags =
985$bn_ops = MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT
986$bn_obj =
987$des_obj =
988$bf_obj =
989$md5_obj =
990$sha1_obj =
991$cast_obj =
992$rc4_obj =
993$rmd160_obj =
994$rc5_obj =
995$dso_scheme =
996$shared_target=
997$shared_cflag =
998$shared_ldflag =
999$shared_extension =
1000$ranlib =
1001$arflags =
1002
1003*** VC-WIN32
1004$cc = cl
1005$cflags =
1006$unistd =
1007$thread_cflag =
1008$sys_id = WIN32
1009$lflags =
1010$bn_ops = BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN RC4_INDEX MD2_INT
1011$bn_obj =
1012$des_obj =
1013$bf_obj =
1014$md5_obj =
1015$sha1_obj =
1016$cast_obj =
1017$rc4_obj =
1018$rmd160_obj =
1019$rc5_obj =
1020$dso_scheme = win32
1021$shared_target=
1022$shared_cflag =
1023$shared_ldflag =
1024$shared_extension =
1025$ranlib =
1026$arflags =
1027
1028*** aix-cc
1029$cc = cc
1030$cflags = -O -DB_ENDIAN -qmaxmem=16384
1031$unistd =
1032$thread_cflag = (unknown)
1033$sys_id = AIX
1034$lflags =
1035$bn_ops = BN_LLONG RC4_CHAR
1036$bn_obj =
1037$des_obj =
1038$bf_obj =
1039$md5_obj =
1040$sha1_obj =
1041$cast_obj =
1042$rc4_obj =
1043$rmd160_obj =
1044$rc5_obj =
1045$dso_scheme =
1046$shared_target=
1047$shared_cflag =
1048$shared_ldflag =
1049$shared_extension =
1050$ranlib =
1051$arflags =
1052
1053*** aix-gcc
1054$cc = gcc
1055$cflags = -O3 -DB_ENDIAN
1056$unistd =
1057$thread_cflag = (unknown)
1058$sys_id = AIX
1059$lflags =
1060$bn_ops = BN_LLONG RC4_CHAR
1061$bn_obj =
1062$des_obj =
1063$bf_obj =
1064$md5_obj =
1065$sha1_obj =
1066$cast_obj =
1067$rc4_obj =
1068$rmd160_obj =
1069$rc5_obj =
1070$dso_scheme =
1071$shared_target=
1072$shared_cflag =
1073$shared_ldflag =
1074$shared_extension =
1075$ranlib =
1076$arflags =
1077
1078*** aix43-cc
1079$cc = cc
1080$cflags = -O -DAIX -DB_ENDIAN -qmaxmem=16384
1081$unistd =
1082$thread_cflag = (unknown)
1083$sys_id =
1084$lflags =
1085$bn_ops = BN_LLONG RC4_CHAR
1086$bn_obj =
1087$des_obj =
1088$bf_obj =
1089$md5_obj =
1090$sha1_obj =
1091$cast_obj =
1092$rc4_obj =
1093$rmd160_obj =
1094$rc5_obj =
1095$dso_scheme = dlfcn
1096$shared_target=
1097$shared_cflag =
1098$shared_ldflag =
1099$shared_extension =
1100$ranlib =
1101$arflags =
1102
1103*** aix43-gcc
1104$cc = gcc
1105$cflags = -O3 -DAIX -DB_ENDIAN
1106$unistd =
1107$thread_cflag = (unknown)
1108$sys_id =
1109$lflags =
1110$bn_ops = BN_LLONG RC4_CHAR
1111$bn_obj =
1112$des_obj =
1113$bf_obj =
1114$md5_obj =
1115$sha1_obj =
1116$cast_obj =
1117$rc4_obj =
1118$rmd160_obj =
1119$rc5_obj =
1120$dso_scheme = dlfcn
1121$shared_target=
1122$shared_cflag =
1123$shared_ldflag =
1124$shared_extension =
1125$ranlib =
1126$arflags =
1127
1128*** aix64-cc
1129$cc = cc
1130$cflags = -O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64
1131$unistd =
1132$thread_cflag = (unknown)
1133$sys_id =
1134$lflags =
1135$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR
1136$bn_obj =
1137$des_obj =
1138$bf_obj =
1139$md5_obj =
1140$sha1_obj =
1141$cast_obj =
1142$rc4_obj =
1143$rmd160_obj =
1144$rc5_obj =
1145$dso_scheme = dlfcn
1146$shared_target=
1147$shared_cflag =
1148$shared_ldflag =
1149$shared_extension =
1150$ranlib =
1151$arflags = -X 64
1152
1153*** alpha-cc
1154$cc = cc
1155$cflags = -std1 -tune host -fast -readonly_strings
1156$unistd =
1157$thread_cflag = -pthread
1158$sys_id =
1159$lflags =
1160$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
1161$bn_obj =
1162$des_obj =
1163$bf_obj =
1164$md5_obj =
1165$sha1_obj =
1166$cast_obj =
1167$rc4_obj =
1168$rmd160_obj =
1169$rc5_obj =
1170$dso_scheme = dlfcn
1171$shared_target= tru64-shared
1172$shared_cflag =
1173$shared_ldflag =
1174$shared_extension = .so
1175$ranlib =
1176$arflags =
1177
1178*** alpha-cc-rpath
1179$cc = cc
1180$cflags = -std1 -tune host -fast -readonly_strings
1181$unistd =
1182$thread_cflag = -pthread
1183$sys_id =
1184$lflags =
1185$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
1186$bn_obj =
1187$des_obj =
1188$bf_obj =
1189$md5_obj =
1190$sha1_obj =
1191$cast_obj =
1192$rc4_obj =
1193$rmd160_obj =
1194$rc5_obj =
1195$dso_scheme = dlfcn
1196$shared_target= tru64-shared-rpath
1197$shared_cflag =
1198$shared_ldflag =
1199$shared_extension = .so
1200$ranlib =
1201$arflags =
1202
1203*** alpha-gcc
1204$cc = gcc
1205$cflags = -O3
1206$unistd =
1207$thread_cflag = (unknown)
1208$sys_id =
1209$lflags =
1210$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1
1211$bn_obj =
1212$des_obj =
1213$bf_obj =
1214$md5_obj =
1215$sha1_obj =
1216$cast_obj =
1217$rc4_obj =
1218$rmd160_obj =
1219$rc5_obj =
1220$dso_scheme = dlfcn
1221$shared_target= alpha-osf1-shared
1222$shared_cflag =
1223$shared_ldflag =
1224$shared_extension = .so
1225$ranlib =
1226$arflags =
1227
1228*** alpha164-cc
1229$cc = cc
1230$cflags = -std1 -tune host -fast -readonly_strings
1231$unistd =
1232$thread_cflag = -pthread
1233$sys_id =
1234$lflags =
1235$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
1236$bn_obj =
1237$des_obj =
1238$bf_obj =
1239$md5_obj =
1240$sha1_obj =
1241$cast_obj =
1242$rc4_obj =
1243$rmd160_obj =
1244$rc5_obj =
1245$dso_scheme = dlfcn
1246$shared_target= tru64-shared
1247$shared_cflag =
1248$shared_ldflag =
1249$shared_extension = .so
1250$ranlib =
1251$arflags =
1252
1253*** alphaold-cc
1254$cc = cc
1255$cflags = -std1 -tune host -O4 -readonly_strings
1256$unistd =
1257$thread_cflag = (unknown)
1258$sys_id =
1259$lflags =
1260$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
1261$bn_obj =
1262$des_obj =
1263$bf_obj =
1264$md5_obj =
1265$sha1_obj =
1266$cast_obj =
1267$rc4_obj =
1268$rmd160_obj =
1269$rc5_obj =
1270$dso_scheme = dlfcn
1271$shared_target= alpha-osf1-shared
1272$shared_cflag =
1273$shared_ldflag =
1274$shared_extension = .so
1275$ranlib =
1276$arflags =
1277
1278*** bsdi-elf-gcc
1279$cc = gcc
1280$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
1281$unistd =
1282$thread_cflag = (unknown)
1283$sys_id =
1284$lflags = -ldl
1285$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1286$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1287$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1288$bf_obj = asm/bx86-elf.o
1289$md5_obj = asm/mx86-elf.o
1290$sha1_obj = asm/sx86-elf.o
1291$cast_obj = asm/cx86-elf.o
1292$rc4_obj = asm/rx86-elf.o
1293$rmd160_obj = asm/rm86-elf.o
1294$rc5_obj = asm/r586-elf.o
1295$dso_scheme = dlfcn
1296$shared_target= bsd-gcc-shared
1297$shared_cflag = -fPIC
1298$shared_ldflag =
1299$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
1300$ranlib =
1301$arflags =
1302
1303*** bsdi-gcc
1304$cc = gcc
1305$cflags = -O3 -ffast-math -DL_ENDIAN -DPERL5 -m486
1306$unistd =
1307$thread_cflag = (unknown)
1308$sys_id =
1309$lflags =
1310$bn_ops = RSA_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1311$bn_obj = asm/bn86bsdi.o asm/co86bsdi.o
1312$des_obj = asm/dx86bsdi.o asm/yx86bsdi.o
1313$bf_obj = asm/bx86bsdi.o
1314$md5_obj = asm/mx86bsdi.o
1315$sha1_obj = asm/sx86bsdi.o
1316$cast_obj = asm/cx86bsdi.o
1317$rc4_obj = asm/rx86bsdi.o
1318$rmd160_obj = asm/rm86bsdi.o
1319$rc5_obj = asm/r586bsdi.o
1320$dso_scheme =
1321$shared_target=
1322$shared_cflag =
1323$shared_ldflag =
1324$shared_extension =
1325$ranlib =
1326$arflags =
1327
1328*** cc
1329$cc = cc
1330$cflags = -O
1331$unistd =
1332$thread_cflag = (unknown)
1333$sys_id =
1334$lflags =
1335$bn_ops =
1336$bn_obj =
1337$des_obj =
1338$bf_obj =
1339$md5_obj =
1340$sha1_obj =
1341$cast_obj =
1342$rc4_obj =
1343$rmd160_obj =
1344$rc5_obj =
1345$dso_scheme =
1346$shared_target=
1347$shared_cflag =
1348$shared_ldflag =
1349$shared_extension =
1350$ranlib =
1351$arflags =
1352
1353*** cray-j90
1354$cc = cc
1355$cflags = -DBIT_FIELD_LIMITS -DTERMIOS
1356$unistd =
1357$thread_cflag = (unknown)
1358$sys_id = CRAY
1359$lflags =
1360$bn_ops = SIXTY_FOUR_BIT_LONG DES_INT
1361$bn_obj =
1362$des_obj =
1363$bf_obj =
1364$md5_obj =
1365$sha1_obj =
1366$cast_obj =
1367$rc4_obj =
1368$rmd160_obj =
1369$rc5_obj =
1370$dso_scheme =
1371$shared_target=
1372$shared_cflag =
1373$shared_ldflag =
1374$shared_extension =
1375$ranlib =
1376$arflags =
1377
1378*** cray-t3e
1379$cc = cc
1380$cflags = -DBIT_FIELD_LIMITS -DTERMIOS
1381$unistd =
1382$thread_cflag = (unknown)
1383$sys_id = CRAY
1384$lflags =
1385$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT
1386$bn_obj =
1387$des_obj =
1388$bf_obj =
1389$md5_obj =
1390$sha1_obj =
1391$cast_obj =
1392$rc4_obj =
1393$rmd160_obj =
1394$rc5_obj =
1395$dso_scheme =
1396$shared_target=
1397$shared_cflag =
1398$shared_ldflag =
1399$shared_extension =
1400$ranlib =
1401$arflags =
1402
1403*** darwin-i386-cc
1404$cc = cc
1405$cflags = -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
1406$unistd =
1407$thread_cflag = -D_REENTRANT
1408$sys_id = MACOSX
1409$lflags =
1410$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
1411$bn_obj =
1412$des_obj =
1413$bf_obj =
1414$md5_obj =
1415$sha1_obj =
1416$cast_obj =
1417$rc4_obj =
1418$rmd160_obj =
1419$rc5_obj =
1420$dso_scheme =
1421$shared_target= darwin-shared
1422$shared_cflag = -fPIC
1423$shared_ldflag =
1424$shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib
1425$ranlib =
1426$arflags =
1427
1428*** darwin-ppc-cc
1429$cc = cc
1430$cflags = -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
1431$unistd =
1432$thread_cflag = -D_REENTRANT
1433$sys_id = MACOSX
1434$lflags =
1435$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
1436$bn_obj =
1437$des_obj =
1438$bf_obj =
1439$md5_obj =
1440$sha1_obj =
1441$cast_obj =
1442$rc4_obj =
1443$rmd160_obj =
1444$rc5_obj =
1445$dso_scheme =
1446$shared_target= darwin-shared
1447$shared_cflag = -fPIC
1448$shared_ldflag =
1449$shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib
1450$ranlib =
1451$arflags =
1452
1453*** debug
1454$cc = gcc
1455$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror
1456$unistd =
1457$thread_cflag = (unknown)
1458$sys_id =
1459$lflags = -lefence
1460$bn_ops =
1461$bn_obj =
1462$des_obj =
1463$bf_obj =
1464$md5_obj =
1465$sha1_obj =
1466$cast_obj =
1467$rc4_obj =
1468$rmd160_obj =
1469$rc5_obj =
1470$dso_scheme =
1471$shared_target=
1472$shared_cflag =
1473$shared_ldflag =
1474$shared_extension =
1475$ranlib =
1476$arflags =
1477
1478*** debug-ben
1479$cc = gcc
1480$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe
1481$unistd =
1482$thread_cflag = (unknown)
1483$sys_id =
1484$lflags =
1485$bn_ops =
1486$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1487$des_obj =
1488$bf_obj =
1489$md5_obj =
1490$sha1_obj =
1491$cast_obj =
1492$rc4_obj =
1493$rmd160_obj =
1494$rc5_obj =
1495$dso_scheme =
1496$shared_target=
1497$shared_cflag =
1498$shared_ldflag =
1499$shared_extension =
1500$ranlib =
1501$arflags =
1502
1503*** debug-ben-debug
1504$cc = gcc
1505$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe
1506$unistd =
1507$thread_cflag = (unknown)
1508$sys_id =
1509$lflags =
1510$bn_ops =
1511$bn_obj =
1512$des_obj =
1513$bf_obj =
1514$md5_obj =
1515$sha1_obj =
1516$cast_obj =
1517$rc4_obj =
1518$rmd160_obj =
1519$rc5_obj =
1520$dso_scheme =
1521$shared_target=
1522$shared_cflag =
1523$shared_ldflag =
1524$shared_extension =
1525$ranlib =
1526$arflags =
1527
1528*** debug-ben-openbsd
1529$cc = gcc
1530$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe
1531$unistd =
1532$thread_cflag = (unknown)
1533$sys_id =
1534$lflags =
1535$bn_ops =
1536$bn_obj =
1537$des_obj =
1538$bf_obj =
1539$md5_obj =
1540$sha1_obj =
1541$cast_obj =
1542$rc4_obj =
1543$rmd160_obj =
1544$rc5_obj =
1545$dso_scheme =
1546$shared_target=
1547$shared_cflag =
1548$shared_ldflag =
1549$shared_extension =
1550$ranlib =
1551$arflags =
1552
1553*** debug-ben-openbsd-debug
1554$cc = gcc
1555$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe
1556$unistd =
1557$thread_cflag = (unknown)
1558$sys_id =
1559$lflags =
1560$bn_ops =
1561$bn_obj =
1562$des_obj =
1563$bf_obj =
1564$md5_obj =
1565$sha1_obj =
1566$cast_obj =
1567$rc4_obj =
1568$rmd160_obj =
1569$rc5_obj =
1570$dso_scheme =
1571$shared_target=
1572$shared_cflag =
1573$shared_ldflag =
1574$shared_extension =
1575$ranlib =
1576$arflags =
1577
1578*** debug-ben-strict
1579$cc = gcc
1580$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe
1581$unistd =
1582$thread_cflag = (unknown)
1583$sys_id =
1584$lflags =
1585$bn_ops =
1586$bn_obj =
1587$des_obj =
1588$bf_obj =
1589$md5_obj =
1590$sha1_obj =
1591$cast_obj =
1592$rc4_obj =
1593$rmd160_obj =
1594$rc5_obj =
1595$dso_scheme =
1596$shared_target=
1597$shared_cflag =
1598$shared_ldflag =
1599$shared_extension =
1600$ranlib =
1601$arflags =
1602
1603*** debug-bodo
1604$cc = gcc
1605$cflags = -DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall
1606$unistd =
1607$thread_cflag = -D_REENTRANT
1608$sys_id =
1609$lflags =
1610$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1611$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1612$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1613$bf_obj = asm/bx86-elf.o
1614$md5_obj = asm/mx86-elf.o
1615$sha1_obj = asm/sx86-elf.o
1616$cast_obj = asm/cx86-elf.o
1617$rc4_obj = asm/rx86-elf.o
1618$rmd160_obj = asm/rm86-elf.o
1619$rc5_obj = asm/r586-elf.o
1620$dso_scheme =
1621$shared_target=
1622$shared_cflag =
1623$shared_ldflag =
1624$shared_extension =
1625$ranlib =
1626$arflags =
1627
1628*** debug-levitte-linux-elf
1629$cc = gcc
1630$cflags = -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 -Wid-clash-31 -Wcast-align -Wconversion -Wno-long-long -pipe
1631$unistd =
1632$thread_cflag = -D_REENTRANT
1633$sys_id =
1634$lflags = -ldl
1635$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1636$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1637$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1638$bf_obj = asm/bx86-elf.o
1639$md5_obj = asm/mx86-elf.o
1640$sha1_obj = asm/sx86-elf.o
1641$cast_obj = asm/cx86-elf.o
1642$rc4_obj = asm/rx86-elf.o
1643$rmd160_obj = asm/rm86-elf.o
1644$rc5_obj = asm/r586-elf.o
1645$dso_scheme = dlfcn
1646$shared_target= linux-shared
1647$shared_cflag = -fPIC
1648$shared_ldflag =
1649$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
1650$ranlib =
1651$arflags =
1652
1653*** debug-levitte-linux-noasm
1654$cc = gcc
1655$cflags = -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 -Wid-clash-31 -Wcast-align -Wconversion -Wno-long-long -pipe
1656$unistd =
1657$thread_cflag = -D_REENTRANT
1658$sys_id =
1659$lflags = -ldl
1660$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1661$bn_obj =
1662$des_obj =
1663$bf_obj =
1664$md5_obj =
1665$sha1_obj =
1666$cast_obj =
1667$rc4_obj =
1668$rmd160_obj =
1669$rc5_obj =
1670$dso_scheme = dlfcn
1671$shared_target= linux-shared
1672$shared_cflag = -fPIC
1673$shared_ldflag =
1674$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
1675$ranlib =
1676$arflags =
1677
1678*** debug-linux-elf
1679$cc = gcc
1680$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
1681$unistd =
1682$thread_cflag = -D_REENTRANT
1683$sys_id =
1684$lflags = -lefence -ldl
1685$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1686$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1687$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1688$bf_obj = asm/bx86-elf.o
1689$md5_obj = asm/mx86-elf.o
1690$sha1_obj = asm/sx86-elf.o
1691$cast_obj = asm/cx86-elf.o
1692$rc4_obj = asm/rx86-elf.o
1693$rmd160_obj = asm/rm86-elf.o
1694$rc5_obj = asm/r586-elf.o
1695$dso_scheme = dlfcn
1696$shared_target= linux-shared
1697$shared_cflag = -fPIC
1698$shared_ldflag =
1699$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
1700$ranlib =
1701$arflags =
1702
1703*** debug-linux-elf-noefence
1704$cc = gcc
1705$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
1706$unistd =
1707$thread_cflag = -D_REENTRANT
1708$sys_id =
1709$lflags = -ldl
1710$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1711$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1712$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1713$bf_obj = asm/bx86-elf.o
1714$md5_obj = asm/mx86-elf.o
1715$sha1_obj = asm/sx86-elf.o
1716$cast_obj = asm/cx86-elf.o
1717$rc4_obj = asm/rx86-elf.o
1718$rmd160_obj = asm/rm86-elf.o
1719$rc5_obj = asm/r586-elf.o
1720$dso_scheme = dlfcn
1721$shared_target=
1722$shared_cflag =
1723$shared_ldflag =
1724$shared_extension =
1725$ranlib =
1726$arflags =
1727
1728*** debug-linux-pentium
1729$cc = gcc
1730$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall
1731$unistd =
1732$thread_cflag = -D_REENTRANT
1733$sys_id =
1734$lflags = -ldl
1735$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1736$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1737$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1738$bf_obj = asm/bx86-elf.o
1739$md5_obj = asm/mx86-elf.o
1740$sha1_obj = asm/sx86-elf.o
1741$cast_obj = asm/cx86-elf.o
1742$rc4_obj = asm/rx86-elf.o
1743$rmd160_obj = asm/rm86-elf.o
1744$rc5_obj = asm/r586-elf.o
1745$dso_scheme = dlfcn
1746$shared_target=
1747$shared_cflag =
1748$shared_ldflag =
1749$shared_extension =
1750$ranlib =
1751$arflags =
1752
1753*** debug-linux-ppro
1754$cc = gcc
1755$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall
1756$unistd =
1757$thread_cflag = -D_REENTRANT
1758$sys_id =
1759$lflags = -ldl
1760$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1761$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1762$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1763$bf_obj = asm/bx86-elf.o
1764$md5_obj = asm/mx86-elf.o
1765$sha1_obj = asm/sx86-elf.o
1766$cast_obj = asm/cx86-elf.o
1767$rc4_obj = asm/rx86-elf.o
1768$rmd160_obj = asm/rm86-elf.o
1769$rc5_obj = asm/r586-elf.o
1770$dso_scheme = dlfcn
1771$shared_target=
1772$shared_cflag =
1773$shared_ldflag =
1774$shared_extension =
1775$ranlib =
1776$arflags =
1777
1778*** debug-rse
1779$cc = cc
1780$cflags = -DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall
1781$unistd =
1782$thread_cflag = (unknown)
1783$sys_id =
1784$lflags =
1785$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1786$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1787$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1788$bf_obj = asm/bx86-elf.o
1789$md5_obj = asm/mx86-elf.o
1790$sha1_obj = asm/sx86-elf.o
1791$cast_obj = asm/cx86-elf.o
1792$rc4_obj = asm/rx86-elf.o
1793$rmd160_obj = asm/rm86-elf.o
1794$rc5_obj = asm/r586-elf.o
1795$dso_scheme =
1796$shared_target=
1797$shared_cflag =
1798$shared_ldflag =
1799$shared_extension =
1800$ranlib =
1801$arflags =
1802
1803*** debug-solaris-sparcv8-cc
1804$cc = cc
1805$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W
1806$unistd =
1807$thread_cflag = -D_REENTRANT
1808$sys_id =
1809$lflags = -lsocket -lnsl -ldl
1810$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
1811$bn_obj = asm/sparcv8.o
1812$des_obj =
1813$bf_obj =
1814$md5_obj =
1815$sha1_obj =
1816$cast_obj =
1817$rc4_obj =
1818$rmd160_obj =
1819$rc5_obj =
1820$dso_scheme = dlfcn
1821$shared_target= solaris-shared
1822$shared_cflag = -KPIC
1823$shared_ldflag =
1824$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
1825$ranlib =
1826$arflags =
1827
1828*** debug-solaris-sparcv8-gcc
1829$cc = gcc
1830$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN
1831$unistd =
1832$thread_cflag = -D_REENTRANT
1833$sys_id =
1834$lflags = -lsocket -lnsl -ldl
1835$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
1836$bn_obj = asm/sparcv8.o
1837$des_obj =
1838$bf_obj =
1839$md5_obj =
1840$sha1_obj =
1841$cast_obj =
1842$rc4_obj =
1843$rmd160_obj =
1844$rc5_obj =
1845$dso_scheme = dlfcn
1846$shared_target= solaris-shared
1847$shared_cflag = -fPIC
1848$shared_ldflag =
1849$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
1850$ranlib =
1851$arflags =
1852
1853*** debug-solaris-sparcv9-cc
1854$cc = cc
1855$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W
1856$unistd =
1857$thread_cflag = -D_REENTRANT
1858$sys_id = ULTRASPARC
1859$lflags = -lsocket -lnsl -ldl
1860$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR
1861$bn_obj = asm/sparcv8plus.o
1862$des_obj =
1863$bf_obj =
1864$md5_obj = asm/md5-sparcv8plus.o
1865$sha1_obj =
1866$cast_obj =
1867$rc4_obj =
1868$rmd160_obj =
1869$rc5_obj =
1870$dso_scheme = dlfcn
1871$shared_target= solaris-shared
1872$shared_cflag = -KPIC
1873$shared_ldflag =
1874$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
1875$ranlib =
1876$arflags =
1877
1878*** debug-solaris-sparcv9-gcc
1879$cc = gcc
1880$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN
1881$unistd =
1882$thread_cflag = -D_REENTRANT
1883$sys_id =
1884$lflags = -lsocket -lnsl -ldl
1885$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
1886$bn_obj = asm/sparcv8plus.o
1887$des_obj =
1888$bf_obj =
1889$md5_obj =
1890$sha1_obj =
1891$cast_obj =
1892$rc4_obj =
1893$rmd160_obj =
1894$rc5_obj =
1895$dso_scheme = dlfcn
1896$shared_target= solaris-shared
1897$shared_cflag = -fPIC
1898$shared_ldflag =
1899$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
1900$ranlib =
1901$arflags =
1902
1903*** debug-steve
1904$cc = gcc
1905$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe
1906$unistd =
1907$thread_cflag = -D_REENTRANT
1908$sys_id =
1909$lflags = -rdynamic -ldl
1910$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1911$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1912$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1913$bf_obj = asm/bx86-elf.o
1914$md5_obj = asm/mx86-elf.o
1915$sha1_obj = asm/sx86-elf.o
1916$cast_obj = asm/cx86-elf.o
1917$rc4_obj = asm/rx86-elf.o
1918$rmd160_obj = asm/rm86-elf.o
1919$rc5_obj = asm/r586-elf.o
1920$dso_scheme = dlfcn
1921$shared_target=
1922$shared_cflag =
1923$shared_ldflag =
1924$shared_extension =
1925$ranlib =
1926$arflags =
1927
1928*** debug-steve-linux-pseudo64
1929$cc = gcc
1930$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe
1931$unistd =
1932$thread_cflag = -D_REENTRANT
1933$sys_id =
1934$lflags = -rdynamic -ldl
1935$bn_ops = SIXTY_FOUR_BIT
1936$bn_obj =
1937$des_obj = dlfcn
1938$bf_obj =
1939$md5_obj =
1940$sha1_obj =
1941$cast_obj =
1942$rc4_obj =
1943$rmd160_obj =
1944$rc5_obj =
1945$dso_scheme =
1946$shared_target=
1947$shared_cflag =
1948$shared_ldflag =
1949$shared_extension =
1950$ranlib =
1951$arflags =
1952
1953*** debug-ulf
1954$cc = gcc
1955$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe
1956$unistd =
1957$thread_cflag = -D_REENTRANT
1958$sys_id =
1959$lflags =
1960$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
1961$bn_obj = asm/bn86-elf.o asm/co86-elf.o
1962$des_obj = asm/dx86-elf.o asm/yx86-elf.o
1963$bf_obj = asm/bx86-elf.o
1964$md5_obj = asm/mx86-elf.o
1965$sha1_obj = asm/sx86-elf.o
1966$cast_obj = asm/cx86-elf.o
1967$rc4_obj = asm/rx86-elf.o
1968$rmd160_obj = asm/rm86-elf.o
1969$rc5_obj = asm/r586-elf.o
1970$dso_scheme =
1971$shared_target=
1972$shared_cflag =
1973$shared_ldflag =
1974$shared_extension =
1975$ranlib =
1976$arflags =
1977
1978*** dgux-R3-gcc
1979$cc = gcc
1980$cflags = -O3 -fomit-frame-pointer
1981$unistd =
1982$thread_cflag = (unknown)
1983$sys_id =
1984$lflags =
1985$bn_ops = RC4_INDEX DES_UNROLL
1986$bn_obj =
1987$des_obj =
1988$bf_obj =
1989$md5_obj =
1990$sha1_obj =
1991$cast_obj =
1992$rc4_obj =
1993$rmd160_obj =
1994$rc5_obj =
1995$dso_scheme =
1996$shared_target=
1997$shared_cflag =
1998$shared_ldflag =
1999$shared_extension =
2000$ranlib =
2001$arflags =
2002
2003*** dgux-R4-gcc
2004$cc = gcc
2005$cflags = -O3 -fomit-frame-pointer
2006$unistd =
2007$thread_cflag = (unknown)
2008$sys_id =
2009$lflags = -lnsl -lsocket
2010$bn_ops = RC4_INDEX DES_UNROLL
2011$bn_obj =
2012$des_obj =
2013$bf_obj =
2014$md5_obj =
2015$sha1_obj =
2016$cast_obj =
2017$rc4_obj =
2018$rmd160_obj =
2019$rc5_obj =
2020$dso_scheme =
2021$shared_target=
2022$shared_cflag =
2023$shared_ldflag =
2024$shared_extension =
2025$ranlib =
2026$arflags =
2027
2028*** dgux-R4-x86-gcc
2029$cc = gcc
2030$cflags = -O3 -fomit-frame-pointer -DL_ENDIAN
2031$unistd =
2032$thread_cflag = (unknown)
2033$sys_id =
2034$lflags = -lnsl -lsocket
2035$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
2036$bn_obj = asm/bn86-elf.o asm/co86-elf.o
2037$des_obj = asm/dx86-elf.o asm/yx86-elf.o
2038$bf_obj = asm/bx86-elf.o
2039$md5_obj = asm/mx86-elf.o
2040$sha1_obj = asm/sx86-elf.o
2041$cast_obj = asm/cx86-elf.o
2042$rc4_obj = asm/rx86-elf.o
2043$rmd160_obj = asm/rm86-elf.o
2044$rc5_obj = asm/r586-elf.o
2045$dso_scheme =
2046$shared_target=
2047$shared_cflag =
2048$shared_ldflag =
2049$shared_extension =
2050$ranlib =
2051$arflags =
2052
2053*** dist
2054$cc = cc
2055$cflags = -O
2056$unistd =
2057$thread_cflag = (unknown)
2058$sys_id =
2059$lflags =
2060$bn_ops =
2061$bn_obj =
2062$des_obj =
2063$bf_obj =
2064$md5_obj =
2065$sha1_obj =
2066$cast_obj =
2067$rc4_obj =
2068$rmd160_obj =
2069$rc5_obj =
2070$dso_scheme =
2071$shared_target=
2072$shared_cflag =
2073$shared_ldflag =
2074$shared_extension =
2075$ranlib =
2076$arflags =
2077
2078*** gcc
2079$cc = gcc
2080$cflags = -O3
2081$unistd =
2082$thread_cflag = (unknown)
2083$sys_id =
2084$lflags =
2085$bn_ops = BN_LLONG
2086$bn_obj =
2087$des_obj =
2088$bf_obj =
2089$md5_obj =
2090$sha1_obj =
2091$cast_obj =
2092$rc4_obj =
2093$rmd160_obj =
2094$rc5_obj =
2095$dso_scheme =
2096$shared_target=
2097$shared_cflag =
2098$shared_ldflag =
2099$shared_extension =
2100$ranlib =
2101$arflags =
2102
2103*** hpux-brokencc
2104$cc = cc
2105$cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
2106$unistd =
2107$thread_cflag = (unknown)
2108$sys_id =
2109$lflags = -Wl,+s -ldld
2110$bn_ops = DES_PTR DES_UNROLL DES_RISC1
2111$bn_obj =
2112$des_obj =
2113$bf_obj =
2114$md5_obj =
2115$sha1_obj =
2116$cast_obj =
2117$rc4_obj =
2118$rmd160_obj =
2119$rc5_obj =
2120$dso_scheme = dl
2121$shared_target= hpux-shared
2122$shared_cflag = +Z
2123$shared_ldflag =
2124$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2125$ranlib =
2126$arflags =
2127
2128*** hpux-brokengcc
2129$cc = gcc
2130$cflags = -DB_ENDIAN -DBN_DIV2W -O3
2131$unistd =
2132$thread_cflag = (unknown)
2133$sys_id =
2134$lflags = -Wl,+s -ldld
2135$bn_ops = DES_PTR DES_UNROLL DES_RISC1
2136$bn_obj =
2137$des_obj =
2138$bf_obj =
2139$md5_obj =
2140$sha1_obj =
2141$cast_obj =
2142$rc4_obj =
2143$rmd160_obj =
2144$rc5_obj =
2145$dso_scheme = dl
2146$shared_target= hpux-shared
2147$shared_cflag = -fPIC
2148$shared_ldflag =
2149$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2150$ranlib =
2151$arflags =
2152
2153*** hpux-cc
2154$cc = cc
2155$cflags = -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z
2156$unistd =
2157$thread_cflag = (unknown)
2158$sys_id =
2159$lflags = -Wl,+s -ldld
2160$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
2161$bn_obj =
2162$des_obj =
2163$bf_obj =
2164$md5_obj =
2165$sha1_obj =
2166$cast_obj =
2167$rc4_obj =
2168$rmd160_obj =
2169$rc5_obj =
2170$dso_scheme = dl
2171$shared_target= hpux-shared
2172$shared_cflag = +Z
2173$shared_ldflag =
2174$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2175$ranlib =
2176$arflags =
2177
2178*** hpux-gcc
2179$cc = gcc
2180$cflags = -DB_ENDIAN -DBN_DIV2W -O3
2181$unistd =
2182$thread_cflag = (unknown)
2183$sys_id =
2184$lflags = -Wl,+s -ldld
2185$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
2186$bn_obj =
2187$des_obj =
2188$bf_obj =
2189$md5_obj =
2190$sha1_obj =
2191$cast_obj =
2192$rc4_obj =
2193$rmd160_obj =
2194$rc5_obj =
2195$dso_scheme = dl
2196$shared_target= hpux-shared
2197$shared_cflag = -fPIC
2198$shared_ldflag =
2199$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2200$ranlib =
2201$arflags =
2202
2203*** hpux-ia64-cc
2204$cc = cc
2205$cflags = -Ae +DD32 +O3 +ESlit -z -DB_ENDIAN
2206$unistd =
2207$thread_cflag = -D_REENTRANT
2208$sys_id =
2209$lflags = -ldl
2210$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
2211$bn_obj = asm/ia64-cpp.o
2212$des_obj =
2213$bf_obj =
2214$md5_obj =
2215$sha1_obj =
2216$cast_obj =
2217$rc4_obj =
2218$rmd160_obj =
2219$rc5_obj =
2220$dso_scheme = dlfcn
2221$shared_target= hpux-shared
2222$shared_cflag = +Z
2223$shared_ldflag =
2224$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2225$ranlib =
2226$arflags =
2227
2228*** hpux-m68k-gcc
2229$cc = gcc
2230$cflags = -DB_ENDIAN -DBN_DIV2W -O3
2231$unistd =
2232$thread_cflag = (unknown)
2233$sys_id =
2234$lflags =
2235$bn_ops = BN_LLONG DES_PTR DES_UNROLL
2236$bn_obj =
2237$des_obj =
2238$bf_obj =
2239$md5_obj =
2240$sha1_obj =
2241$cast_obj =
2242$rc4_obj =
2243$rmd160_obj =
2244$rc5_obj =
2245$dso_scheme =
2246$shared_target=
2247$shared_cflag =
2248$shared_ldflag =
2249$shared_extension =
2250$ranlib =
2251$arflags =
2252
2253*** hpux-parisc-cc
2254$cc = cc
2255$cflags = +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
2256$unistd =
2257$thread_cflag = -D_REENTRANT
2258$sys_id =
2259$lflags = -Wl,+s -ldld
2260$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
2261$bn_obj =
2262$des_obj =
2263$bf_obj =
2264$md5_obj =
2265$sha1_obj =
2266$cast_obj =
2267$rc4_obj =
2268$rmd160_obj =
2269$rc5_obj =
2270$dso_scheme = dl
2271$shared_target= hpux-shared
2272$shared_cflag = +Z
2273$shared_ldflag =
2274$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2275$ranlib =
2276$arflags =
2277
2278*** hpux-parisc-cc-o4
2279$cc = cc
2280$cflags = -Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
2281$unistd =
2282$thread_cflag =
2283$sys_id =
2284$lflags = -ldld
2285$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
2286$bn_obj =
2287$des_obj =
2288$bf_obj =
2289$md5_obj =
2290$sha1_obj =
2291$cast_obj =
2292$rc4_obj =
2293$rmd160_obj =
2294$rc5_obj =
2295$dso_scheme = dl
2296$shared_target= hpux-shared
2297$shared_cflag = +Z
2298$shared_ldflag =
2299$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2300$ranlib =
2301$arflags =
2302
2303*** hpux-parisc-gcc
2304$cc = gcc
2305$cflags = -O3 -DB_ENDIAN -DBN_DIV2W
2306$unistd =
2307$thread_cflag =
2308$sys_id =
2309$lflags = -Wl,+s -ldld
2310$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
2311$bn_obj =
2312$des_obj =
2313$bf_obj =
2314$md5_obj =
2315$sha1_obj =
2316$cast_obj =
2317$rc4_obj =
2318$rmd160_obj =
2319$rc5_obj =
2320$dso_scheme = dl
2321$shared_target= hpux-shared
2322$shared_cflag = -fPIC
2323$shared_ldflag =
2324$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2325$ranlib =
2326$arflags =
2327
2328*** hpux-parisc1_1-cc
2329$cc = cc
2330$cflags = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
2331$unistd =
2332$thread_cflag = -D_REENTRANT
2333$sys_id =
2334$lflags = -Wl,+s -ldld
2335$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
2336$bn_obj =
2337$des_obj =
2338$bf_obj =
2339$md5_obj =
2340$sha1_obj =
2341$cast_obj =
2342$rc4_obj =
2343$rmd160_obj =
2344$rc5_obj =
2345$dso_scheme = dl
2346$shared_target= hpux-shared
2347$shared_cflag = +Z
2348$shared_ldflag =
2349$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2350$ranlib =
2351$arflags =
2352
2353*** hpux-parisc2-cc
2354$cc = cc
2355$cflags = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
2356$unistd =
2357$thread_cflag = -D_REENTRANT
2358$sys_id =
2359$lflags = -Wl,+s -ldld
2360$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
2361$bn_obj = asm/pa-risc2.o
2362$des_obj =
2363$bf_obj =
2364$md5_obj =
2365$sha1_obj =
2366$cast_obj =
2367$rc4_obj =
2368$rmd160_obj =
2369$rc5_obj =
2370$dso_scheme = dl
2371$shared_target= hpux-shared
2372$shared_cflag = +Z
2373$shared_ldflag =
2374$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2375$ranlib =
2376$arflags =
2377
2378*** hpux10-brokencc
2379$cc = cc
2380$cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
2381$unistd =
2382$thread_cflag = -D_REENTRANT
2383$sys_id =
2384$lflags = -Wl,+s -ldld
2385$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
2386$bn_obj =
2387$des_obj =
2388$bf_obj =
2389$md5_obj =
2390$sha1_obj =
2391$cast_obj =
2392$rc4_obj =
2393$rmd160_obj =
2394$rc5_obj =
2395$dso_scheme = dl
2396$shared_target= hpux-shared
2397$shared_cflag = +Z
2398$shared_ldflag =
2399$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2400$ranlib =
2401$arflags =
2402
2403*** hpux10-brokengcc
2404$cc = gcc
2405$cflags = -DB_ENDIAN -DBN_DIV2W -O3
2406$unistd =
2407$thread_cflag = -D_REENTRANT
2408$sys_id =
2409$lflags = -Wl,+s -ldld
2410$bn_ops = DES_PTR DES_UNROLL DES_RISC1
2411$bn_obj =
2412$des_obj =
2413$bf_obj =
2414$md5_obj =
2415$sha1_obj =
2416$cast_obj =
2417$rc4_obj =
2418$rmd160_obj =
2419$rc5_obj =
2420$dso_scheme = dl
2421$shared_target= hpux-shared
2422$shared_cflag = -fPIC
2423$shared_ldflag =
2424$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2425$ranlib =
2426$arflags =
2427
2428*** hpux10-cc
2429$cc = cc
2430$cflags = -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z
2431$unistd =
2432$thread_cflag = -D_REENTRANT
2433$sys_id =
2434$lflags = -Wl,+s -ldld
2435$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
2436$bn_obj =
2437$des_obj =
2438$bf_obj =
2439$md5_obj =
2440$sha1_obj =
2441$cast_obj =
2442$rc4_obj =
2443$rmd160_obj =
2444$rc5_obj =
2445$dso_scheme = dl
2446$shared_target= hpux-shared
2447$shared_cflag = +Z
2448$shared_ldflag =
2449$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2450$ranlib =
2451$arflags =
2452
2453*** hpux10-gcc
2454$cc = gcc
2455$cflags = -DB_ENDIAN -DBN_DIV2W -O3
2456$unistd =
2457$thread_cflag = -D_REENTRANT
2458$sys_id =
2459$lflags = -Wl,+s -ldld
2460$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
2461$bn_obj =
2462$des_obj =
2463$bf_obj =
2464$md5_obj =
2465$sha1_obj =
2466$cast_obj =
2467$rc4_obj =
2468$rmd160_obj =
2469$rc5_obj =
2470$dso_scheme = dl
2471$shared_target= hpux-shared
2472$shared_cflag = -fPIC
2473$shared_ldflag =
2474$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2475$ranlib =
2476$arflags =
2477
2478*** hpux64-ia64-cc
2479$cc = cc
2480$cflags = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN
2481$unistd =
2482$thread_cflag = -D_REENTRANT
2483$sys_id =
2484$lflags = -ldl
2485$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
2486$bn_obj = asm/ia64-cpp.o
2487$des_obj =
2488$bf_obj =
2489$md5_obj =
2490$sha1_obj =
2491$cast_obj =
2492$rc4_obj =
2493$rmd160_obj =
2494$rc5_obj =
2495$dso_scheme = dlfcn
2496$shared_target= hpux64-shared
2497$shared_cflag = +Z
2498$shared_ldflag =
2499$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2500$ranlib =
2501$arflags =
2502
2503*** hpux64-parisc-cc
2504$cc = cc
2505$cflags = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY
2506$unistd =
2507$thread_cflag = -D_REENTRANT
2508$sys_id =
2509$lflags = -ldl
2510$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
2511$bn_obj =
2512$des_obj =
2513$bf_obj =
2514$md5_obj =
2515$sha1_obj =
2516$cast_obj =
2517$rc4_obj =
2518$rmd160_obj =
2519$rc5_obj =
2520$dso_scheme = dlfcn
2521$shared_target= hpux64-shared
2522$shared_cflag = +Z
2523$shared_ldflag =
2524$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2525$ranlib =
2526$arflags =
2527
2528*** hpux64-parisc-gcc
2529$cc = gcc
2530$cflags = -DB_ENDIAN -DMD32_XARRAY
2531$unistd =
2532$thread_cflag = -D_REENTRANT
2533$sys_id =
2534$lflags = -ldl
2535$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
2536$bn_obj =
2537$des_obj =
2538$bf_obj =
2539$md5_obj =
2540$sha1_obj =
2541$cast_obj =
2542$rc4_obj =
2543$rmd160_obj =
2544$rc5_obj =
2545$dso_scheme = dlfcn
2546$shared_target= hpux64-shared
2547$shared_cflag = -fpic
2548$shared_ldflag =
2549$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2550$ranlib =
2551$arflags =
2552
2553*** hpux64-parisc2-cc
2554$cc = cc
2555$cflags = +DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
2556$unistd =
2557$thread_cflag = -D_REENTRANT
2558$sys_id =
2559$lflags = -ldl
2560$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
2561$bn_obj = asm/pa-risc2W.o
2562$des_obj =
2563$bf_obj =
2564$md5_obj =
2565$sha1_obj =
2566$cast_obj =
2567$rc4_obj =
2568$rmd160_obj =
2569$rc5_obj =
2570$dso_scheme = dlfcn
2571$shared_target= hpux64-shared
2572$shared_cflag = +Z
2573$shared_ldflag =
2574$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2575$ranlib =
2576$arflags =
2577
2578*** hurd-x86
2579$cc = gcc
2580$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
2581$unistd =
2582$thread_cflag = -D_REENTRANT
2583$sys_id =
2584$lflags = -ldl
2585$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
2586$bn_obj = asm/bn86-elf.o asm/co86-elf.o
2587$des_obj = asm/dx86-elf.o asm/yx86-elf.o
2588$bf_obj = asm/bx86-elf.o
2589$md5_obj = asm/mx86-elf.o
2590$sha1_obj = asm/sx86-elf.o
2591$cast_obj = asm/cx86-elf.o
2592$rc4_obj = asm/rx86-elf.o
2593$rmd160_obj = asm/rm86-elf.o
2594$rc5_obj = asm/r586-elf.o
2595$dso_scheme = dlfcn
2596$shared_target= linux-shared
2597$shared_cflag = -fPIC
2598$shared_ldflag =
2599$shared_extension =
2600$ranlib =
2601$arflags =
2602
2603*** irix-cc
2604$cc = cc
2605$cflags = -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN
2606$unistd =
2607$thread_cflag = (unknown)
2608$sys_id =
2609$lflags =
2610$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR
2611$bn_obj =
2612$des_obj =
2613$bf_obj =
2614$md5_obj =
2615$sha1_obj =
2616$cast_obj =
2617$rc4_obj =
2618$rmd160_obj =
2619$rc5_obj =
2620$dso_scheme = dlfcn
2621$shared_target= irix-shared
2622$shared_cflag =
2623$shared_ldflag =
2624$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2625$ranlib =
2626$arflags =
2627
2628*** irix-gcc
2629$cc = gcc
2630$cflags = -O3 -DTERMIOS -DB_ENDIAN
2631$unistd =
2632$thread_cflag = (unknown)
2633$sys_id =
2634$lflags =
2635$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR
2636$bn_obj =
2637$des_obj =
2638$bf_obj =
2639$md5_obj =
2640$sha1_obj =
2641$cast_obj =
2642$rc4_obj =
2643$rmd160_obj =
2644$rc5_obj =
2645$dso_scheme = dlfcn
2646$shared_target= irix-shared
2647$shared_cflag =
2648$shared_ldflag =
2649$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2650$ranlib =
2651$arflags =
2652
2653*** irix-mips3-cc
2654$cc = cc
2655$cflags = -n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
2656$unistd =
2657$thread_cflag = -D_SGI_MP_SOURCE
2658$sys_id =
2659$lflags =
2660$bn_ops = DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT
2661$bn_obj = asm/mips3.o
2662$des_obj =
2663$bf_obj =
2664$md5_obj =
2665$sha1_obj =
2666$cast_obj =
2667$rc4_obj =
2668$rmd160_obj =
2669$rc5_obj =
2670$dso_scheme = dlfcn
2671$shared_target= irix-shared
2672$shared_cflag =
2673$shared_ldflag =
2674$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2675$ranlib =
2676$arflags =
2677
2678*** irix-mips3-gcc
2679$cc = gcc
2680$cflags = -mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W
2681$unistd =
2682$thread_cflag = -D_SGI_MP_SOURCE
2683$sys_id =
2684$lflags =
2685$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT
2686$bn_obj = asm/mips3.o
2687$des_obj =
2688$bf_obj =
2689$md5_obj =
2690$sha1_obj =
2691$cast_obj =
2692$rc4_obj =
2693$rmd160_obj =
2694$rc5_obj =
2695$dso_scheme = dlfcn
2696$shared_target= irix-shared
2697$shared_cflag =
2698$shared_ldflag =
2699$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2700$ranlib =
2701$arflags =
2702
2703*** irix64-mips4-cc
2704$cc = cc
2705$cflags = -64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
2706$unistd =
2707$thread_cflag = -D_SGI_MP_SOURCE
2708$sys_id =
2709$lflags =
2710$bn_ops = RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG
2711$bn_obj = asm/mips3.o
2712$des_obj =
2713$bf_obj =
2714$md5_obj =
2715$sha1_obj =
2716$cast_obj =
2717$rc4_obj =
2718$rmd160_obj =
2719$rc5_obj =
2720$dso_scheme = dlfcn
2721$shared_target= irix-shared
2722$shared_cflag =
2723$shared_ldflag =
2724$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2725$ranlib =
2726$arflags =
2727
2728*** irix64-mips4-gcc
2729$cc = gcc
2730$cflags = -mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W
2731$unistd =
2732$thread_cflag = -D_SGI_MP_SOURCE
2733$sys_id =
2734$lflags =
2735$bn_ops = RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG
2736$bn_obj = asm/mips3.o
2737$des_obj =
2738$bf_obj =
2739$md5_obj =
2740$sha1_obj =
2741$cast_obj =
2742$rc4_obj =
2743$rmd160_obj =
2744$rc5_obj =
2745$dso_scheme = dlfcn
2746$shared_target= irix-shared
2747$shared_cflag =
2748$shared_ldflag =
2749$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2750$ranlib =
2751$arflags =
2752
2753*** linux-alpha+bwx-ccc
2754$cc = ccc
2755$cflags = -fast -readonly_strings -DL_ENDIAN -DTERMIO
2756$unistd =
2757$thread_cflag = -D_REENTRANT
2758$sys_id =
2759$lflags =
2760$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL
2761$bn_obj =
2762$des_obj =
2763$bf_obj =
2764$md5_obj =
2765$sha1_obj =
2766$cast_obj =
2767$rc4_obj =
2768$rmd160_obj =
2769$rc5_obj =
2770$dso_scheme =
2771$shared_target=
2772$shared_cflag =
2773$shared_ldflag =
2774$shared_extension =
2775$ranlib =
2776$arflags =
2777
2778*** linux-alpha+bwx-gcc
2779$cc = gcc
2780$cflags = -O3 -DL_ENDIAN -DTERMIO
2781$unistd =
2782$thread_cflag = -D_REENTRANT
2783$sys_id =
2784$lflags = -ldl
2785$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
2786$bn_obj =
2787$des_obj =
2788$bf_obj =
2789$md5_obj =
2790$sha1_obj =
2791$cast_obj =
2792$rc4_obj =
2793$rmd160_obj =
2794$rc5_obj =
2795$dso_scheme = dlfcn
2796$shared_target= linux-shared
2797$shared_cflag = -fPIC
2798$shared_ldflag =
2799$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2800$ranlib =
2801$arflags =
2802
2803*** linux-alpha-ccc
2804$cc = ccc
2805$cflags = -fast -readonly_strings -DL_ENDIAN -DTERMIO
2806$unistd =
2807$thread_cflag = -D_REENTRANT
2808$sys_id =
2809$lflags =
2810$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL
2811$bn_obj =
2812$des_obj =
2813$bf_obj =
2814$md5_obj =
2815$sha1_obj =
2816$cast_obj =
2817$rc4_obj =
2818$rmd160_obj =
2819$rc5_obj =
2820$dso_scheme =
2821$shared_target=
2822$shared_cflag =
2823$shared_ldflag =
2824$shared_extension =
2825$ranlib =
2826$arflags =
2827
2828*** linux-alpha-gcc
2829$cc = gcc
2830$cflags = -O3 -DL_ENDIAN -DTERMIO
2831$unistd =
2832$thread_cflag = -D_REENTRANT
2833$sys_id =
2834$lflags = -ldl
2835$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL
2836$bn_obj =
2837$des_obj =
2838$bf_obj =
2839$md5_obj =
2840$sha1_obj =
2841$cast_obj =
2842$rc4_obj =
2843$rmd160_obj =
2844$rc5_obj =
2845$dso_scheme = dlfcn
2846$shared_target= linux-shared
2847$shared_cflag = -fPIC
2848$shared_ldflag =
2849$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2850$ranlib =
2851$arflags =
2852
2853*** linux-aout
2854$cc = gcc
2855$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall
2856$unistd =
2857$thread_cflag = (unknown)
2858$sys_id =
2859$lflags =
2860$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
2861$bn_obj = asm/bn86-out.o asm/co86-out.o
2862$des_obj = asm/dx86-out.o asm/yx86-out.o
2863$bf_obj = asm/bx86-out.o
2864$md5_obj = asm/mx86-out.o
2865$sha1_obj = asm/sx86-out.o
2866$cast_obj = asm/cx86-out.o
2867$rc4_obj = asm/rx86-out.o
2868$rmd160_obj = asm/rm86-out.o
2869$rc5_obj = asm/r586-out.o
2870$dso_scheme =
2871$shared_target=
2872$shared_cflag =
2873$shared_ldflag =
2874$shared_extension =
2875$ranlib =
2876$arflags =
2877
2878*** linux-elf
2879$cc = gcc
2880$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall
2881$unistd =
2882$thread_cflag = -D_REENTRANT
2883$sys_id =
2884$lflags = -ldl
2885$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
2886$bn_obj = asm/bn86-elf.o asm/co86-elf.o
2887$des_obj = asm/dx86-elf.o asm/yx86-elf.o
2888$bf_obj = asm/bx86-elf.o
2889$md5_obj = asm/mx86-elf.o
2890$sha1_obj = asm/sx86-elf.o
2891$cast_obj = asm/cx86-elf.o
2892$rc4_obj = asm/rx86-elf.o
2893$rmd160_obj = asm/rm86-elf.o
2894$rc5_obj = asm/r586-elf.o
2895$dso_scheme = dlfcn
2896$shared_target= linux-shared
2897$shared_cflag = -fPIC
2898$shared_ldflag =
2899$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2900$ranlib =
2901$arflags =
2902
2903*** linux-elf-arm
2904$cc = gcc
2905$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
2906$unistd =
2907$thread_cflag = -D_REENTRANT
2908$sys_id =
2909$lflags =
2910$bn_ops = BN_LLONG
2911$bn_obj =
2912$des_obj =
2913$bf_obj =
2914$md5_obj =
2915$sha1_obj =
2916$cast_obj =
2917$rc4_obj =
2918$rmd160_obj =
2919$rc5_obj =
2920$dso_scheme = dlfcn
2921$shared_target= linux-shared
2922$shared_cflag = -fPIC
2923$shared_ldflag =
2924$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2925$ranlib =
2926$arflags =
2927
2928*** linux-ia64
2929$cc = gcc
2930$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
2931$unistd =
2932$thread_cflag = -D_REENTRANT
2933$sys_id =
2934$lflags = -ldl
2935$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR
2936$bn_obj = asm/ia64.o
2937$des_obj =
2938$bf_obj =
2939$md5_obj =
2940$sha1_obj =
2941$cast_obj =
2942$rc4_obj =
2943$rmd160_obj =
2944$rc5_obj =
2945$dso_scheme = dlfcn
2946$shared_target= linux-shared
2947$shared_cflag = -fPIC
2948$shared_ldflag =
2949$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2950$ranlib =
2951$arflags =
2952
2953*** linux-k6
2954$cc = gcc
2955$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=k6 -Wall
2956$unistd =
2957$thread_cflag = -D_REENTRANT
2958$sys_id =
2959$lflags = -ldl
2960$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
2961$bn_obj = asm/bn86-elf.o asm/co86-elf.o
2962$des_obj = asm/dx86-elf.o asm/yx86-elf.o
2963$bf_obj = asm/bx86-elf.o
2964$md5_obj = asm/mx86-elf.o
2965$sha1_obj = asm/sx86-elf.o
2966$cast_obj = asm/cx86-elf.o
2967$rc4_obj = asm/rx86-elf.o
2968$rmd160_obj = asm/rm86-elf.o
2969$rc5_obj = asm/r586-elf.o
2970$dso_scheme = dlfcn
2971$shared_target= linux-shared
2972$shared_cflag = -fPIC
2973$shared_ldflag =
2974$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
2975$ranlib =
2976$arflags =
2977
2978*** linux-m68k
2979$cc = gcc
2980$cflags = -DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall
2981$unistd =
2982$thread_cflag = -D_REENTRANT
2983$sys_id =
2984$lflags =
2985$bn_ops = BN_LLONG
2986$bn_obj =
2987$des_obj =
2988$bf_obj =
2989$md5_obj =
2990$sha1_obj =
2991$cast_obj =
2992$rc4_obj =
2993$rmd160_obj =
2994$rc5_obj =
2995$dso_scheme =
2996$shared_target=
2997$shared_cflag =
2998$shared_ldflag =
2999$shared_extension =
3000$ranlib =
3001$arflags =
3002
3003*** linux-mips
3004$cc = gcc
3005$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
3006$unistd =
3007$thread_cflag = (unknown)
3008$sys_id =
3009$lflags =
3010$bn_ops = BN_LLONG
3011$bn_obj =
3012$des_obj =
3013$bf_obj =
3014$md5_obj =
3015$sha1_obj =
3016$cast_obj =
3017$rc4_obj =
3018$rmd160_obj =
3019$rc5_obj =
3020$dso_scheme =
3021$shared_target=
3022$shared_cflag =
3023$shared_ldflag =
3024$shared_extension =
3025$ranlib =
3026$arflags =
3027
3028*** linux-mipsel
3029$cc = gcc
3030$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
3031$unistd =
3032$thread_cflag = (unknown)
3033$sys_id =
3034$lflags =
3035$bn_ops = BN_LLONG
3036$bn_obj =
3037$des_obj =
3038$bf_obj =
3039$md5_obj =
3040$sha1_obj =
3041$cast_obj =
3042$rc4_obj =
3043$rmd160_obj =
3044$rc5_obj =
3045$dso_scheme =
3046$shared_target=
3047$shared_cflag =
3048$shared_ldflag =
3049$shared_extension =
3050$ranlib =
3051$arflags =
3052
3053*** linux-parisc
3054$cc = gcc
3055$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W
3056$unistd =
3057$thread_cflag = -D_REENTRANT
3058$sys_id =
3059$lflags =
3060$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3061$bn_obj =
3062$des_obj =
3063$bf_obj =
3064$md5_obj =
3065$sha1_obj =
3066$cast_obj =
3067$rc4_obj =
3068$rmd160_obj =
3069$rc5_obj =
3070$dso_scheme =
3071$shared_target=
3072$shared_cflag =
3073$shared_ldflag =
3074$shared_extension =
3075$ranlib =
3076$arflags =
3077
3078*** linux-pentium
3079$cc = gcc
3080$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentium -Wall
3081$unistd =
3082$thread_cflag = -D_REENTRANT
3083$sys_id =
3084$lflags = -ldl
3085$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3086$bn_obj = asm/bn86-elf.o asm/co86-elf.o
3087$des_obj = asm/dx86-elf.o asm/yx86-elf.o
3088$bf_obj = asm/bx86-elf.o
3089$md5_obj = asm/mx86-elf.o
3090$sha1_obj = asm/sx86-elf.o
3091$cast_obj = asm/cx86-elf.o
3092$rc4_obj = asm/rx86-elf.o
3093$rmd160_obj = asm/rm86-elf.o
3094$rc5_obj = asm/r586-elf.o
3095$dso_scheme = dlfcn
3096$shared_target= linux-shared
3097$shared_cflag = -fPIC
3098$shared_ldflag =
3099$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3100$ranlib =
3101$arflags =
3102
3103*** linux-ppc
3104$cc = gcc
3105$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
3106$unistd =
3107$thread_cflag = -D_REENTRANT
3108$sys_id =
3109$lflags = -ldl
3110$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
3111$bn_obj =
3112$des_obj =
3113$bf_obj =
3114$md5_obj =
3115$sha1_obj =
3116$cast_obj =
3117$rc4_obj =
3118$rmd160_obj =
3119$rc5_obj =
3120$dso_scheme = dlfcn
3121$shared_target= linux-shared
3122$shared_cflag = -fPIC
3123$shared_ldflag =
3124$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3125$ranlib =
3126$arflags =
3127
3128*** linux-ppro
3129$cc = gcc
3130$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentiumpro -Wall
3131$unistd =
3132$thread_cflag = -D_REENTRANT
3133$sys_id =
3134$lflags = -ldl
3135$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3136$bn_obj = asm/bn86-elf.o asm/co86-elf.o
3137$des_obj = asm/dx86-elf.o asm/yx86-elf.o
3138$bf_obj = asm/bx86-elf.o
3139$md5_obj = asm/mx86-elf.o
3140$sha1_obj = asm/sx86-elf.o
3141$cast_obj = asm/cx86-elf.o
3142$rc4_obj = asm/rx86-elf.o
3143$rmd160_obj = asm/rm86-elf.o
3144$rc5_obj = asm/r586-elf.o
3145$dso_scheme = dlfcn
3146$shared_target= linux-shared
3147$shared_cflag = -fPIC
3148$shared_ldflag =
3149$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3150$ranlib =
3151$arflags =
3152
3153*** linux-s390
3154$cc = gcc
3155$cflags = -DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall
3156$unistd =
3157$thread_cflag = -D_REENTRANT
3158$sys_id =
3159$lflags = -ldl
3160$bn_ops = BN_LLONG
3161$bn_obj =
3162$des_obj =
3163$bf_obj =
3164$md5_obj =
3165$sha1_obj =
3166$cast_obj =
3167$rc4_obj =
3168$rmd160_obj =
3169$rc5_obj =
3170$dso_scheme = dlfcn
3171$shared_target= linux-shared
3172$shared_cflag = -fPIC
3173$shared_ldflag =
3174$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3175$ranlib =
3176$arflags =
3177
3178*** linux-s390x
3179$cc = gcc
3180$cflags = -DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall
3181$unistd =
3182$thread_cflag = -D_REENTRANT
3183$sys_id =
3184$lflags = -ldl
3185$bn_ops = SIXTY_FOUR_BIT_LONG
3186$bn_obj =
3187$des_obj =
3188$bf_obj =
3189$md5_obj =
3190$sha1_obj =
3191$cast_obj =
3192$rc4_obj =
3193$rmd160_obj =
3194$rc5_obj =
3195$dso_scheme = dlfcn
3196$shared_target= linux-shared
3197$shared_cflag = -fPIC
3198$shared_ldflag =
3199$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3200$ranlib =
3201$arflags =
3202
3203*** linux-sparcv7
3204$cc = gcc
3205$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
3206$unistd =
3207$thread_cflag = -D_REENTRANT
3208$sys_id =
3209$lflags =
3210$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3211$bn_obj =
3212$des_obj =
3213$bf_obj =
3214$md5_obj =
3215$sha1_obj =
3216$cast_obj =
3217$rc4_obj =
3218$rmd160_obj =
3219$rc5_obj =
3220$dso_scheme =
3221$shared_target=
3222$shared_cflag =
3223$shared_ldflag =
3224$shared_extension =
3225$ranlib =
3226$arflags =
3227
3228*** linux-sparcv8
3229$cc = gcc
3230$cflags = -mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W
3231$unistd =
3232$thread_cflag = -D_REENTRANT
3233$sys_id =
3234$lflags = -ldl
3235$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3236$bn_obj = asm/sparcv8.o
3237$des_obj =
3238$bf_obj =
3239$md5_obj =
3240$sha1_obj =
3241$cast_obj =
3242$rc4_obj =
3243$rmd160_obj =
3244$rc5_obj =
3245$dso_scheme = dlfcn
3246$shared_target= linux-shared
3247$shared_cflag = -fPIC
3248$shared_ldflag =
3249$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3250$ranlib =
3251$arflags =
3252
3253*** linux-sparcv9
3254$cc = gcc
3255$cflags = -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W
3256$unistd =
3257$thread_cflag = -D_REENTRANT
3258$sys_id = ULTRASPARC
3259$lflags = -ldl
3260$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3261$bn_obj = asm/sparcv8plus.o
3262$des_obj =
3263$bf_obj =
3264$md5_obj = asm/md5-sparcv8plus.o
3265$sha1_obj =
3266$cast_obj =
3267$rc4_obj =
3268$rmd160_obj =
3269$rc5_obj =
3270$dso_scheme = dlfcn
3271$shared_target= linux-shared
3272$shared_cflag = -fPIC
3273$shared_ldflag =
3274$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3275$ranlib =
3276$arflags =
3277
3278*** ncr-scde
3279$cc = cc
3280$cflags = -O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw
3281$unistd =
3282$thread_cflag = (unknown)
3283$sys_id =
3284$lflags = -lsocket -lnsl
3285$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3286$bn_obj =
3287$des_obj =
3288$bf_obj =
3289$md5_obj =
3290$sha1_obj =
3291$cast_obj =
3292$rc4_obj =
3293$rmd160_obj =
3294$rc5_obj =
3295$dso_scheme =
3296$shared_target=
3297$shared_cflag =
3298$shared_ldflag =
3299$shared_extension =
3300$ranlib =
3301$arflags =
3302
3303*** newsos4-gcc
3304$cc = gcc
3305$cflags = -O -DB_ENDIAN
3306$unistd =
3307$thread_cflag = (unknown)
3308$sys_id = NEWS4
3309$lflags = -lmld -liberty
3310$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
3311$bn_obj =
3312$des_obj =
3313$bf_obj =
3314$md5_obj =
3315$sha1_obj =
3316$cast_obj =
3317$rc4_obj =
3318$rmd160_obj =
3319$rc5_obj =
3320$dso_scheme =
3321$shared_target=
3322$shared_cflag =
3323$shared_ldflag =
3324$shared_extension =
3325$ranlib =
3326$arflags =
3327
3328*** nextstep
3329$cc = cc
3330$cflags = -O -Wall
3331$unistd = <libc.h>
3332$thread_cflag = (unknown)
3333$sys_id =
3334$lflags =
3335$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3336$bn_obj =
3337$des_obj =
3338$bf_obj =
3339$md5_obj =
3340$sha1_obj =
3341$cast_obj =
3342$rc4_obj =
3343$rmd160_obj =
3344$rc5_obj =
3345$dso_scheme =
3346$shared_target=
3347$shared_cflag =
3348$shared_ldflag =
3349$shared_extension =
3350$ranlib =
3351$arflags =
3352
3353*** nextstep3.3
3354$cc = cc
3355$cflags = -O3 -Wall
3356$unistd = <libc.h>
3357$thread_cflag = (unknown)
3358$sys_id =
3359$lflags =
3360$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3361$bn_obj =
3362$des_obj =
3363$bf_obj =
3364$md5_obj =
3365$sha1_obj =
3366$cast_obj =
3367$rc4_obj =
3368$rmd160_obj =
3369$rc5_obj =
3370$dso_scheme =
3371$shared_target=
3372$shared_cflag =
3373$shared_ldflag =
3374$shared_extension =
3375$ranlib =
3376$arflags =
3377
3378*** purify
3379$cc = purify gcc
3380$cflags = -g -DPURIFY -Wall
3381$unistd =
3382$thread_cflag = (unknown)
3383$sys_id =
3384$lflags = -lsocket -lnsl
3385$bn_ops =
3386$bn_obj =
3387$des_obj =
3388$bf_obj =
3389$md5_obj =
3390$sha1_obj =
3391$cast_obj =
3392$rc4_obj =
3393$rmd160_obj =
3394$rc5_obj =
3395$dso_scheme =
3396$shared_target=
3397$shared_cflag =
3398$shared_ldflag =
3399$shared_extension =
3400$ranlib =
3401$arflags =
3402
3403*** qnx4
3404$cc = cc
3405$cflags = -DL_ENDIAN -DTERMIO
3406$unistd =
3407$thread_cflag = (unknown)
3408$sys_id =
3409$lflags =
3410$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3411$bn_obj =
3412$des_obj =
3413$bf_obj =
3414$md5_obj =
3415$sha1_obj =
3416$cast_obj =
3417$rc4_obj =
3418$rmd160_obj =
3419$rc5_obj =
3420$dso_scheme =
3421$shared_target=
3422$shared_cflag =
3423$shared_ldflag =
3424$shared_extension =
3425$ranlib =
3426$arflags =
3427
3428*** qnx6
3429$cc = cc
3430$cflags = -DL_ENDIAN -DTERMIOS
3431$unistd =
3432$thread_cflag = (unknown)
3433$sys_id =
3434$lflags = -lsocket
3435$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3436$bn_obj =
3437$des_obj =
3438$bf_obj =
3439$md5_obj =
3440$sha1_obj =
3441$cast_obj =
3442$rc4_obj =
3443$rmd160_obj =
3444$rc5_obj =
3445$dso_scheme =
3446$shared_target=
3447$shared_cflag =
3448$shared_ldflag =
3449$shared_extension =
3450$ranlib =
3451$arflags =
3452
3453*** rhapsody-ppc-cc
3454$cc = cc
3455$cflags = -O3 -DB_ENDIAN
3456$unistd =
3457$thread_cflag = (unknown)
3458$sys_id = MACOSX
3459$lflags =
3460$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3461$bn_obj =
3462$des_obj =
3463$bf_obj =
3464$md5_obj =
3465$sha1_obj =
3466$cast_obj =
3467$rc4_obj =
3468$rmd160_obj =
3469$rc5_obj =
3470$dso_scheme =
3471$shared_target=
3472$shared_cflag =
3473$shared_ldflag =
3474$shared_extension =
3475$ranlib =
3476$arflags =
3477
3478*** sco3-gcc
3479$cc = gcc
3480$cflags = -O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H
3481$unistd =
3482$thread_cflag = (unknown)
3483$sys_id =
3484$lflags = -lsocket
3485$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3486$bn_obj =
3487$des_obj =
3488$bf_obj =
3489$md5_obj =
3490$sha1_obj =
3491$cast_obj =
3492$rc4_obj =
3493$rmd160_obj =
3494$rc5_obj =
3495$dso_scheme =
3496$shared_target=
3497$shared_cflag =
3498$shared_ldflag =
3499$shared_extension =
3500$ranlib =
3501$arflags =
3502
3503*** sco5-cc
3504$cc = cc
3505$cflags = -belf
3506$unistd =
3507$thread_cflag = (unknown)
3508$sys_id =
3509$lflags = -lsocket -lresolv -lnsl
3510$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3511$bn_obj =
3512$des_obj =
3513$bf_obj =
3514$md5_obj =
3515$sha1_obj =
3516$cast_obj =
3517$rc4_obj =
3518$rmd160_obj =
3519$rc5_obj =
3520$dso_scheme = dlfcn
3521$shared_target= svr3-shared
3522$shared_cflag = -Kpic
3523$shared_ldflag =
3524$shared_extension =
3525$ranlib =
3526$arflags =
3527
3528*** sco5-cc-pentium
3529$cc = cc
3530$cflags = -Kpentium
3531$unistd =
3532$thread_cflag = (unknown)
3533$sys_id =
3534$lflags = -lsocket
3535$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3536$bn_obj =
3537$des_obj =
3538$bf_obj =
3539$md5_obj =
3540$sha1_obj =
3541$cast_obj =
3542$rc4_obj =
3543$rmd160_obj =
3544$rc5_obj =
3545$dso_scheme =
3546$shared_target=
3547$shared_cflag =
3548$shared_ldflag =
3549$shared_extension =
3550$ranlib =
3551$arflags =
3552
3553*** sco5-gcc
3554$cc = gcc
3555$cflags = -O3 -fomit-frame-pointer
3556$unistd =
3557$thread_cflag = (unknown)
3558$sys_id =
3559$lflags = -lsocket -lresolv -lnsl
3560$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3561$bn_obj = asm/bn86-elf.o asm/co86-elf.o
3562$des_obj = asm/dx86-elf.o asm/yx86-elf.o
3563$bf_obj = asm/bx86-elf.o
3564$md5_obj = asm/mx86-elf.o
3565$sha1_obj = asm/sx86-elf.o
3566$cast_obj = asm/cx86-elf.o
3567$rc4_obj = asm/rx86-elf.o
3568$rmd160_obj = asm/rm86-elf.o
3569$rc5_obj = asm/r586-elf.o
3570$dso_scheme = dlfcn
3571$shared_target= svr3-shared
3572$shared_cflag = -fPIC
3573$shared_ldflag =
3574$shared_extension =
3575$ranlib =
3576$arflags =
3577
3578*** solaris-sparc-sc3
3579$cc = cc
3580$cflags = -fast -O -Xa -DB_ENDIAN
3581$unistd =
3582$thread_cflag = -D_REENTRANT
3583$sys_id =
3584$lflags = -lsocket -lnsl -ldl
3585$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR
3586$bn_obj =
3587$des_obj =
3588$bf_obj =
3589$md5_obj =
3590$sha1_obj =
3591$cast_obj =
3592$rc4_obj =
3593$rmd160_obj =
3594$rc5_obj =
3595$dso_scheme = dlfcn
3596$shared_target= solaris-shared
3597$shared_cflag = -KPIC
3598$shared_ldflag =
3599$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3600$ranlib =
3601$arflags =
3602
3603*** solaris-sparcv7-cc
3604$cc = cc
3605$cflags = -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W
3606$unistd =
3607$thread_cflag = -D_REENTRANT
3608$sys_id =
3609$lflags = -lsocket -lnsl -ldl
3610$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
3611$bn_obj =
3612$des_obj =
3613$bf_obj =
3614$md5_obj =
3615$sha1_obj =
3616$cast_obj =
3617$rc4_obj =
3618$rmd160_obj =
3619$rc5_obj =
3620$dso_scheme = dlfcn
3621$shared_target= solaris-shared
3622$shared_cflag = -KPIC
3623$shared_ldflag =
3624$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3625$ranlib =
3626$arflags =
3627
3628*** solaris-sparcv7-gcc
3629$cc = gcc
3630$cflags = -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W
3631$unistd =
3632$thread_cflag = -D_REENTRANT
3633$sys_id =
3634$lflags = -lsocket -lnsl -ldl
3635$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3636$bn_obj =
3637$des_obj =
3638$bf_obj =
3639$md5_obj =
3640$sha1_obj =
3641$cast_obj =
3642$rc4_obj =
3643$rmd160_obj =
3644$rc5_obj =
3645$dso_scheme = dlfcn
3646$shared_target= solaris-shared
3647$shared_cflag = -fPIC
3648$shared_ldflag =
3649$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3650$ranlib =
3651$arflags =
3652
3653*** solaris-sparcv8-cc
3654$cc = cc
3655$cflags = -xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W
3656$unistd =
3657$thread_cflag = -D_REENTRANT
3658$sys_id =
3659$lflags = -lsocket -lnsl -ldl
3660$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
3661$bn_obj = asm/sparcv8.o
3662$des_obj =
3663$bf_obj =
3664$md5_obj =
3665$sha1_obj =
3666$cast_obj =
3667$rc4_obj =
3668$rmd160_obj =
3669$rc5_obj =
3670$dso_scheme = dlfcn
3671$shared_target= solaris-shared
3672$shared_cflag = -KPIC
3673$shared_ldflag =
3674$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3675$ranlib =
3676$arflags =
3677
3678*** solaris-sparcv8-gcc
3679$cc = gcc
3680$cflags = -mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W
3681$unistd =
3682$thread_cflag = -D_REENTRANT
3683$sys_id =
3684$lflags = -lsocket -lnsl -ldl
3685$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3686$bn_obj = asm/sparcv8.o
3687$des_obj =
3688$bf_obj =
3689$md5_obj =
3690$sha1_obj =
3691$cast_obj =
3692$rc4_obj =
3693$rmd160_obj =
3694$rc5_obj =
3695$dso_scheme = dlfcn
3696$shared_target= solaris-shared
3697$shared_cflag = -fPIC
3698$shared_ldflag =
3699$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3700$ranlib =
3701$arflags =
3702
3703*** solaris-sparcv9-cc
3704$cc = cc
3705$cflags = -xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W
3706$unistd =
3707$thread_cflag = -D_REENTRANT
3708$sys_id = ULTRASPARC
3709$lflags = -lsocket -lnsl -ldl
3710$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR
3711$bn_obj = asm/sparcv8plus.o
3712$des_obj =
3713$bf_obj =
3714$md5_obj = asm/md5-sparcv8plus.o
3715$sha1_obj =
3716$cast_obj =
3717$rc4_obj =
3718$rmd160_obj =
3719$rc5_obj =
3720$dso_scheme = dlfcn
3721$shared_target= solaris-shared
3722$shared_cflag = -KPIC
3723$shared_ldflag =
3724$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3725$ranlib =
3726$arflags =
3727
3728*** solaris-sparcv9-gcc
3729$cc = gcc
3730$cflags = -m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W
3731$unistd =
3732$thread_cflag = -D_REENTRANT
3733$sys_id = ULTRASPARC
3734$lflags = -lsocket -lnsl -ldl
3735$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3736$bn_obj = asm/sparcv8plus.o
3737$des_obj =
3738$bf_obj =
3739$md5_obj = asm/md5-sparcv8plus.o
3740$sha1_obj =
3741$cast_obj =
3742$rc4_obj =
3743$rmd160_obj =
3744$rc5_obj =
3745$dso_scheme = dlfcn
3746$shared_target= solaris-shared
3747$shared_cflag = -fPIC
3748$shared_ldflag =
3749$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3750$ranlib =
3751$arflags =
3752
3753*** solaris-sparcv9-gcc27
3754$cc = gcc
3755$cflags = -mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W
3756$unistd =
3757$thread_cflag = -D_REENTRANT
3758$sys_id = ULTRASPARC
3759$lflags = -lsocket -lnsl -ldl
3760$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
3761$bn_obj = asm/sparcv8plus-gcc27.o
3762$des_obj =
3763$bf_obj =
3764$md5_obj = asm/md5-sparcv8plus-gcc27.o
3765$sha1_obj =
3766$cast_obj =
3767$rc4_obj =
3768$rmd160_obj =
3769$rc5_obj =
3770$dso_scheme = dlfcn
3771$shared_target= solaris-shared
3772$shared_cflag = -fPIC
3773$shared_ldflag =
3774$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3775$ranlib =
3776$arflags =
3777
3778*** solaris-x86-cc
3779$cc = cc
3780$cflags = -fast -O -Xa
3781$unistd =
3782$thread_cflag = -D_REENTRANT
3783$sys_id =
3784$lflags = -lsocket -lnsl -ldl
3785$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR
3786$bn_obj =
3787$des_obj =
3788$bf_obj =
3789$md5_obj =
3790$sha1_obj =
3791$cast_obj =
3792$rc4_obj =
3793$rmd160_obj =
3794$rc5_obj =
3795$dso_scheme = dlfcn
3796$shared_target= solaris-shared
3797$shared_cflag = -KPIC
3798$shared_ldflag =
3799$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3800$ranlib =
3801$arflags =
3802
3803*** solaris-x86-gcc
3804$cc = gcc
3805$cflags = -O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM
3806$unistd =
3807$thread_cflag = -D_REENTRANT
3808$sys_id =
3809$lflags = -lsocket -lnsl -ldl
3810$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3811$bn_obj = asm/bn86-sol.o asm/co86-sol.o
3812$des_obj = asm/dx86-sol.o asm/yx86-sol.o
3813$bf_obj = asm/bx86-sol.o
3814$md5_obj = asm/mx86-sol.o
3815$sha1_obj = asm/sx86-sol.o
3816$cast_obj = asm/cx86-sol.o
3817$rc4_obj = asm/rx86-sol.o
3818$rmd160_obj = asm/rm86-sol.o
3819$rc5_obj = asm/r586-sol.o
3820$dso_scheme = dlfcn
3821$shared_target= solaris-shared
3822$shared_cflag = -fPIC
3823$shared_ldflag =
3824$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3825$ranlib =
3826$arflags =
3827
3828*** solaris64-sparcv9-cc
3829$cc = cc
3830$cflags = -xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN
3831$unistd =
3832$thread_cflag = -D_REENTRANT
3833$sys_id = ULTRASPARC
3834$lflags = -lsocket -lnsl -ldl
3835$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR
3836$bn_obj =
3837$des_obj =
3838$bf_obj =
3839$md5_obj = asm/md5-sparcv9.o
3840$sha1_obj =
3841$cast_obj =
3842$rc4_obj =
3843$rmd160_obj =
3844$rc5_obj =
3845$dso_scheme = dlfcn
3846$shared_target= solaris-shared
3847$shared_cflag = -KPIC
3848$shared_ldflag = -xarch=v9
3849$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3850$ranlib = /usr/ccs/bin/ar rs
3851$arflags =
3852
3853*** solaris64-sparcv9-gcc
3854$cc = gcc
3855$cflags = -m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN
3856$unistd =
3857$thread_cflag = -D_REENTRANT
3858$sys_id = ULTRASPARC
3859$lflags = -lsocket -lnsl -ldl
3860$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR
3861$bn_obj =
3862$des_obj =
3863$bf_obj =
3864$md5_obj = asm/md5-sparcv9.o
3865$sha1_obj =
3866$cast_obj =
3867$rc4_obj =
3868$rmd160_obj =
3869$rc5_obj =
3870$dso_scheme = dlfcn
3871$shared_target= solaris-shared
3872$shared_cflag = -fPIC
3873$shared_ldflag = -m64
3874$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3875$ranlib =
3876$arflags =
3877
3878*** solaris64-sparcv9-gcc31
3879$cc = gcc
3880$cflags = -mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN
3881$unistd =
3882$thread_cflag = -D_REENTRANT
3883$sys_id = ULTRASPARC
3884$lflags = -lsocket -lnsl -ldl
3885$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR
3886$bn_obj =
3887$des_obj =
3888$bf_obj =
3889$md5_obj = asm/md5-sparcv9.o
3890$sha1_obj =
3891$cast_obj =
3892$rc4_obj =
3893$rmd160_obj =
3894$rc5_obj =
3895$dso_scheme = dlfcn
3896$shared_target= solaris-shared
3897$shared_cflag = -fPIC
3898$shared_ldflag = -m64
3899$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
3900$ranlib =
3901$arflags =
3902
3903*** sunos-gcc
3904$cc = gcc
3905$cflags = -O3 -mv8 -Dssize_t=int
3906$unistd =
3907$thread_cflag = (unknown)
3908$sys_id =
3909$lflags =
3910$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1
3911$bn_obj =
3912$des_obj =
3913$bf_obj =
3914$md5_obj =
3915$sha1_obj =
3916$cast_obj =
3917$rc4_obj =
3918$rmd160_obj =
3919$rc5_obj =
3920$dso_scheme =
3921$shared_target=
3922$shared_cflag =
3923$shared_ldflag =
3924$shared_extension =
3925$ranlib =
3926$arflags =
3927
3928*** ultrix-cc
3929$cc = cc
3930$cflags = -std1 -O -Olimit 1000 -DL_ENDIAN
3931$unistd =
3932$thread_cflag = (unknown)
3933$sys_id =
3934$lflags =
3935$bn_ops =
3936$bn_obj =
3937$des_obj =
3938$bf_obj =
3939$md5_obj =
3940$sha1_obj =
3941$cast_obj =
3942$rc4_obj =
3943$rmd160_obj =
3944$rc5_obj =
3945$dso_scheme =
3946$shared_target=
3947$shared_cflag =
3948$shared_ldflag =
3949$shared_extension =
3950$ranlib =
3951$arflags =
3952
3953*** ultrix-gcc
3954$cc = gcc
3955$cflags = -O3 -DL_ENDIAN
3956$unistd =
3957$thread_cflag = (unknown)
3958$sys_id =
3959$lflags =
3960$bn_ops =
3961$bn_obj =
3962$des_obj =
3963$bf_obj =
3964$md5_obj =
3965$sha1_obj =
3966$cast_obj =
3967$rc4_obj =
3968$rmd160_obj =
3969$rc5_obj =
3970$dso_scheme =
3971$shared_target=
3972$shared_cflag =
3973$shared_ldflag =
3974$shared_extension =
3975$ranlib =
3976$arflags =
3977
3978*** unixware-2.0
3979$cc = cc
3980$cflags = -DFILIO_H -DNO_STRINGS_H
3981$unistd =
3982$thread_cflag = -Kthread
3983$sys_id =
3984$lflags = -lsocket -lnsl -lresolv -lx
3985$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
3986$bn_obj =
3987$des_obj =
3988$bf_obj =
3989$md5_obj =
3990$sha1_obj =
3991$cast_obj =
3992$rc4_obj =
3993$rmd160_obj =
3994$rc5_obj =
3995$dso_scheme =
3996$shared_target=
3997$shared_cflag =
3998$shared_ldflag =
3999$shared_extension =
4000$ranlib =
4001$arflags =
4002
4003*** unixware-2.0-pentium
4004$cc = cc
4005$cflags = -DFILIO_H -DNO_STRINGS_H -Kpentium
4006$unistd =
4007$thread_cflag = -Kthread
4008$sys_id =
4009$lflags = -lsocket -lnsl -lresolv -lx
4010$bn_ops = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
4011$bn_obj =
4012$des_obj =
4013$bf_obj =
4014$md5_obj =
4015$sha1_obj =
4016$cast_obj =
4017$rc4_obj =
4018$rmd160_obj =
4019$rc5_obj =
4020$dso_scheme =
4021$shared_target=
4022$shared_cflag =
4023$shared_ldflag =
4024$shared_extension =
4025$ranlib =
4026$arflags =
4027
4028*** unixware-2.1
4029$cc = cc
4030$cflags = -O -DFILIO_H
4031$unistd =
4032$thread_cflag = -Kthread
4033$sys_id =
4034$lflags = -lsocket -lnsl -lresolv -lx
4035$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
4036$bn_obj =
4037$des_obj =
4038$bf_obj =
4039$md5_obj =
4040$sha1_obj =
4041$cast_obj =
4042$rc4_obj =
4043$rmd160_obj =
4044$rc5_obj =
4045$dso_scheme =
4046$shared_target=
4047$shared_cflag =
4048$shared_ldflag =
4049$shared_extension =
4050$ranlib =
4051$arflags =
4052
4053*** unixware-2.1-p6
4054$cc = cc
4055$cflags = -O -DFILIO_H -Kp6
4056$unistd =
4057$thread_cflag = -Kthread
4058$sys_id =
4059$lflags = -lsocket -lnsl -lresolv -lx
4060$bn_ops = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
4061$bn_obj =
4062$des_obj =
4063$bf_obj =
4064$md5_obj =
4065$sha1_obj =
4066$cast_obj =
4067$rc4_obj =
4068$rmd160_obj =
4069$rc5_obj =
4070$dso_scheme =
4071$shared_target=
4072$shared_cflag =
4073$shared_ldflag =
4074$shared_extension =
4075$ranlib =
4076$arflags =
4077
4078*** unixware-2.1-pentium
4079$cc = cc
4080$cflags = -O -DFILIO_H -Kpentium
4081$unistd =
4082$thread_cflag = -Kthread
4083$sys_id =
4084$lflags = -lsocket -lnsl -lresolv -lx
4085$bn_ops = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
4086$bn_obj =
4087$des_obj =
4088$bf_obj =
4089$md5_obj =
4090$sha1_obj =
4091$cast_obj =
4092$rc4_obj =
4093$rmd160_obj =
4094$rc5_obj =
4095$dso_scheme =
4096$shared_target=
4097$shared_cflag =
4098$shared_ldflag =
4099$shared_extension =
4100$ranlib =
4101$arflags =
4102
4103*** unixware-7
4104$cc = cc
4105$cflags = -O -DFILIO_H -Kalloca
4106$unistd =
4107$thread_cflag = -Kthread
4108$sys_id =
4109$lflags = -lsocket -lnsl
4110$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
4111$bn_obj =
4112$des_obj =
4113$bf_obj =
4114$md5_obj =
4115$sha1_obj =
4116$cast_obj =
4117$rc4_obj =
4118$rmd160_obj =
4119$rc5_obj =
4120$dso_scheme = dlfcn
4121$shared_target= svr5-shared
4122$shared_cflag = -Kpic
4123$shared_ldflag =
4124$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
4125$ranlib =
4126$arflags =
4127
4128*** unixware-7-gcc
4129$cc = gcc
4130$cflags = -DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall
4131$unistd =
4132$thread_cflag = -D_REENTRANT
4133$sys_id =
4134$lflags = -lsocket -lnsl
4135$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
4136$bn_obj =
4137$des_obj =
4138$bf_obj =
4139$md5_obj =
4140$sha1_obj =
4141$cast_obj =
4142$rc4_obj =
4143$rmd160_obj =
4144$rc5_obj =
4145$dso_scheme = dlfcn
4146$shared_target= gnu-shared
4147$shared_cflag = -fPIC
4148$shared_ldflag =
4149$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
4150$ranlib =
4151$arflags =
4152
4153*** unixware-7-pentium
4154$cc = cc
4155$cflags = -O -DFILIO_H -Kalloca -Kpentium
4156$unistd =
4157$thread_cflag = -Kthread
4158$sys_id =
4159$lflags = -lsocket -lnsl
4160$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
4161$bn_obj =
4162$des_obj =
4163$bf_obj =
4164$md5_obj =
4165$sha1_obj =
4166$cast_obj =
4167$rc4_obj =
4168$rmd160_obj =
4169$rc5_obj =
4170$dso_scheme = dlfcn
4171$shared_target= svr5-shared
4172$shared_cflag = -Kpic
4173$shared_ldflag =
4174$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
4175$ranlib =
4176$arflags =
4177
4178*** unixware-7-pentium_pro
4179$cc = cc
4180$cflags = -O -DFILIO_H -Kalloca -Kpentium_pro
4181$unistd =
4182$thread_cflag = -Kthread
4183$sys_id =
4184$lflags = -lsocket -lnsl
4185$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
4186$bn_obj =
4187$des_obj =
4188$bf_obj =
4189$md5_obj =
4190$sha1_obj =
4191$cast_obj =
4192$rc4_obj =
4193$rmd160_obj =
4194$rc5_obj =
4195$dso_scheme = dlfcn
4196$shared_target= svr5-shared
4197$shared_cflag = -Kpic
4198$shared_ldflag =
4199$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
4200$ranlib =
4201$arflags =
4202
4203*** vxworks-ppc405
4204$cc = ccppc
4205$cflags = -g -msoft-float -mlongcall -DCPU=PPC405 -I$(WIND_BASE)/target/h
4206$unistd =
4207$thread_cflag =
4208$sys_id = VXWORKS
4209$lflags = -r
4210$bn_ops =
4211$bn_obj =
4212$des_obj =
4213$bf_obj =
4214$md5_obj =
4215$sha1_obj =
4216$cast_obj =
4217$rc4_obj =
4218$rmd160_obj =
4219$rc5_obj =
4220$dso_scheme =
4221$shared_target=
4222$shared_cflag =
4223$shared_ldflag =
4224$shared_extension =
4225$ranlib =
4226$arflags =
diff --git a/src/lib/libssl/src/apps/CA.pl b/src/lib/libssl/src/apps/CA.pl
deleted file mode 100644
index 669a016b84..0000000000
--- a/src/lib/libssl/src/apps/CA.pl
+++ /dev/null
@@ -1,173 +0,0 @@
1#!/usr/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 007e3e06c3..c4dfafd778 100644
--- a/src/lib/libssl/src/apps/apps.c
+++ b/src/lib/libssl/src/apps/apps.c
@@ -1411,14 +1411,16 @@ int load_config(BIO *err, CONF *cnf)
1411char *make_config_name() 1411char *make_config_name()
1412 { 1412 {
1413 const char *t=X509_get_default_cert_area(); 1413 const char *t=X509_get_default_cert_area();
1414 size_t len;
1414 char *p; 1415 char *p;
1415 1416
1416 p=OPENSSL_malloc(strlen(t)+strlen(OPENSSL_CONF)+2); 1417 len=strlen(t)+strlen(OPENSSL_CONF)+2;
1417 strcpy(p,t); 1418 p=OPENSSL_malloc(len);
1419 strlcpy(p,t,len);
1418#ifndef OPENSSL_SYS_VMS 1420#ifndef OPENSSL_SYS_VMS
1419 strcat(p,"/"); 1421 strlcat(p,"/",len);
1420#endif 1422#endif
1421 strcat(p,OPENSSL_CONF); 1423 strlcat(p,OPENSSL_CONF,len);
1422 1424
1423 return p; 1425 return p;
1424 } 1426 }
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c
index 7ed60c7a9a..f979dfe85f 100644
--- a/src/lib/libssl/src/apps/ca.c
+++ b/src/lib/libssl/src/apps/ca.c
@@ -579,16 +579,19 @@ bad:
579 if (configfile == NULL) 579 if (configfile == NULL)
580 { 580 {
581 const char *s=X509_get_default_cert_area(); 581 const char *s=X509_get_default_cert_area();
582 size_t len;
582 583
583#ifdef OPENSSL_SYS_VMS 584#ifdef OPENSSL_SYS_VMS
584 tofree=OPENSSL_malloc(strlen(s)+sizeof(CONFIG_FILE)); 585 len = strlen(s)+sizeof(CONFIG_FILE);
586 tofree=OPENSSL_malloc(len);
585 strcpy(tofree,s); 587 strcpy(tofree,s);
586#else 588#else
587 tofree=OPENSSL_malloc(strlen(s)+sizeof(CONFIG_FILE)+1); 589 len = strlen(s)+sizeof(CONFIG_FILE)+1;
588 strcpy(tofree,s); 590 tofree=OPENSSL_malloc(len);
589 strcat(tofree,"/"); 591 strlcpy(tofree,s,len);
592 strlcat(tofree,"/",len);
590#endif 593#endif
591 strcat(tofree,CONFIG_FILE); 594 strlcat(tofree,CONFIG_FILE,len);
592 configfile=tofree; 595 configfile=tofree;
593 } 596 }
594 597
@@ -1312,7 +1315,7 @@ bad:
1312#ifdef OPENSSL_SYS_VMS 1315#ifdef OPENSSL_SYS_VMS
1313 strcat(buf[0],"-new"); 1316 strcat(buf[0],"-new");
1314#else 1317#else
1315 strcat(buf[0],".new"); 1318 strlcat(buf[0],".new",sizeof(buf[0]));
1316#endif 1319#endif
1317 1320
1318 if (!save_serial(buf[0],serial)) goto err; 1321 if (!save_serial(buf[0],serial)) goto err;
@@ -1322,7 +1325,7 @@ bad:
1322#ifdef OPENSSL_SYS_VMS 1325#ifdef OPENSSL_SYS_VMS
1323 strcat(buf[1],"-new"); 1326 strcat(buf[1],"-new");
1324#else 1327#else
1325 strcat(buf[1],".new"); 1328 strlcat(buf[1],".new",sizeof(buf[1]));
1326#endif 1329#endif
1327 1330
1328 if (BIO_write_filename(out,buf[1]) <= 0) 1331 if (BIO_write_filename(out,buf[1]) <= 0)
@@ -1340,7 +1343,7 @@ bad:
1340 for (i=0; i<sk_X509_num(cert_sk); i++) 1343 for (i=0; i<sk_X509_num(cert_sk); i++)
1341 { 1344 {
1342 int k; 1345 int k;
1343 unsigned char *n; 1346 char *n;
1344 1347
1345 x=sk_X509_value(cert_sk,i); 1348 x=sk_X509_value(cert_sk,i);
1346 1349
@@ -1356,15 +1359,19 @@ bad:
1356 strcpy(buf[2],outdir); 1359 strcpy(buf[2],outdir);
1357 1360
1358#ifndef OPENSSL_SYS_VMS 1361#ifndef OPENSSL_SYS_VMS
1359 strcat(buf[2],"/"); 1362 strlcat(buf[2],"/",sizeof(buf[2]));
1360#endif 1363#endif
1361 1364
1362 n=(unsigned char *)&(buf[2][strlen(buf[2])]); 1365 n=(char *)&(buf[2][strlen(buf[2])]);
1363 if (j > 0) 1366 if (j > 0)
1364 { 1367 {
1365 for (k=0; k<j; k++) 1368 for (k=0; k<j; k++)
1366 { 1369 {
1367 sprintf((char *)n,"%02X",(unsigned char)*(p++)); 1370 if (n >= &(buf[2][sizeof(buf[2])]))
1371 break;
1372 snprintf(n,
1373 &buf[2][0] + sizeof(buf[2]) - n,
1374 "%02X",(unsigned char)*(p++));
1368 n+=2; 1375 n+=2;
1369 } 1376 }
1370 } 1377 }
@@ -1396,7 +1403,7 @@ bad:
1396#ifdef OPENSSL_SYS_VMS 1403#ifdef OPENSSL_SYS_VMS
1397 strcat(buf[2],"-old"); 1404 strcat(buf[2],"-old");
1398#else 1405#else
1399 strcat(buf[2],".old"); 1406 strlcat(buf[2],".old",sizeof(buf[2]));
1400#endif 1407#endif
1401 1408
1402 BIO_free(in); 1409 BIO_free(in);
@@ -1425,7 +1432,7 @@ bad:
1425#ifdef OPENSSL_SYS_VMS 1432#ifdef OPENSSL_SYS_VMS
1426 strcat(buf[2],"-old"); 1433 strcat(buf[2],"-old");
1427#else 1434#else
1428 strcat(buf[2],".old"); 1435 strlcat(buf[2],".old",sizeof(buf[2]));
1429#endif 1436#endif
1430 1437
1431 if (rename(dbfile,buf[2]) < 0) 1438 if (rename(dbfile,buf[2]) < 0)
@@ -1595,7 +1602,7 @@ bad:
1595 1602
1596 strcpy(buf[0],dbfile); 1603 strcpy(buf[0],dbfile);
1597#ifndef OPENSSL_SYS_VMS 1604#ifndef OPENSSL_SYS_VMS
1598 strcat(buf[0],".new"); 1605 strlcat(buf[0],".new",sizeof(buf[0]));
1599#else 1606#else
1600 strcat(buf[0],"-new"); 1607 strcat(buf[0],"-new");
1601#endif 1608#endif
@@ -1614,7 +1621,7 @@ bad:
1614 strncpy(buf[1],dbfile,BSIZE-4); 1621 strncpy(buf[1],dbfile,BSIZE-4);
1615 buf[1][BSIZE-4]='\0'; 1622 buf[1][BSIZE-4]='\0';
1616#ifndef OPENSSL_SYS_VMS 1623#ifndef OPENSSL_SYS_VMS
1617 strcat(buf[1],".old"); 1624 strlcat(buf[1],".old",sizeof(buf[1]));
1618#else 1625#else
1619 strcat(buf[1],"-old"); 1626 strcat(buf[1],"-old");
1620#endif 1627#endif
@@ -2166,7 +2173,7 @@ again2:
2166 p="Valid"; 2173 p="Valid";
2167 else 2174 else
2168 p="\ninvalid type, Data base error\n"; 2175 p="\ninvalid type, Data base error\n";
2169 BIO_printf(bio_err,"Type :%s\n",p);; 2176 BIO_printf(bio_err,"Type :%s\n",p);
2170 if (rrow[DB_type][0] == 'R') 2177 if (rrow[DB_type][0] == 'R')
2171 { 2178 {
2172 p=rrow[DB_exp_date]; if (p == NULL) p="undef"; 2179 p=rrow[DB_exp_date]; if (p == NULL) p="undef";
@@ -2352,7 +2359,7 @@ again2:
2352 BIO_printf(bio_err,"Memory allocation failure\n"); 2359 BIO_printf(bio_err,"Memory allocation failure\n");
2353 goto err; 2360 goto err;
2354 } 2361 }
2355 strcpy(row[DB_file],"unknown"); 2362 strlcpy(row[DB_file],"unknown",8);
2356 row[DB_type][0]='V'; 2363 row[DB_type][0]='V';
2357 row[DB_type][1]='\0'; 2364 row[DB_type][1]='\0';
2358 2365
@@ -2653,7 +2660,7 @@ static int do_revoke(X509 *x509, TXT_DB *db, int type, char *value)
2653 BIO_printf(bio_err,"Memory allocation failure\n"); 2660 BIO_printf(bio_err,"Memory allocation failure\n");
2654 goto err; 2661 goto err;
2655 } 2662 }
2656 strcpy(row[DB_file],"unknown"); 2663 strlcpy(row[DB_file],"unknown",8);
2657 row[DB_type][0]='V'; 2664 row[DB_type][0]='V';
2658 row[DB_type][1]='\0'; 2665 row[DB_type][1]='\0';
2659 2666
@@ -2977,16 +2984,16 @@ char *make_revocation_str(int rev_type, char *rev_arg)
2977 2984
2978 if (!str) return NULL; 2985 if (!str) return NULL;
2979 2986
2980 strcpy(str, (char *)revtm->data); 2987 strlcpy(str, (char *)revtm->data, i);
2981 if (reason) 2988 if (reason)
2982 { 2989 {
2983 strcat(str, ","); 2990 strlcat(str, ",", i);
2984 strcat(str, reason); 2991 strlcat(str, reason, i);
2985 } 2992 }
2986 if (other) 2993 if (other)
2987 { 2994 {
2988 strcat(str, ","); 2995 strlcat(str, ",", i);
2989 strcat(str, other); 2996 strlcat(str, other, i);
2990 } 2997 }
2991 ASN1_UTCTIME_free(revtm); 2998 ASN1_UTCTIME_free(revtm);
2992 return str; 2999 return str;
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 47d1309b14..71298b7524 100644
--- a/src/lib/libssl/src/apps/dgst.c
+++ b/src/lib/libssl/src/apps/dgst.c
@@ -347,8 +347,9 @@ int MAIN(int argc, char **argv)
347 } 347 }
348 if(!out_bin) 348 if(!out_bin)
349 { 349 {
350 tmp=tofree=OPENSSL_malloc(strlen(name)+strlen(argv[i])+5); 350 size_t len = strlen(name)+strlen(argv[i])+5;
351 sprintf(tmp,"%s(%s)= ",name,argv[i]); 351 tmp=tofree=OPENSSL_malloc(len);
352 snprintf(tmp,len,"%s(%s)= ",name,argv[i]);
352 } 353 }
353 else 354 else
354 tmp=""; 355 tmp="";
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c
index 0a9f7310bf..9299ab3e13 100644
--- a/src/lib/libssl/src/apps/enc.c
+++ b/src/lib/libssl/src/apps/enc.c
@@ -373,7 +373,7 @@ bad:
373 { 373 {
374 char buf[200]; 374 char buf[200];
375 375
376 sprintf(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';
diff --git a/src/lib/libssl/src/apps/engine.c b/src/lib/libssl/src/apps/engine.c
index c3e1e8de1c..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 strcat(*buf, ", "); 125 strlcat(*buf, ", ", *size);
126 strcat(*buf, s); 126 strlcat(*buf, s, *size);
127 127
128 return 1; 128 return 1;
129 } 129 }
diff --git a/src/lib/libssl/src/apps/md4.c b/src/lib/libssl/src/apps/md4.c
new file mode 100644
index 0000000000..e4b0aac011
--- /dev/null
+++ b/src/lib/libssl/src/apps/md4.c
@@ -0,0 +1,127 @@
1/* crypto/md4/md4.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#include <stdio.h>
60#include <stdlib.h>
61#include <openssl/md4.h>
62
63#define BUFSIZE 1024*16
64
65void do_fp(FILE *f);
66void pt(unsigned char *md);
67#ifndef _OSD_POSIX
68int read(int, void *, unsigned int);
69#endif
70
71int main(int argc, char **argv)
72 {
73 int i,err=0;
74 FILE *IN;
75
76 if (argc == 1)
77 {
78 do_fp(stdin);
79 }
80 else
81 {
82 for (i=1; i<argc; i++)
83 {
84 IN=fopen(argv[i],"r");
85 if (IN == NULL)
86 {
87 perror(argv[i]);
88 err++;
89 continue;
90 }
91 printf("MD4(%s)= ",argv[i]);
92 do_fp(IN);
93 fclose(IN);
94 }
95 }
96 exit(err);
97 }
98
99void do_fp(FILE *f)
100 {
101 MD4_CTX c;
102 unsigned char md[MD4_DIGEST_LENGTH];
103 int fd;
104 int i;
105 static unsigned char buf[BUFSIZE];
106
107 fd=fileno(f);
108 MD4_Init(&c);
109 for (;;)
110 {
111 i=read(fd,buf,BUFSIZE);
112 if (i <= 0) break;
113 MD4_Update(&c,buf,(unsigned long)i);
114 }
115 MD4_Final(&(md[0]),&c);
116 pt(md);
117 }
118
119void pt(unsigned char *md)
120 {
121 int i;
122
123 for (i=0; i<MD4_DIGEST_LENGTH; i++)
124 printf("%02x",md[i]);
125 printf("\n");
126 }
127
diff --git a/src/lib/libssl/src/apps/ocsp.c b/src/lib/libssl/src/apps/ocsp.c
index e5f186fd5e..17e84366d9 100644
--- a/src/lib/libssl/src/apps/ocsp.c
+++ b/src/lib/libssl/src/apps/ocsp.c
@@ -136,7 +136,6 @@ int MAIN(int argc, char **argv)
136 int accept_count = -1; 136 int accept_count = -1;
137 int badarg = 0; 137 int badarg = 0;
138 int i; 138 int i;
139 int ignore_err = 0;
140 STACK *reqnames = NULL; 139 STACK *reqnames = NULL;
141 STACK_OF(OCSP_CERTID) *ids = NULL; 140 STACK_OF(OCSP_CERTID) *ids = NULL;
142 141
@@ -196,8 +195,6 @@ int MAIN(int argc, char **argv)
196 } 195 }
197 else badarg = 1; 196 else badarg = 1;
198 } 197 }
199 else if (!strcmp(*args, "-ignore_err"))
200 ignore_err = 1;
201 else if (!strcmp(*args, "-noverify")) 198 else if (!strcmp(*args, "-noverify"))
202 noverify = 1; 199 noverify = 1;
203 else if (!strcmp(*args, "-nonce")) 200 else if (!strcmp(*args, "-nonce"))
@@ -812,8 +809,6 @@ int MAIN(int argc, char **argv)
812 { 809 {
813 BIO_printf(out, "Responder Error: %s (%ld)\n", 810 BIO_printf(out, "Responder Error: %s (%ld)\n",
814 OCSP_response_status_str(i), i); 811 OCSP_response_status_str(i), i);
815 if (ignore_err)
816 goto redo_accept;
817 ret = 0; 812 ret = 0;
818 goto end; 813 goto end;
819 } 814 }
diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c
index 5136acdc57..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) strcpy(macpass, pass); 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) strcpy(macpass, pass); 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/pkcs8.c b/src/lib/libssl/src/apps/pkcs8.c
index ee8cf02813..6be27e7f44 100644
--- a/src/lib/libssl/src/apps/pkcs8.c
+++ b/src/lib/libssl/src/apps/pkcs8.c
@@ -235,7 +235,7 @@ int MAIN(int argc, char **argv)
235 return (1); 235 return (1);
236 } 236 }
237 if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) { 237 if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
238 BIO_printf(bio_err, "Error converting key\n"); 238 BIO_printf(bio_err, "Error converting key\n", outfile);
239 ERR_print_errors(bio_err); 239 ERR_print_errors(bio_err);
240 return (1); 240 return (1);
241 } 241 }
@@ -259,7 +259,8 @@ int MAIN(int argc, char **argv)
259 if (!(p8 = PKCS8_encrypt(pbe_nid, cipher, 259 if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
260 p8pass, strlen(p8pass), 260 p8pass, strlen(p8pass),
261 NULL, 0, iter, p8inf))) { 261 NULL, 0, iter, p8inf))) {
262 BIO_printf(bio_err, "Error encrypting key\n"); 262 BIO_printf(bio_err, "Error encrypting key\n",
263 outfile);
263 ERR_print_errors(bio_err); 264 ERR_print_errors(bio_err);
264 return (1); 265 return (1);
265 } 266 }
@@ -302,7 +303,7 @@ int MAIN(int argc, char **argv)
302 } 303 }
303 304
304 if (!p8) { 305 if (!p8) {
305 BIO_printf (bio_err, "Error reading key\n"); 306 BIO_printf (bio_err, "Error reading key\n", outfile);
306 ERR_print_errors(bio_err); 307 ERR_print_errors(bio_err);
307 return (1); 308 return (1);
308 } 309 }
@@ -316,13 +317,13 @@ int MAIN(int argc, char **argv)
316 } 317 }
317 318
318 if (!p8inf) { 319 if (!p8inf) {
319 BIO_printf(bio_err, "Error decrypting key\n"); 320 BIO_printf(bio_err, "Error decrypting key\n", outfile);
320 ERR_print_errors(bio_err); 321 ERR_print_errors(bio_err);
321 return (1); 322 return (1);
322 } 323 }
323 324
324 if (!(pkey = EVP_PKCS82PKEY(p8inf))) { 325 if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
325 BIO_printf(bio_err, "Error converting key\n"); 326 BIO_printf(bio_err, "Error converting key\n", outfile);
326 ERR_print_errors(bio_err); 327 ERR_print_errors(bio_err);
327 return (1); 328 return (1);
328 } 329 }
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c
index 5f6ec3d339..c6464e9401 100644
--- a/src/lib/libssl/src/apps/req.c
+++ b/src/lib/libssl/src/apps/req.c
@@ -1223,34 +1223,34 @@ 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 1226 if (snprintf(buf,sizeof buf,"%s_default",v->name)
1227 if(strlen(v->name) > sizeof buf-9) 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);
1230 return 0; 1230 return 0;
1231 } 1231 }
1232 1232
1233 sprintf(buf,"%s_default",v->name);
1234 if ((def=NCONF_get_string(req_conf,dn_sect,buf)) == NULL) 1233 if ((def=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
1235 { 1234 {
1236 ERR_clear_error(); 1235 ERR_clear_error();
1237 def=""; 1236 def="";
1238 } 1237 }
1239 sprintf(buf,"%s_value",v->name); 1238
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 sprintf(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 sprintf(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,13 +1288,13 @@ 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(strlen(v->name) > sizeof buf-9) 1291 if (snprintf(buf,sizeof buf,"%s_default",type)
1292 >= sizeof buf)
1292 { 1293 {
1293 BIO_printf(bio_err,"Name '%s' too long\n",v->name); 1294 BIO_printf(bio_err,"Name '%s' too long\n",v->name);
1294 return 0; 1295 return 0;
1295 } 1296 }
1296 1297
1297 sprintf(buf,"%s_default",type);
1298 if ((def=NCONF_get_string(req_conf,attr_sect,buf)) 1298 if ((def=NCONF_get_string(req_conf,attr_sect,buf))
1299 == NULL) 1299 == NULL)
1300 { 1300 {
@@ -1303,7 +1303,7 @@ start2: for (;;)
1303 } 1303 }
1304 1304
1305 1305
1306 sprintf(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 sprintf(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 sprintf(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,9 +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 OPENSSL_assert(strlen(value) < sizeof buf-2); 1400 strlcpy(buf,value,sizeof buf);
1401 strcpy(buf,value); 1401 strlcat(buf,"\n",sizeof buf);
1402 strcat(buf,"\n");
1403 BIO_printf(bio_err,"%s\n",value); 1402 BIO_printf(bio_err,"%s\n",value);
1404 } 1403 }
1405 else 1404 else
@@ -1421,8 +1420,8 @@ start:
1421 { 1420 {
1422 if ((def == NULL) || (def[0] == '\0')) 1421 if ((def == NULL) || (def[0] == '\0'))
1423 return(1); 1422 return(1);
1424 strcpy(buf,def); 1423 strlcpy(buf,def,sizeof buf);
1425 strcat(buf,"\n"); 1424 strlcat(buf,"\n",sizeof buf);
1426 } 1425 }
1427 else if ((buf[0] == '.') && (buf[1] == '\n')) return(1); 1426 else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
1428 1427
@@ -1456,9 +1455,8 @@ start:
1456 (void)BIO_flush(bio_err); 1455 (void)BIO_flush(bio_err);
1457 if (value != NULL) 1456 if (value != NULL)
1458 { 1457 {
1459 OPENSSL_assert(strlen(value) < sizeof buf-2); 1458 strlcpy(buf,value,sizeof buf);
1460 strcpy(buf,value); 1459 strlcat(buf,"\n",sizeof buf);
1461 strcat(buf,"\n");
1462 BIO_printf(bio_err,"%s\n",value); 1460 BIO_printf(bio_err,"%s\n",value);
1463 } 1461 }
1464 else 1462 else
@@ -1480,8 +1478,8 @@ start:
1480 { 1478 {
1481 if ((def == NULL) || (def[0] == '\0')) 1479 if ((def == NULL) || (def[0] == '\0'))
1482 return(1); 1480 return(1);
1483 strcpy(buf,def); 1481 strlcpy(buf,def,sizeof buf);
1484 strcat(buf,"\n"); 1482 strlcat(buf,"\n",sizeof buf);
1485 } 1483 }
1486 else if ((buf[0] == '.') && (buf[1] == '\n')) return(1); 1484 else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
1487 1485
diff --git a/src/lib/libssl/src/apps/s_apps.h b/src/lib/libssl/src/apps/s_apps.h
index 66b6edd442..ff18a72fe0 100644
--- a/src/lib/libssl/src/apps/s_apps.h
+++ b/src/lib/libssl/src/apps/s_apps.h
@@ -112,14 +112,6 @@
112#include <sys/types.h> 112#include <sys/types.h>
113#include <openssl/opensslconf.h> 113#include <openssl/opensslconf.h>
114 114
115#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
116#include <conio.h>
117#endif
118
119#ifdef OPENSSL_SYS_MSDOS
120#define _kbhit kbhit
121#endif
122
123#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET) 115#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
124/* VAX C does not defined fd_set and friends, but it's actually quite simple */ 116/* VAX C does not defined fd_set and friends, but it's actually quite simple */
125/* These definitions are borrowed from SOCKETSHR. /Richard Levitte */ 117/* These definitions are borrowed from SOCKETSHR. /Richard Levitte */
diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c
index eb6fd7c1c3..efa4902abd 100644
--- a/src/lib/libssl/src/apps/s_client.c
+++ b/src/lib/libssl/src/apps/s_client.c
@@ -136,6 +136,10 @@ typedef unsigned int u_int;
136#include <openssl/rand.h> 136#include <openssl/rand.h>
137#include "s_apps.h" 137#include "s_apps.h"
138 138
139#ifdef OPENSSL_SYS_WINDOWS
140#include <conio.h>
141#endif
142
139#ifdef OPENSSL_SYS_WINCE 143#ifdef OPENSSL_SYS_WINCE
140/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */ 144/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
141#ifdef fileno 145#ifdef fileno
@@ -217,7 +221,7 @@ static void sc_usage(void)
217 BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n"); 221 BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n");
218 BIO_printf(bio_err," for those protocols that support it, where\n"); 222 BIO_printf(bio_err," for those protocols that support it, where\n");
219 BIO_printf(bio_err," 'prot' defines which one to assume. Currently,\n"); 223 BIO_printf(bio_err," 'prot' defines which one to assume. Currently,\n");
220 BIO_printf(bio_err," only \"smtp\" and \"pop3\" are supported.\n"); 224 BIO_printf(bio_err," only \"smtp\" is supported.\n");
221#ifndef OPENSSL_NO_ENGINE 225#ifndef OPENSSL_NO_ENGINE
222 BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n"); 226 BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
223#endif 227#endif
@@ -247,7 +251,7 @@ int MAIN(int argc, char **argv)
247 int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending; 251 int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
248 SSL_CTX *ctx=NULL; 252 SSL_CTX *ctx=NULL;
249 int ret=1,in_init=1,i,nbio_test=0; 253 int ret=1,in_init=1,i,nbio_test=0;
250 int starttls_proto = 0; 254 int smtp_starttls = 0;
251 int prexit = 0, vflags = 0; 255 int prexit = 0, vflags = 0;
252 SSL_METHOD *meth=NULL; 256 SSL_METHOD *meth=NULL;
253 BIO *sbio; 257 BIO *sbio;
@@ -256,7 +260,7 @@ int MAIN(int argc, char **argv)
256 char *engine_id=NULL; 260 char *engine_id=NULL;
257 ENGINE *e=NULL; 261 ENGINE *e=NULL;
258#endif 262#endif
259#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) 263#ifdef OPENSSL_SYS_WINDOWS
260 struct timeval tv; 264 struct timeval tv;
261#endif 265#endif
262 266
@@ -411,9 +415,7 @@ int MAIN(int argc, char **argv)
411 if (--argc < 1) goto bad; 415 if (--argc < 1) goto bad;
412 ++argv; 416 ++argv;
413 if (strcmp(*argv,"smtp") == 0) 417 if (strcmp(*argv,"smtp") == 0)
414 starttls_proto = 1; 418 smtp_starttls = 1;
415 else if (strcmp(*argv,"pop3") == 0)
416 starttls_proto = 2;
417 else 419 else
418 goto bad; 420 goto bad;
419 } 421 }
@@ -585,18 +587,12 @@ re_start:
585 sbuf_off=0; 587 sbuf_off=0;
586 588
587 /* This is an ugly hack that does a lot of assumptions */ 589 /* This is an ugly hack that does a lot of assumptions */
588 if (starttls_proto == 1) 590 if (smtp_starttls)
589 { 591 {
590 BIO_read(sbio,mbuf,BUFSIZZ); 592 BIO_read(sbio,mbuf,BUFSIZZ);
591 BIO_printf(sbio,"STARTTLS\r\n"); 593 BIO_printf(sbio,"STARTTLS\r\n");
592 BIO_read(sbio,sbuf,BUFSIZZ); 594 BIO_read(sbio,sbuf,BUFSIZZ);
593 } 595 }
594 if (starttls_proto == 2)
595 {
596 BIO_read(sbio,mbuf,BUFSIZZ);
597 BIO_printf(sbio,"STLS\r\n");
598 BIO_read(sbio,sbuf,BUFSIZZ);
599 }
600 596
601 for (;;) 597 for (;;)
602 { 598 {
@@ -617,11 +613,11 @@ re_start:
617 print_stuff(bio_c_out,con,full_log); 613 print_stuff(bio_c_out,con,full_log);
618 if (full_log > 0) full_log--; 614 if (full_log > 0) full_log--;
619 615
620 if (starttls_proto) 616 if (smtp_starttls)
621 { 617 {
622 BIO_printf(bio_err,"%s",mbuf); 618 BIO_printf(bio_err,"%s",mbuf);
623 /* We don't need to know any more */ 619 /* We don't need to know any more */
624 starttls_proto = 0; 620 smtp_starttls = 0;
625 } 621 }
626 622
627 if (reconnect) 623 if (reconnect)
@@ -640,7 +636,7 @@ re_start:
640 636
641 if (!ssl_pending) 637 if (!ssl_pending)
642 { 638 {
643#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) 639#ifndef OPENSSL_SYS_WINDOWS
644 if (tty_on) 640 if (tty_on)
645 { 641 {
646 if (read_tty) FD_SET(fileno(stdin),&readfds); 642 if (read_tty) FD_SET(fileno(stdin),&readfds);
@@ -667,8 +663,8 @@ re_start:
667 * will choke the compiler: if you do have a cast then 663 * will choke the compiler: if you do have a cast then
668 * you can either go for (int *) or (void *). 664 * you can either go for (int *) or (void *).
669 */ 665 */
670#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) 666#ifdef OPENSSL_SYS_WINDOWS
671 /* Under Windows/DOS we make the assumption that we can 667 /* Under Windows we make the assumption that we can
672 * always write to the tty: therefore if we need to 668 * always write to the tty: therefore if we need to
673 * write to the tty we just fall through. Otherwise 669 * write to the tty we just fall through. Otherwise
674 * we timeout the select every second and see if there 670 * we timeout the select every second and see if there
@@ -682,7 +678,7 @@ re_start:
682 tv.tv_usec = 0; 678 tv.tv_usec = 0;
683 i=select(width,(void *)&readfds,(void *)&writefds, 679 i=select(width,(void *)&readfds,(void *)&writefds,
684 NULL,&tv); 680 NULL,&tv);
685#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS) 681#ifdef OPENSSL_SYS_WINCE
686 if(!i && (!_kbhit() || !read_tty) ) continue; 682 if(!i && (!_kbhit() || !read_tty) ) continue;
687#else 683#else
688 if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue; 684 if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
@@ -789,7 +785,7 @@ re_start:
789 /* goto end; */ 785 /* goto end; */
790 } 786 }
791 787
792 sbuf_len-=i;; 788 sbuf_len-=i;
793 sbuf_off+=i; 789 sbuf_off+=i;
794 if (sbuf_len <= 0) 790 if (sbuf_len <= 0)
795 { 791 {
@@ -851,8 +847,8 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
851 } 847 }
852 } 848 }
853 849
854#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) 850#ifdef OPENSSL_SYS_WINDOWS
855#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS) 851#ifdef OPENSSL_SYS_WINCE
856 else if (_kbhit()) 852 else if (_kbhit())
857#else 853#else
858 else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) 854 else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c
index ff4ab6ef28..5157aae4d1 100644
--- a/src/lib/libssl/src/apps/s_server.c
+++ b/src/lib/libssl/src/apps/s_server.c
@@ -140,6 +140,10 @@ typedef unsigned int u_int;
140#include <openssl/rand.h> 140#include <openssl/rand.h>
141#include "s_apps.h" 141#include "s_apps.h"
142 142
143#ifdef OPENSSL_SYS_WINDOWS
144#include <conio.h>
145#endif
146
143#ifdef OPENSSL_SYS_WINCE 147#ifdef OPENSSL_SYS_WINCE
144/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */ 148/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
145#ifdef fileno 149#ifdef fileno
@@ -913,7 +917,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
913 unsigned long l; 917 unsigned long l;
914 SSL *con=NULL; 918 SSL *con=NULL;
915 BIO *sbio; 919 BIO *sbio;
916#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) 920#ifdef OPENSSL_SYS_WINDOWS
917 struct timeval tv; 921 struct timeval tv;
918#endif 922#endif
919 923
@@ -987,7 +991,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
987 if (!read_from_sslcon) 991 if (!read_from_sslcon)
988 { 992 {
989 FD_ZERO(&readfds); 993 FD_ZERO(&readfds);
990#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) 994#ifndef OPENSSL_SYS_WINDOWS
991 FD_SET(fileno(stdin),&readfds); 995 FD_SET(fileno(stdin),&readfds);
992#endif 996#endif
993 FD_SET(s,&readfds); 997 FD_SET(s,&readfds);
@@ -997,8 +1001,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
997 * the compiler: if you do have a cast then you can either 1001 * the compiler: if you do have a cast then you can either
998 * go for (int *) or (void *). 1002 * go for (int *) or (void *).
999 */ 1003 */
1000#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) 1004#ifdef OPENSSL_SYS_WINDOWS
1001 /* Under DOS (non-djgpp) and Windows we can't select on stdin: only 1005 /* Under Windows we can't select on stdin: only
1002 * on sockets. As a workaround we timeout the select every 1006 * on sockets. As a workaround we timeout the select every
1003 * second and check for any keypress. In a proper Windows 1007 * second and check for any keypress. In a proper Windows
1004 * application we wouldn't do this because it is inefficient. 1008 * application we wouldn't do this because it is inefficient.
@@ -1259,13 +1263,7 @@ static int init_ssl_connection(SSL *con)
1259 if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) & 1263 if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
1260 TLS1_FLAGS_TLS_PADDING_BUG) 1264 TLS1_FLAGS_TLS_PADDING_BUG)
1261 BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n"); 1265 BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");
1262#ifndef OPENSSL_NO_KRB5 1266
1263 if (con->kssl_ctx->client_princ != NULL)
1264 {
1265 BIO_printf(bio_s_out,"Kerberos peer principal is %s\n",
1266 con->kssl_ctx->client_princ);
1267 }
1268#endif /* OPENSSL_NO_KRB5 */
1269 return(1); 1267 return(1);
1270 } 1268 }
1271 1269
diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c
index a88de6c8c8..02c3f640cf 100644
--- a/src/lib/libssl/src/apps/s_socket.c
+++ b/src/lib/libssl/src/apps/s_socket.c
@@ -389,7 +389,7 @@ redoit:
389 perror("OPENSSL_malloc"); 389 perror("OPENSSL_malloc");
390 return(0); 390 return(0);
391 } 391 }
392 strcpy(*host,h1->h_name); 392 strlcpy(*host,h1->h_name,strlen(h1->h_name)+1);
393 393
394 h2=GetHostByName(*host); 394 h2=GetHostByName(*host);
395 if (h2 == NULL) 395 if (h2 == NULL)
diff --git a/src/lib/libssl/src/apps/s_time.c b/src/lib/libssl/src/apps/s_time.c
index 1ad16cd607..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 sprintf(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 sprintf(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 sprintf(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/smime.c b/src/lib/libssl/src/apps/smime.c
index 51bc893ffa..cc248d377b 100644
--- a/src/lib/libssl/src/apps/smime.c
+++ b/src/lib/libssl/src/apps/smime.c
@@ -168,10 +168,6 @@ int MAIN(int argc, char **argv)
168 flags |= PKCS7_BINARY; 168 flags |= PKCS7_BINARY;
169 else if (!strcmp (*args, "-nosigs")) 169 else if (!strcmp (*args, "-nosigs"))
170 flags |= PKCS7_NOSIGS; 170 flags |= PKCS7_NOSIGS;
171 else if (!strcmp (*args, "-nooldmime"))
172 flags |= PKCS7_NOOLDMIMETYPE;
173 else if (!strcmp (*args, "-crlfeol"))
174 flags |= PKCS7_CRLFEOL;
175 else if (!strcmp (*args, "-crl_check")) 171 else if (!strcmp (*args, "-crl_check"))
176 store_flags |= X509_V_FLAG_CRL_CHECK; 172 store_flags |= X509_V_FLAG_CRL_CHECK;
177 else if (!strcmp (*args, "-crl_check_all")) 173 else if (!strcmp (*args, "-crl_check_all"))
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c
index 2020b51de0..e300bb82cf 100644
--- a/src/lib/libssl/src/apps/x509.c
+++ b/src/lib/libssl/src/apps/x509.c
@@ -1029,24 +1029,26 @@ static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
1029 ASN1_INTEGER *bs = NULL, *bs2 = NULL; 1029 ASN1_INTEGER *bs = NULL, *bs2 = NULL;
1030 BIO *io = NULL; 1030 BIO *io = NULL;
1031 BIGNUM *serial = NULL; 1031 BIGNUM *serial = NULL;
1032 size_t len;
1032 1033
1033 buf=OPENSSL_malloc( ((serialfile == NULL) 1034 len = ((serialfile == NULL)
1034 ?(strlen(CAfile)+strlen(POSTFIX)+1) 1035 ?(strlen(CAfile)+strlen(POSTFIX)+1)
1035 :(strlen(serialfile)))+1); 1036 :(strlen(serialfile)))+1;
1037 buf=OPENSSL_malloc(len);
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 strcpy(buf,CAfile); 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 strcat(buf,POSTFIX); 1048 strlcat(buf,POSTFIX,len);
1047 } 1049 }
1048 else 1050 else
1049 strcpy(buf,serialfile); 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))
@@ -1145,7 +1147,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
1145 else if (!(bs = load_serial(CAfile, serialfile, create))) 1147 else if (!(bs = load_serial(CAfile, serialfile, create)))
1146 goto end; 1148 goto end;
1147 1149
1148/* if (!X509_STORE_add_cert(ctx,x)) goto end;*/ 1150 if (!X509_STORE_add_cert(ctx,x)) goto end;
1149 1151
1150 /* NOTE: this certificate can/should be self signed, unless it was 1152 /* NOTE: this certificate can/should be self signed, unless it was
1151 * a certificate request in which case it is not. */ 1153 * a certificate request in which case it is not. */
diff --git a/src/lib/libssl/src/bugs/SSLv3 b/src/lib/libssl/src/bugs/SSLv3
index a75a1652d9..db53e1343a 100644
--- a/src/lib/libssl/src/bugs/SSLv3
+++ b/src/lib/libssl/src/bugs/SSLv3
@@ -29,7 +29,7 @@ RC4-MD5, but a re-connect tries to use DES-CBC-SHA. So netscape, when
29doing a re-connect, always takes the first cipher in the cipher list. 29doing a re-connect, always takes the first cipher in the cipher list.
30 30
31If we accept a netscape connection, demand a client cert, have a 31If we accept a netscape connection, demand a client cert, have a
32non-self-signed CA which does not have it's CA in netscape, and the 32non-self-sighed CA which does not have it's CA in netscape, and the
33browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta 33browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta
34 34
35Netscape browsers do not really notice the server sending a 35Netscape browsers do not really notice the server sending a
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/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/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/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.h b/src/lib/libssl/src/crypto/aes/aes.h
index da067f4a8f..8294a41a3a 100644
--- a/src/lib/libssl/src/crypto/aes/aes.h
+++ b/src/lib/libssl/src/crypto/aes/aes.h
@@ -100,7 +100,7 @@ void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
100 unsigned char *ivec, int *num); 100 unsigned char *ivec, int *num);
101void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, 101void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
102 const unsigned long length, const AES_KEY *key, 102 const unsigned long length, const AES_KEY *key,
103 unsigned char ivec[AES_BLOCK_SIZE], 103 unsigned char counter[AES_BLOCK_SIZE],
104 unsigned char ecount_buf[AES_BLOCK_SIZE], 104 unsigned char ecount_buf[AES_BLOCK_SIZE],
105 unsigned int *num); 105 unsigned int *num);
106 106
diff --git a/src/lib/libssl/src/crypto/aes/aes_cbc.c b/src/lib/libssl/src/crypto/aes/aes_cbc.c
index 86b27b10d6..de438306b1 100644
--- a/src/lib/libssl/src/crypto/aes/aes_cbc.c
+++ b/src/lib/libssl/src/crypto/aes/aes_cbc.c
@@ -72,7 +72,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
72 72
73 if (AES_ENCRYPT == enc) { 73 if (AES_ENCRYPT == enc) {
74 while (len >= AES_BLOCK_SIZE) { 74 while (len >= AES_BLOCK_SIZE) {
75 for(n=0; n < AES_BLOCK_SIZE; ++n) 75 for(n=0; n < sizeof tmp; ++n)
76 tmp[n] = in[n] ^ ivec[n]; 76 tmp[n] = in[n] ^ ivec[n];
77 AES_encrypt(tmp, out, key); 77 AES_encrypt(tmp, out, key);
78 memcpy(ivec, out, AES_BLOCK_SIZE); 78 memcpy(ivec, out, AES_BLOCK_SIZE);
@@ -86,12 +86,12 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
86 for(n=len; n < AES_BLOCK_SIZE; ++n) 86 for(n=len; n < AES_BLOCK_SIZE; ++n)
87 tmp[n] = ivec[n]; 87 tmp[n] = ivec[n];
88 AES_encrypt(tmp, tmp, key); 88 AES_encrypt(tmp, tmp, key);
89 memcpy(out, tmp, AES_BLOCK_SIZE); 89 memcpy(out, tmp, len);
90 memcpy(ivec, tmp, AES_BLOCK_SIZE); 90 memcpy(ivec, tmp, sizeof tmp);
91 } 91 }
92 } else { 92 } else {
93 while (len >= AES_BLOCK_SIZE) { 93 while (len >= AES_BLOCK_SIZE) {
94 memcpy(tmp, in, AES_BLOCK_SIZE); 94 memcpy(tmp, in, sizeof tmp);
95 AES_decrypt(in, out, key); 95 AES_decrypt(in, out, key);
96 for(n=0; n < AES_BLOCK_SIZE; ++n) 96 for(n=0; n < AES_BLOCK_SIZE; ++n)
97 out[n] ^= ivec[n]; 97 out[n] ^= ivec[n];
@@ -101,11 +101,11 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
101 out += AES_BLOCK_SIZE; 101 out += AES_BLOCK_SIZE;
102 } 102 }
103 if (len) { 103 if (len) {
104 memcpy(tmp, in, AES_BLOCK_SIZE); 104 memcpy(tmp, in, sizeof tmp);
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] ^= ivec[n]; 107 out[n] ^= ivec[n];
108 memcpy(ivec, tmp, AES_BLOCK_SIZE); 108 memcpy(ivec, tmp, sizeof tmp);
109 } 109 }
110 } 110 }
111} 111}
diff --git a/src/lib/libssl/src/crypto/aes/aes_ctr.c b/src/lib/libssl/src/crypto/aes/aes_ctr.c
index 79e1c18f19..59088499a0 100644
--- a/src/lib/libssl/src/crypto/aes/aes_ctr.c
+++ b/src/lib/libssl/src/crypto/aes/aes_ctr.c
@@ -62,49 +62,19 @@
62/* NOTE: CTR mode is big-endian. The rest of the AES code 62/* NOTE: CTR mode is big-endian. The rest of the AES code
63 * is endian-neutral. */ 63 * is endian-neutral. */
64 64
65/* increment counter (128-bit int) by 1 */ 65/* increment counter (128-bit int) by 2^64 */
66static void AES_ctr128_inc(unsigned char *counter) { 66static void AES_ctr128_inc(unsigned char *counter) {
67 unsigned long c; 67 unsigned long c;
68 68
69 /* Grab bottom dword of counter and increment */ 69 /* Grab 3rd dword of counter and increment */
70#ifdef L_ENDIAN 70#ifdef L_ENDIAN
71 c = GETU32(counter + 0); 71 c = GETU32(counter + 8);
72 c++; 72 c++;
73 PUTU32(counter + 0, c); 73 PUTU32(counter + 8, c);
74#else 74#else
75 c = GETU32(counter + 12); 75 c = GETU32(counter + 4);
76 c++; 76 c++;
77 PUTU32(counter + 12, c); 77 PUTU32(counter + 4, c);
78#endif
79
80 /* if no overflow, we're done */
81 if (c)
82 return;
83
84 /* Grab 1st dword of counter and increment */
85#ifdef L_ENDIAN
86 c = GETU32(counter + 4);
87 c++;
88 PUTU32(counter + 4, c);
89#else
90 c = GETU32(counter + 8);
91 c++;
92 PUTU32(counter + 8, c);
93#endif
94
95 /* if no overflow, we're done */
96 if (c)
97 return;
98
99 /* Grab 2nd dword of counter and increment */
100#ifdef L_ENDIAN
101 c = GETU32(counter + 8);
102 c++;
103 PUTU32(counter + 8, c);
104#else
105 c = GETU32(counter + 4);
106 c++;
107 PUTU32(counter + 4, c);
108#endif 78#endif
109 79
110 /* if no overflow, we're done */ 80 /* if no overflow, we're done */
@@ -130,16 +100,10 @@ static void AES_ctr128_inc(unsigned char *counter) {
130 * encrypted counter is kept in ecount_buf. Both *num and 100 * encrypted counter is kept in ecount_buf. Both *num and
131 * ecount_buf must be initialised with zeros before the first 101 * ecount_buf must be initialised with zeros before the first
132 * call to AES_ctr128_encrypt(). 102 * call to AES_ctr128_encrypt().
133 *
134 * This algorithm assumes that the counter is in the x lower bits
135 * of the IV (ivec), and that the application has full control over
136 * overflow and the rest of the IV. This implementation takes NO
137 * responsability for checking that the counter doesn't overflow
138 * into the rest of the IV when incremented.
139 */ 103 */
140void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, 104void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
141 const unsigned long length, const AES_KEY *key, 105 const unsigned long length, const AES_KEY *key,
142 unsigned char ivec[AES_BLOCK_SIZE], 106 unsigned char counter[AES_BLOCK_SIZE],
143 unsigned char ecount_buf[AES_BLOCK_SIZE], 107 unsigned char ecount_buf[AES_BLOCK_SIZE],
144 unsigned int *num) { 108 unsigned int *num) {
145 109
@@ -153,8 +117,8 @@ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
153 117
154 while (l--) { 118 while (l--) {
155 if (n == 0) { 119 if (n == 0) {
156 AES_encrypt(ivec, ecount_buf, key); 120 AES_encrypt(counter, ecount_buf, key);
157 AES_ctr128_inc(ivec); 121 AES_ctr128_inc(counter);
158 } 122 }
159 *(out++) = *(in++) ^ ecount_buf[n]; 123 *(out++) = *(in++) ^ ecount_buf[n];
160 n = (n+1) % AES_BLOCK_SIZE; 124 n = (n+1) % AES_BLOCK_SIZE;
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 cd09f68b38..48b923de1f 100644
--- a/src/lib/libssl/src/crypto/asn1/a_gentm.c
+++ b/src/lib/libssl/src/crypto/asn1/a_gentm.c
@@ -208,6 +208,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
208 char *p; 208 char *p;
209 struct tm *ts; 209 struct tm *ts;
210 struct tm data; 210 struct tm data;
211 size_t len = 20;
211 212
212 if (s == NULL) 213 if (s == NULL)
213 s=M_ASN1_GENERALIZEDTIME_new(); 214 s=M_ASN1_GENERALIZEDTIME_new();
@@ -219,17 +220,17 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
219 return(NULL); 220 return(NULL);
220 221
221 p=(char *)s->data; 222 p=(char *)s->data;
222 if ((p == NULL) || (s->length < 16)) 223 if ((p == NULL) || (s->length < len))
223 { 224 {
224 p=OPENSSL_malloc(20); 225 p=OPENSSL_malloc(len);
225 if (p == NULL) return(NULL); 226 if (p == NULL) return(NULL);
226 if (s->data != NULL) 227 if (s->data != NULL)
227 OPENSSL_free(s->data); 228 OPENSSL_free(s->data);
228 s->data=(unsigned char *)p; 229 s->data=(unsigned char *)p;
229 } 230 }
230 231
231 sprintf(p,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900, 232 snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
232 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);
233 s->length=strlen(p); 234 s->length=strlen(p);
234 s->type=V_ASN1_GENERALIZEDTIME; 235 s->type=V_ASN1_GENERALIZEDTIME;
235#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 e8a26af521..58b437bc84 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 sprintf(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 sprintf(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 }
@@ -296,7 +296,7 @@ static int in_utf8(unsigned long value, void *arg)
296 296
297static int out_utf8(unsigned long value, void *arg) 297static int out_utf8(unsigned long value, void *arg)
298{ 298{
299 int *outlen; 299 long *outlen;
300 outlen = arg; 300 outlen = arg;
301 *outlen += UTF8_putc(NULL, -1, value); 301 *outlen += UTF8_putc(NULL, -1, value);
302 return 1; 302 return 1;
diff --git a/src/lib/libssl/src/crypto/asn1/a_strex.c b/src/lib/libssl/src/crypto/asn1/a_strex.c
index 8abfdfe598..1def6c6549 100644
--- a/src/lib/libssl/src/crypto/asn1/a_strex.c
+++ b/src/lib/libssl/src/crypto/asn1/a_strex.c
@@ -279,7 +279,7 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING
279 * otherwise it is the number of bytes per character 279 * otherwise it is the number of bytes per character
280 */ 280 */
281 281
282const static signed char tag2nbyte[] = { 282const static char tag2nbyte[] = {
283 -1, -1, -1, -1, -1, /* 0-4 */ 283 -1, -1, -1, -1, -1, /* 0-4 */
284 -1, -1, -1, -1, -1, /* 5-9 */ 284 -1, -1, -1, -1, -1, /* 5-9 */
285 -1, -1, 0, -1, /* 10-13 */ 285 -1, -1, 0, -1, /* 10-13 */
diff --git a/src/lib/libssl/src/crypto/asn1/a_strnid.c b/src/lib/libssl/src/crypto/asn1/a_strnid.c
index 613bbc4a7d..aa49e9d7d0 100644
--- a/src/lib/libssl/src/crypto/asn1/a_strnid.c
+++ b/src/lib/libssl/src/crypto/asn1/a_strnid.c
@@ -143,7 +143,7 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
143/* Now the tables and helper functions for the string table: 143/* Now the tables and helper functions for the string table:
144 */ 144 */
145 145
146/* size limits: this stuff is taken straight from RFC3280 */ 146/* size limits: this stuff is taken straight from RFC2459 */
147 147
148#define ub_name 32768 148#define ub_name 32768
149#define ub_common_name 64 149#define ub_common_name 64
@@ -153,8 +153,6 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
153#define ub_organization_unit_name 64 153#define ub_organization_unit_name 64
154#define ub_title 64 154#define ub_title 64
155#define ub_email_address 128 155#define ub_email_address 128
156#define ub_serial_number 64
157
158 156
159/* This table must be kept in NID order */ 157/* This table must be kept in NID order */
160 158
@@ -172,7 +170,6 @@ static ASN1_STRING_TABLE tbl_standard[] = {
172{NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0}, 170{NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0},
173{NID_surname, 1, ub_name, DIRSTRING_TYPE, 0}, 171{NID_surname, 1, ub_name, DIRSTRING_TYPE, 0},
174{NID_initials, 1, ub_name, DIRSTRING_TYPE, 0}, 172{NID_initials, 1, ub_name, DIRSTRING_TYPE, 0},
175{NID_serialNumber, 1, ub_serial_number, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
176{NID_friendlyName, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}, 173{NID_friendlyName, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
177{NID_name, 1, ub_name, DIRSTRING_TYPE, 0}, 174{NID_name, 1, ub_name, DIRSTRING_TYPE, 0},
178{NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK}, 175{NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
diff --git a/src/lib/libssl/src/crypto/asn1/a_time.c b/src/lib/libssl/src/crypto/asn1/a_time.c
index 7348da9457..b8c031fc8f 100644
--- a/src/lib/libssl/src/crypto/asn1/a_time.c
+++ b/src/lib/libssl/src/crypto/asn1/a_time.c
@@ -128,6 +128,7 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
128 { 128 {
129 ASN1_GENERALIZEDTIME *ret; 129 ASN1_GENERALIZEDTIME *ret;
130 char *str; 130 char *str;
131 int newlen;
131 132
132 if (!ASN1_TIME_check(t)) return NULL; 133 if (!ASN1_TIME_check(t)) return NULL;
133 134
@@ -150,12 +151,14 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
150 /* grow the string */ 151 /* grow the string */
151 if (!ASN1_STRING_set(ret, NULL, t->length + 2)) 152 if (!ASN1_STRING_set(ret, NULL, t->length + 2))
152 return NULL; 153 return NULL;
154 /* ASN1_STRING_set() allocated 'len + 1' bytes. */
155 newlen = t->length + 2 + 1;
153 str = (char *)ret->data; 156 str = (char *)ret->data;
154 /* Work out the century and prepend */ 157 /* Work out the century and prepend */
155 if (t->data[0] >= '5') strcpy(str, "19"); 158 if (t->data[0] >= '5') strlcpy(str, "19", newlen);
156 else strcpy(str, "20"); 159 else strlcpy(str, "20", newlen);
157 160
158 BUF_strlcat(str, (char *)t->data, t->length+3); /* Include space for a '\0' */ 161 strlcat(str, (char *)t->data, newlen);
159 162
160 return ret; 163 return ret;
161 } 164 }
diff --git a/src/lib/libssl/src/crypto/asn1/a_utctm.c b/src/lib/libssl/src/crypto/asn1/a_utctm.c
index dbb4a42c9d..41f6d421bb 100644
--- a/src/lib/libssl/src/crypto/asn1/a_utctm.c
+++ b/src/lib/libssl/src/crypto/asn1/a_utctm.c
@@ -188,6 +188,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
188 char *p; 188 char *p;
189 struct tm *ts; 189 struct tm *ts;
190 struct tm data; 190 struct tm data;
191 size_t len = 20;
191 192
192 if (s == NULL) 193 if (s == NULL)
193 s=M_ASN1_UTCTIME_new(); 194 s=M_ASN1_UTCTIME_new();
@@ -199,17 +200,17 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
199 return(NULL); 200 return(NULL);
200 201
201 p=(char *)s->data; 202 p=(char *)s->data;
202 if ((p == NULL) || (s->length < 14)) 203 if ((p == NULL) || (s->length < len))
203 { 204 {
204 p=OPENSSL_malloc(20); 205 p=OPENSSL_malloc(len);
205 if (p == NULL) return(NULL); 206 if (p == NULL) return(NULL);
206 if (s->data != NULL) 207 if (s->data != NULL)
207 OPENSSL_free(s->data); 208 OPENSSL_free(s->data);
208 s->data=(unsigned char *)p; 209 s->data=(unsigned char *)p;
209 } 210 }
210 211
211 sprintf(p,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, 212 snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
212 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);
213 s->length=strlen(p); 214 s->length=strlen(p);
214 s->type=V_ASN1_UTCTIME; 215 s->type=V_ASN1_UTCTIME;
215#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 e30d5dd303..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 sprintf(buf1,"%lu",(unsigned long)address); 417 snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address);
418 sprintf(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 e48532a24d..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 sprintf(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 sprintf(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 sprintf(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/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 4e09c9e44e..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 sprintf(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 strcpy(str,"modulus:"); 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/asn1/x_long.c b/src/lib/libssl/src/crypto/asn1/x_long.c
index c04b192794..c5f25956cb 100644
--- a/src/lib/libssl/src/crypto/asn1/x_long.c
+++ b/src/lib/libssl/src/crypto/asn1/x_long.c
@@ -104,7 +104,12 @@ static int long_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const A
104 long ltmp; 104 long ltmp;
105 unsigned long utmp; 105 unsigned long utmp;
106 int clen, pad, i; 106 int clen, pad, i;
107 ltmp = *(long *)pval; 107 /* this exists to bypass broken gcc optimization */
108 char *cp = (char *)pval;
109
110 /* use memcpy, because we may not be long aligned */
111 memcpy(&ltmp, cp, sizeof(long));
112
108 if(ltmp == it->size) return -1; 113 if(ltmp == it->size) return -1;
109 /* Convert the long to positive: we subtract one if negative so 114 /* Convert the long to positive: we subtract one if negative so
110 * we can cleanly handle the padding if only the MSB of the leading 115 * we can cleanly handle the padding if only the MSB of the leading
@@ -136,6 +141,7 @@ static int long_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype,
136 int neg, i; 141 int neg, i;
137 long ltmp; 142 long ltmp;
138 unsigned long utmp = 0; 143 unsigned long utmp = 0;
144 char *cp = (char *)pval;
139 if(len > sizeof(long)) { 145 if(len > sizeof(long)) {
140 ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); 146 ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG);
141 return 0; 147 return 0;
@@ -158,6 +164,6 @@ static int long_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype,
158 ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); 164 ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG);
159 return 0; 165 return 0;
160 } 166 }
161 *(long *)pval = ltmp; 167 memcpy(cp, &ltmp, sizeof(long));
162 return 1; 168 return 1;
163} 169}
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/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 8397cfab6a..983604fb49 100644
--- a/src/lib/libssl/src/crypto/bio/b_dump.c
+++ b/src/lib/libssl/src/crypto/bio/b_dump.c
@@ -104,38 +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 strcpy(buf,str); 107 strlcpy(buf,str,sizeof buf);
108 sprintf(tmp,"%04x - ",i*dump_width); 108 snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width);
109 strcat(buf,tmp); 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 strcat(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 sprintf(tmp,"%02x%c",ch,j==7?'-':' '); 119 snprintf(tmp,sizeof tmp,"%02x%c",ch,
120 strcat(buf,tmp); 120 j==7?'-':' ');
121 strlcat(buf,tmp,sizeof buf);
121 } 122 }
122 } 123 }
123 strcat(buf," "); 124 strlcat(buf," ",sizeof buf);
124 for(j=0;j<dump_width;j++) 125 for(j=0;j<dump_width;j++)
125 { 126 {
126 if (((i*dump_width)+j)>=len) 127 if (((i*dump_width)+j)>=len)
127 break; 128 break;
128 ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; 129 ch=((unsigned char)*(s+i*dump_width+j)) & 0xff;
129#ifndef CHARSET_EBCDIC 130#ifndef CHARSET_EBCDIC
130 sprintf(tmp,"%c",((ch>=' ')&&(ch<='~'))?ch:'.'); 131 snprintf(tmp,sizeof tmp,"%c",
132 ((ch>=' ')&&(ch<='~'))?ch:'.');
131#else 133#else
132 sprintf(tmp,"%c",((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) 134 snprintf(tmp,sizeof tmp,"%c",
133 ? os_toebcdic[ch] 135 ((ch>=os_toascii[' '])&&(ch<=os_toascii['~']))
134 : '.'); 136 ? os_toebcdic[ch]
137 : '.');
135#endif 138#endif
136 strcat(buf,tmp); 139 strlcat(buf,tmp,sizeof buf);
137 } 140 }
138 strcat(buf,"\n"); 141 strlcat(buf,"\n",sizeof buf);
139 /* 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
140 * we will move the selection point in the debug window 143 * we will move the selection point in the debug window
141 */ 144 */
@@ -144,7 +147,8 @@ int BIO_dump_indent(BIO *bio, const char *s, int len, int indent)
144#ifdef TRUNCATE 147#ifdef TRUNCATE
145 if (trunc > 0) 148 if (trunc > 0)
146 { 149 {
147 sprintf(buf,"%s%04x - <SPACES/NULS>\n",str,len+trunc); 150 snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str,
151 len+trunc);
148 ret+=BIO_write(bio,(char *)buf,strlen(buf)); 152 ret+=BIO_write(bio,(char *)buf,strlen(buf));
149 } 153 }
150#endif 154#endif
diff --git a/src/lib/libssl/src/crypto/bio/b_print.c b/src/lib/libssl/src/crypto/bio/b_print.c
index 2cfc689dd6..a9e552f245 100644
--- a/src/lib/libssl/src/crypto/bio/b_print.c
+++ b/src/lib/libssl/src/crypto/bio/b_print.c
@@ -836,5 +836,5 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
836 * had the buffer been large enough.) */ 836 * had the buffer been large enough.) */
837 return -1; 837 return -1;
838 else 838 else
839 return (retlen <= INT_MAX) ? (int)retlen : -1; 839 return (retlen <= INT_MAX) ? retlen : -1;
840 } 840 }
diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c
index 601a14f37c..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 sprintf(*addr,"%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/bf_buff.c b/src/lib/libssl/src/crypto/bio/bf_buff.c
index c1fd75aaad..1cecd70579 100644
--- a/src/lib/libssl/src/crypto/bio/bf_buff.c
+++ b/src/lib/libssl/src/crypto/bio/bf_buff.c
@@ -494,7 +494,6 @@ static int buffer_gets(BIO *b, char *buf, int size)
494 if (i <= 0) 494 if (i <= 0)
495 { 495 {
496 BIO_copy_next_retry(b); 496 BIO_copy_next_retry(b);
497 *buf='\0';
498 if (i < 0) return((num > 0)?num:i); 497 if (i < 0) return((num > 0)?num:i);
499 if (i == 0) return(num); 498 if (i == 0) return(num);
500 } 499 }
diff --git a/src/lib/libssl/src/crypto/bio/bio_cb.c b/src/lib/libssl/src/crypto/bio/bio_cb.c
index 0ffa4d2136..ee9159ebd8 100644
--- a/src/lib/libssl/src/crypto/bio/bio_cb.c
+++ b/src/lib/libssl/src/crypto/bio/bio_cb.c
@@ -70,55 +70,61 @@ long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
70 MS_STATIC char buf[256]; 70 MS_STATIC char buf[256];
71 char *p; 71 char *p;
72 long r=1; 72 long r=1;
73 size_t p_maxlen;
73 74
74 if (BIO_CB_RETURN & cmd) 75 if (BIO_CB_RETURN & cmd)
75 r=ret; 76 r=ret;
76 77
77 sprintf(buf,"BIO[%08lX]:",(unsigned long)bio); 78 snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio);
78 p= &(buf[14]); 79 p= &(buf[14]);
80 p_maxlen = sizeof buf - 14;
79 switch (cmd) 81 switch (cmd)
80 { 82 {
81 case BIO_CB_FREE: 83 case BIO_CB_FREE:
82 sprintf(p,"Free - %s\n",bio->method->name); 84 snprintf(p,p_maxlen,"Free - %s\n",bio->method->name);
83 break; 85 break;
84 case BIO_CB_READ: 86 case BIO_CB_READ:
85 if (bio->method->type & BIO_TYPE_DESCRIPTOR) 87 if (bio->method->type & BIO_TYPE_DESCRIPTOR)
86 sprintf(p,"read(%d,%d) - %s fd=%d\n",bio->num,argi,bio->method->name,bio->num); 88 snprintf(p,p_maxlen,"read(%d,%d) - %s fd=%d\n",
89 bio->num,argi,bio->method->name,bio->num);
87 else 90 else
88 sprintf(p,"read(%d,%d) - %s\n",bio->num,argi,bio->method->name); 91 snprintf(p,p_maxlen,"read(%d,%d) - %s\n",
92 bio->num,argi,bio->method->name);
89 break; 93 break;
90 case BIO_CB_WRITE: 94 case BIO_CB_WRITE:
91 if (bio->method->type & BIO_TYPE_DESCRIPTOR) 95 if (bio->method->type & BIO_TYPE_DESCRIPTOR)
92 sprintf(p,"write(%d,%d) - %s fd=%d\n",bio->num,argi,bio->method->name,bio->num); 96 snprintf(p,p_maxlen,"write(%d,%d) - %s fd=%d\n",
97 bio->num,argi,bio->method->name,bio->num);
93 else 98 else
94 sprintf(p,"write(%d,%d) - %s\n",bio->num,argi,bio->method->name); 99 snprintf(p,p_maxlen,"write(%d,%d) - %s\n",
100 bio->num,argi,bio->method->name);
95 break; 101 break;
96 case BIO_CB_PUTS: 102 case BIO_CB_PUTS:
97 sprintf(p,"puts() - %s\n",bio->method->name); 103 snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name);
98 break; 104 break;
99 case BIO_CB_GETS: 105 case BIO_CB_GETS:
100 sprintf(p,"gets(%d) - %s\n",argi,bio->method->name); 106 snprintf(p,p_maxlen,"gets(%d) - %s\n",argi,bio->method->name);
101 break; 107 break;
102 case BIO_CB_CTRL: 108 case BIO_CB_CTRL:
103 sprintf(p,"ctrl(%d) - %s\n",argi,bio->method->name); 109 snprintf(p,p_maxlen,"ctrl(%d) - %s\n",argi,bio->method->name);
104 break; 110 break;
105 case BIO_CB_RETURN|BIO_CB_READ: 111 case BIO_CB_RETURN|BIO_CB_READ:
106 sprintf(p,"read return %ld\n",ret); 112 snprintf(p,p_maxlen,"read return %ld\n",ret);
107 break; 113 break;
108 case BIO_CB_RETURN|BIO_CB_WRITE: 114 case BIO_CB_RETURN|BIO_CB_WRITE:
109 sprintf(p,"write return %ld\n",ret); 115 snprintf(p,p_maxlen,"write return %ld\n",ret);
110 break; 116 break;
111 case BIO_CB_RETURN|BIO_CB_GETS: 117 case BIO_CB_RETURN|BIO_CB_GETS:
112 sprintf(p,"gets return %ld\n",ret); 118 snprintf(p,p_maxlen,"gets return %ld\n",ret);
113 break; 119 break;
114 case BIO_CB_RETURN|BIO_CB_PUTS: 120 case BIO_CB_RETURN|BIO_CB_PUTS:
115 sprintf(p,"puts return %ld\n",ret); 121 snprintf(p,p_maxlen,"puts return %ld\n",ret);
116 break; 122 break;
117 case BIO_CB_RETURN|BIO_CB_CTRL: 123 case BIO_CB_RETURN|BIO_CB_CTRL:
118 sprintf(p,"ctrl return %ld\n",ret); 124 snprintf(p,p_maxlen,"ctrl return %ld\n",ret);
119 break; 125 break;
120 default: 126 default:
121 sprintf(p,"bio callback - unknown type (%d)\n",cmd); 127 snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd);
122 break; 128 break;
123 } 129 }
124 130
diff --git a/src/lib/libssl/src/crypto/bio/bss_bio.c b/src/lib/libssl/src/crypto/bio/bss_bio.c
index 0f9f0955b4..aa58dab046 100644
--- a/src/lib/libssl/src/crypto/bio/bss_bio.c
+++ b/src/lib/libssl/src/crypto/bio/bss_bio.c
@@ -1,57 +1,4 @@
1/* crypto/bio/bss_bio.c -*- Mode: C; c-file-style: "eay" -*- */ 1/* crypto/bio/bss_bio.c -*- Mode: C; c-file-style: "eay" -*- */
2/* ====================================================================
3 * Copyright (c) 1998-2003 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 2
56/* Special method for a BIO where the other endpoint is also a BIO 3/* Special method for a BIO where the other endpoint is also a BIO
57 * of this kind, handled by the same thread (i.e. the "peer" is actually 4 * of this kind, handled by the same thread (i.e. the "peer" is actually
@@ -555,7 +502,7 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr)
555 break; 502 break;
556 503
557 case BIO_C_DESTROY_BIO_PAIR: 504 case BIO_C_DESTROY_BIO_PAIR:
558 /* Affects both BIOs in the pair -- call just once! 505 /* Effects both BIOs in the pair -- call just once!
559 * Or let BIO_free(bio1); BIO_free(bio2); do the job. */ 506 * Or let BIO_free(bio1); BIO_free(bio2); do the job. */
560 bio_destroy_pair(bio); 507 bio_destroy_pair(bio);
561 ret = 1; 508 ret = 1;
diff --git a/src/lib/libssl/src/crypto/bio/bss_conn.c b/src/lib/libssl/src/crypto/bio/bss_conn.c
index 743db6ff94..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 sprintf(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 sprintf(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 6904b5c081..e4e9df144c 100644
--- a/src/lib/libssl/src/crypto/bio/bss_file.c
+++ b/src/lib/libssl/src/crypto/bio/bss_file.c
@@ -213,29 +213,12 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
213 b->shutdown=(int)num&BIO_CLOSE; 213 b->shutdown=(int)num&BIO_CLOSE;
214 b->ptr=(char *)ptr; 214 b->ptr=(char *)ptr;
215 b->init=1; 215 b->init=1;
216#if defined(OPENSSL_SYS_WINDOWS) 216#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
217 /* Set correct text/binary mode */
217 if (num & BIO_FP_TEXT) 218 if (num & BIO_FP_TEXT)
218 _setmode(fileno((FILE *)ptr),_O_TEXT); 219 _setmode(fileno((FILE *)ptr),_O_TEXT);
219 else 220 else
220 _setmode(fileno((FILE *)ptr),_O_BINARY); 221 _setmode(fileno((FILE *)ptr),_O_BINARY);
221#elif defined(OPENSSL_SYS_MSDOS)
222 {
223 int fd = fileno((FILE*)ptr);
224 /* Set correct text/binary mode */
225 if (num & BIO_FP_TEXT)
226 _setmode(fd,_O_TEXT);
227 /* Dangerous to set stdin/stdout to raw (unless redirected) */
228 else
229 {
230 if (fd == STDIN_FILENO || fd == STDOUT_FILENO)
231 {
232 if (isatty(fd) <= 0)
233 _setmode(fd,_O_BINARY);
234 }
235 else
236 _setmode(fd,_O_BINARY);
237 }
238 }
239#elif defined(OPENSSL_SYS_OS2) 222#elif defined(OPENSSL_SYS_OS2)
240 if (num & BIO_FP_TEXT) 223 if (num & BIO_FP_TEXT)
241 setmode(fileno((FILE *)ptr), O_TEXT); 224 setmode(fileno((FILE *)ptr), O_TEXT);
@@ -249,15 +232,15 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
249 if (num & BIO_FP_APPEND) 232 if (num & BIO_FP_APPEND)
250 { 233 {
251 if (num & BIO_FP_READ) 234 if (num & BIO_FP_READ)
252 strcpy(p,"a+"); 235 strlcpy(p,"a+",sizeof p);
253 else strcpy(p,"a"); 236 else strlcpy(p,"a",sizeof p);
254 } 237 }
255 else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE)) 238 else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
256 strcpy(p,"r+"); 239 strlcpy(p,"r+",sizeof p);
257 else if (num & BIO_FP_WRITE) 240 else if (num & BIO_FP_WRITE)
258 strcpy(p,"w"); 241 strlcpy(p,"w",sizeof p);
259 else if (num & BIO_FP_READ) 242 else if (num & BIO_FP_READ)
260 strcpy(p,"r"); 243 strlcpy(p,"r",sizeof p);
261 else 244 else
262 { 245 {
263 BIOerr(BIO_F_FILE_CTRL,BIO_R_BAD_FOPEN_MODE); 246 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..fa17d3c7d8
--- /dev/null
+++ b/src/lib/libssl/src/crypto/bn/Makefile.ssl
@@ -0,0 +1,322 @@
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)
25
26GENERAL=Makefile
27TEST=bntest.c exptest.c
28APPS=
29
30LIB=$(TOP)/libcrypto.a
31LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
32 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
33 bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
34 bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c
35
36LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
37 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
38 bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
39 bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o
40
41SRC= $(LIBSRC)
42
43EXHEADER= bn.h
44HEADER= bn_lcl.h bn_prime.h $(EXHEADER)
45
46ALL= $(GENERAL) $(SRC) $(HEADER)
47
48top:
49 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
50
51all: lib
52
53bn_prime.h: bn_prime.pl
54 $(PERL) bn_prime.pl >bn_prime.h
55
56divtest: divtest.c ../../libcrypto.a
57 cc -I../../include divtest.c -o divtest ../../libcrypto.a
58
59bnbug: bnbug.c ../../libcrypto.a top
60 cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
61
62lib: $(LIBOBJ)
63 $(AR) $(LIB) $(LIBOBJ)
64 $(RANLIB) $(LIB) || echo Never mind.
65 @touch lib
66
67# elf
68asm/bn86-elf.s: asm/bn-586.pl ../perlasm/x86asm.pl
69 (cd asm; $(PERL) bn-586.pl elf $(CFLAGS) > bn86-elf.s)
70
71asm/co86-elf.s: asm/co-586.pl ../perlasm/x86asm.pl
72 (cd asm; $(PERL) co-586.pl elf $(CFLAGS) > co86-elf.s)
73
74# a.out
75asm/bn86-out.o: asm/bn86unix.cpp
76 $(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o
77
78asm/co86-out.o: asm/co86unix.cpp
79 $(CPP) -DOUT asm/co86unix.cpp | as -o asm/co86-out.o
80
81# bsdi
82asm/bn86bsdi.o: asm/bn86unix.cpp
83 $(CPP) -DBSDI asm/bn86unix.cpp | sed 's/ :/:/' | as -o asm/bn86bsdi.o
84
85asm/co86bsdi.o: asm/co86unix.cpp
86 $(CPP) -DBSDI asm/co86unix.cpp | sed 's/ :/:/' | as -o asm/co86bsdi.o
87
88asm/bn86unix.cpp: asm/bn-586.pl ../perlasm/x86asm.pl
89 (cd asm; $(PERL) bn-586.pl cpp >bn86unix.cpp )
90
91asm/co86unix.cpp: asm/co-586.pl ../perlasm/x86asm.pl
92 (cd asm; $(PERL) co-586.pl cpp >co86unix.cpp )
93
94asm/sparcv8.o: asm/sparcv8.S
95
96asm/sparcv8plus.o: asm/sparcv8plus.S
97
98# Old GNU assembler doesn't understand V9 instructions, so we
99# hire /usr/ccs/bin/as to do the job. Note that option is called
100# *-gcc27, but even gcc 2>=8 users may experience similar problem
101# if they didn't bother to upgrade GNU assembler. Such users should
102# not choose this option, but be adviced to *remove* GNU assembler
103# or upgrade it.
104asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S
105 $(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \
106 /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o
107
108
109asm/ia64.o: asm/ia64.S
110
111# Some compiler drivers (most notably HP-UX and Intel C++) don't
112# understand .S extension:-( I wish I could pipe output from cc -E,
113# but it's too compiler driver/ABI dependent to cover with a single
114# rule... <appro@fy.chalmers.se>
115asm/ia64-cpp.o: asm/ia64.S
116 $(CC) $(ASFLAGS) -E asm/ia64.S > /tmp/ia64.$$$$.s && \
117 $(CC) $(ASFLAGS) -c -o asm/ia64-cpp.o /tmp/ia64.$$$$.s; \
118 rm -f /tmp/ia64.$$$$.s
119
120asm/x86_64-gcc.o: asm/x86_64-gcc.c
121
122files:
123 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
124
125links:
126 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
127 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
128 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
129 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
130
131install:
132 @for i in $(EXHEADER) ; \
133 do \
134 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
135 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
136 done;
137
138exptest:
139 rm -f exptest
140 gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a
141
142div:
143 rm -f a.out
144 gcc -I.. -g div.c ../../libcrypto.a
145
146tags:
147 ctags $(SRC)
148
149tests:
150
151lint:
152 lint -DLINT $(INCLUDES) $(SRC)>fluff
153
154depend:
155 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
156
157dclean:
158 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
159 mv -f Makefile.new $(MAKEFILE)
160
161clean:
162 rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
163
164# DO NOT DELETE THIS LINE -- make depend depends on it.
165
166bn_add.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
167bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
168bn_add.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
169bn_add.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
170bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
171bn_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
172bn_add.o: ../cryptlib.h bn_add.c bn_lcl.h
173bn_asm.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
174bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
175bn_asm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
176bn_asm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
177bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
178bn_asm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
179bn_asm.o: ../cryptlib.h bn_asm.c bn_lcl.h
180bn_blind.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
181bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
182bn_blind.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
183bn_blind.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
184bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
185bn_blind.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
186bn_blind.o: ../cryptlib.h bn_blind.c bn_lcl.h
187bn_ctx.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
188bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
189bn_ctx.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
190bn_ctx.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
191bn_ctx.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
192bn_ctx.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
193bn_ctx.o: ../cryptlib.h bn_ctx.c bn_lcl.h
194bn_div.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
195bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
196bn_div.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
197bn_div.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
198bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
199bn_div.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
200bn_div.o: ../cryptlib.h bn_div.c bn_lcl.h
201bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
202bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
203bn_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
204bn_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
205bn_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
206bn_err.o: ../../include/openssl/symhacks.h bn_err.c
207bn_exp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
208bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
209bn_exp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
210bn_exp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
211bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
212bn_exp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
213bn_exp.o: ../cryptlib.h bn_exp.c bn_lcl.h
214bn_exp2.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
215bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
216bn_exp2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
217bn_exp2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
218bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
219bn_exp2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
220bn_exp2.o: ../cryptlib.h bn_exp2.c bn_lcl.h
221bn_gcd.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
222bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
223bn_gcd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
224bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
225bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
226bn_gcd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
227bn_gcd.o: ../cryptlib.h bn_gcd.c bn_lcl.h
228bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
229bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h
230bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
231bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
232bn_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
233bn_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
234bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
235bn_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
236bn_lib.o: ../cryptlib.h bn_lcl.h bn_lib.c
237bn_mod.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
238bn_mod.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
239bn_mod.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
240bn_mod.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
241bn_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
242bn_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
243bn_mod.o: ../cryptlib.h bn_lcl.h bn_mod.c
244bn_mont.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
245bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
246bn_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
247bn_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
248bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
249bn_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
250bn_mont.o: ../cryptlib.h bn_lcl.h bn_mont.c
251bn_mpi.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
252bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
253bn_mpi.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
254bn_mpi.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
255bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
256bn_mpi.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
257bn_mpi.o: ../cryptlib.h bn_lcl.h bn_mpi.c
258bn_mul.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
259bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
260bn_mul.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
261bn_mul.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
262bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
263bn_mul.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
264bn_mul.o: ../cryptlib.h bn_lcl.h bn_mul.c
265bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
266bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
267bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
268bn_prime.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
269bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
270bn_prime.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
271bn_prime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
272bn_prime.o: ../cryptlib.h bn_lcl.h bn_prime.c bn_prime.h
273bn_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
274bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
275bn_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
276bn_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
277bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
278bn_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
279bn_print.o: ../cryptlib.h bn_lcl.h bn_print.c
280bn_rand.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
281bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
282bn_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
283bn_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
284bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
285bn_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
286bn_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
287bn_rand.o: ../cryptlib.h bn_lcl.h bn_rand.c
288bn_recp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
289bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
290bn_recp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
291bn_recp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
292bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
293bn_recp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
294bn_recp.o: ../cryptlib.h bn_lcl.h bn_recp.c
295bn_shift.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
296bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
297bn_shift.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
298bn_shift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
299bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
300bn_shift.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
301bn_shift.o: ../cryptlib.h bn_lcl.h bn_shift.c
302bn_sqr.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
303bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
304bn_sqr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
305bn_sqr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
306bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
307bn_sqr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
308bn_sqr.o: ../cryptlib.h bn_lcl.h bn_sqr.c
309bn_sqrt.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
310bn_sqrt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
311bn_sqrt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
312bn_sqrt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
313bn_sqrt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
314bn_sqrt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
315bn_sqrt.o: ../cryptlib.h bn_lcl.h bn_sqrt.c
316bn_word.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
317bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
318bn_word.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
319bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
320bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
321bn_word.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
322bn_word.o: ../cryptlib.h bn_lcl.h bn_word.c
diff --git a/src/lib/libssl/src/crypto/bn/bn_lib.c b/src/lib/libssl/src/crypto/bn/bn_lib.c
index fa0ff485ad..463463cfcb 100644
--- a/src/lib/libssl/src/crypto/bn/bn_lib.c
+++ b/src/lib/libssl/src/crypto/bn/bn_lib.c
@@ -145,10 +145,10 @@ char *BN_options(void)
145 { 145 {
146 init++; 146 init++;
147#ifdef BN_LLONG 147#ifdef BN_LLONG
148 sprintf(data,"bn(%d,%d)",(int)sizeof(BN_ULLONG)*8, 148 snprintf(data,sizeof data,"bn(%d,%d)",(int)sizeof(BN_ULLONG)*8,
149 (int)sizeof(BN_ULONG)*8); 149 (int)sizeof(BN_ULONG)*8);
150#else 150#else
151 sprintf(data,"bn(%d,%d)",(int)sizeof(BN_ULONG)*8, 151 snprintf(data,sizeof data,"bn(%d,%d)",(int)sizeof(BN_ULONG)*8,
152 (int)sizeof(BN_ULONG)*8); 152 (int)sizeof(BN_ULONG)*8);
153#endif 153#endif
154 } 154 }
diff --git a/src/lib/libssl/src/crypto/bn/bn_mul.c b/src/lib/libssl/src/crypto/bn/bn_mul.c
index 3ae3822bc2..cb93ac3356 100644
--- a/src/lib/libssl/src/crypto/bn/bn_mul.c
+++ b/src/lib/libssl/src/crypto/bn/bn_mul.c
@@ -224,7 +224,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int tn,
224 int n, BN_ULONG *t) 224 int n, BN_ULONG *t)
225 { 225 {
226 int i,j,n2=n*2; 226 int i,j,n2=n*2;
227 int c1,c2,neg,zero; 227 unsigned int c1,c2,neg,zero;
228 BN_ULONG ln,lo,*p; 228 BN_ULONG ln,lo,*p;
229 229
230# ifdef BN_COUNT 230# ifdef BN_COUNT
@@ -376,7 +376,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int tn,
376 376
377 /* The overflow will stop before we over write 377 /* The overflow will stop before we over write
378 * words we should not overwrite */ 378 * words we should not overwrite */
379 if (ln < (BN_ULONG)c1) 379 if (ln < c1)
380 { 380 {
381 do { 381 do {
382 p++; 382 p++;
diff --git a/src/lib/libssl/src/crypto/bn/bn_print.c b/src/lib/libssl/src/crypto/bn/bn_print.c
index 5f46b1826c..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)
@@ -119,10 +119,11 @@ char *BN_bn2dec(const BIGNUM *a)
119 } 119 }
120 if ((t=BN_dup(a)) == NULL) goto err; 120 if ((t=BN_dup(a)) == NULL) goto err;
121 121
122#define BUF_REMAIN (num+3 - (size_t)(p - buf))
122 p=buf; 123 p=buf;
123 lp=bn_data; 124 lp=bn_data;
124 if (t->neg) *(p++)='-'; 125 if (t->neg) *(p++)='-';
125 if (t->top == 0) 126 if (BN_is_zero(t))
126 { 127 {
127 *(p++)='0'; 128 *(p++)='0';
128 *(p++)='\0'; 129 *(p++)='\0';
@@ -139,12 +140,12 @@ char *BN_bn2dec(const BIGNUM *a)
139 /* We now have a series of blocks, BN_DEC_NUM chars 140 /* We now have a series of blocks, BN_DEC_NUM chars
140 * in length, where the last one needs truncation. 141 * in length, where the last one needs truncation.
141 * The blocks need to be reversed in order. */ 142 * The blocks need to be reversed in order. */
142 sprintf(p,BN_DEC_FMT1,*lp); 143 snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
143 while (*p) p++; 144 while (*p) p++;
144 while (lp != bn_data) 145 while (lp != bn_data)
145 { 146 {
146 lp--; 147 lp--;
147 sprintf(p,BN_DEC_FMT2,*lp); 148 snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
148 while (*p) p++; 149 while (*p) p++;
149 } 150 }
150 } 151 }
@@ -299,7 +300,7 @@ int BN_print(BIO *bp, const BIGNUM *a)
299 int ret=0; 300 int ret=0;
300 301
301 if ((a->neg) && (BIO_write(bp,"-",1) != 1)) goto end; 302 if ((a->neg) && (BIO_write(bp,"-",1) != 1)) goto end;
302 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;
303 for (i=a->top-1; i >=0; i--) 304 for (i=a->top-1; i >=0; i--)
304 { 305 {
305 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/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/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 57d2739ae0..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 strcpy(section,"default"); 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 strcpy(v->name,pname); 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 sprintf(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 edcc08921c..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 sprintf(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 strcpy(file,X509_get_default_cert_area()); 564 strlcpy(file,X509_get_default_cert_area(),len + 1);
565#ifndef OPENSSL_SYS_VMS 565#ifndef OPENSSL_SYS_VMS
566 strcat(file,"/"); 566 strlcat(file,"/",len + 1);
567#endif 567#endif
568 strcat(file,OPENSSL_CONF); 568 strlcat(file,OPENSSL_CONF,len + 1);
569 569
570 return file; 570 return file;
571 } 571 }
diff --git a/src/lib/libssl/src/crypto/cversion.c b/src/lib/libssl/src/crypto/cversion.c
index 8ecfba7b16..56471fa74c 100644
--- a/src/lib/libssl/src/crypto/cversion.c
+++ b/src/lib/libssl/src/crypto/cversion.c
@@ -61,7 +61,9 @@
61#include "cryptlib.h" 61#include "cryptlib.h"
62#include <openssl/crypto.h> 62#include <openssl/crypto.h>
63 63
64#ifndef NO_WINDOWS_BRAINDEATH
64#include "buildinf.h" 65#include "buildinf.h"
66#endif
65 67
66const char *SSLeay_version(int t) 68const char *SSLeay_version(int t)
67 { 69 {
@@ -72,7 +74,7 @@ const char *SSLeay_version(int t)
72#ifdef DATE 74#ifdef DATE
73 static char buf[sizeof(DATE)+11]; 75 static char buf[sizeof(DATE)+11];
74 76
75 sprintf(buf,"built on: %s",DATE); 77 snprintf(buf,sizeof buf,"built on: %s",DATE);
76 return(buf); 78 return(buf);
77#else 79#else
78 return("built on: date not available"); 80 return("built on: date not available");
@@ -83,7 +85,7 @@ const char *SSLeay_version(int t)
83#ifdef CFLAGS 85#ifdef CFLAGS
84 static char buf[sizeof(CFLAGS)+11]; 86 static char buf[sizeof(CFLAGS)+11];
85 87
86 sprintf(buf,"compiler: %s",CFLAGS); 88 snprintf(buf,sizeof buf,"compiler: %s",CFLAGS);
87 return(buf); 89 return(buf);
88#else 90#else
89 return("compiler: information not available"); 91 return("compiler: information not available");
@@ -94,7 +96,7 @@ const char *SSLeay_version(int t)
94#ifdef PLATFORM 96#ifdef PLATFORM
95 static char buf[sizeof(PLATFORM)+11]; 97 static char buf[sizeof(PLATFORM)+11];
96 98
97 sprintf(buf,"platform: %s", PLATFORM); 99 snprintf(buf,sizeof buf,"platform: %s", PLATFORM);
98 return(buf); 100 return(buf);
99#else 101#else
100 return("platform: information not available"); 102 return("platform: information not available");
diff --git a/src/lib/libssl/src/crypto/des/FILES b/src/lib/libssl/src/crypto/des/FILES
new file mode 100644
index 0000000000..4c7ea2de7a
--- /dev/null
+++ b/src/lib/libssl/src/crypto/des/FILES
@@ -0,0 +1,96 @@
1/* General stuff */
2COPYRIGHT - Copyright info.
3MODES.DES - A description of the features of the different modes of DES.
4FILES - This file.
5INSTALL - How to make things compile.
6Imakefile - For use with kerberos.
7README - What this package is.
8VERSION - Which version this is and what was changed.
9KERBEROS - Kerberos version 4 notes.
10Makefile.PL - An old makefile to build with perl5, not current.
11Makefile.ssl - The SSLeay makefile
12Makefile.uni - The normal unix makefile.
13GNUmakefile - The makefile for use with glibc.
14makefile.bc - A Borland C makefile
15times - Some outputs from 'speed' on some machines.
16vms.com - For use when compiling under VMS
17
18/* My SunOS des(1) replacement */
19des.c - des(1) source code.
20des.man - des(1) manual.
21
22/* Testing and timing programs. */
23destest.c - Source for libdes.a test program.
24speed.c - Source for libdes.a timing program.
25rpw.c - Source for libdes.a testing password reading routines.
26
27/* libdes.a source code */
28des_crypt.man - libdes.a manual page.
29des.h - Public libdes.a header file.
30ecb_enc.c - des_ecb_encrypt() source, this contains the basic DES code.
31ecb3_enc.c - des_ecb3_encrypt() source.
32cbc_ckm.c - des_cbc_cksum() source.
33cbc_enc.c - des_cbc_encrypt() source.
34ncbc_enc.c - des_cbc_encrypt() that is 'normal' in that it copies
35 the new iv values back in the passed iv vector.
36ede_enc.c - des_ede3_cbc_encrypt() cbc mode des using triple DES.
37cbc3_enc.c - des_3cbc_encrypt() source, don't use this function.
38cfb_enc.c - des_cfb_encrypt() source.
39cfb64enc.c - des_cfb64_encrypt() cfb in 64 bit mode but setup to be
40 used as a stream cipher.
41cfb64ede.c - des_ede3_cfb64_encrypt() cfb in 64 bit mode but setup to be
42 used as a stream cipher and using triple DES.
43ofb_enc.c - des_cfb_encrypt() source.
44ofb64_enc.c - des_ofb_encrypt() ofb in 64 bit mode but setup to be
45 used as a stream cipher.
46ofb64ede.c - des_ede3_ofb64_encrypt() ofb in 64 bit mode but setup to be
47 used as a stream cipher and using triple DES.
48enc_read.c - des_enc_read() source.
49enc_writ.c - des_enc_write() source.
50pcbc_enc.c - des_pcbc_encrypt() source.
51qud_cksm.c - quad_cksum() source.
52rand_key.c - des_random_key() source.
53read_pwd.c - Source for des_read_password() plus related functions.
54set_key.c - Source for des_set_key().
55str2key.c - Covert a string of any length into a key.
56fcrypt.c - A small, fast version of crypt(3).
57des_locl.h - Internal libdes.a header file.
58podd.h - Odd parity tables - used in des_set_key().
59sk.h - Lookup tables used in des_set_key().
60spr.h - What is left of the S tables - used in ecb_encrypt().
61des_ver.h - header file for the external definition of the
62 version string.
63des.doc - SSLeay documentation for the library.
64
65/* The perl scripts - you can ignore these files they are only
66 * included for the curious */
67des.pl - des in perl anyone? des_set_key and des_ecb_encrypt
68 both done in a perl library.
69testdes.pl - Testing program for des.pl
70doIP - Perl script used to develop IP xor/shift code.
71doPC1 - Perl script used to develop PC1 xor/shift code.
72doPC2 - Generates sk.h.
73PC1 - Output of doPC1 should be the same as output from PC1.
74PC2 - used in development of doPC2.
75shifts.pl - Perl library used by my perl scripts.
76
77/* I started making a perl5 dynamic library for libdes
78 * but did not fully finish, these files are part of that effort. */
79DES.pm
80DES.pod
81DES.xs
82t
83typemap
84
85/* The following are for use with sun RPC implementaions. */
86rpc_des.h
87rpc_enc.c
88
89/* The following are contibuted by Mark Murray <mark@grondar.za>. They
90 * are not normally built into libdes due to machine specific routines
91 * contained in them. They are for use in the most recent incarnation of
92 * export kerberos v 4 (eBones). */
93supp.c
94new_rkey.c
95
96
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/cfb_enc.c b/src/lib/libssl/src/crypto/des/cfb_enc.c
index 2600bdfc93..17bf77ca9e 100644
--- a/src/lib/libssl/src/crypto/des/cfb_enc.c
+++ b/src/lib/libssl/src/crypto/des/cfb_enc.c
@@ -64,22 +64,32 @@
64 * 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
65 * byte. 65 * byte.
66 */ 66 */
67/* WARNING WARNING: this uses in and out in 8-byte chunks regardless of
68 * length */
69/* Until Aug 1 2003 this function did not correctly implement CFB-r, so it
70 * will not be compatible with any encryption prior to that date. Ben. */
71void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, 67void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
72 long length, DES_key_schedule *schedule, DES_cblock *ivec, 68 long length, DES_key_schedule *schedule, DES_cblock *ivec, int enc)
73 int enc)
74 { 69 {
75 register DES_LONG d0,d1,v0,v1,n=(numbits+7)/8; 70 register DES_LONG d0,d1,v0,v1,n=(numbits+7)/8;
71 register DES_LONG mask0,mask1;
76 register unsigned long l=length; 72 register unsigned long l=length;
77 register int num=numbits; 73 register int num=numbits;
78 DES_LONG ti[2]; 74 DES_LONG ti[2];
79 unsigned char *iv; 75 unsigned char *iv;
80 unsigned char ovec[16];
81 76
82 if (num > 64) return; 77 if (num > 64) return;
78 if (num > 32)
79 {
80 mask0=0xffffffffL;
81 if (num == 64)
82 mask1=mask0;
83 else mask1=(1L<<(num-32))-1;
84 }
85 else
86 {
87 if (num == 32)
88 mask0=0xffffffffL;
89 else mask0=(1L<<num)-1;
90 mask1=0x00000000L;
91 }
92
83 iv = &(*ivec)[0]; 93 iv = &(*ivec)[0];
84 c2l(iv,v0); 94 c2l(iv,v0);
85 c2l(iv,v1); 95 c2l(iv,v1);
@@ -93,8 +103,8 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
93 DES_encrypt1((DES_LONG *)ti,schedule,DES_ENCRYPT); 103 DES_encrypt1((DES_LONG *)ti,schedule,DES_ENCRYPT);
94 c2ln(in,d0,d1,n); 104 c2ln(in,d0,d1,n);
95 in+=n; 105 in+=n;
96 d0^=ti[0]; 106 d0=(d0^ti[0])&mask0;
97 d1^=ti[1]; 107 d1=(d1^ti[1])&mask1;
98 l2cn(d0,d1,out,n); 108 l2cn(d0,d1,out,n);
99 out+=n; 109 out+=n;
100 /* 30-08-94 - eay - changed because l>>32 and 110 /* 30-08-94 - eay - changed because l>>32 and
@@ -103,25 +113,15 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
103 { v0=v1; v1=d0; } 113 { v0=v1; v1=d0; }
104 else if (num == 64) 114 else if (num == 64)
105 { v0=d0; v1=d1; } 115 { v0=d0; v1=d1; }
106 else 116 else if (num > 32) /* && num != 64 */
117 {
118 v0=((v1>>(num-32))|(d0<<(64-num)))&0xffffffffL;
119 v1=((d0>>(num-32))|(d1<<(64-num)))&0xffffffffL;
120 }
121 else /* num < 32 */
107 { 122 {
108 iv=&ovec[0]; 123 v0=((v0>>num)|(v1<<(32-num)))&0xffffffffL;
109 l2c(v0,iv); 124 v1=((v1>>num)|(d0<<(32-num)))&0xffffffffL;
110 l2c(v1,iv);
111 l2c(d0,iv);
112 l2c(d1,iv);
113 /* shift ovec left most of the bits... */
114 memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
115 /* now the remaining bits */
116 if(num%8 != 0)
117 for(n=0 ; n < 8 ; ++n)
118 {
119 ovec[n]<<=num%8;
120 ovec[n]|=ovec[n+1]>>(8-num%8);
121 }
122 iv=&ovec[0];
123 c2l(iv,v0);
124 c2l(iv,v1);
125 } 125 }
126 } 126 }
127 } 127 }
@@ -141,28 +141,18 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
141 { v0=v1; v1=d0; } 141 { v0=v1; v1=d0; }
142 else if (num == 64) 142 else if (num == 64)
143 { v0=d0; v1=d1; } 143 { v0=d0; v1=d1; }
144 else 144 else if (num > 32) /* && num != 64 */
145 {
146 v0=((v1>>(num-32))|(d0<<(64-num)))&0xffffffffL;
147 v1=((d0>>(num-32))|(d1<<(64-num)))&0xffffffffL;
148 }
149 else /* num < 32 */
145 { 150 {
146 iv=&ovec[0]; 151 v0=((v0>>num)|(v1<<(32-num)))&0xffffffffL;
147 l2c(v0,iv); 152 v1=((v1>>num)|(d0<<(32-num)))&0xffffffffL;
148 l2c(v1,iv);
149 l2c(d0,iv);
150 l2c(d1,iv);
151 /* shift ovec left most of the bits... */
152 memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
153 /* now the remaining bits */
154 if(num%8 != 0)
155 for(n=0 ; n < 8 ; ++n)
156 {
157 ovec[n]<<=num%8;
158 ovec[n]|=ovec[n+1]>>(8-num%8);
159 }
160 iv=&ovec[0];
161 c2l(iv,v0);
162 c2l(iv,v1);
163 } 153 }
164 d0^=ti[0]; 154 d0=(d0^ti[0])&mask0;
165 d1^=ti[1]; 155 d1=(d1^ti[1])&mask1;
166 l2cn(d0,d1,out,n); 156 l2cn(d0,d1,out,n);
167 out+=n; 157 out+=n;
168 } 158 }
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_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/destest.c b/src/lib/libssl/src/crypto/des/destest.c
index 3983ac8e5f..687c00c792 100644
--- a/src/lib/libssl/src/crypto/des/destest.c
+++ b/src/lib/libssl/src/crypto/des/destest.c
@@ -431,7 +431,7 @@ int main(int argc, char *argv[])
431 431
432#ifndef LIBDES_LIT 432#ifndef LIBDES_LIT
433 printf("Doing ede ecb\n"); 433 printf("Doing ede ecb\n");
434 for (i=0; i<(NUM_TESTS-2); i++) 434 for (i=0; i<(NUM_TESTS-1); i++)
435 { 435 {
436 DES_set_key_unchecked(&key_data[i],&ks); 436 DES_set_key_unchecked(&key_data[i],&ks);
437 DES_set_key_unchecked(&key_data[i+1],&ks2); 437 DES_set_key_unchecked(&key_data[i+1],&ks2);
diff --git a/src/lib/libssl/src/crypto/des/ecb_enc.c b/src/lib/libssl/src/crypto/des/ecb_enc.c
index 1b70f68806..c828bdd45d 100644
--- a/src/lib/libssl/src/crypto/des/ecb_enc.c
+++ b/src/lib/libssl/src/crypto/des/ecb_enc.c
@@ -97,7 +97,8 @@ const char *DES_options(void)
97 size="int"; 97 size="int";
98 else 98 else
99 size="long"; 99 size="long";
100 sprintf(buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,size); 100 snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
101 size);
101 init=0; 102 init=0;
102 } 103 }
103 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_dlfcn.c b/src/lib/libssl/src/crypto/dso/dso_dlfcn.c
index 9d49ebc253..906b4703de 100644
--- a/src/lib/libssl/src/crypto/dso/dso_dlfcn.c
+++ b/src/lib/libssl/src/crypto/dso/dso_dlfcn.c
@@ -125,11 +125,7 @@ DSO_METHOD *DSO_METHOD_dlfcn(void)
125# endif 125# endif
126# endif 126# endif
127#else 127#else
128# ifdef OPENSSL_SYS_SUNOS 128# define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */
129# define DLOPEN_FLAG 1
130# else
131# define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */
132# endif
133#endif 129#endif
134 130
135/* For this DSO_METHOD, our meth_data STACK will contain; 131/* For this DSO_METHOD, our meth_data STACK will contain;
diff --git a/src/lib/libssl/src/crypto/dso/dso_lib.c b/src/lib/libssl/src/crypto/dso/dso_lib.c
index 556069b9b8..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 strcpy(copied, filename); 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 strcpy(result, filename); 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/ec_mult.c b/src/lib/libssl/src/crypto/ec/ec_mult.c
index 16822a73cf..4dbc931120 100644
--- a/src/lib/libssl/src/crypto/ec/ec_mult.c
+++ b/src/lib/libssl/src/crypto/ec/ec_mult.c
@@ -175,13 +175,12 @@ static signed char *compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len, B
175 * (thus the boundaries should be increased) 175 * (thus the boundaries should be increased)
176 */ 176 */
177#define EC_window_bits_for_scalar_size(b) \ 177#define EC_window_bits_for_scalar_size(b) \
178 ((size_t) \ 178 ((b) >= 2000 ? 6 : \
179 ((b) >= 2000 ? 6 : \ 179 (b) >= 800 ? 5 : \
180 (b) >= 800 ? 5 : \ 180 (b) >= 300 ? 4 : \
181 (b) >= 300 ? 4 : \ 181 (b) >= 70 ? 3 : \
182 (b) >= 70 ? 3 : \ 182 (b) >= 20 ? 2 : \
183 (b) >= 20 ? 2 : \ 183 1)
184 1))
185 184
186/* Compute 185/* Compute
187 * \sum scalars[i]*points[i], 186 * \sum scalars[i]*points[i],
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 ad3858395b..0d56e69d27 100644
--- a/src/lib/libssl/src/crypto/engine/eng_ctrl.c
+++ b/src/lib/libssl/src/crypto/engine/eng_ctrl.c
@@ -160,15 +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 sprintf(s, "%s", e->cmd_defns[idx].cmd_name); 163 return snprintf(s,strlen(e->cmd_defns[idx].cmd_name) + 1,
164 "%s", e->cmd_defns[idx].cmd_name);
164 case ENGINE_CTRL_GET_DESC_LEN_FROM_CMD: 165 case ENGINE_CTRL_GET_DESC_LEN_FROM_CMD:
165 if(e->cmd_defns[idx].cmd_desc) 166 if(e->cmd_defns[idx].cmd_desc)
166 return strlen(e->cmd_defns[idx].cmd_desc); 167 return strlen(e->cmd_defns[idx].cmd_desc);
167 return strlen(int_no_description); 168 return strlen(int_no_description);
168 case ENGINE_CTRL_GET_DESC_FROM_CMD: 169 case ENGINE_CTRL_GET_DESC_FROM_CMD:
169 if(e->cmd_defns[idx].cmd_desc) 170 if(e->cmd_defns[idx].cmd_desc)
170 return sprintf(s, "%s", e->cmd_defns[idx].cmd_desc); 171 return snprintf(s,
171 return sprintf(s, "%s", int_no_description); 172 strlen(e->cmd_defns[idx].cmd_desc) + 1,
173 "%s", e->cmd_defns[idx].cmd_desc);
174 return snprintf(s, strlen(int_no_description) + 1,"%s",
175 int_no_description);
172 case ENGINE_CTRL_GET_CMD_FLAGS: 176 case ENGINE_CTRL_GET_CMD_FLAGS:
173 return e->cmd_defns[idx].cmd_flags; 177 return e->cmd_defns[idx].cmd_flags;
174 } 178 }
diff --git a/src/lib/libssl/src/crypto/engine/engine.h b/src/lib/libssl/src/crypto/engine/engine.h
index 9c3ab182d3..8686879e1a 100644
--- a/src/lib/libssl/src/crypto/engine/engine.h
+++ b/src/lib/libssl/src/crypto/engine/engine.h
@@ -538,10 +538,10 @@ void ENGINE_add_conf_module(void);
538/**************************/ 538/**************************/
539 539
540/* Binary/behaviour compatibility levels */ 540/* Binary/behaviour compatibility levels */
541#define OSSL_DYNAMIC_VERSION (unsigned long)0x00010200 541#define OSSL_DYNAMIC_VERSION (unsigned long)0x00010100
542/* Binary versions older than this are too old for us (whether we're a loader or 542/* Binary versions older than this are too old for us (whether we're a loader or
543 * a loadee) */ 543 * a loadee) */
544#define OSSL_DYNAMIC_OLDEST (unsigned long)0x00010200 544#define OSSL_DYNAMIC_OLDEST (unsigned long)0x00010100
545 545
546/* When compiling an ENGINE entirely as an external shared library, loadable by 546/* When compiling an ENGINE entirely as an external shared library, loadable by
547 * the "dynamic" ENGINE, these types are needed. The 'dynamic_fns' structure 547 * the "dynamic" ENGINE, these types are needed. The 'dynamic_fns' structure
@@ -630,10 +630,6 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
630 if(!fn(e,id)) return 0; \ 630 if(!fn(e,id)) return 0; \
631 return 1; } 631 return 1; }
632 632
633#if defined(__OpenBSD__) || defined(__FreeBSD__)
634void ENGINE_setup_bsd_cryptodev(void);
635#endif
636
637/* BEGIN ERROR CODES */ 633/* BEGIN ERROR CODES */
638/* The following lines are auto generated by the script mkerr.pl. Any changes 634/* The following lines are auto generated by the script mkerr.pl. Any changes
639 * made after this point may be overwritten when the script is next run. 635 * made after this point may be overwritten when the script is next run.
diff --git a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
index 40af97ac24..b502d12b6d 100644
--- a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -12,9 +12,6 @@
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the author nor the names of contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
18 * 15 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
20 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -71,14 +68,19 @@ struct dev_crypto_state {
71 int d_fd; 68 int d_fd;
72}; 69};
73 70
71struct dev_crypto_cipher {
72 int c_id;
73 int c_nid;
74 int c_ivmax;
75 int c_keylen;
76};
77
74static u_int32_t cryptodev_asymfeat = 0; 78static u_int32_t cryptodev_asymfeat = 0;
75 79
76static int get_asym_dev_crypto(void); 80static int get_asym_dev_crypto(void);
77static int open_dev_crypto(void); 81static int open_dev_crypto(void);
78static int get_dev_crypto(void); 82static int get_dev_crypto(void);
79static int cryptodev_max_iv(int cipher); 83static struct dev_crypto_cipher *cipher_nid_to_cryptodev(int nid);
80static int cryptodev_key_length_valid(int cipher, int len);
81static int cipher_nid_to_cryptodev(int nid);
82static int get_cryptodev_ciphers(const int **cnids); 84static int get_cryptodev_ciphers(const int **cnids);
83static int get_cryptodev_digests(const int **cnids); 85static int get_cryptodev_digests(const int **cnids);
84static int cryptodev_usable_ciphers(const int **nids); 86static int cryptodev_usable_ciphers(const int **nids);
@@ -125,15 +127,12 @@ static const ENGINE_CMD_DEFN cryptodev_defns[] = {
125 { 0, NULL, NULL, 0 } 127 { 0, NULL, NULL, 0 }
126}; 128};
127 129
128static struct { 130static struct dev_crypto_cipher ciphers[] = {
129 int id;
130 int nid;
131 int ivmax;
132 int keylen;
133} ciphers[] = {
134 { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, }, 131 { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, },
135 { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, }, 132 { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, },
136 { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, }, 133 { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, },
134 { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, },
135 { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, },
137 { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, }, 136 { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, },
138 { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, }, 137 { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, },
139 { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, }, 138 { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, },
@@ -203,48 +202,16 @@ get_asym_dev_crypto(void)
203 return fd; 202 return fd;
204} 203}
205 204
206/*
207 * XXXX this needs to be set for each alg - and determined from
208 * a running card.
209 */
210static int
211cryptodev_max_iv(int cipher)
212{
213 int i;
214
215 for (i = 0; ciphers[i].id; i++)
216 if (ciphers[i].id == cipher)
217 return (ciphers[i].ivmax);
218 return (0);
219}
220
221/*
222 * XXXX this needs to be set for each alg - and determined from
223 * a running card. For now, fake it out - but most of these
224 * for real devices should return 1 for the supported key
225 * sizes the device can handle.
226 */
227static int
228cryptodev_key_length_valid(int cipher, int len)
229{
230 int i;
231
232 for (i = 0; ciphers[i].id; i++)
233 if (ciphers[i].id == cipher)
234 return (ciphers[i].keylen == len);
235 return (0);
236}
237
238/* convert libcrypto nids to cryptodev */ 205/* convert libcrypto nids to cryptodev */
239static int 206static struct dev_crypto_cipher *
240cipher_nid_to_cryptodev(int nid) 207cipher_nid_to_cryptodev(int nid)
241{ 208{
242 int i; 209 int i;
243 210
244 for (i = 0; ciphers[i].id; i++) 211 for (i = 0; ciphers[i].c_id; i++)
245 if (ciphers[i].nid == nid) 212 if (ciphers[i].c_nid == nid)
246 return (ciphers[i].id); 213 return (&ciphers[i]);
247 return (0); 214 return (NULL);
248} 215}
249 216
250/* 217/*
@@ -267,15 +234,15 @@ get_cryptodev_ciphers(const int **cnids)
267 memset(&sess, 0, sizeof(sess)); 234 memset(&sess, 0, sizeof(sess));
268 sess.key = (caddr_t)"123456781234567812345678"; 235 sess.key = (caddr_t)"123456781234567812345678";
269 236
270 for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { 237 for (i = 0; ciphers[i].c_id && count < CRYPTO_ALGORITHM_MAX; i++) {
271 if (ciphers[i].nid == NID_undef) 238 if (ciphers[i].c_nid == NID_undef)
272 continue; 239 continue;
273 sess.cipher = ciphers[i].id; 240 sess.cipher = ciphers[i].c_id;
274 sess.keylen = ciphers[i].keylen; 241 sess.keylen = ciphers[i].c_keylen;
275 sess.mac = 0; 242 sess.mac = 0;
276 if (ioctl(fd, CIOCGSESSION, &sess) != -1 && 243 if (ioctl(fd, CIOCGSESSION, &sess) != -1 &&
277 ioctl(fd, CIOCFSESSION, &sess.ses) != -1) 244 ioctl(fd, CIOCFSESSION, &sess.ses) != -1)
278 nids[count++] = ciphers[i].nid; 245 nids[count++] = ciphers[i].c_nid;
279 } 246 }
280 close(fd); 247 close(fd);
281 248
@@ -428,15 +395,15 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
428{ 395{
429 struct dev_crypto_state *state = ctx->cipher_data; 396 struct dev_crypto_state *state = ctx->cipher_data;
430 struct session_op *sess = &state->d_sess; 397 struct session_op *sess = &state->d_sess;
431 int cipher; 398 struct dev_crypto_cipher *cipher;
432 399
433 if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef) 400 if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NULL)
434 return (0); 401 return (0);
435 402
436 if (ctx->cipher->iv_len > cryptodev_max_iv(cipher)) 403 if (ctx->cipher->iv_len > cipher->c_ivmax)
437 return (0); 404 return (0);
438 405
439 if (!cryptodev_key_length_valid(cipher, ctx->key_len)) 406 if (ctx->key_len != cipher->c_keylen)
440 return (0); 407 return (0);
441 408
442 memset(sess, 0, sizeof(struct session_op)); 409 memset(sess, 0, sizeof(struct session_op));
@@ -446,7 +413,7 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
446 413
447 sess->key = (unsigned char *)key; 414 sess->key = (unsigned char *)key;
448 sess->keylen = ctx->key_len; 415 sess->keylen = ctx->key_len;
449 sess->cipher = cipher; 416 sess->cipher = cipher->c_id;
450 417
451 if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { 418 if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) {
452 close(state->d_fd); 419 close(state->d_fd);
@@ -551,7 +518,7 @@ const EVP_CIPHER cryptodev_cast_cbc = {
551 NULL 518 NULL
552}; 519};
553 520
554const EVP_CIPHER cryptodev_aes_cbc = { 521const EVP_CIPHER cryptodev_aes_128_cbc = {
555 NID_aes_128_cbc, 522 NID_aes_128_cbc,
556 16, 16, 16, 523 16, 16, 16,
557 EVP_CIPH_CBC_MODE, 524 EVP_CIPH_CBC_MODE,
@@ -564,6 +531,32 @@ const EVP_CIPHER cryptodev_aes_cbc = {
564 NULL 531 NULL
565}; 532};
566 533
534const EVP_CIPHER cryptodev_aes_192_cbc = {
535 NID_aes_192_cbc,
536 16, 24, 16,
537 EVP_CIPH_CBC_MODE,
538 cryptodev_init_key,
539 cryptodev_cipher,
540 cryptodev_cleanup,
541 sizeof(struct dev_crypto_state),
542 EVP_CIPHER_set_asn1_iv,
543 EVP_CIPHER_get_asn1_iv,
544 NULL
545};
546
547const EVP_CIPHER cryptodev_aes_256_cbc = {
548 NID_aes_256_cbc,
549 16, 32, 16,
550 EVP_CIPH_CBC_MODE,
551 cryptodev_init_key,
552 cryptodev_cipher,
553 cryptodev_cleanup,
554 sizeof(struct dev_crypto_state),
555 EVP_CIPHER_set_asn1_iv,
556 EVP_CIPHER_get_asn1_iv,
557 NULL
558};
559
567/* 560/*
568 * Registered by the ENGINE when used to find out how to deal with 561 * Registered by the ENGINE when used to find out how to deal with
569 * a particular NID in the ENGINE. this says what we'll do at the 562 * a particular NID in the ENGINE. this says what we'll do at the
@@ -590,7 +583,13 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
590 *cipher = &cryptodev_cast_cbc; 583 *cipher = &cryptodev_cast_cbc;
591 break; 584 break;
592 case NID_aes_128_cbc: 585 case NID_aes_128_cbc:
593 *cipher = &cryptodev_aes_cbc; 586 *cipher = &cryptodev_aes_128_cbc;
587 break;
588 case NID_aes_192_cbc:
589 *cipher = &cryptodev_aes_192_cbc;
590 break;
591 case NID_aes_256_cbc:
592 *cipher = &cryptodev_aes_256_cbc;
594 break; 593 break;
595 default: 594 default:
596 *cipher = NULL; 595 *cipher = NULL;
@@ -874,7 +873,6 @@ cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
874 goto err; 873 goto err;
875 } 874 }
876 875
877 printf("bar\n");
878 memset(&kop, 0, sizeof kop); 876 memset(&kop, 0, sizeof kop);
879 kop.crk_op = CRK_DSA_SIGN; 877 kop.crk_op = CRK_DSA_SIGN;
880 878
diff --git a/src/lib/libssl/src/crypto/engine/hw_openbsd_dev_crypto.c b/src/lib/libssl/src/crypto/engine/hw_openbsd_dev_crypto.c
new file mode 100644
index 0000000000..b8aab545db
--- /dev/null
+++ b/src/lib/libssl/src/crypto/engine/hw_openbsd_dev_crypto.c
@@ -0,0 +1,594 @@
1/* Written by Ben Laurie <ben@algroup.co.uk> August 2001 */
2/* ====================================================================
3 * Copyright (c) 1999-2001 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 * licensing@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#include <openssl/engine.h>
57#include <openssl/evp.h>
58#include "eng_int.h"
59/* Maybe this is needed? ... */
60#ifdef FLAT_INC
61#include "evp_locl.h"
62#else
63#include "../evp/evp_locl.h"
64#endif
65#include <openssl/conf.h>
66
67#ifndef OPENSSL_OPENBSD_DEV_CRYPTO
68
69void ENGINE_load_openbsd_dev_crypto(void)
70 {
71 /* This is a NOP unless OPENSSL_OPENBSD_DEV_CRYPTO is defined */
72 return;
73 }
74
75#else /* OPENSSL_OPENBSD_DEV_CRYPTO */
76
77#include <fcntl.h>
78#include <stdio.h>
79#include <errno.h>
80#include <assert.h>
81#include <unistd.h>
82#include <sys/ioctl.h>
83
84#include <crypto/cryptodev.h>
85
86/****************************************************/
87/* Declare the normal generic ENGINE stuff here ... */
88
89static int dev_crypto_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
90 const int **nids, int nid);
91static int dev_crypto_digests(ENGINE *e, const EVP_MD **digest,
92 const int **nids, int nid);
93
94static const char dev_crypto_id[] = "openbsd_dev_crypto";
95static const char dev_crypto_name[] = "OpenBSD /dev/crypto";
96
97static long allow_misaligned;
98
99#define DEV_CRYPTO_CMD_ALLOW_MISALIGNED ENGINE_CMD_BASE
100static const ENGINE_CMD_DEFN dev_crypto_cmd_defns[]=
101 {
102 { DEV_CRYPTO_CMD_ALLOW_MISALIGNED,
103 "allow_misaligned",
104 "Permit misaligned data to be used",
105 ENGINE_CMD_FLAG_NUMERIC },
106 { 0, NULL, NULL, 0 }
107 };
108
109static int dev_crypto_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
110 {
111 switch(cmd)
112 {
113 case DEV_CRYPTO_CMD_ALLOW_MISALIGNED:
114 allow_misaligned=i;
115 printf("allow misaligned=%ld\n",allow_misaligned);
116 break;
117 }
118
119 return 1;
120 }
121
122static ENGINE *engine_openbsd_dev_crypto(void)
123 {
124 ENGINE *engine=ENGINE_new();
125
126 if(!ENGINE_set_id(engine, dev_crypto_id) ||
127 !ENGINE_set_name(engine, dev_crypto_name) ||
128 !ENGINE_set_ciphers(engine, dev_crypto_ciphers) ||
129 !ENGINE_set_digests(engine, dev_crypto_digests) ||
130 !ENGINE_set_ctrl_function(engine, dev_crypto_ctrl) ||
131 !ENGINE_set_cmd_defns(engine, dev_crypto_cmd_defns))
132 {
133 ENGINE_free(engine);
134 return NULL;
135 }
136
137 return engine;
138 }
139
140void ENGINE_load_openbsd_dev_crypto(void)
141 {
142 /* Copied from eng_[openssl|dyn].c */
143 ENGINE *toadd = engine_openbsd_dev_crypto();
144 if(!toadd) return;
145 ENGINE_add(toadd);
146 ENGINE_free(toadd);
147 ERR_clear_error();
148 }
149
150/******************************************************************************/
151/* Clip in the stuff from crypto/evp/openbsd_hw.c here. NB: What has changed? */
152/* I've removed the exposed EVP_*** functions, they're accessed through the */
153/* "dev_crypto_[ciphers|digests]" handlers. I've also moved the EVP_CIPHER */
154/* and EVP_MD structures to the bottom where they are close to the handlers */
155/* that expose them. What should be done? The global data (file-descriptors, */
156/* etc) should be put into ENGINE's ex_data support, and per-context data */
157/* (also file-descriptors perhaps) should be put into the contexts. Also code */
158/* formatting, fprintf statements, and OpenSSL-style error handling should be */
159/* added (dynamically, like the other ENGINEs). Also, "dynamic" support */
160/* be added to this ENGINE once it's up and running so that it could be built */
161/* as a shared-library. What else? device initialisation should take place */
162/* inside an ENGINE 'init()' handler (and likewise 'finish()'). ciphers and */
163/* digests won't be used by the framework unless the ENGINE has been */
164/* successfully initialised (that's one of the things you get for free) so */
165/* initialisation, including returning failure if device setup fails, can be */
166/* handled quite cleanly. This could presumably handle the opening (and then */
167/* closing inside 'finish()') of the 'cryptodev_fd' file-descriptor). */
168
169/* longest key supported in hardware */
170#define MAX_HW_KEY 24
171#define MAX_HW_IV 8
172
173#define MD5_DIGEST_LENGTH 16
174#define MD5_CBLOCK 64
175
176static int fd;
177static int dev_failed;
178
179typedef struct session_op session_op;
180
181#define CDATA(ctx) EVP_C_DATA(session_op,ctx)
182
183static void err(const char *str)
184 {
185 fprintf(stderr,"%s: errno %d\n",str,errno);
186 }
187
188static int dev_crypto_init(session_op *ses)
189 {
190 if(dev_failed)
191 return 0;
192 if(!fd)
193 {
194 int cryptodev_fd;
195
196 if ((cryptodev_fd=open("/dev/crypto",O_RDWR,0)) < 0)
197 {
198 err("/dev/crypto");
199 dev_failed=1;
200 return 0;
201 }
202 if (ioctl(cryptodev_fd,CRIOGET,&fd) == -1)
203 {
204 err("CRIOGET failed");
205 close(cryptodev_fd);
206 dev_failed=1;
207 return 0;
208 }
209 close(cryptodev_fd);
210 }
211 assert(ses);
212 memset(ses,'\0',sizeof *ses);
213
214 return 1;
215 }
216
217static int dev_crypto_cleanup(EVP_CIPHER_CTX *ctx)
218 {
219 fprintf(stderr,"cleanup %d\n",CDATA(ctx)->ses);
220 if(ioctl(fd,CIOCFSESSION,&CDATA(ctx)->ses) == -1)
221 err("CIOCFSESSION failed");
222
223 OPENSSL_free(CDATA(ctx)->key);
224
225 return 1;
226 }
227
228static int dev_crypto_init_key(EVP_CIPHER_CTX *ctx,int cipher,
229 const unsigned char *key,int klen)
230 {
231 if(!dev_crypto_init(CDATA(ctx)))
232 return 0;
233
234 CDATA(ctx)->key=OPENSSL_malloc(MAX_HW_KEY);
235
236 assert(ctx->cipher->iv_len <= MAX_HW_IV);
237
238 memcpy(CDATA(ctx)->key,key,klen);
239
240 CDATA(ctx)->cipher=cipher;
241 CDATA(ctx)->keylen=klen;
242
243 if (ioctl(fd,CIOCGSESSION,CDATA(ctx)) == -1)
244 {
245 err("CIOCGSESSION failed");
246 return 0;
247 }
248 return 1;
249 }
250
251static int dev_crypto_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out,
252 const unsigned char *in,unsigned int inl)
253 {
254 struct crypt_op cryp;
255 unsigned char lb[MAX_HW_IV];
256
257 if(!inl)
258 return 1;
259
260 assert(CDATA(ctx));
261 assert(!dev_failed);
262
263 memset(&cryp,'\0',sizeof cryp);
264 cryp.ses=CDATA(ctx)->ses;
265 cryp.op=ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT;
266 cryp.flags=0;
267 cryp.len=inl;
268 assert((inl&(ctx->cipher->block_size-1)) == 0);
269 cryp.src=(caddr_t)in;
270 cryp.dst=(caddr_t)out;
271 cryp.mac=0;
272 if(ctx->cipher->iv_len)
273 cryp.iv=(caddr_t)ctx->iv;
274
275 if(!ctx->encrypt)
276 memcpy(lb,&in[cryp.len-ctx->cipher->iv_len],ctx->cipher->iv_len);
277
278 if(ioctl(fd, CIOCCRYPT, &cryp) == -1)
279 {
280 if(errno == EINVAL) /* buffers are misaligned */
281 {
282 unsigned int cinl=0;
283 char *cin=NULL;
284 char *cout=NULL;
285
286 /* NB: this can only make cinl != inl with stream ciphers */
287 cinl=(inl+3)/4*4;
288
289 if(((unsigned long)in&3) || cinl != inl)
290 {
291 cin=OPENSSL_malloc(cinl);
292 memcpy(cin,in,inl);
293 cryp.src=cin;
294 }
295
296 if(((unsigned long)out&3) || cinl != inl)
297 {
298 cout=OPENSSL_malloc(cinl);
299 cryp.dst=cout;
300 }
301
302 cryp.len=cinl;
303
304 if(ioctl(fd, CIOCCRYPT, &cryp) == -1)
305 {
306 err("CIOCCRYPT(2) failed");
307 printf("src=%p dst=%p\n",cryp.src,cryp.dst);
308 abort();
309 return 0;
310 }
311
312 if(cout)
313 {
314 memcpy(out,cout,inl);
315 OPENSSL_free(cout);
316 }
317 if(cin)
318 OPENSSL_free(cin);
319 }
320 else
321 {
322 err("CIOCCRYPT failed");
323 abort();
324 return 0;
325 }
326 }
327
328 if(ctx->encrypt)
329 memcpy(ctx->iv,&out[cryp.len-ctx->cipher->iv_len],ctx->cipher->iv_len);
330 else
331 memcpy(ctx->iv,lb,ctx->cipher->iv_len);
332
333 return 1;
334 }
335
336static int dev_crypto_des_ede3_init_key(EVP_CIPHER_CTX *ctx,
337 const unsigned char *key,
338 const unsigned char *iv, int enc)
339 { return dev_crypto_init_key(ctx,CRYPTO_3DES_CBC,key,24); }
340
341static int dev_crypto_rc4_init_key(EVP_CIPHER_CTX *ctx,
342 const unsigned char *key,
343 const unsigned char *iv, int enc)
344 { return dev_crypto_init_key(ctx,CRYPTO_ARC4,key,16); }
345
346typedef struct
347 {
348 session_op sess;
349 char *data;
350 int len;
351 unsigned char md[EVP_MAX_MD_SIZE];
352 } MD_DATA;
353
354static int dev_crypto_init_digest(MD_DATA *md_data,int mac)
355 {
356 if(!dev_crypto_init(&md_data->sess))
357 return 0;
358
359 md_data->len=0;
360 md_data->data=NULL;
361
362 md_data->sess.mac=mac;
363
364 if (ioctl(fd,CIOCGSESSION,&md_data->sess) == -1)
365 {
366 err("CIOCGSESSION failed");
367 return 0;
368 }
369 fprintf(stderr,"opened %d\n",md_data->sess.ses);
370 return 1;
371 }
372
373static int dev_crypto_cleanup_digest(MD_DATA *md_data)
374 {
375 fprintf(stderr,"cleanup %d\n",md_data->sess.ses);
376 if (ioctl(fd,CIOCFSESSION,&md_data->sess.ses) == -1)
377 {
378 err("CIOCFSESSION failed");
379 return 0;
380 }
381
382 return 1;
383 }
384
385/* FIXME: if device can do chained MACs, then don't accumulate */
386/* FIXME: move accumulation to the framework */
387static int dev_crypto_md5_init(EVP_MD_CTX *ctx)
388 { return dev_crypto_init_digest(ctx->md_data,CRYPTO_MD5); }
389
390static int do_digest(int ses,unsigned char *md,const void *data,int len)
391 {
392 struct crypt_op cryp;
393 static unsigned char md5zero[16]=
394 {
395 0xd4,0x1d,0x8c,0xd9,0x8f,0x00,0xb2,0x04,
396 0xe9,0x80,0x09,0x98,0xec,0xf8,0x42,0x7e
397 };
398
399 /* some cards can't do zero length */
400 if(!len)
401 {
402 memcpy(md,md5zero,16);
403 return 1;
404 }
405
406 memset(&cryp,'\0',sizeof cryp);
407 cryp.ses=ses;
408 cryp.op=COP_ENCRYPT;/* required to do the MAC rather than check it */
409 cryp.len=len;
410 cryp.src=(caddr_t)data;
411 cryp.dst=(caddr_t)data; /* FIXME!!! */
412 cryp.mac=(caddr_t)md;
413
414 if(ioctl(fd, CIOCCRYPT, &cryp) == -1)
415 {
416 if(errno == EINVAL && allow_misaligned) /* buffer is misaligned */
417 {
418 char *dcopy;
419
420 dcopy=OPENSSL_malloc(len);
421 memcpy(dcopy,data,len);
422 cryp.src=dcopy;
423 cryp.dst=cryp.src; /* FIXME!!! */
424
425 if(ioctl(fd, CIOCCRYPT, &cryp) == -1)
426 {
427 err("CIOCCRYPT(MAC2) failed");
428 abort();
429 return 0;
430 }
431 OPENSSL_free(dcopy);
432 }
433 else
434 {
435 err("CIOCCRYPT(MAC) failed");
436 abort();
437 return 0;
438 }
439 }
440 /* printf("done\n"); */
441
442 return 1;
443 }
444
445static int dev_crypto_md5_update(EVP_MD_CTX *ctx,const void *data,
446 unsigned long len)
447 {
448 MD_DATA *md_data=ctx->md_data;
449
450 if(ctx->flags&EVP_MD_CTX_FLAG_ONESHOT)
451 return do_digest(md_data->sess.ses,md_data->md,data,len);
452
453 md_data->data=OPENSSL_realloc(md_data->data,md_data->len+len);
454 memcpy(md_data->data+md_data->len,data,len);
455 md_data->len+=len;
456
457 return 1;
458 }
459
460static int dev_crypto_md5_final(EVP_MD_CTX *ctx,unsigned char *md)
461 {
462 int ret;
463 MD_DATA *md_data=ctx->md_data;
464
465 if(ctx->flags&EVP_MD_CTX_FLAG_ONESHOT)
466 {
467 memcpy(md,md_data->md,MD5_DIGEST_LENGTH);
468 ret=1;
469 }
470 else
471 {
472 ret=do_digest(md_data->sess.ses,md,md_data->data,md_data->len);
473 OPENSSL_free(md_data->data);
474 md_data->data=NULL;
475 md_data->len=0;
476 }
477
478 return ret;
479 }
480
481static int dev_crypto_md5_copy(EVP_MD_CTX *to,const EVP_MD_CTX *from)
482 {
483 const MD_DATA *from_md=from->md_data;
484 MD_DATA *to_md=to->md_data;
485
486 /* How do we copy sessions? */
487 assert(from->digest->flags&EVP_MD_FLAG_ONESHOT);
488
489 to_md->data=OPENSSL_malloc(from_md->len);
490 memcpy(to_md->data,from_md->data,from_md->len);
491
492 return 1;
493 }
494
495static int dev_crypto_md5_cleanup(EVP_MD_CTX *ctx)
496 {
497 return dev_crypto_cleanup_digest(ctx->md_data);
498 }
499
500/**************************************************************************/
501/* Here are the moved declarations of the EVP_CIPHER and EVP_MD */
502/* implementations. They're down here to be within easy editor-distance */
503/* of the digests and ciphers handler functions. */
504
505#define dev_crypto_des_ede3_cbc_cipher dev_crypto_cipher
506
507BLOCK_CIPHER_def_cbc(dev_crypto_des_ede3, session_op, NID_des_ede3, 8, 24, 8,
508 0, dev_crypto_des_ede3_init_key,
509 dev_crypto_cleanup,
510 EVP_CIPHER_set_asn1_iv,
511 EVP_CIPHER_get_asn1_iv,
512 NULL)
513
514static const EVP_CIPHER r4_cipher=
515 {
516 NID_rc4,
517 1,16,0, /* FIXME: key should be up to 256 bytes */
518 EVP_CIPH_VARIABLE_LENGTH,
519 dev_crypto_rc4_init_key,
520 dev_crypto_cipher,
521 dev_crypto_cleanup,
522 sizeof(session_op),
523 NULL,
524 NULL,
525 NULL
526 };
527
528static const EVP_MD md5_md=
529 {
530 NID_md5,
531 NID_md5WithRSAEncryption,
532 MD5_DIGEST_LENGTH,
533 EVP_MD_FLAG_ONESHOT, /* XXX: set according to device info... */
534 dev_crypto_md5_init,
535 dev_crypto_md5_update,
536 dev_crypto_md5_final,
537 dev_crypto_md5_copy,
538 dev_crypto_md5_cleanup,
539 EVP_PKEY_RSA_method,
540 MD5_CBLOCK,
541 sizeof(MD_DATA),
542 };
543
544/****************************************************************/
545/* Implement the dev_crypto_[ciphers|digests] handlers here ... */
546
547static int cipher_nids[] = {NID_des_ede3_cbc, NID_rc4};
548static int cipher_nids_num = 2;
549static int digest_nids[] = {NID_md5};
550static int digest_nids_num = 1;
551
552static int dev_crypto_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
553 const int **nids, int nid)
554 {
555 if(!cipher)
556 {
557 /* We are returning a list of supported nids */
558 *nids = cipher_nids;
559 return cipher_nids_num;
560 }
561 /* We are being asked for a specific cipher */
562 if(nid == NID_rc4)
563 *cipher = &r4_cipher;
564 else if(nid == NID_des_ede3_cbc)
565 *cipher = &dev_crypto_des_ede3_cbc;
566 else
567 {
568 *cipher = NULL;
569 return 0;
570 }
571 return 1;
572 }
573
574static int dev_crypto_digests(ENGINE *e, const EVP_MD **digest,
575 const int **nids, int nid)
576 {
577 if(!digest)
578 {
579 /* We are returning a list of supported nids */
580 *nids = digest_nids;
581 return digest_nids_num;
582 }
583 /* We are being asked for a specific digest */
584 if(nid == NID_md5)
585 *digest = &md5_md;
586 else
587 {
588 *digest = NULL;
589 return 0;
590 }
591 return 1;
592 }
593
594#endif /* OPENSSL_OPENBSD_DEV_CRYPTO */
diff --git a/src/lib/libssl/src/crypto/engine/hw_ubsec.c b/src/lib/libssl/src/crypto/engine/hw_ubsec.c
index 5234a08a07..6286dd851c 100644
--- a/src/lib/libssl/src/crypto/engine/hw_ubsec.c
+++ b/src/lib/libssl/src/crypto/engine/hw_ubsec.c
@@ -561,6 +561,7 @@ static int ubsec_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
561 UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_BN_EXPAND_FAIL); 561 UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_BN_EXPAND_FAIL);
562 return 0; 562 return 0;
563 } 563 }
564 memset(r->d, 0, BN_num_bytes(m));
564 565
565 if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) { 566 if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
566 fd = 0; 567 fd = 0;
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 633a1addfe..a4f4a260af 100644
--- a/src/lib/libssl/src/crypto/err/err.c
+++ b/src/lib/libssl/src/crypto/err/err.c
@@ -225,7 +225,6 @@ struct st_ERR_FNS
225 ERR_STRING_DATA *(*cb_err_del_item)(ERR_STRING_DATA *); 225 ERR_STRING_DATA *(*cb_err_del_item)(ERR_STRING_DATA *);
226 /* Works on the "thread_hash" error-state table */ 226 /* Works on the "thread_hash" error-state table */
227 LHASH *(*cb_thread_get)(int create); 227 LHASH *(*cb_thread_get)(int create);
228 void (*cb_thread_release)(LHASH **hash);
229 ERR_STATE *(*cb_thread_get_item)(const ERR_STATE *); 228 ERR_STATE *(*cb_thread_get_item)(const ERR_STATE *);
230 ERR_STATE *(*cb_thread_set_item)(ERR_STATE *); 229 ERR_STATE *(*cb_thread_set_item)(ERR_STATE *);
231 void (*cb_thread_del_item)(const ERR_STATE *); 230 void (*cb_thread_del_item)(const ERR_STATE *);
@@ -240,7 +239,6 @@ static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *);
240static ERR_STRING_DATA *int_err_set_item(ERR_STRING_DATA *); 239static ERR_STRING_DATA *int_err_set_item(ERR_STRING_DATA *);
241static ERR_STRING_DATA *int_err_del_item(ERR_STRING_DATA *); 240static ERR_STRING_DATA *int_err_del_item(ERR_STRING_DATA *);
242static LHASH *int_thread_get(int create); 241static LHASH *int_thread_get(int create);
243static void int_thread_release(LHASH **hash);
244static ERR_STATE *int_thread_get_item(const ERR_STATE *); 242static ERR_STATE *int_thread_get_item(const ERR_STATE *);
245static ERR_STATE *int_thread_set_item(ERR_STATE *); 243static ERR_STATE *int_thread_set_item(ERR_STATE *);
246static void int_thread_del_item(const ERR_STATE *); 244static void int_thread_del_item(const ERR_STATE *);
@@ -254,7 +252,6 @@ static const ERR_FNS err_defaults =
254 int_err_set_item, 252 int_err_set_item,
255 int_err_del_item, 253 int_err_del_item,
256 int_thread_get, 254 int_thread_get,
257 int_thread_release,
258 int_thread_get_item, 255 int_thread_get_item,
259 int_thread_set_item, 256 int_thread_set_item,
260 int_thread_del_item, 257 int_thread_del_item,
@@ -274,7 +271,6 @@ static const ERR_FNS *err_fns = NULL;
274 * and state in the loading application. */ 271 * and state in the loading application. */
275static LHASH *int_error_hash = NULL; 272static LHASH *int_error_hash = NULL;
276static LHASH *int_thread_hash = NULL; 273static LHASH *int_thread_hash = NULL;
277static int int_thread_hash_references = 0;
278static int int_err_library_number= ERR_LIB_USER; 274static int int_err_library_number= ERR_LIB_USER;
279 275
280/* Internal function that checks whether "err_fns" is set and if not, sets it to 276/* Internal function that checks whether "err_fns" is set and if not, sets it to
@@ -421,37 +417,11 @@ static LHASH *int_thread_get(int create)
421 CRYPTO_pop_info(); 417 CRYPTO_pop_info();
422 } 418 }
423 if (int_thread_hash) 419 if (int_thread_hash)
424 {
425 int_thread_hash_references++;
426 ret = int_thread_hash; 420 ret = int_thread_hash;
427 }
428 CRYPTO_w_unlock(CRYPTO_LOCK_ERR); 421 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
429 return ret; 422 return ret;
430 } 423 }
431 424
432static void int_thread_release(LHASH **hash)
433 {
434 int i;
435
436 if (hash == NULL || *hash == NULL)
437 return;
438
439 i = CRYPTO_add(&int_thread_hash_references, -1, CRYPTO_LOCK_ERR);
440
441#ifdef REF_PRINT
442 fprintf(stderr,"%4d:%s\n",int_thread_hash_references,"ERR");
443#endif
444 if (i > 0) return;
445#ifdef REF_CHECK
446 if (i < 0)
447 {
448 fprintf(stderr,"int_thread_release, bad reference count\n");
449 abort(); /* ok */
450 }
451#endif
452 *hash = NULL;
453 }
454
455static ERR_STATE *int_thread_get_item(const ERR_STATE *d) 425static ERR_STATE *int_thread_get_item(const ERR_STATE *d)
456 { 426 {
457 ERR_STATE *p; 427 ERR_STATE *p;
@@ -466,7 +436,6 @@ static ERR_STATE *int_thread_get_item(const ERR_STATE *d)
466 p = (ERR_STATE *)lh_retrieve(hash, d); 436 p = (ERR_STATE *)lh_retrieve(hash, d);
467 CRYPTO_r_unlock(CRYPTO_LOCK_ERR); 437 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
468 438
469 ERRFN(thread_release)(&hash);
470 return p; 439 return p;
471 } 440 }
472 441
@@ -484,7 +453,6 @@ static ERR_STATE *int_thread_set_item(ERR_STATE *d)
484 p = (ERR_STATE *)lh_insert(hash, d); 453 p = (ERR_STATE *)lh_insert(hash, d);
485 CRYPTO_w_unlock(CRYPTO_LOCK_ERR); 454 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
486 455
487 ERRFN(thread_release)(&hash);
488 return p; 456 return p;
489 } 457 }
490 458
@@ -501,15 +469,13 @@ static void int_thread_del_item(const ERR_STATE *d)
501 CRYPTO_w_lock(CRYPTO_LOCK_ERR); 469 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
502 p = (ERR_STATE *)lh_delete(hash, d); 470 p = (ERR_STATE *)lh_delete(hash, d);
503 /* make sure we don't leak memory */ 471 /* make sure we don't leak memory */
504 if (int_thread_hash_references == 1 472 if (int_thread_hash && (lh_num_items(int_thread_hash) == 0))
505 && int_thread_hash && (lh_num_items(int_thread_hash) == 0))
506 { 473 {
507 lh_free(int_thread_hash); 474 lh_free(int_thread_hash);
508 int_thread_hash = NULL; 475 int_thread_hash = NULL;
509 } 476 }
510 CRYPTO_w_unlock(CRYPTO_LOCK_ERR); 477 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
511 478
512 ERRFN(thread_release)(&hash);
513 if (p) 479 if (p)
514 ERR_STATE_free(p); 480 ERR_STATE_free(p);
515 } 481 }
@@ -879,12 +845,6 @@ LHASH *ERR_get_err_state_table(void)
879 return ERRFN(thread_get)(0); 845 return ERRFN(thread_get)(0);
880 } 846 }
881 847
882void ERR_release_err_state_table(LHASH **hash)
883 {
884 err_fns_check();
885 ERRFN(thread_release)(hash);
886 }
887
888const char *ERR_lib_error_string(unsigned long e) 848const char *ERR_lib_error_string(unsigned long e)
889 { 849 {
890 ERR_STRING_DATA d,*p; 850 ERR_STRING_DATA d,*p;
@@ -1065,7 +1025,7 @@ void ERR_add_error_data(int num, ...)
1065 else 1025 else
1066 str=p; 1026 str=p;
1067 } 1027 }
1068 strcat(str,a); 1028 strlcat(str,a,s+1);
1069 } 1029 }
1070 } 1030 }
1071 ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING); 1031 ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING);
diff --git a/src/lib/libssl/src/crypto/err/err.h b/src/lib/libssl/src/crypto/err/err.h
index 8faa3a7b4f..988ef81aa0 100644
--- a/src/lib/libssl/src/crypto/err/err.h
+++ b/src/lib/libssl/src/crypto/err/err.h
@@ -278,7 +278,6 @@ ERR_STATE *ERR_get_state(void);
278#ifndef OPENSSL_NO_LHASH 278#ifndef OPENSSL_NO_LHASH
279LHASH *ERR_get_string_table(void); 279LHASH *ERR_get_string_table(void);
280LHASH *ERR_get_err_state_table(void); 280LHASH *ERR_get_err_state_table(void);
281void ERR_release_err_state_table(LHASH **hash);
282#endif 281#endif
283 282
284int ERR_get_next_error_library(void); 283int ERR_get_next_error_library(void);
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..b4172406ae
--- /dev/null
+++ b/src/lib/libssl/src/crypto/evp/Makefile.ssl
@@ -0,0 +1,1058 @@
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/err.h
189c_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
190c_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
191c_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
192c_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
193c_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
194c_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
195c_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
196c_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
197c_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
198c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
199c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
200c_all.o: ../../include/openssl/ui_compat.h ../cryptlib.h c_all.c
201c_allc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
202c_allc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
203c_allc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
204c_allc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
205c_allc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
206c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
207c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
208c_allc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
209c_allc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
210c_allc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
211c_allc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
212c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
213c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
214c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
215c_allc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
216c_allc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
217c_allc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
218c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
219c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
220c_allc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
221c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_allc.c
222c_alld.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
223c_alld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
224c_alld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
225c_alld.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
226c_alld.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
227c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
228c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
229c_alld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
230c_alld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
231c_alld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
232c_alld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
233c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
234c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
235c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
236c_alld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
237c_alld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
238c_alld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
239c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
240c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
241c_alld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
242c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_alld.c
243digest.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
244digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
245digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
246digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
247digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
248digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
249digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
250digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
251digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
252digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
253digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
254digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
255digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
256digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
257digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
258digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
259digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
260digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
261digest.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
262digest.o: ../../include/openssl/ui_compat.h ../cryptlib.h digest.c
263e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
264e_aes.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
265e_aes.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
266e_aes.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
267e_aes.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
268e_aes.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
269e_aes.o: ../../include/openssl/err.h ../../include/openssl/evp.h
270e_aes.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
271e_aes.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
272e_aes.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
273e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
274e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
275e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
276e_aes.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
277e_aes.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
278e_aes.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
279e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
280e_aes.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h e_aes.c
281e_aes.o: evp_locl.h
282e_bf.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
283e_bf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
284e_bf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
285e_bf.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
286e_bf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
287e_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
288e_bf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
289e_bf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
290e_bf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
291e_bf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
292e_bf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
293e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
294e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
295e_bf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
296e_bf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
297e_bf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
298e_bf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
299e_bf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
300e_bf.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_bf.c evp_locl.h
301e_cast.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
302e_cast.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
303e_cast.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
304e_cast.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
305e_cast.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
306e_cast.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
307e_cast.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
308e_cast.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
309e_cast.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
310e_cast.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
311e_cast.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
312e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
313e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
314e_cast.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
315e_cast.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
316e_cast.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
317e_cast.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
318e_cast.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
319e_cast.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_cast.c evp_locl.h
320e_des.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
321e_des.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
322e_des.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
323e_des.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
324e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
325e_des.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
326e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
327e_des.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
328e_des.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
329e_des.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
330e_des.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
331e_des.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
332e_des.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
333e_des.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
334e_des.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
335e_des.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
336e_des.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
337e_des.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
338e_des.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des.c evp_locl.h
339e_des3.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
340e_des3.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
341e_des3.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
342e_des3.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
343e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
344e_des3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
345e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
346e_des3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
347e_des3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
348e_des3.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
349e_des3.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
350e_des3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
351e_des3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
352e_des3.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
353e_des3.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
354e_des3.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
355e_des3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
356e_des3.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
357e_des3.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des3.c evp_locl.h
358e_idea.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
359e_idea.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
360e_idea.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
361e_idea.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
362e_idea.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
363e_idea.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
364e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
365e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
366e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
367e_idea.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
368e_idea.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
369e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
370e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
371e_idea.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
372e_idea.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
373e_idea.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
374e_idea.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
375e_idea.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
376e_idea.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_idea.c evp_locl.h
377e_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
378e_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
379e_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
380e_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
381e_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
382e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
383e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
384e_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
385e_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
386e_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
387e_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
388e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
389e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
390e_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
391e_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
392e_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
393e_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
394e_null.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
395e_null.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_null.c
396e_rc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
397e_rc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
398e_rc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
399e_rc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
400e_rc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
401e_rc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
402e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
403e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
404e_rc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
405e_rc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
406e_rc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
407e_rc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
408e_rc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
409e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
410e_rc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
411e_rc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
412e_rc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
413e_rc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
414e_rc2.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc2.c evp_locl.h
415e_rc4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
416e_rc4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
417e_rc4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
418e_rc4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
419e_rc4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
420e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
421e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
422e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
423e_rc4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
424e_rc4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
425e_rc4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
426e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
427e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
428e_rc4.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
429e_rc4.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
430e_rc4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
431e_rc4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
432e_rc4.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
433e_rc4.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc4.c
434e_rc5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
435e_rc5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
436e_rc5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
437e_rc5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
438e_rc5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
439e_rc5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
440e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
441e_rc5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
442e_rc5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
443e_rc5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
444e_rc5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
445e_rc5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
446e_rc5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
447e_rc5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
448e_rc5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
449e_rc5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
450e_rc5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
451e_rc5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
452e_rc5.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc5.c evp_locl.h
453e_xcbc_d.o: ../../e_os.h ../../include/openssl/aes.h
454e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
455e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
456e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
457e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
458e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
459e_xcbc_d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
460e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
461e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
462e_xcbc_d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
463e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
464e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
465e_xcbc_d.o: ../../include/openssl/opensslconf.h
466e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
467e_xcbc_d.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
468e_xcbc_d.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
469e_xcbc_d.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
470e_xcbc_d.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
471e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
472e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c
473encode.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
474encode.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
475encode.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
476encode.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
477encode.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
478encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
479encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
480encode.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
481encode.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
482encode.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
483encode.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
484encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
485encode.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
486encode.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
487encode.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
488encode.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
489encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
490encode.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
491encode.o: ../../include/openssl/ui_compat.h ../cryptlib.h encode.c
492evp_acnf.o: ../../e_os.h ../../include/openssl/aes.h
493evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
494evp_acnf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
495evp_acnf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
496evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
497evp_acnf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
498evp_acnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
499evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
500evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
501evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
502evp_acnf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
503evp_acnf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
504evp_acnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
505evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
506evp_acnf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
507evp_acnf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
508evp_acnf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
509evp_acnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
510evp_acnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
511evp_acnf.o: ../../include/openssl/ui_compat.h ../cryptlib.h evp_acnf.c
512evp_enc.o: ../../e_os.h ../../include/openssl/aes.h
513evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
514evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
515evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
516evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
517evp_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
518evp_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
519evp_enc.o: ../../include/openssl/engine.h ../../include/openssl/err.h
520evp_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
521evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
522evp_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
523evp_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
524evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
525evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
526evp_enc.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
527evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
528evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
529evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
530evp_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
531evp_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
532evp_enc.o: ../cryptlib.h evp_enc.c evp_locl.h
533evp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
534evp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
535evp_err.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
536evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
537evp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
538evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
539evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h
540evp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
541evp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
542evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
543evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
544evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
545evp_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
546evp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
547evp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
548evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
549evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
550evp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
551evp_err.o: evp_err.c
552evp_key.o: ../../e_os.h ../../include/openssl/aes.h
553evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
554evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
555evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
556evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
557evp_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
558evp_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
559evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h
560evp_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
561evp_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
562evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
563evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
564evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
565evp_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
566evp_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
567evp_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
568evp_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
569evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
570evp_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
571evp_key.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
572evp_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_key.c
573evp_lib.o: ../../e_os.h ../../include/openssl/aes.h
574evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
575evp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
576evp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
577evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
578evp_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
579evp_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
580evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
581evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
582evp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
583evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
584evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
585evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
586evp_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
587evp_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
588evp_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
589evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
590evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
591evp_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
592evp_lib.o: ../cryptlib.h evp_lib.c
593evp_pbe.o: ../../e_os.h ../../include/openssl/aes.h
594evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
595evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
596evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
597evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
598evp_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
599evp_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
600evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h
601evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
602evp_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
603evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
604evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
605evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
606evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
607evp_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
608evp_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
609evp_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
610evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
611evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
612evp_pbe.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
613evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pbe.c
614evp_pkey.o: ../../e_os.h ../../include/openssl/aes.h
615evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
616evp_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
617evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
618evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
619evp_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
620evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
621evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
622evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
623evp_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
624evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
625evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
626evp_pkey.o: ../../include/openssl/opensslconf.h
627evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
628evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
629evp_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
630evp_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
631evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
632evp_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
633evp_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
634evp_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
635evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pkey.c
636m_dss.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
637m_dss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
638m_dss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
639m_dss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
640m_dss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
641m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
642m_dss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
643m_dss.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
644m_dss.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
645m_dss.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
646m_dss.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
647m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
648m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
649m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
650m_dss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
651m_dss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
652m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
653m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
654m_dss.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
655m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
656m_dss.o: ../cryptlib.h m_dss.c
657m_dss1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
658m_dss1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
659m_dss1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
660m_dss1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
661m_dss1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
662m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
663m_dss1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
664m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
665m_dss1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
666m_dss1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
667m_dss1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
668m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
669m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
670m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
671m_dss1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
672m_dss1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
673m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
674m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
675m_dss1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
676m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
677m_dss1.o: ../cryptlib.h m_dss1.c
678m_md2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
679m_md2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
680m_md2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
681m_md2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
682m_md2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
683m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
684m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
685m_md2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
686m_md2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
687m_md2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
688m_md2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
689m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
690m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
691m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
692m_md2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
693m_md2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
694m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
695m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
696m_md2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
697m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
698m_md2.o: ../cryptlib.h m_md2.c
699m_md4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
700m_md4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
701m_md4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
702m_md4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
703m_md4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
704m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
705m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
706m_md4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
707m_md4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
708m_md4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
709m_md4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
710m_md4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
711m_md4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
712m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
713m_md4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
714m_md4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
715m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
716m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
717m_md4.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
718m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
719m_md4.o: ../cryptlib.h m_md4.c
720m_md5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
721m_md5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
722m_md5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
723m_md5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
724m_md5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
725m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
726m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
727m_md5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
728m_md5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
729m_md5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
730m_md5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
731m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
732m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
733m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
734m_md5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
735m_md5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
736m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
737m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
738m_md5.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
739m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
740m_md5.o: ../cryptlib.h m_md5.c
741m_mdc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
742m_mdc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
743m_mdc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
744m_mdc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
745m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
746m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
747m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
748m_mdc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
749m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
750m_mdc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
751m_mdc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
752m_mdc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
753m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
754m_mdc2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
755m_mdc2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
756m_mdc2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
757m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
758m_mdc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
759m_mdc2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
760m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
761m_mdc2.o: ../cryptlib.h m_mdc2.c
762m_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
763m_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
764m_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
765m_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
766m_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
767m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
768m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
769m_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
770m_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
771m_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
772m_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
773m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
774m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
775m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
776m_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
777m_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
778m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
779m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
780m_null.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
781m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
782m_null.o: ../cryptlib.h m_null.c
783m_ripemd.o: ../../e_os.h ../../include/openssl/aes.h
784m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
785m_ripemd.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
786m_ripemd.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
787m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
788m_ripemd.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
789m_ripemd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
790m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h
791m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
792m_ripemd.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
793m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
794m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
795m_ripemd.o: ../../include/openssl/opensslconf.h
796m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
797m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
798m_ripemd.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
799m_ripemd.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
800m_ripemd.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
801m_ripemd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
802m_ripemd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
803m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
804m_ripemd.o: ../cryptlib.h m_ripemd.c
805m_sha.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
806m_sha.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
807m_sha.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
808m_sha.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
809m_sha.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
810m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
811m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
812m_sha.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
813m_sha.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
814m_sha.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
815m_sha.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
816m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
817m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
818m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
819m_sha.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
820m_sha.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
821m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
822m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
823m_sha.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
824m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
825m_sha.o: ../cryptlib.h m_sha.c
826m_sha1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
827m_sha1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
828m_sha1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
829m_sha1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
830m_sha1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
831m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
832m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
833m_sha1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
834m_sha1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
835m_sha1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
836m_sha1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
837m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
838m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
839m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
840m_sha1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
841m_sha1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
842m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
843m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
844m_sha1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
845m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
846m_sha1.o: ../cryptlib.h m_sha1.c
847names.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
848names.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
849names.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
850names.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
851names.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
852names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
853names.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
854names.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
855names.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
856names.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
857names.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
858names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
859names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
860names.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
861names.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
862names.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
863names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
864names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
865names.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
866names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
867names.o: ../cryptlib.h names.c
868p5_crpt.o: ../../e_os.h ../../include/openssl/aes.h
869p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
870p5_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
871p5_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
872p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
873p5_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
874p5_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
875p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h
876p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
877p5_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
878p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
879p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
880p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
881p5_crpt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
882p5_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
883p5_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
884p5_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
885p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
886p5_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
887p5_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
888p5_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt.c
889p5_crpt2.o: ../../e_os.h ../../include/openssl/aes.h
890p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
891p5_crpt2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
892p5_crpt2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
893p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
894p5_crpt2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
895p5_crpt2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
896p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
897p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h
898p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
899p5_crpt2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
900p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
901p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
902p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
903p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
904p5_crpt2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
905p5_crpt2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
906p5_crpt2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
907p5_crpt2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
908p5_crpt2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
909p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
910p5_crpt2.o: ../cryptlib.h p5_crpt2.c
911p_dec.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
912p_dec.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
913p_dec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
914p_dec.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
915p_dec.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
916p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
917p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
918p_dec.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
919p_dec.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
920p_dec.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
921p_dec.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
922p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
923p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
924p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
925p_dec.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
926p_dec.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
927p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
928p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
929p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
930p_dec.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
931p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_dec.c
932p_enc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
933p_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
934p_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
935p_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
936p_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
937p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
938p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
939p_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
940p_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
941p_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
942p_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
943p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
944p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
945p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
946p_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
947p_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
948p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
949p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
950p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
951p_enc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
952p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_enc.c
953p_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
954p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
955p_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
956p_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
957p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
958p_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
959p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
960p_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
961p_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
962p_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
963p_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
964p_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
965p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
966p_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
967p_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
968p_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
969p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
970p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
971p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
972p_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
973p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_lib.c
974p_open.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
975p_open.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
976p_open.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
977p_open.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
978p_open.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
979p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
980p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
981p_open.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
982p_open.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
983p_open.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
984p_open.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
985p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
986p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
987p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
988p_open.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
989p_open.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
990p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
991p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
992p_open.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
993p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
994p_open.o: ../cryptlib.h p_open.c
995p_seal.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
996p_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
997p_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
998p_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
999p_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
1000p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1001p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
1002p_seal.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
1003p_seal.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1004p_seal.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1005p_seal.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
1006p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1007p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1008p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
1009p_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1010p_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1011p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1012p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1013p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
1014p_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
1015p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_seal.c
1016p_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
1017p_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
1018p_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
1019p_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
1020p_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
1021p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1022p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
1023p_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
1024p_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1025p_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1026p_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
1027p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1028p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1029p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1030p_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1031p_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1032p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
1033p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1034p_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
1035p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1036p_sign.o: ../cryptlib.h p_sign.c
1037p_verify.o: ../../e_os.h ../../include/openssl/aes.h
1038p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
1039p_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
1040p_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
1041p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1042p_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
1043p_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
1044p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1045p_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
1046p_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1047p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1048p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1049p_verify.o: ../../include/openssl/opensslconf.h
1050p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
1051p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1052p_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1053p_verify.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1054p_verify.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
1055p_verify.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1056p_verify.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
1057p_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1058p_verify.o: ../cryptlib.h p_verify.c
diff --git a/src/lib/libssl/src/crypto/evp/bio_b64.c b/src/lib/libssl/src/crypto/evp/bio_b64.c
index 33349c2f98..6e550f6a43 100644
--- a/src/lib/libssl/src/crypto/evp/bio_b64.c
+++ b/src/lib/libssl/src/crypto/evp/bio_b64.c
@@ -184,9 +184,7 @@ static int b64_read(BIO *b, char *out, int outl)
184 ret_code=0; 184 ret_code=0;
185 while (outl > 0) 185 while (outl > 0)
186 { 186 {
187 187 if (ctx->cont <= 0) break;
188 if (ctx->cont <= 0)
189 break;
190 188
191 i=BIO_read(b->next_bio,&(ctx->tmp[ctx->tmp_len]), 189 i=BIO_read(b->next_bio,&(ctx->tmp[ctx->tmp_len]),
192 B64_BLOCK_SIZE-ctx->tmp_len); 190 B64_BLOCK_SIZE-ctx->tmp_len);
@@ -197,21 +195,11 @@ static int b64_read(BIO *b, char *out, int outl)
197 195
198 /* Should be continue next time we are called? */ 196 /* Should be continue next time we are called? */
199 if (!BIO_should_retry(b->next_bio)) 197 if (!BIO_should_retry(b->next_bio))
200 {
201 ctx->cont=i; 198 ctx->cont=i;
202 /* If buffer empty break */ 199 /* else we should continue when called again */
203 if(ctx->tmp_len == 0) 200 break;
204 break;
205 /* Fall through and process what we have */
206 else
207 i = 0;
208 }
209 /* else we retry and add more data to buffer */
210 else
211 break;
212 } 201 }
213 i+=ctx->tmp_len; 202 i+=ctx->tmp_len;
214 ctx->tmp_len = i;
215 203
216 /* We need to scan, a line at a time until we 204 /* We need to scan, a line at a time until we
217 * have a valid line if we are starting. */ 205 * have a valid line if we are starting. */
@@ -267,12 +255,8 @@ static int b64_read(BIO *b, char *out, int outl)
267 * reading until a new line. */ 255 * reading until a new line. */
268 if (p == (unsigned char *)&(ctx->tmp[0])) 256 if (p == (unsigned char *)&(ctx->tmp[0]))
269 { 257 {
270 /* Check buffer full */ 258 ctx->tmp_nl=1;
271 if (i == B64_BLOCK_SIZE) 259 ctx->tmp_len=0;
272 {
273 ctx->tmp_nl=1;
274 ctx->tmp_len=0;
275 }
276 } 260 }
277 else if (p != q) /* finished on a '\n' */ 261 else if (p != q) /* finished on a '\n' */
278 { 262 {
@@ -287,11 +271,6 @@ static int b64_read(BIO *b, char *out, int outl)
287 else 271 else
288 ctx->tmp_len=0; 272 ctx->tmp_len=0;
289 } 273 }
290 /* If buffer isn't full and we can retry then
291 * restart to read in more data.
292 */
293 else if ((i < B64_BLOCK_SIZE) && (ctx->cont > 0))
294 continue;
295 274
296 if (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL) 275 if (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL)
297 { 276 {
@@ -331,8 +310,8 @@ static int b64_read(BIO *b, char *out, int outl)
331 i=EVP_DecodeUpdate(&(ctx->base64), 310 i=EVP_DecodeUpdate(&(ctx->base64),
332 (unsigned char *)ctx->buf,&ctx->buf_len, 311 (unsigned char *)ctx->buf,&ctx->buf_len,
333 (unsigned char *)ctx->tmp,i); 312 (unsigned char *)ctx->tmp,i);
334 ctx->tmp_len = 0;
335 } 313 }
314 ctx->cont=i;
336 ctx->buf_off=0; 315 ctx->buf_off=0;
337 if (i < 0) 316 if (i < 0)
338 { 317 {
@@ -505,7 +484,10 @@ again:
505 { 484 {
506 i=b64_write(b,NULL,0); 485 i=b64_write(b,NULL,0);
507 if (i < 0) 486 if (i < 0)
508 return i; 487 {
488 ret=i;
489 break;
490 }
509 } 491 }
510 if (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL) 492 if (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL)
511 { 493 {
diff --git a/src/lib/libssl/src/crypto/evp/bio_ok.c b/src/lib/libssl/src/crypto/evp/bio_ok.c
index 530ab937ce..4e3f10141b 100644
--- a/src/lib/libssl/src/crypto/evp/bio_ok.c
+++ b/src/lib/libssl/src/crypto/evp/bio_ok.c
@@ -102,7 +102,7 @@
102 102
103 *) digest is initialized with random seed instead of 103 *) digest is initialized with random seed instead of
104 standardized one. 104 standardized one.
105 *) same seed is written to ouput 105 *) same seed is written to output
106 *) well-known text is then hashed and the output 106 *) well-known text is then hashed and the output
107 of the digest is also written to output. 107 of the digest is also written to output.
108 108
diff --git a/src/lib/libssl/src/crypto/evp/c_all.c b/src/lib/libssl/src/crypto/evp/c_all.c
index fa60a73ead..1b31a14e37 100644
--- a/src/lib/libssl/src/crypto/evp/c_all.c
+++ b/src/lib/libssl/src/crypto/evp/c_all.c
@@ -59,9 +59,6 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include <openssl/evp.h> 61#include <openssl/evp.h>
62#ifndef OPENSSL_NO_ENGINE
63#include <openssl/engine.h>
64#endif
65 62
66#if 0 63#if 0
67#undef OpenSSL_add_all_algorithms 64#undef OpenSSL_add_all_algorithms
diff --git a/src/lib/libssl/src/crypto/evp/evp.h b/src/lib/libssl/src/crypto/evp/evp.h
index 45a25f968d..7b234d0ad6 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
diff --git a/src/lib/libssl/src/crypto/evp/evp_pbe.c b/src/lib/libssl/src/crypto/evp/evp_pbe.c
index 0da88fdcff..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) strcpy (obj_tmp, "NULL"); 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 34b5b1d21c..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) strcpy (obj_tmp, "NULL"); 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/md2/md2test.c b/src/lib/libssl/src/crypto/md2/md2test.c
index 9c1e28b6ce..901d0a7d8e 100644
--- a/src/lib/libssl/src/crypto/md2/md2test.c
+++ b/src/lib/libssl/src/crypto/md2/md2test.c
@@ -59,6 +59,7 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62#include <openssl/md2.h>
62 63
63#include "../e_os.h" 64#include "../e_os.h"
64 65
@@ -70,7 +71,6 @@ int main(int argc, char *argv[])
70} 71}
71#else 72#else
72#include <openssl/evp.h> 73#include <openssl/evp.h>
73#include <openssl/md2.h>
74 74
75#ifdef CHARSET_EBCDIC 75#ifdef CHARSET_EBCDIC
76#include <openssl/ebcdic.h> 76#include <openssl/ebcdic.h>
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..b11ab476d6
--- /dev/null
+++ b/src/lib/libssl/src/crypto/md5/Makefile.ssl
@@ -0,0 +1,126 @@
1#
2# SSLeay/crypto/md5/Makefile
3#
4
5DIR= md5
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
20MD5_ASM_OBJ=
21
22CFLAGS= $(INCLUDES) $(CFLAG)
23
24GENERAL=Makefile
25TEST=md5test.c
26APPS=
27
28LIB=$(TOP)/libcrypto.a
29LIBSRC=md5_dgst.c md5_one.c
30LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ)
31
32SRC= $(LIBSRC)
33
34EXHEADER= md5.h
35HEADER= md5_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/mx86-elf.s: asm/md5-586.pl ../perlasm/x86asm.pl
51 (cd asm; $(PERL) md5-586.pl elf $(CFLAGS) > mx86-elf.s)
52
53# a.out
54asm/mx86-out.o: asm/mx86unix.cpp
55 $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o
56
57# bsdi
58asm/mx86bsdi.o: asm/mx86unix.cpp
59 $(CPP) -DBSDI asm/mx86unix.cpp | sed 's/ :/:/' | as -o asm/mx86bsdi.o
60
61asm/mx86unix.cpp: asm/md5-586.pl ../perlasm/x86asm.pl
62 (cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp)
63
64asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
65 $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
66 -o asm/md5-sparcv8plus.o asm/md5-sparcv9.S
67
68# Old GNU assembler doesn't understand V9 instructions, so we
69# hire /usr/ccs/bin/as to do the job. Note that option is called
70# *-gcc27, but even gcc 2>=8 users may experience similar problem
71# if they didn't bother to upgrade GNU assembler. Such users should
72# not choose this option, but be adviced to *remove* GNU assembler
73# or upgrade it.
74asm/md5-sparcv8plus-gcc27.o: asm/md5-sparcv9.S
75 $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -E asm/md5-sparcv9.S | \
76 /usr/ccs/bin/as -xarch=v8plus - -o asm/md5-sparcv8plus-gcc27.o
77
78asm/md5-sparcv9.o: asm/md5-sparcv9.S
79 $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
80 -o asm/md5-sparcv9.o asm/md5-sparcv9.S
81
82files:
83 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
84
85links:
86 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
87 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
88 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
89 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
90
91install:
92 @for i in $(EXHEADER) ; \
93 do \
94 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
95 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
96 done;
97
98tags:
99 ctags $(SRC)
100
101tests:
102
103lint:
104 lint -DLINT $(INCLUDES) $(SRC)>fluff
105
106depend:
107 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
108
109dclean:
110 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
111 mv -f Makefile.new $(MAKEFILE)
112
113clean:
114 rm -f asm/mx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
115
116# DO NOT DELETE THIS LINE -- make depend depends on it.
117
118md5_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/md5.h
119md5_dgst.o: ../../include/openssl/opensslconf.h
120md5_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md5_dgst.c
121md5_dgst.o: md5_locl.h
122md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
123md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
124md5_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
125md5_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
126md5_one.o: md5_one.c
diff --git a/src/lib/libssl/src/crypto/md5/asm/md5-586.pl b/src/lib/libssl/src/crypto/md5/asm/md5-586.pl
index fa3fa3bed5..5fc6a205ce 100644
--- a/src/lib/libssl/src/crypto/md5/asm/md5-586.pl
+++ b/src/lib/libssl/src/crypto/md5/asm/md5-586.pl
@@ -293,7 +293,7 @@ sub md5_block
293 &mov(&DWP(12,$tmp2,"",0),$D); 293 &mov(&DWP(12,$tmp2,"",0),$D);
294 294
295 &cmp($tmp1,$X) unless $normal; # check count 295 &cmp($tmp1,$X) unless $normal; # check count
296 &jae(&label("start")) unless $normal; 296 &jge(&label("start")) unless $normal;
297 297
298 &pop("eax"); # pop the temp variable off the stack 298 &pop("eax"); # pop the temp variable off the stack
299 &pop("ebx"); 299 &pop("ebx");
diff --git a/src/lib/libssl/src/crypto/md5/asm/md5-sparcv9.S b/src/lib/libssl/src/crypto/md5/asm/md5-sparcv9.S
index db45aa4c97..a599ed5660 100644
--- a/src/lib/libssl/src/crypto/md5/asm/md5-sparcv9.S
+++ b/src/lib/libssl/src/crypto/md5/asm/md5-sparcv9.S
@@ -34,12 +34,10 @@
34 * 34 *
35 * or if above fails (it does if you have gas): 35 * or if above fails (it does if you have gas):
36 * 36 *
37 * gcc -E -DOPENSSL_SYSNAMEULTRASPARC -DMD5_BLOCK_DATA_ORDER md5_block.sparc.S | \ 37 * gcc -E -DULTRASPARC -DMD5_BLOCK_DATA_ORDER md5_block.sparc.S | \
38 * as -xarch=v8plus /dev/fd/0 -o md5-sparcv9.o 38 * as -xarch=v8plus /dev/fd/0 -o md5-sparcv9.o
39 */ 39 */
40 40
41#include <openssl/e_os2.h>
42
43#define A %o0 41#define A %o0
44#define B %o1 42#define B %o1
45#define C %o2 43#define C %o2
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 29df7d35b2..bb862db499 100644
--- a/src/lib/libssl/src/crypto/mem.c
+++ b/src/lib/libssl/src/crypto/mem.c
@@ -352,11 +352,15 @@ void *CRYPTO_realloc_clean(void *str, int old_len, int num, const char *file,
352 realloc_debug_func(str, NULL, num, file, line, 0); 352 realloc_debug_func(str, NULL, num, file, line, 0);
353 ret=malloc_ex_func(num,file,line); 353 ret=malloc_ex_func(num,file,line);
354 if(ret) 354 if(ret)
355 {
355 memcpy(ret,str,old_len); 356 memcpy(ret,str,old_len);
356 OPENSSL_cleanse(str,old_len); 357 OPENSSL_cleanse(str,old_len);
357 free_func(str); 358 free_func(str);
359 }
358#ifdef LEVITTE_DEBUG_MEM 360#ifdef LEVITTE_DEBUG_MEM
359 fprintf(stderr, "LEVITTE_DEBUG_MEM: | 0x%p -> 0x%p (%d)\n", str, ret, num); 361 fprintf(stderr,
362 "LEVITTE_DEBUG_MEM: | 0x%p -> 0x%p (%d)\n",
363 str, ret, num);
360#endif 364#endif
361 if (realloc_debug_func != NULL) 365 if (realloc_debug_func != NULL)
362 realloc_debug_func(str, ret, num, file, line, 1); 366 realloc_debug_func(str, ret, num, file, line, 1);
diff --git a/src/lib/libssl/src/crypto/mem_dbg.c b/src/lib/libssl/src/crypto/mem_dbg.c
index 57bd08f65d..9221df00bd 100644
--- a/src/lib/libssl/src/crypto/mem_dbg.c
+++ b/src/lib/libssl/src/crypto/mem_dbg.c
@@ -597,6 +597,8 @@ static void print_leak(const MEM *m, MEM_LEAK *l)
597 struct tm *lcl = NULL; 597 struct tm *lcl = NULL;
598 unsigned long ti; 598 unsigned long ti;
599 599
600#define BUF_REMAIN (sizeof buf - (size_t)(bufp - buf))
601
600 if(m->addr == (char *)l->bio) 602 if(m->addr == (char *)l->bio)
601 return; 603 return;
602 604
@@ -604,22 +606,22 @@ static void print_leak(const MEM *m, MEM_LEAK *l)
604 { 606 {
605 lcl = localtime(&m->time); 607 lcl = localtime(&m->time);
606 608
607 sprintf(bufp, "[%02d:%02d:%02d] ", 609 snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",
608 lcl->tm_hour,lcl->tm_min,lcl->tm_sec); 610 lcl->tm_hour,lcl->tm_min,lcl->tm_sec);
609 bufp += strlen(bufp); 611 bufp += strlen(bufp);
610 } 612 }
611 613
612 sprintf(bufp, "%5lu file=%s, line=%d, ", 614 snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ",
613 m->order,m->file,m->line); 615 m->order,m->file,m->line);
614 bufp += strlen(bufp); 616 bufp += strlen(bufp);
615 617
616 if (options & V_CRYPTO_MDEBUG_THREAD) 618 if (options & V_CRYPTO_MDEBUG_THREAD)
617 { 619 {
618 sprintf(bufp, "thread=%lu, ", m->thread); 620 snprintf(bufp, BUF_REMAIN, "thread=%lu, ", m->thread);
619 bufp += strlen(bufp); 621 bufp += strlen(bufp);
620 } 622 }
621 623
622 sprintf(bufp, "number=%d, address=%08lX\n", 624 snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n",
623 m->num,(unsigned long)m->addr); 625 m->num,(unsigned long)m->addr);
624 bufp += strlen(bufp); 626 bufp += strlen(bufp);
625 627
@@ -641,7 +643,7 @@ static void print_leak(const MEM *m, MEM_LEAK *l)
641 643
642 ami_cnt++; 644 ami_cnt++;
643 memset(buf,'>',ami_cnt); 645 memset(buf,'>',ami_cnt);
644 sprintf(buf + ami_cnt, 646 snprintf(buf + ami_cnt, sizeof buf - ami_cnt,
645 " thread=%lu, file=%s, line=%d, info=\"", 647 " thread=%lu, file=%s, line=%d, info=\"",
646 amip->thread, amip->file, amip->line); 648 amip->thread, amip->file, amip->line);
647 buf_len=strlen(buf); 649 buf_len=strlen(buf);
@@ -653,10 +655,11 @@ static void print_leak(const MEM *m, MEM_LEAK *l)
653 } 655 }
654 else 656 else
655 { 657 {
656 strcpy(buf + buf_len, amip->info); 658 strlcpy(buf + buf_len, amip->info,
659 sizeof buf - buf_len);
657 buf_len = strlen(buf); 660 buf_len = strlen(buf);
658 } 661 }
659 sprintf(buf + buf_len, "\"\n"); 662 snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n");
660 663
661 BIO_puts(l->bio,buf); 664 BIO_puts(l->bio,buf);
662 665
diff --git a/src/lib/libssl/src/crypto/o_time.c b/src/lib/libssl/src/crypto/o_time.c
index 785468131e..723eb1b5af 100644
--- a/src/lib/libssl/src/crypto/o_time.c
+++ b/src/lib/libssl/src/crypto/o_time.c
@@ -73,7 +73,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
73 { 73 {
74 struct tm *ts = NULL; 74 struct tm *ts = NULL;
75 75
76#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_OS2) && !defined(__CYGWIN32__) && (!defined(OPENSSL_SYS_VMS) || defined(gmtime_r)) && !defined(OPENSSL_SYS_MACOSX) && !defined(OPENSSL_SYS_SUNOS) 76#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_OS2) && !defined(__CYGWIN32__) && (!defined(OPENSSL_SYS_VMS) || defined(gmtime_r)) && !defined(OPENSSL_SYS_MACOSX)
77 /* should return &data, but doesn't on some systems, 77 /* should return &data, but doesn't on some systems,
78 so we don't even look at the return value */ 78 so we don't even look at the return value */
79 gmtime_r(timer,result); 79 gmtime_r(timer,result);
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 5d983e3ed4..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 sprintf(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 sprintf(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_dat.pl b/src/lib/libssl/src/crypto/objects/obj_dat.pl
index 5dfb84ea00..d0371661f9 100644
--- a/src/lib/libssl/src/crypto/objects/obj_dat.pl
+++ b/src/lib/libssl/src/crypto/objects/obj_dat.pl
@@ -1,5 +1,9 @@
1#!/usr/local/bin/perl 1#!/usr/local/bin/perl
2 2
3# fixes bug in floating point emulation on sparc64 when
4# this script produces off-by-one output on sparc64
5use integer;
6
3sub obj_cmp 7sub obj_cmp
4 { 8 {
5 local(@a,@b,$_,$r); 9 local(@a,@b,$_,$r);
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/opensslv.h b/src/lib/libssl/src/crypto/opensslv.h
index e226d9de79..08cb1d5018 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 0x0090703fL 28#define OPENSSL_VERSION_NUMBER 0x0090702fL
29#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7c 30 Sep 2003" 29#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7b 10 Apr 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 70b5446797..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 strcat(buf,"Proc-Type: 4,"); 134 strlcat(buf,"Proc-Type: 4,",PEM_BUFSIZE);
135 strcat(buf,str); 135 strlcat(buf,str,PEM_BUFSIZE);
136 strcat(buf,"\n"); 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,10 +142,12 @@ 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 strcat(buf,"DEK-Info: "); 145 strlcat(buf,"DEK-Info: ",PEM_BUFSIZE);
146 strcat(buf,type); 146 strlcat(buf,type,PEM_BUFSIZE);
147 strcat(buf,","); 147 strlcat(buf,",",PEM_BUFSIZE);
148 j=strlen(buf); 148 j=strlen(buf);
149 if (j + (len * 2) + 1 > PEM_BUFSIZE)
150 return;
149 for (i=0; i<len; i++) 151 for (i=0; i<len; i++)
150 { 152 {
151 buf[j+i*2] =map[(str[i]>>4)&0x0f]; 153 buf[j+i*2] =map[(str[i]>>4)&0x0f];
diff --git a/src/lib/libssl/src/crypto/perlasm/x86ms.pl b/src/lib/libssl/src/crypto/perlasm/x86ms.pl
index fbb4afb9bd..35f1a4ddb9 100644
--- a/src/lib/libssl/src/crypto/perlasm/x86ms.pl
+++ b/src/lib/libssl/src/crypto/perlasm/x86ms.pl
@@ -144,10 +144,7 @@ sub main'jle { &out1("jle",@_); }
144sub main'jz { &out1("jz",@_); } 144sub main'jz { &out1("jz",@_); }
145sub main'jge { &out1("jge",@_); } 145sub main'jge { &out1("jge",@_); }
146sub main'jl { &out1("jl",@_); } 146sub main'jl { &out1("jl",@_); }
147sub main'ja { &out1("ja",@_); }
148sub main'jae { &out1("jae",@_); }
149sub main'jb { &out1("jb",@_); } 147sub main'jb { &out1("jb",@_); }
150sub main'jbe { &out1("jbe",@_); }
151sub main'jc { &out1("jc",@_); } 148sub main'jc { &out1("jc",@_); }
152sub main'jnc { &out1("jnc",@_); } 149sub main'jnc { &out1("jnc",@_); }
153sub main'jnz { &out1("jnz",@_); } 150sub main'jnz { &out1("jnz",@_); }
diff --git a/src/lib/libssl/src/crypto/perlasm/x86nasm.pl b/src/lib/libssl/src/crypto/perlasm/x86nasm.pl
index 30346af4ea..f30b7466d4 100644
--- a/src/lib/libssl/src/crypto/perlasm/x86nasm.pl
+++ b/src/lib/libssl/src/crypto/perlasm/x86nasm.pl
@@ -152,10 +152,7 @@ sub main'jle { &out1("jle NEAR",@_); }
152sub main'jz { &out1("jz NEAR",@_); } 152sub main'jz { &out1("jz NEAR",@_); }
153sub main'jge { &out1("jge NEAR",@_); } 153sub main'jge { &out1("jge NEAR",@_); }
154sub main'jl { &out1("jl NEAR",@_); } 154sub main'jl { &out1("jl NEAR",@_); }
155sub main'ja { &out1("ja NEAR",@_); }
156sub main'jae { &out1("jae NEAR",@_); }
157sub main'jb { &out1("jb NEAR",@_); } 155sub main'jb { &out1("jb NEAR",@_); }
158sub main'jbe { &out1("jbe NEAR",@_); }
159sub main'jc { &out1("jc NEAR",@_); } 156sub main'jc { &out1("jc NEAR",@_); }
160sub main'jnc { &out1("jnc NEAR",@_); } 157sub main'jnc { &out1("jnc NEAR",@_); }
161sub main'jnz { &out1("jnz NEAR",@_); } 158sub main'jnz { &out1("jnz NEAR",@_); }
diff --git a/src/lib/libssl/src/crypto/perlasm/x86unix.pl b/src/lib/libssl/src/crypto/perlasm/x86unix.pl
index 10b669bf04..72bde061c5 100644
--- a/src/lib/libssl/src/crypto/perlasm/x86unix.pl
+++ b/src/lib/libssl/src/crypto/perlasm/x86unix.pl
@@ -156,10 +156,7 @@ sub main'jnz { &out1("jnz",@_); }
156sub main'jz { &out1("jz",@_); } 156sub main'jz { &out1("jz",@_); }
157sub main'jge { &out1("jge",@_); } 157sub main'jge { &out1("jge",@_); }
158sub main'jl { &out1("jl",@_); } 158sub main'jl { &out1("jl",@_); }
159sub main'ja { &out1("ja",@_); }
160sub main'jae { &out1("jae",@_); }
161sub main'jb { &out1("jb",@_); } 159sub main'jb { &out1("jb",@_); }
162sub main'jbe { &out1("jbe",@_); }
163sub main'jc { &out1("jc",@_); } 160sub main'jc { &out1("jc",@_); }
164sub main'jnc { &out1("jnc",@_); } 161sub main'jnc { &out1("jnc",@_); }
165sub main'jno { &out1("jno",@_); } 162sub main'jno { &out1("jno",@_); }
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 190ca0e9bf..0060a2ea3d 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
@@ -767,11 +767,6 @@ int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
767 } 767 }
768 if (EVP_MD_CTX_type(mdc) == md_type) 768 if (EVP_MD_CTX_type(mdc) == md_type)
769 break; 769 break;
770 /* Workaround for some broken clients that put the signature
771 * OID instead of the digest OID in digest_alg->algorithm
772 */
773 if (EVP_MD_pkey_type(EVP_MD_CTX_md(mdc)) == md_type)
774 break;
775 btmp=BIO_next(btmp); 770 btmp=BIO_next(btmp);
776 } 771 }
777 772
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c b/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c
index 5d2a97839d..086d394270 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c
@@ -3,7 +3,7 @@
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
6 * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved. 6 * Copyright (c) 1999 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
@@ -101,7 +101,7 @@ static int mime_param_cmp(const MIME_PARAM * const *a,
101static void mime_param_free(MIME_PARAM *param); 101static void mime_param_free(MIME_PARAM *param);
102static int mime_bound_check(char *line, int linelen, char *bound, int blen); 102static int mime_bound_check(char *line, int linelen, char *bound, int blen);
103static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret); 103static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret);
104static int strip_eol(char *linebuf, int *plen); 104static int iscrlf(char c);
105static MIME_HEADER *mime_hdr_find(STACK_OF(MIME_HEADER) *hdrs, char *name); 105static MIME_HEADER *mime_hdr_find(STACK_OF(MIME_HEADER) *hdrs, char *name);
106static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name); 106static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name);
107static void mime_hdr_free(MIME_HEADER *hdr); 107static void mime_hdr_free(MIME_HEADER *hdr);
@@ -150,17 +150,9 @@ static PKCS7 *B64_read_PKCS7(BIO *bio)
150 150
151int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags) 151int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
152{ 152{
153 char linebuf[MAX_SMLEN];
153 char bound[33], c; 154 char bound[33], c;
154 int i; 155 int i;
155 char *mime_prefix, *mime_eol;
156 if (flags & PKCS7_NOOLDMIMETYPE)
157 mime_prefix = "application/pkcs7-";
158 else
159 mime_prefix = "application/x-pkcs7-";
160 if (flags & PKCS7_CRLFEOL)
161 mime_eol = "\r\n";
162 else
163 mime_eol = "\n";
164 if((flags & PKCS7_DETACHED) && data) { 156 if((flags & PKCS7_DETACHED) && data) {
165 /* We want multipart/signed */ 157 /* We want multipart/signed */
166 /* Generate a random boundary */ 158 /* Generate a random boundary */
@@ -172,42 +164,34 @@ int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
172 bound[i] = c; 164 bound[i] = c;
173 } 165 }
174 bound[32] = 0; 166 bound[32] = 0;
175 BIO_printf(bio, "MIME-Version: 1.0%s", mime_eol); 167 BIO_printf(bio, "MIME-Version: 1.0\n");
176 BIO_printf(bio, "Content-Type: multipart/signed;"); 168 BIO_printf(bio, "Content-Type: multipart/signed;");
177 BIO_printf(bio, " protocol=\"%ssignature\";", mime_prefix); 169 BIO_printf(bio, " protocol=\"application/x-pkcs7-signature\";");
178 BIO_printf(bio, " micalg=sha1; boundary=\"----%s\"%s%s", 170 BIO_printf(bio, " micalg=sha1; boundary=\"----%s\"\n\n", bound);
179 bound, mime_eol, mime_eol); 171 BIO_printf(bio, "This is an S/MIME signed message\n\n");
180 BIO_printf(bio, "This is an S/MIME signed message%s%s",
181 mime_eol, mime_eol);
182 /* Now write out the first part */ 172 /* Now write out the first part */
183 BIO_printf(bio, "------%s%s", bound, mime_eol); 173 BIO_printf(bio, "------%s\n", bound);
184 SMIME_crlf_copy(data, bio, flags); 174 if(flags & PKCS7_TEXT) BIO_printf(bio, "Content-Type: text/plain\n\n");
185 BIO_printf(bio, "%s------%s%s", mime_eol, bound, mime_eol); 175 while((i = BIO_read(data, linebuf, MAX_SMLEN)) > 0)
176 BIO_write(bio, linebuf, i);
177 BIO_printf(bio, "\n------%s\n", bound);
186 178
187 /* Headers for signature */ 179 /* Headers for signature */
188 180
189 BIO_printf(bio, "Content-Type: %ssignature;", mime_prefix); 181 BIO_printf(bio, "Content-Type: application/x-pkcs7-signature; name=\"smime.p7s\"\n");
190 BIO_printf(bio, " name=\"smime.p7s\"%s", mime_eol); 182 BIO_printf(bio, "Content-Transfer-Encoding: base64\n");
191 BIO_printf(bio, "Content-Transfer-Encoding: base64%s", 183 BIO_printf(bio, "Content-Disposition: attachment; filename=\"smime.p7s\"\n\n");
192 mime_eol);
193 BIO_printf(bio, "Content-Disposition: attachment;");
194 BIO_printf(bio, " filename=\"smime.p7s\"%s%s",
195 mime_eol, mime_eol);
196 B64_write_PKCS7(bio, p7); 184 B64_write_PKCS7(bio, p7);
197 BIO_printf(bio,"%s------%s--%s%s", mime_eol, bound, 185 BIO_printf(bio,"\n------%s--\n\n", bound);
198 mime_eol, mime_eol);
199 return 1; 186 return 1;
200 } 187 }
201 /* MIME headers */ 188 /* MIME headers */
202 BIO_printf(bio, "MIME-Version: 1.0%s", mime_eol); 189 BIO_printf(bio, "MIME-Version: 1.0\n");
203 BIO_printf(bio, "Content-Disposition: attachment;"); 190 BIO_printf(bio, "Content-Disposition: attachment; filename=\"smime.p7m\"\n");
204 BIO_printf(bio, " filename=\"smime.p7m\"%s", mime_eol); 191 BIO_printf(bio, "Content-Type: application/x-pkcs7-mime; name=\"smime.p7m\"\n");
205 BIO_printf(bio, "Content-Type: %smime;", mime_prefix); 192 BIO_printf(bio, "Content-Transfer-Encoding: base64\n\n");
206 BIO_printf(bio, " name=\"smime.p7m\"%s", mime_eol);
207 BIO_printf(bio, "Content-Transfer-Encoding: base64%s%s",
208 mime_eol, mime_eol);
209 B64_write_PKCS7(bio, p7); 193 B64_write_PKCS7(bio, p7);
210 BIO_printf(bio, "%s", mime_eol); 194 BIO_printf(bio, "\n");
211 return 1; 195 return 1;
212} 196}
213 197
@@ -332,9 +316,12 @@ int SMIME_crlf_copy(BIO *in, BIO *out, int flags)
332 } 316 }
333 if(flags & PKCS7_TEXT) BIO_printf(out, "Content-Type: text/plain\r\n\r\n"); 317 if(flags & PKCS7_TEXT) BIO_printf(out, "Content-Type: text/plain\r\n\r\n");
334 while ((len = BIO_gets(in, linebuf, MAX_SMLEN)) > 0) { 318 while ((len = BIO_gets(in, linebuf, MAX_SMLEN)) > 0) {
335 eol = strip_eol(linebuf, &len); 319 eol = 0;
336 if (len) 320 while(iscrlf(linebuf[len - 1])) {
337 BIO_write(out, linebuf, len); 321 len--;
322 eol = 1;
323 }
324 BIO_write(out, linebuf, len);
338 if(eol) BIO_write(out, "\r\n", 2); 325 if(eol) BIO_write(out, "\r\n", 2);
339 } 326 }
340 return 1; 327 return 1;
@@ -377,7 +364,6 @@ static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret)
377{ 364{
378 char linebuf[MAX_SMLEN]; 365 char linebuf[MAX_SMLEN];
379 int len, blen; 366 int len, blen;
380 int eol = 0, next_eol = 0;
381 BIO *bpart = NULL; 367 BIO *bpart = NULL;
382 STACK_OF(BIO) *parts; 368 STACK_OF(BIO) *parts;
383 char state, part, first; 369 char state, part, first;
@@ -397,23 +383,26 @@ static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret)
397 sk_BIO_push(parts, bpart); 383 sk_BIO_push(parts, bpart);
398 return 1; 384 return 1;
399 } else if(part) { 385 } else if(part) {
400 /* Strip CR+LF from linebuf */
401 next_eol = strip_eol(linebuf, &len);
402 if(first) { 386 if(first) {
403 first = 0; 387 first = 0;
404 if(bpart) sk_BIO_push(parts, bpart); 388 if(bpart) sk_BIO_push(parts, bpart);
405 bpart = BIO_new(BIO_s_mem()); 389 bpart = BIO_new(BIO_s_mem());
406 BIO_set_mem_eof_return(bpart, 0); 390
407 } else if (eol) 391 } else BIO_write(bpart, "\r\n", 2);
408 BIO_write(bpart, "\r\n", 2); 392 /* Strip CR+LF from linebuf */
409 eol = next_eol; 393 while(iscrlf(linebuf[len - 1])) len--;
410 if (len) 394 BIO_write(bpart, linebuf, len);
411 BIO_write(bpart, linebuf, len);
412 } 395 }
413 } 396 }
414 return 0; 397 return 0;
415} 398}
416 399
400static int iscrlf(char c)
401{
402 if(c == '\r' || c == '\n') return 1;
403 return 0;
404}
405
417/* This is the big one: parse MIME header lines up to message body */ 406/* This is the big one: parse MIME header lines up to message body */
418 407
419#define MIME_INVALID 0 408#define MIME_INVALID 0
@@ -694,21 +683,3 @@ static int mime_bound_check(char *line, int linelen, char *bound, int blen)
694 } 683 }
695 return 0; 684 return 0;
696} 685}
697
698static int strip_eol(char *linebuf, int *plen)
699 {
700 int len = *plen;
701 char *p, c;
702 int is_eol = 0;
703 p = linebuf + len - 1;
704 for (p = linebuf + len - 1; len > 0; len--, p--)
705 {
706 c = *p;
707 if (c == '\n')
708 is_eol = 1;
709 else if (c != '\r')
710 break;
711 }
712 *plen = len;
713 return is_eol;
714 }
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c b/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c
index 6e5735de11..f0d071e282 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c
@@ -3,7 +3,7 @@
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
6 * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved. 6 * Copyright (c) 1999 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
diff --git a/src/lib/libssl/src/crypto/pkcs7/pkcs7.h b/src/lib/libssl/src/crypto/pkcs7/pkcs7.h
index 15372e18f8..5819700a85 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pkcs7.h
+++ b/src/lib/libssl/src/crypto/pkcs7/pkcs7.h
@@ -260,8 +260,6 @@ DECLARE_PKCS12_STACK_OF(PKCS7)
260#define PKCS7_BINARY 0x80 260#define PKCS7_BINARY 0x80
261#define PKCS7_NOATTR 0x100 261#define PKCS7_NOATTR 0x100
262#define PKCS7_NOSMIMECAP 0x200 262#define PKCS7_NOSMIMECAP 0x200
263#define PKCS7_NOOLDMIMETYPE 0x400
264#define PKCS7_CRLFEOL 0x800
265 263
266/* Flags: for compatibility with older code */ 264/* Flags: for compatibility with older code */
267 265
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 1f168221e3..895967476e 100644
--- a/src/lib/libssl/src/crypto/rand/rand_egd.c
+++ b/src/lib/libssl/src/crypto/rand/rand_egd.c
@@ -145,7 +145,7 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
145 addr.sun_family = AF_UNIX; 145 addr.sun_family = AF_UNIX;
146 if (strlen(path) >= sizeof(addr.sun_path)) 146 if (strlen(path) >= sizeof(addr.sun_path))
147 return (-1); 147 return (-1);
148 strcpy(addr.sun_path,path); 148 strlcpy(addr.sun_path,path,sizeof addr.sun_path);
149 len = offsetof(struct sockaddr_un, sun_path) + strlen(path); 149 len = offsetof(struct sockaddr_un, sun_path) + strlen(path);
150 fd = socket(AF_UNIX, SOCK_STREAM, 0); 150 fd = socket(AF_UNIX, SOCK_STREAM, 0);
151 if (fd == -1) return (-1); 151 if (fd == -1) return (-1);
diff --git a/src/lib/libssl/src/crypto/rand/rand_unix.c b/src/lib/libssl/src/crypto/rand/rand_unix.c
index a776e52243..0599719dd1 100644
--- a/src/lib/libssl/src/crypto/rand/rand_unix.c
+++ b/src/lib/libssl/src/crypto/rand/rand_unix.c
@@ -124,6 +124,24 @@
124#include <unistd.h> 124#include <unistd.h>
125#include <time.h> 125#include <time.h>
126 126
127#ifdef __OpenBSD__
128int RAND_poll(void)
129{
130 u_int32_t rnd = 0, i;
131 unsigned char buf[ENTROPY_NEEDED];
132
133 for (i = 0; i < sizeof(buf); i++) {
134 if (i % 4 == 0)
135 rnd = arc4random();
136 buf[i] = rnd;
137 rnd >>= 8;
138 }
139 RAND_add(buf, sizeof(buf), ENTROPY_NEEDED);
140 memset(buf, 0, sizeof(buf));
141
142 return 1;
143}
144#else
127int RAND_poll(void) 145int RAND_poll(void)
128{ 146{
129 unsigned long l; 147 unsigned long l;
@@ -236,6 +254,7 @@ int RAND_poll(void)
236} 254}
237 255
238#endif 256#endif
257#endif
239 258
240#if defined(OPENSSL_SYS_VXWORKS) 259#if defined(OPENSSL_SYS_VXWORKS)
241int RAND_poll(void) 260int RAND_poll(void)
diff --git a/src/lib/libssl/src/crypto/rand/rand_win.c b/src/lib/libssl/src/crypto/rand/rand_win.c
index 263068d256..113b58678f 100644
--- a/src/lib/libssl/src/crypto/rand/rand_win.c
+++ b/src/lib/libssl/src/crypto/rand/rand_win.c
@@ -162,7 +162,6 @@ typedef BOOL (WINAPI *GETCURSORINFO)(PCURSORINFO);
162typedef DWORD (WINAPI *GETQUEUESTATUS)(UINT); 162typedef DWORD (WINAPI *GETQUEUESTATUS)(UINT);
163 163
164typedef HANDLE (WINAPI *CREATETOOLHELP32SNAPSHOT)(DWORD, DWORD); 164typedef HANDLE (WINAPI *CREATETOOLHELP32SNAPSHOT)(DWORD, DWORD);
165typedef BOOL (WINAPI *CLOSETOOLHELP32SNAPSHOT)(HANDLE);
166typedef BOOL (WINAPI *HEAP32FIRST)(LPHEAPENTRY32, DWORD, DWORD); 165typedef BOOL (WINAPI *HEAP32FIRST)(LPHEAPENTRY32, DWORD, DWORD);
167typedef BOOL (WINAPI *HEAP32NEXT)(LPHEAPENTRY32); 166typedef BOOL (WINAPI *HEAP32NEXT)(LPHEAPENTRY32);
168typedef BOOL (WINAPI *HEAP32LIST)(HANDLE, LPHEAPLIST32); 167typedef BOOL (WINAPI *HEAP32LIST)(HANDLE, LPHEAPLIST32);
@@ -432,7 +431,7 @@ int RAND_poll(void)
432 * This seeding method was proposed in Peter Gutmann, Software 431 * This seeding method was proposed in Peter Gutmann, Software
433 * Generation of Practically Strong Random Numbers, 432 * Generation of Practically Strong Random Numbers,
434 * http://www.usenix.org/publications/library/proceedings/sec98/gutmann.html 433 * http://www.usenix.org/publications/library/proceedings/sec98/gutmann.html
435 * revised version at http://www.cryptoengines.com/~peter/06_random.pdf 434 * revised version at http://www.cryptoengines.com/~peter/06_random.pdf
436 * (The assignment of entropy estimates below is arbitrary, but based 435 * (The assignment of entropy estimates below is arbitrary, but based
437 * on Peter's analysis the full poll appears to be safe. Additional 436 * on Peter's analysis the full poll appears to be safe. Additional
438 * interactive seeding is encouraged.) 437 * interactive seeding is encouraged.)
@@ -441,7 +440,6 @@ int RAND_poll(void)
441 if (kernel) 440 if (kernel)
442 { 441 {
443 CREATETOOLHELP32SNAPSHOT snap; 442 CREATETOOLHELP32SNAPSHOT snap;
444 CLOSETOOLHELP32SNAPSHOT close_snap;
445 HANDLE handle; 443 HANDLE handle;
446 444
447 HEAP32FIRST heap_first; 445 HEAP32FIRST heap_first;
@@ -459,8 +457,6 @@ int RAND_poll(void)
459 457
460 snap = (CREATETOOLHELP32SNAPSHOT) 458 snap = (CREATETOOLHELP32SNAPSHOT)
461 GetProcAddress(kernel, TEXT("CreateToolhelp32Snapshot")); 459 GetProcAddress(kernel, TEXT("CreateToolhelp32Snapshot"));
462 close_snap = (CLOSETOOLHELP32SNAPSHOT)
463 GetProcAddress(kernel, TEXT("CloseToolhelp32Snapshot"));
464 heap_first = (HEAP32FIRST) GetProcAddress(kernel, TEXT("Heap32First")); 460 heap_first = (HEAP32FIRST) GetProcAddress(kernel, TEXT("Heap32First"));
465 heap_next = (HEAP32NEXT) GetProcAddress(kernel, TEXT("Heap32Next")); 461 heap_next = (HEAP32NEXT) GetProcAddress(kernel, TEXT("Heap32Next"));
466 heaplist_first = (HEAP32LIST) GetProcAddress(kernel, TEXT("Heap32ListFirst")); 462 heaplist_first = (HEAP32LIST) GetProcAddress(kernel, TEXT("Heap32ListFirst"));
@@ -476,7 +472,7 @@ int RAND_poll(void)
476 heaplist_next && process_first && process_next && 472 heaplist_next && process_first && process_next &&
477 thread_first && thread_next && module_first && 473 thread_first && thread_next && module_first &&
478 module_next && (handle = snap(TH32CS_SNAPALL,0)) 474 module_next && (handle = snap(TH32CS_SNAPALL,0))
479 != INVALID_HANDLE_VALUE) 475 != NULL)
480 { 476 {
481 /* heap list and heap walking */ 477 /* heap list and heap walking */
482 /* HEAPLIST32 contains 3 fields that will change with 478 /* HEAPLIST32 contains 3 fields that will change with
@@ -538,10 +534,8 @@ int RAND_poll(void)
538 do 534 do
539 RAND_add(&m, m.dwSize, 9); 535 RAND_add(&m, m.dwSize, 9);
540 while (module_next(handle, &m)); 536 while (module_next(handle, &m));
541 if (close_snap) 537
542 close_snap(handle); 538 CloseHandle(handle);
543 else
544 CloseHandle(handle);
545 } 539 }
546 540
547 FreeLibrary(kernel); 541 FreeLibrary(kernel);
diff --git a/src/lib/libssl/src/crypto/rand/randfile.c b/src/lib/libssl/src/crypto/rand/randfile.c
index 41574768ab..cfbec2ac1f 100644
--- a/src/lib/libssl/src/crypto/rand/randfile.c
+++ b/src/lib/libssl/src/crypto/rand/randfile.c
@@ -106,6 +106,14 @@ int RAND_load_file(const char *file, long bytes)
106 106
107 in=fopen(file,"rb"); 107 in=fopen(file,"rb");
108 if (in == NULL) goto err; 108 if (in == NULL) goto err;
109 if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
110 /* this file is a device. we don't want read an infinite number
111 * of bytes from a random device, nor do we want to use buffered
112 * I/O because we will waste system entropy.
113 */
114 bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */
115 setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */
116 }
109 for (;;) 117 for (;;)
110 { 118 {
111 if (bytes > 0) 119 if (bytes > 0)
@@ -135,7 +143,20 @@ int RAND_write_file(const char *file)
135 int i,ret=0,rand_err=0; 143 int i,ret=0,rand_err=0;
136 FILE *out = NULL; 144 FILE *out = NULL;
137 int n; 145 int n;
146 struct stat sb;
138 147
148 i=stat(file,&sb);
149 if (i != -1) {
150 if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
151 /* this file is a device. we don't write back to it.
152 * we "succeed" on the assumption this is some sort
153 * of random device. Otherwise attempting to write to
154 * and chmod the device causes problems.
155 */
156 return(1);
157 }
158 }
159
139#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) 160#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32)
140 /* For some reason Win32 can't write to files created this way */ 161 /* For some reason Win32 can't write to files created this way */
141 162
@@ -197,20 +218,19 @@ err:
197const char *RAND_file_name(char *buf, size_t size) 218const char *RAND_file_name(char *buf, size_t size)
198 { 219 {
199 char *s=NULL; 220 char *s=NULL;
200 char *ret=NULL; 221 int ok = 0;
222 struct stat sb;
201 223
202 if (OPENSSL_issetugid() == 0) 224 if (issetugid() == 0)
203 s=getenv("RANDFILE"); 225 s=getenv("RANDFILE");
204 if (s != NULL) 226 if (s != NULL && *s && strlen(s) + 1 < size)
205 { 227 {
206 if(strlen(s) >= size) 228 if (strlcpy(buf,s,size) >= size)
207 return NULL; 229 return NULL;
208 strcpy(buf,s);
209 ret=buf;
210 } 230 }
211 else 231 else
212 { 232 {
213 if (OPENSSL_issetugid() == 0) 233 if (issetugid() == 0)
214 s=getenv("HOME"); 234 s=getenv("HOME");
215#ifdef DEFAULT_HOME 235#ifdef DEFAULT_HOME
216 if (s == NULL) 236 if (s == NULL)
@@ -218,17 +238,36 @@ const char *RAND_file_name(char *buf, size_t size)
218 s = DEFAULT_HOME; 238 s = DEFAULT_HOME;
219 } 239 }
220#endif 240#endif
221 if (s != NULL && (strlen(s)+strlen(RFILE)+2 < size)) 241 if (s && *s && strlen(s)+strlen(RFILE)+2 < size)
222 { 242 {
223 strcpy(buf,s); 243 strlcpy(buf,s,size);
224#ifndef OPENSSL_SYS_VMS 244#ifndef OPENSSL_SYS_VMS
225 strcat(buf,"/"); 245 strlcat(buf,"/",size);
226#endif 246#endif
227 strcat(buf,RFILE); 247 strlcat(buf,RFILE,size);
228 ret=buf; 248 ok = 1;
229 } 249 }
230 else 250 else
231 buf[0] = '\0'; /* no file name */ 251 buf[0] = '\0'; /* no file name */
232 } 252 }
233 return(ret); 253
254#ifdef __OpenBSD__
255 /* given that all random loads just fail if the file can't be
256 * seen on a stat, we stat the file we're returning, if it
257 * fails, use /dev/arandom instead. this allows the user to
258 * use their own source for good random data, but defaults
259 * to something hopefully decent if that isn't available.
260 */
261
262 if (!ok)
263 if (strlcpy(buf,"/dev/arandom",size) >= size) {
264 return(NULL);
265 }
266 if (stat(buf,&sb) == -1)
267 if (strlcpy(buf,"/dev/arandom",size) >= size) {
268 return(NULL);
269 }
270
271#endif
272 return(buf);
234 } 273 }
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/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/rsa/rsa.h b/src/lib/libssl/src/crypto/rsa/rsa.h
index 62fa745f79..e26a68b482 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa.h
+++ b/src/lib/libssl/src/crypto/rsa/rsa.h
@@ -158,6 +158,11 @@ struct rsa_st
158#define RSA_FLAG_CACHE_PUBLIC 0x02 158#define RSA_FLAG_CACHE_PUBLIC 0x02
159#define RSA_FLAG_CACHE_PRIVATE 0x04 159#define RSA_FLAG_CACHE_PRIVATE 0x04
160#define RSA_FLAG_BLINDING 0x08 160#define RSA_FLAG_BLINDING 0x08
161#define RSA_FLAG_NO_BLINDING 0x80 /* new with 0.9.6j and 0.9.7b; the built-in
162 * RSA implementation now uses blinding by
163 * default (ignoring RSA_FLAG_BLINDING),
164 * but other engines might not need it
165 */
161#define RSA_FLAG_THREAD_SAFE 0x10 166#define RSA_FLAG_THREAD_SAFE 0x10
162/* This flag means the private key operations will be handled by rsa_mod_exp 167/* This flag means the private key operations will be handled by rsa_mod_exp
163 * and that they do not depend on the private key components being present: 168 * and that they do not depend on the private key components being present:
@@ -170,11 +175,7 @@ struct rsa_st
170 */ 175 */
171#define RSA_FLAG_SIGN_VER 0x40 176#define RSA_FLAG_SIGN_VER 0x40
172 177
173#define RSA_FLAG_NO_BLINDING 0x80 /* new with 0.9.6j and 0.9.7b; the built-in 178#define RSA_FLAG_NO_BLINDING 0x80
174 * RSA implementation now uses blinding by
175 * default (ignoring RSA_FLAG_BLINDING),
176 * but other engines might not need it
177 */
178 179
179#define RSA_PKCS1_PADDING 1 180#define RSA_PKCS1_PADDING 1
180#define RSA_SSLV23_PADDING 2 181#define RSA_SSLV23_PADDING 2
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_eay.c b/src/lib/libssl/src/crypto/rsa/rsa_eay.c
index e0d286266e..027b4dc754 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_eay.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_eay.c
@@ -484,8 +484,6 @@ err:
484 if (ctx != NULL) BN_CTX_free(ctx); 484 if (ctx != NULL) BN_CTX_free(ctx);
485 BN_clear_free(&f); 485 BN_clear_free(&f);
486 BN_clear_free(&ret); 486 BN_clear_free(&ret);
487 if (local_blinding)
488 BN_BLINDING_free(blinding);
489 if (buf != NULL) 487 if (buf != NULL)
490 { 488 {
491 OPENSSL_cleanse(buf,num); 489 OPENSSL_cleanse(buf,num);
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_lib.c b/src/lib/libssl/src/crypto/rsa/rsa_lib.c
index e4d622851e..53c5092014 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_lib.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_lib.c
@@ -316,7 +316,7 @@ void RSA_blinding_off(RSA *rsa)
316 316
317int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx) 317int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx)
318 { 318 {
319 BIGNUM *A,*Ai = NULL; 319 BIGNUM *A,*Ai;
320 BN_CTX *ctx; 320 BN_CTX *ctx;
321 int ret=0; 321 int ret=0;
322 322
@@ -327,12 +327,8 @@ int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx)
327 else 327 else
328 ctx=p_ctx; 328 ctx=p_ctx;
329 329
330 /* XXXXX: Shouldn't this be RSA_blinding_off(rsa)? */
331 if (rsa->blinding != NULL) 330 if (rsa->blinding != NULL)
332 {
333 BN_BLINDING_free(rsa->blinding); 331 BN_BLINDING_free(rsa->blinding);
334 rsa->blinding = NULL;
335 }
336 332
337 /* NB: similar code appears in setup_blinding (rsa_eay.c); 333 /* NB: similar code appears in setup_blinding (rsa_eay.c);
338 * this should be placed in a new function of its own, but for reasons 334 * this should be placed in a new function of its own, but for reasons
@@ -360,9 +356,9 @@ int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx)
360 rsa->blinding->thread_id = CRYPTO_thread_id(); 356 rsa->blinding->thread_id = CRYPTO_thread_id();
361 rsa->flags |= RSA_FLAG_BLINDING; 357 rsa->flags |= RSA_FLAG_BLINDING;
362 rsa->flags &= ~RSA_FLAG_NO_BLINDING; 358 rsa->flags &= ~RSA_FLAG_NO_BLINDING;
359 BN_free(Ai);
363 ret=1; 360 ret=1;
364err: 361err:
365 if (Ai != NULL) BN_free(Ai);
366 BN_CTX_end(ctx); 362 BN_CTX_end(ctx);
367 if (ctx != p_ctx) BN_CTX_free(ctx); 363 if (ctx != p_ctx) BN_CTX_free(ctx);
368 return(ret); 364 return(ret);
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/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 54d598565d..8973921778 100644
--- a/src/lib/libssl/src/crypto/threads/mttest.c
+++ b/src/lib/libssl/src/crypto/threads/mttest.c
@@ -243,7 +243,8 @@ bad:
243 goto end; 243 goto end;
244 } 244 }
245 245
246 if (cipher == NULL) cipher=getenv("SSL_CIPHER"); 246 if (cipher == NULL && issetugid() == 0)
247 cipher=getenv("SSL_CIPHER");
247 248
248 SSL_load_error_strings(); 249 SSL_load_error_strings();
249 OpenSSL_add_ssl_algorithms(); 250 OpenSSL_add_ssl_algorithms();
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 13e5f20dcb..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 strcpy(prompt, prompt1); 433 strlcpy(prompt, prompt1, len + 1);
434 strcat(prompt, object_desc); 434 strlcat(prompt, object_desc, len + 1);
435 if (object_name) 435 if (object_name)
436 { 436 {
437 strcat(prompt, prompt2); 437 strlcat(prompt, prompt2, len + 1);
438 strcat(prompt, object_name); 438 strlcat(prompt, object_name, len + 1);
439 } 439 }
440 strcat(prompt, prompt3); 440 strlcat(prompt, prompt3, len + 1);
441 } 441 }
442 return prompt; 442 return prompt;
443 } 443 }
@@ -865,7 +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 strcpy(uis->result_buf, result); 868 strlcpy(uis->result_buf, result,
869 uis->_.string_data.result_maxsize + 1);
869 break; 870 break;
870 case UIT_BOOLEAN: 871 case UIT_BOOLEAN:
871 { 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 448bd7e69c..a5c306f1fd 100644
--- a/src/lib/libssl/src/crypto/x509/by_dir.c
+++ b/src/lib/libssl/src/crypto/x509/by_dir.c
@@ -302,8 +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 sprintf(b->data,"%s/%08lx.%s%d",ctx->dirs[i],h, 305 snprintf(b->data,b->max,"%s/%08lx.%s%d",ctx->dirs[i],h,
306 postfix,k); 306 postfix,k);
307 k++; 307 k++;
308 if (stat(b->data,&st) < 0) 308 if (stat(b->data,&st) < 0)
309 break; 309 break;
diff --git a/src/lib/libssl/src/crypto/x509/x509_trs.c b/src/lib/libssl/src/crypto/x509/x509_trs.c
index 881252608d..17d69ac005 100644
--- a/src/lib/libssl/src/crypto/x509/x509_trs.c
+++ b/src/lib/libssl/src/crypto/x509/x509_trs.c
@@ -82,7 +82,6 @@ static X509_TRUST trstandard[] = {
82{X509_TRUST_SSL_CLIENT, 0, trust_1oidany, "SSL Client", NID_client_auth, NULL}, 82{X509_TRUST_SSL_CLIENT, 0, trust_1oidany, "SSL Client", NID_client_auth, NULL},
83{X509_TRUST_SSL_SERVER, 0, trust_1oidany, "SSL Server", NID_server_auth, NULL}, 83{X509_TRUST_SSL_SERVER, 0, trust_1oidany, "SSL Server", NID_server_auth, NULL},
84{X509_TRUST_EMAIL, 0, trust_1oidany, "S/MIME email", NID_email_protect, NULL}, 84{X509_TRUST_EMAIL, 0, trust_1oidany, "S/MIME email", NID_email_protect, NULL},
85{X509_TRUST_OBJECT_SIGN, 0, trust_1oidany, "Object Signer", NID_code_sign, NULL},
86{X509_TRUST_OCSP_SIGN, 0, trust_1oid, "OCSP responder", NID_OCSP_sign, NULL}, 85{X509_TRUST_OCSP_SIGN, 0, trust_1oid, "OCSP responder", NID_OCSP_sign, NULL},
87{X509_TRUST_OCSP_REQUEST, 0, trust_1oid, "OCSP request", NID_ad_OCSP, NULL} 86{X509_TRUST_OCSP_REQUEST, 0, trust_1oid, "OCSP request", NID_ad_OCSP, NULL}
88}; 87};
diff --git a/src/lib/libssl/src/crypto/x509/x509_txt.c b/src/lib/libssl/src/crypto/x509/x509_txt.c
index 4f83db8ba2..9d09ae17e8 100644
--- a/src/lib/libssl/src/crypto/x509/x509_txt.c
+++ b/src/lib/libssl/src/crypto/x509/x509_txt.c
@@ -148,7 +148,7 @@ const char *X509_verify_cert_error_string(long n)
148 return("unhandled critical extension"); 148 return("unhandled critical extension");
149 149
150 default: 150 default:
151 sprintf(buf,"error number %ld",n); 151 snprintf(buf,sizeof buf,"error number %ld",n);
152 return(buf); 152 return(buf);
153 } 153 }
154 } 154 }
diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.c b/src/lib/libssl/src/crypto/x509/x509_vfy.c
index 2bb21b443e..04997ba456 100644
--- a/src/lib/libssl/src/crypto/x509/x509_vfy.c
+++ b/src/lib/libssl/src/crypto/x509/x509_vfy.c
@@ -453,9 +453,9 @@ static int check_revocation(X509_STORE_CTX *ctx)
453 if (!(ctx->flags & X509_V_FLAG_CRL_CHECK)) 453 if (!(ctx->flags & X509_V_FLAG_CRL_CHECK))
454 return 1; 454 return 1;
455 if (ctx->flags & X509_V_FLAG_CRL_CHECK_ALL) 455 if (ctx->flags & X509_V_FLAG_CRL_CHECK_ALL)
456 last = sk_X509_num(ctx->chain) - 1;
457 else
458 last = 0; 456 last = 0;
457 else
458 last = sk_X509_num(ctx->chain) - 1;
459 for(i = 0; i <= last; i++) 459 for(i = 0; i <= last; i++)
460 { 460 {
461 ctx->error_depth = i; 461 ctx->error_depth = i;
diff --git a/src/lib/libssl/src/crypto/x509/x509type.c b/src/lib/libssl/src/crypto/x509/x509type.c
index f78c2a6b43..8e78b34458 100644
--- a/src/lib/libssl/src/crypto/x509/x509type.c
+++ b/src/lib/libssl/src/crypto/x509/x509type.c
@@ -99,15 +99,14 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey)
99 case EVP_PKEY_RSA: 99 case EVP_PKEY_RSA:
100 ret|=EVP_PKS_RSA; 100 ret|=EVP_PKS_RSA;
101 break; 101 break;
102 case EVP_PKEY_DSA: 102 case EVP_PKS_DSA:
103 ret|=EVP_PKS_DSA; 103 ret|=EVP_PKS_DSA;
104 break; 104 break;
105 default: 105 default:
106 break; 106 break;
107 } 107 }
108 108
109 if (EVP_PKEY_size(pk) <= 512/8) /* /8 because it's 512 bits we look 109 if (EVP_PKEY_size(pk) <= 512)
110 for, not bytes */
111 ret|=EVP_PKT_EXP; 110 ret|=EVP_PKT_EXP;
112 if(pkey==NULL) EVP_PKEY_free(pk); 111 if(pkey==NULL) EVP_PKEY_free(pk);
113 return(ret); 112 return(ret);
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 0e9e7dcb4f..0fae31a3a6 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_alt.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_alt.c
@@ -137,7 +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 sprintf(oline, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); 140 snprintf(oline, sizeof oline, "%d.%d.%d.%d", p[0], p[1], p[2],
141 p[3]);
141 X509V3_add_value("IP Address",oline, &ret); 142 X509V3_add_value("IP Address",oline, &ret);
142 break; 143 break;
143 144
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_conf.c b/src/lib/libssl/src/crypto/x509v3/v3_conf.c
index 1284d5aaa5..1a3448e121 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_conf.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_conf.c
@@ -236,7 +236,7 @@ static int v3_check_critical(char **value)
236static int v3_check_generic(char **value) 236static int v3_check_generic(char **value)
237{ 237{
238 char *p = *value; 238 char *p = *value;
239 if ((strlen(p) < 4) || strncmp(p, "DER:", 4)) return 0; 239 if ((strlen(p) < 4) || strncmp(p, "DER:,", 4)) return 0;
240 p+=4; 240 p+=4;
241 while (isspace((unsigned char)*p)) p++; 241 while (isspace((unsigned char)*p)) p++;
242 *value = p; 242 *value = p;
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_cpols.c b/src/lib/libssl/src/crypto/x509v3/v3_cpols.c
index 0d554f3a2c..0d4ab1f680 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_cpols.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_cpols.c
@@ -73,7 +73,7 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
73 STACK_OF(CONF_VALUE) *polstrs, int ia5org); 73 STACK_OF(CONF_VALUE) *polstrs, int ia5org);
74static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, 74static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
75 STACK_OF(CONF_VALUE) *unot, int ia5org); 75 STACK_OF(CONF_VALUE) *unot, int ia5org);
76static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos); 76static STACK_OF(ASN1_INTEGER) *nref_nos(STACK_OF(CONF_VALUE) *nos);
77 77
78X509V3_EXT_METHOD v3_cpols = { 78X509V3_EXT_METHOD v3_cpols = {
79NID_certificate_policies, 0,ASN1_ITEM_ref(CERTIFICATEPOLICIES), 79NID_certificate_policies, 0,ASN1_ITEM_ref(CERTIFICATEPOLICIES),
@@ -226,8 +226,6 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
226 qual = notice_section(ctx, unot, ia5org); 226 qual = notice_section(ctx, unot, ia5org);
227 X509V3_section_free(ctx, unot); 227 X509V3_section_free(ctx, unot);
228 if(!qual) goto err; 228 if(!qual) goto err;
229 if(!pol->qualifiers) pol->qualifiers =
230 sk_POLICYQUALINFO_new_null();
231 if(!sk_POLICYQUALINFO_push(pol->qualifiers, qual)) 229 if(!sk_POLICYQUALINFO_push(pol->qualifiers, qual))
232 goto merr; 230 goto merr;
233 } else { 231 } else {
@@ -257,7 +255,7 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
257static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, 255static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
258 STACK_OF(CONF_VALUE) *unot, int ia5org) 256 STACK_OF(CONF_VALUE) *unot, int ia5org)
259{ 257{
260 int i, ret; 258 int i;
261 CONF_VALUE *cnf; 259 CONF_VALUE *cnf;
262 USERNOTICE *not; 260 USERNOTICE *not;
263 POLICYQUALINFO *qual; 261 POLICYQUALINFO *qual;
@@ -277,8 +275,8 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
277 if(!(nref = NOTICEREF_new())) goto merr; 275 if(!(nref = NOTICEREF_new())) goto merr;
278 not->noticeref = nref; 276 not->noticeref = nref;
279 } else nref = not->noticeref; 277 } else nref = not->noticeref;
280 if(ia5org) nref->organization->type = V_ASN1_IA5STRING; 278 if(ia5org) nref->organization = M_ASN1_IA5STRING_new();
281 else nref->organization->type = V_ASN1_VISIBLESTRING; 279 else nref->organization = M_ASN1_VISIBLESTRING_new();
282 if(!ASN1_STRING_set(nref->organization, cnf->value, 280 if(!ASN1_STRING_set(nref->organization, cnf->value,
283 strlen(cnf->value))) goto merr; 281 strlen(cnf->value))) goto merr;
284 } else if(!strcmp(cnf->name, "noticeNumbers")) { 282 } else if(!strcmp(cnf->name, "noticeNumbers")) {
@@ -294,12 +292,12 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
294 X509V3_conf_err(cnf); 292 X509V3_conf_err(cnf);
295 goto err; 293 goto err;
296 } 294 }
297 ret = nref_nos(nref->noticenos, nos); 295 nref->noticenos = nref_nos(nos);
298 sk_CONF_VALUE_pop_free(nos, X509V3_conf_free); 296 sk_CONF_VALUE_pop_free(nos, X509V3_conf_free);
299 if (!ret) 297 if(!nref->noticenos) goto err;
300 goto err;
301 } else { 298 } else {
302 X509V3err(X509V3_F_NOTICE_SECTION,X509V3_R_INVALID_OPTION); 299 X509V3err(X509V3_F_NOTICE_SECTION,X509V3_R_INVALID_OPTION);
300
303 X509V3_conf_err(cnf); 301 X509V3_conf_err(cnf);
304 goto err; 302 goto err;
305 } 303 }
@@ -321,13 +319,15 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
321 return NULL; 319 return NULL;
322} 320}
323 321
324static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos) 322static STACK_OF(ASN1_INTEGER) *nref_nos(STACK_OF(CONF_VALUE) *nos)
325{ 323{
324 STACK_OF(ASN1_INTEGER) *nnums;
326 CONF_VALUE *cnf; 325 CONF_VALUE *cnf;
327 ASN1_INTEGER *aint; 326 ASN1_INTEGER *aint;
328 327
329 int i; 328 int i;
330 329
330 if(!(nnums = sk_ASN1_INTEGER_new_null())) goto merr;
331 for(i = 0; i < sk_CONF_VALUE_num(nos); i++) { 331 for(i = 0; i < sk_CONF_VALUE_num(nos); i++) {
332 cnf = sk_CONF_VALUE_value(nos, i); 332 cnf = sk_CONF_VALUE_value(nos, i);
333 if(!(aint = s2i_ASN1_INTEGER(NULL, cnf->name))) { 333 if(!(aint = s2i_ASN1_INTEGER(NULL, cnf->name))) {
@@ -336,14 +336,14 @@ static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos)
336 } 336 }
337 if(!sk_ASN1_INTEGER_push(nnums, aint)) goto merr; 337 if(!sk_ASN1_INTEGER_push(nnums, aint)) goto merr;
338 } 338 }
339 return 1; 339 return nnums;
340 340
341 merr: 341 merr:
342 X509V3err(X509V3_F_NOTICE_SECTION,ERR_R_MALLOC_FAILURE); 342 X509V3err(X509V3_F_NOTICE_SECTION,ERR_R_MALLOC_FAILURE);
343 343
344 err: 344 err:
345 sk_ASN1_INTEGER_pop_free(nnums, ASN1_STRING_free); 345 sk_ASN1_INTEGER_pop_free(nnums, ASN1_STRING_free);
346 return 0; 346 return NULL;
347} 347}
348 348
349 349
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_info.c b/src/lib/libssl/src/crypto/x509v3/v3_info.c
index e269df1373..28cc00686a 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_info.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_info.c
@@ -105,7 +105,7 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method
105 STACK_OF(CONF_VALUE) *ret) 105 STACK_OF(CONF_VALUE) *ret)
106{ 106{
107 ACCESS_DESCRIPTION *desc; 107 ACCESS_DESCRIPTION *desc;
108 int i; 108 int i,nlen;
109 char objtmp[80], *ntmp; 109 char objtmp[80], *ntmp;
110 CONF_VALUE *vtmp; 110 CONF_VALUE *vtmp;
111 for(i = 0; i < sk_ACCESS_DESCRIPTION_num(ainfo); i++) { 111 for(i = 0; i < sk_ACCESS_DESCRIPTION_num(ainfo); i++) {
@@ -114,15 +114,16 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method
114 if(!ret) break; 114 if(!ret) break;
115 vtmp = sk_CONF_VALUE_value(ret, i); 115 vtmp = sk_CONF_VALUE_value(ret, i);
116 i2t_ASN1_OBJECT(objtmp, sizeof objtmp, desc->method); 116 i2t_ASN1_OBJECT(objtmp, sizeof objtmp, desc->method);
117 ntmp = OPENSSL_malloc(strlen(objtmp) + strlen(vtmp->name) + 5); 117 nlen = strlen(objtmp) + strlen(vtmp->name) + 5;
118 ntmp = OPENSSL_malloc(nlen);
118 if(!ntmp) { 119 if(!ntmp) {
119 X509V3err(X509V3_F_I2V_AUTHORITY_INFO_ACCESS, 120 X509V3err(X509V3_F_I2V_AUTHORITY_INFO_ACCESS,
120 ERR_R_MALLOC_FAILURE); 121 ERR_R_MALLOC_FAILURE);
121 return NULL; 122 return NULL;
122 } 123 }
123 strcpy(ntmp, objtmp); 124 strlcpy(ntmp, objtmp, nlen);
124 strcat(ntmp, " - "); 125 strlcat(ntmp, " - ", nlen);
125 strcat(ntmp, vtmp->name); 126 strlcat(ntmp, vtmp->name, nlen);
126 OPENSSL_free(vtmp->name); 127 OPENSSL_free(vtmp->name);
127 vtmp->name = ntmp; 128 vtmp->name = ntmp;
128 129
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_lib.c b/src/lib/libssl/src/crypto/x509v3/v3_lib.c
index ca5a4a4a57..482ca8ccf5 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_lib.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_lib.c
@@ -202,7 +202,6 @@ void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx)
202 if(OBJ_obj2nid(ex->object) == nid) { 202 if(OBJ_obj2nid(ex->object) == nid) {
203 if(idx) { 203 if(idx) {
204 *idx = i; 204 *idx = i;
205 found_ex = ex;
206 break; 205 break;
207 } else if(found_ex) { 206 } else if(found_ex) {
208 /* Found more than one */ 207 /* Found more than one */
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_prn.c b/src/lib/libssl/src/crypto/x509v3/v3_prn.c
index 5d268eb768..754808b625 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_prn.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_prn.c
@@ -184,7 +184,7 @@ int X509V3_extensions_print(BIO *bp, char *title, STACK_OF(X509_EXTENSION) *exts
184 j=X509_EXTENSION_get_critical(ex); 184 j=X509_EXTENSION_get_critical(ex);
185 if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0) 185 if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0)
186 return 0; 186 return 0;
187 if(!X509V3_EXT_print(bp, ex, flag, indent + 4)) 187 if(!X509V3_EXT_print(bp, ex, flag, 12))
188 { 188 {
189 BIO_printf(bp, "%*s", indent + 4, ""); 189 BIO_printf(bp, "%*s", indent + 4, "");
190 M_ASN1_OCTET_STRING_print(bp,ex->value); 190 M_ASN1_OCTET_STRING_print(bp,ex->value);
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/ca.pod b/src/lib/libssl/src/doc/apps/ca.pod
index 74f45ca2f9..de66c534b5 100644
--- a/src/lib/libssl/src/doc/apps/ca.pod
+++ b/src/lib/libssl/src/doc/apps/ca.pod
@@ -359,7 +359,7 @@ the same as the B<-md> option. The message digest to use. Mandatory.
359the text database file to use. Mandatory. This file must be present 359the text database file to use. Mandatory. This file must be present
360though initially it will be empty. 360though initially it will be empty.
361 361
362=item B<serial> 362=item B<serialfile>
363 363
364a text file containing the next serial number to use in hex. Mandatory. 364a text file containing the next serial number to use in hex. Mandatory.
365This file must be present and contain a valid serial number. 365This file must be present and contain a valid serial number.
@@ -400,7 +400,7 @@ here, except the B<no_signame> and B<no_sigdump> are permanently set
400and cannot be disabled (this is because the certificate signature cannot 400and cannot be disabled (this is because the certificate signature cannot
401be displayed because the certificate has not been signed at this point). 401be displayed because the certificate has not been signed at this point).
402 402
403For convenience the values B<ca_default> are accepted by both to produce 403For convenience the values B<default_ca> are accepted by both to produce
404a reasonable output. 404a reasonable output.
405 405
406If neither option is present the format used in earlier versions of 406If neither option is present the format used in earlier versions of
@@ -513,8 +513,8 @@ A sample configuration file with the relevant sections for B<ca>:
513 policy = policy_any # default policy 513 policy = policy_any # default policy
514 email_in_dn = no # Don't add the email into cert DN 514 email_in_dn = no # Don't add the email into cert DN
515 515
516 nameopt = ca_default # Subject name display option 516 nameopt = default_ca # Subject name display option
517 certopt = ca_default # Certificate display option 517 certopt = default_ca # Certificate display option
518 copy_extensions = none # Don't copy extensions from request 518 copy_extensions = none # Don't copy extensions from request
519 519
520 [ policy_any ] 520 [ policy_any ]
diff --git a/src/lib/libssl/src/doc/apps/s_client.pod b/src/lib/libssl/src/doc/apps/s_client.pod
index d061326c1f..47dc93cb3f 100644
--- a/src/lib/libssl/src/doc/apps/s_client.pod
+++ b/src/lib/libssl/src/doc/apps/s_client.pod
@@ -168,7 +168,7 @@ command for more information.
168 168
169send the protocol-specific message(s) to switch to TLS for communication. 169send the protocol-specific message(s) to switch to TLS for communication.
170B<protocol> is a keyword for the intended protocol. Currently, the only 170B<protocol> is a keyword for the intended protocol. Currently, the only
171supported keywords are "smtp" and "pop3". 171supported keyword is "smtp".
172 172
173=item B<-engine id> 173=item B<-engine id>
174 174
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod b/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod
index 929557d22f..fdb603b38e 100644
--- a/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod
+++ b/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod
@@ -55,15 +55,16 @@ to standard output:
55Read Base64 encoded data from standard input and write the decoded 55Read Base64 encoded data from standard input and write the decoded
56data to standard output: 56data to standard output:
57 57
58 BIO *bio, *b64, *bio_out; 58 BIO *bio, *b64, bio_out;
59 char inbuf[512]; 59 char inbuf[512];
60 int inlen; 60 int inlen;
61 char message[] = "Hello World \n";
61 62
62 b64 = BIO_new(BIO_f_base64()); 63 b64 = BIO_new(BIO_f_base64());
63 bio = BIO_new_fp(stdin, BIO_NOCLOSE); 64 bio = BIO_new_fp(stdin, BIO_NOCLOSE);
64 bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); 65 bio_out = BIO_new_fp(stdout, BIO_NOCLOSE);
65 bio = BIO_push(b64, bio); 66 bio = BIO_push(b64, bio);
66 while((inlen = BIO_read(bio, inbuf, 512) > 0) 67 while((inlen = BIO_read(bio, inbuf, strlen(message))) > 0)
67 BIO_write(bio_out, inbuf, inlen); 68 BIO_write(bio_out, inbuf, inlen);
68 69
69 BIO_free_all(bio); 70 BIO_free_all(bio);
diff --git a/src/lib/libssl/src/doc/crypto/BIO_new_bio_pair.pod b/src/lib/libssl/src/doc/crypto/BIO_new_bio_pair.pod
new file mode 100644
index 0000000000..1a8dbc577b
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/BIO_new_bio_pair.pod
@@ -0,0 +1,103 @@
1=pod
2
3=head1 NAME
4
5BIO_new_bio_pair - create a new BIO pair
6
7=head1 SYNOPSIS
8
9 #include <openssl/bio.h>
10
11 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, BIO **bio2, size_t writebuf2);
12
13=head1 DESCRIPTION
14
15BIO_new_bio_pair() creates a buffering BIO pair based on the
16L<SSL_set_bio(3)|SSL_set_bio(3)> method. The BIO pair has two endpoints between which
17data can be buffered. Its typical use is to connect one endpoint as underlying
18input/output BIO to an SSL and access the other one controlled by the program
19instead of accessing the network connection directly.
20
21The two new BIOs B<bio1> and B<bio2> are symmetric with respect to their
22functionality. The size of their buffers is determined by B<writebuf1> and
23B<writebuf2>. If the size give is 0, the default size is used.
24
25BIO_new_bio_pair() does not check whether B<bio1> or B<bio2> do point to
26some other BIO, the values are overwritten, BIO_free() is not called.
27
28The two BIOs, even though forming a BIO pair and must be BIO_free()'ed
29separately. This can be of importance, as some SSL-functions like SSL_set_bio()
30or SSL_free() call BIO_free() implicitly, so that the peer-BIO is left
31untouched and must also be BIO_free()'ed.
32
33=head1 EXAMPLE
34
35The BIO pair can be used to have full control over the network access of an
36application. The application can call select() on the socket as required
37without having to go through the SSL-interface.
38
39 BIO *internal_bio, *network_bio;
40 ...
41 BIO_new_bio_pair(internal_bio, 0, network_bio, 0);
42 SSL_set_bio(ssl, internal_bio, internal_bio);
43 SSL_operations();
44 ...
45
46 application | TLS-engine
47 | |
48 +----------> SSL_operations()
49 | /\ ||
50 | || \/
51 | BIO-pair (internal_bio)
52 +----------< BIO-pair (network_bio)
53 | |
54 socket |
55
56 ...
57 SSL_free(ssl); /* implicitly frees internal_bio */
58 BIO_free(network_bio);
59 ...
60
61As the BIO pair will only buffer the data and never directly access the
62connection, it behaves non-blocking and will return as soon as the write
63buffer is full or the read buffer is drained. Then the application has to
64flush the write buffer and/or fill the read buffer.
65
66Use the BIO_ctrl_pending(), to find out whether data is buffered in the BIO
67and must be transfered to the network. Use BIO_ctrl_get_read_request() to
68find out, how many bytes must be written into the buffer before the
69SSL_operation() can successfully be continued.
70
71=head1 WARNING
72
73As the data is buffered, SSL_operation() may return with a ERROR_SSL_WANT_READ
74condition, but there is still data in the write buffer. An application must
75not rely on the error value of SSL_operation() but must assure that the
76write buffer is always flushed first. Otherwise a deadlock may occur as
77the peer might be waiting for the data before being able to continue.
78
79=head1 RETURN VALUES
80
81The following return values can occur:
82
83=over 4
84
85=item 1
86
87The BIO pair was created successfully. The new BIOs are available in
88B<bio1> and B<bio2>.
89
90=item 0
91
92The operation failed. The NULL pointer is stored into the locations for
93B<bio1> and B<bio2>. Check the error stack for more information.
94
95=back
96
97=head1 SEE ALSO
98
99L<SSL_set_bio(3)|SSL_set_bio(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>,
100L<BIO_ctrl_pending(3)|BIO_ctrl_pending(3)>,
101L<BIO_ctrl_get_read_request(3)|BIO_ctrl_get_read_request(3)>
102
103=cut
diff --git a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod
index 5901c39526..58afd8f0b8 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod
+++ b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod
@@ -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/OpenSSL_add_all_algorithms.pod b/src/lib/libssl/src/doc/crypto/OpenSSL_add_all_algorithms.pod
index 486c903430..e63411b5bb 100644
--- a/src/lib/libssl/src/doc/crypto/OpenSSL_add_all_algorithms.pod
+++ b/src/lib/libssl/src/doc/crypto/OpenSSL_add_all_algorithms.pod
@@ -36,7 +36,7 @@ None of the functions return a value.
36 36
37=head1 NOTES 37=head1 NOTES
38 38
39A typical application will will call OpenSSL_add_all_algorithms() initially and 39A typical application will call OpenSSL_add_all_algorithms() initially and
40EVP_cleanup() before exiting. 40EVP_cleanup() before exiting.
41 41
42An application does not need to add algorithms to use them explicitly, for example 42An application does not need to add algorithms to use them explicitly, for example
diff --git a/src/lib/libssl/src/doc/crypto/RSA_print.pod b/src/lib/libssl/src/doc/crypto/RSA_print.pod
index e28d107d1c..c971e91f4d 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_print.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_print.pod
@@ -44,6 +44,6 @@ L<dh(3)|dh(3)>, L<dsa(3)|dsa(3)>, L<rsa(3)|rsa(3)>, L<BN_bn2bin(3)|BN_bn2bin(3)>
44 44
45RSA_print(), RSA_print_fp(), DSA_print(), DSA_print_fp(), DH_print(), 45RSA_print(), RSA_print_fp(), DSA_print(), DSA_print_fp(), DH_print(),
46DH_print_fp() are available in all versions of SSLeay and OpenSSL. 46DH_print_fp() are available in all versions of SSLeay and OpenSSL.
47DSAparams_print() and DSAparams_print_pf() were added in SSLeay 0.8. 47DSAparams_print() and DSAparams_print_fp() were added in SSLeay 0.8.
48 48
49=cut 49=cut
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/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/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_CTX_set_verify.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod
index ca8d81b82c..74f05301ec 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
@@ -135,9 +135,9 @@ process is immediately stopped with "verification failed" state. If
135SSL_VERIFY_PEER is set, a verification failure alert is sent to the peer and 135SSL_VERIFY_PEER is set, a verification failure alert is sent to the peer and
136the TLS/SSL handshake is terminated. If B<verify_callback> returns 1, 136the TLS/SSL handshake is terminated. If B<verify_callback> returns 1,
137the verification process is continued. If B<verify_callback> always returns 137the verification process is continued. If B<verify_callback> always returns
1381, the TLS/SSL handshake will not be terminated with respect to verification 1381, the TLS/SSL handshake will never be terminated because of this application
139failures and the connection will be established. The calling process can 139experiencing a verification failure. The calling process can however
140however retrieve the error code of the last verification error using 140retrieve the error code of the last verification error using
141L<SSL_get_verify_result(3)|SSL_get_verify_result(3)> or by maintaining its 141L<SSL_get_verify_result(3)|SSL_get_verify_result(3)> or by maintaining its
142own error storage managed by B<verify_callback>. 142own error storage managed by B<verify_callback>.
143 143
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod
index ea2faba3ec..b8868f18bf 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod
@@ -68,9 +68,7 @@ should be preferred.
68 68
69SSL_CTX_use_certificate_chain_file() loads a certificate chain from 69SSL_CTX_use_certificate_chain_file() loads a certificate chain from
70B<file> into B<ctx>. The certificates must be in PEM format and must 70B<file> into B<ctx>. The certificates must be in PEM format and must
71be sorted starting with the subject's certificate (actual client or server 71be sorted starting with the certificate to the highest level (root CA).
72certificate), followed by intermediate CA certificates if applicable, and
73ending at the highest level (root) CA.
74There is no corresponding function working on a single SSL object. 72There is no corresponding function working on a single SSL object.
75 73
76SSL_CTX_use_PrivateKey() adds B<pkey> as private key to B<ctx>. 74SSL_CTX_use_PrivateKey() adds B<pkey> as private key to B<ctx>.
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_accept.pod b/src/lib/libssl/src/doc/ssl/SSL_accept.pod
index cc724c0d56..a673edba85 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_accept.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_accept.pod
@@ -28,8 +28,7 @@ should be called again.
28 28
29If the underlying BIO is B<non-blocking>, SSL_accept() will also return 29If the underlying BIO is B<non-blocking>, SSL_accept() will also return
30when the underlying BIO could not satisfy the needs of SSL_accept() 30when the underlying BIO could not satisfy the needs of SSL_accept()
31to continue the handshake, indicating the problem by the return value -1. 31to continue the handshake. In this case a call to SSL_get_error() with the
32In this case a call to SSL_get_error() with the
33return value of SSL_accept() will yield B<SSL_ERROR_WANT_READ> or 32return value of SSL_accept() will yield B<SSL_ERROR_WANT_READ> or
34B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after 33B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after
35taking appropriate action to satisfy the needs of SSL_accept(). 34taking appropriate action to satisfy the needs of SSL_accept().
diff --git a/src/lib/libssl/src/doc/ssl/SSL_connect.pod b/src/lib/libssl/src/doc/ssl/SSL_connect.pod
index cc56ebb75f..8426310c0d 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_connect.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_connect.pod
@@ -25,8 +25,7 @@ handshake has been finished or an error occurred.
25 25
26If the underlying BIO is B<non-blocking>, SSL_connect() will also return 26If the underlying BIO is B<non-blocking>, SSL_connect() will also return
27when the underlying BIO could not satisfy the needs of SSL_connect() 27when the underlying BIO could not satisfy the needs of SSL_connect()
28to continue the handshake, indicating the problem by the return value -1. 28to continue the handshake. In this case a call to SSL_get_error() with the
29In this case a call to SSL_get_error() with the
30return value of SSL_connect() will yield B<SSL_ERROR_WANT_READ> or 29return value of SSL_connect() will yield B<SSL_ERROR_WANT_READ> or
31B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after 30B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after
32taking appropriate action to satisfy the needs of SSL_connect(). 31taking appropriate action to satisfy the needs of SSL_connect().
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 c6049d5e53..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 sucesss 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/e_os.h b/src/lib/libssl/src/e_os.h
index 096eabe09a..f7d09c5295 100644
--- a/src/lib/libssl/src/e_os.h
+++ b/src/lib/libssl/src/e_os.h
@@ -174,13 +174,6 @@ extern "C" {
174#define closesocket(s) close(s) 174#define closesocket(s) close(s)
175#define readsocket(s,b,n) recv((s),(b),(n),0) 175#define readsocket(s,b,n) recv((s),(b),(n),0)
176#define writesocket(s,b,n) send((s),(b),(n),0) 176#define writesocket(s,b,n) send((s),(b),(n),0)
177#elif defined(OPENSSL_SYS_VXWORKS)
178#define get_last_socket_error() errno
179#define clear_socket_error() errno=0
180#define ioctlsocket(a,b,c) ioctl((a),(b),(int)(c))
181#define closesocket(s) close(s)
182#define readsocket(s,b,n) read((s),(b),(n))
183#define writesocket(s,b,n) write((s),(char *)(b),(n))
184#else 177#else
185#define get_last_socket_error() errno 178#define get_last_socket_error() errno
186#define clear_socket_error() errno=0 179#define clear_socket_error() errno=0
@@ -257,7 +250,7 @@ extern "C" {
257# define EXIT(n) _wsetexit(_WINEXITNOPERSIST) 250# define EXIT(n) _wsetexit(_WINEXITNOPERSIST)
258# define OPENSSL_EXIT(n) do { if (n == 0) EXIT(n); return(n); } while(0) 251# define OPENSSL_EXIT(n) do { if (n == 0) EXIT(n); return(n); } while(0)
259# else 252# else
260# define EXIT(n) exit(n) 253# define EXIT(n) return(n)
261# endif 254# endif
262# define LIST_SEPARATOR_CHAR ';' 255# define LIST_SEPARATOR_CHAR ';'
263# ifndef X_OK 256# ifndef X_OK
@@ -338,8 +331,6 @@ extern "C" {
338# define pid_t int /* pid_t is missing on NEXTSTEP/OPENSTEP 331# define pid_t int /* pid_t is missing on NEXTSTEP/OPENSTEP
339 * (unless when compiling with -D_POSIX_SOURCE, 332 * (unless when compiling with -D_POSIX_SOURCE,
340 * which doesn't work for us) */ 333 * which doesn't work for us) */
341# endif
342# if defined(NeXT) || defined(OPENSSL_SYS_NEWS4) || defined(OPENSSL_SYS_SUNOS)
343# define ssize_t int /* ditto */ 334# define ssize_t int /* ditto */
344# endif 335# endif
345# ifdef OPENSSL_SYS_NEWS4 /* setvbuf is missing on mips-sony-bsd */ 336# ifdef OPENSSL_SYS_NEWS4 /* setvbuf is missing on mips-sony-bsd */
@@ -526,6 +517,10 @@ extern char *sys_errlist[]; extern int sys_nerr;
526#define TTY_STRUCT int 517#define TTY_STRUCT int
527 518
528#define sleep(a) taskDelay((a) * sysClkRateGet()) 519#define sleep(a) taskDelay((a) * sysClkRateGet())
520#if defined(ioctlsocket)
521#undef ioctlsocket
522#endif
523#define ioctlsocket(a,b,c) ioctl((a),(b),*(c))
529 524
530#include <vxWorks.h> 525#include <vxWorks.h>
531#include <sockLib.h> 526#include <sockLib.h>
diff --git a/src/lib/libssl/src/openssl.spec b/src/lib/libssl/src/openssl.spec
index 9ce236e0d2..9bd9c8375e 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 c 4%define librev b
5Release: 1 5Release: 1
6 6
7%define openssldir /var/ssl 7%define openssldir /var/ssl
@@ -83,18 +83,18 @@ documentation and POD files from which the man pages were produced.
83 83
84%build 84%build
85 85
86%define CONFIG_FLAGS -DSSL_ALLOW_ADH --prefix=/usr --openssldir=%{openssldir} 86%define CONFIG_FLAGS -DSSL_ALLOW_ADH --prefix=/usr
87 87
88perl util/perlpath.pl /usr/bin/perl 88perl util/perlpath.pl /usr/bin/perl
89 89
90%ifarch i386 i486 i586 i686 90%ifarch i386 i486 i586 i686
91./Configure %{CONFIG_FLAGS} linux-elf shared 91./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-elf shared
92%endif 92%endif
93%ifarch ppc 93%ifarch ppc
94./Configure %{CONFIG_FLAGS} linux-ppc shared 94./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-ppc shared
95%endif 95%endif
96%ifarch alpha 96%ifarch alpha
97./Configure %{CONFIG_FLAGS} linux-alpha shared 97./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-alpha shared
98%endif 98%endif
99LD_LIBRARY_PATH=`pwd` make 99LD_LIBRARY_PATH=`pwd` make
100LD_LIBRARY_PATH=`pwd` make rehash 100LD_LIBRARY_PATH=`pwd` make rehash
@@ -102,7 +102,12 @@ LD_LIBRARY_PATH=`pwd` make test
102 102
103%install 103%install
104rm -rf $RPM_BUILD_ROOT 104rm -rf $RPM_BUILD_ROOT
105make MANDIR=/usr/man MANSUFFIX=ssl INSTALL_PREFIX="$RPM_BUILD_ROOT" install 105make MANDIR=/usr/man INSTALL_PREFIX="$RPM_BUILD_ROOT" install
106
107# Rename manpages
108for x in $RPM_BUILD_ROOT/usr/man/man*/*
109 do mv ${x} ${x}ssl
110done
106 111
107# Make backwards-compatibility symlink to ssleay 112# Make backwards-compatibility symlink to ssleay
108ln -sf /usr/bin/openssl $RPM_BUILD_ROOT/usr/bin/ssleay 113ln -sf /usr/bin/openssl $RPM_BUILD_ROOT/usr/bin/ssleay
@@ -130,7 +135,6 @@ rm -rf $RPM_BUILD_ROOT
130%doc CHANGES CHANGES.SSLeay LICENSE NEWS README 135%doc CHANGES CHANGES.SSLeay LICENSE NEWS README
131 136
132%attr(0644,root,root) /usr/lib/*.a 137%attr(0644,root,root) /usr/lib/*.a
133%attr(0644,root,root) /usr/lib/pkgconfig/openssl.pc
134%attr(0644,root,root) /usr/include/openssl/* 138%attr(0644,root,root) /usr/include/openssl/*
135%attr(0644,root,root) /usr/man/man[3]/* 139%attr(0644,root,root) /usr/man/man[3]/*
136 140
@@ -146,8 +150,6 @@ ldconfig
146ldconfig 150ldconfig
147 151
148%changelog 152%changelog
149* Wed May 7 2003 Richard Levitte <richard@levitte.org>
150- Add /usr/lib/pkgconfig/openssl.pc to the development section.
151* Thu Mar 22 2001 Richard Levitte <richard@levitte.org> 153* Thu Mar 22 2001 Richard Levitte <richard@levitte.org>
152- Removed redundant subsection that re-installed libcrypto.a and libssl.a 154- Removed redundant subsection that re-installed libcrypto.a and libssl.a
153 as well. Also remove RSAref stuff completely, since it's not needed 155 as well. Also remove RSAref stuff completely, since it's not needed
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 7c45f8ff4e..a80f5b2f74 100644
--- a/src/lib/libssl/src/ssl/kssl.c
+++ b/src/lib/libssl/src/ssl/kssl.c
@@ -1496,9 +1496,8 @@ kssl_sget_tkt( /* UPDATE */ KSSL_CTX *kssl_ctx,
1496 "bad ticket from krb5_rd_req.\n"); 1496 "bad ticket from krb5_rd_req.\n");
1497 } 1497 }
1498 else if (kssl_ctx_setprinc(kssl_ctx, KSSL_CLIENT, 1498 else if (kssl_ctx_setprinc(kssl_ctx, KSSL_CLIENT,
1499 &krb5ticket->enc_part2->client->realm, 1499 &krb5ticket->enc_part2->client->realm,
1500 krb5ticket->enc_part2->client->data, 1500 krb5ticket->enc_part2->client->data))
1501 krb5ticket->enc_part2->client->length))
1502 { 1501 {
1503 kssl_err_set(kssl_err, SSL_R_KRB5_S_BAD_TICKET, 1502 kssl_err_set(kssl_err, SSL_R_KRB5_S_BAD_TICKET,
1504 "kssl_ctx_setprinc() fails.\n"); 1503 "kssl_ctx_setprinc() fails.\n");
@@ -1565,17 +1564,16 @@ kssl_ctx_free(KSSL_CTX *kssl_ctx)
1565 } 1564 }
1566 1565
1567 1566
1568/* Given an array of (krb5_data *) entity (and optional realm), 1567/* Given a (krb5_data *) entity (and optional realm),
1569** set the plain (char *) client_princ or service_host member 1568** set the plain (char *) client_princ or service_host member
1570** of the kssl_ctx struct. 1569** of the kssl_ctx struct.
1571*/ 1570*/
1572krb5_error_code 1571krb5_error_code
1573kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which, 1572kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,
1574 krb5_data *realm, krb5_data *entity, int nentities) 1573 krb5_data *realm, krb5_data *entity)
1575 { 1574 {
1576 char **princ; 1575 char **princ;
1577 int length; 1576 int length;
1578 int i;
1579 1577
1580 if (kssl_ctx == NULL || entity == NULL) return KSSL_CTX_ERR; 1578 if (kssl_ctx == NULL || entity == NULL) return KSSL_CTX_ERR;
1581 1579
@@ -1587,33 +1585,18 @@ kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,
1587 } 1585 }
1588 if (*princ) free(*princ); 1586 if (*princ) free(*princ);
1589 1587
1590 /* Add up all the entity->lengths */ 1588 length = entity->length + ((realm)? realm->length + 2: 1);
1591 length = 0;
1592 for (i=0; i < nentities; i++)
1593 {
1594 length += entity[i].length;
1595 }
1596 /* Add in space for the '/' character(s) (if any) */
1597 length += nentities-1;
1598 /* Space for the ('@'+realm+NULL | NULL) */
1599 length += ((realm)? realm->length + 2: 1);
1600
1601 if ((*princ = calloc(1, length)) == NULL) 1589 if ((*princ = calloc(1, length)) == NULL)
1602 return KSSL_CTX_ERR; 1590 return KSSL_CTX_ERR;
1603 else 1591 else
1604 { 1592 {
1605 for (i = 0; i < nentities; i++) 1593 strncpy(*princ, entity->data, entity->length);
1606 { 1594 (*princ)[entity->length]='\0';
1607 strncat(*princ, entity[i].data, entity[i].length);
1608 if (i < nentities-1)
1609 {
1610 strcat (*princ, "/");
1611 }
1612 }
1613 if (realm) 1595 if (realm)
1614 { 1596 {
1615 strcat (*princ, "@"); 1597 strcat (*princ, "@");
1616 (void) strncat(*princ, realm->data, realm->length); 1598 (void) strncat(*princ, realm->data, realm->length);
1599 (*princ)[entity->length+1+realm->length]='\0';
1617 } 1600 }
1618 } 1601 }
1619 1602
diff --git a/src/lib/libssl/src/ssl/kssl.h b/src/lib/libssl/src/ssl/kssl.h
index 19a689b089..cf7ebdd168 100644
--- a/src/lib/libssl/src/ssl/kssl.h
+++ b/src/lib/libssl/src/ssl/kssl.h
@@ -149,7 +149,7 @@ KSSL_CTX *kssl_ctx_new(void);
149KSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx); 149KSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx);
150void kssl_ctx_show(KSSL_CTX *kssl_ctx); 150void kssl_ctx_show(KSSL_CTX *kssl_ctx);
151krb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which, 151krb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,
152 krb5_data *realm, krb5_data *entity, int nentities); 152 krb5_data *realm, krb5_data *entity);
153krb5_error_code kssl_cget_tkt(KSSL_CTX *kssl_ctx, krb5_data **enc_tktp, 153krb5_error_code kssl_cget_tkt(KSSL_CTX *kssl_ctx, krb5_data **enc_tktp,
154 krb5_data *authenp, KSSL_ERR *kssl_err); 154 krb5_data *authenp, KSSL_ERR *kssl_err);
155krb5_error_code kssl_sget_tkt(KSSL_CTX *kssl_ctx, krb5_data *indata, 155krb5_error_code kssl_sget_tkt(KSSL_CTX *kssl_ctx, krb5_data *indata,
diff --git a/src/lib/libssl/src/ssl/s2_clnt.c b/src/lib/libssl/src/ssl/s2_clnt.c
index 1d24dedc91..43b32eb415 100644
--- a/src/lib/libssl/src/ssl/s2_clnt.c
+++ b/src/lib/libssl/src/ssl/s2_clnt.c
@@ -116,7 +116,6 @@
116#include <openssl/buffer.h> 116#include <openssl/buffer.h>
117#include <openssl/objects.h> 117#include <openssl/objects.h>
118#include <openssl/evp.h> 118#include <openssl/evp.h>
119#include "cryptlib.h"
120 119
121static SSL_METHOD *ssl2_get_client_method(int ver); 120static SSL_METHOD *ssl2_get_client_method(int ver);
122static int get_server_finished(SSL *s); 121static int get_server_finished(SSL *s);
diff --git a/src/lib/libssl/src/ssl/s2_enc.c b/src/lib/libssl/src/ssl/s2_enc.c
index d3b144f1c5..21a06f76cb 100644
--- a/src/lib/libssl/src/ssl/s2_enc.c
+++ b/src/lib/libssl/src/ssl/s2_enc.c
@@ -59,7 +59,6 @@
59#include "ssl_locl.h" 59#include "ssl_locl.h"
60#ifndef OPENSSL_NO_SSL2 60#ifndef OPENSSL_NO_SSL2
61#include <stdio.h> 61#include <stdio.h>
62#include "cryptlib.h"
63 62
64int ssl2_enc_init(SSL *s, int client) 63int ssl2_enc_init(SSL *s, int client)
65 { 64 {
diff --git a/src/lib/libssl/src/ssl/s2_lib.c b/src/lib/libssl/src/ssl/s2_lib.c
index 910b9fe097..edcef4dda2 100644
--- a/src/lib/libssl/src/ssl/s2_lib.c
+++ b/src/lib/libssl/src/ssl/s2_lib.c
@@ -63,7 +63,6 @@
63#include <openssl/objects.h> 63#include <openssl/objects.h>
64#include <openssl/evp.h> 64#include <openssl/evp.h>
65#include <openssl/md5.h> 65#include <openssl/md5.h>
66#include "cryptlib.h"
67 66
68static long ssl2_default_timeout(void ); 67static long ssl2_default_timeout(void );
69const char *ssl2_version_str="SSLv2" OPENSSL_VERSION_PTEXT; 68const char *ssl2_version_str="SSLv2" OPENSSL_VERSION_PTEXT;
@@ -139,6 +138,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl2_ciphers[]={
139 SSL_ALL_STRENGTHS, 138 SSL_ALL_STRENGTHS,
140 }, 139 },
141/* IDEA_128_CBC_WITH_MD5 */ 140/* IDEA_128_CBC_WITH_MD5 */
141#ifndef OPENSSL_NO_IDEA
142 { 142 {
143 1, 143 1,
144 SSL2_TXT_IDEA_128_CBC_WITH_MD5, 144 SSL2_TXT_IDEA_128_CBC_WITH_MD5,
@@ -151,6 +151,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl2_ciphers[]={
151 SSL_ALL_CIPHERS, 151 SSL_ALL_CIPHERS,
152 SSL_ALL_STRENGTHS, 152 SSL_ALL_STRENGTHS,
153 }, 153 },
154#endif
154/* DES_64_CBC_WITH_MD5 */ 155/* DES_64_CBC_WITH_MD5 */
155 { 156 {
156 1, 157 1,
diff --git a/src/lib/libssl/src/ssl/s2_pkt.c b/src/lib/libssl/src/ssl/s2_pkt.c
index d82f137613..a10929a757 100644
--- a/src/lib/libssl/src/ssl/s2_pkt.c
+++ b/src/lib/libssl/src/ssl/s2_pkt.c
@@ -113,7 +113,6 @@
113#ifndef OPENSSL_NO_SSL2 113#ifndef OPENSSL_NO_SSL2
114#include <stdio.h> 114#include <stdio.h>
115#include <errno.h> 115#include <errno.h>
116#include "cryptlib.h"
117#define USE_SOCKETS 116#define USE_SOCKETS
118 117
119static int read_n(SSL *s,unsigned int n,unsigned int max,unsigned int extend); 118static int read_n(SSL *s,unsigned int n,unsigned int max,unsigned int extend);
diff --git a/src/lib/libssl/src/ssl/s2_srvr.c b/src/lib/libssl/src/ssl/s2_srvr.c
index 62859a2d95..5da2a54af3 100644
--- a/src/lib/libssl/src/ssl/s2_srvr.c
+++ b/src/lib/libssl/src/ssl/s2_srvr.c
@@ -116,7 +116,6 @@
116#include <openssl/rand.h> 116#include <openssl/rand.h>
117#include <openssl/objects.h> 117#include <openssl/objects.h>
118#include <openssl/evp.h> 118#include <openssl/evp.h>
119#include "cryptlib.h"
120 119
121static SSL_METHOD *ssl2_get_server_method(int ver); 120static SSL_METHOD *ssl2_get_server_method(int ver);
122static int get_client_master_key(SSL *s); 121static int get_client_master_key(SSL *s);
diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c
index eb7daebfdf..d51b60e343 100644
--- a/src/lib/libssl/src/ssl/s3_clnt.c
+++ b/src/lib/libssl/src/ssl/s3_clnt.c
@@ -117,7 +117,6 @@
117#include <openssl/objects.h> 117#include <openssl/objects.h>
118#include <openssl/evp.h> 118#include <openssl/evp.h>
119#include <openssl/md5.h> 119#include <openssl/md5.h>
120#include "cryptlib.h"
121 120
122static SSL_METHOD *ssl3_get_client_method(int ver); 121static SSL_METHOD *ssl3_get_client_method(int ver);
123static int ssl3_client_hello(SSL *s); 122static int ssl3_client_hello(SSL *s);
@@ -169,7 +168,7 @@ int ssl3_connect(SSL *s)
169 long num1; 168 long num1;
170 void (*cb)(const SSL *ssl,int type,int val)=NULL; 169 void (*cb)(const SSL *ssl,int type,int val)=NULL;
171 int ret= -1; 170 int ret= -1;
172 int new_state,state,skip=0;; 171 int new_state,state,skip=0;
173 172
174 RAND_add(&Time,sizeof(Time),0); 173 RAND_add(&Time,sizeof(Time),0);
175 ERR_clear_error(); 174 ERR_clear_error();
diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c
index 896b12fc4f..d04096016c 100644
--- a/src/lib/libssl/src/ssl/s3_lib.c
+++ b/src/lib/libssl/src/ssl/s3_lib.c
@@ -271,6 +271,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
271 SSL_ALL_STRENGTHS, 271 SSL_ALL_STRENGTHS,
272 }, 272 },
273/* Cipher 07 */ 273/* Cipher 07 */
274#ifndef OPENSSL_NO_IDEA
274 { 275 {
275 1, 276 1,
276 SSL3_TXT_RSA_IDEA_128_SHA, 277 SSL3_TXT_RSA_IDEA_128_SHA,
@@ -283,6 +284,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
283 SSL_ALL_CIPHERS, 284 SSL_ALL_CIPHERS,
284 SSL_ALL_STRENGTHS, 285 SSL_ALL_STRENGTHS,
285 }, 286 },
287#endif
286/* Cipher 08 */ 288/* Cipher 08 */
287 { 289 {
288 1, 290 1,
diff --git a/src/lib/libssl/src/ssl/s3_srvr.c b/src/lib/libssl/src/ssl/s3_srvr.c
index 881f68b998..57f1d3f52a 100644
--- a/src/lib/libssl/src/ssl/s3_srvr.c
+++ b/src/lib/libssl/src/ssl/s3_srvr.c
@@ -121,9 +121,10 @@
121#include <openssl/objects.h> 121#include <openssl/objects.h>
122#include <openssl/evp.h> 122#include <openssl/evp.h>
123#include <openssl/x509.h> 123#include <openssl/x509.h>
124#ifndef OPENSSL_NO_KRB5
124#include <openssl/krb5_asn.h> 125#include <openssl/krb5_asn.h>
126#endif
125#include <openssl/md5.h> 127#include <openssl/md5.h>
126#include "cryptlib.h"
127 128
128static SSL_METHOD *ssl3_get_server_method(int ver); 129static SSL_METHOD *ssl3_get_server_method(int ver);
129static int ssl3_get_client_hello(SSL *s); 130static int ssl3_get_client_hello(SSL *s);
diff --git a/src/lib/libssl/src/ssl/ssl_asn1.c b/src/lib/libssl/src/ssl/ssl_asn1.c
index 16bc11b559..d8ff8fc4a3 100644
--- a/src/lib/libssl/src/ssl/ssl_asn1.c
+++ b/src/lib/libssl/src/ssl/ssl_asn1.c
@@ -62,7 +62,6 @@
62#include <openssl/asn1_mac.h> 62#include <openssl/asn1_mac.h>
63#include <openssl/objects.h> 63#include <openssl/objects.h>
64#include <openssl/x509.h> 64#include <openssl/x509.h>
65#include "cryptlib.h"
66 65
67typedef struct ssl_session_asn1_st 66typedef struct ssl_session_asn1_st
68 { 67 {
diff --git a/src/lib/libssl/src/ssl/ssl_ciph.c b/src/lib/libssl/src/ssl/ssl_ciph.c
index 888b667fa1..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;
@@ -125,7 +125,9 @@ static const SSL_CIPHER cipher_aliases[]={
125 {0,SSL_TXT_3DES,0,SSL_3DES, 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}, 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}, 127 {0,SSL_TXT_RC2, 0,SSL_RC2, 0,0,0,0,SSL_ENC_MASK,0},
128#ifndef OPENSSL_NO_IDEA
128 {0,SSL_TXT_IDEA,0,SSL_IDEA, 0,0,0,0,SSL_ENC_MASK,0}, 129 {0,SSL_TXT_IDEA,0,SSL_IDEA, 0,0,0,0,SSL_ENC_MASK,0},
130#endif
129 {0,SSL_TXT_eNULL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0}, 131 {0,SSL_TXT_eNULL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0},
130 {0,SSL_TXT_eFZA,0,SSL_eFZA, 0,0,0,0,SSL_ENC_MASK,0}, 132 {0,SSL_TXT_eFZA,0,SSL_eFZA, 0,0,0,0,SSL_ENC_MASK,0},
131 {0,SSL_TXT_AES, 0,SSL_AES, 0,0,0,0,SSL_ENC_MASK,0}, 133 {0,SSL_TXT_AES, 0,SSL_AES, 0,0,0,0,SSL_ENC_MASK,0},
@@ -166,8 +168,12 @@ static void load_ciphers(void)
166 EVP_get_cipherbyname(SN_rc4); 168 EVP_get_cipherbyname(SN_rc4);
167 ssl_cipher_methods[SSL_ENC_RC2_IDX]= 169 ssl_cipher_methods[SSL_ENC_RC2_IDX]=
168 EVP_get_cipherbyname(SN_rc2_cbc); 170 EVP_get_cipherbyname(SN_rc2_cbc);
171#ifndef OPENSSL_NO_IDEA
169 ssl_cipher_methods[SSL_ENC_IDEA_IDX]= 172 ssl_cipher_methods[SSL_ENC_IDEA_IDX]=
170 EVP_get_cipherbyname(SN_idea_cbc); 173 EVP_get_cipherbyname(SN_idea_cbc);
174#else
175 ssl_cipher_methods[SSL_ENC_IDEA_IDX]= NULL;
176#endif
171 ssl_cipher_methods[SSL_ENC_AES128_IDX]= 177 ssl_cipher_methods[SSL_ENC_AES128_IDX]=
172 EVP_get_cipherbyname(SN_aes_128_cbc); 178 EVP_get_cipherbyname(SN_aes_128_cbc);
173 ssl_cipher_methods[SSL_ENC_AES256_IDX]= 179 ssl_cipher_methods[SSL_ENC_AES256_IDX]=
@@ -245,7 +251,7 @@ int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,
245 break; 251 break;
246 } 252 }
247 253
248 if ((i < 0) || (i > SSL_ENC_NUM_IDX)) 254 if ((i < 0) || (i >= SSL_ENC_NUM_IDX))
249 *enc=NULL; 255 *enc=NULL;
250 else 256 else
251 { 257 {
@@ -267,7 +273,7 @@ int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,
267 i= -1; 273 i= -1;
268 break; 274 break;
269 } 275 }
270 if ((i < 0) || (i > SSL_MD_NUM_IDX)) 276 if ((i < 0) || (i >= SSL_MD_NUM_IDX))
271 *md=NULL; 277 *md=NULL;
272 else 278 else
273 *md=ssl_digest_methods[i]; 279 *md=ssl_digest_methods[i];
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c
index 6d69890688..8701fb33ca 100644
--- a/src/lib/libssl/src/ssl/ssl_lib.c
+++ b/src/lib/libssl/src/ssl/ssl_lib.c
@@ -121,7 +121,6 @@
121#include <openssl/objects.h> 121#include <openssl/objects.h>
122#include <openssl/lhash.h> 122#include <openssl/lhash.h>
123#include <openssl/x509v3.h> 123#include <openssl/x509v3.h>
124#include "cryptlib.h"
125 124
126const char *SSL_version_str=OPENSSL_VERSION_TEXT; 125const char *SSL_version_str=OPENSSL_VERSION_TEXT;
127 126
@@ -473,11 +472,6 @@ void SSL_free(SSL *s)
473 472
474 if (s->method != NULL) s->method->ssl_free(s); 473 if (s->method != NULL) s->method->ssl_free(s);
475 474
476#ifndef OPENSSL_NO_KRB5
477 if (s->kssl_ctx != NULL)
478 kssl_ctx_free(s->kssl_ctx);
479#endif /* OPENSSL_NO_KRB5 */
480
481 OPENSSL_free(s); 475 OPENSSL_free(s);
482 } 476 }
483 477
diff --git a/src/lib/libssl/src/ssl/ssl_rsa.c b/src/lib/libssl/src/ssl/ssl_rsa.c
index 330390519b..03828b6632 100644
--- a/src/lib/libssl/src/ssl/ssl_rsa.c
+++ b/src/lib/libssl/src/ssl/ssl_rsa.c
@@ -207,7 +207,7 @@ static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
207 ok=1; 207 ok=1;
208 else 208 else
209#endif 209#endif
210 if (!X509_check_private_key(c->pkeys[i].x509,pkey)) 210 if (!X509_check_private_key(c->pkeys[i].x509,pkey))
211 { 211 {
212 if ((i == SSL_PKEY_DH_RSA) || (i == SSL_PKEY_DH_DSA)) 212 if ((i == SSL_PKEY_DH_RSA) || (i == SSL_PKEY_DH_DSA))
213 { 213 {
@@ -241,8 +241,6 @@ static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
241 return(0); 241 return(0);
242 } 242 }
243 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) 244 if (c->pkeys[i].privatekey != NULL)
247 EVP_PKEY_free(c->pkeys[i].privatekey); 245 EVP_PKEY_free(c->pkeys[i].privatekey);
248 CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY); 246 CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY);
diff --git a/src/lib/libssl/src/ssl/ssl_sess.c b/src/lib/libssl/src/ssl/ssl_sess.c
index fabcdefa6e..a505e388fb 100644
--- a/src/lib/libssl/src/ssl/ssl_sess.c
+++ b/src/lib/libssl/src/ssl/ssl_sess.c
@@ -60,7 +60,6 @@
60#include <openssl/lhash.h> 60#include <openssl/lhash.h>
61#include <openssl/rand.h> 61#include <openssl/rand.h>
62#include "ssl_locl.h" 62#include "ssl_locl.h"
63#include "cryptlib.h"
64 63
65static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); 64static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
66static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s); 65static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s);
@@ -79,11 +78,11 @@ SSL_SESSION *SSL_get1_session(SSL *ssl)
79 /* Need to lock this all up rather than just use CRYPTO_add so that 78 /* Need to lock this all up rather than just use CRYPTO_add so that
80 * somebody doesn't free ssl->session between when we check it's 79 * somebody doesn't free ssl->session between when we check it's
81 * non-null and when we up the reference count. */ 80 * non-null and when we up the reference count. */
82 CRYPTO_w_lock(CRYPTO_LOCK_SSL_SESSION); 81 CRYPTO_r_lock(CRYPTO_LOCK_SSL_SESSION);
83 sess = ssl->session; 82 sess = ssl->session;
84 if(sess) 83 if(sess)
85 sess->references++; 84 sess->references++;
86 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_SESSION); 85 CRYPTO_r_unlock(CRYPTO_LOCK_SSL_SESSION);
87 return(sess); 86 return(sess);
88 } 87 }
89 88
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c
index 42289c255b..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"
@@ -1500,8 +1501,8 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg)
1500 1501
1501 fprintf(stderr, "In app_verify_callback, allowing cert. "); 1502 fprintf(stderr, "In app_verify_callback, allowing cert. ");
1502 fprintf(stderr, "Arg is: %s\n", (char *)arg); 1503 fprintf(stderr, "Arg is: %s\n", (char *)arg);
1503 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",
1504 (unsigned int)ctx, (unsigned int)ctx->cert); 1505 (uintptr_t)ctx, (uintptr_t)ctx->cert);
1505 if (ctx->cert) 1506 if (ctx->cert)
1506 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);
1507 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 e614fb5466..0000000000
--- a/src/lib/libssl/src/tools/c_rehash
+++ /dev/null
@@ -1,160 +0,0 @@
1#!/usr/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/libeay.num b/src/lib/libssl/src/util/libeay.num
index 203c7713e7..f5c8c0be8a 100644
--- a/src/lib/libssl/src/util/libeay.num
+++ b/src/lib/libssl/src/util/libeay.num
@@ -2801,5 +2801,3 @@ BIO_indent 3242 EXIST::FUNCTION:
2801BUF_strlcpy 3243 EXIST::FUNCTION: 2801BUF_strlcpy 3243 EXIST::FUNCTION:
2802OpenSSLDie 3244 EXIST::FUNCTION: 2802OpenSSLDie 3244 EXIST::FUNCTION:
2803OPENSSL_cleanse 3245 EXIST::FUNCTION: 2803OPENSSL_cleanse 3245 EXIST::FUNCTION:
2804ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE
2805ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH
diff --git a/src/lib/libssl/src/util/pl/Mingw32.pl b/src/lib/libssl/src/util/pl/Mingw32.pl
index 4bee638c4a..043a3a53ee 100644
--- a/src/lib/libssl/src/util/pl/Mingw32.pl
+++ b/src/lib/libssl/src/util/pl/Mingw32.pl
@@ -85,7 +85,7 @@ sub do_lib_rule
85 ($Name=$name) =~ tr/a-z/A-Z/; 85 ($Name=$name) =~ tr/a-z/A-Z/;
86 86
87 $ret.="$target: \$(${Name}OBJ)\n"; 87 $ret.="$target: \$(${Name}OBJ)\n";
88 $ret.="\tif exist $target \$(RM) $target\n"; 88 $ret.="\t\$(RM) $target\n";
89 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; 89 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
90 $ret.="\t\$(RANLIB) $target\n\n"; 90 $ret.="\t\$(RANLIB) $target\n\n";
91 } 91 }
diff --git a/src/lib/libssl/src/util/pl/Mingw32f.pl b/src/lib/libssl/src/util/pl/Mingw32f.pl
new file mode 100644
index 0000000000..44f5673d7a
--- /dev/null
+++ b/src/lib/libssl/src/util/pl/Mingw32f.pl
@@ -0,0 +1,73 @@
1#!/usr/local/bin/perl
2#
3# Mingw32f.pl -- copy files; Mingw32.pl is needed to do the compiling.
4#
5
6$o='\\';
7$cp='copy';
8$rm='del';
9
10# C compiler stuff
11
12$cc='gcc';
13if ($debug)
14 { $cflags="-g2 -ggdb -DDSO_WIN32"; }
15else
16 { $cflags="-O3 -fomit-frame-pointer -DDSO_WIN32"; }
17
18$obj='.o';
19$ofile='-o ';
20
21# EXE linking stuff
22$link='${CC}';
23$lflags='${CFLAGS}';
24$efile='-o ';
25$exep='';
26$ex_libs="-lwsock32 -lgdi32";
27
28# static library stuff
29$mklib='ar r';
30$mlflags='';
31$ranlib='ranlib';
32$plib='lib';
33$libp=".a";
34$shlibp=".a";
35$lfile='';
36
37$asm='as';
38$afile='-o ';
39$bn_asm_obj="";
40$bn_asm_src="";
41$des_enc_obj="";
42$des_enc_src="";
43$bf_enc_obj="";
44$bf_enc_src="";
45
46sub do_lib_rule
47 {
48 local($obj,$target,$name,$shlib)=@_;
49 local($ret,$_,$Name);
50
51 $target =~ s/\//$o/g if $o ne '/';
52 $target="$target";
53 ($Name=$name) =~ tr/a-z/A-Z/;
54
55 $ret.="$target: \$(${Name}OBJ)\n";
56 $ret.="\t\$(RM) $target\n";
57 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
58 $ret.="\t\$(RANLIB) $target\n\n";
59 }
60
61sub do_link_rule
62 {
63 local($target,$files,$dep_libs,$libs)=@_;
64 local($ret,$_);
65
66 $file =~ s/\//$o/g if $o ne '/';
67 $n=&bname($target);
68 $ret.="$target: $files $dep_libs\n";
69 $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n";
70 return($ret);
71 }
721;
73
diff --git a/src/lib/libssl/src/util/point.sh b/src/lib/libssl/src/util/point.sh
index 4790e08f8a..ce7dcc56df 100644
--- a/src/lib/libssl/src/util/point.sh
+++ b/src/lib/libssl/src/util/point.sh
@@ -1,10 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3rm -f "$2" 3rm -f $2
4if test "$OSTYPE" = msdosdjgpp; then 4if test "$OSTYPE" = msdosdjgpp; then
5 cp "$1" "$2" 5 cp $1 $2
6else 6else
7 ln -s "$1" "$2" 7 ln -s $1 $2
8fi 8fi
9echo "$2 => $1" 9echo "$2 => $1"
10 10
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..8701fb33ca
--- /dev/null
+++ b/src/lib/libssl/ssl_lib.c
@@ -0,0 +1,2314 @@
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 OPENSSL_free(s);
476 }
477
478void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio)
479 {
480 /* If the output buffering BIO is still in place, remove it
481 */
482 if (s->bbio != NULL)
483 {
484 if (s->wbio == s->bbio)
485 {
486 s->wbio=s->wbio->next_bio;
487 s->bbio->next_bio=NULL;
488 }
489 }
490 if ((s->rbio != NULL) && (s->rbio != rbio))
491 BIO_free_all(s->rbio);
492 if ((s->wbio != NULL) && (s->wbio != wbio) && (s->rbio != s->wbio))
493 BIO_free_all(s->wbio);
494 s->rbio=rbio;
495 s->wbio=wbio;
496 }
497
498BIO *SSL_get_rbio(SSL *s)
499 { return(s->rbio); }
500
501BIO *SSL_get_wbio(SSL *s)
502 { return(s->wbio); }
503
504int SSL_get_fd(SSL *s)
505 {
506 return(SSL_get_rfd(s));
507 }
508
509int SSL_get_rfd(SSL *s)
510 {
511 int ret= -1;
512 BIO *b,*r;
513
514 b=SSL_get_rbio(s);
515 r=BIO_find_type(b,BIO_TYPE_DESCRIPTOR);
516 if (r != NULL)
517 BIO_get_fd(r,&ret);
518 return(ret);
519 }
520
521int SSL_get_wfd(SSL *s)
522 {
523 int ret= -1;
524 BIO *b,*r;
525
526 b=SSL_get_wbio(s);
527 r=BIO_find_type(b,BIO_TYPE_DESCRIPTOR);
528 if (r != NULL)
529 BIO_get_fd(r,&ret);
530 return(ret);
531 }
532
533#ifndef OPENSSL_NO_SOCK
534int SSL_set_fd(SSL *s,int fd)
535 {
536 int ret=0;
537 BIO *bio=NULL;
538
539 bio=BIO_new(BIO_s_socket());
540
541 if (bio == NULL)
542 {
543 SSLerr(SSL_F_SSL_SET_FD,ERR_R_BUF_LIB);
544 goto err;
545 }
546 BIO_set_fd(bio,fd,BIO_NOCLOSE);
547 SSL_set_bio(s,bio,bio);
548 ret=1;
549err:
550 return(ret);
551 }
552
553int SSL_set_wfd(SSL *s,int fd)
554 {
555 int ret=0;
556 BIO *bio=NULL;
557
558 if ((s->rbio == NULL) || (BIO_method_type(s->rbio) != BIO_TYPE_SOCKET)
559 || ((int)BIO_get_fd(s->rbio,NULL) != fd))
560 {
561 bio=BIO_new(BIO_s_socket());
562
563 if (bio == NULL)
564 { SSLerr(SSL_F_SSL_SET_WFD,ERR_R_BUF_LIB); goto err; }
565 BIO_set_fd(bio,fd,BIO_NOCLOSE);
566 SSL_set_bio(s,SSL_get_rbio(s),bio);
567 }
568 else
569 SSL_set_bio(s,SSL_get_rbio(s),SSL_get_rbio(s));
570 ret=1;
571err:
572 return(ret);
573 }
574
575int SSL_set_rfd(SSL *s,int fd)
576 {
577 int ret=0;
578 BIO *bio=NULL;
579
580 if ((s->wbio == NULL) || (BIO_method_type(s->wbio) != BIO_TYPE_SOCKET)
581 || ((int)BIO_get_fd(s->wbio,NULL) != fd))
582 {
583 bio=BIO_new(BIO_s_socket());
584
585 if (bio == NULL)
586 {
587 SSLerr(SSL_F_SSL_SET_RFD,ERR_R_BUF_LIB);
588 goto err;
589 }
590 BIO_set_fd(bio,fd,BIO_NOCLOSE);
591 SSL_set_bio(s,bio,SSL_get_wbio(s));
592 }
593 else
594 SSL_set_bio(s,SSL_get_wbio(s),SSL_get_wbio(s));
595 ret=1;
596err:
597 return(ret);
598 }
599#endif
600
601
602/* return length of latest Finished message we sent, copy to 'buf' */
603size_t SSL_get_finished(SSL *s, void *buf, size_t count)
604 {
605 size_t ret = 0;
606
607 if (s->s3 != NULL)
608 {
609 ret = s->s3->tmp.finish_md_len;
610 if (count > ret)
611 count = ret;
612 memcpy(buf, s->s3->tmp.finish_md, count);
613 }
614 return ret;
615 }
616
617/* return length of latest Finished message we expected, copy to 'buf' */
618size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count)
619 {
620 size_t ret = 0;
621
622 if (s->s3 != NULL)
623 {
624 ret = s->s3->tmp.peer_finish_md_len;
625 if (count > ret)
626 count = ret;
627 memcpy(buf, s->s3->tmp.peer_finish_md, count);
628 }
629 return ret;
630 }
631
632
633int SSL_get_verify_mode(SSL *s)
634 {
635 return(s->verify_mode);
636 }
637
638int SSL_get_verify_depth(SSL *s)
639 {
640 return(s->verify_depth);
641 }
642
643int (*SSL_get_verify_callback(SSL *s))(int,X509_STORE_CTX *)
644 {
645 return(s->verify_callback);
646 }
647
648int SSL_CTX_get_verify_mode(SSL_CTX *ctx)
649 {
650 return(ctx->verify_mode);
651 }
652
653int SSL_CTX_get_verify_depth(SSL_CTX *ctx)
654 {
655 return(ctx->verify_depth);
656 }
657
658int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(int,X509_STORE_CTX *)
659 {
660 return(ctx->default_verify_callback);
661 }
662
663void SSL_set_verify(SSL *s,int mode,
664 int (*callback)(int ok,X509_STORE_CTX *ctx))
665 {
666 s->verify_mode=mode;
667 if (callback != NULL)
668 s->verify_callback=callback;
669 }
670
671void SSL_set_verify_depth(SSL *s,int depth)
672 {
673 s->verify_depth=depth;
674 }
675
676void SSL_set_read_ahead(SSL *s,int yes)
677 {
678 s->read_ahead=yes;
679 }
680
681int SSL_get_read_ahead(SSL *s)
682 {
683 return(s->read_ahead);
684 }
685
686int SSL_pending(SSL *s)
687 {
688 /* SSL_pending cannot work properly if read-ahead is enabled
689 * (SSL_[CTX_]ctrl(..., SSL_CTRL_SET_READ_AHEAD, 1, NULL)),
690 * and it is impossible to fix since SSL_pending cannot report
691 * errors that may be observed while scanning the new data.
692 * (Note that SSL_pending() is often used as a boolean value,
693 * so we'd better not return -1.)
694 */
695 return(s->method->ssl_pending(s));
696 }
697
698X509 *SSL_get_peer_certificate(SSL *s)
699 {
700 X509 *r;
701
702 if ((s == NULL) || (s->session == NULL))
703 r=NULL;
704 else
705 r=s->session->peer;
706
707 if (r == NULL) return(r);
708
709 CRYPTO_add(&r->references,1,CRYPTO_LOCK_X509);
710
711 return(r);
712 }
713
714STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s)
715 {
716 STACK_OF(X509) *r;
717
718 if ((s == NULL) || (s->session == NULL) || (s->session->sess_cert == NULL))
719 r=NULL;
720 else
721 r=s->session->sess_cert->cert_chain;
722
723 /* If we are a client, cert_chain includes the peer's own
724 * certificate; if we are a server, it does not. */
725
726 return(r);
727 }
728
729/* Now in theory, since the calling process own 't' it should be safe to
730 * modify. We need to be able to read f without being hassled */
731void SSL_copy_session_id(SSL *t,SSL *f)
732 {
733 CERT *tmp;
734
735 /* Do we need to to SSL locking? */
736 SSL_set_session(t,SSL_get_session(f));
737
738 /* what if we are setup as SSLv2 but want to talk SSLv3 or
739 * vice-versa */
740 if (t->method != f->method)
741 {
742 t->method->ssl_free(t); /* cleanup current */
743 t->method=f->method; /* change method */
744 t->method->ssl_new(t); /* setup new */
745 }
746
747 tmp=t->cert;
748 if (f->cert != NULL)
749 {
750 CRYPTO_add(&f->cert->references,1,CRYPTO_LOCK_SSL_CERT);
751 t->cert=f->cert;
752 }
753 else
754 t->cert=NULL;
755 if (tmp != NULL) ssl_cert_free(tmp);
756 SSL_set_session_id_context(t,f->sid_ctx,f->sid_ctx_length);
757 }
758
759/* Fix this so it checks all the valid key/cert options */
760int SSL_CTX_check_private_key(SSL_CTX *ctx)
761 {
762 if ( (ctx == NULL) ||
763 (ctx->cert == NULL) ||
764 (ctx->cert->key->x509 == NULL))
765 {
766 SSLerr(SSL_F_SSL_CTX_CHECK_PRIVATE_KEY,SSL_R_NO_CERTIFICATE_ASSIGNED);
767 return(0);
768 }
769 if (ctx->cert->key->privatekey == NULL)
770 {
771 SSLerr(SSL_F_SSL_CTX_CHECK_PRIVATE_KEY,SSL_R_NO_PRIVATE_KEY_ASSIGNED);
772 return(0);
773 }
774 return(X509_check_private_key(ctx->cert->key->x509, ctx->cert->key->privatekey));
775 }
776
777/* Fix this function so that it takes an optional type parameter */
778int SSL_check_private_key(SSL *ssl)
779 {
780 if (ssl == NULL)
781 {
782 SSLerr(SSL_F_SSL_CHECK_PRIVATE_KEY,ERR_R_PASSED_NULL_PARAMETER);
783 return(0);
784 }
785 if (ssl->cert == NULL)
786 {
787 SSLerr(SSL_F_SSL_CHECK_PRIVATE_KEY,SSL_R_NO_CERTIFICATE_ASSIGNED);
788 return 0;
789 }
790 if (ssl->cert->key->x509 == NULL)
791 {
792 SSLerr(SSL_F_SSL_CHECK_PRIVATE_KEY,SSL_R_NO_CERTIFICATE_ASSIGNED);
793 return(0);
794 }
795 if (ssl->cert->key->privatekey == NULL)
796 {
797 SSLerr(SSL_F_SSL_CHECK_PRIVATE_KEY,SSL_R_NO_PRIVATE_KEY_ASSIGNED);
798 return(0);
799 }
800 return(X509_check_private_key(ssl->cert->key->x509,
801 ssl->cert->key->privatekey));
802 }
803
804int SSL_accept(SSL *s)
805 {
806 if (s->handshake_func == 0)
807 /* Not properly initialized yet */
808 SSL_set_accept_state(s);
809
810 return(s->method->ssl_accept(s));
811 }
812
813int SSL_connect(SSL *s)
814 {
815 if (s->handshake_func == 0)
816 /* Not properly initialized yet */
817 SSL_set_connect_state(s);
818
819 return(s->method->ssl_connect(s));
820 }
821
822long SSL_get_default_timeout(SSL *s)
823 {
824 return(s->method->get_timeout());
825 }
826
827int SSL_read(SSL *s,void *buf,int num)
828 {
829 if (s->handshake_func == 0)
830 {
831 SSLerr(SSL_F_SSL_READ, SSL_R_UNINITIALIZED);
832 return -1;
833 }
834
835 if (s->shutdown & SSL_RECEIVED_SHUTDOWN)
836 {
837 s->rwstate=SSL_NOTHING;
838 return(0);
839 }
840 return(s->method->ssl_read(s,buf,num));
841 }
842
843int SSL_peek(SSL *s,void *buf,int num)
844 {
845 if (s->handshake_func == 0)
846 {
847 SSLerr(SSL_F_SSL_READ, SSL_R_UNINITIALIZED);
848 return -1;
849 }
850
851 if (s->shutdown & SSL_RECEIVED_SHUTDOWN)
852 {
853 return(0);
854 }
855 return(s->method->ssl_peek(s,buf,num));
856 }
857
858int SSL_write(SSL *s,const void *buf,int num)
859 {
860 if (s->handshake_func == 0)
861 {
862 SSLerr(SSL_F_SSL_WRITE, SSL_R_UNINITIALIZED);
863 return -1;
864 }
865
866 if (s->shutdown & SSL_SENT_SHUTDOWN)
867 {
868 s->rwstate=SSL_NOTHING;
869 SSLerr(SSL_F_SSL_WRITE,SSL_R_PROTOCOL_IS_SHUTDOWN);
870 return(-1);
871 }
872 return(s->method->ssl_write(s,buf,num));
873 }
874
875int SSL_shutdown(SSL *s)
876 {
877 /* Note that this function behaves differently from what one might
878 * expect. Return values are 0 for no success (yet),
879 * 1 for success; but calling it once is usually not enough,
880 * even if blocking I/O is used (see ssl3_shutdown).
881 */
882
883 if (s->handshake_func == 0)
884 {
885 SSLerr(SSL_F_SSL_SHUTDOWN, SSL_R_UNINITIALIZED);
886 return -1;
887 }
888
889 if ((s != NULL) && !SSL_in_init(s))
890 return(s->method->ssl_shutdown(s));
891 else
892 return(1);
893 }
894
895int SSL_renegotiate(SSL *s)
896 {
897 if (s->new_session == 0)
898 {
899 s->new_session=1;
900 }
901 return(s->method->ssl_renegotiate(s));
902 }
903
904int SSL_renegotiate_pending(SSL *s)
905 {
906 /* becomes true when negotiation is requested;
907 * false again once a handshake has finished */
908 return (s->new_session != 0);
909 }
910
911long SSL_ctrl(SSL *s,int cmd,long larg,void *parg)
912 {
913 long l;
914
915 switch (cmd)
916 {
917 case SSL_CTRL_GET_READ_AHEAD:
918 return(s->read_ahead);
919 case SSL_CTRL_SET_READ_AHEAD:
920 l=s->read_ahead;
921 s->read_ahead=larg;
922 return(l);
923
924 case SSL_CTRL_SET_MSG_CALLBACK_ARG:
925 s->msg_callback_arg = parg;
926 return 1;
927
928 case SSL_CTRL_OPTIONS:
929 return(s->options|=larg);
930 case SSL_CTRL_MODE:
931 return(s->mode|=larg);
932 case SSL_CTRL_GET_MAX_CERT_LIST:
933 return(s->max_cert_list);
934 case SSL_CTRL_SET_MAX_CERT_LIST:
935 l=s->max_cert_list;
936 s->max_cert_list=larg;
937 return(l);
938 default:
939 return(s->method->ssl_ctrl(s,cmd,larg,parg));
940 }
941 }
942
943long SSL_callback_ctrl(SSL *s, int cmd, void (*fp)())
944 {
945 switch(cmd)
946 {
947 case SSL_CTRL_SET_MSG_CALLBACK:
948 s->msg_callback = (void (*)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg))(fp);
949 return 1;
950
951 default:
952 return(s->method->ssl_callback_ctrl(s,cmd,fp));
953 }
954 }
955
956struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx)
957 {
958 return ctx->sessions;
959 }
960
961long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd,long larg,void *parg)
962 {
963 long l;
964
965 switch (cmd)
966 {
967 case SSL_CTRL_GET_READ_AHEAD:
968 return(ctx->read_ahead);
969 case SSL_CTRL_SET_READ_AHEAD:
970 l=ctx->read_ahead;
971 ctx->read_ahead=larg;
972 return(l);
973
974 case SSL_CTRL_SET_MSG_CALLBACK_ARG:
975 ctx->msg_callback_arg = parg;
976 return 1;
977
978 case SSL_CTRL_GET_MAX_CERT_LIST:
979 return(ctx->max_cert_list);
980 case SSL_CTRL_SET_MAX_CERT_LIST:
981 l=ctx->max_cert_list;
982 ctx->max_cert_list=larg;
983 return(l);
984
985 case SSL_CTRL_SET_SESS_CACHE_SIZE:
986 l=ctx->session_cache_size;
987 ctx->session_cache_size=larg;
988 return(l);
989 case SSL_CTRL_GET_SESS_CACHE_SIZE:
990 return(ctx->session_cache_size);
991 case SSL_CTRL_SET_SESS_CACHE_MODE:
992 l=ctx->session_cache_mode;
993 ctx->session_cache_mode=larg;
994 return(l);
995 case SSL_CTRL_GET_SESS_CACHE_MODE:
996 return(ctx->session_cache_mode);
997
998 case SSL_CTRL_SESS_NUMBER:
999 return(ctx->sessions->num_items);
1000 case SSL_CTRL_SESS_CONNECT:
1001 return(ctx->stats.sess_connect);
1002 case SSL_CTRL_SESS_CONNECT_GOOD:
1003 return(ctx->stats.sess_connect_good);
1004 case SSL_CTRL_SESS_CONNECT_RENEGOTIATE:
1005 return(ctx->stats.sess_connect_renegotiate);
1006 case SSL_CTRL_SESS_ACCEPT:
1007 return(ctx->stats.sess_accept);
1008 case SSL_CTRL_SESS_ACCEPT_GOOD:
1009 return(ctx->stats.sess_accept_good);
1010 case SSL_CTRL_SESS_ACCEPT_RENEGOTIATE:
1011 return(ctx->stats.sess_accept_renegotiate);
1012 case SSL_CTRL_SESS_HIT:
1013 return(ctx->stats.sess_hit);
1014 case SSL_CTRL_SESS_CB_HIT:
1015 return(ctx->stats.sess_cb_hit);
1016 case SSL_CTRL_SESS_MISSES:
1017 return(ctx->stats.sess_miss);
1018 case SSL_CTRL_SESS_TIMEOUTS:
1019 return(ctx->stats.sess_timeout);
1020 case SSL_CTRL_SESS_CACHE_FULL:
1021 return(ctx->stats.sess_cache_full);
1022 case SSL_CTRL_OPTIONS:
1023 return(ctx->options|=larg);
1024 case SSL_CTRL_MODE:
1025 return(ctx->mode|=larg);
1026 default:
1027 return(ctx->method->ssl_ctx_ctrl(ctx,cmd,larg,parg));
1028 }
1029 }
1030
1031long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)())
1032 {
1033 switch(cmd)
1034 {
1035 case SSL_CTRL_SET_MSG_CALLBACK:
1036 ctx->msg_callback = (void (*)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg))(fp);
1037 return 1;
1038
1039 default:
1040 return(ctx->method->ssl_ctx_callback_ctrl(ctx,cmd,fp));
1041 }
1042 }
1043
1044int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b)
1045 {
1046 long l;
1047
1048 l=a->id-b->id;
1049 if (l == 0L)
1050 return(0);
1051 else
1052 return((l > 0)?1:-1);
1053 }
1054
1055int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap,
1056 const SSL_CIPHER * const *bp)
1057 {
1058 long l;
1059
1060 l=(*ap)->id-(*bp)->id;
1061 if (l == 0L)
1062 return(0);
1063 else
1064 return((l > 0)?1:-1);
1065 }
1066
1067/** return a STACK of the ciphers available for the SSL and in order of
1068 * preference */
1069STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *s)
1070 {
1071 if (s != NULL)
1072 {
1073 if (s->cipher_list != NULL)
1074 {
1075 return(s->cipher_list);
1076 }
1077 else if ((s->ctx != NULL) &&
1078 (s->ctx->cipher_list != NULL))
1079 {
1080 return(s->ctx->cipher_list);
1081 }
1082 }
1083 return(NULL);
1084 }
1085
1086/** return a STACK of the ciphers available for the SSL and in order of
1087 * algorithm id */
1088STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s)
1089 {
1090 if (s != NULL)
1091 {
1092 if (s->cipher_list_by_id != NULL)
1093 {
1094 return(s->cipher_list_by_id);
1095 }
1096 else if ((s->ctx != NULL) &&
1097 (s->ctx->cipher_list_by_id != NULL))
1098 {
1099 return(s->ctx->cipher_list_by_id);
1100 }
1101 }
1102 return(NULL);
1103 }
1104
1105/** The old interface to get the same thing as SSL_get_ciphers() */
1106const char *SSL_get_cipher_list(SSL *s,int n)
1107 {
1108 SSL_CIPHER *c;
1109 STACK_OF(SSL_CIPHER) *sk;
1110
1111 if (s == NULL) return(NULL);
1112 sk=SSL_get_ciphers(s);
1113 if ((sk == NULL) || (sk_SSL_CIPHER_num(sk) <= n))
1114 return(NULL);
1115 c=sk_SSL_CIPHER_value(sk,n);
1116 if (c == NULL) return(NULL);
1117 return(c->name);
1118 }
1119
1120/** specify the ciphers to be used by default by the SSL_CTX */
1121int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str)
1122 {
1123 STACK_OF(SSL_CIPHER) *sk;
1124
1125 sk=ssl_create_cipher_list(ctx->method,&ctx->cipher_list,
1126 &ctx->cipher_list_by_id,str);
1127/* XXXX */
1128 return((sk == NULL)?0:1);
1129 }
1130
1131/** specify the ciphers to be used by the SSL */
1132int SSL_set_cipher_list(SSL *s,const char *str)
1133 {
1134 STACK_OF(SSL_CIPHER) *sk;
1135
1136 sk=ssl_create_cipher_list(s->ctx->method,&s->cipher_list,
1137 &s->cipher_list_by_id,str);
1138/* XXXX */
1139 return((sk == NULL)?0:1);
1140 }
1141
1142/* works well for SSLv2, not so good for SSLv3 */
1143char *SSL_get_shared_ciphers(SSL *s,char *buf,int len)
1144 {
1145 char *p;
1146 const char *cp;
1147 STACK_OF(SSL_CIPHER) *sk;
1148 SSL_CIPHER *c;
1149 int i;
1150
1151 if ((s->session == NULL) || (s->session->ciphers == NULL) ||
1152 (len < 2))
1153 return(NULL);
1154
1155 p=buf;
1156 sk=s->session->ciphers;
1157 for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
1158 {
1159 /* Decrement for either the ':' or a '\0' */
1160 len--;
1161 c=sk_SSL_CIPHER_value(sk,i);
1162 for (cp=c->name; *cp; )
1163 {
1164 if (len-- == 0)
1165 {
1166 *p='\0';
1167 return(buf);
1168 }
1169 else
1170 *(p++)= *(cp++);
1171 }
1172 *(p++)=':';
1173 }
1174 p[-1]='\0';
1175 return(buf);
1176 }
1177
1178int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p)
1179 {
1180 int i,j=0;
1181 SSL_CIPHER *c;
1182 unsigned char *q;
1183#ifndef OPENSSL_NO_KRB5
1184 int nokrb5 = !kssl_tgt_is_available(s->kssl_ctx);
1185#endif /* OPENSSL_NO_KRB5 */
1186
1187 if (sk == NULL) return(0);
1188 q=p;
1189
1190 for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
1191 {
1192 c=sk_SSL_CIPHER_value(sk,i);
1193#ifndef OPENSSL_NO_KRB5
1194 if ((c->algorithms & SSL_KRB5) && nokrb5)
1195 continue;
1196#endif /* OPENSSL_NO_KRB5 */
1197 j=ssl_put_cipher_by_char(s,c,p);
1198 p+=j;
1199 }
1200 return(p-q);
1201 }
1202
1203STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
1204 STACK_OF(SSL_CIPHER) **skp)
1205 {
1206 SSL_CIPHER *c;
1207 STACK_OF(SSL_CIPHER) *sk;
1208 int i,n;
1209
1210 n=ssl_put_cipher_by_char(s,NULL,NULL);
1211 if ((num%n) != 0)
1212 {
1213 SSLerr(SSL_F_SSL_BYTES_TO_CIPHER_LIST,SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST);
1214 return(NULL);
1215 }
1216 if ((skp == NULL) || (*skp == NULL))
1217 sk=sk_SSL_CIPHER_new_null(); /* change perhaps later */
1218 else
1219 {
1220 sk= *skp;
1221 sk_SSL_CIPHER_zero(sk);
1222 }
1223
1224 for (i=0; i<num; i+=n)
1225 {
1226 c=ssl_get_cipher_by_char(s,p);
1227 p+=n;
1228 if (c != NULL)
1229 {
1230 if (!sk_SSL_CIPHER_push(sk,c))
1231 {
1232 SSLerr(SSL_F_SSL_BYTES_TO_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
1233 goto err;
1234 }
1235 }
1236 }
1237
1238 if (skp != NULL)
1239 *skp=sk;
1240 return(sk);
1241err:
1242 if ((skp == NULL) || (*skp == NULL))
1243 sk_SSL_CIPHER_free(sk);
1244 return(NULL);
1245 }
1246
1247unsigned long SSL_SESSION_hash(SSL_SESSION *a)
1248 {
1249 unsigned long l;
1250
1251 l=(unsigned long)
1252 ((unsigned int) a->session_id[0] )|
1253 ((unsigned int) a->session_id[1]<< 8L)|
1254 ((unsigned long)a->session_id[2]<<16L)|
1255 ((unsigned long)a->session_id[3]<<24L);
1256 return(l);
1257 }
1258
1259/* NB: If this function (or indeed the hash function which uses a sort of
1260 * coarser function than this one) is changed, ensure
1261 * SSL_CTX_has_matching_session_id() is checked accordingly. It relies on being
1262 * able to construct an SSL_SESSION that will collide with any existing session
1263 * with a matching session ID. */
1264int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b)
1265 {
1266 if (a->ssl_version != b->ssl_version)
1267 return(1);
1268 if (a->session_id_length != b->session_id_length)
1269 return(1);
1270 return(memcmp(a->session_id,b->session_id,a->session_id_length));
1271 }
1272
1273/* These wrapper functions should remain rather than redeclaring
1274 * SSL_SESSION_hash and SSL_SESSION_cmp for void* types and casting each
1275 * variable. The reason is that the functions aren't static, they're exposed via
1276 * ssl.h. */
1277static IMPLEMENT_LHASH_HASH_FN(SSL_SESSION_hash, SSL_SESSION *)
1278static IMPLEMENT_LHASH_COMP_FN(SSL_SESSION_cmp, SSL_SESSION *)
1279
1280SSL_CTX *SSL_CTX_new(SSL_METHOD *meth)
1281 {
1282 SSL_CTX *ret=NULL;
1283
1284 if (meth == NULL)
1285 {
1286 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_NULL_SSL_METHOD_PASSED);
1287 return(NULL);
1288 }
1289
1290 if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0)
1291 {
1292 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);
1293 goto err;
1294 }
1295 ret=(SSL_CTX *)OPENSSL_malloc(sizeof(SSL_CTX));
1296 if (ret == NULL)
1297 goto err;
1298
1299 memset(ret,0,sizeof(SSL_CTX));
1300
1301 ret->method=meth;
1302
1303 ret->cert_store=NULL;
1304 ret->session_cache_mode=SSL_SESS_CACHE_SERVER;
1305 ret->session_cache_size=SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;
1306 ret->session_cache_head=NULL;
1307 ret->session_cache_tail=NULL;
1308
1309 /* We take the system default */
1310 ret->session_timeout=meth->get_timeout();
1311
1312 ret->new_session_cb=0;
1313 ret->remove_session_cb=0;
1314 ret->get_session_cb=0;
1315 ret->generate_session_id=0;
1316
1317 memset((char *)&ret->stats,0,sizeof(ret->stats));
1318
1319 ret->references=1;
1320 ret->quiet_shutdown=0;
1321
1322/* ret->cipher=NULL;*/
1323/* ret->s2->challenge=NULL;
1324 ret->master_key=NULL;
1325 ret->key_arg=NULL;
1326 ret->s2->conn_id=NULL; */
1327
1328 ret->info_callback=NULL;
1329
1330 ret->app_verify_callback=0;
1331 ret->app_verify_arg=NULL;
1332
1333 ret->max_cert_list=SSL_MAX_CERT_LIST_DEFAULT;
1334 ret->read_ahead=0;
1335 ret->msg_callback=0;
1336 ret->msg_callback_arg=NULL;
1337 ret->verify_mode=SSL_VERIFY_NONE;
1338 ret->verify_depth=-1; /* Don't impose a limit (but x509_lu.c does) */
1339 ret->sid_ctx_length=0;
1340 ret->default_verify_callback=NULL;
1341 if ((ret->cert=ssl_cert_new()) == NULL)
1342 goto err;
1343
1344 ret->default_passwd_callback=0;
1345 ret->default_passwd_callback_userdata=NULL;
1346 ret->client_cert_cb=0;
1347
1348 ret->sessions=lh_new(LHASH_HASH_FN(SSL_SESSION_hash),
1349 LHASH_COMP_FN(SSL_SESSION_cmp));
1350 if (ret->sessions == NULL) goto err;
1351 ret->cert_store=X509_STORE_new();
1352 if (ret->cert_store == NULL) goto err;
1353
1354 ssl_create_cipher_list(ret->method,
1355 &ret->cipher_list,&ret->cipher_list_by_id,
1356 SSL_DEFAULT_CIPHER_LIST);
1357 if (ret->cipher_list == NULL
1358 || sk_SSL_CIPHER_num(ret->cipher_list) <= 0)
1359 {
1360 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_LIBRARY_HAS_NO_CIPHERS);
1361 goto err2;
1362 }
1363
1364 if ((ret->rsa_md5=EVP_get_digestbyname("ssl2-md5")) == NULL)
1365 {
1366 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES);
1367 goto err2;
1368 }
1369 if ((ret->md5=EVP_get_digestbyname("ssl3-md5")) == NULL)
1370 {
1371 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES);
1372 goto err2;
1373 }
1374 if ((ret->sha1=EVP_get_digestbyname("ssl3-sha1")) == NULL)
1375 {
1376 SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES);
1377 goto err2;
1378 }
1379
1380 if ((ret->client_CA=sk_X509_NAME_new_null()) == NULL)
1381 goto err;
1382
1383 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data);
1384
1385 ret->extra_certs=NULL;
1386 ret->comp_methods=SSL_COMP_get_compression_methods();
1387
1388 return(ret);
1389err:
1390 SSLerr(SSL_F_SSL_CTX_NEW,ERR_R_MALLOC_FAILURE);
1391err2:
1392 if (ret != NULL) SSL_CTX_free(ret);
1393 return(NULL);
1394 }
1395
1396#if 0
1397static void SSL_COMP_free(SSL_COMP *comp)
1398 { OPENSSL_free(comp); }
1399#endif
1400
1401void SSL_CTX_free(SSL_CTX *a)
1402 {
1403 int i;
1404
1405 if (a == NULL) return;
1406
1407 i=CRYPTO_add(&a->references,-1,CRYPTO_LOCK_SSL_CTX);
1408#ifdef REF_PRINT
1409 REF_PRINT("SSL_CTX",a);
1410#endif
1411 if (i > 0) return;
1412#ifdef REF_CHECK
1413 if (i < 0)
1414 {
1415 fprintf(stderr,"SSL_CTX_free, bad reference count\n");
1416 abort(); /* ok */
1417 }
1418#endif
1419
1420 /*
1421 * Free internal session cache. However: the remove_cb() may reference
1422 * the ex_data of SSL_CTX, thus the ex_data store can only be removed
1423 * after the sessions were flushed.
1424 * As the ex_data handling routines might also touch the session cache,
1425 * the most secure solution seems to be: empty (flush) the cache, then
1426 * free ex_data, then finally free the cache.
1427 * (See ticket [openssl.org #212].)
1428 */
1429 if (a->sessions != NULL)
1430 SSL_CTX_flush_sessions(a,0);
1431
1432 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);
1433
1434 if (a->sessions != NULL)
1435 lh_free(a->sessions);
1436
1437 if (a->cert_store != NULL)
1438 X509_STORE_free(a->cert_store);
1439 if (a->cipher_list != NULL)
1440 sk_SSL_CIPHER_free(a->cipher_list);
1441 if (a->cipher_list_by_id != NULL)
1442 sk_SSL_CIPHER_free(a->cipher_list_by_id);
1443 if (a->cert != NULL)
1444 ssl_cert_free(a->cert);
1445 if (a->client_CA != NULL)
1446 sk_X509_NAME_pop_free(a->client_CA,X509_NAME_free);
1447 if (a->extra_certs != NULL)
1448 sk_X509_pop_free(a->extra_certs,X509_free);
1449#if 0 /* This should never be done, since it removes a global database */
1450 if (a->comp_methods != NULL)
1451 sk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free);
1452#else
1453 a->comp_methods = NULL;
1454#endif
1455 OPENSSL_free(a);
1456 }
1457
1458void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb)
1459 {
1460 ctx->default_passwd_callback=cb;
1461 }
1462
1463void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx,void *u)
1464 {
1465 ctx->default_passwd_callback_userdata=u;
1466 }
1467
1468void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *,void *), void *arg)
1469 {
1470 ctx->app_verify_callback=cb;
1471 ctx->app_verify_arg=arg;
1472 }
1473
1474void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,int (*cb)(int, X509_STORE_CTX *))
1475 {
1476 ctx->verify_mode=mode;
1477 ctx->default_verify_callback=cb;
1478 }
1479
1480void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth)
1481 {
1482 ctx->verify_depth=depth;
1483 }
1484
1485void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher)
1486 {
1487 CERT_PKEY *cpk;
1488 int rsa_enc,rsa_tmp,rsa_sign,dh_tmp,dh_rsa,dh_dsa,dsa_sign;
1489 int rsa_enc_export,dh_rsa_export,dh_dsa_export;
1490 int rsa_tmp_export,dh_tmp_export,kl;
1491 unsigned long mask,emask;
1492
1493 if (c == NULL) return;
1494
1495 kl=SSL_C_EXPORT_PKEYLENGTH(cipher);
1496
1497#ifndef OPENSSL_NO_RSA
1498 rsa_tmp=(c->rsa_tmp != NULL || c->rsa_tmp_cb != NULL);
1499 rsa_tmp_export=(c->rsa_tmp_cb != NULL ||
1500 (rsa_tmp && RSA_size(c->rsa_tmp)*8 <= kl));
1501#else
1502 rsa_tmp=rsa_tmp_export=0;
1503#endif
1504#ifndef OPENSSL_NO_DH
1505 dh_tmp=(c->dh_tmp != NULL || c->dh_tmp_cb != NULL);
1506 dh_tmp_export=(c->dh_tmp_cb != NULL ||
1507 (dh_tmp && DH_size(c->dh_tmp)*8 <= kl));
1508#else
1509 dh_tmp=dh_tmp_export=0;
1510#endif
1511
1512 cpk= &(c->pkeys[SSL_PKEY_RSA_ENC]);
1513 rsa_enc= (cpk->x509 != NULL && cpk->privatekey != NULL);
1514 rsa_enc_export=(rsa_enc && EVP_PKEY_size(cpk->privatekey)*8 <= kl);
1515 cpk= &(c->pkeys[SSL_PKEY_RSA_SIGN]);
1516 rsa_sign=(cpk->x509 != NULL && cpk->privatekey != NULL);
1517 cpk= &(c->pkeys[SSL_PKEY_DSA_SIGN]);
1518 dsa_sign=(cpk->x509 != NULL && cpk->privatekey != NULL);
1519 cpk= &(c->pkeys[SSL_PKEY_DH_RSA]);
1520 dh_rsa= (cpk->x509 != NULL && cpk->privatekey != NULL);
1521 dh_rsa_export=(dh_rsa && EVP_PKEY_size(cpk->privatekey)*8 <= kl);
1522 cpk= &(c->pkeys[SSL_PKEY_DH_DSA]);
1523/* FIX THIS EAY EAY EAY */
1524 dh_dsa= (cpk->x509 != NULL && cpk->privatekey != NULL);
1525 dh_dsa_export=(dh_dsa && EVP_PKEY_size(cpk->privatekey)*8 <= kl);
1526
1527 mask=0;
1528 emask=0;
1529
1530#ifdef CIPHER_DEBUG
1531 printf("rt=%d rte=%d dht=%d re=%d ree=%d rs=%d ds=%d dhr=%d dhd=%d\n",
1532 rsa_tmp,rsa_tmp_export,dh_tmp,
1533 rsa_enc,rsa_enc_export,rsa_sign,dsa_sign,dh_rsa,dh_dsa);
1534#endif
1535
1536 if (rsa_enc || (rsa_tmp && rsa_sign))
1537 mask|=SSL_kRSA;
1538 if (rsa_enc_export || (rsa_tmp_export && (rsa_sign || rsa_enc)))
1539 emask|=SSL_kRSA;
1540
1541#if 0
1542 /* The match needs to be both kEDH and aRSA or aDSA, so don't worry */
1543 if ( (dh_tmp || dh_rsa || dh_dsa) &&
1544 (rsa_enc || rsa_sign || dsa_sign))
1545 mask|=SSL_kEDH;
1546 if ((dh_tmp_export || dh_rsa_export || dh_dsa_export) &&
1547 (rsa_enc || rsa_sign || dsa_sign))
1548 emask|=SSL_kEDH;
1549#endif
1550
1551 if (dh_tmp_export)
1552 emask|=SSL_kEDH;
1553
1554 if (dh_tmp)
1555 mask|=SSL_kEDH;
1556
1557 if (dh_rsa) mask|=SSL_kDHr;
1558 if (dh_rsa_export) emask|=SSL_kDHr;
1559
1560 if (dh_dsa) mask|=SSL_kDHd;
1561 if (dh_dsa_export) emask|=SSL_kDHd;
1562
1563 if (rsa_enc || rsa_sign)
1564 {
1565 mask|=SSL_aRSA;
1566 emask|=SSL_aRSA;
1567 }
1568
1569 if (dsa_sign)
1570 {
1571 mask|=SSL_aDSS;
1572 emask|=SSL_aDSS;
1573 }
1574
1575 mask|=SSL_aNULL;
1576 emask|=SSL_aNULL;
1577
1578#ifndef OPENSSL_NO_KRB5
1579 mask|=SSL_kKRB5|SSL_aKRB5;
1580 emask|=SSL_kKRB5|SSL_aKRB5;
1581#endif
1582
1583 c->mask=mask;
1584 c->export_mask=emask;
1585 c->valid=1;
1586 }
1587
1588/* THIS NEEDS CLEANING UP */
1589X509 *ssl_get_server_send_cert(SSL *s)
1590 {
1591 unsigned long alg,mask,kalg;
1592 CERT *c;
1593 int i,is_export;
1594
1595 c=s->cert;
1596 ssl_set_cert_masks(c, s->s3->tmp.new_cipher);
1597 alg=s->s3->tmp.new_cipher->algorithms;
1598 is_export=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher);
1599 mask=is_export?c->export_mask:c->mask;
1600 kalg=alg&(SSL_MKEY_MASK|SSL_AUTH_MASK);
1601
1602 if (kalg & SSL_kDHr)
1603 i=SSL_PKEY_DH_RSA;
1604 else if (kalg & SSL_kDHd)
1605 i=SSL_PKEY_DH_DSA;
1606 else if (kalg & SSL_aDSS)
1607 i=SSL_PKEY_DSA_SIGN;
1608 else if (kalg & SSL_aRSA)
1609 {
1610 if (c->pkeys[SSL_PKEY_RSA_ENC].x509 == NULL)
1611 i=SSL_PKEY_RSA_SIGN;
1612 else
1613 i=SSL_PKEY_RSA_ENC;
1614 }
1615 else if (kalg & SSL_aKRB5)
1616 {
1617 /* VRS something else here? */
1618 return(NULL);
1619 }
1620 else /* if (kalg & SSL_aNULL) */
1621 {
1622 SSLerr(SSL_F_SSL_GET_SERVER_SEND_CERT,ERR_R_INTERNAL_ERROR);
1623 return(NULL);
1624 }
1625 if (c->pkeys[i].x509 == NULL) return(NULL);
1626 return(c->pkeys[i].x509);
1627 }
1628
1629EVP_PKEY *ssl_get_sign_pkey(SSL *s,SSL_CIPHER *cipher)
1630 {
1631 unsigned long alg;
1632 CERT *c;
1633
1634 alg=cipher->algorithms;
1635 c=s->cert;
1636
1637 if ((alg & SSL_aDSS) &&
1638 (c->pkeys[SSL_PKEY_DSA_SIGN].privatekey != NULL))
1639 return(c->pkeys[SSL_PKEY_DSA_SIGN].privatekey);
1640 else if (alg & SSL_aRSA)
1641 {
1642 if (c->pkeys[SSL_PKEY_RSA_SIGN].privatekey != NULL)
1643 return(c->pkeys[SSL_PKEY_RSA_SIGN].privatekey);
1644 else if (c->pkeys[SSL_PKEY_RSA_ENC].privatekey != NULL)
1645 return(c->pkeys[SSL_PKEY_RSA_ENC].privatekey);
1646 else
1647 return(NULL);
1648 }
1649 else /* if (alg & SSL_aNULL) */
1650 {
1651 SSLerr(SSL_F_SSL_GET_SIGN_PKEY,ERR_R_INTERNAL_ERROR);
1652 return(NULL);
1653 }
1654 }
1655
1656void ssl_update_cache(SSL *s,int mode)
1657 {
1658 int i;
1659
1660 /* If the session_id_length is 0, we are not supposed to cache it,
1661 * and it would be rather hard to do anyway :-) */
1662 if (s->session->session_id_length == 0) return;
1663
1664 i=s->ctx->session_cache_mode;
1665 if ((i & mode) && (!s->hit)
1666 && ((i & SSL_SESS_CACHE_NO_INTERNAL_STORE)
1667 || SSL_CTX_add_session(s->ctx,s->session))
1668 && (s->ctx->new_session_cb != NULL))
1669 {
1670 CRYPTO_add(&s->session->references,1,CRYPTO_LOCK_SSL_SESSION);
1671 if (!s->ctx->new_session_cb(s,s->session))
1672 SSL_SESSION_free(s->session);
1673 }
1674
1675 /* auto flush every 255 connections */
1676 if ((!(i & SSL_SESS_CACHE_NO_AUTO_CLEAR)) &&
1677 ((i & mode) == mode))
1678 {
1679 if ( (((mode & SSL_SESS_CACHE_CLIENT)
1680 ?s->ctx->stats.sess_connect_good
1681 :s->ctx->stats.sess_accept_good) & 0xff) == 0xff)
1682 {
1683 SSL_CTX_flush_sessions(s->ctx,time(NULL));
1684 }
1685 }
1686 }
1687
1688SSL_METHOD *SSL_get_ssl_method(SSL *s)
1689 {
1690 return(s->method);
1691 }
1692
1693int SSL_set_ssl_method(SSL *s,SSL_METHOD *meth)
1694 {
1695 int conn= -1;
1696 int ret=1;
1697
1698 if (s->method != meth)
1699 {
1700 if (s->handshake_func != NULL)
1701 conn=(s->handshake_func == s->method->ssl_connect);
1702
1703 if (s->method->version == meth->version)
1704 s->method=meth;
1705 else
1706 {
1707 s->method->ssl_free(s);
1708 s->method=meth;
1709 ret=s->method->ssl_new(s);
1710 }
1711
1712 if (conn == 1)
1713 s->handshake_func=meth->ssl_connect;
1714 else if (conn == 0)
1715 s->handshake_func=meth->ssl_accept;
1716 }
1717 return(ret);
1718 }
1719
1720int SSL_get_error(SSL *s,int i)
1721 {
1722 int reason;
1723 unsigned long l;
1724 BIO *bio;
1725
1726 if (i > 0) return(SSL_ERROR_NONE);
1727
1728 /* Make things return SSL_ERROR_SYSCALL when doing SSL_do_handshake
1729 * etc, where we do encode the error */
1730 if ((l=ERR_peek_error()) != 0)
1731 {
1732 if (ERR_GET_LIB(l) == ERR_LIB_SYS)
1733 return(SSL_ERROR_SYSCALL);
1734 else
1735 return(SSL_ERROR_SSL);
1736 }
1737
1738 if ((i < 0) && SSL_want_read(s))
1739 {
1740 bio=SSL_get_rbio(s);
1741 if (BIO_should_read(bio))
1742 return(SSL_ERROR_WANT_READ);
1743 else if (BIO_should_write(bio))
1744 /* This one doesn't make too much sense ... We never try
1745 * to write to the rbio, and an application program where
1746 * rbio and wbio are separate couldn't even know what it
1747 * should wait for.
1748 * However if we ever set s->rwstate incorrectly
1749 * (so that we have SSL_want_read(s) instead of
1750 * SSL_want_write(s)) and rbio and wbio *are* the same,
1751 * this test works around that bug; so it might be safer
1752 * to keep it. */
1753 return(SSL_ERROR_WANT_WRITE);
1754 else if (BIO_should_io_special(bio))
1755 {
1756 reason=BIO_get_retry_reason(bio);
1757 if (reason == BIO_RR_CONNECT)
1758 return(SSL_ERROR_WANT_CONNECT);
1759 else if (reason == BIO_RR_ACCEPT)
1760 return(SSL_ERROR_WANT_ACCEPT);
1761 else
1762 return(SSL_ERROR_SYSCALL); /* unknown */
1763 }
1764 }
1765
1766 if ((i < 0) && SSL_want_write(s))
1767 {
1768 bio=SSL_get_wbio(s);
1769 if (BIO_should_write(bio))
1770 return(SSL_ERROR_WANT_WRITE);
1771 else if (BIO_should_read(bio))
1772 /* See above (SSL_want_read(s) with BIO_should_write(bio)) */
1773 return(SSL_ERROR_WANT_READ);
1774 else if (BIO_should_io_special(bio))
1775 {
1776 reason=BIO_get_retry_reason(bio);
1777 if (reason == BIO_RR_CONNECT)
1778 return(SSL_ERROR_WANT_CONNECT);
1779 else if (reason == BIO_RR_ACCEPT)
1780 return(SSL_ERROR_WANT_ACCEPT);
1781 else
1782 return(SSL_ERROR_SYSCALL);
1783 }
1784 }
1785 if ((i < 0) && SSL_want_x509_lookup(s))
1786 {
1787 return(SSL_ERROR_WANT_X509_LOOKUP);
1788 }
1789
1790 if (i == 0)
1791 {
1792 if (s->version == SSL2_VERSION)
1793 {
1794 /* assume it is the socket being closed */
1795 return(SSL_ERROR_ZERO_RETURN);
1796 }
1797 else
1798 {
1799 if ((s->shutdown & SSL_RECEIVED_SHUTDOWN) &&
1800 (s->s3->warn_alert == SSL_AD_CLOSE_NOTIFY))
1801 return(SSL_ERROR_ZERO_RETURN);
1802 }
1803 }
1804 return(SSL_ERROR_SYSCALL);
1805 }
1806
1807int SSL_do_handshake(SSL *s)
1808 {
1809 int ret=1;
1810
1811 if (s->handshake_func == NULL)
1812 {
1813 SSLerr(SSL_F_SSL_DO_HANDSHAKE,SSL_R_CONNECTION_TYPE_NOT_SET);
1814 return(-1);
1815 }
1816
1817 s->method->ssl_renegotiate_check(s);
1818
1819 if (SSL_in_init(s) || SSL_in_before(s))
1820 {
1821 ret=s->handshake_func(s);
1822 }
1823 return(ret);
1824 }
1825
1826/* For the next 2 functions, SSL_clear() sets shutdown and so
1827 * one of these calls will reset it */
1828void SSL_set_accept_state(SSL *s)
1829 {
1830 s->server=1;
1831 s->shutdown=0;
1832 s->state=SSL_ST_ACCEPT|SSL_ST_BEFORE;
1833 s->handshake_func=s->method->ssl_accept;
1834 /* clear the current cipher */
1835 ssl_clear_cipher_ctx(s);
1836 }
1837
1838void SSL_set_connect_state(SSL *s)
1839 {
1840 s->server=0;
1841 s->shutdown=0;
1842 s->state=SSL_ST_CONNECT|SSL_ST_BEFORE;
1843 s->handshake_func=s->method->ssl_connect;
1844 /* clear the current cipher */
1845 ssl_clear_cipher_ctx(s);
1846 }
1847
1848int ssl_undefined_function(SSL *s)
1849 {
1850 SSLerr(SSL_F_SSL_UNDEFINED_FUNCTION,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
1851 return(0);
1852 }
1853
1854SSL_METHOD *ssl_bad_method(int ver)
1855 {
1856 SSLerr(SSL_F_SSL_BAD_METHOD,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
1857 return(NULL);
1858 }
1859
1860const char *SSL_get_version(SSL *s)
1861 {
1862 if (s->version == TLS1_VERSION)
1863 return("TLSv1");
1864 else if (s->version == SSL3_VERSION)
1865 return("SSLv3");
1866 else if (s->version == SSL2_VERSION)
1867 return("SSLv2");
1868 else
1869 return("unknown");
1870 }
1871
1872SSL *SSL_dup(SSL *s)
1873 {
1874 STACK_OF(X509_NAME) *sk;
1875 X509_NAME *xn;
1876 SSL *ret;
1877 int i;
1878
1879 if ((ret=SSL_new(SSL_get_SSL_CTX(s))) == NULL)
1880 return(NULL);
1881
1882 ret->version = s->version;
1883 ret->type = s->type;
1884 ret->method = s->method;
1885
1886 if (s->session != NULL)
1887 {
1888 /* This copies session-id, SSL_METHOD, sid_ctx, and 'cert' */
1889 SSL_copy_session_id(ret,s);
1890 }
1891 else
1892 {
1893 /* No session has been established yet, so we have to expect
1894 * that s->cert or ret->cert will be changed later --
1895 * they should not both point to the same object,
1896 * and thus we can't use SSL_copy_session_id. */
1897
1898 ret->method->ssl_free(ret);
1899 ret->method = s->method;
1900 ret->method->ssl_new(ret);
1901
1902 if (s->cert != NULL)
1903 {
1904 if (ret->cert != NULL)
1905 {
1906 ssl_cert_free(ret->cert);
1907 }
1908 ret->cert = ssl_cert_dup(s->cert);
1909 if (ret->cert == NULL)
1910 goto err;
1911 }
1912
1913 SSL_set_session_id_context(ret,
1914 s->sid_ctx, s->sid_ctx_length);
1915 }
1916
1917 ret->options=s->options;
1918 ret->mode=s->mode;
1919 SSL_set_max_cert_list(ret,SSL_get_max_cert_list(s));
1920 SSL_set_read_ahead(ret,SSL_get_read_ahead(s));
1921 ret->msg_callback = s->msg_callback;
1922 ret->msg_callback_arg = s->msg_callback_arg;
1923 SSL_set_verify(ret,SSL_get_verify_mode(s),
1924 SSL_get_verify_callback(s));
1925 SSL_set_verify_depth(ret,SSL_get_verify_depth(s));
1926 ret->generate_session_id = s->generate_session_id;
1927
1928 SSL_set_info_callback(ret,SSL_get_info_callback(s));
1929
1930 ret->debug=s->debug;
1931
1932 /* copy app data, a little dangerous perhaps */
1933 if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_SSL, &ret->ex_data, &s->ex_data))
1934 goto err;
1935
1936 /* setup rbio, and wbio */
1937 if (s->rbio != NULL)
1938 {
1939 if (!BIO_dup_state(s->rbio,(char *)&ret->rbio))
1940 goto err;
1941 }
1942 if (s->wbio != NULL)
1943 {
1944 if (s->wbio != s->rbio)
1945 {
1946 if (!BIO_dup_state(s->wbio,(char *)&ret->wbio))
1947 goto err;
1948 }
1949 else
1950 ret->wbio=ret->rbio;
1951 }
1952 ret->rwstate = s->rwstate;
1953 ret->in_handshake = s->in_handshake;
1954 ret->handshake_func = s->handshake_func;
1955 ret->server = s->server;
1956 ret->new_session = s->new_session;
1957 ret->quiet_shutdown = s->quiet_shutdown;
1958 ret->shutdown=s->shutdown;
1959 ret->state=s->state; /* SSL_dup does not really work at any state, though */
1960 ret->rstate=s->rstate;
1961 ret->init_num = 0; /* would have to copy ret->init_buf, ret->init_msg, ret->init_num, ret->init_off */
1962 ret->hit=s->hit;
1963 ret->purpose=s->purpose;
1964 ret->trust=s->trust;
1965
1966 /* dup the cipher_list and cipher_list_by_id stacks */
1967 if (s->cipher_list != NULL)
1968 {
1969 if ((ret->cipher_list=sk_SSL_CIPHER_dup(s->cipher_list)) == NULL)
1970 goto err;
1971 }
1972 if (s->cipher_list_by_id != NULL)
1973 if ((ret->cipher_list_by_id=sk_SSL_CIPHER_dup(s->cipher_list_by_id))
1974 == NULL)
1975 goto err;
1976
1977 /* Dup the client_CA list */
1978 if (s->client_CA != NULL)
1979 {
1980 if ((sk=sk_X509_NAME_dup(s->client_CA)) == NULL) goto err;
1981 ret->client_CA=sk;
1982 for (i=0; i<sk_X509_NAME_num(sk); i++)
1983 {
1984 xn=sk_X509_NAME_value(sk,i);
1985 if (sk_X509_NAME_set(sk,i,X509_NAME_dup(xn)) == NULL)
1986 {
1987 X509_NAME_free(xn);
1988 goto err;
1989 }
1990 }
1991 }
1992
1993 if (0)
1994 {
1995err:
1996 if (ret != NULL) SSL_free(ret);
1997 ret=NULL;
1998 }
1999 return(ret);
2000 }
2001
2002void ssl_clear_cipher_ctx(SSL *s)
2003 {
2004 if (s->enc_read_ctx != NULL)
2005 {
2006 EVP_CIPHER_CTX_cleanup(s->enc_read_ctx);
2007 OPENSSL_free(s->enc_read_ctx);
2008 s->enc_read_ctx=NULL;
2009 }
2010 if (s->enc_write_ctx != NULL)
2011 {
2012 EVP_CIPHER_CTX_cleanup(s->enc_write_ctx);
2013 OPENSSL_free(s->enc_write_ctx);
2014 s->enc_write_ctx=NULL;
2015 }
2016 if (s->expand != NULL)
2017 {
2018 COMP_CTX_free(s->expand);
2019 s->expand=NULL;
2020 }
2021 if (s->compress != NULL)
2022 {
2023 COMP_CTX_free(s->compress);
2024 s->compress=NULL;
2025 }
2026 }
2027
2028/* Fix this function so that it takes an optional type parameter */
2029X509 *SSL_get_certificate(SSL *s)
2030 {
2031 if (s->cert != NULL)
2032 return(s->cert->key->x509);
2033 else
2034 return(NULL);
2035 }
2036
2037/* Fix this function so that it takes an optional type parameter */
2038EVP_PKEY *SSL_get_privatekey(SSL *s)
2039 {
2040 if (s->cert != NULL)
2041 return(s->cert->key->privatekey);
2042 else
2043 return(NULL);
2044 }
2045
2046SSL_CIPHER *SSL_get_current_cipher(SSL *s)
2047 {
2048 if ((s->session != NULL) && (s->session->cipher != NULL))
2049 return(s->session->cipher);
2050 return(NULL);
2051 }
2052
2053int ssl_init_wbio_buffer(SSL *s,int push)
2054 {
2055 BIO *bbio;
2056
2057 if (s->bbio == NULL)
2058 {
2059 bbio=BIO_new(BIO_f_buffer());
2060 if (bbio == NULL) return(0);
2061 s->bbio=bbio;
2062 }
2063 else
2064 {
2065 bbio=s->bbio;
2066 if (s->bbio == s->wbio)
2067 s->wbio=BIO_pop(s->wbio);
2068 }
2069 (void)BIO_reset(bbio);
2070/* if (!BIO_set_write_buffer_size(bbio,16*1024)) */
2071 if (!BIO_set_read_buffer_size(bbio,1))
2072 {
2073 SSLerr(SSL_F_SSL_INIT_WBIO_BUFFER,ERR_R_BUF_LIB);
2074 return(0);
2075 }
2076 if (push)
2077 {
2078 if (s->wbio != bbio)
2079 s->wbio=BIO_push(bbio,s->wbio);
2080 }
2081 else
2082 {
2083 if (s->wbio == bbio)
2084 s->wbio=BIO_pop(bbio);
2085 }
2086 return(1);
2087 }
2088
2089void ssl_free_wbio_buffer(SSL *s)
2090 {
2091 if (s->bbio == NULL) return;
2092
2093 if (s->bbio == s->wbio)
2094 {
2095 /* remove buffering */
2096 s->wbio=BIO_pop(s->wbio);
2097#ifdef REF_CHECK /* not the usual REF_CHECK, but this avoids adding one more preprocessor symbol */
2098 assert(s->wbio != NULL);
2099#endif
2100 }
2101 BIO_free(s->bbio);
2102 s->bbio=NULL;
2103 }
2104
2105void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode)
2106 {
2107 ctx->quiet_shutdown=mode;
2108 }
2109
2110int SSL_CTX_get_quiet_shutdown(SSL_CTX *ctx)
2111 {
2112 return(ctx->quiet_shutdown);
2113 }
2114
2115void SSL_set_quiet_shutdown(SSL *s,int mode)
2116 {
2117 s->quiet_shutdown=mode;
2118 }
2119
2120int SSL_get_quiet_shutdown(SSL *s)
2121 {
2122 return(s->quiet_shutdown);
2123 }
2124
2125void SSL_set_shutdown(SSL *s,int mode)
2126 {
2127 s->shutdown=mode;
2128 }
2129
2130int SSL_get_shutdown(SSL *s)
2131 {
2132 return(s->shutdown);
2133 }
2134
2135int SSL_version(SSL *s)
2136 {
2137 return(s->version);
2138 }
2139
2140SSL_CTX *SSL_get_SSL_CTX(SSL *ssl)
2141 {
2142 return(ssl->ctx);
2143 }
2144
2145#ifndef OPENSSL_NO_STDIO
2146int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
2147 {
2148 return(X509_STORE_set_default_paths(ctx->cert_store));
2149 }
2150
2151int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
2152 const char *CApath)
2153 {
2154 return(X509_STORE_load_locations(ctx->cert_store,CAfile,CApath));
2155 }
2156#endif
2157
2158void SSL_set_info_callback(SSL *ssl,
2159 void (*cb)(const SSL *ssl,int type,int val))
2160 {
2161 ssl->info_callback=cb;
2162 }
2163
2164void (*SSL_get_info_callback(SSL *ssl))(const SSL *ssl,int type,int val)
2165 {
2166 return ssl->info_callback;
2167 }
2168
2169int SSL_state(SSL *ssl)
2170 {
2171 return(ssl->state);
2172 }
2173
2174void SSL_set_verify_result(SSL *ssl,long arg)
2175 {
2176 ssl->verify_result=arg;
2177 }
2178
2179long SSL_get_verify_result(SSL *ssl)
2180 {
2181 return(ssl->verify_result);
2182 }
2183
2184int SSL_get_ex_new_index(long argl,void *argp,CRYPTO_EX_new *new_func,
2185 CRYPTO_EX_dup *dup_func,CRYPTO_EX_free *free_func)
2186 {
2187 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, argl, argp,
2188 new_func, dup_func, free_func);
2189 }
2190
2191int SSL_set_ex_data(SSL *s,int idx,void *arg)
2192 {
2193 return(CRYPTO_set_ex_data(&s->ex_data,idx,arg));
2194 }
2195
2196void *SSL_get_ex_data(SSL *s,int idx)
2197 {
2198 return(CRYPTO_get_ex_data(&s->ex_data,idx));
2199 }
2200
2201int SSL_CTX_get_ex_new_index(long argl,void *argp,CRYPTO_EX_new *new_func,
2202 CRYPTO_EX_dup *dup_func,CRYPTO_EX_free *free_func)
2203 {
2204 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_CTX, argl, argp,
2205 new_func, dup_func, free_func);
2206 }
2207
2208int SSL_CTX_set_ex_data(SSL_CTX *s,int idx,void *arg)
2209 {
2210 return(CRYPTO_set_ex_data(&s->ex_data,idx,arg));
2211 }
2212
2213void *SSL_CTX_get_ex_data(SSL_CTX *s,int idx)
2214 {
2215 return(CRYPTO_get_ex_data(&s->ex_data,idx));
2216 }
2217
2218int ssl_ok(SSL *s)
2219 {
2220 return(1);
2221 }
2222
2223X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *ctx)
2224 {
2225 return(ctx->cert_store);
2226 }
2227
2228void SSL_CTX_set_cert_store(SSL_CTX *ctx,X509_STORE *store)
2229 {
2230 if (ctx->cert_store != NULL)
2231 X509_STORE_free(ctx->cert_store);
2232 ctx->cert_store=store;
2233 }
2234
2235int SSL_want(SSL *s)
2236 {
2237 return(s->rwstate);
2238 }
2239
2240/*!
2241 * \brief Set the callback for generating temporary RSA keys.
2242 * \param ctx the SSL context.
2243 * \param cb the callback
2244 */
2245
2246#ifndef OPENSSL_NO_RSA
2247void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,RSA *(*cb)(SSL *ssl,
2248 int is_export,
2249 int keylength))
2250 {
2251 SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TMP_RSA_CB,(void (*)())cb);
2252 }
2253
2254void SSL_set_tmp_rsa_callback(SSL *ssl,RSA *(*cb)(SSL *ssl,
2255 int is_export,
2256 int keylength))
2257 {
2258 SSL_callback_ctrl(ssl,SSL_CTRL_SET_TMP_RSA_CB,(void (*)())cb);
2259 }
2260#endif
2261
2262#ifdef DOXYGEN
2263/*!
2264 * \brief The RSA temporary key callback function.
2265 * \param ssl the SSL session.
2266 * \param is_export \c TRUE if the temp RSA key is for an export ciphersuite.
2267 * \param keylength if \c is_export is \c TRUE, then \c keylength is the size
2268 * of the required key in bits.
2269 * \return the temporary RSA key.
2270 * \sa SSL_CTX_set_tmp_rsa_callback, SSL_set_tmp_rsa_callback
2271 */
2272
2273RSA *cb(SSL *ssl,int is_export,int keylength)
2274 {}
2275#endif
2276
2277/*!
2278 * \brief Set the callback for generating temporary DH keys.
2279 * \param ctx the SSL context.
2280 * \param dh the callback
2281 */
2282
2283#ifndef OPENSSL_NO_DH
2284void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,DH *(*dh)(SSL *ssl,int is_export,
2285 int keylength))
2286 {
2287 SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TMP_DH_CB,(void (*)())dh);
2288 }
2289
2290void SSL_set_tmp_dh_callback(SSL *ssl,DH *(*dh)(SSL *ssl,int is_export,
2291 int keylength))
2292 {
2293 SSL_callback_ctrl(ssl,SSL_CTRL_SET_TMP_DH_CB,(void (*)())dh);
2294 }
2295#endif
2296
2297
2298void 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))
2299 {
2300 SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_MSG_CALLBACK, (void (*)())cb);
2301 }
2302void 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))
2303 {
2304 SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)())cb);
2305 }
2306
2307
2308
2309#if defined(_WINDLL) && defined(OPENSSL_SYS_WIN16)
2310#include "../crypto/bio/bss_file.c"
2311#endif
2312
2313IMPLEMENT_STACK_OF(SSL_CIPHER)
2314IMPLEMENT_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..03828b6632
--- /dev/null
+++ b/src/lib/libssl/ssl_rsa.c
@@ -0,0 +1,815 @@
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 if (c->pkeys[i].privatekey != NULL)
245 EVP_PKEY_free(c->pkeys[i].privatekey);
246 CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY);
247 c->pkeys[i].privatekey=pkey;
248 c->key= &(c->pkeys[i]);
249
250 c->valid=0;
251 return(1);
252 }
253
254#ifndef OPENSSL_NO_RSA
255#ifndef OPENSSL_NO_STDIO
256int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type)
257 {
258 int j,ret=0;
259 BIO *in;
260 RSA *rsa=NULL;
261
262 in=BIO_new(BIO_s_file_internal());
263 if (in == NULL)
264 {
265 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,ERR_R_BUF_LIB);
266 goto end;
267 }
268
269 if (BIO_read_filename(in,file) <= 0)
270 {
271 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,ERR_R_SYS_LIB);
272 goto end;
273 }
274 if (type == SSL_FILETYPE_ASN1)
275 {
276 j=ERR_R_ASN1_LIB;
277 rsa=d2i_RSAPrivateKey_bio(in,NULL);
278 }
279 else if (type == SSL_FILETYPE_PEM)
280 {
281 j=ERR_R_PEM_LIB;
282 rsa=PEM_read_bio_RSAPrivateKey(in,NULL,
283 ssl->ctx->default_passwd_callback,ssl->ctx->default_passwd_callback_userdata);
284 }
285 else
286 {
287 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,SSL_R_BAD_SSL_FILETYPE);
288 goto end;
289 }
290 if (rsa == NULL)
291 {
292 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE,j);
293 goto end;
294 }
295 ret=SSL_use_RSAPrivateKey(ssl,rsa);
296 RSA_free(rsa);
297end:
298 if (in != NULL) BIO_free(in);
299 return(ret);
300 }
301#endif
302
303int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len)
304 {
305 int ret;
306 const unsigned char *p;
307 RSA *rsa;
308
309 p=d;
310 if ((rsa=d2i_RSAPrivateKey(NULL,&p,(long)len)) == NULL)
311 {
312 SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1,ERR_R_ASN1_LIB);
313 return(0);
314 }
315
316 ret=SSL_use_RSAPrivateKey(ssl,rsa);
317 RSA_free(rsa);
318 return(ret);
319 }
320#endif /* !OPENSSL_NO_RSA */
321
322int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey)
323 {
324 int ret;
325
326 if (pkey == NULL)
327 {
328 SSLerr(SSL_F_SSL_USE_PRIVATEKEY,ERR_R_PASSED_NULL_PARAMETER);
329 return(0);
330 }
331 if (!ssl_cert_inst(&ssl->cert))
332 {
333 SSLerr(SSL_F_SSL_USE_PRIVATEKEY,ERR_R_MALLOC_FAILURE);
334 return(0);
335 }
336 ret=ssl_set_pkey(ssl->cert,pkey);
337 return(ret);
338 }
339
340#ifndef OPENSSL_NO_STDIO
341int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type)
342 {
343 int j,ret=0;
344 BIO *in;
345 EVP_PKEY *pkey=NULL;
346
347 in=BIO_new(BIO_s_file_internal());
348 if (in == NULL)
349 {
350 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,ERR_R_BUF_LIB);
351 goto end;
352 }
353
354 if (BIO_read_filename(in,file) <= 0)
355 {
356 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,ERR_R_SYS_LIB);
357 goto end;
358 }
359 if (type == SSL_FILETYPE_PEM)
360 {
361 j=ERR_R_PEM_LIB;
362 pkey=PEM_read_bio_PrivateKey(in,NULL,
363 ssl->ctx->default_passwd_callback,ssl->ctx->default_passwd_callback_userdata);
364 }
365 else
366 {
367 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,SSL_R_BAD_SSL_FILETYPE);
368 goto end;
369 }
370 if (pkey == NULL)
371 {
372 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,j);
373 goto end;
374 }
375 ret=SSL_use_PrivateKey(ssl,pkey);
376 EVP_PKEY_free(pkey);
377end:
378 if (in != NULL) BIO_free(in);
379 return(ret);
380 }
381#endif
382
383int SSL_use_PrivateKey_ASN1(int type, SSL *ssl, unsigned char *d, long len)
384 {
385 int ret;
386 unsigned char *p;
387 EVP_PKEY *pkey;
388
389 p=d;
390 if ((pkey=d2i_PrivateKey(type,NULL,&p,(long)len)) == NULL)
391 {
392 SSLerr(SSL_F_SSL_USE_PRIVATEKEY_ASN1,ERR_R_ASN1_LIB);
393 return(0);
394 }
395
396 ret=SSL_use_PrivateKey(ssl,pkey);
397 EVP_PKEY_free(pkey);
398 return(ret);
399 }
400
401int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x)
402 {
403 if (x == NULL)
404 {
405 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE,ERR_R_PASSED_NULL_PARAMETER);
406 return(0);
407 }
408 if (!ssl_cert_inst(&ctx->cert))
409 {
410 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE,ERR_R_MALLOC_FAILURE);
411 return(0);
412 }
413 return(ssl_set_cert(ctx->cert, x));
414 }
415
416static int ssl_set_cert(CERT *c, X509 *x)
417 {
418 EVP_PKEY *pkey;
419 int i,ok=0,bad=0;
420
421 pkey=X509_get_pubkey(x);
422 if (pkey == NULL)
423 {
424 SSLerr(SSL_F_SSL_SET_CERT,SSL_R_X509_LIB);
425 return(0);
426 }
427
428 i=ssl_cert_type(x,pkey);
429 if (i < 0)
430 {
431 SSLerr(SSL_F_SSL_SET_CERT,SSL_R_UNKNOWN_CERTIFICATE_TYPE);
432 EVP_PKEY_free(pkey);
433 return(0);
434 }
435
436 if (c->pkeys[i].privatekey != NULL)
437 {
438 EVP_PKEY_copy_parameters(pkey,c->pkeys[i].privatekey);
439 ERR_clear_error();
440
441#ifndef OPENSSL_NO_RSA
442 /* Don't check the public/private key, this is mostly
443 * for smart cards. */
444 if ((c->pkeys[i].privatekey->type == EVP_PKEY_RSA) &&
445 (RSA_flags(c->pkeys[i].privatekey->pkey.rsa) &
446 RSA_METHOD_FLAG_NO_CHECK))
447 ok=1;
448 else
449#endif
450 {
451 if (!X509_check_private_key(x,c->pkeys[i].privatekey))
452 {
453 if ((i == SSL_PKEY_DH_RSA) || (i == SSL_PKEY_DH_DSA))
454 {
455 i=(i == SSL_PKEY_DH_RSA)?
456 SSL_PKEY_DH_DSA:SSL_PKEY_DH_RSA;
457
458 if (c->pkeys[i].privatekey == NULL)
459 ok=1;
460 else
461 {
462 if (!X509_check_private_key(x,
463 c->pkeys[i].privatekey))
464 bad=1;
465 else
466 ok=1;
467 }
468 }
469 else
470 bad=1;
471 }
472 else
473 ok=1;
474 } /* OPENSSL_NO_RSA */
475 }
476 else
477 ok=1;
478
479 EVP_PKEY_free(pkey);
480 if (bad)
481 {
482 EVP_PKEY_free(c->pkeys[i].privatekey);
483 c->pkeys[i].privatekey=NULL;
484 }
485
486 if (c->pkeys[i].x509 != NULL)
487 X509_free(c->pkeys[i].x509);
488 CRYPTO_add(&x->references,1,CRYPTO_LOCK_X509);
489 c->pkeys[i].x509=x;
490 c->key= &(c->pkeys[i]);
491
492 c->valid=0;
493 return(1);
494 }
495
496#ifndef OPENSSL_NO_STDIO
497int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
498 {
499 int j;
500 BIO *in;
501 int ret=0;
502 X509 *x=NULL;
503
504 in=BIO_new(BIO_s_file_internal());
505 if (in == NULL)
506 {
507 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,ERR_R_BUF_LIB);
508 goto end;
509 }
510
511 if (BIO_read_filename(in,file) <= 0)
512 {
513 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,ERR_R_SYS_LIB);
514 goto end;
515 }
516 if (type == SSL_FILETYPE_ASN1)
517 {
518 j=ERR_R_ASN1_LIB;
519 x=d2i_X509_bio(in,NULL);
520 }
521 else if (type == SSL_FILETYPE_PEM)
522 {
523 j=ERR_R_PEM_LIB;
524 x=PEM_read_bio_X509(in,NULL,ctx->default_passwd_callback,ctx->default_passwd_callback_userdata);
525 }
526 else
527 {
528 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,SSL_R_BAD_SSL_FILETYPE);
529 goto end;
530 }
531
532 if (x == NULL)
533 {
534 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE,j);
535 goto end;
536 }
537
538 ret=SSL_CTX_use_certificate(ctx,x);
539end:
540 if (x != NULL) X509_free(x);
541 if (in != NULL) BIO_free(in);
542 return(ret);
543 }
544#endif
545
546int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d)
547 {
548 X509 *x;
549 int ret;
550
551 x=d2i_X509(NULL,&d,(long)len);
552 if (x == NULL)
553 {
554 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1,ERR_R_ASN1_LIB);
555 return(0);
556 }
557
558 ret=SSL_CTX_use_certificate(ctx,x);
559 X509_free(x);
560 return(ret);
561 }
562
563#ifndef OPENSSL_NO_RSA
564int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa)
565 {
566 int ret;
567 EVP_PKEY *pkey;
568
569 if (rsa == NULL)
570 {
571 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY,ERR_R_PASSED_NULL_PARAMETER);
572 return(0);
573 }
574 if (!ssl_cert_inst(&ctx->cert))
575 {
576 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE);
577 return(0);
578 }
579 if ((pkey=EVP_PKEY_new()) == NULL)
580 {
581 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY,ERR_R_EVP_LIB);
582 return(0);
583 }
584
585 RSA_up_ref(rsa);
586 EVP_PKEY_assign_RSA(pkey,rsa);
587
588 ret=ssl_set_pkey(ctx->cert, pkey);
589 EVP_PKEY_free(pkey);
590 return(ret);
591 }
592
593#ifndef OPENSSL_NO_STDIO
594int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type)
595 {
596 int j,ret=0;
597 BIO *in;
598 RSA *rsa=NULL;
599
600 in=BIO_new(BIO_s_file_internal());
601 if (in == NULL)
602 {
603 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,ERR_R_BUF_LIB);
604 goto end;
605 }
606
607 if (BIO_read_filename(in,file) <= 0)
608 {
609 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,ERR_R_SYS_LIB);
610 goto end;
611 }
612 if (type == SSL_FILETYPE_ASN1)
613 {
614 j=ERR_R_ASN1_LIB;
615 rsa=d2i_RSAPrivateKey_bio(in,NULL);
616 }
617 else if (type == SSL_FILETYPE_PEM)
618 {
619 j=ERR_R_PEM_LIB;
620 rsa=PEM_read_bio_RSAPrivateKey(in,NULL,
621 ctx->default_passwd_callback,ctx->default_passwd_callback_userdata);
622 }
623 else
624 {
625 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,SSL_R_BAD_SSL_FILETYPE);
626 goto end;
627 }
628 if (rsa == NULL)
629 {
630 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE,j);
631 goto end;
632 }
633 ret=SSL_CTX_use_RSAPrivateKey(ctx,rsa);
634 RSA_free(rsa);
635end:
636 if (in != NULL) BIO_free(in);
637 return(ret);
638 }
639#endif
640
641int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len)
642 {
643 int ret;
644 const unsigned char *p;
645 RSA *rsa;
646
647 p=d;
648 if ((rsa=d2i_RSAPrivateKey(NULL,&p,(long)len)) == NULL)
649 {
650 SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1,ERR_R_ASN1_LIB);
651 return(0);
652 }
653
654 ret=SSL_CTX_use_RSAPrivateKey(ctx,rsa);
655 RSA_free(rsa);
656 return(ret);
657 }
658#endif /* !OPENSSL_NO_RSA */
659
660int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey)
661 {
662 if (pkey == NULL)
663 {
664 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY,ERR_R_PASSED_NULL_PARAMETER);
665 return(0);
666 }
667 if (!ssl_cert_inst(&ctx->cert))
668 {
669 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY,ERR_R_MALLOC_FAILURE);
670 return(0);
671 }
672 return(ssl_set_pkey(ctx->cert,pkey));
673 }
674
675#ifndef OPENSSL_NO_STDIO
676int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
677 {
678 int j,ret=0;
679 BIO *in;
680 EVP_PKEY *pkey=NULL;
681
682 in=BIO_new(BIO_s_file_internal());
683 if (in == NULL)
684 {
685 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,ERR_R_BUF_LIB);
686 goto end;
687 }
688
689 if (BIO_read_filename(in,file) <= 0)
690 {
691 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,ERR_R_SYS_LIB);
692 goto end;
693 }
694 if (type == SSL_FILETYPE_PEM)
695 {
696 j=ERR_R_PEM_LIB;
697 pkey=PEM_read_bio_PrivateKey(in,NULL,
698 ctx->default_passwd_callback,ctx->default_passwd_callback_userdata);
699 }
700 else
701 {
702 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,SSL_R_BAD_SSL_FILETYPE);
703 goto end;
704 }
705 if (pkey == NULL)
706 {
707 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE,j);
708 goto end;
709 }
710 ret=SSL_CTX_use_PrivateKey(ctx,pkey);
711 EVP_PKEY_free(pkey);
712end:
713 if (in != NULL) BIO_free(in);
714 return(ret);
715 }
716#endif
717
718int SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, unsigned char *d,
719 long len)
720 {
721 int ret;
722 unsigned char *p;
723 EVP_PKEY *pkey;
724
725 p=d;
726 if ((pkey=d2i_PrivateKey(type,NULL,&p,(long)len)) == NULL)
727 {
728 SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1,ERR_R_ASN1_LIB);
729 return(0);
730 }
731
732 ret=SSL_CTX_use_PrivateKey(ctx,pkey);
733 EVP_PKEY_free(pkey);
734 return(ret);
735 }
736
737
738#ifndef OPENSSL_NO_STDIO
739/* Read a file that contains our certificate in "PEM" format,
740 * possibly followed by a sequence of CA certificates that should be
741 * sent to the peer in the Certificate message.
742 */
743int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
744 {
745 BIO *in;
746 int ret=0;
747 X509 *x=NULL;
748
749 in=BIO_new(BIO_s_file_internal());
750 if (in == NULL)
751 {
752 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE,ERR_R_BUF_LIB);
753 goto end;
754 }
755
756 if (BIO_read_filename(in,file) <= 0)
757 {
758 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE,ERR_R_SYS_LIB);
759 goto end;
760 }
761
762 x=PEM_read_bio_X509(in,NULL,ctx->default_passwd_callback,ctx->default_passwd_callback_userdata);
763 if (x == NULL)
764 {
765 SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE,ERR_R_PEM_LIB);
766 goto end;
767 }
768
769 ret=SSL_CTX_use_certificate(ctx,x);
770 if (ERR_peek_error() != 0)
771 ret = 0; /* Key/certificate mismatch doesn't imply ret==0 ... */
772 if (ret)
773 {
774 /* If we could set up our certificate, now proceed to
775 * the CA certificates.
776 */
777 X509 *ca;
778 int r;
779 unsigned long err;
780
781 if (ctx->extra_certs != NULL)
782 {
783 sk_X509_pop_free(ctx->extra_certs, X509_free);
784 ctx->extra_certs = NULL;
785 }
786
787 while ((ca = PEM_read_bio_X509(in,NULL,ctx->default_passwd_callback,ctx->default_passwd_callback_userdata))
788 != NULL)
789 {
790 r = SSL_CTX_add_extra_chain_cert(ctx, ca);
791 if (!r)
792 {
793 X509_free(ca);
794 ret = 0;
795 goto end;
796 }
797 /* Note that we must not free r if it was successfully
798 * added to the chain (while we must free the main
799 * certificate, since its reference count is increased
800 * by SSL_CTX_use_certificate). */
801 }
802 /* When the while loop ends, it's usually just EOF. */
803 err = ERR_peek_last_error();
804 if (ERR_GET_LIB(err) == ERR_LIB_PEM && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
805 (void)ERR_get_error();
806 else
807 ret = 0; /* some real error */
808 }
809
810end:
811 if (x != NULL) X509_free(x);
812 if (in != NULL) BIO_free(in);
813 return(ret);
814 }
815#endif
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
new file mode 100644
index 0000000000..a505e388fb
--- /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_r_lock(CRYPTO_LOCK_SSL_SESSION);
82 sess = ssl->session;
83 if(sess)
84 sess->references++;
85 CRYPTO_r_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