From d02b48c63a58ea4367a0e905979f140b7d090f86 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Mon, 21 Dec 1998 10:52:47 +0000 Subject: Import of old SSLeay release: SSLeay 0.8.1b --- crypto/Makefile.ssl | 156 +++ crypto/asn1/Makefile.ssl | 118 ++ crypto/asn1/a_bitstr.c | 158 +++ crypto/asn1/a_bool.c | 121 ++ crypto/asn1/a_bytes.c | 337 +++++ crypto/asn1/a_d2i_fp.c | 200 +++ crypto/asn1/a_digest.c | 91 ++ crypto/asn1/a_dup.c | 86 ++ crypto/asn1/a_hdr.c | 130 ++ crypto/asn1/a_i2d_fp.c | 119 ++ crypto/asn1/a_int.c | 304 +++++ crypto/asn1/a_meth.c | 84 ++ crypto/asn1/a_object.c | 369 ++++++ crypto/asn1/a_octet.c | 90 ++ crypto/asn1/a_print.c | 161 +++ crypto/asn1/a_set.c | 149 +++ crypto/asn1/a_sign.c | 147 +++ crypto/asn1/a_type.c | 317 +++++ crypto/asn1/a_utctm.c | 190 +++ crypto/asn1/a_verify.c | 121 ++ crypto/asn1/asn1.err | 178 +++ crypto/asn1/asn1.h | 786 ++++++++++++ crypto/asn1/asn1_err.c | 256 ++++ crypto/asn1/asn1_lib.c | 433 +++++++ crypto/asn1/asn1_mac.h | 318 +++++ crypto/asn1/asn1_par.c | 387 ++++++ crypto/asn1/d2i_dhp.c | 108 ++ crypto/asn1/d2i_dsap.c | 101 ++ crypto/asn1/d2i_pr.c | 117 ++ crypto/asn1/d2i_pu.c | 117 ++ crypto/asn1/d2i_r_pr.c | 129 ++ crypto/asn1/d2i_r_pu.c | 100 ++ crypto/asn1/d2i_s_pr.c | 113 ++ crypto/asn1/d2i_s_pu.c | 124 ++ crypto/asn1/f_int.c | 211 ++++ crypto/asn1/f_string.c | 210 ++++ crypto/asn1/i2d_dhp.c | 128 ++ crypto/asn1/i2d_dsap.c | 121 ++ crypto/asn1/i2d_pr.c | 86 ++ crypto/asn1/i2d_pu.c | 84 ++ crypto/asn1/i2d_r_pr.c | 132 ++ crypto/asn1/i2d_r_pu.c | 118 ++ crypto/asn1/i2d_s_pr.c | 128 ++ crypto/asn1/i2d_s_pu.c | 133 ++ crypto/asn1/n_pkey.c | 364 ++++++ crypto/asn1/p7_dgst.c | 130 ++ crypto/asn1/p7_enc.c | 120 ++ crypto/asn1/p7_enc_c.c | 127 ++ crypto/asn1/p7_evp.c | 125 ++ crypto/asn1/p7_i_s.c | 120 ++ crypto/asn1/p7_lib.c | 299 +++++ crypto/asn1/p7_recip.c | 130 ++ crypto/asn1/p7_s_e.c | 146 +++ crypto/asn1/p7_signd.c | 140 +++ crypto/asn1/p7_signi.c | 149 +++ crypto/asn1/pk.c | 117 ++ crypto/asn1/pkcs8.c | 139 +++ crypto/asn1/t_pkey.c | 389 ++++++ crypto/asn1/t_req.c | 226 ++++ crypto/asn1/t_x509.c | 386 ++++++ crypto/asn1/test.c | 253 ++++ crypto/asn1/x_algor.c | 126 ++ crypto/asn1/x_attrib.c | 152 +++ crypto/asn1/x_cinf.c | 197 +++ crypto/asn1/x_crl.c | 347 ++++++ crypto/asn1/x_exten.c | 147 +++ crypto/asn1/x_info.c | 108 ++ crypto/asn1/x_name.c | 295 +++++ crypto/asn1/x_pkey.c | 153 +++ crypto/asn1/x_pubkey.c | 252 ++++ crypto/asn1/x_req.c | 244 ++++ crypto/asn1/x_sig.c | 119 ++ crypto/asn1/x_spki.c | 181 +++ crypto/asn1/x_val.c | 118 ++ crypto/asn1/x_x509.c | 155 +++ crypto/bf/COPYRIGHT | 46 + crypto/bf/INSTALL | 14 + crypto/bf/Makefile.ssl | 108 ++ crypto/bf/Makefile.uni | 160 +++ crypto/bf/README | 8 + crypto/bf/VERSION | 6 + crypto/bf/asm/b-win32.asm | 662 ++++++++++ crypto/bf/asm/bf586.pl | 159 +++ crypto/bf/asm/bx86-cpp.s | 666 ++++++++++ crypto/bf/asm/bx86unix.cpp | 33 + crypto/bf/asm/readme | 3 + crypto/bf/asm/win32.asm | 663 ++++++++++ crypto/bf/bf_cbc.c | 148 +++ crypto/bf/bf_cfb64.c | 127 ++ crypto/bf/bf_ecb.c | 95 ++ crypto/bf/bf_enc.c | 140 +++ crypto/bf/bf_locl | 243 ++++ crypto/bf/bf_locl.h | 244 ++++ crypto/bf/bf_locl.org | 244 ++++ crypto/bf/bf_ofb64.c | 115 ++ crypto/bf/bf_pi.h | 325 +++++ crypto/bf/bf_skey.c | 119 ++ crypto/bf/bfspeed.c | 285 +++++ crypto/bf/bftest.c | 521 ++++++++ crypto/bf/blowfish.h | 114 ++ crypto/bio/Makefile.ssl | 92 ++ crypto/bio/b_dump.c | 125 ++ crypto/bio/b_print.c | 92 ++ crypto/bio/b_sock.c | 512 ++++++++ crypto/bio/bf_buff.c | 489 ++++++++ crypto/bio/bf_nbio.c | 266 ++++ crypto/bio/bf_null.c | 194 +++ crypto/bio/bio.err | 43 + crypto/bio/bio.h | 597 +++++++++ crypto/bio/bio_cb.c | 132 ++ crypto/bio/bio_err.c | 121 ++ crypto/bio/bio_lib.c | 447 +++++++ crypto/bio/bss_acpt.c | 484 ++++++++ crypto/bio/bss_conn.c | 558 +++++++++ crypto/bio/bss_fd.c | 62 + crypto/bio/bss_file.c | 334 +++++ crypto/bio/bss_mem.c | 296 +++++ crypto/bio/bss_null.c | 176 +++ crypto/bio/bss_rtcp.c | 296 +++++ crypto/bio/bss_sock.c | 449 +++++++ crypto/bn/Makefile.ssl | 107 ++ crypto/bn/asm/README | 30 + crypto/bn/asm/alpha.s | 310 +++++ crypto/bn/asm/pa-risc.s | 710 +++++++++++ crypto/bn/asm/pa-risc2.s | 416 +++++++ crypto/bn/asm/r3000.s | 646 ++++++++++ crypto/bn/asm/sparc.s | 359 ++++++ crypto/bn/asm/x86-bsdi.s | 272 +++++ crypto/bn/asm/x86-lnx.s | 282 +++++ crypto/bn/asm/x86-lnxa.s | 282 +++++ crypto/bn/asm/x86-sol.s | 224 ++++ crypto/bn/asm/x86nt32.asm | 288 +++++ crypto/bn/asm/x86nt32.uu | 22 + crypto/bn/asm/x86w16.asm | 297 +++++ crypto/bn/asm/x86w16.uu | 20 + crypto/bn/asm/x86w32.asm | 303 +++++ crypto/bn/asm/x86w32.uu | 23 + crypto/bn/bn.err | 20 + crypto/bn/bn.h | 433 +++++++ crypto/bn/bn.org | 433 +++++++ crypto/bn/bn_add.c | 170 +++ crypto/bn/bn_bld.c | 144 +++ crypto/bn/bn_div.c | 286 +++++ crypto/bn/bn_err.c | 98 ++ crypto/bn/bn_exp.c | 510 ++++++++ crypto/bn/bn_gcd.c | 203 +++ crypto/bn/bn_lcl.h | 216 ++++ crypto/bn/bn_lib.c | 565 +++++++++ crypto/bn/bn_mod.c | 97 ++ crypto/bn/bn_mont.c | 280 +++++ crypto/bn/bn_mul.c | 99 ++ crypto/bn/bn_mulw.c | 303 +++++ crypto/bn/bn_prime.c | 389 ++++++ crypto/bn/bn_prime.h | 325 +++++ crypto/bn/bn_prime.pl | 56 + crypto/bn/bn_print.c | 218 ++++ crypto/bn/bn_rand.c | 121 ++ crypto/bn/bn_recp.c | 125 ++ crypto/bn/bn_shift.c | 210 ++++ crypto/bn/bn_sqr.c | 161 +++ crypto/bn/bn_sub.c | 176 +++ crypto/bn/bn_word.c | 155 +++ crypto/bn/bnspeed.c | 240 ++++ crypto/bn/bntest.c | 775 ++++++++++++ crypto/bn/exptest.c | 148 +++ crypto/bn/stuff/bn_knuth.c | 378 ++++++ crypto/bn/stuff/div.c | 340 ++++++ crypto/bn/stuff/mont.doc | 17 + crypto/bn/stuff/wei_mulw.c | 410 +++++++ crypto/buffer/Makefile.ssl | 84 ++ crypto/buffer/buf_err.c | 81 ++ crypto/buffer/buffer.c | 139 +++ crypto/buffer/buffer.err | 9 + crypto/buffer/buffer.h | 107 ++ crypto/conf/Makefile.ssl | 85 ++ crypto/conf/cnf_save.c | 106 ++ crypto/conf/conf.c | 725 +++++++++++ crypto/conf/conf.err | 12 + crypto/conf/conf.h | 114 ++ crypto/conf/conf_err.c | 90 ++ crypto/conf/conf_lcl.h | 102 ++ crypto/conf/keysets.pl | 61 + crypto/conf/ssleay.cnf | 78 ++ crypto/conf/test.c | 91 ++ crypto/cryptall.h | 110 ++ crypto/cryptlib.c | 267 ++++ crypto/cryptlib.h | 98 ++ crypto/crypto.c | 512 ++++++++ crypto/crypto.h | 247 ++++ crypto/cversion.c | 99 ++ crypto/date.h | 1 + crypto/des/COPYRIGHT | 50 + crypto/des/DES.pm | 19 + crypto/des/DES.pod | 16 + crypto/des/DES.xs | 268 ++++ crypto/des/FILES | 96 ++ crypto/des/INSTALL | 69 ++ crypto/des/Imakefile | 35 + crypto/des/KERBEROS | 41 + crypto/des/MODES.DES | 84 ++ crypto/des/Makefile.PL | 14 + crypto/des/Makefile.lit | 249 ++++ crypto/des/Makefile.ssl | 135 ++ crypto/des/Makefile.uni | 249 ++++ crypto/des/PC1 | 28 + crypto/des/PC2 | 57 + crypto/des/README | 54 + crypto/des/VERSION | 387 ++++++ crypto/des/asm/c-win32.asm | 929 ++++++++++++++ crypto/des/asm/c-win32.uu | 99 ++ crypto/des/asm/crypt.pl | 240 ++++ crypto/des/asm/cx86-cpp.s | 932 ++++++++++++++ crypto/des/asm/cx86unix.cpp | 35 + crypto/des/asm/d-win32.asm | 2765 +++++++++++++++++++++++++++++++++++++++++ crypto/des/asm/d-win32.uu | 319 +++++ crypto/des/asm/des-som2.pl | 308 +++++ crypto/des/asm/des-som3.pl | 266 ++++ crypto/des/asm/des586.pl | 210 ++++ crypto/des/asm/des686.pl | 230 ++++ crypto/des/asm/desboth.pl | 67 + crypto/des/asm/dx86-cpp.s | 2780 ++++++++++++++++++++++++++++++++++++++++++ crypto/des/asm/dx86unix.cpp | 41 + crypto/des/asm/readme | 131 ++ crypto/des/cbc3_enc.c | 99 ++ crypto/des/cbc_cksm.c | 103 ++ crypto/des/cbc_enc.c | 135 ++ crypto/des/cfb64ede.c | 151 +++ crypto/des/cfb64enc.c | 128 ++ crypto/des/cfb_enc.c | 171 +++ crypto/des/des | 305 +++++ crypto/des/des.c | 960 +++++++++++++++ crypto/des/des.h | 305 +++++ crypto/des/des.man | 186 +++ crypto/des/des.org | 305 +++++ crypto/des/des.pl | 552 +++++++++ crypto/des/des_crypt.man | 508 ++++++++ crypto/des/des_enc.c | 301 +++++ crypto/des/des_locl.h | 516 ++++++++ crypto/des/des_locl.org | 516 ++++++++ crypto/des/des_opts.c | 620 ++++++++++ crypto/des/des_ver.h | 60 + crypto/des/destest.c | 856 +++++++++++++ crypto/des/doIP | 46 + crypto/des/doPC1 | 110 ++ crypto/des/doPC2 | 94 ++ crypto/des/ecb3_enc.c | 87 ++ crypto/des/ecb_enc.c | 124 ++ crypto/des/ede_enc.c | 189 +++ crypto/des/enc_read.c | 214 ++++ crypto/des/enc_writ.c | 160 +++ crypto/des/fcrypt.c | 153 +++ crypto/des/fcrypt_b.c | 148 +++ crypto/des/makefile.bc | 50 + crypto/des/ncbc_enc.c | 141 +++ crypto/des/ofb64ede.c | 131 ++ crypto/des/ofb64enc.c | 114 ++ crypto/des/ofb_enc.c | 122 ++ crypto/des/options.txt | 39 + crypto/des/pcbc_enc.c | 126 ++ crypto/des/podd.h | 75 ++ crypto/des/qud_cksm.c | 144 +++ crypto/des/rand_key.c | 118 ++ crypto/des/read2pwd.c | 90 ++ crypto/des/read_pwd.c | 419 +++++++ crypto/des/rpc_des.h | 131 ++ crypto/des/rpc_enc.c | 107 ++ crypto/des/rpw.c | 101 ++ crypto/des/set_key.c | 246 ++++ crypto/des/shifts.pl | 198 +++ crypto/des/sk.h | 204 ++++ crypto/des/speed.c | 329 +++++ crypto/des/spr.h | 204 ++++ crypto/des/str2key.c | 171 +++ crypto/des/supp.c | 109 ++ crypto/des/t/test | 27 + crypto/des/testdes.pl | 167 +++ crypto/des/times/486-50.sol | 16 + crypto/des/times/586-100.lnx | 20 + crypto/des/times/686-200.fre | 18 + crypto/des/times/aix.cc | 26 + crypto/des/times/alpha.cc | 18 + crypto/des/times/hpux.cc | 17 + crypto/des/times/sparc.gcc | 17 + crypto/des/times/usparc.cc | 31 + crypto/des/typemap | 34 + crypto/des/vms.com | 90 ++ crypto/des/xcbc_enc.c | 206 ++++ crypto/dh/Makefile.ssl | 84 ++ crypto/dh/dh.err | 12 + crypto/dh/dh.h | 162 +++ crypto/dh/dh1024.pem | 5 + crypto/dh/dh192.pem | 3 + crypto/dh/dh2048.pem | 16 + crypto/dh/dh4096.pem | 14 + crypto/dh/dh512.pem | 4 + crypto/dh/dh_check.c | 120 ++ crypto/dh/dh_err.c | 90 ++ crypto/dh/dh_gen.c | 149 +++ crypto/dh/dh_key.c | 142 +++ crypto/dh/dh_lib.c | 100 ++ crypto/dh/dhtest.c | 187 +++ crypto/dh/example | 50 + crypto/dh/generate | 65 + crypto/dh/p1024.c | 92 ++ crypto/dh/p192.c | 80 ++ crypto/dh/p512.c | 85 ++ crypto/dsa/Makefile.ssl | 84 ++ crypto/dsa/README | 4 + crypto/dsa/dsa.err | 15 + crypto/dsa/dsa.h | 194 +++ crypto/dsa/dsa_err.c | 93 ++ crypto/dsa/dsa_gen.c | 325 +++++ crypto/dsa/dsa_key.c | 112 ++ crypto/dsa/dsa_lib.c | 142 +++ crypto/dsa/dsa_sign.c | 215 ++++ crypto/dsa/dsa_vrf.c | 152 +++ crypto/dsa/dsagen.c | 105 ++ crypto/dsa/dsatest.c | 216 ++++ crypto/dsa/fips186a.txt | 122 ++ crypto/err/Makefile.ssl | 80 ++ crypto/err/err.c | 550 +++++++++ crypto/err/err.h | 265 ++++ crypto/err/err_all.c | 115 ++ crypto/err/err_code.pl | 126 ++ crypto/err/err_genc.pl | 147 +++ crypto/err/err_prn.c | 102 ++ crypto/err/error.err | 13 + crypto/evp/Makefile.ssl | 105 ++ crypto/evp/bio_b64.c | 452 +++++++ crypto/evp/bio_enc.c | 402 ++++++ crypto/evp/bio_md.c | 270 ++++ crypto/evp/c_all.c | 155 +++ crypto/evp/digest.c | 89 ++ crypto/evp/e_cbc_3d.c | 153 +++ crypto/evp/e_cbc_bf.c | 114 ++ crypto/evp/e_cbc_d.c | 111 ++ crypto/evp/e_cbc_i.c | 126 ++ crypto/evp/e_cbc_r2.c | 115 ++ crypto/evp/e_cfb_3d.c | 156 +++ crypto/evp/e_cfb_bf.c | 116 ++ crypto/evp/e_cfb_d.c | 113 ++ crypto/evp/e_cfb_i.c | 116 ++ crypto/evp/e_cfb_r2.c | 117 ++ crypto/evp/e_dsa.c | 71 ++ crypto/evp/e_ecb_3d.c | 152 +++ crypto/evp/e_ecb_bf.c | 117 ++ crypto/evp/e_ecb_d.c | 113 ++ crypto/evp/e_ecb_i.c | 128 ++ crypto/evp/e_ecb_r2.c | 118 ++ crypto/evp/e_null.c | 105 ++ crypto/evp/e_ofb_3d.c | 155 +++ crypto/evp/e_ofb_bf.c | 117 ++ crypto/evp/e_ofb_d.c | 113 ++ crypto/evp/e_ofb_i.c | 116 ++ crypto/evp/e_ofb_r2.c | 118 ++ crypto/evp/e_rc4.c | 109 ++ crypto/evp/e_xcbc_d.c | 117 ++ crypto/evp/encode.c | 422 +++++++ crypto/evp/evp.err | 23 + crypto/evp/evp.h | 704 +++++++++++ crypto/evp/evp_enc.c | 296 +++++ crypto/evp/evp_err.c | 101 ++ crypto/evp/evp_key.c | 163 +++ crypto/evp/m_dss.c | 80 ++ crypto/evp/m_dss1.c | 79 ++ crypto/evp/m_md2.c | 80 ++ crypto/evp/m_md5.c | 79 ++ crypto/evp/m_mdc2.c | 79 ++ crypto/evp/m_null.c | 86 ++ crypto/evp/m_sha.c | 80 ++ crypto/evp/m_sha1.c | 79 ++ crypto/evp/names.c | 281 +++++ crypto/evp/p_lib.c | 256 ++++ crypto/evp/p_open.c | 118 ++ crypto/evp/p_seal.c | 122 ++ crypto/evp/p_sign.c | 117 ++ crypto/evp/p_verify.c | 99 ++ crypto/idea/Makefile.ssl | 80 ++ crypto/idea/i_cbc.c | 140 +++ crypto/idea/i_cfb64.c | 127 ++ crypto/idea/i_ecb.c | 138 +++ crypto/idea/i_ofb64.c | 115 ++ crypto/idea/i_skey.c | 166 +++ crypto/idea/idea.h | 116 ++ crypto/idea/idea.org | 116 ++ crypto/idea/idea_lcl.h | 197 +++ crypto/idea/ideatest.c | 232 ++++ crypto/idea/version | 12 + crypto/lhash/Makefile.ssl | 80 ++ crypto/lhash/lh_stats.c | 289 +++++ crypto/lhash/lh_test.c | 89 ++ crypto/lhash/lhash.c | 489 ++++++++ crypto/lhash/lhash.h | 155 +++ crypto/lhash/num.pl | 17 + crypto/libvms.com | 31 + crypto/md/Makefile.ssl | 80 ++ crypto/md/md2.c | 137 +++ crypto/md/md2.h | 106 ++ crypto/md/md2.org | 106 ++ crypto/md/md2_dgst.c | 235 ++++ crypto/md/md2_one.c | 80 ++ crypto/md/md2test.c | 130 ++ crypto/md/md5.c | 135 ++ crypto/md/md5.h | 97 ++ crypto/md/md5_dgst.c | 366 ++++++ crypto/md/md5_locl.h | 190 +++ crypto/md/md5_one.c | 78 ++ crypto/md/md5test.c | 130 ++ crypto/mdc2/Makefile.ssl | 80 ++ crypto/mdc2/mdc2.h | 100 ++ crypto/mdc2/mdc2_one.c | 78 ++ crypto/mdc2/mdc2dgst.c | 211 ++++ crypto/mdc2/mdc2test.c | 122 ++ crypto/mem.c | 355 ++++++ crypto/objects/Makefile.ssl | 87 ++ crypto/objects/obj_dat.c | 501 ++++++++ crypto/objects/obj_dat.h | 541 ++++++++ crypto/objects/obj_dat.pl | 269 ++++ crypto/objects/obj_err.c | 90 ++ crypto/objects/obj_lib.c | 126 ++ crypto/objects/objects.err | 12 + crypto/objects/objects.h | 584 +++++++++ crypto/objects/objects.txt | 40 + crypto/pem/Makefile.ssl | 96 ++ crypto/pem/ctx_size.c | 122 ++ crypto/pem/message | 16 + crypto/pem/pem.err | 38 + crypto/pem/pem.h | 562 +++++++++ crypto/pem/pem.org | 562 +++++++++ crypto/pem/pem_all.c | 487 ++++++++ crypto/pem/pem_err.c | 116 ++ crypto/pem/pem_info.c | 365 ++++++ crypto/pem/pem_lib.c | 757 ++++++++++++ crypto/pem/pem_seal.c | 191 +++ crypto/pem/pem_sign.c | 109 ++ crypto/pem/pkcs7.lis | 22 + crypto/perlasm/x86ms.pl | 249 ++++ crypto/perlasm/x86unix.pl | 313 +++++ crypto/pkcs7/Makefile.ssl | 86 ++ crypto/pkcs7/README | 5 + crypto/pkcs7/doc | 24 + crypto/pkcs7/mf.p7 | 18 + crypto/pkcs7/p7.tst | 33 + crypto/pkcs7/pk7_dgst.c | 66 + crypto/pkcs7/pk7_doit.c | 327 +++++ crypto/pkcs7/pk7_enc.c | 76 ++ crypto/pkcs7/pk7_lib.c | 343 ++++++ crypto/pkcs7/pkcs7.err | 21 + crypto/pkcs7/pkcs7.h | 416 +++++++ crypto/pkcs7/pkcs7err.c | 99 ++ crypto/pkcs7/server.pem | 24 + crypto/pkcs7/sign.c | 83 ++ crypto/pkcs7/verify.c | 181 +++ crypto/rand/Makefile.ssl | 80 ++ crypto/rand/md_rand.c | 406 ++++++ crypto/rand/rand.h | 92 ++ crypto/rand/randfile.c | 166 +++ crypto/rand/randtest.c | 207 ++++ crypto/rc2/Makefile.ssl | 80 ++ crypto/rc2/rc2.h | 116 ++ crypto/rc2/rc2.org | 116 ++ crypto/rc2/rc2_cbc.c | 140 +++ crypto/rc2/rc2_ecb.c | 163 +++ crypto/rc2/rc2_locl.h | 146 +++ crypto/rc2/rc2_skey.c | 142 +++ crypto/rc2/rc2cfb64.c | 127 ++ crypto/rc2/rc2ofb64.c | 115 ++ crypto/rc2/rc2test.c | 270 ++++ crypto/rc2/rrc2.doc | 219 ++++ crypto/rc2/version | 22 + crypto/rc4/Makefile.ssl | 80 ++ crypto/rc4/rc4.c | 194 +++ crypto/rc4/rc4.h | 103 ++ crypto/rc4/rc4.org | 103 ++ crypto/rc4/rc4_enc.c | 195 +++ crypto/rc4/rc4_enc.org | 195 +++ crypto/rc4/rc4test.c | 124 ++ crypto/rc4/rrc4.doc | 278 +++++ crypto/rsa/Makefile.ssl | 84 ++ crypto/rsa/rsa.err | 33 + crypto/rsa/rsa.h | 243 ++++ crypto/rsa/rsa_enc.c | 538 ++++++++ crypto/rsa/rsa_err.c | 111 ++ crypto/rsa/rsa_gen.c | 186 +++ crypto/rsa/rsa_lib.c | 200 +++ crypto/rsa/rsa_saos.c | 153 +++ crypto/rsa/rsa_sign.c | 196 +++ crypto/sha/Makefile.ssl | 80 ++ crypto/sha/sha.c | 135 ++ crypto/sha/sha.h | 105 ++ crypto/sha/sha1_one.c | 77 ++ crypto/sha/sha1dgst.c | 373 ++++++ crypto/sha/sha1test.c | 155 +++ crypto/sha/sha_dgst.c | 374 ++++++ crypto/sha/sha_locl.h | 198 +++ crypto/sha/sha_one.c | 77 ++ crypto/sha/shatest.c | 155 +++ crypto/stack/Makefile.ssl | 80 ++ crypto/stack/stack.c | 299 +++++ crypto/stack/stack.h | 120 ++ crypto/txt_db/Makefile.ssl | 80 ++ crypto/txt_db/txt_db.c | 394 ++++++ crypto/txt_db/txt_db.h | 117 ++ crypto/x509/Makefile.ssl | 96 ++ crypto/x509/attrib | 38 + crypto/x509/by_dir.c | 320 +++++ crypto/x509/by_file.c | 205 ++++ crypto/x509/f | 465 +++++++ crypto/x509/v3_net.c | 87 ++ crypto/x509/v3_x509.c | 88 ++ crypto/x509/x509.doc | 27 + crypto/x509/x509.err | 43 + crypto/x509/x509.h | 1113 +++++++++++++++++ crypto/x509/x509_cmp.c | 247 ++++ crypto/x509/x509_d2.c | 106 ++ crypto/x509/x509_def.c | 83 ++ crypto/x509/x509_err.c | 121 ++ crypto/x509/x509_ext.c | 222 ++++ crypto/x509/x509_lu.c | 439 +++++++ crypto/x509/x509_obj.c | 180 +++ crypto/x509/x509_r2x.c | 122 ++ crypto/x509/x509_req.c | 111 ++ crypto/x509/x509_set.c | 164 +++ crypto/x509/x509_txt.c | 130 ++ crypto/x509/x509_v3.c | 409 +++++++ crypto/x509/x509_vfy.c | 585 +++++++++ crypto/x509/x509_vfy.h | 341 ++++++ crypto/x509/x509name.c | 357 ++++++ crypto/x509/x509pack.c | 157 +++ crypto/x509/x509rset.c | 89 ++ crypto/x509/x509type.c | 115 ++ crypto/x509/x_all.c | 465 +++++++ 532 files changed, 105473 insertions(+) create mode 100644 crypto/Makefile.ssl create mode 100644 crypto/asn1/Makefile.ssl create mode 100644 crypto/asn1/a_bitstr.c create mode 100644 crypto/asn1/a_bool.c create mode 100644 crypto/asn1/a_bytes.c create mode 100644 crypto/asn1/a_d2i_fp.c create mode 100644 crypto/asn1/a_digest.c create mode 100644 crypto/asn1/a_dup.c create mode 100644 crypto/asn1/a_hdr.c create mode 100644 crypto/asn1/a_i2d_fp.c create mode 100644 crypto/asn1/a_int.c create mode 100644 crypto/asn1/a_meth.c create mode 100644 crypto/asn1/a_object.c create mode 100644 crypto/asn1/a_octet.c create mode 100644 crypto/asn1/a_print.c create mode 100644 crypto/asn1/a_set.c create mode 100644 crypto/asn1/a_sign.c create mode 100644 crypto/asn1/a_type.c create mode 100644 crypto/asn1/a_utctm.c create mode 100644 crypto/asn1/a_verify.c create mode 100644 crypto/asn1/asn1.err create mode 100644 crypto/asn1/asn1.h create mode 100644 crypto/asn1/asn1_err.c create mode 100644 crypto/asn1/asn1_lib.c create mode 100644 crypto/asn1/asn1_mac.h create mode 100644 crypto/asn1/asn1_par.c create mode 100644 crypto/asn1/d2i_dhp.c create mode 100644 crypto/asn1/d2i_dsap.c create mode 100644 crypto/asn1/d2i_pr.c create mode 100644 crypto/asn1/d2i_pu.c create mode 100644 crypto/asn1/d2i_r_pr.c create mode 100644 crypto/asn1/d2i_r_pu.c create mode 100644 crypto/asn1/d2i_s_pr.c create mode 100644 crypto/asn1/d2i_s_pu.c create mode 100644 crypto/asn1/f_int.c create mode 100644 crypto/asn1/f_string.c create mode 100644 crypto/asn1/i2d_dhp.c create mode 100644 crypto/asn1/i2d_dsap.c create mode 100644 crypto/asn1/i2d_pr.c create mode 100644 crypto/asn1/i2d_pu.c create mode 100644 crypto/asn1/i2d_r_pr.c create mode 100644 crypto/asn1/i2d_r_pu.c create mode 100644 crypto/asn1/i2d_s_pr.c create mode 100644 crypto/asn1/i2d_s_pu.c create mode 100644 crypto/asn1/n_pkey.c create mode 100644 crypto/asn1/p7_dgst.c create mode 100644 crypto/asn1/p7_enc.c create mode 100644 crypto/asn1/p7_enc_c.c create mode 100644 crypto/asn1/p7_evp.c create mode 100644 crypto/asn1/p7_i_s.c create mode 100644 crypto/asn1/p7_lib.c create mode 100644 crypto/asn1/p7_recip.c create mode 100644 crypto/asn1/p7_s_e.c create mode 100644 crypto/asn1/p7_signd.c create mode 100644 crypto/asn1/p7_signi.c create mode 100644 crypto/asn1/pk.c create mode 100644 crypto/asn1/pkcs8.c create mode 100644 crypto/asn1/t_pkey.c create mode 100644 crypto/asn1/t_req.c create mode 100644 crypto/asn1/t_x509.c create mode 100644 crypto/asn1/test.c create mode 100644 crypto/asn1/x_algor.c create mode 100644 crypto/asn1/x_attrib.c create mode 100644 crypto/asn1/x_cinf.c create mode 100644 crypto/asn1/x_crl.c create mode 100644 crypto/asn1/x_exten.c create mode 100644 crypto/asn1/x_info.c create mode 100644 crypto/asn1/x_name.c create mode 100644 crypto/asn1/x_pkey.c create mode 100644 crypto/asn1/x_pubkey.c create mode 100644 crypto/asn1/x_req.c create mode 100644 crypto/asn1/x_sig.c create mode 100644 crypto/asn1/x_spki.c create mode 100644 crypto/asn1/x_val.c create mode 100644 crypto/asn1/x_x509.c create mode 100644 crypto/bf/COPYRIGHT create mode 100644 crypto/bf/INSTALL create mode 100644 crypto/bf/Makefile.ssl create mode 100644 crypto/bf/Makefile.uni create mode 100644 crypto/bf/README create mode 100644 crypto/bf/VERSION create mode 100644 crypto/bf/asm/b-win32.asm create mode 100644 crypto/bf/asm/bf586.pl create mode 100644 crypto/bf/asm/bx86-cpp.s create mode 100644 crypto/bf/asm/bx86unix.cpp create mode 100644 crypto/bf/asm/readme create mode 100644 crypto/bf/asm/win32.asm create mode 100644 crypto/bf/bf_cbc.c create mode 100644 crypto/bf/bf_cfb64.c create mode 100644 crypto/bf/bf_ecb.c create mode 100644 crypto/bf/bf_enc.c create mode 100644 crypto/bf/bf_locl create mode 100644 crypto/bf/bf_locl.h create mode 100644 crypto/bf/bf_locl.org create mode 100644 crypto/bf/bf_ofb64.c create mode 100644 crypto/bf/bf_pi.h create mode 100644 crypto/bf/bf_skey.c create mode 100644 crypto/bf/bfspeed.c create mode 100644 crypto/bf/bftest.c create mode 100644 crypto/bf/blowfish.h create mode 100644 crypto/bio/Makefile.ssl create mode 100644 crypto/bio/b_dump.c create mode 100644 crypto/bio/b_print.c create mode 100644 crypto/bio/b_sock.c create mode 100644 crypto/bio/bf_buff.c create mode 100644 crypto/bio/bf_nbio.c create mode 100644 crypto/bio/bf_null.c create mode 100644 crypto/bio/bio.err create mode 100644 crypto/bio/bio.h create mode 100644 crypto/bio/bio_cb.c create mode 100644 crypto/bio/bio_err.c create mode 100644 crypto/bio/bio_lib.c create mode 100644 crypto/bio/bss_acpt.c create mode 100644 crypto/bio/bss_conn.c create mode 100644 crypto/bio/bss_fd.c create mode 100644 crypto/bio/bss_file.c create mode 100644 crypto/bio/bss_mem.c create mode 100644 crypto/bio/bss_null.c create mode 100644 crypto/bio/bss_rtcp.c create mode 100644 crypto/bio/bss_sock.c create mode 100644 crypto/bn/Makefile.ssl create mode 100644 crypto/bn/asm/README create mode 100644 crypto/bn/asm/alpha.s create mode 100644 crypto/bn/asm/pa-risc.s create mode 100644 crypto/bn/asm/pa-risc2.s create mode 100644 crypto/bn/asm/r3000.s create mode 100644 crypto/bn/asm/sparc.s create mode 100644 crypto/bn/asm/x86-bsdi.s create mode 100644 crypto/bn/asm/x86-lnx.s create mode 100644 crypto/bn/asm/x86-lnxa.s create mode 100644 crypto/bn/asm/x86-sol.s create mode 100644 crypto/bn/asm/x86nt32.asm create mode 100644 crypto/bn/asm/x86nt32.uu create mode 100644 crypto/bn/asm/x86w16.asm create mode 100644 crypto/bn/asm/x86w16.uu create mode 100644 crypto/bn/asm/x86w32.asm create mode 100644 crypto/bn/asm/x86w32.uu create mode 100644 crypto/bn/bn.err create mode 100644 crypto/bn/bn.h create mode 100644 crypto/bn/bn.org create mode 100644 crypto/bn/bn_add.c create mode 100644 crypto/bn/bn_bld.c create mode 100644 crypto/bn/bn_div.c create mode 100644 crypto/bn/bn_err.c create mode 100644 crypto/bn/bn_exp.c create mode 100644 crypto/bn/bn_gcd.c create mode 100644 crypto/bn/bn_lcl.h create mode 100644 crypto/bn/bn_lib.c create mode 100644 crypto/bn/bn_mod.c create mode 100644 crypto/bn/bn_mont.c create mode 100644 crypto/bn/bn_mul.c create mode 100644 crypto/bn/bn_mulw.c create mode 100644 crypto/bn/bn_prime.c create mode 100644 crypto/bn/bn_prime.h create mode 100644 crypto/bn/bn_prime.pl create mode 100644 crypto/bn/bn_print.c create mode 100644 crypto/bn/bn_rand.c create mode 100644 crypto/bn/bn_recp.c create mode 100644 crypto/bn/bn_shift.c create mode 100644 crypto/bn/bn_sqr.c create mode 100644 crypto/bn/bn_sub.c create mode 100644 crypto/bn/bn_word.c create mode 100644 crypto/bn/bnspeed.c create mode 100644 crypto/bn/bntest.c create mode 100644 crypto/bn/exptest.c create mode 100644 crypto/bn/stuff/bn_knuth.c create mode 100644 crypto/bn/stuff/div.c create mode 100644 crypto/bn/stuff/mont.doc create mode 100644 crypto/bn/stuff/wei_mulw.c create mode 100644 crypto/buffer/Makefile.ssl create mode 100644 crypto/buffer/buf_err.c create mode 100644 crypto/buffer/buffer.c create mode 100644 crypto/buffer/buffer.err create mode 100644 crypto/buffer/buffer.h create mode 100644 crypto/conf/Makefile.ssl create mode 100644 crypto/conf/cnf_save.c create mode 100644 crypto/conf/conf.c create mode 100644 crypto/conf/conf.err create mode 100644 crypto/conf/conf.h create mode 100644 crypto/conf/conf_err.c create mode 100644 crypto/conf/conf_lcl.h create mode 100644 crypto/conf/keysets.pl create mode 100644 crypto/conf/ssleay.cnf create mode 100644 crypto/conf/test.c create mode 100644 crypto/cryptall.h create mode 100644 crypto/cryptlib.c create mode 100644 crypto/cryptlib.h create mode 100644 crypto/crypto.c create mode 100644 crypto/crypto.h create mode 100644 crypto/cversion.c create mode 100644 crypto/date.h create mode 100644 crypto/des/COPYRIGHT create mode 100644 crypto/des/DES.pm create mode 100644 crypto/des/DES.pod create mode 100644 crypto/des/DES.xs create mode 100644 crypto/des/FILES create mode 100644 crypto/des/INSTALL create mode 100644 crypto/des/Imakefile create mode 100644 crypto/des/KERBEROS create mode 100644 crypto/des/MODES.DES create mode 100644 crypto/des/Makefile.PL create mode 100644 crypto/des/Makefile.lit create mode 100644 crypto/des/Makefile.ssl create mode 100644 crypto/des/Makefile.uni create mode 100644 crypto/des/PC1 create mode 100644 crypto/des/PC2 create mode 100644 crypto/des/README create mode 100644 crypto/des/VERSION create mode 100644 crypto/des/asm/c-win32.asm create mode 100644 crypto/des/asm/c-win32.uu create mode 100644 crypto/des/asm/crypt.pl create mode 100644 crypto/des/asm/cx86-cpp.s create mode 100644 crypto/des/asm/cx86unix.cpp create mode 100644 crypto/des/asm/d-win32.asm create mode 100644 crypto/des/asm/d-win32.uu create mode 100644 crypto/des/asm/des-som2.pl create mode 100644 crypto/des/asm/des-som3.pl create mode 100644 crypto/des/asm/des586.pl create mode 100644 crypto/des/asm/des686.pl create mode 100644 crypto/des/asm/desboth.pl create mode 100644 crypto/des/asm/dx86-cpp.s create mode 100644 crypto/des/asm/dx86unix.cpp create mode 100644 crypto/des/asm/readme create mode 100644 crypto/des/cbc3_enc.c create mode 100644 crypto/des/cbc_cksm.c create mode 100644 crypto/des/cbc_enc.c create mode 100644 crypto/des/cfb64ede.c create mode 100644 crypto/des/cfb64enc.c create mode 100644 crypto/des/cfb_enc.c create mode 100644 crypto/des/des create mode 100644 crypto/des/des.c create mode 100644 crypto/des/des.h create mode 100644 crypto/des/des.man create mode 100644 crypto/des/des.org create mode 100644 crypto/des/des.pl create mode 100644 crypto/des/des_crypt.man create mode 100644 crypto/des/des_enc.c create mode 100644 crypto/des/des_locl.h create mode 100644 crypto/des/des_locl.org create mode 100644 crypto/des/des_opts.c create mode 100644 crypto/des/des_ver.h create mode 100644 crypto/des/destest.c create mode 100644 crypto/des/doIP create mode 100644 crypto/des/doPC1 create mode 100644 crypto/des/doPC2 create mode 100644 crypto/des/ecb3_enc.c create mode 100644 crypto/des/ecb_enc.c create mode 100644 crypto/des/ede_enc.c create mode 100644 crypto/des/enc_read.c create mode 100644 crypto/des/enc_writ.c create mode 100644 crypto/des/fcrypt.c create mode 100644 crypto/des/fcrypt_b.c create mode 100644 crypto/des/makefile.bc create mode 100644 crypto/des/ncbc_enc.c create mode 100644 crypto/des/ofb64ede.c create mode 100644 crypto/des/ofb64enc.c create mode 100644 crypto/des/ofb_enc.c create mode 100644 crypto/des/options.txt create mode 100644 crypto/des/pcbc_enc.c create mode 100644 crypto/des/podd.h create mode 100644 crypto/des/qud_cksm.c create mode 100644 crypto/des/rand_key.c create mode 100644 crypto/des/read2pwd.c create mode 100644 crypto/des/read_pwd.c create mode 100644 crypto/des/rpc_des.h create mode 100644 crypto/des/rpc_enc.c create mode 100644 crypto/des/rpw.c create mode 100644 crypto/des/set_key.c create mode 100644 crypto/des/shifts.pl create mode 100644 crypto/des/sk.h create mode 100644 crypto/des/speed.c create mode 100644 crypto/des/spr.h create mode 100644 crypto/des/str2key.c create mode 100644 crypto/des/supp.c create mode 100644 crypto/des/t/test create mode 100644 crypto/des/testdes.pl create mode 100644 crypto/des/times/486-50.sol create mode 100644 crypto/des/times/586-100.lnx create mode 100644 crypto/des/times/686-200.fre create mode 100644 crypto/des/times/aix.cc create mode 100644 crypto/des/times/alpha.cc create mode 100644 crypto/des/times/hpux.cc create mode 100644 crypto/des/times/sparc.gcc create mode 100644 crypto/des/times/usparc.cc create mode 100644 crypto/des/typemap create mode 100755 crypto/des/vms.com create mode 100644 crypto/des/xcbc_enc.c create mode 100644 crypto/dh/Makefile.ssl create mode 100644 crypto/dh/dh.err create mode 100644 crypto/dh/dh.h create mode 100644 crypto/dh/dh1024.pem create mode 100644 crypto/dh/dh192.pem create mode 100644 crypto/dh/dh2048.pem create mode 100644 crypto/dh/dh4096.pem create mode 100644 crypto/dh/dh512.pem create mode 100644 crypto/dh/dh_check.c create mode 100644 crypto/dh/dh_err.c create mode 100644 crypto/dh/dh_gen.c create mode 100644 crypto/dh/dh_key.c create mode 100644 crypto/dh/dh_lib.c create mode 100644 crypto/dh/dhtest.c create mode 100644 crypto/dh/example create mode 100644 crypto/dh/generate create mode 100644 crypto/dh/p1024.c create mode 100644 crypto/dh/p192.c create mode 100644 crypto/dh/p512.c create mode 100644 crypto/dsa/Makefile.ssl create mode 100644 crypto/dsa/README create mode 100644 crypto/dsa/dsa.err create mode 100644 crypto/dsa/dsa.h create mode 100644 crypto/dsa/dsa_err.c create mode 100644 crypto/dsa/dsa_gen.c create mode 100644 crypto/dsa/dsa_key.c create mode 100644 crypto/dsa/dsa_lib.c create mode 100644 crypto/dsa/dsa_sign.c create mode 100644 crypto/dsa/dsa_vrf.c create mode 100644 crypto/dsa/dsagen.c create mode 100644 crypto/dsa/dsatest.c create mode 100644 crypto/dsa/fips186a.txt create mode 100644 crypto/err/Makefile.ssl create mode 100644 crypto/err/err.c create mode 100644 crypto/err/err.h create mode 100644 crypto/err/err_all.c create mode 100644 crypto/err/err_code.pl create mode 100644 crypto/err/err_genc.pl create mode 100644 crypto/err/err_prn.c create mode 100644 crypto/err/error.err create mode 100644 crypto/evp/Makefile.ssl create mode 100644 crypto/evp/bio_b64.c create mode 100644 crypto/evp/bio_enc.c create mode 100644 crypto/evp/bio_md.c create mode 100644 crypto/evp/c_all.c create mode 100644 crypto/evp/digest.c create mode 100644 crypto/evp/e_cbc_3d.c create mode 100644 crypto/evp/e_cbc_bf.c create mode 100644 crypto/evp/e_cbc_d.c create mode 100644 crypto/evp/e_cbc_i.c create mode 100644 crypto/evp/e_cbc_r2.c create mode 100644 crypto/evp/e_cfb_3d.c create mode 100644 crypto/evp/e_cfb_bf.c create mode 100644 crypto/evp/e_cfb_d.c create mode 100644 crypto/evp/e_cfb_i.c create mode 100644 crypto/evp/e_cfb_r2.c create mode 100644 crypto/evp/e_dsa.c create mode 100644 crypto/evp/e_ecb_3d.c create mode 100644 crypto/evp/e_ecb_bf.c create mode 100644 crypto/evp/e_ecb_d.c create mode 100644 crypto/evp/e_ecb_i.c create mode 100644 crypto/evp/e_ecb_r2.c create mode 100644 crypto/evp/e_null.c create mode 100644 crypto/evp/e_ofb_3d.c create mode 100644 crypto/evp/e_ofb_bf.c create mode 100644 crypto/evp/e_ofb_d.c create mode 100644 crypto/evp/e_ofb_i.c create mode 100644 crypto/evp/e_ofb_r2.c create mode 100644 crypto/evp/e_rc4.c create mode 100644 crypto/evp/e_xcbc_d.c create mode 100644 crypto/evp/encode.c create mode 100644 crypto/evp/evp.err create mode 100644 crypto/evp/evp.h create mode 100644 crypto/evp/evp_enc.c create mode 100644 crypto/evp/evp_err.c create mode 100644 crypto/evp/evp_key.c create mode 100644 crypto/evp/m_dss.c create mode 100644 crypto/evp/m_dss1.c create mode 100644 crypto/evp/m_md2.c create mode 100644 crypto/evp/m_md5.c create mode 100644 crypto/evp/m_mdc2.c create mode 100644 crypto/evp/m_null.c create mode 100644 crypto/evp/m_sha.c create mode 100644 crypto/evp/m_sha1.c create mode 100644 crypto/evp/names.c create mode 100644 crypto/evp/p_lib.c create mode 100644 crypto/evp/p_open.c create mode 100644 crypto/evp/p_seal.c create mode 100644 crypto/evp/p_sign.c create mode 100644 crypto/evp/p_verify.c create mode 100644 crypto/idea/Makefile.ssl create mode 100644 crypto/idea/i_cbc.c create mode 100644 crypto/idea/i_cfb64.c create mode 100644 crypto/idea/i_ecb.c create mode 100644 crypto/idea/i_ofb64.c create mode 100644 crypto/idea/i_skey.c create mode 100644 crypto/idea/idea.h create mode 100644 crypto/idea/idea.org create mode 100644 crypto/idea/idea_lcl.h create mode 100644 crypto/idea/ideatest.c create mode 100644 crypto/idea/version create mode 100644 crypto/lhash/Makefile.ssl create mode 100644 crypto/lhash/lh_stats.c create mode 100644 crypto/lhash/lh_test.c create mode 100644 crypto/lhash/lhash.c create mode 100644 crypto/lhash/lhash.h create mode 100644 crypto/lhash/num.pl create mode 100755 crypto/libvms.com create mode 100644 crypto/md/Makefile.ssl create mode 100644 crypto/md/md2.c create mode 100644 crypto/md/md2.h create mode 100644 crypto/md/md2.org create mode 100644 crypto/md/md2_dgst.c create mode 100644 crypto/md/md2_one.c create mode 100644 crypto/md/md2test.c create mode 100644 crypto/md/md5.c create mode 100644 crypto/md/md5.h create mode 100644 crypto/md/md5_dgst.c create mode 100644 crypto/md/md5_locl.h create mode 100644 crypto/md/md5_one.c create mode 100644 crypto/md/md5test.c create mode 100644 crypto/mdc2/Makefile.ssl create mode 100644 crypto/mdc2/mdc2.h create mode 100644 crypto/mdc2/mdc2_one.c create mode 100644 crypto/mdc2/mdc2dgst.c create mode 100644 crypto/mdc2/mdc2test.c create mode 100644 crypto/mem.c create mode 100644 crypto/objects/Makefile.ssl create mode 100644 crypto/objects/obj_dat.c create mode 100644 crypto/objects/obj_dat.h create mode 100644 crypto/objects/obj_dat.pl create mode 100644 crypto/objects/obj_err.c create mode 100644 crypto/objects/obj_lib.c create mode 100644 crypto/objects/objects.err create mode 100644 crypto/objects/objects.h create mode 100644 crypto/objects/objects.txt create mode 100644 crypto/pem/Makefile.ssl create mode 100644 crypto/pem/ctx_size.c create mode 100644 crypto/pem/message create mode 100644 crypto/pem/pem.err create mode 100644 crypto/pem/pem.h create mode 100644 crypto/pem/pem.org create mode 100644 crypto/pem/pem_all.c create mode 100644 crypto/pem/pem_err.c create mode 100644 crypto/pem/pem_info.c create mode 100644 crypto/pem/pem_lib.c create mode 100644 crypto/pem/pem_seal.c create mode 100644 crypto/pem/pem_sign.c create mode 100644 crypto/pem/pkcs7.lis create mode 100644 crypto/perlasm/x86ms.pl create mode 100644 crypto/perlasm/x86unix.pl create mode 100644 crypto/pkcs7/Makefile.ssl create mode 100644 crypto/pkcs7/README create mode 100644 crypto/pkcs7/doc create mode 100644 crypto/pkcs7/mf.p7 create mode 100644 crypto/pkcs7/p7.tst create mode 100644 crypto/pkcs7/pk7_dgst.c create mode 100644 crypto/pkcs7/pk7_doit.c create mode 100644 crypto/pkcs7/pk7_enc.c create mode 100644 crypto/pkcs7/pk7_lib.c create mode 100644 crypto/pkcs7/pkcs7.err create mode 100644 crypto/pkcs7/pkcs7.h create mode 100644 crypto/pkcs7/pkcs7err.c create mode 100644 crypto/pkcs7/server.pem create mode 100644 crypto/pkcs7/sign.c create mode 100644 crypto/pkcs7/verify.c create mode 100644 crypto/rand/Makefile.ssl create mode 100644 crypto/rand/md_rand.c create mode 100644 crypto/rand/rand.h create mode 100644 crypto/rand/randfile.c create mode 100644 crypto/rand/randtest.c create mode 100644 crypto/rc2/Makefile.ssl create mode 100644 crypto/rc2/rc2.h create mode 100644 crypto/rc2/rc2.org create mode 100644 crypto/rc2/rc2_cbc.c create mode 100644 crypto/rc2/rc2_ecb.c create mode 100644 crypto/rc2/rc2_locl.h create mode 100644 crypto/rc2/rc2_skey.c create mode 100644 crypto/rc2/rc2cfb64.c create mode 100644 crypto/rc2/rc2ofb64.c create mode 100644 crypto/rc2/rc2test.c create mode 100644 crypto/rc2/rrc2.doc create mode 100644 crypto/rc2/version create mode 100644 crypto/rc4/Makefile.ssl create mode 100644 crypto/rc4/rc4.c create mode 100644 crypto/rc4/rc4.h create mode 100644 crypto/rc4/rc4.org create mode 100644 crypto/rc4/rc4_enc.c create mode 100644 crypto/rc4/rc4_enc.org create mode 100644 crypto/rc4/rc4test.c create mode 100644 crypto/rc4/rrc4.doc create mode 100644 crypto/rsa/Makefile.ssl create mode 100644 crypto/rsa/rsa.err create mode 100644 crypto/rsa/rsa.h create mode 100644 crypto/rsa/rsa_enc.c create mode 100644 crypto/rsa/rsa_err.c create mode 100644 crypto/rsa/rsa_gen.c create mode 100644 crypto/rsa/rsa_lib.c create mode 100644 crypto/rsa/rsa_saos.c create mode 100644 crypto/rsa/rsa_sign.c create mode 100644 crypto/sha/Makefile.ssl create mode 100644 crypto/sha/sha.c create mode 100644 crypto/sha/sha.h create mode 100644 crypto/sha/sha1_one.c create mode 100644 crypto/sha/sha1dgst.c create mode 100644 crypto/sha/sha1test.c create mode 100644 crypto/sha/sha_dgst.c create mode 100644 crypto/sha/sha_locl.h create mode 100644 crypto/sha/sha_one.c create mode 100644 crypto/sha/shatest.c create mode 100644 crypto/stack/Makefile.ssl create mode 100644 crypto/stack/stack.c create mode 100644 crypto/stack/stack.h create mode 100644 crypto/txt_db/Makefile.ssl create mode 100644 crypto/txt_db/txt_db.c create mode 100644 crypto/txt_db/txt_db.h create mode 100644 crypto/x509/Makefile.ssl create mode 100644 crypto/x509/attrib create mode 100644 crypto/x509/by_dir.c create mode 100644 crypto/x509/by_file.c create mode 100644 crypto/x509/f create mode 100644 crypto/x509/v3_net.c create mode 100644 crypto/x509/v3_x509.c create mode 100644 crypto/x509/x509.doc create mode 100644 crypto/x509/x509.err create mode 100644 crypto/x509/x509.h create mode 100644 crypto/x509/x509_cmp.c create mode 100644 crypto/x509/x509_d2.c create mode 100644 crypto/x509/x509_def.c create mode 100644 crypto/x509/x509_err.c create mode 100644 crypto/x509/x509_ext.c create mode 100644 crypto/x509/x509_lu.c create mode 100644 crypto/x509/x509_obj.c create mode 100644 crypto/x509/x509_r2x.c create mode 100644 crypto/x509/x509_req.c create mode 100644 crypto/x509/x509_set.c create mode 100644 crypto/x509/x509_txt.c create mode 100644 crypto/x509/x509_v3.c create mode 100644 crypto/x509/x509_vfy.c create mode 100644 crypto/x509/x509_vfy.h create mode 100644 crypto/x509/x509name.c create mode 100644 crypto/x509/x509pack.c create mode 100644 crypto/x509/x509rset.c create mode 100644 crypto/x509/x509type.c create mode 100644 crypto/x509/x_all.c (limited to 'crypto') diff --git a/crypto/Makefile.ssl b/crypto/Makefile.ssl new file mode 100644 index 0000000000..9cb45e4b51 --- /dev/null +++ b/crypto/Makefile.ssl @@ -0,0 +1,156 @@ +# +# SSLeay/crypto/Makefile +# + +DIR= crypto +TOP= .. +CC= cc +INCLUDE= -I. -I../include +INCLUDES= -I.. -I../../include +CFLAG= -g +INSTALLTOP= /usr/local/ssl +MAKE= make -f Makefile.ssl +MAKEDEPEND= makedepend -f Makefile.ssl +MAKEFILE= Makefile.ssl +RM= /bin/rm -f +AR= ar r + +MAKE= make -f Makefile.ssl +MAKEDEPEND= makedepend -f Makefile.ssl +MAKEFILE= Makefile.ssl + +PEX_LIBS= +EX_LIBS= + +CFLAGS= $(INCLUDE) $(CFLAG) -DCFLAGS=" \"$(CC) $(CFLAG)\" " + +LIBS= + +SDIRS= md sha mdc2 \ + des rc4 rc2 idea bf \ + bn rsa dsa dh \ + buffer bio stack lhash rand err objects \ + evp pem x509 \ + asn1 conf txt_db pkcs7 + +GENERAL=Makefile README + +LIB= $(TOP)/libcrypto.a +LIBSRC= cryptlib.c mem.c cversion.c +LIBOBJ= cryptlib.o mem.o cversion.o + +SRC= $(LIBSRC) + +EXHEADER= crypto.h cryptall.h +HEADER= cryptlib.h date.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + @(cd ..; $(MAKE) DIRS=$(DIR) all) + +all: date.h lib subdirs + +date.h: ../Makefile.ssl ../VERSION + echo "#define DATE \"`date`\"" >date.h + +subdirs: + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making all in $$i..."; \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' AR='${AR}' all ); \ + done; + +files: + perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making 'files' in $$i..."; \ + $(MAKE) files ); \ + done; + +links: + /bin/rm -f Makefile + $(TOP)/util/point.sh Makefile.ssl Makefile ; + $(TOP)/util/mklink.sh ../include $(EXHEADER) ; + $(TOP)/util/mklink.sh ../test $(TEST) ; + $(TOP)/util/mklink.sh ../apps $(APPS) ; + $(TOP)/util/point.sh Makefile.ssl Makefile; + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making links in $$i..."; \ + $(MAKE) links ); \ + done; + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + sh $(TOP)/util/ranlib.sh $(LIB) + @touch lib + +libs: + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making libs in $$i..."; \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \ + done; + +tests: + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making tests in $$i..."; \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \ + done; + +install: + @for i in $(EXHEADER) ;\ + do \ + (cp $$i $(INSTALLTOP)/include/$$i; \ + chmod 644 $(INSTALLTOP)/include/$$i ); \ + done; + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making install in $$i..."; \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \ + done; + +lint: + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making lint in $$i..."; \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \ + done; + +depend: + $(MAKEDEPEND) $(INCLUDE) $(PROGS) $(LIBSRC) + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making depend in $$i..."; \ + $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' MAKEDEPEND='${MAKEDEPEND}' depend ); \ + done; + +clean: + /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making clean in $$i..."; \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \ + done; + +dclean: + perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making dclean in $$i..."; \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \ + done; + +errors: + perl ./err/err_code.pl */*.c ../ssl/*.c ../rsaref/*.c + @for i in $(SDIRS) ;\ + do \ + (cd $$i; echo "making errors in $$i..."; \ + $(MAKE) errors ); \ + done; + +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/crypto/asn1/Makefile.ssl b/crypto/asn1/Makefile.ssl new file mode 100644 index 0000000000..a39e009d27 --- /dev/null +++ b/crypto/asn1/Makefile.ssl @@ -0,0 +1,118 @@ +# +# SSLeay/crypto/asn1/Makefile +# + +DIR= asn1 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I../../include +CFLAG=-g +INSTALLTOP=/usr/local/ssl +MAKE= make -f Makefile.ssl +MAKEDEPEND= makedepend -f Makefile.ssl +MAKEFILE= Makefile.ssl +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +ERR=asn1 +ERRC=asn1_err +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= a_object.c a_bitstr.c a_utctm.c a_int.c a_octet.c a_print.c \ + a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c \ + a_sign.c a_digest.c a_verify.c \ + x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c \ + x_name.c x_cinf.c x_x509.c x_crl.c x_info.c x_spki.c \ + d2i_r_pr.c i2d_r_pr.c d2i_r_pu.c i2d_r_pu.c \ + d2i_s_pr.c i2d_s_pr.c d2i_s_pu.c i2d_s_pu.c \ + d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c\ + t_req.c t_x509.c t_pkey.c \ + p7_i_s.c p7_signi.c p7_signd.c p7_recip.c p7_enc_c.c p7_evp.c \ + p7_dgst.c p7_s_e.c p7_enc.c p7_lib.c \ + f_int.c f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c d2i_dsap.c n_pkey.c \ + a_hdr.c x_pkey.c a_bool.c x_exten.c \ + asn1_par.c asn1_lib.c $(ERRC).c a_meth.c a_bytes.c +LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_int.o a_octet.o a_print.o \ + a_type.o a_set.o a_dup.o a_d2i_fp.o a_i2d_fp.o \ + a_sign.o a_digest.o a_verify.o \ + x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o \ + x_name.o x_cinf.o x_x509.o x_crl.o x_info.o x_spki.o \ + d2i_r_pr.o i2d_r_pr.o d2i_r_pu.o i2d_r_pu.o \ + d2i_s_pr.o i2d_s_pr.o d2i_s_pu.o i2d_s_pu.o \ + d2i_pu.o d2i_pr.o i2d_pu.o i2d_pr.o \ + t_req.o t_x509.o t_pkey.o \ + p7_i_s.o p7_signi.o p7_signd.o p7_recip.o p7_enc_c.o p7_evp.o \ + p7_dgst.o p7_s_e.o p7_enc.o p7_lib.o \ + f_int.o f_string.o i2d_dhp.o i2d_dsap.o d2i_dhp.o d2i_dsap.o n_pkey.o \ + a_hdr.o x_pkey.o a_bool.o x_exten.o \ + asn1_par.o asn1_lib.o $(ERRC).o a_meth.o a_bytes.o + +SRC= $(LIBSRC) + +EXHEADER= asn1.h asn1_mac.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +test: test.c + cc -g -I../../include -c test.c + cc -g -I../../include -o test test.o -L../.. -lcrypto + +pk: pk.c + cc -g -I../../include -c pk.c + cc -g -I../../include -o pk pk.o -L../.. -lcrypto + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + sh $(TOP)/util/ranlib.sh $(LIB) + @touch lib + +files: + perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO + +links: + /bin/rm -f Makefile + $(TOP)/util/point.sh Makefile.ssl Makefile ; + $(TOP)/util/mklink.sh ../../include $(EXHEADER) + $(TOP)/util/mklink.sh ../../test $(TEST) + $(TOP)/util/mklink.sh ../../apps $(APPS) + +install: + @for i in $(EXHEADER) ; \ + do \ + (cp $$i $(INSTALLTOP)/include/$$i; \ + chmod 644 $(INSTALLTOP)/include/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) + +dclean: + perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +errors: + perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h + perl ../err/err_genc.pl $(ERR).h $(ERRC).c + +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c new file mode 100644 index 0000000000..eb99ebca2f --- /dev/null +++ b/crypto/asn1/a_bitstr.c @@ -0,0 +1,158 @@ +/* crypto/asn1/a_bitstr.c */ +/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include "cryptlib.h" +#include "asn1.h" + +/* ASN1err(ASN1_F_ASN1_STRING_NEW,ASN1_R_STRING_TOO_SHORT); + * ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,ASN1_R_EXPECTING_A_BIT_STRING); + */ + +int i2d_ASN1_BIT_STRING(a,pp) +ASN1_BIT_STRING *a; +unsigned char **pp; + { + int ret,j,r,bits; + unsigned char *p,*d; + + if (a == NULL) return(0); + + /* our bit strings are always a multiple of 8 :-) */ + bits=0; + ret=1+a->length; + r=ASN1_object_size(0,ret,V_ASN1_BIT_STRING); + if (pp == NULL) return(r); + p= *pp; + + ASN1_put_object(&p,0,ret,V_ASN1_BIT_STRING,V_ASN1_UNIVERSAL); + if (bits == 0) + j=0; + else j=8-bits; + *(p++)=(unsigned char)j; + d=a->data; + memcpy(p,d,a->length); + p+=a->length; + if (a->length > 0) p[-1]&=(0xff< 1) /* using one because of the bits left byte */ + { + s=(unsigned char *)Malloc((int)len); + if (s == NULL) + { + i=ERR_R_MALLOC_FAILURE; + goto err; + } + memcpy(s,p,(int)len); + s[len-1]&=(0xff<length=(int)len; + if (ret->data != NULL) Free((char *)ret->data); + ret->data=s; + ret->type=V_ASN1_BIT_STRING; + if (a != NULL) (*a)=ret; + *pp=p; + return(ret); +err: + ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,i); + if ((ret != NULL) && ((a == NULL) || (*a != ret))) + ASN1_BIT_STRING_free(ret); + return(NULL); + } + diff --git a/crypto/asn1/a_bool.c b/crypto/asn1/a_bool.c new file mode 100644 index 0000000000..83607b58ef --- /dev/null +++ b/crypto/asn1/a_bool.c @@ -0,0 +1,121 @@ +/* crypto/asn1/a_bool.c */ +/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include "cryptlib.h" +#include "asn1.h" + +/* ASN1err(ASN1_F_D2I_ASN1_BOOLEAN,ASN1_R_EXPECTING_A_BOOLEAN); + * ASN1err(ASN1_F_D2I_ASN1_BOOLEAN,ASN1_R_BOOLEAN_IS_WRONG_LENGTH); + */ + +int i2d_ASN1_BOOLEAN(a,pp) +int a; +unsigned char **pp; + { + int r; + unsigned char *p; + + r=ASN1_object_size(0,1,V_ASN1_BOOLEAN); + if (pp == NULL) return(r); + p= *pp; + + ASN1_put_object(&p,0,1,V_ASN1_BOOLEAN,V_ASN1_UNIVERSAL); + *(p++)= (unsigned char)a; + *pp=p; + return(r); + } + +int d2i_ASN1_BOOLEAN(a, pp, length) +int *a; +unsigned char **pp; +long length; + { + int ret= -1; + unsigned char *p; + long len; + int inf,tag,xclass; + int i=0; + + p= *pp; + inf=ASN1_get_object(&p,&len,&tag,&xclass,length); + if (inf & 0x80) + { + i=ASN1_R_BAD_OBJECT_HEADER; + goto err; + } + + if (tag != V_ASN1_BOOLEAN) + { + i=ASN1_R_EXPECTING_A_BOOLEAN; + goto err; + } + + if (len != 1) + { + i=ASN1_R_BOOLEAN_IS_WRONG_LENGTH; + goto err; + } + ret= (int)*(p++); + if (a != NULL) (*a)=ret; + *pp=p; + return(ret); +err: + ASN1err(ASN1_F_D2I_ASN1_BOOLEAN,i); + return(ret); + } diff --git a/crypto/asn1/a_bytes.c b/crypto/asn1/a_bytes.c new file mode 100644 index 0000000000..0c9132498c --- /dev/null +++ b/crypto/asn1/a_bytes.c @@ -0,0 +1,337 @@ +/* crypto/asn1/a_bytes.c */ +/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licen