├── krb5.h ├── apps ├── ca-cert.srl ├── server.srl ├── demoCA │ ├── serial │ └── cacert.pem ├── pca-cert.srl ├── demoSRP │ ├── srp_verifier.txt.attr │ └── srp_verifier.txt ├── dsap.pem ├── dsa512.pem ├── oid.cnf ├── dh512.pem ├── testCA.pem ├── s512-req.pem ├── dsa1024.pem ├── dh1024.pem ├── s512-key.pem ├── dh2048.pem ├── cert.pem ├── req.pem ├── ca-req.pem ├── pca-req.pem ├── s1024req.pem ├── vms_term_sock.h ├── ca-key.pem ├── pca-key.pem ├── s1024key.pem ├── privkey.pem └── dh4096.pem ├── ms ├── certCA.srl ├── .rnd ├── testce2.bat ├── tpem.bat ├── bcb4.bat ├── tpemce.bat ├── do_nt.bat ├── do_nasm.bat ├── do_win64i.bat ├── do_ms.bat ├── README ├── reqCA.ss ├── reqU.ss ├── tenc.bat ├── keyU.ss ├── keyCA.ss ├── certCA.ss ├── do_win64a.bat ├── certU.ss ├── 32all.bat ├── testpem.bat ├── tencce.bat ├── mw.bat ├── uplink-x86.pl ├── uplink-common.pl ├── cmp.pl ├── testpemce.bat ├── speed32.bat └── x86asm.bat ├── test ├── VMSca-response.1 ├── VMSca-response.2 ├── smcont.txt ├── testsslproxy ├── testreq2.pem ├── smime-certs │ └── smdsap.pem ├── testrsa.pem ├── testx509.pem ├── ocsp-tests │ ├── ND1.ors │ ├── ND2.ors │ ├── ISOP_ND1.ors │ ├── ISOP_ND2.ors │ ├── ND3.ors │ ├── WIKH_ND1.ors │ ├── WIKH_ND2.ors │ ├── WINH_ND1.ors │ ├── WINH_ND2.ors │ ├── WRID_ND1.ors │ ├── WRID_ND2.ors │ ├── ISOP_ND3.ors │ ├── WIKH_ND3.ors │ ├── WINH_ND3.ors │ └── WRID_ND3.ors ├── asn1test.c ├── testsid.pem ├── serverinfo.pem ├── CAssrsa.cnf ├── CAssdsa.cnf ├── CAssdh.cnf ├── pkcs7-1.pem ├── Sssrsa.cnf ├── Sssdsa.cnf ├── clean_test.com ├── testca ├── testcrl.pem ├── v3-cert2.pem ├── v3-cert1.pem ├── tpkcs7d ├── Uss.cnf ├── testgen └── P1ss.cnf ├── crypto ├── sha │ └── asm │ │ └── README ├── bn │ ├── asm │ │ ├── x86 │ │ │ ├── f │ │ │ └── div.pl │ │ ├── x86.pl │ │ └── README │ ├── todo │ ├── bn.mul │ └── divtest.c ├── whrlpool │ └── wp_locl.h ├── dh │ ├── dh192.pem │ ├── dh512.pem │ ├── dh1024.pem │ ├── dh4096.pem │ └── dh2048.pem ├── threads │ ├── win32.bat │ ├── ptest.bat │ ├── solaris.sh │ ├── purify.sh │ ├── profile.sh │ ├── pthread2.sh │ ├── pthread.sh │ ├── pthreads-vms.com │ └── README ├── rc4 │ └── rc4_locl.h ├── fips_ers.c ├── bf │ ├── VERSION │ ├── README │ ├── asm │ │ └── readme │ └── INSTALL ├── aes │ └── README ├── dsa │ └── README ├── ppc_arch.h ├── rsa │ └── rsa_locl.h ├── lhash │ └── num.pl ├── cast │ └── asm │ │ └── readme ├── pem │ └── message ├── des │ ├── times │ │ ├── 486-50.sol │ │ ├── alpha.cc │ │ ├── sparc.gcc │ │ ├── hpux.cc │ │ ├── 686-200.fre │ │ ├── 586-100.lnx │ │ └── aix.cc │ ├── DES.pm │ ├── t │ │ └── test │ ├── typemap │ └── Imakefile ├── idea │ └── version ├── asn1 │ └── charmap.h ├── ebcdic.h ├── ripemd │ └── README ├── dso │ └── README ├── evp │ └── m_wp.c ├── rc2 │ └── version ├── bio │ └── bio_lcl.h └── arm64cpuid.S ├── VMS ├── socketshr_shr.opt ├── ucx_shr_decc_log.opt ├── ucx_shr_decc.opt ├── ucx_shr_vaxc.opt ├── tcpip_shr_decc.opt ├── multinet_shr.opt ├── WISHLIST.TXT ├── openssl_undo.com ├── TODO └── test-includes.com ├── engines ├── e_gmp.ec ├── e_aep.ec ├── e_chil.ec ├── e_capi.ec ├── e_nuron.ec ├── e_ubsec.ec ├── e_4758cca.ec ├── e_atalla.ec ├── e_cswift.ec ├── e_padlock.ec ├── e_sureware.ec ├── alpha.opt ├── axp.opt ├── ia64.opt ├── capierr.bat ├── ccgost │ ├── gost.ec │ └── gost2001_keyx.h ├── vax.opt └── engine_vector.mar ├── Configure ├── demos ├── pkcs12 │ └── README ├── cms │ ├── sign.txt │ ├── encr.txt │ ├── comp.txt │ ├── cakey.pem │ └── cacert.pem ├── smime │ ├── sign.txt │ ├── encr.txt │ ├── cakey.pem │ └── cacert.pem ├── x509 │ └── README ├── engines │ ├── rsaref │ │ ├── rsaref.ec │ │ └── README │ ├── ibmca │ │ └── hw_ibmca.ec │ ├── zencod │ │ └── hw_zencod.ec │ └── cluster_labs │ │ └── hw_cluster_labs.ec ├── asn1 │ └── README.ASN1 ├── sign │ ├── Makefile │ ├── key.pem │ └── cert.pem ├── tunala │ ├── Makefile.am │ ├── autoungunk.sh │ ├── configure.in │ ├── autogunk.sh │ └── Makefile ├── bio │ ├── README │ ├── connect.cnf │ ├── accept.cnf │ └── Makefile ├── state_machine │ └── Makefile ├── README ├── easy_tls │ ├── test.h │ └── cacerts.pem ├── b64.pl ├── prime │ └── Makefile ├── privkey.pem └── ssltest-ecc │ └── README ├── shlib ├── README ├── irix.sh ├── sun.sh ├── svr5-shared-installed ├── sco5-shared-installed ├── win32dll.bat ├── Makefile.hpux10-cc ├── win32.bat ├── solaris-sc4.sh ├── solaris.sh ├── sco5-shared.sh ├── sco5-shared-gcc.sh ├── svr5-shared.sh └── svr5-shared-gcc.sh ├── FAQ ├── GitMake ├── ACKNOWLEDGMENTS ├── util ├── deleof.pl ├── FreeBSD.sh ├── point.sh ├── extract-section.pl ├── tab_num.pl ├── dirname.pl ├── pod2mantest.pod ├── fixNT.sh ├── extract-names.pl ├── toutf8.sh ├── err-ins.pl ├── do_ms.sh ├── mkdir-p.pl ├── pl │ └── ultrix.pl ├── perlpath.pl ├── deltree.com ├── mkbuildinf.pl └── opensslwrap.sh ├── tools ├── c_name ├── c_hash ├── c_issuer ├── c_info └── c89.sh ├── openssl.doxy ├── MacOS ├── buildinf.h ├── _MWERKS_prefix.h ├── _MWERKS_GUSI_prefix.h ├── TODO └── Randomizer.h ├── bugs ├── MS ├── ultrixcc.c └── dggccbug.c ├── certs ├── README.RootCerts └── expired │ └── ICE.crl ├── GitConfigure ├── doc ├── crypto │ ├── BN_swap.pod │ ├── RAND_cleanup.pod │ ├── ERR_clear_error.pod │ ├── RSA_size.pod │ ├── DSA_size.pod │ ├── d2i_ASN1_OBJECT.pod │ ├── d2i_DHparams.pod │ ├── DH_size.pod │ ├── BIO_f_null.pod │ ├── OPENSSL_Applink.pod │ ├── d2i_X509_SIG.pod │ ├── d2i_X509_ALGOR.pod │ ├── d2i_CMS_ContentInfo.pod │ ├── d2i_X509_NAME.pod │ ├── BN_copy.pod │ ├── DSA_dup_DH.pod │ ├── DSA_generate_key.pod │ ├── ERR_set_mark.pod │ ├── BIO_s_null.pod │ ├── d2i_X509_REQ.pod │ ├── DH_get_ex_new_index.pod │ ├── d2i_X509_CRL.pod │ ├── DSA_get_ex_new_index.pod │ ├── BN_mod_inverse.pod │ ├── X509_new.pod │ ├── DH_new.pod │ ├── DSA_SIG_new.pod │ ├── RSA_new.pod │ ├── DSA_new.pod │ ├── ASN1_STRING_new.pod │ ├── PEM_write_bio_CMS_stream.pod │ └── PEM_write_bio_PKCS7_stream.pod ├── dir-locals.example.el ├── ssl │ ├── SSL_get_SSL_CTX.pod │ ├── SSL_get_rbio.pod │ ├── SSL_set_bio.pod │ ├── SSL_get_version.pod │ ├── SSL_session_reused.pod │ ├── SSL_CTX_sessions.pod │ ├── SSL_CTX_ctrl.pod │ ├── SSL_get_fd.pod │ ├── SSL_new.pod │ ├── SSL_CONF_CTX_new.pod │ └── SSL_set_verify_result.pod ├── README └── apps │ ├── errstr.pod │ └── version.pod ├── .travis.yml ├── Netware └── readme.txt ├── INSTALL.OS2 └── os2 └── backwardify.pl /krb5.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/ca-cert.srl: -------------------------------------------------------------------------------- 1 | 07 2 | -------------------------------------------------------------------------------- /apps/server.srl: -------------------------------------------------------------------------------- 1 | 01 2 | -------------------------------------------------------------------------------- /ms/certCA.srl: -------------------------------------------------------------------------------- 1 | 1D 2 | -------------------------------------------------------------------------------- /apps/demoCA/serial: -------------------------------------------------------------------------------- 1 | 011E 2 | -------------------------------------------------------------------------------- /apps/pca-cert.srl: -------------------------------------------------------------------------------- 1 | 07 2 | -------------------------------------------------------------------------------- /test/VMSca-response.1: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/VMSca-response.2: -------------------------------------------------------------------------------- 1 | y 2 | y 3 | -------------------------------------------------------------------------------- /crypto/sha/asm/README: -------------------------------------------------------------------------------- 1 | C2.pl works 2 | -------------------------------------------------------------------------------- /VMS/socketshr_shr.opt: -------------------------------------------------------------------------------- 1 | socketshr/share 2 | -------------------------------------------------------------------------------- /VMS/ucx_shr_decc_log.opt: -------------------------------------------------------------------------------- 1 | ucx$ipc_shr/share 2 | -------------------------------------------------------------------------------- /test/smcont.txt: -------------------------------------------------------------------------------- 1 | Some test content for OpenSSL CMS -------------------------------------------------------------------------------- /engines/e_gmp.ec: -------------------------------------------------------------------------------- 1 | L GMP e_gmp_err.h e_gmp_err.c 2 | -------------------------------------------------------------------------------- /VMS/ucx_shr_decc.opt: -------------------------------------------------------------------------------- 1 | sys$share:ucx$ipc_shr.exe/share 2 | -------------------------------------------------------------------------------- /VMS/ucx_shr_vaxc.opt: -------------------------------------------------------------------------------- 1 | sys$library:ucx$ipc.olb/library 2 | -------------------------------------------------------------------------------- /engines/e_aep.ec: -------------------------------------------------------------------------------- 1 | L AEPHK e_aep_err.h e_aep_err.c 2 | -------------------------------------------------------------------------------- /engines/e_chil.ec: -------------------------------------------------------------------------------- 1 | L HWCRHK e_chil_err.h e_chil_err.c 2 | -------------------------------------------------------------------------------- /VMS/tcpip_shr_decc.opt: -------------------------------------------------------------------------------- 1 | sys$share:tcpip$ipc_shr.exe/share 2 | -------------------------------------------------------------------------------- /apps/demoSRP/srp_verifier.txt.attr: -------------------------------------------------------------------------------- 1 | unique_subject = yes 2 | -------------------------------------------------------------------------------- /engines/e_capi.ec: -------------------------------------------------------------------------------- 1 | L CAPI e_capi_err.h e_capi_err.c 2 | -------------------------------------------------------------------------------- /engines/e_nuron.ec: -------------------------------------------------------------------------------- 1 | L NURON e_nuron_err.h e_nuron_err.c 2 | -------------------------------------------------------------------------------- /engines/e_ubsec.ec: -------------------------------------------------------------------------------- 1 | L UBSEC e_ubsec_err.h e_ubsec_err.c 2 | -------------------------------------------------------------------------------- /VMS/multinet_shr.opt: -------------------------------------------------------------------------------- 1 | multinet:multinet_socket_library.exe/share 2 | -------------------------------------------------------------------------------- /engines/e_4758cca.ec: -------------------------------------------------------------------------------- 1 | L CCA4758 e_4758cca_err.h e_4758cca_err.c 2 | -------------------------------------------------------------------------------- /engines/e_atalla.ec: -------------------------------------------------------------------------------- 1 | L ATALLA e_atalla_err.h e_atalla_err.c 2 | -------------------------------------------------------------------------------- /engines/e_cswift.ec: -------------------------------------------------------------------------------- 1 | L CSWIFT e_cswift_err.h e_cswift_err.c 2 | -------------------------------------------------------------------------------- /engines/e_padlock.ec: -------------------------------------------------------------------------------- 1 | L PADLOCK e_padlock_err.h e_padlock_err.c 2 | -------------------------------------------------------------------------------- /crypto/bn/asm/x86/f: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | # x86 assember 3 | 4 | -------------------------------------------------------------------------------- /engines/e_sureware.ec: -------------------------------------------------------------------------------- 1 | L SUREWARE e_sureware_err.h e_sureware_err.c 2 | -------------------------------------------------------------------------------- /ms/.rnd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterMosmans/openssl/HEAD/ms/.rnd -------------------------------------------------------------------------------- /Configure: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterMosmans/openssl/HEAD/Configure -------------------------------------------------------------------------------- /engines/alpha.opt: -------------------------------------------------------------------------------- 1 | SYMBOL_VECTOR=(bind_engine=PROCEDURE,v_check=PROCEDURE) 2 | -------------------------------------------------------------------------------- /engines/axp.opt: -------------------------------------------------------------------------------- 1 | SYMBOL_VECTOR=(bind_engine=PROCEDURE,v_check=PROCEDURE) 2 | -------------------------------------------------------------------------------- /engines/ia64.opt: -------------------------------------------------------------------------------- 1 | SYMBOL_VECTOR=(bind_engine=PROCEDURE,v_check=PROCEDURE) 2 | -------------------------------------------------------------------------------- /demos/pkcs12/README: -------------------------------------------------------------------------------- 1 | PKCS#12 demo applications 2 | 3 | Written by Steve Henson. 4 | -------------------------------------------------------------------------------- /demos/cms/sign.txt: -------------------------------------------------------------------------------- 1 | Content-type: text/plain 2 | 3 | Test OpenSSL CMS Signed Content 4 | -------------------------------------------------------------------------------- /demos/smime/sign.txt: -------------------------------------------------------------------------------- 1 | Content-type: text/plain 2 | 3 | Test OpenSSL Signed Content 4 | -------------------------------------------------------------------------------- /shlib/README: -------------------------------------------------------------------------------- 1 | Only the windows NT and, linux builds have been tested for SSLeay 0.8.0 2 | -------------------------------------------------------------------------------- /ms/testce2.bat: -------------------------------------------------------------------------------- 1 | cecopy %1.exe CE:\OpenSSL 2 | cerun CE:\OpenSSL\%1 %2 %3 %4 %5 %6 %7 %8 %9 3 | -------------------------------------------------------------------------------- /FAQ: -------------------------------------------------------------------------------- 1 | The FAQ is now maintained on the web: 2 | https://www.openssl.org/docs/faq.html 3 | -------------------------------------------------------------------------------- /demos/cms/encr.txt: -------------------------------------------------------------------------------- 1 | Content-type: text/plain 2 | 3 | Sample OpenSSL Data for CMS encryption 4 | -------------------------------------------------------------------------------- /demos/smime/encr.txt: -------------------------------------------------------------------------------- 1 | Content-type: text/plain 2 | 3 | Sample OpenSSL Data for PKCS#7 encryption 4 | -------------------------------------------------------------------------------- /engines/capierr.bat: -------------------------------------------------------------------------------- 1 | perl ../util/mkerr.pl -conf e_capi.ec -nostatic -staticloader -write e_capi.c 2 | -------------------------------------------------------------------------------- /GitMake: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BRANCH=`git rev-parse --abbrev-ref HEAD` 4 | 5 | make -f makefile.$BRANCH $@ 6 | -------------------------------------------------------------------------------- /ACKNOWLEDGMENTS: -------------------------------------------------------------------------------- 1 | Please https://www.openssl.org/community/thanks.html for the current 2 | acknowledgements. 3 | -------------------------------------------------------------------------------- /ms/tpem.bat: -------------------------------------------------------------------------------- 1 | rem called by testpem 2 | 3 | echo test %1 %2 4 | %ssleay% %1 -in %2 -out %tmp1% 5 | %cmp% %2 %tmp1% 6 | 7 | -------------------------------------------------------------------------------- /crypto/bn/todo: -------------------------------------------------------------------------------- 1 | Cache RECP_CTX values 2 | make the result argument independant of the inputs. 3 | split up the _exp_ functions 4 | -------------------------------------------------------------------------------- /crypto/whrlpool/wp_locl.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void whirlpool_block(WHIRLPOOL_CTX *, const void *, size_t); 4 | -------------------------------------------------------------------------------- /util/deleof.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | while (<>) 4 | { 5 | print 6 | last if (/^# DO NOT DELETE THIS LINE/); 7 | } 8 | -------------------------------------------------------------------------------- /crypto/dh/dh192.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MB4CGQDUoLoCULb9LsYm5+/WN992xxbiLQlEuIsCAQM= 3 | -----END DH PARAMETERS----- 4 | -------------------------------------------------------------------------------- /crypto/threads/win32.bat: -------------------------------------------------------------------------------- 1 | del mttest.exe 2 | 3 | cl /O2 -DWIN32 /MD -I..\..\out mttest.c /Femttest ..\..\out\ssleay32.lib ..\..\out\libeay32.lib 4 | 5 | -------------------------------------------------------------------------------- /demos/x509/README: -------------------------------------------------------------------------------- 1 | This directory contains examples of how to contruct 2 | various X509 structures. Certificates, certificate requests 3 | and CRLs. 4 | -------------------------------------------------------------------------------- /ms/bcb4.bat: -------------------------------------------------------------------------------- 1 | perl Configure BC-32 2 | perl util\mkfiles.pl > MINFO 3 | 4 | @rem create make file 5 | perl util\mk1mf.pl no-asm BC-NT > bcb.mak 6 | 7 | -------------------------------------------------------------------------------- /crypto/rc4/rc4_locl.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_RC4_LOCL_H 2 | # define HEADER_RC4_LOCL_H 3 | # include 4 | # include 5 | #endif 6 | -------------------------------------------------------------------------------- /crypto/threads/ptest.bat: -------------------------------------------------------------------------------- 1 | del mttest.exe 2 | 3 | purify cl /O2 -DWIN32 /MD -I..\..\out mttest.c /Femttest ..\..\out\ssl32.lib ..\..\out\crypt32.lib 4 | 5 | -------------------------------------------------------------------------------- /crypto/fips_ers.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef OPENSSL_FIPS 4 | # include "fips_err.h" 5 | #else 6 | static void *dummy = &dummy; 7 | #endif 8 | -------------------------------------------------------------------------------- /crypto/threads/solaris.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /bin/rm -f mttest 3 | cc -DSOLARIS -I../../include -g mttest.c -o mttest -L../.. -lthread -lssl -lcrypto -lnsl -lsocket 4 | 5 | -------------------------------------------------------------------------------- /tools/c_name: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # print the subject 4 | # 5 | 6 | for i in $* 7 | do 8 | n=`openssl x509 -subject -noout -in $i` 9 | echo "$i $n" 10 | done 11 | -------------------------------------------------------------------------------- /crypto/threads/purify.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /bin/rm -f mttest 3 | purify cc -DSOLARIS -I../../include -g mttest.c -o mttest -L../.. -lthread -lssl -lcrypto -lnsl -lsocket 4 | 5 | -------------------------------------------------------------------------------- /openssl.doxy: -------------------------------------------------------------------------------- 1 | PROJECT_NAME=OpenSSL 2 | GENERATE_LATEX=no 3 | OUTPUT_DIRECTORY=doxygen 4 | INPUT=ssl include 5 | FILE_PATTERNS=*.c *.h 6 | RECURSIVE=yes 7 | PREDEFINED=DOXYGEN 8 | -------------------------------------------------------------------------------- /tools/c_hash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # print out the hash values 3 | # 4 | 5 | for i in $* 6 | do 7 | h=`openssl x509 -hash -noout -in $i` 8 | echo "$h.0 => $i" 9 | done 10 | -------------------------------------------------------------------------------- /tools/c_issuer: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # print out the issuer 4 | # 5 | 6 | for i in $* 7 | do 8 | n=`openssl x509 -issuer -noout -in $i` 9 | echo "$i $n" 10 | done 11 | -------------------------------------------------------------------------------- /util/FreeBSD.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | perl util/perlpath.pl /usr/bin 4 | perl util/ssldir.pl /usr/local 5 | perl util/mk1mf.pl FreeBSD >Makefile.FreeBSD 6 | perl Configure FreeBSD 7 | -------------------------------------------------------------------------------- /MacOS/buildinf.h: -------------------------------------------------------------------------------- 1 | #ifndef MK1MF_BUILD 2 | # define CFLAGS "-DB_ENDIAN" 3 | # define PLATFORM "macos" 4 | # define DATE "Sun Feb 27 19:44:16 MET 2000" 5 | #endif 6 | -------------------------------------------------------------------------------- /crypto/dh/dh512.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MEYCQQDaWDwW2YUiidDkr3VvTMqS3UvlM7gE+w/tlO+cikQD7VdGUNNpmdsp13Yn 3 | a6LT1BLiGPTdHghM9tgAPnxHdOgzAgEC 4 | -----END DH PARAMETERS----- 5 | -------------------------------------------------------------------------------- /crypto/threads/profile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /bin/rm -f mttest 3 | cc -p -DSOLARIS -I../../include -g mttest.c -o mttest -L/usr/lib/libc -ldl -L../.. -lthread -lssl -lcrypto -lnsl -lsocket 4 | 5 | -------------------------------------------------------------------------------- /engines/ccgost/gost.ec: -------------------------------------------------------------------------------- 1 | L GOST e_gost_err.h e_gost_err.c 2 | L NONE asymm.h NONE 3 | L NONE md.h NONE 4 | L NONE crypt.h NONE 5 | L NONE gostkeyx.h NONE 6 | -------------------------------------------------------------------------------- /bugs/MS: -------------------------------------------------------------------------------- 1 | If you use the function that does an fopen inside the DLL, it's malloc 2 | will be used and when the function is then written inside, more 3 | hassles 4 | .... 5 | 6 | 7 | think about it. 8 | -------------------------------------------------------------------------------- /certs/README.RootCerts: -------------------------------------------------------------------------------- 1 | The OpenSSL project does not (any longer) include root CA certificates. 2 | 3 | Please check out the FAQ: 4 | * How can I set up a bundle of commercial root CA certificates? 5 | -------------------------------------------------------------------------------- /MacOS/_MWERKS_prefix.h: -------------------------------------------------------------------------------- 1 | #include 2 | #define B_ENDIAN 3 | #ifdef __POWERPC__ 4 | # pragma longlong on 5 | #endif 6 | #if 0 7 | # define MAC_OS_GUSI_SOURCE 8 | #endif 9 | #define MONOLITH 10 | -------------------------------------------------------------------------------- /util/point.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -f "$2" 4 | if test "$OSTYPE" = msdosdjgpp || test "x$PLATFORM" = xmingw ; then 5 | cp "$1" "$2" 6 | else 7 | ln -s "$1" "$2" 8 | fi 9 | echo "$2 => $1" 10 | 11 | -------------------------------------------------------------------------------- /MacOS/_MWERKS_GUSI_prefix.h: -------------------------------------------------------------------------------- 1 | #include 2 | #define B_ENDIAN 3 | #ifdef __POWERPC__ 4 | # pragma longlong on 5 | #endif 6 | #if 1 7 | # define MAC_OS_GUSI_SOURCE 8 | #endif 9 | #define MONOLITH 10 | -------------------------------------------------------------------------------- /VMS/WISHLIST.TXT: -------------------------------------------------------------------------------- 1 | * Have the building procedure contain a LINK-only possibility. 2 | Wished by Mark Daniel 3 | 4 | One way to enable that is also to go over to DESCRIP.MMS files. 5 | -------------------------------------------------------------------------------- /crypto/bf/VERSION: -------------------------------------------------------------------------------- 1 | The version numbers will follow my SSL implementation 2 | 3 | 0.7.2r - Some reasonable default compiler options from 4 | Peter Gutman 5 | 6 | 0.7.2m - the first release 7 | -------------------------------------------------------------------------------- /tools/c_info: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # print the subject 4 | # 5 | 6 | for i in $* 7 | do 8 | n=`openssl x509 -subject -issuer -enddate -noout -in $i` 9 | echo "$i" 10 | echo "$n" 11 | echo "--------" 12 | done 13 | -------------------------------------------------------------------------------- /crypto/aes/README: -------------------------------------------------------------------------------- 1 | This is an OpenSSL-compatible version of AES (also called Rijndael). 2 | aes_core.c is basically the same as rijndael-alg-fst.c but with an 3 | API that looks like the rest of the OpenSSL symmetric cipher suite. 4 | -------------------------------------------------------------------------------- /util/extract-section.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | while() { 4 | if (/=for\s+comment\s+openssl_manual_section:(\S+)/) 5 | { 6 | print "$1\n"; 7 | exit 0; 8 | } 9 | } 10 | 11 | print "$ARGV[0]\n"; 12 | 13 | -------------------------------------------------------------------------------- /crypto/threads/pthread2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # build using pthreads where it's already built into the system 4 | # 5 | /bin/rm -f mttest 6 | gcc -DPTHREADS -I../../include -g mttest.c -o mttest -L../.. -lssl -lcrypto -lpthread -ldl 7 | -------------------------------------------------------------------------------- /crypto/dsa/README: -------------------------------------------------------------------------------- 1 | The stuff in here is based on patches supplied to me by 2 | Steven Schoch to do DSS. 3 | I have since modified a them a little but a debt of gratitude 4 | is due for doing the initial work. 5 | -------------------------------------------------------------------------------- /ms/tpemce.bat: -------------------------------------------------------------------------------- 1 | rem called by testpemce 2 | 3 | echo test %1 %2 4 | cecopy %2 CE:\OpenSSL 5 | cerun CE:\OpenSSL\%ssleay% %1 -in \OpenSSL\%2 -out \OpenSSL\%tmp1% 6 | del %tmp1% >nul 2>&1 7 | cecopy CE:\OpenSSL\%tmp1% . 8 | %cmp% %2 %tmp1% 9 | -------------------------------------------------------------------------------- /demos/engines/rsaref/rsaref.ec: -------------------------------------------------------------------------------- 1 | # configuration file for util/mkerr.pl 2 | # 3 | # use like this: 4 | # 5 | # perl ../../../util/mkerr.pl -conf rsaref.ec \ 6 | # -nostatic -staticloader -write *.c 7 | 8 | L RSAREF rsaref_err.h rsaref_err.c 9 | -------------------------------------------------------------------------------- /GitConfigure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BRANCH=`git rev-parse --abbrev-ref HEAD` 4 | 5 | ./Configure $@ no-symlinks 6 | make files 7 | util/mk1mf.pl OUT=out.$BRANCH TMP=tmp.$BRANCH INC=inc.$BRANCH copy > makefile.$BRANCH 8 | make -f makefile.$BRANCH init 9 | -------------------------------------------------------------------------------- /demos/engines/ibmca/hw_ibmca.ec: -------------------------------------------------------------------------------- 1 | # configuration file for util/mkerr.pl 2 | # 3 | # use like this: 4 | # 5 | # perl ../../../util/mkerr.pl -conf hw_ibmca.ec \ 6 | # -nostatic -staticloader -write *.c 7 | 8 | L IBMCA hw_ibmca_err.h hw_ibmca_err.c 9 | -------------------------------------------------------------------------------- /engines/vax.opt: -------------------------------------------------------------------------------- 1 | ! 2 | ! Ensure transfer vector is at beginning of image 3 | ! 4 | CLUSTER=FIRST 5 | COLLECT=FIRST,$$ENGINE 6 | ! 7 | ! make psects nonshareable so image can be installed. 8 | ! 9 | PSECT_ATTR=$CHAR_STRING_CONSTANTS,NOWRT 10 | -------------------------------------------------------------------------------- /demos/asn1/README.ASN1: -------------------------------------------------------------------------------- 1 | This is a demo of the new ASN1 code. Its an OCSP ASN1 module. Doesn't 2 | do much yet other than demonstrate what the new ASN1 modules might look 3 | like. 4 | 5 | It wont even compile yet: the new code isn't in place. 6 | 7 | 8 | -------------------------------------------------------------------------------- /demos/engines/zencod/hw_zencod.ec: -------------------------------------------------------------------------------- 1 | # configuration file for util/mkerr.pl 2 | # 3 | # use like this: 4 | # 5 | # perl ../../../util/mkerr.pl -conf hw_zencod.ec \ 6 | # -nostatic -staticloader -write *.c 7 | 8 | L ZENCOD hw_zencod_err.h hw_zencod_err.c 9 | -------------------------------------------------------------------------------- /ms/do_nt.bat: -------------------------------------------------------------------------------- 1 | 2 | perl util\mkfiles.pl >MINFO 3 | perl util\mk1mf.pl no-asm VC-NT >ms\nt.mak 4 | perl util\mk1mf.pl dll no-asm VC-NT >ms\ntdll.mak 5 | 6 | perl util\mkdef.pl libeay NT > ms\libeay32.def 7 | perl util\mkdef.pl ssleay NT > ms\ssleay32.def 8 | -------------------------------------------------------------------------------- /crypto/ppc_arch.h: -------------------------------------------------------------------------------- 1 | #ifndef __PPC_ARCH_H__ 2 | # define __PPC_ARCH_H__ 3 | 4 | extern unsigned int OPENSSL_ppccap_P; 5 | 6 | # define PPC_FPU64 (1<<0) 7 | # define PPC_ALTIVEC (1<<1) 8 | # define PPC_CRYPTO207 (1<<2) 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /crypto/threads/pthread.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # build using pthreads 4 | # 5 | # http://www.mit.edu:8001/people/proven/pthreads.html 6 | # 7 | /bin/rm -f mttest 8 | pgcc -DPTHREADS -I../../include -g mttest.c -o mttest -L../.. -lssl -lcrypto 9 | 10 | -------------------------------------------------------------------------------- /util/tab_num.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | $num=1; 4 | $width=40; 5 | 6 | while (<>) 7 | { 8 | chop; 9 | 10 | $i=length($_); 11 | 12 | $n=$width-$i; 13 | $i=int(($n+7)/8); 14 | print $_.("\t" x $i).$num."\n"; 15 | $num++; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /crypto/dh/dh1024.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIGHAoGBAJf2QmHKtQXdKCjhPx1ottPb0PMTBH9A6FbaWMsTuKG/K3g6TG1Z1fkq 3 | /Gz/PWk/eLI9TzFgqVAuPvr3q14a1aZeVUMTgo2oO5/y2UHe6VaJ+trqCTat3xlx 4 | /mNbIK9HA2RgPC3gWfVLZQrY+gz3ASHHR5nXWHEyvpuZm7m3h+irAgEC 5 | -----END DH PARAMETERS----- 6 | -------------------------------------------------------------------------------- /crypto/rsa/rsa_locl.h: -------------------------------------------------------------------------------- 1 | extern int int_rsa_verify(int dtype, const unsigned char *m, 2 | unsigned int m_len, unsigned char *rm, 3 | size_t *prm_len, const unsigned char *sigbuf, 4 | size_t siglen, RSA *rsa); 5 | -------------------------------------------------------------------------------- /demos/engines/cluster_labs/hw_cluster_labs.ec: -------------------------------------------------------------------------------- 1 | # configuration file for util/mkerr.pl 2 | # 3 | # use like this: 4 | # 5 | # perl ../../../util/mkerr.pl -conf hw_cluster_labs.ec \ 6 | # -nostatic -staticloader -write *.c 7 | 8 | L CL hw_cluster_labs_err.h hw_cluster_labs_err.c 9 | -------------------------------------------------------------------------------- /demos/sign/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS= -g -I../../include -Wall 3 | LIBS= -L../.. -lcrypto 4 | EXAMPLES=sign 5 | 6 | all: $(EXAMPLES) 7 | 8 | sign: sign.o 9 | $(CC) -o sign sign.o $(LIBS) 10 | 11 | clean: 12 | rm -f $(EXAMPLES) *.o 13 | 14 | test: all 15 | ./sign 16 | -------------------------------------------------------------------------------- /demos/tunala/Makefile.am: -------------------------------------------------------------------------------- 1 | # Our includes come from the OpenSSL build-tree we're in 2 | INCLUDES = -I$(top_builddir)/../../include 3 | 4 | bin_PROGRAMS = tunala 5 | 6 | tunala_SOURCES = tunala.c buffer.c cb.c ip.c sm.c breakage.c 7 | tunala_LDADD = -L$(top_builddir)/../.. -lssl -lcrypto 8 | -------------------------------------------------------------------------------- /demos/bio/README: -------------------------------------------------------------------------------- 1 | This directory contains some simple examples of the use of BIO's 2 | to simplify socket programming. 3 | 4 | The client-conf, server-conf, client-arg and client-conf include examples 5 | of how to use the SSL_CONF API for configuration file or command line 6 | processing. 7 | 8 | -------------------------------------------------------------------------------- /tools/c89.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -k 2 | # 3 | # Re-order arguments so that -L comes first 4 | # 5 | opts="" 6 | lopts="" 7 | 8 | for arg in $* ; do 9 | case $arg in 10 | -L*) lopts="$lopts $arg" ;; 11 | *) opts="$opts $arg" ;; 12 | esac 13 | done 14 | 15 | c89 $lopts $opts 16 | -------------------------------------------------------------------------------- /ms/do_nasm.bat: -------------------------------------------------------------------------------- 1 | 2 | perl util\mkfiles.pl >MINFO 3 | perl util\mk1mf.pl nasm VC-WIN32 >ms\nt.mak 4 | perl util\mk1mf.pl dll nasm VC-WIN32 >ms\ntdll.mak 5 | perl util\mk1mf.pl nasm BC-NT >ms\bcb.mak 6 | 7 | perl util\mkdef.pl 32 libeay > ms\libeay32.def 8 | perl util\mkdef.pl 32 ssleay > ms\ssleay32.def 9 | -------------------------------------------------------------------------------- /apps/dsap.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PARAMETERS----- 2 | MIGcAkEA+ZiKEvZmc9MtnaFZh4NiZ3oZS4J1PHvPrm9MXj5ntVheDPkdmBDTncya 3 | GAJcMjwsyB/GvLDGd6yGCw/8eF+09wIVAK3VagOxGd/Q4Af5NbxR5FB7CXEjAkA2 4 | t/q7HgVLi0KeKvcDG8BRl3wuy7bCvpjgtWiJc/tpvcuzeuAayH89UofjAGueKjXD 5 | ADiRffvSdhrNw5dkqdql 6 | -----END DSA PARAMETERS----- 7 | -------------------------------------------------------------------------------- /crypto/lhash/num.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | #node 10 -> 4 4 | 5 | while (<>) 6 | { 7 | next unless /^node/; 8 | chop; 9 | @a=split; 10 | $num{$a[3]}++; 11 | } 12 | 13 | @a=sort {$a <=> $b } keys %num; 14 | foreach (0 .. $a[$#a]) 15 | { 16 | printf "%4d:%4d\n",$_,$num{$_}; 17 | } 18 | -------------------------------------------------------------------------------- /demos/state_machine/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS=-I../../include -Wall -Werror -g 2 | 3 | all: state_machine 4 | 5 | state_machine: state_machine.o 6 | $(CC) -o state_machine state_machine.o -L../.. -lssl -lcrypto 7 | 8 | test: state_machine 9 | ./state_machine 10000 ../../apps/server.pem ../../apps/server.pem 10 | -------------------------------------------------------------------------------- /shlib/irix.sh: -------------------------------------------------------------------------------- 1 | FLAGS="-DTERMIOS -O2 -mips2 -DB_ENDIAN -fomit-frame-pointer -Wall -Iinclude" 2 | SHFLAGS="-DPIC -fpic" 3 | 4 | gcc -c -Icrypto $SHFLAGS $FLAGS -o crypto.o crypto/crypto.c 5 | ld -shared -o libcrypto.so crypto.o 6 | gcc -c -Issl $SHFLAGS $FLAGS -o ssl.o ssl/ssl.c 7 | ld -shared -o libssl.so ssl.o 8 | -------------------------------------------------------------------------------- /apps/dsa512.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PARAMETERS----- 2 | MIGdAkEAnRtpjibb8isRcBmG9hnI+BnyGFOURgbQYlAzSwI8UjADizv5X9EkBk97 3 | TLqqQJv9luQ3M7stWtdaEUBmonZ9MQIVAPtT71C0QJIxVoZTeuiLIppJ+3GPAkEA 4 | gz6I5cWJc847bAFJv7PHnwrqRJHlMKrZvltftxDXibeOdPvPKR7rqCxUUbgQ3qDO 5 | L8wka5B33qJoplISogOdIA== 6 | -----END DSA PARAMETERS----- 7 | -------------------------------------------------------------------------------- /crypto/cast/asm/readme: -------------------------------------------------------------------------------- 1 | There is a ppro flag in cast-586 which turns on/off 2 | generation of pentium pro/II friendly code 3 | 4 | This flag makes the inner loop one cycle longer, but generates 5 | code that runs %30 faster on the pentium pro/II, while only %7 slower 6 | on the pentium. By default, this flag is on. 7 | 8 | -------------------------------------------------------------------------------- /demos/README: -------------------------------------------------------------------------------- 1 | NOTE: Don't expect any of these programs to work with current 2 | OpenSSL releases, or even with later SSLeay releases. 3 | 4 | Original README: 5 | ============================================================================= 6 | 7 | Some demo programs sent to me by various people 8 | 9 | eric 10 | -------------------------------------------------------------------------------- /shlib/sun.sh: -------------------------------------------------------------------------------- 1 | FLAGS="-DTERMIO -O3 -DB_ENDIAN -fomit-frame-pointer -mv8 -Wall -Iinclude" 2 | SHFLAGS="-DPIC -fpic" 3 | 4 | gcc -c -Icrypto $SHFLAGS -fpic $FLAGS -o crypto.o crypto/crypto.c 5 | ld -G -z text -o libcrypto.so crypto.o 6 | 7 | gcc -c -Issl $SHFLAGS $FLAGS -o ssl.o ssl/ssl.c 8 | ld -G -z text -o libssl.so ssl.o 9 | -------------------------------------------------------------------------------- /crypto/bn/asm/x86/div.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | # x86 assember 3 | 4 | sub bn_div_words 5 | { 6 | local($name)=@_; 7 | 8 | &function_begin($name,""); 9 | &mov("edx",&wparam(0)); # 10 | &mov("eax",&wparam(1)); # 11 | &mov("ebx",&wparam(2)); # 12 | &div("ebx"); 13 | &function_end($name); 14 | } 15 | 1; 16 | -------------------------------------------------------------------------------- /demos/bio/connect.cnf: -------------------------------------------------------------------------------- 1 | # Example configuration file 2 | # Connects to the default port of s_server 3 | Connect = localhost:4433 4 | # Disable TLS v1.2 for test. 5 | # Protocol = ALL, -TLSv1.2 6 | # Only support 3 curves 7 | Curves = P-521:P-384:P-256 8 | # Restricted signature algorithms 9 | SignatureAlgorithms = RSA+SHA512:ECDSA+SHA512 10 | -------------------------------------------------------------------------------- /ms/do_win64i.bat: -------------------------------------------------------------------------------- 1 | 2 | perl util\mkfiles.pl >MINFO 3 | perl ms\uplink-ia64.pl > ms\uptable.asm 4 | ias -o ms\uptable.obj ms\uptable.asm 5 | perl util\mk1mf.pl VC-WIN64I >ms\nt.mak 6 | perl util\mk1mf.pl dll VC-WIN64I >ms\ntdll.mak 7 | 8 | perl util\mkdef.pl 32 libeay > ms\libeay32.def 9 | perl util\mkdef.pl 32 ssleay > ms\ssleay32.def 10 | -------------------------------------------------------------------------------- /crypto/bf/README: -------------------------------------------------------------------------------- 1 | This is a quick packaging up of my blowfish code into a library. 2 | It has been lifted from SSLeay. 3 | The copyright notices seem a little harsh because I have not spent the 4 | time to rewrite the conditions from the normal SSLeay ones. 5 | 6 | Basically if you just want to play with the library, not a problem. 7 | 8 | eric 15-Apr-1997 9 | -------------------------------------------------------------------------------- /test/testsslproxy: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | echo 'Testing a lot of proxy conditions.' 4 | echo 'Some of them may turn out being invalid, which is fine.' 5 | for auth in A B C BC; do 6 | for cond in A B C 'A|B&!C'; do 7 | sh ./testssl $1 $2 $3 "-proxy -proxy_auth $auth -proxy_cond $cond" 8 | if [ $? = 3 ]; then exit 1; fi 9 | done 10 | done 11 | -------------------------------------------------------------------------------- /apps/oid.cnf: -------------------------------------------------------------------------------- 1 | 2.99999.1 SET.ex1 SET x509v3 extension 1 2 | 2.99999.2 SET.ex2 SET x509v3 extension 2 3 | 2.99999.3 SET.ex3 SET x509v3 extension 3 4 | 2.99999.4 SET.ex4 SET x509v3 extension 4 5 | 2.99999.5 SET.ex5 SET x509v3 extension 5 6 | 2.99999.6 SET.ex6 SET x509v3 extension 6 7 | -------------------------------------------------------------------------------- /util/dirname.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | if ($#ARGV < 0) { 4 | die "dirname.pl: too few arguments\n"; 5 | } elsif ($#ARGV > 0) { 6 | die "dirname.pl: too many arguments\n"; 7 | } 8 | 9 | my $d = $ARGV[0]; 10 | 11 | if ($d =~ m|.*/.*|) { 12 | $d =~ s|/[^/]*$||; 13 | } else { 14 | $d = "."; 15 | } 16 | 17 | print $d,"\n"; 18 | exit(0); 19 | -------------------------------------------------------------------------------- /crypto/pem/message: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVACY-ENHANCED MESSAGE----- 2 | Proc-Type: 4,ENCRYPTED 3 | Proc-Type: 4,MIC-ONLY 4 | Proc-Type: 4,MIC-CLEAR 5 | Content-Domain: RFC822 6 | DEK-Info: DES-CBC,0123456789abcdef 7 | Originator-Certificate 8 | xxxx 9 | Issuer-Certificate 10 | xxxx 11 | MIC-Info: RSA-MD5,RSA, 12 | xxxx 13 | 14 | 15 | -----END PRIVACY-ENHANCED MESSAGE----- 16 | 17 | -------------------------------------------------------------------------------- /demos/easy_tls/test.h: -------------------------------------------------------------------------------- 1 | /* test.h */ 2 | /* $Id: test.h,v 1.1 2001/09/17 19:07:00 bodo Exp $ */ 3 | 4 | void test_process_init(int fd, int client_p, void *apparg); 5 | #define TLS_APP_PROCESS_INIT test_process_init 6 | 7 | #undef TLS_CUMULATE_ERRORS 8 | 9 | void test_errflush(int child_p, char *errbuf, size_t num, void *apparg); 10 | #define TLS_APP_ERRFLUSH test_errflush 11 | -------------------------------------------------------------------------------- /crypto/bf/asm/readme: -------------------------------------------------------------------------------- 1 | There are blowfish assembler generation scripts. 2 | bf-586.pl version is for the pentium and 3 | bf-686.pl is my original version, which is faster on the pentium pro. 4 | 5 | When using a bf-586.pl, the pentium pro/II is %8 slower than using 6 | bf-686.pl. When using a bf-686.pl, the pentium is %16 slower 7 | than bf-586.pl 8 | 9 | So the default is bf-586.pl 10 | 11 | -------------------------------------------------------------------------------- /apps/demoSRP/srp_verifier.txt: -------------------------------------------------------------------------------- 1 | # This is a file that will be filled by the openssl srp routine. 2 | # You can initialize the file with additional groups, these are 3 | # records starting with a I followed by the g and N values and the id. 4 | # The exact values ... you have to dig this out from the source of srp.c 5 | # or srp_vfy.c 6 | # The last value of an I is used as the default group for new users. 7 | -------------------------------------------------------------------------------- /doc/crypto/BN_swap.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | BN_swap - exchange BIGNUMs 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | void BN_swap(BIGNUM *a, BIGNUM *b); 12 | 13 | =head1 DESCRIPTION 14 | 15 | BN_swap() exchanges the values of I and I. 16 | 17 | L 18 | 19 | =head1 HISTORY 20 | 21 | BN_swap was added in OpenSSL 0.9.7. 22 | 23 | =cut 24 | -------------------------------------------------------------------------------- /test/testreq2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIHaMIGFAgEAMA4xDDAKBgNVBAMTA2NuNDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC 3 | QQCQsnkyUGDY2R3mYoeTprFJKgWuJ3f1jUjlIuW5+wfAUoeMt35c4vcFZ2mIBpEG 4 | DtzkNQN1kr2O9ldm9zYnYhyhAgMBAAGgEjAQBgorBgEEAYI3AgEOMQIwADANBgkq 5 | hkiG9w0BAQQFAANBAAb2szZgVIxg3vK6kYLjGSBISyuzcXJ6IvuPW6M+yzi1Qgoi 6 | gQhazHTJp91T8ItZEzUJGZSZl2e5iXlnffWB+/U= 7 | -----END CERTIFICATE REQUEST----- 8 | -------------------------------------------------------------------------------- /demos/b64.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | # 4 | # Make PEM encoded data have lines of 64 bytes of data 5 | # 6 | 7 | while (<>) 8 | { 9 | if (/^-----BEGIN/ .. /^-----END/) 10 | { 11 | if (/^-----BEGIN/) { $first=$_; next; } 12 | if (/^-----END/) { $last=$_; next; } 13 | $out.=$_; 14 | } 15 | } 16 | $out =~ s/\s//g; 17 | $out =~ s/(.{64})/$1\n/g; 18 | print "$first$out\n$last\n"; 19 | 20 | 21 | -------------------------------------------------------------------------------- /ms/do_ms.bat: -------------------------------------------------------------------------------- 1 | 2 | perl util\mkfiles.pl >MINFO 3 | perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak 4 | perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak 5 | if x%OSVERSION% == x goto skipce 6 | perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak 7 | perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak 8 | :skipce 9 | 10 | perl util\mkdef.pl 32 libeay > ms\libeay32.def 11 | perl util\mkdef.pl 32 ssleay > ms\ssleay32.def 12 | -------------------------------------------------------------------------------- /util/pod2mantest.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | foo, bar, 6 | MARKER - test of multiline name section 7 | 8 | =head1 DESCRIPTION 9 | 10 | This is a test .pod file to see if we have a buggy pod2man or not. 11 | If we have a buggy implementation, we will get a line matching the 12 | regular expression "^ +MARKER - test of multiline name section *$" 13 | at the end of the resulting document. 14 | 15 | =cut 16 | -------------------------------------------------------------------------------- /crypto/bn/bn.mul: -------------------------------------------------------------------------------- 1 | We need 2 | 3 | * bn_mul_comba8 4 | * bn_mul_comba4 5 | * bn_mul_normal 6 | * bn_mul_recursive 7 | 8 | * bn_sqr_comba8 9 | * bn_sqr_comba4 10 | bn_sqr_normal -> BN_sqr 11 | * bn_sqr_recursive 12 | 13 | * bn_mul_low_recursive 14 | * bn_mul_low_normal 15 | * bn_mul_high 16 | 17 | * bn_mul_part_recursive # symetric but not power of 2 18 | 19 | bn_mul_asymetric_recursive # uneven, but do the chop up. 20 | -------------------------------------------------------------------------------- /demos/bio/accept.cnf: -------------------------------------------------------------------------------- 1 | # Example configuration file 2 | # Port to listen on 3 | Port = 4433 4 | # Disable TLS v1.2 for test. 5 | # Protocol = ALL, -TLSv1.2 6 | # Only support 3 curves 7 | Curves = P-521:P-384:P-256 8 | # Automatic curve selection 9 | ECDHParameters = Automatic 10 | # Restricted signature algorithms 11 | SignatureAlgorithms = RSA+SHA512:ECDSA+SHA512 12 | Certificate=server.pem 13 | PrivateKey=server.pem 14 | -------------------------------------------------------------------------------- /ms/README: -------------------------------------------------------------------------------- 1 | Run these makefiles from the top level as in 2 | nmake -f ms\makefilename 3 | to build with visual C++ 4.[01]. 4 | 5 | The results will be in the out directory. 6 | 7 | These makefiles and def files were generated by typing 8 | 9 | perl util\mk1mf.pl VC-NT >ms/nt.mak 10 | perl util\mk1mf.pl VC-NT dll >ms/ntdll.mak 11 | 12 | perl util\mkdef.pl 32 crypto > ms/crypto32.def 13 | perl util\mkdef.pl 32 ssl > ms/ssl32.def 14 | -------------------------------------------------------------------------------- /ms/reqCA.ss: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIHzMIGeAgEAMDkxCzAJBgNVBAYTAkFVMRcwFQYDVQQKEw5Eb2RneSBCcm90aGVy 3 | czERMA8GA1UEAxMIRG9kZ3kgQ0EwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA0DQL 4 | enM/ncK6CwSEJhOO1WfZUPUEi4pvos9fHW459jh3rRDADgi3fiCYxoRVSQhvB47k 5 | DZ3ViNg5yrDhy7F9ywIDAQABoAAwDQYJKoZIhvcNAQEFBQADQQA5DZSZgDXs8flG 6 | GZf4SGr8QpqkxSu9bZOYp/ySuz1khj7aupBrvZBmqZcZx4ZjAUN7UQpMWu2gyfKa 7 | mAiiLPFN 8 | -----END CERTIFICATE REQUEST----- 9 | -------------------------------------------------------------------------------- /apps/dh512.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MEYCQQD1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWak 3 | XUGfnHy9iUsiGSa6q6Jew1XpKgVfAgEC 4 | -----END DH PARAMETERS----- 5 | 6 | These are the 512 bit DH parameters from "Assigned Number for SKIP Protocols" 7 | (http://www.skip-vpn.org/spec/numbers.html). 8 | See there for how they were generated. 9 | Note that g is not a generator, but this is not a problem since p is a safe prime. 10 | -------------------------------------------------------------------------------- /demos/prime/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS= -g -I../../include -Wall 3 | LIBS= -L../.. -lcrypto 4 | EXAMPLES=prime 5 | 6 | all: $(EXAMPLES) 7 | 8 | prime: prime.o 9 | $(CC) -o prime prime.o $(LIBS) 10 | 11 | clean: 12 | rm -f $(EXAMPLES) *.o 13 | 14 | test: all 15 | @echo Test creating a 128-bit prime 16 | ./prime 128 17 | @echo Test creating a 256-bit prime 18 | ./prime 256 19 | @echo Test creating a 512-bit prime 20 | ./prime 512 21 | -------------------------------------------------------------------------------- /ms/reqU.ss: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBCDCBswIBADBOMQswCQYDVQQGEwJBVTEXMBUGA1UEChMORG9kZ3kgQnJvdGhl 3 | cnMxEjAQBgNVBAMTCUJyb3RoZXIgMTESMBAGA1UEAxMJQnJvdGhlciAyMFwwDQYJ 4 | KoZIhvcNAQEBBQADSwAwSAJBANHuKqKzq/87iwfTb0Wl4SVWiB2hhmrGu3jAI1T4 5 | rVgF5Dfg8V4hh9QpzIEK2iomM7BFT9ecbcZHrxLyuYyaTsMCAwEAAaAAMA0GCSqG 6 | SIb3DQEBAgUAA0EAhB0p6LbiVq+XshLo5sBQN0rsROC1OgWrdS6ZUmMaigOKK069 7 | r1o+dGwbM5VCYGTZf0PW9OtGuArGct0laL5h4w== 8 | -----END CERTIFICATE REQUEST----- 9 | -------------------------------------------------------------------------------- /util/fixNT.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # clean up the mess that NT makes of my source tree 4 | # 5 | 6 | if [ -f makefile -a ! -f Makefile ]; then 7 | /bin/mv makefile Makefile 8 | fi 9 | chmod +x Configure util/* 10 | echo cleaning 11 | /bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null 12 | echo 'removing those damn ^M' 13 | perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'` 14 | make -f Makefile links 15 | -------------------------------------------------------------------------------- /apps/testCA.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBBzCBsgIBADBNMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEX 3 | MBUGA1UEChMOTWluY29tIFB0eSBMdGQxEDAOBgNVBAMTB1RFU1QgQ0EwXDANBgkq 4 | hkiG9w0BAQEFAANLADBIAkEAzW9brgA8efT2ODB+NrsflJZj3KKqKsm4OrXTRqfL 5 | VETj1ws/zCXl42XJAxdWQMCP0liKfc9Ut4xi1qCVI7N07wIDAQABoAAwDQYJKoZI 6 | hvcNAQEEBQADQQBjZZ42Det9Uw0AFwJy4ufUEy5Cv74pxBp5SZnljgHY+Az0Hs2S 7 | uNkIegr2ITX5azKi9nOkg9ZmsmGG13FIjiC/ 8 | -----END CERTIFICATE REQUEST----- 9 | -------------------------------------------------------------------------------- /crypto/threads/pthreads-vms.com: -------------------------------------------------------------------------------- 1 | $! To compile mttest on VMS. 2 | $! 3 | $! WARNING: only tested with DEC C so far. 4 | $ 5 | $ if (f$getsyi("cpu").lt.128) 6 | $ then 7 | $ arch := VAX 8 | $ else 9 | $ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") 10 | $ if (arch .eqs. "") then arch = "UNK" 11 | $ endif 12 | $ define/user openssl [--.include.openssl] 13 | $ cc/def=PTHREADS mttest.c 14 | $ link mttest,[--.'arch'.exe.ssl]libssl/lib,[--.'arch'.exe.crypto]libcrypto/lib 15 | -------------------------------------------------------------------------------- /VMS/openssl_undo.com: -------------------------------------------------------------------------------- 1 | $! 2 | $! Deassign OpenSSL logical names. 3 | $! 4 | $ call deass "OPENSSL" "''p1'" 5 | $ call deass "SSLCERTS" "''p1'" 6 | $ call deass "SSLEXE" "''p1'" 7 | $ call deass "SSLINCLUDE" "''p1'" 8 | $ call deass "SSLLIB" "''p1'" 9 | $ call deass "SSLPRIVATE" "''p1'" 10 | $ call deass "SSLROOT" "''p1'" 11 | $! 12 | $ exit 13 | $! 14 | $deass: subroutine 15 | $ if (f$trnlnm( p1) .nes. "") 16 | $ then 17 | $ deassign 'p2' 'p1' 18 | $ endif 19 | $ endsubroutine 20 | $! 21 | -------------------------------------------------------------------------------- /apps/s512-req.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBGzCBxgIBADBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEa 3 | MBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGlNlcnZlciB0ZXN0 4 | IGNlcnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ+zw4Qnlf8S 5 | MVIPFe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVDTGiXav6ooKXfX3j/7tdkuD8E 6 | y2//Kv7+ue0CAwEAATANBgkqhkiG9w0BAQQFAANBAAB+uQi+qwn6qRSHB8EUTvsm 7 | 5TNTHzYDeN39nyIbZNX2s0se3Srn2Bxft5YCwD3moFZ9QoyDHxE0h6qLX5yjD+8= 8 | -----END CERTIFICATE REQUEST----- 9 | -------------------------------------------------------------------------------- /apps/dsa1024.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PARAMETERS----- 2 | MIIBHgKBgQCnP26Fv0FqKX3wn0cZMJCaCR3aajMexT2GlrMV4FMuj+BZgnOQPnUx 3 | mUd6UvuF5NmmezibaIqEm4fGHrV+hktTW1nPcWUZiG7OZq5riDb77Cjcwtelu+Us 4 | OSZL2ppwGJU3lRBWI/YV7boEXt45T/23Qx+1pGVvzYAR5HCVW1DNSQIVAPcHMe36 5 | bAYD1YWKHKycZedQZmVvAoGATd9MA6aRivUZb1BGJZnlaG8w42nh5bNdmLsohkj8 6 | 3pkEP1+IDJxzJA0gXbkqmj8YlifkYofBe3RiU/xhJ6h6kQmdtvFNnFQPWAbuSXQH 7 | zlV+I84W9srcWmEBfslxtU323DQph2j2XiCTs9v15AlsQReVkusBtXOlan7YMu0O 8 | Arg= 9 | -----END DSA PARAMETERS----- 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: 2 | - c 3 | 4 | addons: 5 | apt_packages: 6 | - binutils-mingw-w64 7 | - gcc-mingw-w64 8 | 9 | os: 10 | - linux 11 | 12 | compiler: 13 | - gcc 14 | 15 | script: 16 | - ./config enable-static-engine enable-ec_nistp_64_gcc_128 enable-gost enable-idea enable-md2 enable-rc5 enable-rfc3779 enable-ssl-trace enable-ssl2 enable-ssl3 enable-zlib experimental-jpake no-zlib-dynamic 1>/dev/null && make depend 1>/dev/null && make 1>/dev/null && make test 17 | 18 | -------------------------------------------------------------------------------- /crypto/des/times/486-50.sol: -------------------------------------------------------------------------------- 1 | Solaris 2.4, 486 50mhz, gcc 2.6.3 2 | options des ecb/s 3 | 16 r2 i 43552.51 100.0% 4 | 16 r1 i 43487.45 99.9% 5 | 16 c p 43003.23 98.7% 6 | 16 r2 p 42339.00 97.2% 7 | 16 c i 41900.91 96.2% 8 | 16 r1 p 41360.64 95.0% 9 | 4 c i 38728.48 88.9% 10 | 4 c p 38225.63 87.8% 11 | 4 r1 i 38085.79 87.4% 12 | 4 r2 i 37825.64 86.9% 13 | 4 r2 p 34611.00 79.5% 14 | 4 r1 p 31802.00 73.0% 15 | -DDES_UNROLL -DDES_RISC2 16 | 17 | -------------------------------------------------------------------------------- /test/smime-certs/smdsap.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PARAMETERS----- 2 | MIIBHwKBgQDFJfsIPOIawMO5biw+AoYUhNVxReBOLQosU3Qv4B8krac0BNr3OjSG 3 | Lh1wZxHqhlAE0QmasTaKojuk20nNWeFnczSz6vDl0IVJEhS8VYor5kt9gLqtGcoA 4 | gsf4gRDIutJyQDaNn3IVY89uXUVIoexvQeLQDBCgQPC5O8rJdqBwtwIVAK2Jjt+d 5 | qk07eQUE59koYUEKyNorAoGBAI4IEpusf8G14kCHmRtnHXM2tG5EWJDmW6Qtwjqv 6 | Wp1GKUx5WFy1tVWR9nl5rL0Di+kNdENo+SkKj7h3uDulGOI6T0mQYbV2h1IK+FMO 7 | GnOqvZ8eNTE2n4PGTo5puZ63LBm+QYrQsrNiUY4vakLFQ2rEK/SLwdsDFK4ZSJCB 8 | Qw5z 9 | -----END DSA PARAMETERS----- 10 | -------------------------------------------------------------------------------- /crypto/des/times/alpha.cc: -------------------------------------------------------------------------------- 1 | cc -O2 2 | DES_LONG is 'unsigned int' 3 | 4 | options des ecb/s 5 | 4 r2 p 181146.14 100.0% 6 | 16 r2 p 172102.94 95.0% 7 | 4 r2 i 165424.11 91.3% 8 | 16 c p 160468.64 88.6% 9 | 4 c p 156653.59 86.5% 10 | 4 c i 155245.18 85.7% 11 | 4 r1 p 154729.68 85.4% 12 | 16 r2 i 154137.69 85.1% 13 | 16 r1 p 152357.96 84.1% 14 | 16 c i 148743.91 82.1% 15 | 4 r1 i 146695.59 81.0% 16 | 16 r1 i 144961.00 80.0% 17 | -DDES_RISC2 -DDES_PTR 18 | 19 | -------------------------------------------------------------------------------- /crypto/des/times/sparc.gcc: -------------------------------------------------------------------------------- 1 | solaris 2.5.1 - sparc 10 50mhz - gcc 2.7.2 2 | 3 | options des ecb/s 4 | 16 c i 124382.70 100.0% 5 | 4 c i 118884.68 95.6% 6 | 16 c p 112261.20 90.3% 7 | 16 r2 i 111777.10 89.9% 8 | 16 r2 p 108896.30 87.5% 9 | 16 r1 p 108791.59 87.5% 10 | 4 c p 107290.10 86.3% 11 | 4 r1 p 104583.80 84.1% 12 | 16 r1 i 104206.20 83.8% 13 | 4 r2 p 103709.80 83.4% 14 | 4 r2 i 98306.43 79.0% 15 | 4 r1 i 91525.80 73.6% 16 | -DDES_UNROLL 17 | 18 | -------------------------------------------------------------------------------- /certs/expired/ICE.crl: -------------------------------------------------------------------------------- 1 | -----BEGIN X509 CRL----- 2 | MIIBNDCBnjANBgkqhkiG9w0BAQIFADBFMSEwHwYDVQQKExhFdXJvcGVhbiBJQ0Ut 3 | VEVMIFByb2plY3QxIDAeBgNVBAsTF0NlcnRpZmljYXRpb24gQXV0aG9yaXR5Fw05 4 | NzA2MDkxNDQyNDNaFw05NzA3MDkxNDQyNDNaMCgwEgIBChcNOTcwMzAzMTQ0MjU0 5 | WjASAgEJFw05NjEwMDIxMjI5MjdaMA0GCSqGSIb3DQEBAgUAA4GBAH4vgWo2Tej/ 6 | i7kbiw4Imd30If91iosjClNpBFwvwUDBclPEeMuYimHbLOk4H8Nofc0fw11+U/IO 7 | KSNouUDcqG7B64oY7c4SXKn+i1MWOb5OJiWeodX3TehHjBlyWzoNMWCnYA8XqFP1 8 | mOKp8Jla1BibEZf14+/HqCi2hnZUiEXh 9 | -----END X509 CRL----- 10 | -------------------------------------------------------------------------------- /crypto/des/DES.pm: -------------------------------------------------------------------------------- 1 | package DES; 2 | 3 | require Exporter; 4 | require DynaLoader; 5 | @ISA = qw(Exporter DynaLoader); 6 | # Items to export into callers namespace by default 7 | # (move infrequently used names to @EXPORT_OK below) 8 | @EXPORT = qw( 9 | ); 10 | # Other items we are prepared to export if requested 11 | @EXPORT_OK = qw( 12 | crypt 13 | ); 14 | 15 | # Preloaded methods go here. Autoload methods go after __END__, and are 16 | # processed by the autosplit program. 17 | bootstrap DES; 18 | 1; 19 | __END__ 20 | -------------------------------------------------------------------------------- /util/extract-names.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | $/ = ""; # Eat a paragraph at once. 4 | while() { 5 | chop; 6 | s/\n/ /gm; 7 | if (/^=head1 /) { 8 | $name = 0; 9 | } elsif ($name) { 10 | if (/ - /) { 11 | s/ - .*//; 12 | s/,\s+/,/g; 13 | s/\s+,/,/g; 14 | s/^\s+//g; 15 | s/\s+$//g; 16 | s/\s/_/g; 17 | push @words, split ','; 18 | } 19 | } 20 | if (/^=head1 *NAME *$/) { 21 | $name = 1; 22 | } 23 | } 24 | 25 | print join("\n", @words),"\n"; 26 | 27 | -------------------------------------------------------------------------------- /ms/tenc.bat: -------------------------------------------------------------------------------- 1 | rem called by testenc 2 | 3 | echo test %1 %2 %3 %4 %5 %6 4 | %ssleay% %1 %2 %3 %4 %5 %6 -e -bufsize 113 -k test -in %input% -out %tmp1% 5 | %ssleay% %1 %2 %3 %4 %5 %6 -d -bufsize 157 -k test -in %tmp1% -out %out1% 6 | %cmp% %input% %out1% 7 | if errorlevel 1 goto err 8 | 9 | echo test base64 %1 %2 %3 %4 %5 %6 10 | %ssleay% %1 %2 %3 %4 %5 %6 -a -e -bufsize 113 -k test -in %input% -out %tmp1% 11 | %ssleay% %1 %2 %3 %4 %5 %6 -a -d -bufsize 157 -k test -in %tmp1% -out %out1% 12 | %cmp% %input% %out1% 13 | 14 | :err 15 | -------------------------------------------------------------------------------- /crypto/des/times/hpux.cc: -------------------------------------------------------------------------------- 1 | HPUX 10 - 9000/887 - cc -D_HPUX_SOURCE -Aa +ESlit +O2 -Wl,-a,archive 2 | 3 | options des ecb/s 4 | 16 c i 149448.90 100.0% 5 | 4 c i 145861.79 97.6% 6 | 16 r2 i 141710.96 94.8% 7 | 16 r1 i 139455.33 93.3% 8 | 4 r2 i 138800.00 92.9% 9 | 4 r1 i 136692.65 91.5% 10 | 16 r2 p 110228.17 73.8% 11 | 16 r1 p 109397.07 73.2% 12 | 16 c p 109209.89 73.1% 13 | 4 c p 108014.71 72.3% 14 | 4 r2 p 107873.88 72.2% 15 | 4 r1 p 107685.83 72.1% 16 | -DDES_UNROLL 17 | 18 | -------------------------------------------------------------------------------- /doc/dir-locals.example.el: -------------------------------------------------------------------------------- 1 | ;;; This is an example of what a .dir-locals.el suitable for OpenSSL 2 | ;;; development could look like. 3 | ;;; 4 | ;;; Apart from setting the CC mode style to "OpenSSL-II", it also 5 | ;;; makes sure that tabs are never used for indentation in any file, 6 | ;;; and that the fill column is 78. 7 | ;;; 8 | ;;; For more information see (info "(emacs) Directory Variables") 9 | 10 | ((nil 11 | (indent-tabs-mode . nil) 12 | (fill-column . 78) 13 | ) 14 | (c-mode 15 | (c-file-style . "OpenSSL-II"))) 16 | -------------------------------------------------------------------------------- /ms/keyU.ss: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBPAIBAAJBANHuKqKzq/87iwfTb0Wl4SVWiB2hhmrGu3jAI1T4rVgF5Dfg8V4h 3 | h9QpzIEK2iomM7BFT9ecbcZHrxLyuYyaTsMCAwEAAQJBAIxtM6n4ZCJscxj+D13Y 4 | k13Fn3Gqvd6pJ3ijlj7dxh6tRBBQ3W9qmQflyvEc81giI2XtbVYBOEJKtJ1cWWZm 5 | gAkCIQDpEoOuc4KCI5ti6aMJvtxlXWNHbkXCxtbeIjH4+FnH9QIhAOaU3XVeWWOK 6 | PnnO87KniDjHQqWLnooivDGRK+FUKeDXAiEA2MjEvFVqFVvDIsxHPkBNROcI+Z6i 7 | ulkx76kErBtrfqUCIHN5uBLQZmngUPuFtiwRlLoCqJDphENfs+oK7vPQx4xPAiEA 8 | hnY2Ulrpld83IG6bUs95Loc8Fk81hez5YwmhsFEXVtk= 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /apps/dh1024.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIGHAoGBAPSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kjwEPwpVsY 3 | jY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6 4 | ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpL3jHAgEC 5 | -----END DH PARAMETERS----- 6 | 7 | These are the 1024 bit DH parameters from "Assigned Number for SKIP Protocols" 8 | (http://www.skip-vpn.org/spec/numbers.html). 9 | See there for how they were generated. 10 | Note that g is not a generator, but this is not a problem since p is a safe prime. 11 | -------------------------------------------------------------------------------- /doc/crypto/RAND_cleanup.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | RAND_cleanup - erase the PRNG state 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | void RAND_cleanup(void); 12 | 13 | =head1 DESCRIPTION 14 | 15 | RAND_cleanup() erases the memory used by the PRNG. 16 | 17 | =head1 RETURN VALUE 18 | 19 | RAND_cleanup() returns no value. 20 | 21 | =head1 SEE ALSO 22 | 23 | L 24 | 25 | =head1 HISTORY 26 | 27 | RAND_cleanup() is available in all versions of SSLeay and OpenSSL. 28 | 29 | =cut 30 | -------------------------------------------------------------------------------- /ms/keyCA.ss: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBOwIBAAJBANA0C3pzP53CugsEhCYTjtVn2VD1BIuKb6LPXx1uOfY4d60QwA4I 3 | t34gmMaEVUkIbweO5A2d1YjYOcqw4cuxfcsCAwEAAQJAOT9WOKEfyN0WEpl3TJDs 4 | ITmgw2XbjhLOh1HFsW3xegWlaOuhL/wGamz7n7zzL/RQF3JP/VvpGk2F8VD9JhwT 5 | wQIhAPmqM3fLttBoCQuwQRdIPfB7Ps3THqx6N8AJ04z3I1ejAiEA1XyDd7bLpWrw 6 | /oA8CmR4b/KCGfvRwAL/Qej/rQliw7kCIQCYRzSvO8ScpuflhjKdZcXJuRJcbgnG 7 | f6Ejc5rh3xdiawIhALMmLdzEFNjXiSzIx5mg/kBTLUJIw5dx7GqO8B9xBORhAiA5 8 | oTN/hgvvrkkmRsHQpNBmzAEGBzhMEEq9lD6ZWrTSRg== 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /apps/s512-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBPAIBAAJBAJ+zw4Qnlf8SMVIPFe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVD 3 | TGiXav6ooKXfX3j/7tdkuD8Ey2//Kv7+ue0CAwEAAQJAN6W31vDEP2DjdqhzCDDu 4 | OA4NACqoiFqyblo7yc2tM4h4xMbC3Yx5UKMN9ZkCtX0gzrz6DyF47bdKcWBzNWCj 5 | gQIhANEoojVt7hq+SQ6MCN6FTAysGgQf56Q3TYoJMoWvdiXVAiEAw3e3rc+VJpOz 6 | rHuDo6bgpjUAAXM+v3fcpsfZSNO6V7kCIQCtbVjanpUwvZkMI9by02oUk9taki3b 7 | PzPfAfNPYAbCJQIhAJXNQDWyqwn/lGmR11cqY2y9nZ1+5w3yHGatLrcDnQHxAiEA 8 | vnlEGo8K85u+KwIOimM48ZG8oTk7iFdkqLJR1utT3aU= 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /demos/privkey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBPAIBAAJBAN+FmbxmHVOp/RxtpMGz0DvQEBz1sDktHp19hIoMSu0YZift5MAu 3 | 4xAEJYvWVCshDiyOTWsUBXwZkrkt87FyctkCAwEAAQJAG/vxBGpQb6IPo1iC0RF/ 4 | F430BnwoBPCGLbeCOXpSgx5X+19vuTSdEqMgeNB6+aNb+XY/7mvVfCjyD6WZ0oxs 5 | JQIhAPO+uL9cP40lFs62pdL3QSWsh3VNDByvOtr9LpeaxBm/AiEA6sKVfXsDQ5hd 6 | SHt9U61r2r8Lcxmzi9Kw6JNqjMmzqWcCIQCKoRy+aZ8Tjdas9yDVHh+FZ90bEBkl 7 | b1xQFNOdEj8aTQIhAOJWrO6INYNsWTPS6+hLYZtLamyUsQj0H+B8kNQge/mtAiEA 8 | nBfvUl243qbqN8gF7Az1u33uc9FsPVvQPiBzLxZ4ixw= 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /demos/sign/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBPAIBAAJBAL7+aty3S1iBA/+yxjxv4q1MUTd1kjNwL4lYKbpzzlmC5beaQXeQ 3 | 2RmGMTXU+mDvuqItjVHOK3DvPK7lTcSGftUCAwEAAQJBALjkK+jc2+iihI98riEF 4 | oudmkNziSRTYjnwjx8mCoAjPWviB3c742eO3FG4/soi1jD9A5alihEOXfUzloenr 5 | 8IECIQD3B5+0l+68BA/6d76iUNqAAV8djGTzvxnCxycnxPQydQIhAMXt4trUI3nc 6 | a+U8YL2HPFA3gmhBsSICbq2OptOCnM7hAiEA6Xi3JIQECob8YwkRj29DU3/4WYD7 7 | WLPgsQpwo1GuSpECICGsnWH5oaeD9t9jbFoSfhJvv0IZmxdcLpRcpslpeWBBAiEA 8 | 6/5B8J0GHdJq89FHwEG/H2eVVUYu5y/aD6sgcm+0Avg= 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /test/testrsa.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBPAIBAAJBAKrbeqkuRk8VcRmWFmtP+LviMB3+6dizWW3DwaffznyHGAFwUJ/I 3 | Tv0XtbsCyl3QoyKGhrOAy3RvPK5M38iuXT0CAwEAAQJAZ3cnzaHXM/bxGaR5CR1R 4 | rD1qFBAVfoQFiOH9uPJgMaoAuoQEisPHVcZDKcOv4wEg6/TInAIXBnEigtqvRzuy 5 | oQIhAPcgZzUq3yVooAaoov8UbXPxqHlwo6GBMqnv20xzkf6ZAiEAsP4BnIaQTM8S 6 | mvcpHZwQJdmdHHkGKAs37Dfxi67HbkUCIQCeZGliHXFa071Fp06ZeWlR2ADonTZz 7 | rJBhdTe0v5pCeQIhAIZfkiGgGBX4cIuuckzEm43g9WMUjxP/0GlK39vIyihxAiEA 8 | mymehFRT0MvqW5xAKAx7Pgkt8HVKwVhc2LwGKHE0DZM= 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /crypto/threads/README: -------------------------------------------------------------------------------- 1 | Mutithreading testing area. 2 | 3 | Since this stuff is very very platorm specific, this is not part of the 4 | normal build. Have a read of doc/threads.doc. 5 | 6 | mttest will do some testing and will currently build under Windows NT/95, 7 | Solaris and Linux. The IRIX stuff is not finished. 8 | 9 | I have tested this program on a 12 CPU ultra sparc box (solaris 2.5.1) 10 | and things seem to work ok. 11 | 12 | The Linux pthreads package can be retrieved from 13 | http://www.mit.edu:8001/people/proven/pthreads.html 14 | 15 | -------------------------------------------------------------------------------- /demos/bio/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS= -g -I../../include 3 | LIBS= -L../.. ../../libssl.a ../../libcrypto.a -ldl 4 | EXAMPLES=saccept sconnect client-arg client-conf 5 | 6 | all: $(EXAMPLES) 7 | 8 | saccept: saccept.o 9 | $(CC) -o saccept saccept.o $(LIBS) 10 | 11 | sconnect: sconnect.o 12 | $(CC) -o sconnect sconnect.o $(LIBS) 13 | 14 | client-arg: client-arg.o 15 | $(CC) -o client-arg client-arg.o $(LIBS) 16 | 17 | client-conf: client-conf.o 18 | $(CC) -o client-conf client-conf.o $(LIBS) 19 | 20 | clean: 21 | rm -f $(EXAMPLES) *.o 22 | 23 | -------------------------------------------------------------------------------- /util/toutf8.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Very simple script to detect and convert files that we want to re-encode to UTF8 4 | 5 | git ls-tree -r --name-only HEAD | \ 6 | while read F; do 7 | charset=`file -bi "$F" | sed -e 's|.*charset=||'` 8 | if [ "$charset" != "utf-8" -a "$charset" != "binary" -a "$charset" != "us-ascii" ]; then 9 | iconv -f ISO-8859-1 -t UTF8 < "$F" > "$F.utf8" && \ 10 | ( cmp -s "$F" "$F.utf8" || \ 11 | ( echo "$F" 12 | mv "$F" "$F.iso-8859-1" 13 | mv "$F.utf8" "$F" 14 | ) 15 | ) 16 | fi 17 | done 18 | -------------------------------------------------------------------------------- /demos/tunala/autoungunk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script tries to clean up as much as is possible from whatever diabolical 4 | # mess has been left in the directory thanks to autoconf, automake, and their 5 | # friends. 6 | 7 | if test -f Makefile.plain; then 8 | if test -f Makefile; then 9 | make distclean 10 | fi 11 | mv Makefile.plain Makefile 12 | else 13 | make clean 14 | fi 15 | 16 | rm -f aclocal.m4 config.* configure install-sh \ 17 | missing mkinstalldirs stamp-h.* Makefile.in \ 18 | ltconfig ltmain.sh depcomp 19 | rm -rf autom4te.cache 20 | -------------------------------------------------------------------------------- /crypto/bf/INSTALL: -------------------------------------------------------------------------------- 1 | This Eric Young's blowfish implementation, taken from his SSLeay library 2 | and made available as a separate library. 3 | 4 | The version number (0.7.2m) is the SSLeay version that this library was 5 | taken from. 6 | 7 | To build, just unpack and type make. 8 | If you are not using gcc, edit the Makefile. 9 | If you are compiling for an x86 box, try the assembler (it needs improving). 10 | There are also some compile time options that can improve performance, 11 | these are documented in the Makefile. 12 | 13 | eric 15-Apr-1997 14 | 15 | -------------------------------------------------------------------------------- /crypto/idea/version: -------------------------------------------------------------------------------- 1 | 1.1 07/12/95 - eay 2 | Many thanks to Rhys Weatherley 3 | for pointing out that I was assuming little endian byte 4 | order for all quantities what idea actually used 5 | bigendian. No where in the spec does it mention 6 | this, it is all in terms of 16 bit numbers and even the example 7 | does not use byte streams for the input example :-(. 8 | If you byte swap each pair of input, keys and iv, the functions 9 | would produce the output as the old version :-(. 10 | 11 | 1.0 ??/??/95 - eay 12 | First version. 13 | -------------------------------------------------------------------------------- /ms/certCA.ss: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBXDCCAQYCAQAwDQYJKoZIhvcNAQEEBQAwOTELMAkGA1UEBhMCQVUxFzAVBgNV 3 | BAoTDkRvZGd5IEJyb3RoZXJzMREwDwYDVQQDEwhEb2RneSBDQTAeFw05ODA3MjEw 4 | NjUwMTZaFw05ODA4MjAwNjUwMTZaMDkxCzAJBgNVBAYTAkFVMRcwFQYDVQQKEw5E 5 | b2RneSBCcm90aGVyczERMA8GA1UEAxMIRG9kZ3kgQ0EwXDANBgkqhkiG9w0BAQEF 6 | AANLADBIAkEA0DQLenM/ncK6CwSEJhOO1WfZUPUEi4pvos9fHW459jh3rRDADgi3 7 | fiCYxoRVSQhvB47kDZ3ViNg5yrDhy7F9ywIDAQABMA0GCSqGSIb3DQEBBAUAA0EA 8 | S564l3SBxJ+QcIXthGGDyP5zkxTf/1fHfelW9LNgu6lZTdy9Dlp/NecPekzRmZEM 9 | WiGXGkKNeuo8PsnGJHP9Qg== 10 | -----END CERTIFICATE----- 11 | -------------------------------------------------------------------------------- /test/testx509.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBWzCCAQYCARgwDQYJKoZIhvcNAQEEBQAwODELMAkGA1UEBhMCQVUxDDAKBgNV 3 | BAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3JzYSB0ZXN0IENBMB4XDTk1MDYxOTIz 4 | MzMxMloXDTk1MDcxNzIzMzMxMlowOjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FM 5 | RDEdMBsGA1UEAxMUU1NMZWF5L3JzYSB0ZXN0IGNlcnQwXDANBgkqhkiG9w0BAQEF 6 | AANLADBIAkEAqtt6qS5GTxVxGZYWa0/4u+IwHf7p2LNZbcPBp9/OfIcYAXBQn8hO 7 | /Re1uwLKXdCjIoaGs4DLdG88rkzfyK5dPQIDAQABMAwGCCqGSIb3DQIFBQADQQAE 8 | Wc7EcF8po2/ZO6kNCwK/ICH6DobgLekA5lSLr5EvuioZniZp5lFzAw4+YzPQ7XKJ 9 | zl9HYIMxATFyqSiD9jsx 10 | -----END CERTIFICATE----- 11 | -------------------------------------------------------------------------------- /crypto/des/times/686-200.fre: -------------------------------------------------------------------------------- 1 | Pentium 100 2 | Free BSD 2.1.5 kernel 3 | gcc 2.7.2.2 -O3 -fomit-frame-pointer 4 | options des ecb/s 5 | assember 578000.00 133.1% 6 | 16 r2 i 434454.80 100.0% 7 | 16 r1 i 433621.43 99.8% 8 | 16 r2 p 431375.69 99.3% 9 | 4 r1 i 423722.30 97.5% 10 | 4 r2 i 422399.40 97.2% 11 | 16 r1 p 421739.40 97.1% 12 | 16 c i 399027.94 91.8% 13 | 16 c p 372251.70 85.7% 14 | 4 c i 365118.35 84.0% 15 | 4 c p 352880.51 81.2% 16 | 4 r2 p 255104.90 58.7% 17 | 4 r1 p 251289.18 57.8% 18 | -DDES_UNROLL -DDES_RISC2 19 | -------------------------------------------------------------------------------- /doc/ssl/SSL_get_SSL_CTX.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_get_SSL_CTX - get the SSL_CTX from which an SSL is created 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl); 12 | 13 | =head1 DESCRIPTION 14 | 15 | SSL_get_SSL_CTX() returns a pointer to the SSL_CTX object, from which 16 | B was created with L. 17 | 18 | =head1 RETURN VALUES 19 | 20 | The pointer to the SSL_CTX object is returned. 21 | 22 | =head1 SEE ALSO 23 | 24 | L, L 25 | 26 | =cut 27 | -------------------------------------------------------------------------------- /ms/do_win64a.bat: -------------------------------------------------------------------------------- 1 | perl util\mkfiles.pl >MINFO 2 | 3 | cmd /c "nasm -f win64 -v" >NUL 2>&1 4 | if %errorlevel% neq 0 goto ml64 5 | 6 | perl ms\uplink-x86_64.pl nasm > ms\uptable.asm 7 | nasm -f win64 -o ms\uptable.obj ms\uptable.asm 8 | goto proceed 9 | 10 | :ml64 11 | perl ms\uplink-x86_64.pl masm > ms\uptable.asm 12 | ml64 -c -Foms\uptable.obj ms\uptable.asm 13 | 14 | :proceed 15 | perl util\mk1mf.pl VC-WIN64A >ms\nt.mak 16 | perl util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak 17 | 18 | perl util\mkdef.pl 32 libeay > ms\libeay32.def 19 | perl util\mkdef.pl 32 ssleay > ms\ssleay32.def 20 | -------------------------------------------------------------------------------- /doc/crypto/ERR_clear_error.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | ERR_clear_error - clear the error queue 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | void ERR_clear_error(void); 12 | 13 | =head1 DESCRIPTION 14 | 15 | ERR_clear_error() empties the current thread's error queue. 16 | 17 | =head1 RETURN VALUES 18 | 19 | ERR_clear_error() has no return value. 20 | 21 | =head1 SEE ALSO 22 | 23 | L, L 24 | 25 | =head1 HISTORY 26 | 27 | ERR_clear_error() is available in all versions of SSLeay and OpenSSL. 28 | 29 | =cut 30 | -------------------------------------------------------------------------------- /ms/certU.ss: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBcTCCARsCARwwDQYJKoZIhvcNAQEEBQAwOTELMAkGA1UEBhMCQVUxFzAVBgNV 3 | BAoTDkRvZGd5IEJyb3RoZXJzMREwDwYDVQQDEwhEb2RneSBDQTAeFw05ODA3MjEw 4 | NjUwMjdaFw05ODA4MjAwNjUwMjdaME4xCzAJBgNVBAYTAkFVMRcwFQYDVQQKEw5E 5 | b2RneSBCcm90aGVyczESMBAGA1UEAxMJQnJvdGhlciAxMRIwEAYDVQQDEwlCcm90 6 | aGVyIDIwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA0e4qorOr/zuLB9NvRaXhJVaI 7 | HaGGasa7eMAjVPitWAXkN+DxXiGH1CnMgQraKiYzsEVP15xtxkevEvK5jJpOwwID 8 | AQABMA0GCSqGSIb3DQEBBAUAA0EAZhcPV+SWwaszFuDTYc6fUurcV9OeXUqoxSQy 9 | MnLZPTyWubHbbkUr9fUfdf7Cc7dFqGzag05VHkNQUS9VjMzjIQ== 10 | -----END CERTIFICATE----- 11 | -------------------------------------------------------------------------------- /VMS/TODO: -------------------------------------------------------------------------------- 1 | TODO: 2 | ===== 3 | 4 | There are a few things that need to be worked out in the VMS version of 5 | OpenSSL, still: 6 | 7 | - Description files. ("Makefile's" :-)) 8 | - Script code to link an already compiled build tree. 9 | - A VMSINSTALlable version (way in the future, unless someone else hacks). 10 | - shareable images (DLL for you Windows folks). 11 | 12 | There may be other things that I have missed and that may be desirable. 13 | Please send mail to or to me directly if you 14 | have any ideas. 15 | 16 | -- 17 | Richard Levitte 18 | 1999-05-24 19 | -------------------------------------------------------------------------------- /ms/32all.bat: -------------------------------------------------------------------------------- 1 | set OPTS=no-asm 2 | 3 | perl Configure VC-WIN32 4 | perl util\mkfiles.pl >MINFO 5 | perl util\mk1mf.pl %OPTS% debug VC-WIN32 >d32.mak 6 | perl util\mk1mf.pl %OPTS% VC-WIN32 >32.mak 7 | perl util\mk1mf.pl %OPTS% debug dll VC-WIN32 >d32dll.mak 8 | perl util\mk1mf.pl %OPTS% dll VC-WIN32 >32dll.mak 9 | perl util\mkdef.pl 32 libeay > ms\libeay32.def 10 | perl util\mkdef.pl 32 ssleay > ms\ssleay32.def 11 | 12 | nmake -f d32.mak 13 | @if errorlevel 1 goto end 14 | nmake -f 32.mak 15 | @if errorlevel 1 goto end 16 | nmake -f d32dll.mak 17 | @if errorlevel 1 goto end 18 | nmake -f 32dll.mak 19 | 20 | :end 21 | -------------------------------------------------------------------------------- /shlib/svr5-shared-installed: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | major="0" 4 | minor="9.7b" 5 | 6 | slib=libssl 7 | sh_slib=$slib.so.$major.$minor 8 | 9 | clib=libcrypto 10 | sh_clib=$clib.so.$major.$minor 11 | 12 | # If you want them in /usr/local/lib then change INSTALLTOP to point there. 13 | #INSTALLTOP=/usr/local/ssl/lib 14 | INSTALLTOP=/usr/local/lib 15 | 16 | cp -p $sh_clib $INSTALLTOP 17 | cp -p $sh_slib $INSTALLTOP 18 | 19 | PWD=`pwd` 20 | cd $INSTALLTOP 21 | rm -f $INSTALLTOP/$clib.so 22 | ln -s $INSTALLTOP/$sh_clib $clib.so 23 | 24 | rm -f $INSTALLTOP/$slib.so 25 | ln -s $INSTALLTOP/$sh_slib $slib.so 26 | 27 | cd $PWD 28 | -------------------------------------------------------------------------------- /shlib/sco5-shared-installed: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | major="0" 4 | minor="9.7b" 5 | 6 | slib=libssl 7 | sh_slib=$slib.so.$major.$minor 8 | 9 | clib=libcrypto 10 | sh_clib=$clib.so.$major.$minor 11 | 12 | # If you want them in /usr/local/lib then change INSTALLTOP to point there. 13 | #INSTALLTOP=/usr/local/ssl/lib 14 | INSTALLTOP=/usr/local/lib 15 | 16 | cp -p $sh_clib $INSTALLTOP 17 | cp -p $sh_slib $INSTALLTOP 18 | 19 | PWD=`pwd` 20 | cd $INSTALLTOP 21 | rm -f $INSTALLTOP/$clib.so 22 | ln -s $INSTALLTOP/$sh_clib $clib.so 23 | 24 | rm -f $INSTALLTOP/$slib.so 25 | ln -s $INSTALLTOP/$sh_slib $slib.so 26 | 27 | cd $PWD 28 | 29 | -------------------------------------------------------------------------------- /demos/ssltest-ecc/README: -------------------------------------------------------------------------------- 1 | Scripts for using ECC ciphersuites with test/testssl 2 | (these ciphersuites are described in the Internet Draft available at 3 | http://www.ietf.org/internet-drafts/draft-ietf-tls-ecc-03.txt). 4 | 5 | Use ECCcertgen.sh, RSAcertgen.sh, ECC-RSAcertgen.sh to generate 6 | root, client and server certs of the following types: 7 | 8 | ECC certs signed with ECDSA 9 | RSA certs signed with RSA 10 | ECC certs signed with RSA 11 | 12 | Afterwards, you can use ssltest.sh to run the various tests; 13 | specify one of the following options: 14 | 15 | aecdh, ecdh-ecdsa, ecdhe-ecdsa, ecdh-rsa, ecdhe-rsa 16 | -------------------------------------------------------------------------------- /shlib/win32dll.bat: -------------------------------------------------------------------------------- 1 | rem win32 dll build 2 | 3 | set OPTIONS1=-DDES_ASM -DBN_ASM -DBF_ASM -DFLAT_INC -Iout -Itmp -DL_ENDIAN 4 | set OPTIONS2=/W3 /WX /Ox /Gf /nologo 5 | 6 | set OPTIONS=%OPTIONS1% %OPTIONS2% 7 | 8 | cl /Felibeay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\libeay32.def crypto\crypto.c crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib ws2_32.lib 9 | 10 | cl /Fessleay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\ssleay32.def ssl\ssl.c libeay32.lib 11 | 12 | cl /Fessleay.exe /MD -DWIN32 %OPTIONS% apps\eay.c ssleay32.lib libeay32.lib user32.lib ws2_32.lib 13 | 14 | -------------------------------------------------------------------------------- /apps/dh2048.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIIBCAKCAQEA9kJXtwh/CBdyorrWqULzBej5UxE5T7bxbrlLOCDaAadWoxTpj0BV 3 | 89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N286Z4VeSWc39uK50 4 | T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/RgBYK+X0iP1YTknb 5 | zSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2Ou1WMuF040zT9fBdX 6 | Q6MdGGzeMyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqVDNmWn6vQClCbAkbT 7 | CD1mpF1Bn5x8vYlLIhkmuquiXsNV6TILOwIBAg== 8 | -----END DH PARAMETERS----- 9 | 10 | These are the 2048 bit DH parameters from "Assigned Number for SKIP Protocols" 11 | (http://www.skip-vpn.org/spec/numbers.html). 12 | See there for how they were generated. 13 | -------------------------------------------------------------------------------- /doc/crypto/RSA_size.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | RSA_size - get RSA modulus size 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int RSA_size(const RSA *rsa); 12 | 13 | =head1 DESCRIPTION 14 | 15 | This function returns the RSA modulus size in bytes. It can be used to 16 | determine how much memory must be allocated for an RSA encrypted 17 | value. 18 | 19 | Bn> must not be B. 20 | 21 | =head1 RETURN VALUE 22 | 23 | The size in bytes. 24 | 25 | =head1 SEE ALSO 26 | 27 | L 28 | 29 | =head1 HISTORY 30 | 31 | RSA_size() is available in all versions of SSLeay and OpenSSL. 32 | 33 | =cut 34 | -------------------------------------------------------------------------------- /engines/engine_vector.mar: -------------------------------------------------------------------------------- 1 | ; 2 | ; Transfer vector for VAX shareable image 3 | ; 4 | .TITLE ENGINE 5 | .IDENT /ENGINE/ 6 | ; 7 | ; Define macro to assist in building transfer vector entries. Each entry 8 | ; should take no more than 8 bytes. 9 | ; 10 | .MACRO FTRANSFER_ENTRY routine 11 | .ALIGN QUAD 12 | .TRANSFER routine 13 | .MASK routine 14 | JMP routine+2 15 | .ENDM FTRANSFER_ENTRY 16 | ; 17 | ; Place entries in own program section. 18 | ; 19 | .PSECT $$ENGINE,QUAD,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT 20 | ENGINE_xfer: 21 | FTRANSFER_ENTRY bind_engine 22 | FTRANSFER_ENTRY v_check 23 | .BLKB 32768-<.-ENGINE_xfer> ; 64 pages total. 24 | .END 25 | -------------------------------------------------------------------------------- /crypto/des/t/test: -------------------------------------------------------------------------------- 1 | #!./perl 2 | 3 | BEGIN { push(@INC, qw(../../../lib ../../lib ../lib lib)); } 4 | 5 | use DES; 6 | 7 | $key='00000000'; 8 | $ks=DES::set_key($key); 9 | @a=split(//,$ks); 10 | foreach (@a) { printf "%02x-",ord($_); } 11 | print "\n"; 12 | 13 | 14 | $key=DES::random_key(); 15 | print "($_)\n"; 16 | @a=split(//,$key); 17 | foreach (@a) { printf "%02x-",ord($_); } 18 | print "\n"; 19 | $str="this is and again into the breach"; 20 | ($k1,$k2)=DES::string_to_2keys($str); 21 | @a=split(//,$k1); 22 | foreach (@a) { printf "%02x-",ord($_); } 23 | print "\n"; 24 | @a=split(//,$k2); 25 | foreach (@a) { printf "%02x-",ord($_); } 26 | print "\n"; 27 | 28 | -------------------------------------------------------------------------------- /util/err-ins.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | # 3 | # tack error codes onto the end of a file 4 | # 5 | 6 | open(ERR,$ARGV[0]) || die "unable to open error file '$ARGV[0]':$!\n"; 7 | @err=; 8 | close(ERR); 9 | 10 | open(IN,$ARGV[1]) || die "unable to open header file '$ARGV[1]':$!\n"; 11 | 12 | @out=""; 13 | while () 14 | { 15 | push(@out,$_); 16 | last if /BEGIN ERROR CODES/; 17 | } 18 | close(IN); 19 | 20 | open(OUT,">$ARGV[1]") || die "unable to open header file '$ARGV[1]':$1\n"; 21 | print OUT @out; 22 | print OUT @err; 23 | print OUT <<"EOF"; 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif 29 | 30 | EOF 31 | close(OUT); 32 | 33 | 34 | -------------------------------------------------------------------------------- /apps/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBoDCCAUoCAQAwDQYJKoZIhvcNAQEEBQAwYzELMAkGA1UEBhMCQVUxEzARBgNV 3 | BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMSMwIQYD 4 | VQQDExpTZXJ2ZXIgdGVzdCBjZXJ0ICg1MTIgYml0KTAeFw05NzA5MDkwMzQxMjZa 5 | Fw05NzEwMDkwMzQxMjZaMF4xCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0 6 | YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxFzAVBgNVBAMT 7 | DkVyaWMgdGhlIFlvdW5nMFEwCQYFKw4DAgwFAANEAAJBALVEqPODnpI4rShlY8S7 8 | tB713JNvabvn6Gned7zylwLLiXQAo/PAT6mfdWPTyCX9RlId/Aroh1ou893BA32Q 9 | sggwDQYJKoZIhvcNAQEEBQADQQCU5SSgapJSdRXJoX+CpCvFy+JVh9HpSjCpSNKO 10 | 19raHv98hKAUJuP9HyM+SUsffO6mAIgitUaqW8/wDMePhEC3 11 | -----END CERTIFICATE----- 12 | -------------------------------------------------------------------------------- /engines/ccgost/gost2001_keyx.h: -------------------------------------------------------------------------------- 1 | GOST_KEY_TRANSPORT *make_rfc4490_keytransport_2001(EVP_PKEY *pubk, 2 | BIGNUM *eph_key, 3 | const unsigned char *key, 4 | size_t keylen, 5 | unsigned char *ukm, 6 | size_t ukm_len); 7 | 8 | int decrypt_rfc4490_shared_key_2001(EVP_PKEY *priv, 9 | GOST_KEY_TRANSPORT * gkt, 10 | unsigned char *key_buf, int key_buf_len); 11 | -------------------------------------------------------------------------------- /apps/req.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBlzCCAVcCAQAwXjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx 3 | ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMORXJp 4 | YyB0aGUgWW91bmcwge8wgaYGBSsOAwIMMIGcAkEA+ZiKEvZmc9MtnaFZh4NiZ3oZ 5 | S4J1PHvPrm9MXj5ntVheDPkdmBDTncyaGAJcMjwsyB/GvLDGd6yGCw/8eF+09wIV 6 | AK3VagOxGd/Q4Af5NbxR5FB7CXEjAkA2t/q7HgVLi0KeKvcDG8BRl3wuy7bCvpjg 7 | tWiJc/tpvcuzeuAayH89UofjAGueKjXDADiRffvSdhrNw5dkqdqlA0QAAkEAtUSo 8 | 84OekjitKGVjxLu0HvXck29pu+foad53vPKXAsuJdACj88BPqZ91Y9PIJf1GUh38 9 | CuiHWi7z3cEDfZCyCKAAMAkGBSsOAwIbBQADLwAwLAIUTg8amKVBE9oqC5B75dDQ 10 | Chy3LdQCFHKodGEj3LjuTzdm/RTe2KZL9Uzf 11 | -----END CERTIFICATE REQUEST----- 12 | -------------------------------------------------------------------------------- /demos/cms/comp.txt: -------------------------------------------------------------------------------- 1 | Content-type: text/plain 2 | 3 | Some Text To be Compressed 4 | Some Text To be Compressed 5 | Some Text To be Compressed 6 | Some Text To be Compressed 7 | Some Text To be Compressed 8 | Some Text To be Compressed 9 | Some Text To be Compressed 10 | Some Text To be Compressed 11 | Some Text To be Compressed 12 | Some Text To be Compressed 13 | Some Text To be Compressed 14 | Some Text To be Compressed 15 | Some Text To be Compressed 16 | Some Text To be Compressed 17 | Some Text To be Compressed 18 | Some Text To be Compressed 19 | Some Text To be Compressed 20 | Some Text To be Compressed 21 | Some Text To be Compressed 22 | Some Text To be Compressed 23 | -------------------------------------------------------------------------------- /doc/README: -------------------------------------------------------------------------------- 1 | 2 | README This file 3 | 4 | fingerprints.txt 5 | PGP fingerprints of authoried release signers 6 | 7 | standards.txt 8 | Pointers to standards, RFC's and IETF Drafts that are 9 | related to OpenSSL. Incomplete. 10 | 11 | HOWTO/ 12 | A few how-to documents; not necessarily up-to-date 13 | apps/ 14 | The openssl command-line tools; start with openssl.pod 15 | ssl/ 16 | The SSL library; start with ssl.pod 17 | crypto/ 18 | The cryptographic library; start with crypto.pod 19 | 20 | Formatted versions of the manpages (apps,ssl,crypto) can be found at 21 | https://www.openssl.org/docs/manpages.html 22 | -------------------------------------------------------------------------------- /apps/ca-req.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBmTCCAQICAQAwWzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQx 3 | GjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYDVQQDExJUZXN0IENBICgx 4 | MDI0IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKO7o8t116VP6cgy 5 | bTsZDCZhr95nYlZuya3aCi1IKoztqwWnjbmDFIriOqGFPrZQ+moMETC9D59iRW/d 6 | FXSv1F65ka/XY2hLh9exCCo7XuUcDs53Qp3bI3AmMqHjgzE8oO3ajyJAzJkTTOUe 7 | cQU2mw/gI4tMM0LqWMQS7luTy4+xAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAKlk7 8 | cxu9gCJN3/iQFyJXQ6YphaiQAT5VBXTx9ftRrQIjA3vxlDzPWGDy+V5Tqa7h8PtR 9 | 5Bn00JShII2zf0hjyjKils6x/UkWmjEiwSiFp4hR70iE8XwSNEHY2P6j6nQEIpgW 10 | kbfgmmUqk7dl2V+ossTJ80B8SBpEhrn81V/cHxA= 11 | -----END CERTIFICATE REQUEST----- 12 | -------------------------------------------------------------------------------- /apps/pca-req.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBmjCCAQMCAQAwXDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQx 3 | GjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYDVQQDExNUZXN0IFBDQSAo 4 | MTAyNCBiaXQpMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdoWk/3+WcMlfj 5 | Irkg40ketmnQaEogQe1LLcuOJV6rKfUSAsPgwgsabJ/wn8TxA1yy3eKJbFl3OiUX 6 | MRsp22Jp85PmemiDzyUIStwk72qhp1imbANZvlmlCFKiQrjUyuDfu4TABmn+kkt3 7 | vR1YBEOGt+IFye1UBVSATVdRJ2UVhwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAEzz 8 | IG8NnfpnPTQSCN5zJhOfy6p9AcDyQzuJirYv1HR/qoYWalPh/U2uiK0lAim7qMcv 9 | wOlK3I7A8B7/4dLqvIqgtUj9b1WT8zIrnwdvJI4osLI2BY+c1pVlp174DHLMol1L 10 | Cl1e3N5BTm7lCitTYjuUhsw6hiA8IcdNKDo6sktV 11 | -----END CERTIFICATE REQUEST----- 12 | -------------------------------------------------------------------------------- /crypto/des/times/586-100.lnx: -------------------------------------------------------------------------------- 1 | Pentium 100 2 | Linux 2 kernel 3 | gcc 2.7.0 -O3 -fomit-frame-pointer 4 | No X server running, just a console, it makes the top speed jump from 151,000 5 | to 158,000 :-). 6 | options des ecb/s 7 | assember 281000.00 177.1% 8 | 16 r1 p 158667.40 100.0% 9 | 16 r1 i 148471.70 93.6% 10 | 16 r2 p 143961.80 90.7% 11 | 16 r2 i 141689.20 89.3% 12 | 4 r1 i 140100.00 88.3% 13 | 4 r2 i 134049.40 84.5% 14 | 16 c i 124145.20 78.2% 15 | 16 c p 121584.20 76.6% 16 | 4 c i 118116.00 74.4% 17 | 4 r2 p 117977.90 74.4% 18 | 4 c p 114971.40 72.5% 19 | 4 r1 p 114578.40 72.2% 20 | -DDES_UNROLL -DDES_RISC1 -DDES_PTR 21 | -------------------------------------------------------------------------------- /test/ocsp-tests/ND1.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBSIRFH/UCpp 2 | Xi2I9CG62QzyzsvqfBgPMjAxMjEwMTEwODQxMTNaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FEi2DTgjjfhFbk7lhD6jlBEYApefBBSIRFH/UCppXi2I9CG62QzyzsvqfAIQIuEz 4 | IiCgSN8psr+aMcKbB4AAGA8yMDEyMTAxMTA4NDExM1qgERgPMjAxMjEwMTUwODQx 5 | MTNaMA0GCSqGSIb3DQEBBQUAA4IBAQCNnhlBMxxh9z5AKfzAxiKs90CfxUsqfYfk 6 | 8XlyF9VIfWRfEwzS6MF1pEzLnghRxTAmjrFgK+sxD9wk+S5Mdgw3nbED9DVFH2Hs 7 | RGKm/t9wkvrYOX6yRQqw6uRvU/5cibMjcyzKB/VQMwk4p4FwSUgBv88A5sTkKr2V 8 | eYdEm34hg2TZVkipPMBiyTyBLXs8D/9oALtnczg4xlTRSjDUvqoXL5haqY4QK2Pv 9 | mNwna6ACkwLmSuMe29UQ8IX2PUB4R5Etni5czyiKGxZLm+4NAhuEwWFNEzCyImPc 10 | 087gHGU1zx+qVSlajqMJ/9ZXYjbt7WiWdhOTGEv4VMn8dHhRUs32 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/ND2.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBQLWOWLxkwV 2 | N6RAqTCpIb5HNlpW/xgPMjAxMjEwMTAyMzAzMTlaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FOy+ZAvtiWulchtVZmfKU1ZI9ewTBBQLWOWLxkwVN6RAqTCpIb5HNlpW/wIQEaO0 4 | 0OyNt3+doM1dLVEvQoAAGA8yMDEyMTAxMDIzMDMxOVqgERgPMjAxMjEwMTQyMzAz 5 | MTlaMA0GCSqGSIb3DQEBBQUAA4IBAQCHn2nGfEUX/EJruMkTgh7GgB0u9cpAepaD 6 | sPv9gtl3KLUZyR+NbGMIa5/bpoJp0yg1z5VL6CLMusy3AF6Cn2fyaioDxG+yc+gA 7 | PcPFdEqiIMr+TP8s7qcEiE6WZddSSCqCn90VZSCWkpDhnCjDRwJLBBPU3803fdMz 8 | oguvyr7y6Koxik8X/iUe8EpSzAvmm4GZL3veTI+x7IezJSrhCS9zM0ZHjySjoDxC 9 | +ljGH0EuWPTmFEqZVGIq3cuahIYzKItUbYnXU6ipi/2p42qbsFeok7eEN0EYsY1a 10 | vRATHGRmU7Q5HLCq4rQtZC1cis52Mvc9x1W4z/Gt5A3FtgElXXNA 11 | -------------------------------------------------------------------------------- /util/do_ms.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # generate the Microsoft makefiles and .def files 4 | # 5 | 6 | PATH=util:../util:$PATH 7 | 8 | # perl util/mk1mf.pl no-sock VC-MSDOS >ms/msdos.mak 9 | # perl util/mk1mf.pl VC-W31-32 >ms/w31.mak 10 | perl util/mk1mf.pl dll VC-WIN16 >ms/w31dll.mak 11 | # perl util/mk1mf.pl VC-WIN32 >ms/nt.mak 12 | perl util/mk1mf.pl dll VC-WIN32 >ms/ntdll.mak 13 | perl util/mk1mf.pl Mingw32 >ms/mingw32.mak 14 | perl util/mk1mf.pl Mingw32-files >ms/mingw32f.mak 15 | 16 | perl util/mkdef.pl 16 libeay > ms/libeay16.def 17 | perl util/mkdef.pl 32 libeay > ms/libeay32.def 18 | perl util/mkdef.pl 16 ssleay > ms/ssleay16.def 19 | perl util/mkdef.pl 32 ssleay > ms/ssleay32.def 20 | -------------------------------------------------------------------------------- /apps/s1024req.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBojCCAQsCAQAwZDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQx 3 | GjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMSQwIgYDVQQDExtTZXJ2ZXIgdGVz 4 | dCBjZXJ0ICgxMDI0IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALMR 5 | 9TwT5kZMa0ddXleG8zYuDfZ9dQiPJ1dvfgEZU9fqg3v5o1VL15ZrK9b/73+9RvRo 6 | KqKUmukV6yAi1XZPxWGGM4T75dTPjq42lwxTvAcwQBdS58+nO2kWbxkSTa0Uq9p2 7 | RJKg3yVvXWO69lWRKQ+UHrmkWFJ7hApKnongeuRjAgMBAAEwDQYJKoZIhvcNAQEE 8 | BQADgYEAStHlk4pBbwiNeQ2/PKTPPXzITYC8Gn0XMbrU94e/6JIKiO7aArq9Espq 9 | nrBSvC14dHcNl6NNvnkEKdQ7hAkcACfBbnOXA/oQvMBd4GD78cH3k0jVDoVUEjil 10 | frLfWlckW6WzpTktt0ZPDdAjJCmKVh0ABHimi7Bo9FC3wIGIe5M= 11 | -----END CERTIFICATE REQUEST----- 12 | -------------------------------------------------------------------------------- /test/asn1test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | typedef struct X { 5 | STACK_OF(X509_EXTENSION) *ext; 6 | } X; 7 | 8 | /* This isn't meant to run particularly, it's just to test type checking */ 9 | int main(int argc, char **argv) 10 | { 11 | X *x = NULL; 12 | unsigned char **pp = NULL; 13 | 14 | M_ASN1_I2D_vars(x); 15 | M_ASN1_I2D_len_SEQUENCE_opt_type(X509_EXTENSION, x->ext, 16 | i2d_X509_EXTENSION); 17 | M_ASN1_I2D_seq_total(); 18 | M_ASN1_I2D_put_SEQUENCE_opt_type(X509_EXTENSION, x->ext, 19 | i2d_X509_EXTENSION); 20 | M_ASN1_I2D_finish(); 21 | } 22 | -------------------------------------------------------------------------------- /test/ocsp-tests/ISOP_ND1.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBSIRFH/UCpp 2 | Xi2I9CG62QzyzsvqfBgPMjAxMjEwMTAwODU0NDVaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FEi2DTgjjfhFbk7lhD6jlBEYApefBBSIRFH/UCppXi2I9CG62QzyzsvqfAIQIuEz 4 | IiCgSN8psr+aMcKbB4AAGA8yMDEyMTAxMDA4NTQ0NVqgERgPMjAxMjEwMTQwODU0 5 | NDVaMA0GCSqGSIb3DQEBBQUAA4IBAQDHKDxWTbAHRXY7HapfhE99T+OSa/AfRYqX 6 | H9yIeMRa5VftXMyvBFuvVm/qLRwK6mxhkiVIvF/Pk5yxMjbm7xPO26D+WHOdQML4 7 | +M4OX9BO76FjZRin5x+4b0Xo5SuSU1ulqfvSZnx+nG+hMbt/3Y7ODCEUWCYFoXNp 8 | U+TXTbv2mwJ9AL8Q/zjL4P8NJHzFJBKjEs+AAVRxTY/5RHHKU9dcm7ux/gsWoDUM 9 | w677Xxzn6icd8mqn72/HmzPnMrLHKKJFe2escbJn7JlV6qbZ9EWbrr+3OH0IJy5I 10 | E3LcPIsNZ//QEc6vS6J+j8ljV8Xne6rS1EmiOwV9NgubvYwDCm4R 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/ISOP_ND2.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBQLWOWLxkwV 2 | N6RAqTCpIb5HNlpW/xgPMjAxMjEwMTAwMDI1NTdaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FOy+ZAvtiWulchtVZmfKU1ZI9ewTBBQLWOWLxkwVN6RAqTCpIb5HNlpW/wIQEaO0 4 | 0OyNt3+doM1dLVEvQoAAGA8yMDEyMTAxMDAwMjU1N1qgERgPMjAxMjEwMTQwMDI1 5 | NTdaMA0GCSqGSIb3DQEBBQUAA4IBAQCJRXcrz4wJe7bqWBHULu/QDXVz74OhSNlu 6 | swI0J4h+UmzJuW1GpdhTwJcTG3ARVwCLKz3evvpvHSumcsop0G3NolryNLP/oGD0 7 | Vf6PbLrJ8v+NxUNugPbtWM985Ti/B2a+XjbzYlH2vS3KOTL4X1zWSL07IQFNXc2h 8 | yHBscKpYgt0mZcFZFxN3NTCNpT6IjJzZzTG9xTYZ3hZdMQQ3DYO+/Hv4J+U1/Ybq 9 | CjuMWRak/0R/BiBDJdGhbThlvV7bNUxYY7DVaOiLER8ptpmhnzlB/vsTAxZqX48J 10 | mJdv2bxoTby98Pm/BMydEA9qcFqyP1XvqhzIY35ngoS/1XREyW7t 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/ND3.ors: -------------------------------------------------------------------------------- 1 | MIIB1AoBAKCCAc0wggHJBgkrBgEFBQcwAQEEggG6MIIBtjCBn6IWBBStvZh6NLQm 2 | 9/rEJlTvA73gJMtUGhgPMjAxMjEwMTExMTM2NDdaMHQwcjBKMAkGBSsOAwIaBQAE 3 | FHyxZlScq9tE7mImFq30ZXv3etWUBBStvZh6NLQm9/rEJlTvA73gJMtUGgIRAKcN 4 | bJWejX5BTb8DmevkCauAABgPMjAxMjEwMTExMTM2NDdaoBEYDzIwMTIxMDE1MTEz 5 | NjQ3WjANBgkqhkiG9w0BAQUFAAOCAQEAfnj3nh6z+USW6VlDWRytWpNmC1ZRwWlg 6 | P2+G4UF4HE8bMJkuiFLcZEVYTxlTYv+xAEpSFxdInFM2Q5C+O6pWOZ9NbikeR4oZ 7 | FTI1kAZ0Uw+YMpVM4ztvKBIpUSqlbi69iNJ9WGF6qzxVeqobSOyrjjwtTsuglUbR 8 | +mshp/SP7Br2IIK+KM1vgsmVExPfGPYANyk7ki/Q8uUnjqkreeSa9WC2iJLGcybW 9 | YavDhYWALebUGukNeedkloYhdjPboPPxDkKNjakwIG8EkbJK7uXewMOHHOFvFTX3 10 | K388me8u5iQf4f3fj6ilEgs6f5Szzmb+vklPX0zIny/TVk2+Az7HmA== 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WIKH_ND1.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBSIRFH/UCpp 2 | Xi2I9CG62QzyzsvqfBgPMjAxMjEwMTEwODQxMTNaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FEi2DTgjjfhFbk7lhD6jlBEYApefBBSJRFH/UCppXi2I9CG62QzyzsvqfAIQIuEz 4 | IiCgSN8psr+aMcKbB4AAGA8yMDEyMTAxMTA4NDExM1qgERgPMjAxMjEwMTUwODQx 5 | MTNaMA0GCSqGSIb3DQEBBQUAA4IBAQCNnhlBMxxh9z5AKfzAxiKs90CfxUsqfYfk 6 | 8XlyF9VIfWRfEwzS6MF1pEzLnghRxTAmjrFgK+sxD9wk+S5Mdgw3nbED9DVFH2Hs 7 | RGKm/t9wkvrYOX6yRQqw6uRvU/5cibMjcyzKB/VQMwk4p4FwSUgBv88A5sTkKr2V 8 | eYdEm34hg2TZVkipPMBiyTyBLXs8D/9oALtnczg4xlTRSjDUvqoXL5haqY4QK2Pv 9 | mNwna6ACkwLmSuMe29UQ8IX2PUB4R5Etni5czyiKGxZLm+4NAhuEwWFNEzCyImPc 10 | 087gHGU1zx+qVSlajqMJ/9ZXYjbt7WiWdhOTGEv4VMn8dHhRUs32 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WIKH_ND2.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBQLWOWLxkwV 2 | N6RAqTCpIb5HNlpW/xgPMjAxMjEwMTAyMzAzMTlaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FOy+ZAvtiWulchtVZmfKU1ZI9ewTBBQMWOWLxkwVN6RAqTCpIb5HNlpW/wIQEaO0 4 | 0OyNt3+doM1dLVEvQoAAGA8yMDEyMTAxMDIzMDMxOVqgERgPMjAxMjEwMTQyMzAz 5 | MTlaMA0GCSqGSIb3DQEBBQUAA4IBAQCHn2nGfEUX/EJruMkTgh7GgB0u9cpAepaD 6 | sPv9gtl3KLUZyR+NbGMIa5/bpoJp0yg1z5VL6CLMusy3AF6Cn2fyaioDxG+yc+gA 7 | PcPFdEqiIMr+TP8s7qcEiE6WZddSSCqCn90VZSCWkpDhnCjDRwJLBBPU3803fdMz 8 | oguvyr7y6Koxik8X/iUe8EpSzAvmm4GZL3veTI+x7IezJSrhCS9zM0ZHjySjoDxC 9 | +ljGH0EuWPTmFEqZVGIq3cuahIYzKItUbYnXU6ipi/2p42qbsFeok7eEN0EYsY1a 10 | vRATHGRmU7Q5HLCq4rQtZC1cis52Mvc9x1W4z/Gt5A3FtgElXXNA 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WINH_ND1.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBSIRFH/UCpp 2 | Xi2I9CG62QzyzsvqfBgPMjAxMjEwMTEwODQxMTNaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FEm2DTgjjfhFbk7lhD6jlBEYApefBBSIRFH/UCppXi2I9CG62QzyzsvqfAIQIuEz 4 | IiCgSN8psr+aMcKbB4AAGA8yMDEyMTAxMTA4NDExM1qgERgPMjAxMjEwMTUwODQx 5 | MTNaMA0GCSqGSIb3DQEBBQUAA4IBAQCNnhlBMxxh9z5AKfzAxiKs90CfxUsqfYfk 6 | 8XlyF9VIfWRfEwzS6MF1pEzLnghRxTAmjrFgK+sxD9wk+S5Mdgw3nbED9DVFH2Hs 7 | RGKm/t9wkvrYOX6yRQqw6uRvU/5cibMjcyzKB/VQMwk4p4FwSUgBv88A5sTkKr2V 8 | eYdEm34hg2TZVkipPMBiyTyBLXs8D/9oALtnczg4xlTRSjDUvqoXL5haqY4QK2Pv 9 | mNwna6ACkwLmSuMe29UQ8IX2PUB4R5Etni5czyiKGxZLm+4NAhuEwWFNEzCyImPc 10 | 087gHGU1zx+qVSlajqMJ/9ZXYjbt7WiWdhOTGEv4VMn8dHhRUs32 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WINH_ND2.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBQLWOWLxkwV 2 | N6RAqTCpIb5HNlpW/xgPMjAxMjEwMTAyMzAzMTlaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FO2+ZAvtiWulchtVZmfKU1ZI9ewTBBQLWOWLxkwVN6RAqTCpIb5HNlpW/wIQEaO0 4 | 0OyNt3+doM1dLVEvQoAAGA8yMDEyMTAxMDIzMDMxOVqgERgPMjAxMjEwMTQyMzAz 5 | MTlaMA0GCSqGSIb3DQEBBQUAA4IBAQCHn2nGfEUX/EJruMkTgh7GgB0u9cpAepaD 6 | sPv9gtl3KLUZyR+NbGMIa5/bpoJp0yg1z5VL6CLMusy3AF6Cn2fyaioDxG+yc+gA 7 | PcPFdEqiIMr+TP8s7qcEiE6WZddSSCqCn90VZSCWkpDhnCjDRwJLBBPU3803fdMz 8 | oguvyr7y6Koxik8X/iUe8EpSzAvmm4GZL3veTI+x7IezJSrhCS9zM0ZHjySjoDxC 9 | +ljGH0EuWPTmFEqZVGIq3cuahIYzKItUbYnXU6ipi/2p42qbsFeok7eEN0EYsY1a 10 | vRATHGRmU7Q5HLCq4rQtZC1cis52Mvc9x1W4z/Gt5A3FtgElXXNA 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WRID_ND1.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBSJRFH/UCpp 2 | Xi2I9CG62QzyzsvqfBgPMjAxMjEwMTEwODQxMTNaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FEi2DTgjjfhFbk7lhD6jlBEYApefBBSIRFH/UCppXi2I9CG62QzyzsvqfAIQIuEz 4 | IiCgSN8psr+aMcKbB4AAGA8yMDEyMTAxMTA4NDExM1qgERgPMjAxMjEwMTUwODQx 5 | MTNaMA0GCSqGSIb3DQEBBQUAA4IBAQCNnhlBMxxh9z5AKfzAxiKs90CfxUsqfYfk 6 | 8XlyF9VIfWRfEwzS6MF1pEzLnghRxTAmjrFgK+sxD9wk+S5Mdgw3nbED9DVFH2Hs 7 | RGKm/t9wkvrYOX6yRQqw6uRvU/5cibMjcyzKB/VQMwk4p4FwSUgBv88A5sTkKr2V 8 | eYdEm34hg2TZVkipPMBiyTyBLXs8D/9oALtnczg4xlTRSjDUvqoXL5haqY4QK2Pv 9 | mNwna6ACkwLmSuMe29UQ8IX2PUB4R5Etni5czyiKGxZLm+4NAhuEwWFNEzCyImPc 10 | 087gHGU1zx+qVSlajqMJ/9ZXYjbt7WiWdhOTGEv4VMn8dHhRUs32 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WRID_ND2.ors: -------------------------------------------------------------------------------- 1 | MIIB0woBAKCCAcwwggHIBgkrBgEFBQcwAQEEggG5MIIBtTCBnqIWBBQMWOWLxkwV 2 | N6RAqTCpIb5HNlpW/xgPMjAxMjEwMTAyMzAzMTlaMHMwcTBJMAkGBSsOAwIaBQAE 3 | FOy+ZAvtiWulchtVZmfKU1ZI9ewTBBQLWOWLxkwVN6RAqTCpIb5HNlpW/wIQEaO0 4 | 0OyNt3+doM1dLVEvQoAAGA8yMDEyMTAxMDIzMDMxOVqgERgPMjAxMjEwMTQyMzAz 5 | MTlaMA0GCSqGSIb3DQEBBQUAA4IBAQCHn2nGfEUX/EJruMkTgh7GgB0u9cpAepaD 6 | sPv9gtl3KLUZyR+NbGMIa5/bpoJp0yg1z5VL6CLMusy3AF6Cn2fyaioDxG+yc+gA 7 | PcPFdEqiIMr+TP8s7qcEiE6WZddSSCqCn90VZSCWkpDhnCjDRwJLBBPU3803fdMz 8 | oguvyr7y6Koxik8X/iUe8EpSzAvmm4GZL3veTI+x7IezJSrhCS9zM0ZHjySjoDxC 9 | +ljGH0EuWPTmFEqZVGIq3cuahIYzKItUbYnXU6ipi/2p42qbsFeok7eEN0EYsY1a 10 | vRATHGRmU7Q5HLCq4rQtZC1cis52Mvc9x1W4z/Gt5A3FtgElXXNA 11 | -------------------------------------------------------------------------------- /doc/crypto/DSA_size.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DSA_size - get DSA signature size 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int DSA_size(const DSA *dsa); 12 | 13 | =head1 DESCRIPTION 14 | 15 | This function returns the size of an ASN.1 encoded DSA signature in 16 | bytes. It can be used to determine how much memory must be allocated 17 | for a DSA signature. 18 | 19 | Bq> must not be B. 20 | 21 | =head1 RETURN VALUE 22 | 23 | The size in bytes. 24 | 25 | =head1 SEE ALSO 26 | 27 | L, L 28 | 29 | =head1 HISTORY 30 | 31 | DSA_size() is available in all versions of SSLeay and OpenSSL. 32 | 33 | =cut 34 | -------------------------------------------------------------------------------- /test/ocsp-tests/ISOP_ND3.ors: -------------------------------------------------------------------------------- 1 | MIIB1AoBAKCCAc0wggHJBgkrBgEFBQcwAQEEggG6MIIBtjCBn6IWBBStvZh6NLQm 2 | 9/rEJlTvA73gJMtUGhgPMjAxMjEwMDkxNjAxNTNaMHQwcjBKMAkGBSsOAwIaBQAE 3 | FHyxZlScq9tE7mImFq30ZXv3etWUBBStvZh6NLQm9/rEJlTvA73gJMtUGgIRAKcN 4 | bJWejX5BTb8DmevkCauAABgPMjAxMjEwMDkxNjAxNTNaoBEYDzIwMTIxMDEzMTYw 5 | MTUzWjANBgkqhkiG9w0BAQUFAAOCAQEAFnJAzuT8P4KKyTI6sdj5HkQ352qEu5CN 6 | K9M2kU/eg9kPfwLv8z3yArobwgx+/IDRajbVAKrk8UPCGUqkDc0OiU5c0+jpn+nT 7 | 20VVCtWsBSWDfzKqYln/NGrblhv+/iuFZJpyfud5nWguW5nogPC8IAfgt9FMDMl6 8 | wlQWLSWEkgAJWvhNR3nzgvyMnuDuMIVQgB9/+vAIxA7nlpEEh6KTswyGqE9+u1yC 9 | kvrz4PwKZQMT6r1eRCLs6NaagOZT84QHhZ6TAA+QHjfK406KL8F9mFgbGKbW+st2 10 | QHm+giUhrgZMv+1Yaxe34BjDS439LCPjdZ29On8FeZr3F55T+s3VzA== 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WIKH_ND3.ors: -------------------------------------------------------------------------------- 1 | MIIB1AoBAKCCAc0wggHJBgkrBgEFBQcwAQEEggG6MIIBtjCBn6IWBBStvZh6NLQm 2 | 9/rEJlTvA73gJMtUGhgPMjAxMjEwMTExMTM2NDdaMHQwcjBKMAkGBSsOAwIaBQAE 3 | FHyxZlScq9tE7mImFq30ZXv3etWUBBSuvZh6NLQm9/rEJlTvA73gJMtUGgIRAKcN 4 | bJWejX5BTb8DmevkCauAABgPMjAxMjEwMTExMTM2NDdaoBEYDzIwMTIxMDE1MTEz 5 | NjQ3WjANBgkqhkiG9w0BAQUFAAOCAQEAfnj3nh6z+USW6VlDWRytWpNmC1ZRwWlg 6 | P2+G4UF4HE8bMJkuiFLcZEVYTxlTYv+xAEpSFxdInFM2Q5C+O6pWOZ9NbikeR4oZ 7 | FTI1kAZ0Uw+YMpVM4ztvKBIpUSqlbi69iNJ9WGF6qzxVeqobSOyrjjwtTsuglUbR 8 | +mshp/SP7Br2IIK+KM1vgsmVExPfGPYANyk7ki/Q8uUnjqkreeSa9WC2iJLGcybW 9 | YavDhYWALebUGukNeedkloYhdjPboPPxDkKNjakwIG8EkbJK7uXewMOHHOFvFTX3 10 | K388me8u5iQf4f3fj6ilEgs6f5Szzmb+vklPX0zIny/TVk2+Az7HmA== 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WINH_ND3.ors: -------------------------------------------------------------------------------- 1 | MIIB1AoBAKCCAc0wggHJBgkrBgEFBQcwAQEEggG6MIIBtjCBn6IWBBStvZh6NLQm 2 | 9/rEJlTvA73gJMtUGhgPMjAxMjEwMTExMTM2NDdaMHQwcjBKMAkGBSsOAwIaBQAE 3 | FH2xZlScq9tE7mImFq30ZXv3etWUBBStvZh6NLQm9/rEJlTvA73gJMtUGgIRAKcN 4 | bJWejX5BTb8DmevkCauAABgPMjAxMjEwMTExMTM2NDdaoBEYDzIwMTIxMDE1MTEz 5 | NjQ3WjANBgkqhkiG9w0BAQUFAAOCAQEAfnj3nh6z+USW6VlDWRytWpNmC1ZRwWlg 6 | P2+G4UF4HE8bMJkuiFLcZEVYTxlTYv+xAEpSFxdInFM2Q5C+O6pWOZ9NbikeR4oZ 7 | FTI1kAZ0Uw+YMpVM4ztvKBIpUSqlbi69iNJ9WGF6qzxVeqobSOyrjjwtTsuglUbR 8 | +mshp/SP7Br2IIK+KM1vgsmVExPfGPYANyk7ki/Q8uUnjqkreeSa9WC2iJLGcybW 9 | YavDhYWALebUGukNeedkloYhdjPboPPxDkKNjakwIG8EkbJK7uXewMOHHOFvFTX3 10 | K388me8u5iQf4f3fj6ilEgs6f5Szzmb+vklPX0zIny/TVk2+Az7HmA== 11 | -------------------------------------------------------------------------------- /test/ocsp-tests/WRID_ND3.ors: -------------------------------------------------------------------------------- 1 | MIIB1AoBAKCCAc0wggHJBgkrBgEFBQcwAQEEggG6MIIBtjCBn6IWBBSuvZh6NLQm 2 | 9/rEJlTvA73gJMtUGhgPMjAxMjEwMTAxMzA3NDZaMHQwcjBKMAkGBSsOAwIaBQAE 3 | FHyxZlScq9tE7mImFq30ZXv3etWUBBStvZh6NLQm9/rEJlTvA73gJMtUGgIRAKcN 4 | bJWejX5BTb8DmevkCauAABgPMjAxMjEwMTAxMzA3NDZaoBEYDzIwMTIxMDE0MTMw 5 | NzQ2WjANBgkqhkiG9w0BAQUFAAOCAQEAA70+GYJoFuUBwIN9KHMqmOOtnmoLBBlm 6 | HL2Su70ZEqSmL4zTt3iHY3m2YaNYSPphgDlQ4lY8zGAkCSrZ3ulpJun3RRy+gD29 7 | 0ks155tChMbYNZrFm46vKWabBjh2p+623daymlcbgizi5Z+P4oJL68VrOqh+DArE 8 | MpHH16BTGaF+bAjzTRSbS90xUReqwnnEpRBrmcQVo4uKpSkbyrx7iMLqsJ2vGpgh 9 | xqj1kNPT9g3+gegmdU9QpFV0l9ZV8X/f0uz5nT4I0NL81d/KDHGx2rd+bftLODeL 10 | ZAWAzFbr5B5EMqPGoh/SQXpcuVOqMHjh8fi8PBXBcitlIFzdDKXDvA== 11 | -------------------------------------------------------------------------------- /crypto/asn1/charmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Auto generated with chartype.pl script. Mask of various character 3 | * properties 4 | */ 5 | 6 | static const unsigned char char_type[] = { 7 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9 | 120, 0, 1, 40, 0, 0, 0, 16, 16, 16, 0, 25, 25, 16, 16, 16, 10 | 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 9, 9, 16, 9, 16, 11 | 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 12 | 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 1, 0, 0, 0, 13 | 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14 | 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 2 15 | }; 16 | -------------------------------------------------------------------------------- /doc/crypto/d2i_ASN1_OBJECT.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | d2i_ASN1_OBJECT, i2d_ASN1_OBJECT - ASN1 OBJECT IDENTIFIER functions 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp, long length); 12 | int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp); 13 | 14 | =head1 DESCRIPTION 15 | 16 | These functions decode and encode an ASN1 OBJECT IDENTIFIER. 17 | 18 | Othewise these behave in a similar way to d2i_X509() and i2d_X509() 19 | described in the L manual page. 20 | 21 | =head1 SEE ALSO 22 | 23 | L 24 | 25 | =head1 HISTORY 26 | 27 | TBA 28 | 29 | =cut 30 | -------------------------------------------------------------------------------- /doc/crypto/d2i_DHparams.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | d2i_DHparams, i2d_DHparams - PKCS#3 DH parameter functions. 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | DH *d2i_DHparams(DH **a, unsigned char **pp, long length); 12 | int i2d_DHparams(DH *a, unsigned char **pp); 13 | 14 | =head1 DESCRIPTION 15 | 16 | These functions decode and encode PKCS#3 DH parameters using the 17 | DHparameter structure described in PKCS#3. 18 | 19 | Othewise these behave in a similar way to d2i_X509() and i2d_X509() 20 | described in the L manual page. 21 | 22 | =head1 SEE ALSO 23 | 24 | L 25 | 26 | =head1 HISTORY 27 | 28 | TBA 29 | 30 | =cut 31 | -------------------------------------------------------------------------------- /util/mkdir-p.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | # mkdir-p.pl 4 | 5 | # On some systems, the -p option to mkdir (= also create any missing parent 6 | # directories) is not available. 7 | 8 | my $arg; 9 | 10 | foreach $arg (@ARGV) { 11 | $arg =~ tr|\\|/|; 12 | &do_mkdir_p($arg); 13 | } 14 | 15 | 16 | sub do_mkdir_p { 17 | local($dir) = @_; 18 | 19 | $dir =~ s|/*\Z(?!\n)||s; 20 | 21 | if (-d $dir) { 22 | return; 23 | } 24 | 25 | if ($dir =~ m|[^/]/|s) { 26 | local($parent) = $dir; 27 | $parent =~ s|[^/]*\Z(?!\n)||s; 28 | 29 | do_mkdir_p($parent); 30 | } 31 | 32 | mkdir($dir, 0777) || die "Cannot create directory $dir: $!\n"; 33 | print "created directory `$dir'\n"; 34 | } 35 | -------------------------------------------------------------------------------- /doc/crypto/DH_size.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DH_size - get Diffie-Hellman prime size 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int DH_size(DH *dh); 12 | 13 | =head1 DESCRIPTION 14 | 15 | This function returns the Diffie-Hellman size in bytes. It can be used 16 | to determine how much memory must be allocated for the shared secret 17 | computed by DH_compute_key(). 18 | 19 | Bp> must not be B. 20 | 21 | =head1 RETURN VALUE 22 | 23 | The size in bytes. 24 | 25 | =head1 SEE ALSO 26 | 27 | L, L 28 | 29 | =head1 HISTORY 30 | 31 | DH_size() is available in all versions of SSLeay and OpenSSL. 32 | 33 | =cut 34 | -------------------------------------------------------------------------------- /shlib/Makefile.hpux10-cc: -------------------------------------------------------------------------------- 1 | # Makefile.hpux-cc 2 | 3 | major=0.9.8 4 | 5 | slib=libssl 6 | sh_slib=$(slib).sl.$(major) 7 | 8 | clib=libcrypto 9 | sh_clib=$(clib).sl.$(major) 10 | 11 | all : $(clib).sl $(slib).sl 12 | 13 | 14 | $(clib)_pic.a : $(clib).a 15 | echo "Copying $? to $@" 16 | cp -p $? $@ 17 | 18 | $(slib)_pic.a : $(slib).a 19 | echo "Copying $? to $@" 20 | cp -p $? $@ 21 | 22 | $(sh_clib) : $(clib)_pic.a 23 | ld -b -s -z +h $@ -o $@ -Fl $(clib)_pic.a -ldld -lc 24 | 25 | $(clib).sl : $(sh_clib) 26 | rm -f $@ 27 | ln -s $? $@ 28 | 29 | $(sh_slib) : $(slib)_pic.a $(clib).sl 30 | ld -b -s -z +h $@ -o $@ -Fl $(slib)_pic.a -ldld -lc 31 | 32 | $(slib).sl : $(sh_slib) 33 | rm -f $@ 34 | ln -s $? $@ 35 | -------------------------------------------------------------------------------- /crypto/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* crypto/ebcdic.h */ 2 | 3 | #ifndef HEADER_EBCDIC_H 4 | # define HEADER_EBCDIC_H 5 | 6 | # include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /* Avoid name clashes with other applications */ 13 | # define os_toascii _openssl_os_toascii 14 | # define os_toebcdic _openssl_os_toebcdic 15 | # define ebcdic2ascii _openssl_ebcdic2ascii 16 | # define ascii2ebcdic _openssl_ascii2ebcdic 17 | 18 | extern const unsigned char os_toascii[256]; 19 | extern const unsigned char os_toebcdic[256]; 20 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 21 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /doc/crypto/BIO_f_null.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | BIO_f_null - null filter 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | BIO_METHOD * BIO_f_null(void); 12 | 13 | =head1 DESCRIPTION 14 | 15 | BIO_f_null() returns the null filter BIO method. This is a filter BIO 16 | that does nothing. 17 | 18 | All requests to a null filter BIO are passed through to the next BIO in 19 | the chain: this means that a BIO chain containing a null filter BIO 20 | behaves just as though the BIO was not there. 21 | 22 | =head1 NOTES 23 | 24 | As may be apparent a null filter BIO is not particularly useful. 25 | 26 | =head1 RETURN VALUES 27 | 28 | BIO_f_null() returns the null filter BIO method. 29 | 30 | =head1 SEE ALSO 31 | 32 | TBA 33 | -------------------------------------------------------------------------------- /doc/crypto/OPENSSL_Applink.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | OPENSSL_Applink - glue between OpenSSL BIO and Win32 compiler run-time 6 | 7 | =head1 SYNOPSIS 8 | 9 | __declspec(dllexport) void **OPENSSL_Applink(); 10 | 11 | =head1 DESCRIPTION 12 | 13 | OPENSSL_Applink is application-side interface which provides a glue 14 | between OpenSSL BIO layer and Win32 compiler run-time environment. 15 | Even though it appears at application side, it's essentially OpenSSL 16 | private interface. For this reason application developers are not 17 | expected to implement it, but to compile provided module with 18 | compiler of their choice and link it into the target application. 19 | The referred module is available as /ms/applink.c. 20 | 21 | =cut 22 | -------------------------------------------------------------------------------- /doc/crypto/d2i_X509_SIG.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | d2i_X509_SIG, i2d_X509_SIG - DigestInfo functions. 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | X509_SIG *d2i_X509_SIG(X509_SIG **a, unsigned char **pp, long length); 12 | int i2d_X509_SIG(X509_SIG *a, unsigned char **pp); 13 | 14 | =head1 DESCRIPTION 15 | 16 | These functions decode and encode an X509_SIG structure which is 17 | equivalent to the B structure defined in PKCS#1 and PKCS#7. 18 | 19 | Othewise these behave in a similar way to d2i_X509() and i2d_X509() 20 | described in the L manual page. 21 | 22 | =head1 SEE ALSO 23 | 24 | L 25 | 26 | =head1 HISTORY 27 | 28 | TBA 29 | 30 | =cut 31 | -------------------------------------------------------------------------------- /Netware/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | Contents of the openssl\netware directory 3 | ========================================== 4 | 5 | Regular files: 6 | 7 | readme.txt - this file 8 | do_tests.pl - perl script used to run the OpenSSL tests on NetWare 9 | cpy_tests.bat - batch to to copy test stuff to NetWare server 10 | build.bat - batch file to help with builds 11 | set_env.bat - batch file to help setup build environments 12 | globals.txt - results of initial code review to identify OpenSSL global variables 13 | 14 | 15 | The following files are generated by the various scripts. They are 16 | recreated each time and it is okay to delete them. 17 | 18 | *.def - command files used by Metrowerks linker 19 | *.mak - make files generated by mk1mf.pl 20 | -------------------------------------------------------------------------------- /ms/testpem.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set ssleay=%1% 3 | set tmp1=pem.out 4 | set cmp=fc.exe 5 | 6 | call tpem.bat crl ..\test\testcrl.pem 7 | if errorlevel 1 goto err 8 | 9 | call tpem.bat pkcs7 ..\test\testp7.pem 10 | if errorlevel 1 goto err 11 | 12 | call tpem.bat req ..\test\testreq2.pem 13 | if errorlevel 1 goto err 14 | 15 | call tpem.bat rsa ..\test\testrsa.pem 16 | if errorlevel 1 goto err 17 | 18 | call tpem.bat x509 ..\test\testx509.pem 19 | if errorlevel 1 goto err 20 | 21 | call tpem.bat x509 ..\test\v3-cert1.pem 22 | if errorlevel 1 goto err 23 | 24 | call tpem.bat x509 ..\test\v3-cert1.pem 25 | if errorlevel 1 goto err 26 | 27 | call tpem.bat sess_id ..\test\testsid.pem 28 | if errorlevel 1 goto err 29 | 30 | echo OK 31 | del %tmp1% 32 | :err 33 | -------------------------------------------------------------------------------- /crypto/bn/asm/x86.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | push(@INC,"perlasm","../../perlasm"); 4 | require "x86asm.pl"; 5 | 6 | require("x86/mul_add.pl"); 7 | require("x86/mul.pl"); 8 | require("x86/sqr.pl"); 9 | require("x86/div.pl"); 10 | require("x86/add.pl"); 11 | require("x86/sub.pl"); 12 | require("x86/comba.pl"); 13 | 14 | &asm_init($ARGV[0],$0); 15 | 16 | &bn_mul_add_words("bn_mul_add_words"); 17 | &bn_mul_words("bn_mul_words"); 18 | &bn_sqr_words("bn_sqr_words"); 19 | &bn_div_words("bn_div_words"); 20 | &bn_add_words("bn_add_words"); 21 | &bn_sub_words("bn_sub_words"); 22 | &bn_mul_comba("bn_mul_comba8",8); 23 | &bn_mul_comba("bn_mul_comba4",4); 24 | &bn_sqr_comba("bn_sqr_comba8",8); 25 | &bn_sqr_comba("bn_sqr_comba4",4); 26 | 27 | &asm_finish(); 28 | 29 | -------------------------------------------------------------------------------- /doc/crypto/d2i_X509_ALGOR.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | d2i_X509_ALGOR, i2d_X509_ALGOR - AlgorithmIdentifier functions. 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, unsigned char **pp, long length); 12 | int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **pp); 13 | 14 | =head1 DESCRIPTION 15 | 16 | These functions decode and encode an B structure which is 17 | equivalent to the B structure. 18 | 19 | Othewise these behave in a similar way to d2i_X509() and i2d_X509() 20 | described in the L manual page. 21 | 22 | =head1 SEE ALSO 23 | 24 | L 25 | 26 | =head1 HISTORY 27 | 28 | TBA 29 | 30 | =cut 31 | -------------------------------------------------------------------------------- /shlib/win32.bat: -------------------------------------------------------------------------------- 1 | rem win32 dll build 2 | 3 | set OPTIONS1=-DDES_ASM -DBN_ASM -DBF_ASM -DFLAT_INC -Iout -Itmp -DL_ENDIAN 4 | set OPTIONS2=/W3 /WX /Ox /Gs0 /GF /Gy /nologo 5 | 6 | set OPTIONS=%OPTIONS1% %OPTIONS2% 7 | 8 | rem ml /coff /c crypto\bf\asm\b-win32.asm 9 | rem ml /coff /c crypto\des\asm\c-win32.asm 10 | rem ml /coff /c crypto\des\asm\d-win32.asm 11 | rem ml /coff /c crypto\bn\asm\x86nt32.asm 12 | 13 | cl /Focrypto.obj -DWIN32 %OPTIONS% -c crypto\crypto.c 14 | cl /Fossl.obj -DWIN32 %OPTIONS% -c ssl\ssl.c 15 | cl /Foeay.obj -DWIN32 %OPTIONS% -c apps\eay.c 16 | 17 | cl /Fessleay.exe %OPTIONS% eay.obj ssl.obj crypto.obj crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib ws2_32.lib 18 | 19 | -------------------------------------------------------------------------------- /test/testsid.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN SSL SESSION PARAMETERS----- 2 | MIIB1gIBAQIBAgQDAQCABBCi11xa5qkOP8xrr02K/NQCBBBkIYQZM0Bt95W0EHNV 3 | bA58oQYCBDIBr7WiBAICASyjggGGMIIBgjCCASwCAQMwDQYJKoZIhvcNAQEEBQAw 4 | ODELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3Jz 5 | YSB0ZXN0IENBMB4XDTk1MTAwOTIzMzEzNFoXDTk4MDcwNTIzMzEzNFowYDELMAkG 6 | A1UEBhMCQVUxDDAKBgNVBAgTA1FMRDEZMBcGA1UEChMQTWluY29tIFB0eS4gTHRk 7 | LjELMAkGA1UECxMCQ1MxGzAZBgNVBAMTElNTTGVheSBkZW1vIGNsaWVudDBcMA0G 8 | CSqGSIb3DQEBAQUAA0sAMEgCQQC4pcXEL1lgVA+B5Q3TcuW/O3LZHoA73IYm8oFD 9 | TezgCDhL2RTMn+seKWF36UtJKRIOBU9jZHCVVd0Me5ls6BEjAgMBAAEwDQYJKoZI 10 | hvcNAQEEBQADQQBoIpOcwUY1qlVF7j3ROSGvUsbvByOBFmYWkIBgsCqR+9qo1A7L 11 | CrWF5i8LWt/vLwAHaxWNx2YuBJMFyuK81fTvpA0EC3Rlc3Rjb250ZXh0 12 | -----END SSL SESSION PARAMETERS----- 13 | -------------------------------------------------------------------------------- /doc/crypto/d2i_CMS_ContentInfo.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | d2i_CMS_ContentInfo, i2d_CMS_ContentInfo - CMS ContentInfo functions 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | CMS_ContentInfo *d2i_CMS_ContentInfo(CMS_ContentInfo **a, unsigned char **pp, long length); 12 | int i2d_CMS_ContentInfo(CMS_ContentInfo *a, unsigned char **pp); 13 | 14 | =head1 DESCRIPTION 15 | 16 | These functions decode and encode an CMS ContentInfo structure. 17 | 18 | Otherwise they behave in a similar way to d2i_X509() and i2d_X509() 19 | described in the L manual page. 20 | 21 | =head1 SEE ALSO 22 | 23 | L 24 | 25 | =head1 HISTORY 26 | 27 | These functions were first added to OpenSSL 0.9.8 28 | 29 | =cut 30 | -------------------------------------------------------------------------------- /MacOS/TODO: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------- 2 | Verify server certificate 3 | ------------------------------------------------------------------- 4 | Currently omitted from the project: 5 | 6 | crypto/tmdiff.c 7 | crypto/bio/bss_conn.c 8 | crypto/bio/b_sock.c 9 | crypto/bio/bss_acpt.c 10 | crypto/bio/bss_log.h 11 | 12 | ------------------------------------------------------------------- 13 | Build libraries to link with... 14 | ------------------------------------------------------------------- 15 | Port openssl application. 16 | ------------------------------------------------------------------- 17 | BN optimizations (currently PPC version is compiled with BN_LLONG) 18 | ------------------------------------------------------------------- 19 | -------------------------------------------------------------------------------- /crypto/des/typemap: -------------------------------------------------------------------------------- 1 | # 2 | # DES SECTION 3 | # 4 | deschar * T_DESCHARP 5 | des_cblock * T_CBLOCK 6 | des_cblock T_CBLOCK 7 | des_key_schedule T_SCHEDULE 8 | des_key_schedule * T_SCHEDULE 9 | 10 | INPUT 11 | T_CBLOCK 12 | $var=(des_cblock *)SvPV($arg,len); 13 | if (len < DES_KEY_SZ) 14 | { 15 | croak(\"$var needs to be at least %u bytes long\",DES_KEY_SZ); 16 | } 17 | 18 | T_SCHEDULE 19 | $var=(des_key_schedule *)SvPV($arg,len); 20 | if (len < DES_SCHEDULE_SZ) 21 | { 22 | croak(\"$var needs to be at least %u bytes long\", 23 | DES_SCHEDULE_SZ); 24 | } 25 | 26 | OUTPUT 27 | T_CBLOCK 28 | sv_setpvn($arg,(char *)$var,DES_KEY_SZ); 29 | 30 | T_SCHEDULE 31 | sv_setpvn($arg,(char *)$var,DES_SCHEDULE_SZ); 32 | 33 | T_DESCHARP 34 | sv_setpvn($arg,(char *)$var,len); 35 | -------------------------------------------------------------------------------- /apps/demoCA/cacert.pem: -------------------------------------------------------------------------------- 1 | subject=/C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server 2 | issuer= /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA 3 | -----BEGIN X509 CERTIFICATE----- 4 | 5 | MIIBgjCCASwCAQQwDQYJKoZIhvcNAQEEBQAwODELMAkGA1UEBhMCQVUxDDAKBgNV 6 | BAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3JzYSB0ZXN0IENBMB4XDTk1MTAwOTIz 7 | MzIwNVoXDTk4MDcwNTIzMzIwNVowYDELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FM 8 | RDEZMBcGA1UEChMQTWluY29tIFB0eS4gTHRkLjELMAkGA1UECxMCQ1MxGzAZBgNV 9 | BAMTElNTTGVheSBkZW1vIHNlcnZlcjBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC3 10 | LCXcScWua0PFLkHBLm2VejqpA1F4RQ8q0VjRiPafjx/Z/aWH3ipdMVvuJGa/wFXb 11 | /nDFLDlfWp+oCPwhBtVPAgMBAAEwDQYJKoZIhvcNAQEEBQADQQArNFsihWIjBzb0 12 | DCsU0BvL2bvSwJrPEqFlkDq3F4M6EGutL9axEcANWgbbEdAvNJD1dmEmoWny27Pn 13 | IMs6ZOZB 14 | -----END X509 CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /crypto/des/times/aix.cc: -------------------------------------------------------------------------------- 1 | From: Paco Garcia 2 | 3 | This machine is a Bull Estrella Minitower Model MT604-100 4 | Processor : PPC604 5 | P.Speed : 100Mhz 6 | Data/Instr Cache : 16 K 7 | L2 Cache : 256 K 8 | PCI BUS Speed : 33 Mhz 9 | TransfRate PCI : 132 MB/s 10 | Memory : 96 MB 11 | 12 | options des ecb/s 13 | 4 c p 275118.61 100.0% 14 | 4 c i 273545.07 99.4% 15 | 4 r2 p 270441.02 98.3% 16 | 4 r1 p 253052.15 92.0% 17 | 4 r2 i 240842.97 87.5% 18 | 4 r1 i 240556.66 87.4% 19 | 16 c i 224603.99 81.6% 20 | 16 c p 224483.98 81.6% 21 | 16 r2 p 215691.19 78.4% 22 | 16 r1 p 208332.83 75.7% 23 | 16 r1 i 199206.50 72.4% 24 | 16 r2 i 198963.70 72.3% 25 | -DDES_PTR 26 | 27 | -------------------------------------------------------------------------------- /util/pl/ultrix.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | # 3 | # linux.pl - the standard unix makefile stuff. 4 | # 5 | 6 | $o='/'; 7 | $cp='/bin/cp'; 8 | $rm='/bin/rm -f'; 9 | 10 | # C compiler stuff 11 | 12 | $cc='cc'; 13 | if ($debug) 14 | { $cflags="-g -DREF_CHECK -DCRYPTO_MDEBUG"; } 15 | else 16 | { $cflags="-O2"; } 17 | 18 | $cflags.=" -std1 -DL_ENDIAN"; 19 | 20 | if (!$no_asm) 21 | { 22 | $bn_asm_obj='$(OBJ_D)/mips1.o'; 23 | $bn_asm_src='crypto/bn/asm/mips1.s'; 24 | } 25 | 26 | sub do_link_rule 27 | { 28 | local($target,$files,$dep_libs,$libs)=@_; 29 | local($ret,$_); 30 | 31 | $file =~ s/\//$o/g if $o ne '/'; 32 | $n=&bname($target); 33 | $ret.="$target: $files $dep_libs\n"; 34 | $ret.="\t\$(LINK_CMD) ${efile}$target \$(LFLAGS) $files $libs\n\n"; 35 | return($ret); 36 | } 37 | 38 | 1; 39 | -------------------------------------------------------------------------------- /test/serverinfo.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN SERVERINFO FOR CT----- 2 | ABIAZMevsj4TC5rgwjZNciLGwh15YXoIK9t5aypGJIG4QzyMowmwwDdqxudkUcGa 3 | DvuqlYL7psO5j4/BIHTe677CAZBBH3Ho2NOM5q1zub4AbfUMlKeufuQgeQ2Tj1oe 4 | LJLRzrwDnPs= 5 | -----END SERVERINFO FOR CT----- 6 | 7 | -----BEGIN SERVERINFO FOR TACK----- 8 | 8wABTwFMh1Dz+3W6zULWJKjav5TNaFEXL1h98YtCXeyZnORYg4mbKpxH5CMbjpgx 9 | To3amSqUPF4Ntjc/i9+poutxebYkbgAAAkMcxb8+RaM9YEywaJEGViKJJmpYG/gJ 10 | HgfGaefI9kKbXSDmP9ntg8dLvDzuyYw14ktM2850Q9WvBiltpekilZxVuT2bFtfs 11 | cmS++SAK9YOM8RrKhL1TLmrktoBEJZ6z5GTukYdQ8/t1us1C1iSo2r+UzWhRFy9Y 12 | ffGLQl3smZzkWIOJmyqcR+QjG46YMU6N2pkqlDxeDbY3P4vfqaLrcXm2JG4AAAGN 13 | xXQJPbdniI9rEydVXb1Cu1yT/t7FBEx6hLxuoypXjCI1wCGpXsd8zEnloR0Ank5h 14 | VO/874E/BZlItzSPpcmDKl5Def6BrAJTErQlE9npo52S05YWORxJw1+VYBdqQ09A 15 | x3wA 16 | -----END SERVERINFO FOR TACK----- 17 | -------------------------------------------------------------------------------- /ms/tencce.bat: -------------------------------------------------------------------------------- 1 | rem called by testencce 2 | 3 | echo test %1 %2 %3 %4 %5 %6 4 | cecopy %input% CE:\OpenSSL 5 | cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -e -bufsize 113 -k test -in \OpenSSL\%input% -out \OpenSSL\%tmp1% 6 | cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -d -bufsize 157 -k test -in \OpenSSL\%tmp1% -out \OpenSSL\%out1% 7 | del %out1% >nul 2>&1 8 | cecopy CE:\OpenSSL\%out1% . 9 | %cmp% %input% %out1% 10 | if errorlevel 1 goto err 11 | 12 | echo test base64 %1 %2 %3 %4 %5 %6 13 | cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -a -e -bufsize 113 -k test -in \OpenSSL\%input% -out \OpenSSL\%tmp1% 14 | cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -a -d -bufsize 157 -k test -in \OpenSSL\%tmp1% -out \OpenSSL\%out1% 15 | del %out1% >nul 2>&1 16 | cecopy CE:\OpenSSL\%out1% . 17 | %cmp% %input% %out1% 18 | 19 | :err 20 | -------------------------------------------------------------------------------- /test/CAssrsa.cnf: -------------------------------------------------------------------------------- 1 | # 2 | # SSLeay example configuration file. 3 | # This is mostly being used for generation of certificate requests. 4 | # 5 | # create RSA certs - CA 6 | 7 | RANDFILE = ./.rnd 8 | 9 | #################################################################### 10 | [ req ] 11 | distinguished_name = req_distinguished_name 12 | encrypt_key = no 13 | 14 | [ req_distinguished_name ] 15 | countryName = Country Name (2 letter code) 16 | countryName_default = ES 17 | countryName_value = ES 18 | 19 | organizationName = Organization Name (eg, company) 20 | organizationName_value = Hermanos Locos 21 | 22 | commonName = Common Name (eg, YOUR name) 23 | commonName_value = Hermanos Locos CA 24 | 25 | -------------------------------------------------------------------------------- /apps/vms_term_sock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 VMS Software, Inc. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef TERM_SOCK_H 11 | # define TERM_SOCK_H 12 | 13 | /* 14 | ** Terminal Socket Function Codes 15 | */ 16 | # define TERM_SOCK_CREATE 1 17 | # define TERM_SOCK_DELETE 2 18 | 19 | /* 20 | ** Terminal Socket Status Codes 21 | */ 22 | # define TERM_SOCK_FAILURE 0 23 | # define TERM_SOCK_SUCCESS 1 24 | 25 | /* 26 | ** Terminal Socket Prototype 27 | */ 28 | int TerminalSocket (int FunctionCode, int *ReturnSocket); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /crypto/dh/dh4096.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIICCAKCAgEA/urRnb6vkPYc/KEGXWnbCIOaKitq7ySIq9dTH7s+Ri59zs77zty7 3 | vfVlSe6VFTBWgYjD2XKUFmtqq6CqXMhVX5ElUDoYDpAyTH85xqNFLzFC7nKrff/H 4 | TFKNttp22cZE9V0IPpzedPfnQkE7aUdmF9JnDyv21Z/818O93u1B4r0szdnmEvEF 5 | bKuIxEHX+bp0ZR7RqE1AeifXGJX3d6tsd2PMAObxwwsv55RGkn50vHO4QxtTARr1 6 | rRUV5j3B3oPMgC7Offxx+98Xn45B1/G0Prp11anDsR1PGwtaCYipqsvMwQUSJtyE 7 | EOQWk+yFkeMe4vWv367eEi0Sd/wnC+TSXBE3pYvpYerJ8n1MceI5GQTdarJ77OW9 8 | bGTHmxRsLSCM1jpLdPja5jjb4siAa6EHc4qN9c/iFKS3PQPJEnX7pXKBRs5f7AF3 9 | W3RIGt+G9IVNZfXaS7Z/iCpgzgvKCs0VeqN38QsJGtC1aIkwOeyjPNy2G6jJ4yqH 10 | ovXYt/0mc00vCWeSNS1wren0pR2EiLxX0ypjjgsU1mk/Z3b/+zVf7fZSIB+nDLjb 11 | NPtUlJCVGnAeBK1J1nG3TQicqowOXoM6ISkdaXj5GPJdXHab2+S7cqhKGv5qC7rR 12 | jT6sx7RUr0CNTxzLI7muV2/a4tGmj0PSdXQdsZ7tw7gbXlaWT1+MM2MCAQI= 13 | -----END DH PARAMETERS----- 14 | 15 | -------------------------------------------------------------------------------- /doc/crypto/d2i_X509_NAME.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | d2i_X509_NAME, i2d_X509_NAME - X509_NAME encoding functions 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | X509_NAME *d2i_X509_NAME(X509_NAME **a, unsigned char **pp, long length); 12 | int i2d_X509_NAME(X509_NAME *a, unsigned char **pp); 13 | 14 | =head1 DESCRIPTION 15 | 16 | These functions decode and encode an B structure which is the 17 | same as the B type defined in RFC2459 (and elsewhere) and used 18 | for example in certificate subject and issuer names. 19 | 20 | Othewise the functions behave in a similar way to d2i_X509() and i2d_X509() 21 | described in the L manual page. 22 | 23 | =head1 SEE ALSO 24 | 25 | L 26 | 27 | =head1 HISTORY 28 | 29 | TBA 30 | 31 | =cut 32 | -------------------------------------------------------------------------------- /test/CAssdsa.cnf: -------------------------------------------------------------------------------- 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 | 7 | RANDFILE = ./.rnd 8 | 9 | #################################################################### 10 | [ req ] 11 | distinguished_name = req_distinguished_name 12 | encrypt_rsa_key = no 13 | 14 | [ req_distinguished_name ] 15 | countryName = Country Name (2 letter code) 16 | countryName_default = ES 17 | countryName_value = ES 18 | 19 | organizationName = Organization Name (eg, company) 20 | organizationName_value = Hermanos Locos 21 | 22 | commonName = Common Name (eg, YOUR name) 23 | commonName_value = Hermanos Locos CA 24 | -------------------------------------------------------------------------------- /demos/tunala/configure.in: -------------------------------------------------------------------------------- 1 | dnl Process this file with autoconf to produce a configure script. 2 | AC_INIT(tunala.c) 3 | AM_CONFIG_HEADER(config.h) 4 | AM_INIT_AUTOMAKE(tunala, 0.0.1-dev) 5 | 6 | dnl Checks for programs. (Though skip libtool) 7 | AC_PROG_CC 8 | dnl AC_PROG_LIBTOOL 9 | dnl AM_PROG_LIBTOOL 10 | 11 | dnl Checks for libraries. 12 | AC_CHECK_LIB(dl, dlopen) 13 | AC_CHECK_LIB(z, inflate) 14 | AC_CHECK_LIB(socket, socket) 15 | AC_CHECK_LIB(nsl, gethostbyname) 16 | 17 | dnl Checks for header files. 18 | AC_HEADER_STDC 19 | AC_CHECK_HEADERS(fcntl.h limits.h unistd.h) 20 | 21 | dnl Checks for typedefs, structures, and compiler characteristics. 22 | AC_C_CONST 23 | 24 | dnl Checks for library functions. 25 | AC_CHECK_FUNCS(strstr strtoul) 26 | AC_CHECK_FUNCS(select socket) 27 | AC_CHECK_FUNCS(dlopen) 28 | 29 | AC_OUTPUT(Makefile) 30 | -------------------------------------------------------------------------------- /doc/crypto/BN_copy.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | BN_copy, BN_dup - copy BIGNUMs 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | BIGNUM *BN_copy(BIGNUM *to, const BIGNUM *from); 12 | 13 | BIGNUM *BN_dup(const BIGNUM *from); 14 | 15 | =head1 DESCRIPTION 16 | 17 | BN_copy() copies B to B. BN_dup() creates a new B 18 | containing the value B. 19 | 20 | =head1 RETURN VALUES 21 | 22 | BN_copy() returns B on success, NULL on error. BN_dup() returns 23 | the new B, and NULL on error. The error codes can be obtained 24 | by L. 25 | 26 | =head1 SEE ALSO 27 | 28 | L, L 29 | 30 | =head1 HISTORY 31 | 32 | BN_copy() and BN_dup() are available in all versions of SSLeay and OpenSSL. 33 | 34 | =cut 35 | -------------------------------------------------------------------------------- /doc/ssl/SSL_get_rbio.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_get_rbio - get BIO linked to an SSL object 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | BIO *SSL_get_rbio(SSL *ssl); 12 | BIO *SSL_get_wbio(SSL *ssl); 13 | 14 | =head1 DESCRIPTION 15 | 16 | SSL_get_rbio() and SSL_get_wbio() return pointers to the BIOs for the 17 | read or the write channel, which can be different. The reference count 18 | of the BIO is not incremented. 19 | 20 | =head1 RETURN VALUES 21 | 22 | The following return values can occur: 23 | 24 | =over 4 25 | 26 | =item NULL 27 | 28 | No BIO was connected to the SSL object 29 | 30 | =item Any other pointer 31 | 32 | The BIO linked to B. 33 | 34 | =back 35 | 36 | =head1 SEE ALSO 37 | 38 | L, L , L 39 | 40 | =cut 41 | -------------------------------------------------------------------------------- /test/CAssdh.cnf: -------------------------------------------------------------------------------- 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 | 7 | RANDFILE = ./.rnd 8 | 9 | #################################################################### 10 | [ req ] 11 | distinguished_name = req_distinguished_name 12 | encrypt_rsa_key = no 13 | 14 | [ req_distinguished_name ] 15 | countryName = Country Name (2 letter code) 16 | countryName_default = CU 17 | countryName_value = CU 18 | 19 | organizationName = Organization Name (eg, company) 20 | organizationName_value = La Junta de la Revolucion 21 | 22 | commonName = Common Name (eg, YOUR name) 23 | commonName_value = Junta 24 | 25 | -------------------------------------------------------------------------------- /ms/mw.bat: -------------------------------------------------------------------------------- 1 | @rem OpenSSL with Mingw32 2 | @rem -------------------- 3 | 4 | @rem Makefile 5 | perl util\mkfiles.pl >MINFO 6 | perl util\mk1mf.pl Mingw32 >ms\mingw32.mak 7 | @rem DLL definition files 8 | perl util\mkdef.pl 32 libeay >ms\libeay32.def 9 | if errorlevel 1 goto end 10 | perl util\mkdef.pl 32 ssleay >ms\ssleay32.def 11 | if errorlevel 1 goto end 12 | 13 | @rem Build the libraries 14 | make -f ms/mingw32.mak 15 | if errorlevel 1 goto end 16 | 17 | @rem Generate the DLLs and input libraries 18 | dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32 19 | if errorlevel 1 goto end 20 | dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a 21 | if errorlevel 1 goto end 22 | 23 | echo Done compiling OpenSSL 24 | 25 | :end 26 | 27 | -------------------------------------------------------------------------------- /ms/uplink-x86.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; 4 | push(@INC, "${dir}.", "${dir}../crypto/perlasm"); 5 | require "x86asm.pl"; 6 | 7 | require "uplink-common.pl"; 8 | 9 | &asm_init($ARGV[0],"uplink-x86"); 10 | 11 | &external_label("OPENSSL_Uplink"); 12 | &public_label("OPENSSL_UplinkTable"); 13 | 14 | for ($i=1;$i<=$N;$i++) { 15 | &function_begin_B("_\$lazy${i}"); 16 | &lea ("eax",&DWP(&label("OPENSSL_UplinkTable"))); 17 | &push ($i); 18 | &push ("eax"); 19 | &call (&label("OPENSSL_Uplink")); 20 | &pop ("eax"); 21 | &add ("esp",4); 22 | &jmp_ptr(&DWP(4*$i,"eax")); 23 | &function_end_B("_\$lazy${i}"); 24 | } 25 | 26 | &dataseg(); 27 | &align(4); 28 | &set_label("OPENSSL_UplinkTable"); 29 | &data_word($N); 30 | for ($i=1;$i<=$N;$i++) { 31 | &data_word(&label("_\$lazy${i}")); 32 | } 33 | &asm_finish(); 34 | -------------------------------------------------------------------------------- /util/perlpath.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | # 3 | # modify the '#!/usr/local/bin/perl' 4 | # line in all scripts that rely on perl. 5 | # 6 | 7 | require "find.pl"; 8 | 9 | $#ARGV == 0 || print STDERR "usage: perlpath newpath (eg /usr/bin)\n"; 10 | &find("."); 11 | 12 | sub wanted 13 | { 14 | return unless /\.pl$/ || /^[Cc]onfigur/; 15 | 16 | open(IN,"<$_") || die "unable to open $dir/$_:$!\n"; 17 | @a=; 18 | close(IN); 19 | 20 | if (-d $ARGV[0]) { 21 | $a[0]="#!$ARGV[0]/perl\n"; 22 | } 23 | else { 24 | $a[0]="#!$ARGV[0]\n"; 25 | } 26 | 27 | # Playing it safe... 28 | $new="$_.new"; 29 | open(OUT,">$new") || die "unable to open $dir/$new:$!\n"; 30 | print OUT @a; 31 | close(OUT); 32 | 33 | rename($new,$_) || die "unable to rename $dir/$new:$!\n"; 34 | chmod(0755,$_) || die "unable to chmod $dir/$new:$!\n"; 35 | } 36 | -------------------------------------------------------------------------------- /crypto/ripemd/README: -------------------------------------------------------------------------------- 1 | RIPEMD-160 2 | http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html 3 | 4 | This is my implementation of RIPEMD-160. The pentium assember is a little 5 | off the pace since I only get 1050 cycles, while the best is 1013. 6 | I have a few ideas for how to get another 20 or so cycles, but at 7 | this point I will not bother right now. I believe the trick will be 8 | to remove my 'copy X array onto stack' until inside the RIP1() finctions the 9 | first time round. To do this I need another register and will only have one 10 | temporary one. A bit tricky.... I can also cleanup the saving of the 5 words 11 | after the first half of the calculation. I should read the origional 12 | value, add then write. Currently I just save the new and read the origioal. 13 | I then read both at the end. Bad. 14 | 15 | eric (20-Jan-1998) 16 | -------------------------------------------------------------------------------- /bugs/ultrixcc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /*- 4 | * This is a cc optimiser bug for ultrix 4.3, mips CPU. 5 | * What happens is that the compiler, due to the (a)&7, 6 | * does 7 | * i=a&7; 8 | * i--; 9 | * i*=4; 10 | * Then uses i as the offset into a jump table. 11 | * The problem is that a value of 0 generates an offset of 12 | * 0xfffffffc. 13 | */ 14 | 15 | main() 16 | { 17 | f(5); 18 | f(0); 19 | } 20 | 21 | int f(a) 22 | int a; 23 | { 24 | switch (a & 7) { 25 | case 7: 26 | printf("7\n"); 27 | case 6: 28 | printf("6\n"); 29 | case 5: 30 | printf("5\n"); 31 | case 4: 32 | printf("4\n"); 33 | case 3: 34 | printf("3\n"); 35 | case 2: 36 | printf("2\n"); 37 | case 1: 38 | printf("1\n"); 39 | #ifdef FIX_BUG 40 | case 0: 41 | ; 42 | #endif 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /demos/sign/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdYCAQAwDQYJKoZIhvcNAQEEBQAwgaAxCzAJBgNVBAYTAlBUMRMwEQYD 3 | VQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5ldXJv 4 | bmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMTEmJy 5 | dXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZpMB4X 6 | DTk2MDkwNTAzNDI0M1oXDTk2MTAwNTAzNDI0M1owgaAxCzAJBgNVBAYTAlBUMRMw 7 | EQYDVQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5l 8 | dXJvbmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMT 9 | EmJydXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZp 10 | MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL7+aty3S1iBA/+yxjxv4q1MUTd1kjNw 11 | L4lYKbpzzlmC5beaQXeQ2RmGMTXU+mDvuqItjVHOK3DvPK7lTcSGftUCAwEAATAN 12 | BgkqhkiG9w0BAQQFAANBAFqPEKFjk6T6CKTHvaQeEAsX0/8YHPHqH/9AnhSjrwuX 13 | 9EBc0n6bVGhN7XaXd6sJ7dym9sbsWxb+pJdurnkxjx4= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /INSTALL.OS2: -------------------------------------------------------------------------------- 1 | 2 | Installation on OS/2 3 | -------------------- 4 | 5 | You need to have the following tools installed: 6 | 7 | * EMX GCC 8 | * PERL 9 | * GNU make 10 | 11 | 12 | To build the makefile, run 13 | 14 | > os2\os2-emx 15 | 16 | This will configure OpenSSL and create OS2-EMX.mak which you then use to 17 | build the OpenSSL libraries & programs by running 18 | 19 | > make -f os2-emx.mak 20 | 21 | If that finishes successfully you will find the libraries and programs in the 22 | "out" directory. 23 | 24 | Alternatively, you can make a dynamic build that puts the library code into 25 | crypto.dll and ssl.dll by running 26 | 27 | > make -f os2-emx-dll.mak 28 | 29 | This will build the above mentioned dlls and a matching pair of import 30 | libraries in the "out_dll" directory along with the set of test programs 31 | and the openssl application. 32 | -------------------------------------------------------------------------------- /VMS/test-includes.com: -------------------------------------------------------------------------------- 1 | $! Quick script to check how well including individual header files works 2 | $! on VMS, even when the VMS macro isn't defined. 3 | $ 4 | $ sav_def = f$env("DEFAULT") 5 | $ here = f$parse("A.;0",f$ENV("PROCEDURE")) - "A.;0" 6 | $ set default 'here' 7 | $ set default [-.include.openssl] 8 | $ define openssl 'f$env("DEFAULT")' 9 | $ set default [--] 10 | $ 11 | $ loop: 12 | $ f = f$search("openssl:*.h") 13 | $ if f .eqs. "" then goto loop_end 14 | $ write sys$output "Checking ",f 15 | $ open/write foo foo.c 16 | $ write foo "#undef VMS" 17 | $ write foo "#include " 18 | $ write foo "#include " 19 | $ write foo "main()" 20 | $ write foo "{printf(""foo\n"");}" 21 | $ close foo 22 | $ cc/STANDARD=ANSI89/NOLIST/PREFIX=ALL foo.c 23 | $ delete foo.c; 24 | $ goto loop 25 | $ loop_end: 26 | $ set default 'save_def' 27 | $ exit 28 | 29 | -------------------------------------------------------------------------------- /doc/crypto/DSA_dup_DH.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DSA_dup_DH - create a DH structure out of DSA structure 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | DH * DSA_dup_DH(const DSA *r); 12 | 13 | =head1 DESCRIPTION 14 | 15 | DSA_dup_DH() duplicates DSA parameters/keys as DH parameters/keys. q 16 | is lost during that conversion, but the resulting DH parameters 17 | contain its length. 18 | 19 | =head1 RETURN VALUE 20 | 21 | DSA_dup_DH() returns the new B structure, and NULL on error. The 22 | error codes can be obtained by L. 23 | 24 | =head1 NOTE 25 | 26 | Be careful to avoid small subgroup attacks when using this. 27 | 28 | =head1 SEE ALSO 29 | 30 | L, L, L 31 | 32 | =head1 HISTORY 33 | 34 | DSA_dup_DH() was added in OpenSSL 0.9.4. 35 | 36 | =cut 37 | -------------------------------------------------------------------------------- /ms/uplink-common.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # 3 | # pull APPLINK_MAX value from applink.c... 4 | $applink_c=$0; 5 | $applink_c=~s|[^/\\]+$||g; 6 | $applink_c.="applink.c"; 7 | open(INPUT,$applink_c) || die "can't open $applink_c: $!"; 8 | @max=grep {/APPLINK_MAX\s+(\d+)/} ; 9 | close(INPUT); 10 | ($#max==0) or die "can't find APPLINK_MAX in $applink_c"; 11 | 12 | $max[0]=~/APPLINK_MAX\s+(\d+)/; 13 | $N=$1; # number of entries in OPENSSL_UplinkTable not including 14 | # OPENSSL_UplinkTable[0], which contains this value... 15 | 16 | 1; 17 | 18 | # Idea is to fill the OPENSSL_UplinkTable with pointers to stubs 19 | # which invoke 'void OPENSSL_Uplink (ULONG_PTR *table,int index)'; 20 | # and then dereference themselves. Latter shall result in endless 21 | # loop *unless* OPENSSL_Uplink does not replace 'table[index]' with 22 | # something else, e.g. as 'table[index]=unimplemented;'... 23 | -------------------------------------------------------------------------------- /doc/crypto/DSA_generate_key.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DSA_generate_key - generate DSA key pair 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int DSA_generate_key(DSA *a); 12 | 13 | =head1 DESCRIPTION 14 | 15 | DSA_generate_key() expects B to contain DSA parameters. It generates 16 | a new key pair and stores it in Bpub_key> and Bpriv_key>. 17 | 18 | The PRNG must be seeded prior to calling DSA_generate_key(). 19 | 20 | =head1 RETURN VALUE 21 | 22 | DSA_generate_key() returns 1 on success, 0 otherwise. 23 | The error codes can be obtained by L. 24 | 25 | =head1 SEE ALSO 26 | 27 | L, L, L, 28 | L 29 | 30 | =head1 HISTORY 31 | 32 | DSA_generate_key() is available since SSLeay 0.8. 33 | 34 | =cut 35 | -------------------------------------------------------------------------------- /test/pkcs7-1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PKCS7----- 2 | MIICUAYJKoZIhvcNAQcCoIICQTCCAj0CAQExDjAMBggqhkiG9w0CAgUAMCgGCSqG 3 | SIb3DQEHAaAbBBlFdmVyeW9uZSBnZXRzIEZyaWRheSBvZmYuoIIBXjCCAVowggEE 4 | AgQUAAApMA0GCSqGSIb3DQEBAgUAMCwxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRF 5 | eGFtcGxlIE9yZ2FuaXphdGlvbjAeFw05MjA5MDkyMjE4MDZaFw05NDA5MDkyMjE4 6 | MDVaMEIxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRFeGFtcGxlIE9yZ2FuaXphdGlv 7 | bjEUMBIGA1UEAxMLVGVzdCBVc2VyIDEwWzANBgkqhkiG9w0BAQEFAANKADBHAkAK 8 | ZnkdxpiBaN56t3QZu3+wwAHGJxAnAHUUKULhmo2MUdBTs+N4Kh3l3Fr06+mUaBcB 9 | FKHf5nzcmpr1XWVWILurAgMBAAEwDQYJKoZIhvcNAQECBQADQQBFGqHhqncgSl/N 10 | 9XYGnQL3MsJvNnsNV4puZPOakR9Hld8JlDQFEaDR30ogsmp3TMrvdfxpLlTCoZN8 11 | BxEmnZsWMYGbMIGYAgEBMDQwLDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFEV4YW1w 12 | bGUgT3JnYW5pemF0aW9uAgQUAAApMAwGCCqGSIb3DQICBQAwDQYJKoZIhvcNAQEB 13 | BQAEQAX6aoEvx9+L9PJUJQngPoRuEbnGIL4gCe+0QO+8xmkhaZSsBPNBtX0FIC1C 14 | j7Kie1x339mxW/w9VZNTUDQQweHh 15 | -----END PKCS7----- 16 | -------------------------------------------------------------------------------- /demos/engines/rsaref/README: -------------------------------------------------------------------------------- 1 | librsaref.so is a demonstration dynamic engine that does RSA 2 | operations using the old RSAref 2.0 implementation. 3 | 4 | To make proper use of this engine, you must download RSAref 2.0 5 | (search the web for rsaref.tar.Z for example) and unpack it in this 6 | directory, so you'll end up having the subdirectories "install" and 7 | "source" among others. 8 | 9 | To build, do the following: 10 | 11 | make 12 | 13 | This will list a number of available targets to choose from. Most of 14 | them are architecture-specific. The exception is "gnu" which is to be 15 | used on systems where GNU ld and gcc have been installed in such a way 16 | that gcc uses GNU ld to link together programs and shared libraries. 17 | 18 | The make file assumes you use gcc. To change that, just reassign CC: 19 | 20 | make CC=cc 21 | 22 | The result is librsaref.so, which you can copy to any place you wish. 23 | -------------------------------------------------------------------------------- /test/Sssrsa.cnf: -------------------------------------------------------------------------------- 1 | # 2 | # SSLeay example configuration file. 3 | # This is mostly being used for generation of certificate requests. 4 | # 5 | # create RSA certs - Server 6 | 7 | RANDFILE = ./.rnd 8 | 9 | #################################################################### 10 | [ req ] 11 | distinguished_name = req_distinguished_name 12 | encrypt_key = no 13 | 14 | [ req_distinguished_name ] 15 | countryName = Country Name (2 letter code) 16 | countryName_default = ES 17 | countryName_value = ES 18 | 19 | organizationName = Organization Name (eg, company) 20 | organizationName_value = Tortilleras S.A. 21 | 22 | 0.commonName = Common Name (eg, YOUR name) 23 | 0.commonName_value = Torti 24 | 25 | 1.commonName = Common Name (eg, YOUR name) 26 | 1.commonName_value = Gordita 27 | -------------------------------------------------------------------------------- /crypto/dh/dh2048.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIIBCAKCAQEA7ZKJNYJFVcs7+6J2WmkEYb8h86tT0s0h2v94GRFS8Q7B4lW9aG9o 3 | AFO5Imov5Jo0H2XMWTKKvbHbSe3fpxJmw/0hBHAY8H/W91hRGXKCeyKpNBgdL8sh 4 | z22SrkO2qCnHJ6PLAMXy5fsKpFmFor2tRfCzrfnggTXu2YOzzK7q62bmqVdmufEo 5 | pT8igNcLpvZxk5uBDvhakObMym9mX3rAEBoe8PwttggMYiiw7NuJKO4MqD1llGkW 6 | aVM8U2ATsCun1IKHrRxynkE1/MJ86VHeYYX8GZt2YA8z+GuzylIOKcMH6JAWzMwA 7 | Gbatw6QwizOhr9iMjZ0B26TE3X8LvW84wwIBAg== 8 | -----END DH PARAMETERS----- 9 | -----BEGIN DH PARAMETERS----- 10 | MIIBCAKCAQEArtA3w73zP6Lu3EOQtwogiXt3AXXpuS6yD4BhzNS1pZFyPHk0/an5 11 | 8ydEkPhQZHKDW+BZJxxPLANaTudWo2YT8TgtvUdN6KSgMiEi6McwqDw+SADuvW+F 12 | SKUYFxG6VFIxyEP6xBdf+vhJxEDbRG2EYsHDRRtJ76gp9cSKTHusf2R+4AAVGqnt 13 | gRAbNqtcOar/7FSj+Pl8G3v0Bty0LcCSpbqgYlnv6z+rErQmmC6PPvSz97TDMCok 14 | yKpCE9hFA1zkqK3TH4FmFvGeIaXJUIBZf4mArWuBTjWFW3nmhESRUn1VK3K3x42N 15 | a5k6c2+EhrMFiLjxuH6JZoqL0/E93FF9SwIBAg== 16 | -----END DH PARAMETERS----- 17 | -------------------------------------------------------------------------------- /doc/apps/errstr.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | errstr - lookup error codes 6 | 7 | =head1 SYNOPSIS 8 | 9 | B 10 | 11 | =head1 DESCRIPTION 12 | 13 | Sometimes an application will not load error message and only 14 | numerical forms will be available. The B utility can be used to 15 | display the meaning of the hex code. The hex code is the hex digits after the 16 | second colon. 17 | 18 | =head1 EXAMPLE 19 | 20 | The error code: 21 | 22 | 27594:error:2006D080:lib(32):func(109):reason(128):bss_file.c:107: 23 | 24 | can be displayed with: 25 | 26 | openssl errstr 2006D080 27 | 28 | to produce the error message: 29 | 30 | error:2006D080:BIO routines:BIO_new_file:no such file 31 | 32 | =head1 SEE ALSO 33 | 34 | L, 35 | L, 36 | L 37 | 38 | 39 | =cut 40 | -------------------------------------------------------------------------------- /shlib/solaris-sc4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | major="1" 4 | 5 | slib=libssl 6 | sh_slib=$slib.so.$major 7 | 8 | clib=libcrypto 9 | sh_clib=$clib.so.$major 10 | 11 | echo collecting all object files for $clib.so 12 | OBJS= 13 | find . -name \*.o -print > allobjs 14 | for obj in `ar t libcrypto.a` 15 | do 16 | OBJS="$OBJS `grep $obj allobjs`" 17 | done 18 | 19 | echo linking $clib.so 20 | cc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket 21 | 22 | rm -f $clib.so 23 | ln -s $sh_clib $clib.so 24 | 25 | echo collecting all object files for $slib.so 26 | OBJS= 27 | for obj in `ar t libssl.a` 28 | do 29 | OBJS="$OBJS `grep $obj allobjs`" 30 | done 31 | 32 | echo linking $slib.so 33 | cc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto 34 | 35 | rm -f $slib.so 36 | ln -s $sh_slib $slib.so 37 | 38 | rm -f allobjs 39 | 40 | mv libRSAglue.a libRSAglue.a.orig 41 | mv libcrypto.a libcrypto.a.orig 42 | mv libssl.a libssl.a.orig 43 | -------------------------------------------------------------------------------- /test/Sssdsa.cnf: -------------------------------------------------------------------------------- 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 | 7 | RANDFILE = ./.rnd 8 | 9 | #################################################################### 10 | [ req ] 11 | distinguished_name = req_distinguished_name 12 | encrypt_rsa_key = no 13 | 14 | [ req_distinguished_name ] 15 | countryName = Country Name (2 letter code) 16 | countryName_default = ES 17 | countryName_value = ES 18 | 19 | organizationName = Organization Name (eg, company) 20 | organizationName_value = Tortilleras S.A. 21 | 22 | 0.commonName = Common Name (eg, YOUR name) 23 | 0.commonName_value = Torti 24 | 25 | 1.commonName = Common Name (eg, YOUR name) 26 | 1.commonName_value = Gordita 27 | 28 | -------------------------------------------------------------------------------- /apps/ca-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXQIBAAKBgQCju6PLddelT+nIMm07GQwmYa/eZ2JWbsmt2gotSCqM7asFp425 3 | gxSK4jqhhT62UPpqDBEwvQ+fYkVv3RV0r9ReuZGv12NoS4fXsQgqO17lHA7Od0Kd 4 | 2yNwJjKh44MxPKDt2o8iQMyZE0zlHnEFNpsP4COLTDNC6ljEEu5bk8uPsQIDAQAB 5 | AoGAVZmpFZsDZfr0l2S9tLLwpjRWNOlKATQkno6q2WesT0eGLQufTciY+c8ypfU6 6 | hyio8r5iUl/VhhdjhAtKx1mRpiotftHo/eYf8rtsrnprOnWG0bWjLjtIoMbcxGn2 7 | J3bN6LJmbJMjDs0eJ3KnTu646F3nDUw2oGAwmpzKXA1KAP0CQQDRvQhxk2D3Pehs 8 | HvG665u2pB5ipYQngEFlZO7RHJZzJOZEWSLuuMqaF/7pTfA5jiBvWqCgJeCRRInL 9 | 21ru4dlPAkEAx9jj7BgKn5TYnMoBSSe0afjsV9oApVpN1Nacb1YDtCwy+scp3++s 10 | nFxlv98wxIlSdpwMUn+AUWfjiWR7Tu/G/wJBAJ/KjwZIrFVxewP0x2ILYsTRYLzz 11 | MS4PDsO7FB+I0i7DbBOifXS2oNSpd3I0CNMwrxFnUHzynpbOStVfN3ZL5w0CQQCa 12 | pwFahxBRhkJKsxhjoFJBX9yl75JoY4Wvm5Tbo9ih6UJaRx3kqfkN14L2BKYcsZgb 13 | KY9vmDOYy6iNfjDeWTfJAkBkfPUb8oTJ/nSP5zN6sqGxSY4krc4xLxpRmxoJ8HL2 14 | XfhqXkTzbU13RX9JJ/NZ8vQN9Vm2NhxRGJocQkmcdVtJ 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /test/clean_test.com: -------------------------------------------------------------------------------- 1 | $! 2 | $! Delete various test results files. 3 | $! 4 | $ def_orig = f$environment( "default") 5 | $ proc = f$environment( "procedure") 6 | $ proc_dev_dir = f$parse( "A.;", proc) - "A.;" 7 | $! 8 | $ on control_c then goto tidy 9 | $ on error then goto tidy 10 | $! 11 | $ set default 'proc_dev_dir' 12 | $! 13 | $ files := *.cms;*, *.srl;*, *.ss;*, - 14 | cms.err;*, cms.out;*, newreq.pem;*, - 15 | p.txt-zlib-cipher;*, - 16 | smtst.txt;*, testkey.pem;*, testreq.pem;*, - 17 | test_*.err;*, test_*.out;*, - 18 | .rnd;* 19 | $! 20 | $ delim = "," 21 | $ i = 0 22 | $ loop: 23 | $ file = f$edit( f$element( i, delim, files), "trim") 24 | $ if (file .eqs. delim) then goto loop_end 25 | $ if (f$search( file) .nes. "") then - 26 | delete 'p1' 'file' 27 | $ i = i+ 1 28 | $ goto loop 29 | $ loop_end: 30 | $! 31 | $ tidy: 32 | $ 33 | $ if (f$type( def_orig) .nes. "") then - 34 | set default 'def_orig' 35 | $! 36 | -------------------------------------------------------------------------------- /apps/pca-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXAIBAAKBgQCdoWk/3+WcMlfjIrkg40ketmnQaEogQe1LLcuOJV6rKfUSAsPg 3 | wgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp22Jp85PmemiDzyUIStwk72qhp1imbANZ 4 | vlmlCFKiQrjUyuDfu4TABmn+kkt3vR1YBEOGt+IFye1UBVSATVdRJ2UVhwIDAQAB 5 | AoGAba4fTtuap5l7/8ZsbE7Z1O32KJY4ZcOZukLOLUUhXxXduT+FTgGWujc0/rgc 6 | z9qYCLlNZHOouMYTgtSfYvuMuLZ11VIt0GYH+nRioLShE59Yy+zCRyC+gPigS1kz 7 | xvo14AsOIPYV14Tk/SsHyq6E0eTk7VzaIE197giiINUERPECQQDSKmtPTh/lRKw7 8 | HSZSM0I1mFWn/1zqrAbontRQY5w98QWIOe5qmzYyFbPXYT3d9BzlsMyhgiRNoBbD 9 | yvohSHXJAkEAwAHx6ezAZeWWzD5yXD36nyjpkVCw7Tk7TSmOceLJMWt1QcrCfqlS 10 | xA5jjpQ6Z8suU5DdtWAryM2sAir1WisYzwJAd6Zcx56jvAQ3xcPXsE6scBTVFzrj 11 | 7FqZ6E+cclPzfLQ+QQsyOBE7bpI6e/FJppY26XGZXo3YGzV8IGXrt40oOQJALETG 12 | h86EFXo3qGOFbmsDy4pdP5nBERCu8X1xUCSfintiD4c2DInxgS5oGclnJeMcjTvL 13 | QjQoJCX3UJCi/OUO1QJBAKgcDHWjMvt+l1pjJBsSEZ0HX9AAIIVx0RQmbFGS+F2Q 14 | hhu5l77WnnZOQ9vvhV5u7NPCUF9nhU3jh60qWWO8mkc= 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /apps/s1024key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQCzEfU8E+ZGTGtHXV5XhvM2Lg32fXUIjydXb34BGVPX6oN7+aNV 3 | S9eWayvW/+9/vUb0aCqilJrpFesgItV2T8VhhjOE++XUz46uNpcMU7wHMEAXUufP 4 | pztpFm8ZEk2tFKvadkSSoN8lb11juvZVkSkPlB65pFhSe4QKSp6J4HrkYwIDAQAB 5 | AoGBAKy8jvb0Lzby8q11yNLf7+78wCVdYi7ugMHcYA1JVFK8+zb1WfSm44FLQo/0 6 | dSChAjgz36TTexeLODPYxleJndjVcOMVzsLJjSM8dLpXsTS4FCeMbhw2s2u+xqKY 7 | bbPWfk+HOTyJjfnkcC5Nbg44eOmruq0gSmBeUXVM5UntlTnxAkEA7TGCA3h7kx5E 8 | Bl4zl2pc3gPAGt+dyfk5Po9mGJUUXhF5p2zueGmYWW74TmOWB1kzt4QRdYMzFePq 9 | zfDNXEa1CwJBAMFErdY0xp0UJ13WwBbUTk8rujqQdHtjw0klhpbuKkjxu2hN0wwM 10 | 6p0D9qxF7JHaghqVRI0fAW/EE0OzdHMR9QkCQQDNR26dMFXKsoPu+vItljj/UEGf 11 | QG7gERiQ4yxaFBPHgdpGo0kT31eh9x9hQGDkxTe0GNG/YSgCRvm8+C3TMcKXAkBD 12 | dhGn36wkUFCddMSAM4NSJ1VN8/Z0y5HzCmI8dM3VwGtGMUQlxKxwOl30LEQzdS5M 13 | 0SWojNYXiT2gOBfBwtbhAkEAhafl5QEOIgUz+XazS/IlZ8goNKdDVfYgK3mHHjvv 14 | nY5G+AuGebdNkXJr4KSWxDcN+C2i47zuj4QXA16MAOandA== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /demos/cms/cakey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQCqJMal1uC1/1wzi5+dE4EZF2im3BgROm5PVMbwPY9V1t+KYvtd 3 | c3rMcRgJaMbP+qaEcDXoIsZfYXGRielgfDNZmZcj1y/FOum+Jc2OZMs3ggPmjIQ3 4 | dbBECq0hZKcbz7wfr+2OeNWm46iTjcSIXpGIRhUYEzOgv7zb8oOU70IbbwIDAQAB 5 | AoGBAKWOZ2UTc1BkjDjz0XoscmAR8Rj77MdGzfOPkIxPultSW+3yZpkGNyUbnsH5 6 | HAtf4Avai/m3bMN+s91kDpx9/g/I9ZEHPQLcDICETvwt/EHT7+hwvaQgsM+TgpMs 7 | tjlGZOWent6wVIuvwwzqOMXZLgK9FvY7upwgtrys4G3Kab5hAkEA2QzFflWyEvKS 8 | rMSaVtn/IjFilwa7H0IdakkjM34z4peerFTPBr4J47YD4RCR/dAvxyNy3zUxtH18 9 | 9R6dUixI6QJBAMitJD0xOkbGWBX8KVJvRiKOIdf/95ZUAgN/h3bWKy57EB9NYj3u 10 | jbxXcvdjfSqiITykkjAg7SG7nrlzJsu6CpcCQG6gVsy0auXDY0TRlASuaZ6I40Is 11 | uRUOgqWYj2uAaHuWYdZeB4LdO3cnX0TISFDAWom6JKNlnmbrCtR4fSDT13kCQQCU 12 | +VQJyV3F5MDHsWbLt6eNR46AV5lpk/vatPXPlrZ/zwPs+PmRmGLICvNiDA2DdNDP 13 | wCx2Zjsj67CtY3rNitMJAkEAm09BQnjnbBXUb1rd2SjNDWTsu80Z+zLu8pAwXNhW 14 | 8nsvMYqlYMIxuMPwu/QuTnMRhMZ08uhqoD3ukZnBeoMEVg== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /demos/smime/cakey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQCqJMal1uC1/1wzi5+dE4EZF2im3BgROm5PVMbwPY9V1t+KYvtd 3 | c3rMcRgJaMbP+qaEcDXoIsZfYXGRielgfDNZmZcj1y/FOum+Jc2OZMs3ggPmjIQ3 4 | dbBECq0hZKcbz7wfr+2OeNWm46iTjcSIXpGIRhUYEzOgv7zb8oOU70IbbwIDAQAB 5 | AoGBAKWOZ2UTc1BkjDjz0XoscmAR8Rj77MdGzfOPkIxPultSW+3yZpkGNyUbnsH5 6 | HAtf4Avai/m3bMN+s91kDpx9/g/I9ZEHPQLcDICETvwt/EHT7+hwvaQgsM+TgpMs 7 | tjlGZOWent6wVIuvwwzqOMXZLgK9FvY7upwgtrys4G3Kab5hAkEA2QzFflWyEvKS 8 | rMSaVtn/IjFilwa7H0IdakkjM34z4peerFTPBr4J47YD4RCR/dAvxyNy3zUxtH18 9 | 9R6dUixI6QJBAMitJD0xOkbGWBX8KVJvRiKOIdf/95ZUAgN/h3bWKy57EB9NYj3u 10 | jbxXcvdjfSqiITykkjAg7SG7nrlzJsu6CpcCQG6gVsy0auXDY0TRlASuaZ6I40Is 11 | uRUOgqWYj2uAaHuWYdZeB4LdO3cnX0TISFDAWom6JKNlnmbrCtR4fSDT13kCQQCU 12 | +VQJyV3F5MDHsWbLt6eNR46AV5lpk/vatPXPlrZ/zwPs+PmRmGLICvNiDA2DdNDP 13 | wCx2Zjsj67CtY3rNitMJAkEAm09BQnjnbBXUb1rd2SjNDWTsu80Z+zLu8pAwXNhW 14 | 8nsvMYqlYMIxuMPwu/QuTnMRhMZ08uhqoD3ukZnBeoMEVg== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /doc/crypto/ERR_set_mark.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | ERR_set_mark, ERR_pop_to_mark - set marks and pop errors until mark 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int ERR_set_mark(void); 12 | 13 | int ERR_pop_to_mark(void); 14 | 15 | =head1 DESCRIPTION 16 | 17 | ERR_set_mark() sets a mark on the current topmost error record if there 18 | is one. 19 | 20 | ERR_pop_to_mark() will pop the top of the error stack until a mark is found. 21 | The mark is then removed. If there is no mark, the whole stack is removed. 22 | 23 | =head1 RETURN VALUES 24 | 25 | ERR_set_mark() returns 0 if the error stack is empty, otherwise 1. 26 | 27 | ERR_pop_to_mark() returns 0 if there was no mark in the error stack, which 28 | implies that the stack became empty, otherwise 1. 29 | 30 | =head1 SEE ALSO 31 | 32 | L 33 | 34 | =head1 HISTORY 35 | 36 | ERR_set_mark() and ERR_pop_to_mark() were added in OpenSSL 0.9.8. 37 | 38 | =cut 39 | -------------------------------------------------------------------------------- /doc/crypto/BIO_s_null.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | BIO_s_null - null data sink 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | BIO_METHOD * BIO_s_null(void); 12 | 13 | =head1 DESCRIPTION 14 | 15 | BIO_s_null() returns the null sink BIO method. Data written to 16 | the null sink is discarded, reads return EOF. 17 | 18 | =head1 NOTES 19 | 20 | A null sink BIO behaves in a similar manner to the Unix /dev/null 21 | device. 22 | 23 | A null bio can be placed on the end of a chain to discard any data 24 | passed through it. 25 | 26 | A null sink is useful if, for example, an application wishes to digest some 27 | data by writing through a digest bio but not send the digested data anywhere. 28 | Since a BIO chain must normally include a source/sink BIO this can be achieved 29 | by adding a null sink BIO to the end of the chain 30 | 31 | =head1 RETURN VALUES 32 | 33 | BIO_s_null() returns the null sink BIO method. 34 | 35 | =head1 SEE ALSO 36 | 37 | TBA 38 | -------------------------------------------------------------------------------- /doc/crypto/d2i_X509_REQ.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | d2i_X509_REQ, i2d_X509_REQ, d2i_X509_REQ_bio, d2i_X509_REQ_fp, 6 | i2d_X509_REQ_bio, i2d_X509_REQ_fp - PKCS#10 certificate request functions. 7 | 8 | =head1 SYNOPSIS 9 | 10 | #include 11 | 12 | X509_REQ *d2i_X509_REQ(X509_REQ **a, const unsigned char **pp, long length); 13 | int i2d_X509_REQ(X509_REQ *a, unsigned char **pp); 14 | 15 | X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **x); 16 | X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **x); 17 | 18 | int i2d_X509_REQ_bio(BIO *bp, X509_REQ *x); 19 | int i2d_X509_REQ_fp(FILE *fp, X509_REQ *x); 20 | 21 | =head1 DESCRIPTION 22 | 23 | These functions decode and encode a PKCS#10 certificate request. 24 | 25 | Othewise these behave in a similar way to d2i_X509() and i2d_X509() 26 | described in the L manual page. 27 | 28 | =head1 SEE ALSO 29 | 30 | L 31 | 32 | =head1 HISTORY 33 | 34 | TBA 35 | 36 | =cut 37 | -------------------------------------------------------------------------------- /test/testca: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | SH="/bin/sh" 4 | if test "$OSTYPE" = msdosdjgpp; then 5 | PATH="../apps\;$PATH" 6 | else 7 | PATH="../apps:$PATH" 8 | fi 9 | export SH PATH 10 | 11 | SSLEAY_CONFIG="-config CAss.cnf" 12 | export SSLEAY_CONFIG 13 | 14 | OPENSSL="`pwd`/../util/opensslwrap.sh" 15 | export OPENSSL 16 | 17 | /bin/rm -fr demoCA 18 | $SH ../apps/CA.sh -newca < \n"; 4 | 5 | open(IN0,"<$ARGV[0]") || die "unable to open $ARGV[0]\n"; 6 | open(IN1,"<$ARGV[1]") || die "unable to open $ARGV[1]\n"; 7 | binmode IN0; 8 | binmode IN1; 9 | 10 | $tot=0; 11 | $ret=1; 12 | for (;;) 13 | { 14 | $n1=sysread(IN0,$b1,4096); 15 | $n2=sysread(IN1,$b2,4096); 16 | 17 | last if ($n1 != $n2); 18 | last if ($b1 ne $b2); 19 | last if ($n1 < 0); 20 | if ($n1 == 0) 21 | { 22 | $ret=0; 23 | last; 24 | } 25 | $tot+=$n1; 26 | } 27 | 28 | close(IN0); 29 | close(IN1); 30 | if ($ret) 31 | { 32 | printf STDERR "$ARGV[0] and $ARGV[1] are different\n"; 33 | @a1=unpack("C*",$b1); 34 | @a2=unpack("C*",$b2); 35 | for ($i=0; $i<=$#a1; $i++) 36 | { 37 | if ($a1[$i] ne $a2[$i]) 38 | { 39 | printf "%02X %02X <<\n",$a1[$i],$a2[$i]; 40 | last; 41 | } 42 | } 43 | $nm=$tot+$n1; 44 | $tot+=$i+1; 45 | printf STDERR "diff at char $tot of $nm\n"; 46 | } 47 | exit($ret); 48 | -------------------------------------------------------------------------------- /shlib/solaris.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "#define DATE \"`date`\"" >crypto/date.h 4 | 5 | major="0" 6 | minor="8.0" 7 | slib=libssl 8 | clib=libcrypto 9 | CC=gcc 10 | CPP='gcc -E' 11 | AS=as 12 | #FLAGS='-DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -mv8 -Wall' 13 | FLAGS='-DTERMIO -g2 -ggdb -DL_ENDIAN -Wall -DREF_CHECK -DCRYPTO_MDEBUG' 14 | INCLUDE='-Iinclude -Icrypto -Issl' 15 | SHFLAGS='-DPIC -fpic' 16 | 17 | CFLAGS="$FLAGS $INCLUDE $SHFLAGS" 18 | ASM_OBJ=""; 19 | 20 | echo compiling bignum assember 21 | $AS -o bn_asm.o crypto/bn/asm/sparc.s 22 | CFLAGS="$CFLAGS -DBN_ASM" 23 | ASM_OBJ="$ASM_OBJ bn_asm.o" 24 | 25 | echo compiling $clib 26 | $CC -c $CFLAGS -DCFLAGS="\"$FLAGS\"" -o crypto.o crypto/crypto.c 27 | 28 | echo linking $clib.so 29 | gcc $CFLAGS -shared -o $clib.so.$major.$minor crypto.o $ASM_OBJ -lnsl -lsocket 30 | 31 | echo compiling $slib.so 32 | $CC -c $CFLAGS -o ssl.o ssl/ssl.c 33 | 34 | echo building $slib.so 35 | gcc $CFLAGS -shared -o $slib.so ssl.o -L. -lcrypto 36 | 37 | -------------------------------------------------------------------------------- /doc/crypto/DH_get_ex_new_index.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DH_get_ex_new_index, DH_set_ex_data, DH_get_ex_data - add application specific data to DH structures 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int DH_get_ex_new_index(long argl, void *argp, 12 | CRYPTO_EX_new *new_func, 13 | CRYPTO_EX_dup *dup_func, 14 | CRYPTO_EX_free *free_func); 15 | 16 | int DH_set_ex_data(DH *d, int idx, void *arg); 17 | 18 | char *DH_get_ex_data(DH *d, int idx); 19 | 20 | =head1 DESCRIPTION 21 | 22 | These functions handle application specific data in DH 23 | structures. Their usage is identical to that of 24 | RSA_get_ex_new_index(), RSA_set_ex_data() and RSA_get_ex_data() 25 | as described in L. 26 | 27 | =head1 SEE ALSO 28 | 29 | L, L 30 | 31 | =head1 HISTORY 32 | 33 | DH_get_ex_new_index(), DH_set_ex_data() and DH_get_ex_data() are 34 | available since OpenSSL 0.9.5. 35 | 36 | =cut 37 | -------------------------------------------------------------------------------- /doc/ssl/SSL_set_bio.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_set_bio - connect the SSL object with a BIO 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | void SSL_set_bio(SSL *ssl, BIO *rbio, BIO *wbio); 12 | 13 | =head1 DESCRIPTION 14 | 15 | SSL_set_bio() connects the BIOs B and B for the read and write 16 | operations of the TLS/SSL (encrypted) side of B. 17 | 18 | The SSL engine inherits the behaviour of B and B, respectively. 19 | If a BIO is non-blocking, the B will also have non-blocking behaviour. 20 | 21 | If there was already a BIO connected to B, BIO_free() will be called 22 | (for both the reading and writing side, if different). 23 | 24 | =head1 RETURN VALUES 25 | 26 | SSL_set_bio() cannot fail. 27 | 28 | =head1 SEE ALSO 29 | 30 | L, 31 | L, L, 32 | L, L, L 33 | 34 | =cut 35 | -------------------------------------------------------------------------------- /test/testcrl.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN X509 CRL----- 2 | MIICjTCCAfowDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMxIDAeBgNVBAoT 3 | F1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2VydmVy 4 | IENlcnRpZmljYXRpb24gQXV0aG9yaXR5Fw05NTA1MDIwMjEyMjZaFw05NTA2MDEw 5 | MDAxNDlaMIIBaDAWAgUCQQAABBcNOTUwMjAxMTcyNDI2WjAWAgUCQQAACRcNOTUw 6 | MjEwMDIxNjM5WjAWAgUCQQAADxcNOTUwMjI0MDAxMjQ5WjAWAgUCQQAADBcNOTUw 7 | MjI1MDA0NjQ0WjAWAgUCQQAAGxcNOTUwMzEzMTg0MDQ5WjAWAgUCQQAAFhcNOTUw 8 | MzE1MTkxNjU0WjAWAgUCQQAAGhcNOTUwMzE1MTk0MDQxWjAWAgUCQQAAHxcNOTUw 9 | MzI0MTk0NDMzWjAWAgUCcgAABRcNOTUwMzI5MjAwNzExWjAWAgUCcgAAERcNOTUw 10 | MzMwMDIzNDI2WjAWAgUCQQAAIBcNOTUwNDA3MDExMzIxWjAWAgUCcgAAHhcNOTUw 11 | NDA4MDAwMjU5WjAWAgUCcgAAQRcNOTUwNDI4MTcxNzI0WjAWAgUCcgAAOBcNOTUw 12 | NDI4MTcyNzIxWjAWAgUCcgAATBcNOTUwNTAyMDIxMjI2WjANBgkqhkiG9w0BAQIF 13 | AAN+AHqOEJXSDejYy0UwxxrH/9+N2z5xu/if0J6qQmK92W0hW158wpJg+ovV3+wQ 14 | wvIEPRL2rocL0tKfAsVq1IawSJzSNgxG0lrcla3MrJBnZ4GaZDu4FutZh72MR3Gt 15 | JaAL3iTJHJD55kK2D/VoyY1djlsPuNh6AEgdVwFAyp0v 16 | -----END X509 CRL----- 17 | -------------------------------------------------------------------------------- /test/v3-cert2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICiTCCAfKgAwIBAgIEMeZfHzANBgkqhkiG9w0BAQQFADB9MQswCQYDVQQGEwJD 3 | YTEPMA0GA1UEBxMGTmVwZWFuMR4wHAYDVQQLExVObyBMaWFiaWxpdHkgQWNjZXB0 4 | ZWQxHzAdBgNVBAoTFkZvciBEZW1vIFB1cnBvc2VzIE9ubHkxHDAaBgNVBAMTE0Vu 5 | dHJ1c3QgRGVtbyBXZWIgQ0EwHhcNOTYwNzEyMTQyMDE1WhcNOTYxMDEyMTQyMDE1 6 | WjB0MSQwIgYJKoZIhvcNAQkBExVjb29rZUBpc3NsLmF0bC5ocC5jb20xCzAJBgNV 7 | BAYTAlVTMScwJQYDVQQLEx5IZXdsZXR0IFBhY2thcmQgQ29tcGFueSAoSVNTTCkx 8 | FjAUBgNVBAMTDVBhdWwgQS4gQ29va2UwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA 9 | 6ceSq9a9AU6g+zBwaL/yVmW1/9EE8s5you1mgjHnj0wAILuoB3L6rm6jmFRy7QZT 10 | G43IhVZdDua4e+5/n1ZslwIDAQABo2MwYTARBglghkgBhvhCAQEEBAMCB4AwTAYJ 11 | YIZIAYb4QgENBD8WPVRoaXMgY2VydGlmaWNhdGUgaXMgb25seSBpbnRlbmRlZCBm 12 | b3IgZGVtb25zdHJhdGlvbiBwdXJwb3Nlcy4wDQYJKoZIhvcNAQEEBQADgYEAi8qc 13 | F3zfFqy1sV8NhjwLVwOKuSfhR/Z8mbIEUeSTlnH3QbYt3HWZQ+vXI8mvtZoBc2Fz 14 | lexKeIkAZXCesqGbs6z6nCt16P6tmdfbZF3I3AWzLquPcOXjPf4HgstkyvVBn0Ap 15 | jAFN418KF/Cx4qyHB4cjdvLrRjjQLnb2+ibo7QU= 16 | -----END CERTIFICATE----- 17 | -------------------------------------------------------------------------------- /demos/tunala/autogunk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script tries to follow the "GNU way" w.r.t. the autobits. 4 | # This does of course generate a number of irritating files. 5 | # Try to get over it (I am getting there myself). 6 | 7 | # This should generate any missing crud, and then run autoconf which should turn 8 | # configure.in into a "./configure" script and "Makefile.am" into a 9 | # "Makefile.in". Then running "./configure" should turn "Makefile.in" into 10 | # "Makefile" and should generate the config.h containing your systems various 11 | # settings. I know ... what a hassle ... 12 | 13 | # Also, sometimes these autobits things generate bizarre output (looking like 14 | # errors). So I direct everything "elsewhere" ... 15 | 16 | (aclocal 17 | autoheader 18 | libtoolize --copy --force 19 | automake --foreign --add-missing --copy 20 | autoconf) 1> /dev/null 2>&1 21 | 22 | # Move the "no-autotools" Makefile out of the way 23 | if test ! -f Makefile.plain; then 24 | mv Makefile Makefile.plain 25 | fi 26 | -------------------------------------------------------------------------------- /test/v3-cert1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICjTCCAfigAwIBAgIEMaYgRzALBgkqhkiG9w0BAQQwRTELMAkGA1UEBhMCVVMx 3 | NjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFuZCBTcGFjZSBBZG1pbmlz 4 | dHJhdGlvbjAmFxE5NjA1MjgxMzQ5MDUrMDgwMBcROTgwNTI4MTM0OTA1KzA4MDAw 5 | ZzELMAkGA1UEBhMCVVMxNjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFu 6 | ZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEgMAkGA1UEBRMCMTYwEwYDVQQDEwxTdGV2 7 | ZSBTY2hvY2gwWDALBgkqhkiG9w0BAQEDSQAwRgJBALrAwyYdgxmzNP/ts0Uyf6Bp 8 | miJYktU/w4NG67ULaN4B5CnEz7k57s9o3YY3LecETgQ5iQHmkwlYDTL2fTgVfw0C 9 | AQOjgaswgagwZAYDVR0ZAQH/BFowWDBWMFQxCzAJBgNVBAYTAlVTMTYwNAYDVQQK 10 | Ey1OYXRpb25hbCBBZXJvbmF1dGljcyBhbmQgU3BhY2UgQWRtaW5pc3RyYXRpb24x 11 | DTALBgNVBAMTBENSTDEwFwYDVR0BAQH/BA0wC4AJODMyOTcwODEwMBgGA1UdAgQR 12 | MA8ECTgzMjk3MDgyM4ACBSAwDQYDVR0KBAYwBAMCBkAwCwYJKoZIhvcNAQEEA4GB 13 | AH2y1VCEw/A4zaXzSYZJTTUi3uawbbFiS2yxHvgf28+8Js0OHXk1H1w2d6qOHH21 14 | X82tZXd/0JtG0g1T9usFFBDvYK8O0ebgz/P5ELJnBL2+atObEuJy1ZZ0pBDWINR3 15 | WkDNLCGiTkCKp0F5EWIrVDwh54NNevkCQRZita+z4IBO 16 | -----END CERTIFICATE----- 17 | -------------------------------------------------------------------------------- /doc/crypto/d2i_X509_CRL.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | d2i_X509_CRL, i2d_X509_CRL, d2i_X509_CRL_bio, d2i_X509_CRL_fp, 6 | i2d_X509_CRL_bio, i2d_X509_CRL_fp - PKCS#10 certificate request functions. 7 | 8 | =head1 SYNOPSIS 9 | 10 | #include 11 | 12 | X509_CRL *d2i_X509_CRL(X509_CRL **a, const unsigned char **pp, long length); 13 | int i2d_X509_CRL(X509_CRL *a, unsigned char **pp); 14 | 15 | X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **x); 16 | X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **x); 17 | 18 | int i2d_X509_CRL_bio(BIO *bp, X509_CRL *x); 19 | int i2d_X509_CRL_fp(FILE *fp, X509_CRL *x); 20 | 21 | =head1 DESCRIPTION 22 | 23 | These functions decode and encode an X509 CRL (certificate revocation 24 | list). 25 | 26 | Othewise the functions behave in a similar way to d2i_X509() and i2d_X509() 27 | described in the L manual page. 28 | 29 | =head1 SEE ALSO 30 | 31 | L 32 | 33 | =head1 HISTORY 34 | 35 | TBA 36 | 37 | =cut 38 | -------------------------------------------------------------------------------- /doc/crypto/DSA_get_ex_new_index.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DSA_get_ex_new_index, DSA_set_ex_data, DSA_get_ex_data - add application specific data to DSA structures 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int DSA_get_ex_new_index(long argl, void *argp, 12 | CRYPTO_EX_new *new_func, 13 | CRYPTO_EX_dup *dup_func, 14 | CRYPTO_EX_free *free_func); 15 | 16 | int DSA_set_ex_data(DSA *d, int idx, void *arg); 17 | 18 | char *DSA_get_ex_data(DSA *d, int idx); 19 | 20 | =head1 DESCRIPTION 21 | 22 | These functions handle application specific data in DSA 23 | structures. Their usage is identical to that of 24 | RSA_get_ex_new_index(), RSA_set_ex_data() and RSA_get_ex_data() 25 | as described in L. 26 | 27 | =head1 SEE ALSO 28 | 29 | L, L 30 | 31 | =head1 HISTORY 32 | 33 | DSA_get_ex_new_index(), DSA_set_ex_data() and DSA_get_ex_data() are 34 | available since OpenSSL 0.9.5. 35 | 36 | =cut 37 | -------------------------------------------------------------------------------- /doc/crypto/BN_mod_inverse.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | BN_mod_inverse - compute inverse modulo n 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | BIGNUM *BN_mod_inverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n, 12 | BN_CTX *ctx); 13 | 14 | =head1 DESCRIPTION 15 | 16 | BN_mod_inverse() computes the inverse of B modulo B 17 | places the result in B (C<(a*r)%n==1>). If B is NULL, 18 | a new B is created. 19 | 20 | B is a previously allocated B used for temporary 21 | variables. B may be the same B as B or B. 22 | 23 | =head1 RETURN VALUES 24 | 25 | BN_mod_inverse() returns the B containing the inverse, and 26 | NULL on error. The error codes can be obtained by L. 27 | 28 | =head1 SEE ALSO 29 | 30 | L, L, L 31 | 32 | =head1 HISTORY 33 | 34 | BN_mod_inverse() is available in all versions of SSLeay and OpenSSL. 35 | 36 | =cut 37 | -------------------------------------------------------------------------------- /doc/ssl/SSL_get_version.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_get_version - get the protocol version of a connection. 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | const char *SSL_get_version(const SSL *ssl); 12 | 13 | =head1 DESCRIPTION 14 | 15 | SSL_get_version() returns the name of the protocol used for the 16 | connection B. 17 | 18 | =head1 RETURN VALUES 19 | 20 | The following strings can be returned: 21 | 22 | =over 4 23 | 24 | =item SSLv2 25 | 26 | The connection uses the SSLv2 protocol. 27 | 28 | =item SSLv3 29 | 30 | The connection uses the SSLv3 protocol. 31 | 32 | =item TLSv1 33 | 34 | The connection uses the TLSv1.0 protocol. 35 | 36 | =item TLSv1.1 37 | 38 | The connection uses the TLSv1.1 protocol. 39 | 40 | =item TLSv1.2 41 | 42 | The connection uses the TLSv1.2 protocol. 43 | 44 | =item unknown 45 | 46 | This indicates that no version has been set (no connection established). 47 | 48 | =back 49 | 50 | =head1 SEE ALSO 51 | 52 | L 53 | 54 | =cut 55 | -------------------------------------------------------------------------------- /ms/testpemce.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set ssleay=%1% 3 | set tmp1=pem.out 4 | set cmp=fc.exe 5 | 6 | cecopy %ssleay% CE:\OpenSSL 7 | 8 | copy ..\test\testcrl.pem >nul 9 | call tpemce.bat crl testcrl.pem 10 | if errorlevel 1 goto err 11 | 12 | copy ..\test\testp7.pem >nul 13 | call tpemce.bat pkcs7 testp7.pem 14 | if errorlevel 1 goto err 15 | 16 | copy ..\test\testreq2.pem >nul 17 | call tpemce.bat req testreq2.pem 18 | if errorlevel 1 goto err 19 | 20 | copy ..\test\testrsa.pem >nul 21 | call tpemce.bat rsa testrsa.pem 22 | if errorlevel 1 goto err 23 | 24 | copy ..\test\testx509.pem >nul 25 | call tpemce.bat x509 testx509.pem 26 | if errorlevel 1 goto err 27 | 28 | copy ..\test\v3-cert1.pem >nul 29 | call tpemce.bat x509 v3-cert1.pem 30 | if errorlevel 1 goto err 31 | 32 | copy ..\test\v3-cert1.pem >nul 33 | call tpemce.bat x509 v3-cert1.pem 34 | if errorlevel 1 goto err 35 | 36 | copy ..\test\testsid.pem >nul 37 | call tpemce.bat sess_id testsid.pem 38 | if errorlevel 1 goto err 39 | 40 | echo OK 41 | del %tmp1% >nul 2>&1 42 | :err 43 | -------------------------------------------------------------------------------- /apps/privkey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-EDE3-CBC,BA26229A1653B7FF 4 | 5 | 6nhWG8PKhTPO/s3ZvjUa6226NlKdvPDZFsNXOOoSUs9ejxpb/aj5huhs6qRYzsz9 6 | Year47uaAZYhGD0vAagnNiBnYmjWEpN9G/wQxG7pgZThK1ZxDi63qn8aQ8UjuGHo 7 | F6RpnnBQIAnWTWqr/Qsybtc5EoNkrj/Cpx0OfbSr6gZsFBCxwX1R1hT3/mhJ45f3 8 | XMofY32Vdfx9/vtw1O7HmlHXQnXaqnbd9/nn1EpvFJG9+UjPoW7gV4jCOLuR4deE 9 | jS8hm+cpkwXmFtk3VGjT9tQXPpMv3JpYfBqgGQoMAJ5Toq0DWcHi6Wg08PsD8lgy 10 | vmTioPsRg+JGkJkJ8GnusgLpQdlQJbjzd7wGE6ElUFLfOxLo8bLlRHoriHNdWYhh 11 | JjY0LyeTkovcmWxVjImc6ZyBz5Ly4t0BYf1gq3OkjsV91Q1taBxnhiavfizqMCAf 12 | PPB3sLQnlXG77TOXkNxpqbZfEYrVZW2Nsqqdn8s07Uj4IMONZyq2odYKWFPMJBiM 13 | POYwXjMAOcmFMTHYsVlhcUJuV6LOuipw/FEbTtPH/MYMxLe4zx65dYo1rb4iLKLS 14 | gMtB0o/Wl4Xno3ZXh1ucicYnV2J7NpVcjVq+3SFiCRu2SrSkZHZ23EPS13Ec6fcz 15 | 8X/YGA2vTJ8MAOozAzQUwHQYvLk7bIoQVekqDq4p0AZQbhdspHpArCk0Ifqqzg/v 16 | Uyky/zZiQYanzDenTSRVI/8wac3olxpU8QvbySxYqmbkgq6bTpXJfYFQfnAttEsC 17 | dA4S5UFgyOPZluxCAM4yaJF3Ft6neutNwftuJQMbgCUi9vYg2tGdSw== 18 | -----END RSA PRIVATE KEY----- 19 | -------------------------------------------------------------------------------- /doc/crypto/X509_new.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | X509_new, X509_free - X509 certificate ASN1 allocation functions 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | X509 *X509_new(void); 12 | void X509_free(X509 *a); 13 | 14 | =head1 DESCRIPTION 15 | 16 | The X509 ASN1 allocation routines, allocate and free an 17 | X509 structure, which represents an X509 certificate. 18 | 19 | X509_new() allocates and initializes a X509 structure. 20 | 21 | X509_free() frees up the B structure B. 22 | 23 | =head1 RETURN VALUES 24 | 25 | If the allocation fails, X509_new() returns B and sets an error 26 | code that can be obtained by L. 27 | Otherwise it returns a pointer to the newly allocated structure. 28 | 29 | X509_free() returns no value. 30 | 31 | =head1 SEE ALSO 32 | 33 | L, L 34 | 35 | =head1 HISTORY 36 | 37 | X509_new() and X509_free() are available in all versions of SSLeay and OpenSSL. 38 | 39 | =cut 40 | -------------------------------------------------------------------------------- /ms/speed32.bat: -------------------------------------------------------------------------------- 1 | set makefile=ms\nt.mak 2 | 3 | perl Configure b 4 | del tmp\*.obj 5 | nmake -f %makefile% 6 | nmake -f %makefile% 7 | nmake -f %makefile% 8 | out\ssleay version -v -b -f >speed.1 9 | out\ssleay speed >speed.1l 10 | 11 | perl Configure bl-4c-2c 12 | del tmp\rc4*.obj tmp\bn*.obj tmp\md2_dgst.obj 13 | nmake -f %makefile% 14 | nmake -f %makefile% 15 | nmake -f %makefile% 16 | out\ssleay speed rc4 rsa md2 >speed.2l 17 | 18 | perl Configure bl-4c-ri 19 | del tmp\rc4*.obj 20 | nmake -f %makefile% 21 | nmake -f %makefile% 22 | nmake -f %makefile% 23 | out\ssleay speed rc4 >speed.3l 24 | 25 | perl Configure b2-is-ri-dp 26 | del tmp\i_*.obj tmp\rc4*.obj tmp\ecb_enc.obj tmp\bn*.obj 27 | nmake -f %makefile% 28 | nmake -f %makefile% 29 | nmake -f %makefile% 30 | out\ssleay speed rsa rc4 idea des >speed.4l 31 | 32 | type speed.1 >speed.log 33 | type speed.1l >>speed.log 34 | perl util\sp-diff.pl speed.1l speed.2l >>speed.log 35 | perl util\sp-diff.pl speed.1l speed.3l >>speed.log 36 | perl util\sp-diff.pl speed.1l speed.4l >>speed.log 37 | 38 | -------------------------------------------------------------------------------- /shlib/sco5-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | major="0" 4 | minor="9.7b" 5 | 6 | slib=libssl 7 | sh_slib=$slib.so.$major.$minor 8 | 9 | clib=libcrypto 10 | sh_clib=$clib.so.$major.$minor 11 | 12 | FLAGS="-O -DFILIO_H -Kalloca" 13 | SHFLAGS="-Kpic -DPIC" 14 | 15 | touch $sh_clib 16 | touch $sh_slib 17 | 18 | echo collecting all object files for $clib.so 19 | OBJS= 20 | find . -name \*.o -print > allobjs 21 | for obj in `ar t libcrypto.a` 22 | do 23 | OBJS="$OBJS `grep $obj allobjs`" 24 | done 25 | 26 | echo linking $clib.so 27 | cc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket 28 | 29 | rm -f $clib.so 30 | ln -s $sh_clib $clib.so 31 | 32 | echo collecting all object files for $slib.so 33 | OBJS= 34 | for obj in `ar t libssl.a` 35 | do 36 | OBJS="$OBJS `grep $obj allobjs`" 37 | done 38 | 39 | echo linking $slib.so 40 | cc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto 41 | 42 | rm -f $slib.so 43 | ln -s $sh_slib $slib.so 44 | 45 | mv libRSAglue.a libRSAglue.a.orig 46 | mv libcrypto.a libcrypto.a.orig 47 | mv libssl.a libssl.a.orig 48 | 49 | -------------------------------------------------------------------------------- /os2/backwardify.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use strict; 3 | 4 | # Use as $0 5 | # Use as $0 -noname 6 | 7 | my $did_library; 8 | my $did_description; 9 | my $do_exports; 10 | my @imports; 11 | my $noname = (@ARGV and $ARGV[0] eq '-noname' and shift); 12 | while (<>) { 13 | unless ($did_library) { 14 | s/\b(cryptssl)\b/crypto/ and $did_library = $1 if /^LIBRARY\s+cryptssl\b/; 15 | s/\b(open_ssl)\b/ssl/ and $did_library = $1 if /^LIBRARY\s+open_ssl\b/; 16 | } 17 | unless ($did_description) { 18 | s&^(DESCRIPTION\s+(['"])).*&${1}\@#www.openssl.org/:#\@forwarder DLL for pre-0.9.7c+ OpenSSL to the new dll naming scheme$2& and $did_description++; 19 | } 20 | if ($do_exports) {{ 21 | last unless /\S/; 22 | warn, last unless /^ \s* ( \w+ ) \s+ \@(\d+)\s*$/x; 23 | push @imports, [$1, $2]; 24 | s/$/ NONAME/ if $noname; 25 | }} 26 | $do_exports++ if not $do_exports and /^EXPORTS/; 27 | print $_; 28 | } 29 | print "IMPORTS\n"; 30 | for my $imp (@imports) { 31 | print "\t$imp->[0]=$did_library.$imp->[1]\n"; 32 | } 33 | -------------------------------------------------------------------------------- /shlib/sco5-shared-gcc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | major="0" 4 | minor="9.7b" 5 | 6 | slib=libssl 7 | sh_slib=$slib.so.$major.$minor 8 | 9 | clib=libcrypto 10 | sh_clib=$clib.so.$major.$minor 11 | 12 | FLAGS="-O3 -fomit-frame-pointer" 13 | SHFLAGS="-DPIC -fPIC" 14 | 15 | touch $sh_clib 16 | touch $sh_slib 17 | 18 | echo collecting all object files for $clib.so 19 | OBJS= 20 | find . -name \*.o -print > allobjs 21 | for obj in `ar t libcrypto.a` 22 | do 23 | OBJS="$OBJS `grep $obj allobjs`" 24 | done 25 | 26 | echo linking $clib.so 27 | gcc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket 28 | 29 | rm -f $clib.so 30 | ln -s $sh_clib $clib.so 31 | 32 | echo collecting all object files for $slib.so 33 | OBJS= 34 | for obj in `ar t libssl.a` 35 | do 36 | OBJS="$OBJS `grep $obj allobjs`" 37 | done 38 | 39 | echo linking $slib.so 40 | gcc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto 41 | 42 | rm -f $slib.so 43 | ln -s $sh_slib $slib.so 44 | 45 | mv libRSAglue.a libRSAglue.a.orig 46 | mv libcrypto.a libcrypto.a.orig 47 | mv libssl.a libssl.a.orig 48 | 49 | -------------------------------------------------------------------------------- /demos/tunala/Makefile: -------------------------------------------------------------------------------- 1 | # Edit these to suit 2 | # 3 | # Oh yeah, and please read the README too. 4 | 5 | 6 | SSL_HOMEDIR=../.. 7 | SSL_INCLUDEDIR=$(SSL_HOMEDIR)/include 8 | SSL_LIBDIR=$(SSL_HOMEDIR) 9 | 10 | RM=rm -f 11 | CC=gcc 12 | DEBUG_FLAGS=-g -ggdb3 -Wall -Wshadow 13 | INCLUDE_FLAGS=-I$(SSL_INCLUDEDIR) 14 | CFLAGS=$(DEBUG_FLAGS) $(INCLUDE_FLAGS) -DNO_CONFIG_H 15 | COMPILE=$(CC) $(CFLAGS) -c 16 | 17 | # Edit, particularly the "-ldl" if not building with "dlfcn" support 18 | LINK_FLAGS=-L$(SSL_LIBDIR) -lssl -lcrypto -ldl 19 | 20 | SRCS=buffer.c cb.c ip.c sm.c tunala.c breakage.c 21 | OBJS=buffer.o cb.o ip.o sm.o tunala.o breakage.o 22 | 23 | TARGETS=tunala 24 | 25 | default: $(TARGETS) 26 | 27 | clean: 28 | $(RM) $(OBJS) $(TARGETS) *.bak core 29 | 30 | .c.o: 31 | $(COMPILE) $< 32 | 33 | tunala: $(OBJS) 34 | $(CC) -o tunala $(OBJS) $(LINK_FLAGS) 35 | 36 | # Extra dependencies, should really use makedepend 37 | buffer.o: buffer.c tunala.h 38 | cb.o: cb.c tunala.h 39 | ip.o: ip.c tunala.h 40 | sm.o: sm.c tunala.h 41 | tunala.o: tunala.c tunala.h 42 | -------------------------------------------------------------------------------- /shlib/svr5-shared.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | major="0" 4 | minor="9.7b" 5 | 6 | slib=libssl 7 | sh_slib=$slib.so.$major.$minor 8 | 9 | clib=libcrypto 10 | sh_clib=$clib.so.$major.$minor 11 | 12 | FLAGS="-O -DFILIO_H -Kalloca -Kthread" 13 | SHFLAGS="-Kpic -DPIC" 14 | 15 | touch $sh_clib 16 | touch $sh_slib 17 | 18 | echo collecting all object files for $clib.so 19 | OBJS= 20 | find . -name \*.o -print > allobjs 21 | for obj in `ar t libcrypto.a` 22 | do 23 | OBJS="$OBJS `grep $obj allobjs`" 24 | done 25 | 26 | echo linking $clib.so 27 | cc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket 28 | 29 | rm -f $clib.so 30 | ln -s $sh_clib $clib.so 31 | 32 | echo collecting all object files for $slib.so 33 | OBJS= 34 | for obj in `ar t libssl.a` 35 | do 36 | OBJS="$OBJS `grep $obj allobjs`" 37 | done 38 | 39 | echo linking $slib.so 40 | cc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto 41 | 42 | rm -f $slib.so 43 | ln -s $sh_slib $slib.so 44 | 45 | mv libRSAglue.a libRSAglue.a.orig 46 | mv libcrypto.a libcrypto.a.orig 47 | mv libssl.a libssl.a.orig 48 | 49 | -------------------------------------------------------------------------------- /doc/crypto/DH_new.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DH_new, DH_free - allocate and free DH objects 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | DH* DH_new(void); 12 | 13 | void DH_free(DH *dh); 14 | 15 | =head1 DESCRIPTION 16 | 17 | DH_new() allocates and initializes a B structure. 18 | 19 | DH_free() frees the B structure and its components. The values are 20 | erased before the memory is returned to the system. 21 | 22 | =head1 RETURN VALUES 23 | 24 | If the allocation fails, DH_new() returns B and sets an error 25 | code that can be obtained by L. Otherwise it returns 26 | a pointer to the newly allocated structure. 27 | 28 | DH_free() returns no value. 29 | 30 | =head1 SEE ALSO 31 | 32 | L, L, 33 | L, 34 | L 35 | 36 | =head1 HISTORY 37 | 38 | DH_new() and DH_free() are available in all versions of SSLeay and OpenSSL. 39 | 40 | =cut 41 | -------------------------------------------------------------------------------- /doc/crypto/DSA_SIG_new.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DSA_SIG_new, DSA_SIG_free - allocate and free DSA signature objects 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | DSA_SIG *DSA_SIG_new(void); 12 | 13 | void DSA_SIG_free(DSA_SIG *a); 14 | 15 | =head1 DESCRIPTION 16 | 17 | DSA_SIG_new() allocates and initializes a B structure. 18 | 19 | DSA_SIG_free() frees the B structure and its components. The 20 | values are erased before the memory is returned to the system. 21 | 22 | =head1 RETURN VALUES 23 | 24 | If the allocation fails, DSA_SIG_new() returns B and sets an 25 | error code that can be obtained by 26 | L. Otherwise it returns a pointer 27 | to the newly allocated structure. 28 | 29 | DSA_SIG_free() returns no value. 30 | 31 | =head1 SEE ALSO 32 | 33 | L, L, 34 | L 35 | 36 | =head1 HISTORY 37 | 38 | DSA_SIG_new() and DSA_SIG_free() were added in OpenSSL 0.9.3. 39 | 40 | =cut 41 | -------------------------------------------------------------------------------- /doc/ssl/SSL_session_reused.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_session_reused - query whether a reused session was negotiated during handshake 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int SSL_session_reused(SSL *ssl); 12 | 13 | =head1 DESCRIPTION 14 | 15 | Query, whether a reused session was negotiated during the handshake. 16 | 17 | =head1 NOTES 18 | 19 | During the negotiation, a client can propose to reuse a session. The server 20 | then looks up the session in its cache. If both client and server agree 21 | on the session, it will be reused and a flag is being set that can be 22 | queried by the application. 23 | 24 | =head1 RETURN VALUES 25 | 26 | The following return values can occur: 27 | 28 | =over 4 29 | 30 | =item Z<>0 31 | 32 | A new session was negotiated. 33 | 34 | =item Z<>1 35 | 36 | A session was reused. 37 | 38 | =back 39 | 40 | =head1 SEE ALSO 41 | 42 | L, L, 43 | L 44 | 45 | =cut 46 | -------------------------------------------------------------------------------- /doc/ssl/SSL_CTX_sessions.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_CTX_sessions - access internal session cache 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx); 12 | 13 | =head1 DESCRIPTION 14 | 15 | SSL_CTX_sessions() returns a pointer to the lhash databases containing the 16 | internal session cache for B. 17 | 18 | =head1 NOTES 19 | 20 | The sessions in the internal session cache are kept in an 21 | L type database. It is possible to directly 22 | access this database e.g. for searching. In parallel, the sessions 23 | form a linked list which is maintained separately from the 24 | L operations, so that the database must not be 25 | modified directly but by using the 26 | L family of functions. 27 | 28 | =head1 SEE ALSO 29 | 30 | L, L, 31 | L, 32 | L 33 | 34 | =cut 35 | -------------------------------------------------------------------------------- /shlib/svr5-shared-gcc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | major="0" 4 | minor="9.7b" 5 | 6 | slib=libssl 7 | sh_slib=$slib.so.$major.$minor 8 | 9 | clib=libcrypto 10 | sh_clib=$clib.so.$major.$minor 11 | 12 | FLAGS="-O3 -DFILIO_H -fomit-frame-pointer -pthread" 13 | SHFLAGS="-DPIC -fPIC" 14 | 15 | touch $sh_clib 16 | touch $sh_slib 17 | 18 | echo collecting all object files for $clib.so 19 | OBJS= 20 | find . -name \*.o -print > allobjs 21 | for obj in `ar t libcrypto.a` 22 | do 23 | OBJS="$OBJS `grep $obj allobjs`" 24 | done 25 | 26 | echo linking $clib.so 27 | gcc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket 28 | 29 | rm -f $clib.so 30 | ln -s $sh_clib $clib.so 31 | 32 | echo collecting all object files for $slib.so 33 | OBJS= 34 | for obj in `ar t libssl.a` 35 | do 36 | OBJS="$OBJS `grep $obj allobjs`" 37 | done 38 | 39 | echo linking $slib.so 40 | gcc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto 41 | 42 | rm -f $slib.so 43 | ln -s $sh_slib $slib.so 44 | 45 | mv libRSAglue.a libRSAglue.a.orig 46 | mv libcrypto.a libcrypto.a.orig 47 | mv libssl.a libssl.a.orig 48 | 49 | -------------------------------------------------------------------------------- /test/tpkcs7d: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7' 4 | 5 | if [ "$1"x != "x" ]; then 6 | t=$1 7 | else 8 | t=pkcs7-1.pem 9 | fi 10 | 11 | echo "testing pkcs7 conversions (2)" 12 | cp $t p7d-fff.p 13 | 14 | echo "p -> d" 15 | $cmd -in p7d-fff.p -inform p -outform d >p7d-f.d 16 | if [ $? != 0 ]; then exit 1; fi 17 | echo "p -> p" 18 | $cmd -in p7d-fff.p -inform p -outform p >p7d-f.p 19 | if [ $? != 0 ]; then exit 1; fi 20 | 21 | echo "d -> d" 22 | $cmd -in p7d-f.d -inform d -outform d >p7d-ff.d1 23 | if [ $? != 0 ]; then exit 1; fi 24 | echo "p -> d" 25 | $cmd -in p7d-f.p -inform p -outform d >p7d-ff.d3 26 | if [ $? != 0 ]; then exit 1; fi 27 | 28 | echo "d -> p" 29 | $cmd -in p7d-f.d -inform d -outform p >p7d-ff.p1 30 | if [ $? != 0 ]; then exit 1; fi 31 | echo "p -> p" 32 | $cmd -in p7d-f.p -inform p -outform p >p7d-ff.p3 33 | if [ $? != 0 ]; then exit 1; fi 34 | 35 | cmp p7d-f.p p7d-ff.p1 36 | if [ $? != 0 ]; then exit 1; fi 37 | cmp p7d-f.p p7d-ff.p3 38 | if [ $? != 0 ]; then exit 1; fi 39 | 40 | /bin/rm -f p7d-f.* p7d-ff.* p7d-fff.* 41 | exit 0 42 | -------------------------------------------------------------------------------- /MacOS/Randomizer.h: -------------------------------------------------------------------------------- 1 | 2 | // Gathers unpredictable system data to be used for generating 3 | // random bits 4 | 5 | #include 6 | 7 | class CRandomizer { 8 | public: 9 | CRandomizer(void); 10 | void PeriodicAction(void); 11 | 12 | private: 13 | 14 | // Private calls 15 | 16 | void AddTimeSinceMachineStartup(void); 17 | void AddAbsoluteSystemStartupTime(void); 18 | void AddAppRunningTime(void); 19 | void AddStartupVolumeInfo(void); 20 | void AddFiller(void); 21 | 22 | void AddCurrentMouse(void); 23 | void AddNow(double millisecondUncertainty); 24 | void AddBytes(void *data, long size, double entropy); 25 | 26 | void GetTimeBaseResolution(void); 27 | unsigned long SysTimer(void); 28 | 29 | // System Info 30 | bool mSupportsLargeVolumes; 31 | bool mIsPowerPC; 32 | bool mIs601; 33 | 34 | // Time info 35 | double mTimebaseTicksPerMillisec; 36 | unsigned long mLastPeriodicTicks; 37 | 38 | // Mouse info 39 | long mSamplePeriod; 40 | Point mLastMouse; 41 | long mMouseStill; 42 | }; 43 | -------------------------------------------------------------------------------- /apps/dh4096.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIICCAKCAgEA+hRyUsFN4VpJ1O8JLcCo/VWr19k3BCgJ4uk+d+KhehjdRqNDNyOQ 3 | l/MOyQNQfWXPeGKmOmIig6Ev/nm6Nf9Z2B1h3R4hExf+zTiHnvVPeRBhjdQi81rt 4 | Xeoh6TNrSBIKIHfUJWBh3va0TxxjQIs6IZOLeVNRLMqzeylWqMf49HsIXqbcokUS 5 | Vt1BkvLdW48j8PPv5DsKRN3tloTxqDJGo9tKvj1Fuk74A+Xda1kNhB7KFlqMyN98 6 | VETEJ6c7KpfOo30mnK30wqw3S8OtaIR/maYX72tGOno2ehFDkq3pnPtEbD2CScxc 7 | alJC+EL7RPk5c/tgeTvCngvc1KZn92Y//EI7G9tPZtylj2b56sHtMftIoYJ9+ODM 8 | sccD5Piz/rejE3Ome8EOOceUSCYAhXn8b3qvxVI1ddd1pED6FHRhFvLrZxFvBEM9 9 | ERRMp5QqOaHJkM+Dxv8Cj6MqrCbfC4u+ZErxodzuusgDgvZiLF22uxMZbobFWyte 10 | OvOzKGtwcTqO/1wV5gKkzu1ZVswVUQd5Gg8lJicwqRWyyNRczDDoG9jVDxmogKTH 11 | AaqLulO7R8Ifa1SwF2DteSGVtgWEN8gDpN3RBmmPTDngyF2DHb5qmpnznwtFKdTL 12 | KWbuHn491xNO25CQWMtem80uKw+pTnisBRF/454n1Jnhub144YRBoN8CAQI= 13 | -----END DH PARAMETERS----- 14 | 15 | These are the 4096 bit DH parameters from "Assigned Number for SKIP Protocols" 16 | (http://www.skip-vpn.org/spec/numbers.html). 17 | See there for how they were generated. 18 | Note that g is not a generator, but this is not a problem since p is a safe prime. 19 | -------------------------------------------------------------------------------- /demos/easy_tls/cacerts.pem: -------------------------------------------------------------------------------- 1 | $Id: cacerts.pem,v 1.1 2001/09/17 19:06:57 bodo Exp $ 2 | 3 | issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit) 4 | subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit) 5 | -----BEGIN CERTIFICATE----- 6 | MIICJjCCAY8CAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV 7 | BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD 8 | VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTc0M1oXDTAxMDYw 9 | OTEzNTc0M1owWzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY 10 | BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYDVQQDExJUZXN0IENBICgxMDI0 11 | IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKO7o8t116VP6cgybTsZ 12 | DCZhr95nYlZuya3aCi1IKoztqwWnjbmDFIriOqGFPrZQ+moMETC9D59iRW/dFXSv 13 | 1F65ka/XY2hLh9exCCo7XuUcDs53Qp3bI3AmMqHjgzE8oO3ajyJAzJkTTOUecQU2 14 | mw/gI4tMM0LqWMQS7luTy4+xAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAM7achv3v 15 | hLQJcv/65eGEpBXM40ZDVoFQFFJWaY5p883HTqLB1x4FdzsXHH0QKBTcKpWwqyu4 16 | YDm3fb8oDugw72bCzfyZK/zVZPR/hVlqI/fvU109Qoc+7oPvIXWky71HfcK6ZBCA 17 | q30KIqGM/uoM60INq97qjDmCJapagcNBGQs= 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /doc/ssl/SSL_CTX_ctrl.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_CTX_ctrl, SSL_CTX_callback_ctrl, SSL_ctrl, SSL_callback_ctrl - internal handling functions for SSL_CTX and SSL objects 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg); 12 | long SSL_CTX_callback_ctrl(SSL_CTX *, int cmd, void (*fp)()); 13 | 14 | long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg); 15 | long SSL_callback_ctrl(SSL *, int cmd, void (*fp)()); 16 | 17 | =head1 DESCRIPTION 18 | 19 | The SSL_*_ctrl() family of functions is used to manipulate settings of 20 | the SSL_CTX and SSL objects. Depending on the command B the arguments 21 | B, B, or B are evaluated. These functions should never 22 | be called directly. All functionalities needed are made available via 23 | other functions or macros. 24 | 25 | =head1 RETURN VALUES 26 | 27 | The return values of the SSL*_ctrl() functions depend on the command 28 | supplied via the B parameter. 29 | 30 | =head1 SEE ALSO 31 | 32 | L 33 | 34 | =cut 35 | -------------------------------------------------------------------------------- /test/Uss.cnf: -------------------------------------------------------------------------------- 1 | # 2 | # SSLeay example configuration file. 3 | # This is mostly being used for generation of certificate requests. 4 | # 5 | 6 | RANDFILE = ./.rnd 7 | 8 | #################################################################### 9 | [ req ] 10 | default_bits = 2048 11 | default_keyfile = keySS.pem 12 | distinguished_name = req_distinguished_name 13 | encrypt_rsa_key = no 14 | default_md = sha256 15 | 16 | [ req_distinguished_name ] 17 | countryName = Country Name (2 letter code) 18 | countryName_default = AU 19 | countryName_value = AU 20 | 21 | organizationName = Organization Name (eg, company) 22 | organizationName_value = Dodgy Brothers 23 | 24 | 0.commonName = Common Name (eg, YOUR name) 25 | 0.commonName_value = Brother 1 26 | 27 | 1.commonName = Common Name (eg, YOUR name) 28 | 1.commonName_value = Brother 2 29 | 30 | [ v3_ee ] 31 | subjectKeyIdentifier=hash 32 | authorityKeyIdentifier=keyid,issuer:always 33 | basicConstraints = CA:false 34 | keyUsage = nonRepudiation, digitalSignature, keyEncipherment 35 | issuerAltName=issuer:copy 36 | 37 | -------------------------------------------------------------------------------- /util/opensslwrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | HERE="`echo $0 | sed -e 's|[^/]*$||'`" 4 | OPENSSL="${HERE}../apps/openssl" 5 | 6 | if [ -d "${HERE}../engines" -a "x$OPENSSL_ENGINES" = "x" ]; then 7 | OPENSSL_ENGINES="${HERE}../engines"; export OPENSSL_ENGINES 8 | fi 9 | 10 | if [ -x "${OPENSSL}.exe" ]; then 11 | # The original reason for this script existence is to work around 12 | # certain caveats in run-time linker behaviour. On Windows platforms 13 | # adjusting $PATH used to be sufficient, but with introduction of 14 | # SafeDllSearchMode in XP/2003 the only way to get it right in 15 | # *all* possible situations is to copy newly built .DLLs to apps/ 16 | # and test/, which is now done elsewhere... The $PATH is adjusted 17 | # for backward compatibility (and nostagical reasons:-). 18 | if [ "$OSTYPE" != msdosdjgpp ]; then 19 | PATH="${HERE}..:$PATH"; export PATH 20 | fi 21 | exec "${OPENSSL}.exe" "$@" 22 | elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then 23 | exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@" 24 | else 25 | exec "${OPENSSL}" "$@" # hope for the best... 26 | fi 27 | -------------------------------------------------------------------------------- /crypto/dso/README: -------------------------------------------------------------------------------- 1 | NOTES 2 | ----- 3 | 4 | I've checked out HPUX (well, version 11 at least) and shl_t is 5 | a pointer type so it's safe to use in the way it has been in 6 | dso_dl.c. On the other hand, HPUX11 support dlfcn too and 7 | according to their man page, prefer developers to move to that. 8 | I'll leave Richard's changes there as I guess dso_dl is needed 9 | for HPUX10.20. 10 | 11 | There is now a callback scheme in place where filename conversion can 12 | (a) be turned off altogether through the use of the 13 | DSO_FLAG_NO_NAME_TRANSLATION flag, 14 | (b) be handled by default using the default DSO_METHOD's converter 15 | (c) overriden per-DSO by setting the override callback 16 | (d) a mix of (b) and (c) - eg. implement an override callback that; 17 | (i) checks if we're win32 (if(strstr(dso->meth->name, "win32")....) 18 | and if so, convert "blah" into "blah32.dll" (the default is 19 | otherwise to make it "blah.dll"). 20 | (ii) default to the normal behaviour - we're not on win32, eg. 21 | finish with (return dso->meth->dso_name_converter(dso,NULL)). 22 | 23 | -------------------------------------------------------------------------------- /crypto/evp/m_wp.c: -------------------------------------------------------------------------------- 1 | /* crypto/evp/m_wp.c */ 2 | 3 | #include 4 | #include "cryptlib.h" 5 | 6 | #ifndef OPENSSL_NO_WHIRLPOOL 7 | 8 | # include 9 | # include 10 | # include 11 | # include 12 | # include "evp_locl.h" 13 | 14 | static int init(EVP_MD_CTX *ctx) 15 | { 16 | return WHIRLPOOL_Init(ctx->md_data); 17 | } 18 | 19 | static int update(EVP_MD_CTX *ctx, const void *data, size_t count) 20 | { 21 | return WHIRLPOOL_Update(ctx->md_data, data, count); 22 | } 23 | 24 | static int final(EVP_MD_CTX *ctx, unsigned char *md) 25 | { 26 | return WHIRLPOOL_Final(md, ctx->md_data); 27 | } 28 | 29 | static const EVP_MD whirlpool_md = { 30 | NID_whirlpool, 31 | 0, 32 | WHIRLPOOL_DIGEST_LENGTH, 33 | 0, 34 | init, 35 | update, 36 | final, 37 | NULL, 38 | NULL, 39 | EVP_PKEY_NULL_method, 40 | WHIRLPOOL_BBLOCK / 8, 41 | sizeof(EVP_MD *) + sizeof(WHIRLPOOL_CTX), 42 | }; 43 | 44 | const EVP_MD *EVP_whirlpool(void) 45 | { 46 | return (&whirlpool_md); 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /doc/ssl/SSL_get_fd.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_get_fd - get file descriptor linked to an SSL object 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | int SSL_get_fd(const SSL *ssl); 12 | int SSL_get_rfd(const SSL *ssl); 13 | int SSL_get_wfd(const SSL *ssl); 14 | 15 | =head1 DESCRIPTION 16 | 17 | SSL_get_fd() returns the file descriptor which is linked to B. 18 | SSL_get_rfd() and SSL_get_wfd() return the file descriptors for the 19 | read or the write channel, which can be different. If the read and the 20 | write channel are different, SSL_get_fd() will return the file descriptor 21 | of the read channel. 22 | 23 | =head1 RETURN VALUES 24 | 25 | The following return values can occur: 26 | 27 | =over 4 28 | 29 | =item -1 30 | 31 | The operation failed, because the underlying BIO is not of the correct type 32 | (suitable for file descriptors). 33 | 34 | =item E=0 35 | 36 | The file descriptor linked to B. 37 | 38 | =back 39 | 40 | =head1 SEE ALSO 41 | 42 | L, L , L 43 | 44 | =cut 45 | -------------------------------------------------------------------------------- /doc/ssl/SSL_new.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_new - create a new SSL structure for a connection 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | SSL *SSL_new(SSL_CTX *ctx); 12 | 13 | =head1 DESCRIPTION 14 | 15 | SSL_new() creates a new B structure which is needed to hold the 16 | data for a TLS/SSL connection. The new structure inherits the settings 17 | of the underlying context B: connection method (SSLv2/v3/TLSv1), 18 | options, verification settings, timeout settings. 19 | 20 | =head1 RETURN VALUES 21 | 22 | The following return values can occur: 23 | 24 | =over 4 25 | 26 | =item NULL 27 | 28 | The creation of a new SSL structure failed. Check the error stack to 29 | find out the reason. 30 | 31 | =item Pointer to an SSL structure 32 | 33 | The return value points to an allocated SSL structure. 34 | 35 | =back 36 | 37 | =head1 SEE ALSO 38 | 39 | L, L, 40 | L, 41 | L, 42 | L 43 | 44 | =cut 45 | -------------------------------------------------------------------------------- /crypto/rc2/version: -------------------------------------------------------------------------------- 1 | 1.1 23/08/96 - eay 2 | Changed RC2_set_key() so it now takes another argument. Many 3 | thanks to Peter Gutmann for the 4 | clarification and origional specification of RC2. BSAFE uses 5 | this last parameter, 'bits'. It the key is 128 bits, BSAFE 6 | also sets this parameter to 128. The old behaviour can be 7 | duplicated by setting this parameter to 1024. 8 | 9 | 1.0 08/04/96 - eay 10 | First version of SSLeay with rc2. This has been written from the spec 11 | posted sci.crypt. It is in this directory under rrc2.doc 12 | I have no test values for any mode other than ecb, my wrappers for the 13 | other modes should be ok since they are basically the same as 14 | the ones taken from idea and des :-). I have implemented them as 15 | little-endian operators. 16 | While rc2 is included because it is used with SSL, I don't know how 17 | far I trust it. It is about the same speed as IDEA and DES. 18 | So if you are paranoid, used Tripple DES, else IDEA. If RC2 19 | does get used more, perhaps more people will look for weaknesses in 20 | it. 21 | 22 | 23 | -------------------------------------------------------------------------------- /doc/crypto/RSA_new.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | RSA_new, RSA_free - allocate and free RSA objects 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | RSA * RSA_new(void); 12 | 13 | void RSA_free(RSA *rsa); 14 | 15 | =head1 DESCRIPTION 16 | 17 | RSA_new() allocates and initializes an B structure. It is equivalent to 18 | calling RSA_new_method(NULL). 19 | 20 | RSA_free() frees the B structure and its components. The key is 21 | erased before the memory is returned to the system. 22 | 23 | =head1 RETURN VALUES 24 | 25 | If the allocation fails, RSA_new() returns B and sets an error 26 | code that can be obtained by L. Otherwise it returns 27 | a pointer to the newly allocated structure. 28 | 29 | RSA_free() returns no value. 30 | 31 | =head1 SEE ALSO 32 | 33 | L, L, 34 | L, 35 | L 36 | 37 | =head1 HISTORY 38 | 39 | RSA_new() and RSA_free() are available in all versions of SSLeay and OpenSSL. 40 | 41 | =cut 42 | -------------------------------------------------------------------------------- /ms/x86asm.bat: -------------------------------------------------------------------------------- 1 | 2 | @echo off 3 | echo Generating x86 assember 4 | 5 | echo Bignum 6 | cd crypto\bn\asm 7 | perl x86.pl win32n > bn-win32.asm 8 | cd ..\..\.. 9 | 10 | echo DES 11 | cd crypto\des\asm 12 | perl des-586.pl win32n > d-win32.asm 13 | cd ..\..\.. 14 | 15 | echo "crypt(3)" 16 | 17 | cd crypto\des\asm 18 | perl crypt586.pl win32n > y-win32.asm 19 | cd ..\..\.. 20 | 21 | echo Blowfish 22 | 23 | cd crypto\bf\asm 24 | perl bf-586.pl win32n > b-win32.asm 25 | cd ..\..\.. 26 | 27 | echo CAST5 28 | cd crypto\cast\asm 29 | perl cast-586.pl win32n > c-win32.asm 30 | cd ..\..\.. 31 | 32 | echo RC4 33 | cd crypto\rc4\asm 34 | perl rc4-586.pl win32n > r4-win32.asm 35 | cd ..\..\.. 36 | 37 | echo MD5 38 | cd crypto\md5\asm 39 | perl md5-586.pl win32n > m5-win32.asm 40 | cd ..\..\.. 41 | 42 | echo SHA1 43 | cd crypto\sha\asm 44 | perl sha1-586.pl win32n > s1-win32.asm 45 | cd ..\..\.. 46 | 47 | echo RIPEMD160 48 | cd crypto\ripemd\asm 49 | perl rmd-586.pl win32n > rm-win32.asm 50 | cd ..\..\.. 51 | 52 | echo RC5\32 53 | cd crypto\rc5\asm 54 | perl rc5-586.pl win32n > r5-win32.asm 55 | cd ..\..\.. 56 | 57 | echo on 58 | -------------------------------------------------------------------------------- /test/testgen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | T=testcert 4 | KEY=512 5 | CA=../certs/testca.pem 6 | 7 | /bin/rm -f $T.1 $T.2 $T.key 8 | 9 | if test "$OSTYPE" = msdosdjgpp; then 10 | PATH=../apps\;$PATH; 11 | else 12 | PATH=../apps:$PATH; 13 | fi 14 | export PATH 15 | 16 | echo "generating certificate request" 17 | 18 | echo "string to make the random number generator think it has entropy" >> ./.rnd 19 | 20 | if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then 21 | req_new='-newkey dsa:../apps/dsa512.pem' 22 | else 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" 26 | fi 27 | 28 | echo "This could take some time." 29 | 30 | rm -f testkey.pem testreq.pem 31 | 32 | ../util/shlib_wrap.sh ../apps/openssl req -config test.cnf $req_new -out testreq.pem 33 | if [ $? != 0 ]; then 34 | echo problems creating request 35 | exit 1 36 | fi 37 | 38 | ../util/shlib_wrap.sh ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout 39 | if [ $? != 0 ]; then 40 | echo signature on req is wrong 41 | exit 1 42 | fi 43 | 44 | exit 0 45 | -------------------------------------------------------------------------------- /doc/apps/version.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | version - print OpenSSL version information 6 | 7 | =head1 SYNOPSIS 8 | 9 | B 10 | [B<-a>] 11 | [B<-v>] 12 | [B<-b>] 13 | [B<-o>] 14 | [B<-f>] 15 | [B<-p>] 16 | [B<-d>] 17 | 18 | =head1 DESCRIPTION 19 | 20 | This command is used to print out version information about OpenSSL. 21 | 22 | =head1 OPTIONS 23 | 24 | =over 4 25 | 26 | =item B<-a> 27 | 28 | all information, this is the same as setting all the other flags. 29 | 30 | =item B<-v> 31 | 32 | the current OpenSSL version. 33 | 34 | =item B<-b> 35 | 36 | the date the current version of OpenSSL was built. 37 | 38 | =item B<-o> 39 | 40 | option information: various options set when the library was built. 41 | 42 | =item B<-f> 43 | 44 | compilation flags. 45 | 46 | =item B<-p> 47 | 48 | platform setting. 49 | 50 | =item B<-d> 51 | 52 | OPENSSLDIR setting. 53 | 54 | =back 55 | 56 | =head1 NOTES 57 | 58 | The output of B would typically be used when sending 59 | in a bug report. 60 | 61 | =head1 HISTORY 62 | 63 | The B<-d> option was added in OpenSSL 0.9.7. 64 | 65 | =cut 66 | -------------------------------------------------------------------------------- /doc/crypto/DSA_new.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | DSA_new, DSA_free - allocate and free DSA objects 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | DSA* DSA_new(void); 12 | 13 | void DSA_free(DSA *dsa); 14 | 15 | =head1 DESCRIPTION 16 | 17 | DSA_new() allocates and initializes a B structure. It is equivalent to 18 | calling DSA_new_method(NULL). 19 | 20 | DSA_free() frees the B structure and its components. The values are 21 | erased before the memory is returned to the system. 22 | 23 | =head1 RETURN VALUES 24 | 25 | If the allocation fails, DSA_new() returns B and sets an error 26 | code that can be obtained by 27 | L. Otherwise it returns a pointer 28 | to the newly allocated structure. 29 | 30 | DSA_free() returns no value. 31 | 32 | =head1 SEE ALSO 33 | 34 | L, L, 35 | L, 36 | L 37 | 38 | =head1 HISTORY 39 | 40 | DSA_new() and DSA_free() are available in all versions of SSLeay and OpenSSL. 41 | 42 | =cut 43 | -------------------------------------------------------------------------------- /demos/cms/cacert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC6DCCAlGgAwIBAgIJAMfGO3rdo2uUMA0GCSqGSIb3DQEBBAUAMFcxCzAJBgNV 3 | BAYTAlVLMRIwEAYDVQQHEwlUZXN0IENpdHkxFjAUBgNVBAoTDU9wZW5TU0wgR3Jv 4 | dXAxHDAaBgNVBAMTE1Rlc3QgUy9NSU1FIFJvb3QgQ0EwHhcNMDcwNDEzMTc0MzE3 5 | WhcNMTcwNDEwMTc0MzE3WjBXMQswCQYDVQQGEwJVSzESMBAGA1UEBxMJVGVzdCBD 6 | aXR5MRYwFAYDVQQKEw1PcGVuU1NMIEdyb3VwMRwwGgYDVQQDExNUZXN0IFMvTUlN 7 | RSBSb290IENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqJMal1uC1/1wz 8 | i5+dE4EZF2im3BgROm5PVMbwPY9V1t+KYvtdc3rMcRgJaMbP+qaEcDXoIsZfYXGR 9 | ielgfDNZmZcj1y/FOum+Jc2OZMs3ggPmjIQ3dbBECq0hZKcbz7wfr+2OeNWm46iT 10 | jcSIXpGIRhUYEzOgv7zb8oOU70IbbwIDAQABo4G7MIG4MB0GA1UdDgQWBBRHUypx 11 | CXFQYqewhGo72lWPQUsjoDCBiAYDVR0jBIGAMH6AFEdTKnEJcVBip7CEajvaVY9B 12 | SyOgoVukWTBXMQswCQYDVQQGEwJVSzESMBAGA1UEBxMJVGVzdCBDaXR5MRYwFAYD 13 | VQQKEw1PcGVuU1NMIEdyb3VwMRwwGgYDVQQDExNUZXN0IFMvTUlNRSBSb290IENB 14 | ggkAx8Y7et2ja5QwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQANI+Yc 15 | G/YDM1WMUGEzEkU9UhsIUqdyBebnK3+OyxZSouDcE/M10jFJzBf/F5b0uUGAKWwo 16 | u0dzmILfKjdfWe8EyCRafZcm00rVcO09i/63FBYzlHbmfUATIqZdhKzxxQMPs5mF 17 | 1je+pHUpzIY8TSXyh/uD9IkAy04IHwGZQf9akw== 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /demos/smime/cacert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC6DCCAlGgAwIBAgIJAMfGO3rdo2uUMA0GCSqGSIb3DQEBBAUAMFcxCzAJBgNV 3 | BAYTAlVLMRIwEAYDVQQHEwlUZXN0IENpdHkxFjAUBgNVBAoTDU9wZW5TU0wgR3Jv 4 | dXAxHDAaBgNVBAMTE1Rlc3QgUy9NSU1FIFJvb3QgQ0EwHhcNMDcwNDEzMTc0MzE3 5 | WhcNMTcwNDEwMTc0MzE3WjBXMQswCQYDVQQGEwJVSzESMBAGA1UEBxMJVGVzdCBD 6 | aXR5MRYwFAYDVQQKEw1PcGVuU1NMIEdyb3VwMRwwGgYDVQQDExNUZXN0IFMvTUlN 7 | RSBSb290IENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqJMal1uC1/1wz 8 | i5+dE4EZF2im3BgROm5PVMbwPY9V1t+KYvtdc3rMcRgJaMbP+qaEcDXoIsZfYXGR 9 | ielgfDNZmZcj1y/FOum+Jc2OZMs3ggPmjIQ3dbBECq0hZKcbz7wfr+2OeNWm46iT 10 | jcSIXpGIRhUYEzOgv7zb8oOU70IbbwIDAQABo4G7MIG4MB0GA1UdDgQWBBRHUypx 11 | CXFQYqewhGo72lWPQUsjoDCBiAYDVR0jBIGAMH6AFEdTKnEJcVBip7CEajvaVY9B 12 | SyOgoVukWTBXMQswCQYDVQQGEwJVSzESMBAGA1UEBxMJVGVzdCBDaXR5MRYwFAYD 13 | VQQKEw1PcGVuU1NMIEdyb3VwMRwwGgYDVQQDExNUZXN0IFMvTUlNRSBSb290IENB 14 | ggkAx8Y7et2ja5QwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQANI+Yc 15 | G/YDM1WMUGEzEkU9UhsIUqdyBebnK3+OyxZSouDcE/M10jFJzBf/F5b0uUGAKWwo 16 | u0dzmILfKjdfWe8EyCRafZcm00rVcO09i/63FBYzlHbmfUATIqZdhKzxxQMPs5mF 17 | 1je+pHUpzIY8TSXyh/uD9IkAy04IHwGZQf9akw== 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /crypto/bio/bio_lcl.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if BIO_FLAGS_UPLINK==0 4 | /* Shortcut UPLINK calls on most platforms... */ 5 | # define UP_stdin stdin 6 | # define UP_stdout stdout 7 | # define UP_stderr stderr 8 | # define UP_fprintf fprintf 9 | # define UP_fgets fgets 10 | # define UP_fread fread 11 | # define UP_fwrite fwrite 12 | # undef UP_fsetmod 13 | # define UP_feof feof 14 | # define UP_fclose fclose 15 | 16 | # define UP_fopen fopen 17 | # define UP_fseek fseek 18 | # define UP_ftell ftell 19 | # define UP_fflush fflush 20 | # define UP_ferror ferror 21 | # ifdef _WIN32 22 | # define UP_fileno _fileno 23 | # define UP_open _open 24 | # define UP_read _read 25 | # define UP_write _write 26 | # define UP_lseek _lseek 27 | # define UP_close _close 28 | # else 29 | # define UP_fileno fileno 30 | # define UP_open open 31 | # define UP_read read 32 | # define UP_write write 33 | # define UP_lseek lseek 34 | # define UP_close close 35 | # endif 36 | #endif 37 | -------------------------------------------------------------------------------- /doc/crypto/ASN1_STRING_new.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | ASN1_STRING_new, ASN1_STRING_type_new, ASN1_STRING_free - 6 | ASN1_STRING allocation functions 7 | 8 | =head1 SYNOPSIS 9 | 10 | #include 11 | 12 | ASN1_STRING * ASN1_STRING_new(void); 13 | ASN1_STRING * ASN1_STRING_type_new(int type); 14 | void ASN1_STRING_free(ASN1_STRING *a); 15 | 16 | =head1 DESCRIPTION 17 | 18 | ASN1_STRING_new() returns an allocated B structure. Its type 19 | is undefined. 20 | 21 | ASN1_STRING_type_new() returns an allocated B structure of 22 | type B. 23 | 24 | ASN1_STRING_free() frees up B. 25 | 26 | =head1 NOTES 27 | 28 | Other string types call the B functions. For example 29 | ASN1_OCTET_STRING_new() calls ASN1_STRING_type(V_ASN1_OCTET_STRING). 30 | 31 | =head1 RETURN VALUES 32 | 33 | ASN1_STRING_new() and ASN1_STRING_type_new() return a valid 34 | ASN1_STRING structure or B if an error occurred. 35 | 36 | ASN1_STRING_free() does not return a value. 37 | 38 | =head1 SEE ALSO 39 | 40 | L 41 | 42 | =head1 HISTORY 43 | 44 | TBA 45 | 46 | =cut 47 | -------------------------------------------------------------------------------- /doc/ssl/SSL_CONF_CTX_new.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_CONF_CTX_new, SSL_CONF_CTX_free - SSL configuration allocation functions 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | SSL_CONF_CTX *SSL_CONF_CTX_new(void); 12 | void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx); 13 | 14 | =head1 DESCRIPTION 15 | 16 | The function SSL_CONF_CTX_new() allocates and initialises an B 17 | structure for use with the SSL_CONF functions. 18 | 19 | The function SSL_CONF_CTX_free() frees up the context B. 20 | 21 | =head1 RETURN VALUES 22 | 23 | SSL_CONF_CTX_new() returns either the newly allocated B structure 24 | or B if an error occurs. 25 | 26 | SSL_CONF_CTX_free() does not return a value. 27 | 28 | =head1 SEE ALSO 29 | 30 | L, 31 | L, 32 | L, 33 | L, 34 | L 35 | 36 | =head1 HISTORY 37 | 38 | These functions were first added to OpenSSL 1.0.2 39 | 40 | =cut 41 | -------------------------------------------------------------------------------- /test/P1ss.cnf: -------------------------------------------------------------------------------- 1 | # 2 | # SSLeay example configuration file. 3 | # This is mostly being used for generation of certificate requests. 4 | # 5 | 6 | RANDFILE = ./.rnd 7 | 8 | #################################################################### 9 | [ req ] 10 | default_bits = 1024 11 | default_keyfile = keySS.pem 12 | distinguished_name = req_distinguished_name 13 | encrypt_rsa_key = no 14 | default_md = md2 15 | 16 | [ req_distinguished_name ] 17 | countryName = Country Name (2 letter code) 18 | countryName_default = AU 19 | countryName_value = AU 20 | 21 | organizationName = Organization Name (eg, company) 22 | organizationName_value = Dodgy Brothers 23 | 24 | 0.commonName = Common Name (eg, YOUR name) 25 | 0.commonName_value = Brother 1 26 | 27 | 1.commonName = Common Name (eg, YOUR name) 28 | 1.commonName_value = Brother 2 29 | 30 | 2.commonName = Common Name (eg, YOUR name) 31 | 2.commonName_value = Proxy 1 32 | 33 | [ v3_proxy ] 34 | basicConstraints=CA:FALSE 35 | subjectKeyIdentifier=hash 36 | authorityKeyIdentifier=keyid,issuer:always 37 | proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:1,policy:text:AB 38 | -------------------------------------------------------------------------------- /bugs/dggccbug.c: -------------------------------------------------------------------------------- 1 | /* NOCW */ 2 | /* dggccbug.c */ 3 | /* bug found by Eric Young (eay@cryptsoft.com) - May 1995 */ 4 | 5 | #include 6 | 7 | /* 8 | * There is a bug in gcc version 2.5.8 (88open OCS/BCS, DG-2.5.8.3, Oct 14 9 | * 1994) as shipped with DGUX 5.4R3.10 that can be bypassed by defining 10 | * DG_GCC_BUG in my code. The bug manifests itself by the vaule of a pointer 11 | * that is used only by reference, not having it's value change when it is 12 | * used to check for exiting the loop. Probably caused by there being 2 13 | * copies of the valiable, one in a register and one being an address that is 14 | * passed. 15 | */ 16 | 17 | /*- 18 | * compare the out put from 19 | * gcc dggccbug.c; ./a.out 20 | * and 21 | * gcc -O dggccbug.c; ./a.out 22 | * compile with -DFIXBUG to remove the bug when optimising. 23 | */ 24 | 25 | void inc(a) 26 | int *a; 27 | { 28 | (*a)++; 29 | } 30 | 31 | main() 32 | { 33 | int p = 0; 34 | #ifdef FIXBUG 35 | int dummy; 36 | #endif 37 | 38 | while (p < 3) { 39 | fprintf(stderr, "%08X\n", p); 40 | inc(&p); 41 | #ifdef FIXBUG 42 | dummy += p; 43 | #endif 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /crypto/arm64cpuid.S: -------------------------------------------------------------------------------- 1 | #include "arm_arch.h" 2 | 3 | .text 4 | .arch armv8-a+crypto 5 | 6 | .align 5 7 | .global _armv7_neon_probe 8 | .type _armv7_neon_probe,%function 9 | _armv7_neon_probe: 10 | orr v15.16b, v15.16b, v15.16b 11 | ret 12 | .size _armv7_neon_probe,.-_armv7_neon_probe 13 | 14 | .global _armv7_tick 15 | .type _armv7_tick,%function 16 | _armv7_tick: 17 | mrs x0, CNTVCT_EL0 18 | ret 19 | .size _armv7_tick,.-_armv7_tick 20 | 21 | .global _armv8_aes_probe 22 | .type _armv8_aes_probe,%function 23 | _armv8_aes_probe: 24 | aese v0.16b, v0.16b 25 | ret 26 | .size _armv8_aes_probe,.-_armv8_aes_probe 27 | 28 | .global _armv8_sha1_probe 29 | .type _armv8_sha1_probe,%function 30 | _armv8_sha1_probe: 31 | sha1h s0, s0 32 | ret 33 | .size _armv8_sha1_probe,.-_armv8_sha1_probe 34 | 35 | .global _armv8_sha256_probe 36 | .type _armv8_sha256_probe,%function 37 | _armv8_sha256_probe: 38 | sha256su0 v0.4s, v0.4s 39 | ret 40 | .size _armv8_sha256_probe,.-_armv8_sha256_probe 41 | .global _armv8_pmull_probe 42 | .type _armv8_pmull_probe,%function 43 | _armv8_pmull_probe: 44 | pmull v0.1q, v0.1d, v0.1d 45 | ret 46 | .size _armv8_pmull_probe,.-_armv8_pmull_probe 47 | -------------------------------------------------------------------------------- /doc/crypto/PEM_write_bio_CMS_stream.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | PEM_write_bio_CMS_stream - output CMS_ContentInfo structure in PEM format. 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | #include 11 | 12 | int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *data, int flags); 13 | 14 | =head1 DESCRIPTION 15 | 16 | PEM_write_bio_CMS_stream() outputs a CMS_ContentInfo structure in PEM format. 17 | 18 | It is otherwise identical to the function SMIME_write_CMS(). 19 | 20 | =head1 NOTES 21 | 22 | This function is effectively a version of the PEM_write_bio_CMS() supporting 23 | streaming. 24 | 25 | =head1 RETURN VALUES 26 | 27 | PEM_write_bio_CMS_stream() returns 1 for success or 0 for failure. 28 | 29 | =head1 SEE ALSO 30 | 31 | L, L, 32 | L, L 33 | L, 34 | L, 35 | L 36 | 37 | =head1 HISTORY 38 | 39 | PEM_write_bio_CMS_stream() was added to OpenSSL 1.0.0 40 | 41 | =cut 42 | -------------------------------------------------------------------------------- /doc/ssl/SSL_set_verify_result.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | SSL_set_verify_result - override result of peer certificate verification 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | 11 | void SSL_set_verify_result(SSL *ssl, long verify_result); 12 | 13 | =head1 DESCRIPTION 14 | 15 | SSL_set_verify_result() sets B of the object B to be the 16 | result of the verification of the X509 certificate presented by the peer, 17 | if any. 18 | 19 | =head1 NOTES 20 | 21 | SSL_set_verify_result() overrides the verification result. It only changes 22 | the verification result of the B object. It does not become part of the 23 | established session, so if the session is to be reused later, the original 24 | value will reappear. 25 | 26 | The valid codes for B are documented in L. 27 | 28 | =head1 RETURN VALUES 29 | 30 | SSL_set_verify_result() does not provide a return value. 31 | 32 | =head1 SEE ALSO 33 | 34 | L, L, 35 | L, 36 | L 37 | 38 | =cut 39 | -------------------------------------------------------------------------------- /doc/crypto/PEM_write_bio_PKCS7_stream.pod: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 NAME 4 | 5 | PEM_write_bio_PKCS7_stream - output PKCS7 structure in PEM format. 6 | 7 | =head1 SYNOPSIS 8 | 9 | #include 10 | #include 11 | 12 | int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *data, int flags); 13 | 14 | =head1 DESCRIPTION 15 | 16 | PEM_write_bio_PKCS7_stream() outputs a PKCS7 structure in PEM format. 17 | 18 | It is otherwise identical to the function SMIME_write_PKCS7(). 19 | 20 | =head1 NOTES 21 | 22 | This function is effectively a version of the PEM_write_bio_PKCS7() supporting 23 | streaming. 24 | 25 | =head1 RETURN VALUES 26 | 27 | PEM_write_bio_PKCS7_stream() returns 1 for success or 0 for failure. 28 | 29 | =head1 SEE ALSO 30 | 31 | L, L, 32 | L, L 33 | L, 34 | L, 35 | L 36 | 37 | =head1 HISTORY 38 | 39 | PEM_write_bio_PKCS7_stream() was added to OpenSSL 1.0.0 40 | 41 | =cut 42 | -------------------------------------------------------------------------------- /crypto/bn/asm/README: -------------------------------------------------------------------------------- 1 | 2 | 3 | All assember in this directory are just version of the file 4 | crypto/bn/bn_asm.c. 5 | 6 | Quite a few of these files are just the assember output from gcc since on 7 | quite a few machines they are 2 times faster than the system compiler. 8 | 9 | For the x86, I have hand written assember because of the bad job all 10 | compilers seem to do on it. This normally gives a 2 time speed up in the RSA 11 | routines. 12 | 13 | For the DEC alpha, I also hand wrote the assember (except the division which 14 | is just the output from the C compiler pasted on the end of the file). 15 | On the 2 alpha C compilers I had access to, it was not possible to do 16 | 64b x 64b -> 128b calculations (both long and the long long data types 17 | were 64 bits). So the hand assember gives access to the 128 bit result and 18 | a 2 times speedup :-). 19 | 20 | There are 3 versions of assember for the HP PA-RISC. 21 | 22 | pa-risc.s is the origional one which works fine and generated using gcc :-) 23 | 24 | pa-risc2W.s and pa-risc2.s are 64 and 32-bit PA-RISC 2.0 implementations 25 | by Chris Ruemmler from HP (with some help from the HP C compiler). 26 | 27 | 28 | -------------------------------------------------------------------------------- /crypto/des/Imakefile: -------------------------------------------------------------------------------- 1 | # This Imakefile has not been tested for a while but it should still 2 | # work when placed in the correct directory in the kerberos v 4 distribution 3 | 4 | SRCS= cbc_cksm.c cbc_enc.c ecb_enc.c pcbc_enc.c \ 5 | qud_cksm.c rand_key.c read_pwd.c set_key.c str2key.c \ 6 | enc_read.c enc_writ.c fcrypt.c cfb_enc.c \ 7 | ecb3_enc.c ofb_enc.c ofb64enc.c 8 | 9 | OBJS= cbc_cksm.o cbc_enc.o ecb_enc.o pcbc_enc.o \ 10 | qud_cksm.o rand_key.o read_pwd.o set_key.o str2key.o \ 11 | enc_read.o enc_writ.o fcrypt.o cfb_enc.o \ 12 | ecb3_enc.o ofb_enc.o ofb64enc.o 13 | 14 | GENERAL=COPYRIGHT FILES INSTALL Imakefile README VERSION makefile times \ 15 | vms.com KERBEROS 16 | DES= des.c des.man 17 | TESTING=destest.c speed.c rpw.c 18 | LIBDES= des_crypt.man des.h des_locl.h podd.h sk.h spr.h 19 | 20 | PERL= des.pl testdes.pl doIP doPC1 doPC2 PC1 PC2 shifts.pl 21 | 22 | CODE= $(GENERAL) $(DES) $(TESTING) $(SRCS) $(LIBDES) $(PERL) 23 | 24 | SRCDIR=$(SRCTOP)/lib/des 25 | 26 | DBG= -O 27 | INCLUDE= -I$(SRCDIR) 28 | CC= cc 29 | 30 | library_obj_rule() 31 | 32 | install_library_target(des,$(OBJS),$(SRCS),) 33 | 34 | test(destest,libdes.a,) 35 | test(rpw,libdes.a,) 36 | -------------------------------------------------------------------------------- /crypto/bn/divtest.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static int Rand(n) 5 | { 6 | unsigned char x[2]; 7 | RAND_pseudo_bytes(x, 2); 8 | return (x[0] + 2 * x[1]); 9 | } 10 | 11 | static void bug(char *m, BIGNUM *a, BIGNUM *b) 12 | { 13 | printf("%s!\na=", m); 14 | BN_print_fp(stdout, a); 15 | printf("\nb="); 16 | BN_print_fp(stdout, b); 17 | printf("\n"); 18 | fflush(stdout); 19 | } 20 | 21 | main() 22 | { 23 | BIGNUM *a = BN_new(), *b = BN_new(), *c = BN_new(), *d = BN_new(), 24 | *C = BN_new(), *D = BN_new(); 25 | BN_RECP_CTX *recp = BN_RECP_CTX_new(); 26 | BN_CTX *ctx = BN_CTX_new(); 27 | 28 | for (;;) { 29 | BN_pseudo_rand(a, Rand(), 0, 0); 30 | BN_pseudo_rand(b, Rand(), 0, 0); 31 | if (BN_is_zero(b)) 32 | continue; 33 | 34 | BN_RECP_CTX_set(recp, b, ctx); 35 | if (BN_div(C, D, a, b, ctx) != 1) 36 | bug("BN_div failed", a, b); 37 | if (BN_div_recp(c, d, a, recp, ctx) != 1) 38 | bug("BN_div_recp failed", a, b); 39 | else if (BN_cmp(c, C) != 0 || BN_cmp(c, C) != 0) 40 | bug("mismatch", a, b); 41 | } 42 | } 43 | --------------------------------------------------------------------------------